From 3b26d16f8c0306241cbeaf1017b0c66c14404bde Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Thu, 3 Sep 2026 12:59:44 -0700 Subject: [PATCH 1/3] feat: show the coding agent's task list and counted tool activity in chat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Coding agents' own task lists (Claude Code TodoWrite, OpenCode todowrite, Codex update_plan) were dropped into a collapsed "Used tools" row, so the transcript never showed which step the agent was on or what it had finished. - Render the newest task-list update in a turn as a checklist card; earlier updates are superseded and paint nothing, failed writes stay error rows. - Dock a progress strip above the composer while the turn runs: current step, done/total count, progress bar, expandable full list. - Collapsed tool groups now summarize what was done per activity kind ("Read 3 files · Edited 2 files · Ran 4 commands") instead of "Used tools". - Codex: map the `turn/plan/updated` notification (the only way its update_plan tool reaches the client) to a task-list tool part, including sub-agent turns. - Demo transcripts emit each harness's native task-list call. Co-Authored-By: Claude Fable 5.1 --- src/local/demo.rs | 112 +++-- src/local/harness/codex.rs | 94 ++++ ui/dist/assets/index-DJQBUcLC.css | 1 - ui/dist/assets/index-DcSQaaF0.css | 1 + .../{index-CbahZ8zs.js => index-EjlOBJbC.js} | 430 +++++++++--------- ui/dist/index.html | 4 +- ui/messages/en.json | 27 +- ui/messages/fa.json | 27 +- ui/messages/zh-CN.json | 27 +- ui/src/chatRendering.ts | 8 +- ui/src/components/ChatPanel.tsx | 90 +++- ui/src/components/TaskList.tsx | 124 +++++ ui/src/taskProgress.ts | 95 ++++ ui/tests/chatRendering.test.mjs | 9 + ui/tests/taskProgress.test.mjs | 101 ++++ ui/tsconfig.json | 3 +- 16 files changed, 887 insertions(+), 266 deletions(-) delete mode 100644 ui/dist/assets/index-DJQBUcLC.css create mode 100644 ui/dist/assets/index-DcSQaaF0.css rename ui/dist/assets/{index-CbahZ8zs.js => index-EjlOBJbC.js} (55%) create mode 100644 ui/src/components/TaskList.tsx create mode 100644 ui/src/taskProgress.ts create mode 100644 ui/tests/taskProgress.test.mjs diff --git a/src/local/demo.rs b/src/local/demo.rs index d16b4a1d..4bac0b8b 100644 --- a/src/local/demo.rs +++ b/src/local/demo.rs @@ -631,19 +631,16 @@ fn assistant_parts(harness: &str) -> Vec { "intro", "I’ll keep this attached to one CPU / Apple-Silicon baseline, inspect the exact local pipeline, make the portability and SFT safeguards part of the experiment before launch, then stay on the streamed output through tokenizer training, base training and evaluation, SFT, and the final chat check.", )]; - if harness == "opencode" { - parts.push(tool_part( - "todo", - "todowrite", - json!({ "todos": [ - { "content": "Inspect and harden the CPU pipeline", "status": "completed", "priority": "high" }, - { "content": "Run base training, evaluation, and SFT", "status": "completed", "priority": "high" }, - { "content": "Confirm chat output and save results", "status": "completed", "priority": "medium" } - ]}), - None, - Some("Track the nanochat pipeline"), - )); - } + parts.push(task_list_part( + harness, + "todo", + "Track the nanochat pipeline", + &[ + ("Inspect and harden the CPU pipeline", "completed"), + ("Run base training, evaluation, and SFT", "completed"), + ("Confirm chat output and save results", "completed"), + ], + )); let (read_name, read_input, edit_name, edit_input, shell_name) = match harness { "claude-code" => ( "Read", @@ -866,19 +863,16 @@ fn figure_assistant_parts(harness: &str) -> Vec { "figure-intro", "I’ll treat the recorded logs as the source of truth, keep base and SFT validation separate, and produce only the four quantitative SVGs requested. I’m first checking the report, complete per-step logs, and exact benchmark labels, then I’ll build the plots with one consistent Helvetica Neue academic style and visually inspect the rendered output.", )]; - if harness == "opencode" { - parts.push(tool_part( - "figure-todos", - "todowrite", - json!({ "todos": [ - { "content": "Parse base and SFT logs", "status": "completed", "priority": "high" }, - { "content": "Generate four SVG-only figures", "status": "completed", "priority": "high" }, - { "content": "Inspect and validate final artifacts", "status": "completed", "priority": "high" } - ]}), - None, - Some("Track figure generation"), - )); - } + parts.push(task_list_part( + harness, + "figure-todos", + "Track figure generation", + &[ + ("Parse base and SFT logs", "completed"), + ("Generate four SVG-only figures", "completed"), + ("Inspect and validate final artifacts", "completed"), + ], + )); parts.push(tool_part( "figure-read-report", read_tool, @@ -958,19 +952,16 @@ fn literature_assistant_parts(harness: &str) -> Vec { "literature-intro", "I’m using the literature-search workflow first, then I’ll inspect the nanochat experiment history so the recommendation is grounded in both scaling literature and the actual recorded runs.", )]; - if harness == "opencode" { - parts.push(tool_part( - "literature-todos", - "todowrite", - json!({ "todos": [ - { "content": "Inspect the recorded nanochat evidence", "status": "completed", "priority": "high" }, - { "content": "Review scaling and alignment literature", "status": "completed", "priority": "high" }, - { "content": "Recommend one controlled next experiment", "status": "completed", "priority": "high" } - ]}), - None, - Some("Track the bottleneck diagnosis"), - )); - } + parts.push(task_list_part( + harness, + "literature-todos", + "Track the bottleneck diagnosis", + &[ + ("Inspect the recorded nanochat evidence", "completed"), + ("Review scaling and alignment literature", "completed"), + ("Recommend one controlled next experiment", "completed"), + ], + )); for (id, path, title) in [ ( "literature-skill", @@ -1152,6 +1143,32 @@ fn literature_assistant_parts(harness: &str) -> Vec { parts } +/// The harness's own task-list tool call, in that harness's wire shape, so the +/// demo transcript shows the same step checklist a live session would. +fn task_list_part(harness: &str, id: &str, title: &str, steps: &[(&str, &str)]) -> WirePart { + let (tool, input) = match harness { + "claude-code" => ( + "TodoWrite", + json!({ "todos": steps.iter().map(|(content, status)| { + json!({ "content": content, "status": status, "activeForm": content }) + }).collect::>() }), + ), + "opencode" => ( + "todowrite", + json!({ "todos": steps.iter().map(|(content, status)| { + json!({ "content": content, "status": status, "priority": "high" }) + }).collect::>() }), + ), + _ => ( + "update_plan", + json!({ "plan": steps.iter().map(|(step, status)| { + json!({ "step": step, "status": status }) + }).collect::>() }), + ), + }; + tool_part(id, tool, input, None, Some(title)) +} + fn tool_part( id: &str, tool: &str, @@ -1434,11 +1451,12 @@ mod tests { #[test] fn transcript_variants_are_one_turn_and_use_native_tool_names() { - for (harness, expected) in [ - ("claude-code", ["Read", "Edit", "Bash"]), - ("codex", ["bash", "edit", "bash"]), - ("opencode", ["read", "bash", "todowrite"]), - ] { + let cases: [(&str, &[&str]); 3] = [ + ("claude-code", &["Read", "Edit", "Bash", "TodoWrite"]), + ("codex", &["bash", "edit", "update_plan"]), + ("opencode", &["read", "bash", "todowrite"]), + ]; + for (harness, expected) in cases { let parts = assistant_parts(harness); let encoded = serde_json::to_string(&parts).unwrap(); let decoded: Vec = serde_json::from_str(&encoded).unwrap(); @@ -1466,12 +1484,12 @@ mod tests { .filter_map(|part| part.tool.as_deref()) .collect(); for tool in expected { - assert!(names.contains(&tool), "{harness} missing {tool}: {names:?}"); + assert!(names.contains(tool), "{harness} missing {tool}: {names:?}"); } let allowed: &[&str] = match harness { - "claude-code" => &["Read", "Edit", "Bash"], + "claude-code" => &["Read", "Edit", "Bash", "TodoWrite"], "opencode" => &["read", "bash", "todowrite"], - _ => &["bash", "edit"], + _ => &["bash", "edit", "update_plan"], }; assert!(names.iter().all(|name| allowed.contains(name))); assert_eq!(parts.iter().filter(|part| part.kind == "prompt").count(), 0); diff --git a/src/local/harness/codex.rs b/src/local/harness/codex.rs index 24c9ae5a..caa24daa 100644 --- a/src/local/harness/codex.rs +++ b/src/local/harness/codex.rs @@ -1014,6 +1014,11 @@ fn apply_notification(ctx: &mut TurnCtx, method: &str, params: &Value) -> Option } } } + "turn/plan/updated" => { + if let Some(part) = plan_update_part(&ctx.assistant.parts, None, params) { + ctx.upsert_part(part); + } + } "item/commandExecution/outputDelta" => { let (Some(item_id), Some(delta)) = ( params.get("itemId").and_then(Value::as_str), @@ -1131,6 +1136,40 @@ fn append_delta(ctx: &mut TurnCtx, params: &Value, make: impl FnOnce(String) -> ctx.append_part_text(item_id, delta); } +/// Codex's `update_plan` tool reaches the client only as `turn/plan/updated`; +/// each update becomes its own completed task-list tool part, ordinal-numbered +/// within its turn. Empty plans and turn-less notifications render nothing. +fn plan_update_part( + existing: &[WirePart], + thread: Option<&str>, + params: &Value, +) -> Option { + let plan = params + .get("plan") + .filter(|plan| plan.as_array().is_some_and(|steps| !steps.is_empty()))?; + let turn_id = params.get("turnId").and_then(Value::as_str)?; + let prefix = match thread { + Some(tid) => namespaced_part_id(tid, &format!("{turn_id}-plan-")), + None => format!("{turn_id}-plan-"), + }; + let ordinal = existing + .iter() + .filter(|part| part.id.starts_with(&prefix)) + .count(); + let mut input = serde_json::Map::new(); + input.insert("plan".into(), plan.clone()); + if let Some(explanation) = params.get("explanation").filter(|v| v.is_string()) { + input.insert("explanation".into(), explanation.clone()); + } + Some(tool_part( + format!("{prefix}{ordinal}"), + "update_plan", + "completed", + Some(Value::Object(input)), + None, + )) +} + /// Whether the assistant message already carries a part with this id. fn part_exists(ctx: &TurnCtx, id: &str) -> bool { ctx.assistant.parts.iter().any(|p| p.id == id) @@ -1769,6 +1808,11 @@ fn apply_sub_notification( // add transcript parts here (`route_sub_event` handles the thread's // terminal turn notifications and mirrors liveness onto the spawn // part), and crucially never end the parent turn. + "turn/plan/updated" => { + if let Some(part) = plan_update_part(bucket, Some(tid), params) { + upsert_preserving_children(bucket, part); + } + } _ => {} } discovered @@ -3902,6 +3946,56 @@ requires_openai_auth = false ); } + #[test] + fn plan_updates_become_task_list_tool_parts() { + let mut ctx = TurnCtx::test_stub(); + let first = serde_json::json!({ + "threadId": "t1", "turnId": "turn1", "explanation": "Starting", + "plan": [ + { "step": "Inspect the loader", "status": "inProgress" }, + { "step": "Patch it", "status": "pending" } + ] + }); + let second = serde_json::json!({ + "threadId": "t1", "turnId": "turn1", + "plan": [ + { "step": "Inspect the loader", "status": "completed" }, + { "step": "Patch it", "status": "inProgress" } + ] + }); + let empty = serde_json::json!({ "threadId": "t1", "turnId": "turn1", "plan": [] }); + let turnless = + serde_json::json!({ "threadId": "t1", "plan": [{ "step": "x", "status": "pending" }] }); + assert!(apply_notification(&mut ctx, "turn/plan/updated", &first).is_none()); + assert!(apply_notification(&mut ctx, "turn/plan/updated", &empty).is_none()); + assert!(apply_notification(&mut ctx, "turn/plan/updated", &turnless).is_none()); + assert!(apply_notification(&mut ctx, "turn/plan/updated", &second).is_none()); + + let parts = &ctx.assistant.parts; + assert_eq!(parts.len(), 2, "one part per non-empty update: {parts:?}"); + assert_eq!(parts[0].id, "turn1-plan-0"); + assert_eq!(parts[1].id, "turn1-plan-1"); + for part in parts { + assert_eq!(part.kind, "tool"); + assert_eq!(part.tool.as_deref(), Some("update_plan")); + assert_eq!(part.state.as_ref().unwrap().status, "completed"); + } + let first_input = parts[0].state.as_ref().unwrap().input.as_ref().unwrap(); + assert_eq!(first_input["explanation"], "Starting"); + assert_eq!(first_input["plan"][0]["status"], "inProgress"); + let second_input = parts[1].state.as_ref().unwrap().input.as_ref().unwrap(); + assert!(second_input.get("explanation").is_none()); + assert_eq!(second_input["plan"][1]["status"], "inProgress"); + + // A sub-agent's plan lands in its own bucket under a thread-scoped id. + let mut bucket = Vec::new(); + let discovered = apply_sub_notification(&mut bucket, "sub1", "turn/plan/updated", &first); + assert!(discovered.is_empty()); + assert_eq!(bucket.len(), 1); + assert_eq!(bucket[0].id, "sub1:turn1-plan-0"); + assert_eq!(bucket[0].tool.as_deref(), Some("update_plan")); + } + #[test] fn native_history_restores_a_missed_failed_command() { let mut parts = vec![tool_part( diff --git a/ui/dist/assets/index-DJQBUcLC.css b/ui/dist/assets/index-DJQBUcLC.css deleted file mode 100644 index 198803b1..00000000 --- a/ui/dist/assets/index-DJQBUcLC.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-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-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--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;--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-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)}.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-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-1\/2{inset-inline-start:50%}.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\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.bottom-0{bottom:0}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.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-100{z-index:100}.z-200{z-index:200}.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}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.my-0{margin-block:0}.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-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.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-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)}.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}.table{display:table}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.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-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-auto{height:auto}.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-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-\[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\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.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}.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\.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\.5{width:calc(var(--spacing) * 10.5)}.w-24{width:calc(var(--spacing) * 24)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.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-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.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-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-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-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-full{max-width:100%}.max-w-readable{max-width:var(--readable-col)}.min-w-0{min-width:0}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-85{min-width:calc(var(--spacing) * 85)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.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)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.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-\[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-\[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-8{gap:calc(var(--spacing) * 8)}.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}.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-4{row-gap:calc(var(--spacing) * 4)}.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}.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}.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-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-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-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-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.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-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-none{background-image:none}.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-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-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-5\.5{padding-block:calc(var(--spacing) * 5.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\.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-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}.pe-0{padding-inline-end:0}.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-\[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-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-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-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.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-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}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:4\]{-moz-tab-size:4;tab-size:4}.\!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{color:var(--text)}.text-transparent{color:#0000}.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-70{opacity:.7}.opacity-100{opacity:1}.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)}.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-\[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-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\:opacity-100:is(:where(.group):focus *){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)}.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\: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-skill-blue-subtle:hover{background-color:var(--skill-blue-subtle)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-text:hover{color:var(--text)}.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\: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-\[-2px\]: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}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-52:disabled{opacity:.52}@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\: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))}}.\[\&_\+_\.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)}.\[\&_\.brand\]\:flex .brand{display:flex}.\[\&_\.brand\]\:h-full .brand{height:100%}.\[\&_\.brand\]\:w-full .brand{width:100%}.\[\&_\.brand\]\:min-w-0 .brand{min-width:0}.\[\&_\.brand\]\:items-center .brand{align-items:center}.\[\&_\.brand\]\:justify-between .brand{justify-content:space-between}.\[\&_\.brand\]\:gap-2 .brand{gap:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:rounded-sm .brand{border-radius:6px}.\[\&_\.brand\]\:border .brand{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.brand\]\:border-transparent .brand{border-color:#0000}.\[\&_\.brand\]\:px-1\.5 .brand{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.brand\]\:py-1 .brand{padding-block:var(--spacing)}.\[\&_\.brand\]\:text-base .brand{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.brand\]\:font-semibold .brand{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.brand\]\:text-text .brand{color:var(--text)}.\[\&_\.brand_\.brand-project\]\:min-w-0 .brand .brand-project{min-width:0}.\[\&_\.brand_\.brand-project\]\:overflow-hidden .brand .brand-project{overflow:hidden}.\[\&_\.brand_\.brand-project\]\:text-xl .brand .brand-project{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.brand_\.brand-project\]\:text-ellipsis .brand .brand-project{text-overflow:ellipsis}.\[\&_\.brand_\.brand-project\]\:whitespace-nowrap .brand .brand-project{white-space:nowrap}.\[\&_\.brand_svg\]\:shrink-0 .brand svg{flex-shrink:0}.\[\&_\.brand-project-copy\]\:flex .brand-project-copy{display:flex}.\[\&_\.brand-project-copy\]\:min-w-0 .brand-project-copy{min-width:0}.\[\&_\.brand-project-copy\]\:flex-col .brand-project-copy{flex-direction:column}.\[\&_\.brand-project-copy\]\:gap-\[3px\] .brand-project-copy{gap:3px}.\[\&_\.brand-project-copy\]\:text-start .brand-project-copy{text-align:start}.\[\&_\.brand-project-copy\]\:leading-\[1\.15\] .brand-project-copy{--tw-leading:1.15;line-height:1.15}.\[\&_\.brand-project-label\]\:text-xs .brand-project-label{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.brand-project-label\]\:font-medium .brand-project-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.brand-project-label\]\:tracking-\[0\.04em\] .brand-project-label{--tw-tracking:.04em;letter-spacing:.04em}.\[\&_\.brand-project-label\]\:text-muted .brand-project-label{color:var(--muted)}.\[\&_\.brand-project-label\]\:uppercase .brand-project-label{text-transform:uppercase}.\[\&_\.brand\.open\]\:border-border .brand.open{border-color:var(--border)}.\[\&_\.brand\.open\]\:bg-surface .brand.open{background-color:var(--surface)}.\[\&_\.brand\.open_\.project-chevron\]\:rotate-180 .brand.open .project-chevron{rotate:180deg}.\[\&_\.brand\.open_\.project-chevron\]\:opacity-100 .brand.open .project-chevron{opacity:1}.\[\&_\.brand\:hover\]\:border-border .brand:hover{border-color:var(--border)}.\[\&_\.brand\:hover\]\:bg-surface .brand:hover{background-color:var(--surface)}.\[\&_\.brand\:hover_\.project-chevron\]\:opacity-100 .brand:hover .project-chevron{opacity:1}.\[\&_\.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)}.\[\&_\.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}.\[\&_\.ftree-footer\]\:mt-2\.5 .ftree-footer{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:max-w-full .ftree-footer{max-width:100%}.\[\&_\.ftree-footer\]\:rounded-md .ftree-footer{border-radius:8px}.\[\&_\.ftree-footer\]\:border .ftree-footer{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.ftree-footer\]\:border-border .ftree-footer{border-color:var(--border)}.\[\&_\.ftree-footer\]\:bg-background .ftree-footer{background-color:var(--base)}.\[\&_\.ftree-footer\]\:px-2\.5 .ftree-footer{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:py-1\.5 .ftree-footer{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.ftree-footer_code\]\:max-w-95 .ftree-footer code{max-width:calc(var(--spacing) * 95)}.\[\&_\.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-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\]\:text-sm .openresearch-diff-file{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.openresearch-diff-file\]\:leading-\[1\.55\] .openresearch-diff-file{--tw-leading:1.55;line-height:1.55}.\[\&_\.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\]\:px-4 .openresearch-diff-file .diff-code{padding-inline:calc(var(--spacing) * 4)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:break-normal .openresearch-diff-file .diff-code{overflow-wrap:normal;word-break:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:wrap-normal .openresearch-diff-file .diff-code{overflow-wrap:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:whitespace-pre .openresearch-diff-file .diff-code{white-space:pre}.\[\&_\.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\]\:leading-\[1\.55\] .openresearch-diff-file .diff-line{--tw-leading:1.55;line-height:1.55}.\[\&_\.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-auto .openresearch-diff-file.diff-unified{table-layout:auto}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:hidden .openresearch-diff-file.diff-unified .diff-line>td:first-child{display:none}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:sticky .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){position:sticky}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:start-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:z-1 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){z-index:1}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:1%}.\[\&_\.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-\[1\%\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:1%}.\[\&_\.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-semibold .path code{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.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-back\]\:shrink-0 .project-back{flex-shrink:0}.\[\&_\.project-chevron\]\:text-muted .project-chevron{color:var(--muted)}.\[\&_\.project-chevron\]\:opacity-0 .project-chevron{opacity:0}.\[\&_\.project-chevron\]\:transition-transform .project-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))}.\[\&_\.project-chevron\]\:duration-120 .project-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.project-chevron\]\:ease-standard .project-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.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-menu\]\:start-0 .project-menu{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.project-menu\]\:z-70 .project-menu{z-index:70}.\[\&_\.project-menu\]\:w-52\.5 .project-menu{width:calc(var(--spacing) * 52.5)}.\[\&_\.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))}}.\[\&_\.project-switcher\]\:relative .project-switcher{position:relative}.\[\&_\.project-switcher\]\:min-w-0 .project-switcher{min-width:0}.\[\&_\.project-switcher\]\:flex-1 .project-switcher{flex:1}.\[\&_\.project-switcher\]\:self-stretch .project-switcher{align-self:stretch}.\[\&_\.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\]\:py-1 .rail-body{padding-block: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-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-3\.5 .session-dot{width:calc(var(--spacing) * 3.5)}.\[\&_\.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-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\: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-time\]\:shrink-0 .session-time{flex-shrink:0}.\[\&_\.session-time\]\:text-xs .session-time{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.session-time\]\:text-muted .session-time{color:var(--muted)}.\[\&_\.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\]\:text-ellipsis .session-title{text-overflow:ellipsis}.\[\&_\.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\]\:me-0\.5 .skill-chip{margin-inline-end:calc(var(--spacing) * .5)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.skill-desc\]\:text-sm .skill-desc{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.skill-desc\]\:text-subtext .skill-desc{color:var(--subtext)}.\[\&_\.skill-name\]\:text-sm .skill-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.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\]\: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\]\:-mb-px button{margin-bottom:-1px}.\[\&_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-b-2 button{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:border-b-transparent button{border-bottom-color:#0000}.\[\&_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-\[7px\] button{padding-block:7px}.\[\&_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\]\:border-b-primary button.active{border-bottom-color:var(--primary)}.\[\&_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\]\:flex-1 code{flex:1}.\[\&_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\]\:text-left code{text-align:left}.\[\&_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\]\:text-muted code{color:var(--muted)}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_code\]\:\[direction\:rtl\] code{direction:rtl}.\[\&_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-1\.5 h3{margin-top:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-0 h3{margin-bottom:0}.\[\&_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\]\: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\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_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-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_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-105 p{max-width:calc(var(--spacing) * 105)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-2xl p{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-\[1\.55\] p{--tw-leading:1.55;line-height:1.55}.\[\&_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\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--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-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-menu-btn\]\:hidden.editing .session-menu-btn,.\[\&\.editing_\.session-time\]\:hidden.editing .session-time{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)}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.menu-open_\.session-time\]\:hidden.menu-open .session-time{display:none}.\[\&\.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)}.\[\&\.rail-hidden\]\:max-w-none.rail-hidden{max-width:none}.\[\&\.rail-hidden\]\:px-0\.5.rail-hidden{padding-inline:calc(var(--spacing) * .5)}.\[\&\.rail-hidden\]\:py-0.rail-hidden{padding-block:0}.\[\&\.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)}.\[\&\.unread_\.session-title\]\:font-semibold.unread .session-title{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display: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-within_\.session-menu-btn\]\:inline-flex:focus-within .session-menu-btn{display:inline-flex}.\[\&\:focus-within_\.session-time\]\:hidden:focus-within .session-time{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-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-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover_\.session-time\]\:hidden:hover .session-time{display:none}.\[\&\: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-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-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}.chat-header.rail-hidden>.\[\.chat-header\.rail-hidden_\>_\&\:first-child\]\:me-3:first-child{margin-inline-end:calc(var(--spacing) * 3)}: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\)\)\]\:ms-auto{margin-inline-start:auto}.\[\@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: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}}@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;--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;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;--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[lang=fa] #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[lang=fa] #root .file-view-note{unicode-bidi:plaintext}:where(pre,code:not(.path-front-ellipsis),.font-mono,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.path-front-ellipsis{unicode-bidi:isolate}@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)}}@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-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/assets/index-DcSQaaF0.css b/ui/dist/assets/index-DcSQaaF0.css new file mode 100644 index 00000000..695afe79 --- /dev/null +++ b/ui/dist/assets/index-DcSQaaF0.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-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-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--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;--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)}.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-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-1\/2{inset-inline-start:50%}.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\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.bottom-0{bottom:0}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.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-100{z-index:100}.z-200{z-index:200}.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}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.my-0{margin-block:0}.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-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.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-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)}.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}.table{display:table}.field-sizing-content{field-sizing:content}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-0\.5{height:calc(var(--spacing) * .5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-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-20{height:calc(var(--spacing) * 20)}.h-40{height:calc(var(--spacing) * 40)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-auto{height:auto}.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-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-\[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\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.min-h-0{min-height:0}.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}.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\.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\.5{width:calc(var(--spacing) * 10.5)}.w-24{width:calc(var(--spacing) * 24)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.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-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.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-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-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-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-full{max-width:100%}.max-w-readable{max-width:var(--readable-col)}.min-w-0{min-width:0}.min-w-24{min-width:calc(var(--spacing) * 24)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-85{min-width:calc(var(--spacing) * 85)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.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-pointer{cursor:pointer}.cursor-text{cursor:text}.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-\[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-\[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-8{gap:calc(var(--spacing) * 8)}.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}.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-4{row-gap:calc(var(--spacing) * 4)}.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}.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}.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-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-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-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-subtle{background-color:var(--accent-amber-subtle)}.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-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border{background-color:var(--border)}.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-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-none{background-image:none}.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-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-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-5\.5{padding-block:calc(var(--spacing) * 5.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\.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-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}.pe-0{padding-inline-end:0}.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-\[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-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-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-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-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.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-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-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.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}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\[tab-size\:4\]{-moz-tab-size:4;tab-size:4}.\!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{color:var(--text)}.text-transparent{color:#0000}.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,)}.line-through{text-decoration-line:line-through}.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-70{opacity:.7}.opacity-100{opacity:1}.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)}.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-\[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-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\:opacity-100:is(:where(.group):focus *){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)}.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\: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-skill-blue-subtle:hover{background-color:var(--skill-blue-subtle)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-text:hover{color:var(--text)}.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\: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-\[-2px\]: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}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-52:disabled{opacity:.52}@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\: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))}}.\[\&_\+_\.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)}.\[\&_\.brand\]\:flex .brand{display:flex}.\[\&_\.brand\]\:h-full .brand{height:100%}.\[\&_\.brand\]\:w-full .brand{width:100%}.\[\&_\.brand\]\:min-w-0 .brand{min-width:0}.\[\&_\.brand\]\:items-center .brand{align-items:center}.\[\&_\.brand\]\:justify-between .brand{justify-content:space-between}.\[\&_\.brand\]\:gap-2 .brand{gap:calc(var(--spacing) * 2)}.\[\&_\.brand\]\:rounded-sm .brand{border-radius:6px}.\[\&_\.brand\]\:border .brand{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.brand\]\:border-transparent .brand{border-color:#0000}.\[\&_\.brand\]\:px-1\.5 .brand{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.brand\]\:py-1 .brand{padding-block:var(--spacing)}.\[\&_\.brand\]\:text-base .brand{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.brand\]\:font-semibold .brand{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.brand\]\:text-text .brand{color:var(--text)}.\[\&_\.brand_\.brand-project\]\:min-w-0 .brand .brand-project{min-width:0}.\[\&_\.brand_\.brand-project\]\:overflow-hidden .brand .brand-project{overflow:hidden}.\[\&_\.brand_\.brand-project\]\:text-xl .brand .brand-project{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.brand_\.brand-project\]\:text-ellipsis .brand .brand-project{text-overflow:ellipsis}.\[\&_\.brand_\.brand-project\]\:whitespace-nowrap .brand .brand-project{white-space:nowrap}.\[\&_\.brand_svg\]\:shrink-0 .brand svg{flex-shrink:0}.\[\&_\.brand-project-copy\]\:flex .brand-project-copy{display:flex}.\[\&_\.brand-project-copy\]\:min-w-0 .brand-project-copy{min-width:0}.\[\&_\.brand-project-copy\]\:flex-col .brand-project-copy{flex-direction:column}.\[\&_\.brand-project-copy\]\:gap-\[3px\] .brand-project-copy{gap:3px}.\[\&_\.brand-project-copy\]\:text-start .brand-project-copy{text-align:start}.\[\&_\.brand-project-copy\]\:leading-\[1\.15\] .brand-project-copy{--tw-leading:1.15;line-height:1.15}.\[\&_\.brand-project-label\]\:text-xs .brand-project-label{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.brand-project-label\]\:font-medium .brand-project-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.brand-project-label\]\:tracking-\[0\.04em\] .brand-project-label{--tw-tracking:.04em;letter-spacing:.04em}.\[\&_\.brand-project-label\]\:text-muted .brand-project-label{color:var(--muted)}.\[\&_\.brand-project-label\]\:uppercase .brand-project-label{text-transform:uppercase}.\[\&_\.brand\.open\]\:border-border .brand.open{border-color:var(--border)}.\[\&_\.brand\.open\]\:bg-surface .brand.open{background-color:var(--surface)}.\[\&_\.brand\.open_\.project-chevron\]\:rotate-180 .brand.open .project-chevron{rotate:180deg}.\[\&_\.brand\.open_\.project-chevron\]\:opacity-100 .brand.open .project-chevron{opacity:1}.\[\&_\.brand\:hover\]\:border-border .brand:hover{border-color:var(--border)}.\[\&_\.brand\:hover\]\:bg-surface .brand:hover{background-color:var(--surface)}.\[\&_\.brand\:hover_\.project-chevron\]\:opacity-100 .brand:hover .project-chevron{opacity:1}.\[\&_\.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)}.\[\&_\.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}.\[\&_\.ftree-footer\]\:mt-2\.5 .ftree-footer{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:max-w-full .ftree-footer{max-width:100%}.\[\&_\.ftree-footer\]\:rounded-md .ftree-footer{border-radius:8px}.\[\&_\.ftree-footer\]\:border .ftree-footer{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.ftree-footer\]\:border-border .ftree-footer{border-color:var(--border)}.\[\&_\.ftree-footer\]\:bg-background .ftree-footer{background-color:var(--base)}.\[\&_\.ftree-footer\]\:px-2\.5 .ftree-footer{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.ftree-footer\]\:py-1\.5 .ftree-footer{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.ftree-footer_code\]\:max-w-95 .ftree-footer code{max-width:calc(var(--spacing) * 95)}.\[\&_\.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-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\]\:text-sm .openresearch-diff-file{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.openresearch-diff-file\]\:leading-\[1\.55\] .openresearch-diff-file{--tw-leading:1.55;line-height:1.55}.\[\&_\.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\]\:px-4 .openresearch-diff-file .diff-code{padding-inline:calc(var(--spacing) * 4)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:break-normal .openresearch-diff-file .diff-code{overflow-wrap:normal;word-break:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:wrap-normal .openresearch-diff-file .diff-code{overflow-wrap:normal}.\[\&_\.openresearch-diff-file_\.diff-code\]\:whitespace-pre .openresearch-diff-file .diff-code{white-space:pre}.\[\&_\.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\]\:leading-\[1\.55\] .openresearch-diff-file .diff-line{--tw-leading:1.55;line-height:1.55}.\[\&_\.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-auto .openresearch-diff-file.diff-unified{table-layout:auto}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:hidden .openresearch-diff-file.diff-unified .diff-line>td:first-child{display:none}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:sticky .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){position:sticky}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:start-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:z-1 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){z-index:1}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[1\%\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:1%}.\[\&_\.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-\[1\%\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:1%}.\[\&_\.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-semibold .path code{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.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-back\]\:shrink-0 .project-back{flex-shrink:0}.\[\&_\.project-chevron\]\:text-muted .project-chevron{color:var(--muted)}.\[\&_\.project-chevron\]\:opacity-0 .project-chevron{opacity:0}.\[\&_\.project-chevron\]\:transition-transform .project-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))}.\[\&_\.project-chevron\]\:duration-120 .project-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.project-chevron\]\:ease-standard .project-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.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-menu\]\:start-0 .project-menu{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\.project-menu\]\:z-70 .project-menu{z-index:70}.\[\&_\.project-menu\]\:w-52\.5 .project-menu{width:calc(var(--spacing) * 52.5)}.\[\&_\.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))}}.\[\&_\.project-switcher\]\:relative .project-switcher{position:relative}.\[\&_\.project-switcher\]\:min-w-0 .project-switcher{min-width:0}.\[\&_\.project-switcher\]\:flex-1 .project-switcher{flex:1}.\[\&_\.project-switcher\]\:self-stretch .project-switcher{align-self:stretch}.\[\&_\.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\]\:py-1 .rail-body{padding-block: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-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-3\.5 .session-dot{width:calc(var(--spacing) * 3.5)}.\[\&_\.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-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\: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-time\]\:shrink-0 .session-time{flex-shrink:0}.\[\&_\.session-time\]\:text-xs .session-time{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.session-time\]\:text-muted .session-time{color:var(--muted)}.\[\&_\.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\]\:text-ellipsis .session-title{text-overflow:ellipsis}.\[\&_\.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\]\:me-0\.5 .skill-chip{margin-inline-end:calc(var(--spacing) * .5)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.skill-desc\]\:text-sm .skill-desc{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.skill-desc\]\:text-subtext .skill-desc{color:var(--subtext)}.\[\&_\.skill-name\]\:text-sm .skill-name{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.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\]\: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\]\:-mb-px button{margin-bottom:-1px}.\[\&_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-b-2 button{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:border-b-transparent button{border-bottom-color:#0000}.\[\&_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-\[7px\] button{padding-block:7px}.\[\&_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\]\:border-b-primary button.active{border-bottom-color:var(--primary)}.\[\&_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\]\:flex-1 code{flex:1}.\[\&_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\]\:text-left code{text-align:left}.\[\&_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\]\:text-muted code{color:var(--muted)}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_code\]\:\[direction\:rtl\] code{direction:rtl}.\[\&_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-1\.5 h3{margin-top:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-0 h3{margin-bottom:0}.\[\&_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\]\: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\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_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-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_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-105 p{max-width:calc(var(--spacing) * 105)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-2xl p{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-\[1\.55\] p{--tw-leading:1.55;line-height:1.55}.\[\&_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\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--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-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-menu-btn\]\:hidden.editing .session-menu-btn,.\[\&\.editing_\.session-time\]\:hidden.editing .session-time{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)}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.menu-open_\.session-time\]\:hidden.menu-open .session-time{display:none}.\[\&\.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)}.\[\&\.rail-hidden\]\:max-w-none.rail-hidden{max-width:none}.\[\&\.rail-hidden\]\:px-0\.5.rail-hidden{padding-inline:calc(var(--spacing) * .5)}.\[\&\.rail-hidden\]\:py-0.rail-hidden{padding-block:0}.\[\&\.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)}.\[\&\.unread_\.session-title\]\:font-semibold.unread .session-title{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display: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-within_\.session-menu-btn\]\:inline-flex:focus-within .session-menu-btn{display:inline-flex}.\[\&\:focus-within_\.session-time\]\:hidden:focus-within .session-time{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-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-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover_\.session-time\]\:hidden:hover .session-time{display:none}.\[\&\: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-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-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}.chat-header.rail-hidden>.\[\.chat-header\.rail-hidden_\>_\&\:first-child\]\:me-3:first-child{margin-inline-end:calc(var(--spacing) * 3)}: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\)\)\]\:ms-auto{margin-inline-start:auto}.\[\@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: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}}@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;--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;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;--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[lang=fa] #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[lang=fa] #root .file-view-note{unicode-bidi:plaintext}:where(pre,code:not(.path-front-ellipsis),.font-mono,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.path-front-ellipsis{unicode-bidi:isolate}@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)}}@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-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/assets/index-CbahZ8zs.js b/ui/dist/assets/index-EjlOBJbC.js similarity index 55% rename from ui/dist/assets/index-CbahZ8zs.js rename to ui/dist/assets/index-EjlOBJbC.js index ed4d64a3..cebd8bb3 100644 --- a/ui/dist/assets/index-CbahZ8zs.js +++ b/ui/dist/assets/index-EjlOBJbC.js @@ -1,4 +1,4 @@ -var X3=e=>{throw TypeError(e)};var Z3=(e,n,t)=>n.has(e)||X3("Cannot "+t);var Zn=(e,n,t)=>(Z3(e,n,"read from private field"),t?t.call(e):n.get(e)),oi=(e,n,t)=>n.has(e)?X3("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),ss=(e,n,t,r)=>(Z3(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t);var Q3=(e,n,t,r)=>({set _(s){ss(e,n,s,t)},get _(){return Zn(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 a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function mh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var R1={exports:{}},rf={};/** +var t6=e=>{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn=(e,n,t)=>(n6(e,n,"read from private field"),t?t.call(e):n.get(e)),ci=(e,n,t)=>n.has(e)?t6("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),rs=(e,n,t,r)=>(n6(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t);var r6=(e,n,t,r)=>({set _(s){rs(e,n,s,t)},get _(){return Zn(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 a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function vh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L1={exports:{}},af={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ var X3=e=>{throw TypeError(e)};var Z3=(e,n,t)=>n.has(e)||X3("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var J3;function bL(){if(J3)return rf;J3=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:a}}return rf.Fragment=n,rf.jsx=t,rf.jsxs=t,rf}var e6;function xL(){return e6||(e6=1,R1.exports=bL()),R1.exports}var h=xL(),D1={exports:{}},Pt={};/** + */var s6;function ML(){if(s6)return af;s6=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:a}}return af.Fragment=n,af.jsx=t,af.jsxs=t,af}var i6;function RL(){return i6||(i6=1,L1.exports=ML()),L1.exports}var h=RL(),O1={exports:{}},Pt={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ var X3=e=>{throw TypeError(e)};var Z3=(e,n,t)=>n.has(e)||X3("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var t6;function yL(){if(t6)return Pt;t6=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"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function v(B,Y,G){this.props=B,this.context=Y,this.refs=b,this.updater=G||S}v.prototype.isReactComponent={},v.prototype.setState=function(B,Y){if(typeof B!="object"&&typeof B!="function"&&B!=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,B,Y,"setState")},v.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function x(){}x.prototype=v.prototype;function y(B,Y,G){this.props=B,this.context=Y,this.refs=b,this.updater=G||S}var C=y.prototype=new x;C.constructor=y,k(C,v.prototype),C.isPureReactComponent=!0;var z=Array.isArray;function E(){}var j={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function D(B,Y,G){var re=G.ref;return{$$typeof:e,type:B,key:Y,ref:re!==void 0?re:null,props:G}}function O(B,Y){return D(B.type,Y,B.props)}function P(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function $(B){var Y={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(G){return Y[G]})}var F=/\/+/g;function V(B,Y){return typeof B=="object"&&B!==null&&B.key!=null?$(""+B.key):Y.toString(36)}function X(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(E,E):(B.status="pending",B.then(function(Y){B.status==="pending"&&(B.status="fulfilled",B.value=Y)},function(Y){B.status==="pending"&&(B.status="rejected",B.reason=Y)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function W(B,Y,G,re,he){var oe=typeof B;(oe==="undefined"||oe==="boolean")&&(B=null);var se=!1;if(B===null)se=!0;else switch(oe){case"bigint":case"string":case"number":se=!0;break;case"object":switch(B.$$typeof){case e:case n:se=!0;break;case _:return se=B._init,W(se(B._payload),Y,G,re,he)}}if(se)return he=he(B),se=re===""?"."+V(B,0):re,z(he)?(G="",se!=null&&(G=se.replace(F,"$&/")+"/"),W(he,Y,G,"",function(le){return le})):he!=null&&(P(he)&&(he=O(he,G+(he.key==null||B&&B.key===he.key?"":(""+he.key).replace(F,"$&/")+"/")+se)),Y.push(he)),1;se=0;var q=re===""?".":re+":";if(z(B))for(var te=0;te{throw TypeError(e)};var Z3=(e,n,t)=>n.has(e)||X3("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r6;function wL(){return r6||(r6=1,(function(e){function n(W,Z){var J=W.length;W.push(Z);e:for(;0>>1,L=W[H];if(0>>1;Hs(G,J))res(he,G)?(W[H]=he,W[re]=J,H=re):(W[H]=G,W[Y]=J,H=Y);else if(res(he,J))W[H]=he,W[re]=J,H=re;else break e}}return Z}function s(W,Z){var J=W.sortIndex-Z.sortIndex;return J!==0?J:W.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],_=1,f=null,m=3,g=!1,S=!1,k=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(W){for(var Z=t(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=W)r(d),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(d)}}function z(W){if(k=!1,C(W),!S)if(t(c)!==null)S=!0,E||(E=!0,$());else{var Z=t(d);Z!==null&&X(z,Z.startTime-W)}}var E=!1,j=-1,A=5,D=-1;function O(){return b?!0:!(e.unstable_now()-DW&&O());){var H=f.callback;if(typeof H=="function"){f.callback=null,m=f.priorityLevel;var L=H(f.expirationTime<=W);if(W=e.unstable_now(),typeof L=="function"){f.callback=L,C(W),Z=!0;break t}f===t(c)&&r(c),C(W)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var B=t(d);B!==null&&X(z,B.startTime-W),Z=!1}}break e}finally{f=null,m=J,g=!1}Z=void 0}}finally{Z?$():E=!1}}}var $;if(typeof y=="function")$=function(){y(P)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,V=F.port2;F.port1.onmessage=P,$=function(){V.postMessage(null)}}else $=function(){v(P,0)};function X(W,Z){j=v(function(){W(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(W){W.callback=null},e.unstable_forceFrameRate=function(W){0>W||125H?(W.sortIndex=J,n(d,W),t(c)===null&&W===t(d)&&(k?(x(j),j=-1):k=!0,X(z,J-H))):(W.sortIndex=L,n(c,W),S||g||(S=!0,E||(E=!0,$()))),W},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(W){var Z=m;return function(){var J=m;m=Z;try{return W.apply(this,arguments)}finally{m=J}}}})(I1)),I1}var s6;function SL(){return s6||(s6=1,O1.exports=wL()),O1.exports}var B1={exports:{}},ds={};/** + */var l6;function LL(){return l6||(l6=1,(function(e){function n(W,Z){var J=W.length;W.push(Z);e:for(;0>>1,L=W[B];if(0>>1;B<$;){var K=2*(B+1)-1,G=W[K],re=K+1,oe=W[re];if(0>s(G,J))res(oe,G)?(W[B]=oe,W[re]=J,B=re):(W[B]=G,W[K]=J,B=K);else if(res(oe,J))W[B]=oe,W[re]=J,B=re;else break e}}return Z}function s(W,Z){var J=W.sortIndex-Z.sortIndex;return J!==0?J:W.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],_=1,f=null,m=3,g=!1,S=!1,k=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(W){for(var Z=t(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=W)r(d),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(d)}}function A(W){if(k=!1,C(W),!S)if(t(c)!==null)S=!0,E||(E=!0,H());else{var Z=t(d);Z!==null&&X(A,Z.startTime-W)}}var E=!1,j=-1,T=5,D=-1;function I(){return b?!0:!(e.unstable_now()-DW&&I());){var B=f.callback;if(typeof B=="function"){f.callback=null,m=f.priorityLevel;var L=B(f.expirationTime<=W);if(W=e.unstable_now(),typeof L=="function"){f.callback=L,C(W),Z=!0;break t}f===t(c)&&r(c),C(W)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var $=t(d);$!==null&&X(A,$.startTime-W),Z=!1}}break e}finally{f=null,m=J,g=!1}Z=void 0}}finally{Z?H():E=!1}}}var H;if(typeof y=="function")H=function(){y(P)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,V=F.port2;F.port1.onmessage=P,H=function(){V.postMessage(null)}}else H=function(){v(P,0)};function X(W,Z){j=v(function(){W(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(W){W.callback=null},e.unstable_forceFrameRate=function(W){0>W||125B?(W.sortIndex=J,n(d,W),t(c)===null&&W===t(d)&&(k?(x(j),j=-1):k=!0,X(A,J-B))):(W.sortIndex=L,n(c,W),S||g||(S=!0,E||(E=!0,H()))),W},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(W){var Z=m;return function(){var J=m;m=Z;try{return W.apply(this,arguments)}finally{m=J}}}})($1)),$1}var c6;function OL(){return c6||(c6=1,B1.exports=LL()),B1.exports}var H1={exports:{}},fs={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ var X3=e=>{throw TypeError(e)};var Z3=(e,n,t)=>n.has(e)||X3("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var i6;function kL(){if(i6)return ds;i6=1;var e=gh();function n(c){var d="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(),B1.exports=kL(),B1.exports}/** + */var u6;function IL(){if(u6)return fs;u6=1;var e=bh();function n(c){var d="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(),H1.exports=IL(),H1.exports}/** * @license React * react-dom-client.production.js * @@ -38,437 +38,457 @@ var X3=e=>{throw TypeError(e)};var Z3=(e,n,t)=>n.has(e)||X3("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var o6;function CL(){if(o6)return sf;o6=1;var e=SL(),n=gh(),t=$9();function r(i){var u="https://react.dev/errors/"+i;if(1L||(i.current=H[L],H[L]=null,L--)}function G(i,u){L++,H[L]=i.current,i.current=u}var re=B(null),he=B(null),oe=B(null),se=B(null);function q(i,u){switch(G(oe,u),G(he,i),G(re,null),u.nodeType){case 9:case 11:i=(i=u.documentElement)&&(i=i.namespaceURI)?b3(i):0;break;default:if(i=u.tagName,u=u.namespaceURI)u=b3(u),i=x3(u,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Y(re),G(re,i)}function te(){Y(re),Y(he),Y(oe)}function le(i){i.memoizedState!==null&&G(se,i);var u=re.current,p=x3(u,i.type);u!==p&&(G(he,i),G(re,p))}function ge(i){he.current===i&&(Y(re),Y(he)),se.current===i&&(Y(se),Jd._currentValue=J)}var ue,Ce;function Ee(i){if(ue===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ue=u&&u[1]||"",Ce=-1L||(i.current=B[L],B[L]=null,L--)}function G(i,u){L++,B[L]=i.current,i.current=u}var re=$(null),oe=$(null),he=$(null),ie=$(null);function q(i,u){switch(G(he,u),G(oe,i),G(re,null),u.nodeType){case 9:case 11:i=(i=u.documentElement)&&(i=i.namespaceURI)?k3(i):0;break;default:if(i=u.tagName,u=u.namespaceURI)u=k3(u),i=C3(u,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}K(re),G(re,i)}function te(){K(re),K(oe),K(he)}function le(i){i.memoizedState!==null&&G(ie,i);var u=re.current,p=C3(u,i.type);u!==p&&(G(oe,i),G(re,p))}function ge(i){oe.current===i&&(K(re),K(oe)),ie.current===i&&(K(ie),tf._currentValue=J)}var ue,Ce;function Ee(i){if(ue===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ue=u&&u[1]||"",Ce=-1)":-1T||fe[w]!==we[T]){var Me=` -`+fe[w].replace(" at new "," at ");return i.displayName&&Me.includes("")&&(Me=Me.replace("",i.displayName)),Me}while(1<=w&&0<=T);break}}}finally{Le=!1,Error.prepareStackTrace=p}return(p=i?i.displayName||i.name:"")?Ee(p):""}function Ve(i,u){switch(i.tag){case 26:case 27:case 5:return Ee(i.type);case 16:return Ee("Lazy");case 13:return i.child!==u&&u!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Pe(i.type,!1);case 11:return Pe(i.type.render,!1);case 1:return Pe(i.type,!0);case 31:return Ee("Activity");default:return""}}function ft(i){try{var u="",p=null;do u+=Ve(i,p),p=i,i=i.return;while(i);return u}catch(w){return` +`);for(z=w=0;wz||fe[w]!==we[z]){var Me=` +`+fe[w].replace(" at new "," at ");return i.displayName&&Me.includes("")&&(Me=Me.replace("",i.displayName)),Me}while(1<=w&&0<=z);break}}}finally{Le=!1,Error.prepareStackTrace=p}return(p=i?i.displayName||i.name:"")?Ee(p):""}function Ve(i,u){switch(i.tag){case 26:case 27:case 5:return Ee(i.type);case 16:return Ee("Lazy");case 13:return i.child!==u&&u!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Pe(i.type,!1);case 11:return Pe(i.type.render,!1);case 1:return Pe(i.type,!0);case 31:return Ee("Activity");default:return""}}function ft(i){try{var u="",p=null;do u+=Ve(i,p),p=i,i=i.return;while(i);return u}catch(w){return` Error generating stack: `+w.message+` -`+w.stack}}var Be=Object.prototype.hasOwnProperty,wt=e.unstable_scheduleCallback,zt=e.unstable_cancelCallback,vt=e.unstable_shouldYield,Lt=e.unstable_requestPaint,St=e.unstable_now,kt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,st=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Ht=e.log,bt=e.unstable_setDisableYieldValue,tn=null,Vt=null;function pn(i){if(typeof Ht=="function"&&bt(i),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(tn,i)}catch{}}var Dt=Math.clz32?Math.clz32:xr,En=Math.log,Ft=Math.LN2;function xr(i){return i>>>=0,i===0?32:31-(En(i)/Ft|0)|0}var mn=256,Ye=262144,xt=4194304;function Vn(i){var u=i&42;if(u!==0)return u;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Wn(i,u,p){var w=i.pendingLanes;if(w===0)return 0;var T=0,R=i.suspendedLanes,K=i.pingedLanes;i=i.warmLanes;var ee=w&134217727;return ee!==0?(w=ee&~R,w!==0?T=Vn(w):(K&=ee,K!==0?T=Vn(K):p||(p=ee&~i,p!==0&&(T=Vn(p))))):(ee=w&~R,ee!==0?T=Vn(ee):K!==0?T=Vn(K):p||(p=w&~i,p!==0&&(T=Vn(p)))),T===0?0:u!==0&&u!==T&&(u&R)===0&&(R=T&-T,p=u&-u,R>=p||R===32&&(p&4194048)!==0)?u:T}function Et(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function rt(i,u){switch(i){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Ie(){var i=xt;return xt<<=1,(xt&62914560)===0&&(xt=4194304),i}function it(i){for(var u=[],p=0;31>p;p++)u.push(i);return u}function Ut(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Jt(i,u,p,w,T,R){var K=i.pendingLanes;i.pendingLanes=p,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=p,i.entangledLanes&=p,i.errorRecoveryDisabledLanes&=p,i.shellSuspendCounter=0;var ee=i.entanglements,fe=i.expirationTimes,we=i.hiddenUpdates;for(p=K&~p;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Ys=/[\n"\\]/g;function Kn(i){return i.replace(Ys,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Bi(i,u,p,w,T,R,K,ee){i.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?i.type=K:i.removeAttribute("type"),u!=null?K==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+lr(u)):i.value!==""+lr(u)&&(i.value=""+lr(u)):K!=="submit"&&K!=="reset"||i.removeAttribute("value"),u!=null?Ln(i,K,lr(u)):p!=null?Ln(i,K,lr(p)):w!=null&&i.removeAttribute("value"),T==null&&R!=null&&(i.defaultChecked=!!R),T!=null&&(i.checked=T&&typeof T!="function"&&typeof T!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?i.name=""+lr(ee):i.removeAttribute("name")}function Yn(i,u,p,w,T,R,K,ee){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),u!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||u!=null)){$a(i);return}p=p!=null?""+lr(p):"",u=u!=null?""+lr(u):p,ee||u===i.value||(i.value=u),i.defaultValue=u}w=w??T,w=typeof w!="function"&&typeof w!="symbol"&&!!w,i.checked=ee?i.checked:!!w,i.defaultChecked=!!w,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(i.name=K),$a(i)}function Ln(i,u,p){u==="number"&&cs(i.ownerDocument)===i||i.defaultValue===""+p||(i.defaultValue=""+p)}function Xs(i,u,p,w){if(i=i.options,u){u={};for(var T=0;T"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sa=!1;if(Zs)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){sa=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch{sa=!1}var Rs=null,Lo=null,pr=null;function Hn(){if(pr)return pr;var i,u=Lo,p=u.length,w,T="value"in Rs?Rs.value:Rs.textContent,R=T.length;for(i=0;i=Jr),Dl=" ",$h=!1;function gd(i,u){switch(i){case"keyup":return At.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vd(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Pi=!1;function rr(i,u){switch(i){case"compositionend":return vd(u);case"keypress":return u.which!==32?null:($h=!0,Dl);case"textInput":return i=u.data,i===Dl&&$h?null:i;default:return null}}function bd(i,u){if(Pi)return i==="compositionend"||!Qr&&gd(i,u)?(i=Hn(),pr=Lo=Rs=null,Pi=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-i};i=w}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=I4(p)}}function $4(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?$4(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function H4(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=cs(i.document);u instanceof i.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)i=u.contentWindow;else break;u=cs(i.document)}return u}function Fm(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}var QR=Zs&&"documentMode"in document&&11>=document.documentMode,Bc=null,Um=null,kd=null,qm=!1;function P4(i,u,p){var w=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;qm||Bc==null||Bc!==cs(w)||(w=Bc,"selectionStart"in w&&Fm(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),kd&&Sd(kd,w)||(kd=w,w=A_(Um,"onSelect"),0>=K,T-=K,ua=1<<32-Dt(u)+T|p<Wt?(un=dt,dt=null):un=dt.sibling;var bn=Se(ve,dt,ye[Wt],Re);if(bn===null){dt===null&&(dt=un);break}i&&dt&&bn.alternate===null&&u(ve,dt),_e=R(bn,_e,Wt),vn===null?yt=bn:vn.sibling=bn,vn=bn,dt=un}if(Wt===ye.length)return p(ve,dt),fn&&Ya(ve,Wt),yt;if(dt===null){for(;WtWt?(un=dt,dt=null):un=dt.sibling;var al=Se(ve,dt,bn.value,Re);if(al===null){dt===null&&(dt=un);break}i&&dt&&al.alternate===null&&u(ve,dt),_e=R(al,_e,Wt),vn===null?yt=al:vn.sibling=al,vn=al,dt=un}if(bn.done)return p(ve,dt),fn&&Ya(ve,Wt),yt;if(dt===null){for(;!bn.done;Wt++,bn=ye.next())bn=Oe(ve,bn.value,Re),bn!==null&&(_e=R(bn,_e,Wt),vn===null?yt=bn:vn.sibling=bn,vn=bn);return fn&&Ya(ve,Wt),yt}for(dt=w(dt);!bn.done;Wt++,bn=ye.next())bn=Ne(dt,ve,Wt,bn.value,Re),bn!==null&&(i&&bn.alternate!==null&&dt.delete(bn.key===null?Wt:bn.key),_e=R(bn,_e,Wt),vn===null?yt=bn:vn.sibling=bn,vn=bn);return i&&dt.forEach(function(vL){return u(ve,vL)}),fn&&Ya(ve,Wt),yt}function Rn(ve,_e,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===k&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case g:e:{for(var yt=ye.key;_e!==null;){if(_e.key===yt){if(yt=ye.type,yt===k){if(_e.tag===7){p(ve,_e.sibling),Re=T(_e,ye.props.children),Re.return=ve,ve=Re;break e}}else if(_e.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===A&&ql(yt)===_e.type){p(ve,_e.sibling),Re=T(_e,ye.props),Td(Re,ye),Re.return=ve,ve=Re;break e}p(ve,_e);break}else u(ve,_e);_e=_e.sibling}ye.type===k?(Re=$l(ye.props.children,ve.mode,Re,ye.key),Re.return=ve,ve=Re):(Re=Vh(ye.type,ye.key,ye.props,null,ve.mode,Re),Td(Re,ye),Re.return=ve,ve=Re)}return K(ve);case S:e:{for(yt=ye.key;_e!==null;){if(_e.key===yt)if(_e.tag===4&&_e.stateNode.containerInfo===ye.containerInfo&&_e.stateNode.implementation===ye.implementation){p(ve,_e.sibling),Re=T(_e,ye.children||[]),Re.return=ve,ve=Re;break e}else{p(ve,_e);break}else u(ve,_e);_e=_e.sibling}Re=Zm(ye,ve.mode,Re),Re.return=ve,ve=Re}return K(ve);case A:return ye=ql(ye),Rn(ve,_e,ye,Re)}if(X(ye))return ut(ve,_e,ye,Re);if($(ye)){if(yt=$(ye),typeof yt!="function")throw Error(r(150));return ye=yt.call(ye),Nt(ve,_e,ye,Re)}if(typeof ye.then=="function")return Rn(ve,_e,Jh(ye),Re);if(ye.$$typeof===y)return Rn(ve,_e,Yh(ve,ye),Re);e_(ve,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint"?(ye=""+ye,_e!==null&&_e.tag===6?(p(ve,_e.sibling),Re=T(_e,ye),Re.return=ve,ve=Re):(p(ve,_e),Re=Xm(ye,ve.mode,Re),Re.return=ve,ve=Re),K(ve)):p(ve,_e)}return function(ve,_e,ye,Re){try{Ad=0;var yt=Rn(ve,_e,ye,Re);return Yc=null,yt}catch(dt){if(dt===Kc||dt===Zh)throw dt;var vn=ti(29,dt,null,ve.mode);return vn.lanes=Re,vn.return=ve,vn}finally{}}}var Vl=uw(!0),dw=uw(!1),Uo=!1;function cg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ug(i,u){i=i.updateQueue,u.updateQueue===i&&(u.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Go(i,u,p){var w=i.updateQueue;if(w===null)return null;if(w=w.shared,(yn&2)!==0){var T=w.pending;return T===null?u.next=u:(u.next=T.next,T.next=u),w.pending=u,u=Gh(i),K4(i,null,p),u}return qh(i,w,u,p),Gh(i)}function jd(i,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Dn(i,p)}}function dg(i,u){var p=i.updateQueue,w=i.alternate;if(w!==null&&(w=w.updateQueue,p===w)){var T=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var K={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?T=R=K:R=R.next=K,p=p.next}while(p!==null);R===null?T=R=u:R=R.next=u}else T=R=u;p={baseState:w.baseState,firstBaseUpdate:T,lastBaseUpdate:R,shared:w.shared,callbacks:w.callbacks},i.updateQueue=p;return}i=p.lastBaseUpdate,i===null?p.firstBaseUpdate=u:i.next=u,p.lastBaseUpdate=u}var fg=!1;function Md(){if(fg){var i=Wc;if(i!==null)throw i}}function Rd(i,u,p,w){fg=!1;var T=i.updateQueue;Uo=!1;var R=T.firstBaseUpdate,K=T.lastBaseUpdate,ee=T.shared.pending;if(ee!==null){T.shared.pending=null;var fe=ee,we=fe.next;fe.next=null,K===null?R=we:K.next=we,K=fe;var Me=i.alternate;Me!==null&&(Me=Me.updateQueue,ee=Me.lastBaseUpdate,ee!==K&&(ee===null?Me.firstBaseUpdate=we:ee.next=we,Me.lastBaseUpdate=fe))}if(R!==null){var Oe=T.baseState;K=0,Me=we=fe=null,ee=R;do{var Se=ee.lane&-536870913,Ne=Se!==ee.lane;if(Ne?(cn&Se)===Se:(w&Se)===Se){Se!==0&&Se===Vc&&(fg=!0),Me!==null&&(Me=Me.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var ut=i,Nt=ee;Se=u;var Rn=p;switch(Nt.tag){case 1:if(ut=Nt.payload,typeof ut=="function"){Oe=ut.call(Rn,Oe,Se);break e}Oe=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=Nt.payload,Se=typeof ut=="function"?ut.call(Rn,Oe,Se):ut,Se==null)break e;Oe=f({},Oe,Se);break e;case 2:Uo=!0}}Se=ee.callback,Se!==null&&(i.flags|=64,Ne&&(i.flags|=8192),Ne=T.callbacks,Ne===null?T.callbacks=[Se]:Ne.push(Se))}else Ne={lane:Se,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Me===null?(we=Me=Ne,fe=Oe):Me=Me.next=Ne,K|=Se;if(ee=ee.next,ee===null){if(ee=T.shared.pending,ee===null)break;Ne=ee,ee=Ne.next,Ne.next=null,T.lastBaseUpdate=Ne,T.shared.pending=null}}while(!0);Me===null&&(fe=Oe),T.baseState=fe,T.firstBaseUpdate=we,T.lastBaseUpdate=Me,R===null&&(T.shared.lanes=0),Xo|=K,i.lanes=K,i.memoizedState=Oe}}function fw(i,u){if(typeof i!="function")throw Error(r(191,i));i.call(u)}function hw(i,u){var p=i.callbacks;if(p!==null)for(i.callbacks=null,i=0;iR?R:8;var K=W.T,ee={};W.T=ee,jg(i,!1,u,p);try{var fe=T(),we=W.S;if(we!==null&&we(ee,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Me=oD(fe,w);Od(i,u,Me,ai(i))}else Od(i,u,w,ai(i))}catch(Oe){Od(i,u,{then:function(){},status:"rejected",reason:Oe},ai())}finally{Z.p=R,K!==null&&ee.types!==null&&(K.types=ee.types),W.T=K}}function hD(){}function Ag(i,u,p,w){if(i.tag!==5)throw Error(r(476));var T=Gw(i).queue;qw(i,T,u,J,p===null?hD:function(){return Vw(i),p(w)})}function Gw(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:J},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:p},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function Vw(i){var u=Gw(i);u.next===null&&(u=i.alternate.memoizedState),Od(i,u.next.queue,{},ai())}function Tg(){return ts(Jd)}function Ww(){return gr().memoizedState}function Kw(){return gr().memoizedState}function _D(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var p=ai();i=qo(p);var w=Go(u,i,p);w!==null&&(Hs(w,u,p),jd(w,u,p)),u={cache:ig()},i.payload=u;return}u=u.return}}function pD(i,u,p){var w=ai();p={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},u_(i)?Xw(u,p):(p=Km(i,u,p,w),p!==null&&(Hs(p,i,w),Zw(p,u,w)))}function Yw(i,u,p){var w=ai();Od(i,u,p,w)}function Od(i,u,p,w){var T={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(u_(i))Xw(u,T);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var K=u.lastRenderedState,ee=R(K,p);if(T.hasEagerState=!0,T.eagerState=ee,ei(ee,K))return qh(i,u,T,0),On===null&&Uh(),!1}catch{}finally{}if(p=Km(i,u,T,w),p!==null)return Hs(p,i,w),Zw(p,u,w),!0}return!1}function jg(i,u,p,w){if(w={lane:2,revertLane:c1(),gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},u_(i)){if(u)throw Error(r(479))}else u=Km(i,p,w,2),u!==null&&Hs(u,i,2)}function u_(i){var u=i.alternate;return i===qt||u!==null&&u===qt}function Xw(i,u){Zc=r_=!0;var p=i.pending;p===null?u.next=u:(u.next=p.next,p.next=u),i.pending=u}function Zw(i,u,p){if((p&4194048)!==0){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Dn(i,p)}}var Id={readContext:ts,use:a_,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useLayoutEffect:dr,useInsertionEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useSyncExternalStore:dr,useId:dr,useHostTransitionStatus:dr,useFormState:dr,useActionState:dr,useOptimistic:dr,useMemoCache:dr,useCacheRefresh:dr};Id.useEffectEvent=dr;var Qw={readContext:ts,use:a_,useCallback:function(i,u){return Ss().memoizedState=[i,u===void 0?null:u],i},useContext:ts,useEffect:Lw,useImperativeHandle:function(i,u,p){p=p!=null?p.concat([i]):null,l_(4194308,4,$w.bind(null,u,i),p)},useLayoutEffect:function(i,u){return l_(4194308,4,i,u)},useInsertionEffect:function(i,u){l_(4,2,i,u)},useMemo:function(i,u){var p=Ss();u=u===void 0?null:u;var w=i();if(Wl){pn(!0);try{i()}finally{pn(!1)}}return p.memoizedState=[w,u],w},useReducer:function(i,u,p){var w=Ss();if(p!==void 0){var T=p(u);if(Wl){pn(!0);try{p(u)}finally{pn(!1)}}}else T=u;return w.memoizedState=w.baseState=T,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:T},w.queue=i,i=i.dispatch=pD.bind(null,qt,i),[w.memoizedState,i]},useRef:function(i){var u=Ss();return i={current:i},u.memoizedState=i},useState:function(i){i=kg(i);var u=i.queue,p=Yw.bind(null,qt,u);return u.dispatch=p,[i.memoizedState,p]},useDebugValue:Ng,useDeferredValue:function(i,u){var p=Ss();return zg(p,i,u)},useTransition:function(){var i=kg(!1);return i=qw.bind(null,qt,i.queue,!0,!1),Ss().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,p){var w=qt,T=Ss();if(fn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),On===null)throw Error(r(349));(cn&127)!==0||bw(w,u,p)}T.memoizedState=p;var R={value:p,getSnapshot:u};return T.queue=R,Lw(yw.bind(null,w,R,i),[i]),w.flags|=2048,Jc(9,{destroy:void 0},xw.bind(null,w,R,p,u),null),p},useId:function(){var i=Ss(),u=On.identifierPrefix;if(fn){var p=da,w=ua;p=(w&~(1<<32-Dt(w)-1)).toString(32)+p,u="_"+u+"R_"+p,p=s_++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof w.is=="string"?K.createElement("select",{is:w.is}):K.createElement("select"),w.multiple?R.multiple=!0:w.size&&(R.size=w.size);break;default:R=typeof w.is=="string"?K.createElement(T,{is:w.is}):K.createElement(T)}}R[nn]=u,R[Pn]=w;e:for(K=u.child;K!==null;){if(K.tag===5||K.tag===6)R.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===u)break e;for(;K.sibling===null;){if(K.return===null||K.return===u)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}u.stateNode=R;e:switch(rs(R,T,w),T){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}w&&to(u)}}return qn(u),Gg(u,u.type,i===null?null:i.memoizedProps,u.pendingProps,p),null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==w&&to(u);else{if(typeof w!="string"&&u.stateNode===null)throw Error(r(166));if(i=oe.current,qc(u)){if(i=u.stateNode,p=u.memoizedProps,w=null,T=es,T!==null)switch(T.tag){case 27:case 5:w=T.memoizedProps}i[nn]=u,i=!!(i.nodeValue===p||w!==null&&w.suppressHydrationWarning===!0||g3(i.nodeValue,p)),i||Po(u,!0)}else i=T_(i).createTextNode(w),i[nn]=u,u.stateNode=i}return qn(u),null;case 31:if(p=u.memoizedState,i===null||i.memoizedState!==null){if(w=qc(u),p!==null){if(i===null){if(!w)throw Error(r(318));if(i=u.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[nn]=u}else Hl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qn(u),i=!1}else p=tg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),i=!0;if(!i)return u.flags&256?(ri(u),u):(ri(u),null);if((u.flags&128)!==0)throw Error(r(558))}return qn(u),null;case 13:if(w=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(T=qc(u),w!==null&&w.dehydrated!==null){if(i===null){if(!T)throw Error(r(318));if(T=u.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(r(317));T[nn]=u}else Hl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qn(u),T=!1}else T=tg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=T),T=!0;if(!T)return u.flags&256?(ri(u),u):(ri(u),null)}return ri(u),(u.flags&128)!==0?(u.lanes=p,u):(p=w!==null,i=i!==null&&i.memoizedState!==null,p&&(w=u.child,T=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(T=w.alternate.memoizedState.cachePool.pool),R=null,w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(R=w.memoizedState.cachePool.pool),R!==T&&(w.flags|=2048)),p!==i&&p&&(u.child.flags|=8192),p_(u,u.updateQueue),qn(u),null);case 4:return te(),i===null&&h1(u.stateNode.containerInfo),qn(u),null;case 10:return Za(u.type),qn(u),null;case 19:if(Y(mr),w=u.memoizedState,w===null)return qn(u),null;if(T=(u.flags&128)!==0,R=w.rendering,R===null)if(T)$d(w,!1);else{if(fr!==0||i!==null&&(i.flags&128)!==0)for(i=u.child;i!==null;){if(R=n_(i),R!==null){for(u.flags|=128,$d(w,!1),i=R.updateQueue,u.updateQueue=i,p_(u,i),u.subtreeFlags=0,i=p,p=u.child;p!==null;)Y4(p,i),p=p.sibling;return G(mr,mr.current&1|2),fn&&Ya(u,w.treeForkCount),u.child}i=i.sibling}w.tail!==null&&St()>x_&&(u.flags|=128,T=!0,$d(w,!1),u.lanes=4194304)}else{if(!T)if(i=n_(R),i!==null){if(u.flags|=128,T=!0,i=i.updateQueue,u.updateQueue=i,p_(u,i),$d(w,!0),w.tail===null&&w.tailMode==="hidden"&&!R.alternate&&!fn)return qn(u),null}else 2*St()-w.renderingStartTime>x_&&p!==536870912&&(u.flags|=128,T=!0,$d(w,!1),u.lanes=4194304);w.isBackwards?(R.sibling=u.child,u.child=R):(i=w.last,i!==null?i.sibling=R:u.child=R,w.last=R)}return w.tail!==null?(i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=St(),i.sibling=null,p=mr.current,G(mr,T?p&1|2:p&1),fn&&Ya(u,w.treeForkCount),i):(qn(u),null);case 22:case 23:return ri(u),_g(),w=u.memoizedState!==null,i!==null?i.memoizedState!==null!==w&&(u.flags|=8192):w&&(u.flags|=8192),w?(p&536870912)!==0&&(u.flags&128)===0&&(qn(u),u.subtreeFlags&6&&(u.flags|=8192)):qn(u),p=u.updateQueue,p!==null&&p_(u,p.retryQueue),p=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),w=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(w=u.memoizedState.cachePool.pool),w!==p&&(u.flags|=2048),i!==null&&Y(Ul),null;case 24:return p=null,i!==null&&(p=i.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Za(Nr),qn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function xD(i,u){switch(Jm(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return Za(Nr),te(),i=u.flags,(i&65536)!==0&&(i&128)===0?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return ge(u),null;case 31:if(u.memoizedState!==null){if(ri(u),u.alternate===null)throw Error(r(340));Hl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 13:if(ri(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Hl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return Y(mr),null;case 4:return te(),null;case 10:return Za(u.type),null;case 22:case 23:return ri(u),_g(),i!==null&&Y(Ul),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return Za(Nr),null;case 25:return null;default:return null}}function w5(i,u){switch(Jm(u),u.tag){case 3:Za(Nr),te();break;case 26:case 27:case 5:ge(u);break;case 4:te();break;case 31:u.memoizedState!==null&&ri(u);break;case 13:ri(u);break;case 19:Y(mr);break;case 10:Za(u.type);break;case 22:case 23:ri(u),_g(),i!==null&&Y(Ul);break;case 24:Za(Nr)}}function Hd(i,u){try{var p=u.updateQueue,w=p!==null?p.lastEffect:null;if(w!==null){var T=w.next;p=T;do{if((p.tag&i)===i){w=void 0;var R=p.create,K=p.inst;w=R(),K.destroy=w}p=p.next}while(p!==T)}}catch(ee){Tn(u,u.return,ee)}}function Ko(i,u,p){try{var w=u.updateQueue,T=w!==null?w.lastEffect:null;if(T!==null){var R=T.next;w=R;do{if((w.tag&i)===i){var K=w.inst,ee=K.destroy;if(ee!==void 0){K.destroy=void 0,T=u;var fe=p,we=ee;try{we()}catch(Me){Tn(T,fe,Me)}}}w=w.next}while(w!==R)}}catch(Me){Tn(u,u.return,Me)}}function S5(i){var u=i.updateQueue;if(u!==null){var p=i.stateNode;try{hw(u,p)}catch(w){Tn(i,i.return,w)}}}function k5(i,u,p){p.props=Kl(i.type,i.memoizedProps),p.state=i.memoizedState;try{p.componentWillUnmount()}catch(w){Tn(i,u,w)}}function Pd(i,u){try{var p=i.ref;if(p!==null){switch(i.tag){case 26:case 27:case 5:var w=i.stateNode;break;case 30:w=i.stateNode;break;default:w=i.stateNode}typeof p=="function"?i.refCleanup=p(w):p.current=w}}catch(T){Tn(i,u,T)}}function fa(i,u){var p=i.ref,w=i.refCleanup;if(p!==null)if(typeof w=="function")try{w()}catch(T){Tn(i,u,T)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(T){Tn(i,u,T)}else p.current=null}function C5(i){var u=i.type,p=i.memoizedProps,w=i.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&w.focus();break e;case"img":p.src?w.src=p.src:p.srcSet&&(w.srcset=p.srcSet)}}catch(T){Tn(i,i.return,T)}}function Vg(i,u,p){try{var w=i.stateNode;FD(w,i.type,p,u),w[Pn]=u}catch(T){Tn(i,i.return,T)}}function E5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&tl(i.type)||i.tag===4}function Wg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||E5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&tl(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Kg(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(i,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(i),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=bs));else if(w!==4&&(w===27&&tl(i.type)&&(p=i.stateNode,u=null),i=i.child,i!==null))for(Kg(i,u,p),i=i.sibling;i!==null;)Kg(i,u,p),i=i.sibling}function m_(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?p.insertBefore(i,u):p.appendChild(i);else if(w!==4&&(w===27&&tl(i.type)&&(p=i.stateNode),i=i.child,i!==null))for(m_(i,u,p),i=i.sibling;i!==null;)m_(i,u,p),i=i.sibling}function N5(i){var u=i.stateNode,p=i.memoizedProps;try{for(var w=i.type,T=u.attributes;T.length;)u.removeAttributeNode(T[0]);rs(u,w,p),u[nn]=i,u[Pn]=p}catch(R){Tn(i,i.return,R)}}var no=!1,Tr=!1,Yg=!1,z5=typeof WeakSet=="function"?WeakSet:Set,Yr=null;function yD(i,u){if(i=i.containerInfo,m1=I_,i=H4(i),Fm(i)){if("selectionStart"in i)var p={start:i.selectionStart,end:i.selectionEnd};else e:{p=(p=i.ownerDocument)&&p.defaultView||window;var w=p.getSelection&&p.getSelection();if(w&&w.rangeCount!==0){p=w.anchorNode;var T=w.anchorOffset,R=w.focusNode;w=w.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var K=0,ee=-1,fe=-1,we=0,Me=0,Oe=i,Se=null;t:for(;;){for(var Ne;Oe!==p||T!==0&&Oe.nodeType!==3||(ee=K+T),Oe!==R||w!==0&&Oe.nodeType!==3||(fe=K+w),Oe.nodeType===3&&(K+=Oe.nodeValue.length),(Ne=Oe.firstChild)!==null;)Se=Oe,Oe=Ne;for(;;){if(Oe===i)break t;if(Se===p&&++we===T&&(ee=K),Se===R&&++Me===w&&(fe=K),(Ne=Oe.nextSibling)!==null)break;Oe=Se,Se=Oe.parentNode}Oe=Ne}p=ee===-1||fe===-1?null:{start:ee,end:fe}}else p=null}p=p||{start:0,end:0}}else p=null;for(g1={focusedElem:i,selectionRange:p},I_=!1,Yr=u;Yr!==null;)if(u=Yr,i=u.child,(u.subtreeFlags&1028)!==0&&i!==null)i.return=u,Yr=i;else for(;Yr!==null;){switch(u=Yr,R=u.alternate,i=u.flags,u.tag){case 0:if((i&4)!==0&&(i=u.updateQueue,i=i!==null?i.events:null,i!==null))for(p=0;p title"))),rs(R,w,p),R[nn]=i,Fn(R),w=R;break e;case"link":var K=D3("link","href",T).get(w+(p.href||""));if(K){for(var ee=0;eeRn&&(K=Rn,Rn=Nt,Nt=K);var ve=B4(ee,Nt),_e=B4(ee,Rn);if(ve&&_e&&(Ne.rangeCount!==1||Ne.anchorNode!==ve.node||Ne.anchorOffset!==ve.offset||Ne.focusNode!==_e.node||Ne.focusOffset!==_e.offset)){var ye=Oe.createRange();ye.setStart(ve.node,ve.offset),Ne.removeAllRanges(),Nt>Rn?(Ne.addRange(ye),Ne.extend(_e.node,_e.offset)):(ye.setEnd(_e.node,_e.offset),Ne.addRange(ye))}}}}for(Oe=[],Ne=ee;Ne=Ne.parentNode;)Ne.nodeType===1&&Oe.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eep?32:p,W.T=null,p=n1,n1=null;var R=Qo,K=oo;if(Pr=0,su=Qo=null,oo=0,(yn&6)!==0)throw Error(r(331));var ee=yn;if(yn|=4,$5(R.current),O5(R,R.current,K,p),yn=ee,Wd(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(tn,R)}catch{}return!0}finally{Z.p=T,W.T=w,r3(i,u)}}function i3(i,u,p){u=ki(p,u),u=Lg(i.stateNode,u,2),i=Go(i,u,2),i!==null&&(Ut(i,2),ha(i))}function Tn(i,u,p){if(i.tag===3)i3(i,i,p);else for(;u!==null;){if(u.tag===3){i3(u,i,p);break}else if(u.tag===1){var w=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Zo===null||!Zo.has(w))){i=ki(p,i),p=a5(2),w=Go(u,p,2),w!==null&&(o5(p,w,u,i),Ut(w,2),ha(w));break}}u=u.return}}function a1(i,u,p){var w=i.pingCache;if(w===null){w=i.pingCache=new kD;var T=new Set;w.set(u,T)}else T=w.get(u),T===void 0&&(T=new Set,w.set(u,T));T.has(p)||(Qg=!0,T.add(p),i=AD.bind(null,i,u,p),u.then(i,i))}function AD(i,u,p){var w=i.pingCache;w!==null&&w.delete(u),i.pingedLanes|=i.suspendedLanes&p,i.warmLanes&=~p,On===i&&(cn&p)===p&&(fr===4||fr===3&&(cn&62914560)===cn&&300>St()-b_?(yn&2)===0&&iu(i,0):Jg|=p,ru===cn&&(ru=0)),ha(i)}function a3(i,u){u===0&&(u=Ie()),i=Bl(i,u),i!==null&&(Ut(i,u),ha(i))}function TD(i){var u=i.memoizedState,p=0;u!==null&&(p=u.retryLane),a3(i,p)}function jD(i,u){var p=0;switch(i.tag){case 31:case 13:var w=i.stateNode,T=i.memoizedState;T!==null&&(p=T.retryLane);break;case 19:w=i.stateNode;break;case 22:w=i.stateNode._retryCache;break;default:throw Error(r(314))}w!==null&&w.delete(u),a3(i,p)}function MD(i,u){return wt(i,u)}var E_=null,ou=null,o1=!1,N_=!1,l1=!1,el=0;function ha(i){i!==ou&&i.next===null&&(ou===null?E_=ou=i:ou=ou.next=i),N_=!0,o1||(o1=!0,DD())}function Wd(i,u){if(!l1&&N_){l1=!0;do for(var p=!1,w=E_;w!==null;){if(i!==0){var T=w.pendingLanes;if(T===0)var R=0;else{var K=w.suspendedLanes,ee=w.pingedLanes;R=(1<<31-Dt(42|i)+1)-1,R&=T&~(K&~ee),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,u3(w,R))}else R=cn,R=Wn(w,w===On?R:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(R&3)===0||Et(w,R)||(p=!0,u3(w,R));w=w.next}while(p);l1=!1}}function RD(){o3()}function o3(){N_=o1=!1;var i=0;el!==0&&qD()&&(i=el);for(var u=St(),p=null,w=E_;w!==null;){var T=w.next,R=l3(w,u);R===0?(w.next=null,p===null?E_=T:p.next=T,T===null&&(ou=p)):(p=w,(i!==0||(R&3)!==0)&&(N_=!0)),w=T}Pr!==0&&Pr!==5||Wd(i),el!==0&&(el=0)}function l3(i,u){for(var p=i.suspendedLanes,w=i.pingedLanes,T=i.expirationTimes,R=i.pendingLanes&-62914561;0ee)break;var Me=fe.transferSize,Oe=fe.initiatorType;Me&&v3(Oe)&&(fe=fe.responseEnd,K+=Me*(fe"u"?null:document;function T3(i,u,p){var w=lu;if(w&&typeof u=="string"&&u){var T=Kn(u);T='link[rel="'+i+'"][href="'+T+'"]',typeof p=="string"&&(T+='[crossorigin="'+p+'"]'),A3.has(T)||(A3.add(T),i={rel:i,crossOrigin:p,href:u},w.querySelector(T)===null&&(u=w.createElement("link"),rs(u,"link",i),Fn(u),w.head.appendChild(u)))}}function JD(i){lo.D(i),T3("dns-prefetch",i,null)}function eL(i,u){lo.C(i,u),T3("preconnect",i,u)}function tL(i,u,p){lo.L(i,u,p);var w=lu;if(w&&i&&u){var T='link[rel="preload"][as="'+Kn(u)+'"]';u==="image"&&p&&p.imageSrcSet?(T+='[imagesrcset="'+Kn(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(T+='[imagesizes="'+Kn(p.imageSizes)+'"]')):T+='[href="'+Kn(i)+'"]';var R=T;switch(u){case"style":R=cu(i);break;case"script":R=uu(i)}Ti.has(R)||(i=f({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:i,as:u},p),Ti.set(R,i),w.querySelector(T)!==null||u==="style"&&w.querySelector(Zd(R))||u==="script"&&w.querySelector(Qd(R))||(u=w.createElement("link"),rs(u,"link",i),Fn(u),w.head.appendChild(u)))}}function nL(i,u){lo.m(i,u);var p=lu;if(p&&i){var w=u&&typeof u.as=="string"?u.as:"script",T='link[rel="modulepreload"][as="'+Kn(w)+'"][href="'+Kn(i)+'"]',R=T;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=uu(i)}if(!Ti.has(R)&&(i=f({rel:"modulepreload",href:i},u),Ti.set(R,i),p.querySelector(T)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(Qd(R)))return}w=p.createElement("link"),rs(w,"link",i),Fn(w),p.head.appendChild(w)}}}function rL(i,u,p){lo.S(i,u,p);var w=lu;if(w&&i){var T=Vr(w).hoistableStyles,R=cu(i);u=u||"default";var K=T.get(R);if(!K){var ee={loading:0,preload:null};if(K=w.querySelector(Zd(R)))ee.loading=5;else{i=f({rel:"stylesheet",href:i,"data-precedence":u},p),(p=Ti.get(R))&&k1(i,p);var fe=K=w.createElement("link");Fn(fe),rs(fe,"link",i),fe._p=new Promise(function(we,Me){fe.onload=we,fe.onerror=Me}),fe.addEventListener("load",function(){ee.loading|=1}),fe.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,M_(K,u,w)}K={type:"stylesheet",instance:K,count:1,state:ee},T.set(R,K)}}}function sL(i,u){lo.X(i,u);var p=lu;if(p&&i){var w=Vr(p).hoistableScripts,T=uu(i),R=w.get(T);R||(R=p.querySelector(Qd(T)),R||(i=f({src:i,async:!0},u),(u=Ti.get(T))&&C1(i,u),R=p.createElement("script"),Fn(R),rs(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(T,R))}}function iL(i,u){lo.M(i,u);var p=lu;if(p&&i){var w=Vr(p).hoistableScripts,T=uu(i),R=w.get(T);R||(R=p.querySelector(Qd(T)),R||(i=f({src:i,async:!0,type:"module"},u),(u=Ti.get(T))&&C1(i,u),R=p.createElement("script"),Fn(R),rs(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(T,R))}}function j3(i,u,p,w){var T=(T=oe.current)?j_(T):null;if(!T)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=cu(p.href),p=Vr(T).hoistableStyles,w=p.get(u),w||(w={type:"style",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){i=cu(p.href);var R=Vr(T).hoistableStyles,K=R.get(i);if(K||(T=T.ownerDocument||T,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,K),(R=T.querySelector(Zd(i)))&&!R._p&&(K.instance=R,K.state.loading=5),Ti.has(i)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Ti.set(i,p),R||aL(T,i,p,K.state))),u&&w===null)throw Error(r(528,""));return K}if(u&&w!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=uu(p),p=Vr(T).hoistableScripts,w=p.get(u),w||(w={type:"script",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function cu(i){return'href="'+Kn(i)+'"'}function Zd(i){return'link[rel="stylesheet"]['+i+"]"}function M3(i){return f({},i,{"data-precedence":i.precedence,precedence:null})}function aL(i,u,p,w){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?w.loading=1:(u=i.createElement("link"),w.preload=u,u.addEventListener("load",function(){return w.loading|=1}),u.addEventListener("error",function(){return w.loading|=2}),rs(u,"link",p),Fn(u),i.head.appendChild(u))}function uu(i){return'[src="'+Kn(i)+'"]'}function Qd(i){return"script[async]"+i}function R3(i,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var w=i.querySelector('style[data-href~="'+Kn(p.href)+'"]');if(w)return u.instance=w,Fn(w),w;var T=f({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return w=(i.ownerDocument||i).createElement("style"),Fn(w),rs(w,"style",T),M_(w,p.precedence,i),u.instance=w;case"stylesheet":T=cu(p.href);var R=i.querySelector(Zd(T));if(R)return u.state.loading|=4,u.instance=R,Fn(R),R;w=M3(p),(T=Ti.get(T))&&k1(w,T),R=(i.ownerDocument||i).createElement("link"),Fn(R);var K=R;return K._p=new Promise(function(ee,fe){K.onload=ee,K.onerror=fe}),rs(R,"link",w),u.state.loading|=4,M_(R,p.precedence,i),u.instance=R;case"script":return R=uu(p.src),(T=i.querySelector(Qd(R)))?(u.instance=T,Fn(T),T):(w=p,(T=Ti.get(R))&&(w=f({},p),C1(w,T)),i=i.ownerDocument||i,T=i.createElement("script"),Fn(T),rs(T,"link",w),i.head.appendChild(T),u.instance=T);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(w=u.instance,u.state.loading|=4,M_(w,p.precedence,i));return u.instance}function M_(i,u,p){for(var w=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),T=w.length?w[w.length-1]:null,R=T,K=0;K title"):null)}function oL(i,u,p){if(p===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function O3(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function lL(i,u,p,w){if(p.type==="stylesheet"&&(typeof w.media!="string"||matchMedia(w.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var T=cu(w.href),R=u.querySelector(Zd(T));if(R){u=R._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(i.count++,i=D_.bind(i),u.then(i,i)),p.state.loading|=4,p.instance=R,Fn(R);return}R=u.ownerDocument||u,w=M3(w),(T=Ti.get(T))&&k1(w,T),R=R.createElement("link"),Fn(R);var K=R;K._p=new Promise(function(ee,fe){K.onload=ee,K.onerror=fe}),rs(R,"link",w),p.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(i.count++,p=D_.bind(i),u.addEventListener("load",p),u.addEventListener("error",p))}}var E1=0;function cL(i,u){return i.stylesheets&&i.count===0&&O_(i,i.stylesheets),0E1?50:800)+u);return i.unsuspend=p,function(){i.unsuspend=null,clearTimeout(w),clearTimeout(T)}}:null}function D_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)O_(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var L_=null;function O_(i,u){i.stylesheets=null,i.unsuspend!==null&&(i.count++,L_=new Map,u.forEach(uL,i),L_=null,D_.call(i))}function uL(i,u){if(!(u.state.loading&4)){var p=L_.get(i);if(p)var w=p.get(null);else{p=new Map,L_.set(i,p);for(var T=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),L1.exports=CL(),L1.exports}var NL=EL();const zL={},AL="en",sx=["en","zh-CN","fa"],H9="orx:locale",ix=["localStorage","preferredLanguage","baseLocale"],c6=[],Df=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let u6=!1,N=()=>{var t;let e=ix;!Df&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=F9(window.location.href));const n=TL(e);if(n)return u6||(u6=!0,P9(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function TL(e,n){let t;for(const r of e){if(r==="baseLocale")t=AL;else if(r==="preferredLanguage"&&!Df)t=OL();else if(r==="localStorage"&&!Df)t=localStorage.getItem(H9)??void 0;else if(U9(r)&&V0.has(r)){const a=V0.get(r);if(a){const o=a.getLocale();if(o instanceof Promise)continue;if(o!==void 0)return DL(o)}}const s=Lf(t);if(s)return s}}const jL=e=>{window.location.reload()};let P9=(e,n)=>{var l;const t={reload:!0,...n};let r;try{r=N()}catch{}const s=[];let a=ix;!Df&&typeof window<"u"&&((l=window.location)!=null&&l.href)&&(a=F9(window.location.href));for(const c of a)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(H9,e);else if(U9(c)&&V0.has(c)){const d=V0.get(c);if(d){let _=d.setLocale(e);_ instanceof Promise&&(_=_.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(_))}}}const o=()=>{!Df&&t.reload&&window.location&&e!==r&&jL()};if(s.length)return Promise.all(s).then(()=>{o()});o()},ML=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function Lf(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of sx)if(t.toLowerCase()===n)return t}function RL(e){return!!e&&sx.some(n=>n===e)}function DL(e){const n=Lf(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${sx.join(", ")}`)}function LL(e,n){return e.exec(n.href)}function OL(){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=Lf(t.fullTag);if(r)return r;const s=Lf(t.baseTag);if(s)return s}}function IL(e){return BL(e)}function BL(e){const n=typeof e=="string"?new URL(e,ML()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&Lf(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let d6,f6;function $L(e){if(c6.length===0)return;const n=typeof e=="string"?e:e.href;if(d6===n)return f6;const t=new URL(n,"http://example.com"),r=IL(t),s=r.href===t.href?[t]:[t,r];let a;for(const o of s){for(const l of c6){const c=new zL(l.match,o.href);if(LL(c,o)){a=l;break}}if(a)break}return d6=n,f6=a,a}function F9(e){const n=$L(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:ix}const V0=new Map;function U9(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const HL=e=>`Actions for ${e==null?void 0:e.name}`,PL=e=>`${e==null?void 0:e.name} 的操作`,FL=e=>`عملیات ${e==null?void 0:e.name}`,UL=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PL(e):t==="fa"?FL(e):HL(e)}),qL=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,GL=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,VL=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,WL=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GL(e):t==="fa"?VL(e):qL(e)}),KL=e=>`Branch: ${e==null?void 0:e.branch}`,YL=e=>`分支:${e==null?void 0:e.branch}`,XL=e=>`شاخه: ${e==null?void 0:e.branch}`,ZL=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YL(e):t==="fa"?XL(e):KL(e)}),QL=e=>`Browse code on ${e==null?void 0:e.branch}`,JL=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,eO=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,q9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JL(e):t==="fa"?eO(e):QL(e)}),tO=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,nO=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,rO=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,sO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?nO(e):t==="fa"?rO(e):tO(e)}),iO=e=>`Collapse ${e==null?void 0:e.name}`,aO=e=>`折叠 ${e==null?void 0:e.name}`,oO=e=>`بستن ${e==null?void 0:e.name}`,lO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?aO(e):t==="fa"?oO(e):iO(e)}),cO=e=>`Committed changes versus ${e==null?void 0:e.parent}`,uO=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,dO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,fO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?uO(e):t==="fa"?dO(e):cO(e)}),hO=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,_O=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,pO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,mO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_O(e):t==="fa"?pO(e):hO(e)}),gO=e=>`Copy ${e==null?void 0:e.value}`,vO=e=>`复制 ${e==null?void 0:e.value}`,bO=e=>`کپی ${e==null?void 0:e.value}`,xO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vO(e):t==="fa"?bO(e):gO(e)}),yO=e=>`Delete ${e==null?void 0:e.name}`,wO=e=>`删除 ${e==null?void 0:e.name}`,SO=e=>`حذف ${e==null?void 0:e.name}`,gb=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wO(e):t==="fa"?SO(e):yO(e)}),kO=e=>`Download ${e==null?void 0:e.name}`,CO=e=>`下载 ${e==null?void 0:e.name}`,EO=e=>`بارگیری ${e==null?void 0:e.name}`,h6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?CO(e):t==="fa"?EO(e):kO(e)}),NO=e=>`Expand ${e==null?void 0:e.name}`,zO=e=>`展开 ${e==null?void 0:e.name}`,AO=e=>`باز کردن ${e==null?void 0:e.name}`,TO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zO(e):t==="fa"?AO(e):NO(e)}),jO=e=>`Hide additional ${e==null?void 0:e.target}`,MO=e=>`隐藏其余${e==null?void 0:e.target}`,RO=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,DO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?MO(e):t==="fa"?RO(e):jO(e)}),LO=e=>`Hide error details for ${e==null?void 0:e.activity}`,OO=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,IO=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,BO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?OO(e):t==="fa"?IO(e):LO(e)}),$O=e=>`${e==null?void 0:e.count} consecutive identical calls`,HO=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,PO=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,FO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?HO(e):t==="fa"?PO(e):$O(e)}),UO=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,qO=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,GO=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,VO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qO(e):t==="fa"?GO(e):UO(e)}),WO=e=>`Open ${e==null?void 0:e.branch} on GitHub`,KO=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,YO=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,G9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?KO(e):t==="fa"?YO(e):WO(e)}),XO=e=>`Open experiment ${e==null?void 0:e.name}`,ZO=e=>`打开实验 ${e==null?void 0:e.name}`,QO=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,JO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ZO(e):t==="fa"?QO(e):XO(e)}),eI=e=>`Open ${e==null?void 0:e.path} in the right pane`,tI=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,nI=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,rI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?tI(e):t==="fa"?nI(e):eI(e)}),sI=e=>`Open ${e==null?void 0:e.name}`,iI=e=>`打开 ${e==null?void 0:e.name}`,aI=e=>`باز کردن ${e==null?void 0:e.name}`,oI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?iI(e):t==="fa"?aI(e):sI(e)}),lI=e=>`Open logs for run ${e==null?void 0:e.run}`,cI=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,uI=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,dI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?cI(e):t==="fa"?uI(e):lI(e)}),fI=e=>`Open ${e==null?void 0:e.name} on GitHub`,hI=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,_I=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,W0=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hI(e):t==="fa"?_I(e):fI(e)}),pI=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,mI=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,gI=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,vI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mI(e):t==="fa"?gI(e):pI(e)}),bI=e=>`Overleaf — ${e==null?void 0:e.status}`,xI=e=>`Overleaf — ${e==null?void 0:e.status}`,yI=e=>`Overleaf — ${e==null?void 0:e.status}`,wI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xI(e):t==="fa"?yI(e):bI(e)}),SI=e=>`Preview /${e==null?void 0:e.name} skill`,kI=e=>`预览 /${e==null?void 0:e.name} 技能`,CI=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,EI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kI(e):t==="fa"?CI(e):SI(e)}),NI=e=>`Remove annotation ${e==null?void 0:e.number}`,zI=e=>`移除批注 ${e==null?void 0:e.number}`,AI=e=>`حذف یادداشت ${e==null?void 0:e.number}`,TI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zI(e):t==="fa"?AI(e):NI(e)}),jI=e=>`Remove ${e==null?void 0:e.name}`,MI=e=>`移除 ${e==null?void 0:e.name}`,RI=e=>`حذف ${e==null?void 0:e.name}`,DI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?MI(e):t==="fa"?RI(e):jI(e)}),LI=e=>`Remove queued message: ${e==null?void 0:e.text}`,OI=e=>`移除排队消息:${e==null?void 0:e.text}`,II=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,BI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?OI(e):t==="fa"?II(e):LI(e)}),$I=e=>`Retry queued message: ${e==null?void 0:e.text}`,HI=e=>`重试排队消息:${e==null?void 0:e.text}`,PI=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,FI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?HI(e):t==="fa"?PI(e):$I(e)}),UI=e=>`Run ${e==null?void 0:e.id}`,qI=e=>`运行 ${e==null?void 0:e.id}`,GI=e=>`اجرای ${e==null?void 0:e.id}`,VI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qI(e):t==="fa"?GI(e):UI(e)}),WI=e=>`Show error details for ${e==null?void 0:e.activity}`,KI=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,YI=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,XI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?KI(e):t==="fa"?YI(e):WI(e)}),ZI=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,QI=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,JI=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,eB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?QI(e):t==="fa"?JI(e):ZI(e)}),tB=e=>`${e==null?void 0:e.name} skill`,nB=e=>`${e==null?void 0:e.name} 技能`,rB=e=>`مهارت ${e==null?void 0:e.name}`,sB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?nB(e):t==="fa"?rB(e):tB(e)}),iB=e=>`Value for ${e==null?void 0:e.name}`,aB=e=>`${e==null?void 0:e.name} 的值`,oB=e=>`مقدار ${e==null?void 0:e.name}`,lB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?aB(e):t==="fa"?oB(e):iB(e)}),cB=()=>"Agent reported back",uB=()=>"智能体已返回结果",dB=()=>"عامل نتیجه را گزارش کرد",fB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uB():t==="fa"?dB():cB()}),hB=()=>"Browse",_B=()=>"浏览",pB=()=>"مرور",mB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_B():t==="fa"?pB():hB()}),gB=()=>"Browsing…",vB=()=>"正在浏览…",bB=()=>"در حال مرور…",xB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vB():t==="fa"?bB():gB()}),yB=()=>"Checked experiment status and updated notes",wB=()=>"已检查实验状态并更新笔记",SB=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",kB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wB():t==="fa"?SB():yB()}),CB=()=>"Closed an agent",EB=()=>"已关闭智能体",NB=()=>"عامل بسته شد",zB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EB():t==="fa"?NB():CB()}),AB=()=>"Compacted context",TB=()=>"上下文已压缩",jB=()=>"زمینه فشرده شد",MB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TB():t==="fa"?jB():AB()}),RB=()=>"Compacting context…",DB=()=>"正在压缩上下文…",LB=()=>"در حال فشرده‌سازی زمینه…",OB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DB():t==="fa"?LB():RB()}),IB=e=>`Created ${e==null?void 0:e.target}`,BB=e=>`已创建 ${e==null?void 0:e.target}`,$B=e=>`${e==null?void 0:e.target} ایجاد شد`,HB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?BB(e):t==="fa"?$B(e):IB(e)}),PB=()=>"Delegate",FB=()=>"委派",UB=()=>"واگذاری",qB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FB():t==="fa"?UB():PB()}),GB=()=>"Delegating…",VB=()=>"正在委派…",WB=()=>"در حال واگذاری…",KB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VB():t==="fa"?WB():GB()}),YB=e=>`Deleted ${e==null?void 0:e.target}`,XB=e=>`已删除 ${e==null?void 0:e.target}`,ZB=e=>`${e==null?void 0:e.target} حذف شد`,QB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XB(e):t==="fa"?ZB(e):YB(e)}),JB=()=>"Edit",e$=()=>"编辑",t$=()=>"ویرایش",n$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e$():t==="fa"?t$():JB()}),r$=e=>`Edited ${e==null?void 0:e.target}`,s$=e=>`已编辑 ${e==null?void 0:e.target}`,i$=e=>`${e==null?void 0:e.target} ویرایش شد`,a$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?s$(e):t==="fa"?i$(e):r$(e)}),o$=()=>"Editing…",l$=()=>"正在编辑…",c$=()=>"در حال ویرایش…",u$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l$():t==="fa"?c$():o$()}),d$=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,f$=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,h$=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,_$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?f$(e):t==="fa"?h$(e):d$(e)}),p$=e=>`Listed files matching ${e==null?void 0:e.pattern}`,m$=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,g$=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,v$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?m$(e):t==="fa"?g$(e):p$(e)}),b$=()=>"Load",x$=()=>"加载",y$=()=>"بارگیری",w$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?x$():t==="fa"?y$():b$()}),S$=()=>"Loaded a skill",k$=()=>"已加载技能",C$=()=>"یک مهارت بارگیری شد",E$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k$():t==="fa"?C$():S$()}),N$=e=>`Loaded ${e==null?void 0:e.name} skill`,z$=e=>`已加载技能 ${e==null?void 0:e.name}`,A$=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,T$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?z$(e):t==="fa"?A$(e):N$(e)}),j$=()=>"Loading…",M$=()=>"正在加载…",R$=()=>"در حال بارگیری…",D$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M$():t==="fa"?R$():j$()}),L$=e=>`Opened ${e==null?void 0:e.target}`,O$=e=>`已打开 ${e==null?void 0:e.target}`,I$=e=>`${e==null?void 0:e.target} باز شد`,B$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?O$(e):t==="fa"?I$(e):L$(e)}),$$=e=>`Ran ${e==null?void 0:e.command}`,H$=e=>`已运行 ${e==null?void 0:e.command}`,P$=e=>`${e==null?void 0:e.command} اجرا شد`,F$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?H$(e):t==="fa"?P$(e):$$(e)}),U$=()=>"Ran a sub-agent",q$=()=>"已运行子智能体",G$=()=>"یک عامل فرعی اجرا شد",V$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q$():t==="fa"?G$():U$()}),W$=()=>"Read",K$=()=>"读取",Y$=()=>"خواندن",X$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K$():t==="fa"?Y$():W$()}),Z$=()=>"Read experiment notes",Q$=()=>"已读取实验笔记",J$=()=>"یادداشت‌های آزمایش خوانده شد",eH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Q$():t==="fa"?J$():Z$()}),tH=()=>"Read a paper",nH=()=>"已读取论文",rH=()=>"یک مقاله خوانده شد",sH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nH():t==="fa"?rH():tH()}),iH=e=>`Read ${e==null?void 0:e.name} skill`,aH=e=>`已读取技能 ${e==null?void 0:e.name}`,oH=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,$1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?aH(e):t==="fa"?oH(e):iH(e)}),lH=e=>`Read ${e==null?void 0:e.target}`,cH=e=>`已读取 ${e==null?void 0:e.target}`,uH=e=>`${e==null?void 0:e.target} خوانده شد`,af=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?cH(e):t==="fa"?uH(e):lH(e)}),dH=()=>"Read a web page",fH=()=>"已读取网页",hH=()=>"یک صفحهٔ وب خوانده شد",_H=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fH():t==="fa"?hH():dH()}),pH=()=>"Reading…",mH=()=>"正在读取…",gH=()=>"در حال خواندن…",vH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mH():t==="fa"?gH():pH()}),bH=()=>"Resumed an agent",xH=()=>"已恢复智能体",yH=()=>"عامل از سر گرفته شد",wH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xH():t==="fa"?yH():bH()}),SH=()=>"Review",kH=()=>"查看",CH=()=>"بازبینی",EH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kH():t==="fa"?CH():SH()}),NH=()=>"Reviewed run log",zH=()=>"已查看运行日志",AH=()=>"گزارش اجرا بازبینی شد",TH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zH():t==="fa"?AH():NH()}),jH=()=>"Reviewed run logs",MH=()=>"已查看运行日志",RH=()=>"گزارش‌های اجرا بازبینی شد",DH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MH():t==="fa"?RH():jH()}),LH=()=>"Reviewed experiment status and notes",OH=()=>"已查看实验状态和笔记",IH=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",BH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OH():t==="fa"?IH():LH()}),$H=()=>"Reviewing…",HH=()=>"正在查看…",PH=()=>"در حال بازبینی…",FH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HH():t==="fa"?PH():$H()}),UH=()=>"Run",qH=()=>"运行",GH=()=>"اجرا",VH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qH():t==="fa"?GH():UH()}),WH=()=>"Running…",KH=()=>"正在运行…",YH=()=>"در حال اجرا…",XH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KH():t==="fa"?YH():WH()}),ZH=()=>"Search",QH=()=>"搜索",JH=()=>"جست‌وجو",eP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QH():t==="fa"?JH():ZH()}),tP=()=>"Searched alphaXiv full text",nP=()=>"已搜索 alphaXiv 全文",rP=()=>"متن کامل alphaXiv جست‌وجو شد",sP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nP():t==="fa"?rP():tP()}),iP=()=>"Searched alphaXiv semantically",aP=()=>"已对 alphaXiv 进行语义搜索",oP=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",lP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aP():t==="fa"?oP():iP()}),cP=()=>"Searched bioRxiv",uP=()=>"已搜索 bioRxiv",dP=()=>"bioRxiv جست‌وجو شد",fP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uP():t==="fa"?dP():cP()}),hP=()=>"Searched code",_P=()=>"已搜索代码",pP=()=>"کد جست‌وجو شد",H1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_P():t==="fa"?pP():hP()}),mP=e=>`Searched code for “${e==null?void 0:e.pattern}”`,gP=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,vP=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,P1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?gP(e):t==="fa"?vP(e):mP(e)}),bP=e=>`Searched images for “${e==null?void 0:e.query}”`,xP=e=>`已搜索图片“${e==null?void 0:e.query}”`,yP=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,wP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xP(e):t==="fa"?yP(e):bP(e)}),SP=()=>"Searched the literature",kP=()=>"已搜索文献",CP=()=>"منابع علمی جست‌وجو شد",_6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kP():t==="fa"?CP():SP()}),EP=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,NP=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,zP=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,AP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NP(e):t==="fa"?zP(e):EP(e)}),TP=()=>"Searched OpenAlex",jP=()=>"已搜索 OpenAlex",MP=()=>"OpenAlex جست‌وجو شد",RP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jP():t==="fa"?MP():TP()}),DP=e=>`Searched the web for “${e==null?void 0:e.query}”`,LP=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,OP=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,p6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?LP(e):t==="fa"?OP(e):DP(e)}),IP=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,BP=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,$P=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,HP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?BP(e):t==="fa"?$P(e):IP(e)}),PP=()=>"Searching…",FP=()=>"正在搜索…",UP=()=>"در حال جست‌وجو…",qP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FP():t==="fa"?UP():PP()}),GP=()=>"Sent input to an agent",VP=()=>"已向智能体发送输入",WP=()=>"ورودی به عامل فرستاده شد",KP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VP():t==="fa"?WP():GP()}),YP=()=>"Spawned an agent",XP=()=>"已创建智能体",ZP=()=>"یک عامل ساخته شد",QP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XP():t==="fa"?ZP():YP()}),JP=()=>"Sub-agent",eF=()=>"子智能体",tF=()=>"عامل فرعی",nF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eF():t==="fa"?tF():JP()}),rF=()=>"Sub-agent interrupted",sF=()=>"子智能体已中断",iF=()=>"عامل فرعی متوقف شد",aF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sF():t==="fa"?iF():rF()}),oF=()=>"Sub-agent started",lF=()=>"子智能体已启动",cF=()=>"عامل فرعی آغاز شد",uF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lF():t==="fa"?cF():oF()}),dF=()=>"Updated experiment notes",fF=()=>"已更新实验笔记",hF=()=>"یادداشت‌های آزمایش به‌روز شد",_F=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fF():t==="fa"?hF():dF()}),pF=()=>"Waiting on an agent",mF=()=>"正在等待智能体",gF=()=>"در انتظار عامل",vF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mF():t==="fa"?gF():pF()}),bF=e=>`Approval required: ${e==null?void 0:e.label}`,xF=e=>`需要批准:${e==null?void 0:e.label}`,yF=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,m6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xF(e):t==="fa"?yF(e):bF(e)}),wF=()=>"The CLI is retrying the turn.",SF=()=>"CLI 正在重试本轮。",kF=()=>"CLI در حال تلاش دوباره برای این نوبت است.",CF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SF():t==="fa"?kF():wF()}),EF=()=>"Continue is available.",NF=()=>"可以继续。",zF=()=>"ادامه در دسترس است.",AF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NF():t==="fa"?zF():EF()}),TF=()=>"Retry is available.",jF=()=>"可以重试。",MF=()=>"تلاش دوباره در دسترس است.",RF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jF():t==="fa"?MF():TF()}),DF=()=>"Running a tool",LF=()=>"正在运行工具",OF=()=>"در حال اجرای ابزار",IF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LF():t==="fa"?OF():DF()}),BF=()=>"Tool activity completed",$F=()=>"工具活动已完成",HF=()=>"فعالیت ابزار کامل شد",PF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$F():t==="fa"?HF():BF()}),FF=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,UF=e=>`工具活动失败:${e==null?void 0:e.labels}`,qF=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,GF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?UF(e):t==="fa"?qF(e):FF(e)}),VF=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,WF=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,KF=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,YF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?WF(e):t==="fa"?KF(e):VF(e)}),XF=()=>"Turn did not finish.",ZF=()=>"本轮未完成。",QF=()=>"این نوبت کامل نشد.",JF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZF():t==="fa"?QF():XF()}),eU=()=>"Artifacts",tU=()=>"产物",nU=()=>"خروجی‌ها",rU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tU():t==="fa"?nU():eU()}),sU=()=>"Close panel",iU=()=>"关闭面板",aU=()=>"بستن پنل",g6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iU():t==="fa"?aU():sU()}),oU=()=>"Current task",lU=()=>"当前任务",cU=()=>"وظیفهٔ فعلی",v6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lU():t==="fa"?cU():oU()}),uU=()=>"Drag to resize panel",dU=()=>"拖动以调整面板大小",fU=()=>"برای تغییر اندازهٔ پنل بکشید",hU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dU():t==="fa"?fU():uU()}),_U=()=>"Drag toward the center to restore panel",pU=()=>"向中央拖动以恢复面板",mU=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",gU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pU():t==="fa"?mU():_U()}),vU=()=>"Entire project",bU=()=>"整个项目",xU=()=>"کل پروژه",b6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bU():t==="fa"?xU():vU()}),yU=()=>"Expand panel",wU=()=>"展开面板",SU=()=>"گسترش پنل",x6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wU():t==="fa"?SU():yU()}),kU=e=>`Experiment filter: ${e==null?void 0:e.scope}`,CU=e=>`实验筛选:${e==null?void 0:e.scope}`,EU=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,NU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?CU(e):t==="fa"?EU(e):kU(e)}),zU=()=>"Experiment view",AU=()=>"实验视图",TU=()=>"نمای آزمایش",jU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AU():t==="fa"?TU():zU()}),MU=()=>"Experiments",RU=()=>"实验",DU=()=>"آزمایش‌ها",LU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RU():t==="fa"?DU():MU()}),OU=()=>"Files",IU=()=>"文件",BU=()=>"فایل‌ها",$U=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IU():t==="fa"?BU():OU()}),HU=()=>"Filter experiments",PU=()=>"筛选实验",FU=()=>"فیلتر آزمایش‌ها",UU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PU():t==="fa"?FU():HU()}),qU=()=>"Current task filtering is unavailable for unattributed experiments",GU=()=>"存在无法归属的实验时,不能按当前任务筛选",VU=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",WU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GU():t==="fa"?VU():qU()}),KU=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",YU=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",XU=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",ZU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YU():t==="fa"?XU():KU()}),QU=()=>"Open a task to filter to its experiments",JU=()=>"请打开一个任务以筛选其实验",eq=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",tq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JU():t==="fa"?eq():QU()}),nq=()=>"projects",rq=()=>"项目",sq=()=>"پروژه‌ها",iq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rq():t==="fa"?sq():nq()}),aq=()=>"Restore panel",oq=()=>"还原面板",lq=()=>"بازگرداندن اندازهٔ پنل",y6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oq():t==="fa"?lq():aq()}),cq=()=>"Retry",uq=()=>"重试",dq=()=>"تلاش دوباره",Pu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uq():t==="fa"?dq():cq()}),fq=()=>"Select a project to browse its files.",hq=()=>"选择一个项目以浏览其文件。",_q=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",pq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hq():t==="fa"?_q():fq()}),mq=()=>"settings",gq=()=>"设置",vq=()=>"تنظیمات",bq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gq():t==="fa"?vq():mq()}),xq=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,yq=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,wq=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Sq=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yq(e):t==="fa"?wq(e):xq(e)}),kq=()=>"Sub-agent",Cq=()=>"子智能体",Eq=()=>"عامل فرعی",Nq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cq():t==="fa"?Eq():kq()}),zq=()=>"Table",Aq=()=>"表格",Tq=()=>"جدول",jq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aq():t==="fa"?Tq():zq()}),Mq=()=>"Tree",Rq=()=>"树状图",Dq=()=>"درخت",Lq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rq():t==="fa"?Dq():Mq()}),Oq=e=>`Collapse ${e==null?void 0:e.name}`,Iq=e=>`折叠 ${e==null?void 0:e.name}`,Bq=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,$q=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Iq(e):t==="fa"?Bq(e):Oq(e)}),Hq=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Pq=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Fq=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,V9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pq(e):t==="fa"?Fq(e):Hq(e)}),Uq=e=>`Delete folder ${e==null?void 0:e.name}`,qq=e=>`删除文件夹 ${e==null?void 0:e.name}`,Gq=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,Vq=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qq(e):t==="fa"?Gq(e):Uq(e)}),Wq=e=>`Expand ${e==null?void 0:e.name}`,Kq=e=>`展开 ${e==null?void 0:e.name}`,Yq=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,Xq=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Kq(e):t==="fa"?Yq(e):Wq(e)}),Zq=()=>"Binary or unsupported file — no inline preview.",Qq=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",Jq=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",eG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qq():t==="fa"?Jq():Zq()}),tG=()=>"Copy path",nG=()=>"复制路径",rG=()=>"کپی مسیر",sG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nG():t==="fa"?rG():tG()}),iG=()=>"Artifact not found",aG=()=>"找不到产物",oG=()=>"خروجی پیدا نشد",lG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aG():t==="fa"?oG():iG()}),cG=()=>"Open raw",uG=()=>"打开原始文件",dG=()=>"باز کردن فایل خام",fG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uG():t==="fa"?dG():cG()}),hG=()=>"Click an artifact to view it",_G=()=>"点击产物即可查看",pG=()=>"برای مشاهده، یک خروجی را انتخاب کنید",mG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_G():t==="fa"?pG():hG()}),gG=()=>"Copy artifacts directory path",vG=()=>"复制产物目录路径",bG=()=>"کپی مسیر پوشهٔ خروجی‌ها",xG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vG():t==="fa"?bG():gG()}),yG=()=>"Delete artifact",wG=()=>"删除产物",SG=()=>"حذف خروجی",w6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wG():t==="fa"?SG():yG()}),kG=()=>"Delete folder",CG=()=>"删除文件夹",EG=()=>"حذف پوشه",NG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CG():t==="fa"?EG():kG()}),zG=()=>"Failed to load:",AG=()=>"加载失败:",TG=()=>"بارگیری ناموفق بود:",jG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AG():t==="fa"?TG():zG()}),MG=()=>"File truncated — showing the first 512 KB.",RG=()=>"文件已截断——仅显示前 512 KB。",DG=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",LG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RG():t==="fa"?DG():MG()}),OG=()=>"Listing truncated — the folder has more artifacts.",IG=()=>"列表已截断——文件夹中还有更多产物。",BG=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",$G=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IG():t==="fa"?BG():OG()}),HG=()=>"Loading…",PG=()=>"正在加载…",FG=()=>"در حال بارگیری…",UG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PG():t==="fa"?FG():HG()}),qG=()=>"Loading artifacts…",GG=()=>"正在加载产物…",VG=()=>"در حال بارگیری خروجی‌ها…",WG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GG():t==="fa"?VG():qG()}),KG=()=>"Modified",YG=()=>"修改时间",XG=()=>"ویرایش‌شده",ZG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YG():t==="fa"?XG():KG()}),QG=()=>"No artifacts yet",JG=()=>"尚无产物",eV=()=>"هنوز خروجی‌ای وجود ندارد",tV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JG():t==="fa"?eV():QG()}),nV=()=>"Open raw in new tab",rV=()=>"在新标签页中打开原始文件",sV=()=>"باز کردن فایل خام در زبانهٔ جدید",S6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rV():t==="fa"?sV():nV()}),iV=()=>"Storage settings",aV=()=>"存储设置",oV=()=>"تنظیمات ذخیره‌سازی",k6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aV():t==="fa"?oV():iV()}),lV=()=>"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:",cV=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",uV=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",dV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cV():t==="fa"?uV():lV()}),fV=()=>"File too large to preview inline.",hV=()=>"文件太大,无法内嵌预览。",_V=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",pV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hV():t==="fa"?_V():fV()}),mV=()=>"This is the baseline branch, so there is no parent comparison.",gV=()=>"这是基线分支,因此没有父分支可供比较。",vV=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",bV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gV():t==="fa"?vV():mV()}),xV=()=>"Failed to load changes:",yV=()=>"加载更改失败:",wV=()=>"بارگیری تغییرات ناموفق بود:",SV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yV():t==="fa"?wV():xV()}),kV=()=>"Loading changes…",CV=()=>"正在加载更改…",EV=()=>"در حال بارگیری تغییرات…",NV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CV():t==="fa"?EV():kV()}),zV=()=>"No committed changes from the parent branch.",AV=()=>"与父分支相比没有已提交的更改。",TV=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",jV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AV():t==="fa"?TV():zV()}),MV=e=>`agent ${e==null?void 0:e.number}`,RV=e=>`智能体 ${e==null?void 0:e.number}`,DV=e=>`عامل ${e==null?void 0:e.number}`,C6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RV(e):t==="fa"?DV(e):MV(e)}),LV=()=>"agent sessions",OV=()=>"智能体会话",IV=()=>"نشست‌های عامل‌ها",BV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OV():t==="fa"?IV():LV()}),$V=()=>"All sessions",HV=()=>"所有会话",PV=()=>"همهٔ نشست‌ها",FV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HV():t==="fa"?PV():$V()}),UV=e=>`${e==null?void 0:e.count} annotations`,qV=e=>`${e==null?void 0:e.count} 条批注`,GV=e=>`${e==null?void 0:e.count} یادداشت`,VV=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qV(e):t==="fa"?GV(e):UV(e)}),WV=()=>"Archive",KV=()=>"归档",YV=()=>"بایگانی",XV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KV():t==="fa"?YV():WV()}),ZV=()=>"Ask the research agent… (/ for commands and skills)",QV=()=>"询问研究智能体…(输入 / 使用命令和技能)",JV=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها)",eW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QV():t==="fa"?JV():ZV()}),tW=()=>"Asked about selected text",nW=()=>"已询问所选文本",rW=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",sW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nW():t==="fa"?rW():tW()}),iW=()=>"Attachment",aW=()=>"附件",oW=()=>"پیوست",lW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aW():t==="fa"?oW():iW()}),cW=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,uW=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,dW=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,fW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?uW(e):t==="fa"?dW(e):cW(e)}),hW=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",_W=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",pW=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",mW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_W():t==="fa"?pW():hW()}),gW=()=>"Collapse tool activity",vW=()=>"折叠工具活动",bW=()=>"بستن فعالیت ابزارها",xW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vW():t==="fa"?bW():gW()}),yW=()=>"Continue",wW=()=>"继续",SW=()=>"ادامه",kW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wW():t==="fa"?SW():yW()}),CW=e=>`Delete “${e==null?void 0:e.title}”? +`+w.stack}}var Be=Object.prototype.hasOwnProperty,wt=e.unstable_scheduleCallback,At=e.unstable_cancelCallback,vt=e.unstable_shouldYield,Ot=e.unstable_requestPaint,St=e.unstable_now,kt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,st=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Ht=e.log,bt=e.unstable_setDisableYieldValue,nn=null,Wt=null;function pn(i){if(typeof Ht=="function"&&bt(i),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(nn,i)}catch{}}var Lt=Math.clz32?Math.clz32:br,En=Math.log,Ft=Math.LN2;function br(i){return i>>>=0,i===0?32:31-(En(i)/Ft|0)|0}var mn=256,Ye=262144,xt=4194304;function Wn(i){var u=i&42;if(u!==0)return u;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Kn(i,u,p){var w=i.pendingLanes;if(w===0)return 0;var z=0,R=i.suspendedLanes,Y=i.pingedLanes;i=i.warmLanes;var ee=w&134217727;return ee!==0?(w=ee&~R,w!==0?z=Wn(w):(Y&=ee,Y!==0?z=Wn(Y):p||(p=ee&~i,p!==0&&(z=Wn(p))))):(ee=w&~R,ee!==0?z=Wn(ee):Y!==0?z=Wn(Y):p||(p=w&~i,p!==0&&(z=Wn(p)))),z===0?0:u!==0&&u!==z&&(u&R)===0&&(R=z&-z,p=u&-u,R>=p||R===32&&(p&4194048)!==0)?u:z}function Nt(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function rt(i,u){switch(i){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Ie(){var i=xt;return xt<<=1,(xt&62914560)===0&&(xt=4194304),i}function it(i){for(var u=[],p=0;31>p;p++)u.push(i);return u}function Ut(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function en(i,u,p,w,z,R){var Y=i.pendingLanes;i.pendingLanes=p,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=p,i.entangledLanes&=p,i.errorRecoveryDisabledLanes&=p,i.shellSuspendCounter=0;var ee=i.entanglements,fe=i.expirationTimes,we=i.hiddenUpdates;for(p=Y&~p;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Zs=/[\n"\\]/g;function Yn(i){return i.replace(Zs,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Bi(i,u,p,w,z,R,Y,ee){i.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?i.type=Y:i.removeAttribute("type"),u!=null?Y==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+cr(u)):i.value!==""+cr(u)&&(i.value=""+cr(u)):Y!=="submit"&&Y!=="reset"||i.removeAttribute("value"),u!=null?zn(i,Y,cr(u)):p!=null?zn(i,Y,cr(p)):w!=null&&i.removeAttribute("value"),z==null&&R!=null&&(i.defaultChecked=!!R),z!=null&&(i.checked=z&&typeof z!="function"&&typeof z!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?i.name=""+cr(ee):i.removeAttribute("name")}function Hn(i,u,p,w,z,R,Y,ee){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),u!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||u!=null)){$a(i);return}p=p!=null?""+cr(p):"",u=u!=null?""+cr(u):p,ee||u===i.value||(i.value=u),i.defaultValue=u}w=w??z,w=typeof w!="function"&&typeof w!="symbol"&&!!w,i.checked=ee?i.checked:!!w,i.defaultChecked=!!w,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(i.name=Y),$a(i)}function zn(i,u,p){u==="number"&&ls(i.ownerDocument)===i||i.defaultValue===""+p||(i.defaultValue=""+p)}function Qs(i,u,p,w){if(i=i.options,u){u={};for(var z=0;z"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ga=!1;if(Ls)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){Ga=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{Ga=!1}var Xr=null,Do=null,Zr=null;function Pn(){if(Zr)return Zr;var i,u=Do,p=u.length,w,z="value"in Xr?Xr.value:Xr.textContent,R=z.length;for(i=0;i=Ir),la=" ",Ll=!1;function Fh(i,u){switch(i){case"keyup":return Xe.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ka=!1;function Bc(i,u){switch(i){case"compositionend":return xd(u);case"keypress":return u.which!==32?null:(Ll=!0,la);case"textInput":return i=u.data,i===la&&Ll?null:i;default:return null}}function sr(i,u){if(Ka)return i==="compositionend"||!Ct&&Fh(i,u)?(i=Pn(),Zr=Do=Xr=null,Ka=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-i};i=w}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=F4(p)}}function q4(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?q4(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function G4(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=ls(i.document);u instanceof i.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)i=u.contentWindow;else break;u=ls(i.document)}return u}function qm(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}var dD=Ls&&"documentMode"in document&&11>=document.documentMode,Fc=null,Gm=null,Ed=null,Vm=!1;function V4(i,u,p){var w=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Vm||Fc==null||Fc!==ls(w)||(w=Fc,"selectionStart"in w&&qm(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),Ed&&Cd(Ed,w)||(Ed=w,w=T_(Gm,"onSelect"),0>=Y,z-=Y,da=1<<32-Lt(u)+z|p<Kt?(un=dt,dt=null):un=dt.sibling;var vn=Se(ve,dt,ye[Kt],Re);if(vn===null){dt===null&&(dt=un);break}i&&dt&&vn.alternate===null&&u(ve,dt),_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn,dt=un}if(Kt===ye.length)return p(ve,dt),fn&&Xa(ve,Kt),yt;if(dt===null){for(;KtKt?(un=dt,dt=null):un=dt.sibling;var il=Se(ve,dt,vn.value,Re);if(il===null){dt===null&&(dt=un);break}i&&dt&&il.alternate===null&&u(ve,dt),_e=R(il,_e,Kt),gn===null?yt=il:gn.sibling=il,gn=il,dt=un}if(vn.done)return p(ve,dt),fn&&Xa(ve,Kt),yt;if(dt===null){for(;!vn.done;Kt++,vn=ye.next())vn=Oe(ve,vn.value,Re),vn!==null&&(_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn);return fn&&Xa(ve,Kt),yt}for(dt=w(dt);!vn.done;Kt++,vn=ye.next())vn=Ne(dt,ve,Kt,vn.value,Re),vn!==null&&(i&&vn.alternate!==null&&dt.delete(vn.key===null?Kt:vn.key),_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn);return i&&dt.forEach(function(jL){return u(ve,jL)}),fn&&Xa(ve,Kt),yt}function Dn(ve,_e,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===k&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case g:e:{for(var yt=ye.key;_e!==null;){if(_e.key===yt){if(yt=ye.type,yt===k){if(_e.tag===7){p(ve,_e.sibling),Re=z(_e,ye.props.children),Re.return=ve,ve=Re;break e}}else if(_e.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===T&&Gl(yt)===_e.type){p(ve,_e.sibling),Re=z(_e,ye.props),Md(Re,ye),Re.return=ve,ve=Re;break e}p(ve,_e);break}else u(ve,_e);_e=_e.sibling}ye.type===k?(Re=Hl(ye.props.children,ve.mode,Re,ye.key),Re.return=ve,ve=Re):(Re=Wh(ye.type,ye.key,ye.props,null,ve.mode,Re),Md(Re,ye),Re.return=ve,ve=Re)}return Y(ve);case S:e:{for(yt=ye.key;_e!==null;){if(_e.key===yt)if(_e.tag===4&&_e.stateNode.containerInfo===ye.containerInfo&&_e.stateNode.implementation===ye.implementation){p(ve,_e.sibling),Re=z(_e,ye.children||[]),Re.return=ve,ve=Re;break e}else{p(ve,_e);break}else u(ve,_e);_e=_e.sibling}Re=Jm(ye,ve.mode,Re),Re.return=ve,ve=Re}return Y(ve);case T:return ye=Gl(ye),Dn(ve,_e,ye,Re)}if(X(ye))return ut(ve,_e,ye,Re);if(H(ye)){if(yt=H(ye),typeof yt!="function")throw Error(r(150));return ye=yt.call(ye),zt(ve,_e,ye,Re)}if(typeof ye.then=="function")return Dn(ve,_e,e_(ye),Re);if(ye.$$typeof===y)return Dn(ve,_e,Xh(ve,ye),Re);t_(ve,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint"?(ye=""+ye,_e!==null&&_e.tag===6?(p(ve,_e.sibling),Re=z(_e,ye),Re.return=ve,ve=Re):(p(ve,_e),Re=Qm(ye,ve.mode,Re),Re.return=ve,ve=Re),Y(ve)):p(ve,_e)}return function(ve,_e,ye,Re){try{jd=0;var yt=Dn(ve,_e,ye,Re);return Jc=null,yt}catch(dt){if(dt===Qc||dt===Qh)throw dt;var gn=ri(29,dt,null,ve.mode);return gn.lanes=Re,gn.return=ve,gn}finally{}}}var Wl=pw(!0),mw=pw(!1),Fo=!1;function dg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fg(i,u){i=i.updateQueue,u.updateQueue===i&&(u.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Uo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function qo(i,u,p){var w=i.updateQueue;if(w===null)return null;if(w=w.shared,(bn&2)!==0){var z=w.pending;return z===null?u.next=u:(u.next=z.next,z.next=u),w.pending=u,u=Vh(i),J4(i,null,p),u}return Gh(i,w,u,p),Vh(i)}function Rd(i,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Ln(i,p)}}function hg(i,u){var p=i.updateQueue,w=i.alternate;if(w!==null&&(w=w.updateQueue,p===w)){var z=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var Y={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?z=R=Y:R=R.next=Y,p=p.next}while(p!==null);R===null?z=R=u:R=R.next=u}else z=R=u;p={baseState:w.baseState,firstBaseUpdate:z,lastBaseUpdate:R,shared:w.shared,callbacks:w.callbacks},i.updateQueue=p;return}i=p.lastBaseUpdate,i===null?p.firstBaseUpdate=u:i.next=u,p.lastBaseUpdate=u}var _g=!1;function Dd(){if(_g){var i=Zc;if(i!==null)throw i}}function Ld(i,u,p,w){_g=!1;var z=i.updateQueue;Fo=!1;var R=z.firstBaseUpdate,Y=z.lastBaseUpdate,ee=z.shared.pending;if(ee!==null){z.shared.pending=null;var fe=ee,we=fe.next;fe.next=null,Y===null?R=we:Y.next=we,Y=fe;var Me=i.alternate;Me!==null&&(Me=Me.updateQueue,ee=Me.lastBaseUpdate,ee!==Y&&(ee===null?Me.firstBaseUpdate=we:ee.next=we,Me.lastBaseUpdate=fe))}if(R!==null){var Oe=z.baseState;Y=0,Me=we=fe=null,ee=R;do{var Se=ee.lane&-536870913,Ne=Se!==ee.lane;if(Ne?(cn&Se)===Se:(w&Se)===Se){Se!==0&&Se===Xc&&(_g=!0),Me!==null&&(Me=Me.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var ut=i,zt=ee;Se=u;var Dn=p;switch(zt.tag){case 1:if(ut=zt.payload,typeof ut=="function"){Oe=ut.call(Dn,Oe,Se);break e}Oe=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=zt.payload,Se=typeof ut=="function"?ut.call(Dn,Oe,Se):ut,Se==null)break e;Oe=f({},Oe,Se);break e;case 2:Fo=!0}}Se=ee.callback,Se!==null&&(i.flags|=64,Ne&&(i.flags|=8192),Ne=z.callbacks,Ne===null?z.callbacks=[Se]:Ne.push(Se))}else Ne={lane:Se,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Me===null?(we=Me=Ne,fe=Oe):Me=Me.next=Ne,Y|=Se;if(ee=ee.next,ee===null){if(ee=z.shared.pending,ee===null)break;Ne=ee,ee=Ne.next,Ne.next=null,z.lastBaseUpdate=Ne,z.shared.pending=null}}while(!0);Me===null&&(fe=Oe),z.baseState=fe,z.firstBaseUpdate=we,z.lastBaseUpdate=Me,R===null&&(z.shared.lanes=0),Yo|=Y,i.lanes=Y,i.memoizedState=Oe}}function gw(i,u){if(typeof i!="function")throw Error(r(191,i));i.call(u)}function vw(i,u){var p=i.callbacks;if(p!==null)for(i.callbacks=null,i=0;iR?R:8;var Y=W.T,ee={};W.T=ee,Rg(i,!1,u,p);try{var fe=z(),we=W.S;if(we!==null&&we(ee,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Me=xD(fe,w);Bd(i,u,Me,li(i))}else Bd(i,u,w,li(i))}catch(Oe){Bd(i,u,{then:function(){},status:"rejected",reason:Oe},li())}finally{Z.p=R,Y!==null&&ee.types!==null&&(Y.types=ee.types),W.T=Y}}function ED(){}function jg(i,u,p,w){if(i.tag!==5)throw Error(r(476));var z=Xw(i).queue;Yw(i,z,u,J,p===null?ED:function(){return Zw(i),p(w)})}function Xw(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:J},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:p},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function Zw(i){var u=Xw(i);u.next===null&&(u=i.alternate.memoizedState),Bd(i,u.next.queue,{},li())}function Mg(){return es(tf)}function Qw(){return mr().memoizedState}function Jw(){return mr().memoizedState}function ND(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var p=li();i=Uo(p);var w=qo(u,i,p);w!==null&&(Ps(w,u,p),Rd(w,u,p)),u={cache:og()},i.payload=u;return}u=u.return}}function zD(i,u,p){var w=li();p={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},d_(i)?t5(u,p):(p=Xm(i,u,p,w),p!==null&&(Ps(p,i,w),n5(p,u,w)))}function e5(i,u,p){var w=li();Bd(i,u,p,w)}function Bd(i,u,p,w){var z={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(d_(i))t5(u,z);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var Y=u.lastRenderedState,ee=R(Y,p);if(z.hasEagerState=!0,z.eagerState=ee,ni(ee,Y))return Gh(i,u,z,0),On===null&&qh(),!1}catch{}finally{}if(p=Xm(i,u,z,w),p!==null)return Ps(p,i,w),n5(p,u,w),!0}return!1}function Rg(i,u,p,w){if(w={lane:2,revertLane:d1(),gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},d_(i)){if(u)throw Error(r(479))}else u=Xm(i,p,w,2),u!==null&&Ps(u,i,2)}function d_(i){var u=i.alternate;return i===qt||u!==null&&u===qt}function t5(i,u){tu=s_=!0;var p=i.pending;p===null?u.next=u:(u.next=p.next,p.next=u),i.pending=u}function n5(i,u,p){if((p&4194048)!==0){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Ln(i,p)}}var $d={readContext:es,use:o_,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useLayoutEffect:dr,useInsertionEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useSyncExternalStore:dr,useId:dr,useHostTransitionStatus:dr,useFormState:dr,useActionState:dr,useOptimistic:dr,useMemoCache:dr,useCacheRefresh:dr};$d.useEffectEvent=dr;var r5={readContext:es,use:o_,useCallback:function(i,u){return Ss().memoizedState=[i,u===void 0?null:u],i},useContext:es,useEffect:Hw,useImperativeHandle:function(i,u,p){p=p!=null?p.concat([i]):null,c_(4194308,4,qw.bind(null,u,i),p)},useLayoutEffect:function(i,u){return c_(4194308,4,i,u)},useInsertionEffect:function(i,u){c_(4,2,i,u)},useMemo:function(i,u){var p=Ss();u=u===void 0?null:u;var w=i();if(Kl){pn(!0);try{i()}finally{pn(!1)}}return p.memoizedState=[w,u],w},useReducer:function(i,u,p){var w=Ss();if(p!==void 0){var z=p(u);if(Kl){pn(!0);try{p(u)}finally{pn(!1)}}}else z=u;return w.memoizedState=w.baseState=z,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:z},w.queue=i,i=i.dispatch=zD.bind(null,qt,i),[w.memoizedState,i]},useRef:function(i){var u=Ss();return i={current:i},u.memoizedState=i},useState:function(i){i=Eg(i);var u=i.queue,p=e5.bind(null,qt,u);return u.dispatch=p,[i.memoizedState,p]},useDebugValue:Ag,useDeferredValue:function(i,u){var p=Ss();return Tg(p,i,u)},useTransition:function(){var i=Eg(!1);return i=Yw.bind(null,qt,i.queue,!0,!1),Ss().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,p){var w=qt,z=Ss();if(fn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),On===null)throw Error(r(349));(cn&127)!==0||kw(w,u,p)}z.memoizedState=p;var R={value:p,getSnapshot:u};return z.queue=R,Hw(Ew.bind(null,w,R,i),[i]),w.flags|=2048,ru(9,{destroy:void 0},Cw.bind(null,w,R,p,u),null),p},useId:function(){var i=Ss(),u=On.identifierPrefix;if(fn){var p=fa,w=da;p=(w&~(1<<32-Lt(w)-1)).toString(32)+p,u="_"+u+"R_"+p,p=i_++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof w.is=="string"?Y.createElement("select",{is:w.is}):Y.createElement("select"),w.multiple?R.multiple=!0:w.size&&(R.size=w.size);break;default:R=typeof w.is=="string"?Y.createElement(z,{is:w.is}):Y.createElement(z)}}R[rn]=u,R[Fn]=w;e:for(Y=u.child;Y!==null;){if(Y.tag===5||Y.tag===6)R.appendChild(Y.stateNode);else if(Y.tag!==4&&Y.tag!==27&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===u)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===u)break e;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}u.stateNode=R;e:switch(ns(R,z,w),z){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}w&&no(u)}}return Gn(u),Wg(u,u.type,i===null?null:i.memoizedProps,u.pendingProps,p),null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==w&&no(u);else{if(typeof w!="string"&&u.stateNode===null)throw Error(r(166));if(i=he.current,Kc(u)){if(i=u.stateNode,p=u.memoizedProps,w=null,z=Jr,z!==null)switch(z.tag){case 27:case 5:w=z.memoizedProps}i[rn]=u,i=!!(i.nodeValue===p||w!==null&&w.suppressHydrationWarning===!0||w3(i.nodeValue,p)),i||Ho(u,!0)}else i=j_(i).createTextNode(w),i[rn]=u,u.stateNode=i}return Gn(u),null;case 31:if(p=u.memoizedState,i===null||i.memoizedState!==null){if(w=Kc(u),p!==null){if(i===null){if(!w)throw Error(r(318));if(i=u.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[rn]=u}else Pl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Gn(u),i=!1}else p=rg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),i=!0;if(!i)return u.flags&256?(ii(u),u):(ii(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Gn(u),null;case 13:if(w=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(z=Kc(u),w!==null&&w.dehydrated!==null){if(i===null){if(!z)throw Error(r(318));if(z=u.memoizedState,z=z!==null?z.dehydrated:null,!z)throw Error(r(317));z[rn]=u}else Pl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Gn(u),z=!1}else z=rg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=z),z=!0;if(!z)return u.flags&256?(ii(u),u):(ii(u),null)}return ii(u),(u.flags&128)!==0?(u.lanes=p,u):(p=w!==null,i=i!==null&&i.memoizedState!==null,p&&(w=u.child,z=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(z=w.alternate.memoizedState.cachePool.pool),R=null,w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(R=w.memoizedState.cachePool.pool),R!==z&&(w.flags|=2048)),p!==i&&p&&(u.child.flags|=8192),m_(u,u.updateQueue),Gn(u),null);case 4:return te(),i===null&&p1(u.stateNode.containerInfo),Gn(u),null;case 10:return Qa(u.type),Gn(u),null;case 19:if(K(pr),w=u.memoizedState,w===null)return Gn(u),null;if(z=(u.flags&128)!==0,R=w.rendering,R===null)if(z)Pd(w,!1);else{if(fr!==0||i!==null&&(i.flags&128)!==0)for(i=u.child;i!==null;){if(R=r_(i),R!==null){for(u.flags|=128,Pd(w,!1),i=R.updateQueue,u.updateQueue=i,m_(u,i),u.subtreeFlags=0,i=p,p=u.child;p!==null;)ew(p,i),p=p.sibling;return G(pr,pr.current&1|2),fn&&Xa(u,w.treeForkCount),u.child}i=i.sibling}w.tail!==null&&St()>y_&&(u.flags|=128,z=!0,Pd(w,!1),u.lanes=4194304)}else{if(!z)if(i=r_(R),i!==null){if(u.flags|=128,z=!0,i=i.updateQueue,u.updateQueue=i,m_(u,i),Pd(w,!0),w.tail===null&&w.tailMode==="hidden"&&!R.alternate&&!fn)return Gn(u),null}else 2*St()-w.renderingStartTime>y_&&p!==536870912&&(u.flags|=128,z=!0,Pd(w,!1),u.lanes=4194304);w.isBackwards?(R.sibling=u.child,u.child=R):(i=w.last,i!==null?i.sibling=R:u.child=R,w.last=R)}return w.tail!==null?(i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=St(),i.sibling=null,p=pr.current,G(pr,z?p&1|2:p&1),fn&&Xa(u,w.treeForkCount),i):(Gn(u),null);case 22:case 23:return ii(u),mg(),w=u.memoizedState!==null,i!==null?i.memoizedState!==null!==w&&(u.flags|=8192):w&&(u.flags|=8192),w?(p&536870912)!==0&&(u.flags&128)===0&&(Gn(u),u.subtreeFlags&6&&(u.flags|=8192)):Gn(u),p=u.updateQueue,p!==null&&m_(u,p.retryQueue),p=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),w=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(w=u.memoizedState.cachePool.pool),w!==p&&(u.flags|=2048),i!==null&&K(ql),null;case 24:return p=null,i!==null&&(p=i.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Qa(Cr),Gn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function RD(i,u){switch(tg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return Qa(Cr),te(),i=u.flags,(i&65536)!==0&&(i&128)===0?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return ge(u),null;case 31:if(u.memoizedState!==null){if(ii(u),u.alternate===null)throw Error(r(340));Pl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 13:if(ii(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Pl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return K(pr),null;case 4:return te(),null;case 10:return Qa(u.type),null;case 22:case 23:return ii(u),mg(),i!==null&&K(ql),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return Qa(Cr),null;case 25:return null;default:return null}}function N5(i,u){switch(tg(u),u.tag){case 3:Qa(Cr),te();break;case 26:case 27:case 5:ge(u);break;case 4:te();break;case 31:u.memoizedState!==null&&ii(u);break;case 13:ii(u);break;case 19:K(pr);break;case 10:Qa(u.type);break;case 22:case 23:ii(u),mg(),i!==null&&K(ql);break;case 24:Qa(Cr)}}function Fd(i,u){try{var p=u.updateQueue,w=p!==null?p.lastEffect:null;if(w!==null){var z=w.next;p=z;do{if((p.tag&i)===i){w=void 0;var R=p.create,Y=p.inst;w=R(),Y.destroy=w}p=p.next}while(p!==z)}}catch(ee){jn(u,u.return,ee)}}function Wo(i,u,p){try{var w=u.updateQueue,z=w!==null?w.lastEffect:null;if(z!==null){var R=z.next;w=R;do{if((w.tag&i)===i){var Y=w.inst,ee=Y.destroy;if(ee!==void 0){Y.destroy=void 0,z=u;var fe=p,we=ee;try{we()}catch(Me){jn(z,fe,Me)}}}w=w.next}while(w!==R)}}catch(Me){jn(u,u.return,Me)}}function z5(i){var u=i.updateQueue;if(u!==null){var p=i.stateNode;try{vw(u,p)}catch(w){jn(i,i.return,w)}}}function A5(i,u,p){p.props=Yl(i.type,i.memoizedProps),p.state=i.memoizedState;try{p.componentWillUnmount()}catch(w){jn(i,u,w)}}function Ud(i,u){try{var p=i.ref;if(p!==null){switch(i.tag){case 26:case 27:case 5:var w=i.stateNode;break;case 30:w=i.stateNode;break;default:w=i.stateNode}typeof p=="function"?i.refCleanup=p(w):p.current=w}}catch(z){jn(i,u,z)}}function ha(i,u){var p=i.ref,w=i.refCleanup;if(p!==null)if(typeof w=="function")try{w()}catch(z){jn(i,u,z)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(z){jn(i,u,z)}else p.current=null}function T5(i){var u=i.type,p=i.memoizedProps,w=i.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&w.focus();break e;case"img":p.src?w.src=p.src:p.srcSet&&(w.srcset=p.srcSet)}}catch(z){jn(i,i.return,z)}}function Kg(i,u,p){try{var w=i.stateNode;tL(w,i.type,p,u),w[Fn]=u}catch(z){jn(i,i.return,z)}}function j5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&el(i.type)||i.tag===4}function Yg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||j5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&el(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Xg(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(i,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(i),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=xs));else if(w!==4&&(w===27&&el(i.type)&&(p=i.stateNode,u=null),i=i.child,i!==null))for(Xg(i,u,p),i=i.sibling;i!==null;)Xg(i,u,p),i=i.sibling}function g_(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?p.insertBefore(i,u):p.appendChild(i);else if(w!==4&&(w===27&&el(i.type)&&(p=i.stateNode),i=i.child,i!==null))for(g_(i,u,p),i=i.sibling;i!==null;)g_(i,u,p),i=i.sibling}function M5(i){var u=i.stateNode,p=i.memoizedProps;try{for(var w=i.type,z=u.attributes;z.length;)u.removeAttributeNode(z[0]);ns(u,w,p),u[rn]=i,u[Fn]=p}catch(R){jn(i,i.return,R)}}var ro=!1,zr=!1,Zg=!1,R5=typeof WeakSet=="function"?WeakSet:Set,Wr=null;function DD(i,u){if(i=i.containerInfo,v1=B_,i=G4(i),qm(i)){if("selectionStart"in i)var p={start:i.selectionStart,end:i.selectionEnd};else e:{p=(p=i.ownerDocument)&&p.defaultView||window;var w=p.getSelection&&p.getSelection();if(w&&w.rangeCount!==0){p=w.anchorNode;var z=w.anchorOffset,R=w.focusNode;w=w.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var Y=0,ee=-1,fe=-1,we=0,Me=0,Oe=i,Se=null;t:for(;;){for(var Ne;Oe!==p||z!==0&&Oe.nodeType!==3||(ee=Y+z),Oe!==R||w!==0&&Oe.nodeType!==3||(fe=Y+w),Oe.nodeType===3&&(Y+=Oe.nodeValue.length),(Ne=Oe.firstChild)!==null;)Se=Oe,Oe=Ne;for(;;){if(Oe===i)break t;if(Se===p&&++we===z&&(ee=Y),Se===R&&++Me===w&&(fe=Y),(Ne=Oe.nextSibling)!==null)break;Oe=Se,Se=Oe.parentNode}Oe=Ne}p=ee===-1||fe===-1?null:{start:ee,end:fe}}else p=null}p=p||{start:0,end:0}}else p=null;for(b1={focusedElem:i,selectionRange:p},B_=!1,Wr=u;Wr!==null;)if(u=Wr,i=u.child,(u.subtreeFlags&1028)!==0&&i!==null)i.return=u,Wr=i;else for(;Wr!==null;){switch(u=Wr,R=u.alternate,i=u.flags,u.tag){case 0:if((i&4)!==0&&(i=u.updateQueue,i=i!==null?i.events:null,i!==null))for(p=0;p title"))),ns(R,w,p),R[rn]=i,Un(R),w=R;break e;case"link":var Y=$3("link","href",z).get(w+(p.href||""));if(Y){for(var ee=0;eeDn&&(Y=Dn,Dn=zt,zt=Y);var ve=U4(ee,zt),_e=U4(ee,Dn);if(ve&&_e&&(Ne.rangeCount!==1||Ne.anchorNode!==ve.node||Ne.anchorOffset!==ve.offset||Ne.focusNode!==_e.node||Ne.focusOffset!==_e.offset)){var ye=Oe.createRange();ye.setStart(ve.node,ve.offset),Ne.removeAllRanges(),zt>Dn?(Ne.addRange(ye),Ne.extend(_e.node,_e.offset)):(ye.setEnd(_e.node,_e.offset),Ne.addRange(ye))}}}}for(Oe=[],Ne=ee;Ne=Ne.parentNode;)Ne.nodeType===1&&Oe.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eep?32:p,W.T=null,p=s1,s1=null;var R=Zo,Y=lo;if(Hr=0,lu=Zo=null,lo=0,(bn&6)!==0)throw Error(r(331));var ee=bn;if(bn|=4,q5(R.current),P5(R,R.current,Y,p),bn=ee,Yd(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(nn,R)}catch{}return!0}finally{Z.p=z,W.T=w,l3(i,u)}}function u3(i,u,p){u=ki(p,u),u=Ig(i.stateNode,u,2),i=qo(i,u,2),i!==null&&(Ut(i,2),_a(i))}function jn(i,u,p){if(i.tag===3)u3(i,i,p);else for(;u!==null;){if(u.tag===3){u3(u,i,p);break}else if(u.tag===1){var w=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Xo===null||!Xo.has(w))){i=ki(p,i),p=d5(2),w=qo(u,p,2),w!==null&&(f5(p,w,u,i),Ut(w,2),_a(w));break}}u=u.return}}function l1(i,u,p){var w=i.pingCache;if(w===null){w=i.pingCache=new ID;var z=new Set;w.set(u,z)}else z=w.get(u),z===void 0&&(z=new Set,w.set(u,z));z.has(p)||(e1=!0,z.add(p),i=FD.bind(null,i,u,p),u.then(i,i))}function FD(i,u,p){var w=i.pingCache;w!==null&&w.delete(u),i.pingedLanes|=i.suspendedLanes&p,i.warmLanes&=~p,On===i&&(cn&p)===p&&(fr===4||fr===3&&(cn&62914560)===cn&&300>St()-x_?(bn&2)===0&&cu(i,0):t1|=p,ou===cn&&(ou=0)),_a(i)}function d3(i,u){u===0&&(u=Ie()),i=$l(i,u),i!==null&&(Ut(i,u),_a(i))}function UD(i){var u=i.memoizedState,p=0;u!==null&&(p=u.retryLane),d3(i,p)}function qD(i,u){var p=0;switch(i.tag){case 31:case 13:var w=i.stateNode,z=i.memoizedState;z!==null&&(p=z.retryLane);break;case 19:w=i.stateNode;break;case 22:w=i.stateNode._retryCache;break;default:throw Error(r(314))}w!==null&&w.delete(u),d3(i,p)}function GD(i,u){return wt(i,u)}var N_=null,du=null,c1=!1,z_=!1,u1=!1,Jo=0;function _a(i){i!==du&&i.next===null&&(du===null?N_=du=i:du=du.next=i),z_=!0,c1||(c1=!0,WD())}function Yd(i,u){if(!u1&&z_){u1=!0;do for(var p=!1,w=N_;w!==null;){if(i!==0){var z=w.pendingLanes;if(z===0)var R=0;else{var Y=w.suspendedLanes,ee=w.pingedLanes;R=(1<<31-Lt(42|i)+1)-1,R&=z&~(Y&~ee),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,p3(w,R))}else R=cn,R=Kn(w,w===On?R:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(R&3)===0||Nt(w,R)||(p=!0,p3(w,R));w=w.next}while(p);u1=!1}}function VD(){f3()}function f3(){z_=c1=!1;var i=0;Jo!==0&&rL()&&(i=Jo);for(var u=St(),p=null,w=N_;w!==null;){var z=w.next,R=h3(w,u);R===0?(w.next=null,p===null?N_=z:p.next=z,z===null&&(du=p)):(p=w,(i!==0||(R&3)!==0)&&(z_=!0)),w=z}Hr!==0&&Hr!==5||Yd(i),Jo!==0&&(Jo=0)}function h3(i,u){for(var p=i.suspendedLanes,w=i.pingedLanes,z=i.expirationTimes,R=i.pendingLanes&-62914561;0ee)break;var Me=fe.transferSize,Oe=fe.initiatorType;Me&&S3(Oe)&&(fe=fe.responseEnd,Y+=Me*(fe"u"?null:document;function L3(i,u,p){var w=fu;if(w&&typeof u=="string"&&u){var z=Yn(u);z='link[rel="'+i+'"][href="'+z+'"]',typeof p=="string"&&(z+='[crossorigin="'+p+'"]'),D3.has(z)||(D3.add(z),i={rel:i,crossOrigin:p,href:u},w.querySelector(z)===null&&(u=w.createElement("link"),ns(u,"link",i),Un(u),w.head.appendChild(u)))}}function fL(i){co.D(i),L3("dns-prefetch",i,null)}function hL(i,u){co.C(i,u),L3("preconnect",i,u)}function _L(i,u,p){co.L(i,u,p);var w=fu;if(w&&i&&u){var z='link[rel="preload"][as="'+Yn(u)+'"]';u==="image"&&p&&p.imageSrcSet?(z+='[imagesrcset="'+Yn(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(z+='[imagesizes="'+Yn(p.imageSizes)+'"]')):z+='[href="'+Yn(i)+'"]';var R=z;switch(u){case"style":R=hu(i);break;case"script":R=_u(i)}Ti.has(R)||(i=f({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:i,as:u},p),Ti.set(R,i),w.querySelector(z)!==null||u==="style"&&w.querySelector(Jd(R))||u==="script"&&w.querySelector(ef(R))||(u=w.createElement("link"),ns(u,"link",i),Un(u),w.head.appendChild(u)))}}function pL(i,u){co.m(i,u);var p=fu;if(p&&i){var w=u&&typeof u.as=="string"?u.as:"script",z='link[rel="modulepreload"][as="'+Yn(w)+'"][href="'+Yn(i)+'"]',R=z;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=_u(i)}if(!Ti.has(R)&&(i=f({rel:"modulepreload",href:i},u),Ti.set(R,i),p.querySelector(z)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(ef(R)))return}w=p.createElement("link"),ns(w,"link",i),Un(w),p.head.appendChild(w)}}}function mL(i,u,p){co.S(i,u,p);var w=fu;if(w&&i){var z=Gr(w).hoistableStyles,R=hu(i);u=u||"default";var Y=z.get(R);if(!Y){var ee={loading:0,preload:null};if(Y=w.querySelector(Jd(R)))ee.loading=5;else{i=f({rel:"stylesheet",href:i,"data-precedence":u},p),(p=Ti.get(R))&&E1(i,p);var fe=Y=w.createElement("link");Un(fe),ns(fe,"link",i),fe._p=new Promise(function(we,Me){fe.onload=we,fe.onerror=Me}),fe.addEventListener("load",function(){ee.loading|=1}),fe.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,R_(Y,u,w)}Y={type:"stylesheet",instance:Y,count:1,state:ee},z.set(R,Y)}}}function gL(i,u){co.X(i,u);var p=fu;if(p&&i){var w=Gr(p).hoistableScripts,z=_u(i),R=w.get(z);R||(R=p.querySelector(ef(z)),R||(i=f({src:i,async:!0},u),(u=Ti.get(z))&&N1(i,u),R=p.createElement("script"),Un(R),ns(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(z,R))}}function vL(i,u){co.M(i,u);var p=fu;if(p&&i){var w=Gr(p).hoistableScripts,z=_u(i),R=w.get(z);R||(R=p.querySelector(ef(z)),R||(i=f({src:i,async:!0,type:"module"},u),(u=Ti.get(z))&&N1(i,u),R=p.createElement("script"),Un(R),ns(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(z,R))}}function O3(i,u,p,w){var z=(z=he.current)?M_(z):null;if(!z)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=hu(p.href),p=Gr(z).hoistableStyles,w=p.get(u),w||(w={type:"style",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){i=hu(p.href);var R=Gr(z).hoistableStyles,Y=R.get(i);if(Y||(z=z.ownerDocument||z,Y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,Y),(R=z.querySelector(Jd(i)))&&!R._p&&(Y.instance=R,Y.state.loading=5),Ti.has(i)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Ti.set(i,p),R||bL(z,i,p,Y.state))),u&&w===null)throw Error(r(528,""));return Y}if(u&&w!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=_u(p),p=Gr(z).hoistableScripts,w=p.get(u),w||(w={type:"script",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function hu(i){return'href="'+Yn(i)+'"'}function Jd(i){return'link[rel="stylesheet"]['+i+"]"}function I3(i){return f({},i,{"data-precedence":i.precedence,precedence:null})}function bL(i,u,p,w){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?w.loading=1:(u=i.createElement("link"),w.preload=u,u.addEventListener("load",function(){return w.loading|=1}),u.addEventListener("error",function(){return w.loading|=2}),ns(u,"link",p),Un(u),i.head.appendChild(u))}function _u(i){return'[src="'+Yn(i)+'"]'}function ef(i){return"script[async]"+i}function B3(i,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var w=i.querySelector('style[data-href~="'+Yn(p.href)+'"]');if(w)return u.instance=w,Un(w),w;var z=f({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return w=(i.ownerDocument||i).createElement("style"),Un(w),ns(w,"style",z),R_(w,p.precedence,i),u.instance=w;case"stylesheet":z=hu(p.href);var R=i.querySelector(Jd(z));if(R)return u.state.loading|=4,u.instance=R,Un(R),R;w=I3(p),(z=Ti.get(z))&&E1(w,z),R=(i.ownerDocument||i).createElement("link"),Un(R);var Y=R;return Y._p=new Promise(function(ee,fe){Y.onload=ee,Y.onerror=fe}),ns(R,"link",w),u.state.loading|=4,R_(R,p.precedence,i),u.instance=R;case"script":return R=_u(p.src),(z=i.querySelector(ef(R)))?(u.instance=z,Un(z),z):(w=p,(z=Ti.get(R))&&(w=f({},p),N1(w,z)),i=i.ownerDocument||i,z=i.createElement("script"),Un(z),ns(z,"link",w),i.head.appendChild(z),u.instance=z);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(w=u.instance,u.state.loading|=4,R_(w,p.precedence,i));return u.instance}function R_(i,u,p){for(var w=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),z=w.length?w[w.length-1]:null,R=z,Y=0;Y title"):null)}function xL(i,u,p){if(p===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function P3(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function yL(i,u,p,w){if(p.type==="stylesheet"&&(typeof w.media!="string"||matchMedia(w.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var z=hu(w.href),R=u.querySelector(Jd(z));if(R){u=R._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(i.count++,i=L_.bind(i),u.then(i,i)),p.state.loading|=4,p.instance=R,Un(R);return}R=u.ownerDocument||u,w=I3(w),(z=Ti.get(z))&&E1(w,z),R=R.createElement("link"),Un(R);var Y=R;Y._p=new Promise(function(ee,fe){Y.onload=ee,Y.onerror=fe}),ns(R,"link",w),p.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(i.count++,p=L_.bind(i),u.addEventListener("load",p),u.addEventListener("error",p))}}var z1=0;function wL(i,u){return i.stylesheets&&i.count===0&&I_(i,i.stylesheets),0z1?50:800)+u);return i.unsuspend=p,function(){i.unsuspend=null,clearTimeout(w),clearTimeout(z)}}:null}function L_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)I_(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var O_=null;function I_(i,u){i.stylesheets=null,i.unsuspend!==null&&(i.count++,O_=new Map,u.forEach(SL,i),O_=null,L_.call(i))}function SL(i,u){if(!(u.state.loading&4)){var p=O_.get(i);if(p)var w=p.get(null);else{p=new Map,O_.set(i,p);for(var z=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),I1.exports=BL(),I1.exports}var HL=$L();const PL={},FL="en",ox=["en","zh-CN","fa"],G9="orx:locale",lx=["localStorage","preferredLanguage","baseLocale"],_6=[],Of=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let p6=!1,N=()=>{var t;let e=lx;!Of&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=W9(window.location.href));const n=UL(e);if(n)return p6||(p6=!0,V9(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function UL(e,n){let t;for(const r of e){if(r==="baseLocale")t=FL;else if(r==="preferredLanguage"&&!Of)t=YL();else if(r==="localStorage"&&!Of)t=localStorage.getItem(G9)??void 0;else if(K9(r)&&W0.has(r)){const a=W0.get(r);if(a){const o=a.getLocale();if(o instanceof Promise)continue;if(o!==void 0)return WL(o)}}const s=If(t);if(s)return s}}const qL=e=>{window.location.reload()};let V9=(e,n)=>{var l;const t={reload:!0,...n};let r;try{r=N()}catch{}const s=[];let a=lx;!Of&&typeof window<"u"&&((l=window.location)!=null&&l.href)&&(a=W9(window.location.href));for(const c of a)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(G9,e);else if(K9(c)&&W0.has(c)){const d=W0.get(c);if(d){let _=d.setLocale(e);_ instanceof Promise&&(_=_.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(_))}}}const o=()=>{!Of&&t.reload&&window.location&&e!==r&&qL()};if(s.length)return Promise.all(s).then(()=>{o()});o()},GL=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function If(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of ox)if(t.toLowerCase()===n)return t}function VL(e){return!!e&&ox.some(n=>n===e)}function WL(e){const n=If(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${ox.join(", ")}`)}function KL(e,n){return e.exec(n.href)}function YL(){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=If(t.fullTag);if(r)return r;const s=If(t.baseTag);if(s)return s}}function XL(e){return ZL(e)}function ZL(e){const n=typeof e=="string"?new URL(e,GL()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&If(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let m6,g6;function QL(e){if(_6.length===0)return;const n=typeof e=="string"?e:e.href;if(m6===n)return g6;const t=new URL(n,"http://example.com"),r=XL(t),s=r.href===t.href?[t]:[t,r];let a;for(const o of s){for(const l of _6){const c=new PL(l.match,o.href);if(KL(c,o)){a=l;break}}if(a)break}return m6=n,g6=a,a}function W9(e){const n=QL(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:lx}const W0=new Map;function K9(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const JL=e=>`Actions for ${e==null?void 0:e.name}`,eO=e=>`${e==null?void 0:e.name} 的操作`,tO=e=>`عملیات ${e==null?void 0:e.name}`,nO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eO(e):t==="fa"?tO(e):JL(e)}),rO=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,sO=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,iO=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,aO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?sO(e):t==="fa"?iO(e):rO(e)}),oO=e=>`Branch: ${e==null?void 0:e.branch}`,lO=e=>`分支:${e==null?void 0:e.branch}`,cO=e=>`شاخه: ${e==null?void 0:e.branch}`,uO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?lO(e):t==="fa"?cO(e):oO(e)}),dO=e=>`Browse code on ${e==null?void 0:e.branch}`,fO=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,hO=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,Y9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fO(e):t==="fa"?hO(e):dO(e)}),_O=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,pO=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,mO=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,gO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pO(e):t==="fa"?mO(e):_O(e)}),vO=e=>`Collapse ${e==null?void 0:e.name}`,bO=e=>`折叠 ${e==null?void 0:e.name}`,xO=e=>`بستن ${e==null?void 0:e.name}`,yO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bO(e):t==="fa"?xO(e):vO(e)}),wO=e=>`Committed changes versus ${e==null?void 0:e.parent}`,SO=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,kO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,CO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SO(e):t==="fa"?kO(e):wO(e)}),EO=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,NO=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,zO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,AO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NO(e):t==="fa"?zO(e):EO(e)}),TO=e=>`Copy ${e==null?void 0:e.value}`,jO=e=>`复制 ${e==null?void 0:e.value}`,MO=e=>`کپی ${e==null?void 0:e.value}`,RO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jO(e):t==="fa"?MO(e):TO(e)}),DO=e=>`Delete ${e==null?void 0:e.name}`,LO=e=>`删除 ${e==null?void 0:e.name}`,OO=e=>`حذف ${e==null?void 0:e.name}`,bb=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?LO(e):t==="fa"?OO(e):DO(e)}),IO=e=>`Download ${e==null?void 0:e.name}`,BO=e=>`下载 ${e==null?void 0:e.name}`,$O=e=>`بارگیری ${e==null?void 0:e.name}`,v6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?BO(e):t==="fa"?$O(e):IO(e)}),HO=e=>`Expand ${e==null?void 0:e.name}`,PO=e=>`展开 ${e==null?void 0:e.name}`,FO=e=>`باز کردن ${e==null?void 0:e.name}`,UO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PO(e):t==="fa"?FO(e):HO(e)}),qO=e=>`Hide additional ${e==null?void 0:e.target}`,GO=e=>`隐藏其余${e==null?void 0:e.target}`,VO=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GO(e):t==="fa"?VO(e):qO(e)}),KO=e=>`Hide error details for ${e==null?void 0:e.activity}`,YO=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,XO=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,ZO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YO(e):t==="fa"?XO(e):KO(e)}),QO=e=>`${e==null?void 0:e.count} consecutive identical calls`,JO=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,eI=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,tI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JO(e):t==="fa"?eI(e):QO(e)}),nI=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,rI=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,sI=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,iI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rI(e):t==="fa"?sI(e):nI(e)}),aI=e=>`Open ${e==null?void 0:e.branch} on GitHub`,oI=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,lI=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,X9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oI(e):t==="fa"?lI(e):aI(e)}),cI=e=>`Open experiment ${e==null?void 0:e.name}`,uI=e=>`打开实验 ${e==null?void 0:e.name}`,dI=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,fI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?uI(e):t==="fa"?dI(e):cI(e)}),hI=e=>`Open ${e==null?void 0:e.path} in the right pane`,_I=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,pI=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,mI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_I(e):t==="fa"?pI(e):hI(e)}),gI=e=>`Open ${e==null?void 0:e.name}`,vI=e=>`打开 ${e==null?void 0:e.name}`,bI=e=>`باز کردن ${e==null?void 0:e.name}`,xI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vI(e):t==="fa"?bI(e):gI(e)}),yI=e=>`Open logs for run ${e==null?void 0:e.run}`,wI=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,SI=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,kI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wI(e):t==="fa"?SI(e):yI(e)}),CI=e=>`Open ${e==null?void 0:e.name} on GitHub`,EI=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,NI=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,K0=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EI(e):t==="fa"?NI(e):CI(e)}),zI=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,AI=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,TI=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,jI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AI(e):t==="fa"?TI(e):zI(e)}),MI=e=>`Overleaf — ${e==null?void 0:e.status}`,RI=e=>`Overleaf — ${e==null?void 0:e.status}`,DI=e=>`Overleaf — ${e==null?void 0:e.status}`,LI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RI(e):t==="fa"?DI(e):MI(e)}),OI=e=>`Preview /${e==null?void 0:e.name} skill`,II=e=>`预览 /${e==null?void 0:e.name} 技能`,BI=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,$I=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?II(e):t==="fa"?BI(e):OI(e)}),HI=e=>`Remove annotation ${e==null?void 0:e.number}`,PI=e=>`移除批注 ${e==null?void 0:e.number}`,FI=e=>`حذف یادداشت ${e==null?void 0:e.number}`,UI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PI(e):t==="fa"?FI(e):HI(e)}),qI=e=>`Remove ${e==null?void 0:e.name}`,GI=e=>`移除 ${e==null?void 0:e.name}`,VI=e=>`حذف ${e==null?void 0:e.name}`,WI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GI(e):t==="fa"?VI(e):qI(e)}),KI=e=>`Remove queued message: ${e==null?void 0:e.text}`,YI=e=>`移除排队消息:${e==null?void 0:e.text}`,XI=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,ZI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YI(e):t==="fa"?XI(e):KI(e)}),QI=e=>`Retry queued message: ${e==null?void 0:e.text}`,JI=e=>`重试排队消息:${e==null?void 0:e.text}`,eB=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,tB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JI(e):t==="fa"?eB(e):QI(e)}),nB=e=>`Run ${e==null?void 0:e.id}`,rB=e=>`运行 ${e==null?void 0:e.id}`,sB=e=>`اجرای ${e==null?void 0:e.id}`,iB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rB(e):t==="fa"?sB(e):nB(e)}),aB=e=>`Show error details for ${e==null?void 0:e.activity}`,oB=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,lB=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,cB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oB(e):t==="fa"?lB(e):aB(e)}),uB=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,dB=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,fB=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,hB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dB(e):t==="fa"?fB(e):uB(e)}),_B=e=>`${e==null?void 0:e.name} skill`,pB=e=>`${e==null?void 0:e.name} 技能`,mB=e=>`مهارت ${e==null?void 0:e.name}`,gB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pB(e):t==="fa"?mB(e):_B(e)}),vB=e=>`Value for ${e==null?void 0:e.name}`,bB=e=>`${e==null?void 0:e.name} 的值`,xB=e=>`مقدار ${e==null?void 0:e.name}`,yB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bB(e):t==="fa"?xB(e):vB(e)}),wB=()=>"Agent reported back",SB=()=>"智能体已返回结果",kB=()=>"عامل نتیجه را گزارش کرد",CB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SB():t==="fa"?kB():wB()}),EB=()=>"Browse",NB=()=>"浏览",zB=()=>"مرور",AB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NB():t==="fa"?zB():EB()}),TB=()=>"Browsing…",jB=()=>"正在浏览…",MB=()=>"در حال مرور…",RB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jB():t==="fa"?MB():TB()}),DB=()=>"Checked experiment status and updated notes",LB=()=>"已检查实验状态并更新笔记",OB=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",IB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LB():t==="fa"?OB():DB()}),BB=()=>"Closed an agent",$B=()=>"已关闭智能体",HB=()=>"عامل بسته شد",PB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$B():t==="fa"?HB():BB()}),FB=()=>"Compacted context",UB=()=>"上下文已压缩",qB=()=>"زمینه فشرده شد",GB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UB():t==="fa"?qB():FB()}),VB=()=>"Compacting context…",WB=()=>"正在压缩上下文…",KB=()=>"در حال فشرده‌سازی زمینه…",YB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WB():t==="fa"?KB():VB()}),XB=e=>`Created ${e==null?void 0:e.target}`,ZB=e=>`已创建 ${e==null?void 0:e.target}`,QB=e=>`${e==null?void 0:e.target} ایجاد شد`,JB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ZB(e):t==="fa"?QB(e):XB(e)}),e$=()=>"Delegate",t$=()=>"委派",n$=()=>"واگذاری",r$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t$():t==="fa"?n$():e$()}),s$=()=>"Delegating…",i$=()=>"正在委派…",a$=()=>"در حال واگذاری…",o$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i$():t==="fa"?a$():s$()}),l$=e=>`Deleted ${e==null?void 0:e.target}`,c$=e=>`已删除 ${e==null?void 0:e.target}`,u$=e=>`${e==null?void 0:e.target} حذف شد`,d$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?c$(e):t==="fa"?u$(e):l$(e)}),f$=()=>"Edit",h$=()=>"编辑",_$=()=>"ویرایش",p$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h$():t==="fa"?_$():f$()}),m$=e=>`Edited ${e==null?void 0:e.target}`,g$=e=>`已编辑 ${e==null?void 0:e.target}`,v$=e=>`${e==null?void 0:e.target} ویرایش شد`,b$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?g$(e):t==="fa"?v$(e):m$(e)}),x$=()=>"Editing…",y$=()=>"正在编辑…",w$=()=>"در حال ویرایش…",S$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y$():t==="fa"?w$():x$()}),k$=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,C$=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,E$=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,N$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?C$(e):t==="fa"?E$(e):k$(e)}),z$=e=>`Listed files matching ${e==null?void 0:e.pattern}`,A$=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,T$=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,j$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A$(e):t==="fa"?T$(e):z$(e)}),M$=()=>"Load",R$=()=>"加载",D$=()=>"بارگیری",L$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R$():t==="fa"?D$():M$()}),O$=()=>"Loaded a skill",I$=()=>"已加载技能",B$=()=>"یک مهارت بارگیری شد",$$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I$():t==="fa"?B$():O$()}),H$=e=>`Loaded ${e==null?void 0:e.name} skill`,P$=e=>`已加载技能 ${e==null?void 0:e.name}`,F$=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,U$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?P$(e):t==="fa"?F$(e):H$(e)}),q$=()=>"Loading…",G$=()=>"正在加载…",V$=()=>"در حال بارگیری…",W$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G$():t==="fa"?V$():q$()}),K$=e=>`Opened ${e==null?void 0:e.target}`,Y$=e=>`已打开 ${e==null?void 0:e.target}`,X$=e=>`${e==null?void 0:e.target} باز شد`,Z$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Y$(e):t==="fa"?X$(e):K$(e)}),Q$=e=>`Ran ${e==null?void 0:e.command}`,J$=e=>`已运行 ${e==null?void 0:e.command}`,eH=e=>`${e==null?void 0:e.command} اجرا شد`,tH=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?J$(e):t==="fa"?eH(e):Q$(e)}),nH=()=>"Ran a sub-agent",rH=()=>"已运行子智能体",sH=()=>"یک عامل فرعی اجرا شد",iH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rH():t==="fa"?sH():nH()}),aH=()=>"Read",oH=()=>"读取",lH=()=>"خواندن",cH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oH():t==="fa"?lH():aH()}),uH=()=>"Read experiment notes",dH=()=>"已读取实验笔记",fH=()=>"یادداشت‌های آزمایش خوانده شد",hH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dH():t==="fa"?fH():uH()}),_H=()=>"Read a paper",pH=()=>"已读取论文",mH=()=>"یک مقاله خوانده شد",gH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pH():t==="fa"?mH():_H()}),vH=e=>`Read ${e==null?void 0:e.name} skill`,bH=e=>`已读取技能 ${e==null?void 0:e.name}`,xH=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,P1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bH(e):t==="fa"?xH(e):vH(e)}),yH=e=>`Read ${e==null?void 0:e.target}`,wH=e=>`已读取 ${e==null?void 0:e.target}`,SH=e=>`${e==null?void 0:e.target} خوانده شد`,lf=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wH(e):t==="fa"?SH(e):yH(e)}),kH=()=>"Read a web page",CH=()=>"已读取网页",EH=()=>"یک صفحهٔ وب خوانده شد",NH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CH():t==="fa"?EH():kH()}),zH=()=>"Reading…",AH=()=>"正在读取…",TH=()=>"در حال خواندن…",jH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AH():t==="fa"?TH():zH()}),MH=()=>"Resumed an agent",RH=()=>"已恢复智能体",DH=()=>"عامل از سر گرفته شد",LH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RH():t==="fa"?DH():MH()}),OH=()=>"Review",IH=()=>"查看",BH=()=>"بازبینی",$H=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IH():t==="fa"?BH():OH()}),HH=()=>"Reviewed run log",PH=()=>"已查看运行日志",FH=()=>"گزارش اجرا بازبینی شد",UH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PH():t==="fa"?FH():HH()}),qH=()=>"Reviewed run logs",GH=()=>"已查看运行日志",VH=()=>"گزارش‌های اجرا بازبینی شد",WH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GH():t==="fa"?VH():qH()}),KH=()=>"Reviewed experiment status and notes",YH=()=>"已查看实验状态和笔记",XH=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",ZH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YH():t==="fa"?XH():KH()}),QH=()=>"Reviewing…",JH=()=>"正在查看…",eP=()=>"در حال بازبینی…",tP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JH():t==="fa"?eP():QH()}),nP=()=>"Run",rP=()=>"运行",sP=()=>"اجرا",iP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rP():t==="fa"?sP():nP()}),aP=()=>"Running…",oP=()=>"正在运行…",lP=()=>"در حال اجرا…",cP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oP():t==="fa"?lP():aP()}),uP=()=>"Search",dP=()=>"搜索",fP=()=>"جست‌وجو",hP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dP():t==="fa"?fP():uP()}),_P=()=>"Searched alphaXiv full text",pP=()=>"已搜索 alphaXiv 全文",mP=()=>"متن کامل alphaXiv جست‌وجو شد",gP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pP():t==="fa"?mP():_P()}),vP=()=>"Searched alphaXiv semantically",bP=()=>"已对 alphaXiv 进行语义搜索",xP=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",yP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bP():t==="fa"?xP():vP()}),wP=()=>"Searched bioRxiv",SP=()=>"已搜索 bioRxiv",kP=()=>"bioRxiv جست‌وجو شد",CP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SP():t==="fa"?kP():wP()}),EP=()=>"Searched code",NP=()=>"已搜索代码",zP=()=>"کد جست‌وجو شد",F1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NP():t==="fa"?zP():EP()}),AP=e=>`Searched code for “${e==null?void 0:e.pattern}”`,TP=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,jP=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,U1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TP(e):t==="fa"?jP(e):AP(e)}),MP=e=>`Searched images for “${e==null?void 0:e.query}”`,RP=e=>`已搜索图片“${e==null?void 0:e.query}”`,DP=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,LP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RP(e):t==="fa"?DP(e):MP(e)}),OP=()=>"Searched the literature",IP=()=>"已搜索文献",BP=()=>"منابع علمی جست‌وجو شد",b6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IP():t==="fa"?BP():OP()}),$P=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,HP=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,PP=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,FP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?HP(e):t==="fa"?PP(e):$P(e)}),UP=()=>"Searched OpenAlex",qP=()=>"已搜索 OpenAlex",GP=()=>"OpenAlex جست‌وجو شد",VP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qP():t==="fa"?GP():UP()}),WP=e=>`Searched the web for “${e==null?void 0:e.query}”`,KP=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,YP=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,x6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?KP(e):t==="fa"?YP(e):WP(e)}),XP=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,ZP=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,QP=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,JP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ZP(e):t==="fa"?QP(e):XP(e)}),eF=()=>"Searching…",tF=()=>"正在搜索…",nF=()=>"در حال جست‌وجو…",rF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tF():t==="fa"?nF():eF()}),sF=()=>"Sent input to an agent",iF=()=>"已向智能体发送输入",aF=()=>"ورودی به عامل فرستاده شد",oF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iF():t==="fa"?aF():sF()}),lF=()=>"Spawned an agent",cF=()=>"已创建智能体",uF=()=>"یک عامل ساخته شد",dF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cF():t==="fa"?uF():lF()}),fF=()=>"Sub-agent",hF=()=>"子智能体",_F=()=>"عامل فرعی",pF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hF():t==="fa"?_F():fF()}),mF=()=>"Sub-agent interrupted",gF=()=>"子智能体已中断",vF=()=>"عامل فرعی متوقف شد",bF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gF():t==="fa"?vF():mF()}),xF=()=>"Sub-agent started",yF=()=>"子智能体已启动",wF=()=>"عامل فرعی آغاز شد",SF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yF():t==="fa"?wF():xF()}),kF=()=>"Update tasks",CF=()=>"更新任务",EF=()=>"به‌روزرسانی کارها",NF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CF():t==="fa"?EF():kF()}),zF=()=>"Updated experiment notes",AF=()=>"已更新实验笔记",TF=()=>"یادداشت‌های آزمایش به‌روز شد",jF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AF():t==="fa"?TF():zF()}),MF=e=>`Updated tasks (${e==null?void 0:e.done} of ${e==null?void 0:e.total} done)`,RF=e=>`已更新任务(已完成 ${e==null?void 0:e.done}/${e==null?void 0:e.total})`,DF=e=>`کارها به‌روز شد (${e==null?void 0:e.done} از ${e==null?void 0:e.total} انجام شد)`,LF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RF(e):t==="fa"?DF(e):MF(e)}),OF=()=>"Updating tasks",IF=()=>"正在更新任务",BF=()=>"در حال به‌روزرسانی کارها",Z9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IF():t==="fa"?BF():OF()}),$F=()=>"Waiting on an agent",HF=()=>"正在等待智能体",PF=()=>"در انتظار عامل",FF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HF():t==="fa"?PF():$F()}),UF=e=>`Approval required: ${e==null?void 0:e.label}`,qF=e=>`需要批准:${e==null?void 0:e.label}`,GF=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,y6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qF(e):t==="fa"?GF(e):UF(e)}),VF=()=>"The CLI is retrying the turn.",WF=()=>"CLI 正在重试本轮。",KF=()=>"CLI در حال تلاش دوباره برای این نوبت است.",YF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WF():t==="fa"?KF():VF()}),XF=()=>"Continue is available.",ZF=()=>"可以继续。",QF=()=>"ادامه در دسترس است.",JF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZF():t==="fa"?QF():XF()}),eU=()=>"Retry is available.",tU=()=>"可以重试。",nU=()=>"تلاش دوباره در دسترس است.",rU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tU():t==="fa"?nU():eU()}),sU=()=>"Running a tool",iU=()=>"正在运行工具",aU=()=>"در حال اجرای ابزار",oU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iU():t==="fa"?aU():sU()}),lU=()=>"Tool activity completed",cU=()=>"工具活动已完成",uU=()=>"فعالیت ابزار کامل شد",dU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cU():t==="fa"?uU():lU()}),fU=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,hU=e=>`工具活动失败:${e==null?void 0:e.labels}`,_U=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,pU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hU(e):t==="fa"?_U(e):fU(e)}),mU=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,gU=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,vU=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,bU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?gU(e):t==="fa"?vU(e):mU(e)}),xU=()=>"Turn did not finish.",yU=()=>"本轮未完成。",wU=()=>"این نوبت کامل نشد.",SU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yU():t==="fa"?wU():xU()}),kU=()=>"Artifacts",CU=()=>"产物",EU=()=>"خروجی‌ها",NU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CU():t==="fa"?EU():kU()}),zU=()=>"Close panel",AU=()=>"关闭面板",TU=()=>"بستن پنل",w6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AU():t==="fa"?TU():zU()}),jU=()=>"Current task",MU=()=>"当前任务",RU=()=>"وظیفهٔ فعلی",S6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MU():t==="fa"?RU():jU()}),DU=()=>"Drag to resize panel",LU=()=>"拖动以调整面板大小",OU=()=>"برای تغییر اندازهٔ پنل بکشید",IU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LU():t==="fa"?OU():DU()}),BU=()=>"Drag toward the center to restore panel",$U=()=>"向中央拖动以恢复面板",HU=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",PU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$U():t==="fa"?HU():BU()}),FU=()=>"Entire project",UU=()=>"整个项目",qU=()=>"کل پروژه",k6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UU():t==="fa"?qU():FU()}),GU=()=>"Expand panel",VU=()=>"展开面板",WU=()=>"گسترش پنل",C6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VU():t==="fa"?WU():GU()}),KU=e=>`Experiment filter: ${e==null?void 0:e.scope}`,YU=e=>`实验筛选:${e==null?void 0:e.scope}`,XU=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,ZU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YU(e):t==="fa"?XU(e):KU(e)}),QU=()=>"Experiment view",JU=()=>"实验视图",eq=()=>"نمای آزمایش",tq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JU():t==="fa"?eq():QU()}),nq=()=>"Experiments",rq=()=>"实验",sq=()=>"آزمایش‌ها",iq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rq():t==="fa"?sq():nq()}),aq=()=>"Files",oq=()=>"文件",lq=()=>"فایل‌ها",cq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oq():t==="fa"?lq():aq()}),uq=()=>"Filter experiments",dq=()=>"筛选实验",fq=()=>"فیلتر آزمایش‌ها",hq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dq():t==="fa"?fq():uq()}),_q=()=>"Current task filtering is unavailable for unattributed experiments",pq=()=>"存在无法归属的实验时,不能按当前任务筛选",mq=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",gq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pq():t==="fa"?mq():_q()}),vq=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",bq=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",xq=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",yq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bq():t==="fa"?xq():vq()}),wq=()=>"Open a task to filter to its experiments",Sq=()=>"请打开一个任务以筛选其实验",kq=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Cq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sq():t==="fa"?kq():wq()}),Eq=()=>"projects",Nq=()=>"项目",zq=()=>"پروژه‌ها",Aq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nq():t==="fa"?zq():Eq()}),Tq=()=>"Restore panel",jq=()=>"还原面板",Mq=()=>"بازگرداندن اندازهٔ پنل",E6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jq():t==="fa"?Mq():Tq()}),Rq=()=>"Retry",Dq=()=>"重试",Lq=()=>"تلاش دوباره",Gu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dq():t==="fa"?Lq():Rq()}),Oq=()=>"Select a project to browse its files.",Iq=()=>"选择一个项目以浏览其文件。",Bq=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",$q=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iq():t==="fa"?Bq():Oq()}),Hq=()=>"settings",Pq=()=>"设置",Fq=()=>"تنظیمات",Uq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pq():t==="fa"?Fq():Hq()}),qq=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Gq=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,Vq=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Wq=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Gq(e):t==="fa"?Vq(e):qq(e)}),Kq=()=>"Sub-agent",Yq=()=>"子智能体",Xq=()=>"عامل فرعی",Zq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yq():t==="fa"?Xq():Kq()}),Qq=()=>"Table",Jq=()=>"表格",eG=()=>"جدول",tG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jq():t==="fa"?eG():Qq()}),nG=()=>"Tree",rG=()=>"树状图",sG=()=>"درخت",iG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rG():t==="fa"?sG():nG()}),aG=e=>`Collapse ${e==null?void 0:e.name}`,oG=e=>`折叠 ${e==null?void 0:e.name}`,lG=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,cG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oG(e):t==="fa"?lG(e):aG(e)}),uG=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,dG=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,fG=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Q9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dG(e):t==="fa"?fG(e):uG(e)}),hG=e=>`Delete folder ${e==null?void 0:e.name}`,_G=e=>`删除文件夹 ${e==null?void 0:e.name}`,pG=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,mG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_G(e):t==="fa"?pG(e):hG(e)}),gG=e=>`Expand ${e==null?void 0:e.name}`,vG=e=>`展开 ${e==null?void 0:e.name}`,bG=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,xG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vG(e):t==="fa"?bG(e):gG(e)}),yG=()=>"Binary or unsupported file — no inline preview.",wG=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",SG=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",kG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wG():t==="fa"?SG():yG()}),CG=()=>"Copy path",EG=()=>"复制路径",NG=()=>"کپی مسیر",zG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EG():t==="fa"?NG():CG()}),AG=()=>"Artifact not found",TG=()=>"找不到产物",jG=()=>"خروجی پیدا نشد",MG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TG():t==="fa"?jG():AG()}),RG=()=>"Open raw",DG=()=>"打开原始文件",LG=()=>"باز کردن فایل خام",OG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DG():t==="fa"?LG():RG()}),IG=()=>"Click an artifact to view it",BG=()=>"点击产物即可查看",$G=()=>"برای مشاهده، یک خروجی را انتخاب کنید",HG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BG():t==="fa"?$G():IG()}),PG=()=>"Copy artifacts directory path",FG=()=>"复制产物目录路径",UG=()=>"کپی مسیر پوشهٔ خروجی‌ها",qG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FG():t==="fa"?UG():PG()}),GG=()=>"Delete artifact",VG=()=>"删除产物",WG=()=>"حذف خروجی",N6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VG():t==="fa"?WG():GG()}),KG=()=>"Delete folder",YG=()=>"删除文件夹",XG=()=>"حذف پوشه",ZG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YG():t==="fa"?XG():KG()}),QG=()=>"Failed to load:",JG=()=>"加载失败:",eV=()=>"بارگیری ناموفق بود:",tV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JG():t==="fa"?eV():QG()}),nV=()=>"File truncated — showing the first 512 KB.",rV=()=>"文件已截断——仅显示前 512 KB。",sV=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",iV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rV():t==="fa"?sV():nV()}),aV=()=>"Listing truncated — the folder has more artifacts.",oV=()=>"列表已截断——文件夹中还有更多产物。",lV=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",cV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oV():t==="fa"?lV():aV()}),uV=()=>"Loading…",dV=()=>"正在加载…",fV=()=>"در حال بارگیری…",hV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dV():t==="fa"?fV():uV()}),_V=()=>"Loading artifacts…",pV=()=>"正在加载产物…",mV=()=>"در حال بارگیری خروجی‌ها…",gV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pV():t==="fa"?mV():_V()}),vV=()=>"Modified",bV=()=>"修改时间",xV=()=>"ویرایش‌شده",yV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bV():t==="fa"?xV():vV()}),wV=()=>"No artifacts yet",SV=()=>"尚无产物",kV=()=>"هنوز خروجی‌ای وجود ندارد",CV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SV():t==="fa"?kV():wV()}),EV=()=>"Open raw in new tab",NV=()=>"在新标签页中打开原始文件",zV=()=>"باز کردن فایل خام در زبانهٔ جدید",z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NV():t==="fa"?zV():EV()}),AV=()=>"Storage settings",TV=()=>"存储设置",jV=()=>"تنظیمات ذخیره‌سازی",A6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TV():t==="fa"?jV():AV()}),MV=()=>"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:",RV=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",DV=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",LV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RV():t==="fa"?DV():MV()}),OV=()=>"File too large to preview inline.",IV=()=>"文件太大,无法内嵌预览。",BV=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",$V=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IV():t==="fa"?BV():OV()}),HV=()=>"This is the baseline branch, so there is no parent comparison.",PV=()=>"这是基线分支,因此没有父分支可供比较。",FV=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",UV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PV():t==="fa"?FV():HV()}),qV=()=>"Failed to load changes:",GV=()=>"加载更改失败:",VV=()=>"بارگیری تغییرات ناموفق بود:",WV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GV():t==="fa"?VV():qV()}),KV=()=>"Loading changes…",YV=()=>"正在加载更改…",XV=()=>"در حال بارگیری تغییرات…",ZV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YV():t==="fa"?XV():KV()}),QV=()=>"No committed changes from the parent branch.",JV=()=>"与父分支相比没有已提交的更改。",eW=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",tW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JV():t==="fa"?eW():QV()}),nW=e=>`agent ${e==null?void 0:e.number}`,rW=e=>`智能体 ${e==null?void 0:e.number}`,sW=e=>`عامل ${e==null?void 0:e.number}`,T6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rW(e):t==="fa"?sW(e):nW(e)}),iW=()=>"agent sessions",aW=()=>"智能体会话",oW=()=>"نشست‌های عامل‌ها",lW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aW():t==="fa"?oW():iW()}),cW=()=>"All sessions",uW=()=>"所有会话",dW=()=>"همهٔ نشست‌ها",fW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uW():t==="fa"?dW():cW()}),hW=e=>`${e==null?void 0:e.count} annotations`,_W=e=>`${e==null?void 0:e.count} 条批注`,pW=e=>`${e==null?void 0:e.count} یادداشت`,mW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_W(e):t==="fa"?pW(e):hW(e)}),gW=()=>"Archive",vW=()=>"归档",bW=()=>"بایگانی",xW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vW():t==="fa"?bW():gW()}),yW=()=>"Ask the research agent… (/ for commands and skills)",wW=()=>"询问研究智能体…(输入 / 使用命令和技能)",SW=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها)",kW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wW():t==="fa"?SW():yW()}),CW=()=>"Asked about selected text",EW=()=>"已询问所选文本",NW=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",zW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EW():t==="fa"?NW():CW()}),AW=()=>"Attachment",TW=()=>"附件",jW=()=>"پیوست",MW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TW():t==="fa"?jW():AW()}),RW=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,DW=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,LW=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,OW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?DW(e):t==="fa"?LW(e):RW(e)}),IW=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",BW=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",$W=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",HW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BW():t==="fa"?$W():IW()}),PW=()=>"Collapse tool activity",FW=()=>"折叠工具活动",UW=()=>"بستن فعالیت ابزارها",qW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FW():t==="fa"?UW():PW()}),GW=()=>"Continue",VW=()=>"继续",WW=()=>"ادامه",KW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VW():t==="fa"?WW():GW()}),YW=e=>`Delete “${e==null?void 0:e.title}”? -Its transcript will be permanently removed.`,EW=e=>`删除“${e==null?void 0:e.title}”? +Its transcript will be permanently removed.`,XW=e=>`删除“${e==null?void 0:e.title}”? -其对话记录将被永久移除。`,NW=e=>`«${e==null?void 0:e.title}» حذف شود؟ +其对话记录将被永久移除。`,ZW=e=>`«${e==null?void 0:e.title}» حذف شود؟ -رونوشت آن برای همیشه حذف خواهد شد.`,zW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EW(e):t==="fa"?NW(e):CW(e)}),AW=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,TW=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,jW=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,MW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TW(e):t==="fa"?jW(e):AW(e)}),RW=()=>"Could not exit Plan mode. Try again.",DW=()=>"无法退出计划模式。请重试。",LW=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",OW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DW():t==="fa"?LW():RW()}),IW=()=>"Expand tool activity",BW=()=>"展开工具活动",$W=()=>"باز کردن فعالیت ابزارها",HW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BW():t==="fa"?$W():IW()}),PW=()=>"experiments",FW=()=>"实验",UW=()=>"آزمایش‌ها",qW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FW():t==="fa"?UW():PW()}),GW=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,VW=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,WW=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,KW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?VW(e):t==="fa"?WW(e):GW(e)}),YW=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills)`,XW=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能)`,ZW=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها)`,QW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XW(e):t==="fa"?ZW(e):YW(e)}),JW=e=>`Message not sent: ${e==null?void 0:e.error}`,eK=e=>`消息未发送:${e==null?void 0:e.error}`,tK=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,nK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eK(e):t==="fa"?tK(e):JW(e)}),rK=()=>"New session",sK=()=>"新会话",iK=()=>"نشست جدید",E6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sK():t==="fa"?iK():rK()}),aK=()=>"No active sessions",oK=()=>"没有活跃会话",lK=()=>"نشست فعالی وجود ندارد",cK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oK():t==="fa"?lK():aK()}),uK=()=>"No activity",dK=()=>"无活动",fK=()=>"بدون فعالیت",hK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dK():t==="fa"?fK():uK()}),_K=()=>"No archived sessions",pK=()=>"没有已归档的会话",mK=()=>"نشست بایگانی‌شده‌ای وجود ندارد",gK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pK():t==="fa"?mK():_K()}),vK=()=>"No sessions yet",bK=()=>"还没有会话",xK=()=>"هنوز نشستی وجود ندارد",yK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bK():t==="fa"?xK():vK()}),wK=()=>"1 annotation",SK=()=>"1 条批注",kK=()=>"۱ یادداشت",CK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SK():t==="fa"?kK():wK()}),EK=()=>"Open sub-agent transcript",NK=()=>"打开子智能体记录",zK=()=>"باز کردن متن گفت‌وگوی عامل فرعی",AK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NK():t==="fa"?zK():EK()}),TK=()=>"About this demo",jK=()=>"关于此演示",MK=()=>"دربارهٔ این نسخهٔ نمایشی",N6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jK():t==="fa"?MK():TK()}),RK=()=>"Accept and auto mode",DK=()=>"接受并使用自动模式",LK=()=>"پذیرش و حالت خودکار",OK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DK():t==="fa"?LK():RK()}),IK=()=>"Accept and bypass all",BK=()=>"接受并跳过所有审批",$K=()=>"پذیرش و عبور از همهٔ تأییدها",HK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BK():t==="fa"?$K():IK()}),PK=()=>"Active",FK=()=>"活跃",UK=()=>"فعال",qK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FK():t==="fa"?UK():PK()}),GK=()=>"All",VK=()=>"全部",WK=()=>"همه",KK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VK():t==="fa"?WK():GK()}),YK=()=>"Allow",XK=()=>"允许",ZK=()=>"اجازه دادن",QK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XK():t==="fa"?ZK():YK()}),JK=()=>"Approval required",eY=()=>"需要批准",tY=()=>"نیازمند تأیید",nY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eY():t==="fa"?tY():JK()}),rY=()=>"Archived",sY=()=>"已归档",iY=()=>"بایگانی‌شده",z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sY():t==="fa"?iY():rY()}),aY=()=>"Artifacts",oY=()=>"产物",lY=()=>"خروجی‌ها",cY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oY():t==="fa"?lY():aY()}),uY=()=>"Ask about this",dY=()=>"询问此内容",fY=()=>"دربارهٔ این بپرسید",hY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dY():t==="fa"?fY():uY()}),_Y=()=>"Attach a PDF or image",pY=()=>"附加 PDF 或图片",mY=()=>"پیوست PDF یا تصویر",A6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pY():t==="fa"?mY():_Y()}),gY=()=>"Browsed the web",vY=()=>"已浏览网页",bY=()=>"وب مرور شد",T6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vY():t==="fa"?bY():gY()}),xY=()=>"Built the project",yY=()=>"已构建项目",wY=()=>"پروژه ساخته شد",SY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yY():t==="fa"?wY():xY()}),kY=()=>"Cancel",CY=()=>"取消",EY=()=>"لغو",NY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CY():t==="fa"?EY():kY()}),zY=()=>"Cancelled an experiment run",AY=()=>"已取消实验运行",TY=()=>"اجرای آزمایش لغو شد",jY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AY():t==="fa"?TY():zY()}),MY=()=>"Checked code style",RY=()=>"已检查代码风格",DY=()=>"سبک کد بررسی شد",LY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RY():t==="fa"?DY():MY()}),OY=()=>"Checked compute options",IY=()=>"已检查算力选项",BY=()=>"گزینه‌های رایانشی بررسی شد",$Y=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IY():t==="fa"?BY():OY()}),HY=()=>"Checked experiment status",PY=()=>"已检查实验状态",FY=()=>"وضعیت آزمایش بررسی شد",j6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PY():t==="fa"?FY():HY()}),UY=()=>"Checked Git status",qY=()=>"已检查 Git 状态",GY=()=>"وضعیت Git بررسی شد",VY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qY():t==="fa"?GY():UY()}),WY=()=>"Checked local times",KY=()=>"已查询当地时间",YY=()=>"زمان‌های محلی بررسی شد",XY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KY():t==="fa"?YY():WY()}),ZY=()=>"Checked market data",QY=()=>"已查询市场数据",JY=()=>"داده‌های بازار بررسی شد",eX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QY():t==="fa"?JY():ZY()}),tX=()=>"Checked sports data",nX=()=>"已查询体育数据",rX=()=>"داده‌های ورزشی بررسی شد",sX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nX():t==="fa"?rX():tX()}),iX=()=>"Checked the weather",aX=()=>"已查询天气",oX=()=>"آب‌وهوا بررسی شد",lX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aX():t==="fa"?oX():iX()}),cX=()=>"Checked types",uX=()=>"已检查类型",dX=()=>"نوع‌ها بررسی شد",fX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uX():t==="fa"?dX():cX()}),hX=()=>"Clear annotations",_X=()=>"清除批注",pX=()=>"پاک کردن یادداشت‌ها",M6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_X():t==="fa"?pX():hX()}),mX=()=>"Customize",gX=()=>"自定义",vX=()=>"سفارشی‌سازی",bX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gX():t==="fa"?vX():mX()}),xX=()=>"Data sources",yX=()=>"数据源",wX=()=>"منابع داده",F1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yX():t==="fa"?wX():xX()}),SX=()=>"Delegated a task to a new agent",kX=()=>"已将任务委派给新智能体",CX=()=>"وظیفه به عامل جدید واگذار شد",EX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kX():t==="fa"?CX():SX()}),NX=()=>"Delete",zX=()=>"删除",AX=()=>"حذف",TX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zX():t==="fa"?AX():NX()}),jX=()=>"Deny",MX=()=>"拒绝",RX=()=>"رد کردن",DX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MX():t==="fa"?RX():jX()}),LX=()=>"Edit and re-send",OX=()=>"编辑并重新发送",IX=()=>"ویرایش و ارسال دوباره",R6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OX():t==="fa"?IX():LX()}),BX=()=>"Edit message",$X=()=>"编辑消息",HX=()=>"ویرایش پیام",PX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$X():t==="fa"?HX():BX()}),FX=()=>"Edited a file",UX=()=>"已编辑文件",qX=()=>"فایل ویرایش شد",D6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UX():t==="fa"?qX():FX()}),GX=()=>"Exit Plan mode",VX=()=>"退出计划模式",WX=()=>"خروج از حالت طرح",L6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VX():t==="fa"?WX():GX()}),KX=()=>"Experiments",YX=()=>"实验",XX=()=>"آزمایش‌ها",ZX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YX():t==="fa"?XX():KX()}),QX=()=>"Failed:",JX=()=>"失败:",eZ=()=>"ناموفق:",ax=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JX():t==="fa"?eZ():QX()}),tZ=()=>"Files",nZ=()=>"文件",rZ=()=>"فایل‌ها",sZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nZ():t==="fa"?rZ():tZ()}),iZ=()=>"Filter sessions",aZ=()=>"筛选会话",oZ=()=>"فیلتر نشست‌ها",O6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aZ():t==="fa"?oZ():iZ()}),lZ=()=>"is unavailable.",cZ=()=>"不可用。",uZ=()=>"در دسترس نیست.",dZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cZ():t==="fa"?uZ():lZ()}),fZ=()=>"Later queued messages will wait until this is retried or removed.",hZ=()=>"后续排队的消息会等待此消息重试或移除。",_Z=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",pZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hZ():t==="fa"?_Z():fZ()}),mZ=()=>"Listed files",gZ=()=>"已列出文件",vZ=()=>"فایل‌ها فهرست شد",I6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gZ():t==="fa"?vZ():mZ()}),bZ=()=>"Listed project runs",xZ=()=>"已列出项目运行",yZ=()=>"اجراهای پروژه فهرست شد",wZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xZ():t==="fa"?yZ():bZ()}),SZ=()=>"Listed projects",kZ=()=>"已列出项目",CZ=()=>"پروژه‌ها فهرست شد",EZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kZ():t==="fa"?CZ():SZ()}),NZ=()=>"Loading conversation…",zZ=()=>"正在加载对话…",AZ=()=>"در حال بارگیری گفتگو…",TZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zZ():t==="fa"?AZ():NZ()}),jZ=()=>"Next version",MZ=()=>"下一版本",RZ=()=>"نسخهٔ بعدی",B6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MZ():t==="fa"?RZ():jZ()}),DZ=()=>"Open the session this agent spawned",LZ=()=>"打开此智能体创建的会话",OZ=()=>"باز کردن نشست ساخته‌شده توسط این عامل",IZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LZ():t==="fa"?OZ():DZ()}),BZ=()=>"Opened web pages",$Z=()=>"已打开网页",HZ=()=>"صفحه‌های وب باز شد",PZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Z():t==="fa"?HZ():BZ()}),FZ=()=>"Plan",UZ=()=>"计划",qZ=()=>"طرح",GZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UZ():t==="fa"?qZ():FZ()}),VZ=()=>"Plan approved",WZ=()=>"计划已批准",KZ=()=>"طرح تأیید شد",YZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WZ():t==="fa"?KZ():VZ()}),XZ=()=>"Plan rejected",ZZ=()=>"计划已拒绝",QZ=()=>"طرح رد شد",JZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZZ():t==="fa"?QZ():XZ()}),eQ=()=>"Plan resolved",tQ=()=>"计划已处理",nQ=()=>"طرح تعیین تکلیف شد",rQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tQ():t==="fa"?nQ():eQ()}),sQ=()=>"Plan revision requested",iQ=()=>"已请求修改计划",aQ=()=>"درخواست بازنگری طرح ثبت شد",oQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iQ():t==="fa"?aQ():sQ()}),lQ=()=>"Previous version",cQ=()=>"上一版本",uQ=()=>"نسخهٔ قبلی",$6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cQ():t==="fa"?uQ():lQ()}),dQ=()=>"Ran a command",fQ=()=>"已运行命令",hQ=()=>"فرمان اجرا شد",_Q=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fQ():t==="fa"?hQ():dQ()}),pQ=()=>"Ran tests",mQ=()=>"已运行测试",gQ=()=>"آزمون‌ها اجرا شد",vQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mQ():t==="fa"?gQ():pQ()}),bQ=()=>"Read a file",xQ=()=>"已读取文件",yQ=()=>"فایل خوانده شد",wQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xQ():t==="fa"?yQ():bQ()}),SQ=()=>"Read Git history",kQ=()=>"已读取 Git 历史",CQ=()=>"تاریخچهٔ Git خوانده شد",EQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kQ():t==="fa"?CQ():SQ()}),NQ=()=>"Read project details",zQ=()=>"已读取项目详情",AQ=()=>"جزئیات پروژه خوانده شد",TQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zQ():t==="fa"?AQ():NQ()}),jQ=()=>"Reject",MQ=()=>"拒绝",RQ=()=>"رد کردن",DQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MQ():t==="fa"?RQ():jQ()}),LQ=()=>"Remove",OQ=()=>"移除",IQ=()=>"حذف",BQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OQ():t==="fa"?IQ():LQ()}),$Q=()=>"Remove annotation",HQ=()=>"移除批注",PQ=()=>"حذف یادداشت",FQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HQ():t==="fa"?PQ():$Q()}),UQ=()=>"Remove file",qQ=()=>"移除文件",GQ=()=>"حذف فایل",H6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qQ():t==="fa"?GQ():UQ()}),VQ=()=>"Remove image",WQ=()=>"移除图片",KQ=()=>"حذف تصویر",P6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WQ():t==="fa"?KQ():VQ()}),YQ=()=>"Remove queued message",XQ=()=>"移除排队消息",ZQ=()=>"حذف پیام صف",F6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XQ():t==="fa"?ZQ():YQ()}),QQ=()=>"Rename",JQ=()=>"重命名",eJ=()=>"تغییر نام",tJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JQ():t==="fa"?eJ():QQ()}),nJ=()=>"Reviewed code changes",rJ=()=>"已审查代码更改",sJ=()=>"تغییرات کد بازبینی شد",iJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rJ():t==="fa"?sJ():nJ()}),aJ=()=>"Selected chat text",oJ=()=>"已选聊天文本",lJ=()=>"متن انتخاب‌شدهٔ گفتگو",cJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oJ():t==="fa"?lJ():aJ()}),uJ=()=>"Selected text:",dJ=()=>"已选文本:",fJ=()=>"متن انتخاب‌شده:",hJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dJ():t==="fa"?fJ():uJ()}),_J=()=>"Send",pJ=()=>"发送",mJ=()=>"ارسال",vb=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pJ():t==="fa"?mJ():_J()}),gJ=()=>"Session options",vJ=()=>"会话选项",bJ=()=>"گزینه‌های نشست",U6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vJ():t==="fa"?bJ():gJ()}),xJ=()=>"Session title",yJ=()=>"会话标题",wJ=()=>"عنوان نشست",SJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yJ():t==="fa"?wJ():xJ()}),kJ=()=>"Show sidebar",CJ=()=>"显示侧边栏",EJ=()=>"نمایش نوار کناری",q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CJ():t==="fa"?EJ():kJ()}),NJ=()=>"Started an experiment run",zJ=()=>"已启动实验运行",AJ=()=>"اجرای آزمایش آغاز شد",TJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zJ():t==="fa"?AJ():NJ()}),jJ=()=>"Reading the project to suggest where to start…",MJ=()=>"正在阅读项目以建议从哪里开始…",RJ=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",DJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MJ():t==="fa"?RJ():jJ()}),LJ=()=>"Starter prompts",OJ=()=>"入门提示",IJ=()=>"پیشنهادهای شروع",BJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OJ():t==="fa"?IJ():LJ()}),$J=()=>"Stop",HJ=()=>"停止",PJ=()=>"توقف",G6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HJ():t==="fa"?PJ():$J()}),FJ=()=>"Submit",UJ=()=>"提交",qJ=()=>"ارسال",GJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UJ():t==="fa"?qJ():FJ()}),VJ=()=>"Task",WJ=()=>"任务",KJ=()=>"وظیفه",YJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WJ():t==="fa"?KJ():VJ()}),XJ=()=>"Tool failed",ZJ=()=>"工具失败",QJ=()=>"ابزار ناموفق بود",JJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZJ():t==="fa"?QJ():XJ()}),eee=()=>"Used tools",tee=()=>"已使用工具",nee=()=>"ابزارها استفاده شد",W9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tee():t==="fa"?nee():eee()}),ree=()=>"View full plan",see=()=>"查看完整计划",iee=()=>"مشاهدهٔ طرح کامل",aee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?see():t==="fa"?iee():ree()}),oee=()=>"Waited for an experiment run",lee=()=>"已等待实验运行",cee=()=>"برای اجرای آزمایش صبر شد",uee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lee():t==="fa"?cee():oee()}),dee=()=>"Waiting for your input…",fee=()=>"正在等待你的输入…",hee=()=>"منتظر ورودی شما…",_ee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fee():t==="fa"?hee():dee()}),pee=()=>"What should we research?",mee=()=>"我们应该研究什么?",gee=()=>"چه چیزی را پژوهش کنیم؟",vee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mee():t==="fa"?gee():pee()}),bee=()=>"You, mid-task",xee=()=>"你(任务进行中)",yee=()=>"شما، هنگام انجام وظیفه",wee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xee():t==="fa"?yee():bee()}),See=()=>"Pasted image",kee=()=>"粘贴的图片",Cee=()=>"تصویر جای‌گذاری‌شده",Eee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kee():t==="fa"?Cee():See()}),Nee=()=>"Plan",zee=()=>"计划",Aee=()=>"طرح",K9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zee():t==="fa"?Aee():Nee()}),Tee=()=>"Plan mode — ready to proceed?",jee=()=>"计划模式 — 准备好继续了吗?",Mee=()=>"حالت طرح — آماده‌اید ادامه دهید؟",Ree=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jee():t==="fa"?Mee():Tee()}),Dee=()=>"Proposed plan",Lee=()=>"提议的计划",Oee=()=>"طرح پیشنهادی",V6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lee():t==="fa"?Oee():Dee()}),Iee=()=>"Question",Bee=()=>"问题",$ee=()=>"پرسش",Hee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bee():t==="fa"?$ee():Iee()}),Pee=()=>"Queued",Fee=()=>"已排队",Uee=()=>"در صف",qee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fee():t==="fa"?Uee():Pee()}),Gee=()=>"Recents",Vee=()=>"最近",Wee=()=>"اخیر",Y9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vee():t==="fa"?Wee():Gee()}),Kee=()=>"Re-check its setup.",Yee=()=>"请重新检查其设置。",Xee=()=>"راه‌اندازی آن را دوباره بررسی کنید.",Zee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yee():t==="fa"?Xee():Kee()}),Qee=()=>"Could not recover this turn. Try again.",Jee=()=>"无法恢复本轮。请重试。",ete=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",tte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jee():t==="fa"?ete():Qee()}),nte=()=>"Could not remove the queued message. Try again.",rte=()=>"无法移除排队消息。请重试。",ste=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",ite=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rte():t==="fa"?ste():nte()}),ate=e=>`Could not re-send: ${e==null?void 0:e.error}`,ote=e=>`无法重新发送:${e==null?void 0:e.error}`,lte=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,cte=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ote(e):t==="fa"?lte(e):ate(e)}),ute=()=>"Resolved",dte=()=>"已处理",fte=()=>"رسیدگی شد",hte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dte():t==="fa"?fte():ute()}),_te=()=>"Could not retry the queued message. Try again.",pte=()=>"无法重试排队消息。请重试。",mte=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",gte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pte():t==="fa"?mte():_te()}),vte=()=>"run logs",bte=()=>"运行日志",xte=()=>"گزارش‌های اجرا",yte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bte():t==="fa"?xte():vte()}),wte=()=>"Scroll to bottom",Ste=()=>"滚动到底部",kte=()=>"رفتن به پایین گفتگو",W6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ste():t==="fa"?kte():wte()}),Cte=()=>"The selected harness is unavailable",Ete=()=>"所选智能体工具不可用",Nte=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",K6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ete():t==="fa"?Nte():Cte()}),zte=()=>"The chat session was not created",Ate=()=>"未能创建聊天会话",Tte=()=>"نشست گفت‌وگو ایجاد نشد",jte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ate():t==="fa"?Tte():zte()}),Mte=()=>" · Spawned by another agent",Rte=()=>" · 由另一个智能体创建",Dte=()=>" · ساخته‌شده به‌دست عامل دیگر",Lte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rte():t==="fa"?Dte():Mte()}),Ote=()=>"Starting…",Ite=()=>"正在启动…",Bte=()=>"در حال شروع…",$te=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ite():t==="fa"?Bte():Ote()}),Hte=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,Pte=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,Fte=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,Ute=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pte(e):t==="fa"?Fte(e):Hte(e)}),qte=()=>"Could not stop the turn. Try again.",Gte=()=>"无法停止本轮。请重试。",Vte=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",Wte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gte():t==="fa"?Vte():qte()}),Kte=e=>`Could not switch fork: ${e==null?void 0:e.error}`,Yte=e=>`无法切换分支:${e==null?void 0:e.error}`,Xte=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,Zte=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yte(e):t==="fa"?Xte(e):Kte(e)}),Qte=()=>"The agent",Jte=()=>"智能体",ene=()=>"عامل",tne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jte():t==="fa"?ene():Qte()}),nne=()=>"Thinking",rne=()=>"正在思考",sne=()=>"در حال فکر کردن",ine=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rne():t==="fa"?sne():nne()}),ane=()=>"Could not toggle Plan mode. Try again.",one=()=>"无法切换计划模式。请重试。",lne=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",Y6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?one():t==="fa"?lne():ane()}),cne=()=>"This turn did not finish.",une=()=>"本轮未完成。",dne=()=>"این نوبت کامل نشد.",fne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?une():t==="fa"?dne():cne()}),hne=()=>"Type a custom answer…",_ne=()=>"输入自定义回答…",pne=()=>"پاسخ دلخواه را بنویسید…",mne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_ne():t==="fa"?pne():hne()}),gne=()=>"Unarchive",vne=()=>"取消归档",bne=()=>"خارج کردن از بایگانی",xne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vne():t==="fa"?bne():gne()}),yne=()=>"Untitled",wne=()=>"未命名",Sne=()=>"بدون عنوان",U1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wne():t==="fa"?Sne():yne()}),kne=()=>"Could not update permissions. Try again.",Cne=()=>"无法更新权限。请重试。",Ene=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Nne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cne():t==="fa"?Ene():kne()}),zne=()=>"Working…",Ane=()=>"正在工作…",Tne=()=>"در حال کار…",ox=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ane():t==="fa"?Tne():zne()}),jne=()=>"Close tab",Mne=()=>"关闭标签页",Rne=()=>"بستن زبانه",Dne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mne():t==="fa"?Rne():jne()}),Lne=()=>"Changes",One=()=>"更改",Ine=()=>"تغییرات",Bne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?One():t==="fa"?Ine():Lne()}),$ne=()=>"Code browser view",Hne=()=>"代码浏览器视图",Pne=()=>"نمای مرورگر کد",Fne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hne():t==="fa"?Pne():$ne()}),Une=()=>"Files",qne=()=>"文件",Gne=()=>"فایل‌ها",Vne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qne():t==="fa"?Gne():Une()}),Wne=()=>"Refresh",Kne=()=>"刷新",Yne=()=>"تازه‌سازی",X6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kne():t==="fa"?Yne():Wne()}),Xne=()=>"listing truncated",Zne=()=>"列表已截断",Qne=()=>"فهرست کوتاه شده است",Jne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zne():t==="fa"?Qne():Xne()}),ere=()=>"No files.",tre=()=>"没有文件。",nre=()=>"فایلی وجود ندارد.",rre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tre():t==="fa"?nre():ere()}),sre=()=>"Refresh failed:",ire=()=>"刷新失败:",are=()=>"تازه‌سازی ناموفق بود:",ore=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ire():t==="fa"?are():sre()}),lre=()=>"Cancelling…",cre=()=>"正在取消…",ure=()=>"در حال لغو…",dre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cre():t==="fa"?ure():lre()}),fre=()=>"Checking…",hre=()=>"正在检查…",_re=()=>"در حال بررسی…",Tp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hre():t==="fa"?_re():fre()}),pre=()=>"Copied",mre=()=>"已复制",gre=()=>"کپی شد",K0=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mre():t==="fa"?gre():pre()}),vre=e=>`Failed to load: ${e==null?void 0:e.error}`,bre=e=>`加载失败:${e==null?void 0:e.error}`,xre=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,X9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bre(e):t==="fa"?xre(e):vre(e)}),yre=()=>"Loading…",wre=()=>"正在加载…",Sre=()=>"در حال بارگیری…",Z9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wre():t==="fa"?Sre():yre()}),kre=e=>`+ ${e==null?void 0:e.count} more`,Cre=e=>`另有 ${e==null?void 0:e.count} 项`,Ere=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Nre=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cre(e):t==="fa"?Ere(e):kre(e)}),zre=()=>"Rendered view",Are=()=>"渲染视图",Tre=()=>"نمای رندرشده",Y0=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Are():t==="fa"?Tre():zre()}),jre=()=>"Save",Mre=()=>"保存",Rre=()=>"ذخیره",Sc=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mre():t==="fa"?Rre():jre()}),Dre=()=>"Saving…",Lre=()=>"正在保存…",Ore=()=>"در حال ذخیره…",Ta=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lre():t==="fa"?Ore():Dre()}),Ire=()=>"Show less",Bre=()=>"收起",$re=()=>"نمایش کمتر",Q9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bre():t==="fa"?$re():Ire()}),Hre=()=>"Show more",Pre=()=>"展开",Fre=()=>"نمایش بیشتر",Ure=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pre():t==="fa"?Fre():Hre()}),qre=()=>"Stop",Gre=()=>"停止",Vre=()=>"توقف",J9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gre():t==="fa"?Vre():qre()}),Wre=()=>"Stopping…",Kre=()=>"正在停止…",Yre=()=>"در حال توقف…",Xre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kre():t==="fa"?Yre():Wre()}),Zre=()=>"View source",Qre=()=>"查看源代码",Jre=()=>"نمایش متن منبع",ku=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qre():t==="fa"?Jre():Zre()}),ese=e=>`Hugging Face token — ${e==null?void 0:e.summary}`,tse=e=>`Hugging Face 令牌 — ${e==null?void 0:e.summary}`,nse=e=>`توکن Hugging Face — ${e==null?void 0:e.summary}`,rse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?tse(e):t==="fa"?nse(e):ese(e)}),sse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,ise=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,ase=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,ose=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ise(e):t==="fa"?ase(e):sse(e)}),lse=()=>"No credentials required; this computer is always available.",cse=()=>"无需凭据;此计算机始终可用。",use=()=>"نیازی به اطلاعات ورود نیست؛ این رایانه همیشه در دسترس است.",dse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cse():t==="fa"?use():lse()}),fse=e=>`Modal token — ${e==null?void 0:e.summary}`,hse=e=>`Modal 令牌 — ${e==null?void 0:e.summary}`,_se=e=>`توکن Modal — ${e==null?void 0:e.summary}`,pse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hse(e):t==="fa"?_se(e):fse(e)}),mse=e=>`OpenResearch login and SSH key — ${e==null?void 0:e.summary}`,gse=e=>`OpenResearch 登录信息和 SSH 密钥 — ${e==null?void 0:e.summary}`,vse=e=>`ورود OpenResearch و کلید SSH — ${e==null?void 0:e.summary}`,bse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?gse(e):t==="fa"?vse(e):mse(e)}),xse=e=>`Ray Jobs endpoint — ${e==null?void 0:e.summary}`,yse=e=>`Ray Jobs 端点 — ${e==null?void 0:e.summary}`,wse=e=>`endpoint مربوط به Ray Jobs — ${e==null?void 0:e.summary}`,Sse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yse(e):t==="fa"?wse(e):xse(e)}),kse=e=>`SSH config — ${e==null?void 0:e.summary}`,Cse=e=>`SSH 配置 — ${e==null?void 0:e.summary}`,Ese=e=>`پیکربندی SSH — ${e==null?void 0:e.summary}`,Nse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cse(e):t==="fa"?Ese(e):kse(e)}),zse=e=>`SSH config and keys — ${e==null?void 0:e.summary}`,Ase=e=>`SSH 配置和密钥 — ${e==null?void 0:e.summary}`,Tse=e=>`پیکربندی و کلیدهای SSH — ${e==null?void 0:e.summary}`,jse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ase(e):t==="fa"?Tse(e):zse(e)}),Mse=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,Rse=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,Dse=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,Lse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rse(e):t==="fa"?Dse(e):Mse(e)}),Ose=()=>"Runs as a remote Hugging Face Job",Ise=()=>"作为远程 Hugging Face Job 运行",Bse=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",$se=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ise():t==="fa"?Bse():Ose()}),Hse=()=>"Runs as a Job on your Kubernetes cluster",Pse=()=>"作为 Kubernetes 集群上的 Job 运行",Fse=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",Use=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pse():t==="fa"?Fse():Hse()}),qse=()=>"Runs directly on this computer",Gse=()=>"直接在此计算机上运行",Vse=()=>"مستقیماً روی این رایانه اجرا می‌شود",Wse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gse():t==="fa"?Vse():qse()}),Kse=()=>"Runs in a remote Modal sandbox",Yse=()=>"在远程 Modal 沙箱中运行",Xse=()=>"در sandbox دوردست Modal اجرا می‌شود",Zse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yse():t==="fa"?Xse():Kse()}),Qse=()=>"Runs on an ephemeral OpenResearch box",Jse=()=>"在临时 OpenResearch 主机上运行",eie=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",tie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jse():t==="fa"?eie():Qse()}),nie=()=>"Runs on the connected Ray cluster",rie=()=>"在已连接的 Ray 集群上运行",sie=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",iie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rie():t==="fa"?sie():nie()}),aie=()=>"Runs as a scheduled job on your Slurm cluster",oie=()=>"作为 Slurm 集群上的调度作业运行",lie=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oie():t==="fa"?lie():aie()}),uie=()=>"Runs on a host from your SSH config",die=()=>"在 SSH 配置中的主机上运行",fie=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",hie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?die():t==="fa"?fie():uie()}),_ie=()=>"Runs through Tinker’s remote compute",pie=()=>"通过 Tinker 远程算力运行",mie=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",gie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pie():t==="fa"?mie():_ie()}),vie=()=>"HF Jobs",bie=()=>"HF Jobs",xie=()=>"HF Jobs",yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bie():t==="fa"?xie():vie()}),wie=()=>"Kubernetes",Sie=()=>"Kubernetes",kie=()=>"Kubernetes",Cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sie():t==="fa"?kie():wie()}),Eie=()=>"This machine",Nie=()=>"此计算机",zie=()=>"این رایانه",eE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nie():t==="fa"?zie():Eie()}),Aie=()=>"Modal",Tie=()=>"Modal",jie=()=>"Modal",Mie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tie():t==="fa"?jie():Aie()}),Rie=()=>"OpenResearch",Die=()=>"OpenResearch",Lie=()=>"OpenResearch",Oie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Die():t==="fa"?Lie():Rie()}),Iie=()=>"Ray",Bie=()=>"Ray",$ie=()=>"Ray",Hie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bie():t==="fa"?$ie():Iie()}),Pie=()=>"Slurm",Fie=()=>"Slurm",Uie=()=>"Slurm",qie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fie():t==="fa"?Uie():Pie()}),Gie=()=>"SSH",Vie=()=>"SSH",Wie=()=>"SSH",Kie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vie():t==="fa"?Wie():Gie()}),Yie=()=>"Tinker",Xie=()=>"Tinker",Zie=()=>"Tinker",Qie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xie():t==="fa"?Zie():Yie()}),Jie=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",eae=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",tae=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",nae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eae():t==="fa"?tae():Jie()}),rae=()=>"A Kubernetes Job is created in the selected context and namespace from the project’s .orx/k8s.yaml manifest.",sae=()=>"系统根据项目的 .orx/k8s.yaml 清单,在所选上下文和命名空间中创建 Kubernetes Job。",iae=()=>"بر پایهٔ مانیفست .orx/k8s.yaml پروژه، یک Kubernetes Job در زمینه و فضای نام انتخاب‌شده ساخته می‌شود.",aae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sae():t==="fa"?iae():rae()}),oae=()=>"The experiment runs as a supervised process on this computer and uses its CPU, memory, and GPUs.",lae=()=>"实验作为受监管进程在此计算机上运行,并使用其 CPU、内存和 GPU。",cae=()=>"آزمایش به‌صورت فرایندی تحت نظارت روی این رایانه اجرا می‌شود و از CPU، حافظه و GPUهای آن استفاده می‌کند.",uae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lae():t==="fa"?cae():oae()}),dae=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",fae=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",hae=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",_ae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fae():t==="fa"?hae():dae()}),pae=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",mae=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",gae=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mae():t==="fa"?gae():pae()}),bae=()=>"The run is submitted to the Ray Jobs endpoint, and the connected Ray cluster executes it.",xae=()=>"运行会提交到 Ray Jobs 端点,并由已连接的 Ray 集群执行。",yae=()=>"اجرا به endpoint مربوط به Ray Jobs فرستاده و توسط خوشهٔ متصل Ray اجرا می‌شود.",wae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xae():t==="fa"?yae():bae()}),Sae=()=>"The login node receives an sbatch job using the saved partition, account, and time limit; the cluster schedules the work.",kae=()=>"登录节点使用已保存的分区、账户和时间限制接收 sbatch 作业;集群负责调度。",Cae=()=>"گرهٔ ورود یک کار sbatch با پارتیشن، حساب و محدودیت زمانی ذخیره‌شده دریافت می‌کند و خوشه آن را زمان‌بندی می‌کند.",Eae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kae():t==="fa"?Cae():Sae()}),Nae=()=>"The project is copied to the selected SSH host and runs there. Logs and status return to this dashboard.",zae=()=>"项目会复制到所选 SSH 主机并在那里运行。日志和状态会返回此控制台。",Aae=()=>"پروژه به میزبان SSH انتخاب‌شده کپی و همان‌جا اجرا می‌شود. گزارش‌ها و وضعیت به این داشبورد برمی‌گردند.",Tae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zae():t==="fa"?Aae():Nae()}),jae=()=>"A controller runs here while the Tinker SDK sends model operations to remote compute. This computer must stay awake and online.",Mae=()=>"控制器在此计算机上运行,Tinker SDK 将模型操作发送到远程算力。此计算机必须保持唤醒和联网。",Rae=()=>"کنترل‌گر روی این رایانه اجرا می‌شود و Tinker SDK عملیات مدل را به رایانش دوردست می‌فرستد. این رایانه باید روشن و آنلاین بماند.",Dae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mae():t==="fa"?Rae():jae()}),Lae=()=>"Context window",Oae=()=>"上下文窗口",Iae=()=>"پنجرهٔ زمینه",Bae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oae():t==="fa"?Iae():Lae()}),$ae=()=>"Context window used",Hae=()=>"已使用的上下文窗口",Pae=()=>"پنجرهٔ زمینهٔ استفاده‌شده",Fae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hae():t==="fa"?Pae():$ae()}),Uae=e=>`${e==null?void 0:e.value} tokens`,qae=e=>`${e==null?void 0:e.value} 个 token`,Gae=e=>`${e==null?void 0:e.value} توکن`,Vae=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qae(e):t==="fa"?Gae(e):Uae(e)}),Wae=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Kae=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,Yae=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Xae=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Kae(e):t==="fa"?Yae(e):Wae(e)}),Zae=()=>"No runs yet — ask the agent to launch one.",Qae=()=>"尚无运行——让智能体启动一个。",Jae=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",eoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qae():t==="fa"?Jae():Zae()}),toe=()=>"Run",noe=()=>"运行",roe=()=>"اجرا",Z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?noe():t==="fa"?roe():toe()}),soe=()=>"Switch run",ioe=()=>"切换运行",aoe=()=>"تغییر اجرا",ooe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ioe():t==="fa"?aoe():soe()}),loe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,coe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,uoe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,doe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?coe(e):t==="fa"?uoe(e):loe(e)}),foe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,hoe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,_oe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,poe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hoe(e):t==="fa"?_oe(e):foe(e)}),moe=e=>`${e==null?void 0:e.value}m`,goe=e=>`${e==null?void 0:e.value} 分钟`,voe=e=>`${e==null?void 0:e.value} دقیقه`,boe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?goe(e):t==="fa"?voe(e):moe(e)}),xoe=e=>`${e==null?void 0:e.value}s`,yoe=e=>`${e==null?void 0:e.value} 秒`,woe=e=>`${e==null?void 0:e.value} ثانیه`,Soe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yoe(e):t==="fa"?woe(e):xoe(e)}),koe=()=>"Code",Coe=()=>"代码",Eoe=()=>"کد",Noe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Coe():t==="fa"?Eoe():koe()}),zoe=()=>"created",Aoe=()=>"创建于",Toe=()=>"ایجادشده",joe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aoe():t==="fa"?Toe():zoe()}),Moe=()=>"from",Roe=()=>"来自",Doe=()=>"از",Loe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Roe():t==="fa"?Doe():Moe()}),Ooe=()=>"Logs",Ioe=()=>"日志",Boe=()=>"گزارش‌ها",$oe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ioe():t==="fa"?Boe():Ooe()}),Hoe=()=>"Latest run",Poe=()=>"最新运行",Foe=()=>"آخرین اجرا",Uoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Poe():t==="fa"?Foe():Hoe()}),qoe=()=>"Code",Goe=()=>"代码",Voe=()=>"کد",Woe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Goe():t==="fa"?Voe():qoe()}),Koe=()=>"Commit",Yoe=()=>"提交",Xoe=()=>"کامیت",Zoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yoe():t==="fa"?Xoe():Koe()}),Qoe=()=>"created",Joe=()=>"创建于",ele=()=>"ایجادشده",tle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Joe():t==="fa"?ele():Qoe()}),nle=()=>"Description",rle=()=>"说明",sle=()=>"توضیحات",ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rle():t==="fa"?sle():nle()}),ale=()=>"Duration",ole=()=>"时长",lle=()=>"مدت",cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ole():t==="fa"?lle():ale()}),ule=()=>"exit",dle=()=>"退出码",fle=()=>"خروج",hle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dle():t==="fa"?fle():ule()}),_le=()=>"from",ple=()=>"来自",mle=()=>"از",gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ple():t==="fa"?mle():_le()}),vle=()=>"Logs",ble=()=>"日志",xle=()=>"گزارش‌ها",yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ble():t==="fa"?xle():vle()}),wle=()=>"Run",Sle=()=>"运行",kle=()=>"اجرا",Cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sle():t==="fa"?kle():wle()}),Ele=()=>"Run history",Nle=()=>"运行历史",zle=()=>"تاریخچهٔ اجرا",Ale=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nle():t==="fa"?zle():Ele()}),Tle=()=>"Started",jle=()=>"开始时间",Mle=()=>"آغاز",Rle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jle():t==="fa"?Mle():Tle()}),Dle=()=>"Runs",Lle=()=>"运行",Ole=()=>"اجراها",Ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lle():t==="fa"?Ole():Dle()}),Ble=()=>"No runs yet",$le=()=>"还没有运行",Hle=()=>"هنوز اجرایی وجود ندارد",Ple=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$le():t==="fa"?Hle():Ble()}),Fle=()=>"No experiments yet.",Ule=()=>"还没有实验。",qle=()=>"هنوز آزمایشی وجود ندارد.",Gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ule():t==="fa"?qle():Fle()}),Vle=()=>"Not run yet",Wle=()=>"尚未运行",Kle=()=>"هنوز اجرا نشده",Yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wle():t==="fa"?Kle():Vle()}),Xle=()=>"1 run",Zle=()=>"1 次运行",Qle=()=>"۱ اجرا",Jle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zle():t==="fa"?Qle():Xle()}),ece=()=>"Open logs",tce=()=>"打开日志",nce=()=>"باز کردن گزارش‌ها",rce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tce():t==="fa"?nce():ece()}),sce=e=>`${e==null?void 0:e.count} runs`,ice=e=>`${e==null?void 0:e.count} 次运行`,ace=e=>`${e==null?void 0:e.count} اجرا`,oce=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ice(e):t==="fa"?ace(e):sce(e)}),lce=()=>"Stop requested",cce=()=>"已请求停止",uce=()=>"درخواست توقف ثبت شد",dce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cce():t==="fa"?uce():lce()}),fce=()=>"Stop run",hce=()=>"停止运行",_ce=()=>"توقف اجرا",pce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hce():t==="fa"?_ce():fce()}),mce=()=>"Code",gce=()=>"代码",vce=()=>"کد",bce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gce():t==="fa"?vce():mce()}),xce=()=>"Experiments",yce=()=>"实验",wce=()=>"آزمایش‌ها",Sce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yce():t==="fa"?wce():xce()}),kce=()=>"Logs",Cce=()=>"日志",Ece=()=>"گزارش‌ها",Nce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cce():t==="fa"?Ece():kce()}),zce=()=>"Stop failed:",Ace=()=>"停止失败:",Tce=()=>"توقف ناموفق بود:",jce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ace():t==="fa"?Tce():zce()}),Mce=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,Rce=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,Dce=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,Lce=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rce(e):t==="fa"?Dce(e):Mce(e)}),Oce=()=>"Binary file — no inline preview.",Ice=()=>"二进制文件——无法内嵌预览。",Bce=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",$ce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ice():t==="fa"?Bce():Oce()}),Hce=()=>"Compile failed",Pce=()=>"编译失败",Fce=()=>"کامپایل ناموفق بود",Uce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pce():t==="fa"?Fce():Hce()}),qce=()=>"Compile PDF",Gce=()=>"编译 PDF",Vce=()=>"کامپایل PDF",Q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gce():t==="fa"?Vce():qce()}),Wce=()=>"Compiled, but the engine reported errors — check the output below.",Kce=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",Yce=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",Xce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kce():t==="fa"?Yce():Wce()}),Zce=()=>"Copy command",Qce=()=>"复制命令",Jce=()=>"کپی فرمان",eue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qce():t==="fa"?Jce():Zce()}),tue=()=>"Copy install command",nue=()=>"复制安装命令",rue=()=>"کپی فرمان نصب",sue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nue():t==="fa"?rue():tue()}),iue=()=>"Discard my edits and reload",aue=()=>"放弃我的编辑并重新加载",oue=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",lue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aue():t==="fa"?oue():iue()}),cue=()=>"Dismiss",uue=()=>"关闭",due=()=>"بستن",J6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uue():t==="fa"?due():cue()}),fue=()=>"Dismiss compile message",hue=()=>"关闭编译消息",_ue=()=>"بستن پیام کامپایل",pue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hue():t==="fa"?_ue():fue()}),mue=()=>"Dismiss Overleaf message",gue=()=>"关闭 Overleaf 消息",vue=()=>"بستن پیام Overleaf",bue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gue():t==="fa"?vue():mue()}),xue=()=>"Download",yue=()=>"下载",wue=()=>"بارگیری",tE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yue():t==="fa"?wue():xue()}),Sue=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,kue=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,Cue=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,Eue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kue(e):t==="fa"?Cue(e):Sue(e)}),Nue=()=>"Failed to load file:",zue=()=>"加载文件失败:",Aue=()=>"بارگیری فایل ناموفق بود:",Tue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zue():t==="fa"?Aue():Nue()}),jue=()=>"File truncated — showing the first 512 KB.",Mue=()=>"文件已截断——仅显示前 512 KB。",Rue=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",Due=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mue():t==="fa"?Rue():jue()}),Lue=()=>"The page below stops partway — the full file could not be loaded.",Oue=()=>"下方页面在中途结束——无法加载完整文件。",Iue=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",Bue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oue():t==="fa"?Iue():Lue()}),$ue=e=>`Rendered HTML: ${e==null?void 0:e.name}`,Hue=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,Pue=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,Fue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Hue(e):t==="fa"?Pue(e):$ue(e)}),Uue=()=>"Loading…",que=()=>"正在加载…",Gue=()=>"در حال بارگیری…",nE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?que():t==="fa"?Gue():Uue()}),Vue=()=>"File not found.",Wue=()=>"找不到文件。",Kue=()=>"فایل پیدا نشد.",Yue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wue():t==="fa"?Kue():Vue()}),Xue=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,Zue=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,Que=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,Jue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Zue(e):t==="fa"?Que(e):Xue(e)}),ede=e=>`File not found on branch ${e==null?void 0:e.branch}.`,tde=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,nde=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,rde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?tde(e):t==="fa"?nde(e):ede(e)}),sde=()=>"File not found on disk.",ide=()=>"磁盘上找不到此文件。",ade=()=>"فایل روی دیسک پیدا نشد.",ode=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ide():t==="fa"?ade():sde()}),lde=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,cde=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,ude=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,dde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?cde(e):t==="fa"?ude(e):lde(e)}),fde=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,hde=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,_de=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,pde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hde(e):t==="fa"?_de(e):fde(e)}),mde=()=>"Open in default editor",gde=()=>"在默认编辑器中打开",vde=()=>"باز کردن در ویرایشگر پیش‌فرض",e7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gde():t==="fa"?vde():mde()}),bde=()=>"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.",xde=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",yde=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",wde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xde():t==="fa"?yde():bde()}),Sde=()=>"Compiled PDF is out of date",kde=()=>"已编译的 PDF 不是最新版本",Cde=()=>"PDF کامپایل‌شده به‌روز نیست",Ede=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kde():t==="fa"?Cde():Sde()}),Nde=()=>"project clone",zde=()=>"项目克隆",Ade=()=>"کلون پروژه",q_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zde():t==="fa"?Ade():Nde()}),Tde=()=>"Recompile PDF",jde=()=>"重新编译 PDF",Mde=()=>"کامپایل دوبارهٔ PDF",t7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jde():t==="fa"?Mde():Tde()}),Rde=()=>"Reload file",Dde=()=>"重新加载文件",Lde=()=>"بارگیری دوبارهٔ فایل",n7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dde():t==="fa"?Lde():Rde()}),Ode=()=>"Save failed",Ide=()=>"保存失败",Bde=()=>"ذخیره ناموفق بود",$de=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ide():t==="fa"?Bde():Ode()}),Hde=()=>"Saving…",Pde=()=>"正在保存…",Fde=()=>"در حال ذخیره…",Ude=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pde():t==="fa"?Fde():Hde()}),qde=()=>"Selected — press ⌘C",Gde=()=>"已选中 — 按 ⌘C 复制",Vde=()=>"انتخاب شد — برای کپی ⌘C را بزنید",Wde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gde():t==="fa"?Vde():qde()}),Kde=()=>"session’s worktree",Yde=()=>"会话工作树",Xde=()=>"درخت کاری نشست",G_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yde():t==="fa"?Xde():Kde()}),Zde=()=>"Show compiled PDF",Qde=()=>"显示已编译的 PDF",Jde=()=>"نمایش PDF کامپایل‌شده",r7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qde():t==="fa"?Jde():Zde()}),efe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",tfe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",nfe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",rfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tfe():t==="fa"?nfe():efe()}),sfe=()=>"This session's worktree isn't available — showing the project clone's copy.",ife=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",afe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",ofe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ife():t==="fa"?afe():sfe()}),lfe=()=>"Unsaved",cfe=()=>"未保存",ufe=()=>"ذخیره نشده",dfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cfe():t==="fa"?ufe():lfe()}),ffe=()=>"Unsaved — ⌘S or click away to save",hfe=()=>"未保存 — 按 ⌘S 或点击其他位置保存",_fe=()=>"ذخیره نشده — ⌘S را بزنید یا برای ذخیره بیرون کلیک کنید",pfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hfe():t==="fa"?_fe():ffe()}),mfe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",gfe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",vfe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",bfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gfe():t==="fa"?vfe():mfe()}),xfe=()=>"Back to preview",yfe=()=>"返回预览",wfe=()=>"بازگشت به پیش‌نمایش",Sfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yfe():t==="fa"?wfe():xfe()}),kfe=e=>`${e==null?void 0:e.count} changed files`,Cfe=e=>`${e==null?void 0:e.count} 个已更改文件`,Efe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,Nfe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cfe(e):t==="fa"?Efe(e):kfe(e)}),zfe=()=>"Changed files",Afe=()=>"已更改文件",Tfe=()=>"فایل‌های تغییرکرده",jfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Afe():t==="fa"?Tfe():zfe()}),Mfe=()=>"Diff preview truncated",Rfe=()=>"差异预览已截断",Dfe=()=>"پیش‌نمایش تفاوت کوتاه شده است",Lfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rfe():t==="fa"?Dfe():Mfe()}),Ofe=e=>`${e==null?void 0:e.count} files shown (partial)`,Ife=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,Bfe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,$fe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ife(e):t==="fa"?Bfe(e):Ofe(e)}),Hfe=()=>"No changes.",Pfe=()=>"没有更改。",Ffe=()=>"تغییری وجود ندارد.",Ufe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pfe():t==="fa"?Ffe():Hfe()}),qfe=()=>"No complete file preview was available before the cutoff.",Gfe=()=>"在截断位置之前没有完整的文件预览。",Vfe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",Wfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gfe():t==="fa"?Vfe():qfe()}),Kfe=()=>"No textual diff for this file.",Yfe=()=>"此文件没有文本差异。",Xfe=()=>"برای این فایل تفاوت متنی وجود ندارد.",Zfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yfe():t==="fa"?Xfe():Kfe()}),Qfe=()=>"1 changed file",Jfe=()=>"1 个已更改文件",ehe=()=>"۱ فایل تغییرکرده",the=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jfe():t==="fa"?ehe():Qfe()}),nhe=()=>"1 file shown (partial)",rhe=()=>"显示 1 个文件(部分)",she=()=>"۱ فایل نمایش داده شده (ناقص)",ihe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rhe():t==="fa"?she():nhe()}),ahe=()=>"Unable to parse this diff.",ohe=()=>"无法解析此差异。",lhe=()=>"خواندن این تفاوت ممکن نبود.",che=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ohe():t==="fa"?lhe():ahe()}),uhe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,dhe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,fhe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,hhe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dhe(e):t==="fa"?fhe(e):uhe(e)}),_he=()=>"View full diff",phe=()=>"查看完整差异",mhe=()=>"نمایش تفاوت کامل",ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?phe():t==="fa"?mhe():_he()}),vhe=()=>"Create a token ↗",bhe=()=>"创建令牌 ↗",xhe=()=>"ساخت توکن ↗",yhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bhe():t==="fa"?xhe():vhe()}),whe=()=>"All projects",She=()=>"所有项目",khe=()=>"همهٔ پروژه‌ها",s7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?She():t==="fa"?khe():whe()}),Che=()=>"Configure Repository",Ehe=()=>"配置仓库",Nhe=()=>"پیکربندی مخزن",zhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ehe():t==="fa"?Nhe():Che()}),Ahe=()=>"Create a new project",The=()=>"新建项目",jhe=()=>"ایجاد پروژهٔ جدید",Mhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?The():t==="fa"?jhe():Ahe()}),Rhe=()=>"Hide sidebar",Dhe=()=>"隐藏侧边栏",Lhe=()=>"پنهان کردن نوار کناری",i7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dhe():t==="fa"?Lhe():Rhe()}),Ohe=()=>"Project",Ihe=()=>"项目",Bhe=()=>"پروژه",$he=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ihe():t==="fa"?Bhe():Ohe()}),Hhe=e=>`${e==null?void 0:e.count} cancelled`,Phe=e=>`${e==null?void 0:e.count} 次取消`,Fhe=e=>`${e==null?void 0:e.count} لغوشده`,Uhe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Phe(e):t==="fa"?Fhe(e):Hhe(e)}),qhe=e=>`${e==null?void 0:e.count} done`,Ghe=e=>`${e==null?void 0:e.count} 次完成`,Vhe=e=>`${e==null?void 0:e.count} تمام‌شده`,Whe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ghe(e):t==="fa"?Vhe(e):qhe(e)}),Khe=e=>`${e==null?void 0:e.count} failed`,Yhe=e=>`${e==null?void 0:e.count} 次失败`,Xhe=e=>`${e==null?void 0:e.count} ناموفق`,Zhe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yhe(e):t==="fa"?Xhe(e):Khe(e)}),Qhe=e=>`${e==null?void 0:e.count} files`,Jhe=e=>`${e==null?void 0:e.count} 个文件`,e_e=e=>`${e==null?void 0:e.count} فایل`,t_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jhe(e):t==="fa"?e_e(e):Qhe(e)}),n_e=e=>`${e==null?void 0:e.count}+ files`,r_e=e=>`至少 ${e==null?void 0:e.count} 个文件`,s_e=e=>`بیش از ${e==null?void 0:e.count} فایل`,i_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?r_e(e):t==="fa"?s_e(e):n_e(e)}),a_e=e=>`${e==null?void 0:e.count} live`,o_e=e=>`${e==null?void 0:e.count} 次进行中`,l_e=e=>`${e==null?void 0:e.count} فعال`,c_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?o_e(e):t==="fa"?l_e(e):a_e(e)}),u_e=()=>"1 file",d_e=()=>"1 个文件",f_e=()=>"۱ فایل",h_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d_e():t==="fa"?f_e():u_e()}),__e=()=>"1 run",p_e=()=>"1 次运行",m_e=()=>"۱ اجرا",g_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p_e():t==="fa"?m_e():__e()}),v_e=e=>`${e==null?void 0:e.count} runs`,b_e=e=>`${e==null?void 0:e.count} 次运行`,x_e=e=>`${e==null?void 0:e.count} اجرا`,y_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?b_e(e):t==="fa"?x_e(e):v_e(e)}),w_e=()=>"No instances yet.",S_e=()=>"还没有实例。",k_e=()=>"هنوز نمونه‌ای وجود ندارد.",C_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S_e():t==="fa"?k_e():w_e()}),E_e=()=>"Nothing running right now.",N_e=()=>"当前没有运行中的实例。",z_e=()=>"اکنون چیزی در حال اجرا نیست.",A_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N_e():t==="fa"?z_e():E_e()}),T_e=()=>"Select a project to see its history.",j_e=()=>"请选择一个项目以查看其历史记录。",M_e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",R_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?j_e():t==="fa"?M_e():T_e()}),D_e=()=>"Select a project to see its runs.",L_e=()=>"请选择一个项目以查看其运行。",O_e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",I_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L_e():t==="fa"?O_e():D_e()}),B_e=()=>"View history",$_e=()=>"查看历史记录",H_e=()=>"مشاهدهٔ تاریخچه",P_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$_e():t==="fa"?H_e():B_e()}),F_e=e=>`View history (${e==null?void 0:e.count})`,U_e=e=>`查看历史记录(${e==null?void 0:e.count})`,q_e=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,G_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U_e(e):t==="fa"?q_e(e):F_e(e)}),V_e=()=>"The engine exited without producing a PDF or a log.",W_e=()=>"引擎已退出,但没有生成 PDF 或日志。",K_e=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",Y_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W_e():t==="fa"?K_e():V_e()}),X_e=()=>"Loading…",Z_e=()=>"正在加载…",Q_e=()=>"در حال بارگیری…",J_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z_e():t==="fa"?Q_e():X_e()}),e0e=()=>"Copy",t0e=()=>"复制",n0e=()=>"کپی",rE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t0e():t==="fa"?n0e():e0e()}),r0e=()=>"Copy code",s0e=()=>"复制代码",i0e=()=>"کپی کد",a0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s0e():t==="fa"?i0e():r0e()}),o0e=()=>"Download",l0e=()=>"下载",c0e=()=>"بارگیری",sE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l0e():t==="fa"?c0e():o0e()}),u0e=()=>"This browser can’t preview this media format.",d0e=()=>"此浏览器无法预览该媒体格式。",f0e=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",h0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d0e():t==="fa"?f0e():u0e()}),_0e=()=>" · CLI configuration",p0e=()=>" · CLI 配置",m0e=()=>" · پیکربندی CLI",iE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p0e():t==="fa"?m0e():_0e()}),g0e=()=>"· Default",v0e=()=>"· 默认",b0e=()=>"· پیش‌فرض",aE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v0e():t==="fa"?b0e():g0e()}),x0e=()=>"Default model",y0e=()=>"默认模型",w0e=()=>"مدل پیش‌فرض",a7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y0e():t==="fa"?w0e():x0e()}),S0e=()=>"Detecting harnesses…",k0e=()=>"正在检测智能体工具…",C0e=()=>"در حال شناسایی ابزارهای عامل…",E0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k0e():t==="fa"?C0e():S0e()}),N0e=()=>"Effort",z0e=()=>"推理强度",A0e=()=>"میزان استدلال",T0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z0e():t==="fa"?A0e():N0e()}),j0e=()=>"Fast speed ·",M0e=()=>"快速 ·",R0e=()=>"سرعت بالا ·",D0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M0e():t==="fa"?R0e():j0e()}),L0e=()=>"Mode",O0e=()=>"模式",I0e=()=>"حالت",o7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O0e():t==="fa"?I0e():L0e()}),B0e=()=>"Model",$0e=()=>"模型",H0e=()=>"مدل",q1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$0e():t==="fa"?H0e():B0e()}),P0e=e=>`${e==null?void 0:e.count} more — search to find`,F0e=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,U0e=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,q0e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?F0e(e):t==="fa"?U0e(e):P0e(e)}),G0e=()=>"Not available",V0e=()=>"不可用",W0e=()=>"در دسترس نیست",K0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V0e():t==="fa"?W0e():G0e()}),Y0e=()=>"Search models…",X0e=()=>"搜索模型…",Z0e=()=>"جست‌وجوی مدل‌ها…",Q0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X0e():t==="fa"?Z0e():Y0e()}),J0e=()=>"Sessions keep their harness. Start a new chat to switch.",epe=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",tpe=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",npe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?epe():t==="fa"?tpe():J0e()}),rpe=()=>"Speed",spe=()=>"速度",ipe=()=>"سرعت",l7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?spe():t==="fa"?ipe():rpe()}),ape=()=>"Unavailable",ope=()=>"不可用",lpe=()=>"در دسترس نیست",oE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ope():t==="fa"?lpe():ape()}),cpe=e=>`Use “${e==null?void 0:e.id}” as the model ID`,upe=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,dpe=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,fpe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?upe(e):t==="fa"?dpe(e):cpe(e)}),hpe=()=>"Variant",_pe=()=>"变体",ppe=()=>"گونه",mpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_pe():t==="fa"?ppe():hpe()}),gpe=()=>"Advanced",vpe=()=>"高级",bpe=()=>"پیشرفته",xpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vpe():t==="fa"?bpe():gpe()}),ype=()=>"Advanced · Connect GitHub",wpe=()=>"高级 · 连接 GitHub",Spe=()=>"پیشرفته · اتصال GitHub",kpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wpe():t==="fa"?Spe():ype()}),Cpe=()=>"Advanced · GitHub sync on",Epe=()=>"高级 · GitHub 同步已开启",Npe=()=>"پیشرفته · همگام‌سازی GitHub روشن است",zpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Epe():t==="fa"?Npe():Cpe()}),Ape=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Tpe=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",jpe=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Mpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tpe():t==="fa"?jpe():Ape()}),Rpe=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Dpe=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Lpe=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Ope=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Dpe(e):t==="fa"?Lpe(e):Rpe(e)}),Ipe=()=>"Choose an existing project folder",Bpe=()=>"选择现有项目文件夹",$pe=()=>"انتخاب پوشهٔ موجود پروژه",c7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bpe():t==="fa"?$pe():Ipe()}),Hpe=()=>"Choosing…",Ppe=()=>"正在选择…",Fpe=()=>"در حال انتخاب…",Upe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ppe():t==="fa"?Fpe():Hpe()}),qpe=()=>"Clone destination",Gpe=()=>"克隆位置",Vpe=()=>"مقصد کلون",Wpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gpe():t==="fa"?Vpe():qpe()}),Kpe=()=>"Clone paper project",Ype=()=>"克隆论文项目",Xpe=()=>"کلون پروژهٔ مقاله",Zpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ype():t==="fa"?Xpe():Kpe()}),Qpe=()=>"Create project",Jpe=()=>"创建项目",eme=()=>"ایجاد پروژه",u7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jpe():t==="fa"?eme():Qpe()}),tme=()=>"Creating…",nme=()=>"正在创建…",rme=()=>"در حال ایجاد…",sme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nme():t==="fa"?rme():tme()}),ime=()=>"Choose a different destination. This path is a file, not a folder.",ame=()=>"请选择其他位置。此路径是文件,不是文件夹。",ome=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",d7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ame():t==="fa"?ome():ime()}),lme=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",cme=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",ume=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",dme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cme():t==="fa"?ume():lme()}),fme=()=>"Blank project",hme=()=>"空白项目",_me=()=>"پروژهٔ خالی",pme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hme():t==="fa"?_me():fme()}),mme=()=>"Cancel",gme=()=>"取消",vme=()=>"لغو",bme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gme():t==="fa"?vme():mme()}),xme=()=>"Change",yme=()=>"更改",wme=()=>"تغییر",Sme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yme():t==="fa"?wme():xme()}),kme=()=>"Change selected paper",Cme=()=>"更改所选论文",Eme=()=>"تغییر مقالهٔ انتخاب‌شده",Nme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cme():t==="fa"?Eme():kme()}),zme=()=>"Check out a Git branch before using this folder.",Ame=()=>"使用此文件夹前,请先检出一个 Git 分支。",Tme=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",jme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ame():t==="fa"?Tme():zme()}),Mme=()=>"Checking project location.",Rme=()=>"正在检查项目位置。",Dme=()=>"در حال بررسی محل پروژه.",f7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rme():t==="fa"?Dme():Mme()}),Lme=()=>"Existing folder",Ome=()=>"现有文件夹",Ime=()=>"پوشهٔ موجود",Bme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ome():t==="fa"?Ime():Lme()}),$me=()=>"Experiment branches will be pushed to the remote GitHub repository.",Hme=()=>"实验分支将推送到远程 GitHub 仓库。",Pme=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Fme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hme():t==="fa"?Pme():$me()}),Ume=()=>"From a paper",qme=()=>"从论文创建",Gme=()=>"از یک مقاله",Vme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qme():t==="fa"?Gme():Ume()}),Wme=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",Kme=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",Yme=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",Xme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kme():t==="fa"?Yme():Wme()}),Zme=()=>"my-research",Qme=()=>"my-research",Jme=()=>"my-research",h7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qme():t==="fa"?Jme():Zme()}),ege=()=>"No papers found. Try an arXiv ID, URL, or a different title.",tge=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",nge=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",rge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tge():t==="fa"?nge():ege()}),sge=()=>"No public repository found on alphaXiv",ige=()=>"在 alphaXiv 上未找到公开仓库",age=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",oge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ige():t==="fa"?age():sge()}),lge=()=>"OpenResearch will start a blank project with this paper's PDF.",cge=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",uge=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",dge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cge():t==="fa"?uge():lge()}),fge=()=>"Paper",hge=()=>"论文",_ge=()=>"مقاله",pge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hge():t==="fa"?_ge():fge()}),mge=()=>"Project location",gge=()=>"项目位置",vge=()=>"محل پروژه",_7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gge():t==="fa"?vge():mge()}),bge=()=>"Project name",xge=()=>"项目名称",yge=()=>"نام پروژه",p7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xge():t==="fa"?yge():bge()}),wge=()=>"Search for a paper by arXiv ID, URL, or title",Sge=()=>"按 arXiv ID、网址或标题搜索论文",kge=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",Cge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sge():t==="fa"?kge():wge()}),Ege=()=>"Sync experiments to GitHub",Nge=()=>"将实验同步到 GitHub",zge=()=>"همگام‌سازی آزمایش‌ها با GitHub",Age=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nge():t==="fa"?zge():Ege()}),Tge=()=>"That folder no longer exists. Choose it again.",jge=()=>"该文件夹已不存在。请重新选择。",Mge=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",Rge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jge():t==="fa"?Mge():Tge()}),Dge=()=>"The selected folder contains an invalid Git repository.",Lge=()=>"所选文件夹包含无效的 Git 仓库。",Oge=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",Ige=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lge():t==="fa"?Oge():Dge()}),Bge=()=>"The selected path is not a folder.",$ge=()=>"所选路径不是文件夹。",Hge=()=>"مسیر انتخاب‌شده پوشه نیست.",Pge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ge():t==="fa"?Hge():Bge()}),Fge=e=>`Checking ${e==null?void 0:e.repository}.`,Uge=e=>`正在检查 ${e==null?void 0:e.repository}。`,qge=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Gge=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Uge(e):t==="fa"?qge(e):Fge(e)}),Vge=e=>`Creates ${e==null?void 0:e.repository}.`,Wge=e=>`将创建 ${e==null?void 0:e.repository}。`,Kge=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,Yge=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Wge(e):t==="fa"?Kge(e):Vge(e)}),Xge=e=>`Pushes to ${e==null?void 0:e.repository}.`,Zge=e=>`将推送到 ${e==null?void 0:e.repository}。`,Qge=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,Jge=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Zge(e):t==="fa"?Qge(e):Xge(e)}),e1e=()=>"Project location is required.",t1e=()=>"必须填写项目位置。",n1e=()=>"محل پروژه الزامی است.",m7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t1e():t==="fa"?n1e():e1e()}),r1e=()=>"Choose a different destination. The paper repository needs a new or empty folder.",s1e=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",i1e=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",a1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s1e():t==="fa"?i1e():r1e()}),o1e=()=>"A linked public code repository is cloned without credentials.",l1e=()=>"关联的公开代码仓库无需凭据即可克隆。",c1e=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",u1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l1e():t==="fa"?c1e():o1e()}),d1e=e=>`Run ${e==null?void 0:e.command} before creating the project.`,f1e=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,h1e=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,_1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?f1e(e):t==="fa"?h1e(e):d1e(e)}),p1e=()=>"Searching alphaXiv…",m1e=()=>"正在搜索 alphaXiv…",g1e=()=>"در حال جست‌وجوی alphaXiv…",v1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m1e():t==="fa"?g1e():p1e()}),b1e=()=>"Use folder",x1e=()=>"使用文件夹",y1e=()=>"استفاده از پوشه",w1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?x1e():t==="fa"?y1e():b1e()}),S1e=()=>"Can’t reach OpenResearch. This page is no longer live.",k1e=()=>"无法连接 OpenResearch。此页面已不再实时同步。",C1e=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",g7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k1e():t==="fa"?C1e():S1e()}),E1e=()=>"A workspace for your research agents",N1e=()=>"面向研究智能体的工作空间",z1e=()=>"فضای کاری برای عامل‌های پژوهشی شما",A1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N1e():t==="fa"?z1e():E1e()}),T1e=()=>"Add papers that represent your research interests, including papers by other authors.",j1e=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",M1e=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",R1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?j1e():t==="fa"?M1e():T1e()}),D1e=()=>"API key",L1e=()=>"API 密钥",O1e=()=>"کلید API",lE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L1e():t==="fa"?O1e():D1e()}),I1e=()=>"AI/ML",B1e=()=>"人工智能与机器学习",$1e=()=>"هوش مصنوعی و یادگیری ماشین",H1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B1e():t==="fa"?$1e():I1e()}),P1e=()=>"Biology",F1e=()=>"生物学",U1e=()=>"زیست‌شناسی",q1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F1e():t==="fa"?U1e():P1e()}),G1e=()=>"Other",V1e=()=>"其他",W1e=()=>"سایر",K1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V1e():t==="fa"?W1e():G1e()}),Y1e=()=>"Physics",X1e=()=>"物理学",Z1e=()=>"فیزیک",Q1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X1e():t==="fa"?Z1e():Y1e()}),J1e=()=>"Back",eve=()=>"返回",tve=()=>"بازگشت",v7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eve():t==="fa"?tve():J1e()}),nve=()=>"Check failed",rve=()=>"检查失败",sve=()=>"بررسی ناموفق بود",ive=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rve():t==="fa"?sve():nve()}),ave=()=>"Checking",ove=()=>"正在检查",lve=()=>"در حال بررسی",cve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ove():t==="fa"?lve():ave()}),uve=()=>"Checking Git…",dve=()=>"正在检查 Git…",fve=()=>"در حال بررسی Git…",hve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dve():t==="fa"?fve():uve()}),_ve=()=>"Choose a coding agent",pve=()=>"选择编程智能体",mve=()=>"یک عامل کدنویسی انتخاب کنید",gve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pve():t==="fa"?mve():_ve()}),vve=()=>"Choose a coding agent to continue.",bve=()=>"选择一个编程智能体以继续。",xve=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",yve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bve():t==="fa"?xve():vve()}),wve=()=>"Choose at least one research area to continue.",Sve=()=>"请至少选择一个研究领域后再继续。",kve=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Cve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sve():t==="fa"?kve():wve()}),Eve=()=>"Choose one or more.",Nve=()=>"请选择一项或多项。",zve=()=>"یک یا چند مورد را انتخاب کنید.",Ave=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nve():t==="fa"?zve():Eve()}),Tve=()=>"Choose your preferred coding agent",jve=()=>"请选择首选编程智能体",Mve=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",Rve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jve():t==="fa"?Mve():Tve()}),Dve=()=>"Consolidate your research",Lve=()=>"集中管理研究",Ove=()=>"پژوهش خود را یکپارچه کنید",Ive=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lve():t==="fa"?Ove():Dve()}),Bve=()=>"Continue",$ve=()=>"继续",Hve=()=>"ادامه",b7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ve():t==="fa"?Hve():Bve()}),Pve=()=>"Describe your research area to continue.",Fve=()=>"请描述你的研究领域后再继续。",Uve=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",qve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fve():t==="fa"?Uve():Pve()}),Gve=()=>"Detecting Claude Code, Codex, OpenCode…",Vve=()=>"正在检测 Claude Code、Codex、OpenCode…",Wve=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",Kve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vve():t==="fa"?Wve():Gve()}),Yve=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Xve=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Zve=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Qve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xve():t==="fa"?Zve():Yve()}),Jve=()=>"Everything stays local",ebe=()=>"一切都保留在本地",tbe=()=>"همه‌چیز محلی می‌ماند",nbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ebe():t==="fa"?tbe():Jve()}),rbe=()=>"Get started",sbe=()=>"开始使用",ibe=()=>"شروع",abe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sbe():t==="fa"?ibe():rbe()}),obe=()=>"Git is required for local experiments. Install Git, then re-check.",lbe=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",cbe=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",ube=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lbe():t==="fa"?cbe():obe()}),dbe=()=>"Ground your agents",fbe=()=>"为智能体提供可靠依据",hbe=()=>"عامل‌هایتان را به منابع متصل کنید",_be=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fbe():t==="fa"?hbe():dbe()}),pbe=()=>"Install broken",mbe=()=>"安装损坏",gbe=()=>"نصب خراب است",vbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mbe():t==="fa"?gbe():pbe()}),bbe=()=>"Install Git to continue",xbe=()=>"请安装 Git 后再继续",ybe=()=>"برای ادامه Git را نصب کنید",wbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xbe():t==="fa"?ybe():bbe()}),Sbe=()=>"Local Git",kbe=()=>"本地 Git",Cbe=()=>"Git محلی",Ebe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kbe():t==="fa"?Cbe():Sbe()}),Nbe=()=>"Not detected",zbe=()=>"未检测到",Abe=()=>"شناسایی نشد",x7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zbe():t==="fa"?Abe():Nbe()}),Tbe=()=>"Not found",jbe=()=>"未找到",Mbe=()=>"پیدا نشد",cE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jbe():t==="fa"?Mbe():Tbe()}),Rbe=()=>"Not signed in",Dbe=()=>"未登录",Lbe=()=>"وارد نشده",Obe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dbe():t==="fa"?Lbe():Rbe()}),Ibe=()=>"OpenResearch uses a coding agent already installed on this machine.",Bbe=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",$be=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",Hbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bbe():t==="fa"?$be():Ibe()}),Pbe=()=>"Other research area",Fbe=()=>"其他研究领域",Ube=()=>"حوزهٔ پژوهشی دیگر",qbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fbe():t==="fa"?Ube():Pbe()}),Gbe=()=>"Re-check",Vbe=()=>"重新检查",Wbe=()=>"بررسی دوباره",Kbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vbe():t==="fa"?Wbe():Gbe()}),Ybe=()=>"Ready",Xbe=()=>"已就绪",Zbe=()=>"آماده",Qbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xbe():t==="fa"?Zbe():Ybe()}),Jbe=()=>"Re-check Git before continuing",e2e=()=>"请重新检查 Git 后再继续",t2e=()=>"پیش از ادامه Git را دوباره بررسی کنید",n2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e2e():t==="fa"?t2e():Jbe()}),r2e=()=>"Representative papers",s2e=()=>"代表性论文",i2e=()=>"مقاله‌های شاخص",a2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s2e():t==="fa"?i2e():r2e()}),o2e=()=>"Research background",l2e=()=>"研究背景",c2e=()=>"پیشینهٔ پژوهشی",u2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l2e():t==="fa"?c2e():o2e()}),d2e=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",f2e=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",h2e=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",y7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f2e():t==="fa"?h2e():d2e()}),_2e=()=>"Search alphaXiv by title to link a paper…",p2e=()=>"按标题搜索 alphaXiv 以关联论文…",m2e=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",g2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p2e():t==="fa"?m2e():_2e()}),v2e=()=>"Searching alphaXiv…",b2e=()=>"正在搜索 alphaXiv…",x2e=()=>"در حال جست‌وجوی alphaXiv…",y2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b2e():t==="fa"?x2e():v2e()}),w2e=()=>"Selected",S2e=()=>"已选择",k2e=()=>"انتخاب‌شده",C2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S2e():t==="fa"?k2e():w2e()}),E2e=()=>"Setting things up…",N2e=()=>"正在设置…",z2e=()=>"در حال راه‌اندازی…",A2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N2e():t==="fa"?z2e():E2e()}),T2e=()=>"Sign in to at least one coding agent to continue",j2e=()=>"请至少登录一个编程智能体后再继续",M2e=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",R2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?j2e():t==="fa"?M2e():T2e()}),D2e=()=>"Sign in to at least one agent to continue.",L2e=()=>"请登录至少一个智能体以继续。",O2e=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",I2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L2e():t==="fa"?O2e():D2e()}),B2e=()=>"Signed in",$2e=()=>"已登录",H2e=()=>"وارد شده",P2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$2e():t==="fa"?H2e():B2e()}),F2e=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",U2e=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",q2e=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",G2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U2e():t==="fa"?q2e():F2e()}),V2e=()=>"· Step 1 of 2",W2e=()=>"· 第 1 步,共 2 步",K2e=()=>"· مرحلهٔ ۱ از ۲",Y2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W2e():t==="fa"?K2e():V2e()}),X2e=()=>"· Step 2 of 2",Z2e=()=>"· 第 2 步,共 2 步",Q2e=()=>"· مرحلهٔ ۲ از ۲",J2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z2e():t==="fa"?Q2e():X2e()}),exe=()=>"Tell us about your research",txe=()=>"介绍一下你的研究",nxe=()=>"از پژوهش خود بگویید",rxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?txe():t==="fa"?nxe():exe()}),sxe=()=>"Tell us your other research area",ixe=()=>"告诉我们你的其他研究领域",axe=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",oxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ixe():t==="fa"?axe():sxe()}),lxe=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",cxe=()=>"在一处跟踪实验、产物、算力、技能和代码。",uxe=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",dxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cxe():t==="fa"?uxe():lxe()}),fxe=()=>"Unable to verify",hxe=()=>"无法验证",_xe=()=>"تأیید ممکن نیست",pxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hxe():t==="fa"?_xe():fxe()}),mxe=()=>"Update required",gxe=()=>"需要更新",vxe=()=>"نیازمند به‌روزرسانی",bxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gxe():t==="fa"?vxe():mxe()}),xxe=()=>"Waiting for the Git check",yxe=()=>"正在等待 Git 检查",wxe=()=>"در انتظار بررسی Git",Sxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yxe():t==="fa"?wxe():xxe()}),kxe=()=>"Waiting for the local tool checks",Cxe=()=>"正在等待本地工具检查",Exe=()=>"در انتظار بررسی ابزارهای محلی",Nxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cxe():t==="fa"?Exe():kxe()}),zxe=()=>"What areas are you interested in?",Axe=()=>"你对哪些领域感兴趣?",Txe=()=>"به چه حوزه‌هایی علاقه دارید؟",jxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Axe():t==="fa"?Txe():zxe()}),Mxe=()=>"Your code, data, and experiment history stay on your machine.",Rxe=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",Dxe=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Lxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rxe():t==="fa"?Dxe():Mxe()}),Oxe=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Ixe=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",Bxe=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",$xe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ixe():t==="fa"?Bxe():Oxe()}),Hxe=()=>"Changed here and on Overleaf — choose which copy to keep",Pxe=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",Fxe=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",Uxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pxe():t==="fa"?Fxe():Hxe()}),qxe=()=>"Create a token ↗",Gxe=()=>"创建令牌 ↗",Vxe=()=>"ساخت توکن ↗",Wxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gxe():t==="fa"?Vxe():qxe()}),Kxe=()=>"Overleaf Git token",Yxe=()=>"Overleaf Git 令牌",Xxe=()=>"توکن Git در Overleaf",Zxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yxe():t==="fa"?Xxe():Kxe()}),Qxe=()=>"In step with Overleaf",Jxe=()=>"已与 Overleaf 同步",eye=()=>"با Overleaf همگام است",uE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jxe():t==="fa"?eye():Qxe()}),tye=()=>"The last sync did not finish.",nye=()=>"上次同步未完成。",rye=()=>"آخرین همگام‌سازی کامل نشد.",sye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nye():t==="fa"?rye():tye()}),iye=()=>"Link and sync",aye=()=>"关联并同步",oye=()=>"پیوند و همگام‌سازی",lye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aye():t==="fa"?oye():iye()}),cye=()=>"My projects ↗",uye=()=>"我的项目 ↗",dye=()=>"پروژه‌های من ↗",fye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uye():t==="fa"?dye():cye()}),hye=()=>"Nothing could be synced.",_ye=()=>"没有内容可以同步。",pye=()=>"هیچ موردی قابل همگام‌سازی نبود.",mye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_ye():t==="fa"?pye():hye()}),gye=()=>"Cancel",vye=()=>"取消",bye=()=>"لغو",xye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vye():t==="fa"?bye():gye()}),yye=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",wye=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Sye=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",kye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wye():t==="fa"?Sye():yye()}),Cye=()=>"Keep this copy",Eye=()=>"保留此副本",Nye=()=>"نگه داشتن این نسخه",zye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eye():t==="fa"?Nye():Cye()}),Aye=()=>"Open in Overleaf",Tye=()=>"在 Overleaf 中打开",jye=()=>"باز کردن در Overleaf",Mye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tye():t==="fa"?jye():Aye()}),Rye=()=>"Replace the Overleaf token",Dye=()=>"替换 Overleaf 令牌",Lye=()=>"جایگزینی توکن Overleaf",w7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dye():t==="fa"?Lye():Rye()}),Oye=()=>"Sync now",Iye=()=>"立即同步",Bye=()=>"همگام‌سازی اکنون",$ye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iye():t==="fa"?Bye():Oye()}),Hye=()=>"Unlink",Pye=()=>"取消关联",Fye=()=>"قطع پیوند",Uye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pye():t==="fa"?Fye():Hye()}),qye=()=>"Upload a copy as a new project ↗",Gye=()=>"上传副本作为新项目 ↗",Vye=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",Wye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gye():t==="fa"?Vye():qye()}),Kye=()=>"Use Overleaf's",Yye=()=>"使用 Overleaf 的副本",Xye=()=>"استفاده از نسخهٔ Overleaf",Zye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yye():t==="fa"?Xye():Kye()}),Qye=()=>"This paper stays in step with Overleaf.",Jye=()=>"此论文将与 Overleaf 保持同步。",e4e=()=>"این مقاله با Overleaf همگام می‌ماند.",t4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jye():t==="fa"?e4e():Qye()}),n4e=e=>`Pulled ${e==null?void 0:e.paths}.`,r4e=e=>`已拉取 ${e==null?void 0:e.paths}。`,s4e=e=>`${e==null?void 0:e.paths} دریافت شد.`,i4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?r4e(e):t==="fa"?s4e(e):n4e(e)}),a4e=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,o4e=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,l4e=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,c4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?o4e(e):t==="fa"?l4e(e):a4e(e)}),u4e=e=>`Pushed ${e==null?void 0:e.paths}.`,d4e=e=>`已推送 ${e==null?void 0:e.paths}。`,f4e=e=>`${e==null?void 0:e.paths} ارسال شد.`,h4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?d4e(e):t==="fa"?f4e(e):u4e(e)}),_4e=()=>"Save the file first",p4e=()=>"请先保存文件",m4e=()=>"ابتدا فایل را ذخیره کنید",g4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p4e():t==="fa"?m4e():_4e()}),v4e=()=>"Save this file to sync it with Overleaf",b4e=()=>"保存此文件以与 Overleaf 同步",x4e=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",dE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b4e():t==="fa"?x4e():v4e()}),y4e=()=>"Save token",w4e=()=>"保存令牌",S4e=()=>"ذخیرهٔ توکن",k4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w4e():t==="fa"?S4e():y4e()}),C4e=()=>"Send this paper to Overleaf",E4e=()=>"将此论文发送到 Overleaf",N4e=()=>"ارسال مقاله به Overleaf",z4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E4e():t==="fa"?N4e():C4e()}),A4e=()=>"Overleaf sync failed",T4e=()=>"Overleaf 同步失败",j4e=()=>"همگام‌سازی با Overleaf ناموفق بود",M4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T4e():t==="fa"?j4e():A4e()}),R4e=()=>"Syncing with Overleaf…",D4e=()=>"正在与 Overleaf 同步…",L4e=()=>"در حال همگام‌سازی با Overleaf…",O4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D4e():t==="fa"?L4e():R4e()}),I4e=()=>"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.",B4e=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",$4e=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",H4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B4e():t==="fa"?$4e():I4e()}),P4e=()=>"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.",F4e=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",U4e=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",q4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F4e():t==="fa"?U4e():P4e()}),G4e=()=>"Toggle Plan mode for this chat",V4e=()=>"切换此聊天的计划模式",W4e=()=>"تغییر حالت طرح این گفت‌وگو",K4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V4e():t==="fa"?W4e():G4e()}),Y4e=()=>"Accept and auto mode",X4e=()=>"接受并使用自动模式",Z4e=()=>"پذیرش و حالت خودکار",Q4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X4e():t==="fa"?Z4e():Y4e()}),J4e=()=>"Accept and bypass all",ewe=()=>"接受并跳过所有审批",twe=()=>"پذیرش و عبور از همهٔ تأییدها",nwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ewe():t==="fa"?twe():J4e()}),rwe=()=>"Accept plan",swe=()=>"接受计划",iwe=()=>"پذیرش طرح",awe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?swe():t==="fa"?iwe():rwe()}),owe=e=>`${e==null?void 0:e.agent} proposed a plan`,lwe=e=>`${e==null?void 0:e.agent} 提出了一个计划`,cwe=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,uwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?lwe(e):t==="fa"?cwe(e):owe(e)}),dwe=e=>`${e==null?void 0:e.agent} is ready to proceed`,fwe=e=>`${e==null?void 0:e.agent} 已准备好继续`,hwe=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,_we=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fwe(e):t==="fa"?hwe(e):dwe(e)}),pwe=()=>"Back",mwe=()=>"返回",gwe=()=>"بازگشت",vwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mwe():t==="fa"?gwe():pwe()}),bwe=()=>"More approval options",xwe=()=>"更多批准选项",ywe=()=>"گزینه‌های تأیید بیشتر",wwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xwe():t==="fa"?ywe():bwe()}),Swe=()=>"Open plan",kwe=()=>"打开计划",Cwe=()=>"باز کردن طرح",Ewe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kwe():t==="fa"?Cwe():Swe()}),Nwe=()=>"Reject",zwe=()=>"拒绝",Awe=()=>"رد کردن",Twe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zwe():t==="fa"?Awe():Nwe()}),jwe=()=>"Revise",Mwe=()=>"修改",Rwe=()=>"بازنگری",Dwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mwe():t==="fa"?Rwe():jwe()}),Lwe=()=>"Revise…",Owe=()=>"修改…",Iwe=()=>"بازنگری…",Bwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Owe():t==="fa"?Iwe():Lwe()}),$we=()=>"What should change? (optional)",Hwe=()=>"需要更改什么?(可选)",Pwe=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",Fwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hwe():t==="fa"?Pwe():$we()}),Uwe=e=>`${e==null?void 0:e.count} active`,qwe=e=>`${e==null?void 0:e.count} 个活跃`,Gwe=e=>`${e==null?void 0:e.count} فعال`,Vwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qwe(e):t==="fa"?Gwe(e):Uwe(e)}),Wwe=e=>`${e==null?void 0:e.count} total agents`,Kwe=e=>`共 ${e==null?void 0:e.count} 个智能体`,Ywe=e=>`در مجموع ${e==null?void 0:e.count} عامل`,Xwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Kwe(e):t==="fa"?Ywe(e):Wwe(e)}),Zwe=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,Qwe=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,Jwe=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,e5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Qwe(e):t==="fa"?Jwe(e):Zwe(e)}),t5e=()=>"Agents",n5e=()=>"智能体",r5e=()=>"عامل‌ها",S7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),s5e=()=>"arXiv paper ID:",i5e=()=>"arXiv 论文 ID:",a5e=()=>"شناسهٔ مقالهٔ arXiv:",o5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i5e():t==="fa"?a5e():s5e()}),l5e=()=>"Cancel",c5e=()=>"取消",u5e=()=>"لغو",d5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c5e():t==="fa"?u5e():l5e()}),f5e=()=>"Created",h5e=()=>"创建时间",_5e=()=>"ایجادشده",p5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h5e():t==="fa"?_5e():f5e()}),m5e=()=>"Delete project?",g5e=()=>"删除项目?",v5e=()=>"پروژه حذف شود؟",b5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g5e():t==="fa"?v5e():m5e()}),x5e=()=>"Delete project",y5e=()=>"删除项目",w5e=()=>"حذف پروژه",S5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y5e():t==="fa"?w5e():x5e()}),k5e=()=>"Deleting…",C5e=()=>"正在删除…",E5e=()=>"در حال حذف…",N5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C5e():t==="fa"?E5e():k5e()}),z5e=()=>"Experiments",A5e=()=>"实验",T5e=()=>"آزمایش‌ها",k7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A5e():t==="fa"?T5e():z5e()}),j5e=()=>"The local folder and linked GitHub repository are kept.",M5e=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",R5e=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",D5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M5e():t==="fa"?R5e():j5e()}),L5e=()=>"The local folder is kept.",O5e=()=>"本地文件夹会保留。",I5e=()=>"پوشهٔ محلی نگه داشته می‌شود.",B5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O5e():t==="fa"?I5e():L5e()}),$5e=()=>"New project",H5e=()=>"新建项目",P5e=()=>"پروژهٔ جدید",fE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H5e():t==="fa"?P5e():$5e()}),F5e=()=>"No projects yet — create one to get started.",U5e=()=>"尚无项目——新建一个即可开始。",q5e=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",G5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U5e():t==="fa"?q5e():F5e()}),V5e=()=>"Project",W5e=()=>"项目",K5e=()=>"پروژه",Y5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W5e():t==="fa"?K5e():V5e()}),X5e=()=>"Projects",Z5e=()=>"项目",Q5e=()=>"پروژه‌ها",J5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z5e():t==="fa"?Q5e():X5e()}),e3e=()=>"Repository",t3e=()=>"仓库",n3e=()=>"مخزن",C7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t3e():t==="fa"?n3e():e3e()}),r3e=()=>"Idle",s3e=()=>"空闲",i3e=()=>"بیکار",a3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s3e():t==="fa"?i3e():r3e()}),o3e=()=>"Local",l3e=()=>"本地",c3e=()=>"محلی",u3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l3e():t==="fa"?c3e():o3e()}),d3e=()=>"1 total agent",f3e=()=>"共 1 个智能体",h3e=()=>"در مجموع ۱ عامل",_3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f3e():t==="fa"?h3e():d3e()}),p3e=e=>`${e==null?void 0:e.count} running`,m3e=e=>`${e==null?void 0:e.count} 个运行中`,g3e=e=>`${e==null?void 0:e.count} در حال اجرا`,v3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?m3e(e):t==="fa"?g3e(e):p3e(e)}),b3e=e=>`${e==null?void 0:e.count} total`,x3e=e=>`共 ${e==null?void 0:e.count} 个`,y3e=e=>`در مجموع ${e==null?void 0:e.count}`,E7=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?x3e(e):t==="fa"?y3e(e):b3e(e)}),w3e=e=>`${e==null?void 0:e.value}d`,S3e=e=>`${e==null?void 0:e.value} 天`,k3e=e=>`${e==null?void 0:e.value}ر`,C3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?S3e(e):t==="fa"?k3e(e):w3e(e)}),E3e=e=>`${e==null?void 0:e.value}h`,N3e=e=>`${e==null?void 0:e.value} 小时`,z3e=e=>`${e==null?void 0:e.value}س`,A3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?N3e(e):t==="fa"?z3e(e):E3e(e)}),T3e=e=>`${e==null?void 0:e.value}m`,j3e=e=>`${e==null?void 0:e.value} 分钟`,M3e=e=>`${e==null?void 0:e.value}د`,R3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j3e(e):t==="fa"?M3e(e):T3e(e)}),D3e=()=>"now",L3e=()=>"现在",O3e=()=>"اکنون",I3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L3e():t==="fa"?O3e():D3e()}),B3e=()=>"Disable syncing",$3e=()=>"关闭同步",H3e=()=>"غیرفعال کردن همگام‌سازی",P3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$3e():t==="fa"?H3e():B3e()}),F3e=()=>"Enable GitHub syncing",U3e=()=>"启用 GitHub 同步",q3e=()=>"فعال‌سازی همگام‌سازی GitHub",G3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U3e():t==="fa"?q3e():F3e()}),V3e=()=>"Enabling…",W3e=()=>"正在启用…",K3e=()=>"در حال فعال‌سازی…",Y3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W3e():t==="fa"?K3e():V3e()}),X3e=()=>"Updating…",Z3e=()=>"正在更新…",Q3e=()=>"در حال به‌روزرسانی…",J3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z3e():t==="fa"?Q3e():X3e()}),e6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,t6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,n6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,r6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?t6e(e):t==="fa"?n6e(e):e6e(e)}),s6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,i6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,a6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,o6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?i6e(e):t==="fa"?a6e(e):s6e(e)}),l6e=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`,c6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,u6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,d6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?c6e(e):t==="fa"?u6e(e):l6e(e)}),f6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,h6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,_6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,p6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h6e(e):t==="fa"?_6e(e):f6e(e)}),m6e=()=>"CLI is retrying…",g6e=()=>"CLI 正在重试…",v6e=()=>"CLI در حال تلاش دوباره است…",b6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g6e():t==="fa"?v6e():m6e()}),x6e=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,y6e=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,w6e=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,S6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?y6e(e):t==="fa"?w6e(e):x6e(e)}),k6e=()=>"Sending again…",C6e=()=>"正在重新发送…",E6e=()=>"در حال ارسال دوباره…",N6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C6e():t==="fa"?E6e():k6e()}),z6e=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,A6e=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,T6e=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,j6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A6e(e):t==="fa"?T6e(e):z6e(e)}),M6e=()=>"Retrying…",R6e=()=>"正在重试…",D6e=()=>"در حال تلاش دوباره…",hE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R6e():t==="fa"?D6e():M6e()}),L6e=()=>"Default speed",O6e=()=>"默认速度",I6e=()=>"سرعت پیش‌فرض",B6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O6e():t==="fa"?I6e():L6e()}),$6e=()=>"Standard",H6e=()=>"标准",P6e=()=>"استاندارد",F6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H6e():t==="fa"?P6e():$6e()}),U6e=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,q6e=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,G6e=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,V6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?q6e(e):t==="fa"?G6e(e):U6e(e)}),W6e=()=>"Appearance",K6e=()=>"外观",Y6e=()=>"ظاهر",X6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K6e():t==="fa"?Y6e():W6e()}),Z6e=()=>"Check",Q6e=()=>"检查",J6e=()=>"بررسی",e7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Q6e():t==="fa"?J6e():Z6e()}),t7e=()=>"Check again",n7e=()=>"再次检查",r7e=()=>"بررسی دوباره",s7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n7e():t==="fa"?r7e():t7e()}),i7e=()=>"Check for updates",a7e=()=>"检查更新",o7e=()=>"بررسی به‌روزرسانی",l7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a7e():t==="fa"?o7e():i7e()}),c7e=()=>"Check now",u7e=()=>"立即检查",d7e=()=>"اکنون بررسی کن",f7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u7e():t==="fa"?d7e():c7e()}),h7e=()=>"Check setup",_7e=()=>"检查设置",p7e=()=>"بررسی راه‌اندازی",m7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_7e():t==="fa"?p7e():h7e()}),g7e=()=>"orx checks a few times a day on its own.",v7e=()=>"orx 每天会自动检查几次。",b7e=()=>"orx روزی چند بار خودکار بررسی می‌کند.",x7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v7e():t==="fa"?b7e():g7e()}),y7e=()=>"Choose a flavor",w7e=()=>"选择配置",S7e=()=>"انتخاب پیکربندی",k7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w7e():t==="fa"?S7e():y7e()}),C7e=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,E7e=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,N7e=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,z7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?E7e(e):t==="fa"?N7e(e):C7e(e)}),A7e=()=>"clean",T7e=()=>"无更改",j7e=()=>"بدون تغییر",M7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T7e():t==="fa"?j7e():A7e()}),R7e=e=>`Already linked at ${e==null?void 0:e.link}.`,D7e=e=>`已链接到 ${e==null?void 0:e.link}。`,L7e=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,O7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?D7e(e):t==="fa"?L7e(e):R7e(e)}),I7e=e=>`Linked ${e==null?void 0:e.link}.`,B7e=e=>`已链接 ${e==null?void 0:e.link}。`,$7e=e=>`${e==null?void 0:e.link} پیوند شد.`,H7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?B7e(e):t==="fa"?$7e(e):I7e(e)}),P7e=()=>"Connect",F7e=()=>"连接",U7e=()=>"اتصال",lx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F7e():t==="fa"?U7e():P7e()}),q7e=()=>"Connected via GitHub CLI",G7e=()=>"已通过 GitHub CLI 连接",V7e=()=>"از طریق GitHub CLI متصل است",_E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G7e():t==="fa"?V7e():q7e()}),W7e=()=>"Connecting…",K7e=()=>"正在连接…",Y7e=()=>"در حال اتصال…",pE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K7e():t==="fa"?Y7e():W7e()}),X7e=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",Z7e=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",Q7e=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",J7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z7e():t==="fa"?Q7e():X7e()}),eSe=()=>"the current project",tSe=()=>"当前项目",nSe=()=>"پروژهٔ فعلی",rSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tSe():t==="fa"?nSe():eSe()}),sSe=e=>`${e==null?void 0:e.value} (custom)`,iSe=e=>`${e==null?void 0:e.value}(自定义)`,aSe=e=>`${e==null?void 0:e.value} (سفارشی)`,oSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?iSe(e):t==="fa"?aSe(e):sSe(e)}),lSe=()=>"detached",cSe=()=>"分离头指针",uSe=()=>"جدا از شاخه",mE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cSe():t==="fa"?uSe():lSe()}),dSe=()=>"Disconnected",fSe=()=>"已断开连接",hSe=()=>"قطع اتصال",gE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fSe():t==="fa"?hSe():dSe()}),_Se=()=>"Environment broken",pSe=()=>"环境损坏",mSe=()=>"محیط خراب است",gSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pSe():t==="fa"?mSe():_Se()}),vSe=()=>"Environment not built",bSe=()=>"环境尚未构建",xSe=()=>"محیط ساخته نشده است",ySe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bSe():t==="fa"?xSe():vSe()}),wSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,SSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,kSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,CSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SSe(e):t==="fa"?kSe(e):wSe(e)}),ESe=()=>"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.",NSe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",zSe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",ASe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NSe():t==="fa"?zSe():ESe()}),TSe=()=>"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.",jSe=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",MSe=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",RSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jSe():t==="fa"?MSe():TSe()}),DSe=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",LSe=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",OSe=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",ISe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LSe():t==="fa"?OSe():DSe()}),BSe=()=>"has changes",$Se=()=>"有更改",HSe=()=>"دارای تغییر",PSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Se():t==="fa"?HSe():BSe()}),FSe=()=>"~/.cache/huggingface/token (hf auth login)",USe=()=>"~/.cache/huggingface/token(hf auth login)",qSe=()=>"~/.cache/huggingface/token (hf auth login)",GSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?USe():t==="fa"?qSe():FSe()}),VSe=()=>"HF_TOKEN environment variable",WSe=()=>"HF_TOKEN 环境变量",KSe=()=>"متغیر محیطی HF_TOKEN",YSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WSe():t==="fa"?KSe():VSe()}),XSe=()=>"~/.openresearch/env",ZSe=()=>"~/.openresearch/env",QSe=()=>"~/.openresearch/env",JSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZSe():t==="fa"?QSe():XSe()}),e8e=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}.`,t8e=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,n8e=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,r8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?t8e(e):t==="fa"?n8e(e):e8e(e)}),s8e=()=>"Install",i8e=()=>"安装",a8e=()=>"نصب",o8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i8e():t==="fa"?a8e():s8e()}),l8e=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.`,c8e=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,u8e=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,d8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?c8e(e):t==="fa"?u8e(e):l8e(e)}),f8e=e=>`Install the ${e==null?void 0:e.command} command`,h8e=e=>`安装 ${e==null?void 0:e.command} 命令`,_8e=e=>`نصب فرمان ${e==null?void 0:e.command}`,p8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h8e(e):t==="fa"?_8e(e):f8e(e)}),m8e=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",g8e=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",v8e=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",b8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g8e():t==="fa"?v8e():m8e()}),x8e=()=>"Install the new release now instead of waiting for the background update.",y8e=()=>"立即安装新版本,无需等待后台更新。",w8e=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",S8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y8e():t==="fa"?w8e():x8e()}),k8e=()=>"kubectl default",C8e=()=>"kubectl 默认值",E8e=()=>"پیش‌فرض kubectl",N8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C8e():t==="fa"?E8e():k8e()}),z8e=e=>`kubectl default (${e==null?void 0:e.context})`,A8e=e=>`kubectl 默认值(${e==null?void 0:e.context})`,T8e=e=>`پیش‌فرض kubectl (${e==null?void 0:e.context})`,j8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A8e(e):t==="fa"?T8e(e):z8e(e)}),M8e=()=>"Language",R8e=()=>"语言",D8e=()=>"زبان",L8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R8e():t==="fa"?D8e():M8e()}),O8e=e=>`Not signed in. Run ${e==null?void 0:e.command} in a terminal to connect your OpenResearch account.`,I8e=e=>`尚未登录。请在终端中运行 ${e==null?void 0:e.command} 以连接你的 OpenResearch 账户。`,B8e=e=>`وارد نشده‌اید. برای اتصال حساب OpenResearch خود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,$8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?I8e(e):t==="fa"?B8e(e):O8e(e)}),H8e=()=>"Make default",P8e=()=>"设为默认值",F8e=()=>"پیش‌فرض شود",U8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P8e():t==="fa"?F8e():H8e()}),q8e=e=>`The manifest must define one Job. orx injects the run script, environment, labels, and timeout. Use ${e==null?void 0:e.placeholder} in resource names, or override the default path with ${e==null?void 0:e.command}.`,G8e=e=>`清单必须定义一个 Job。orx 会注入运行脚本、环境、标签和超时设置。请在资源名称中使用 ${e==null?void 0:e.placeholder},或通过 ${e==null?void 0:e.command} 覆盖默认路径。`,V8e=e=>`مانیفست باید یک Job تعریف کند. orx اسکریپت اجرا، محیط، برچسب‌ها و مهلت زمانی را تزریق می‌کند. از ${e==null?void 0:e.placeholder} در نام منابع استفاده کنید، یا مسیر پیش‌فرض را با ${e==null?void 0:e.command} تغییر دهید.`,W8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?G8e(e):t==="fa"?V8e(e):q8e(e)}),K8e=()=>"Provisioned (Modal import failing)",Y8e=()=>"已预配(Modal 导入失败)",X8e=()=>"آماده شده (درون‌ریزی Modal ناموفق است)",Z8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y8e():t==="fa"?X8e():K8e()}),Q8e=()=>"MODAL_TOKEN_ID environment variable",J8e=()=>"MODAL_TOKEN_ID 环境变量",eke=()=>"متغیر محیطی MODAL_TOKEN_ID",tke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J8e():t==="fa"?eke():Q8e()}),nke=()=>"~/.modal.toml (modal token new)",rke=()=>"~/.modal.toml(modal token new)",ske=()=>"~/.modal.toml (modal token new)",ike=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rke():t==="fa"?ske():nke()}),ake=e=>`No Modal token found. Run ${e==null?void 0:e.command}, or add ${e==null?void 0:e.id} and ${e==null?void 0:e.secret} in the Environment tab.`,oke=e=>`未找到 Modal 令牌。请运行 ${e==null?void 0:e.command},或在“环境”标签页中添加 ${e==null?void 0:e.id} 和 ${e==null?void 0:e.secret}。`,lke=e=>`توکن Modal پیدا نشد. ${e==null?void 0:e.command} را اجرا کنید، یا ${e==null?void 0:e.id} و ${e==null?void 0:e.secret} را در زبانهٔ محیط اضافه کنید.`,cke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oke(e):t==="fa"?lke(e):ake(e)}),uke=()=>"~/.openresearch/env",dke=()=>"~/.openresearch/env",fke=()=>"~/.openresearch/env",hke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dke():t==="fa"?fke():uke()}),_ke=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,pke=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,mke=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,gke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pke(e):t==="fa"?mke(e):_ke(e)}),vke=e=>`Needs ${e==null?void 0:e.tool}`,bke=e=>`需要 ${e==null?void 0:e.tool}`,xke=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,yke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bke(e):t==="fa"?xke(e):vke(e)}),wke=()=>"Needs tools",Ske=()=>"缺少工具",kke=()=>"به ابزارها نیاز دارد",Cke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ske():t==="fa"?kke():wke()}),Eke=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Nke=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,zke=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,Ake=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Nke(e):t==="fa"?zke(e):Eke(e)}),Tke=()=>"New runs use SSH; choose a host when launching.",jke=()=>"新运行将使用 SSH;启动时请选择主机。",Mke=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",Rke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jke():t==="fa"?Mke():Tke()}),Dke=()=>"New token",Lke=()=>"新令牌",Oke=()=>"توکن جدید",Ike=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lke():t==="fa"?Oke():Dke()}),Bke=()=>"No default flavor",$ke=()=>"不设默认配置",Hke=()=>"بدون پیکربندی پیش‌فرض",Pke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ke():t==="fa"?Hke():Bke()}),Fke=()=>"none",Uke=()=>"无",qke=()=>"هیچ‌کدام",cx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uke():t==="fa"?qke():Fke()}),Gke=()=>"Not built yet",Vke=()=>"尚未构建",Wke=()=>"هنوز ساخته نشده",Kke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vke():t==="fa"?Wke():Gke()}),Yke=()=>"Not connected",Xke=()=>"未连接",Zke=()=>"متصل نیست",vE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xke():t==="fa"?Zke():Yke()}),Qke=()=>"not found on PATH",Jke=()=>"在 PATH 中未找到",eCe=()=>"در PATH پیدا نشد",tCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jke():t==="fa"?eCe():Qke()}),nCe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,rCe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,sCe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,iCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rCe(e):t==="fa"?sCe(e):nCe(e)}),aCe=()=>"not initialized",oCe=()=>"尚未初始化",lCe=()=>"راه‌اندازی نشده",cCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oCe():t==="fa"?lCe():aCe()}),uCe=()=>"Not set",dCe=()=>"未设置",fCe=()=>"تنظیم نشده",hCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dCe():t==="fa"?fCe():uCe()}),_Ce=()=>"OAuth (subscription login)",pCe=()=>"OAuth(订阅登录)",mCe=()=>"OAuth (ورود با اشتراک)",gCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pCe():t==="fa"?mCe():_Ce()}),vCe=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.`,bCe=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,xCe=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,yCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bCe(e):t==="fa"?xCe(e):vCe(e)}),wCe=()=>"Account",SCe=()=>"账户",kCe=()=>"حساب",ux=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SCe():t==="fa"?kCe():wCe()}),CCe=()=>"Add one with",ECe=()=>"使用以下命令添加:",NCe=()=>"یکی با این فرمان اضافه کنید:",zCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ECe():t==="fa"?NCe():CCe()}),ACe=()=>"Add variable",TCe=()=>"添加变量",jCe=()=>"افزودن متغیر",MCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TCe():t==="fa"?jCe():ACe()}),RCe=()=>"Agent models",DCe=()=>"智能体模型",LCe=()=>"مدل‌های عامل",OCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DCe():t==="fa"?LCe():RCe()}),ICe=()=>"Anonymous usage analytics",BCe=()=>"匿名使用情况分析",$Ce=()=>"تحلیل ناشناس استفاده",N7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BCe():t==="fa"?$Ce():ICe()}),HCe=()=>"Auth",PCe=()=>"身份验证",FCe=()=>"احراز هویت",UCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PCe():t==="fa"?FCe():HCe()}),qCe=()=>"Authentication",GCe=()=>"身份验证",VCe=()=>"احراز هویت",WCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GCe():t==="fa"?VCe():qCe()}),KCe=()=>"Back to Compute",YCe=()=>"返回算力设置",XCe=()=>"بازگشت به رایانش",bE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YCe():t==="fa"?XCe():KCe()}),ZCe=()=>"Backend",QCe=()=>"后端",JCe=()=>"بک‌اند",e9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QCe():t==="fa"?JCe():ZCe()}),t9e=()=>"Baseline",n9e=()=>"基线",r9e=()=>"خط مبنا",s9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n9e():t==="fa"?r9e():t9e()}),i9e=()=>"Binary",a9e=()=>"可执行文件",o9e=()=>"فایل اجرایی",l9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a9e():t==="fa"?o9e():i9e()}),c9e=()=>"Cancel",u9e=()=>"取消",d9e=()=>"لغو",dx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u9e():t==="fa"?d9e():c9e()}),f9e=()=>"Cancel new variable",h9e=()=>"取消新变量",_9e=()=>"لغو متغیر جدید",p9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h9e():t==="fa"?_9e():f9e()}),m9e=()=>"Checking compute targets…",g9e=()=>"正在检查算力目标…",v9e=()=>"در حال بررسی مقصدهای رایانشی…",b9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g9e():t==="fa"?v9e():m9e()}),x9e=()=>"Checking credentials…",y9e=()=>"正在检查凭据…",w9e=()=>"در حال بررسی اطلاعات ورود…",S9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y9e():t==="fa"?w9e():x9e()}),k9e=()=>"Checking kubectl…",C9e=()=>"正在检查 kubectl…",E9e=()=>"در حال بررسی kubectl…",N9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C9e():t==="fa"?E9e():k9e()}),z9e=()=>"Checking Modal…",A9e=()=>"正在检查 Modal…",T9e=()=>"در حال بررسی Modal…",j9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A9e():t==="fa"?T9e():z9e()}),M9e=()=>"Choose a preset flavor",R9e=()=>"选择预设规格",D9e=()=>"یک پیکربندی آماده انتخاب کنید",z7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R9e():t==="fa"?D9e():M9e()}),L9e=()=>"Cluster",O9e=()=>"集群",I9e=()=>"خوشه",B9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O9e():t==="fa"?I9e():L9e()}),$9e=()=>"cluster default",H9e=()=>"集群默认值",P9e=()=>"پیش‌فرض خوشه",A7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H9e():t==="fa"?P9e():$9e()}),F9e=()=>"cluster default (e.g. 4h, 30m)",U9e=()=>"集群默认值(例如 4h、30m)",q9e=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",G9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U9e():t==="fa"?q9e():F9e()}),V9e=()=>"Cluster unreachable",W9e=()=>"无法连接集群",K9e=()=>"خوشه در دسترس نیست",Y9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W9e():t==="fa"?K9e():V9e()}),X9e=()=>"Compute",Z9e=()=>"算力",Q9e=()=>"رایانش",xE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z9e():t==="fa"?Q9e():X9e()}),J9e=()=>"Connect compute backends and choose where new runs execute.",eEe=()=>"连接算力后端,并选择新运行的执行位置。",tEe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",nEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eEe():t==="fa"?tEe():J9e()}),rEe=()=>"Connected",sEe=()=>"已连接",iEe=()=>"متصل",fx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sEe():t==="fa"?iEe():rEe()}),aEe=()=>"Context",oEe=()=>"上下文",lEe=()=>"زمینه",cEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oEe():t==="fa"?lEe():aEe()}),uEe=()=>"Current",dEe=()=>"当前",fEe=()=>"فعلی",hEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dEe():t==="fa"?fEe():uEe()}),_Ee=()=>"Currently off:",pEe=()=>"当前已关闭:",mEe=()=>"اکنون خاموش است:",gEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pEe():t==="fa"?mEe():_Ee()}),vEe=()=>"Custom flavor",bEe=()=>"自定义规格",xEe=()=>"پیکربندی سفارشی",yEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bEe():t==="fa"?xEe():vEe()}),wEe=()=>"Custom flavor…",SEe=()=>"自定义规格…",kEe=()=>"پیکربندی سفارشی…",CEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SEe():t==="fa"?kEe():wEe()}),EEe=()=>"Data directory",NEe=()=>"数据目录",zEe=()=>"پوشهٔ داده",AEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NEe():t==="fa"?zEe():EEe()}),TEe=()=>"default",jEe=()=>"默认",MEe=()=>"پیش‌فرض",REe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jEe():t==="fa"?MEe():TEe()}),DEe=()=>"Default",LEe=()=>"默认",OEe=()=>"پیش‌فرض",yE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LEe():t==="fa"?OEe():DEe()}),IEe=()=>"Default destination",BEe=()=>"默认目标",$Ee=()=>"مقصد پیش‌فرض",HEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BEe():t==="fa"?$Ee():IEe()}),PEe=()=>"Detecting hardware…",FEe=()=>"正在检测硬件…",UEe=()=>"در حال شناسایی سخت‌افزار…",qEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FEe():t==="fa"?UEe():PEe()}),GEe=()=>"Detecting harnesses…",VEe=()=>"正在检测智能体工具…",WEe=()=>"در حال شناسایی ابزارهای عامل…",KEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VEe():t==="fa"?WEe():GEe()}),YEe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",XEe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",ZEe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",QEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XEe():t==="fa"?ZEe():YEe()}),JEe=()=>"Effective URL",eNe=()=>"实际使用的网址",tNe=()=>"نشانی مؤثر",nNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eNe():t==="fa"?tNe():JEe()}),rNe=()=>"Enable GitHub syncing for new projects",sNe=()=>"为新项目启用 GitHub 同步",iNe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",T7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sNe():t==="fa"?iNe():rNe()}),aNe=()=>"Environment",oNe=()=>"环境",lNe=()=>"محیط",hx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oNe():t==="fa"?lNe():aNe()}),cNe=()=>"Failed",uNe=()=>"失败",dNe=()=>"ناموفق",_x=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uNe():t==="fa"?dNe():cNe()}),fNe=()=>"General",hNe=()=>"常规",_Ne=()=>"عمومی",pNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hNe():t==="fa"?_Ne():fNe()}),mNe=()=>"GitHub publishing",gNe=()=>"GitHub 发布",vNe=()=>"انتشار در GitHub",bNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gNe():t==="fa"?vNe():mNe()}),xNe=()=>"Git token",yNe=()=>"Git 令牌",wNe=()=>"توکن Git",SNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yNe():t==="fa"?wNe():xNe()}),kNe=()=>"Harnesses",CNe=()=>"智能体工具",ENe=()=>"ابزارهای عامل",NNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CNe():t==="fa"?ENe():kNe()}),zNe=()=>"hf_…",ANe=()=>"hf_…",TNe=()=>"hf_…",jNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ANe():t==="fa"?TNe():zNe()}),MNe=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",RNe=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",DNe=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",LNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RNe():t==="fa"?DNe():MNe()}),ONe=()=>"Hostname",INe=()=>"主机名",BNe=()=>"نام میزبان",$Ne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?INe():t==="fa"?BNe():ONe()}),HNe=()=>"How it connects",PNe=()=>"连接方式",FNe=()=>"نحوهٔ اتصال",UNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PNe():t==="fa"?FNe():HNe()}),qNe=()=>"Initialize Git",GNe=()=>"初始化 Git",VNe=()=>"راه‌اندازی Git",WNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GNe():t==="fa"?VNe():qNe()}),KNe=()=>"Install",YNe=()=>"安装",XNe=()=>"نصب",ZNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YNe():t==="fa"?XNe():KNe()}),QNe=()=>"Install broken",JNe=()=>"安装损坏",eze=()=>"نصب خراب است",tze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JNe():t==="fa"?eze():QNe()}),nze=()=>"Install GitHub CLI",rze=()=>"安装 GitHub CLI",sze=()=>"نصب GitHub CLI",ize=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rze():t==="fa"?sze():nze()}),aze=()=>"Install updates automatically",oze=()=>"自动安装更新",lze=()=>"نصب خودکار به‌روزرسانی‌ها",j7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oze():t==="fa"?lze():aze()}),cze=()=>"Instance history",uze=()=>"实例历史",dze=()=>"تاریخچهٔ نمونه‌ها",fze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uze():t==="fa"?dze():cze()}),hze=()=>"Invalid token",_ze=()=>"令牌无效",pze=()=>"توکن نامعتبر",mze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_ze():t==="fa"?pze():hze()}),gze=()=>"Jobs",vze=()=>"Jobs",bze=()=>"Jobs",xze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vze():t==="fa"?bze():gze()}),yze=()=>"Jobs / Dashboard URL",wze=()=>"Jobs / 控制台网址",Sze=()=>"نشانی Jobs / داشبورد",kze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wze():t==="fa"?Sze():yze()}),Cze=()=>"Jobs permission unknown",Eze=()=>"Jobs 权限未知",Nze=()=>"مجوز Jobs نامشخص است",zze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eze():t==="fa"?Nze():Cze()}),Aze=()=>"Jobs: write OK",Tze=()=>"Jobs:写入正常",jze=()=>"Jobs: نوشتن مجاز است",Mze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tze():t==="fa"?jze():Aze()}),Rze=()=>"kubectl not found",Dze=()=>"未找到 kubectl",Lze=()=>"kubectl پیدا نشد",Oze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dze():t==="fa"?Lze():Rze()}),Ize=()=>"Latest",Bze=()=>"最新版本",$ze=()=>"جدیدترین",Hze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bze():t==="fa"?$ze():Ize()}),Pze=()=>"Loading…",Fze=()=>"正在加载…",Uze=()=>"در حال بارگیری…",zl=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fze():t==="fa"?Uze():Pze()}),qze=()=>"Loading Ray settings…",Gze=()=>"正在加载 Ray 设置…",Vze=()=>"در حال بارگیری تنظیمات Ray…",Wze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gze():t==="fa"?Vze():qze()}),Kze=()=>"Loading slurm settings…",Yze=()=>"正在加载 Slurm 设置…",Xze=()=>"در حال بارگیری تنظیمات Slurm…",Zze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yze():t==="fa"?Xze():Kze()}),Qze=()=>"Loading status…",Jze=()=>"正在加载状态…",eAe=()=>"در حال بارگیری وضعیت…",tAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jze():t==="fa"?eAe():Qze()}),nAe=()=>"Local only",rAe=()=>"仅本地",sAe=()=>"فقط محلی",iAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rAe():t==="fa"?sAe():nAe()}),aAe=()=>"Local repository",oAe=()=>"本地仓库",lAe=()=>"مخزن محلی",cAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oAe():t==="fa"?lAe():aAe()}),uAe=()=>"Login node",dAe=()=>"登录节点",fAe=()=>"گرهٔ ورود",hAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dAe():t==="fa"?fAe():uAe()}),_Ae=()=>"Make GitHub syncing the default?",pAe=()=>"将 GitHub 同步设为默认值?",mAe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",gAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pAe():t==="fa"?mAe():_Ae()}),vAe=()=>"Missing bash/tar",bAe=()=>"缺少 bash/tar",xAe=()=>"bash/tar موجود نیست",yAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bAe():t==="fa"?xAe():vAe()}),wAe=()=>"More compute options",SAe=()=>"更多算力选项",kAe=()=>"گزینه‌های رایانشی بیشتر",CAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SAe():t==="fa"?kAe():wAe()}),EAe=()=>"Move failed:",NAe=()=>"移动失败:",zAe=()=>"انتقال ناموفق بود:",AAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NAe():t==="fa"?zAe():EAe()}),TAe=()=>"Moved. orx is now using the new location.",jAe=()=>"已移动。orx 现在使用新位置。",MAe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",RAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jAe():t==="fa"?MAe():TAe()}),DAe=()=>"Namespace",LAe=()=>"命名空间",OAe=()=>"فضای نام",IAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LAe():t==="fa"?OAe():DAe()}),BAe=()=>"New location",$Ae=()=>"新位置",HAe=()=>"محل جدید",PAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ae():t==="fa"?HAe():BAe()}),FAe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",UAe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",qAe=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",GAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UAe():t==="fa"?qAe():FAe()}),VAe=()=>"New variable key",WAe=()=>"新变量键名",KAe=()=>"کلید متغیر جدید",YAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WAe():t==="fa"?KAe():VAe()}),XAe=()=>"New variable value",ZAe=()=>"新变量值",QAe=()=>"مقدار متغیر جدید",JAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZAe():t==="fa"?QAe():XAe()}),eTe=()=>"No code, prompts, file contents, or account identifiers are sent.",tTe=()=>"不会发送代码、提示词、文件内容或账户标识符。",nTe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",rTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tTe():t==="fa"?nTe():eTe()}),sTe=()=>"No hosts found in ~/.ssh/config.",iTe=()=>"在 ~/.ssh/config 中未找到主机。",aTe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",oTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iTe():t==="fa"?aTe():sTe()}),lTe=()=>"No job-create permission",cTe=()=>"没有创建 Job 的权限",uTe=()=>"مجوز ساخت Job وجود ندارد",dTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cTe():t==="fa"?uTe():lTe()}),fTe=()=>"No job.write permission",hTe=()=>"没有 job.write 权限",_Te=()=>"مجوز job.write وجود ندارد",pTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hTe():t==="fa"?_Te():fTe()}),mTe=()=>"No key on this computer to register — load a registered key with",gTe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",vTe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",bTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gTe():t==="fa"?vTe():mTe()}),xTe=()=>"No key on this computer yet — create one with",yTe=()=>"此计算机上还没有密钥——使用以下命令创建:",wTe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",STe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yTe():t==="fa"?wTe():xTe()}),kTe=()=>"No Slurm CLI",CTe=()=>"无 Slurm CLI",ETe=()=>"بدون CLI اسلورم",NTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CTe():t==="fa"?ETe():kTe()}),zTe=()=>"No token",ATe=()=>"无令牌",TTe=()=>"بدون توکن",jTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ATe():t==="fa"?TTe():zTe()}),MTe=()=>"None registered",RTe=()=>"未注册任何密钥",DTe=()=>"هیچ‌کدام ثبت نشده",LTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RTe():t==="fa"?DTe():MTe()}),OTe=()=>"Not checked",ITe=()=>"未检查",BTe=()=>"بررسی نشده",wE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ITe():t==="fa"?BTe():OTe()}),$Te=()=>"Not configured",HTe=()=>"未配置",PTe=()=>"پیکربندی نشده",jp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HTe():t==="fa"?PTe():$Te()}),FTe=()=>"Not installed",UTe=()=>"未安装",qTe=()=>"نصب نیست",GTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UTe():t==="fa"?qTe():FTe()}),VTe=()=>"Not now",WTe=()=>"暂不",KTe=()=>"اکنون نه",YTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WTe():t==="fa"?KTe():VTe()}),XTe=()=>"Not on this computer",ZTe=()=>"不在此计算机上",QTe=()=>"روی این رایانه نیست",JTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZTe():t==="fa"?QTe():XTe()}),eje=()=>"Not set (pass --host per launch)",tje=()=>"未设置(每次启动时传入 --host)",nje=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",rje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tje():t==="fa"?nje():eje()}),sje=()=>"Not set up",ije=()=>"未设置",aje=()=>"راه‌اندازی نشده",oje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ije():t==="fa"?aje():sje()}),lje=()=>"Not signed in",cje=()=>"未登录",uje=()=>"وارد نشده",dje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cje():t==="fa"?uje():lje()}),fje=()=>"On this computer",hje=()=>"在此计算机上",_je=()=>"روی این رایانه",pje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hje():t==="fa"?_je():fje()}),mje=()=>"Open a project to inspect its repository and GitHub publication state.",gje=()=>"打开项目以查看其仓库和 GitHub 发布状态。",vje=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",bje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gje():t==="fa"?vje():mje()}),xje=()=>"Open job page",yje=()=>"打开作业页面",wje=()=>"باز کردن صفحهٔ کار",M7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yje():t==="fa"?wje():xje()}),Sje=()=>"Open on GitHub",kje=()=>"在 GitHub 上打开",Cje=()=>"باز کردن در GitHub",R7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kje():t==="fa"?Cje():Sje()}),Eje=()=>", or create one with",Nje=()=>",或使用以下命令创建:",zje=()=>"، یا با این فرمان یکی بسازید:",Aje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nje():t==="fa"?zje():Eje()}),Tje=()=>"Org",jje=()=>"组织",Mje=()=>"سازمان",Rje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jje():t==="fa"?Mje():Tje()}),Dje=()=>"Orgs",Lje=()=>"组织",Oje=()=>"سازمان‌ها",Ije=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lje():t==="fa"?Oje():Dje()}),Bje=()=>"orx can't update this install",$je=()=>"orx 无法更新此安装",Hje=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",Pje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$je():t==="fa"?Hje():Bje()}),Fje=()=>"Overleaf",Uje=()=>"Overleaf",qje=()=>"Overleaf",Gje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uje():t==="fa"?qje():Fje()}),Vje=()=>"Overleaf Git authentication token",Wje=()=>"Overleaf Git 身份验证令牌",Kje=()=>"توکن احراز هویت Git در Overleaf",Yje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wje():t==="fa"?Kje():Vje()}),Xje=()=>"Overridden by env",Zje=()=>"已被环境变量覆盖",Qje=()=>"بازنویسی‌شده توسط محیط",Jje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zje():t==="fa"?Qje():Xje()}),eMe=()=>"Partition",tMe=()=>"分区",nMe=()=>"پارتیشن",rMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tMe():t==="fa"?nMe():eMe()}),sMe=()=>"Partitions",iMe=()=>"分区",aMe=()=>"پارتیشن‌ها",oMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iMe():t==="fa"?aMe():sMe()}),lMe=()=>"Path",cMe=()=>"路径",uMe=()=>"مسیر",dMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cMe():t==="fa"?uMe():lMe()}),fMe=()=>"Plan",hMe=()=>"方案",_Me=()=>"سطح اشتراک",pMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hMe():t==="fa"?_Me():fMe()}),mMe=()=>"Project",gMe=()=>"项目",vMe=()=>"پروژه",bMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gMe():t==="fa"?vMe():mMe()}),xMe=()=>"Ray version",yMe=()=>"Ray 版本",wMe=()=>"نسخهٔ Ray",SMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yMe():t==="fa"?wMe():xMe()}),kMe=()=>"Reachable",CMe=()=>"可访问",EMe=()=>"در دسترس",NMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CMe():t==="fa"?EMe():kMe()}),zMe=()=>"Reading ~/.ssh/config…",AMe=()=>"正在读取 ~/.ssh/config…",TMe=()=>"در حال خواندن ‎~/.ssh/config…",jMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AMe():t==="fa"?TMe():zMe()}),MMe=()=>"Ready",RMe=()=>"就绪",DMe=()=>"آماده",px=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RMe():t==="fa"?DMe():MMe()}),LMe=()=>"Ready to move",OMe=()=>"可以移动",IMe=()=>"آمادهٔ انتقال",BMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OMe():t==="fa"?IMe():LMe()}),$Me=()=>"Ready to use",HMe=()=>"可用",PMe=()=>"آمادهٔ استفاده",FMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HMe():t==="fa"?PMe():$Me()}),UMe=()=>"Refresh",qMe=()=>"刷新",GMe=()=>"تازه‌سازی",Mp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qMe():t==="fa"?GMe():UMe()}),VMe=()=>"Remotes",WMe=()=>"远程仓库",KMe=()=>"مخزن‌های دوردست",YMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WMe():t==="fa"?KMe():VMe()}),XMe=()=>"Repository",ZMe=()=>"仓库",QMe=()=>"مخزن",JMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZMe():t==="fa"?QMe():XMe()}),eRe=()=>"Restart to finish updating",tRe=()=>"重新启动以完成更新",nRe=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",rRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tRe():t==="fa"?nRe():eRe()}),sRe=()=>"Run manifest",iRe=()=>"运行清单",aRe=()=>"مانیفست اجرا",oRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iRe():t==="fa"?aRe():sRe()}),lRe=()=>"Running instances",cRe=()=>"正在运行的实例",uRe=()=>"نمونه‌های در حال اجرا",dRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cRe():t==="fa"?uRe():lRe()}),fRe=()=>"Runtime",hRe=()=>"运行时间",_Re=()=>"زمان اجرا",pRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hRe():t==="fa"?_Re():fRe()}),mRe=()=>". Save it under that key if it's meant for HF Jobs.",gRe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",vRe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",bRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gRe():t==="fa"?vRe():mRe()}),xRe=()=>"Settings",yRe=()=>"设置",wRe=()=>"تنظیمات",SE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yRe():t==="fa"?wRe():xRe()}),SRe=()=>"Signed in",kRe=()=>"已登录",CRe=()=>"وارد شده",kE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kRe():t==="fa"?CRe():SRe()}),ERe=()=>"Source",NRe=()=>"来源",zRe=()=>"منبع",mx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NRe():t==="fa"?zRe():ERe()}),ARe=()=>"SSH key",TRe=()=>"SSH 密钥",jRe=()=>"کلید SSH",MRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TRe():t==="fa"?jRe():ARe()}),RRe=()=>"Started",DRe=()=>"开始时间",LRe=()=>"آغاز",ORe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DRe():t==="fa"?LRe():RRe()}),IRe=()=>"State",BRe=()=>"状态",$Re=()=>"وضعیت",HRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BRe():t==="fa"?$Re():IRe()}),PRe=()=>"Status",FRe=()=>"状态",URe=()=>"وضعیت",Rp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FRe():t==="fa"?URe():PRe()}),qRe=()=>"Storage",GRe=()=>"存储",VRe=()=>"ذخیره‌سازی",WRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GRe():t==="fa"?VRe():qRe()}),KRe=()=>"Sync",YRe=()=>"同步",XRe=()=>"همگام‌سازی",ZRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YRe():t==="fa"?XRe():KRe()}),QRe=()=>"Syncing off",JRe=()=>"同步已关闭",eDe=()=>"همگام‌سازی خاموش",tDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JRe():t==="fa"?eDe():QRe()}),nDe=()=>"System",rDe=()=>"系统",sDe=()=>"سامانه",iDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rDe():t==="fa"?sDe():nDe()}),aDe=()=>"Test connection",oDe=()=>"测试连接",lDe=()=>"آزمایش اتصال",cDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oDe():t==="fa"?lDe():aDe()}),uDe=()=>"Testing…",dDe=()=>"正在测试…",fDe=()=>"در حال آزمایش…",hDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dDe():t==="fa"?fDe():uDe()}),_De=()=>", then add it with",pDe=()=>",然后使用以下命令添加:",mDe=()=>"، سپس با این فرمان اضافه‌اش کنید:",gDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pDe():t==="fa"?mDe():_De()}),vDe=()=>"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.",bDe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",xDe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",yDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bDe():t==="fa"?xDe():vDe()}),wDe=()=>"This saved destination is not configured. Set it up below or choose another backend.",SDe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",kDe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",CDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SDe():t==="fa"?kDe():wDe()}),EDe=()=>"This value looks like a Hugging Face token — compute runs only read it from",NDe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",zDe=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",ADe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NDe():t==="fa"?zDe():EDe()}),TDe=()=>"Time limit",jDe=()=>"时间限制",MDe=()=>"محدودیت زمانی",RDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jDe():t==="fa"?MDe():TDe()}),DDe=()=>"Token",LDe=()=>"令牌",ODe=()=>"توکن",CE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LDe():t==="fa"?ODe():DDe()}),IDe=()=>"Unable to verify",BDe=()=>"无法验证",$De=()=>"تأیید ممکن نیست",HDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BDe():t==="fa"?$De():IDe()}),PDe=()=>"Unknown",FDe=()=>"未知",UDe=()=>"نامشخص",EE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FDe():t==="fa"?UDe():PDe()}),qDe=()=>"Update required",GDe=()=>"需要更新",VDe=()=>"نیازمند به‌روزرسانی",WDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GDe():t==="fa"?VDe():qDe()}),KDe=()=>"Updates",YDe=()=>"更新",XDe=()=>"به‌روزرسانی‌ها",D7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YDe():t==="fa"?XDe():KDe()}),ZDe=()=>"Usage analytics",QDe=()=>"使用情况分析",JDe=()=>"تحلیل استفاده",eLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QDe():t==="fa"?JDe():ZDe()}),tLe=()=>"value",nLe=()=>"值",rLe=()=>"مقدار",NE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nLe():t==="fa"?rLe():tLe()}),sLe=()=>"Variables available to runs and the research agent (API keys, tokens).",iLe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",aLe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",oLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iLe():t==="fa"?aLe():sLe()}),lLe=()=>"Version",cLe=()=>"版本",uLe=()=>"نسخه",zE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cLe():t==="fa"?uLe():lLe()}),dLe=()=>"What happens",fLe=()=>"执行内容",hLe=()=>"چه اتفاقی می‌افتد",_Le=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fLe():t==="fa"?hLe():dLe()}),pLe=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",mLe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",gLe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",vLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mLe():t==="fa"?gLe():pLe()}),bLe=()=>"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.",xLe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",yLe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",wLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xLe():t==="fa"?yLe():bLe()}),SLe=()=>"Pick a login node first",kLe=()=>"请先选择登录节点",CLe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",ELe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kLe():t==="fa"?CLe():SLe()}),NLe=()=>"Providers",zLe=()=>"提供商",ALe=()=>"ارائه‌دهندگان",TLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zLe():t==="fa"?ALe():NLe()}),jLe=()=>"Reconnect",MLe=()=>"重新连接",RLe=()=>"اتصال دوباره",AE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MLe():t==="fa"?RLe():jLe()}),DLe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,LLe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,OLe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,ILe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?LLe(e):t==="fa"?OLe(e):DLe(e)}),BLe=()=>"Reinstall with the orx installer to get automatic updates.",$Le=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",HLe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",PLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Le():t==="fa"?HLe():BLe()}),FLe=()=>"Re-link",ULe=()=>"重新链接",qLe=()=>"پیوند دوباره",GLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ULe():t==="fa"?qLe():FLe()}),VLe=()=>"Remove token",WLe=()=>"移除令牌",KLe=()=>"حذف توکن",YLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WLe():t==="fa"?KLe():VLe()}),XLe=()=>"Removing…",ZLe=()=>"正在移除…",QLe=()=>"در حال حذف…",JLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZLe():t==="fa"?QLe():XLe()}),eOe=()=>"Replace anyway",tOe=()=>"仍要替换",nOe=()=>"به‌هرحال جایگزین کن",rOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tOe():t==="fa"?nOe():eOe()}),sOe=()=>"Replace token",iOe=()=>"替换令牌",aOe=()=>"جایگزینی توکن",oOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iOe():t==="fa"?aOe():sOe()}),lOe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,cOe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,uOe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,dOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?cOe(e):t==="fa"?uOe(e):lOe(e)}),fOe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,hOe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,_Oe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,pOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hOe(e):t==="fa"?_Oe(e):fOe(e)}),mOe=()=>"Run `gh auth login` in your terminal.",gOe=()=>"请在终端中运行 `gh auth login`。",vOe=()=>"در پایانه `gh auth login` را اجرا کنید.",bOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gOe():t==="fa"?vOe():mOe()}),xOe=()=>"Saved",yOe=()=>"已保存",wOe=()=>"ذخیره شده",SOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yOe():t==="fa"?wOe():xOe()}),kOe=()=>"Set up",COe=()=>"设置",EOe=()=>"راه‌اندازی",NOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?COe():t==="fa"?EOe():kOe()}),zOe=()=>"Set up environment",AOe=()=>"设置环境",TOe=()=>"راه‌اندازی محیط",jOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AOe():t==="fa"?TOe():zOe()}),MOe=()=>"Setting up… (~30–60s)",ROe=()=>"正在设置…(约 30–60 秒)",DOe=()=>"در حال راه‌اندازی… (حدود ۳۰ تا ۶۰ ثانیه)",LOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ROe():t==="fa"?DOe():MOe()}),OOe=()=>"Sign in",IOe=()=>"登录",BOe=()=>"ورود",$Oe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IOe():t==="fa"?BOe():OOe()}),HOe=()=>"The SSH connection closed before setup completed.",POe=()=>"SSH 连接在设置完成前已关闭。",FOe=()=>"اتصال SSH پیش از تکمیل راه‌اندازی بسته شد.",L7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?POe():t==="fa"?FOe():HOe()}),UOe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,qOe=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,GOe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,TE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qOe(e):t==="fa"?GOe(e):UOe(e)}),VOe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",WOe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",KOe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",YOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WOe():t==="fa"?KOe():VOe()}),XOe=()=>"Dark",ZOe=()=>"深色",QOe=()=>"تیره",JOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZOe():t==="fa"?QOe():XOe()}),eIe=()=>"Theme",tIe=()=>"主题",nIe=()=>"پوسته",O7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tIe():t==="fa"?nIe():eIe()}),rIe=()=>"Light",sIe=()=>"浅色",iIe=()=>"روشن",aIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sIe():t==="fa"?iIe():rIe()}),oIe=()=>"System",lIe=()=>"系统",cIe=()=>"سیستم",uIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lIe():t==="fa"?cIe():oIe()}),dIe=()=>"Update now",fIe=()=>"立即更新",hIe=()=>"اکنون به‌روزرسانی کن",_Ie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fIe():t==="fa"?hIe():dIe()}),pIe=e=>`Update to ${e==null?void 0:e.version}`,mIe=e=>`更新到 ${e==null?void 0:e.version}`,gIe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,vIe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mIe(e):t==="fa"?gIe(e):pIe(e)}),bIe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",xIe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",yIe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",wIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xIe():t==="fa"?yIe():bIe()}),SIe=()=>"Updating default destination…",kIe=()=>"正在更新默认运行位置…",CIe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",EIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kIe():t==="fa"?CIe():SIe()}),NIe=()=>"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.",zIe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",AIe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",TIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zIe():t==="fa"?AIe():NIe()}),jIe=()=>"Validating…",MIe=()=>"正在验证…",RIe=()=>"در حال اعتبارسنجی…",DIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MIe():t==="fa"?RIe():jIe()}),LIe=()=>"View settings",OIe=()=>"查看设置",IIe=()=>"مشاهدهٔ تنظیمات",BIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OIe():t==="fa"?IIe():LIe()}),$Ie=()=>"Skill",HIe=()=>"技能",PIe=()=>"مهارت",jE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HIe():t==="fa"?PIe():$Ie()}),FIe=()=>"Loading skill…",UIe=()=>"正在加载技能…",qIe=()=>"در حال بارگیری مهارت…",GIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UIe():t==="fa"?qIe():FIe()}),VIe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,WIe=e=>`删除技能“${e==null?void 0:e.name}”?`,KIe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,YIe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?WIe(e):t==="fa"?KIe(e):VIe(e)}),XIe=e=>`Delete skill ${e==null?void 0:e.name}`,ZIe=e=>`删除技能 ${e==null?void 0:e.name}`,QIe=e=>`حذف مهارت ${e==null?void 0:e.name}`,JIe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ZIe(e):t==="fa"?QIe(e):XIe(e)}),eBe=e=>`Delete the “${e==null?void 0:e.name}” template?`,tBe=e=>`删除模板“${e==null?void 0:e.name}”?`,nBe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,rBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?tBe(e):t==="fa"?nBe(e):eBe(e)}),sBe=e=>`Delete template ${e==null?void 0:e.name}`,iBe=e=>`删除模板 ${e==null?void 0:e.name}`,aBe=e=>`حذف قالب ${e==null?void 0:e.name}`,oBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?iBe(e):t==="fa"?aBe(e):sBe(e)}),lBe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",cBe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",uBe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",dBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cBe():t==="fa"?uBe():lBe()}),fBe=()=>"Drop a SKILL.md or .zip here, or click to choose",hBe=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",_Be=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",pBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hBe():t==="fa"?_Be():fBe()}),mBe=()=>"Drop a .tex or .zip here, or click to choose",gBe=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",vBe=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",bBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gBe():t==="fa"?vBe():mBe()}),xBe=()=>"File too large (max 20 MB).",yBe=()=>"文件过大(最大 20 MB)。",wBe=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",ME=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yBe():t==="fa"?wBe():xBe()}),SBe=()=>" + 1 file",kBe=()=>" + 1 个文件",CBe=()=>" + ۱ فایل",EBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kBe():t==="fa"?CBe():SBe()}),NBe=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",zBe=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",ABe=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",TBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zBe():t==="fa"?ABe():NBe()}),jBe=e=>` + ${e==null?void 0:e.count} files`,MBe=e=>` + ${e==null?void 0:e.count} 个文件`,RBe=e=>` + ${e==null?void 0:e.count} فایل`,DBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?MBe(e):t==="fa"?RBe(e):jBe(e)}),LBe=()=>"Could not load skills:",OBe=()=>"无法加载技能:",IBe=()=>"بارگیری مهارت‌ها ممکن نشد:",BBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OBe():t==="fa"?IBe():LBe()}),$Be=()=>"Could not load templates:",HBe=()=>"无法加载模板:",PBe=()=>"بارگیری قالب‌ها ممکن نشد:",FBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HBe():t==="fa"?PBe():$Be()}),UBe=()=>"Customize",qBe=()=>"自定义",GBe=()=>"سفارشی‌سازی",VBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qBe():t==="fa"?GBe():UBe()}),WBe=()=>"Delete skill",KBe=()=>"删除技能",YBe=()=>"حذف مهارت",XBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KBe():t==="fa"?YBe():WBe()}),ZBe=()=>"Delete template",QBe=()=>"删除模板",JBe=()=>"حذف قالب",e$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QBe():t==="fa"?JBe():ZBe()}),t$e=()=>"LaTeX templates",n$e=()=>"LaTeX 模板",r$e=()=>"قالب‌های LaTeX",s$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n$e():t==="fa"?r$e():t$e()}),i$e=()=>"Loading skills…",a$e=()=>"正在加载技能…",o$e=()=>"در حال بارگیری مهارت‌ها…",l$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a$e():t==="fa"?o$e():i$e()}),c$e=()=>"Loading templates…",u$e=()=>"正在加载模板…",d$e=()=>"در حال بارگیری قالب‌ها…",f$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u$e():t==="fa"?d$e():c$e()}),h$e=()=>"No skills yet.",_$e=()=>"尚无技能。",p$e=()=>"هنوز مهارتی وجود ندارد.",m$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_$e():t==="fa"?p$e():h$e()}),g$e=()=>"No templates yet.",v$e=()=>"尚无模板。",b$e=()=>"هنوز قالبی وجود ندارد.",x$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v$e():t==="fa"?b$e():g$e()}),y$e=()=>"Skills",w$e=()=>"技能",S$e=()=>"مهارت‌ها",k$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w$e():t==="fa"?S$e():y$e()}),C$e=()=>"Uploading…",E$e=()=>"正在上传…",N$e=()=>"در حال بارگذاری…",z$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E$e():t==="fa"?N$e():C$e()}),A$e=()=>"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. With exactly one template available, the agent uses it without asking.",T$e=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",j$e=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",M$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T$e():t==="fa"?j$e():A$e()}),R$e=()=>"Upload a SKILL.md file or a .zip of a skill folder.",D$e=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",L$e=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",O$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D$e():t==="fa"?L$e():R$e()}),I$e=()=>"Upload a .tex file or a .zip of a template folder.",B$e=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",$$e=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",H$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B$e():t==="fa"?$$e():I$e()}),P$e=()=>"Cancelled",F$e=()=>"已取消",U$e=()=>"لغوشده",q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F$e():t==="fa"?U$e():P$e()}),G$e=()=>"Cancelling",V$e=()=>"正在取消",W$e=()=>"در حال لغو",K$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V$e():t==="fa"?W$e():G$e()}),Y$e=()=>"Done",X$e=()=>"已完成",Z$e=()=>"انجام‌شده",Q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X$e():t==="fa"?Z$e():Y$e()}),J$e=()=>"Editing",eHe=()=>"正在编辑",tHe=()=>"در حال ویرایش",nHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eHe():t==="fa"?tHe():J$e()}),rHe=()=>"Failed",sHe=()=>"失败",iHe=()=>"ناموفق",aHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sHe():t==="fa"?iHe():rHe()}),oHe=()=>"Idle",lHe=()=>"空闲",cHe=()=>"بی‌کار",uHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lHe():t==="fa"?cHe():oHe()}),dHe=()=>"Running",fHe=()=>"运行中",hHe=()=>"در حال اجرا",_He=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fHe():t==="fa"?hHe():dHe()}),pHe=()=>"Starting",mHe=()=>"正在启动",gHe=()=>"در حال آغاز",vHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mHe():t==="fa"?gHe():pHe()}),bHe=()=>"Copying…",xHe=()=>"正在复制…",yHe=()=>"در حال کپی…",wHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xHe():t==="fa"?yHe():bHe()}),SHe=()=>"Finalizing…",kHe=()=>"正在完成…",CHe=()=>"در حال نهایی‌سازی…",EHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kHe():t==="fa"?CHe():SHe()}),NHe=e=>`${e==null?void 0:e.size} free at target`,zHe=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,AHe=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,THe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zHe(e):t==="fa"?AHe(e):NHe(e)}),jHe=e=>`Move all orx data to: +رونوشت آن برای همیشه حذف خواهد شد.`,QW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XW(e):t==="fa"?ZW(e):YW(e)}),JW=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,eK=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,tK=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,nK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eK(e):t==="fa"?tK(e):JW(e)}),rK=()=>"Could not exit Plan mode. Try again.",sK=()=>"无法退出计划模式。请重试。",iK=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",aK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sK():t==="fa"?iK():rK()}),oK=()=>"Expand tool activity",lK=()=>"展开工具活动",cK=()=>"باز کردن فعالیت ابزارها",uK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lK():t==="fa"?cK():oK()}),dK=()=>"experiments",fK=()=>"实验",hK=()=>"آزمایش‌ها",_K=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fK():t==="fa"?hK():dK()}),pK=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,mK=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,gK=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,vK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mK(e):t==="fa"?gK(e):pK(e)}),bK=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills)`,xK=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能)`,yK=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها)`,wK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xK(e):t==="fa"?yK(e):bK(e)}),SK=e=>`Message not sent: ${e==null?void 0:e.error}`,kK=e=>`消息未发送:${e==null?void 0:e.error}`,CK=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,EK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kK(e):t==="fa"?CK(e):SK(e)}),NK=()=>"New session",zK=()=>"新会话",AK=()=>"نشست جدید",j6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zK():t==="fa"?AK():NK()}),TK=()=>"No active sessions",jK=()=>"没有活跃会话",MK=()=>"نشست فعالی وجود ندارد",RK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jK():t==="fa"?MK():TK()}),DK=()=>"No activity",LK=()=>"无活动",OK=()=>"بدون فعالیت",IK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LK():t==="fa"?OK():DK()}),BK=()=>"No archived sessions",$K=()=>"没有已归档的会话",HK=()=>"نشست بایگانی‌شده‌ای وجود ندارد",PK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$K():t==="fa"?HK():BK()}),FK=()=>"No sessions yet",UK=()=>"还没有会话",qK=()=>"هنوز نشستی وجود ندارد",GK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UK():t==="fa"?qK():FK()}),VK=()=>"1 annotation",WK=()=>"1 条批注",KK=()=>"۱ یادداشت",YK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WK():t==="fa"?KK():VK()}),XK=()=>"Open sub-agent transcript",ZK=()=>"打开子智能体记录",QK=()=>"باز کردن متن گفت‌وگوی عامل فرعی",JK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZK():t==="fa"?QK():XK()}),eY=()=>"About this demo",tY=()=>"关于此演示",nY=()=>"دربارهٔ این نسخهٔ نمایشی",M6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tY():t==="fa"?nY():eY()}),rY=()=>"Accept and auto mode",sY=()=>"接受并使用自动模式",iY=()=>"پذیرش و حالت خودکار",aY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sY():t==="fa"?iY():rY()}),oY=()=>"Accept and bypass all",lY=()=>"接受并跳过所有审批",cY=()=>"پذیرش و عبور از همهٔ تأییدها",uY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lY():t==="fa"?cY():oY()}),dY=()=>"Active",fY=()=>"活跃",hY=()=>"فعال",_Y=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fY():t==="fa"?hY():dY()}),pY=()=>"All",mY=()=>"全部",gY=()=>"همه",vY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mY():t==="fa"?gY():pY()}),bY=()=>"Allow",xY=()=>"允许",yY=()=>"اجازه دادن",wY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xY():t==="fa"?yY():bY()}),SY=()=>"Approval required",kY=()=>"需要批准",CY=()=>"نیازمند تأیید",EY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kY():t==="fa"?CY():SY()}),NY=()=>"Archived",zY=()=>"已归档",AY=()=>"بایگانی‌شده",R6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zY():t==="fa"?AY():NY()}),TY=()=>"Artifacts",jY=()=>"产物",MY=()=>"خروجی‌ها",RY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jY():t==="fa"?MY():TY()}),DY=()=>"Ask about this",LY=()=>"询问此内容",OY=()=>"دربارهٔ این بپرسید",IY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LY():t==="fa"?OY():DY()}),BY=()=>"Attach a PDF or image",$Y=()=>"附加 PDF 或图片",HY=()=>"پیوست PDF یا تصویر",D6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Y():t==="fa"?HY():BY()}),PY=()=>"Browsed the web",FY=()=>"已浏览网页",UY=()=>"وب مرور شد",L6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FY():t==="fa"?UY():PY()}),qY=()=>"Built the project",GY=()=>"已构建项目",VY=()=>"پروژه ساخته شد",WY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GY():t==="fa"?VY():qY()}),KY=()=>"Cancel",YY=()=>"取消",XY=()=>"لغو",ZY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YY():t==="fa"?XY():KY()}),QY=()=>"Cancelled an experiment run",JY=()=>"已取消实验运行",eX=()=>"اجرای آزمایش لغو شد",tX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JY():t==="fa"?eX():QY()}),nX=()=>"Checked code style",rX=()=>"已检查代码风格",sX=()=>"سبک کد بررسی شد",iX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rX():t==="fa"?sX():nX()}),aX=()=>"Checked compute options",oX=()=>"已检查算力选项",lX=()=>"گزینه‌های رایانشی بررسی شد",cX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oX():t==="fa"?lX():aX()}),uX=()=>"Checked experiment status",dX=()=>"已检查实验状态",fX=()=>"وضعیت آزمایش بررسی شد",O6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dX():t==="fa"?fX():uX()}),hX=()=>"Checked Git status",_X=()=>"已检查 Git 状态",pX=()=>"وضعیت Git بررسی شد",mX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_X():t==="fa"?pX():hX()}),gX=()=>"Checked local times",vX=()=>"已查询当地时间",bX=()=>"زمان‌های محلی بررسی شد",xX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vX():t==="fa"?bX():gX()}),yX=()=>"Checked market data",wX=()=>"已查询市场数据",SX=()=>"داده‌های بازار بررسی شد",kX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wX():t==="fa"?SX():yX()}),CX=()=>"Checked sports data",EX=()=>"已查询体育数据",NX=()=>"داده‌های ورزشی بررسی شد",zX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EX():t==="fa"?NX():CX()}),AX=()=>"Checked the weather",TX=()=>"已查询天气",jX=()=>"آب‌وهوا بررسی شد",MX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TX():t==="fa"?jX():AX()}),RX=()=>"Checked types",DX=()=>"已检查类型",LX=()=>"نوع‌ها بررسی شد",OX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DX():t==="fa"?LX():RX()}),IX=()=>"Clear annotations",BX=()=>"清除批注",$X=()=>"پاک کردن یادداشت‌ها",I6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BX():t==="fa"?$X():IX()}),HX=()=>"Customize",PX=()=>"自定义",FX=()=>"سفارشی‌سازی",UX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PX():t==="fa"?FX():HX()}),qX=()=>"Data sources",GX=()=>"数据源",VX=()=>"منابع داده",q1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GX():t==="fa"?VX():qX()}),WX=()=>"Delegated a task to a new agent",KX=()=>"已将任务委派给新智能体",YX=()=>"وظیفه به عامل جدید واگذار شد",XX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KX():t==="fa"?YX():WX()}),ZX=()=>"Delete",QX=()=>"删除",JX=()=>"حذف",eZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QX():t==="fa"?JX():ZX()}),tZ=()=>"Deny",nZ=()=>"拒绝",rZ=()=>"رد کردن",sZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nZ():t==="fa"?rZ():tZ()}),iZ=()=>"Edit and re-send",aZ=()=>"编辑并重新发送",oZ=()=>"ویرایش و ارسال دوباره",B6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aZ():t==="fa"?oZ():iZ()}),lZ=()=>"Edit message",cZ=()=>"编辑消息",uZ=()=>"ویرایش پیام",dZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cZ():t==="fa"?uZ():lZ()}),fZ=()=>"Edited a file",hZ=()=>"已编辑文件",_Z=()=>"فایل ویرایش شد",$6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hZ():t==="fa"?_Z():fZ()}),pZ=()=>"Exit Plan mode",mZ=()=>"退出计划模式",gZ=()=>"خروج از حالت طرح",H6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mZ():t==="fa"?gZ():pZ()}),vZ=()=>"Experiments",bZ=()=>"实验",xZ=()=>"آزمایش‌ها",yZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bZ():t==="fa"?xZ():vZ()}),wZ=()=>"Failed:",SZ=()=>"失败:",kZ=()=>"ناموفق:",cx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SZ():t==="fa"?kZ():wZ()}),CZ=()=>"Files",EZ=()=>"文件",NZ=()=>"فایل‌ها",zZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EZ():t==="fa"?NZ():CZ()}),AZ=()=>"Filter sessions",TZ=()=>"筛选会话",jZ=()=>"فیلتر نشست‌ها",P6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TZ():t==="fa"?jZ():AZ()}),MZ=()=>"is unavailable.",RZ=()=>"不可用。",DZ=()=>"در دسترس نیست.",LZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RZ():t==="fa"?DZ():MZ()}),OZ=()=>"Later queued messages will wait until this is retried or removed.",IZ=()=>"后续排队的消息会等待此消息重试或移除。",BZ=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",$Z=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IZ():t==="fa"?BZ():OZ()}),HZ=()=>"Listed files",PZ=()=>"已列出文件",FZ=()=>"فایل‌ها فهرست شد",F6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PZ():t==="fa"?FZ():HZ()}),UZ=()=>"Listed project runs",qZ=()=>"已列出项目运行",GZ=()=>"اجراهای پروژه فهرست شد",VZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qZ():t==="fa"?GZ():UZ()}),WZ=()=>"Listed projects",KZ=()=>"已列出项目",YZ=()=>"پروژه‌ها فهرست شد",XZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KZ():t==="fa"?YZ():WZ()}),ZZ=()=>"Loading conversation…",QZ=()=>"正在加载对话…",JZ=()=>"در حال بارگیری گفتگو…",eQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QZ():t==="fa"?JZ():ZZ()}),tQ=()=>"Next version",nQ=()=>"下一版本",rQ=()=>"نسخهٔ بعدی",U6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nQ():t==="fa"?rQ():tQ()}),sQ=()=>"Open the session this agent spawned",iQ=()=>"打开此智能体创建的会话",aQ=()=>"باز کردن نشست ساخته‌شده توسط این عامل",oQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iQ():t==="fa"?aQ():sQ()}),lQ=()=>"Opened web pages",cQ=()=>"已打开网页",uQ=()=>"صفحه‌های وب باز شد",dQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cQ():t==="fa"?uQ():lQ()}),fQ=()=>"Plan",hQ=()=>"计划",_Q=()=>"طرح",pQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hQ():t==="fa"?_Q():fQ()}),mQ=()=>"Plan approved",gQ=()=>"计划已批准",vQ=()=>"طرح تأیید شد",bQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gQ():t==="fa"?vQ():mQ()}),xQ=()=>"Plan rejected",yQ=()=>"计划已拒绝",wQ=()=>"طرح رد شد",SQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yQ():t==="fa"?wQ():xQ()}),kQ=()=>"Plan resolved",CQ=()=>"计划已处理",EQ=()=>"طرح تعیین تکلیف شد",NQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CQ():t==="fa"?EQ():kQ()}),zQ=()=>"Plan revision requested",AQ=()=>"已请求修改计划",TQ=()=>"درخواست بازنگری طرح ثبت شد",jQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AQ():t==="fa"?TQ():zQ()}),MQ=()=>"Previous version",RQ=()=>"上一版本",DQ=()=>"نسخهٔ قبلی",q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RQ():t==="fa"?DQ():MQ()}),LQ=()=>"Ran a command",OQ=()=>"已运行命令",IQ=()=>"فرمان اجرا شد",BQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OQ():t==="fa"?IQ():LQ()}),$Q=()=>"Ran tests",HQ=()=>"已运行测试",PQ=()=>"آزمون‌ها اجرا شد",FQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HQ():t==="fa"?PQ():$Q()}),UQ=()=>"Read a file",qQ=()=>"已读取文件",GQ=()=>"فایل خوانده شد",VQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qQ():t==="fa"?GQ():UQ()}),WQ=()=>"Read Git history",KQ=()=>"已读取 Git 历史",YQ=()=>"تاریخچهٔ Git خوانده شد",XQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KQ():t==="fa"?YQ():WQ()}),ZQ=()=>"Read project details",QQ=()=>"已读取项目详情",JQ=()=>"جزئیات پروژه خوانده شد",eJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QQ():t==="fa"?JQ():ZQ()}),tJ=()=>"Reject",nJ=()=>"拒绝",rJ=()=>"رد کردن",sJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nJ():t==="fa"?rJ():tJ()}),iJ=()=>"Remove",aJ=()=>"移除",oJ=()=>"حذف",lJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aJ():t==="fa"?oJ():iJ()}),cJ=()=>"Remove annotation",uJ=()=>"移除批注",dJ=()=>"حذف یادداشت",fJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uJ():t==="fa"?dJ():cJ()}),hJ=()=>"Remove file",_J=()=>"移除文件",pJ=()=>"حذف فایل",G6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_J():t==="fa"?pJ():hJ()}),mJ=()=>"Remove image",gJ=()=>"移除图片",vJ=()=>"حذف تصویر",V6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gJ():t==="fa"?vJ():mJ()}),bJ=()=>"Remove queued message",xJ=()=>"移除排队消息",yJ=()=>"حذف پیام صف",W6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xJ():t==="fa"?yJ():bJ()}),wJ=()=>"Rename",SJ=()=>"重命名",kJ=()=>"تغییر نام",CJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SJ():t==="fa"?kJ():wJ()}),EJ=()=>"Reviewed code changes",NJ=()=>"已审查代码更改",zJ=()=>"تغییرات کد بازبینی شد",AJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NJ():t==="fa"?zJ():EJ()}),TJ=()=>"Selected chat text",jJ=()=>"已选聊天文本",MJ=()=>"متن انتخاب‌شدهٔ گفتگو",RJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jJ():t==="fa"?MJ():TJ()}),DJ=()=>"Selected text:",LJ=()=>"已选文本:",OJ=()=>"متن انتخاب‌شده:",IJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LJ():t==="fa"?OJ():DJ()}),BJ=()=>"Send",$J=()=>"发送",HJ=()=>"ارسال",xb=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$J():t==="fa"?HJ():BJ()}),PJ=()=>"Session options",FJ=()=>"会话选项",UJ=()=>"گزینه‌های نشست",K6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FJ():t==="fa"?UJ():PJ()}),qJ=()=>"Session title",GJ=()=>"会话标题",VJ=()=>"عنوان نشست",WJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GJ():t==="fa"?VJ():qJ()}),KJ=()=>"Show sidebar",YJ=()=>"显示侧边栏",XJ=()=>"نمایش نوار کناری",Y6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YJ():t==="fa"?XJ():KJ()}),ZJ=()=>"Started an experiment run",QJ=()=>"已启动实验运行",JJ=()=>"اجرای آزمایش آغاز شد",eee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QJ():t==="fa"?JJ():ZJ()}),tee=()=>"Reading the project to suggest where to start…",nee=()=>"正在阅读项目以建议从哪里开始…",ree=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",see=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nee():t==="fa"?ree():tee()}),iee=()=>"Starter prompts",aee=()=>"入门提示",oee=()=>"پیشنهادهای شروع",lee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aee():t==="fa"?oee():iee()}),cee=()=>"Stop",uee=()=>"停止",dee=()=>"توقف",X6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uee():t==="fa"?dee():cee()}),fee=()=>"Submit",hee=()=>"提交",_ee=()=>"ارسال",pee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hee():t==="fa"?_ee():fee()}),mee=()=>"Task",gee=()=>"任务",vee=()=>"وظیفه",bee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gee():t==="fa"?vee():mee()}),xee=()=>"Tool failed",yee=()=>"工具失败",wee=()=>"ابزار ناموفق بود",See=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yee():t==="fa"?wee():xee()}),kee=()=>"Used tools",Cee=()=>"已使用工具",Eee=()=>"ابزارها استفاده شد",J9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cee():t==="fa"?Eee():kee()}),Nee=()=>"View full plan",zee=()=>"查看完整计划",Aee=()=>"مشاهدهٔ طرح کامل",Tee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zee():t==="fa"?Aee():Nee()}),jee=()=>"Waited for an experiment run",Mee=()=>"已等待实验运行",Ree=()=>"برای اجرای آزمایش صبر شد",Dee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mee():t==="fa"?Ree():jee()}),Lee=()=>"Waiting for your input…",Oee=()=>"正在等待你的输入…",Iee=()=>"منتظر ورودی شما…",Bee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oee():t==="fa"?Iee():Lee()}),$ee=()=>"What should we research?",Hee=()=>"我们应该研究什么?",Pee=()=>"چه چیزی را پژوهش کنیم؟",Fee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hee():t==="fa"?Pee():$ee()}),Uee=()=>"You, mid-task",qee=()=>"你(任务进行中)",Gee=()=>"شما، هنگام انجام وظیفه",Vee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qee():t==="fa"?Gee():Uee()}),Wee=()=>"Pasted image",Kee=()=>"粘贴的图片",Yee=()=>"تصویر جای‌گذاری‌شده",Xee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kee():t==="fa"?Yee():Wee()}),Zee=()=>"Plan",Qee=()=>"计划",Jee=()=>"طرح",eE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qee():t==="fa"?Jee():Zee()}),ete=()=>"Plan mode — ready to proceed?",tte=()=>"计划模式 — 准备好继续了吗?",nte=()=>"حالت طرح — آماده‌اید ادامه دهید؟",rte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tte():t==="fa"?nte():ete()}),ste=()=>"Proposed plan",ite=()=>"提议的计划",ate=()=>"طرح پیشنهادی",Z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ite():t==="fa"?ate():ste()}),ote=()=>"Question",lte=()=>"问题",cte=()=>"پرسش",ute=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lte():t==="fa"?cte():ote()}),dte=()=>"Queued",fte=()=>"已排队",hte=()=>"در صف",_te=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fte():t==="fa"?hte():dte()}),pte=()=>"Recents",mte=()=>"最近",gte=()=>"اخیر",tE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mte():t==="fa"?gte():pte()}),vte=()=>"Re-check its setup.",bte=()=>"请重新检查其设置。",xte=()=>"راه‌اندازی آن را دوباره بررسی کنید.",yte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bte():t==="fa"?xte():vte()}),wte=()=>"Could not recover this turn. Try again.",Ste=()=>"无法恢复本轮。请重试。",kte=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",Cte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ste():t==="fa"?kte():wte()}),Ete=()=>"Could not remove the queued message. Try again.",Nte=()=>"无法移除排队消息。请重试。",zte=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",Ate=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nte():t==="fa"?zte():Ete()}),Tte=e=>`Could not re-send: ${e==null?void 0:e.error}`,jte=e=>`无法重新发送:${e==null?void 0:e.error}`,Mte=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,Rte=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jte(e):t==="fa"?Mte(e):Tte(e)}),Dte=()=>"Resolved",Lte=()=>"已处理",Ote=()=>"رسیدگی شد",Ite=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lte():t==="fa"?Ote():Dte()}),Bte=()=>"Could not retry the queued message. Try again.",$te=()=>"无法重试排队消息。请重试。",Hte=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Pte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$te():t==="fa"?Hte():Bte()}),Fte=()=>"run logs",Ute=()=>"运行日志",qte=()=>"گزارش‌های اجرا",Gte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ute():t==="fa"?qte():Fte()}),Vte=()=>"Scroll to bottom",Wte=()=>"滚动到底部",Kte=()=>"رفتن به پایین گفتگو",Q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wte():t==="fa"?Kte():Vte()}),Yte=()=>"The selected harness is unavailable",Xte=()=>"所选智能体工具不可用",Zte=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",J6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xte():t==="fa"?Zte():Yte()}),Qte=()=>"The chat session was not created",Jte=()=>"未能创建聊天会话",ene=()=>"نشست گفت‌وگو ایجاد نشد",tne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jte():t==="fa"?ene():Qte()}),nne=()=>" · Spawned by another agent",rne=()=>" · 由另一个智能体创建",sne=()=>" · ساخته‌شده به‌دست عامل دیگر",ine=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rne():t==="fa"?sne():nne()}),ane=()=>"Starting…",one=()=>"正在启动…",lne=()=>"در حال شروع…",cne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?one():t==="fa"?lne():ane()}),une=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,dne=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,fne=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,hne=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dne(e):t==="fa"?fne(e):une(e)}),_ne=()=>"Could not stop the turn. Try again.",pne=()=>"无法停止本轮。请重试。",mne=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",gne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pne():t==="fa"?mne():_ne()}),vne=e=>`Could not switch fork: ${e==null?void 0:e.error}`,bne=e=>`无法切换分支:${e==null?void 0:e.error}`,xne=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,yne=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bne(e):t==="fa"?xne(e):vne(e)}),wne=()=>"The agent",Sne=()=>"智能体",kne=()=>"عامل",Cne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sne():t==="fa"?kne():wne()}),Ene=()=>"Thinking",Nne=()=>"正在思考",zne=()=>"در حال فکر کردن",Ane=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nne():t==="fa"?zne():Ene()}),Tne=()=>"Could not toggle Plan mode. Try again.",jne=()=>"无法切换计划模式。请重试。",Mne=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",e7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jne():t==="fa"?Mne():Tne()}),Rne=()=>"This turn did not finish.",Dne=()=>"本轮未完成。",Lne=()=>"این نوبت کامل نشد.",One=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dne():t==="fa"?Lne():Rne()}),Ine=()=>"Type a custom answer…",Bne=()=>"输入自定义回答…",$ne=()=>"پاسخ دلخواه را بنویسید…",Hne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bne():t==="fa"?$ne():Ine()}),Pne=()=>"Unarchive",Fne=()=>"取消归档",Une=()=>"خارج کردن از بایگانی",qne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fne():t==="fa"?Une():Pne()}),Gne=()=>"Untitled",Vne=()=>"未命名",Wne=()=>"بدون عنوان",G1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vne():t==="fa"?Wne():Gne()}),Kne=()=>"Could not update permissions. Try again.",Yne=()=>"无法更新权限。请重试。",Xne=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Zne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yne():t==="fa"?Xne():Kne()}),Qne=()=>"Working…",Jne=()=>"正在工作…",ere=()=>"در حال کار…",ux=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jne():t==="fa"?ere():Qne()}),tre=()=>"Close tab",nre=()=>"关闭标签页",rre=()=>"بستن زبانه",sre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nre():t==="fa"?rre():tre()}),ire=()=>"Changes",are=()=>"更改",ore=()=>"تغییرات",lre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?are():t==="fa"?ore():ire()}),cre=()=>"Code browser view",ure=()=>"代码浏览器视图",dre=()=>"نمای مرورگر کد",fre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ure():t==="fa"?dre():cre()}),hre=()=>"Files",_re=()=>"文件",pre=()=>"فایل‌ها",mre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_re():t==="fa"?pre():hre()}),gre=()=>"Refresh",vre=()=>"刷新",bre=()=>"تازه‌سازی",t7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vre():t==="fa"?bre():gre()}),xre=()=>"listing truncated",yre=()=>"列表已截断",wre=()=>"فهرست کوتاه شده است",Sre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yre():t==="fa"?wre():xre()}),kre=()=>"No files.",Cre=()=>"没有文件。",Ere=()=>"فایلی وجود ندارد.",Nre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cre():t==="fa"?Ere():kre()}),zre=()=>"Refresh failed:",Are=()=>"刷新失败:",Tre=()=>"تازه‌سازی ناموفق بود:",jre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Are():t==="fa"?Tre():zre()}),Mre=()=>"Cancelling…",Rre=()=>"正在取消…",Dre=()=>"در حال لغو…",Lre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rre():t==="fa"?Dre():Mre()}),Ore=()=>"Checking…",Ire=()=>"正在检查…",Bre=()=>"در حال بررسی…",jp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ire():t==="fa"?Bre():Ore()}),$re=()=>"Copied",Hre=()=>"已复制",Pre=()=>"کپی شد",Y0=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hre():t==="fa"?Pre():$re()}),Fre=e=>`Failed to load: ${e==null?void 0:e.error}`,Ure=e=>`加载失败:${e==null?void 0:e.error}`,qre=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,nE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ure(e):t==="fa"?qre(e):Fre(e)}),Gre=()=>"Loading…",Vre=()=>"正在加载…",Wre=()=>"در حال بارگیری…",rE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vre():t==="fa"?Wre():Gre()}),Kre=e=>`+ ${e==null?void 0:e.count} more`,Yre=e=>`另有 ${e==null?void 0:e.count} 项`,Xre=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Zre=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yre(e):t==="fa"?Xre(e):Kre(e)}),Qre=()=>"Rendered view",Jre=()=>"渲染视图",ese=()=>"نمای رندرشده",X0=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jre():t==="fa"?ese():Qre()}),tse=()=>"Save",nse=()=>"保存",rse=()=>"ذخیره",kc=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nse():t==="fa"?rse():tse()}),sse=()=>"Saving…",ise=()=>"正在保存…",ase=()=>"در حال ذخیره…",ja=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ise():t==="fa"?ase():sse()}),ose=()=>"Show less",lse=()=>"收起",cse=()=>"نمایش کمتر",sE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lse():t==="fa"?cse():ose()}),use=()=>"Show more",dse=()=>"展开",fse=()=>"نمایش بیشتر",hse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dse():t==="fa"?fse():use()}),_se=()=>"Stop",pse=()=>"停止",mse=()=>"توقف",iE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pse():t==="fa"?mse():_se()}),gse=()=>"Stopping…",vse=()=>"正在停止…",bse=()=>"در حال توقف…",xse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vse():t==="fa"?bse():gse()}),yse=()=>"View source",wse=()=>"查看源代码",Sse=()=>"نمایش متن منبع",zu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wse():t==="fa"?Sse():yse()}),kse=e=>`Hugging Face token — ${e==null?void 0:e.summary}`,Cse=e=>`Hugging Face 令牌 — ${e==null?void 0:e.summary}`,Ese=e=>`توکن Hugging Face — ${e==null?void 0:e.summary}`,Nse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cse(e):t==="fa"?Ese(e):kse(e)}),zse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Ase=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Tse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,jse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ase(e):t==="fa"?Tse(e):zse(e)}),Mse=()=>"No credentials required; this computer is always available.",Rse=()=>"无需凭据;此计算机始终可用。",Dse=()=>"نیازی به اطلاعات ورود نیست؛ این رایانه همیشه در دسترس است.",Lse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rse():t==="fa"?Dse():Mse()}),Ose=e=>`Modal token — ${e==null?void 0:e.summary}`,Ise=e=>`Modal 令牌 — ${e==null?void 0:e.summary}`,Bse=e=>`توکن Modal — ${e==null?void 0:e.summary}`,$se=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ise(e):t==="fa"?Bse(e):Ose(e)}),Hse=e=>`OpenResearch login and SSH key — ${e==null?void 0:e.summary}`,Pse=e=>`OpenResearch 登录信息和 SSH 密钥 — ${e==null?void 0:e.summary}`,Fse=e=>`ورود OpenResearch و کلید SSH — ${e==null?void 0:e.summary}`,Use=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pse(e):t==="fa"?Fse(e):Hse(e)}),qse=e=>`Ray Jobs endpoint — ${e==null?void 0:e.summary}`,Gse=e=>`Ray Jobs 端点 — ${e==null?void 0:e.summary}`,Vse=e=>`endpoint مربوط به Ray Jobs — ${e==null?void 0:e.summary}`,Wse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Gse(e):t==="fa"?Vse(e):qse(e)}),Kse=e=>`SSH config — ${e==null?void 0:e.summary}`,Yse=e=>`SSH 配置 — ${e==null?void 0:e.summary}`,Xse=e=>`پیکربندی SSH — ${e==null?void 0:e.summary}`,Zse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yse(e):t==="fa"?Xse(e):Kse(e)}),Qse=e=>`SSH config and keys — ${e==null?void 0:e.summary}`,Jse=e=>`SSH 配置和密钥 — ${e==null?void 0:e.summary}`,eie=e=>`پیکربندی و کلیدهای SSH — ${e==null?void 0:e.summary}`,tie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jse(e):t==="fa"?eie(e):Qse(e)}),nie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,rie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,sie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,iie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rie(e):t==="fa"?sie(e):nie(e)}),aie=()=>"Runs as a remote Hugging Face Job",oie=()=>"作为远程 Hugging Face Job 运行",lie=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oie():t==="fa"?lie():aie()}),uie=()=>"Runs as a Job on your Kubernetes cluster",die=()=>"作为 Kubernetes 集群上的 Job 运行",fie=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",hie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?die():t==="fa"?fie():uie()}),_ie=()=>"Runs directly on this computer",pie=()=>"直接在此计算机上运行",mie=()=>"مستقیماً روی این رایانه اجرا می‌شود",gie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pie():t==="fa"?mie():_ie()}),vie=()=>"Runs in a remote Modal sandbox",bie=()=>"在远程 Modal 沙箱中运行",xie=()=>"در sandbox دوردست Modal اجرا می‌شود",yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bie():t==="fa"?xie():vie()}),wie=()=>"Runs on an ephemeral OpenResearch box",Sie=()=>"在临时 OpenResearch 主机上运行",kie=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",Cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sie():t==="fa"?kie():wie()}),Eie=()=>"Runs on the connected Ray cluster",Nie=()=>"在已连接的 Ray 集群上运行",zie=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",Aie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nie():t==="fa"?zie():Eie()}),Tie=()=>"Runs as a scheduled job on your Slurm cluster",jie=()=>"作为 Slurm 集群上的调度作业运行",Mie=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",Rie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jie():t==="fa"?Mie():Tie()}),Die=()=>"Runs on a host from your SSH config",Lie=()=>"在 SSH 配置中的主机上运行",Oie=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",Iie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lie():t==="fa"?Oie():Die()}),Bie=()=>"Runs through Tinker’s remote compute",$ie=()=>"通过 Tinker 远程算力运行",Hie=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Pie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ie():t==="fa"?Hie():Bie()}),Fie=()=>"HF Jobs",Uie=()=>"HF Jobs",qie=()=>"HF Jobs",Gie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uie():t==="fa"?qie():Fie()}),Vie=()=>"Kubernetes",Wie=()=>"Kubernetes",Kie=()=>"Kubernetes",Yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wie():t==="fa"?Kie():Vie()}),Xie=()=>"This machine",Zie=()=>"此计算机",Qie=()=>"این رایانه",aE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zie():t==="fa"?Qie():Xie()}),Jie=()=>"Modal",eae=()=>"Modal",tae=()=>"Modal",nae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eae():t==="fa"?tae():Jie()}),rae=()=>"OpenResearch",sae=()=>"OpenResearch",iae=()=>"OpenResearch",aae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sae():t==="fa"?iae():rae()}),oae=()=>"Ray",lae=()=>"Ray",cae=()=>"Ray",uae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lae():t==="fa"?cae():oae()}),dae=()=>"Slurm",fae=()=>"Slurm",hae=()=>"Slurm",_ae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fae():t==="fa"?hae():dae()}),pae=()=>"SSH",mae=()=>"SSH",gae=()=>"SSH",vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mae():t==="fa"?gae():pae()}),bae=()=>"Tinker",xae=()=>"Tinker",yae=()=>"Tinker",wae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xae():t==="fa"?yae():bae()}),Sae=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",kae=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",Cae=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",Eae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kae():t==="fa"?Cae():Sae()}),Nae=()=>"A Kubernetes Job is created in the selected context and namespace from the project’s .orx/k8s.yaml manifest.",zae=()=>"系统根据项目的 .orx/k8s.yaml 清单,在所选上下文和命名空间中创建 Kubernetes Job。",Aae=()=>"بر پایهٔ مانیفست .orx/k8s.yaml پروژه، یک Kubernetes Job در زمینه و فضای نام انتخاب‌شده ساخته می‌شود.",Tae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zae():t==="fa"?Aae():Nae()}),jae=()=>"The experiment runs as a supervised process on this computer and uses its CPU, memory, and GPUs.",Mae=()=>"实验作为受监管进程在此计算机上运行,并使用其 CPU、内存和 GPU。",Rae=()=>"آزمایش به‌صورت فرایندی تحت نظارت روی این رایانه اجرا می‌شود و از CPU، حافظه و GPUهای آن استفاده می‌کند.",Dae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mae():t==="fa"?Rae():jae()}),Lae=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",Oae=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Iae=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",Bae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oae():t==="fa"?Iae():Lae()}),$ae=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",Hae=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Pae=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",Fae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hae():t==="fa"?Pae():$ae()}),Uae=()=>"The run is submitted to the Ray Jobs endpoint, and the connected Ray cluster executes it.",qae=()=>"运行会提交到 Ray Jobs 端点,并由已连接的 Ray 集群执行。",Gae=()=>"اجرا به endpoint مربوط به Ray Jobs فرستاده و توسط خوشهٔ متصل Ray اجرا می‌شود.",Vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qae():t==="fa"?Gae():Uae()}),Wae=()=>"The login node receives an sbatch job using the saved partition, account, and time limit; the cluster schedules the work.",Kae=()=>"登录节点使用已保存的分区、账户和时间限制接收 sbatch 作业;集群负责调度。",Yae=()=>"گرهٔ ورود یک کار sbatch با پارتیشن، حساب و محدودیت زمانی ذخیره‌شده دریافت می‌کند و خوشه آن را زمان‌بندی می‌کند.",Xae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kae():t==="fa"?Yae():Wae()}),Zae=()=>"The project is copied to the selected SSH host and runs there. Logs and status return to this dashboard.",Qae=()=>"项目会复制到所选 SSH 主机并在那里运行。日志和状态会返回此控制台。",Jae=()=>"پروژه به میزبان SSH انتخاب‌شده کپی و همان‌جا اجرا می‌شود. گزارش‌ها و وضعیت به این داشبورد برمی‌گردند.",eoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qae():t==="fa"?Jae():Zae()}),toe=()=>"A controller runs here while the Tinker SDK sends model operations to remote compute. This computer must stay awake and online.",noe=()=>"控制器在此计算机上运行,Tinker SDK 将模型操作发送到远程算力。此计算机必须保持唤醒和联网。",roe=()=>"کنترل‌گر روی این رایانه اجرا می‌شود و Tinker SDK عملیات مدل را به رایانش دوردست می‌فرستد. این رایانه باید روشن و آنلاین بماند.",soe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?noe():t==="fa"?roe():toe()}),ioe=()=>"Context window",aoe=()=>"上下文窗口",ooe=()=>"پنجرهٔ زمینه",loe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aoe():t==="fa"?ooe():ioe()}),coe=()=>"Context window used",uoe=()=>"已使用的上下文窗口",doe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",foe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uoe():t==="fa"?doe():coe()}),hoe=e=>`${e==null?void 0:e.value} tokens`,_oe=e=>`${e==null?void 0:e.value} 个 token`,poe=e=>`${e==null?void 0:e.value} توکن`,moe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_oe(e):t==="fa"?poe(e):hoe(e)}),goe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,voe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,boe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,xoe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?voe(e):t==="fa"?boe(e):goe(e)}),yoe=()=>"No runs yet — ask the agent to launch one.",woe=()=>"尚无运行——让智能体启动一个。",Soe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",koe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?woe():t==="fa"?Soe():yoe()}),Coe=()=>"Run",Eoe=()=>"运行",Noe=()=>"اجرا",n7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eoe():t==="fa"?Noe():Coe()}),zoe=()=>"Switch run",Aoe=()=>"切换运行",Toe=()=>"تغییر اجرا",joe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aoe():t==="fa"?Toe():zoe()}),Moe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,Roe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,Doe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,Loe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Roe(e):t==="fa"?Doe(e):Moe(e)}),Ooe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,Ioe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,Boe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,$oe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ioe(e):t==="fa"?Boe(e):Ooe(e)}),Hoe=e=>`${e==null?void 0:e.value}m`,Poe=e=>`${e==null?void 0:e.value} 分钟`,Foe=e=>`${e==null?void 0:e.value} دقیقه`,Uoe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Poe(e):t==="fa"?Foe(e):Hoe(e)}),qoe=e=>`${e==null?void 0:e.value}s`,Goe=e=>`${e==null?void 0:e.value} 秒`,Voe=e=>`${e==null?void 0:e.value} ثانیه`,Woe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Goe(e):t==="fa"?Voe(e):qoe(e)}),Koe=()=>"Code",Yoe=()=>"代码",Xoe=()=>"کد",Zoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yoe():t==="fa"?Xoe():Koe()}),Qoe=()=>"created",Joe=()=>"创建于",ele=()=>"ایجادشده",tle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Joe():t==="fa"?ele():Qoe()}),nle=()=>"from",rle=()=>"来自",sle=()=>"از",ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rle():t==="fa"?sle():nle()}),ale=()=>"Logs",ole=()=>"日志",lle=()=>"گزارش‌ها",cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ole():t==="fa"?lle():ale()}),ule=()=>"Latest run",dle=()=>"最新运行",fle=()=>"آخرین اجرا",hle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dle():t==="fa"?fle():ule()}),_le=()=>"Code",ple=()=>"代码",mle=()=>"کد",gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ple():t==="fa"?mle():_le()}),vle=()=>"Commit",ble=()=>"提交",xle=()=>"کامیت",yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ble():t==="fa"?xle():vle()}),wle=()=>"created",Sle=()=>"创建于",kle=()=>"ایجادشده",Cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sle():t==="fa"?kle():wle()}),Ele=()=>"Description",Nle=()=>"说明",zle=()=>"توضیحات",Ale=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nle():t==="fa"?zle():Ele()}),Tle=()=>"Duration",jle=()=>"时长",Mle=()=>"مدت",Rle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jle():t==="fa"?Mle():Tle()}),Dle=()=>"exit",Lle=()=>"退出码",Ole=()=>"خروج",Ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lle():t==="fa"?Ole():Dle()}),Ble=()=>"from",$le=()=>"来自",Hle=()=>"از",Ple=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$le():t==="fa"?Hle():Ble()}),Fle=()=>"Logs",Ule=()=>"日志",qle=()=>"گزارش‌ها",Gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ule():t==="fa"?qle():Fle()}),Vle=()=>"Run",Wle=()=>"运行",Kle=()=>"اجرا",Yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wle():t==="fa"?Kle():Vle()}),Xle=()=>"Run history",Zle=()=>"运行历史",Qle=()=>"تاریخچهٔ اجرا",Jle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zle():t==="fa"?Qle():Xle()}),ece=()=>"Started",tce=()=>"开始时间",nce=()=>"آغاز",rce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tce():t==="fa"?nce():ece()}),sce=()=>"Runs",ice=()=>"运行",ace=()=>"اجراها",oce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ice():t==="fa"?ace():sce()}),lce=()=>"No runs yet",cce=()=>"还没有运行",uce=()=>"هنوز اجرایی وجود ندارد",dce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cce():t==="fa"?uce():lce()}),fce=()=>"No experiments yet.",hce=()=>"还没有实验。",_ce=()=>"هنوز آزمایشی وجود ندارد.",pce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hce():t==="fa"?_ce():fce()}),mce=()=>"Not run yet",gce=()=>"尚未运行",vce=()=>"هنوز اجرا نشده",bce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gce():t==="fa"?vce():mce()}),xce=()=>"1 run",yce=()=>"1 次运行",wce=()=>"۱ اجرا",Sce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yce():t==="fa"?wce():xce()}),kce=()=>"Open logs",Cce=()=>"打开日志",Ece=()=>"باز کردن گزارش‌ها",Nce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cce():t==="fa"?Ece():kce()}),zce=e=>`${e==null?void 0:e.count} runs`,Ace=e=>`${e==null?void 0:e.count} 次运行`,Tce=e=>`${e==null?void 0:e.count} اجرا`,jce=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ace(e):t==="fa"?Tce(e):zce(e)}),Mce=()=>"Stop requested",Rce=()=>"已请求停止",Dce=()=>"درخواست توقف ثبت شد",Lce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rce():t==="fa"?Dce():Mce()}),Oce=()=>"Stop run",Ice=()=>"停止运行",Bce=()=>"توقف اجرا",$ce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ice():t==="fa"?Bce():Oce()}),Hce=()=>"Code",Pce=()=>"代码",Fce=()=>"کد",Uce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pce():t==="fa"?Fce():Hce()}),qce=()=>"Experiments",Gce=()=>"实验",Vce=()=>"آزمایش‌ها",Wce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gce():t==="fa"?Vce():qce()}),Kce=()=>"Logs",Yce=()=>"日志",Xce=()=>"گزارش‌ها",Zce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yce():t==="fa"?Xce():Kce()}),Qce=()=>"Stop failed:",Jce=()=>"停止失败:",eue=()=>"توقف ناموفق بود:",tue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jce():t==="fa"?eue():Qce()}),nue=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,rue=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,sue=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,iue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rue(e):t==="fa"?sue(e):nue(e)}),aue=()=>"Binary file — no inline preview.",oue=()=>"二进制文件——无法内嵌预览。",lue=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",cue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oue():t==="fa"?lue():aue()}),uue=()=>"Compile failed",due=()=>"编译失败",fue=()=>"کامپایل ناموفق بود",hue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?due():t==="fa"?fue():uue()}),_ue=()=>"Compile PDF",pue=()=>"编译 PDF",mue=()=>"کامپایل PDF",r7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pue():t==="fa"?mue():_ue()}),gue=()=>"Compiled, but the engine reported errors — check the output below.",vue=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",bue=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",xue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vue():t==="fa"?bue():gue()}),yue=()=>"Copy command",wue=()=>"复制命令",Sue=()=>"کپی فرمان",kue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wue():t==="fa"?Sue():yue()}),Cue=()=>"Copy install command",Eue=()=>"复制安装命令",Nue=()=>"کپی فرمان نصب",zue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eue():t==="fa"?Nue():Cue()}),Aue=()=>"Discard my edits and reload",Tue=()=>"放弃我的编辑并重新加载",jue=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",Mue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tue():t==="fa"?jue():Aue()}),Rue=()=>"Dismiss",Due=()=>"关闭",Lue=()=>"بستن",s7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Due():t==="fa"?Lue():Rue()}),Oue=()=>"Dismiss compile message",Iue=()=>"关闭编译消息",Bue=()=>"بستن پیام کامپایل",$ue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iue():t==="fa"?Bue():Oue()}),Hue=()=>"Dismiss Overleaf message",Pue=()=>"关闭 Overleaf 消息",Fue=()=>"بستن پیام Overleaf",Uue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pue():t==="fa"?Fue():Hue()}),que=()=>"Download",Gue=()=>"下载",Vue=()=>"بارگیری",oE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gue():t==="fa"?Vue():que()}),Wue=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Kue=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,Yue=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,Xue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Kue(e):t==="fa"?Yue(e):Wue(e)}),Zue=()=>"Failed to load file:",Que=()=>"加载文件失败:",Jue=()=>"بارگیری فایل ناموفق بود:",ede=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Que():t==="fa"?Jue():Zue()}),tde=()=>"File truncated — showing the first 512 KB.",nde=()=>"文件已截断——仅显示前 512 KB。",rde=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",sde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nde():t==="fa"?rde():tde()}),ide=()=>"The page below stops partway — the full file could not be loaded.",ade=()=>"下方页面在中途结束——无法加载完整文件。",ode=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",lde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ade():t==="fa"?ode():ide()}),cde=e=>`Rendered HTML: ${e==null?void 0:e.name}`,ude=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,dde=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,fde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ude(e):t==="fa"?dde(e):cde(e)}),hde=()=>"Loading…",_de=()=>"正在加载…",pde=()=>"در حال بارگیری…",lE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_de():t==="fa"?pde():hde()}),mde=()=>"File not found.",gde=()=>"找不到文件。",vde=()=>"فایل پیدا نشد.",bde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gde():t==="fa"?vde():mde()}),xde=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,yde=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,wde=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,Sde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yde(e):t==="fa"?wde(e):xde(e)}),kde=e=>`File not found on branch ${e==null?void 0:e.branch}.`,Cde=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Ede=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,Nde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cde(e):t==="fa"?Ede(e):kde(e)}),zde=()=>"File not found on disk.",Ade=()=>"磁盘上找不到此文件。",Tde=()=>"فایل روی دیسک پیدا نشد.",jde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ade():t==="fa"?Tde():zde()}),Mde=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Rde=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,Dde=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Lde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rde(e):t==="fa"?Dde(e):Mde(e)}),Ode=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Ide=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Bde=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,$de=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ide(e):t==="fa"?Bde(e):Ode(e)}),Hde=()=>"Open in default editor",Pde=()=>"在默认编辑器中打开",Fde=()=>"باز کردن در ویرایشگر پیش‌فرض",i7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pde():t==="fa"?Fde():Hde()}),Ude=()=>"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.",qde=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",Gde=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",Vde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qde():t==="fa"?Gde():Ude()}),Wde=()=>"Compiled PDF is out of date",Kde=()=>"已编译的 PDF 不是最新版本",Yde=()=>"PDF کامپایل‌شده به‌روز نیست",Xde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kde():t==="fa"?Yde():Wde()}),Zde=()=>"project clone",Qde=()=>"项目克隆",Jde=()=>"کلون پروژه",G_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qde():t==="fa"?Jde():Zde()}),efe=()=>"Recompile PDF",tfe=()=>"重新编译 PDF",nfe=()=>"کامپایل دوبارهٔ PDF",a7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tfe():t==="fa"?nfe():efe()}),rfe=()=>"Reload file",sfe=()=>"重新加载文件",ife=()=>"بارگیری دوبارهٔ فایل",o7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sfe():t==="fa"?ife():rfe()}),afe=()=>"Save failed",ofe=()=>"保存失败",lfe=()=>"ذخیره ناموفق بود",cfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ofe():t==="fa"?lfe():afe()}),ufe=()=>"Saving…",dfe=()=>"正在保存…",ffe=()=>"در حال ذخیره…",hfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dfe():t==="fa"?ffe():ufe()}),_fe=()=>"Selected — press ⌘C",pfe=()=>"已选中 — 按 ⌘C 复制",mfe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",gfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pfe():t==="fa"?mfe():_fe()}),vfe=()=>"session’s worktree",bfe=()=>"会话工作树",xfe=()=>"درخت کاری نشست",V_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bfe():t==="fa"?xfe():vfe()}),yfe=()=>"Show compiled PDF",wfe=()=>"显示已编译的 PDF",Sfe=()=>"نمایش PDF کامپایل‌شده",l7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wfe():t==="fa"?Sfe():yfe()}),kfe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",Cfe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",Efe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",Nfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cfe():t==="fa"?Efe():kfe()}),zfe=()=>"This session's worktree isn't available — showing the project clone's copy.",Afe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",Tfe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",jfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Afe():t==="fa"?Tfe():zfe()}),Mfe=()=>"Unsaved",Rfe=()=>"未保存",Dfe=()=>"ذخیره نشده",Lfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rfe():t==="fa"?Dfe():Mfe()}),Ofe=()=>"Unsaved — ⌘S or click away to save",Ife=()=>"未保存 — 按 ⌘S 或点击其他位置保存",Bfe=()=>"ذخیره نشده — ⌘S را بزنید یا برای ذخیره بیرون کلیک کنید",$fe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ife():t==="fa"?Bfe():Ofe()}),Hfe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",Pfe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",Ffe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",Ufe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pfe():t==="fa"?Ffe():Hfe()}),qfe=()=>"Back to preview",Gfe=()=>"返回预览",Vfe=()=>"بازگشت به پیش‌نمایش",Wfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gfe():t==="fa"?Vfe():qfe()}),Kfe=e=>`${e==null?void 0:e.count} changed files`,Yfe=e=>`${e==null?void 0:e.count} 个已更改文件`,Xfe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,Zfe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yfe(e):t==="fa"?Xfe(e):Kfe(e)}),Qfe=()=>"Changed files",Jfe=()=>"已更改文件",ehe=()=>"فایل‌های تغییرکرده",the=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jfe():t==="fa"?ehe():Qfe()}),nhe=()=>"Diff preview truncated",rhe=()=>"差异预览已截断",she=()=>"پیش‌نمایش تفاوت کوتاه شده است",ihe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rhe():t==="fa"?she():nhe()}),ahe=e=>`${e==null?void 0:e.count} files shown (partial)`,ohe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,lhe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,che=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ohe(e):t==="fa"?lhe(e):ahe(e)}),uhe=()=>"No changes.",dhe=()=>"没有更改。",fhe=()=>"تغییری وجود ندارد.",hhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dhe():t==="fa"?fhe():uhe()}),_he=()=>"No complete file preview was available before the cutoff.",phe=()=>"在截断位置之前没有完整的文件预览。",mhe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?phe():t==="fa"?mhe():_he()}),vhe=()=>"No textual diff for this file.",bhe=()=>"此文件没有文本差异。",xhe=()=>"برای این فایل تفاوت متنی وجود ندارد.",yhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bhe():t==="fa"?xhe():vhe()}),whe=()=>"1 changed file",She=()=>"1 个已更改文件",khe=()=>"۱ فایل تغییرکرده",Che=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?She():t==="fa"?khe():whe()}),Ehe=()=>"1 file shown (partial)",Nhe=()=>"显示 1 个文件(部分)",zhe=()=>"۱ فایل نمایش داده شده (ناقص)",Ahe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nhe():t==="fa"?zhe():Ehe()}),The=()=>"Unable to parse this diff.",jhe=()=>"无法解析此差异。",Mhe=()=>"خواندن این تفاوت ممکن نبود.",Rhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jhe():t==="fa"?Mhe():The()}),Dhe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,Lhe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,Ohe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,Ihe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Lhe(e):t==="fa"?Ohe(e):Dhe(e)}),Bhe=()=>"View full diff",$he=()=>"查看完整差异",Hhe=()=>"نمایش تفاوت کامل",Phe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$he():t==="fa"?Hhe():Bhe()}),Fhe=()=>"Create a token ↗",Uhe=()=>"创建令牌 ↗",qhe=()=>"ساخت توکن ↗",Ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uhe():t==="fa"?qhe():Fhe()}),Vhe=()=>"All projects",Whe=()=>"所有项目",Khe=()=>"همهٔ پروژه‌ها",c7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Whe():t==="fa"?Khe():Vhe()}),Yhe=()=>"Configure Repository",Xhe=()=>"配置仓库",Zhe=()=>"پیکربندی مخزن",Qhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xhe():t==="fa"?Zhe():Yhe()}),Jhe=()=>"Create a new project",e_e=()=>"新建项目",t_e=()=>"ایجاد پروژهٔ جدید",n_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e_e():t==="fa"?t_e():Jhe()}),r_e=()=>"Hide sidebar",s_e=()=>"隐藏侧边栏",i_e=()=>"پنهان کردن نوار کناری",u7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s_e():t==="fa"?i_e():r_e()}),a_e=()=>"Project",o_e=()=>"项目",l_e=()=>"پروژه",c_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o_e():t==="fa"?l_e():a_e()}),u_e=e=>`${e==null?void 0:e.count} cancelled`,d_e=e=>`${e==null?void 0:e.count} 次取消`,f_e=e=>`${e==null?void 0:e.count} لغوشده`,h_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?d_e(e):t==="fa"?f_e(e):u_e(e)}),__e=e=>`${e==null?void 0:e.count} done`,p_e=e=>`${e==null?void 0:e.count} 次完成`,m_e=e=>`${e==null?void 0:e.count} تمام‌شده`,g_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?p_e(e):t==="fa"?m_e(e):__e(e)}),v_e=e=>`${e==null?void 0:e.count} failed`,b_e=e=>`${e==null?void 0:e.count} 次失败`,x_e=e=>`${e==null?void 0:e.count} ناموفق`,y_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?b_e(e):t==="fa"?x_e(e):v_e(e)}),w_e=e=>`${e==null?void 0:e.count} files`,S_e=e=>`${e==null?void 0:e.count} 个文件`,k_e=e=>`${e==null?void 0:e.count} فایل`,C_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?S_e(e):t==="fa"?k_e(e):w_e(e)}),E_e=e=>`${e==null?void 0:e.count}+ files`,N_e=e=>`至少 ${e==null?void 0:e.count} 个文件`,z_e=e=>`بیش از ${e==null?void 0:e.count} فایل`,A_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?N_e(e):t==="fa"?z_e(e):E_e(e)}),T_e=e=>`${e==null?void 0:e.count} live`,j_e=e=>`${e==null?void 0:e.count} 次进行中`,M_e=e=>`${e==null?void 0:e.count} فعال`,R_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j_e(e):t==="fa"?M_e(e):T_e(e)}),D_e=()=>"1 file",L_e=()=>"1 个文件",O_e=()=>"۱ فایل",I_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L_e():t==="fa"?O_e():D_e()}),B_e=()=>"1 run",$_e=()=>"1 次运行",H_e=()=>"۱ اجرا",P_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$_e():t==="fa"?H_e():B_e()}),F_e=e=>`${e==null?void 0:e.count} runs`,U_e=e=>`${e==null?void 0:e.count} 次运行`,q_e=e=>`${e==null?void 0:e.count} اجرا`,G_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U_e(e):t==="fa"?q_e(e):F_e(e)}),V_e=()=>"No instances yet.",W_e=()=>"还没有实例。",K_e=()=>"هنوز نمونه‌ای وجود ندارد.",Y_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W_e():t==="fa"?K_e():V_e()}),X_e=()=>"Nothing running right now.",Z_e=()=>"当前没有运行中的实例。",Q_e=()=>"اکنون چیزی در حال اجرا نیست.",J_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z_e():t==="fa"?Q_e():X_e()}),e0e=()=>"Select a project to see its history.",t0e=()=>"请选择一个项目以查看其历史记录。",n0e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",r0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t0e():t==="fa"?n0e():e0e()}),s0e=()=>"Select a project to see its runs.",i0e=()=>"请选择一个项目以查看其运行。",a0e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",o0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i0e():t==="fa"?a0e():s0e()}),l0e=()=>"View history",c0e=()=>"查看历史记录",u0e=()=>"مشاهدهٔ تاریخچه",d0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c0e():t==="fa"?u0e():l0e()}),f0e=e=>`View history (${e==null?void 0:e.count})`,h0e=e=>`查看历史记录(${e==null?void 0:e.count})`,_0e=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,p0e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h0e(e):t==="fa"?_0e(e):f0e(e)}),m0e=()=>"The engine exited without producing a PDF or a log.",g0e=()=>"引擎已退出,但没有生成 PDF 或日志。",v0e=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",b0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g0e():t==="fa"?v0e():m0e()}),x0e=()=>"Loading…",y0e=()=>"正在加载…",w0e=()=>"در حال بارگیری…",S0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y0e():t==="fa"?w0e():x0e()}),k0e=()=>"Copy",C0e=()=>"复制",E0e=()=>"کپی",cE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C0e():t==="fa"?E0e():k0e()}),N0e=()=>"Copy code",z0e=()=>"复制代码",A0e=()=>"کپی کد",T0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z0e():t==="fa"?A0e():N0e()}),j0e=()=>"Download",M0e=()=>"下载",R0e=()=>"بارگیری",uE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M0e():t==="fa"?R0e():j0e()}),D0e=()=>"This browser can’t preview this media format.",L0e=()=>"此浏览器无法预览该媒体格式。",O0e=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",I0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L0e():t==="fa"?O0e():D0e()}),B0e=()=>" · CLI configuration",$0e=()=>" · CLI 配置",H0e=()=>" · پیکربندی CLI",dE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$0e():t==="fa"?H0e():B0e()}),P0e=()=>"· Default",F0e=()=>"· 默认",U0e=()=>"· پیش‌فرض",fE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F0e():t==="fa"?U0e():P0e()}),q0e=()=>"Default model",G0e=()=>"默认模型",V0e=()=>"مدل پیش‌فرض",d7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G0e():t==="fa"?V0e():q0e()}),W0e=()=>"Detecting harnesses…",K0e=()=>"正在检测智能体工具…",Y0e=()=>"در حال شناسایی ابزارهای عامل…",X0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K0e():t==="fa"?Y0e():W0e()}),Z0e=()=>"Effort",Q0e=()=>"推理强度",J0e=()=>"میزان استدلال",epe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Q0e():t==="fa"?J0e():Z0e()}),tpe=()=>"Fast speed ·",npe=()=>"快速 ·",rpe=()=>"سرعت بالا ·",spe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?npe():t==="fa"?rpe():tpe()}),ipe=()=>"Mode",ape=()=>"模式",ope=()=>"حالت",f7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ape():t==="fa"?ope():ipe()}),lpe=()=>"Model",cpe=()=>"模型",upe=()=>"مدل",V1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cpe():t==="fa"?upe():lpe()}),dpe=e=>`${e==null?void 0:e.count} more — search to find`,fpe=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,hpe=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,_pe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fpe(e):t==="fa"?hpe(e):dpe(e)}),ppe=()=>"Not available",mpe=()=>"不可用",gpe=()=>"در دسترس نیست",vpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mpe():t==="fa"?gpe():ppe()}),bpe=()=>"Search models…",xpe=()=>"搜索模型…",ype=()=>"جست‌وجوی مدل‌ها…",wpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xpe():t==="fa"?ype():bpe()}),Spe=()=>"Sessions keep their harness. Start a new chat to switch.",kpe=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Cpe=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Epe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kpe():t==="fa"?Cpe():Spe()}),Npe=()=>"Speed",zpe=()=>"速度",Ape=()=>"سرعت",h7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zpe():t==="fa"?Ape():Npe()}),Tpe=()=>"Unavailable",jpe=()=>"不可用",Mpe=()=>"در دسترس نیست",hE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jpe():t==="fa"?Mpe():Tpe()}),Rpe=e=>`Use “${e==null?void 0:e.id}” as the model ID`,Dpe=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,Lpe=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,Ope=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Dpe(e):t==="fa"?Lpe(e):Rpe(e)}),Ipe=()=>"Variant",Bpe=()=>"变体",$pe=()=>"گونه",Hpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bpe():t==="fa"?$pe():Ipe()}),Ppe=()=>"Advanced",Fpe=()=>"高级",Upe=()=>"پیشرفته",qpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fpe():t==="fa"?Upe():Ppe()}),Gpe=()=>"Advanced · Connect GitHub",Vpe=()=>"高级 · 连接 GitHub",Wpe=()=>"پیشرفته · اتصال GitHub",Kpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vpe():t==="fa"?Wpe():Gpe()}),Ype=()=>"Advanced · GitHub sync on",Xpe=()=>"高级 · GitHub 同步已开启",Zpe=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Qpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xpe():t==="fa"?Zpe():Ype()}),Jpe=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",eme=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",tme=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",nme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eme():t==="fa"?tme():Jpe()}),rme=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,sme=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,ime=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,ame=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?sme(e):t==="fa"?ime(e):rme(e)}),ome=()=>"Choose an existing project folder",lme=()=>"选择现有项目文件夹",cme=()=>"انتخاب پوشهٔ موجود پروژه",_7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lme():t==="fa"?cme():ome()}),ume=()=>"Choosing…",dme=()=>"正在选择…",fme=()=>"در حال انتخاب…",hme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dme():t==="fa"?fme():ume()}),_me=()=>"Clone destination",pme=()=>"克隆位置",mme=()=>"مقصد کلون",gme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pme():t==="fa"?mme():_me()}),vme=()=>"Clone paper project",bme=()=>"克隆论文项目",xme=()=>"کلون پروژهٔ مقاله",yme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bme():t==="fa"?xme():vme()}),wme=()=>"Create project",Sme=()=>"创建项目",kme=()=>"ایجاد پروژه",p7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sme():t==="fa"?kme():wme()}),Cme=()=>"Creating…",Eme=()=>"正在创建…",Nme=()=>"در حال ایجاد…",zme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eme():t==="fa"?Nme():Cme()}),Ame=()=>"Choose a different destination. This path is a file, not a folder.",Tme=()=>"请选择其他位置。此路径是文件,不是文件夹。",jme=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",m7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tme():t==="fa"?jme():Ame()}),Mme=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Rme=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Dme=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Lme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rme():t==="fa"?Dme():Mme()}),Ome=()=>"Blank project",Ime=()=>"空白项目",Bme=()=>"پروژهٔ خالی",$me=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ime():t==="fa"?Bme():Ome()}),Hme=()=>"Cancel",Pme=()=>"取消",Fme=()=>"لغو",Ume=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pme():t==="fa"?Fme():Hme()}),qme=()=>"Change",Gme=()=>"更改",Vme=()=>"تغییر",Wme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gme():t==="fa"?Vme():qme()}),Kme=()=>"Change selected paper",Yme=()=>"更改所选论文",Xme=()=>"تغییر مقالهٔ انتخاب‌شده",Zme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yme():t==="fa"?Xme():Kme()}),Qme=()=>"Check out a Git branch before using this folder.",Jme=()=>"使用此文件夹前,请先检出一个 Git 分支。",ege=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",tge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jme():t==="fa"?ege():Qme()}),nge=()=>"Checking project location.",rge=()=>"正在检查项目位置。",sge=()=>"در حال بررسی محل پروژه.",g7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rge():t==="fa"?sge():nge()}),ige=()=>"Existing folder",age=()=>"现有文件夹",oge=()=>"پوشهٔ موجود",lge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?age():t==="fa"?oge():ige()}),cge=()=>"Experiment branches will be pushed to the remote GitHub repository.",uge=()=>"实验分支将推送到远程 GitHub 仓库。",dge=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",fge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uge():t==="fa"?dge():cge()}),hge=()=>"From a paper",_ge=()=>"从论文创建",pge=()=>"از یک مقاله",mge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_ge():t==="fa"?pge():hge()}),gge=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",vge=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",bge=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",xge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vge():t==="fa"?bge():gge()}),yge=()=>"my-research",wge=()=>"my-research",Sge=()=>"my-research",v7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wge():t==="fa"?Sge():yge()}),kge=()=>"No papers found. Try an arXiv ID, URL, or a different title.",Cge=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Ege=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",Nge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cge():t==="fa"?Ege():kge()}),zge=()=>"No public repository found on alphaXiv",Age=()=>"在 alphaXiv 上未找到公开仓库",Tge=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",jge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Age():t==="fa"?Tge():zge()}),Mge=()=>"OpenResearch will start a blank project with this paper's PDF.",Rge=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Dge=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Lge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rge():t==="fa"?Dge():Mge()}),Oge=()=>"Paper",Ige=()=>"论文",Bge=()=>"مقاله",$ge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ige():t==="fa"?Bge():Oge()}),Hge=()=>"Project location",Pge=()=>"项目位置",Fge=()=>"محل پروژه",b7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pge():t==="fa"?Fge():Hge()}),Uge=()=>"Project name",qge=()=>"项目名称",Gge=()=>"نام پروژه",x7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qge():t==="fa"?Gge():Uge()}),Vge=()=>"Search for a paper by arXiv ID, URL, or title",Wge=()=>"按 arXiv ID、网址或标题搜索论文",Kge=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",Yge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wge():t==="fa"?Kge():Vge()}),Xge=()=>"Sync experiments to GitHub",Zge=()=>"将实验同步到 GitHub",Qge=()=>"همگام‌سازی آزمایش‌ها با GitHub",Jge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zge():t==="fa"?Qge():Xge()}),e1e=()=>"That folder no longer exists. Choose it again.",t1e=()=>"该文件夹已不存在。请重新选择。",n1e=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",r1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t1e():t==="fa"?n1e():e1e()}),s1e=()=>"The selected folder contains an invalid Git repository.",i1e=()=>"所选文件夹包含无效的 Git 仓库。",a1e=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",o1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i1e():t==="fa"?a1e():s1e()}),l1e=()=>"The selected path is not a folder.",c1e=()=>"所选路径不是文件夹。",u1e=()=>"مسیر انتخاب‌شده پوشه نیست.",d1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c1e():t==="fa"?u1e():l1e()}),f1e=e=>`Checking ${e==null?void 0:e.repository}.`,h1e=e=>`正在检查 ${e==null?void 0:e.repository}。`,_1e=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,p1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h1e(e):t==="fa"?_1e(e):f1e(e)}),m1e=e=>`Creates ${e==null?void 0:e.repository}.`,g1e=e=>`将创建 ${e==null?void 0:e.repository}。`,v1e=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,b1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?g1e(e):t==="fa"?v1e(e):m1e(e)}),x1e=e=>`Pushes to ${e==null?void 0:e.repository}.`,y1e=e=>`将推送到 ${e==null?void 0:e.repository}。`,w1e=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,S1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?y1e(e):t==="fa"?w1e(e):x1e(e)}),k1e=()=>"Project location is required.",C1e=()=>"必须填写项目位置。",E1e=()=>"محل پروژه الزامی است.",y7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C1e():t==="fa"?E1e():k1e()}),N1e=()=>"Choose a different destination. The paper repository needs a new or empty folder.",z1e=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",A1e=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",T1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z1e():t==="fa"?A1e():N1e()}),j1e=()=>"A linked public code repository is cloned without credentials.",M1e=()=>"关联的公开代码仓库无需凭据即可克隆。",R1e=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",D1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M1e():t==="fa"?R1e():j1e()}),L1e=e=>`Run ${e==null?void 0:e.command} before creating the project.`,O1e=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,I1e=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,B1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?O1e(e):t==="fa"?I1e(e):L1e(e)}),$1e=()=>"Searching alphaXiv…",H1e=()=>"正在搜索 alphaXiv…",P1e=()=>"در حال جست‌وجوی alphaXiv…",F1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H1e():t==="fa"?P1e():$1e()}),U1e=()=>"Use folder",q1e=()=>"使用文件夹",G1e=()=>"استفاده از پوشه",V1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q1e():t==="fa"?G1e():U1e()}),W1e=()=>"Can’t reach OpenResearch. This page is no longer live.",K1e=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Y1e=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",w7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K1e():t==="fa"?Y1e():W1e()}),X1e=()=>"A workspace for your research agents",Z1e=()=>"面向研究智能体的工作空间",Q1e=()=>"فضای کاری برای عامل‌های پژوهشی شما",J1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z1e():t==="fa"?Q1e():X1e()}),eve=()=>"Add papers that represent your research interests, including papers by other authors.",tve=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",nve=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",rve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tve():t==="fa"?nve():eve()}),sve=()=>"API key",ive=()=>"API 密钥",ave=()=>"کلید API",_E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ive():t==="fa"?ave():sve()}),ove=()=>"AI/ML",lve=()=>"人工智能与机器学习",cve=()=>"هوش مصنوعی و یادگیری ماشین",uve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lve():t==="fa"?cve():ove()}),dve=()=>"Biology",fve=()=>"生物学",hve=()=>"زیست‌شناسی",_ve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fve():t==="fa"?hve():dve()}),pve=()=>"Other",mve=()=>"其他",gve=()=>"سایر",vve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mve():t==="fa"?gve():pve()}),bve=()=>"Physics",xve=()=>"物理学",yve=()=>"فیزیک",wve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xve():t==="fa"?yve():bve()}),Sve=()=>"Back",kve=()=>"返回",Cve=()=>"بازگشت",S7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kve():t==="fa"?Cve():Sve()}),Eve=()=>"Check failed",Nve=()=>"检查失败",zve=()=>"بررسی ناموفق بود",Ave=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nve():t==="fa"?zve():Eve()}),Tve=()=>"Checking",jve=()=>"正在检查",Mve=()=>"در حال بررسی",Rve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jve():t==="fa"?Mve():Tve()}),Dve=()=>"Checking Git…",Lve=()=>"正在检查 Git…",Ove=()=>"در حال بررسی Git…",Ive=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lve():t==="fa"?Ove():Dve()}),Bve=()=>"Choose a coding agent",$ve=()=>"选择编程智能体",Hve=()=>"یک عامل کدنویسی انتخاب کنید",Pve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ve():t==="fa"?Hve():Bve()}),Fve=()=>"Choose a coding agent to continue.",Uve=()=>"选择一个编程智能体以继续。",qve=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Gve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uve():t==="fa"?qve():Fve()}),Vve=()=>"Choose at least one research area to continue.",Wve=()=>"请至少选择一个研究领域后再继续。",Kve=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Yve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wve():t==="fa"?Kve():Vve()}),Xve=()=>"Choose one or more.",Zve=()=>"请选择一项或多项。",Qve=()=>"یک یا چند مورد را انتخاب کنید.",Jve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zve():t==="fa"?Qve():Xve()}),ebe=()=>"Choose your preferred coding agent",tbe=()=>"请选择首选编程智能体",nbe=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",rbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tbe():t==="fa"?nbe():ebe()}),sbe=()=>"Consolidate your research",ibe=()=>"集中管理研究",abe=()=>"پژوهش خود را یکپارچه کنید",obe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ibe():t==="fa"?abe():sbe()}),lbe=()=>"Continue",cbe=()=>"继续",ube=()=>"ادامه",k7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cbe():t==="fa"?ube():lbe()}),dbe=()=>"Describe your research area to continue.",fbe=()=>"请描述你的研究领域后再继续。",hbe=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",_be=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fbe():t==="fa"?hbe():dbe()}),pbe=()=>"Detecting Claude Code, Codex, OpenCode…",mbe=()=>"正在检测 Claude Code、Codex、OpenCode…",gbe=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",vbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mbe():t==="fa"?gbe():pbe()}),bbe=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",xbe=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",ybe=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",wbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xbe():t==="fa"?ybe():bbe()}),Sbe=()=>"Everything stays local",kbe=()=>"一切都保留在本地",Cbe=()=>"همه‌چیز محلی می‌ماند",Ebe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kbe():t==="fa"?Cbe():Sbe()}),Nbe=()=>"Get started",zbe=()=>"开始使用",Abe=()=>"شروع",Tbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zbe():t==="fa"?Abe():Nbe()}),jbe=()=>"Git is required for local experiments. Install Git, then re-check.",Mbe=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",Rbe=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",Dbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mbe():t==="fa"?Rbe():jbe()}),Lbe=()=>"Ground your agents",Obe=()=>"为智能体提供可靠依据",Ibe=()=>"عامل‌هایتان را به منابع متصل کنید",Bbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Obe():t==="fa"?Ibe():Lbe()}),$be=()=>"Install broken",Hbe=()=>"安装损坏",Pbe=()=>"نصب خراب است",Fbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hbe():t==="fa"?Pbe():$be()}),Ube=()=>"Install Git to continue",qbe=()=>"请安装 Git 后再继续",Gbe=()=>"برای ادامه Git را نصب کنید",Vbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qbe():t==="fa"?Gbe():Ube()}),Wbe=()=>"Local Git",Kbe=()=>"本地 Git",Ybe=()=>"Git محلی",Xbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kbe():t==="fa"?Ybe():Wbe()}),Zbe=()=>"Not detected",Qbe=()=>"未检测到",Jbe=()=>"شناسایی نشد",C7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qbe():t==="fa"?Jbe():Zbe()}),e2e=()=>"Not found",t2e=()=>"未找到",n2e=()=>"پیدا نشد",pE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t2e():t==="fa"?n2e():e2e()}),r2e=()=>"Not signed in",s2e=()=>"未登录",i2e=()=>"وارد نشده",a2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s2e():t==="fa"?i2e():r2e()}),o2e=()=>"OpenResearch uses a coding agent already installed on this machine.",l2e=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",c2e=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",u2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l2e():t==="fa"?c2e():o2e()}),d2e=()=>"Other research area",f2e=()=>"其他研究领域",h2e=()=>"حوزهٔ پژوهشی دیگر",_2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f2e():t==="fa"?h2e():d2e()}),p2e=()=>"Re-check",m2e=()=>"重新检查",g2e=()=>"بررسی دوباره",v2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m2e():t==="fa"?g2e():p2e()}),b2e=()=>"Ready",x2e=()=>"已就绪",y2e=()=>"آماده",w2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?x2e():t==="fa"?y2e():b2e()}),S2e=()=>"Re-check Git before continuing",k2e=()=>"请重新检查 Git 后再继续",C2e=()=>"پیش از ادامه Git را دوباره بررسی کنید",E2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k2e():t==="fa"?C2e():S2e()}),N2e=()=>"Representative papers",z2e=()=>"代表性论文",A2e=()=>"مقاله‌های شاخص",T2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z2e():t==="fa"?A2e():N2e()}),j2e=()=>"Research background",M2e=()=>"研究背景",R2e=()=>"پیشینهٔ پژوهشی",D2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M2e():t==="fa"?R2e():j2e()}),L2e=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",O2e=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",I2e=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",E7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O2e():t==="fa"?I2e():L2e()}),B2e=()=>"Search alphaXiv by title to link a paper…",$2e=()=>"按标题搜索 alphaXiv 以关联论文…",H2e=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",P2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$2e():t==="fa"?H2e():B2e()}),F2e=()=>"Searching alphaXiv…",U2e=()=>"正在搜索 alphaXiv…",q2e=()=>"در حال جست‌وجوی alphaXiv…",G2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U2e():t==="fa"?q2e():F2e()}),V2e=()=>"Selected",W2e=()=>"已选择",K2e=()=>"انتخاب‌شده",Y2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W2e():t==="fa"?K2e():V2e()}),X2e=()=>"Setting things up…",Z2e=()=>"正在设置…",Q2e=()=>"در حال راه‌اندازی…",J2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z2e():t==="fa"?Q2e():X2e()}),exe=()=>"Sign in to at least one coding agent to continue",txe=()=>"请至少登录一个编程智能体后再继续",nxe=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",rxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?txe():t==="fa"?nxe():exe()}),sxe=()=>"Sign in to at least one agent to continue.",ixe=()=>"请登录至少一个智能体以继续。",axe=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",oxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ixe():t==="fa"?axe():sxe()}),lxe=()=>"Signed in",cxe=()=>"已登录",uxe=()=>"وارد شده",dxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cxe():t==="fa"?uxe():lxe()}),fxe=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",hxe=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",_xe=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",pxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hxe():t==="fa"?_xe():fxe()}),mxe=()=>"· Step 1 of 2",gxe=()=>"· 第 1 步,共 2 步",vxe=()=>"· مرحلهٔ ۱ از ۲",bxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gxe():t==="fa"?vxe():mxe()}),xxe=()=>"· Step 2 of 2",yxe=()=>"· 第 2 步,共 2 步",wxe=()=>"· مرحلهٔ ۲ از ۲",Sxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yxe():t==="fa"?wxe():xxe()}),kxe=()=>"Tell us about your research",Cxe=()=>"介绍一下你的研究",Exe=()=>"از پژوهش خود بگویید",Nxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cxe():t==="fa"?Exe():kxe()}),zxe=()=>"Tell us your other research area",Axe=()=>"告诉我们你的其他研究领域",Txe=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",jxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Axe():t==="fa"?Txe():zxe()}),Mxe=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",Rxe=()=>"在一处跟踪实验、产物、算力、技能和代码。",Dxe=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Lxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rxe():t==="fa"?Dxe():Mxe()}),Oxe=()=>"Unable to verify",Ixe=()=>"无法验证",Bxe=()=>"تأیید ممکن نیست",$xe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ixe():t==="fa"?Bxe():Oxe()}),Hxe=()=>"Update required",Pxe=()=>"需要更新",Fxe=()=>"نیازمند به‌روزرسانی",Uxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pxe():t==="fa"?Fxe():Hxe()}),qxe=()=>"Waiting for the Git check",Gxe=()=>"正在等待 Git 检查",Vxe=()=>"در انتظار بررسی Git",Wxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gxe():t==="fa"?Vxe():qxe()}),Kxe=()=>"Waiting for the local tool checks",Yxe=()=>"正在等待本地工具检查",Xxe=()=>"در انتظار بررسی ابزارهای محلی",Zxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yxe():t==="fa"?Xxe():Kxe()}),Qxe=()=>"What areas are you interested in?",Jxe=()=>"你对哪些领域感兴趣?",eye=()=>"به چه حوزه‌هایی علاقه دارید؟",tye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jxe():t==="fa"?eye():Qxe()}),nye=()=>"Your code, data, and experiment history stay on your machine.",rye=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",sye=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",iye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rye():t==="fa"?sye():nye()}),aye=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",oye=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",lye=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",cye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oye():t==="fa"?lye():aye()}),uye=()=>"Changed here and on Overleaf — choose which copy to keep",dye=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",fye=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",hye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dye():t==="fa"?fye():uye()}),_ye=()=>"Create a token ↗",pye=()=>"创建令牌 ↗",mye=()=>"ساخت توکن ↗",gye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pye():t==="fa"?mye():_ye()}),vye=()=>"Overleaf Git token",bye=()=>"Overleaf Git 令牌",xye=()=>"توکن Git در Overleaf",yye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bye():t==="fa"?xye():vye()}),wye=()=>"In step with Overleaf",Sye=()=>"已与 Overleaf 同步",kye=()=>"با Overleaf همگام است",mE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sye():t==="fa"?kye():wye()}),Cye=()=>"The last sync did not finish.",Eye=()=>"上次同步未完成。",Nye=()=>"آخرین همگام‌سازی کامل نشد.",zye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eye():t==="fa"?Nye():Cye()}),Aye=()=>"Link and sync",Tye=()=>"关联并同步",jye=()=>"پیوند و همگام‌سازی",Mye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tye():t==="fa"?jye():Aye()}),Rye=()=>"My projects ↗",Dye=()=>"我的项目 ↗",Lye=()=>"پروژه‌های من ↗",Oye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dye():t==="fa"?Lye():Rye()}),Iye=()=>"Nothing could be synced.",Bye=()=>"没有内容可以同步。",$ye=()=>"هیچ موردی قابل همگام‌سازی نبود.",Hye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bye():t==="fa"?$ye():Iye()}),Pye=()=>"Cancel",Fye=()=>"取消",Uye=()=>"لغو",qye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fye():t==="fa"?Uye():Pye()}),Gye=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",Vye=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Wye=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Kye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vye():t==="fa"?Wye():Gye()}),Yye=()=>"Keep this copy",Xye=()=>"保留此副本",Zye=()=>"نگه داشتن این نسخه",Qye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xye():t==="fa"?Zye():Yye()}),Jye=()=>"Open in Overleaf",e4e=()=>"在 Overleaf 中打开",t4e=()=>"باز کردن در Overleaf",n4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e4e():t==="fa"?t4e():Jye()}),r4e=()=>"Replace the Overleaf token",s4e=()=>"替换 Overleaf 令牌",i4e=()=>"جایگزینی توکن Overleaf",N7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s4e():t==="fa"?i4e():r4e()}),a4e=()=>"Sync now",o4e=()=>"立即同步",l4e=()=>"همگام‌سازی اکنون",c4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o4e():t==="fa"?l4e():a4e()}),u4e=()=>"Unlink",d4e=()=>"取消关联",f4e=()=>"قطع پیوند",h4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d4e():t==="fa"?f4e():u4e()}),_4e=()=>"Upload a copy as a new project ↗",p4e=()=>"上传副本作为新项目 ↗",m4e=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",g4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p4e():t==="fa"?m4e():_4e()}),v4e=()=>"Use Overleaf's",b4e=()=>"使用 Overleaf 的副本",x4e=()=>"استفاده از نسخهٔ Overleaf",y4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b4e():t==="fa"?x4e():v4e()}),w4e=()=>"This paper stays in step with Overleaf.",S4e=()=>"此论文将与 Overleaf 保持同步。",k4e=()=>"این مقاله با Overleaf همگام می‌ماند.",C4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S4e():t==="fa"?k4e():w4e()}),E4e=e=>`Pulled ${e==null?void 0:e.paths}.`,N4e=e=>`已拉取 ${e==null?void 0:e.paths}。`,z4e=e=>`${e==null?void 0:e.paths} دریافت شد.`,A4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?N4e(e):t==="fa"?z4e(e):E4e(e)}),T4e=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,j4e=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,M4e=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,R4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j4e(e):t==="fa"?M4e(e):T4e(e)}),D4e=e=>`Pushed ${e==null?void 0:e.paths}.`,L4e=e=>`已推送 ${e==null?void 0:e.paths}。`,O4e=e=>`${e==null?void 0:e.paths} ارسال شد.`,I4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?L4e(e):t==="fa"?O4e(e):D4e(e)}),B4e=()=>"Save the file first",$4e=()=>"请先保存文件",H4e=()=>"ابتدا فایل را ذخیره کنید",P4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$4e():t==="fa"?H4e():B4e()}),F4e=()=>"Save this file to sync it with Overleaf",U4e=()=>"保存此文件以与 Overleaf 同步",q4e=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",gE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U4e():t==="fa"?q4e():F4e()}),G4e=()=>"Save token",V4e=()=>"保存令牌",W4e=()=>"ذخیرهٔ توکن",K4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V4e():t==="fa"?W4e():G4e()}),Y4e=()=>"Send this paper to Overleaf",X4e=()=>"将此论文发送到 Overleaf",Z4e=()=>"ارسال مقاله به Overleaf",Q4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X4e():t==="fa"?Z4e():Y4e()}),J4e=()=>"Overleaf sync failed",ewe=()=>"Overleaf 同步失败",twe=()=>"همگام‌سازی با Overleaf ناموفق بود",nwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ewe():t==="fa"?twe():J4e()}),rwe=()=>"Syncing with Overleaf…",swe=()=>"正在与 Overleaf 同步…",iwe=()=>"در حال همگام‌سازی با Overleaf…",awe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?swe():t==="fa"?iwe():rwe()}),owe=()=>"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.",lwe=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",cwe=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",uwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lwe():t==="fa"?cwe():owe()}),dwe=()=>"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.",fwe=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",hwe=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",_we=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fwe():t==="fa"?hwe():dwe()}),pwe=()=>"Toggle Plan mode for this chat",mwe=()=>"切换此聊天的计划模式",gwe=()=>"تغییر حالت طرح این گفت‌وگو",vwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mwe():t==="fa"?gwe():pwe()}),bwe=()=>"Accept and auto mode",xwe=()=>"接受并使用自动模式",ywe=()=>"پذیرش و حالت خودکار",wwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xwe():t==="fa"?ywe():bwe()}),Swe=()=>"Accept and bypass all",kwe=()=>"接受并跳过所有审批",Cwe=()=>"پذیرش و عبور از همهٔ تأییدها",Ewe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kwe():t==="fa"?Cwe():Swe()}),Nwe=()=>"Accept plan",zwe=()=>"接受计划",Awe=()=>"پذیرش طرح",Twe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zwe():t==="fa"?Awe():Nwe()}),jwe=e=>`${e==null?void 0:e.agent} proposed a plan`,Mwe=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Rwe=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Dwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Mwe(e):t==="fa"?Rwe(e):jwe(e)}),Lwe=e=>`${e==null?void 0:e.agent} is ready to proceed`,Owe=e=>`${e==null?void 0:e.agent} 已准备好继续`,Iwe=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,Bwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Owe(e):t==="fa"?Iwe(e):Lwe(e)}),$we=()=>"Back",Hwe=()=>"返回",Pwe=()=>"بازگشت",Fwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hwe():t==="fa"?Pwe():$we()}),Uwe=()=>"More approval options",qwe=()=>"更多批准选项",Gwe=()=>"گزینه‌های تأیید بیشتر",Vwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qwe():t==="fa"?Gwe():Uwe()}),Wwe=()=>"Open plan",Kwe=()=>"打开计划",Ywe=()=>"باز کردن طرح",Xwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kwe():t==="fa"?Ywe():Wwe()}),Zwe=()=>"Reject",Qwe=()=>"拒绝",Jwe=()=>"رد کردن",e5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qwe():t==="fa"?Jwe():Zwe()}),t5e=()=>"Revise",n5e=()=>"修改",r5e=()=>"بازنگری",s5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),i5e=()=>"Revise…",a5e=()=>"修改…",o5e=()=>"بازنگری…",l5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a5e():t==="fa"?o5e():i5e()}),c5e=()=>"What should change? (optional)",u5e=()=>"需要更改什么?(可选)",d5e=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",f5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u5e():t==="fa"?d5e():c5e()}),h5e=e=>`${e==null?void 0:e.count} active`,_5e=e=>`${e==null?void 0:e.count} 个活跃`,p5e=e=>`${e==null?void 0:e.count} فعال`,m5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_5e(e):t==="fa"?p5e(e):h5e(e)}),g5e=e=>`${e==null?void 0:e.count} total agents`,v5e=e=>`共 ${e==null?void 0:e.count} 个智能体`,b5e=e=>`در مجموع ${e==null?void 0:e.count} عامل`,x5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?v5e(e):t==="fa"?b5e(e):g5e(e)}),y5e=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,w5e=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,S5e=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,k5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?w5e(e):t==="fa"?S5e(e):y5e(e)}),C5e=()=>"Agents",E5e=()=>"智能体",N5e=()=>"عامل‌ها",z7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E5e():t==="fa"?N5e():C5e()}),z5e=()=>"arXiv paper ID:",A5e=()=>"arXiv 论文 ID:",T5e=()=>"شناسهٔ مقالهٔ arXiv:",j5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A5e():t==="fa"?T5e():z5e()}),M5e=()=>"Cancel",R5e=()=>"取消",D5e=()=>"لغو",L5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R5e():t==="fa"?D5e():M5e()}),O5e=()=>"Created",I5e=()=>"创建时间",B5e=()=>"ایجادشده",$5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I5e():t==="fa"?B5e():O5e()}),H5e=()=>"Delete project?",P5e=()=>"删除项目?",F5e=()=>"پروژه حذف شود؟",U5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P5e():t==="fa"?F5e():H5e()}),q5e=()=>"Delete project",G5e=()=>"删除项目",V5e=()=>"حذف پروژه",W5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G5e():t==="fa"?V5e():q5e()}),K5e=()=>"Deleting…",Y5e=()=>"正在删除…",X5e=()=>"در حال حذف…",Z5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y5e():t==="fa"?X5e():K5e()}),Q5e=()=>"Experiments",J5e=()=>"实验",e3e=()=>"آزمایش‌ها",A7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J5e():t==="fa"?e3e():Q5e()}),t3e=()=>"The local folder and linked GitHub repository are kept.",n3e=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",r3e=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",s3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n3e():t==="fa"?r3e():t3e()}),i3e=()=>"The local folder is kept.",a3e=()=>"本地文件夹会保留。",o3e=()=>"پوشهٔ محلی نگه داشته می‌شود.",l3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a3e():t==="fa"?o3e():i3e()}),c3e=()=>"New project",u3e=()=>"新建项目",d3e=()=>"پروژهٔ جدید",vE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u3e():t==="fa"?d3e():c3e()}),f3e=()=>"No projects yet — create one to get started.",h3e=()=>"尚无项目——新建一个即可开始。",_3e=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",p3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h3e():t==="fa"?_3e():f3e()}),m3e=()=>"Project",g3e=()=>"项目",v3e=()=>"پروژه",b3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g3e():t==="fa"?v3e():m3e()}),x3e=()=>"Projects",y3e=()=>"项目",w3e=()=>"پروژه‌ها",S3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y3e():t==="fa"?w3e():x3e()}),k3e=()=>"Repository",C3e=()=>"仓库",E3e=()=>"مخزن",T7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C3e():t==="fa"?E3e():k3e()}),N3e=()=>"Idle",z3e=()=>"空闲",A3e=()=>"بیکار",T3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z3e():t==="fa"?A3e():N3e()}),j3e=()=>"Local",M3e=()=>"本地",R3e=()=>"محلی",D3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M3e():t==="fa"?R3e():j3e()}),L3e=()=>"1 total agent",O3e=()=>"共 1 个智能体",I3e=()=>"در مجموع ۱ عامل",B3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O3e():t==="fa"?I3e():L3e()}),$3e=e=>`${e==null?void 0:e.count} running`,H3e=e=>`${e==null?void 0:e.count} 个运行中`,P3e=e=>`${e==null?void 0:e.count} در حال اجرا`,F3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?H3e(e):t==="fa"?P3e(e):$3e(e)}),U3e=e=>`${e==null?void 0:e.count} total`,q3e=e=>`共 ${e==null?void 0:e.count} 个`,G3e=e=>`در مجموع ${e==null?void 0:e.count}`,j7=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?q3e(e):t==="fa"?G3e(e):U3e(e)}),V3e=e=>`${e==null?void 0:e.value}d`,W3e=e=>`${e==null?void 0:e.value} 天`,K3e=e=>`${e==null?void 0:e.value}ر`,Y3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?W3e(e):t==="fa"?K3e(e):V3e(e)}),X3e=e=>`${e==null?void 0:e.value}h`,Z3e=e=>`${e==null?void 0:e.value} 小时`,Q3e=e=>`${e==null?void 0:e.value}س`,J3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Z3e(e):t==="fa"?Q3e(e):X3e(e)}),e6e=e=>`${e==null?void 0:e.value}m`,t6e=e=>`${e==null?void 0:e.value} 分钟`,n6e=e=>`${e==null?void 0:e.value}د`,r6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?t6e(e):t==="fa"?n6e(e):e6e(e)}),s6e=()=>"now",i6e=()=>"现在",a6e=()=>"اکنون",o6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i6e():t==="fa"?a6e():s6e()}),l6e=()=>"Disable syncing",c6e=()=>"关闭同步",u6e=()=>"غیرفعال کردن همگام‌سازی",d6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c6e():t==="fa"?u6e():l6e()}),f6e=()=>"Enable GitHub syncing",h6e=()=>"启用 GitHub 同步",_6e=()=>"فعال‌سازی همگام‌سازی GitHub",p6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h6e():t==="fa"?_6e():f6e()}),m6e=()=>"Enabling…",g6e=()=>"正在启用…",v6e=()=>"در حال فعال‌سازی…",b6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g6e():t==="fa"?v6e():m6e()}),x6e=()=>"Updating…",y6e=()=>"正在更新…",w6e=()=>"در حال به‌روزرسانی…",S6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y6e():t==="fa"?w6e():x6e()}),k6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,C6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,E6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,N6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?C6e(e):t==="fa"?E6e(e):k6e(e)}),z6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,A6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,T6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,j6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A6e(e):t==="fa"?T6e(e):z6e(e)}),M6e=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`,R6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,D6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,L6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?R6e(e):t==="fa"?D6e(e):M6e(e)}),O6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,I6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,B6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,$6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?I6e(e):t==="fa"?B6e(e):O6e(e)}),H6e=()=>"CLI is retrying…",P6e=()=>"CLI 正在重试…",F6e=()=>"CLI در حال تلاش دوباره است…",U6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P6e():t==="fa"?F6e():H6e()}),q6e=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,G6e=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,V6e=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,W6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?G6e(e):t==="fa"?V6e(e):q6e(e)}),K6e=()=>"Sending again…",Y6e=()=>"正在重新发送…",X6e=()=>"در حال ارسال دوباره…",Z6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y6e():t==="fa"?X6e():K6e()}),Q6e=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,J6e=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,e7e=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,t7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?J6e(e):t==="fa"?e7e(e):Q6e(e)}),n7e=()=>"Retrying…",r7e=()=>"正在重试…",s7e=()=>"در حال تلاش دوباره…",bE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r7e():t==="fa"?s7e():n7e()}),i7e=()=>"Default speed",a7e=()=>"默认速度",o7e=()=>"سرعت پیش‌فرض",l7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a7e():t==="fa"?o7e():i7e()}),c7e=()=>"Standard",u7e=()=>"标准",d7e=()=>"استاندارد",f7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u7e():t==="fa"?d7e():c7e()}),h7e=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,_7e=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,p7e=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,m7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_7e(e):t==="fa"?p7e(e):h7e(e)}),g7e=()=>"Appearance",v7e=()=>"外观",b7e=()=>"ظاهر",x7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v7e():t==="fa"?b7e():g7e()}),y7e=()=>"Check",w7e=()=>"检查",S7e=()=>"بررسی",k7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w7e():t==="fa"?S7e():y7e()}),C7e=()=>"Check again",E7e=()=>"再次检查",N7e=()=>"بررسی دوباره",z7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E7e():t==="fa"?N7e():C7e()}),A7e=()=>"Check for updates",T7e=()=>"检查更新",j7e=()=>"بررسی به‌روزرسانی",M7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T7e():t==="fa"?j7e():A7e()}),R7e=()=>"Check now",D7e=()=>"立即检查",L7e=()=>"اکنون بررسی کن",O7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D7e():t==="fa"?L7e():R7e()}),I7e=()=>"Check setup",B7e=()=>"检查设置",$7e=()=>"بررسی راه‌اندازی",H7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B7e():t==="fa"?$7e():I7e()}),P7e=()=>"orx checks a few times a day on its own.",F7e=()=>"orx 每天会自动检查几次。",U7e=()=>"orx روزی چند بار خودکار بررسی می‌کند.",q7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F7e():t==="fa"?U7e():P7e()}),G7e=()=>"Choose a flavor",V7e=()=>"选择配置",W7e=()=>"انتخاب پیکربندی",K7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V7e():t==="fa"?W7e():G7e()}),Y7e=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,X7e=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,Z7e=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,Q7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?X7e(e):t==="fa"?Z7e(e):Y7e(e)}),J7e=()=>"clean",eSe=()=>"无更改",tSe=()=>"بدون تغییر",nSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eSe():t==="fa"?tSe():J7e()}),rSe=e=>`Already linked at ${e==null?void 0:e.link}.`,sSe=e=>`已链接到 ${e==null?void 0:e.link}。`,iSe=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,aSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?sSe(e):t==="fa"?iSe(e):rSe(e)}),oSe=e=>`Linked ${e==null?void 0:e.link}.`,lSe=e=>`已链接 ${e==null?void 0:e.link}。`,cSe=e=>`${e==null?void 0:e.link} پیوند شد.`,uSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?lSe(e):t==="fa"?cSe(e):oSe(e)}),dSe=()=>"Connect",fSe=()=>"连接",hSe=()=>"اتصال",dx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fSe():t==="fa"?hSe():dSe()}),_Se=()=>"Connected via GitHub CLI",pSe=()=>"已通过 GitHub CLI 连接",mSe=()=>"از طریق GitHub CLI متصل است",xE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pSe():t==="fa"?mSe():_Se()}),gSe=()=>"Connecting…",vSe=()=>"正在连接…",bSe=()=>"در حال اتصال…",yE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vSe():t==="fa"?bSe():gSe()}),xSe=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",ySe=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",wSe=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",SSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ySe():t==="fa"?wSe():xSe()}),kSe=()=>"the current project",CSe=()=>"当前项目",ESe=()=>"پروژهٔ فعلی",NSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CSe():t==="fa"?ESe():kSe()}),zSe=e=>`${e==null?void 0:e.value} (custom)`,ASe=e=>`${e==null?void 0:e.value}(自定义)`,TSe=e=>`${e==null?void 0:e.value} (سفارشی)`,jSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ASe(e):t==="fa"?TSe(e):zSe(e)}),MSe=()=>"detached",RSe=()=>"分离头指针",DSe=()=>"جدا از شاخه",wE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RSe():t==="fa"?DSe():MSe()}),LSe=()=>"Disconnected",OSe=()=>"已断开连接",ISe=()=>"قطع اتصال",SE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OSe():t==="fa"?ISe():LSe()}),BSe=()=>"Environment broken",$Se=()=>"环境损坏",HSe=()=>"محیط خراب است",PSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Se():t==="fa"?HSe():BSe()}),FSe=()=>"Environment not built",USe=()=>"环境尚未构建",qSe=()=>"محیط ساخته نشده است",GSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?USe():t==="fa"?qSe():FSe()}),VSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,WSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,KSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,YSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?WSe(e):t==="fa"?KSe(e):VSe(e)}),XSe=()=>"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.",ZSe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",QSe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",JSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZSe():t==="fa"?QSe():XSe()}),eke=()=>"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.",tke=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",nke=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",rke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tke():t==="fa"?nke():eke()}),ske=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",ike=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",ake=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",oke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ike():t==="fa"?ake():ske()}),lke=()=>"has changes",cke=()=>"有更改",uke=()=>"دارای تغییر",dke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cke():t==="fa"?uke():lke()}),fke=()=>"~/.cache/huggingface/token (hf auth login)",hke=()=>"~/.cache/huggingface/token(hf auth login)",_ke=()=>"~/.cache/huggingface/token (hf auth login)",pke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hke():t==="fa"?_ke():fke()}),mke=()=>"HF_TOKEN environment variable",gke=()=>"HF_TOKEN 环境变量",vke=()=>"متغیر محیطی HF_TOKEN",bke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gke():t==="fa"?vke():mke()}),xke=()=>"~/.openresearch/env",yke=()=>"~/.openresearch/env",wke=()=>"~/.openresearch/env",Ske=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yke():t==="fa"?wke():xke()}),kke=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}.`,Cke=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,Eke=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,Nke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cke(e):t==="fa"?Eke(e):kke(e)}),zke=()=>"Install",Ake=()=>"安装",Tke=()=>"نصب",jke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ake():t==="fa"?Tke():zke()}),Mke=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.`,Rke=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,Dke=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,Lke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rke(e):t==="fa"?Dke(e):Mke(e)}),Oke=e=>`Install the ${e==null?void 0:e.command} command`,Ike=e=>`安装 ${e==null?void 0:e.command} 命令`,Bke=e=>`نصب فرمان ${e==null?void 0:e.command}`,$ke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ike(e):t==="fa"?Bke(e):Oke(e)}),Hke=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",Pke=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",Fke=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",Uke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pke():t==="fa"?Fke():Hke()}),qke=()=>"Install the new release now instead of waiting for the background update.",Gke=()=>"立即安装新版本,无需等待后台更新。",Vke=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",Wke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gke():t==="fa"?Vke():qke()}),Kke=()=>"kubectl default",Yke=()=>"kubectl 默认值",Xke=()=>"پیش‌فرض kubectl",Zke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yke():t==="fa"?Xke():Kke()}),Qke=e=>`kubectl default (${e==null?void 0:e.context})`,Jke=e=>`kubectl 默认值(${e==null?void 0:e.context})`,e8e=e=>`پیش‌فرض kubectl (${e==null?void 0:e.context})`,t8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jke(e):t==="fa"?e8e(e):Qke(e)}),n8e=()=>"Language",r8e=()=>"语言",s8e=()=>"زبان",i8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r8e():t==="fa"?s8e():n8e()}),a8e=e=>`Not signed in. Run ${e==null?void 0:e.command} in a terminal to connect your OpenResearch account.`,o8e=e=>`尚未登录。请在终端中运行 ${e==null?void 0:e.command} 以连接你的 OpenResearch 账户。`,l8e=e=>`وارد نشده‌اید. برای اتصال حساب OpenResearch خود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,c8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?o8e(e):t==="fa"?l8e(e):a8e(e)}),u8e=()=>"Make default",d8e=()=>"设为默认值",f8e=()=>"پیش‌فرض شود",h8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d8e():t==="fa"?f8e():u8e()}),_8e=e=>`The manifest must define one Job. orx injects the run script, environment, labels, and timeout. Use ${e==null?void 0:e.placeholder} in resource names, or override the default path with ${e==null?void 0:e.command}.`,p8e=e=>`清单必须定义一个 Job。orx 会注入运行脚本、环境、标签和超时设置。请在资源名称中使用 ${e==null?void 0:e.placeholder},或通过 ${e==null?void 0:e.command} 覆盖默认路径。`,m8e=e=>`مانیفست باید یک Job تعریف کند. orx اسکریپت اجرا، محیط، برچسب‌ها و مهلت زمانی را تزریق می‌کند. از ${e==null?void 0:e.placeholder} در نام منابع استفاده کنید، یا مسیر پیش‌فرض را با ${e==null?void 0:e.command} تغییر دهید.`,g8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?p8e(e):t==="fa"?m8e(e):_8e(e)}),v8e=()=>"Provisioned (Modal import failing)",b8e=()=>"已预配(Modal 导入失败)",x8e=()=>"آماده شده (درون‌ریزی Modal ناموفق است)",y8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b8e():t==="fa"?x8e():v8e()}),w8e=()=>"MODAL_TOKEN_ID environment variable",S8e=()=>"MODAL_TOKEN_ID 环境变量",k8e=()=>"متغیر محیطی MODAL_TOKEN_ID",C8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S8e():t==="fa"?k8e():w8e()}),E8e=()=>"~/.modal.toml (modal token new)",N8e=()=>"~/.modal.toml(modal token new)",z8e=()=>"~/.modal.toml (modal token new)",A8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N8e():t==="fa"?z8e():E8e()}),T8e=e=>`No Modal token found. Run ${e==null?void 0:e.command}, or add ${e==null?void 0:e.id} and ${e==null?void 0:e.secret} in the Environment tab.`,j8e=e=>`未找到 Modal 令牌。请运行 ${e==null?void 0:e.command},或在“环境”标签页中添加 ${e==null?void 0:e.id} 和 ${e==null?void 0:e.secret}。`,M8e=e=>`توکن Modal پیدا نشد. ${e==null?void 0:e.command} را اجرا کنید، یا ${e==null?void 0:e.id} و ${e==null?void 0:e.secret} را در زبانهٔ محیط اضافه کنید.`,R8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j8e(e):t==="fa"?M8e(e):T8e(e)}),D8e=()=>"~/.openresearch/env",L8e=()=>"~/.openresearch/env",O8e=()=>"~/.openresearch/env",I8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L8e():t==="fa"?O8e():D8e()}),B8e=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,$8e=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,H8e=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,P8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$8e(e):t==="fa"?H8e(e):B8e(e)}),F8e=e=>`Needs ${e==null?void 0:e.tool}`,U8e=e=>`需要 ${e==null?void 0:e.tool}`,q8e=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,G8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U8e(e):t==="fa"?q8e(e):F8e(e)}),V8e=()=>"Needs tools",W8e=()=>"缺少工具",K8e=()=>"به ابزارها نیاز دارد",Y8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W8e():t==="fa"?K8e():V8e()}),X8e=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Z8e=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,Q8e=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,J8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Z8e(e):t==="fa"?Q8e(e):X8e(e)}),eCe=()=>"New runs use SSH; choose a host when launching.",tCe=()=>"新运行将使用 SSH;启动时请选择主机。",nCe=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",rCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tCe():t==="fa"?nCe():eCe()}),sCe=()=>"New token",iCe=()=>"新令牌",aCe=()=>"توکن جدید",oCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iCe():t==="fa"?aCe():sCe()}),lCe=()=>"No default flavor",cCe=()=>"不设默认配置",uCe=()=>"بدون پیکربندی پیش‌فرض",dCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cCe():t==="fa"?uCe():lCe()}),fCe=()=>"none",hCe=()=>"无",_Ce=()=>"هیچ‌کدام",fx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hCe():t==="fa"?_Ce():fCe()}),pCe=()=>"Not built yet",mCe=()=>"尚未构建",gCe=()=>"هنوز ساخته نشده",vCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mCe():t==="fa"?gCe():pCe()}),bCe=()=>"Not connected",xCe=()=>"未连接",yCe=()=>"متصل نیست",kE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xCe():t==="fa"?yCe():bCe()}),wCe=()=>"not found on PATH",SCe=()=>"在 PATH 中未找到",kCe=()=>"در PATH پیدا نشد",CCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SCe():t==="fa"?kCe():wCe()}),ECe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,NCe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,zCe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,ACe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NCe(e):t==="fa"?zCe(e):ECe(e)}),TCe=()=>"not initialized",jCe=()=>"尚未初始化",MCe=()=>"راه‌اندازی نشده",RCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jCe():t==="fa"?MCe():TCe()}),DCe=()=>"Not set",LCe=()=>"未设置",OCe=()=>"تنظیم نشده",ICe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LCe():t==="fa"?OCe():DCe()}),BCe=()=>"OAuth (subscription login)",$Ce=()=>"OAuth(订阅登录)",HCe=()=>"OAuth (ورود با اشتراک)",PCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ce():t==="fa"?HCe():BCe()}),FCe=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.`,UCe=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,qCe=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,GCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?UCe(e):t==="fa"?qCe(e):FCe(e)}),VCe=()=>"Account",WCe=()=>"账户",KCe=()=>"حساب",hx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WCe():t==="fa"?KCe():VCe()}),YCe=()=>"Add one with",XCe=()=>"使用以下命令添加:",ZCe=()=>"یکی با این فرمان اضافه کنید:",QCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XCe():t==="fa"?ZCe():YCe()}),JCe=()=>"Add variable",e9e=()=>"添加变量",t9e=()=>"افزودن متغیر",n9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e9e():t==="fa"?t9e():JCe()}),r9e=()=>"Agent models",s9e=()=>"智能体模型",i9e=()=>"مدل‌های عامل",a9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s9e():t==="fa"?i9e():r9e()}),o9e=()=>"Anonymous usage analytics",l9e=()=>"匿名使用情况分析",c9e=()=>"تحلیل ناشناس استفاده",M7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l9e():t==="fa"?c9e():o9e()}),u9e=()=>"Auth",d9e=()=>"身份验证",f9e=()=>"احراز هویت",h9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d9e():t==="fa"?f9e():u9e()}),_9e=()=>"Authentication",p9e=()=>"身份验证",m9e=()=>"احراز هویت",g9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p9e():t==="fa"?m9e():_9e()}),v9e=()=>"Back to Compute",b9e=()=>"返回算力设置",x9e=()=>"بازگشت به رایانش",CE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b9e():t==="fa"?x9e():v9e()}),y9e=()=>"Backend",w9e=()=>"后端",S9e=()=>"بک‌اند",k9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w9e():t==="fa"?S9e():y9e()}),C9e=()=>"Baseline",E9e=()=>"基线",N9e=()=>"خط مبنا",z9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E9e():t==="fa"?N9e():C9e()}),A9e=()=>"Binary",T9e=()=>"可执行文件",j9e=()=>"فایل اجرایی",M9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T9e():t==="fa"?j9e():A9e()}),R9e=()=>"Cancel",D9e=()=>"取消",L9e=()=>"لغو",_x=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D9e():t==="fa"?L9e():R9e()}),O9e=()=>"Cancel new variable",I9e=()=>"取消新变量",B9e=()=>"لغو متغیر جدید",$9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I9e():t==="fa"?B9e():O9e()}),H9e=()=>"Checking compute targets…",P9e=()=>"正在检查算力目标…",F9e=()=>"در حال بررسی مقصدهای رایانشی…",U9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P9e():t==="fa"?F9e():H9e()}),q9e=()=>"Checking credentials…",G9e=()=>"正在检查凭据…",V9e=()=>"در حال بررسی اطلاعات ورود…",W9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G9e():t==="fa"?V9e():q9e()}),K9e=()=>"Checking kubectl…",Y9e=()=>"正在检查 kubectl…",X9e=()=>"در حال بررسی kubectl…",Z9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y9e():t==="fa"?X9e():K9e()}),Q9e=()=>"Checking Modal…",J9e=()=>"正在检查 Modal…",eEe=()=>"در حال بررسی Modal…",tEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J9e():t==="fa"?eEe():Q9e()}),nEe=()=>"Choose a preset flavor",rEe=()=>"选择预设规格",sEe=()=>"یک پیکربندی آماده انتخاب کنید",R7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rEe():t==="fa"?sEe():nEe()}),iEe=()=>"Cluster",aEe=()=>"集群",oEe=()=>"خوشه",lEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aEe():t==="fa"?oEe():iEe()}),cEe=()=>"cluster default",uEe=()=>"集群默认值",dEe=()=>"پیش‌فرض خوشه",D7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uEe():t==="fa"?dEe():cEe()}),fEe=()=>"cluster default (e.g. 4h, 30m)",hEe=()=>"集群默认值(例如 4h、30m)",_Ee=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",pEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hEe():t==="fa"?_Ee():fEe()}),mEe=()=>"Cluster unreachable",gEe=()=>"无法连接集群",vEe=()=>"خوشه در دسترس نیست",bEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gEe():t==="fa"?vEe():mEe()}),xEe=()=>"Compute",yEe=()=>"算力",wEe=()=>"رایانش",EE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yEe():t==="fa"?wEe():xEe()}),SEe=()=>"Connect compute backends and choose where new runs execute.",kEe=()=>"连接算力后端,并选择新运行的执行位置。",CEe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",EEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kEe():t==="fa"?CEe():SEe()}),NEe=()=>"Connected",zEe=()=>"已连接",AEe=()=>"متصل",px=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zEe():t==="fa"?AEe():NEe()}),TEe=()=>"Context",jEe=()=>"上下文",MEe=()=>"زمینه",REe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jEe():t==="fa"?MEe():TEe()}),DEe=()=>"Current",LEe=()=>"当前",OEe=()=>"فعلی",IEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LEe():t==="fa"?OEe():DEe()}),BEe=()=>"Currently off:",$Ee=()=>"当前已关闭:",HEe=()=>"اکنون خاموش است:",PEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ee():t==="fa"?HEe():BEe()}),FEe=()=>"Custom flavor",UEe=()=>"自定义规格",qEe=()=>"پیکربندی سفارشی",GEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UEe():t==="fa"?qEe():FEe()}),VEe=()=>"Custom flavor…",WEe=()=>"自定义规格…",KEe=()=>"پیکربندی سفارشی…",YEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WEe():t==="fa"?KEe():VEe()}),XEe=()=>"Data directory",ZEe=()=>"数据目录",QEe=()=>"پوشهٔ داده",JEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZEe():t==="fa"?QEe():XEe()}),eNe=()=>"default",tNe=()=>"默认",nNe=()=>"پیش‌فرض",rNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tNe():t==="fa"?nNe():eNe()}),sNe=()=>"Default",iNe=()=>"默认",aNe=()=>"پیش‌فرض",NE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iNe():t==="fa"?aNe():sNe()}),oNe=()=>"Default destination",lNe=()=>"默认目标",cNe=()=>"مقصد پیش‌فرض",uNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lNe():t==="fa"?cNe():oNe()}),dNe=()=>"Detecting hardware…",fNe=()=>"正在检测硬件…",hNe=()=>"در حال شناسایی سخت‌افزار…",_Ne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fNe():t==="fa"?hNe():dNe()}),pNe=()=>"Detecting harnesses…",mNe=()=>"正在检测智能体工具…",gNe=()=>"در حال شناسایی ابزارهای عامل…",vNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mNe():t==="fa"?gNe():pNe()}),bNe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",xNe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",yNe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",wNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xNe():t==="fa"?yNe():bNe()}),SNe=()=>"Effective URL",kNe=()=>"实际使用的网址",CNe=()=>"نشانی مؤثر",ENe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kNe():t==="fa"?CNe():SNe()}),NNe=()=>"Enable GitHub syncing for new projects",zNe=()=>"为新项目启用 GitHub 同步",ANe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",L7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zNe():t==="fa"?ANe():NNe()}),TNe=()=>"Environment",jNe=()=>"环境",MNe=()=>"محیط",mx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jNe():t==="fa"?MNe():TNe()}),RNe=()=>"Failed",DNe=()=>"失败",LNe=()=>"ناموفق",gx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DNe():t==="fa"?LNe():RNe()}),ONe=()=>"General",INe=()=>"常规",BNe=()=>"عمومی",$Ne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?INe():t==="fa"?BNe():ONe()}),HNe=()=>"GitHub publishing",PNe=()=>"GitHub 发布",FNe=()=>"انتشار در GitHub",UNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PNe():t==="fa"?FNe():HNe()}),qNe=()=>"Git token",GNe=()=>"Git 令牌",VNe=()=>"توکن Git",WNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GNe():t==="fa"?VNe():qNe()}),KNe=()=>"Harnesses",YNe=()=>"智能体工具",XNe=()=>"ابزارهای عامل",ZNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YNe():t==="fa"?XNe():KNe()}),QNe=()=>"hf_…",JNe=()=>"hf_…",eze=()=>"hf_…",tze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JNe():t==="fa"?eze():QNe()}),nze=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",rze=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",sze=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",ize=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rze():t==="fa"?sze():nze()}),aze=()=>"Hostname",oze=()=>"主机名",lze=()=>"نام میزبان",cze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oze():t==="fa"?lze():aze()}),uze=()=>"How it connects",dze=()=>"连接方式",fze=()=>"نحوهٔ اتصال",hze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dze():t==="fa"?fze():uze()}),_ze=()=>"Initialize Git",pze=()=>"初始化 Git",mze=()=>"راه‌اندازی Git",gze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pze():t==="fa"?mze():_ze()}),vze=()=>"Install",bze=()=>"安装",xze=()=>"نصب",yze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bze():t==="fa"?xze():vze()}),wze=()=>"Install broken",Sze=()=>"安装损坏",kze=()=>"نصب خراب است",Cze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sze():t==="fa"?kze():wze()}),Eze=()=>"Install GitHub CLI",Nze=()=>"安装 GitHub CLI",zze=()=>"نصب GitHub CLI",Aze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nze():t==="fa"?zze():Eze()}),Tze=()=>"Install updates automatically",jze=()=>"自动安装更新",Mze=()=>"نصب خودکار به‌روزرسانی‌ها",O7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jze():t==="fa"?Mze():Tze()}),Rze=()=>"Instance history",Dze=()=>"实例历史",Lze=()=>"تاریخچهٔ نمونه‌ها",Oze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dze():t==="fa"?Lze():Rze()}),Ize=()=>"Invalid token",Bze=()=>"令牌无效",$ze=()=>"توکن نامعتبر",Hze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bze():t==="fa"?$ze():Ize()}),Pze=()=>"Jobs",Fze=()=>"Jobs",Uze=()=>"Jobs",qze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fze():t==="fa"?Uze():Pze()}),Gze=()=>"Jobs / Dashboard URL",Vze=()=>"Jobs / 控制台网址",Wze=()=>"نشانی Jobs / داشبورد",Kze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vze():t==="fa"?Wze():Gze()}),Yze=()=>"Jobs permission unknown",Xze=()=>"Jobs 权限未知",Zze=()=>"مجوز Jobs نامشخص است",Qze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xze():t==="fa"?Zze():Yze()}),Jze=()=>"Jobs: write OK",eAe=()=>"Jobs:写入正常",tAe=()=>"Jobs: نوشتن مجاز است",nAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eAe():t==="fa"?tAe():Jze()}),rAe=()=>"kubectl not found",sAe=()=>"未找到 kubectl",iAe=()=>"kubectl پیدا نشد",aAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sAe():t==="fa"?iAe():rAe()}),oAe=()=>"Latest",lAe=()=>"最新版本",cAe=()=>"جدیدترین",uAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lAe():t==="fa"?cAe():oAe()}),dAe=()=>"Loading…",fAe=()=>"正在加载…",hAe=()=>"در حال بارگیری…",Nl=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fAe():t==="fa"?hAe():dAe()}),_Ae=()=>"Loading Ray settings…",pAe=()=>"正在加载 Ray 设置…",mAe=()=>"در حال بارگیری تنظیمات Ray…",gAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pAe():t==="fa"?mAe():_Ae()}),vAe=()=>"Loading slurm settings…",bAe=()=>"正在加载 Slurm 设置…",xAe=()=>"در حال بارگیری تنظیمات Slurm…",yAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bAe():t==="fa"?xAe():vAe()}),wAe=()=>"Loading status…",SAe=()=>"正在加载状态…",kAe=()=>"در حال بارگیری وضعیت…",CAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SAe():t==="fa"?kAe():wAe()}),EAe=()=>"Local only",NAe=()=>"仅本地",zAe=()=>"فقط محلی",AAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NAe():t==="fa"?zAe():EAe()}),TAe=()=>"Local repository",jAe=()=>"本地仓库",MAe=()=>"مخزن محلی",RAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jAe():t==="fa"?MAe():TAe()}),DAe=()=>"Login node",LAe=()=>"登录节点",OAe=()=>"گرهٔ ورود",IAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LAe():t==="fa"?OAe():DAe()}),BAe=()=>"Make GitHub syncing the default?",$Ae=()=>"将 GitHub 同步设为默认值?",HAe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",PAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ae():t==="fa"?HAe():BAe()}),FAe=()=>"Missing bash/tar",UAe=()=>"缺少 bash/tar",qAe=()=>"bash/tar موجود نیست",GAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UAe():t==="fa"?qAe():FAe()}),VAe=()=>"More compute options",WAe=()=>"更多算力选项",KAe=()=>"گزینه‌های رایانشی بیشتر",YAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WAe():t==="fa"?KAe():VAe()}),XAe=()=>"Move failed:",ZAe=()=>"移动失败:",QAe=()=>"انتقال ناموفق بود:",JAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZAe():t==="fa"?QAe():XAe()}),eTe=()=>"Moved. orx is now using the new location.",tTe=()=>"已移动。orx 现在使用新位置。",nTe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",rTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tTe():t==="fa"?nTe():eTe()}),sTe=()=>"Namespace",iTe=()=>"命名空间",aTe=()=>"فضای نام",oTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iTe():t==="fa"?aTe():sTe()}),lTe=()=>"New location",cTe=()=>"新位置",uTe=()=>"محل جدید",dTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cTe():t==="fa"?uTe():lTe()}),fTe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",hTe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",_Te=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",pTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hTe():t==="fa"?_Te():fTe()}),mTe=()=>"New variable key",gTe=()=>"新变量键名",vTe=()=>"کلید متغیر جدید",bTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gTe():t==="fa"?vTe():mTe()}),xTe=()=>"New variable value",yTe=()=>"新变量值",wTe=()=>"مقدار متغیر جدید",STe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yTe():t==="fa"?wTe():xTe()}),kTe=()=>"No code, prompts, file contents, or account identifiers are sent.",CTe=()=>"不会发送代码、提示词、文件内容或账户标识符。",ETe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",NTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CTe():t==="fa"?ETe():kTe()}),zTe=()=>"No hosts found in ~/.ssh/config.",ATe=()=>"在 ~/.ssh/config 中未找到主机。",TTe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",jTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ATe():t==="fa"?TTe():zTe()}),MTe=()=>"No job-create permission",RTe=()=>"没有创建 Job 的权限",DTe=()=>"مجوز ساخت Job وجود ندارد",LTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RTe():t==="fa"?DTe():MTe()}),OTe=()=>"No job.write permission",ITe=()=>"没有 job.write 权限",BTe=()=>"مجوز job.write وجود ندارد",$Te=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ITe():t==="fa"?BTe():OTe()}),HTe=()=>"No key on this computer to register — load a registered key with",PTe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",FTe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",UTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PTe():t==="fa"?FTe():HTe()}),qTe=()=>"No key on this computer yet — create one with",GTe=()=>"此计算机上还没有密钥——使用以下命令创建:",VTe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",WTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GTe():t==="fa"?VTe():qTe()}),KTe=()=>"No Slurm CLI",YTe=()=>"无 Slurm CLI",XTe=()=>"بدون CLI اسلورم",ZTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YTe():t==="fa"?XTe():KTe()}),QTe=()=>"No token",JTe=()=>"无令牌",eje=()=>"بدون توکن",tje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JTe():t==="fa"?eje():QTe()}),nje=()=>"None registered",rje=()=>"未注册任何密钥",sje=()=>"هیچ‌کدام ثبت نشده",ije=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rje():t==="fa"?sje():nje()}),aje=()=>"Not checked",oje=()=>"未检查",lje=()=>"بررسی نشده",zE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oje():t==="fa"?lje():aje()}),cje=()=>"Not configured",uje=()=>"未配置",dje=()=>"پیکربندی نشده",Mp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uje():t==="fa"?dje():cje()}),fje=()=>"Not installed",hje=()=>"未安装",_je=()=>"نصب نیست",pje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hje():t==="fa"?_je():fje()}),mje=()=>"Not now",gje=()=>"暂不",vje=()=>"اکنون نه",bje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gje():t==="fa"?vje():mje()}),xje=()=>"Not on this computer",yje=()=>"不在此计算机上",wje=()=>"روی این رایانه نیست",Sje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yje():t==="fa"?wje():xje()}),kje=()=>"Not set (pass --host per launch)",Cje=()=>"未设置(每次启动时传入 --host)",Eje=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",Nje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cje():t==="fa"?Eje():kje()}),zje=()=>"Not set up",Aje=()=>"未设置",Tje=()=>"راه‌اندازی نشده",jje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aje():t==="fa"?Tje():zje()}),Mje=()=>"Not signed in",Rje=()=>"未登录",Dje=()=>"وارد نشده",Lje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rje():t==="fa"?Dje():Mje()}),Oje=()=>"On this computer",Ije=()=>"在此计算机上",Bje=()=>"روی این رایانه",$je=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ije():t==="fa"?Bje():Oje()}),Hje=()=>"Open a project to inspect its repository and GitHub publication state.",Pje=()=>"打开项目以查看其仓库和 GitHub 发布状态。",Fje=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",Uje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pje():t==="fa"?Fje():Hje()}),qje=()=>"Open job page",Gje=()=>"打开作业页面",Vje=()=>"باز کردن صفحهٔ کار",I7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gje():t==="fa"?Vje():qje()}),Wje=()=>"Open on GitHub",Kje=()=>"在 GitHub 上打开",Yje=()=>"باز کردن در GitHub",B7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kje():t==="fa"?Yje():Wje()}),Xje=()=>", or create one with",Zje=()=>",或使用以下命令创建:",Qje=()=>"، یا با این فرمان یکی بسازید:",Jje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zje():t==="fa"?Qje():Xje()}),eMe=()=>"Org",tMe=()=>"组织",nMe=()=>"سازمان",rMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tMe():t==="fa"?nMe():eMe()}),sMe=()=>"Orgs",iMe=()=>"组织",aMe=()=>"سازمان‌ها",oMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iMe():t==="fa"?aMe():sMe()}),lMe=()=>"orx can't update this install",cMe=()=>"orx 无法更新此安装",uMe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",dMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cMe():t==="fa"?uMe():lMe()}),fMe=()=>"Overleaf",hMe=()=>"Overleaf",_Me=()=>"Overleaf",pMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hMe():t==="fa"?_Me():fMe()}),mMe=()=>"Overleaf Git authentication token",gMe=()=>"Overleaf Git 身份验证令牌",vMe=()=>"توکن احراز هویت Git در Overleaf",bMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gMe():t==="fa"?vMe():mMe()}),xMe=()=>"Overridden by env",yMe=()=>"已被环境变量覆盖",wMe=()=>"بازنویسی‌شده توسط محیط",SMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yMe():t==="fa"?wMe():xMe()}),kMe=()=>"Partition",CMe=()=>"分区",EMe=()=>"پارتیشن",NMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CMe():t==="fa"?EMe():kMe()}),zMe=()=>"Partitions",AMe=()=>"分区",TMe=()=>"پارتیشن‌ها",jMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AMe():t==="fa"?TMe():zMe()}),MMe=()=>"Path",RMe=()=>"路径",DMe=()=>"مسیر",LMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RMe():t==="fa"?DMe():MMe()}),OMe=()=>"Plan",IMe=()=>"方案",BMe=()=>"سطح اشتراک",$Me=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IMe():t==="fa"?BMe():OMe()}),HMe=()=>"Project",PMe=()=>"项目",FMe=()=>"پروژه",UMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PMe():t==="fa"?FMe():HMe()}),qMe=()=>"Ray version",GMe=()=>"Ray 版本",VMe=()=>"نسخهٔ Ray",WMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GMe():t==="fa"?VMe():qMe()}),KMe=()=>"Reachable",YMe=()=>"可访问",XMe=()=>"در دسترس",ZMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YMe():t==="fa"?XMe():KMe()}),QMe=()=>"Reading ~/.ssh/config…",JMe=()=>"正在读取 ~/.ssh/config…",eRe=()=>"در حال خواندن ‎~/.ssh/config…",tRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JMe():t==="fa"?eRe():QMe()}),nRe=()=>"Ready",rRe=()=>"就绪",sRe=()=>"آماده",vx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rRe():t==="fa"?sRe():nRe()}),iRe=()=>"Ready to move",aRe=()=>"可以移动",oRe=()=>"آمادهٔ انتقال",lRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aRe():t==="fa"?oRe():iRe()}),cRe=()=>"Ready to use",uRe=()=>"可用",dRe=()=>"آمادهٔ استفاده",fRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uRe():t==="fa"?dRe():cRe()}),hRe=()=>"Refresh",_Re=()=>"刷新",pRe=()=>"تازه‌سازی",Rp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Re():t==="fa"?pRe():hRe()}),mRe=()=>"Remotes",gRe=()=>"远程仓库",vRe=()=>"مخزن‌های دوردست",bRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gRe():t==="fa"?vRe():mRe()}),xRe=()=>"Repository",yRe=()=>"仓库",wRe=()=>"مخزن",SRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yRe():t==="fa"?wRe():xRe()}),kRe=()=>"Restart to finish updating",CRe=()=>"重新启动以完成更新",ERe=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",NRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CRe():t==="fa"?ERe():kRe()}),zRe=()=>"Run manifest",ARe=()=>"运行清单",TRe=()=>"مانیفست اجرا",jRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ARe():t==="fa"?TRe():zRe()}),MRe=()=>"Running instances",RRe=()=>"正在运行的实例",DRe=()=>"نمونه‌های در حال اجرا",LRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RRe():t==="fa"?DRe():MRe()}),ORe=()=>"Runtime",IRe=()=>"运行时间",BRe=()=>"زمان اجرا",$Re=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IRe():t==="fa"?BRe():ORe()}),HRe=()=>". Save it under that key if it's meant for HF Jobs.",PRe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",FRe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",URe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PRe():t==="fa"?FRe():HRe()}),qRe=()=>"Settings",GRe=()=>"设置",VRe=()=>"تنظیمات",AE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GRe():t==="fa"?VRe():qRe()}),WRe=()=>"Signed in",KRe=()=>"已登录",YRe=()=>"وارد شده",TE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KRe():t==="fa"?YRe():WRe()}),XRe=()=>"Source",ZRe=()=>"来源",QRe=()=>"منبع",bx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZRe():t==="fa"?QRe():XRe()}),JRe=()=>"SSH key",eDe=()=>"SSH 密钥",tDe=()=>"کلید SSH",nDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eDe():t==="fa"?tDe():JRe()}),rDe=()=>"Started",sDe=()=>"开始时间",iDe=()=>"آغاز",aDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sDe():t==="fa"?iDe():rDe()}),oDe=()=>"State",lDe=()=>"状态",cDe=()=>"وضعیت",uDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lDe():t==="fa"?cDe():oDe()}),dDe=()=>"Status",fDe=()=>"状态",hDe=()=>"وضعیت",Dp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fDe():t==="fa"?hDe():dDe()}),_De=()=>"Storage",pDe=()=>"存储",mDe=()=>"ذخیره‌سازی",gDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pDe():t==="fa"?mDe():_De()}),vDe=()=>"Sync",bDe=()=>"同步",xDe=()=>"همگام‌سازی",yDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bDe():t==="fa"?xDe():vDe()}),wDe=()=>"Syncing off",SDe=()=>"同步已关闭",kDe=()=>"همگام‌سازی خاموش",CDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SDe():t==="fa"?kDe():wDe()}),EDe=()=>"System",NDe=()=>"系统",zDe=()=>"سامانه",ADe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NDe():t==="fa"?zDe():EDe()}),TDe=()=>"Test connection",jDe=()=>"测试连接",MDe=()=>"آزمایش اتصال",RDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jDe():t==="fa"?MDe():TDe()}),DDe=()=>"Testing…",LDe=()=>"正在测试…",ODe=()=>"در حال آزمایش…",IDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LDe():t==="fa"?ODe():DDe()}),BDe=()=>", then add it with",$De=()=>",然后使用以下命令添加:",HDe=()=>"، سپس با این فرمان اضافه‌اش کنید:",PDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$De():t==="fa"?HDe():BDe()}),FDe=()=>"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.",UDe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",qDe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",GDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UDe():t==="fa"?qDe():FDe()}),VDe=()=>"This saved destination is not configured. Set it up below or choose another backend.",WDe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",KDe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",YDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WDe():t==="fa"?KDe():VDe()}),XDe=()=>"This value looks like a Hugging Face token — compute runs only read it from",ZDe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",QDe=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",JDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZDe():t==="fa"?QDe():XDe()}),eLe=()=>"Time limit",tLe=()=>"时间限制",nLe=()=>"محدودیت زمانی",rLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tLe():t==="fa"?nLe():eLe()}),sLe=()=>"Token",iLe=()=>"令牌",aLe=()=>"توکن",jE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iLe():t==="fa"?aLe():sLe()}),oLe=()=>"Unable to verify",lLe=()=>"无法验证",cLe=()=>"تأیید ممکن نیست",uLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lLe():t==="fa"?cLe():oLe()}),dLe=()=>"Unknown",fLe=()=>"未知",hLe=()=>"نامشخص",ME=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fLe():t==="fa"?hLe():dLe()}),_Le=()=>"Update required",pLe=()=>"需要更新",mLe=()=>"نیازمند به‌روزرسانی",gLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pLe():t==="fa"?mLe():_Le()}),vLe=()=>"Updates",bLe=()=>"更新",xLe=()=>"به‌روزرسانی‌ها",$7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bLe():t==="fa"?xLe():vLe()}),yLe=()=>"Usage analytics",wLe=()=>"使用情况分析",SLe=()=>"تحلیل استفاده",kLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wLe():t==="fa"?SLe():yLe()}),CLe=()=>"value",ELe=()=>"值",NLe=()=>"مقدار",RE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ELe():t==="fa"?NLe():CLe()}),zLe=()=>"Variables available to runs and the research agent (API keys, tokens).",ALe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",TLe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",jLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ALe():t==="fa"?TLe():zLe()}),MLe=()=>"Version",RLe=()=>"版本",DLe=()=>"نسخه",DE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RLe():t==="fa"?DLe():MLe()}),LLe=()=>"What happens",OLe=()=>"执行内容",ILe=()=>"چه اتفاقی می‌افتد",BLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OLe():t==="fa"?ILe():LLe()}),$Le=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",HLe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",PLe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",FLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HLe():t==="fa"?PLe():$Le()}),ULe=()=>"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.",qLe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",GLe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",VLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qLe():t==="fa"?GLe():ULe()}),WLe=()=>"Pick a login node first",KLe=()=>"请先选择登录节点",YLe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",XLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KLe():t==="fa"?YLe():WLe()}),ZLe=()=>"Providers",QLe=()=>"提供商",JLe=()=>"ارائه‌دهندگان",eOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QLe():t==="fa"?JLe():ZLe()}),tOe=()=>"Reconnect",nOe=()=>"重新连接",rOe=()=>"اتصال دوباره",LE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nOe():t==="fa"?rOe():tOe()}),sOe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,iOe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,aOe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,oOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?iOe(e):t==="fa"?aOe(e):sOe(e)}),lOe=()=>"Reinstall with the orx installer to get automatic updates.",cOe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",uOe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",dOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cOe():t==="fa"?uOe():lOe()}),fOe=()=>"Re-link",hOe=()=>"重新链接",_Oe=()=>"پیوند دوباره",pOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hOe():t==="fa"?_Oe():fOe()}),mOe=()=>"Remove token",gOe=()=>"移除令牌",vOe=()=>"حذف توکن",bOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gOe():t==="fa"?vOe():mOe()}),xOe=()=>"Removing…",yOe=()=>"正在移除…",wOe=()=>"در حال حذف…",SOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yOe():t==="fa"?wOe():xOe()}),kOe=()=>"Replace anyway",COe=()=>"仍要替换",EOe=()=>"به‌هرحال جایگزین کن",NOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?COe():t==="fa"?EOe():kOe()}),zOe=()=>"Replace token",AOe=()=>"替换令牌",TOe=()=>"جایگزینی توکن",jOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AOe():t==="fa"?TOe():zOe()}),MOe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,ROe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,DOe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,LOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ROe(e):t==="fa"?DOe(e):MOe(e)}),OOe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,IOe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,BOe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,$Oe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?IOe(e):t==="fa"?BOe(e):OOe(e)}),HOe=()=>"Run `gh auth login` in your terminal.",POe=()=>"请在终端中运行 `gh auth login`。",FOe=()=>"در پایانه `gh auth login` را اجرا کنید.",UOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?POe():t==="fa"?FOe():HOe()}),qOe=()=>"Saved",GOe=()=>"已保存",VOe=()=>"ذخیره شده",WOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GOe():t==="fa"?VOe():qOe()}),KOe=()=>"Set up",YOe=()=>"设置",XOe=()=>"راه‌اندازی",ZOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YOe():t==="fa"?XOe():KOe()}),QOe=()=>"Set up environment",JOe=()=>"设置环境",eIe=()=>"راه‌اندازی محیط",tIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JOe():t==="fa"?eIe():QOe()}),nIe=()=>"Setting up… (~30–60s)",rIe=()=>"正在设置…(约 30–60 秒)",sIe=()=>"در حال راه‌اندازی… (حدود ۳۰ تا ۶۰ ثانیه)",iIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rIe():t==="fa"?sIe():nIe()}),aIe=()=>"Sign in",oIe=()=>"登录",lIe=()=>"ورود",cIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oIe():t==="fa"?lIe():aIe()}),uIe=()=>"The SSH connection closed before setup completed.",dIe=()=>"SSH 连接在设置完成前已关闭。",fIe=()=>"اتصال SSH پیش از تکمیل راه‌اندازی بسته شد.",H7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dIe():t==="fa"?fIe():uIe()}),hIe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,_Ie=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,pIe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,OE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_Ie(e):t==="fa"?pIe(e):hIe(e)}),mIe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",gIe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",vIe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",bIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gIe():t==="fa"?vIe():mIe()}),xIe=()=>"Dark",yIe=()=>"深色",wIe=()=>"تیره",SIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yIe():t==="fa"?wIe():xIe()}),kIe=()=>"Theme",CIe=()=>"主题",EIe=()=>"پوسته",P7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CIe():t==="fa"?EIe():kIe()}),NIe=()=>"Light",zIe=()=>"浅色",AIe=()=>"روشن",TIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zIe():t==="fa"?AIe():NIe()}),jIe=()=>"System",MIe=()=>"系统",RIe=()=>"سیستم",DIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MIe():t==="fa"?RIe():jIe()}),LIe=()=>"Update now",OIe=()=>"立即更新",IIe=()=>"اکنون به‌روزرسانی کن",BIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OIe():t==="fa"?IIe():LIe()}),$Ie=e=>`Update to ${e==null?void 0:e.version}`,HIe=e=>`更新到 ${e==null?void 0:e.version}`,PIe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,FIe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?HIe(e):t==="fa"?PIe(e):$Ie(e)}),UIe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",qIe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",GIe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",VIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qIe():t==="fa"?GIe():UIe()}),WIe=()=>"Updating default destination…",KIe=()=>"正在更新默认运行位置…",YIe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",XIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KIe():t==="fa"?YIe():WIe()}),ZIe=()=>"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.",QIe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",JIe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",eBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QIe():t==="fa"?JIe():ZIe()}),tBe=()=>"Validating…",nBe=()=>"正在验证…",rBe=()=>"در حال اعتبارسنجی…",sBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nBe():t==="fa"?rBe():tBe()}),iBe=()=>"View settings",aBe=()=>"查看设置",oBe=()=>"مشاهدهٔ تنظیمات",lBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aBe():t==="fa"?oBe():iBe()}),cBe=()=>"Skill",uBe=()=>"技能",dBe=()=>"مهارت",IE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uBe():t==="fa"?dBe():cBe()}),fBe=()=>"Loading skill…",hBe=()=>"正在加载技能…",_Be=()=>"در حال بارگیری مهارت…",pBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hBe():t==="fa"?_Be():fBe()}),mBe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,gBe=e=>`删除技能“${e==null?void 0:e.name}”?`,vBe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,bBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?gBe(e):t==="fa"?vBe(e):mBe(e)}),xBe=e=>`Delete skill ${e==null?void 0:e.name}`,yBe=e=>`删除技能 ${e==null?void 0:e.name}`,wBe=e=>`حذف مهارت ${e==null?void 0:e.name}`,SBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yBe(e):t==="fa"?wBe(e):xBe(e)}),kBe=e=>`Delete the “${e==null?void 0:e.name}” template?`,CBe=e=>`删除模板“${e==null?void 0:e.name}”?`,EBe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,NBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?CBe(e):t==="fa"?EBe(e):kBe(e)}),zBe=e=>`Delete template ${e==null?void 0:e.name}`,ABe=e=>`删除模板 ${e==null?void 0:e.name}`,TBe=e=>`حذف قالب ${e==null?void 0:e.name}`,jBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ABe(e):t==="fa"?TBe(e):zBe(e)}),MBe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",RBe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",DBe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",LBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RBe():t==="fa"?DBe():MBe()}),OBe=()=>"Drop a SKILL.md or .zip here, or click to choose",IBe=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",BBe=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",$Be=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IBe():t==="fa"?BBe():OBe()}),HBe=()=>"Drop a .tex or .zip here, or click to choose",PBe=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",FBe=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",UBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PBe():t==="fa"?FBe():HBe()}),qBe=()=>"File too large (max 20 MB).",GBe=()=>"文件过大(最大 20 MB)。",VBe=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",BE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GBe():t==="fa"?VBe():qBe()}),WBe=()=>" + 1 file",KBe=()=>" + 1 个文件",YBe=()=>" + ۱ فایل",XBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KBe():t==="fa"?YBe():WBe()}),ZBe=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",QBe=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",JBe=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",e$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QBe():t==="fa"?JBe():ZBe()}),t$e=e=>` + ${e==null?void 0:e.count} files`,n$e=e=>` + ${e==null?void 0:e.count} 个文件`,r$e=e=>` + ${e==null?void 0:e.count} فایل`,s$e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?n$e(e):t==="fa"?r$e(e):t$e(e)}),i$e=()=>"Could not load skills:",a$e=()=>"无法加载技能:",o$e=()=>"بارگیری مهارت‌ها ممکن نشد:",l$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a$e():t==="fa"?o$e():i$e()}),c$e=()=>"Could not load templates:",u$e=()=>"无法加载模板:",d$e=()=>"بارگیری قالب‌ها ممکن نشد:",f$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u$e():t==="fa"?d$e():c$e()}),h$e=()=>"Customize",_$e=()=>"自定义",p$e=()=>"سفارشی‌سازی",m$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_$e():t==="fa"?p$e():h$e()}),g$e=()=>"Delete skill",v$e=()=>"删除技能",b$e=()=>"حذف مهارت",x$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v$e():t==="fa"?b$e():g$e()}),y$e=()=>"Delete template",w$e=()=>"删除模板",S$e=()=>"حذف قالب",k$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w$e():t==="fa"?S$e():y$e()}),C$e=()=>"LaTeX templates",E$e=()=>"LaTeX 模板",N$e=()=>"قالب‌های LaTeX",z$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E$e():t==="fa"?N$e():C$e()}),A$e=()=>"Loading skills…",T$e=()=>"正在加载技能…",j$e=()=>"در حال بارگیری مهارت‌ها…",M$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T$e():t==="fa"?j$e():A$e()}),R$e=()=>"Loading templates…",D$e=()=>"正在加载模板…",L$e=()=>"در حال بارگیری قالب‌ها…",O$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D$e():t==="fa"?L$e():R$e()}),I$e=()=>"No skills yet.",B$e=()=>"尚无技能。",$$e=()=>"هنوز مهارتی وجود ندارد.",H$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B$e():t==="fa"?$$e():I$e()}),P$e=()=>"No templates yet.",F$e=()=>"尚无模板。",U$e=()=>"هنوز قالبی وجود ندارد.",q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F$e():t==="fa"?U$e():P$e()}),G$e=()=>"Skills",V$e=()=>"技能",W$e=()=>"مهارت‌ها",K$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V$e():t==="fa"?W$e():G$e()}),Y$e=()=>"Uploading…",X$e=()=>"正在上传…",Z$e=()=>"در حال بارگذاری…",Q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X$e():t==="fa"?Z$e():Y$e()}),J$e=()=>"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. With exactly one template available, the agent uses it without asking.",eHe=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",tHe=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",nHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eHe():t==="fa"?tHe():J$e()}),rHe=()=>"Upload a SKILL.md file or a .zip of a skill folder.",sHe=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",iHe=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",aHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sHe():t==="fa"?iHe():rHe()}),oHe=()=>"Upload a .tex file or a .zip of a template folder.",lHe=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",cHe=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",uHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lHe():t==="fa"?cHe():oHe()}),dHe=()=>"Cancelled",fHe=()=>"已取消",hHe=()=>"لغوشده",_He=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fHe():t==="fa"?hHe():dHe()}),pHe=()=>"Cancelling",mHe=()=>"正在取消",gHe=()=>"در حال لغو",vHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mHe():t==="fa"?gHe():pHe()}),bHe=()=>"Done",xHe=()=>"已完成",yHe=()=>"انجام‌شده",wHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xHe():t==="fa"?yHe():bHe()}),SHe=()=>"Editing",kHe=()=>"正在编辑",CHe=()=>"در حال ویرایش",EHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kHe():t==="fa"?CHe():SHe()}),NHe=()=>"Failed",zHe=()=>"失败",AHe=()=>"ناموفق",THe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zHe():t==="fa"?AHe():NHe()}),jHe=()=>"Idle",MHe=()=>"空闲",RHe=()=>"بی‌کار",DHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MHe():t==="fa"?RHe():jHe()}),LHe=()=>"Running",OHe=()=>"运行中",IHe=()=>"در حال اجرا",BHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OHe():t==="fa"?IHe():LHe()}),$He=()=>"Starting",HHe=()=>"正在启动",PHe=()=>"در حال آغاز",FHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HHe():t==="fa"?PHe():$He()}),UHe=()=>"Copying…",qHe=()=>"正在复制…",GHe=()=>"در حال کپی…",VHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qHe():t==="fa"?GHe():UHe()}),WHe=()=>"Finalizing…",KHe=()=>"正在完成…",YHe=()=>"در حال نهایی‌سازی…",XHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KHe():t==="fa"?YHe():WHe()}),ZHe=e=>`${e==null?void 0:e.size} free at target`,QHe=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,JHe=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,ePe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?QHe(e):t==="fa"?JHe(e):ZHe(e)}),tPe=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.`,MHe=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,nPe=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,RHe=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,rPe=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,DHe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?MHe(e):t==="fa"?RHe(e):jHe(e)}),LHe=()=>"Move data here",OHe=()=>"将数据移动到此处",IHe=()=>"انتقال داده به اینجا",BHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OHe():t==="fa"?IHe():LHe()}),$He=()=>"Moving…",HHe=()=>"正在移动…",PHe=()=>"در حال جابه‌جایی…",FHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HHe():t==="fa"?PHe():$He()}),UHe=()=>"Preparing…",qHe=()=>"正在准备…",GHe=()=>"در حال آماده‌سازی…",VHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qHe():t==="fa"?GHe():UHe()}),WHe=()=>" (same disk, instant)",KHe=()=>"(同一磁盘,可立即完成)",YHe=()=>" (روی همان دیسک، فوری)",XHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KHe():t==="fa"?YHe():WHe()}),ZHe=()=>"default location",QHe=()=>"默认位置",JHe=()=>"محل پیش‌فرض",ePe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QHe():t==="fa"?JHe():ZHe()}),tPe=()=>"ORX_DATA_DIR environment variable",nPe=()=>"ORX_DATA_DIR 环境变量",rPe=()=>"متغیر محیطی ORX_DATA_DIR",sPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nPe():t==="fa"?rPe():tPe()}),iPe=()=>"your saved setting",aPe=()=>"已保存的设置",oPe=()=>"تنظیم ذخیره‌شدهٔ شما",lPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aPe():t==="fa"?oPe():iPe()}),cPe=()=>"XDG_DATA_HOME",uPe=()=>"XDG_DATA_HOME",dPe=()=>"XDG_DATA_HOME",fPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uPe():t==="fa"?dPe():cPe()}),hPe=()=>"Verifying…",_Pe=()=>"正在验证…",pPe=()=>"در حال بررسی…",mPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Pe():t==="fa"?pPe():hPe()}),gPe=()=>"Loading…",vPe=()=>"正在加载…",bPe=()=>"در حال بارگیری…",xPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vPe():t==="fa"?bPe():gPe()}),yPe=()=>"This sub-agent is no longer available.",wPe=()=>"此子智能体已不可用。",SPe=()=>"این عامل فرعی دیگر در دسترس نیست.",kPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wPe():t==="fa"?SPe():yPe()}),CPe=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,EPe=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,NPe=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,zPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EPe(e):t==="fa"?NPe(e):CPe(e)}),APe=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,TPe=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,jPe=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,MPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TPe(e):t==="fa"?jPe(e):APe(e)}),RPe=()=>", a repo for training a mini-GPT from scratch.",DPe=()=>",一个从零训练迷你 GPT 的仓库。",LPe=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",OPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DPe():t==="fa"?LPe():RPe()}),IPe=()=>"Close",BPe=()=>"关闭",$Pe=()=>"بستن",HPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BPe():t==="fa"?$Pe():IPe()}),PPe=()=>"Create a new project",FPe=()=>"新建项目",UPe=()=>"ایجاد پروژهٔ جدید",qPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FPe():t==="fa"?UPe():PPe()}),GPe=()=>"Demo project",VPe=()=>"演示项目",WPe=()=>"پروژهٔ نمایشی",KPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VPe():t==="fa"?WPe():GPe()}),YPe=()=>"Explore the demo",XPe=()=>"探索演示项目",ZPe=()=>"دیدن پروژهٔ نمایشی",QPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XPe():t==="fa"?ZPe():YPe()}),JPe=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",eFe=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",tFe=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",nFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eFe():t==="fa"?tFe():JPe()}),rFe=()=>"nanochat",sFe=()=>"nanochat",iFe=()=>"nanochat",aFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sFe():t==="fa"?iFe():rFe()}),oFe=()=>"Couldn’t save your progress. Try again.",lFe=()=>"无法保存进度。请重试。",cFe=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",uFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lFe():t==="fa"?cFe():oFe()}),dFe=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",fFe=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",hFe=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",_Fe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fFe():t==="fa"?hFe():dFe()}),pFe=()=>"Welcome to OpenResearch",mFe=()=>"欢迎使用 OpenResearch",gFe=()=>"به OpenResearch خوش آمدید",vFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mFe():t==="fa"?gFe():pFe()}),bFe=()=>"Baseline",xFe=()=>"基线",yFe=()=>"مبنا",wFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xFe():t==="fa"?yFe():bFe()}),SFe=()=>"Experiment",kFe=()=>"实验",CFe=()=>"آزمایش",_o=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kFe():t==="fa"?CFe():SFe()}),EFe=e=>`${e==null?void 0:e.count} experiments`,NFe=e=>`${e==null?void 0:e.count} 个实验`,zFe=e=>`${e==null?void 0:e.count} آزمایش`,AFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NFe(e):t==="fa"?zFe(e):EFe(e)}),TFe=()=>"1 experiment",jFe=()=>"1 个实验",MFe=()=>"۱ آزمایش",RFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jFe():t==="fa"?MFe():TFe()}),DFe=()=>"Running",LFe=()=>"运行中",OFe=()=>"در حال اجرا",IFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LFe():t==="fa"?OFe():DFe()}),BFe=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",$Fe=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",HFe=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",PFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Fe():t==="fa"?HFe():BFe()}),FFe=()=>"Ask the agent in chat to create and run your first experiment.",UFe=()=>"在聊天中让智能体创建并运行你的第一个实验。",qFe=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",GFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UFe():t==="fa"?qFe():FFe()}),VFe=()=>"Code",WFe=()=>"代码",KFe=()=>"کد",YFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WFe():t==="fa"?KFe():VFe()}),XFe=()=>"Logs",ZFe=()=>"日志",QFe=()=>"گزارش‌ها",RE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZFe():t==="fa"?QFe():XFe()}),JFe=()=>"No experiments from the current task yet",eUe=()=>"当前任务尚无实验",tUe=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",nUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eUe():t==="fa"?tUe():JFe()}),rUe=()=>"No experiments yet",sUe=()=>"尚无实验",iUe=()=>"هنوز آزمایشی وجود ندارد",aUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sUe():t==="fa"?iUe():rUe()}),oUe=()=>"no runs",lUe=()=>"无运行",cUe=()=>"بدون اجرا",uUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lUe():t==="fa"?cUe():oUe()}),dUe=()=>"Open logs",fUe=()=>"打开日志",hUe=()=>"باز کردن گزارش‌ها",_Ue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fUe():t==="fa"?hUe():dUe()}),pUe=()=>"other tasks",mUe=()=>"其他任务",gUe=()=>"وظایف دیگر",vUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mUe():t==="fa"?gUe():pUe()}),bUe=()=>"Runs",xUe=()=>"运行",yUe=()=>"اجراها",wUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xUe():t==="fa"?yUe():bUe()}),SUe=()=>"Switch to Entire project to see all experiments",kUe=()=>"切换到“整个项目”以查看所有实验",CUe=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",EUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kUe():t==="fa"?CUe():SUe()}),NUe=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,zUe=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,AUe=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,TUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zUe(e):t==="fa"?AUe(e):NUe(e)}),jUe=()=>"Dismiss",MUe=()=>"关闭",RUe=()=>"بستن",DUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MUe():t==="fa"?RUe():jUe()}),LUe=()=>"macOS app",OUe=()=>"macOS 应用",IUe=()=>"برنامهٔ macOS",BUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OUe():t==="fa"?IUe():LUe()}),$Ue=()=>"Installed with cargo",HUe=()=>"通过 cargo 安装",PUe=()=>"نصب‌شده با cargo",FUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HUe():t==="fa"?PUe():$Ue()}),UUe=()=>"Installed with Homebrew",qUe=()=>"通过 Homebrew 安装",GUe=()=>"نصب‌شده با Homebrew",VUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qUe():t==="fa"?GUe():UUe()}),WUe=()=>"Installed with the orx installer",KUe=()=>"通过 orx 安装程序安装",YUe=()=>"نصب‌شده با نصب‌کنندهٔ orx",XUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KUe():t==="fa"?YUe():WUe()}),ZUe=()=>"Managed by Nix",QUe=()=>"由 Nix 管理",JUe=()=>"مدیریت‌شده با Nix",eqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QUe():t==="fa"?JUe():ZUe()}),tqe=()=>"Unknown install",nqe=()=>"未知安装方式",rqe=()=>"روش نصب نامشخص",sqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nqe():t==="fa"?rqe():tqe()}),iqe=()=>"Re-run your cargo install to update.",aqe=()=>"重新运行 cargo 安装命令以更新。",oqe=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",lqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aqe():t==="fa"?oqe():iqe()}),cqe=()=>"Run brew upgrade to update.",uqe=()=>"运行 brew upgrade 以更新。",dqe=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",fqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uqe():t==="fa"?dqe():cqe()}),hqe=()=>"Update it through your Nix configuration.",_qe=()=>"通过 Nix 配置进行更新。",pqe=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",mqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_qe():t==="fa"?pqe():hqe()}),gqe=e=>`Current worktree · ${e==null?void 0:e.branch}`,vqe=e=>`当前工作树 · ${e==null?void 0:e.branch}`,bqe=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,xqe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vqe(e):t==="fa"?bqe(e):gqe(e)}),yqe=e=>`Default branch · ${e==null?void 0:e.branch}`,wqe=e=>`默认分支 · ${e==null?void 0:e.branch}`,Sqe=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,kqe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wqe(e):t==="fa"?Sqe(e):yqe(e)}),Cqe=e=>`detached at ${e==null?void 0:e.branch}`,Eqe=e=>`分离于 ${e==null?void 0:e.branch}`,Nqe=e=>`جدا در ${e==null?void 0:e.branch}`,zqe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Eqe(e):t==="fa"?Nqe(e):Cqe(e)}),Aqe=()=>"Listing truncated.",Tqe=()=>"列表已截断。",jqe=()=>"فهرست کوتاه شده است.",Mqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tqe():t==="fa"?jqe():Aqe()}),Rqe=()=>"Loading…",Dqe=()=>"正在加载…",Lqe=()=>"در حال بارگیری…",Oqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dqe():t==="fa"?Lqe():Rqe()}),Iqe=()=>"No changes yet.",Bqe=()=>"尚无更改。",$qe=()=>"هنوز تغییری وجود ندارد.",Hqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bqe():t==="fa"?$qe():Iqe()}),Pqe=()=>"No files.",Fqe=()=>"没有文件。",Uqe=()=>"فایلی وجود ندارد.",qqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fqe():t==="fa"?Uqe():Pqe()}),Gqe=()=>"Refresh failed:",Vqe=()=>"刷新失败:",Wqe=()=>"تازه‌سازی ناموفق بود:",Kqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vqe():t==="fa"?Wqe():Gqe()}),bb=new Set;function Yqe(e){if(e!==N()){P9(e,{reload:!1}),document.documentElement.lang=e;for(const n of bb)n()}}function Xqe(e){return bb.add(e),()=>bb.delete(e)}function kc(){return M.useSyncExternalStore(Xqe,N,N)}const Ae=e=>`⁦${e}⁩`,ka=e=>`⁨${e}⁩`,an=e=>new Intl.NumberFormat(N()).format(e);/** +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,sPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?nPe(e):t==="fa"?rPe(e):tPe(e)}),iPe=()=>"Move data here",aPe=()=>"将数据移动到此处",oPe=()=>"انتقال داده به اینجا",lPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aPe():t==="fa"?oPe():iPe()}),cPe=()=>"Moving…",uPe=()=>"正在移动…",dPe=()=>"در حال جابه‌جایی…",fPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uPe():t==="fa"?dPe():cPe()}),hPe=()=>"Preparing…",_Pe=()=>"正在准备…",pPe=()=>"در حال آماده‌سازی…",mPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Pe():t==="fa"?pPe():hPe()}),gPe=()=>" (same disk, instant)",vPe=()=>"(同一磁盘,可立即完成)",bPe=()=>" (روی همان دیسک، فوری)",xPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vPe():t==="fa"?bPe():gPe()}),yPe=()=>"default location",wPe=()=>"默认位置",SPe=()=>"محل پیش‌فرض",kPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wPe():t==="fa"?SPe():yPe()}),CPe=()=>"ORX_DATA_DIR environment variable",EPe=()=>"ORX_DATA_DIR 环境变量",NPe=()=>"متغیر محیطی ORX_DATA_DIR",zPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EPe():t==="fa"?NPe():CPe()}),APe=()=>"your saved setting",TPe=()=>"已保存的设置",jPe=()=>"تنظیم ذخیره‌شدهٔ شما",MPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TPe():t==="fa"?jPe():APe()}),RPe=()=>"XDG_DATA_HOME",DPe=()=>"XDG_DATA_HOME",LPe=()=>"XDG_DATA_HOME",OPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DPe():t==="fa"?LPe():RPe()}),IPe=()=>"Verifying…",BPe=()=>"正在验证…",$Pe=()=>"در حال بررسی…",HPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BPe():t==="fa"?$Pe():IPe()}),PPe=()=>"Loading…",FPe=()=>"正在加载…",UPe=()=>"در حال بارگیری…",qPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FPe():t==="fa"?UPe():PPe()}),GPe=()=>"This sub-agent is no longer available.",VPe=()=>"此子智能体已不可用。",WPe=()=>"این عامل فرعی دیگر در دسترس نیست.",KPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VPe():t==="fa"?WPe():GPe()}),YPe=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,XPe=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,ZPe=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,QPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XPe(e):t==="fa"?ZPe(e):YPe(e)}),JPe=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,eFe=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,tFe=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,nFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eFe(e):t==="fa"?tFe(e):JPe(e)}),rFe=()=>"All tasks done",sFe=()=>"所有任务已完成",iFe=()=>"همهٔ کارها انجام شد",$E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sFe():t==="fa"?iFe():rFe()}),aFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,oFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,lFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,cFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oFe(e):t==="fa"?lFe(e):aFe(e)}),uFe=()=>"Hide task list",dFe=()=>"隐藏任务列表",fFe=()=>"پنهان کردن فهرست کارها",hFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dFe():t==="fa"?fFe():uFe()}),_Fe=e=>`${e==null?void 0:e.done} of ${e==null?void 0:e.total} done`,pFe=e=>`已完成 ${e==null?void 0:e.done}/${e==null?void 0:e.total}`,mFe=e=>`${e==null?void 0:e.done} از ${e==null?void 0:e.total} انجام شد`,HE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pFe(e):t==="fa"?mFe(e):_Fe(e)}),gFe=()=>"Show task list",vFe=()=>"显示任务列表",bFe=()=>"نمایش فهرست کارها",xFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vFe():t==="fa"?bFe():gFe()}),yFe=()=>"Tasks",wFe=()=>"任务",SFe=()=>"کارها",xx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wFe():t==="fa"?SFe():yFe()}),kFe=()=>"Delegated 1 task",CFe=()=>"委派了 1 个任务",EFe=()=>"۱ کار واگذار شد",NFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CFe():t==="fa"?EFe():kFe()}),zFe=e=>`Delegated ${e==null?void 0:e.count} tasks`,AFe=e=>`委派了 ${e==null?void 0:e.count} 个任务`,TFe=e=>`${e==null?void 0:e.count} کار واگذار شد`,jFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AFe(e):t==="fa"?TFe(e):zFe(e)}),MFe=()=>"Ran 1 command",RFe=()=>"运行了 1 条命令",DFe=()=>"۱ فرمان اجرا شد",LFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RFe():t==="fa"?DFe():MFe()}),OFe=e=>`Ran ${e==null?void 0:e.count} commands`,IFe=e=>`运行了 ${e==null?void 0:e.count} 条命令`,BFe=e=>`${e==null?void 0:e.count} فرمان اجرا شد`,$Fe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?IFe(e):t==="fa"?BFe(e):OFe(e)}),HFe=()=>"Edited 1 file",PFe=()=>"编辑了 1 个文件",FFe=()=>"۱ فایل ویرایش شد",UFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PFe():t==="fa"?FFe():HFe()}),qFe=e=>`Edited ${e==null?void 0:e.count} files`,GFe=e=>`编辑了 ${e==null?void 0:e.count} 个文件`,VFe=e=>`${e==null?void 0:e.count} فایل ویرایش شد`,WFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GFe(e):t==="fa"?VFe(e):qFe(e)}),KFe=()=>"Ran 1 project command",YFe=()=>"运行了 1 条项目命令",XFe=()=>"۱ فرمان پروژه اجرا شد",ZFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YFe():t==="fa"?XFe():KFe()}),QFe=e=>`Ran ${e==null?void 0:e.count} project commands`,JFe=e=>`运行了 ${e==null?void 0:e.count} 条项目命令`,eUe=e=>`${e==null?void 0:e.count} فرمان پروژه اجرا شد`,tUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JFe(e):t==="fa"?eUe(e):QFe(e)}),nUe=()=>"Read 1 file",rUe=()=>"读取了 1 个文件",sUe=()=>"۱ فایل خوانده شد",iUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rUe():t==="fa"?sUe():nUe()}),aUe=e=>`Read ${e==null?void 0:e.count} files`,oUe=e=>`读取了 ${e==null?void 0:e.count} 个文件`,lUe=e=>`${e==null?void 0:e.count} فایل خوانده شد`,cUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oUe(e):t==="fa"?lUe(e):aUe(e)}),uUe=()=>"Ran 1 search",dUe=()=>"执行了 1 次搜索",fUe=()=>"۱ جستجو انجام شد",hUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dUe():t==="fa"?fUe():uUe()}),_Ue=e=>`Ran ${e==null?void 0:e.count} searches`,pUe=e=>`执行了 ${e==null?void 0:e.count} 次搜索`,mUe=e=>`${e==null?void 0:e.count} جستجو انجام شد`,gUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pUe(e):t==="fa"?mUe(e):_Ue(e)}),vUe=()=>"Loaded 1 skill",bUe=()=>"加载了 1 个技能",xUe=()=>"۱ مهارت بارگذاری شد",yUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bUe():t==="fa"?xUe():vUe()}),wUe=e=>`Loaded ${e==null?void 0:e.count} skills`,SUe=e=>`加载了 ${e==null?void 0:e.count} 个技能`,kUe=e=>`${e==null?void 0:e.count} مهارت بارگذاری شد`,CUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SUe(e):t==="fa"?kUe(e):wUe(e)}),EUe=()=>"Browsed 1 page",NUe=()=>"浏览了 1 个网页",zUe=()=>"۱ صفحه مرور شد",AUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NUe():t==="fa"?zUe():EUe()}),TUe=e=>`Browsed ${e==null?void 0:e.count} pages`,jUe=e=>`浏览了 ${e==null?void 0:e.count} 个网页`,MUe=e=>`${e==null?void 0:e.count} صفحه مرور شد`,RUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jUe(e):t==="fa"?MUe(e):TUe(e)}),DUe=()=>", a repo for training a mini-GPT from scratch.",LUe=()=>",一个从零训练迷你 GPT 的仓库。",OUe=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",IUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LUe():t==="fa"?OUe():DUe()}),BUe=()=>"Close",$Ue=()=>"关闭",HUe=()=>"بستن",PUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ue():t==="fa"?HUe():BUe()}),FUe=()=>"Create a new project",UUe=()=>"新建项目",qUe=()=>"ایجاد پروژهٔ جدید",GUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UUe():t==="fa"?qUe():FUe()}),VUe=()=>"Demo project",WUe=()=>"演示项目",KUe=()=>"پروژهٔ نمایشی",YUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WUe():t==="fa"?KUe():VUe()}),XUe=()=>"Explore the demo",ZUe=()=>"探索演示项目",QUe=()=>"دیدن پروژهٔ نمایشی",JUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZUe():t==="fa"?QUe():XUe()}),eqe=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",tqe=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",nqe=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",rqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tqe():t==="fa"?nqe():eqe()}),sqe=()=>"nanochat",iqe=()=>"nanochat",aqe=()=>"nanochat",oqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iqe():t==="fa"?aqe():sqe()}),lqe=()=>"Couldn’t save your progress. Try again.",cqe=()=>"无法保存进度。请重试。",uqe=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",dqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cqe():t==="fa"?uqe():lqe()}),fqe=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",hqe=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",_qe=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",pqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hqe():t==="fa"?_qe():fqe()}),mqe=()=>"Welcome to OpenResearch",gqe=()=>"欢迎使用 OpenResearch",vqe=()=>"به OpenResearch خوش آمدید",bqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gqe():t==="fa"?vqe():mqe()}),xqe=()=>"Baseline",yqe=()=>"基线",wqe=()=>"مبنا",Sqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yqe():t==="fa"?wqe():xqe()}),kqe=()=>"Experiment",Cqe=()=>"实验",Eqe=()=>"آزمایش",po=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cqe():t==="fa"?Eqe():kqe()}),Nqe=e=>`${e==null?void 0:e.count} experiments`,zqe=e=>`${e==null?void 0:e.count} 个实验`,Aqe=e=>`${e==null?void 0:e.count} آزمایش`,Tqe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zqe(e):t==="fa"?Aqe(e):Nqe(e)}),jqe=()=>"1 experiment",Mqe=()=>"1 个实验",Rqe=()=>"۱ آزمایش",Dqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mqe():t==="fa"?Rqe():jqe()}),Lqe=()=>"Running",Oqe=()=>"运行中",Iqe=()=>"در حال اجرا",Bqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oqe():t==="fa"?Iqe():Lqe()}),$qe=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Hqe=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Pqe=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Fqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hqe():t==="fa"?Pqe():$qe()}),Uqe=()=>"Ask the agent in chat to create and run your first experiment.",qqe=()=>"在聊天中让智能体创建并运行你的第一个实验。",Gqe=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",Vqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qqe():t==="fa"?Gqe():Uqe()}),Wqe=()=>"Code",Kqe=()=>"代码",Yqe=()=>"کد",Xqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kqe():t==="fa"?Yqe():Wqe()}),Zqe=()=>"Logs",Qqe=()=>"日志",Jqe=()=>"گزارش‌ها",PE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qqe():t==="fa"?Jqe():Zqe()}),eGe=()=>"No experiments from the current task yet",tGe=()=>"当前任务尚无实验",nGe=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",rGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tGe():t==="fa"?nGe():eGe()}),sGe=()=>"No experiments yet",iGe=()=>"尚无实验",aGe=()=>"هنوز آزمایشی وجود ندارد",oGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iGe():t==="fa"?aGe():sGe()}),lGe=()=>"no runs",cGe=()=>"无运行",uGe=()=>"بدون اجرا",dGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cGe():t==="fa"?uGe():lGe()}),fGe=()=>"Open logs",hGe=()=>"打开日志",_Ge=()=>"باز کردن گزارش‌ها",pGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hGe():t==="fa"?_Ge():fGe()}),mGe=()=>"other tasks",gGe=()=>"其他任务",vGe=()=>"وظایف دیگر",bGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gGe():t==="fa"?vGe():mGe()}),xGe=()=>"Runs",yGe=()=>"运行",wGe=()=>"اجراها",SGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yGe():t==="fa"?wGe():xGe()}),kGe=()=>"Switch to Entire project to see all experiments",CGe=()=>"切换到“整个项目”以查看所有实验",EGe=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",NGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,AGe=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,TGe=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,jGe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AGe(e):t==="fa"?TGe(e):zGe(e)}),MGe=()=>"Dismiss",RGe=()=>"关闭",DGe=()=>"بستن",LGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RGe():t==="fa"?DGe():MGe()}),OGe=()=>"macOS app",IGe=()=>"macOS 应用",BGe=()=>"برنامهٔ macOS",$Ge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),HGe=()=>"Installed with cargo",PGe=()=>"通过 cargo 安装",FGe=()=>"نصب‌شده با cargo",UGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PGe():t==="fa"?FGe():HGe()}),qGe=()=>"Installed with Homebrew",GGe=()=>"通过 Homebrew 安装",VGe=()=>"نصب‌شده با Homebrew",WGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GGe():t==="fa"?VGe():qGe()}),KGe=()=>"Installed with the orx installer",YGe=()=>"通过 orx 安装程序安装",XGe=()=>"نصب‌شده با نصب‌کنندهٔ orx",ZGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YGe():t==="fa"?XGe():KGe()}),QGe=()=>"Managed by Nix",JGe=()=>"由 Nix 管理",eVe=()=>"مدیریت‌شده با Nix",tVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JGe():t==="fa"?eVe():QGe()}),nVe=()=>"Unknown install",rVe=()=>"未知安装方式",sVe=()=>"روش نصب نامشخص",iVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rVe():t==="fa"?sVe():nVe()}),aVe=()=>"Re-run your cargo install to update.",oVe=()=>"重新运行 cargo 安装命令以更新。",lVe=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",cVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oVe():t==="fa"?lVe():aVe()}),uVe=()=>"Run brew upgrade to update.",dVe=()=>"运行 brew upgrade 以更新。",fVe=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",hVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dVe():t==="fa"?fVe():uVe()}),_Ve=()=>"Update it through your Nix configuration.",pVe=()=>"通过 Nix 配置进行更新。",mVe=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",gVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pVe():t==="fa"?mVe():_Ve()}),vVe=e=>`Current worktree · ${e==null?void 0:e.branch}`,bVe=e=>`当前工作树 · ${e==null?void 0:e.branch}`,xVe=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,yVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bVe(e):t==="fa"?xVe(e):vVe(e)}),wVe=e=>`Default branch · ${e==null?void 0:e.branch}`,SVe=e=>`默认分支 · ${e==null?void 0:e.branch}`,kVe=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,CVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SVe(e):t==="fa"?kVe(e):wVe(e)}),EVe=e=>`detached at ${e==null?void 0:e.branch}`,NVe=e=>`分离于 ${e==null?void 0:e.branch}`,zVe=e=>`جدا در ${e==null?void 0:e.branch}`,AVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NVe(e):t==="fa"?zVe(e):EVe(e)}),TVe=()=>"Listing truncated.",jVe=()=>"列表已截断。",MVe=()=>"فهرست کوتاه شده است.",RVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jVe():t==="fa"?MVe():TVe()}),DVe=()=>"Loading…",LVe=()=>"正在加载…",OVe=()=>"در حال بارگیری…",IVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LVe():t==="fa"?OVe():DVe()}),BVe=()=>"No changes yet.",$Ve=()=>"尚无更改。",HVe=()=>"هنوز تغییری وجود ندارد.",PVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ve():t==="fa"?HVe():BVe()}),FVe=()=>"No files.",UVe=()=>"没有文件。",qVe=()=>"فایلی وجود ندارد.",GVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UVe():t==="fa"?qVe():FVe()}),VVe=()=>"Refresh failed:",WVe=()=>"刷新失败:",KVe=()=>"تازه‌سازی ناموفق بود:",YVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WVe():t==="fa"?KVe():VVe()}),yb=new Set;function XVe(e){if(e!==N()){V9(e,{reload:!1}),document.documentElement.lang=e;for(const n of yb)n()}}function ZVe(e){return yb.add(e),()=>yb.delete(e)}function Cc(){return M.useSyncExternalStore(ZVe,N,N)}const Ae=e=>`⁦${e}⁩`,Ca=e=>`⁨${e}⁩`,Vt=e=>new Intl.NumberFormat(N()).format(e);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DE=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** + */const FE=(...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 Zqe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const QVe=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 Qqe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const JVe=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 I7=e=>{const n=Qqe(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const F7=e=>{const n=JVe(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 G1={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 W1={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 Jqe=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},eGe=M.createContext({}),tGe=()=>M.useContext(eGe),nGe=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:a,iconNode:o,...l},c)=>{const{size:d=24,strokeWidth:_=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:g=""}=tGe()??{},S=r??f?Number(t??_)*24/Number(n??d):t??_;return M.createElement("svg",{ref:c,...G1,width:n??d??G1.width,height:n??d??G1.height,stroke:e??m,strokeWidth:S,className:DE("lucide",g,s),...!a&&!Jqe(l)&&{"aria-hidden":"true"},...l},[...o.map(([k,b])=>M.createElement(k,b)),...Array.isArray(a)?a:[a]])});/** + */const eWe=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},tWe=M.createContext({}),nWe=()=>M.useContext(tWe),rWe=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:a,iconNode:o,...l},c)=>{const{size:d=24,strokeWidth:_=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:g=""}=nWe()??{},S=r??f?Number(t??_)*24/Number(n??d):t??_;return M.createElement("svg",{ref:c,...W1,width:n??d??W1.width,height:n??d??W1.height,stroke:e??m,strokeWidth:S,className:FE("lucide",g,s),...!a&&!eWe(l)&&{"aria-hidden":"true"},...l},[...o.map(([k,b])=>M.createElement(k,b)),...Array.isArray(a)?a:[a]])});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const et=(e,n)=>{const t=M.forwardRef(({className:r,...s},a)=>M.createElement(nGe,{ref:a,iconNode:n,className:DE(`lucide-${Zqe(I7(e))}`,`lucide-${e}`,r),...s}));return t.displayName=I7(e),t};/** + */const Je=(e,n)=>{const t=M.forwardRef(({className:r,...s},a)=>M.createElement(rWe,{ref:a,iconNode:n,className:FE(`lucide-${QVe(F7(e))}`,`lucide-${e}`,r),...s}));return t.displayName=F7(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 rGe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],sGe=et("arrow-down",rGe);/** + */const sWe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],iWe=Je("arrow-down",sWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iGe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Of=et("arrow-left",iGe);/** + */const aWe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Bf=Je("arrow-left",aWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aGe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],z0=et("arrow-right",aGe);/** + */const oWe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],A0=Je("arrow-right",oWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oGe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],lGe=et("arrow-up-right",oGe);/** + */const lWe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],cWe=Je("arrow-up-right",lWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cGe=[["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"}]],LE=et("blocks",cGe);/** + */const uWe=[["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"}]],UE=Je("blocks",uWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uGe=[["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"}]],OE=et("book-open",uGe);/** + */const dWe=[["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"}]],qE=Je("book-open",dWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dGe=[["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"}]],fGe=et("calendar-days",dGe);/** + */const fWe=[["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"}]],hWe=Je("calendar-days",fWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hGe=[["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"}]],_Ge=et("chart-spline",hGe);/** + */const _We=[["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"}]],pWe=Je("chart-spline",_We);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pGe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],di=et("check",pGe);/** + */const mWe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ws=Je("check",mWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mGe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ja=et("chevron-down",mGe);/** + */const gWe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ta=Je("chevron-down",gWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gGe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],IE=et("chevron-left",gGe);/** + */const vWe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],GE=Je("chevron-left",vWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vGe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ma=et("chevron-right",vGe);/** + */const bWe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ma=Je("chevron-right",bWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bGe=[["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"}]],BE=et("circle-alert",bGe);/** + */const xWe=[["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"}]],VE=Je("circle-alert",xWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xGe=[["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"}]],yGe=et("circle-question-mark",xGe);/** + */const yWe=[["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"}]],wWe=Je("circle-question-mark",yWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wGe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],$E=et("circle-stop",wGe);/** + */const SWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],kWe=Je("circle-slash",SWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SGe=[["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"}]],HE=et("circle-x",SGe);/** + */const CWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],WE=Je("circle-stop",CWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kGe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],CGe=et("clock-3",kGe);/** + */const EWe=[["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"}]],KE=Je("circle-x",EWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EGe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],NGe=et("clock",EGe);/** + */const NWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zWe=Je("circle",NWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zGe=[["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"}]],AGe=et("cloud-upload",zGe);/** + */const AWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],TWe=Je("clock-3",AWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TGe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],xb=et("code",TGe);/** + */const jWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],MWe=Je("clock",jWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jGe=[["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"}]],Dp=et("copy",jGe);/** + */const RWe=[["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"}]],DWe=Je("cloud-upload",RWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MGe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],PE=et("corner-down-left",MGe);/** + */const LWe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],wb=Je("code",LWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RGe=[["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"}]],DGe=et("cpu",RGe);/** + */const OWe=[["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"}]],Lp=Je("copy",OWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LGe=[["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"}]],OGe=et("download",LGe);/** + */const IWe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],YE=Je("corner-down-left",IWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IGe=[["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"}]],gx=et("ellipsis",IGe);/** + */const BWe=[["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"}]],$We=Je("cpu",BWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BGe=[["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"}]],mc=et("external-link",BGe);/** + */const HWe=[["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"}]],PWe=Je("download",HWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $Ge=[["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"}]],FE=et("file-code",$Ge);/** + */const FWe=[["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"}]],yx=Je("ellipsis",FWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HGe=[["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"}]],PGe=et("file-output",HGe);/** + */const UWe=[["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"}]],gc=Je("external-link",UWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FGe=[["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"}]],Fu=et("file-text",FGe);/** + */const qWe=[["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"}]],XE=Je("file-code",qWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UGe=[["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"}]],vx=et("flask-conical",UGe);/** + */const GWe=[["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"}]],VWe=Je("file-output",GWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qGe=[["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"}]],UE=et("folder-git-2",qGe);/** + */const WWe=[["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"}]],Vu=Je("file-text",WWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GGe=[["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"}]],If=et("folder-open",GGe);/** + */const KWe=[["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"}]],wx=Je("flask-conical",KWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VGe=[["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"}]],WGe=et("folder-plus",VGe);/** + */const YWe=[["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"}]],ZE=Je("folder-git-2",YWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KGe=[["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"}]],Lp=et("folder-tree",KGe);/** + */const XWe=[["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"}]],$f=Je("folder-open",XWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YGe=[["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"}]],XGe=et("funnel",YGe);/** + */const ZWe=[["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"}]],QWe=Je("folder-plus",ZWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZGe=[["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"}]],Op=et("git-branch",ZGe);/** + */const JWe=[["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"}]],Op=Je("folder-tree",JWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QGe=[["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"}]],JGe=et("git-commit-horizontal",QGe);/** + */const eKe=[["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"}]],tKe=Je("funnel",eKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eVe=[["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"}]],tVe=et("globe",eVe);/** + */const nKe=[["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"}]],Ip=Je("git-branch",nKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nVe=[["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"}]],rVe=et("history",nVe);/** + */const rKe=[["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"}]],sKe=Je("git-commit-horizontal",rKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sVe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],iVe=et("info",sVe);/** + */const iKe=[["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"}]],aKe=Je("globe",iKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aVe=[["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"}]],oVe=et("laptop",aVe);/** + */const oKe=[["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"}]],lKe=Je("history",oKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lVe=[["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"}]],cVe=et("lightbulb",lVe);/** + */const cKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uKe=Je("info",cKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uVe=[["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"}]],B7=et("lock",uVe);/** + */const dKe=[["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"}]],fKe=Je("laptop",dKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dVe=[["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"}]],fVe=et("maximize-2",dVe);/** + */const hKe=[["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"}]],_Ke=Je("lightbulb",hKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hVe=[["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"}]],qE=et("message-square-quote",hVe);/** + */const pKe=[["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"}]],Sx=Je("list-checks",pKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _Ve=[["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"}]],pVe=et("minimize-2",_Ve);/** + */const mKe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gKe=Je("loader-circle",mKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mVe=[["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"}]],gVe=et("monitor",mVe);/** + */const vKe=[["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"}]],U7=Je("lock",vKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vVe=[["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"}]],bVe=et("moon",vVe);/** + */const bKe=[["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"}]],xKe=Je("maximize-2",bKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xVe=[["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"}]],yVe=et("mouse-pointer-click",xVe);/** + */const yKe=[["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"}]],QE=Je("message-square-quote",yKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wVe=[["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"}]],bx=et("package",wVe);/** + */const wKe=[["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"}]],SKe=Je("minimize-2",wKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SVe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],GE=et("panel-left",SVe);/** + */const kKe=[["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"}]],CKe=Je("monitor",kKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kVe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],VE=et("panel-right",kVe);/** + */const EKe=[["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"}]],NKe=Je("moon",EKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CVe=[["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"}]],EVe=et("paperclip",CVe);/** + */const zKe=[["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"}]],AKe=Je("mouse-pointer-click",zKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NVe=[["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"}]],xx=et("pencil",NVe);/** + */const TKe=[["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"}]],kx=Je("package",TKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zVe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],yx=et("plus",zVe);/** + */const jKe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],JE=Je("panel-left",jKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const AVe=[["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"}]],sd=et("refresh-cw",AVe);/** + */const MKe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],eN=Je("panel-right",MKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TVe=[["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"}]],WE=et("rotate-cw",TVe);/** + */const RKe=[["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"}]],DKe=Je("paperclip",RKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jVe=[["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"}]],wx=et("scroll-text",jVe);/** + */const LKe=[["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"}]],Cx=Je("pencil",LKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MVe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],KE=et("search",MVe);/** + */const OKe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ex=Je("plus",OKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RVe=[["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"}]],$7=et("server",RVe);/** + */const IKe=[["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"}]],ld=Je("refresh-cw",IKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const DVe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],LVe=et("settings-2",DVe);/** + */const BKe=[["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"}]],tN=Je("rotate-cw",BKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OVe=[["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"}]],IVe=et("settings",OVe);/** + */const $Ke=[["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"}]],Nx=Je("scroll-text",$Ke);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BVe=[["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"}]],$Ve=et("sliders-horizontal",BVe);/** + */const HKe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],nN=Je("search",HKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HVe=[["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"}]],Sx=et("square-terminal",HVe);/** + */const PKe=[["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"}]],q7=Je("server",PKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PVe=[["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"}]],FVe=et("sun",PVe);/** + */const FKe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],UKe=Je("settings-2",FKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UVe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Uu=et("terminal",UVe);/** + */const qKe=[["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"}]],GKe=Je("settings",qKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qVe=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],GVe=et("toggle-right",qVe);/** + */const VKe=[["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"}]],WKe=Je("sliders-horizontal",VKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VVe=[["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"}]],id=et("trash-2",VVe);/** + */const KKe=[["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"}]],zx=Je("square-terminal",KKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WVe=[["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"}]],YE=et("triangle-alert",WVe);/** + */const YKe=[["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"}]],XKe=Je("sun",YKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KVe=[["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"}]],YVe=et("upload",KVe);/** + */const ZKe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Wu=Je("terminal",ZKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XVe=[["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"}]],kx=et("users",XVe);/** + */const QKe=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],JKe=Je("toggle-right",QKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZVe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],hs=et("x",ZVe);/** + */const eYe=[["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"}]],cd=Je("trash-2",eYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QVe=[["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"}]],JVe=et("zap",QVe),V1="demo_nanochat_v1",V_=e=>e.startsWith("demo_"),Cf="chat_demo_nanochat_v1",XE="chat_demo_nanochat_figures_v1",ZE="chat_demo_nanochat_literature_v1",yb="cpu-apple-silicon-pipeline-results.md",eWe="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.";function Di(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}async function Oi(e){if(!e.ok){const n=await e.text().catch(()=>"");let t=n;try{const r=JSON.parse(n);r.error&&(t=r.error)}catch{}throw new Error(t||`HTTP ${e.status}`)}return await e.json()}const Tt=e=>fetch(e).then(n=>Oi(n)),Yt=(e,n)=>fetch(e,{method:"POST",headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(t=>Oi(t)),Ip=(e,n)=>fetch(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Oi(t)),tWe=(e,n)=>fetch(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Oi(t)),nWe=()=>Tt("/api/projects").then(e=>e.projects),rWe=()=>Tt("/api/projects/activity").then(e=>e.activity),sWe=()=>Tt("/api/settings/ui-state"),H7=e=>Yt("/api/settings/ui-state",e),iWe=(e,n)=>Yt("/api/onboarding/complete",{...e,...n}),QE=(e="")=>{const n=e?`?path=${encodeURIComponent(e)}`:"";return Tt(`/api/project-path/status${n}`)},aWe=()=>Yt("/api/project-path/pick").then(e=>e.path),oWe=e=>Yt("/api/projects",e),JE=e=>Tt(`/api/papers/search?q=${encodeURIComponent(e)}`).then(n=>n.papers),lWe=()=>Tt("/api/github/account"),cWe=e=>Tt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`),uWe=(e,n)=>Tt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`),wb=e=>Tt(`/api/papers/resolve?id=${encodeURIComponent(e)}`).then(n=>n.paper),dWe=e=>Yt("/api/projects/starter-prompts/prewarm",e),fWe=(e,n,t,r)=>Tt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`),hWe=e=>Yt(`/api/projects/${e}/open`).then(n=>n.project),_We=e=>fetch(`/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})`)}}),pWe=e=>Tt(`/api/projects/${e}/experiments`).then(n=>n.experiments),Cx=e=>Tt(`/api/projects/${e}/runs`).then(n=>n.runs),eN=e=>Yt(`/api/runs/${e}/cancel`).then(()=>{}),mWe=(e,n)=>Tt(`/api/runs/${e}/log?offset=${n}`),gWe=e=>Tt(`/api/runs/${e}/diff`),vWe=e=>Tt(`/api/experiments/${e}/diff`),Cc=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),P7=(e,n,t={})=>Tt(`/api/projects/${e}/file?${Cc(t,new URLSearchParams({path:n}))}`),F7=(e,n,t={})=>`/api/projects/${e}/file/raw?${Cc(t,new URLSearchParams({path:n}))}`,bWe=e=>Tt(`/api/files/abs?path=${encodeURIComponent(e)}`),xWe=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,yWe=(e,n,t,r={})=>tWe(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId}),wWe=(e,n,t={})=>Yt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),SWe=()=>Tt("/api/latex/engine"),kWe=(e,n,t={})=>Yt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),CWe=()=>Tt("/api/overleaf/settings"),tN=e=>Yt("/api/overleaf/token",{token:e}),EWe=()=>fetch("/api/overleaf/token",{method:"DELETE"}).then(e=>Oi(e)),NWe=(e,n,t={})=>Tt(`/api/projects/${e}/file/overleaf?${Cc(t,new URLSearchParams({path:n}))}`),zWe=(e,n,t)=>Yt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),AWe=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf?${Cc(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Oi(r)),TWe=(e,n,t={})=>Yt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),jWe=(e,n,t={})=>Tt(`/api/projects/${e}/file/overleaf/status?${Cc(t,new URLSearchParams({path:n}))}`),MWe=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Cc(t,new URLSearchParams({path:n}))}`,Sb=(e,n={})=>{const t=Cc(n).toString();return Tt(`/api/projects/${e}/code-tree${t?`?${t}`:""}`)},nN=e=>Tt(`/api/chat/sessions/${e}/worktree`),Bp=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,RWe=()=>Tt("/api/settings/hf"),DWe=e=>Yt("/api/settings/hf",{token:e}),LWe=()=>Tt("/api/update"),OWe=()=>Yt("/api/update/apply"),IWe=e=>Yt("/api/update/auto",{enabled:e}),BWe=(e=!1)=>Yt("/api/update/install-cli",{force:e}),$We=()=>Tt("/api/settings/k8s"),HWe=e=>Yt("/api/settings/k8s",e),PWe=()=>Tt("/api/settings/modal"),FWe=()=>Yt("/api/settings/modal/provision"),UWe=()=>Tt("/api/settings/env").then(e=>e.vars),rN=(e,n)=>Yt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),qWe=e=>fetch(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n)).then(n=>n.vars),GWe=()=>Tt("/api/settings/data-dir"),VWe=e=>Yt("/api/settings/data-dir/validate",{path:e}),WWe=e=>Yt("/api/settings/data-dir/move",{path:e}),KWe=()=>Tt("/api/settings/ssh").then(e=>e.hosts),YWe=e=>Tt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`),XWe=()=>Tt("/api/settings/slurm"),ZWe=e=>Yt("/api/settings/slurm",e),QWe=()=>Tt("/api/settings/ray"),JWe=e=>Yt("/api/settings/ray",e),eKe=e=>Yt("/api/settings/ray/preflight",{address:e??null}),tKe=e=>Tt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`),nKe=e=>Yt("/api/settings/compute/default",e),rKe=()=>Tt("/api/settings/local"),sKe=()=>Tt("/api/settings/openresearch"),U7=e=>Tt(`/api/projects/${e}/files`),iKe=(e,n)=>fetch(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Oi(t)),vh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,sN=512e3,aKe=(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}}},iN=(e,n)=>fetch(vh(e,n),{headers:{Range:`bytes=0-${sN-1}`}}).then(t=>{var s;if(t.status===404)return null;if(t.status===416&&t.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=Number((s=t.headers.get("content-range"))==null?void 0:s.split("/").pop());return t.arrayBuffer().then(a=>aKe(a,Number.isFinite(r)&&r>a.byteLength))}),oKe=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",lKe=(e,n)=>fetch(vh(e,n),{method:"HEAD"}).then(t=>{if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=t.headers.get("x-openresearch-presentation");return{size:Number(t.headers.get("content-length"))||0,presentation:oKe(r)?r:"download"}}),cKe=()=>Tt("/api/settings/profile"),uKe=()=>Tt("/api/settings/lit-sources"),dKe=e=>Yt("/api/settings/lit-sources",e),Ex=()=>Tt("/api/settings/projects"),aN=(e,n)=>Yt("/api/settings/projects",{githubForNewProjects:e,githubDefaultPromptSeen:n}),fKe=e=>Tt(`/api/projects/${e}/git`),hKe=e=>Yt(`/api/projects/${e}/git/init`),_Ke=e=>Yt(`/api/projects/${e}/github`),pKe=e=>Yt(`/api/projects/${e}/github/disable`),mKe=()=>Tt("/api/settings/telemetry"),gKe=e=>Yt("/api/settings/telemetry",{enabled:e}),X0=e=>e.displayName??cN(e.id),Z0="default";function $p(e,n){var o,l,c;const t=e==null?void 0:e.models.find(d=>d.id===n),r=(t==null?void 0:t.reasoningLevels)??((o=e==null?void 0:e.options)==null?void 0:o.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,a=s&&r.some(d=>d.id===s)?s:r.some(d=>d.id===Z0)?Z0:((l=e==null?void 0:e.options)==null?void 0:l.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:a}}const kb="default";function oN(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:kb,label:F6e(),description:B6e()},...t]:[]}function Q0(e,n,t){var a;if(!e)return t??null;if(e.id!=="codex"||((a=e.models.find(o=>o.id===n))==null?void 0:a.serviceTiers)===void 0)return null;const s=oN(e,n);return s.length===0?kb:t!=null&&s.some(o=>o.id===t)?t:kb}function lN(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=$p(e,n);return r.length===0?Z0:t&&r.some(a=>a.id===t)?t:s}const J0=(e=!1,n=!1)=>{const t=new URLSearchParams;e&&t.set("refresh","1"),n&&t.set("retry","1");const r=t.size>0?`?${t.toString()}`:"";return Tt(`/api/harnesses${r}`).then(s=>s.harnesses)},vKe=()=>Tt("/api/skills").then(e=>e.skills),bKe=(e,n)=>Tt(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`).then(t=>t.content),xKe=()=>Tt("/api/latex-templates").then(e=>e.templates),yKe=e=>Yt("/api/latex-templates",e).then(n=>n.template),wKe=e=>fetch(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n)),SKe=()=>Tt("/api/user-skills").then(e=>e.skills),kKe=e=>Yt("/api/user-skills",e).then(n=>n.skill),CKe=e=>fetch(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n));function cN(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 A0=e=>Tt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`).then(n=>n.sessions),EKe=(e,n,t={})=>Yt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),NKe=e=>fetch(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Oi(n)),zKe=(e,n)=>Ip(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),AKe=(e,n)=>Ip(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),TKe=(e,n)=>Ip(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),jKe=(e,n)=>Ip(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Cu=e=>Tt(`/api/chat/sessions/${e}/messages`).then(n=>({messages:n.messages,queued:n.queued??[],activeLeafId:n.activeLeafId??null})),MKe=(e,n)=>fetch(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Oi(t)),RKe=(e,n)=>Yt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),DKe=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,q7=(e,n,t={},r,s,a,o)=>Yt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:a,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:o}),LKe=(e,n,t,r={})=>Yt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),OKe=(e,n,t)=>Yt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),IKe=(e,n)=>Yt(`/api/chat/sessions/${e}/branch`,{leafId:n}),BKe=e=>Yt(`/api/chat/sessions/${e}/interrupt`),$Ke=(e,n)=>Yt(`/api/chat/sessions/${e}/respond`,n);function Ea(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(N(),{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 ep(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return Soe({value:an(n)});const t=Math.floor(n/60);if(t<60)return boe({value:an(t)});const r=Math.floor(t/60);return r<24?poe({hours:an(r),minutes:an(t%60)}):doe({days:an(Math.floor(r/24)),hours:an(r%24)})}function wa(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r[a.id,a]));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 FKe(e,n,t){var o;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,a=(o=t.get(s))==null?void 0:o.filter(l=>l.role===e.role);return a!=null&&a.length?a:[e]}function UKe(e,n,t,r){const s=e.filter(d=>!r(d.id)),a=new Map(s.map(d=>[d.id,d])),o=new Map;for(const d of s){const _=d.parentId??null,f=o.get(_);f?f.push(d):o.set(_,[d])}const l=new Set(n.map(d=>d.id)),c=new Map;for(const d of t){const _=FKe(d,a,o),f=_.findIndex(m=>l.has(m.id));c.set(d.id,{count:_.length,index:f,prevId:f>0?_[f-1].id:void 0,nextId:f<_.length-1?_[f+1].id:void 0})}return c}function tp(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 bh(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function uN(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||bh(r)||!tp(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function dN(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=uN(n.parts);return t?{messageId:n.id,toolId:t}:null}function qKe(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"||bh(r)))return r.type==="text"&&!!r.text}return!1}const T0=new Map;function GKe(e,n){let t=T0.get(e);return t||(t=new Set,T0.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&T0.delete(e)}}function VKe(e){var n;(n=T0.get(e.runId))==null||n.forEach(t=>t(e))}const Cb=new Set;function Bf(e){return Cb.add(e),()=>{Cb.delete(e)}}function ol(e){Cb.forEach(n=>n(e))}const Eb=new Set;function WKe(e){return Eb.add(e),()=>{Eb.delete(e)}}function ll(){Eb.forEach(e=>e())}const Nb=new Set;function Ax(e){return Nb.add(e),()=>{Nb.delete(e)}}function G7(e){Nb.forEach(n=>n(e))}const zb=new Set;function KKe(e){return zb.add(e),()=>{zb.delete(e)}}function K1(e){zb.forEach(n=>n(e))}const Ab=new Set;function YKe(e){return Ab.add(e),()=>{Ab.delete(e)}}function XKe(e){Ab.forEach(n=>n(e))}let Tb=!0;const jb=new Set;function ZKe(e){return jb.add(e),()=>{jb.delete(e)}}function V7(){return Tb}function W7(e){e!==Tb&&(Tb=e,jb.forEach(n=>n()))}const QKe=8e3,JKe=3e3;function eYe(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,a,o=!1;const l=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(o=!0,s??(s=window.setTimeout(()=>W7(!1),QKe)),c.readyState===EventSource.CLOSED&&a===void 0&&(a=window.setTimeout(()=>{a=void 0,l()},JKe)))},c.onopen=()=>{var _,f;r||(window.clearTimeout(s),s=void 0,W7(!0),o&&(ol({type:"reconnected"}),ll(),G7({harness:"*",authState:"unknown"}),(f=(_=n.current).onReconnect)==null||f.call(_)),o=!0)};const d=_=>{try{return JSON.parse(_.data)}catch{return null}};c.addEventListener("run.updated",_=>{const f=d(_);f!=null&&f.run&&(ll(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",_=>{const f=d(_);f!=null&&f.experiment&&(ll(),n.current.onExperiment(f.experiment))}),c.addEventListener("project.updated",_=>{const f=d(_);f!=null&&f.project&&(ll(),n.current.onProject(f.project))}),c.addEventListener("files.updated",_=>{var m,g;const f=d(_);f!=null&&f.projectId&&((g=(m=n.current).onArtifacts)==null||g.call(m,f.projectId))}),c.addEventListener("run.log",_=>{const f=d(_);f!=null&&f.runId&&VKe(f)}),c.addEventListener("chat.session",_=>{const f=d(_);f!=null&&f.session&&(ll(),ol({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",_=>{const f=d(_);f!=null&&f.sessionId&&(ll(),ol({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",_=>{const f=d(_);f!=null&&f.message&&(ll(),ol({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",_=>{const f=d(_);f!=null&&f.sessionId&&(ll(),ol({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",_=>{const f=d(_);f!=null&&f.sessionId&&f.usage&&ol({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",_=>{const f=d(_);f!=null&&f.sessionId&&ol({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",_=>{const f=d(_);f!=null&&f.sessionId&&ol({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",_=>{const f=d(_);f!=null&&f.harness&&f.authState&&G7(f)}),c.addEventListener("datadir.move.progress",_=>{const f=d(_);f&&K1({type:"progress",...f})}),c.addEventListener("datadir.move.done",_=>{const f=d(_);f&&K1({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",_=>{const f=d(_);f&&K1({type:"error",error:f.error})}),c.addEventListener("update.status",_=>{const f=d(_);f&&XKe(f)})};return l(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(a),t==null||t.close()}},[])}const ga=e=>new Intl.NumberFormat(N()).format(e);function tYe(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?b6e():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?d6e({attempt:ga(e.attempt),maximum:ga(e.maximum),seconds:ga(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?o6e({attempt:ga(e.attempt),maximum:ga(e.maximum)}):typeof e.attempt=="number"&&t!=null?p6e({attempt:ga(e.attempt),seconds:ga(t)}):typeof e.attempt=="number"?r6e({attempt:ga(e.attempt)}):t!=null?S6e({seconds:ga(t)}):hE()}function nYe(e,n){if(typeof e!="number")return N6e();const t=Math.max(0,Math.ceil((e-n)/1e3));return j6e({seconds:ga(t)})}function fN(e){return e==="retry"||e==="continue"?e:null}function rYe(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}function sYe(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function K7(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function iYe(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";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":"alphaxiv"}function Tx(e){const n=[];let t="",r=!1,s=null;const a=()=>{r&&n.push(t),t="",r=!1};for(let o=0;oe.startsWith("demo_"),Nf="chat_demo_nanochat_v1",sN="chat_demo_nanochat_figures_v1",iN="chat_demo_nanochat_literature_v1",Sb="cpu-apple-silicon-pipeline-results.md",lYe="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.";function Di(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}async function Oi(e){if(!e.ok){const n=await e.text().catch(()=>"");let t=n;try{const r=JSON.parse(n);r.error&&(t=r.error)}catch{}throw new Error(t||`HTTP ${e.status}`)}return await e.json()}const jt=e=>fetch(e).then(n=>Oi(n)),Xt=(e,n)=>fetch(e,{method:"POST",headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(t=>Oi(t)),Bp=(e,n)=>fetch(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Oi(t)),cYe=(e,n)=>fetch(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Oi(t)),uYe=()=>jt("/api/projects").then(e=>e.projects),dYe=()=>jt("/api/projects/activity").then(e=>e.activity),fYe=()=>jt("/api/settings/ui-state"),G7=e=>Xt("/api/settings/ui-state",e),hYe=(e,n)=>Xt("/api/onboarding/complete",{...e,...n}),aN=(e="")=>{const n=e?`?path=${encodeURIComponent(e)}`:"";return jt(`/api/project-path/status${n}`)},_Ye=()=>Xt("/api/project-path/pick").then(e=>e.path),pYe=e=>Xt("/api/projects",e),oN=e=>jt(`/api/papers/search?q=${encodeURIComponent(e)}`).then(n=>n.papers),mYe=()=>jt("/api/github/account"),gYe=e=>jt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`),vYe=(e,n)=>jt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`),kb=e=>jt(`/api/papers/resolve?id=${encodeURIComponent(e)}`).then(n=>n.paper),bYe=e=>Xt("/api/projects/starter-prompts/prewarm",e),xYe=(e,n,t,r)=>jt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`),yYe=e=>Xt(`/api/projects/${e}/open`).then(n=>n.project),wYe=e=>fetch(`/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})`)}}),SYe=e=>jt(`/api/projects/${e}/experiments`).then(n=>n.experiments),Tx=e=>jt(`/api/projects/${e}/runs`).then(n=>n.runs),lN=e=>Xt(`/api/runs/${e}/cancel`).then(()=>{}),kYe=(e,n)=>jt(`/api/runs/${e}/log?offset=${n}`),CYe=e=>jt(`/api/runs/${e}/diff`),EYe=e=>jt(`/api/experiments/${e}/diff`),Ec=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),V7=(e,n,t={})=>jt(`/api/projects/${e}/file?${Ec(t,new URLSearchParams({path:n}))}`),W7=(e,n,t={})=>`/api/projects/${e}/file/raw?${Ec(t,new URLSearchParams({path:n}))}`,NYe=e=>jt(`/api/files/abs?path=${encodeURIComponent(e)}`),zYe=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,AYe=(e,n,t,r={})=>cYe(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId}),TYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),jYe=()=>jt("/api/latex/engine"),MYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),RYe=()=>jt("/api/overleaf/settings"),cN=e=>Xt("/api/overleaf/token",{token:e}),DYe=()=>fetch("/api/overleaf/token",{method:"DELETE"}).then(e=>Oi(e)),LYe=(e,n,t={})=>jt(`/api/projects/${e}/file/overleaf?${Ec(t,new URLSearchParams({path:n}))}`),OYe=(e,n,t)=>Xt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),IYe=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf?${Ec(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Oi(r)),BYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),$Ye=(e,n,t={})=>jt(`/api/projects/${e}/file/overleaf/status?${Ec(t,new URLSearchParams({path:n}))}`),HYe=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Ec(t,new URLSearchParams({path:n}))}`,Cb=(e,n={})=>{const t=Ec(n).toString();return jt(`/api/projects/${e}/code-tree${t?`?${t}`:""}`)},uN=e=>jt(`/api/chat/sessions/${e}/worktree`),$p=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,PYe=()=>jt("/api/settings/hf"),FYe=e=>Xt("/api/settings/hf",{token:e}),UYe=()=>jt("/api/update"),qYe=()=>Xt("/api/update/apply"),GYe=e=>Xt("/api/update/auto",{enabled:e}),VYe=(e=!1)=>Xt("/api/update/install-cli",{force:e}),WYe=()=>jt("/api/settings/k8s"),KYe=e=>Xt("/api/settings/k8s",e),YYe=()=>jt("/api/settings/modal"),XYe=()=>Xt("/api/settings/modal/provision"),ZYe=()=>jt("/api/settings/env").then(e=>e.vars),dN=(e,n)=>Xt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),QYe=e=>fetch(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n)).then(n=>n.vars),JYe=()=>jt("/api/settings/data-dir"),eXe=e=>Xt("/api/settings/data-dir/validate",{path:e}),tXe=e=>Xt("/api/settings/data-dir/move",{path:e}),nXe=()=>jt("/api/settings/ssh").then(e=>e.hosts),rXe=e=>jt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`),sXe=()=>jt("/api/settings/slurm"),iXe=e=>Xt("/api/settings/slurm",e),aXe=()=>jt("/api/settings/ray"),oXe=e=>Xt("/api/settings/ray",e),lXe=e=>Xt("/api/settings/ray/preflight",{address:e??null}),cXe=e=>jt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`),uXe=e=>Xt("/api/settings/compute/default",e),dXe=()=>jt("/api/settings/local"),fXe=()=>jt("/api/settings/openresearch"),K7=e=>jt(`/api/projects/${e}/files`),hXe=(e,n)=>fetch(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Oi(t)),xh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,fN=512e3,_Xe=(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}}},hN=(e,n)=>fetch(xh(e,n),{headers:{Range:`bytes=0-${fN-1}`}}).then(t=>{var s;if(t.status===404)return null;if(t.status===416&&t.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=Number((s=t.headers.get("content-range"))==null?void 0:s.split("/").pop());return t.arrayBuffer().then(a=>_Xe(a,Number.isFinite(r)&&r>a.byteLength))}),pXe=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",mXe=(e,n)=>fetch(xh(e,n),{method:"HEAD"}).then(t=>{if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=t.headers.get("x-openresearch-presentation");return{size:Number(t.headers.get("content-length"))||0,presentation:pXe(r)?r:"download"}}),gXe=()=>jt("/api/settings/profile"),vXe=()=>jt("/api/settings/lit-sources"),bXe=e=>Xt("/api/settings/lit-sources",e),jx=()=>jt("/api/settings/projects"),_N=(e,n)=>Xt("/api/settings/projects",{githubForNewProjects:e,githubDefaultPromptSeen:n}),xXe=e=>jt(`/api/projects/${e}/git`),yXe=e=>Xt(`/api/projects/${e}/git/init`),wXe=e=>Xt(`/api/projects/${e}/github`),SXe=e=>Xt(`/api/projects/${e}/github/disable`),kXe=()=>jt("/api/settings/telemetry"),CXe=e=>Xt("/api/settings/telemetry",{enabled:e}),Z0=e=>e.displayName??gN(e.id),Q0="default";function Hp(e,n){var o,l,c;const t=e==null?void 0:e.models.find(d=>d.id===n),r=(t==null?void 0:t.reasoningLevels)??((o=e==null?void 0:e.options)==null?void 0:o.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,a=s&&r.some(d=>d.id===s)?s:r.some(d=>d.id===Q0)?Q0:((l=e==null?void 0:e.options)==null?void 0:l.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:a}}const Eb="default";function pN(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:Eb,label:f7e(),description:l7e()},...t]:[]}function J0(e,n,t){var a;if(!e)return t??null;if(e.id!=="codex"||((a=e.models.find(o=>o.id===n))==null?void 0:a.serviceTiers)===void 0)return null;const s=pN(e,n);return s.length===0?Eb:t!=null&&s.some(o=>o.id===t)?t:Eb}function mN(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Hp(e,n);return r.length===0?Q0:t&&r.some(a=>a.id===t)?t:s}const ep=(e=!1,n=!1)=>{const t=new URLSearchParams;e&&t.set("refresh","1"),n&&t.set("retry","1");const r=t.size>0?`?${t.toString()}`:"";return jt(`/api/harnesses${r}`).then(s=>s.harnesses)},EXe=()=>jt("/api/skills").then(e=>e.skills),NXe=(e,n)=>jt(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`).then(t=>t.content),zXe=()=>jt("/api/latex-templates").then(e=>e.templates),AXe=e=>Xt("/api/latex-templates",e).then(n=>n.template),TXe=e=>fetch(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n)),jXe=()=>jt("/api/user-skills").then(e=>e.skills),MXe=e=>Xt("/api/user-skills",e).then(n=>n.skill),RXe=e=>fetch(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n));function gN(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 T0=e=>jt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`).then(n=>n.sessions),DXe=(e,n,t={})=>Xt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),LXe=e=>fetch(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Oi(n)),OXe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),IXe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),BXe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),$Xe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Au=e=>jt(`/api/chat/sessions/${e}/messages`).then(n=>({messages:n.messages,queued:n.queued??[],activeLeafId:n.activeLeafId??null})),HXe=(e,n)=>fetch(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Oi(t)),PXe=(e,n)=>Xt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),FXe=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,Y7=(e,n,t={},r,s,a,o)=>Xt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:a,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:o}),UXe=(e,n,t,r={})=>Xt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),qXe=(e,n,t)=>Xt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),GXe=(e,n)=>Xt(`/api/chat/sessions/${e}/branch`,{leafId:n}),VXe=e=>Xt(`/api/chat/sessions/${e}/interrupt`),WXe=(e,n)=>Xt(`/api/chat/sessions/${e}/respond`,n);function Na(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(N(),{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 tp(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return Woe({value:Vt(n)});const t=Math.floor(n/60);if(t<60)return Uoe({value:Vt(t)});const r=Math.floor(t/60);return r<24?$oe({hours:Vt(r),minutes:Vt(t%60)}):Loe({days:Vt(Math.floor(r/24)),hours:Vt(r%24)})}function Sa(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r[a.id,a]));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 XXe(e,n,t){var o;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,a=(o=t.get(s))==null?void 0:o.filter(l=>l.role===e.role);return a!=null&&a.length?a:[e]}function ZXe(e,n,t,r){const s=e.filter(d=>!r(d.id)),a=new Map(s.map(d=>[d.id,d])),o=new Map;for(const d of s){const _=d.parentId??null,f=o.get(_);f?f.push(d):o.set(_,[d])}const l=new Set(n.map(d=>d.id)),c=new Map;for(const d of t){const _=XXe(d,a,o),f=_.findIndex(m=>l.has(m.id));c.set(d.id,{count:_.length,index:f,prevId:f>0?_[f-1].id:void 0,nextId:f<_.length-1?_[f+1].id:void 0})}return c}function vN(e){return e.toLowerCase().split(/(?::|\.|__)+/)}function bN(e){return vN(e).at(-1)??e.toLowerCase()}function Pp(e){if(!e)return!1;const n=bN(e);return n==="todowrite"||n==="update_plan"}function QXe(e){const n=typeof e=="string"?e.toLowerCase():"";return n==="in_progress"||n==="inprogress"?"in_progress":n==="completed"?"completed":n==="cancelled"?"cancelled":"pending"}function JXe(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const n=Object.fromEntries(Object.entries(e)),t=[n.content,n.step].find(s=>typeof s=="string"&&s.trim()!=="");if(!t)return null;const r=typeof n.activeForm=="string"&&n.activeForm.trim()!==""?n.activeForm.trim():void 0;return{text:t.trim(),status:QXe(n.status),activeText:r}}function xN(e){var s,a;if(e.type!=="tool"||!Pp(e.tool)||((s=e.state)==null?void 0:s.status)==="error")return null;const n=((a=e.state)==null?void 0:a.input)??{},t=[n.todos,n.plan].find(Array.isArray);if(!t)return null;const r=t.map(JXe).filter(o=>o!==null);return r.length===0?null:{items:r,done:r.filter(o=>o.status==="completed").length,total:r.filter(o=>o.status!=="cancelled").length,current:r.find(o=>o.status==="in_progress")??null}}function yN(e){for(let n=e.length-1;n>=0;n--){const t=xN(e[n]);if(t)return{id:e[n].id,list:t}}return null}function wN(e){return e.total>0&&e.done===e.total}function eZe(e){var t;const n=e.at(-1);return(n==null?void 0:n.role)==="assistant"?((t=yN(n.parts))==null?void 0:t.list)??null:null}function np(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 yh(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function SN(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||yh(r)||!np(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"||Pp(r.tool)?null:r.id}return null}function kN(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=SN(n.parts);return t?{messageId:n.id,toolId:t}:null}function tZe(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"||yh(r)))return r.type==="text"&&!!r.text}return!1}const j0=new Map;function nZe(e,n){let t=j0.get(e);return t||(t=new Set,j0.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&j0.delete(e)}}function rZe(e){var n;(n=j0.get(e.runId))==null||n.forEach(t=>t(e))}const Nb=new Set;function Hf(e){return Nb.add(e),()=>{Nb.delete(e)}}function al(e){Nb.forEach(n=>n(e))}const zb=new Set;function sZe(e){return zb.add(e),()=>{zb.delete(e)}}function ol(){zb.forEach(e=>e())}const Ab=new Set;function Dx(e){return Ab.add(e),()=>{Ab.delete(e)}}function X7(e){Ab.forEach(n=>n(e))}const Tb=new Set;function iZe(e){return Tb.add(e),()=>{Tb.delete(e)}}function X1(e){Tb.forEach(n=>n(e))}const jb=new Set;function aZe(e){return jb.add(e),()=>{jb.delete(e)}}function oZe(e){jb.forEach(n=>n(e))}let Mb=!0;const Rb=new Set;function lZe(e){return Rb.add(e),()=>{Rb.delete(e)}}function Z7(){return Mb}function Q7(e){e!==Mb&&(Mb=e,Rb.forEach(n=>n()))}const cZe=8e3,uZe=3e3;function dZe(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,a,o=!1;const l=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(o=!0,s??(s=window.setTimeout(()=>Q7(!1),cZe)),c.readyState===EventSource.CLOSED&&a===void 0&&(a=window.setTimeout(()=>{a=void 0,l()},uZe)))},c.onopen=()=>{var _,f;r||(window.clearTimeout(s),s=void 0,Q7(!0),o&&(al({type:"reconnected"}),ol(),X7({harness:"*",authState:"unknown"}),(f=(_=n.current).onReconnect)==null||f.call(_)),o=!0)};const d=_=>{try{return JSON.parse(_.data)}catch{return null}};c.addEventListener("run.updated",_=>{const f=d(_);f!=null&&f.run&&(ol(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",_=>{const f=d(_);f!=null&&f.experiment&&(ol(),n.current.onExperiment(f.experiment))}),c.addEventListener("project.updated",_=>{const f=d(_);f!=null&&f.project&&(ol(),n.current.onProject(f.project))}),c.addEventListener("files.updated",_=>{var m,g;const f=d(_);f!=null&&f.projectId&&((g=(m=n.current).onArtifacts)==null||g.call(m,f.projectId))}),c.addEventListener("run.log",_=>{const f=d(_);f!=null&&f.runId&&rZe(f)}),c.addEventListener("chat.session",_=>{const f=d(_);f!=null&&f.session&&(ol(),al({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",_=>{const f=d(_);f!=null&&f.sessionId&&(ol(),al({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",_=>{const f=d(_);f!=null&&f.message&&(ol(),al({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",_=>{const f=d(_);f!=null&&f.sessionId&&(ol(),al({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",_=>{const f=d(_);f!=null&&f.sessionId&&f.usage&&al({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",_=>{const f=d(_);f!=null&&f.sessionId&&al({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",_=>{const f=d(_);f!=null&&f.sessionId&&al({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",_=>{const f=d(_);f!=null&&f.harness&&f.authState&&X7(f)}),c.addEventListener("datadir.move.progress",_=>{const f=d(_);f&&X1({type:"progress",...f})}),c.addEventListener("datadir.move.done",_=>{const f=d(_);f&&X1({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",_=>{const f=d(_);f&&X1({type:"error",error:f.error})}),c.addEventListener("update.status",_=>{const f=d(_);f&&oZe(f)})};return l(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(a),t==null||t.close()}},[])}const va=e=>new Intl.NumberFormat(N()).format(e);function fZe(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?U6e():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?L6e({attempt:va(e.attempt),maximum:va(e.maximum),seconds:va(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?j6e({attempt:va(e.attempt),maximum:va(e.maximum)}):typeof e.attempt=="number"&&t!=null?$6e({attempt:va(e.attempt),seconds:va(t)}):typeof e.attempt=="number"?N6e({attempt:va(e.attempt)}):t!=null?W6e({seconds:va(t)}):bE()}function hZe(e,n){if(typeof e!="number")return Z6e();const t=Math.max(0,Math.ceil((e-n)/1e3));return t7e({seconds:va(t)})}function CN(e){return e==="retry"||e==="continue"?e:null}function _Ze(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}function pZe(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function J7(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function mZe(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";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":"alphaxiv"}function Lx(e){const n=[];let t="",r=!1,s=null;const a=()=>{r&&n.push(t),t="",r=!1};for(let o=0;o"||l==="&")break;/\s/.test(l)?a():(t+=l,r=!0)}return a(),n}function aYe(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=Tx(e);if(t.length===1)return t[0]}return e}function oYe(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 qu(e){return oYe(typeof e=="string"?Tx(e):e)}function lYe(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 cYe(e,n){const t=qu(e);return t===null?!1:n.split("\\s+").every((s,a)=>t[a]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[a]))}function uYe(e){var c;const n=qu(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],a=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let d=1;d +`&&(t+=c,r=!0);continue}if(s){l===s?s=null:t+=l,r=!0;continue}if(l==='"'||l==="'"){s=l,r=!0;continue}if(l==="|"||l===";"||l===">"||l==="&")break;/\s/.test(l)?a():(t+=l,r=!0)}return a(),n}function gZe(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=Lx(e);if(t.length===1)return t[0]}return e}function vZe(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 Ku(e){return vZe(typeof e=="string"?Lx(e):e)}function bZe(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 xZe(e,n){const t=Ku(e);return t===null?!1:n.split("\\s+").every((s,a)=>t[a]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[a]))}function yZe(e){var c;const n=Ku(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],a=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let d=1;d -`,fYe='',hYe=` +`,SZe='',kZe=` -`,hN={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},_Ye={alphaxiv:dYe,openalex:hYe,biorxiv:fYe};function _N({source:e,size:n=16,decorative:t=!1,className:r=""}){return h.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":hN[e]},dangerouslySetInnerHTML:{__html:_Ye[e]}})}function pYe(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 mYe(e,n){const t=n.trim();if(e==="alphaxiv"){const a=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(a)}`}const r=pYe(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 gYe=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),pN=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),np="-",Y7=[],bYe="arbitrary..",xYe=e=>{const n=wYe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return yYe(o);const l=o.split(np),c=l[0]===""&&l.length>1?1:0;return mN(l,c,n)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=r[o],d=t[o];return c?d?gYe(d,c):c:d||Y7}return t[o]||Y7}}},mN=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=mN(e,n+1,a);if(d)return d}const o=t.validators;if(o===null)return;const l=n===0?e.join(np):e.slice(n).join(np),c=o.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?bYe+r:void 0})(),wYe=e=>{const{theme:n,classGroups:t}=e;return SYe(t,n)},SYe=(e,n)=>{const t=pN();for(const r in e){const s=e[r];jx(s,t,r,n)}return t},jx=(e,n,t,r)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){CYe(e,n,t);return}if(typeof e=="function"){EYe(e,n,t,r);return}NYe(e,n,t,r)},CYe=(e,n,t)=>{const r=e===""?n:gN(n,e);r.classGroupId=t},EYe=(e,n,t,r)=>{if(zYe(e)){jx(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(vYe(t,e))},NYe=(e,n,t,r)=>{const s=Object.entries(e),a=s.length;for(let o=0;o{let t=e;const r=n.split(np),s=r.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,AYe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(a,o)=>{t[a]=o,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let o=t[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return s(a,o),o},set(a,o){a in t?t[a]=o:s(a,o)}}},Mb="!",X7=":",TYe=[],Z7=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),jYe=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const a=[];let o=0,l=0,c=0,d;const _=s.length;for(let k=0;k<_;k++){const b=s[k];if(o===0&&l===0){if(b===X7){a.push(s.slice(c,k)),c=k+1;continue}if(b==="/"){d=k;continue}}b==="["?o++:b==="]"?o--:b==="("?l++:b===")"&&l--}const f=a.length===0?s:s.slice(c);let m=f,g=!1;f.endsWith(Mb)?(m=f.slice(0,-1),g=!0):f.startsWith(Mb)&&(m=f.slice(1),g=!0);const S=d&&d>c?d-c:void 0;return Z7(a,g,m,S)};if(n){const s=n+X7,a=r;r=o=>o.startsWith(s)?a(o.slice(s.length)):Z7(TYe,!1,o,void 0,!0)}if(t){const s=r;r=a=>t({className:a,parseClassName:s})}return r},MYe=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let a=0;a0&&(s.sort(),r.push(...s),s=[]),r.push(o)):s.push(o)}return s.length>0&&(s.sort(),r.push(...s)),r}},RYe=e=>({cache:AYe(e.cacheSize),parseClassName:jYe(e),sortModifiers:MYe(e),postfixLookupClassGroupIds:DYe(e),...xYe(e)}),DYe=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:o}=n,l=[],c=e.trim().split(LYe);let d="";for(let _=c.length-1;_>=0;_-=1){const f=c[_],{isExternal:m,modifiers:g,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:b}=t(f);if(m){d=f+(d.length>0?" "+d:d);continue}let v=!!b,x;if(v){const j=k.substring(0,b);x=r(j);const A=x&&o[x]?r(k):void 0;A&&A!==x&&(x=A,v=!1)}else x=r(k);if(!x){if(!v){d=f+(d.length>0?" "+d:d);continue}if(x=r(k),!x){d=f+(d.length>0?" "+d:d);continue}v=!1}const y=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=S?y+Mb:y,z=C+x;if(l.indexOf(z)>-1)continue;l.push(z);const E=s(x,v);for(let j=0;j0?" "+d:d)}return d},IYe=(...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,a;const o=c=>{const d=n.reduce((_,f)=>f(_),e());return t=RYe(d),r=t.cache.get,s=t.cache.set,a=l,l(c)},l=c=>{const d=r(c);if(d)return d;const _=OYe(c,t);return s(c,_),_};return a=o,(...c)=>a(IYe(...c))},$Ye=[],Fr=e=>{const n=t=>t[e]||$Ye;return n.isThemeGetter=!0,n},bN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,xN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HYe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,PYe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FYe=/\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$/,UYe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,qYe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GYe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cl=e=>HYe.test(e),Zt=e=>!!e&&!Number.isNaN(Number(e)),_a=e=>!!e&&Number.isInteger(Number(e)),Y1=e=>e.endsWith("%")&&Zt(e.slice(0,-1)),co=e=>PYe.test(e),yN=()=>!0,VYe=e=>FYe.test(e)&&!UYe.test(e),Mx=()=>!1,WYe=e=>qYe.test(e),KYe=e=>GYe.test(e),YYe=e=>!lt(e)&&!ct(e),XYe=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)),ZYe=e=>Al(e,kN,Mx),lt=e=>bN.test(e),Zl=e=>Al(e,CN,VYe),Q7=e=>Al(e,iXe,Zt),QYe=e=>Al(e,NN,yN),JYe=e=>Al(e,EN,Mx),J7=e=>Al(e,wN,Mx),eXe=e=>Al(e,SN,KYe),K_=e=>Al(e,zN,WYe),ct=e=>xN.test(e),of=e=>Ec(e,CN),tXe=e=>Ec(e,EN),eS=e=>Ec(e,wN),nXe=e=>Ec(e,kN),rXe=e=>Ec(e,SN),Y_=e=>Ec(e,zN,!0),sXe=e=>Ec(e,NN,!0),Al=(e,n,t)=>{const r=bN.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Ec=(e,n,t=!1)=>{const r=xN.exec(e);return r?r[1]?n(r[1]):t:!1},wN=e=>e==="position"||e==="percentage",SN=e=>e==="image"||e==="url",kN=e=>e==="length"||e==="size"||e==="bg-size",CN=e=>e==="length",iXe=e=>e==="number",EN=e=>e==="family-name",NN=e=>e==="number"||e==="weight",zN=e=>e==="shadow",aXe=()=>{const e=Fr("color"),n=Fr("font"),t=Fr("text"),r=Fr("font-weight"),s=Fr("tracking"),a=Fr("leading"),o=Fr("breakpoint"),l=Fr("container"),c=Fr("spacing"),d=Fr("radius"),_=Fr("shadow"),f=Fr("inset-shadow"),m=Fr("text-shadow"),g=Fr("drop-shadow"),S=Fr("blur"),k=Fr("perspective"),b=Fr("aspect"),v=Fr("ease"),x=Fr("animate"),y=()=>["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"],z=()=>[...C(),ct,lt],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],A=()=>[ct,lt,c],D=()=>[cl,"full","auto",...A()],O=()=>[_a,"none","subgrid",ct,lt],P=()=>["auto",{span:["full",_a,ct,lt]},_a,ct,lt],$=()=>[_a,"auto",ct,lt],F=()=>["auto","min","max","fr",ct,lt],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...A()],Z=()=>[cl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],J=()=>[cl,"screen","full","dvw","lvw","svw","min","max","fit",...A()],H=()=>[cl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...A()],L=()=>[e,ct,lt],B=()=>[...C(),eS,J7,{position:[ct,lt]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",nXe,ZYe,{size:[ct,lt]}],re=()=>[Y1,of,Zl],he=()=>["","none","full",d,ct,lt],oe=()=>["",Zt,of,Zl],se=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Zt,Y1,eS,J7],le=()=>["","none",S,ct,lt],ge=()=>["none",Zt,ct,lt],ue=()=>["none",Zt,ct,lt],Ce=()=>[Zt,ct,lt],Ee=()=>[cl,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[co],breakpoint:[co],color:[yN],container:[co],"drop-shadow":[co],ease:["in","out","in-out"],font:[YYe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[co],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[co],shadow:[co],spacing:["px",Zt],text:[co],"text-shadow":[co],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cl,lt,ct,b]}],container:["container"],"container-type":[{"@container":["","normal","size",ct,lt]}],"container-named":[XYe],columns:[{columns:[Zt,lt,ct,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:z()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[_a,"auto",ct,lt]}],basis:[{basis:[cl,"full","auto",l,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Zt,cl,"auto","initial","none",lt]}],grow:[{grow:["",Zt,ct,lt]}],shrink:[{shrink:["",Zt,ct,lt]}],order:[{order:[_a,"first","last","none",ct,lt]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pbs:[{pbs:A()}],pbe:[{pbe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"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",...H()]}],"min-block-size":[{"min-block":["auto",...H()]}],"max-block-size":[{"max-block":["none",...H()]}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...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,of,Zl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,sXe,QYe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Y1,lt]}],"font-family":[{font:[tXe,JYe,n]}],"font-features":[{"font-features":[lt]}],"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,ct,lt]}],"line-clamp":[{"line-clamp":[Zt,"none",ct,Q7]}],leading:[{leading:[a,...A()]}],"list-image":[{"list-image":["none",ct,lt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ct,lt]}],"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:[Zt,"from-font","auto",ct,Zl]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Zt,"auto",ct,lt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"tab-size":[{tab:[_a,ct,lt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ct,lt]}],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",ct,lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_a,ct,lt],radial:["",ct,lt],conic:[_a,ct,lt]},rXe,eXe]}],"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:he()}],"rounded-s":[{"rounded-s":he()}],"rounded-e":[{"rounded-e":he()}],"rounded-t":[{"rounded-t":he()}],"rounded-r":[{"rounded-r":he()}],"rounded-b":[{"rounded-b":he()}],"rounded-l":[{"rounded-l":he()}],"rounded-ss":[{"rounded-ss":he()}],"rounded-se":[{"rounded-se":he()}],"rounded-ee":[{"rounded-ee":he()}],"rounded-es":[{"rounded-es":he()}],"rounded-tl":[{"rounded-tl":he()}],"rounded-tr":[{"rounded-tr":he()}],"rounded-br":[{"rounded-br":he()}],"rounded-bl":[{"rounded-bl":he()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":oe()}],"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":[Zt,ct,lt]}],"outline-w":[{outline:["",Zt,of,Zl]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,Y_,K_]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,Y_,K_]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:oe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Zt,Zl]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,Y_,K_]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Zt,ct,lt]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[Zt]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"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":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"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":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"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":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"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":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"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":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"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":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[ct,lt]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"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":[Zt]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"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:B()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ct,lt]}],filter:[{filter:["","none",ct,lt]}],blur:[{blur:le()}],brightness:[{brightness:[Zt,ct,lt]}],contrast:[{contrast:[Zt,ct,lt]}],"drop-shadow":[{"drop-shadow":["","none",g,Y_,K_]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Zt,ct,lt]}],"hue-rotate":[{"hue-rotate":[Zt,ct,lt]}],invert:[{invert:["",Zt,ct,lt]}],saturate:[{saturate:[Zt,ct,lt]}],sepia:[{sepia:["",Zt,ct,lt]}],"backdrop-filter":[{"backdrop-filter":["","none",ct,lt]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Zt,ct,lt]}],"backdrop-contrast":[{"backdrop-contrast":[Zt,ct,lt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Zt,ct,lt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Zt,ct,lt]}],"backdrop-invert":[{"backdrop-invert":["",Zt,ct,lt]}],"backdrop-opacity":[{"backdrop-opacity":[Zt,ct,lt]}],"backdrop-saturate":[{"backdrop-saturate":[Zt,ct,lt]}],"backdrop-sepia":[{"backdrop-sepia":["",Zt,ct,lt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ct,lt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Zt,"initial",ct,lt]}],ease:[{ease:["linear","initial",v,ct,lt]}],delay:[{delay:[Zt,ct,lt]}],animate:[{animate:["none",x,ct,lt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ct,lt]}],"perspective-origin":[{"perspective-origin":z()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[ct,lt,"","none","gpu","cpu"]}],"transform-origin":[{origin:z()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],zoom:[{zoom:[_a,ct,lt]}],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",ct,lt]}],"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":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mbs":[{"scroll-mbs":A()}],"scroll-mbe":[{"scroll-mbe":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pbs":[{"scroll-pbs":A()}],"scroll-pbe":[{"scroll-pbe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",ct,lt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Zt,of,Zl,Q7]}],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"]}},oXe=BYe(aXe);function is(...e){return oXe(...e)}const lXe={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 Rt({variant:e="default",className:n,...t}){return h.jsx("span",{className:is("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",lXe[e],n),...t})}const cXe=["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(" "),uXe={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"},dXe={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 AN(e,n,t,r){return is(cXe,uXe[e],dXe[n],t&&"active",r)}function Qe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("button",{className:AN(n,t,e,r),...s})}function Rb({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("a",{className:AN(n,t,e,r),...s})}const fXe=["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","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),hXe={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"},_Xe={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function TN(e,n,t,r){return is(fXe,hXe[e],_Xe[n],t&&"active",r)}const Qt=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...a},o){return h.jsx("button",{ref:o,className:TN(r,t,n,s),...a})});function Hp({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return h.jsx("a",{className:TN(t,n,e,r),...s})}const pXe={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 Db({variant:e="default",className:n,...t}){return h.jsx("input",{className:is("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",pXe[e],n),...t})}function Zr({active:e=!1,danger:n=!1,className:t,...r}){return h.jsx("button",{className:is("model-item flex min-h-8 w-full items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-start text-sm 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",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",t),...r})}function dn({className:e,...n}){return h.jsx("span",{className:is("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 br({className:e,...n}){return h.jsx("div",{className:is("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const mXe={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 Rx({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return h.jsxs("span",{className:is("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[h.jsx("span",{className:is("h-[7px] w-[7px] shrink-0 rounded-full bg-current",mXe[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const gXe=["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 jN(e,n){return is(gXe,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function Dx({checked:e=!1,className:n,children:t,...r}){return h.jsx("button",{role:"switch","aria-checked":e,className:jN(e,n),...r,children:t??h.jsx("span",{})})}function vXe({checked:e=!1,className:n,...t}){return h.jsx("span",{className:jN(e,n),...t,children:h.jsx("span",{})})}var Pp=$9();const bXe=mh(Pp);function xXe(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 yXe=e=>{switch(e){case"success":return kXe;case"info":return EXe;case"warning":return CXe;case"error":return NXe;default:return null}},wXe=Array(12).fill(0),SXe=({visible:e,className:n})=>Ze.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ze.createElement("div",{className:"sonner-spinner"},wXe.map((t,r)=>Ze.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),kXe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),CXe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),EXe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),NXe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),zXe=Ze.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"},Ze.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ze.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),AXe=()=>{const[e,n]=Ze.useState(document.hidden);return Ze.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let TXe=1;const jXe=100,tS=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:TXe++};class MXe{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-jXe;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=tS(n),a=this.pendingDismissals.get(s);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const o=this.dismissedToasts.has(s),l=n.dismissible===void 0?!0:n.dismissible;return o&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(o?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...n,id:s,title:t}),{...d,...n,id:s,dismissible:l,title:t}):d):this.addToast({title:t,...r,dismissible:l,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 a=r!==void 0,o;const l=s.then(async d=>{if(o=["resolve",d],Ze.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(DXe(d)&&!d.ok){a=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(d instanceof Error){a=!1;const f=typeof t.error=="function"?await t.error(d):t.error,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(t.success!==void 0){a=!1;const f=typeof t.success=="function"?await t.success(d):t.success,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:m,...S})}}).catch(async d=>{if(o=["reject",d],t.error!==void 0){a=!1;const _=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description,g=typeof _=="object"&&!Ze.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:f,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,_)=>l.then(()=>o[0]==="reject"?_(o[1]):d(o[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=tS(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 Us=new MXe,RXe=(e,n)=>Us.message(e,n),DXe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",LXe=RXe,OXe=()=>Us.toasts,IXe=()=>Us.getActiveToasts(),BXe=Object.assign(LXe,{success:Us.success,info:Us.info,warning:Us.warning,error:Us.error,custom:Us.custom,message:Us.message,promise:Us.promise,dismiss:Us.dismiss,loading:Us.loading},{getHistory:OXe,getToasts:IXe});xXe("[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 X_(e){return e.label!==void 0}const $Xe=3,HXe="24px",PXe="16px",nS=4e3,FXe=356,UXe=14,qXe=45,GXe=200;function pa(...e){return e.filter(Boolean).join(" ")}function VXe(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const WXe=e=>{var n,t,r,s,a,o,l,c,d;const{invert:_,toast:f,unstyled:m,interacting:g,setHeights:S,visibleToasts:k,heights:b,index:v,toasts:x,expanded:y,removeToast:C,defaultRichColors:z,closeButton:E,style:j,cancelButtonStyle:A,actionButtonStyle:D,className:O="",descriptionClassName:P="",duration:$,position:F,gap:V,expandByDefault:X,classNames:W,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[H,L]=Ze.useState(null),[B,Y]=Ze.useState(null),[G,re]=Ze.useState(!1),[he,oe]=Ze.useState(!1),[se,q]=Ze.useState(!1),[te,le]=Ze.useState(!1),[ge,ue]=Ze.useState(!1),[Ce,Ee]=Ze.useState(0),[Le,Pe]=Ze.useState(0),Ve=Ze.useRef(f.duration||$||nS),ft=Ze.useRef(null),Be=Ze.useRef(null),wt=v===0,zt=v+1<=k,vt=f.type,Lt=vt??"default",St=f.dismissible!==!1,kt=f.className||"",xe=f.descriptionClassName||"",je=Ze.useMemo(()=>b.findIndex(rt=>rt.toastId===f.id)||0,[b,f.id]),We=Ze.useMemo(()=>{var rt;return(rt=f.closeButton)!=null?rt:E},[f.closeButton,E]),st=Ze.useMemo(()=>f.duration||$||nS,[f.duration,$]),nt=Ze.useRef(0),Ht=Ze.useRef(0),bt=Ze.useRef(0),tn=Ze.useRef(null),[Vt,pn]=F.split("-"),Dt=Ze.useMemo(()=>b.reduce((rt,Ie,it)=>it>=je?rt:rt+Ie.height,0),[b,je]),En=AXe(),Ft=Ze.useMemo(()=>{var rt;return(rt=e.swipeDirections)!=null?rt:VXe(F)},[e.swipeDirections,F]),xr=f.invert||_,mn=vt==="loading";Ht.current=Ze.useMemo(()=>je*V+Dt,[je,Dt]),Ze.useEffect(()=>{Ve.current=st},[st]),Ze.useEffect(()=>{re(!0)},[]),Ze.useEffect(()=>{const rt=Be.current;if(rt){const Ie=rt.getBoundingClientRect().height;return Pe(Ie),S(it=>[{toastId:f.id,height:Ie,position:f.position},...it]),()=>S(it=>it.filter(Ut=>Ut.toastId!==f.id))}},[S,f.id]),Ze.useLayoutEffect(()=>{if(!G)return;const rt=Be.current,Ie=rt.style.height;rt.style.height="auto";const it=rt.getBoundingClientRect().height;rt.style.height=Ie,Pe(it),S(Ut=>Ut.find(jt=>jt.toastId===f.id)?Ut.map(jt=>jt.toastId===f.id?{...jt,height:it}:jt):[{toastId:f.id,height:it,position:f.position},...Ut])},[G,f.title,f.description,S,f.id,f.jsx,f.action,f.cancel]);const Ye=Ze.useCallback(()=>{oe(!0),Ee(Ht.current),S(rt=>rt.filter(Ie=>Ie.toastId!==f.id)),setTimeout(()=>{C(f)},GXe)},[f,C,S,Ht]);Ze.useEffect(()=>{if(f.promise&&vt==="loading"||f.duration===1/0||f.type==="loading")return;let rt;return y||g||En?(()=>{if(bt.current{Ve.current!==1/0&&(nt.current=new Date().getTime(),rt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Ye()},Ve.current))})(),()=>clearTimeout(rt)},[y,g,f,vt,En,Ye]),Ze.useEffect(()=>{f.delete&&(Ye(),f.onDismiss==null||f.onDismiss.call(f,f))},[Ye,f.delete]);function xt(){var rt;if(Z!=null&&Z.loading){var Ie;return Ze.createElement("div",{className:pa(W==null?void 0:W.loader,f==null||(Ie=f.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":vt==="loading"},Z.loading)}return Ze.createElement(SXe,{className:pa(W==null?void 0:W.loader,f==null||(rt=f.classNames)==null?void 0:rt.loader),visible:vt==="loading"})}const Vn=f.icon||(Z==null?void 0:Z[vt])||yXe(vt);var Wn,Et;return Ze.createElement("li",{tabIndex:0,ref:Be,className:pa(O,kt,W==null?void 0:W.toast,f==null||(n=f.classNames)==null?void 0:n.toast,W==null?void 0:W[Lt],f==null||(t=f.classNames)==null?void 0:t[Lt]),"data-sonner-toast":"","data-rich-colors":(Wn=f.richColors)!=null?Wn:z,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":G,"data-promise":!!f.promise,"data-swiped":ge,"data-removed":he,"data-visible":zt,"data-y-position":Vt,"data-x-position":pn,"data-index":v,"data-front":wt,"data-swiping":se,"data-dismissible":St,"data-type":vt,"data-invert":xr,"data-swipe-out":te,"data-swipe-direction":B,"data-expanded":!!(y||X&&G),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${he?Ce:Ht.current}px`,"--initial-height":X?"auto":`${Le}px`,...j,...f.style},onDragEnd:()=>{q(!1),L(null),tn.current=null},onPointerDown:rt=>{rt.button!==2&&(mn||!St||(ft.current=new Date,Ee(Ht.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(q(!0),tn.current={x:rt.clientX,y:rt.clientY})))},onPointerUp:()=>{var rt,Ie,it;if(te||!St)return;tn.current=null;const Ut=Number(((rt=Be.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Jt=Number(((Ie=Be.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),jt=new Date().getTime()-((it=ft.current)==null?void 0:it.getTime()),Dn=H==="x"?Ut:Jt,_r=Math.abs(Dn)/jt;if((H==="x"?Ft.includes(Ut>0?"right":"left"):Ft.includes(Jt>0?"bottom":"top"))&&(Math.abs(Dn)>=qXe||_r>.11)){Ee(Ht.current),f.onDismiss==null||f.onDismiss.call(f,f),Y(H==="x"?Ut>0?"right":"left":Jt>0?"down":"up"),Ye(),le(!0);return}else{var ar,yr;(ar=Be.current)==null||ar.style.setProperty("--swipe-amount-x","0px"),(yr=Be.current)==null||yr.style.setProperty("--swipe-amount-y","0px")}ue(!1),q(!1),L(null)},onPointerMove:rt=>{var Ie,it,Ut;if(!tn.current||!St||((Ie=window.getSelection())==null?void 0:Ie.toString().length)>0)return;const jt=rt.clientY-tn.current.y,Dn=rt.clientX-tn.current.x;!H&&(Math.abs(Dn)>1||Math.abs(jt)>1)&&L(Math.abs(Dn)>Math.abs(jt)?"x":"y");let _r={x:0,y:0};const as=ar=>1/(1.5+Math.abs(ar)/20);if(H==="y"){if(Ft.includes("top")||Ft.includes("bottom"))if(Ft.includes("top")&&jt<0||Ft.includes("bottom")&&jt>0)_r.y=jt;else{const ar=jt*as(jt);_r.y=Math.abs(ar)0)_r.x=Dn;else{const ar=Dn*as(Dn);_r.x=Math.abs(ar)0||Math.abs(_r.y)>0)&&ue(!0),(it=Be.current)==null||it.style.setProperty("--swipe-amount-x",`${_r.x}px`),(Ut=Be.current)==null||Ut.style.setProperty("--swipe-amount-y",`${_r.y}px`)}},We&&!f.jsx&&vt!=="loading"?Ze.createElement("button",{"aria-label":J,"data-disabled":mn,"data-close-button":!0,onClick:mn||!St?()=>{}:()=>{Ye(),f.onDismiss==null||f.onDismiss.call(f,f)},className:pa(W==null?void 0:W.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Et=Z==null?void 0:Z.close)!=null?Et:zXe):null,(vt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[vt])!==null||f.icon)?Ze.createElement("div",{"data-icon":"",className:pa(W==null?void 0:W.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},vt==="loading"?f.icon||xt():f.promise?xt():null,vt!=="loading"?Vn:null):null,Ze.createElement("div",{"data-content":"",className:pa(W==null?void 0:W.content,f==null||(a=f.classNames)==null?void 0:a.content)},Ze.createElement("div",{"data-title":"",className:pa(W==null?void 0:W.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?Ze.createElement("div",{"data-description":"",className:pa(P,xe,W==null?void 0:W.description,f==null||(l=f.classNames)==null?void 0:l.description)},typeof f.description=="function"?f.description():f.description):null),Ze.isValidElement(f.cancel)?f.cancel:f.cancel&&X_(f.cancel)?Ze.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||A,onClick:rt=>{X_(f.cancel)&&St&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,rt),Ye())},className:pa(W==null?void 0:W.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,Ze.isValidElement(f.action)?f.action:f.action&&X_(f.action)?Ze.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:rt=>{X_(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,rt),!rt.defaultPrevented&&Ye())},className:pa(W==null?void 0:W.actionButton,f==null||(d=f.classNames)==null?void 0:d.actionButton)},f.action.label):null)};function rS(){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 KXe(e,n){const t={};return[e,n].forEach((r,s)=>{const a=s===1,o=a?"--mobile-offset":"--offset",l=a?PXe:HXe;function c(d){["top","right","bottom","left"].forEach(_=>{t[`${o}-${_}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${o}-${d}`]=l:t[`${o}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),t}const YXe=Ze.forwardRef(function(n,t){const{id:r,invert:s,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:_,mobileOffset:f,theme:m="light",richColors:g,duration:S,style:k,visibleToasts:b=$Xe,toastOptions:v,dir:x=rS(),gap:y=UXe,icons:C,customAriaLabel:z,containerAriaLabel:E="Notifications"}=n,[j,A]=Ze.useState([]),D=Ze.useMemo(()=>r?j.filter(re=>re.toasterId===r):j.filter(re=>!re.toasterId),[j,r]),O=Ze.useMemo(()=>Array.from(new Set([a].concat(D.filter(re=>re.position).map(re=>re.position)))),[D,a]),[P,$]=Ze.useState([]),[F,V]=Ze.useState(!1),[X,W]=Ze.useState(!1),[Z,J]=Ze.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),H=Ze.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=Ze.useRef(null),Y=Ze.useRef(!1),G=Ze.useCallback(re=>{A(he=>{var oe;return(oe=he.find(se=>se.id===re.id))!=null&&oe.delete||Us.dismiss(re.id),he.filter(({id:se})=>se!==re.id)})},[]);return Ze.useEffect(()=>Us.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{A(he=>he.map(oe=>oe.id===re.id?{...oe,delete:!0}:oe))});return}setTimeout(()=>{bXe.flushSync(()=>{A(he=>{const oe=he.findIndex(se=>se.id===re.id);return oe!==-1?[...he.slice(0,oe),{...he[oe],...re},...he.slice(oe+1)]:[re,...he]})})})}),[]),Ze.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="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:he})=>{J(he?"dark":"light")})}catch{re.addListener(({matches:oe})=>{try{J(oe?"dark":"light")}catch(se){console.error(se)}})}},[m]),Ze.useEffect(()=>{j.length<=1&&V(!1)},[j]),Ze.useEffect(()=>{const re=he=>{var oe;if(o.length>0&&o.every(te=>he[te]||he.code===te)){var q;V(!0),(q=H.current)==null||q.focus()}he.code==="Escape"&&(document.activeElement===H.current||(oe=H.current)!=null&&oe.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[o]),Ze.useEffect(()=>{if(H.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,Y.current=!1)}},[H.current]),Ze.createElement("section",{ref:t,"aria-label":z??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},O.map((re,he)=>{var oe;const[se,q]=re.split("-");return D.length?Ze.createElement("ol",{key:re,dir:x==="auto"?rS():x,tabIndex:-1,ref:H,className:d,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":se,"data-x-position":q,style:{"--front-toast-height":`${((oe=P[0])==null?void 0:oe.height)||0}px`,"--width":`${FXe}px`,"--gap":`${y}px`,...k,...KXe(_,f)},onBlur:te=>{Y.current&&!te.currentTarget.contains(te.relatedTarget)&&(Y.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,B.current=te.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{X||V(!1)},onDragEnd:()=>V(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},D.filter(te=>!te.position&&he===0||te.position===re).map((te,le)=>{var ge,ue;return Ze.createElement(WXe,{key:te.id,icons:C,index:le,toast:te,defaultRichColors:g,duration:(ge=v==null?void 0:v.duration)!=null?ge:S,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(ue=v==null?void 0:v.closeButton)!=null?ue:c,interacting:X,position:re,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:G,toasts:D.filter(Ce=>Ce.position==te.position),heights:P.filter(Ce=>Ce.position==te.position),setHeights:$,expandByDefault:l,gap:y,expanded:F,swipeDirections:n.swipeDirections})})):null}))}),MN="orx:theme";function XXe(){try{const e=localStorage.getItem(MN);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let $f=XXe();const Lb=new Set;function ZXe(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Lx(){document.documentElement.dataset.theme=ZXe($f)}function QXe(e){$f=e;try{localStorage.setItem(MN,e)}catch{}Lx();for(const n of Lb)n()}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{$f==="system"&&Lx()});Lx();function JXe(e){return Lb.add(e),()=>Lb.delete(e)}function RN(){return[M.useSyncExternalStore(JXe,()=>$f,()=>$f),QXe]}function eZe(e){const[n]=RN();return h.jsx(YXe,{theme:n,...e})}function DN(e,n,t){BXe[n](e,{duration:1/0,position:"top-center",closeButton:!0,...t})}function tZe({content:e,children:n,className:t}){return h.jsxs("span",{className:is("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,children:[n,h.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full start-1/2 z-20 mb-1.5 w-max max-w-64 -translate-x-1/2 rounded-sm bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background opacity-0 shadow-control-subtle transition-opacity group-hover:opacity-100 group-focus:opacity-100",children:e})]})}const nZe=["alphaxiv","openalex","biorxiv"];let sS=null;function rZe(){const[e,n]=M.useState(sS),[t,r]=M.useState(!1),s=o=>{sS=o,n(o)};M.useEffect(()=>{uKe().then(s).catch(()=>{})},[]);const a=o=>{!e||t||(r(!0),dKe({...e,[o]:!e[o]}).then(s).catch(()=>{}).finally(()=>r(!1)))};return e?h.jsx("div",{className:"flex flex-col",children:nZe.map(o=>{const l=e[o];return h.jsxs(Zr,{type:"button",role:"switch","aria-checked":l,disabled:t,onClick:()=>a(o),children:[h.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[h.jsx(_N,{source:o,size:16,decorative:!0}),hN[o]]}),h.jsx(vXe,{checked:l,"aria-hidden":"true"})]},o)})}):h.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:J_e()})}function X1(e,n){if(!e)throw new Error("Assertion Error")}function Ql(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function sZe(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function iZe(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function aZe(e,n){const t=n.value?n.value+` -`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function oZe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function lZe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Ns=Tl(/[A-Za-z]/),_s=Tl(/[\dA-Za-z]/),cZe=Tl(/[#-'*+\--9=?A-Z^-~]/);function rp(e){return e!==null&&(e<32||e===127)}const Ob=Tl(/\d/),uZe=Tl(/[\dA-Fa-f]/),dZe=Tl(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function Bn(e){return e!==null&&(e<0||e===32)}function on(e){return e===-2||e===-1||e===32}const Fp=Tl(new RegExp("\\p{P}|\\p{S}","u")),gc=Tl(/\s/);function Tl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ad(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),s=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+s+1,o=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function fZe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=ad(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function hZe(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 _Ze(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function LN(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),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function pZe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return LN(e,n);const s={src:ad(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,a),e.applyData(n,a)}function mZe(e,n){const t={src:ad(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 gZe(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 vZe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return LN(e,n);const s={href:ad(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function bZe(e,n){const t={href:ad(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 xZe(e,n,t){const r=e.all(n),s=t?yZe(t):ON(n),a={},o=[];if(typeof n.checked=="boolean"){const _=r[0];let f;_&&_.type==="element"&&_.tagName==="p"?f=_:(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:[]}),a.className=["task-list-item"]}let l=-1;for(;++l{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),zN=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),rp="-",eS=[],TZe="arbitrary..",jZe=e=>{const n=RZe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return MZe(o);const l=o.split(rp),c=l[0]===""&&l.length>1?1:0;return AN(l,c,n)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=r[o],d=t[o];return c?d?zZe(d,c):c:d||eS}return t[o]||eS}}},AN=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=AN(e,n+1,a);if(d)return d}const o=t.validators;if(o===null)return;const l=n===0?e.join(rp):e.slice(n).join(rp),c=o.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?TZe+r:void 0})(),RZe=e=>{const{theme:n,classGroups:t}=e;return DZe(t,n)},DZe=(e,n)=>{const t=zN();for(const r in e){const s=e[r];Ox(s,t,r,n)}return t},Ox=(e,n,t,r)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){OZe(e,n,t);return}if(typeof e=="function"){IZe(e,n,t,r);return}BZe(e,n,t,r)},OZe=(e,n,t)=>{const r=e===""?n:TN(n,e);r.classGroupId=t},IZe=(e,n,t,r)=>{if($Ze(e)){Ox(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(AZe(t,e))},BZe=(e,n,t,r)=>{const s=Object.entries(e),a=s.length;for(let o=0;o{let t=e;const r=n.split(rp),s=r.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,HZe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(a,o)=>{t[a]=o,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let o=t[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return s(a,o),o},set(a,o){a in t?t[a]=o:s(a,o)}}},Db="!",tS=":",PZe=[],nS=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),FZe=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const a=[];let o=0,l=0,c=0,d;const _=s.length;for(let k=0;k<_;k++){const b=s[k];if(o===0&&l===0){if(b===tS){a.push(s.slice(c,k)),c=k+1;continue}if(b==="/"){d=k;continue}}b==="["?o++:b==="]"?o--:b==="("?l++:b===")"&&l--}const f=a.length===0?s:s.slice(c);let m=f,g=!1;f.endsWith(Db)?(m=f.slice(0,-1),g=!0):f.startsWith(Db)&&(m=f.slice(1),g=!0);const S=d&&d>c?d-c:void 0;return nS(a,g,m,S)};if(n){const s=n+tS,a=r;r=o=>o.startsWith(s)?a(o.slice(s.length)):nS(PZe,!1,o,void 0,!0)}if(t){const s=r;r=a=>t({className:a,parseClassName:s})}return r},UZe=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let a=0;a0&&(s.sort(),r.push(...s),s=[]),r.push(o)):s.push(o)}return s.length>0&&(s.sort(),r.push(...s)),r}},qZe=e=>({cache:HZe(e.cacheSize),parseClassName:FZe(e),sortModifiers:UZe(e),postfixLookupClassGroupIds:GZe(e),...jZe(e)}),GZe=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:o}=n,l=[],c=e.trim().split(VZe);let d="";for(let _=c.length-1;_>=0;_-=1){const f=c[_],{isExternal:m,modifiers:g,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:b}=t(f);if(m){d=f+(d.length>0?" "+d:d);continue}let v=!!b,x;if(v){const j=k.substring(0,b);x=r(j);const T=x&&o[x]?r(k):void 0;T&&T!==x&&(x=T,v=!1)}else x=r(k);if(!x){if(!v){d=f+(d.length>0?" "+d:d);continue}if(x=r(k),!x){d=f+(d.length>0?" "+d:d);continue}v=!1}const y=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=S?y+Db:y,A=C+x;if(l.indexOf(A)>-1)continue;l.push(A);const E=s(x,v);for(let j=0;j0?" "+d:d)}return d},KZe=(...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,a;const o=c=>{const d=n.reduce((_,f)=>f(_),e());return t=qZe(d),r=t.cache.get,s=t.cache.set,a=l,l(c)},l=c=>{const d=r(c);if(d)return d;const _=WZe(c,t);return s(c,_),_};return a=o,(...c)=>a(KZe(...c))},XZe=[],Pr=e=>{const n=t=>t[e]||XZe;return n.isThemeGetter=!0,n},MN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,RN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZZe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QZe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JZe=/\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$/,eQe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tQe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nQe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ll=e=>ZZe.test(e),Qt=e=>!!e&&!Number.isNaN(Number(e)),pa=e=>!!e&&Number.isInteger(Number(e)),Z1=e=>e.endsWith("%")&&Qt(e.slice(0,-1)),uo=e=>QZe.test(e),DN=()=>!0,rQe=e=>JZe.test(e)&&!eQe.test(e),Ix=()=>!1,sQe=e=>tQe.test(e),iQe=e=>nQe.test(e),aQe=e=>!ot(e)&&!lt(e),oQe=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)),lQe=e=>zl(e,IN,Ix),ot=e=>MN.test(e),Ql=e=>zl(e,BN,rQe),rS=e=>zl(e,mQe,Qt),cQe=e=>zl(e,HN,DN),uQe=e=>zl(e,$N,Ix),sS=e=>zl(e,LN,Ix),dQe=e=>zl(e,ON,iQe),Y_=e=>zl(e,PN,sQe),lt=e=>RN.test(e),cf=e=>Nc(e,BN),fQe=e=>Nc(e,$N),iS=e=>Nc(e,LN),hQe=e=>Nc(e,IN),_Qe=e=>Nc(e,ON),X_=e=>Nc(e,PN,!0),pQe=e=>Nc(e,HN,!0),zl=(e,n,t)=>{const r=MN.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Nc=(e,n,t=!1)=>{const r=RN.exec(e);return r?r[1]?n(r[1]):t:!1},LN=e=>e==="position"||e==="percentage",ON=e=>e==="image"||e==="url",IN=e=>e==="length"||e==="size"||e==="bg-size",BN=e=>e==="length",mQe=e=>e==="number",$N=e=>e==="family-name",HN=e=>e==="number"||e==="weight",PN=e=>e==="shadow",gQe=()=>{const e=Pr("color"),n=Pr("font"),t=Pr("text"),r=Pr("font-weight"),s=Pr("tracking"),a=Pr("leading"),o=Pr("breakpoint"),l=Pr("container"),c=Pr("spacing"),d=Pr("radius"),_=Pr("shadow"),f=Pr("inset-shadow"),m=Pr("text-shadow"),g=Pr("drop-shadow"),S=Pr("blur"),k=Pr("perspective"),b=Pr("aspect"),v=Pr("ease"),x=Pr("animate"),y=()=>["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"],A=()=>[...C(),lt,ot],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],T=()=>[lt,ot,c],D=()=>[ll,"full","auto",...T()],I=()=>[pa,"none","subgrid",lt,ot],P=()=>["auto",{span:["full",pa,lt,ot]},pa,lt,ot],H=()=>[pa,"auto",lt,ot],F=()=>["auto","min","max","fr",lt,ot],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...T()],Z=()=>[ll,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],J=()=>[ll,"screen","full","dvw","lvw","svw","min","max","fit",...T()],B=()=>[ll,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],L=()=>[e,lt,ot],$=()=>[...C(),iS,sS,{position:[lt,ot]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",hQe,lQe,{size:[lt,ot]}],re=()=>[Z1,cf,Ql],oe=()=>["","none","full",d,lt,ot],he=()=>["",Qt,cf,Ql],ie=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Qt,Z1,iS,sS],le=()=>["","none",S,lt,ot],ge=()=>["none",Qt,lt,ot],ue=()=>["none",Qt,lt,ot],Ce=()=>[Qt,lt,ot],Ee=()=>[ll,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[uo],breakpoint:[uo],color:[DN],container:[uo],"drop-shadow":[uo],ease:["in","out","in-out"],font:[aQe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[uo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[uo],shadow:[uo],spacing:["px",Qt],text:[uo],"text-shadow":[uo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ll,ot,lt,b]}],container:["container"],"container-type":[{"@container":["","normal","size",lt,ot]}],"container-named":[oQe],columns:[{columns:[Qt,ot,lt,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:A()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[pa,"auto",lt,ot]}],basis:[{basis:[ll,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qt,ll,"auto","initial","none",ot]}],grow:[{grow:["",Qt,lt,ot]}],shrink:[{shrink:["",Qt,lt,ot]}],order:[{order:[pa,"first","last","none",lt,ot]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"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",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...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,cf,Ql]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,pQe,cQe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Z1,ot]}],"font-family":[{font:[fQe,uQe,n]}],"font-features":[{"font-features":[ot]}],"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,lt,ot]}],"line-clamp":[{"line-clamp":[Qt,"none",lt,rS]}],leading:[{leading:[a,...T()]}],"list-image":[{"list-image":["none",lt,ot]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",lt,ot]}],"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:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qt,"from-font","auto",lt,Ql]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Qt,"auto",lt,ot]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[pa,lt,ot]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",lt,ot]}],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",lt,ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pa,lt,ot],radial:["",lt,ot],conic:[pa,lt,ot]},_Qe,dQe]}],"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:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"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:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qt,lt,ot]}],"outline-w":[{outline:["",Qt,cf,Ql]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,X_,Y_]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,X_,Y_]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Qt,Ql]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,X_,Y_]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Qt,lt,ot]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[Qt]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"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":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"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":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"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":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"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":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"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":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"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":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[lt,ot]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"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":[Qt]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"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:$()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",lt,ot]}],filter:[{filter:["","none",lt,ot]}],blur:[{blur:le()}],brightness:[{brightness:[Qt,lt,ot]}],contrast:[{contrast:[Qt,lt,ot]}],"drop-shadow":[{"drop-shadow":["","none",g,X_,Y_]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Qt,lt,ot]}],"hue-rotate":[{"hue-rotate":[Qt,lt,ot]}],invert:[{invert:["",Qt,lt,ot]}],saturate:[{saturate:[Qt,lt,ot]}],sepia:[{sepia:["",Qt,lt,ot]}],"backdrop-filter":[{"backdrop-filter":["","none",lt,ot]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Qt,lt,ot]}],"backdrop-contrast":[{"backdrop-contrast":[Qt,lt,ot]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qt,lt,ot]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qt,lt,ot]}],"backdrop-invert":[{"backdrop-invert":["",Qt,lt,ot]}],"backdrop-opacity":[{"backdrop-opacity":[Qt,lt,ot]}],"backdrop-saturate":[{"backdrop-saturate":[Qt,lt,ot]}],"backdrop-sepia":[{"backdrop-sepia":["",Qt,lt,ot]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",lt,ot]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qt,"initial",lt,ot]}],ease:[{ease:["linear","initial",v,lt,ot]}],delay:[{delay:[Qt,lt,ot]}],animate:[{animate:["none",x,lt,ot]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,lt,ot]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[lt,ot,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],zoom:[{zoom:[pa,lt,ot]}],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",lt,ot]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",lt,ot]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Qt,cf,Ql,rS]}],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"]}},vQe=YZe(gQe);function ss(...e){return vQe(...e)}const bQe={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 Dt({variant:e="default",className:n,...t}){return h.jsx("span",{className:ss("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",bQe[e],n),...t})}const xQe=["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(" "),yQe={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"},wQe={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 FN(e,n,t,r){return ss(xQe,yQe[e],wQe[n],t&&"active",r)}function Qe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("button",{className:FN(n,t,e,r),...s})}function Lb({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("a",{className:FN(n,t,e,r),...s})}const SQe=["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","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),kQe={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"},CQe={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function UN(e,n,t,r){return ss(SQe,kQe[e],CQe[n],t&&"active",r)}const Jt=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...a},o){return h.jsx("button",{ref:o,className:UN(r,t,n,s),...a})});function Fp({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return h.jsx("a",{className:UN(t,n,e,r),...s})}const EQe={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 Ob({variant:e="default",className:n,...t}){return h.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",EQe[e],n),...t})}function Yr({active:e=!1,danger:n=!1,className:t,...r}){return h.jsx("button",{className:ss("model-item flex min-h-8 w-full items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-start text-sm 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",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",t),...r})}function dn({className:e,...n}){return h.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 vr({className:e,...n}){return h.jsx("div",{className:ss("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const NQe={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 Bx({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return h.jsxs("span",{className:ss("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[h.jsx("span",{className:ss("h-[7px] w-[7px] shrink-0 rounded-full bg-current",NQe[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const zQe=["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 qN(e,n){return ss(zQe,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function $x({checked:e=!1,className:n,children:t,...r}){return h.jsx("button",{role:"switch","aria-checked":e,className:qN(e,n),...r,children:t??h.jsx("span",{})})}function AQe({checked:e=!1,className:n,...t}){return h.jsx("span",{className:qN(e,n),...t,children:h.jsx("span",{})})}var Up=q9();const TQe=vh(Up);function jQe(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 MQe=e=>{switch(e){case"success":return LQe;case"info":return IQe;case"warning":return OQe;case"error":return BQe;default:return null}},RQe=Array(12).fill(0),DQe=({visible:e,className:n})=>Ze.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ze.createElement("div",{className:"sonner-spinner"},RQe.map((t,r)=>Ze.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),LQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),OQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),IQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),BQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),$Qe=Ze.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"},Ze.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ze.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),HQe=()=>{const[e,n]=Ze.useState(document.hidden);return Ze.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let PQe=1;const FQe=100,aS=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:PQe++};class UQe{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-FQe;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=aS(n),a=this.pendingDismissals.get(s);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const o=this.dismissedToasts.has(s),l=n.dismissible===void 0?!0:n.dismissible;return o&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(o?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...n,id:s,title:t}),{...d,...n,id:s,dismissible:l,title:t}):d):this.addToast({title:t,...r,dismissible:l,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 a=r!==void 0,o;const l=s.then(async d=>{if(o=["resolve",d],Ze.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(GQe(d)&&!d.ok){a=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(d instanceof Error){a=!1;const f=typeof t.error=="function"?await t.error(d):t.error,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(t.success!==void 0){a=!1;const f=typeof t.success=="function"?await t.success(d):t.success,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:m,...S})}}).catch(async d=>{if(o=["reject",d],t.error!==void 0){a=!1;const _=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description,g=typeof _=="object"&&!Ze.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:f,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,_)=>l.then(()=>o[0]==="reject"?_(o[1]):d(o[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=aS(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 qs=new UQe,qQe=(e,n)=>qs.message(e,n),GQe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",VQe=qQe,WQe=()=>qs.toasts,KQe=()=>qs.getActiveToasts(),YQe=Object.assign(VQe,{success:qs.success,info:qs.info,warning:qs.warning,error:qs.error,custom:qs.custom,message:qs.message,promise:qs.promise,dismiss:qs.dismiss,loading:qs.loading},{getHistory:WQe,getToasts:KQe});jQe("[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 Z_(e){return e.label!==void 0}const XQe=3,ZQe="24px",QQe="16px",oS=4e3,JQe=356,eJe=14,tJe=45,nJe=200;function ma(...e){return e.filter(Boolean).join(" ")}function rJe(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const sJe=e=>{var n,t,r,s,a,o,l,c,d;const{invert:_,toast:f,unstyled:m,interacting:g,setHeights:S,visibleToasts:k,heights:b,index:v,toasts:x,expanded:y,removeToast:C,defaultRichColors:A,closeButton:E,style:j,cancelButtonStyle:T,actionButtonStyle:D,className:I="",descriptionClassName:P="",duration:H,position:F,gap:V,expandByDefault:X,classNames:W,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[B,L]=Ze.useState(null),[$,K]=Ze.useState(null),[G,re]=Ze.useState(!1),[oe,he]=Ze.useState(!1),[ie,q]=Ze.useState(!1),[te,le]=Ze.useState(!1),[ge,ue]=Ze.useState(!1),[Ce,Ee]=Ze.useState(0),[Le,Pe]=Ze.useState(0),Ve=Ze.useRef(f.duration||H||oS),ft=Ze.useRef(null),Be=Ze.useRef(null),wt=v===0,At=v+1<=k,vt=f.type,Ot=vt??"default",St=f.dismissible!==!1,kt=f.className||"",xe=f.descriptionClassName||"",je=Ze.useMemo(()=>b.findIndex(rt=>rt.toastId===f.id)||0,[b,f.id]),We=Ze.useMemo(()=>{var rt;return(rt=f.closeButton)!=null?rt:E},[f.closeButton,E]),st=Ze.useMemo(()=>f.duration||H||oS,[f.duration,H]),nt=Ze.useRef(0),Ht=Ze.useRef(0),bt=Ze.useRef(0),nn=Ze.useRef(null),[Wt,pn]=F.split("-"),Lt=Ze.useMemo(()=>b.reduce((rt,Ie,it)=>it>=je?rt:rt+Ie.height,0),[b,je]),En=HQe(),Ft=Ze.useMemo(()=>{var rt;return(rt=e.swipeDirections)!=null?rt:rJe(F)},[e.swipeDirections,F]),br=f.invert||_,mn=vt==="loading";Ht.current=Ze.useMemo(()=>je*V+Lt,[je,Lt]),Ze.useEffect(()=>{Ve.current=st},[st]),Ze.useEffect(()=>{re(!0)},[]),Ze.useEffect(()=>{const rt=Be.current;if(rt){const Ie=rt.getBoundingClientRect().height;return Pe(Ie),S(it=>[{toastId:f.id,height:Ie,position:f.position},...it]),()=>S(it=>it.filter(Ut=>Ut.toastId!==f.id))}},[S,f.id]),Ze.useLayoutEffect(()=>{if(!G)return;const rt=Be.current,Ie=rt.style.height;rt.style.height="auto";const it=rt.getBoundingClientRect().height;rt.style.height=Ie,Pe(it),S(Ut=>Ut.find(Mt=>Mt.toastId===f.id)?Ut.map(Mt=>Mt.toastId===f.id?{...Mt,height:it}:Mt):[{toastId:f.id,height:it,position:f.position},...Ut])},[G,f.title,f.description,S,f.id,f.jsx,f.action,f.cancel]);const Ye=Ze.useCallback(()=>{he(!0),Ee(Ht.current),S(rt=>rt.filter(Ie=>Ie.toastId!==f.id)),setTimeout(()=>{C(f)},nJe)},[f,C,S,Ht]);Ze.useEffect(()=>{if(f.promise&&vt==="loading"||f.duration===1/0||f.type==="loading")return;let rt;return y||g||En?(()=>{if(bt.current{Ve.current!==1/0&&(nt.current=new Date().getTime(),rt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Ye()},Ve.current))})(),()=>clearTimeout(rt)},[y,g,f,vt,En,Ye]),Ze.useEffect(()=>{f.delete&&(Ye(),f.onDismiss==null||f.onDismiss.call(f,f))},[Ye,f.delete]);function xt(){var rt;if(Z!=null&&Z.loading){var Ie;return Ze.createElement("div",{className:ma(W==null?void 0:W.loader,f==null||(Ie=f.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":vt==="loading"},Z.loading)}return Ze.createElement(DQe,{className:ma(W==null?void 0:W.loader,f==null||(rt=f.classNames)==null?void 0:rt.loader),visible:vt==="loading"})}const Wn=f.icon||(Z==null?void 0:Z[vt])||MQe(vt);var Kn,Nt;return Ze.createElement("li",{tabIndex:0,ref:Be,className:ma(I,kt,W==null?void 0:W.toast,f==null||(n=f.classNames)==null?void 0:n.toast,W==null?void 0:W[Ot],f==null||(t=f.classNames)==null?void 0:t[Ot]),"data-sonner-toast":"","data-rich-colors":(Kn=f.richColors)!=null?Kn:A,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":G,"data-promise":!!f.promise,"data-swiped":ge,"data-removed":oe,"data-visible":At,"data-y-position":Wt,"data-x-position":pn,"data-index":v,"data-front":wt,"data-swiping":ie,"data-dismissible":St,"data-type":vt,"data-invert":br,"data-swipe-out":te,"data-swipe-direction":$,"data-expanded":!!(y||X&&G),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${oe?Ce:Ht.current}px`,"--initial-height":X?"auto":`${Le}px`,...j,...f.style},onDragEnd:()=>{q(!1),L(null),nn.current=null},onPointerDown:rt=>{rt.button!==2&&(mn||!St||(ft.current=new Date,Ee(Ht.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(q(!0),nn.current={x:rt.clientX,y:rt.clientY})))},onPointerUp:()=>{var rt,Ie,it;if(te||!St)return;nn.current=null;const Ut=Number(((rt=Be.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((Ie=Be.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mt=new Date().getTime()-((it=ft.current)==null?void 0:it.getTime()),Ln=B==="x"?Ut:en,_r=Math.abs(Ln)/Mt;if((B==="x"?Ft.includes(Ut>0?"right":"left"):Ft.includes(en>0?"bottom":"top"))&&(Math.abs(Ln)>=tJe||_r>.11)){Ee(Ht.current),f.onDismiss==null||f.onDismiss.call(f,f),K(B==="x"?Ut>0?"right":"left":en>0?"down":"up"),Ye(),le(!0);return}else{var or,xr;(or=Be.current)==null||or.style.setProperty("--swipe-amount-x","0px"),(xr=Be.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}ue(!1),q(!1),L(null)},onPointerMove:rt=>{var Ie,it,Ut;if(!nn.current||!St||((Ie=window.getSelection())==null?void 0:Ie.toString().length)>0)return;const Mt=rt.clientY-nn.current.y,Ln=rt.clientX-nn.current.x;!B&&(Math.abs(Ln)>1||Math.abs(Mt)>1)&&L(Math.abs(Ln)>Math.abs(Mt)?"x":"y");let _r={x:0,y:0};const is=or=>1/(1.5+Math.abs(or)/20);if(B==="y"){if(Ft.includes("top")||Ft.includes("bottom"))if(Ft.includes("top")&&Mt<0||Ft.includes("bottom")&&Mt>0)_r.y=Mt;else{const or=Mt*is(Mt);_r.y=Math.abs(or)0)_r.x=Ln;else{const or=Ln*is(Ln);_r.x=Math.abs(or)0||Math.abs(_r.y)>0)&&ue(!0),(it=Be.current)==null||it.style.setProperty("--swipe-amount-x",`${_r.x}px`),(Ut=Be.current)==null||Ut.style.setProperty("--swipe-amount-y",`${_r.y}px`)}},We&&!f.jsx&&vt!=="loading"?Ze.createElement("button",{"aria-label":J,"data-disabled":mn,"data-close-button":!0,onClick:mn||!St?()=>{}:()=>{Ye(),f.onDismiss==null||f.onDismiss.call(f,f)},className:ma(W==null?void 0:W.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Nt=Z==null?void 0:Z.close)!=null?Nt:$Qe):null,(vt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[vt])!==null||f.icon)?Ze.createElement("div",{"data-icon":"",className:ma(W==null?void 0:W.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},vt==="loading"?f.icon||xt():f.promise?xt():null,vt!=="loading"?Wn:null):null,Ze.createElement("div",{"data-content":"",className:ma(W==null?void 0:W.content,f==null||(a=f.classNames)==null?void 0:a.content)},Ze.createElement("div",{"data-title":"",className:ma(W==null?void 0:W.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?Ze.createElement("div",{"data-description":"",className:ma(P,xe,W==null?void 0:W.description,f==null||(l=f.classNames)==null?void 0:l.description)},typeof f.description=="function"?f.description():f.description):null),Ze.isValidElement(f.cancel)?f.cancel:f.cancel&&Z_(f.cancel)?Ze.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:rt=>{Z_(f.cancel)&&St&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,rt),Ye())},className:ma(W==null?void 0:W.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,Ze.isValidElement(f.action)?f.action:f.action&&Z_(f.action)?Ze.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:rt=>{Z_(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,rt),!rt.defaultPrevented&&Ye())},className:ma(W==null?void 0:W.actionButton,f==null||(d=f.classNames)==null?void 0:d.actionButton)},f.action.label):null)};function lS(){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 iJe(e,n){const t={};return[e,n].forEach((r,s)=>{const a=s===1,o=a?"--mobile-offset":"--offset",l=a?QQe:ZQe;function c(d){["top","right","bottom","left"].forEach(_=>{t[`${o}-${_}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${o}-${d}`]=l:t[`${o}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),t}const aJe=Ze.forwardRef(function(n,t){const{id:r,invert:s,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:_,mobileOffset:f,theme:m="light",richColors:g,duration:S,style:k,visibleToasts:b=XQe,toastOptions:v,dir:x=lS(),gap:y=eJe,icons:C,customAriaLabel:A,containerAriaLabel:E="Notifications"}=n,[j,T]=Ze.useState([]),D=Ze.useMemo(()=>r?j.filter(re=>re.toasterId===r):j.filter(re=>!re.toasterId),[j,r]),I=Ze.useMemo(()=>Array.from(new Set([a].concat(D.filter(re=>re.position).map(re=>re.position)))),[D,a]),[P,H]=Ze.useState([]),[F,V]=Ze.useState(!1),[X,W]=Ze.useState(!1),[Z,J]=Ze.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=Ze.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=Ze.useRef(null),K=Ze.useRef(!1),G=Ze.useCallback(re=>{T(oe=>{var he;return(he=oe.find(ie=>ie.id===re.id))!=null&&he.delete||qs.dismiss(re.id),oe.filter(({id:ie})=>ie!==re.id)})},[]);return Ze.useEffect(()=>qs.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{T(oe=>oe.map(he=>he.id===re.id?{...he,delete:!0}:he))});return}setTimeout(()=>{TQe.flushSync(()=>{T(oe=>{const he=oe.findIndex(ie=>ie.id===re.id);return he!==-1?[...oe.slice(0,he),{...oe[he],...re},...oe.slice(he+1)]:[re,...oe]})})})}),[]),Ze.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="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:oe})=>{J(oe?"dark":"light")})}catch{re.addListener(({matches:he})=>{try{J(he?"dark":"light")}catch(ie){console.error(ie)}})}},[m]),Ze.useEffect(()=>{j.length<=1&&V(!1)},[j]),Ze.useEffect(()=>{const re=oe=>{var he;if(o.length>0&&o.every(te=>oe[te]||oe.code===te)){var q;V(!0),(q=B.current)==null||q.focus()}oe.code==="Escape"&&(document.activeElement===B.current||(he=B.current)!=null&&he.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[o]),Ze.useEffect(()=>{if(B.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,K.current=!1)}},[B.current]),Ze.createElement("section",{ref:t,"aria-label":A??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},I.map((re,oe)=>{var he;const[ie,q]=re.split("-");return D.length?Ze.createElement("ol",{key:re,dir:x==="auto"?lS():x,tabIndex:-1,ref:B,className:d,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":ie,"data-x-position":q,style:{"--front-toast-height":`${((he=P[0])==null?void 0:he.height)||0}px`,"--width":`${JQe}px`,"--gap":`${y}px`,...k,...iJe(_,f)},onBlur:te=>{K.current&&!te.currentTarget.contains(te.relatedTarget)&&(K.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||K.current||(K.current=!0,$.current=te.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{X||V(!1)},onDragEnd:()=>V(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},D.filter(te=>!te.position&&oe===0||te.position===re).map((te,le)=>{var ge,ue;return Ze.createElement(sJe,{key:te.id,icons:C,index:le,toast:te,defaultRichColors:g,duration:(ge=v==null?void 0:v.duration)!=null?ge:S,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(ue=v==null?void 0:v.closeButton)!=null?ue:c,interacting:X,position:re,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:G,toasts:D.filter(Ce=>Ce.position==te.position),heights:P.filter(Ce=>Ce.position==te.position),setHeights:H,expandByDefault:l,gap:y,expanded:F,swipeDirections:n.swipeDirections})})):null}))}),GN="orx:theme";function oJe(){try{const e=localStorage.getItem(GN);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Pf=oJe();const Ib=new Set;function lJe(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Hx(){document.documentElement.dataset.theme=lJe(Pf)}function cJe(e){Pf=e;try{localStorage.setItem(GN,e)}catch{}Hx();for(const n of Ib)n()}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Pf==="system"&&Hx()});Hx();function uJe(e){return Ib.add(e),()=>Ib.delete(e)}function VN(){return[M.useSyncExternalStore(uJe,()=>Pf,()=>Pf),cJe]}function dJe(e){const[n]=VN();return h.jsx(aJe,{theme:n,...e})}function WN(e,n,t){YQe[n](e,{duration:1/0,position:"top-center",closeButton:!0,...t})}function fJe({content:e,children:n,className:t}){return h.jsxs("span",{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,children:[n,h.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full start-1/2 z-20 mb-1.5 w-max max-w-64 -translate-x-1/2 rounded-sm bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background opacity-0 shadow-control-subtle transition-opacity group-hover:opacity-100 group-focus:opacity-100",children:e})]})}const hJe=["alphaxiv","openalex","biorxiv"];let cS=null;function _Je(){const[e,n]=M.useState(cS),[t,r]=M.useState(!1),s=o=>{cS=o,n(o)};M.useEffect(()=>{vXe().then(s).catch(()=>{})},[]);const a=o=>{!e||t||(r(!0),bXe({...e,[o]:!e[o]}).then(s).catch(()=>{}).finally(()=>r(!1)))};return e?h.jsx("div",{className:"flex flex-col",children:hJe.map(o=>{const l=e[o];return h.jsxs(Yr,{type:"button",role:"switch","aria-checked":l,disabled:t,onClick:()=>a(o),children:[h.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[h.jsx(NN,{source:o,size:16,decorative:!0}),EN[o]]}),h.jsx(AQe,{checked:l,"aria-hidden":"true"})]},o)})}):h.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:S0e()})}function Q1(e,n){if(!e)throw new Error("Assertion Error")}function Jl(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function pJe(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function mJe(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` +`}]}function gJe(e,n){const t=n.value?n.value+` +`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function vJe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function bJe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Ns=Al(/[A-Za-z]/),ps=Al(/[\dA-Za-z]/),xJe=Al(/[#-'*+\--9=?A-Z^-~]/);function sp(e){return e!==null&&(e<32||e===127)}const Bb=Al(/\d/),yJe=Al(/[\dA-Fa-f]/),wJe=Al(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function Bn(e){return e!==null&&(e<0||e===32)}function on(e){return e===-2||e===-1||e===32}const qp=Al(new RegExp("\\p{P}|\\p{S}","u")),vc=Al(/\s/);function Al(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ud(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),s=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+s+1,o=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function SJe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=ud(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function kJe(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 CJe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function KN(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),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function EJe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return KN(e,n);const s={src:ud(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,a),e.applyData(n,a)}function NJe(e,n){const t={src:ud(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 zJe(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 AJe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return KN(e,n);const s={href:ud(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function TJe(e,n){const t={href:ud(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 jJe(e,n,t){const r=e.all(n),s=t?MJe(t):YN(n),a={},o=[];if(typeof n.checked=="boolean"){const _=r[0];let f;_&&_.type==="element"&&_.tagName==="p"?f=_:(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:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function wZe(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&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 EZe(e){const n=Ox(e),t=IN(e);if(n&&t)return{start:n,end:t}}function NZe(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),s.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=Ox(n.children[1]),c=IN(n.children[n.children.length-1]);l&&c&&(o.position={start:l,end:c}),s.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,a),e.applyData(n,a)}function zZe(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let c=-1;const d=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return a.push(oS(n.slice(s),s>0,!1)),a.join("")}function oS(e,n,t){let r=0,s=e.length;if(n){let a=e.codePointAt(r);for(;a===iS||a===aS;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(s-1);for(;a===iS||a===aS;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function jZe(e,n){const t={type:"text",value:TZe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function MZe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const RZe={blockquote:sZe,break:iZe,code:aZe,delete:oZe,emphasis:lZe,footnoteReference:fZe,heading:hZe,html:_Ze,imageReference:pZe,image:mZe,inlineCode:gZe,linkReference:vZe,link:bZe,listItem:xZe,list:wZe,paragraph:SZe,root:kZe,strong:CZe,table:NZe,tableCell:AZe,tableRow:zZe,text:jZe,thematicBreak:MZe,toml:Z_,yaml:Z_,definition:Z_,footnoteDefinition:Z_};function Z_(){}const $N=-1,Up=0,Ef=1,sp=2,Ix=3,Bx=4,$x=5,Hx=6,HN=7,PN=8,DZe=typeof self=="object"?self:globalThis,lS=(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 DZe[e](n)},LZe=(e,n)=>{const t=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,o]=n[s];switch(a){case Up:case $N:return t(o,s);case Ef:{const l=t([],s);for(const c of o)l.push(r(c));return l}case sp:{const l=t({},s);for(const[c,d]of o)l[r(c)]=r(d);return l}case Ix:return t(new Date(o),s);case Bx:{const{source:l,flags:c}=o;return t(new RegExp(l,c),s)}case $x:{const l=t(new Map,s);for(const[c,d]of o)l.set(r(c),r(d));return l}case Hx:{const l=t(new Set,s);for(const c of o)l.add(r(c));return l}case HN:{const{name:l,message:c}=o;return t(lS(l,c),s)}case PN:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(lS(a,o),s)};return r},cS=e=>LZe(new Map,e)(0),nc="",{toString:OZe}={},{keys:IZe}=Object,lf=e=>{const n=typeof e;if(n!=="object"||!e)return[Up,n];const t=OZe.call(e).slice(8,-1);switch(t){case"Array":return[Ef,nc];case"Object":return[sp,nc];case"Date":return[Ix,nc];case"RegExp":return[Bx,nc];case"Map":return[$x,nc];case"Set":return[Hx,nc];case"DataView":return[Ef,t]}return t.includes("Array")?[Ef,t]:t.includes("Error")?[HN,t]:[sp,t]},Q_=([e,n])=>e===Up&&(n==="function"||n==="symbol"),BZe=(e,n,t,r)=>{const s=(o,l)=>{const c=r.push(o)-1;return t.set(l,c),c},a=o=>{if(t.has(o))return t.get(o);let[l,c]=lf(o);switch(l){case Up:{let _=o;switch(c){case"bigint":l=PN,_=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);_=null;break;case"undefined":return s([$N],o)}return s([l,_],o)}case Ef:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),s([c,[...m]],o)}const _=[],f=s([l,_],o);for(const m of o)_.push(a(m));return f}case sp:{if(c)switch(c){case"BigInt":return s([c,o.toString()],o);case"Boolean":case"Number":case"String":return s([c,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const _=[],f=s([l,_],o);for(const m of IZe(o))(e||!Q_(lf(o[m])))&&_.push([a(m),a(o[m])]);return f}case Ix:return s([l,isNaN(o.getTime())?nc:o.toISOString()],o);case Bx:{const{source:_,flags:f}=o;return s([l,{source:_,flags:f}],o)}case $x:{const _=[],f=s([l,_],o);for(const[m,g]of o)(e||!(Q_(lf(m))||Q_(lf(g))))&&_.push([a(m),a(g)]);return f}case Hx:{const _=[],f=s([l,_],o);for(const m of o)(e||!Q_(lf(m)))&&_.push(a(m));return f}}const{message:d}=o;return s([l,{name:c,message:d}],o)};return a},uS=(e,{json:n,lossy:t}={})=>{const r=[];return BZe(!(n||t),!!n,new Map,r)(e),r},ip=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?cS(uS(e,n)):structuredClone(e):(e,n)=>cS(uS(e,n));function $Ze(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 HZe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function PZe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||$Ze,r=e.options.footnoteBackLabel||HZe,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&S.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,g);typeof x=="string"&&(x={type:"text",value:x}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const x=b.children[b.children.length-1];x&&x.type==="text"?x.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...S)}else _.push(...S);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(_,!0)};e.patch(d,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ip(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const d={type:"element",tagName:"li",properties:a,children:o};return e.patch(n,d),e.applyData(n,d)}function MJe(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function RJe(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&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 IJe(e){const n=Px(e),t=XN(e);if(n&&t)return{start:n,end:t}}function BJe(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),s.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=Px(n.children[1]),c=XN(n.children[n.children.length-1]);l&&c&&(o.position={start:l,end:c}),s.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,a),e.applyData(n,a)}function $Je(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let c=-1;const d=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return a.push(fS(n.slice(s),s>0,!1)),a.join("")}function fS(e,n,t){let r=0,s=e.length;if(n){let a=e.codePointAt(r);for(;a===uS||a===dS;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(s-1);for(;a===uS||a===dS;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function FJe(e,n){const t={type:"text",value:PJe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function UJe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const qJe={blockquote:pJe,break:mJe,code:gJe,delete:vJe,emphasis:bJe,footnoteReference:SJe,heading:kJe,html:CJe,imageReference:EJe,image:NJe,inlineCode:zJe,linkReference:AJe,link:TJe,listItem:jJe,list:RJe,paragraph:DJe,root:LJe,strong:OJe,table:BJe,tableCell:HJe,tableRow:$Je,text:FJe,thematicBreak:UJe,toml:Q_,yaml:Q_,definition:Q_,footnoteDefinition:Q_};function Q_(){}const QN=-1,Gp=0,zf=1,ip=2,Fx=3,Ux=4,qx=5,Gx=6,JN=7,ez=8,GJe=typeof self=="object"?self:globalThis,hS=(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 GJe[e](n)},VJe=(e,n)=>{const t=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,o]=n[s];switch(a){case Gp:case QN:return t(o,s);case zf:{const l=t([],s);for(const c of o)l.push(r(c));return l}case ip:{const l=t({},s);for(const[c,d]of o)l[r(c)]=r(d);return l}case Fx:return t(new Date(o),s);case Ux:{const{source:l,flags:c}=o;return t(new RegExp(l,c),s)}case qx:{const l=t(new Map,s);for(const[c,d]of o)l.set(r(c),r(d));return l}case Gx:{const l=t(new Set,s);for(const c of o)l.add(r(c));return l}case JN:{const{name:l,message:c}=o;return t(hS(l,c),s)}case ez:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(hS(a,o),s)};return r},_S=e=>VJe(new Map,e)(0),rc="",{toString:WJe}={},{keys:KJe}=Object,uf=e=>{const n=typeof e;if(n!=="object"||!e)return[Gp,n];const t=WJe.call(e).slice(8,-1);switch(t){case"Array":return[zf,rc];case"Object":return[ip,rc];case"Date":return[Fx,rc];case"RegExp":return[Ux,rc];case"Map":return[qx,rc];case"Set":return[Gx,rc];case"DataView":return[zf,t]}return t.includes("Array")?[zf,t]:t.includes("Error")?[JN,t]:[ip,t]},J_=([e,n])=>e===Gp&&(n==="function"||n==="symbol"),YJe=(e,n,t,r)=>{const s=(o,l)=>{const c=r.push(o)-1;return t.set(l,c),c},a=o=>{if(t.has(o))return t.get(o);let[l,c]=uf(o);switch(l){case Gp:{let _=o;switch(c){case"bigint":l=ez,_=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);_=null;break;case"undefined":return s([QN],o)}return s([l,_],o)}case zf:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),s([c,[...m]],o)}const _=[],f=s([l,_],o);for(const m of o)_.push(a(m));return f}case ip:{if(c)switch(c){case"BigInt":return s([c,o.toString()],o);case"Boolean":case"Number":case"String":return s([c,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const _=[],f=s([l,_],o);for(const m of KJe(o))(e||!J_(uf(o[m])))&&_.push([a(m),a(o[m])]);return f}case Fx:return s([l,isNaN(o.getTime())?rc:o.toISOString()],o);case Ux:{const{source:_,flags:f}=o;return s([l,{source:_,flags:f}],o)}case qx:{const _=[],f=s([l,_],o);for(const[m,g]of o)(e||!(J_(uf(m))||J_(uf(g))))&&_.push([a(m),a(g)]);return f}case Gx:{const _=[],f=s([l,_],o);for(const m of o)(e||!J_(uf(m)))&&_.push(a(m));return f}}const{message:d}=o;return s([l,{name:c,message:d}],o)};return a},pS=(e,{json:n,lossy:t}={})=>{const r=[];return YJe(!(n||t),!!n,new Map,r)(e),r},ap=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?_S(pS(e,n)):structuredClone(e):(e,n)=>_S(pS(e,n));function XJe(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 ZJe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function QJe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||XJe,r=e.options.footnoteBackLabel||ZJe,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&S.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,g);typeof x=="string"&&(x={type:"text",value:x}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const x=b.children[b.children.length-1];x&&x.type==="text"?x.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...S)}else _.push(...S);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(_,!0)};e.patch(d,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ap(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const xh=(function(e){if(e==null)return GZe;if(typeof e=="function")return qp(e);if(typeof e=="object")return Array.isArray(e)?FZe(e):UZe(e);if(typeof e=="string")return qZe(e);throw new Error("Expected function, string, or object as test")});function FZe(e){const n=[];let t=-1;for(;++t":""))+")"})}return m;function m(){let g=FN,S,k,b;if((!n||a(c,d,_[_.length-1]||void 0))&&(g=KZe(t(c,_)),g[0]===Ib))return g;if("children"in c&&c.children){const v=c;if(v.children&&g[0]!==UN)for(k=(r?v.children.length:-1)+o,b=_.concat(v);k>-1&&k":""))+")"})}return m;function m(){let g=tz,S,k,b;if((!n||a(c,d,_[_.length-1]||void 0))&&(g=iet(t(c,_)),g[0]===$b))return g;if("children"in c&&c.children){const v=c;if(v.children&&g[0]!==nz)for(k=(r?v.children.length:-1)+o,b=_.concat(v);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function dS(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function fS(e,n){const t=XZe(e,n),r=t.one(e,void 0),s=PZe(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:` -`},s),a}function ap(e,n){return e&&"run"in e?async function(t,r){const s=fS(t,{file:r,...n});await e.run(s,r)}:function(t,r){return fS(t,{file:r,...e||n})}}function hS(e){if(e)throw e}var Z1,_S;function tQe(){if(_S)return Z1;_S=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},a=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var _=e.call(d,"constructor"),f=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!_&&!f)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},o=function(d,_){t&&_.name==="__proto__"?t(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},l=function(d,_){if(_==="__proto__")if(e.call(d,_)){if(r)return r(d,_).value}else return;return d[_]};return Z1=function c(){var d,_,f,m,g,S,k=arguments[0],b=1,v=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},b=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});bo.length;let c;l&&o.push(s);try{c=e.apply(this,o)}catch(d){const _=d;if(l&&t)throw _;return s(_)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(o,...l){t||(t=!0,n(o,...l))}function a(o){s(null,o)}}function Nf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?pS(e.position):"start"in e||"end"in e?pS(e):"line"in e||"column"in e?Hb(e):""}function Hb(e){return mS(e&&e.line)+":"+mS(e&&e.column)}function pS(e){return Hb(e&&e.start)+"-"+Hb(e&&e.end)}function mS(e){return e&&typeof e=="number"?e:1}class ms extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?s=n:!a.cause&&n&&(o=!0,s=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Nf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ms.prototype.file="";ms.prototype.name="";ms.prototype.reason="";ms.prototype.message="";ms.prototype.stack="";ms.prototype.column=void 0;ms.prototype.line=void 0;ms.prototype.ancestors=void 0;ms.prototype.cause=void 0;ms.prototype.fatal=void 0;ms.prototype.place=void 0;ms.prototype.ruleId=void 0;ms.prototype.source=void 0;const va={basename:iQe,dirname:aQe,extname:oQe,join:lQe,sep:"/"};function iQe(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');yh(e);let t=0,r=-1,s=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,l=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else o<0&&(a=!0,o=s+1),l>-1&&(e.codePointAt(s)===n.codePointAt(l--)?l<0&&(r=s):(l=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function aQe(e){if(yh(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 oQe(e){yh(e);let n=e.length,t=-1,r=0,s=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?s<0?s=n:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||t<0||a===0||a===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function lQe(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function uQe(e,n){let t="",r=0,s=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o2){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=o,a=0;continue}}else if(t.length>0){t="",r=0,s=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,o):t=e.slice(s+1,o),r=o-s-1;s=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function yh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const dQe={cwd:fQe};function fQe(){return"/"}function Pb(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function hQe(e){if(typeof e=="string")e=new URL(e);else if(!Pb(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 _Qe(e)}function _Qe(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[g,...S]=_;const k=r[m][1];$b(k)&&$b(g)&&(g=Q1(!0,k,g)),r[m]=[d,g,...S]}}}}const qx=new Ux().freeze();function nv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function sv(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 vS(e){if(!$b(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bS(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function J_(e){return vQe(e)?e:new qN(e)}function vQe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function bQe(e){return typeof e=="string"||xQe(e)}function xQe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var xS=Object.prototype.hasOwnProperty;function yS(e,n,t){for(t of e.keys())if(zf(t,n))return t}function zf(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--&&zf(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=yS(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=yS(n,s),!s)||!zf(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(xS.call(e,t)&&++r&&!xS.call(n,t)||!(t in n)||!zf(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function wS(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=t.length,a=!0);const o=t.slice(s,r).trim();(o||!a)&&n.push(o),s=r+1,r=t.indexOf(",",s)}return n}function yQe(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const wQe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SQe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kQe={};function SS(e,n){return(kQe.jsx?SQe:wQe).test(e)}const CQe=/[ \t\n\f\r]/g;function EQe(e){return typeof e=="object"?e.type==="text"?kS(e.value):!1:kS(e)}function kS(e){return e.replace(CQe,"")===""}class wh{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}wh.prototype.normal={};wh.prototype.property={};wh.prototype.space=void 0;function GN(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new wh(t,r,n)}function Hf(e){return e.toLowerCase()}class Vs{constructor(n,t){this.attribute=t,this.property=n}}Vs.prototype.attribute="";Vs.prototype.booleanish=!1;Vs.prototype.boolean=!1;Vs.prototype.commaOrSpaceSeparated=!1;Vs.prototype.commaSeparated=!1;Vs.prototype.defined=!1;Vs.prototype.mustUseProperty=!1;Vs.prototype.number=!1;Vs.prototype.overloadedBoolean=!1;Vs.prototype.property="";Vs.prototype.spaceSeparated=!1;Vs.prototype.space=void 0;let NQe=0;const Bt=Nc(),jr=Nc(),Fb=Nc(),Ue=Nc(),In=Nc(),fc=Nc(),li=Nc();function Nc(){return 2**++NQe}const Ub=Object.freeze(Object.defineProperty({__proto__:null,boolean:Bt,booleanish:jr,commaOrSpaceSeparated:li,commaSeparated:fc,number:Ue,overloadedBoolean:Fb,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),iv=Object.keys(Ub);class Gx extends Vs{constructor(n,t,r,s){let a=-1;if(super(n,t),CS(this,"space",s),typeof r=="number")for(;++a4&&t.slice(0,4)==="data"&&MQe.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(ES,DQe);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!ES.test(a)){let o=a.replace(jQe,RQe);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}s=Gx}return new s(r,n)}function RQe(e){return"-"+e.toLowerCase()}function DQe(e){return e.charAt(1).toUpperCase()}const JN=GN([VN,zQe,YN,XN,ZN],"html"),Gp=GN([VN,AQe,YN,XN,ZN],"svg");function NS(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function LQe(e){return e.join(" ").trim()}var fu={},av,zS;function OQe(){if(zS)return av;zS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` -`,d="/",_="*",f="",m="comment",g="declaration";function S(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var x=1,y=1;function C(V){var X=V.match(n);X&&(x+=X.length);var W=V.lastIndexOf(c);y=~W?V.length-W:y+V.length}function z(){var V={line:x,column:y};return function(X){return X.position=new E(V),D(),X}}function E(V){this.start=V,this.end={line:x,column:y},this.source=v.source}E.prototype.content=b;function j(V){var X=new Error(v.source+":"+x+":"+y+": "+V);if(X.reason=V,X.filename=v.source,X.line=x,X.column=y,X.source=b,!v.silent)throw X}function A(V){var X=V.exec(b);if(X){var W=X[0];return C(W),b=b.slice(W.length),X}}function D(){A(t)}function O(V){var X;for(V=V||[];X=P();)X!==!1&&V.push(X);return V}function P(){var V=z();if(!(d!=b.charAt(0)||_!=b.charAt(1))){for(var X=2;f!=b.charAt(X)&&(_!=b.charAt(X)||d!=b.charAt(X+1));)++X;if(X+=2,f===b.charAt(X-1))return j("End of comment missing");var W=b.slice(2,X-2);return y+=2,C(W),b=b.slice(X),y+=2,V({type:m,comment:W})}}function $(){var V=z(),X=A(r);if(X){if(P(),!A(s))return j("property missing ':'");var W=A(a),Z=V({type:g,property:k(X[0].replace(e,f)),value:W?k(W[0].replace(e,f)):f});return A(o),Z}}function F(){var V=[];O(V);for(var X;X=$();)X!==!1&&(V.push(X),O(V));return V}return D(),F()}function k(b){return b?b.replace(l,f):f}return av=S,av}var AS;function IQe(){if(AS)return fu;AS=1;var e=fu&&fu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(fu,"__esModule",{value:!0}),fu.default=t;const n=e(OQe());function t(r,s){let a=null;if(!r||typeof r!="string")return a;const o=(0,n.default)(r),l=typeof s=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:_}=c;l?s(d,_,c):_&&(a=a||{},a[d]=_)}),a}return fu}var cf={},TS;function BQe(){if(TS)return cf;TS=1,Object.defineProperty(cf,"__esModule",{value:!0}),cf.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||t.test(d)||e.test(d)},o=function(d,_){return _.toUpperCase()},l=function(d,_){return"".concat(_,"-")},c=function(d,_){return _===void 0&&(_={}),a(d)?d:(d=d.toLowerCase(),_.reactCompat?d=d.replace(s,l):d=d.replace(r,l),d.replace(n,o))};return cf.camelCase=c,cf}var uf,jS;function $Qe(){if(jS)return uf;jS=1;var e=uf&&uf.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(IQe()),t=BQe();function r(s,a){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(l,c){l&&c&&(o[(0,t.camelCase)(l,a)]=c)}),o}return r.default=r,uf=r,uf}var HQe=$Qe();const PQe=mh(HQe),Vx={}.hasOwnProperty,FQe=new Map,UQe=/[A-Z]/g,qQe=new Set(["table","tbody","thead","tfoot","tr"]),GQe=new Set(["td","th"]),ez="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function tz(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=JQe(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=QQe(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"?Gp:JN,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=nz(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function nz(e,n,t){if(n.type==="element")return VQe(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return WQe(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return YQe(e,n,t);if(n.type==="mdxjsEsm")return KQe(e,n);if(n.type==="root")return XQe(e,n,t);if(n.type==="text")return ZQe(e,n)}function VQe(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Gp,e.schema=s),e.ancestors.push(n);const a=sz(e,n.tagName,!1),o=eJe(e,n);let l=Kx(e,n);return qQe.has(n.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!EQe(c):!0})),rz(e,o,a,n),Wx(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function WQe(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)}Pf(e,n.position)}function KQe(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Pf(e,n.position)}function YQe(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Gp,e.schema=s),e.ancestors.push(n);const a=n.name===null?e.Fragment:sz(e,n.name,!0),o=tJe(e,n),l=Kx(e,n);return rz(e,o,a,n),Wx(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function XQe(e,n,t){const r={};return Wx(r,Kx(e,n)),e.create(n,e.Fragment,r,t)}function ZQe(e,n){return n.value}function rz(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Wx(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function QQe(e,n,t){return r;function r(s,a,o,l){const d=Array.isArray(o.children)?t:n;return l?d(a,o,l):d(a,o)}}function JQe(e,n){return t;function t(r,s,a,o){const l=Array.isArray(a.children),c=Ox(r);return n(s,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function eJe(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&Vx.call(n.properties,s)){const a=nJe(e,s,n.properties[s]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&GQe.has(n.tagName)?r=l:t[o]=l}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function tJe(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else Pf(e,n.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Pf(e,n.position);else a=r.value===null?!0:r.value;t[s]=a}return t}function Kx(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:FQe;for(;++ry.key).filter(y=>y!==void 0));let d=0;for(;d=e.children.length-_&&(E=s.length-(e.children.length-y)),E>=0&&(z=((v=s[E])==null?void 0:v.key)??z);z&&c.has(z)&&((x=s[E])==null?void 0:x.key)!==z;)z=`${z}+`;z&&c.add(z);const j=iz(C,s[E]??null,t,z);a.push(j),j.react!==void 0&&o.push(j.react)}const f=n!==null&&uJe(e,n.node);if(n&&n.key===r&&f&&s.length===a.length&&a.every((y,C)=>y===s[C]))return n;const m=e.type==="element"&&oJe.has(e.tagName)?o.filter(y=>typeof y!="string"||!lJe.test(y)):o,g=m.length>0?m.length===1?m[0]:m:null;let S=f?n==null?void 0:n.shell:null;if(!S){const y=tz({...e,children:[]},t);S={props:y.props,type:y.type}}return{children:a,key:r,node:e,react:h.jsx(S.type,{...S.props,children:g},r),shell:S}}function uJe(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:a,position:o,...l}=n;return zf(s,l)}function Tu(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 o=0;os?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(fi(e,e.length,0,n),e):n}const DS={}.hasOwnProperty;function oz(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 Zi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function en(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return on(c)?(e.enter(t),l(c)):n(c)}function l(c){return on(c)&&a++o))return;const j=n.events.length;let A=j,D,O;for(;A--;)if(n.events[A][0]==="exit"&&n.events[A][1].type==="chunkFlow"){if(D){O=n.events[A][1].end;break}D=!0}for(v(r),E=j;Ey;){const z=t[C];n.containerState=z[1],z[0].exit.call(n,e)}t.length=y}function x(){s.write([null]),a=void 0,s=void 0,n.containerState._closeFlow=void 0}}function bJe(e,n,t){return en(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gu(e){if(e===null||Bn(e)||gc(e))return 1;if(Fp(e))return 2}function Vp(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},m={...e[t][1].start};OS(f,-c),OS(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[t][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Mi(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Mi(d,[["enter",s,n],["enter",o,n],["exit",o,n],["enter",a,n]]),d=Mi(d,Vp(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Mi(d,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,d=Mi(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,fi(e,r-1,t-r+3,d),t=r+d.length-_-2;break}}for(t=-1;++t0&&on(E)?en(e,x,"linePrefix",a+1)(E):x(E)}function x(E){return E===null||ht(E)?e.check(IS,k,C)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||ht(E)?(e.exit("codeFlowValue"),x(E)):(e.consume(E),y)}function C(E){return e.exit("codeFenced"),n(E)}function z(E,j,A){let D=0;return O;function O(X){return E.enter("lineEnding"),E.consume(X),E.exit("lineEnding"),P}function P(X){return E.enter("codeFencedFence"),on(X)?en(E,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):$(X)}function $(X){return X===l?(E.enter("codeFencedFenceSequence"),F(X)):A(X)}function F(X){return X===l?(D++,E.consume(X),F):D>=o?(E.exit("codeFencedFenceSequence"),on(X)?en(E,V,"whitespace")(X):V(X)):A(X)}function V(X){return X===null||ht(X)?(E.exit("codeFencedFence"),j(X)):A(X)}}}function jJe(e,n,t){const r=this;return s;function s(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const ov={name:"codeIndented",tokenize:RJe},MJe={partial:!0,tokenize:DJe};function RJe(e,n,t){const r=this;return s;function s(d){return e.enter("codeIndented"),en(e,a,"linePrefix",5)(d)}function a(d){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?o(d):t(d)}function o(d){return d===null?c(d):ht(d)?e.attempt(MJe,o,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||ht(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),n(d)}}function DJe(e,n,t){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?t(o):ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):en(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):ht(o)?s(o):t(o)}}const LJe={name:"codeText",previous:IJe,resolve:OJe,tokenize:BJe};function OJe(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 a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&df(this.left,r),a.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),df(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),df(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(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function hz(e,n,t,r,s,a,o,l,c){const d=c||Number.POSITIVE_INFINITY;let _=0;return f;function f(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),m):v===null||v===32||v===41||rp(v)?t(v):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),k(v))}function m(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===62?(e.exit("chunkString"),e.exit(l),m(v)):v===null||v===60||ht(v)?t(v):(e.consume(v),v===92?S:g)}function S(v){return v===60||v===62||v===92?(e.consume(v),g):g(v)}function k(v){return!_&&(v===null||v===41||Bn(v))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),n(v)):_999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(e.exit(a),e.enter(s),e.consume(g),e.exit(s),e.exit(r),n):ht(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||ht(g)||l++>999?(e.exit("chunkString"),_(g)):(e.consume(g),c||(c=!on(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}}function pz(e,n,t,r,s,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),o=m===40?41:m,c):t(m)}function c(m){return m===o?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):(e.enter(a),d(m))}function d(m){return m===o?(e.exit(a),c(o)):m===null?t(m):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),en(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===o||m===null||ht(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:_)}function f(m){return m===o||m===92?(e.consume(m),_):_(m)}}function Af(e,n){let t;return r;function r(s){return ht(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):on(s)?en(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const VJe={name:"definition",tokenize:KJe},WJe={partial:!0,tokenize:YJe};function KJe(e,n,t){const r=this;let s;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return _z.call(r,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return s=Zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):t(g)}function c(g){return Bn(g)?Af(e,d)(g):d(g)}function d(g){return hz(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function _(g){return e.attempt(WJe,f,f)(g)}function f(g){return on(g)?en(e,m,"whitespace")(g):m(g)}function m(g){return g===null||ht(g)?(e.exit("definition"),r.parser.defined.push(s),n(g)):t(g)}}function YJe(e,n,t){return r;function r(l){return Bn(l)?Af(e,s)(l):t(l)}function s(l){return pz(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return on(l)?en(e,o,"whitespace")(l):o(l)}function o(l){return l===null||ht(l)?n(l):t(l)}}const XJe={name:"hardBreakEscape",tokenize:ZJe};function ZJe(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return ht(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const QJe={name:"headingAtx",resolve:JJe,tokenize:eet};function JJe(e,n){let t=e.length-2,r=3,s,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},fi(e,r,t-r+1,[["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n]])),e}function eet(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),a(_)}function a(_){return e.enter("atxHeadingSequence"),o(_)}function o(_){return _===35&&r++<6?(e.consume(_),o):_===null||Bn(_)?(e.exit("atxHeadingSequence"),l(_)):t(_)}function l(_){return _===35?(e.enter("atxHeadingSequence"),c(_)):_===null||ht(_)?(e.exit("atxHeading"),n(_)):on(_)?en(e,l,"whitespace")(_):(e.enter("atxHeadingText"),d(_))}function c(_){return _===35?(e.consume(_),c):(e.exit("atxHeadingSequence"),l(_))}function d(_){return _===null||_===35||Bn(_)?(e.exit("atxHeadingText"),l(_)):(e.consume(_),d)}}const tet=["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"],$S=["pre","script","style","textarea"],net={concrete:!0,name:"htmlFlow",resolveTo:iet,tokenize:aet},ret={partial:!0,tokenize:cet},set={partial:!0,tokenize:oet};function iet(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 aet(e,n,t){const r=this;let s,a,o,l,c;return d;function d(G){return _(G)}function _(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),f}function f(G){return G===33?(e.consume(G),m):G===47?(e.consume(G),a=!0,k):G===63?(e.consume(G),s=3,r.interrupt?n:L):Ns(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function m(G){return G===45?(e.consume(G),s=2,g):G===91?(e.consume(G),s=5,l=0,S):Ns(G)?(e.consume(G),s=4,r.interrupt?n:L):t(G)}function g(G){return G===45?(e.consume(G),r.interrupt?n:L):t(G)}function S(G){const re="CDATA[";return G===re.charCodeAt(l++)?(e.consume(G),l===re.length?r.interrupt?n:$:S):t(G)}function k(G){return Ns(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function b(G){if(G===null||G===47||G===62||Bn(G)){const re=G===47,he=o.toLowerCase();return!re&&!a&&$S.includes(he)?(s=1,r.interrupt?n(G):$(G)):tet.includes(o.toLowerCase())?(s=6,re?(e.consume(G),v):r.interrupt?n(G):$(G)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):a?x(G):y(G))}return G===45||_s(G)?(e.consume(G),o+=String.fromCharCode(G),b):t(G)}function v(G){return G===62?(e.consume(G),r.interrupt?n:$):t(G)}function x(G){return on(G)?(e.consume(G),x):O(G)}function y(G){return G===47?(e.consume(G),O):G===58||G===95||Ns(G)?(e.consume(G),C):on(G)?(e.consume(G),y):O(G)}function C(G){return G===45||G===46||G===58||G===95||_s(G)?(e.consume(G),C):z(G)}function z(G){return G===61?(e.consume(G),E):on(G)?(e.consume(G),z):y(G)}function E(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(e.consume(G),c=G,j):on(G)?(e.consume(G),E):A(G)}function j(G){return G===c?(e.consume(G),c=null,D):G===null||ht(G)?t(G):(e.consume(G),j)}function A(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||Bn(G)?z(G):(e.consume(G),A)}function D(G){return G===47||G===62||on(G)?y(G):t(G)}function O(G){return G===62?(e.consume(G),P):t(G)}function P(G){return G===null||ht(G)?$(G):on(G)?(e.consume(G),P):t(G)}function $(G){return G===45&&s===2?(e.consume(G),W):G===60&&s===1?(e.consume(G),Z):G===62&&s===4?(e.consume(G),B):G===63&&s===3?(e.consume(G),L):G===93&&s===5?(e.consume(G),H):ht(G)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(ret,Y,F)(G)):G===null||ht(G)?(e.exit("htmlFlowData"),F(G)):(e.consume(G),$)}function F(G){return e.check(set,V,Y)(G)}function V(G){return e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),X}function X(G){return G===null||ht(G)?F(G):(e.enter("htmlFlowData"),$(G))}function W(G){return G===45?(e.consume(G),L):$(G)}function Z(G){return G===47?(e.consume(G),o="",J):$(G)}function J(G){if(G===62){const re=o.toLowerCase();return $S.includes(re)?(e.consume(G),B):$(G)}return Ns(G)&&o.length<8?(e.consume(G),o+=String.fromCharCode(G),J):$(G)}function H(G){return G===93?(e.consume(G),L):$(G)}function L(G){return G===62?(e.consume(G),B):G===45&&s===2?(e.consume(G),L):$(G)}function B(G){return G===null||ht(G)?(e.exit("htmlFlowData"),Y(G)):(e.consume(G),B)}function Y(G){return e.exit("htmlFlow"),n(G)}}function oet(e,n,t){const r=this;return s;function s(o){return ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function cet(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Sh,n,t)}}const uet={name:"htmlText",tokenize:det};function det(e,n,t){const r=this;let s,a,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),d):L===47?(e.consume(L),z):L===63?(e.consume(L),y):Ns(L)?(e.consume(L),A):t(L)}function d(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),a=0,S):Ns(L)?(e.consume(L),x):t(L)}function _(L){return L===45?(e.consume(L),g):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),m):ht(L)?(o=f,Z(L)):(e.consume(L),f)}function m(L){return L===45?(e.consume(L),g):f(L)}function g(L){return L===62?W(L):L===45?m(L):f(L)}function S(L){const B="CDATA[";return L===B.charCodeAt(a++)?(e.consume(L),a===B.length?k:S):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),b):ht(L)?(o=k,Z(L)):(e.consume(L),k)}function b(L){return L===93?(e.consume(L),v):k(L)}function v(L){return L===62?W(L):L===93?(e.consume(L),v):k(L)}function x(L){return L===null||L===62?W(L):ht(L)?(o=x,Z(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):ht(L)?(o=y,Z(L)):(e.consume(L),y)}function C(L){return L===62?W(L):y(L)}function z(L){return Ns(L)?(e.consume(L),E):t(L)}function E(L){return L===45||_s(L)?(e.consume(L),E):j(L)}function j(L){return ht(L)?(o=j,Z(L)):on(L)?(e.consume(L),j):W(L)}function A(L){return L===45||_s(L)?(e.consume(L),A):L===47||L===62||Bn(L)?D(L):t(L)}function D(L){return L===47?(e.consume(L),W):L===58||L===95||Ns(L)?(e.consume(L),O):ht(L)?(o=D,Z(L)):on(L)?(e.consume(L),D):W(L)}function O(L){return L===45||L===46||L===58||L===95||_s(L)?(e.consume(L),O):P(L)}function P(L){return L===61?(e.consume(L),$):ht(L)?(o=P,Z(L)):on(L)?(e.consume(L),P):D(L)}function $(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,F):ht(L)?(o=$,Z(L)):on(L)?(e.consume(L),$):(e.consume(L),V)}function F(L){return L===s?(e.consume(L),s=void 0,X):L===null?t(L):ht(L)?(o=F,Z(L)):(e.consume(L),F)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||Bn(L)?D(L):(e.consume(L),V)}function X(L){return L===47||L===62||Bn(L)?D(L):t(L)}function W(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 on(L)?en(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):H(L)}function H(L){return e.enter("htmlTextData"),o(L)}}const Xx={name:"labelEnd",resolveAll:pet,resolveTo:met,tokenize:get},fet={tokenize:vet},het={tokenize:bet},_et={tokenize:xet};function pet(e){let n=-1;const t=[];for(;++n=3&&(d===null||ht(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===s?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),on(d)?en(e,l,"whitespace")(d):l(d))}}const Ps={continuation:{tokenize:jet},exit:Ret,name:"list",tokenize:Tet},zet={partial:!0,tokenize:Det},Aet={partial:!0,tokenize:Met};function Tet(e,n,t){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Ob(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(j0,t,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return t(g)}function c(g){return Ob(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):t(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Sh,r.interrupt?t:_,e.attempt(zet,m,f))}function _(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function f(g){return on(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function jet(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Sh,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,en(e,n,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!on(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Aet,n,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,en(e,e.attempt(Ps,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Met(e,n,t){const r=this;return en(e,s,"listItemIndent",r.containerState.size+1);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(a):t(a)}}function Ret(e){e.exit(this.containerState.type)}function Det(e,n,t){const r=this;return en(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const o=r.events[r.events.length-1];return!on(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const HS={name:"setextUnderline",resolveTo:Let,tokenize:Oet};function Let(e,n){let t=e.length,r,s,a;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),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",o,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Oet(e,n,t){const r=this;let s;return a;function a(d){let _=r.events.length,f;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){f=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=d,o(d)):t(d)}function o(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===s?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),on(d)?en(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ht(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const Iet={tokenize:Bet};function Bet(e){const n=this,t=e.attempt(Sh,r,e.attempt(this.parser.constructs.flowInitial,s,en(e,e.attempt(this.parser.constructs.flow,s,e.attempt(PJe,s)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const $et={resolveAll:gz()},Het=mz("string"),Pet=mz("text");function mz(e){return{resolveAll:gz(e==="text"?Fet:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],a=t.attempt(s,o,l);return o;function o(_){return d(_)?a(_):l(_)}function l(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),c}function c(_){return d(_)?(t.exit("data"),a(_)):(t.consume(_),c)}function d(_){if(_===null)return!0;const f=s[_];let m=-1;if(f)for(;++m-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[s].slice(0,a))}return o}function ttt(e,n){let t=-1;const r=[];let s;for(;++t"u"||e.call(d,m)},o=function(d,_){t&&_.name==="__proto__"?t(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},l=function(d,_){if(_==="__proto__")if(e.call(d,_)){if(r)return r(d,_).value}else return;return d[_]};return J1=function c(){var d,_,f,m,g,S,k=arguments[0],b=1,v=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},b=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});bo.length;let c;l&&o.push(s);try{c=e.apply(this,o)}catch(d){const _=d;if(l&&t)throw _;return s(_)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(o,...l){t||(t=!0,n(o,...l))}function a(o){s(null,o)}}function Af(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xS(e.position):"start"in e||"end"in e?xS(e):"line"in e||"column"in e?Fb(e):""}function Fb(e){return yS(e&&e.line)+":"+yS(e&&e.column)}function xS(e){return Fb(e&&e.start)+"-"+Fb(e&&e.end)}function yS(e){return e&&typeof e=="number"?e:1}class gs extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?s=n:!a.cause&&n&&(o=!0,s=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Af(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gs.prototype.file="";gs.prototype.name="";gs.prototype.reason="";gs.prototype.message="";gs.prototype.stack="";gs.prototype.column=void 0;gs.prototype.line=void 0;gs.prototype.ancestors=void 0;gs.prototype.cause=void 0;gs.prototype.fatal=void 0;gs.prototype.place=void 0;gs.prototype.ruleId=void 0;gs.prototype.source=void 0;const ba={basename:get,dirname:vet,extname:bet,join:xet,sep:"/"};function get(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Sh(e);let t=0,r=-1,s=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,l=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else o<0&&(a=!0,o=s+1),l>-1&&(e.codePointAt(s)===n.codePointAt(l--)?l<0&&(r=s):(l=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function vet(e){if(Sh(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 bet(e){Sh(e);let n=e.length,t=-1,r=0,s=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?s<0?s=n:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||t<0||a===0||a===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function xet(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function wet(e,n){let t="",r=0,s=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o2){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=o,a=0;continue}}else if(t.length>0){t="",r=0,s=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,o):t=e.slice(s+1,o),r=o-s-1;s=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Sh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ket={cwd:Cet};function Cet(){return"/"}function Ub(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Eet(e){if(typeof e=="string")e=new URL(e);else if(!Ub(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 Net(e)}function Net(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[g,...S]=_;const k=r[m][1];Pb(k)&&Pb(g)&&(g=ev(!0,k,g)),r[m]=[d,g,...S]}}}}const Yx=new Kx().freeze();function sv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function iv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function av(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 SS(e){if(!Pb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kS(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function e0(e){return jet(e)?e:new rz(e)}function jet(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Met(e){return typeof e=="string"||Ret(e)}function Ret(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var CS=Object.prototype.hasOwnProperty;function ES(e,n,t){for(t of e.keys())if(Tf(t,n))return t}function Tf(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--&&Tf(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=ES(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=ES(n,s),!s)||!Tf(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(CS.call(e,t)&&++r&&!CS.call(n,t)||!(t in n)||!Tf(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function NS(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=t.length,a=!0);const o=t.slice(s,r).trim();(o||!a)&&n.push(o),s=r+1,r=t.indexOf(",",s)}return n}function Det(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Let=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Oet=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Iet={};function zS(e,n){return(Iet.jsx?Oet:Let).test(e)}const Bet=/[ \t\n\f\r]/g;function $et(e){return typeof e=="object"?e.type==="text"?AS(e.value):!1:AS(e)}function AS(e){return e.replace(Bet,"")===""}class kh{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}kh.prototype.normal={};kh.prototype.property={};kh.prototype.space=void 0;function sz(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new kh(t,r,n)}function Ff(e){return e.toLowerCase()}class Ks{constructor(n,t){this.attribute=t,this.property=n}}Ks.prototype.attribute="";Ks.prototype.booleanish=!1;Ks.prototype.boolean=!1;Ks.prototype.commaOrSpaceSeparated=!1;Ks.prototype.commaSeparated=!1;Ks.prototype.defined=!1;Ks.prototype.mustUseProperty=!1;Ks.prototype.number=!1;Ks.prototype.overloadedBoolean=!1;Ks.prototype.property="";Ks.prototype.spaceSeparated=!1;Ks.prototype.space=void 0;let Het=0;const Bt=zc(),Ar=zc(),qb=zc(),Ue=zc(),In=zc(),hc=zc(),ui=zc();function zc(){return 2**++Het}const Gb=Object.freeze(Object.defineProperty({__proto__:null,boolean:Bt,booleanish:Ar,commaOrSpaceSeparated:ui,commaSeparated:hc,number:Ue,overloadedBoolean:qb,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),ov=Object.keys(Gb);class Xx extends Ks{constructor(n,t,r,s){let a=-1;if(super(n,t),TS(this,"space",s),typeof r=="number")for(;++a4&&t.slice(0,4)==="data"&&Get.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(jS,Wet);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!jS.test(a)){let o=a.replace(qet,Vet);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}s=Xx}return new s(r,n)}function Vet(e){return"-"+e.toLowerCase()}function Wet(e){return e.charAt(1).toUpperCase()}const fz=sz([iz,Pet,lz,cz,uz],"html"),Wp=sz([iz,Fet,lz,cz,uz],"svg");function MS(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Ket(e){return e.join(" ").trim()}var mu={},lv,RS;function Yet(){if(RS)return lv;RS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` +`,d="/",_="*",f="",m="comment",g="declaration";function S(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var x=1,y=1;function C(V){var X=V.match(n);X&&(x+=X.length);var W=V.lastIndexOf(c);y=~W?V.length-W:y+V.length}function A(){var V={line:x,column:y};return function(X){return X.position=new E(V),D(),X}}function E(V){this.start=V,this.end={line:x,column:y},this.source=v.source}E.prototype.content=b;function j(V){var X=new Error(v.source+":"+x+":"+y+": "+V);if(X.reason=V,X.filename=v.source,X.line=x,X.column=y,X.source=b,!v.silent)throw X}function T(V){var X=V.exec(b);if(X){var W=X[0];return C(W),b=b.slice(W.length),X}}function D(){T(t)}function I(V){var X;for(V=V||[];X=P();)X!==!1&&V.push(X);return V}function P(){var V=A();if(!(d!=b.charAt(0)||_!=b.charAt(1))){for(var X=2;f!=b.charAt(X)&&(_!=b.charAt(X)||d!=b.charAt(X+1));)++X;if(X+=2,f===b.charAt(X-1))return j("End of comment missing");var W=b.slice(2,X-2);return y+=2,C(W),b=b.slice(X),y+=2,V({type:m,comment:W})}}function H(){var V=A(),X=T(r);if(X){if(P(),!T(s))return j("property missing ':'");var W=T(a),Z=V({type:g,property:k(X[0].replace(e,f)),value:W?k(W[0].replace(e,f)):f});return T(o),Z}}function F(){var V=[];I(V);for(var X;X=H();)X!==!1&&(V.push(X),I(V));return V}return D(),F()}function k(b){return b?b.replace(l,f):f}return lv=S,lv}var DS;function Xet(){if(DS)return mu;DS=1;var e=mu&&mu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mu,"__esModule",{value:!0}),mu.default=t;const n=e(Yet());function t(r,s){let a=null;if(!r||typeof r!="string")return a;const o=(0,n.default)(r),l=typeof s=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:_}=c;l?s(d,_,c):_&&(a=a||{},a[d]=_)}),a}return mu}var df={},LS;function Zet(){if(LS)return df;LS=1,Object.defineProperty(df,"__esModule",{value:!0}),df.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||t.test(d)||e.test(d)},o=function(d,_){return _.toUpperCase()},l=function(d,_){return"".concat(_,"-")},c=function(d,_){return _===void 0&&(_={}),a(d)?d:(d=d.toLowerCase(),_.reactCompat?d=d.replace(s,l):d=d.replace(r,l),d.replace(n,o))};return df.camelCase=c,df}var ff,OS;function Qet(){if(OS)return ff;OS=1;var e=ff&&ff.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(Xet()),t=Zet();function r(s,a){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(l,c){l&&c&&(o[(0,t.camelCase)(l,a)]=c)}),o}return r.default=r,ff=r,ff}var Jet=Qet();const ett=vh(Jet),Zx={}.hasOwnProperty,ttt=new Map,ntt=/[A-Z]/g,rtt=new Set(["table","tbody","thead","tfoot","tr"]),stt=new Set(["td","th"]),hz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _z(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=ftt(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=dtt(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"?Wp:fz,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=pz(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function pz(e,n,t){if(n.type==="element")return itt(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return att(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ltt(e,n,t);if(n.type==="mdxjsEsm")return ott(e,n);if(n.type==="root")return ctt(e,n,t);if(n.type==="text")return utt(e,n)}function itt(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Wp,e.schema=s),e.ancestors.push(n);const a=gz(e,n.tagName,!1),o=htt(e,n);let l=Jx(e,n);return rtt.has(n.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!$et(c):!0})),mz(e,o,a,n),Qx(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function att(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)}Uf(e,n.position)}function ott(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Uf(e,n.position)}function ltt(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Wp,e.schema=s),e.ancestors.push(n);const a=n.name===null?e.Fragment:gz(e,n.name,!0),o=_tt(e,n),l=Jx(e,n);return mz(e,o,a,n),Qx(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function ctt(e,n,t){const r={};return Qx(r,Jx(e,n)),e.create(n,e.Fragment,r,t)}function utt(e,n){return n.value}function mz(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Qx(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function dtt(e,n,t){return r;function r(s,a,o,l){const d=Array.isArray(o.children)?t:n;return l?d(a,o,l):d(a,o)}}function ftt(e,n){return t;function t(r,s,a,o){const l=Array.isArray(a.children),c=Px(r);return n(s,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function htt(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&Zx.call(n.properties,s)){const a=ptt(e,s,n.properties[s]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&stt.has(n.tagName)?r=l:t[o]=l}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function _tt(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else Uf(e,n.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Uf(e,n.position);else a=r.value===null?!0:r.value;t[s]=a}return t}function Jx(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:ttt;for(;++ry.key).filter(y=>y!==void 0));let d=0;for(;d=e.children.length-_&&(E=s.length-(e.children.length-y)),E>=0&&(A=((v=s[E])==null?void 0:v.key)??A);A&&c.has(A)&&((x=s[E])==null?void 0:x.key)!==A;)A=`${A}+`;A&&c.add(A);const j=vz(C,s[E]??null,t,A);a.push(j),j.react!==void 0&&o.push(j.react)}const f=n!==null&&Stt(e,n.node);if(n&&n.key===r&&f&&s.length===a.length&&a.every((y,C)=>y===s[C]))return n;const m=e.type==="element"&&xtt.has(e.tagName)?o.filter(y=>typeof y!="string"||!ytt.test(y)):o,g=m.length>0?m.length===1?m[0]:m:null;let S=f?n==null?void 0:n.shell:null;if(!S){const y=_z({...e,children:[]},t);S={props:y.props,type:y.type}}return{children:a,key:r,node:e,react:h.jsx(S.type,{...S.props,children:g},r),shell:S}}function Stt(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:a,position:o,...l}=n;return Tf(s,l)}function Du(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 o=0;os?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(hi(e,e.length,0,n),e):n}const $S={}.hasOwnProperty;function xz(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 Zi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function tn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return on(c)?(e.enter(t),l(c)):n(c)}function l(c){return on(c)&&a++o))return;const j=n.events.length;let T=j,D,I;for(;T--;)if(n.events[T][0]==="exit"&&n.events[T][1].type==="chunkFlow"){if(D){I=n.events[T][1].end;break}D=!0}for(v(r),E=j;Ey;){const A=t[C];n.containerState=A[1],A[0].exit.call(n,e)}t.length=y}function x(){s.write([null]),a=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Mtt(e,n,t){return tn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yu(e){if(e===null||Bn(e)||vc(e))return 1;if(qp(e))return 2}function Kp(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},m={...e[t][1].start};PS(f,-c),PS(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[t][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Mi(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Mi(d,[["enter",s,n],["enter",o,n],["exit",o,n],["enter",a,n]]),d=Mi(d,Kp(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Mi(d,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,d=Mi(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,hi(e,r-1,t-r+3,d),t=r+d.length-_-2;break}}for(t=-1;++t0&&on(E)?tn(e,x,"linePrefix",a+1)(E):x(E)}function x(E){return E===null||ht(E)?e.check(FS,k,C)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||ht(E)?(e.exit("codeFlowValue"),x(E)):(e.consume(E),y)}function C(E){return e.exit("codeFenced"),n(E)}function A(E,j,T){let D=0;return I;function I(X){return E.enter("lineEnding"),E.consume(X),E.exit("lineEnding"),P}function P(X){return E.enter("codeFencedFence"),on(X)?tn(E,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):H(X)}function H(X){return X===l?(E.enter("codeFencedFenceSequence"),F(X)):T(X)}function F(X){return X===l?(D++,E.consume(X),F):D>=o?(E.exit("codeFencedFenceSequence"),on(X)?tn(E,V,"whitespace")(X):V(X)):T(X)}function V(X){return X===null||ht(X)?(E.exit("codeFencedFence"),j(X)):T(X)}}}function qtt(e,n,t){const r=this;return s;function s(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const cv={name:"codeIndented",tokenize:Vtt},Gtt={partial:!0,tokenize:Wtt};function Vtt(e,n,t){const r=this;return s;function s(d){return e.enter("codeIndented"),tn(e,a,"linePrefix",5)(d)}function a(d){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?o(d):t(d)}function o(d){return d===null?c(d):ht(d)?e.attempt(Gtt,o,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||ht(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),n(d)}}function Wtt(e,n,t){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?t(o):ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):tn(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):ht(o)?s(o):t(o)}}const Ktt={name:"codeText",previous:Xtt,resolve:Ytt,tokenize:Ztt};function Ytt(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 a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&hf(this.left,r),a.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),hf(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),hf(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(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Ez(e,n,t,r,s,a,o,l,c){const d=c||Number.POSITIVE_INFINITY;let _=0;return f;function f(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),m):v===null||v===32||v===41||sp(v)?t(v):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),k(v))}function m(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===62?(e.exit("chunkString"),e.exit(l),m(v)):v===null||v===60||ht(v)?t(v):(e.consume(v),v===92?S:g)}function S(v){return v===60||v===62||v===92?(e.consume(v),g):g(v)}function k(v){return!_&&(v===null||v===41||Bn(v))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),n(v)):_999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(e.exit(a),e.enter(s),e.consume(g),e.exit(s),e.exit(r),n):ht(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||ht(g)||l++>999?(e.exit("chunkString"),_(g)):(e.consume(g),c||(c=!on(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}}function zz(e,n,t,r,s,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),o=m===40?41:m,c):t(m)}function c(m){return m===o?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):(e.enter(a),d(m))}function d(m){return m===o?(e.exit(a),c(o)):m===null?t(m):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),tn(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===o||m===null||ht(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:_)}function f(m){return m===o||m===92?(e.consume(m),_):_(m)}}function jf(e,n){let t;return r;function r(s){return ht(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):on(s)?tn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const int={name:"definition",tokenize:ont},ant={partial:!0,tokenize:lnt};function ont(e,n,t){const r=this;let s;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return Nz.call(r,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return s=Zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):t(g)}function c(g){return Bn(g)?jf(e,d)(g):d(g)}function d(g){return Ez(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function _(g){return e.attempt(ant,f,f)(g)}function f(g){return on(g)?tn(e,m,"whitespace")(g):m(g)}function m(g){return g===null||ht(g)?(e.exit("definition"),r.parser.defined.push(s),n(g)):t(g)}}function lnt(e,n,t){return r;function r(l){return Bn(l)?jf(e,s)(l):t(l)}function s(l){return zz(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return on(l)?tn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||ht(l)?n(l):t(l)}}const cnt={name:"hardBreakEscape",tokenize:unt};function unt(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return ht(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const dnt={name:"headingAtx",resolve:fnt,tokenize:hnt};function fnt(e,n){let t=e.length-2,r=3,s,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},hi(e,r,t-r+1,[["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n]])),e}function hnt(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),a(_)}function a(_){return e.enter("atxHeadingSequence"),o(_)}function o(_){return _===35&&r++<6?(e.consume(_),o):_===null||Bn(_)?(e.exit("atxHeadingSequence"),l(_)):t(_)}function l(_){return _===35?(e.enter("atxHeadingSequence"),c(_)):_===null||ht(_)?(e.exit("atxHeading"),n(_)):on(_)?tn(e,l,"whitespace")(_):(e.enter("atxHeadingText"),d(_))}function c(_){return _===35?(e.consume(_),c):(e.exit("atxHeadingSequence"),l(_))}function d(_){return _===null||_===35||Bn(_)?(e.exit("atxHeadingText"),l(_)):(e.consume(_),d)}}const _nt=["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"],qS=["pre","script","style","textarea"],pnt={concrete:!0,name:"htmlFlow",resolveTo:vnt,tokenize:bnt},mnt={partial:!0,tokenize:ynt},gnt={partial:!0,tokenize:xnt};function vnt(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 bnt(e,n,t){const r=this;let s,a,o,l,c;return d;function d(G){return _(G)}function _(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),f}function f(G){return G===33?(e.consume(G),m):G===47?(e.consume(G),a=!0,k):G===63?(e.consume(G),s=3,r.interrupt?n:L):Ns(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function m(G){return G===45?(e.consume(G),s=2,g):G===91?(e.consume(G),s=5,l=0,S):Ns(G)?(e.consume(G),s=4,r.interrupt?n:L):t(G)}function g(G){return G===45?(e.consume(G),r.interrupt?n:L):t(G)}function S(G){const re="CDATA[";return G===re.charCodeAt(l++)?(e.consume(G),l===re.length?r.interrupt?n:H:S):t(G)}function k(G){return Ns(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function b(G){if(G===null||G===47||G===62||Bn(G)){const re=G===47,oe=o.toLowerCase();return!re&&!a&&qS.includes(oe)?(s=1,r.interrupt?n(G):H(G)):_nt.includes(o.toLowerCase())?(s=6,re?(e.consume(G),v):r.interrupt?n(G):H(G)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):a?x(G):y(G))}return G===45||ps(G)?(e.consume(G),o+=String.fromCharCode(G),b):t(G)}function v(G){return G===62?(e.consume(G),r.interrupt?n:H):t(G)}function x(G){return on(G)?(e.consume(G),x):I(G)}function y(G){return G===47?(e.consume(G),I):G===58||G===95||Ns(G)?(e.consume(G),C):on(G)?(e.consume(G),y):I(G)}function C(G){return G===45||G===46||G===58||G===95||ps(G)?(e.consume(G),C):A(G)}function A(G){return G===61?(e.consume(G),E):on(G)?(e.consume(G),A):y(G)}function E(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(e.consume(G),c=G,j):on(G)?(e.consume(G),E):T(G)}function j(G){return G===c?(e.consume(G),c=null,D):G===null||ht(G)?t(G):(e.consume(G),j)}function T(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||Bn(G)?A(G):(e.consume(G),T)}function D(G){return G===47||G===62||on(G)?y(G):t(G)}function I(G){return G===62?(e.consume(G),P):t(G)}function P(G){return G===null||ht(G)?H(G):on(G)?(e.consume(G),P):t(G)}function H(G){return G===45&&s===2?(e.consume(G),W):G===60&&s===1?(e.consume(G),Z):G===62&&s===4?(e.consume(G),$):G===63&&s===3?(e.consume(G),L):G===93&&s===5?(e.consume(G),B):ht(G)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(mnt,K,F)(G)):G===null||ht(G)?(e.exit("htmlFlowData"),F(G)):(e.consume(G),H)}function F(G){return e.check(gnt,V,K)(G)}function V(G){return e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),X}function X(G){return G===null||ht(G)?F(G):(e.enter("htmlFlowData"),H(G))}function W(G){return G===45?(e.consume(G),L):H(G)}function Z(G){return G===47?(e.consume(G),o="",J):H(G)}function J(G){if(G===62){const re=o.toLowerCase();return qS.includes(re)?(e.consume(G),$):H(G)}return Ns(G)&&o.length<8?(e.consume(G),o+=String.fromCharCode(G),J):H(G)}function B(G){return G===93?(e.consume(G),L):H(G)}function L(G){return G===62?(e.consume(G),$):G===45&&s===2?(e.consume(G),L):H(G)}function $(G){return G===null||ht(G)?(e.exit("htmlFlowData"),K(G)):(e.consume(G),$)}function K(G){return e.exit("htmlFlow"),n(G)}}function xnt(e,n,t){const r=this;return s;function s(o){return ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function ynt(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ch,n,t)}}const wnt={name:"htmlText",tokenize:Snt};function Snt(e,n,t){const r=this;let s,a,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),d):L===47?(e.consume(L),A):L===63?(e.consume(L),y):Ns(L)?(e.consume(L),T):t(L)}function d(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),a=0,S):Ns(L)?(e.consume(L),x):t(L)}function _(L){return L===45?(e.consume(L),g):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),m):ht(L)?(o=f,Z(L)):(e.consume(L),f)}function m(L){return L===45?(e.consume(L),g):f(L)}function g(L){return L===62?W(L):L===45?m(L):f(L)}function S(L){const $="CDATA[";return L===$.charCodeAt(a++)?(e.consume(L),a===$.length?k:S):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),b):ht(L)?(o=k,Z(L)):(e.consume(L),k)}function b(L){return L===93?(e.consume(L),v):k(L)}function v(L){return L===62?W(L):L===93?(e.consume(L),v):k(L)}function x(L){return L===null||L===62?W(L):ht(L)?(o=x,Z(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):ht(L)?(o=y,Z(L)):(e.consume(L),y)}function C(L){return L===62?W(L):y(L)}function A(L){return Ns(L)?(e.consume(L),E):t(L)}function E(L){return L===45||ps(L)?(e.consume(L),E):j(L)}function j(L){return ht(L)?(o=j,Z(L)):on(L)?(e.consume(L),j):W(L)}function T(L){return L===45||ps(L)?(e.consume(L),T):L===47||L===62||Bn(L)?D(L):t(L)}function D(L){return L===47?(e.consume(L),W):L===58||L===95||Ns(L)?(e.consume(L),I):ht(L)?(o=D,Z(L)):on(L)?(e.consume(L),D):W(L)}function I(L){return L===45||L===46||L===58||L===95||ps(L)?(e.consume(L),I):P(L)}function P(L){return L===61?(e.consume(L),H):ht(L)?(o=P,Z(L)):on(L)?(e.consume(L),P):D(L)}function H(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,F):ht(L)?(o=H,Z(L)):on(L)?(e.consume(L),H):(e.consume(L),V)}function F(L){return L===s?(e.consume(L),s=void 0,X):L===null?t(L):ht(L)?(o=F,Z(L)):(e.consume(L),F)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||Bn(L)?D(L):(e.consume(L),V)}function X(L){return L===47||L===62||Bn(L)?D(L):t(L)}function W(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 on(L)?tn(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),o(L)}}const ty={name:"labelEnd",resolveAll:Nnt,resolveTo:znt,tokenize:Ant},knt={tokenize:Tnt},Cnt={tokenize:jnt},Ent={tokenize:Mnt};function Nnt(e){let n=-1;const t=[];for(;++n=3&&(d===null||ht(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===s?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),on(d)?tn(e,l,"whitespace")(d):l(d))}}const Fs={continuation:{tokenize:Fnt},exit:qnt,name:"list",tokenize:Pnt},$nt={partial:!0,tokenize:Gnt},Hnt={partial:!0,tokenize:Unt};function Pnt(e,n,t){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Bb(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(M0,t,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return t(g)}function c(g){return Bb(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):t(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Ch,r.interrupt?t:_,e.attempt($nt,m,f))}function _(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function f(g){return on(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function Fnt(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ch,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tn(e,n,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!on(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Hnt,n,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,tn(e,e.attempt(Fs,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Unt(e,n,t){const r=this;return tn(e,s,"listItemIndent",r.containerState.size+1);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(a):t(a)}}function qnt(e){e.exit(this.containerState.type)}function Gnt(e,n,t){const r=this;return tn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const o=r.events[r.events.length-1];return!on(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const GS={name:"setextUnderline",resolveTo:Vnt,tokenize:Wnt};function Vnt(e,n){let t=e.length,r,s,a;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),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",o,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Wnt(e,n,t){const r=this;let s;return a;function a(d){let _=r.events.length,f;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){f=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=d,o(d)):t(d)}function o(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===s?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),on(d)?tn(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ht(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const Knt={tokenize:Ynt};function Ynt(e){const n=this,t=e.attempt(Ch,r,e.attempt(this.parser.constructs.flowInitial,s,tn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(ent,s)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Xnt={resolveAll:Tz()},Znt=Az("string"),Qnt=Az("text");function Az(e){return{resolveAll:Tz(e==="text"?Jnt:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],a=t.attempt(s,o,l);return o;function o(_){return d(_)?a(_):l(_)}function l(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),c}function c(_){return d(_)?(t.exit("data"),a(_)):(t.consume(_),c)}function d(_){if(_===null)return!0;const f=s[_];let m=-1;if(f)for(;++m-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[s].slice(0,a))}return o}function frt(e,n){let t=-1;const r=[];let s;for(;++t0){const Ht=We.tokenStack[We.tokenStack.length-1];(Ht[1]||FS).call(We,void 0,Ht[0])}for(je.position={start:ul(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:ul(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt0&&(ss(this,gl,Zn(this,gl)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=US(t)),Zn(this,gl)+Stt(t,r)}}gl=new WeakMap;const ftt=new Set(["*","**","_","__"]);function US(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;t0){const Ht=We.tokenStack[We.tokenStack.length-1];(Ht[1]||WS).call(We,void 0,Ht[0])}for(je.position={start:cl(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:cl(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt0&&(rs(this,ml,Zn(this,ml)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=KS(t)),Zn(this,ml)+Drt(t,r)}}ml=new WeakMap;const Srt=new Set(["*","**","_","__"]);function KS(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(wtt(n)){qS(n,t,r);continue}const a=gtt(n,e,t);if(a>t){t=a-1;continue}const o=vtt(n,e,t);if(o>t){t=o-1;continue}Qi(e,t)||qS(n,t,r)}return n}function htt(e,n,t){const r=n[t];return r==="`"?_tt(e,n,t):r==="$"?ptt(e,n,t):r==="~"?mtt(e,n,t):t}function _tt(e,n,t){const r=Qx(n,t),s="`".repeat(r),a=e.exclusive;return(a==null?void 0:a.kind)==="fence"?(a.token[0]==="`"&&op(n,t)&&!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):(a==null?void 0:a.kind)==="code"?(!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):a||Qi(n,t)?t+r:r>=3&&op(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function ptt(e,n,t){const r=Qx(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Qi(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function mtt(e,n,t){const r=Qx(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(op(n,t)&&!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!op(n,t)||Qi(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function gtt(e,n,t){if(n[t]!=="<"||Qi(n,t))return t;const r=n[t+1];if(r!==void 0&&!wz(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function vtt(e,n,t){const r=btt(n,t);if(!r)return t;if(Qi(n,t))return t+r.length;const s=e.delims.findLastIndex(a=>a.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):(xtt(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function btt(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 xtt(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!WS(s)||!WS(r)}function qS(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 ytt(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 wtt(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function Stt(e,n){n.pendingHtml!==null&&(e=e.slice(0,Ett(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return ma(ktt(e,t));const r=Ctt(n);if(r)return ma(Eu(e,r));const s=Att(n);return s?s.kind==="delim"?ma(Gb(e,s.start,s.token.length)?xz(e,s.token):e.slice(0,s.start)):Gb(e,s.start,s.token.length)?s.kind==="fence"?ma(e):s.kind==="code"?ma(Eu(e,s.token)):s.token==="$$"?ma(Eu(e,(e.endsWith(` +`){Mrt(n),n.exclusive||(n.commitIndex=t+1);continue}const s=krt(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(Rrt(n)){YS(n,t,r);continue}const a=zrt(n,e,t);if(a>t){t=a-1;continue}const o=Art(n,e,t);if(o>t){t=o-1;continue}Qi(e,t)||YS(n,t,r)}return n}function krt(e,n,t){const r=n[t];return r==="`"?Crt(e,n,t):r==="$"?Ert(e,n,t):r==="~"?Nrt(e,n,t):t}function Crt(e,n,t){const r=ry(n,t),s="`".repeat(r),a=e.exclusive;return(a==null?void 0:a.kind)==="fence"?(a.token[0]==="`"&&lp(n,t)&&!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):(a==null?void 0:a.kind)==="code"?(!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):a||Qi(n,t)?t+r:r>=3&&lp(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Ert(e,n,t){const r=ry(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Qi(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function Nrt(e,n,t){const r=ry(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(lp(n,t)&&!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!lp(n,t)||Qi(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function zrt(e,n,t){if(n[t]!=="<"||Qi(n,t))return t;const r=n[t+1];if(r!==void 0&&!Lz(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function Art(e,n,t){const r=Trt(n,t);if(!r)return t;if(Qi(n,t))return t+r.length;const s=e.delims.findLastIndex(a=>a.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):(jrt(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Trt(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 jrt(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!QS(s)||!QS(r)}function YS(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 Mrt(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 Rrt(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function Drt(e,n){n.pendingHtml!==null&&(e=e.slice(0,Irt(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return ga(Lrt(e,t));const r=Ort(n);if(r)return ga(Tu(e,r));const s=Hrt(n);return s?s.kind==="delim"?ga(Wb(e,s.start,s.token.length)?Rz(e,s.token):e.slice(0,s.start)):Wb(e,s.start,s.token.length)?s.kind==="fence"?ga(e):s.kind==="code"?ga(Tu(e,s.token)):s.token==="$$"?ga(Tu(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?ma(e):ma(Eu(e,"$")):ma(s.kind==="fence"?e:e.slice(0,s.start)):ma(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function ktt(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return Gb(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 Ctt(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(!ftt.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function Ett(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!Ntt(e,s,r))break;t=s,r=s}return t}function Ntt(e,n,t){if(e[t-1]!==">"||Qi(e,n))return!1;const r=e[n+1];if(r!==void 0&&!wz(r))return!1;for(let s=n+1;s"||a===` -`)return!1}return!0}function ma(e){var b;const n=e.lastIndexOf(` +`)+"$$")):/\s/.test(e[e.length-1]??"")?ga(e):ga(Tu(e,"$")):ga(s.kind==="fence"?e:e.slice(0,s.start)):ga(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function Lrt(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return Wb(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 Ort(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(!Srt.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function Irt(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!Brt(e,s,r))break;t=s,r=s}return t}function Brt(e,n,t){if(e[t-1]!==">"||Qi(e,n))return!1;const r=e[n+1];if(r!==void 0&&!Lz(r))return!1;for(let s=n+1;s"||a===` +`)return!1}return!0}function ga(e){var b;const n=e.lastIndexOf(` `),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),a=s.indexOf(` -`),o=a===-1?s:s.slice(0,a),l=(b=o.match(/^( *)\|/))==null?void 0:b[1];if(l===void 0)return e;if(GS(o)<2&&!Ttt(o,l))return r;const c=o.trimEnd().endsWith("|")?o:xz(o," |"),d=GS(c),_=d<2?0:c.trimEnd().endsWith("|")?d-1:d;if(_===0)return e;const f=a===-1?"":s.slice(a+1),m=VS(l,Array.from({length:_},()=>"-"));if(f.length===0)return r+c+` +`),o=a===-1?s:s.slice(0,a),l=(b=o.match(/^( *)\|/))==null?void 0:b[1];if(l===void 0)return e;if(XS(o)<2&&!Prt(o,l))return r;const c=o.trimEnd().endsWith("|")?o:Rz(o," |"),d=XS(c),_=d<2?0:c.trimEnd().endsWith("|")?d-1:d;if(_===0)return e;const f=a===-1?"":s.slice(a+1),m=ZS(l,Array.from({length:_},()=>"-"));if(f.length===0)return r+c+` `+m;const g=f.indexOf(` -`),S=g===-1?f:f.slice(0,g),k=g===-1?"":f.slice(g);if(jtt(S,l,_))return e;if(S.startsWith(l+"|")&&/^[ |:\-\t]*$/.test(S.slice(l.length))){const v=yz(S,l).map(x=>{const y=x.trim();if(y.length===0)return"-";let C=0;for(let z=0;z1&&y.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+c+` -`+VS(l,v)+k}return r+c+` +`),S=g===-1?f:f.slice(0,g),k=g===-1?"":f.slice(g);if(Frt(S,l,_))return e;if(S.startsWith(l+"|")&&/^[ |:\-\t]*$/.test(S.slice(l.length))){const v=Dz(S,l).map(x=>{const y=x.trim();if(y.length===0)return"-";let C=0;for(let A=0;A1&&y.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+c+` +`+ZS(l,v)+k}return r+c+` `+m+` -`+f}function Eu(e,n){return e+n.slice(ztt(e,n))}function xz(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Eu(e,n);const r=e.slice(0,-t.length);return Eu(r,n)+t}function ztt(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 Att(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 GS(e){let n=0;for(let t=0;t0}function VS(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function yz(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function jtt(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=yz(r,"").map(a=>a.trim());return s.length===t&&s.every(a=>/^:?-+:?$/.test(a))}function Qx(e,n){let t=n+1;for(;tn+t}function op(e,n){return n===0||e[n-1]===` -`}function Qi(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function WS(e){return!!e&&/[A-Za-z0-9]/.test(e)}function wz(e){return!!e&&/[A-Za-z]/.test(e)}const Sz=qx().use(Zx);var dh,Bu,$u,cc,Hu,fh,hh,_h,uc,ph,dc;class Mtt{constructor(){oi(this,dh,Sz);oi(this,Bu,null);oi(this,$u,{});oi(this,cc,null);oi(this,Hu,"");oi(this,fh,[]);oi(this,hh,[]);oi(this,_h,[]);oi(this,uc,0);oi(this,ph,[]);oi(this,dc,[])}reconfigure(n,t,r){Zn(this,Bu)!==null&&Zn(this,dh)===n&&kz(Zn(this,$u),r)&&!!Zn(this,cc)===t||(ss(this,dh,n),n.attachers.some(s=>s[0]===ap)||(n=n(),n.use(ap),n.freeze()),ss(this,Bu,n),ss(this,$u,r),ss(this,Hu,""),ss(this,fh,[]),ss(this,hh,[]),ss(this,_h,[]),ss(this,uc,0),ss(this,ph,[]),ss(this,cc,t?new dtt:null))}update(n){Zn(this,cc)&&(n=Zn(this,cc).update(n));let t=Zn(this,Hu);if(n===t)return Zn(this,dc);const r=Zn(this,fh),s=Rtt(n,t);let a=r.length-1;for(;a>=0&&!(s>=r[a]);a-=1);let o=r[a]??0;a===-1&&(a=0);const l=Ql(Zn(this,Bu)),c=Zn(this,hh),d=c.slice(a).some(E=>E.some(Vb));let _=l.parse(n.slice(o)),f=_.children.map(E=>Ql(Ql(E.position).start.offset)+o);ss(this,Hu,n),X1(r.length===c.length),r.splice(a,r.length-a,...f);{const E=cv(_,f,o);X1(E.length===f.length),c.splice(a,c.length-a,...E)}if(d||Vb(_)){a=0,o=0,_=l.parse(n),f=_.children.map(j=>Ql(Ql(j.position).start.offset)+o),r.splice(0,r.length,...f);const E=cv(_,f,o);X1(E.length===f.length),c.splice(0,c.length,...E)}const m=cv(l.runSync(_),f,o),g=Zn(this,_h),S=Zn(this,ph),k=Zn(this,dc),b=S.length;let v=null,x=0;for(;xb&&(g.length=S.length=r.length);for(let E=r.length=C?D=b-(r.length-j):j=b){g[j]=String(Zn(this,uc)),ss(this,uc,Zn(this,uc)+1),S[j]=null,v&&(v[j]=void 0);continue}g[j]=g[D]??String(Q3(this,uc)._++),S[j]=S[D]??null,v&&(v[j]=k[D])}r.length[]);let s=0;for(const o of e.children){const l=(a=o.position)==null?void 0:a.start.offset;if(l!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||Htt.test(e.slice(0,n))?e:""}const ZS=/[#.]/g;function Vtt(e,n){const t=e||"",r={};let s=0,a,o;for(;sd&&(d=_):_&&(d!==void 0&&d>-1&&c.push(` -`.repeat(d)||" "),d=-1,c.push(_))}return c.join("")}function jz(e,n,t){return e.type==="element"?_nt(e,n,t):e.type==="text"?t.whitespace==="normal"?Mz(e,t):pnt(e):[]}function _nt(e,n,t){const r=Rz(e,t),s=e.children||[];let a=-1,o=[];if(fnt(e))return o;let l,c;for(Kb(e)||s8(e)&&e8(n,e,s8)?c=` -`:dnt(e)?(l=2,c=2):Tz(e)&&(l=1,c=1);++a15?d="…"+l.slice(s-15,s):d=l.slice(0,s);var _;a+15e.replace(xnt,"-$1").toLowerCase(),wnt={"&":"&",">":">","<":"<",'"':""","'":"'"},Snt=/[&><"']/g,ps=e=>String(e).replace(Snt,n=>wnt[n]),M0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?M0(e.body[0]):e:e.type==="font"?M0(e.body):e,knt=new Set(["mathord","textord","atom"]),ko=e=>knt.has(M0(e).type),Cnt=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"},Yb={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 Ent(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 Nnt(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Ent(n)}function znt(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Nnt(r)}class ey{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(Yb)){var r=Yb[t];r&&znt(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 qe("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=Cnt(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class dl{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 xa[Ant[this.id]]}sub(){return xa[Tnt[this.id]]}fracNum(){return xa[jnt[this.id]]}fracDen(){return xa[Mnt[this.id]]}cramp(){return xa[Rnt[this.id]]}text(){return xa[Dnt[this.id]]}isTight(){return this.size>=2}}var ty=0,lp=1,ju=2,vo=3,Uf=4,Ri=5,Vu=6,zs=7,xa=[new dl(ty,0,!1),new dl(lp,0,!0),new dl(ju,1,!1),new dl(vo,1,!0),new dl(Uf,2,!1),new dl(Ri,2,!0),new dl(Vu,3,!1),new dl(zs,3,!0)],Ant=[Uf,Ri,Uf,Ri,Vu,zs,Vu,zs],Tnt=[Ri,Ri,Ri,Ri,zs,zs,zs,zs],jnt=[ju,vo,Uf,Ri,Vu,zs,Vu,zs],Mnt=[vo,vo,Ri,Ri,zs,zs,zs,zs],Rnt=[lp,lp,vo,vo,Ri,Ri,zs,zs],Dnt=[ty,lp,ju,vo,ju,vo,ju,vo],$t={DISPLAY:xa[ty],TEXT:xa[ju],SCRIPT:xa[Uf],SCRIPTSCRIPT:xa[Vu]},Xb=[{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 Lnt(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var R0=[];Xb.forEach(e=>e.blocks.forEach(n=>R0.push(...n)));function Dz(e){for(var n=0;n=R0[n]&&e<=R0[n+1])return!0;return!1}var Ur=e=>e+" "+e,hu=80,Ont=function(n,t){return"M95,"+(622+n+t)+` +`+f}function Tu(e,n){return e+n.slice($rt(e,n))}function Rz(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Tu(e,n);const r=e.slice(0,-t.length);return Tu(r,n)+t}function $rt(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 Hrt(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 XS(e){let n=0;for(let t=0;t0}function ZS(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function Dz(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function Frt(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=Dz(r,"").map(a=>a.trim());return s.length===t&&s.every(a=>/^:?-+:?$/.test(a))}function ry(e,n){let t=n+1;for(;tn+t}function lp(e,n){return n===0||e[n-1]===` +`}function Qi(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function QS(e){return!!e&&/[A-Za-z0-9]/.test(e)}function Lz(e){return!!e&&/[A-Za-z]/.test(e)}const Oz=Yx().use(ny);var hh,Fu,Uu,uc,qu,_h,ph,mh,dc,gh,fc;class Urt{constructor(){ci(this,hh,Oz);ci(this,Fu,null);ci(this,Uu,{});ci(this,uc,null);ci(this,qu,"");ci(this,_h,[]);ci(this,ph,[]);ci(this,mh,[]);ci(this,dc,0);ci(this,gh,[]);ci(this,fc,[])}reconfigure(n,t,r){Zn(this,Fu)!==null&&Zn(this,hh)===n&&Iz(Zn(this,Uu),r)&&!!Zn(this,uc)===t||(rs(this,hh,n),n.attachers.some(s=>s[0]===op)||(n=n(),n.use(op),n.freeze()),rs(this,Fu,n),rs(this,Uu,r),rs(this,qu,""),rs(this,_h,[]),rs(this,ph,[]),rs(this,mh,[]),rs(this,dc,0),rs(this,gh,[]),rs(this,uc,t?new wrt:null))}update(n){Zn(this,uc)&&(n=Zn(this,uc).update(n));let t=Zn(this,qu);if(n===t)return Zn(this,fc);const r=Zn(this,_h),s=qrt(n,t);let a=r.length-1;for(;a>=0&&!(s>=r[a]);a-=1);let o=r[a]??0;a===-1&&(a=0);const l=Jl(Zn(this,Fu)),c=Zn(this,ph),d=c.slice(a).some(E=>E.some(Kb));let _=l.parse(n.slice(o)),f=_.children.map(E=>Jl(Jl(E.position).start.offset)+o);rs(this,qu,n),Q1(r.length===c.length),r.splice(a,r.length-a,...f);{const E=dv(_,f,o);Q1(E.length===f.length),c.splice(a,c.length-a,...E)}if(d||Kb(_)){a=0,o=0,_=l.parse(n),f=_.children.map(j=>Jl(Jl(j.position).start.offset)+o),r.splice(0,r.length,...f);const E=dv(_,f,o);Q1(E.length===f.length),c.splice(0,c.length,...E)}const m=dv(l.runSync(_),f,o),g=Zn(this,mh),S=Zn(this,gh),k=Zn(this,fc),b=S.length;let v=null,x=0;for(;xb&&(g.length=S.length=r.length);for(let E=r.length=C?D=b-(r.length-j):j=b){g[j]=String(Zn(this,dc)),rs(this,dc,Zn(this,dc)+1),S[j]=null,v&&(v[j]=void 0);continue}g[j]=g[D]??String(r6(this,dc)._++),S[j]=S[D]??null,v&&(v[j]=k[D])}r.length[]);let s=0;for(const o of e.children){const l=(a=o.position)==null?void 0:a.start.offset;if(l!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||Zrt.test(e.slice(0,n))?e:""}const nk=/[#.]/g;function rst(e,n){const t=e||"",r={};let s=0,a,o;for(;sd&&(d=_):_&&(d!==void 0&&d>-1&&c.push(` +`.repeat(d)||" "),d=-1,c.push(_))}return c.join("")}function qz(e,n,t){return e.type==="element"?Cst(e,n,t):e.type==="text"?t.whitespace==="normal"?Gz(e,t):Est(e):[]}function Cst(e,n,t){const r=Vz(e,t),s=e.children||[];let a=-1,o=[];if(Sst(e))return o;let l,c;for(Xb(e)||ck(e)&&ik(n,e,ck)?c=` +`:wst(e)?(l=2,c=2):Uz(e)&&(l=1,c=1);++a15?d="…"+l.slice(s-15,s):d=l.slice(0,s);var _;a+15e.replace(jst,"-$1").toLowerCase(),Rst={"&":"&",">":">","<":"<",'"':""","'":"'"},Dst=/[&><"']/g,ms=e=>String(e).replace(Dst,n=>Rst[n]),R0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?R0(e.body[0]):e:e.type==="font"?R0(e.body):e,Lst=new Set(["mathord","textord","atom"]),Co=e=>Lst.has(R0(e).type),Ost=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"},Zb={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 Ist(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 Bst(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Ist(n)}function $st(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Bst(r)}class iy{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(Zb)){var r=Zb[t];r&&$st(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 qe("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=Ost(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class ul{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 ya[Hst[this.id]]}sub(){return ya[Pst[this.id]]}fracNum(){return ya[Fst[this.id]]}fracDen(){return ya[Ust[this.id]]}cramp(){return ya[qst[this.id]]}text(){return ya[Gst[this.id]]}isTight(){return this.size>=2}}var ay=0,cp=1,Lu=2,bo=3,Gf=4,Ri=5,Xu=6,zs=7,ya=[new ul(ay,0,!1),new ul(cp,0,!0),new ul(Lu,1,!1),new ul(bo,1,!0),new ul(Gf,2,!1),new ul(Ri,2,!0),new ul(Xu,3,!1),new ul(zs,3,!0)],Hst=[Gf,Ri,Gf,Ri,Xu,zs,Xu,zs],Pst=[Ri,Ri,Ri,Ri,zs,zs,zs,zs],Fst=[Lu,bo,Gf,Ri,Xu,zs,Xu,zs],Ust=[bo,bo,Ri,Ri,zs,zs,zs,zs],qst=[cp,cp,bo,bo,Ri,Ri,zs,zs],Gst=[ay,cp,Lu,bo,Lu,bo,Lu,bo],$t={DISPLAY:ya[ay],TEXT:ya[Lu],SCRIPT:ya[Gf],SCRIPTSCRIPT:ya[Xu]},Qb=[{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 Vst(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var D0=[];Qb.forEach(e=>e.blocks.forEach(n=>D0.push(...n)));function Wz(e){for(var n=0;n=D0[n]&&e<=D0[n+1])return!0;return!1}var Fr=e=>e+" "+e,gu=80,Wst=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 @@ -651,7 +671,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"},Int=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"},Kst=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+` @@ -661,7 +681,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"},Bnt=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Yst=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 @@ -670,7 +690,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"},$nt=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},Xst=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 @@ -680,18 +700,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"},Hnt=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},Zst=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"},Pnt=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Fnt=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"},Qst=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Jst=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"},Unt=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Ont(t,hu);break;case"sqrtSize1":s=Int(t,hu);break;case"sqrtSize2":s=Bnt(t,hu);break;case"sqrtSize3":s=$nt(t,hu);break;case"sqrtSize4":s=Hnt(t,hu);break;case"sqrtTall":s=Fnt(t,hu,r)}return s},qnt=function(n,t){switch(n){case"⎜":return Ur("M291 0 H417 V"+t+" H291z");case"∣":return Ur("M145 0 H188 V"+t+" H145z");case"∥":return Ur("M145 0 H188 V"+t+" H145z")+Ur("M367 0 H410 V"+t+" H367z");case"⎟":return Ur("M457 0 H583 V"+t+" H457z");case"⎢":return Ur("M319 0 H403 V"+t+" H319z");case"⎥":return Ur("M263 0 H347 V"+t+" H263z");case"⎪":return Ur("M384 0 H504 V"+t+" H384z");case"⏐":return Ur("M312 0 H355 V"+t+" H312z");case"‖":return Ur("M257 0 H300 V"+t+" H257z")+Ur("M478 0 H521 V"+t+" H478z");default:return""}},i8={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},eit=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Wst(t,gu);break;case"sqrtSize1":s=Kst(t,gu);break;case"sqrtSize2":s=Yst(t,gu);break;case"sqrtSize3":s=Xst(t,gu);break;case"sqrtSize4":s=Zst(t,gu);break;case"sqrtTall":s=Jst(t,gu,r)}return s},tit=function(n,t){switch(n){case"⎜":return Fr("M291 0 H417 V"+t+" H291z");case"∣":return Fr("M145 0 H188 V"+t+" H145z");case"∥":return Fr("M145 0 H188 V"+t+" H145z")+Fr("M367 0 H410 V"+t+" H367z");case"⎟":return Fr("M457 0 H583 V"+t+" H457z");case"⎢":return Fr("M319 0 H403 V"+t+" H319z");case"⎥":return Fr("M263 0 H347 V"+t+" H263z");case"⎪":return Fr("M384 0 H504 V"+t+" H384z");case"⏐":return Fr("M312 0 H355 V"+t+" H312z");case"‖":return Fr("M257 0 H300 V"+t+" H257z")+Fr("M478 0 H521 V"+t+" H478z");default:return""}},uk={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 @@ -737,10 +757,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:Ur("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Ur("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Ur("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Ur("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Fr("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Fr("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Fr("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Fr("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:Ur("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Fr("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 @@ -789,7 +809,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:Ur("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Ur("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Ur("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:Fr("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Fr("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Fr("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 @@ -862,7 +882,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`},Gnt=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`},nit=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 @@ -890,82 +910,82 @@ 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 Vnt(e){return"toText"in e}class ld{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(Vnt(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var Zb={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},Wnt={ex:!0,em:!0,mu:!0},Lz=function(n){return typeof n!="string"&&(n=n.unit),n in Zb||n in Wnt||n==="ex"},ir=function(n,t){var r;if(n.unit in Zb)r=Zb[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 qe("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Ke=function(n){return+n.toFixed(4)+"em"},xl=function(n){return n.filter(t=>t).join(" ")},ny=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=ynt(r)+":"+s+";")}return t},Oz=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)}},Iz=function(n){var t=document.createElement(n);t.className=xl(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]/,Bz=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ps(xl(this.classes))+'"');var r=ny(this.style);r&&(t+=' style="'+ps(r)+'"');for(var s of Object.keys(this.attributes)){if(Knt.test(s))throw new qe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ps(this.attributes[s])+'"'}t+=">";for(var a=0;a",t};class cd{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,Oz.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return Iz.call(this,"span")}toMarkup(){return Bz.call(this,"span")}}class Wp{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,Oz.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 Iz.call(this,"a")}toMarkup(){return Bz.call(this,"a")}}class Ynt{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=''+ps(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Ke(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=xl(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:"+Ke(this.italic)+";"),r+=ny(this.style),r&&(n=!0,t+=' style="'+ps(r)+'"');var s=ps(this.text);return n?(t+=">",t+=s,t+="",t):s}}class yo{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 Qb{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 Jnt=e=>e instanceof cd||e instanceof Wp||e instanceof ld,Sa={"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]}},e0={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]},a8={Å:"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 ert(e,n){Sa[e]=n}function ry(e,n,t){if(!Sa[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Sa[n][r];if(!s&&e[0]in a8&&(r=a8[e[0]].charCodeAt(0),s=Sa[n][r]),!s&&t==="text"&&Dz(r)&&(s=Sa[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var fv={};function trt(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!fv[n]){var t=fv[n]={cssEmPerMu:e0.quad[n]/18};for(var r in e0)e0.hasOwnProperty(r)&&(t[r]=e0[r][n])}return fv[n]}var Qn={math:{},text:{}};function I(e,n,t,r,s,a){Qn[e][s]={font:n,group:t,replace:r},a&&r&&(Qn[e][r]=Qn[e][s])}var U="math",He="text",Q="main",ce="ams",er="accent-token",ot="bin",As="close",ud="inner",Ct="mathord",Dr="op-token",vi="open",kh="punct",de="rel",Co="spacing",pe="textord";I(U,Q,de,"≡","\\equiv",!0);I(U,Q,de,"≺","\\prec",!0);I(U,Q,de,"≻","\\succ",!0);I(U,Q,de,"∼","\\sim",!0);I(U,Q,de,"⊥","\\perp");I(U,Q,de,"⪯","\\preceq",!0);I(U,Q,de,"⪰","\\succeq",!0);I(U,Q,de,"≃","\\simeq",!0);I(U,Q,de,"∣","\\mid",!0);I(U,Q,de,"≪","\\ll",!0);I(U,Q,de,"≫","\\gg",!0);I(U,Q,de,"≍","\\asymp",!0);I(U,Q,de,"∥","\\parallel");I(U,Q,de,"⋈","\\bowtie",!0);I(U,Q,de,"⌣","\\smile",!0);I(U,Q,de,"⊑","\\sqsubseteq",!0);I(U,Q,de,"⊒","\\sqsupseteq",!0);I(U,Q,de,"≐","\\doteq",!0);I(U,Q,de,"⌢","\\frown",!0);I(U,Q,de,"∋","\\ni",!0);I(U,Q,de,"∝","\\propto",!0);I(U,Q,de,"⊢","\\vdash",!0);I(U,Q,de,"⊣","\\dashv",!0);I(U,Q,de,"∋","\\owns");I(U,Q,kh,".","\\ldotp");I(U,Q,kh,"⋅","\\cdotp");I(U,Q,kh,"⋅","·");I(He,Q,pe,"⋅","·");I(U,Q,pe,"#","\\#");I(He,Q,pe,"#","\\#");I(U,Q,pe,"&","\\&");I(He,Q,pe,"&","\\&");I(U,Q,pe,"ℵ","\\aleph",!0);I(U,Q,pe,"∀","\\forall",!0);I(U,Q,pe,"ℏ","\\hbar",!0);I(U,Q,pe,"∃","\\exists",!0);I(U,Q,pe,"∇","\\nabla",!0);I(U,Q,pe,"♭","\\flat",!0);I(U,Q,pe,"ℓ","\\ell",!0);I(U,Q,pe,"♮","\\natural",!0);I(U,Q,pe,"♣","\\clubsuit",!0);I(U,Q,pe,"℘","\\wp",!0);I(U,Q,pe,"♯","\\sharp",!0);I(U,Q,pe,"♢","\\diamondsuit",!0);I(U,Q,pe,"ℜ","\\Re",!0);I(U,Q,pe,"♡","\\heartsuit",!0);I(U,Q,pe,"ℑ","\\Im",!0);I(U,Q,pe,"♠","\\spadesuit",!0);I(U,Q,pe,"§","\\S",!0);I(He,Q,pe,"§","\\S");I(U,Q,pe,"¶","\\P",!0);I(He,Q,pe,"¶","\\P");I(U,Q,pe,"†","\\dag");I(He,Q,pe,"†","\\dag");I(He,Q,pe,"†","\\textdagger");I(U,Q,pe,"‡","\\ddag");I(He,Q,pe,"‡","\\ddag");I(He,Q,pe,"‡","\\textdaggerdbl");I(U,Q,As,"⎱","\\rmoustache",!0);I(U,Q,vi,"⎰","\\lmoustache",!0);I(U,Q,As,"⟯","\\rgroup",!0);I(U,Q,vi,"⟮","\\lgroup",!0);I(U,Q,ot,"∓","\\mp",!0);I(U,Q,ot,"⊖","\\ominus",!0);I(U,Q,ot,"⊎","\\uplus",!0);I(U,Q,ot,"⊓","\\sqcap",!0);I(U,Q,ot,"∗","\\ast");I(U,Q,ot,"⊔","\\sqcup",!0);I(U,Q,ot,"◯","\\bigcirc",!0);I(U,Q,ot,"∙","\\bullet",!0);I(U,Q,ot,"‡","\\ddagger");I(U,Q,ot,"≀","\\wr",!0);I(U,Q,ot,"⨿","\\amalg");I(U,Q,ot,"&","\\And");I(U,Q,de,"⟵","\\longleftarrow",!0);I(U,Q,de,"⇐","\\Leftarrow",!0);I(U,Q,de,"⟸","\\Longleftarrow",!0);I(U,Q,de,"⟶","\\longrightarrow",!0);I(U,Q,de,"⇒","\\Rightarrow",!0);I(U,Q,de,"⟹","\\Longrightarrow",!0);I(U,Q,de,"↔","\\leftrightarrow",!0);I(U,Q,de,"⟷","\\longleftrightarrow",!0);I(U,Q,de,"⇔","\\Leftrightarrow",!0);I(U,Q,de,"⟺","\\Longleftrightarrow",!0);I(U,Q,de,"↦","\\mapsto",!0);I(U,Q,de,"⟼","\\longmapsto",!0);I(U,Q,de,"↗","\\nearrow",!0);I(U,Q,de,"↩","\\hookleftarrow",!0);I(U,Q,de,"↪","\\hookrightarrow",!0);I(U,Q,de,"↘","\\searrow",!0);I(U,Q,de,"↼","\\leftharpoonup",!0);I(U,Q,de,"⇀","\\rightharpoonup",!0);I(U,Q,de,"↙","\\swarrow",!0);I(U,Q,de,"↽","\\leftharpoondown",!0);I(U,Q,de,"⇁","\\rightharpoondown",!0);I(U,Q,de,"↖","\\nwarrow",!0);I(U,Q,de,"⇌","\\rightleftharpoons",!0);I(U,ce,de,"≮","\\nless",!0);I(U,ce,de,"","\\@nleqslant");I(U,ce,de,"","\\@nleqq");I(U,ce,de,"⪇","\\lneq",!0);I(U,ce,de,"≨","\\lneqq",!0);I(U,ce,de,"","\\@lvertneqq");I(U,ce,de,"⋦","\\lnsim",!0);I(U,ce,de,"⪉","\\lnapprox",!0);I(U,ce,de,"⊀","\\nprec",!0);I(U,ce,de,"⋠","\\npreceq",!0);I(U,ce,de,"⋨","\\precnsim",!0);I(U,ce,de,"⪹","\\precnapprox",!0);I(U,ce,de,"≁","\\nsim",!0);I(U,ce,de,"","\\@nshortmid");I(U,ce,de,"∤","\\nmid",!0);I(U,ce,de,"⊬","\\nvdash",!0);I(U,ce,de,"⊭","\\nvDash",!0);I(U,ce,de,"⋪","\\ntriangleleft");I(U,ce,de,"⋬","\\ntrianglelefteq",!0);I(U,ce,de,"⊊","\\subsetneq",!0);I(U,ce,de,"","\\@varsubsetneq");I(U,ce,de,"⫋","\\subsetneqq",!0);I(U,ce,de,"","\\@varsubsetneqq");I(U,ce,de,"≯","\\ngtr",!0);I(U,ce,de,"","\\@ngeqslant");I(U,ce,de,"","\\@ngeqq");I(U,ce,de,"⪈","\\gneq",!0);I(U,ce,de,"≩","\\gneqq",!0);I(U,ce,de,"","\\@gvertneqq");I(U,ce,de,"⋧","\\gnsim",!0);I(U,ce,de,"⪊","\\gnapprox",!0);I(U,ce,de,"⊁","\\nsucc",!0);I(U,ce,de,"⋡","\\nsucceq",!0);I(U,ce,de,"⋩","\\succnsim",!0);I(U,ce,de,"⪺","\\succnapprox",!0);I(U,ce,de,"≆","\\ncong",!0);I(U,ce,de,"","\\@nshortparallel");I(U,ce,de,"∦","\\nparallel",!0);I(U,ce,de,"⊯","\\nVDash",!0);I(U,ce,de,"⋫","\\ntriangleright");I(U,ce,de,"⋭","\\ntrianglerighteq",!0);I(U,ce,de,"","\\@nsupseteqq");I(U,ce,de,"⊋","\\supsetneq",!0);I(U,ce,de,"","\\@varsupsetneq");I(U,ce,de,"⫌","\\supsetneqq",!0);I(U,ce,de,"","\\@varsupsetneqq");I(U,ce,de,"⊮","\\nVdash",!0);I(U,ce,de,"⪵","\\precneqq",!0);I(U,ce,de,"⪶","\\succneqq",!0);I(U,ce,de,"","\\@nsubseteqq");I(U,ce,ot,"⊴","\\unlhd");I(U,ce,ot,"⊵","\\unrhd");I(U,ce,de,"↚","\\nleftarrow",!0);I(U,ce,de,"↛","\\nrightarrow",!0);I(U,ce,de,"⇍","\\nLeftarrow",!0);I(U,ce,de,"⇏","\\nRightarrow",!0);I(U,ce,de,"↮","\\nleftrightarrow",!0);I(U,ce,de,"⇎","\\nLeftrightarrow",!0);I(U,ce,de,"△","\\vartriangle");I(U,ce,pe,"ℏ","\\hslash");I(U,ce,pe,"▽","\\triangledown");I(U,ce,pe,"◊","\\lozenge");I(U,ce,pe,"Ⓢ","\\circledS");I(U,ce,pe,"®","\\circledR");I(He,ce,pe,"®","\\circledR");I(U,ce,pe,"∡","\\measuredangle",!0);I(U,ce,pe,"∄","\\nexists");I(U,ce,pe,"℧","\\mho");I(U,ce,pe,"Ⅎ","\\Finv",!0);I(U,ce,pe,"⅁","\\Game",!0);I(U,ce,pe,"‵","\\backprime");I(U,ce,pe,"▲","\\blacktriangle");I(U,ce,pe,"▼","\\blacktriangledown");I(U,ce,pe,"■","\\blacksquare");I(U,ce,pe,"⧫","\\blacklozenge");I(U,ce,pe,"★","\\bigstar");I(U,ce,pe,"∢","\\sphericalangle",!0);I(U,ce,pe,"∁","\\complement",!0);I(U,ce,pe,"ð","\\eth",!0);I(He,Q,pe,"ð","ð");I(U,ce,pe,"╱","\\diagup");I(U,ce,pe,"╲","\\diagdown");I(U,ce,pe,"□","\\square");I(U,ce,pe,"□","\\Box");I(U,ce,pe,"◊","\\Diamond");I(U,ce,pe,"¥","\\yen",!0);I(He,ce,pe,"¥","\\yen",!0);I(U,ce,pe,"✓","\\checkmark",!0);I(He,ce,pe,"✓","\\checkmark");I(U,ce,pe,"ℶ","\\beth",!0);I(U,ce,pe,"ℸ","\\daleth",!0);I(U,ce,pe,"ℷ","\\gimel",!0);I(U,ce,pe,"ϝ","\\digamma",!0);I(U,ce,pe,"ϰ","\\varkappa");I(U,ce,vi,"┌","\\@ulcorner",!0);I(U,ce,As,"┐","\\@urcorner",!0);I(U,ce,vi,"└","\\@llcorner",!0);I(U,ce,As,"┘","\\@lrcorner",!0);I(U,ce,de,"≦","\\leqq",!0);I(U,ce,de,"⩽","\\leqslant",!0);I(U,ce,de,"⪕","\\eqslantless",!0);I(U,ce,de,"≲","\\lesssim",!0);I(U,ce,de,"⪅","\\lessapprox",!0);I(U,ce,de,"≊","\\approxeq",!0);I(U,ce,ot,"⋖","\\lessdot");I(U,ce,de,"⋘","\\lll",!0);I(U,ce,de,"≶","\\lessgtr",!0);I(U,ce,de,"⋚","\\lesseqgtr",!0);I(U,ce,de,"⪋","\\lesseqqgtr",!0);I(U,ce,de,"≑","\\doteqdot");I(U,ce,de,"≓","\\risingdotseq",!0);I(U,ce,de,"≒","\\fallingdotseq",!0);I(U,ce,de,"∽","\\backsim",!0);I(U,ce,de,"⋍","\\backsimeq",!0);I(U,ce,de,"⫅","\\subseteqq",!0);I(U,ce,de,"⋐","\\Subset",!0);I(U,ce,de,"⊏","\\sqsubset",!0);I(U,ce,de,"≼","\\preccurlyeq",!0);I(U,ce,de,"⋞","\\curlyeqprec",!0);I(U,ce,de,"≾","\\precsim",!0);I(U,ce,de,"⪷","\\precapprox",!0);I(U,ce,de,"⊲","\\vartriangleleft");I(U,ce,de,"⊴","\\trianglelefteq");I(U,ce,de,"⊨","\\vDash",!0);I(U,ce,de,"⊪","\\Vvdash",!0);I(U,ce,de,"⌣","\\smallsmile");I(U,ce,de,"⌢","\\smallfrown");I(U,ce,de,"≏","\\bumpeq",!0);I(U,ce,de,"≎","\\Bumpeq",!0);I(U,ce,de,"≧","\\geqq",!0);I(U,ce,de,"⩾","\\geqslant",!0);I(U,ce,de,"⪖","\\eqslantgtr",!0);I(U,ce,de,"≳","\\gtrsim",!0);I(U,ce,de,"⪆","\\gtrapprox",!0);I(U,ce,ot,"⋗","\\gtrdot");I(U,ce,de,"⋙","\\ggg",!0);I(U,ce,de,"≷","\\gtrless",!0);I(U,ce,de,"⋛","\\gtreqless",!0);I(U,ce,de,"⪌","\\gtreqqless",!0);I(U,ce,de,"≖","\\eqcirc",!0);I(U,ce,de,"≗","\\circeq",!0);I(U,ce,de,"≜","\\triangleq",!0);I(U,ce,de,"∼","\\thicksim");I(U,ce,de,"≈","\\thickapprox");I(U,ce,de,"⫆","\\supseteqq",!0);I(U,ce,de,"⋑","\\Supset",!0);I(U,ce,de,"⊐","\\sqsupset",!0);I(U,ce,de,"≽","\\succcurlyeq",!0);I(U,ce,de,"⋟","\\curlyeqsucc",!0);I(U,ce,de,"≿","\\succsim",!0);I(U,ce,de,"⪸","\\succapprox",!0);I(U,ce,de,"⊳","\\vartriangleright");I(U,ce,de,"⊵","\\trianglerighteq");I(U,ce,de,"⊩","\\Vdash",!0);I(U,ce,de,"∣","\\shortmid");I(U,ce,de,"∥","\\shortparallel");I(U,ce,de,"≬","\\between",!0);I(U,ce,de,"⋔","\\pitchfork",!0);I(U,ce,de,"∝","\\varpropto");I(U,ce,de,"◀","\\blacktriangleleft");I(U,ce,de,"∴","\\therefore",!0);I(U,ce,de,"∍","\\backepsilon");I(U,ce,de,"▶","\\blacktriangleright");I(U,ce,de,"∵","\\because",!0);I(U,ce,de,"⋘","\\llless");I(U,ce,de,"⋙","\\gggtr");I(U,ce,ot,"⊲","\\lhd");I(U,ce,ot,"⊳","\\rhd");I(U,ce,de,"≂","\\eqsim",!0);I(U,Q,de,"⋈","\\Join");I(U,ce,de,"≑","\\Doteq",!0);I(U,ce,ot,"∔","\\dotplus",!0);I(U,ce,ot,"∖","\\smallsetminus");I(U,ce,ot,"⋒","\\Cap",!0);I(U,ce,ot,"⋓","\\Cup",!0);I(U,ce,ot,"⩞","\\doublebarwedge",!0);I(U,ce,ot,"⊟","\\boxminus",!0);I(U,ce,ot,"⊞","\\boxplus",!0);I(U,ce,ot,"⋇","\\divideontimes",!0);I(U,ce,ot,"⋉","\\ltimes",!0);I(U,ce,ot,"⋊","\\rtimes",!0);I(U,ce,ot,"⋋","\\leftthreetimes",!0);I(U,ce,ot,"⋌","\\rightthreetimes",!0);I(U,ce,ot,"⋏","\\curlywedge",!0);I(U,ce,ot,"⋎","\\curlyvee",!0);I(U,ce,ot,"⊝","\\circleddash",!0);I(U,ce,ot,"⊛","\\circledast",!0);I(U,ce,ot,"⋅","\\centerdot");I(U,ce,ot,"⊺","\\intercal",!0);I(U,ce,ot,"⋒","\\doublecap");I(U,ce,ot,"⋓","\\doublecup");I(U,ce,ot,"⊠","\\boxtimes",!0);I(U,ce,de,"⇢","\\dashrightarrow",!0);I(U,ce,de,"⇠","\\dashleftarrow",!0);I(U,ce,de,"⇇","\\leftleftarrows",!0);I(U,ce,de,"⇆","\\leftrightarrows",!0);I(U,ce,de,"⇚","\\Lleftarrow",!0);I(U,ce,de,"↞","\\twoheadleftarrow",!0);I(U,ce,de,"↢","\\leftarrowtail",!0);I(U,ce,de,"↫","\\looparrowleft",!0);I(U,ce,de,"⇋","\\leftrightharpoons",!0);I(U,ce,de,"↶","\\curvearrowleft",!0);I(U,ce,de,"↺","\\circlearrowleft",!0);I(U,ce,de,"↰","\\Lsh",!0);I(U,ce,de,"⇈","\\upuparrows",!0);I(U,ce,de,"↿","\\upharpoonleft",!0);I(U,ce,de,"⇃","\\downharpoonleft",!0);I(U,Q,de,"⊶","\\origof",!0);I(U,Q,de,"⊷","\\imageof",!0);I(U,ce,de,"⊸","\\multimap",!0);I(U,ce,de,"↭","\\leftrightsquigarrow",!0);I(U,ce,de,"⇉","\\rightrightarrows",!0);I(U,ce,de,"⇄","\\rightleftarrows",!0);I(U,ce,de,"↠","\\twoheadrightarrow",!0);I(U,ce,de,"↣","\\rightarrowtail",!0);I(U,ce,de,"↬","\\looparrowright",!0);I(U,ce,de,"↷","\\curvearrowright",!0);I(U,ce,de,"↻","\\circlearrowright",!0);I(U,ce,de,"↱","\\Rsh",!0);I(U,ce,de,"⇊","\\downdownarrows",!0);I(U,ce,de,"↾","\\upharpoonright",!0);I(U,ce,de,"⇂","\\downharpoonright",!0);I(U,ce,de,"⇝","\\rightsquigarrow",!0);I(U,ce,de,"⇝","\\leadsto");I(U,ce,de,"⇛","\\Rrightarrow",!0);I(U,ce,de,"↾","\\restriction");I(U,Q,pe,"‘","`");I(U,Q,pe,"$","\\$");I(He,Q,pe,"$","\\$");I(He,Q,pe,"$","\\textdollar");I(U,Q,pe,"%","\\%");I(He,Q,pe,"%","\\%");I(U,Q,pe,"_","\\_");I(He,Q,pe,"_","\\_");I(He,Q,pe,"_","\\textunderscore");I(U,Q,pe,"∠","\\angle",!0);I(U,Q,pe,"∞","\\infty",!0);I(U,Q,pe,"′","\\prime");I(U,Q,pe,"△","\\triangle");I(U,Q,pe,"Γ","\\Gamma",!0);I(U,Q,pe,"Δ","\\Delta",!0);I(U,Q,pe,"Θ","\\Theta",!0);I(U,Q,pe,"Λ","\\Lambda",!0);I(U,Q,pe,"Ξ","\\Xi",!0);I(U,Q,pe,"Π","\\Pi",!0);I(U,Q,pe,"Σ","\\Sigma",!0);I(U,Q,pe,"Υ","\\Upsilon",!0);I(U,Q,pe,"Φ","\\Phi",!0);I(U,Q,pe,"Ψ","\\Psi",!0);I(U,Q,pe,"Ω","\\Omega",!0);I(U,Q,pe,"A","Α");I(U,Q,pe,"B","Β");I(U,Q,pe,"E","Ε");I(U,Q,pe,"Z","Ζ");I(U,Q,pe,"H","Η");I(U,Q,pe,"I","Ι");I(U,Q,pe,"K","Κ");I(U,Q,pe,"M","Μ");I(U,Q,pe,"N","Ν");I(U,Q,pe,"O","Ο");I(U,Q,pe,"P","Ρ");I(U,Q,pe,"T","Τ");I(U,Q,pe,"X","Χ");I(U,Q,pe,"¬","\\neg",!0);I(U,Q,pe,"¬","\\lnot");I(U,Q,pe,"⊤","\\top");I(U,Q,pe,"⊥","\\bot");I(U,Q,pe,"∅","\\emptyset");I(U,ce,pe,"∅","\\varnothing");I(U,Q,Ct,"α","\\alpha",!0);I(U,Q,Ct,"β","\\beta",!0);I(U,Q,Ct,"γ","\\gamma",!0);I(U,Q,Ct,"δ","\\delta",!0);I(U,Q,Ct,"ϵ","\\epsilon",!0);I(U,Q,Ct,"ζ","\\zeta",!0);I(U,Q,Ct,"η","\\eta",!0);I(U,Q,Ct,"θ","\\theta",!0);I(U,Q,Ct,"ι","\\iota",!0);I(U,Q,Ct,"κ","\\kappa",!0);I(U,Q,Ct,"λ","\\lambda",!0);I(U,Q,Ct,"μ","\\mu",!0);I(U,Q,Ct,"ν","\\nu",!0);I(U,Q,Ct,"ξ","\\xi",!0);I(U,Q,Ct,"ο","\\omicron",!0);I(U,Q,Ct,"π","\\pi",!0);I(U,Q,Ct,"ρ","\\rho",!0);I(U,Q,Ct,"σ","\\sigma",!0);I(U,Q,Ct,"τ","\\tau",!0);I(U,Q,Ct,"υ","\\upsilon",!0);I(U,Q,Ct,"ϕ","\\phi",!0);I(U,Q,Ct,"χ","\\chi",!0);I(U,Q,Ct,"ψ","\\psi",!0);I(U,Q,Ct,"ω","\\omega",!0);I(U,Q,Ct,"ε","\\varepsilon",!0);I(U,Q,Ct,"ϑ","\\vartheta",!0);I(U,Q,Ct,"ϖ","\\varpi",!0);I(U,Q,Ct,"ϱ","\\varrho",!0);I(U,Q,Ct,"ς","\\varsigma",!0);I(U,Q,Ct,"φ","\\varphi",!0);I(U,Q,ot,"∗","*",!0);I(U,Q,ot,"+","+");I(U,Q,ot,"−","-",!0);I(U,Q,ot,"⋅","\\cdot",!0);I(U,Q,ot,"∘","\\circ",!0);I(U,Q,ot,"÷","\\div",!0);I(U,Q,ot,"±","\\pm",!0);I(U,Q,ot,"×","\\times",!0);I(U,Q,ot,"∩","\\cap",!0);I(U,Q,ot,"∪","\\cup",!0);I(U,Q,ot,"∖","\\setminus",!0);I(U,Q,ot,"∧","\\land");I(U,Q,ot,"∨","\\lor");I(U,Q,ot,"∧","\\wedge",!0);I(U,Q,ot,"∨","\\vee",!0);I(U,Q,pe,"√","\\surd");I(U,Q,vi,"⟨","\\langle",!0);I(U,Q,vi,"∣","\\lvert");I(U,Q,vi,"∥","\\lVert");I(U,Q,As,"?","?");I(U,Q,As,"!","!");I(U,Q,As,"⟩","\\rangle",!0);I(U,Q,As,"∣","\\rvert");I(U,Q,As,"∥","\\rVert");I(U,Q,de,"=","=");I(U,Q,de,":",":");I(U,Q,de,"≈","\\approx",!0);I(U,Q,de,"≅","\\cong",!0);I(U,Q,de,"≥","\\ge");I(U,Q,de,"≥","\\geq",!0);I(U,Q,de,"←","\\gets");I(U,Q,de,">","\\gt",!0);I(U,Q,de,"∈","\\in",!0);I(U,Q,de,"","\\@not");I(U,Q,de,"⊂","\\subset",!0);I(U,Q,de,"⊃","\\supset",!0);I(U,Q,de,"⊆","\\subseteq",!0);I(U,Q,de,"⊇","\\supseteq",!0);I(U,ce,de,"⊈","\\nsubseteq",!0);I(U,ce,de,"⊉","\\nsupseteq",!0);I(U,Q,de,"⊨","\\models");I(U,Q,de,"←","\\leftarrow",!0);I(U,Q,de,"≤","\\le");I(U,Q,de,"≤","\\leq",!0);I(U,Q,de,"<","\\lt",!0);I(U,Q,de,"→","\\rightarrow",!0);I(U,Q,de,"→","\\to");I(U,ce,de,"≱","\\ngeq",!0);I(U,ce,de,"≰","\\nleq",!0);I(U,Q,Co," ","\\ ");I(U,Q,Co," ","\\space");I(U,Q,Co," ","\\nobreakspace");I(He,Q,Co," ","\\ ");I(He,Q,Co," "," ");I(He,Q,Co," ","\\space");I(He,Q,Co," ","\\nobreakspace");I(U,Q,Co,"","\\nobreak");I(U,Q,Co,"","\\allowbreak");I(U,Q,kh,",",",");I(U,Q,kh,";",";");I(U,ce,ot,"⊼","\\barwedge",!0);I(U,ce,ot,"⊻","\\veebar",!0);I(U,Q,ot,"⊙","\\odot",!0);I(U,Q,ot,"⊕","\\oplus",!0);I(U,Q,ot,"⊗","\\otimes",!0);I(U,Q,pe,"∂","\\partial",!0);I(U,Q,ot,"⊘","\\oslash",!0);I(U,ce,ot,"⊚","\\circledcirc",!0);I(U,ce,ot,"⊡","\\boxdot",!0);I(U,Q,ot,"△","\\bigtriangleup");I(U,Q,ot,"▽","\\bigtriangledown");I(U,Q,ot,"†","\\dagger");I(U,Q,ot,"⋄","\\diamond");I(U,Q,ot,"⋆","\\star");I(U,Q,ot,"◃","\\triangleleft");I(U,Q,ot,"▹","\\triangleright");I(U,Q,vi,"{","\\{");I(He,Q,pe,"{","\\{");I(He,Q,pe,"{","\\textbraceleft");I(U,Q,As,"}","\\}");I(He,Q,pe,"}","\\}");I(He,Q,pe,"}","\\textbraceright");I(U,Q,vi,"{","\\lbrace");I(U,Q,As,"}","\\rbrace");I(U,Q,vi,"[","\\lbrack",!0);I(He,Q,pe,"[","\\lbrack",!0);I(U,Q,As,"]","\\rbrack",!0);I(He,Q,pe,"]","\\rbrack",!0);I(U,Q,vi,"(","\\lparen",!0);I(U,Q,As,")","\\rparen",!0);I(He,Q,pe,"<","\\textless",!0);I(He,Q,pe,">","\\textgreater",!0);I(U,Q,vi,"⌊","\\lfloor",!0);I(U,Q,As,"⌋","\\rfloor",!0);I(U,Q,vi,"⌈","\\lceil",!0);I(U,Q,As,"⌉","\\rceil",!0);I(U,Q,pe,"\\","\\backslash");I(U,Q,pe,"∣","|");I(U,Q,pe,"∣","\\vert");I(He,Q,pe,"|","\\textbar",!0);I(U,Q,pe,"∥","\\|");I(U,Q,pe,"∥","\\Vert");I(He,Q,pe,"∥","\\textbardbl");I(He,Q,pe,"~","\\textasciitilde");I(He,Q,pe,"\\","\\textbackslash");I(He,Q,pe,"^","\\textasciicircum");I(U,Q,de,"↑","\\uparrow",!0);I(U,Q,de,"⇑","\\Uparrow",!0);I(U,Q,de,"↓","\\downarrow",!0);I(U,Q,de,"⇓","\\Downarrow",!0);I(U,Q,de,"↕","\\updownarrow",!0);I(U,Q,de,"⇕","\\Updownarrow",!0);I(U,Q,Dr,"∐","\\coprod");I(U,Q,Dr,"⋁","\\bigvee");I(U,Q,Dr,"⋀","\\bigwedge");I(U,Q,Dr,"⨄","\\biguplus");I(U,Q,Dr,"⋂","\\bigcap");I(U,Q,Dr,"⋃","\\bigcup");I(U,Q,Dr,"∫","\\int");I(U,Q,Dr,"∫","\\intop");I(U,Q,Dr,"∬","\\iint");I(U,Q,Dr,"∭","\\iiint");I(U,Q,Dr,"∏","\\prod");I(U,Q,Dr,"∑","\\sum");I(U,Q,Dr,"⨂","\\bigotimes");I(U,Q,Dr,"⨁","\\bigoplus");I(U,Q,Dr,"⨀","\\bigodot");I(U,Q,Dr,"∮","\\oint");I(U,Q,Dr,"∯","\\oiint");I(U,Q,Dr,"∰","\\oiiint");I(U,Q,Dr,"⨆","\\bigsqcup");I(U,Q,Dr,"∫","\\smallint");I(He,Q,ud,"…","\\textellipsis");I(U,Q,ud,"…","\\mathellipsis");I(He,Q,ud,"…","\\ldots",!0);I(U,Q,ud,"…","\\ldots",!0);I(U,Q,ud,"⋯","\\@cdots",!0);I(U,Q,ud,"⋱","\\ddots",!0);I(U,Q,pe,"⋮","\\varvdots");I(He,Q,pe,"⋮","\\varvdots");I(U,Q,er,"ˊ","\\acute");I(U,Q,er,"ˋ","\\grave");I(U,Q,er,"¨","\\ddot");I(U,Q,er,"~","\\tilde");I(U,Q,er,"ˉ","\\bar");I(U,Q,er,"˘","\\breve");I(U,Q,er,"ˇ","\\check");I(U,Q,er,"^","\\hat");I(U,Q,er,"⃗","\\vec");I(U,Q,er,"˙","\\dot");I(U,Q,er,"˚","\\mathring");I(U,Q,Ct,"","\\@imath");I(U,Q,Ct,"","\\@jmath");I(U,Q,pe,"ı","ı");I(U,Q,pe,"ȷ","ȷ");I(He,Q,pe,"ı","\\i",!0);I(He,Q,pe,"ȷ","\\j",!0);I(He,Q,pe,"ß","\\ss",!0);I(He,Q,pe,"æ","\\ae",!0);I(He,Q,pe,"œ","\\oe",!0);I(He,Q,pe,"ø","\\o",!0);I(He,Q,pe,"Æ","\\AE",!0);I(He,Q,pe,"Œ","\\OE",!0);I(He,Q,pe,"Ø","\\O",!0);I(He,Q,er,"ˊ","\\'");I(He,Q,er,"ˋ","\\`");I(He,Q,er,"ˆ","\\^");I(He,Q,er,"˜","\\~");I(He,Q,er,"ˉ","\\=");I(He,Q,er,"˘","\\u");I(He,Q,er,"˙","\\.");I(He,Q,er,"¸","\\c");I(He,Q,er,"˚","\\r");I(He,Q,er,"ˇ","\\v");I(He,Q,er,"¨",'\\"');I(He,Q,er,"˝","\\H");I(He,Q,er,"◯","\\textcircled");var $z={"--":!0,"---":!0,"``":!0,"''":!0};I(He,Q,pe,"–","--",!0);I(He,Q,pe,"–","\\textendash");I(He,Q,pe,"—","---",!0);I(He,Q,pe,"—","\\textemdash");I(He,Q,pe,"‘","`",!0);I(He,Q,pe,"‘","\\textquoteleft");I(He,Q,pe,"’","'",!0);I(He,Q,pe,"’","\\textquoteright");I(He,Q,pe,"“","``",!0);I(He,Q,pe,"“","\\textquotedblleft");I(He,Q,pe,"”","''",!0);I(He,Q,pe,"”","\\textquotedblright");I(U,Q,pe,"°","\\degree",!0);I(He,Q,pe,"°","\\degree");I(He,Q,pe,"°","\\textdegree",!0);I(U,Q,pe,"£","\\pounds");I(U,Q,pe,"£","\\mathsterling",!0);I(He,Q,pe,"£","\\pounds");I(He,Q,pe,"£","\\textsterling",!0);I(U,ce,pe,"✠","\\maltese");I(He,ce,pe,"✠","\\maltese");var o8='0123456789/@."';for(var hv=0;hv{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 g8[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return rrt[a]}else{if(r===120485||r===120486)return g8[0];if(120486{if(xl(e.classes)!==xl(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},Hz=e=>{for(var n=0;nt&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>s&&(s=o.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Fe=function(n,t,r,s){var a=new cd(n,t,r,s);return iy(a),a},wl=(e,n,t,r)=>new cd(e,n,t,r),Wu=function(n,t,r){var s=Fe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Ke(s.height),s.maxFontSize=1,s},ort=function(n,t,r,s){var a=new Wp(n,t,r,s);return iy(a),a},Eo=function(n){var t=new ld(n);return iy(t),t},Ku=function(n,t){return n instanceof ld?Fe([],[n],t):n},lrt=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,a=s,o=1;o{var t=Fe(["mspace"],[],n),r=ir(e,n);return t.style.marginRight=Ke(r),t},r0=(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},s2={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"}},Fz={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Uz=function(n,t){var[r,s,a]=Fz[n],o=new yl(r),l=new yo([o],{width:Ke(s),height:Ke(a),style:"width:"+Ke(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=wl(["overlay"],[l],t);return c.height=a,c.style.height=Ke(a),c.style.width=Ke(s),c},sr={number:3,unit:"mu"},ec={number:4,unit:"mu"},uo={number:5,unit:"mu"},crt={mord:{mop:sr,mbin:ec,mrel:uo,minner:sr},mop:{mord:sr,mop:sr,mrel:uo,minner:sr},mbin:{mord:ec,mop:ec,mopen:ec,minner:ec},mrel:{mord:uo,mop:uo,mopen:uo,minner:uo},mopen:{},mclose:{mop:sr,mbin:ec,mrel:uo,minner:sr},mpunct:{mord:sr,mop:sr,mrel:uo,mopen:sr,mclose:sr,mpunct:sr,minner:sr},minner:{mord:sr,mop:sr,mbin:ec,mrel:uo,mopen:sr,mpunct:sr,minner:sr}},urt={mord:{mop:sr},mop:{mord:sr,mop:sr},mbin:{},mrel:{},mopen:{},mclose:{mop:sr},mpunct:{},minner:{mop:sr}},qz={},up={},dp={};function tt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 b=k.classes[0],v=S.classes[0];b==="mbin"&&frt.has(v)?k.classes[0]="mord":v==="mbin"&&drt.has(b)&&(S.classes[0]="mord")},{node:f},m,g),i2(a,(S,k)=>{var b,v,x=o2(k),y=o2(S),C=x&&y?S.hasClass("mtight")?(b=urt[x])==null?void 0:b[y]:(v=crt[x])==null?void 0:v[y]:null;if(C)return Pz(C,d)},{node:f},m,g),a},i2=function(n,t,r,s,a){s&&n.push(s);for(var o=0;om=>{n.splice(f+1,0,m),o++})(o)}s&&n.pop()},Gz=function(n){return n instanceof ld||n instanceof Wp||n instanceof cd&&n.hasClass("enclosing")?n:null},a2=function(n,t){var r=Gz(n);if(r){var s=r.children;if(s.length){if(t==="right")return a2(s[s.length-1],"right");if(t==="left")return a2(s[0],"left")}}return n},o2=function(n,t){if(!n)return null;t&&(n=a2(n,t));var r=n.classes[0];return _rt[r]||null},qf=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Fe(t.concat(r))},kn=function(n,t,r){if(!n)return Fe();if(up[n.type]){var s=up[n.type](n,t);if(r&&t.size!==r.size){s=Fe(t.sizingClasses(r),[s],t);var a=t.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new qe("Got group of unknown type: '"+n.type+"'")};function s0(e,n){var t=Fe(["base"],e,n),r=Fe(["strut"]);return r.style.height=Ke(t.height+t.depth),t.depth&&(r.style.verticalAlign=Ke(-t.depth)),t.children.unshift(r),t}function l2(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=qr(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],o=[],l=0;l0&&(a.push(s0(o,n)),o=[]),a.push(r[l]));o.length>0&&a.push(s0(o,n));var d;t?(d=s0(qr(t,n,!0),n),d.classes=["tag"],a.push(d)):s&&a.push(s);var _=Fe(["katex-html"],a);if(_.setAttribute("aria-hidden","true"),d){var f=d.children[0];f.style.height=Ke(_.height+_.depth),_.depth&&(f.style.verticalAlign=Ke(-_.depth))}return _}function Vz(e){return new ld(e)}class Ge{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=xl(this.classes));for(var r=0;r0&&(n+=' class ="'+ps(xl(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class Rr{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ps(this.toText())}toText(){return this.text}}class Wz{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",Ke(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var prt=new Set(["\\imath","\\jmath"]),mrt=new Set(["mrow","mtable"]),Li=function(n,t,r){return Qn[t][n]&&Qn[t][n].replace&&n.charCodeAt(0)!==55349&&!($z.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Qn[t][n].replace),new Rr(n)},ay=function(n){return n.length===1?n[0]:new Ge("mrow",n)},grt={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"},oy=(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=grt[t];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(prt.has(a))return null;if(Qn[r][a]){var o=Qn[r][a].replace;o&&(a=o)}var l=s2[t].fontName;return ry(a,l,r)?s2[t].variant:null};function gv(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof Rr&&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 Rr&&t.text===","}else return!1}var bi=function(n,t,r){if(n.length===1){var s=$n(n[0],t);return r&&s instanceof Ge&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],o,l=0;l=1&&(o.type==="mn"||gv(o))){var d=c.children[0];d instanceof Ge&&d.type==="mn"&&(d.children=[...o.children,...d.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var _=o.children[0];if(_ instanceof Rr&&_.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof Rr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),a.pop())}}}a.push(c),o=c}return a},Sl=function(n,t,r){return ay(bi(n,t,r))},$n=function(n,t){if(!n)return new Ge("mrow");if(dp[n.type])return dp[n.type](n,t);throw new qe("Got group of unknown type: '"+n.type+"'")};function v8(e,n,t,r,s){var a=bi(e,t),o;a.length===1&&a[0]instanceof Ge&&mrt.has(a[0].type)?o=a[0]:o=new Ge("mrow",a);var l=new Ge("annotation",[new Rr(n)]);l.setAttribute("encoding","application/x-tex");var c=new Ge("semantics",[o,l]),d=new Ge("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Fe([_],[d])}var vrt=[[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]],b8=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],x8=function(n,t){return t.size<2?n:vrt[n-1][t.size-1]};class po{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||po.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=b8[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 po(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:x8(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:b8[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=x8(po.BASESIZE,n);return this.size===t&&this.textSize===po.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!==po.BASESIZE?["sizing","reset-size"+this.size,"size"+po.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=trt(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}po.BASESIZE=6;var Kz=function(n){return new po({style:n.displayMode?$t.DISPLAY:$t.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},Yz=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Fe(r,[n])}return n},brt=function(n,t,r){var s=Kz(r),a;if(r.output==="mathml")return v8(n,t,s,r.displayMode,!0);if(r.output==="html"){var o=l2(n,s);a=Fe(["katex"],[o])}else{var l=v8(n,t,s,r.displayMode,!1),c=l2(n,s);a=Fe(["katex"],[l,c])}return Yz(a,r)},xrt=function(n,t,r){var s=Kz(r),a=l2(n,s),o=Fe(["katex"],[a]);return Yz(o,r)},yrt={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":"="},Xp=function(n){var t=new Ge("mo",[new Rr(yrt[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},wrt={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]},Srt=new Set(["widehat","widecheck","widetilde","utilde"]),Zp=function(n,t){function r(){var l=4e5,c=n.label.slice(1);if(Srt.has(c)&&"base"in n){var d=n.base.type==="ordgroup"?n.base.body.length:1,_,f,m;if(d>5)c==="widehat"||c==="widecheck"?(_=420,l=2364,m=.42,f=c+"4"):(_=312,l=2340,m=.34,f="tilde4");else{var g=[1,1,2,2,3,3][d];c==="widehat"||c==="widecheck"?(l=[0,1062,2364,2364,2364][g],_=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],f=c+g):(l=[0,600,1033,2339,2340][g],_=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],f="tilde"+g)}var S=new yl(f),k=new yo([S],{width:"100%",height:Ke(m),viewBox:"0 0 "+l+" "+_,preserveAspectRatio:"none"});return{span:wl([],[k],t),minWidth:0,height:m}}else{var b=[],v=wrt[c];if(!v)throw new Error('No SVG data for "'+c+'".');var[x,y,C]=v,z=C/1e3,E=x.length,j,A;if(E===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');j=["hide-tail"],A=[v[3]]}else if(E===2)j=["halfarrow-left","halfarrow-right"],A=["xMinYMin","xMaxYMin"];else if(E===3)j=["brace-left","brace-center","brace-right"],A=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+E+" children.");for(var D=0;D0&&(s.style.minWidth=Ke(a)),s},krt=function(n,t,r,s,a){var o,l=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(o=Fe(["stretchy",t],[],a),t==="fbox"){var c=a.color&&a.getColor();c&&(o.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(t)&&d.push(new Qb({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&d.push(new Qb({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new yo(d,{width:"100%",height:Ke(l)});o=wl([],[_],a)}return o.height=l,o.style.height=Ke(l),o},Crt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ert={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Nrt(e){return e in Crt}function Kt(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 Qp(e){var n=Jp(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 Jp(e){return e&&(e.type==="atom"||Ert.hasOwnProperty(e.type))?e:null}var Xz=e=>{if(e instanceof pi)return e;if(Jnt(e)&&e.children.length===1)return Xz(e.children[0])},ly=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=Kt(e.base,"accent"),t=r.base,e.base=t,s=Qnt(kn(e,n)),e.base=r):(r=Kt(e,"accent"),t=r.base);var a=kn(t,n.havingCrampedStyle()),o=r.isShifty&&ko(t),l=0;if(o){var c,d;l=(c=(d=Xz(a))==null?void 0:d.skew)!=null?c:0}var _=r.label==="\\c",f=_?a.height+a.depth:Math.min(a.height,n.fontMetrics().xHeight),m;if(r.isStretchy)m=Zp(r,n),m=wn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ke(2*l)+")",marginLeft:Ke(2*l)}:void 0}]});else{var g,S;r.label==="\\vec"?(g=Uz("vec",n),S=Fz.vec[1]):(g=Yp({mode:r.mode,text:r.label},n,"textord"),g=Znt(g),g.italic=0,S=g.width,_&&(f+=g.depth)),m=Fe(["accent-body"],[g]);var k=r.label==="\\textcircled";k&&(m.classes.push("accent-full"),f=a.height);var b=l;k||(b-=S/2),m.style.left=Ke(b),r.label==="\\textcircled"&&(m.style.top=".2em"),m=wn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:m}]})}var v=Fe(["mord","accent"],[m],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},Zz=(e,n)=>{var t=e.isStretchy?Xp(e.label):new Ge("mo",[Li(e.label,e.mode)]),r=new Ge("mover",[$n(e.base,n),t]);return r.setAttribute("accent","true"),r},zrt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));tt({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=fp(n[0]),r=!zrt.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:ly,mathmlBuilder:Zz});tt({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:ly,mathmlBuilder:Zz});tt({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=kn(e.base,n),r=Zp(e,n),s=e.label==="\\utilde"?.12:0,a=wn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Fe(["mord","accentunder"],[a],n)},mathmlBuilder:(e,n)=>{var t=Xp(e.label),r=new Ge("munder",[$n(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var i0=e=>{var n=new Ge("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};tt({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=Ku(kn(e.body,r,n),n),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var o;e.below&&(r=n.havingStyle(t.sub()),o=Ku(kn(e.below,r,n),n),o.classes.push(a+"-arrow-pad"));var l=Zp(e,n),c=-n.fontMetrics().axisHeight+.5*l.height,d=-n.fontMetrics().axisHeight-.5*l.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(d-=s.depth);var _;if(o){var f=-n.fontMetrics().axisHeight+o.height+.5*l.height+.111;_=wn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:f}]})}else _=wn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return Fe(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=Xp(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=i0($n(e.body,n));if(e.below){var a=i0($n(e.below,n));r=new Ge("munderover",[t,a,s])}else r=new Ge("mover",[t,s])}else if(e.below){var o=i0($n(e.below,n));r=new Ge("munder",[t,o])}else r=i0(),r=new Ge("mover",[t,r]);return r}});function Qz(e,n){var t=qr(e.body,n,!0);return Fe([e.mclass],t,n)}function Jz(e,n){var t,r=bi(e.body,n);return e.mclass==="minner"?t=new Ge("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ge("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ge("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}tt({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:Mr(s),isCharacterBox:ko(s)}},htmlBuilder:Qz,mathmlBuilder:Jz});var em=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"};tt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:em(n[0]),body:Mr(n[1]),isCharacterBox:ko(n[1])}}});tt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],a=n[0],o;r!=="\\stackrel"?o=em(s):o="mrel";var l={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Mr(s)},c={type:"supsub",mode:a.mode,base:l,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:ko(c)}},htmlBuilder:Qz,mathmlBuilder:Jz});tt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:em(n[0]),body:Mr(n[0])}},htmlBuilder(e,n){var t=qr(e.body,n,!0),r=Fe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=bi(e.body,n),r=new Ge("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Art={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},y8=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),w8=e=>e.type==="textord"&&e.text==="@",Trt=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function jrt(e,n,t){var r=Art[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]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},o=t.callFunction("\\Big",[a],[]),l=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,o,l]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Mrt(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 qe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;aAV".includes(d))for(var f=0;f<2;f++){for(var m=!0,g=c+1;gAV=|." after @',o[c]);var S=jrt(d,_,e),k={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};r.push(k),l=y8()}a%2===0?r.push(l):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}tt({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=Ku(kn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ke(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ge("mrow",[$n(e.label,n)]);return t=new Ge("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ge("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});tt({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=Ku(kn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ge("mrow",[$n(e.fragment,n)])}});tt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=Kt(n[0],"ordgroup"),s=r.body,a="",o=0;o=1114111)throw new qe("\\@char with invalid code point "+a);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:d}}});var eA=(e,n)=>{var t=qr(e.body,n.withColor(e.color),!1);return Eo(t)},tA=(e,n)=>{var t=bi(e.body,n.withColor(e.color)),r=new Ge("mstyle",t);return r.setAttribute("mathcolor",e.color),r};tt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=Kt(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:Mr(s)}},htmlBuilder:eA,mathmlBuilder:tA});tt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=Kt(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var a=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:a}},htmlBuilder:eA,mathmlBuilder:tA});tt({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,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&Kt(s,"size").value}},htmlBuilder(e,n){var t=Fe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Ke(ir(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ge("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Ke(ir(e.size,n)))),t}});var c2={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},nA=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new qe("Expected a control sequence",e);return n},Rrt=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},rA=(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)};tt({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(c2[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=c2[r.text]),Kt(n.parseFunction(),"internal");throw new qe("Invalid token after macro prefix",r)}});tt({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 qe("Expected a control sequence",r);for(var a=0,o,l=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){o=n.gullet.future(),l[a].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new qe('Argument number "'+r.text+'" out of order');a++,l.push([])}else{if(r.text==="EOF")throw new qe("Expected a macro definition");l[a].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:a,delimiters:l},t===c2[t]),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=nA(n.gullet.popToken());n.gullet.consumeSpaces();var s=Rrt(n);return rA(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=nA(n.gullet.popToken()),s=n.gullet.popToken(),a=n.gullet.popToken();return rA(n,r,a,t==="\\\\globalfuture"),n.gullet.pushToken(a),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var yf=function(n,t,r){var s=Qn.math[n]&&Qn.math[n].replace,a=ry(s||n,t,r);if(!a)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return a},cy=function(n,t,r,s){var a=r.havingBaseStyle(t),o=Fe(s.concat(a.sizingClasses(r)),[n],r),l=a.sizeMultiplier/r.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},sA=function(n,t,r){var s=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Ke(a),n.height-=a,n.depth+=a},Drt=function(n,t,r,s,a,o){var l=Es(n,"Main-Regular",a,s),c=cy(l,t,s,o);return sA(c,s,t),c},Lrt=function(n,t,r,s){return Es(n,"Size"+t+"-Regular",r,s)},iA=function(n,t,r,s,a,o){var l=Lrt(n,t,a,s),c=cy(Fe(["delimsizing","size"+t],[l],s),$t.TEXT,s,o);return r&&sA(c,s,$t.TEXT),c},vv=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Fe(["delimsizinginner",s],[Fe([],[Es(n,t,r)])]);return{type:"elem",elem:a}},bv=function(n,t,r){var s=Sa["Size4-Regular"][n.charCodeAt(0)]?Sa["Size4-Regular"][n.charCodeAt(0)][4]:Sa["Size1-Regular"][n.charCodeAt(0)][4],a=new yl("inner",qnt(n,Math.round(1e3*t))),o=new yo([a],{width:Ke(s),height:Ke(t),style:"width:"+Ke(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),l=wl([],[o],r);return l.height=t,l.style.height=Ke(t),l.style.width=Ke(s),{type:"elem",elem:l}},u2=.008,a0={type:"kern",size:-1*u2},Ort=new Set(["|","\\lvert","\\rvert","\\vert"]),Irt=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),aA=function(n,t,r,s,a,o){var l,c,d,_,f="",m=0;l=d=_=n,c=null;var g="Size1-Regular";n==="\\uparrow"?d=_="⏐":n==="\\Uparrow"?d=_="‖":n==="\\downarrow"?l=d="⏐":n==="\\Downarrow"?l=d="‖":n==="\\updownarrow"?(l="\\uparrow",d="⏐",_="\\downarrow"):n==="\\Updownarrow"?(l="\\Uparrow",d="‖",_="\\Downarrow"):Ort.has(n)?(d="∣",f="vert",m=333):Irt.has(n)?(d="∥",f="doublevert",m=556):n==="["||n==="\\lbrack"?(l="⎡",d="⎢",_="⎣",g="Size4-Regular",f="lbrack",m=667):n==="]"||n==="\\rbrack"?(l="⎤",d="⎥",_="⎦",g="Size4-Regular",f="rbrack",m=667):n==="\\lfloor"||n==="⌊"?(d=l="⎢",_="⎣",g="Size4-Regular",f="lfloor",m=667):n==="\\lceil"||n==="⌈"?(l="⎡",d=_="⎢",g="Size4-Regular",f="lceil",m=667):n==="\\rfloor"||n==="⌋"?(d=l="⎥",_="⎦",g="Size4-Regular",f="rfloor",m=667):n==="\\rceil"||n==="⌉"?(l="⎤",d=_="⎥",g="Size4-Regular",f="rceil",m=667):n==="("||n==="\\lparen"?(l="⎛",d="⎜",_="⎝",g="Size4-Regular",f="lparen",m=875):n===")"||n==="\\rparen"?(l="⎞",d="⎟",_="⎠",g="Size4-Regular",f="rparen",m=875):n==="\\{"||n==="\\lbrace"?(l="⎧",c="⎨",_="⎩",d="⎪",g="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(l="⎫",c="⎬",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(l="⎧",_="⎩",d="⎪",g="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(l="⎫",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(l="⎧",_="⎭",d="⎪",g="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(l="⎫",_="⎩",d="⎪",g="Size4-Regular");var S=yf(l,g,a),k=S.height+S.depth,b=yf(d,g,a),v=b.height+b.depth,x=yf(_,g,a),y=x.height+x.depth,C=0,z=1;if(c!==null){var E=yf(c,g,a);C=E.height+E.depth,z=2}var j=k+y+C,A=Math.max(0,Math.ceil((t-j)/(z*v))),D=j+A*z*v,O=s.fontMetrics().axisHeight;r&&(O*=s.sizeMultiplier);var P=D/2-O,$=[];if(f.length>0){var F=D-k-y,V=Math.round(D*1e3),X=Gnt(f,Math.round(F*1e3)),W=new yl(f,X),Z=Ke(m/1e3),J=Ke(V/1e3),H=new yo([W],{width:Z,height:J,viewBox:"0 0 "+m+" "+V}),L=wl([],[H],s);L.height=V/1e3,L.style.width=Z,L.style.height=J,$.push({type:"elem",elem:L})}else{if($.push(vv(_,g,a)),$.push(a0),c===null){var B=D-k-y+2*u2;$.push(bv(d,B,s))}else{var Y=(D-k-y-C)/2+2*u2;$.push(bv(d,Y,s)),$.push(a0),$.push(vv(c,g,a)),$.push(a0),$.push(bv(d,Y,s))}$.push(a0),$.push(vv(l,g,a))}var G=s.havingBaseStyle($t.TEXT),re=wn({positionType:"bottom",positionData:P,children:$});return cy(Fe(["delimsizing","mult"],[re],G),$t.TEXT,s,o)},xv=80,yv=.08,wv=function(n,t,r,s,a){var o=Unt(n,s,r),l=new yl(n,o),c=new yo([l],{width:"400em",height:Ke(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return wl(["hide-tail"],[c],a)},Brt=function(n,t){var r=t.havingBaseSizing(),s=dA("\\surd",n*r.sizeMultiplier,uA,r),a=r.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l,c,d,_,f;return s.type==="small"?(_=1e3+1e3*o+xv,n<1?a=1:n<1.4&&(a=.7),c=(1+o+yv)/a,d=(1+o)/a,l=wv("sqrtMain",c,_,o,t),l.style.minWidth="0.853em",f=.833/a):s.type==="large"?(_=(1e3+xv)*Tf[s.size],d=(Tf[s.size]+o)/a,c=(Tf[s.size]+o+yv)/a,l=wv("sqrtSize"+s.size,c,_,o,t),l.style.minWidth="1.02em",f=1/a):(c=n+o+yv,d=n+o,_=Math.floor(1e3*n+o)+xv,l=wv("sqrtTall",c,_,o,t),l.style.minWidth="0.742em",f=1.056),l.height=d,l.style.height=Ke(c),{span:l,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},oA=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),$rt=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),lA=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Tf=[0,1.2,1.8,2.4,3],cA=function(n,t,r,s,a){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),oA.has(n)||lA.has(n))return iA(n,t,!1,r,s,a);if($rt.has(n))return aA(n,Tf[t],!1,r,s,a);throw new qe("Illegal delimiter: '"+n+"'")},Hrt=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Prt=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"stack"}],uA=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Frt=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.")},dA=function(n,t,r,s){for(var a=Math.min(2,3-s.style.size),o=a;ot)return l}return r[r.length-1]},d2=function(n,t,r,s,a,o){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var l;lA.has(n)?l=Hrt:oA.has(n)?l=uA:l=Prt;var c=dA(n,t,l,s);return c.type==="small"?Drt(n,c.style,r,s,a,o):c.type==="large"?iA(n,c.size,r,s,a,o):aA(n,t,r,s,a,o)},Sv=function(n,t,r,s,a,o){var l=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,d=5/s.fontMetrics().ptPerEm,_=Math.max(t-l,r+l),f=Math.max(_/500*c,2*_-d);return d2(n,f,!0,s,a,o)},S8={"\\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}},Urt=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 k8(e){return"isMiddle"in e}function tm(e,n){var t=Jp(e);if(t&&Urt.has(t.text))return t;throw t?new qe("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new qe("Invalid delimiter type '"+e.type+"'",e)}tt({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=tm(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:S8[e.funcName].size,mclass:S8[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Fe([e.mclass]):cA(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Li(e.delim,e.mode));var t=new Ge("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Ke(Tf[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function C8(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}tt({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 qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:tm(n[0],e).text,color:t}}});tt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=tm(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Kt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,n)=>{C8(e);for(var t=qr(e.body,n,!0,["mopen","mclose"]),r=0,s=0,a=!1,o=0;o{C8(e);var t=bi(e.body,n);if(e.left!=="."){var r=new Ge("mo",[Li(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ge("mo",[Li(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return ay(t)}});tt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=tm(n[0],e);if(!e.parser.leftrightDepth)throw new qe("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=qf(n,[]):(t=cA(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Li("|","text"):Li(e.delim,e.mode),r=new Ge("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var nm=(e,n)=>{var t=Ku(kn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,a,o,l=ko(e.body);if(r==="sout")a=Fe(["stretchy","sout"]),a.height=n.fontMetrics().defaultRuleThickness/s,o=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=ir({number:.6,unit:"pt"},n),d=ir({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var f=t.height+t.depth+c+d;t.style.paddingLeft=Ke(f/2+c);var m=Math.floor(1e3*f*s),g=Pnt(m),S=new yo([new yl("phase",g)],{width:"400em",height:Ke(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=wl(["hide-tail"],[S],n),a.style.height=Ke(f),o=t.depth+c+d}else{/cancel/.test(r)?l||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=k):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*v,b=Math.max(0,.25-t.depth)):(k=l?.2:0,b=k),a=krt(t,r,k,b,n),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=Ke(v)):r==="angl"&&v!==.049&&(a.style.borderTopWidth=Ke(v),a.style.borderRightWidth=Ke(v)),o=t.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=wn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];x=wn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:y}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!l?Fe(["mord","cancel-lap"],[x],n):Fe(["mord"],[x],n)},rm=(e,n)=>{var t,r=new Ge(e.label.includes("colorbox")?"mpadded":"menclose",[$n(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: "+Ke(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};tt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Kt(n[0],"color-token").color,o=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:o}},htmlBuilder:nm,mathmlBuilder:rm});tt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Kt(n[0],"color-token").color,o=Kt(n[1],"color-token").color,l=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:nm,mathmlBuilder:rm});tt({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]}}});tt({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:nm,mathmlBuilder:rm});tt({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:nm,mathmlBuilder:rm});tt({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 fA={};function Ra(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 qe("{"+e.envName+"} can be used only in display mode.")},qrt=new Set(["gather","gather*"]);function uy(e){if(!e.includes("ed"))return!e.includes("*")}function jl(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:o,colSeparationType:l,autoTag:c,singleRow:d,emptySingleRow:_,maxNumCols:f,leqno:m}=n;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new qe("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var S=[],k=[S],b=[],v=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ji("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),v.push(E8(e));;){var z=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:z};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),S.push(E);var j=e.fetch().text;if(j==="&"){if(f&&S.length===f){if(d||l)throw new qe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){C(),S.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(k.length>1||!_)&&k.pop(),v.length0&&(y+=.25),d.push({pos:y,isDashed:We[st]})}for(C(o[0]),r=0;r0&&(P+=x,jWe))for(r=0;r=l)){var te=void 0;if(s>0||n.hskipBeforeAndAfter){var le,ge;te=(le=(ge=G)==null?void 0:ge.pregap)!=null?le:m,te!==0&&(X=Fe(["arraycolsep"],[]),X.style.width=Ke(te),V.push(X))}var ue=[];for(r=0;r0){for(var zt=Wu("hline",t,_),vt=Wu("hdashline",t,_),Lt=[{type:"elem",elem:wt,shift:0}];d.length>0;){var St=d.pop(),kt=St.pos-$;St.isDashed?Lt.push({type:"elem",elem:vt,shift:kt}):Lt.push({type:"elem",elem:zt,shift:kt})}wt=wn({positionType:"individualShift",children:Lt})}if(Z.length===0)return Fe(["mord"],[wt],t);var xe=wn({positionType:"individualShift",children:Z}),je=Fe(["tag"],[xe],t);return Eo([wt,je])},Grt={c:"center ",l:"left ",r:"right "},La=function(n,t){for(var r=[],s=new Ge("mtd",[],["mtr-glue"]),a=new Ge("mtd",[],["mml-eqn-num"]),o=0;o0){var S=n.cols,k="",b=!1,v=0,x=S.length;S[0].type==="separator"&&(m+="top ",v=1),S[S.length-1].type==="separator"&&(m+="bottom ",x-=1);for(var y=v;y0?"left ":"",m+=D[D.length-1].length>0?"right ":"";for(var O=1;O0&&g&&(b=1),r[S]={type:"align",align:k,pregap:b,postgap:0}}return o.colSeparationType=g?"align":"alignat",o};Ra({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=Jp(n[0]),r=t?[n[0]]:Kt(n[0],"ordgroup").body,s=r.map(function(o){var l=Qp(o),c=l.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new qe("Unknown column alignment: "+c,o)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return jl(e.parser,a,dy(e.envName))},htmlBuilder:Da,mathmlBuilder:La});Ra({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 qe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var a=jl(e.parser,r,dy(e.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[a],left:n[0],right:n[1],rightColor:void 0}:a},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=jl(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=Jp(n[0]),r=t?[n[0]]:Kt(n[0],"ordgroup").body,s=r.map(function(l){var c=Qp(l),d=c.text;if("lc".includes(d))return{type:"align",align:d};throw new qe("Unknown column alignment: "+d,l)});if(s.length>1)throw new qe("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},o=jl(e.parser,a,"script");if(o.body.length>0&&o.body[0].length>1)throw new qe("{subarray} can contain only one column");return o},htmlBuilder:Da,mathmlBuilder:La});Ra({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=jl(e.parser,n,dy(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:pA,htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){qrt.has(e.envName)&&sm(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:uy(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return jl(e.parser,n,"display")},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:pA,htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){sm(e);var n={autoTag:uy(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return jl(e.parser,n,"display")},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["CD"],props:{numArgs:0},handler(e){return sm(e),Mrt(e.parser)},htmlBuilder:Da,mathmlBuilder:La});ne("\\nonumber","\\gdef\\@eqnsw{0}");ne("\\notag","\\nonumber");tt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new qe(e.funcName+" valid only within array environment")}});var N8=fA;tt({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 qe("Invalid environment name",s);for(var a="",o=0;o{var t=e.font,r=n.withFont(t);return kn(e.body,r)},gA=(e,n)=>{var t=e.font,r=n.withFont(t);return $n(e.body,r)},z8={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};tt({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=fp(n[0]),a=r;return a in z8&&(a=z8[a]),{type:"font",mode:t.mode,font:a.slice(1),body:s}},htmlBuilder:mA,mathmlBuilder:gA});tt({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:em(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:ko(r)}}});tt({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:a}=t,o=t.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:mA,mathmlBuilder:gA});var Vrt=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),a;a=n.havingStyle(r);var o=kn(e.numer,a,n);if(e.continued){var l=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;o.height=o.height0?S=3*m:S=7*m,k=n.fontMetrics().denom1):(f>0?(g=n.fontMetrics().num2,S=m):(g=n.fontMetrics().num3,S=3*m),k=n.fontMetrics().denom2);var b;if(_){var x=n.fontMetrics().axisHeight;g-o.depth-(x+.5*f){var t=new Ge("mfrac",[$n(e.numer,n),$n(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=ir(e.barSize,n);t.setAttribute("linethickness",Ke(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new Ge("mo",[new Rr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),e.rightDelim!=null){var o=new Ge("mo",[new Rr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return ay(s)}return t},vA=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};tt({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],a=n[1],o,l=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",c=")";break;case"\\\\bracefrac":o=!1,l="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,l="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var d=r==="\\cfrac",_=null;return d||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),vA({type:"genfrac",mode:t.mode,numer:s,denom:a,continued:d,hasBarLine:o,leftDelim:l,rightDelim:c,barSize:null},_)},htmlBuilder:Vrt,mathmlBuilder:Wrt});tt({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 A8=["display","text","script","scriptscript"],T8=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};tt({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],a=fp(n[0]),o=a.type==="atom"&&a.family==="open"?T8(a.text):null,l=fp(n[1]),c=l.type==="atom"&&l.family==="close"?T8(l.text):null,d=Kt(n[2],"size"),_,f=null;d.isBlank?_=!0:(f=d.value,_=f.number>0);var m=null,g=n[3];if(g.type==="ordgroup"){if(g.body.length>0){var S=Kt(g.body[0],"textord");m=A8[Number(S.text)]}}else g=Kt(g,"textord"),m=A8[Number(g.text)];return vA({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:f,leftDelim:o,rightDelim:c},m)}});tt({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:Kt(n[0],"size").value,token:s}}});tt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=Kt(n[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=n[2],l=a.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}}});var bA=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?kn(e.sup,n.havingStyle(t.sup()),n):kn(e.sub,n.havingStyle(t.sub()),n),s=Kt(e.base,"horizBrace")):s=Kt(e,"horizBrace");var a=kn(s.base,n.havingBaseStyle($t.DISPLAY)),o=Zp(s,n),l;if(s.isOver?l=wn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]}):l=wn({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var c=Fe(["minner",s.isOver?"mover":"munder"],[l],n);s.isOver?l=wn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):l=wn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Fe(["minner",s.isOver?"mover":"munder"],[l],n)},Krt=(e,n)=>{var t=Xp(e.label);return new Ge(e.isOver?"mover":"munder",[$n(e.base,n),t])};tt({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:bA,mathmlBuilder:Krt});tt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=Kt(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Mr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=qr(e.body,n,!1);return ort(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Sl(e.body,n);return t instanceof Ge||(t=new Ge("mrow",[t])),t.setAttribute("href",e.href),t}});tt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=Kt(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],a=0;a{var{parser:t,funcName:r,token:s}=e,a=Kt(n[0],"raw").string,o=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,c={};switch(r){case"\\htmlClass":c.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":c.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":c.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var d=a.split(","),_=0;_{var t=qr(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Fe(r,t,n);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,n)=>Sl(e.body,n)});tt({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:Mr(n[0]),mathml:Mr(n[1])}},htmlBuilder:(e,n)=>{var t=qr(e.html,n,!1);return Eo(t)},mathmlBuilder:(e,n)=>Sl(e.mathml,n)});var kv=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 qe("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Lz(r))throw new qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};tt({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"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(t[0])for(var c=Kt(t[0],"raw").string,d=c.split(","),_=0;_{var t=ir(e.height,n),r=0;e.totalheight.number>0&&(r=ir(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=ir(e.width,n));var a={height:Ke(t+r)};s>0&&(a.width=Ke(s)),r>0&&(a.verticalAlign=Ke(-r));var o=new Ynt(e.src,e.alt,a);return o.height=t,o.depth=r,o},mathmlBuilder:(e,n)=>{var t=new Ge("mglyph",[]);t.setAttribute("alt",e.alt);var r=ir(e.height,n),s=0;if(e.totalheight.number>0&&(s=ir(e.totalheight,n)-r,t.setAttribute("valign",Ke(-s))),t.setAttribute("height",Ke(r+s)),e.width.number>0){var a=ir(e.width,n);t.setAttribute("width",Ke(a))}return t.setAttribute("src",e.src),t}});tt({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=Kt(n[0],"size");if(t.settings.strict){var a=r[1]==="m",o=s.value.unit==="mu";a?(o||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")):o&&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 Pz(e.dimension,n)},mathmlBuilder(e,n){var t=ir(e.dimension,n);return new Wz(t)}});tt({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=Fe([],[kn(e.body,n)]),t=Fe(["inner"],[t],n)):t=Fe(["inner"],[kn(e.body,n)]);var r=Fe(["fix"],[]),s=Fe([e.alignment],[t,r],n),a=Fe(["strut"]);return a.style.height=Ke(s.height+s.depth),s.depth&&(a.style.verticalAlign=Ke(-s.depth)),s.children.unshift(a),s=Fe(["thinbox"],[s],n),Fe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ge("mpadded",[$n(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}});tt({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 a=t==="\\("?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});tt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new qe("Mismatched "+e.funcName)}});var j8=(e,n)=>{switch(n.style.size){case $t.DISPLAY.size:return e.display;case $t.TEXT.size:return e.text;case $t.SCRIPT.size:return e.script;case $t.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};tt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Mr(n[0]),text:Mr(n[1]),script:Mr(n[2]),scriptscript:Mr(n[3])}},htmlBuilder:(e,n)=>{var t=j8(e,n),r=qr(t,n,!1);return Eo(r)},mathmlBuilder:(e,n)=>{var t=j8(e,n);return Sl(t,n)}});var xA=(e,n,t,r,s,a,o)=>{e=Fe([],[e]);var l=t&&ko(t),c,d;if(n){var _=kn(n,r.havingStyle(s.sup()),r);d={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var f=kn(t,r.havingStyle(s.sub()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var m;if(d&&c){var g=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;m=wn({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ke(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ke(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var S=e.height-o;m=wn({positionType:"top",positionData:S,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ke(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(d){var k=e.depth+o;m=wn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ke(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[m];if(c&&a!==0&&!l){var v=Fe(["mspace"],[],r);v.style.marginRight=Ke(a),b.unshift(v)}return Fe(["mop","op-limits"],b,r)},yA=new Set(["\\smallint"]),dd=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Kt(e.base,"op"),s=!0):a=Kt(e,"op");var o=n.style,l=!1;o.size===$t.DISPLAY.size&&a.symbol&&!yA.has(a.name)&&(l=!0);var c,d;if(a.symbol){var _=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),c=Es(a.name,_,"math",n,["mop","op-symbol",l?"large-op":"small-op"]),d=c.italic,f.length>0){var m=Uz(f+"Size"+(l?"2":"1"),n);c=wn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:m,shift:l?.08:0}]}),a.name="\\"+f,c.classes.unshift("mop"),c.italic=d}}else if(a.body){var g=qr(a.body,n,!0);g.length===1&&g[0]instanceof pi?(c=g[0],c.classes[0]="mop"):c=Fe(["mop"],g,n)}else{for(var S=[],k=1;k{var t;if(e.symbol)t=new Ge("mo",[Li(e.name,e.mode)]),yA.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ge("mo",bi(e.body,n));else{t=new Ge("mi",[new Rr(e.name.slice(1))]);var r=new Ge("mo",[Li("⁡","text")]);e.parentIsSupSub?t=new Ge("mrow",[t,r]):t=Vz([t,r])}return t},Yrt={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};tt({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=Yrt[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:dd,mathmlBuilder:Ch});tt({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:Mr(r)}},htmlBuilder:dd,mathmlBuilder:Ch});var Xrt={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};tt({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:dd,mathmlBuilder:Ch});tt({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:dd,mathmlBuilder:Ch});tt({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=Xrt[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:dd,mathmlBuilder:Ch});var wA=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Kt(e.base,"operatorname"),s=!0):a=Kt(e,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(f=>{var m="text"in f?f.text:void 0;return typeof m=="string"?{type:"textord",mode:f.mode,text:m}:f}),c=qr(l,n.withFont("mathrm"),!0),d=0;d{for(var t=bi(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new Rr(l)]}var c=new Ge("mi",t);c.setAttribute("mathvariant","normal");var d=new Ge("mo",[Li("⁡","text")]);return e.parentIsSupSub?new Ge("mrow",[c,d]):Vz([c,d])};tt({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:Mr(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:wA,mathmlBuilder:Zrt});ne("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ac({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?Eo(qr(e.body,n,!1)):Fe(["mord"],qr(e.body,n,!0),n)},mathmlBuilder(e,n){return Sl(e.body,n,!0)}});tt({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=kn(e.body,n.havingCrampedStyle()),r=Wu("overline-line",n),s=n.fontMetrics().defaultRuleThickness,a=wn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Fe(["mord","overline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new Rr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("mover",[$n(e.body,n),t]);return r.setAttribute("accent","true"),r}});tt({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:Mr(r)}},htmlBuilder:(e,n)=>{var t=qr(e.body,n.withPhantom(),!1);return Eo(t)},mathmlBuilder:(e,n)=>{var t=bi(e.body,n);return new Ge("mphantom",t)}});ne("\\hphantom","\\smash{\\phantom{#1}}");tt({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=Fe(["inner"],[kn(e.body,n.withPhantom())]),r=Fe(["fix"],[]);return Fe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=bi(Mr(e.body),n),r=new Ge("mphantom",t),s=new Ge("mpadded",[r]);return s.setAttribute("width","0px"),s}});tt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=Kt(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=kn(e.body,n),r=ir(e.dy,n);return wn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[$n(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});tt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});tt({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],a=Kt(n[0],"size"),o=Kt(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&Kt(s,"size").value,width:a.value,height:o.value}},htmlBuilder(e,n){var t=Fe(["mord","rule"],[],n),r=ir(e.width,n),s=ir(e.height,n),a=e.shift?ir(e.shift,n):0;return t.style.borderRightWidth=Ke(r),t.style.borderTopWidth=Ke(s),t.style.bottom=Ke(a),t.width=r,t.height=s+a,t.depth=-a,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=ir(e.width,n),r=ir(e.height,n),s=e.shift?ir(e.shift,n):0,a=n.color&&n.getColor()||"black",o=new Ge("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",Ke(t)),o.setAttribute("height",Ke(r));var l=new Ge("mpadded",[o]);return s>=0?l.setAttribute("height",Ke(s)):(l.setAttribute("height",Ke(s)),l.setAttribute("depth",Ke(-s))),l.setAttribute("voffset",Ke(s)),l}});function SA(e,n,t){for(var r=qr(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,a=0;a{var t=n.havingSize(e.size);return SA(e.body,t,n)};tt({type:"sizing",names:M8,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:M8.indexOf(r)+1,body:a}},htmlBuilder:Qrt,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=bi(e.body,t),s=new Ge("mstyle",r);return s.setAttribute("mathsize",Ke(t.sizeMultiplier)),s}});tt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,a=!1,o=t[0]&&Kt(t[0],"ordgroup");if(o)for(var l,c=0;c{var t=Fe([],[kn(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 Fe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ge("mpadded",[$n(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});tt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],a=n[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,n){var t=kn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Ku(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,a=s;n.style.id<$t.TEXT.id&&(a=n.fontMetrics().xHeight);var o=s+a/4,l=t.height+t.depth+o+s,{span:c,ruleWidth:d,advanceWidth:_}=Brt(l,n),f=c.height-d;f>t.height+t.depth+o&&(o=(o+f-t.height-t.depth)/2);var m=c.height-t.height-o-d;t.style.paddingLeft=Ke(_);var g=wn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+m)},{type:"elem",elem:c},{type:"kern",size:d}]});if(e.index){var S=n.havingStyle($t.SCRIPTSCRIPT),k=kn(e.index,S,n),b=.6*(g.height-g.depth),v=wn({positionType:"shift",positionData:-b,children:[{type:"elem",elem:k}]}),x=Fe(["root"],[v]);return Fe(["mord","sqrt"],[x,g],n)}else return Fe(["mord","sqrt"],[g],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ge("mroot",[$n(t,n),$n(r,n)]):new Ge("msqrt",[$n(t,n)])}});var f2={display:$t.DISPLAY,text:$t.TEXT,script:$t.SCRIPT,scriptscript:$t.SCRIPTSCRIPT};function Jrt(e){return e in f2}tt({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,a=s.parseExpression(!0,t),o=r.slice(1,r.length-5);if(!Jrt(o))throw new Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:a}},htmlBuilder(e,n){var t=f2[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),SA(e.body,r,n)},mathmlBuilder(e,n){var t=f2[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=bi(e.body,r),a=new Ge("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});var est=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===$t.DISPLAY.size||r.alwaysHandleSupSub);return s?dd:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(t.style.size===$t.DISPLAY.size||r.limits);return a?wA:null}else{if(r.type==="accent")return ko(r.base)?ly:null;if(r.type==="horizBrace"){var o=!n.sub;return o===r.isOver?bA:null}else return null}else return null};Ac({type:"supsub",htmlBuilder(e,n){var t=est(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:a}=e,o=kn(r,n),l,c,d=n.fontMetrics(),_=0,f=0,m=r&&ko(r);if(s){var g=n.havingStyle(n.style.sup());l=kn(s,g,n),m||(_=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/n.sizeMultiplier)}if(a){var S=n.havingStyle(n.style.sub());c=kn(a,S,n),m||(f=o.depth+S.fontMetrics().subDrop*S.sizeMultiplier/n.sizeMultiplier)}var k;n.style===$t.DISPLAY?k=d.sup1:n.style.cramped?k=d.sup3:k=d.sup2;var b=n.sizeMultiplier,v=Ke(.5/d.ptPerEm/b),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof pi||y){var C;x=Ke(-((C=o.italic)!=null?C:0))}}var z;if(l&&c){_=Math.max(_,k,l.depth+.25*d.xHeight),f=Math.max(f,d.sub2);var E=d.defaultRuleThickness,j=4*E;if(_-l.depth-(c.height-f)0&&(_+=A,f-=A)}var D=[{type:"elem",elem:c,shift:f,marginRight:v,marginLeft:x},{type:"elem",elem:l,shift:-_,marginRight:v}];z=wn({positionType:"individualShift",children:D})}else if(c){f=Math.max(f,d.sub1,c.height-.8*d.xHeight);var O=[{type:"elem",elem:c,marginLeft:x,marginRight:v}];z=wn({positionType:"shift",positionData:f,children:O})}else if(l)_=Math.max(_,k,l.depth+.25*d.xHeight),z=wn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:l,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var P=o2(o,"right")||"mord";return Fe([P],[o,Fe(["msupsub"],[z])],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 a=[$n(e.base,n)];e.sub&&a.push($n(e.sub,n)),e.sup&&a.push($n(e.sup,n));var o;if(t)o=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&n.style===$t.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(n.style===$t.DISPLAY||d.limits)?o="munderover":o="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===$t.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===$t.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===$t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===$t.DISPLAY)?o="mover":o="msup"}return new Ge(o,a)}});Ac({type:"atom",htmlBuilder(e,n){return sy(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ge("mo",[Li(e.text,e.mode)]);if(e.family==="bin"){var r=oy(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 kA={mi:"italic",mn:"normal",mtext:"normal"};Ac({type:"mathord",htmlBuilder(e,n){return Yp(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ge("mi",[Li(e.text,e.mode,n)]),r=oy(e,n)||"italic";return r!==kA[t.type]&&t.setAttribute("mathvariant",r),t}});Ac({type:"textord",htmlBuilder(e,n){return Yp(e,n,"textord")},mathmlBuilder(e,n){var t=Li(e.text,e.mode,n),r=oy(e,n)||"normal",s;return e.mode==="text"?s=new Ge("mtext",[t]):/[0-9]/.test(e.text)?s=new Ge("mn",[t]):e.text==="\\prime"?s=new Ge("mo",[t]):s=new Ge("mi",[t]),r!==kA[s.type]&&s.setAttribute("mathvariant",r),s}});var Cv={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ev={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ac({type:"spacing",htmlBuilder(e,n){if(Ev.hasOwnProperty(e.text)){var t=Ev[e.text].className||"";if(e.mode==="text"){var r=Yp(e,n,"textord");return r.classes.push(t),r}else return Fe(["mspace",t],[sy(e.text,e.mode,n)],n)}else{if(Cv.hasOwnProperty(e.text))return Fe(["mspace",Cv[e.text]],[],n);throw new qe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Ev.hasOwnProperty(e.text))t=new Ge("mtext",[new Rr(" ")]);else{if(Cv.hasOwnProperty(e.text))return new Ge("mspace");throw new qe('Unknown type of space "'+e.text+'"')}return t}});var R8=()=>{var e=new Ge("mtd",[]);return e.setAttribute("width","50%"),e};Ac({type:"tag",mathmlBuilder(e,n){var t=new Ge("mtable",[new Ge("mtr",[R8(),new Ge("mtd",[Sl(e.body,n)]),R8(),new Ge("mtd",[Sl(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var D8={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},L8={"\\textbf":"textbf","\\textmd":"textmd"},tst={"\\textit":"textit","\\textup":"textup"},O8=(e,n)=>{var t=e.font;if(t){if(D8[t])return n.withTextFontFamily(D8[t]);if(L8[t])return n.withTextFontWeight(L8[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(tst[t])};tt({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:Mr(s),font:r}},htmlBuilder(e,n){var t=O8(e,n),r=qr(e.body,t,!0);return Fe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=O8(e,n);return Sl(e.body,t)}});tt({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=kn(e.body,n),r=Wu("underline-line",n),s=n.fontMetrics().defaultRuleThickness,a=wn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Fe(["mord","underline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new Rr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("munder",[$n(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});tt({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=kn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return wn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[$n(e.body,n)],["vcenter"]);return new Ge("mrow",[t])}});tt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=I8(e),r=[],s=n.havingStyle(n.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),vl=qz,CA=`[ \r - ]`,nst="\\\\[a-zA-Z@]+",rst="\\\\[^\uD800-\uDFFF]",sst="("+nst+")"+CA+"*",ist=`\\\\( +-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 rit(e){return"toText"in e}class fd{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(rit(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var Jb={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},sit={ex:!0,em:!0,mu:!0},Kz=function(n){return typeof n!="string"&&(n=n.unit),n in Jb||n in sit||n==="ex"},ar=function(n,t){var r;if(n.unit in Jb)r=Jb[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 qe("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Ke=function(n){return+n.toFixed(4)+"em"},bl=function(n){return n.filter(t=>t).join(" ")},oy=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=Mst(r)+":"+s+";")}return t},Yz=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)}},Xz=function(n){var t=document.createElement(n);t.className=bl(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]/,Zz=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ms(bl(this.classes))+'"');var r=oy(this.style);r&&(t+=' style="'+ms(r)+'"');for(var s of Object.keys(this.attributes)){if(iit.test(s))throw new qe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ms(this.attributes[s])+'"'}t+=">";for(var a=0;a",t};class hd{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,Yz.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return Xz.call(this,"span")}toMarkup(){return Zz.call(this,"span")}}class Yp{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,Yz.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 Xz.call(this,"a")}toMarkup(){return Zz.call(this,"a")}}class ait{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=''+ms(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Ke(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=bl(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:"+Ke(this.italic)+";"),r+=oy(this.style),r&&(n=!0,t+=' style="'+ms(r)+'"');var s=ms(this.text);return n?(t+=">",t+=s,t+="",t):s}}class wo{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 e2{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 uit=e=>e instanceof hd||e instanceof Yp||e instanceof fd,ka={"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]}},t0={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]},dk={Å:"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 dit(e,n){ka[e]=n}function ly(e,n,t){if(!ka[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=ka[n][r];if(!s&&e[0]in dk&&(r=dk[e[0]].charCodeAt(0),s=ka[n][r]),!s&&t==="text"&&Wz(r)&&(s=ka[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var _v={};function fit(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!_v[n]){var t=_v[n]={cssEmPerMu:t0.quad[n]/18};for(var r in t0)t0.hasOwnProperty(r)&&(t[r]=t0[r][n])}return _v[n]}var Qn={math:{},text:{}};function O(e,n,t,r,s,a){Qn[e][s]={font:n,group:t,replace:r},a&&r&&(Qn[e][r]=Qn[e][s])}var U="math",He="text",Q="main",ce="ams",er="accent-token",at="bin",As="close",_d="inner",Et="mathord",Mr="op-token",bi="open",Eh="punct",de="rel",Eo="spacing",pe="textord";O(U,Q,de,"≡","\\equiv",!0);O(U,Q,de,"≺","\\prec",!0);O(U,Q,de,"≻","\\succ",!0);O(U,Q,de,"∼","\\sim",!0);O(U,Q,de,"⊥","\\perp");O(U,Q,de,"⪯","\\preceq",!0);O(U,Q,de,"⪰","\\succeq",!0);O(U,Q,de,"≃","\\simeq",!0);O(U,Q,de,"∣","\\mid",!0);O(U,Q,de,"≪","\\ll",!0);O(U,Q,de,"≫","\\gg",!0);O(U,Q,de,"≍","\\asymp",!0);O(U,Q,de,"∥","\\parallel");O(U,Q,de,"⋈","\\bowtie",!0);O(U,Q,de,"⌣","\\smile",!0);O(U,Q,de,"⊑","\\sqsubseteq",!0);O(U,Q,de,"⊒","\\sqsupseteq",!0);O(U,Q,de,"≐","\\doteq",!0);O(U,Q,de,"⌢","\\frown",!0);O(U,Q,de,"∋","\\ni",!0);O(U,Q,de,"∝","\\propto",!0);O(U,Q,de,"⊢","\\vdash",!0);O(U,Q,de,"⊣","\\dashv",!0);O(U,Q,de,"∋","\\owns");O(U,Q,Eh,".","\\ldotp");O(U,Q,Eh,"⋅","\\cdotp");O(U,Q,Eh,"⋅","·");O(He,Q,pe,"⋅","·");O(U,Q,pe,"#","\\#");O(He,Q,pe,"#","\\#");O(U,Q,pe,"&","\\&");O(He,Q,pe,"&","\\&");O(U,Q,pe,"ℵ","\\aleph",!0);O(U,Q,pe,"∀","\\forall",!0);O(U,Q,pe,"ℏ","\\hbar",!0);O(U,Q,pe,"∃","\\exists",!0);O(U,Q,pe,"∇","\\nabla",!0);O(U,Q,pe,"♭","\\flat",!0);O(U,Q,pe,"ℓ","\\ell",!0);O(U,Q,pe,"♮","\\natural",!0);O(U,Q,pe,"♣","\\clubsuit",!0);O(U,Q,pe,"℘","\\wp",!0);O(U,Q,pe,"♯","\\sharp",!0);O(U,Q,pe,"♢","\\diamondsuit",!0);O(U,Q,pe,"ℜ","\\Re",!0);O(U,Q,pe,"♡","\\heartsuit",!0);O(U,Q,pe,"ℑ","\\Im",!0);O(U,Q,pe,"♠","\\spadesuit",!0);O(U,Q,pe,"§","\\S",!0);O(He,Q,pe,"§","\\S");O(U,Q,pe,"¶","\\P",!0);O(He,Q,pe,"¶","\\P");O(U,Q,pe,"†","\\dag");O(He,Q,pe,"†","\\dag");O(He,Q,pe,"†","\\textdagger");O(U,Q,pe,"‡","\\ddag");O(He,Q,pe,"‡","\\ddag");O(He,Q,pe,"‡","\\textdaggerdbl");O(U,Q,As,"⎱","\\rmoustache",!0);O(U,Q,bi,"⎰","\\lmoustache",!0);O(U,Q,As,"⟯","\\rgroup",!0);O(U,Q,bi,"⟮","\\lgroup",!0);O(U,Q,at,"∓","\\mp",!0);O(U,Q,at,"⊖","\\ominus",!0);O(U,Q,at,"⊎","\\uplus",!0);O(U,Q,at,"⊓","\\sqcap",!0);O(U,Q,at,"∗","\\ast");O(U,Q,at,"⊔","\\sqcup",!0);O(U,Q,at,"◯","\\bigcirc",!0);O(U,Q,at,"∙","\\bullet",!0);O(U,Q,at,"‡","\\ddagger");O(U,Q,at,"≀","\\wr",!0);O(U,Q,at,"⨿","\\amalg");O(U,Q,at,"&","\\And");O(U,Q,de,"⟵","\\longleftarrow",!0);O(U,Q,de,"⇐","\\Leftarrow",!0);O(U,Q,de,"⟸","\\Longleftarrow",!0);O(U,Q,de,"⟶","\\longrightarrow",!0);O(U,Q,de,"⇒","\\Rightarrow",!0);O(U,Q,de,"⟹","\\Longrightarrow",!0);O(U,Q,de,"↔","\\leftrightarrow",!0);O(U,Q,de,"⟷","\\longleftrightarrow",!0);O(U,Q,de,"⇔","\\Leftrightarrow",!0);O(U,Q,de,"⟺","\\Longleftrightarrow",!0);O(U,Q,de,"↦","\\mapsto",!0);O(U,Q,de,"⟼","\\longmapsto",!0);O(U,Q,de,"↗","\\nearrow",!0);O(U,Q,de,"↩","\\hookleftarrow",!0);O(U,Q,de,"↪","\\hookrightarrow",!0);O(U,Q,de,"↘","\\searrow",!0);O(U,Q,de,"↼","\\leftharpoonup",!0);O(U,Q,de,"⇀","\\rightharpoonup",!0);O(U,Q,de,"↙","\\swarrow",!0);O(U,Q,de,"↽","\\leftharpoondown",!0);O(U,Q,de,"⇁","\\rightharpoondown",!0);O(U,Q,de,"↖","\\nwarrow",!0);O(U,Q,de,"⇌","\\rightleftharpoons",!0);O(U,ce,de,"≮","\\nless",!0);O(U,ce,de,"","\\@nleqslant");O(U,ce,de,"","\\@nleqq");O(U,ce,de,"⪇","\\lneq",!0);O(U,ce,de,"≨","\\lneqq",!0);O(U,ce,de,"","\\@lvertneqq");O(U,ce,de,"⋦","\\lnsim",!0);O(U,ce,de,"⪉","\\lnapprox",!0);O(U,ce,de,"⊀","\\nprec",!0);O(U,ce,de,"⋠","\\npreceq",!0);O(U,ce,de,"⋨","\\precnsim",!0);O(U,ce,de,"⪹","\\precnapprox",!0);O(U,ce,de,"≁","\\nsim",!0);O(U,ce,de,"","\\@nshortmid");O(U,ce,de,"∤","\\nmid",!0);O(U,ce,de,"⊬","\\nvdash",!0);O(U,ce,de,"⊭","\\nvDash",!0);O(U,ce,de,"⋪","\\ntriangleleft");O(U,ce,de,"⋬","\\ntrianglelefteq",!0);O(U,ce,de,"⊊","\\subsetneq",!0);O(U,ce,de,"","\\@varsubsetneq");O(U,ce,de,"⫋","\\subsetneqq",!0);O(U,ce,de,"","\\@varsubsetneqq");O(U,ce,de,"≯","\\ngtr",!0);O(U,ce,de,"","\\@ngeqslant");O(U,ce,de,"","\\@ngeqq");O(U,ce,de,"⪈","\\gneq",!0);O(U,ce,de,"≩","\\gneqq",!0);O(U,ce,de,"","\\@gvertneqq");O(U,ce,de,"⋧","\\gnsim",!0);O(U,ce,de,"⪊","\\gnapprox",!0);O(U,ce,de,"⊁","\\nsucc",!0);O(U,ce,de,"⋡","\\nsucceq",!0);O(U,ce,de,"⋩","\\succnsim",!0);O(U,ce,de,"⪺","\\succnapprox",!0);O(U,ce,de,"≆","\\ncong",!0);O(U,ce,de,"","\\@nshortparallel");O(U,ce,de,"∦","\\nparallel",!0);O(U,ce,de,"⊯","\\nVDash",!0);O(U,ce,de,"⋫","\\ntriangleright");O(U,ce,de,"⋭","\\ntrianglerighteq",!0);O(U,ce,de,"","\\@nsupseteqq");O(U,ce,de,"⊋","\\supsetneq",!0);O(U,ce,de,"","\\@varsupsetneq");O(U,ce,de,"⫌","\\supsetneqq",!0);O(U,ce,de,"","\\@varsupsetneqq");O(U,ce,de,"⊮","\\nVdash",!0);O(U,ce,de,"⪵","\\precneqq",!0);O(U,ce,de,"⪶","\\succneqq",!0);O(U,ce,de,"","\\@nsubseteqq");O(U,ce,at,"⊴","\\unlhd");O(U,ce,at,"⊵","\\unrhd");O(U,ce,de,"↚","\\nleftarrow",!0);O(U,ce,de,"↛","\\nrightarrow",!0);O(U,ce,de,"⇍","\\nLeftarrow",!0);O(U,ce,de,"⇏","\\nRightarrow",!0);O(U,ce,de,"↮","\\nleftrightarrow",!0);O(U,ce,de,"⇎","\\nLeftrightarrow",!0);O(U,ce,de,"△","\\vartriangle");O(U,ce,pe,"ℏ","\\hslash");O(U,ce,pe,"▽","\\triangledown");O(U,ce,pe,"◊","\\lozenge");O(U,ce,pe,"Ⓢ","\\circledS");O(U,ce,pe,"®","\\circledR");O(He,ce,pe,"®","\\circledR");O(U,ce,pe,"∡","\\measuredangle",!0);O(U,ce,pe,"∄","\\nexists");O(U,ce,pe,"℧","\\mho");O(U,ce,pe,"Ⅎ","\\Finv",!0);O(U,ce,pe,"⅁","\\Game",!0);O(U,ce,pe,"‵","\\backprime");O(U,ce,pe,"▲","\\blacktriangle");O(U,ce,pe,"▼","\\blacktriangledown");O(U,ce,pe,"■","\\blacksquare");O(U,ce,pe,"⧫","\\blacklozenge");O(U,ce,pe,"★","\\bigstar");O(U,ce,pe,"∢","\\sphericalangle",!0);O(U,ce,pe,"∁","\\complement",!0);O(U,ce,pe,"ð","\\eth",!0);O(He,Q,pe,"ð","ð");O(U,ce,pe,"╱","\\diagup");O(U,ce,pe,"╲","\\diagdown");O(U,ce,pe,"□","\\square");O(U,ce,pe,"□","\\Box");O(U,ce,pe,"◊","\\Diamond");O(U,ce,pe,"¥","\\yen",!0);O(He,ce,pe,"¥","\\yen",!0);O(U,ce,pe,"✓","\\checkmark",!0);O(He,ce,pe,"✓","\\checkmark");O(U,ce,pe,"ℶ","\\beth",!0);O(U,ce,pe,"ℸ","\\daleth",!0);O(U,ce,pe,"ℷ","\\gimel",!0);O(U,ce,pe,"ϝ","\\digamma",!0);O(U,ce,pe,"ϰ","\\varkappa");O(U,ce,bi,"┌","\\@ulcorner",!0);O(U,ce,As,"┐","\\@urcorner",!0);O(U,ce,bi,"└","\\@llcorner",!0);O(U,ce,As,"┘","\\@lrcorner",!0);O(U,ce,de,"≦","\\leqq",!0);O(U,ce,de,"⩽","\\leqslant",!0);O(U,ce,de,"⪕","\\eqslantless",!0);O(U,ce,de,"≲","\\lesssim",!0);O(U,ce,de,"⪅","\\lessapprox",!0);O(U,ce,de,"≊","\\approxeq",!0);O(U,ce,at,"⋖","\\lessdot");O(U,ce,de,"⋘","\\lll",!0);O(U,ce,de,"≶","\\lessgtr",!0);O(U,ce,de,"⋚","\\lesseqgtr",!0);O(U,ce,de,"⪋","\\lesseqqgtr",!0);O(U,ce,de,"≑","\\doteqdot");O(U,ce,de,"≓","\\risingdotseq",!0);O(U,ce,de,"≒","\\fallingdotseq",!0);O(U,ce,de,"∽","\\backsim",!0);O(U,ce,de,"⋍","\\backsimeq",!0);O(U,ce,de,"⫅","\\subseteqq",!0);O(U,ce,de,"⋐","\\Subset",!0);O(U,ce,de,"⊏","\\sqsubset",!0);O(U,ce,de,"≼","\\preccurlyeq",!0);O(U,ce,de,"⋞","\\curlyeqprec",!0);O(U,ce,de,"≾","\\precsim",!0);O(U,ce,de,"⪷","\\precapprox",!0);O(U,ce,de,"⊲","\\vartriangleleft");O(U,ce,de,"⊴","\\trianglelefteq");O(U,ce,de,"⊨","\\vDash",!0);O(U,ce,de,"⊪","\\Vvdash",!0);O(U,ce,de,"⌣","\\smallsmile");O(U,ce,de,"⌢","\\smallfrown");O(U,ce,de,"≏","\\bumpeq",!0);O(U,ce,de,"≎","\\Bumpeq",!0);O(U,ce,de,"≧","\\geqq",!0);O(U,ce,de,"⩾","\\geqslant",!0);O(U,ce,de,"⪖","\\eqslantgtr",!0);O(U,ce,de,"≳","\\gtrsim",!0);O(U,ce,de,"⪆","\\gtrapprox",!0);O(U,ce,at,"⋗","\\gtrdot");O(U,ce,de,"⋙","\\ggg",!0);O(U,ce,de,"≷","\\gtrless",!0);O(U,ce,de,"⋛","\\gtreqless",!0);O(U,ce,de,"⪌","\\gtreqqless",!0);O(U,ce,de,"≖","\\eqcirc",!0);O(U,ce,de,"≗","\\circeq",!0);O(U,ce,de,"≜","\\triangleq",!0);O(U,ce,de,"∼","\\thicksim");O(U,ce,de,"≈","\\thickapprox");O(U,ce,de,"⫆","\\supseteqq",!0);O(U,ce,de,"⋑","\\Supset",!0);O(U,ce,de,"⊐","\\sqsupset",!0);O(U,ce,de,"≽","\\succcurlyeq",!0);O(U,ce,de,"⋟","\\curlyeqsucc",!0);O(U,ce,de,"≿","\\succsim",!0);O(U,ce,de,"⪸","\\succapprox",!0);O(U,ce,de,"⊳","\\vartriangleright");O(U,ce,de,"⊵","\\trianglerighteq");O(U,ce,de,"⊩","\\Vdash",!0);O(U,ce,de,"∣","\\shortmid");O(U,ce,de,"∥","\\shortparallel");O(U,ce,de,"≬","\\between",!0);O(U,ce,de,"⋔","\\pitchfork",!0);O(U,ce,de,"∝","\\varpropto");O(U,ce,de,"◀","\\blacktriangleleft");O(U,ce,de,"∴","\\therefore",!0);O(U,ce,de,"∍","\\backepsilon");O(U,ce,de,"▶","\\blacktriangleright");O(U,ce,de,"∵","\\because",!0);O(U,ce,de,"⋘","\\llless");O(U,ce,de,"⋙","\\gggtr");O(U,ce,at,"⊲","\\lhd");O(U,ce,at,"⊳","\\rhd");O(U,ce,de,"≂","\\eqsim",!0);O(U,Q,de,"⋈","\\Join");O(U,ce,de,"≑","\\Doteq",!0);O(U,ce,at,"∔","\\dotplus",!0);O(U,ce,at,"∖","\\smallsetminus");O(U,ce,at,"⋒","\\Cap",!0);O(U,ce,at,"⋓","\\Cup",!0);O(U,ce,at,"⩞","\\doublebarwedge",!0);O(U,ce,at,"⊟","\\boxminus",!0);O(U,ce,at,"⊞","\\boxplus",!0);O(U,ce,at,"⋇","\\divideontimes",!0);O(U,ce,at,"⋉","\\ltimes",!0);O(U,ce,at,"⋊","\\rtimes",!0);O(U,ce,at,"⋋","\\leftthreetimes",!0);O(U,ce,at,"⋌","\\rightthreetimes",!0);O(U,ce,at,"⋏","\\curlywedge",!0);O(U,ce,at,"⋎","\\curlyvee",!0);O(U,ce,at,"⊝","\\circleddash",!0);O(U,ce,at,"⊛","\\circledast",!0);O(U,ce,at,"⋅","\\centerdot");O(U,ce,at,"⊺","\\intercal",!0);O(U,ce,at,"⋒","\\doublecap");O(U,ce,at,"⋓","\\doublecup");O(U,ce,at,"⊠","\\boxtimes",!0);O(U,ce,de,"⇢","\\dashrightarrow",!0);O(U,ce,de,"⇠","\\dashleftarrow",!0);O(U,ce,de,"⇇","\\leftleftarrows",!0);O(U,ce,de,"⇆","\\leftrightarrows",!0);O(U,ce,de,"⇚","\\Lleftarrow",!0);O(U,ce,de,"↞","\\twoheadleftarrow",!0);O(U,ce,de,"↢","\\leftarrowtail",!0);O(U,ce,de,"↫","\\looparrowleft",!0);O(U,ce,de,"⇋","\\leftrightharpoons",!0);O(U,ce,de,"↶","\\curvearrowleft",!0);O(U,ce,de,"↺","\\circlearrowleft",!0);O(U,ce,de,"↰","\\Lsh",!0);O(U,ce,de,"⇈","\\upuparrows",!0);O(U,ce,de,"↿","\\upharpoonleft",!0);O(U,ce,de,"⇃","\\downharpoonleft",!0);O(U,Q,de,"⊶","\\origof",!0);O(U,Q,de,"⊷","\\imageof",!0);O(U,ce,de,"⊸","\\multimap",!0);O(U,ce,de,"↭","\\leftrightsquigarrow",!0);O(U,ce,de,"⇉","\\rightrightarrows",!0);O(U,ce,de,"⇄","\\rightleftarrows",!0);O(U,ce,de,"↠","\\twoheadrightarrow",!0);O(U,ce,de,"↣","\\rightarrowtail",!0);O(U,ce,de,"↬","\\looparrowright",!0);O(U,ce,de,"↷","\\curvearrowright",!0);O(U,ce,de,"↻","\\circlearrowright",!0);O(U,ce,de,"↱","\\Rsh",!0);O(U,ce,de,"⇊","\\downdownarrows",!0);O(U,ce,de,"↾","\\upharpoonright",!0);O(U,ce,de,"⇂","\\downharpoonright",!0);O(U,ce,de,"⇝","\\rightsquigarrow",!0);O(U,ce,de,"⇝","\\leadsto");O(U,ce,de,"⇛","\\Rrightarrow",!0);O(U,ce,de,"↾","\\restriction");O(U,Q,pe,"‘","`");O(U,Q,pe,"$","\\$");O(He,Q,pe,"$","\\$");O(He,Q,pe,"$","\\textdollar");O(U,Q,pe,"%","\\%");O(He,Q,pe,"%","\\%");O(U,Q,pe,"_","\\_");O(He,Q,pe,"_","\\_");O(He,Q,pe,"_","\\textunderscore");O(U,Q,pe,"∠","\\angle",!0);O(U,Q,pe,"∞","\\infty",!0);O(U,Q,pe,"′","\\prime");O(U,Q,pe,"△","\\triangle");O(U,Q,pe,"Γ","\\Gamma",!0);O(U,Q,pe,"Δ","\\Delta",!0);O(U,Q,pe,"Θ","\\Theta",!0);O(U,Q,pe,"Λ","\\Lambda",!0);O(U,Q,pe,"Ξ","\\Xi",!0);O(U,Q,pe,"Π","\\Pi",!0);O(U,Q,pe,"Σ","\\Sigma",!0);O(U,Q,pe,"Υ","\\Upsilon",!0);O(U,Q,pe,"Φ","\\Phi",!0);O(U,Q,pe,"Ψ","\\Psi",!0);O(U,Q,pe,"Ω","\\Omega",!0);O(U,Q,pe,"A","Α");O(U,Q,pe,"B","Β");O(U,Q,pe,"E","Ε");O(U,Q,pe,"Z","Ζ");O(U,Q,pe,"H","Η");O(U,Q,pe,"I","Ι");O(U,Q,pe,"K","Κ");O(U,Q,pe,"M","Μ");O(U,Q,pe,"N","Ν");O(U,Q,pe,"O","Ο");O(U,Q,pe,"P","Ρ");O(U,Q,pe,"T","Τ");O(U,Q,pe,"X","Χ");O(U,Q,pe,"¬","\\neg",!0);O(U,Q,pe,"¬","\\lnot");O(U,Q,pe,"⊤","\\top");O(U,Q,pe,"⊥","\\bot");O(U,Q,pe,"∅","\\emptyset");O(U,ce,pe,"∅","\\varnothing");O(U,Q,Et,"α","\\alpha",!0);O(U,Q,Et,"β","\\beta",!0);O(U,Q,Et,"γ","\\gamma",!0);O(U,Q,Et,"δ","\\delta",!0);O(U,Q,Et,"ϵ","\\epsilon",!0);O(U,Q,Et,"ζ","\\zeta",!0);O(U,Q,Et,"η","\\eta",!0);O(U,Q,Et,"θ","\\theta",!0);O(U,Q,Et,"ι","\\iota",!0);O(U,Q,Et,"κ","\\kappa",!0);O(U,Q,Et,"λ","\\lambda",!0);O(U,Q,Et,"μ","\\mu",!0);O(U,Q,Et,"ν","\\nu",!0);O(U,Q,Et,"ξ","\\xi",!0);O(U,Q,Et,"ο","\\omicron",!0);O(U,Q,Et,"π","\\pi",!0);O(U,Q,Et,"ρ","\\rho",!0);O(U,Q,Et,"σ","\\sigma",!0);O(U,Q,Et,"τ","\\tau",!0);O(U,Q,Et,"υ","\\upsilon",!0);O(U,Q,Et,"ϕ","\\phi",!0);O(U,Q,Et,"χ","\\chi",!0);O(U,Q,Et,"ψ","\\psi",!0);O(U,Q,Et,"ω","\\omega",!0);O(U,Q,Et,"ε","\\varepsilon",!0);O(U,Q,Et,"ϑ","\\vartheta",!0);O(U,Q,Et,"ϖ","\\varpi",!0);O(U,Q,Et,"ϱ","\\varrho",!0);O(U,Q,Et,"ς","\\varsigma",!0);O(U,Q,Et,"φ","\\varphi",!0);O(U,Q,at,"∗","*",!0);O(U,Q,at,"+","+");O(U,Q,at,"−","-",!0);O(U,Q,at,"⋅","\\cdot",!0);O(U,Q,at,"∘","\\circ",!0);O(U,Q,at,"÷","\\div",!0);O(U,Q,at,"±","\\pm",!0);O(U,Q,at,"×","\\times",!0);O(U,Q,at,"∩","\\cap",!0);O(U,Q,at,"∪","\\cup",!0);O(U,Q,at,"∖","\\setminus",!0);O(U,Q,at,"∧","\\land");O(U,Q,at,"∨","\\lor");O(U,Q,at,"∧","\\wedge",!0);O(U,Q,at,"∨","\\vee",!0);O(U,Q,pe,"√","\\surd");O(U,Q,bi,"⟨","\\langle",!0);O(U,Q,bi,"∣","\\lvert");O(U,Q,bi,"∥","\\lVert");O(U,Q,As,"?","?");O(U,Q,As,"!","!");O(U,Q,As,"⟩","\\rangle",!0);O(U,Q,As,"∣","\\rvert");O(U,Q,As,"∥","\\rVert");O(U,Q,de,"=","=");O(U,Q,de,":",":");O(U,Q,de,"≈","\\approx",!0);O(U,Q,de,"≅","\\cong",!0);O(U,Q,de,"≥","\\ge");O(U,Q,de,"≥","\\geq",!0);O(U,Q,de,"←","\\gets");O(U,Q,de,">","\\gt",!0);O(U,Q,de,"∈","\\in",!0);O(U,Q,de,"","\\@not");O(U,Q,de,"⊂","\\subset",!0);O(U,Q,de,"⊃","\\supset",!0);O(U,Q,de,"⊆","\\subseteq",!0);O(U,Q,de,"⊇","\\supseteq",!0);O(U,ce,de,"⊈","\\nsubseteq",!0);O(U,ce,de,"⊉","\\nsupseteq",!0);O(U,Q,de,"⊨","\\models");O(U,Q,de,"←","\\leftarrow",!0);O(U,Q,de,"≤","\\le");O(U,Q,de,"≤","\\leq",!0);O(U,Q,de,"<","\\lt",!0);O(U,Q,de,"→","\\rightarrow",!0);O(U,Q,de,"→","\\to");O(U,ce,de,"≱","\\ngeq",!0);O(U,ce,de,"≰","\\nleq",!0);O(U,Q,Eo," ","\\ ");O(U,Q,Eo," ","\\space");O(U,Q,Eo," ","\\nobreakspace");O(He,Q,Eo," ","\\ ");O(He,Q,Eo," "," ");O(He,Q,Eo," ","\\space");O(He,Q,Eo," ","\\nobreakspace");O(U,Q,Eo,"","\\nobreak");O(U,Q,Eo,"","\\allowbreak");O(U,Q,Eh,",",",");O(U,Q,Eh,";",";");O(U,ce,at,"⊼","\\barwedge",!0);O(U,ce,at,"⊻","\\veebar",!0);O(U,Q,at,"⊙","\\odot",!0);O(U,Q,at,"⊕","\\oplus",!0);O(U,Q,at,"⊗","\\otimes",!0);O(U,Q,pe,"∂","\\partial",!0);O(U,Q,at,"⊘","\\oslash",!0);O(U,ce,at,"⊚","\\circledcirc",!0);O(U,ce,at,"⊡","\\boxdot",!0);O(U,Q,at,"△","\\bigtriangleup");O(U,Q,at,"▽","\\bigtriangledown");O(U,Q,at,"†","\\dagger");O(U,Q,at,"⋄","\\diamond");O(U,Q,at,"⋆","\\star");O(U,Q,at,"◃","\\triangleleft");O(U,Q,at,"▹","\\triangleright");O(U,Q,bi,"{","\\{");O(He,Q,pe,"{","\\{");O(He,Q,pe,"{","\\textbraceleft");O(U,Q,As,"}","\\}");O(He,Q,pe,"}","\\}");O(He,Q,pe,"}","\\textbraceright");O(U,Q,bi,"{","\\lbrace");O(U,Q,As,"}","\\rbrace");O(U,Q,bi,"[","\\lbrack",!0);O(He,Q,pe,"[","\\lbrack",!0);O(U,Q,As,"]","\\rbrack",!0);O(He,Q,pe,"]","\\rbrack",!0);O(U,Q,bi,"(","\\lparen",!0);O(U,Q,As,")","\\rparen",!0);O(He,Q,pe,"<","\\textless",!0);O(He,Q,pe,">","\\textgreater",!0);O(U,Q,bi,"⌊","\\lfloor",!0);O(U,Q,As,"⌋","\\rfloor",!0);O(U,Q,bi,"⌈","\\lceil",!0);O(U,Q,As,"⌉","\\rceil",!0);O(U,Q,pe,"\\","\\backslash");O(U,Q,pe,"∣","|");O(U,Q,pe,"∣","\\vert");O(He,Q,pe,"|","\\textbar",!0);O(U,Q,pe,"∥","\\|");O(U,Q,pe,"∥","\\Vert");O(He,Q,pe,"∥","\\textbardbl");O(He,Q,pe,"~","\\textasciitilde");O(He,Q,pe,"\\","\\textbackslash");O(He,Q,pe,"^","\\textasciicircum");O(U,Q,de,"↑","\\uparrow",!0);O(U,Q,de,"⇑","\\Uparrow",!0);O(U,Q,de,"↓","\\downarrow",!0);O(U,Q,de,"⇓","\\Downarrow",!0);O(U,Q,de,"↕","\\updownarrow",!0);O(U,Q,de,"⇕","\\Updownarrow",!0);O(U,Q,Mr,"∐","\\coprod");O(U,Q,Mr,"⋁","\\bigvee");O(U,Q,Mr,"⋀","\\bigwedge");O(U,Q,Mr,"⨄","\\biguplus");O(U,Q,Mr,"⋂","\\bigcap");O(U,Q,Mr,"⋃","\\bigcup");O(U,Q,Mr,"∫","\\int");O(U,Q,Mr,"∫","\\intop");O(U,Q,Mr,"∬","\\iint");O(U,Q,Mr,"∭","\\iiint");O(U,Q,Mr,"∏","\\prod");O(U,Q,Mr,"∑","\\sum");O(U,Q,Mr,"⨂","\\bigotimes");O(U,Q,Mr,"⨁","\\bigoplus");O(U,Q,Mr,"⨀","\\bigodot");O(U,Q,Mr,"∮","\\oint");O(U,Q,Mr,"∯","\\oiint");O(U,Q,Mr,"∰","\\oiiint");O(U,Q,Mr,"⨆","\\bigsqcup");O(U,Q,Mr,"∫","\\smallint");O(He,Q,_d,"…","\\textellipsis");O(U,Q,_d,"…","\\mathellipsis");O(He,Q,_d,"…","\\ldots",!0);O(U,Q,_d,"…","\\ldots",!0);O(U,Q,_d,"⋯","\\@cdots",!0);O(U,Q,_d,"⋱","\\ddots",!0);O(U,Q,pe,"⋮","\\varvdots");O(He,Q,pe,"⋮","\\varvdots");O(U,Q,er,"ˊ","\\acute");O(U,Q,er,"ˋ","\\grave");O(U,Q,er,"¨","\\ddot");O(U,Q,er,"~","\\tilde");O(U,Q,er,"ˉ","\\bar");O(U,Q,er,"˘","\\breve");O(U,Q,er,"ˇ","\\check");O(U,Q,er,"^","\\hat");O(U,Q,er,"⃗","\\vec");O(U,Q,er,"˙","\\dot");O(U,Q,er,"˚","\\mathring");O(U,Q,Et,"","\\@imath");O(U,Q,Et,"","\\@jmath");O(U,Q,pe,"ı","ı");O(U,Q,pe,"ȷ","ȷ");O(He,Q,pe,"ı","\\i",!0);O(He,Q,pe,"ȷ","\\j",!0);O(He,Q,pe,"ß","\\ss",!0);O(He,Q,pe,"æ","\\ae",!0);O(He,Q,pe,"œ","\\oe",!0);O(He,Q,pe,"ø","\\o",!0);O(He,Q,pe,"Æ","\\AE",!0);O(He,Q,pe,"Œ","\\OE",!0);O(He,Q,pe,"Ø","\\O",!0);O(He,Q,er,"ˊ","\\'");O(He,Q,er,"ˋ","\\`");O(He,Q,er,"ˆ","\\^");O(He,Q,er,"˜","\\~");O(He,Q,er,"ˉ","\\=");O(He,Q,er,"˘","\\u");O(He,Q,er,"˙","\\.");O(He,Q,er,"¸","\\c");O(He,Q,er,"˚","\\r");O(He,Q,er,"ˇ","\\v");O(He,Q,er,"¨",'\\"');O(He,Q,er,"˝","\\H");O(He,Q,er,"◯","\\textcircled");var Qz={"--":!0,"---":!0,"``":!0,"''":!0};O(He,Q,pe,"–","--",!0);O(He,Q,pe,"–","\\textendash");O(He,Q,pe,"—","---",!0);O(He,Q,pe,"—","\\textemdash");O(He,Q,pe,"‘","`",!0);O(He,Q,pe,"‘","\\textquoteleft");O(He,Q,pe,"’","'",!0);O(He,Q,pe,"’","\\textquoteright");O(He,Q,pe,"“","``",!0);O(He,Q,pe,"“","\\textquotedblleft");O(He,Q,pe,"”","''",!0);O(He,Q,pe,"”","\\textquotedblright");O(U,Q,pe,"°","\\degree",!0);O(He,Q,pe,"°","\\degree");O(He,Q,pe,"°","\\textdegree",!0);O(U,Q,pe,"£","\\pounds");O(U,Q,pe,"£","\\mathsterling",!0);O(He,Q,pe,"£","\\pounds");O(He,Q,pe,"£","\\textsterling",!0);O(U,ce,pe,"✠","\\maltese");O(He,ce,pe,"✠","\\maltese");var fk='0123456789/@."';for(var pv=0;pv{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 wk[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return _it[a]}else{if(r===120485||r===120486)return wk[0];if(120486{if(bl(e.classes)!==bl(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},Jz=e=>{for(var n=0;nt&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>s&&(s=o.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Fe=function(n,t,r,s){var a=new hd(n,t,r,s);return uy(a),a},yl=(e,n,t,r)=>new hd(e,n,t,r),Zu=function(n,t,r){var s=Fe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Ke(s.height),s.maxFontSize=1,s},vit=function(n,t,r,s){var a=new Yp(n,t,r,s);return uy(a),a},No=function(n){var t=new fd(n);return uy(t),t},Qu=function(n,t){return n instanceof fd?Fe([],[n],t):n},bit=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,a=s,o=1;o{var t=Fe(["mspace"],[],n),r=ar(e,n);return t.style.marginRight=Ke(r),t},s0=(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},a2={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"}},tA={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nA=function(n,t){var[r,s,a]=tA[n],o=new xl(r),l=new wo([o],{width:Ke(s),height:Ke(a),style:"width:"+Ke(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=yl(["overlay"],[l],t);return c.height=a,c.style.height=Ke(a),c.style.width=Ke(s),c},ir={number:3,unit:"mu"},tc={number:4,unit:"mu"},fo={number:5,unit:"mu"},xit={mord:{mop:ir,mbin:tc,mrel:fo,minner:ir},mop:{mord:ir,mop:ir,mrel:fo,minner:ir},mbin:{mord:tc,mop:tc,mopen:tc,minner:tc},mrel:{mord:fo,mop:fo,mopen:fo,minner:fo},mopen:{},mclose:{mop:ir,mbin:tc,mrel:fo,minner:ir},mpunct:{mord:ir,mop:ir,mrel:fo,mopen:ir,mclose:ir,mpunct:ir,minner:ir},minner:{mord:ir,mop:ir,mbin:tc,mrel:fo,mopen:ir,mpunct:ir,minner:ir}},yit={mord:{mop:ir},mop:{mord:ir,mop:ir},mbin:{},mrel:{},mopen:{},mclose:{mop:ir},mpunct:{},minner:{mop:ir}},rA={},dp={},fp={};function tt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 b=k.classes[0],v=S.classes[0];b==="mbin"&&Sit.has(v)?k.classes[0]="mord":v==="mbin"&&wit.has(b)&&(S.classes[0]="mord")},{node:f},m,g),o2(a,(S,k)=>{var b,v,x=c2(k),y=c2(S),C=x&&y?S.hasClass("mtight")?(b=yit[x])==null?void 0:b[y]:(v=xit[x])==null?void 0:v[y]:null;if(C)return eA(C,d)},{node:f},m,g),a},o2=function(n,t,r,s,a){s&&n.push(s);for(var o=0;om=>{n.splice(f+1,0,m),o++})(o)}s&&n.pop()},sA=function(n){return n instanceof fd||n instanceof Yp||n instanceof hd&&n.hasClass("enclosing")?n:null},l2=function(n,t){var r=sA(n);if(r){var s=r.children;if(s.length){if(t==="right")return l2(s[s.length-1],"right");if(t==="left")return l2(s[0],"left")}}return n},c2=function(n,t){if(!n)return null;t&&(n=l2(n,t));var r=n.classes[0];return Cit[r]||null},Vf=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Fe(t.concat(r))},wn=function(n,t,r){if(!n)return Fe();if(dp[n.type]){var s=dp[n.type](n,t);if(r&&t.size!==r.size){s=Fe(t.sizingClasses(r),[s],t);var a=t.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new qe("Got group of unknown type: '"+n.type+"'")};function i0(e,n){var t=Fe(["base"],e,n),r=Fe(["strut"]);return r.style.height=Ke(t.height+t.depth),t.depth&&(r.style.verticalAlign=Ke(-t.depth)),t.children.unshift(r),t}function u2(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Ur(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],o=[],l=0;l0&&(a.push(i0(o,n)),o=[]),a.push(r[l]));o.length>0&&a.push(i0(o,n));var d;t?(d=i0(Ur(t,n,!0),n),d.classes=["tag"],a.push(d)):s&&a.push(s);var _=Fe(["katex-html"],a);if(_.setAttribute("aria-hidden","true"),d){var f=d.children[0];f.style.height=Ke(_.height+_.depth),_.depth&&(f.style.verticalAlign=Ke(-_.depth))}return _}function iA(e){return new fd(e)}class Ge{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=bl(this.classes));for(var r=0;r0&&(n+=' class ="'+ms(bl(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class jr{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ms(this.toText())}toText(){return this.text}}class aA{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",Ke(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Eit=new Set(["\\imath","\\jmath"]),Nit=new Set(["mrow","mtable"]),Li=function(n,t,r){return Qn[t][n]&&Qn[t][n].replace&&n.charCodeAt(0)!==55349&&!(Qz.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Qn[t][n].replace),new jr(n)},dy=function(n){return n.length===1?n[0]:new Ge("mrow",n)},zit={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"},fy=(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=zit[t];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(Eit.has(a))return null;if(Qn[r][a]){var o=Qn[r][a].replace;o&&(a=o)}var l=a2[t].fontName;return ly(a,l,r)?a2[t].variant:null};function bv(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof jr&&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 jr&&t.text===","}else return!1}var xi=function(n,t,r){if(n.length===1){var s=$n(n[0],t);return r&&s instanceof Ge&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],o,l=0;l=1&&(o.type==="mn"||bv(o))){var d=c.children[0];d instanceof Ge&&d.type==="mn"&&(d.children=[...o.children,...d.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var _=o.children[0];if(_ instanceof jr&&_.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof jr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),a.pop())}}}a.push(c),o=c}return a},wl=function(n,t,r){return dy(xi(n,t,r))},$n=function(n,t){if(!n)return new Ge("mrow");if(fp[n.type])return fp[n.type](n,t);throw new qe("Got group of unknown type: '"+n.type+"'")};function Sk(e,n,t,r,s){var a=xi(e,t),o;a.length===1&&a[0]instanceof Ge&&Nit.has(a[0].type)?o=a[0]:o=new Ge("mrow",a);var l=new Ge("annotation",[new jr(n)]);l.setAttribute("encoding","application/x-tex");var c=new Ge("semantics",[o,l]),d=new Ge("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Fe([_],[d])}var Ait=[[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]],kk=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ck=function(n,t){return t.size<2?n:Ait[n-1][t.size-1]};class mo{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||mo.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=kk[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 mo(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:Ck(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:kk[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=Ck(mo.BASESIZE,n);return this.size===t&&this.textSize===mo.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!==mo.BASESIZE?["sizing","reset-size"+this.size,"size"+mo.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=fit(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}mo.BASESIZE=6;var oA=function(n){return new mo({style:n.displayMode?$t.DISPLAY:$t.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},lA=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Fe(r,[n])}return n},Tit=function(n,t,r){var s=oA(r),a;if(r.output==="mathml")return Sk(n,t,s,r.displayMode,!0);if(r.output==="html"){var o=u2(n,s);a=Fe(["katex"],[o])}else{var l=Sk(n,t,s,r.displayMode,!1),c=u2(n,s);a=Fe(["katex"],[l,c])}return lA(a,r)},jit=function(n,t,r){var s=oA(r),a=u2(n,s),o=Fe(["katex"],[a]);return lA(o,r)},Mit={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":"="},Qp=function(n){var t=new Ge("mo",[new jr(Mit[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Rit={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]},Dit=new Set(["widehat","widecheck","widetilde","utilde"]),Jp=function(n,t){function r(){var l=4e5,c=n.label.slice(1);if(Dit.has(c)&&"base"in n){var d=n.base.type==="ordgroup"?n.base.body.length:1,_,f,m;if(d>5)c==="widehat"||c==="widecheck"?(_=420,l=2364,m=.42,f=c+"4"):(_=312,l=2340,m=.34,f="tilde4");else{var g=[1,1,2,2,3,3][d];c==="widehat"||c==="widecheck"?(l=[0,1062,2364,2364,2364][g],_=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],f=c+g):(l=[0,600,1033,2339,2340][g],_=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],f="tilde"+g)}var S=new xl(f),k=new wo([S],{width:"100%",height:Ke(m),viewBox:"0 0 "+l+" "+_,preserveAspectRatio:"none"});return{span:yl([],[k],t),minWidth:0,height:m}}else{var b=[],v=Rit[c];if(!v)throw new Error('No SVG data for "'+c+'".');var[x,y,C]=v,A=C/1e3,E=x.length,j,T;if(E===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');j=["hide-tail"],T=[v[3]]}else if(E===2)j=["halfarrow-left","halfarrow-right"],T=["xMinYMin","xMaxYMin"];else if(E===3)j=["brace-left","brace-center","brace-right"],T=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+E+" children.");for(var D=0;D0&&(s.style.minWidth=Ke(a)),s},Lit=function(n,t,r,s,a){var o,l=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(o=Fe(["stretchy",t],[],a),t==="fbox"){var c=a.color&&a.getColor();c&&(o.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(t)&&d.push(new e2({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&d.push(new e2({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new wo(d,{width:"100%",height:Ke(l)});o=yl([],[_],a)}return o.height=l,o.style.height=Ke(l),o},Oit={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Iit={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Bit(e){return e in Oit}function Yt(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 em(e){var n=tm(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 tm(e){return e&&(e.type==="atom"||Iit.hasOwnProperty(e.type))?e:null}var cA=e=>{if(e instanceof mi)return e;if(uit(e)&&e.children.length===1)return cA(e.children[0])},hy=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=Yt(e.base,"accent"),t=r.base,e.base=t,s=cit(wn(e,n)),e.base=r):(r=Yt(e,"accent"),t=r.base);var a=wn(t,n.havingCrampedStyle()),o=r.isShifty&&Co(t),l=0;if(o){var c,d;l=(c=(d=cA(a))==null?void 0:d.skew)!=null?c:0}var _=r.label==="\\c",f=_?a.height+a.depth:Math.min(a.height,n.fontMetrics().xHeight),m;if(r.isStretchy)m=Jp(r,n),m=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ke(2*l)+")",marginLeft:Ke(2*l)}:void 0}]});else{var g,S;r.label==="\\vec"?(g=nA("vec",n),S=tA.vec[1]):(g=Zp({mode:r.mode,text:r.label},n,"textord"),g=lit(g),g.italic=0,S=g.width,_&&(f+=g.depth)),m=Fe(["accent-body"],[g]);var k=r.label==="\\textcircled";k&&(m.classes.push("accent-full"),f=a.height);var b=l;k||(b-=S/2),m.style.left=Ke(b),r.label==="\\textcircled"&&(m.style.top=".2em"),m=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:m}]})}var v=Fe(["mord","accent"],[m],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},uA=(e,n)=>{var t=e.isStretchy?Qp(e.label):new Ge("mo",[Li(e.label,e.mode)]),r=new Ge("mover",[$n(e.base,n),t]);return r.setAttribute("accent","true"),r},$it=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));tt({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=hp(n[0]),r=!$it.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:hy,mathmlBuilder:uA});tt({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:hy,mathmlBuilder:uA});tt({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=wn(e.base,n),r=Jp(e,n),s=e.label==="\\utilde"?.12:0,a=xn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Fe(["mord","accentunder"],[a],n)},mathmlBuilder:(e,n)=>{var t=Qp(e.label),r=new Ge("munder",[$n(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var a0=e=>{var n=new Ge("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};tt({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=Qu(wn(e.body,r,n),n),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var o;e.below&&(r=n.havingStyle(t.sub()),o=Qu(wn(e.below,r,n),n),o.classes.push(a+"-arrow-pad"));var l=Jp(e,n),c=-n.fontMetrics().axisHeight+.5*l.height,d=-n.fontMetrics().axisHeight-.5*l.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(d-=s.depth);var _;if(o){var f=-n.fontMetrics().axisHeight+o.height+.5*l.height+.111;_=xn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:f}]})}else _=xn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return Fe(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=Qp(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=a0($n(e.body,n));if(e.below){var a=a0($n(e.below,n));r=new Ge("munderover",[t,a,s])}else r=new Ge("mover",[t,s])}else if(e.below){var o=a0($n(e.below,n));r=new Ge("munder",[t,o])}else r=a0(),r=new Ge("mover",[t,r]);return r}});function dA(e,n){var t=Ur(e.body,n,!0);return Fe([e.mclass],t,n)}function fA(e,n){var t,r=xi(e.body,n);return e.mclass==="minner"?t=new Ge("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ge("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ge("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}tt({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:Tr(s),isCharacterBox:Co(s)}},htmlBuilder:dA,mathmlBuilder:fA});var nm=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"};tt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:nm(n[0]),body:Tr(n[1]),isCharacterBox:Co(n[1])}}});tt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],a=n[0],o;r!=="\\stackrel"?o=nm(s):o="mrel";var l={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Tr(s)},c={type:"supsub",mode:a.mode,base:l,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:Co(c)}},htmlBuilder:dA,mathmlBuilder:fA});tt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:nm(n[0]),body:Tr(n[0])}},htmlBuilder(e,n){var t=Ur(e.body,n,!0),r=Fe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=xi(e.body,n),r=new Ge("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Hit={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ek=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Nk=e=>e.type==="textord"&&e.text==="@",Pit=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function Fit(e,n,t){var r=Hit[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]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},o=t.callFunction("\\Big",[a],[]),l=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,o,l]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Uit(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 qe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;aAV".includes(d))for(var f=0;f<2;f++){for(var m=!0,g=c+1;gAV=|." after @',o[c]);var S=Fit(d,_,e),k={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};r.push(k),l=Ek()}a%2===0?r.push(l):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}tt({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=Qu(wn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ke(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ge("mrow",[$n(e.label,n)]);return t=new Ge("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ge("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});tt({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=Qu(wn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ge("mrow",[$n(e.fragment,n)])}});tt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=Yt(n[0],"ordgroup"),s=r.body,a="",o=0;o=1114111)throw new qe("\\@char with invalid code point "+a);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:d}}});var hA=(e,n)=>{var t=Ur(e.body,n.withColor(e.color),!1);return No(t)},_A=(e,n)=>{var t=xi(e.body,n.withColor(e.color)),r=new Ge("mstyle",t);return r.setAttribute("mathcolor",e.color),r};tt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=Yt(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:Tr(s)}},htmlBuilder:hA,mathmlBuilder:_A});tt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=Yt(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var a=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:a}},htmlBuilder:hA,mathmlBuilder:_A});tt({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,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&Yt(s,"size").value}},htmlBuilder(e,n){var t=Fe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Ke(ar(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ge("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Ke(ar(e.size,n)))),t}});var d2={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},pA=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new qe("Expected a control sequence",e);return n},qit=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},mA=(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)};tt({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(d2[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=d2[r.text]),Yt(n.parseFunction(),"internal");throw new qe("Invalid token after macro prefix",r)}});tt({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 qe("Expected a control sequence",r);for(var a=0,o,l=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){o=n.gullet.future(),l[a].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new qe('Argument number "'+r.text+'" out of order');a++,l.push([])}else{if(r.text==="EOF")throw new qe("Expected a macro definition");l[a].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:a,delimiters:l},t===d2[t]),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=pA(n.gullet.popToken());n.gullet.consumeSpaces();var s=qit(n);return mA(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=pA(n.gullet.popToken()),s=n.gullet.popToken(),a=n.gullet.popToken();return mA(n,r,a,t==="\\\\globalfuture"),n.gullet.pushToken(a),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var Sf=function(n,t,r){var s=Qn.math[n]&&Qn.math[n].replace,a=ly(s||n,t,r);if(!a)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return a},_y=function(n,t,r,s){var a=r.havingBaseStyle(t),o=Fe(s.concat(a.sizingClasses(r)),[n],r),l=a.sizeMultiplier/r.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},gA=function(n,t,r){var s=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Ke(a),n.height-=a,n.depth+=a},Git=function(n,t,r,s,a,o){var l=Es(n,"Main-Regular",a,s),c=_y(l,t,s,o);return gA(c,s,t),c},Vit=function(n,t,r,s){return Es(n,"Size"+t+"-Regular",r,s)},vA=function(n,t,r,s,a,o){var l=Vit(n,t,a,s),c=_y(Fe(["delimsizing","size"+t],[l],s),$t.TEXT,s,o);return r&&gA(c,s,$t.TEXT),c},xv=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Fe(["delimsizinginner",s],[Fe([],[Es(n,t,r)])]);return{type:"elem",elem:a}},yv=function(n,t,r){var s=ka["Size4-Regular"][n.charCodeAt(0)]?ka["Size4-Regular"][n.charCodeAt(0)][4]:ka["Size1-Regular"][n.charCodeAt(0)][4],a=new xl("inner",tit(n,Math.round(1e3*t))),o=new wo([a],{width:Ke(s),height:Ke(t),style:"width:"+Ke(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),l=yl([],[o],r);return l.height=t,l.style.height=Ke(t),l.style.width=Ke(s),{type:"elem",elem:l}},f2=.008,o0={type:"kern",size:-1*f2},Wit=new Set(["|","\\lvert","\\rvert","\\vert"]),Kit=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),bA=function(n,t,r,s,a,o){var l,c,d,_,f="",m=0;l=d=_=n,c=null;var g="Size1-Regular";n==="\\uparrow"?d=_="⏐":n==="\\Uparrow"?d=_="‖":n==="\\downarrow"?l=d="⏐":n==="\\Downarrow"?l=d="‖":n==="\\updownarrow"?(l="\\uparrow",d="⏐",_="\\downarrow"):n==="\\Updownarrow"?(l="\\Uparrow",d="‖",_="\\Downarrow"):Wit.has(n)?(d="∣",f="vert",m=333):Kit.has(n)?(d="∥",f="doublevert",m=556):n==="["||n==="\\lbrack"?(l="⎡",d="⎢",_="⎣",g="Size4-Regular",f="lbrack",m=667):n==="]"||n==="\\rbrack"?(l="⎤",d="⎥",_="⎦",g="Size4-Regular",f="rbrack",m=667):n==="\\lfloor"||n==="⌊"?(d=l="⎢",_="⎣",g="Size4-Regular",f="lfloor",m=667):n==="\\lceil"||n==="⌈"?(l="⎡",d=_="⎢",g="Size4-Regular",f="lceil",m=667):n==="\\rfloor"||n==="⌋"?(d=l="⎥",_="⎦",g="Size4-Regular",f="rfloor",m=667):n==="\\rceil"||n==="⌉"?(l="⎤",d=_="⎥",g="Size4-Regular",f="rceil",m=667):n==="("||n==="\\lparen"?(l="⎛",d="⎜",_="⎝",g="Size4-Regular",f="lparen",m=875):n===")"||n==="\\rparen"?(l="⎞",d="⎟",_="⎠",g="Size4-Regular",f="rparen",m=875):n==="\\{"||n==="\\lbrace"?(l="⎧",c="⎨",_="⎩",d="⎪",g="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(l="⎫",c="⎬",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(l="⎧",_="⎩",d="⎪",g="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(l="⎫",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(l="⎧",_="⎭",d="⎪",g="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(l="⎫",_="⎩",d="⎪",g="Size4-Regular");var S=Sf(l,g,a),k=S.height+S.depth,b=Sf(d,g,a),v=b.height+b.depth,x=Sf(_,g,a),y=x.height+x.depth,C=0,A=1;if(c!==null){var E=Sf(c,g,a);C=E.height+E.depth,A=2}var j=k+y+C,T=Math.max(0,Math.ceil((t-j)/(A*v))),D=j+T*A*v,I=s.fontMetrics().axisHeight;r&&(I*=s.sizeMultiplier);var P=D/2-I,H=[];if(f.length>0){var F=D-k-y,V=Math.round(D*1e3),X=nit(f,Math.round(F*1e3)),W=new xl(f,X),Z=Ke(m/1e3),J=Ke(V/1e3),B=new wo([W],{width:Z,height:J,viewBox:"0 0 "+m+" "+V}),L=yl([],[B],s);L.height=V/1e3,L.style.width=Z,L.style.height=J,H.push({type:"elem",elem:L})}else{if(H.push(xv(_,g,a)),H.push(o0),c===null){var $=D-k-y+2*f2;H.push(yv(d,$,s))}else{var K=(D-k-y-C)/2+2*f2;H.push(yv(d,K,s)),H.push(o0),H.push(xv(c,g,a)),H.push(o0),H.push(yv(d,K,s))}H.push(o0),H.push(xv(l,g,a))}var G=s.havingBaseStyle($t.TEXT),re=xn({positionType:"bottom",positionData:P,children:H});return _y(Fe(["delimsizing","mult"],[re],G),$t.TEXT,s,o)},wv=80,Sv=.08,kv=function(n,t,r,s,a){var o=eit(n,s,r),l=new xl(n,o),c=new wo([l],{width:"400em",height:Ke(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return yl(["hide-tail"],[c],a)},Yit=function(n,t){var r=t.havingBaseSizing(),s=kA("\\surd",n*r.sizeMultiplier,SA,r),a=r.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l,c,d,_,f;return s.type==="small"?(_=1e3+1e3*o+wv,n<1?a=1:n<1.4&&(a=.7),c=(1+o+Sv)/a,d=(1+o)/a,l=kv("sqrtMain",c,_,o,t),l.style.minWidth="0.853em",f=.833/a):s.type==="large"?(_=(1e3+wv)*Mf[s.size],d=(Mf[s.size]+o)/a,c=(Mf[s.size]+o+Sv)/a,l=kv("sqrtSize"+s.size,c,_,o,t),l.style.minWidth="1.02em",f=1/a):(c=n+o+Sv,d=n+o,_=Math.floor(1e3*n+o)+wv,l=kv("sqrtTall",c,_,o,t),l.style.minWidth="0.742em",f=1.056),l.height=d,l.style.height=Ke(c),{span:l,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},xA=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Xit=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),yA=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Mf=[0,1.2,1.8,2.4,3],wA=function(n,t,r,s,a){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),xA.has(n)||yA.has(n))return vA(n,t,!1,r,s,a);if(Xit.has(n))return bA(n,Mf[t],!1,r,s,a);throw new qe("Illegal delimiter: '"+n+"'")},Zit=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Qit=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"stack"}],SA=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Jit=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.")},kA=function(n,t,r,s){for(var a=Math.min(2,3-s.style.size),o=a;ot)return l}return r[r.length-1]},h2=function(n,t,r,s,a,o){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var l;yA.has(n)?l=Zit:xA.has(n)?l=SA:l=Qit;var c=kA(n,t,l,s);return c.type==="small"?Git(n,c.style,r,s,a,o):c.type==="large"?vA(n,c.size,r,s,a,o):bA(n,t,r,s,a,o)},Cv=function(n,t,r,s,a,o){var l=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,d=5/s.fontMetrics().ptPerEm,_=Math.max(t-l,r+l),f=Math.max(_/500*c,2*_-d);return h2(n,f,!0,s,a,o)},zk={"\\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}},eat=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 Ak(e){return"isMiddle"in e}function rm(e,n){var t=tm(e);if(t&&eat.has(t.text))return t;throw t?new qe("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new qe("Invalid delimiter type '"+e.type+"'",e)}tt({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=rm(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:zk[e.funcName].size,mclass:zk[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Fe([e.mclass]):wA(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Li(e.delim,e.mode));var t=new Ge("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Ke(Mf[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function Tk(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}tt({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 qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:rm(n[0],e).text,color:t}}});tt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=rm(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Yt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,n)=>{Tk(e);for(var t=Ur(e.body,n,!0,["mopen","mclose"]),r=0,s=0,a=!1,o=0;o{Tk(e);var t=xi(e.body,n);if(e.left!=="."){var r=new Ge("mo",[Li(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ge("mo",[Li(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return dy(t)}});tt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=rm(n[0],e);if(!e.parser.leftrightDepth)throw new qe("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Vf(n,[]):(t=wA(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Li("|","text"):Li(e.delim,e.mode),r=new Ge("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var sm=(e,n)=>{var t=Qu(wn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,a,o,l=Co(e.body);if(r==="sout")a=Fe(["stretchy","sout"]),a.height=n.fontMetrics().defaultRuleThickness/s,o=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=ar({number:.6,unit:"pt"},n),d=ar({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var f=t.height+t.depth+c+d;t.style.paddingLeft=Ke(f/2+c);var m=Math.floor(1e3*f*s),g=Qst(m),S=new wo([new xl("phase",g)],{width:"400em",height:Ke(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=yl(["hide-tail"],[S],n),a.style.height=Ke(f),o=t.depth+c+d}else{/cancel/.test(r)?l||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=k):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*v,b=Math.max(0,.25-t.depth)):(k=l?.2:0,b=k),a=Lit(t,r,k,b,n),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=Ke(v)):r==="angl"&&v!==.049&&(a.style.borderTopWidth=Ke(v),a.style.borderRightWidth=Ke(v)),o=t.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=xn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];x=xn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:y}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!l?Fe(["mord","cancel-lap"],[x],n):Fe(["mord"],[x],n)},im=(e,n)=>{var t,r=new Ge(e.label.includes("colorbox")?"mpadded":"menclose",[$n(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: "+Ke(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};tt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Yt(n[0],"color-token").color,o=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:o}},htmlBuilder:sm,mathmlBuilder:im});tt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Yt(n[0],"color-token").color,o=Yt(n[1],"color-token").color,l=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:sm,mathmlBuilder:im});tt({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]}}});tt({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:sm,mathmlBuilder:im});tt({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:sm,mathmlBuilder:im});tt({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 CA={};function Ra(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 qe("{"+e.envName+"} can be used only in display mode.")},tat=new Set(["gather","gather*"]);function py(e){if(!e.includes("ed"))return!e.includes("*")}function Tl(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:o,colSeparationType:l,autoTag:c,singleRow:d,emptySingleRow:_,maxNumCols:f,leqno:m}=n;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new qe("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var S=[],k=[S],b=[],v=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ji("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),v.push(jk(e));;){var A=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:A};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),S.push(E);var j=e.fetch().text;if(j==="&"){if(f&&S.length===f){if(d||l)throw new qe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){C(),S.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(k.length>1||!_)&&k.pop(),v.length0&&(y+=.25),d.push({pos:y,isDashed:We[st]})}for(C(o[0]),r=0;r0&&(P+=x,jWe))for(r=0;r=l)){var te=void 0;if(s>0||n.hskipBeforeAndAfter){var le,ge;te=(le=(ge=G)==null?void 0:ge.pregap)!=null?le:m,te!==0&&(X=Fe(["arraycolsep"],[]),X.style.width=Ke(te),V.push(X))}var ue=[];for(r=0;r0){for(var At=Zu("hline",t,_),vt=Zu("hdashline",t,_),Ot=[{type:"elem",elem:wt,shift:0}];d.length>0;){var St=d.pop(),kt=St.pos-H;St.isDashed?Ot.push({type:"elem",elem:vt,shift:kt}):Ot.push({type:"elem",elem:At,shift:kt})}wt=xn({positionType:"individualShift",children:Ot})}if(Z.length===0)return Fe(["mord"],[wt],t);var xe=xn({positionType:"individualShift",children:Z}),je=Fe(["tag"],[xe],t);return No([wt,je])},nat={c:"center ",l:"left ",r:"right "},La=function(n,t){for(var r=[],s=new Ge("mtd",[],["mtr-glue"]),a=new Ge("mtd",[],["mml-eqn-num"]),o=0;o0){var S=n.cols,k="",b=!1,v=0,x=S.length;S[0].type==="separator"&&(m+="top ",v=1),S[S.length-1].type==="separator"&&(m+="bottom ",x-=1);for(var y=v;y0?"left ":"",m+=D[D.length-1].length>0?"right ":"";for(var I=1;I0&&g&&(b=1),r[S]={type:"align",align:k,pregap:b,postgap:0}}return o.colSeparationType=g?"align":"alignat",o};Ra({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=tm(n[0]),r=t?[n[0]]:Yt(n[0],"ordgroup").body,s=r.map(function(o){var l=em(o),c=l.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new qe("Unknown column alignment: "+c,o)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Tl(e.parser,a,my(e.envName))},htmlBuilder:Da,mathmlBuilder:La});Ra({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 qe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var a=Tl(e.parser,r,my(e.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[a],left:n[0],right:n[1],rightColor:void 0}:a},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Tl(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=tm(n[0]),r=t?[n[0]]:Yt(n[0],"ordgroup").body,s=r.map(function(l){var c=em(l),d=c.text;if("lc".includes(d))return{type:"align",align:d};throw new qe("Unknown column alignment: "+d,l)});if(s.length>1)throw new qe("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},o=Tl(e.parser,a,"script");if(o.body.length>0&&o.body[0].length>1)throw new qe("{subarray} can contain only one column");return o},htmlBuilder:Da,mathmlBuilder:La});Ra({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=Tl(e.parser,n,my(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:zA,htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){tat.has(e.envName)&&am(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:py(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Tl(e.parser,n,"display")},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:zA,htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){am(e);var n={autoTag:py(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Tl(e.parser,n,"display")},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["CD"],props:{numArgs:0},handler(e){return am(e),Uit(e.parser)},htmlBuilder:Da,mathmlBuilder:La});ne("\\nonumber","\\gdef\\@eqnsw{0}");ne("\\notag","\\nonumber");tt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new qe(e.funcName+" valid only within array environment")}});var Mk=CA;tt({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 qe("Invalid environment name",s);for(var a="",o=0;o{var t=e.font,r=n.withFont(t);return wn(e.body,r)},TA=(e,n)=>{var t=e.font,r=n.withFont(t);return $n(e.body,r)},Rk={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};tt({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=hp(n[0]),a=r;return a in Rk&&(a=Rk[a]),{type:"font",mode:t.mode,font:a.slice(1),body:s}},htmlBuilder:AA,mathmlBuilder:TA});tt({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:nm(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:Co(r)}}});tt({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:a}=t,o=t.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:AA,mathmlBuilder:TA});var rat=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),a;a=n.havingStyle(r);var o=wn(e.numer,a,n);if(e.continued){var l=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;o.height=o.height0?S=3*m:S=7*m,k=n.fontMetrics().denom1):(f>0?(g=n.fontMetrics().num2,S=m):(g=n.fontMetrics().num3,S=3*m),k=n.fontMetrics().denom2);var b;if(_){var x=n.fontMetrics().axisHeight;g-o.depth-(x+.5*f){var t=new Ge("mfrac",[$n(e.numer,n),$n(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=ar(e.barSize,n);t.setAttribute("linethickness",Ke(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new Ge("mo",[new jr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),e.rightDelim!=null){var o=new Ge("mo",[new jr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return dy(s)}return t},jA=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};tt({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],a=n[1],o,l=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",c=")";break;case"\\\\bracefrac":o=!1,l="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,l="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var d=r==="\\cfrac",_=null;return d||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),jA({type:"genfrac",mode:t.mode,numer:s,denom:a,continued:d,hasBarLine:o,leftDelim:l,rightDelim:c,barSize:null},_)},htmlBuilder:rat,mathmlBuilder:sat});tt({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 Dk=["display","text","script","scriptscript"],Lk=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};tt({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],a=hp(n[0]),o=a.type==="atom"&&a.family==="open"?Lk(a.text):null,l=hp(n[1]),c=l.type==="atom"&&l.family==="close"?Lk(l.text):null,d=Yt(n[2],"size"),_,f=null;d.isBlank?_=!0:(f=d.value,_=f.number>0);var m=null,g=n[3];if(g.type==="ordgroup"){if(g.body.length>0){var S=Yt(g.body[0],"textord");m=Dk[Number(S.text)]}}else g=Yt(g,"textord"),m=Dk[Number(g.text)];return jA({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:f,leftDelim:o,rightDelim:c},m)}});tt({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:Yt(n[0],"size").value,token:s}}});tt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=Yt(n[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=n[2],l=a.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}}});var MA=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?wn(e.sup,n.havingStyle(t.sup()),n):wn(e.sub,n.havingStyle(t.sub()),n),s=Yt(e.base,"horizBrace")):s=Yt(e,"horizBrace");var a=wn(s.base,n.havingBaseStyle($t.DISPLAY)),o=Jp(s,n),l;if(s.isOver?l=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]}):l=xn({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var c=Fe(["minner",s.isOver?"mover":"munder"],[l],n);s.isOver?l=xn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):l=xn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Fe(["minner",s.isOver?"mover":"munder"],[l],n)},iat=(e,n)=>{var t=Qp(e.label);return new Ge(e.isOver?"mover":"munder",[$n(e.base,n),t])};tt({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:MA,mathmlBuilder:iat});tt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=Yt(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Tr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Ur(e.body,n,!1);return vit(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=wl(e.body,n);return t instanceof Ge||(t=new Ge("mrow",[t])),t.setAttribute("href",e.href),t}});tt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=Yt(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],a=0;a{var{parser:t,funcName:r,token:s}=e,a=Yt(n[0],"raw").string,o=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,c={};switch(r){case"\\htmlClass":c.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":c.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":c.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var d=a.split(","),_=0;_{var t=Ur(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Fe(r,t,n);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,n)=>wl(e.body,n)});tt({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:Tr(n[0]),mathml:Tr(n[1])}},htmlBuilder:(e,n)=>{var t=Ur(e.html,n,!1);return No(t)},mathmlBuilder:(e,n)=>wl(e.mathml,n)});var Ev=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 qe("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Kz(r))throw new qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};tt({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"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(t[0])for(var c=Yt(t[0],"raw").string,d=c.split(","),_=0;_{var t=ar(e.height,n),r=0;e.totalheight.number>0&&(r=ar(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=ar(e.width,n));var a={height:Ke(t+r)};s>0&&(a.width=Ke(s)),r>0&&(a.verticalAlign=Ke(-r));var o=new ait(e.src,e.alt,a);return o.height=t,o.depth=r,o},mathmlBuilder:(e,n)=>{var t=new Ge("mglyph",[]);t.setAttribute("alt",e.alt);var r=ar(e.height,n),s=0;if(e.totalheight.number>0&&(s=ar(e.totalheight,n)-r,t.setAttribute("valign",Ke(-s))),t.setAttribute("height",Ke(r+s)),e.width.number>0){var a=ar(e.width,n);t.setAttribute("width",Ke(a))}return t.setAttribute("src",e.src),t}});tt({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=Yt(n[0],"size");if(t.settings.strict){var a=r[1]==="m",o=s.value.unit==="mu";a?(o||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")):o&&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 eA(e.dimension,n)},mathmlBuilder(e,n){var t=ar(e.dimension,n);return new aA(t)}});tt({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=Fe([],[wn(e.body,n)]),t=Fe(["inner"],[t],n)):t=Fe(["inner"],[wn(e.body,n)]);var r=Fe(["fix"],[]),s=Fe([e.alignment],[t,r],n),a=Fe(["strut"]);return a.style.height=Ke(s.height+s.depth),s.depth&&(a.style.verticalAlign=Ke(-s.depth)),s.children.unshift(a),s=Fe(["thinbox"],[s],n),Fe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ge("mpadded",[$n(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}});tt({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 a=t==="\\("?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});tt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new qe("Mismatched "+e.funcName)}});var Ok=(e,n)=>{switch(n.style.size){case $t.DISPLAY.size:return e.display;case $t.TEXT.size:return e.text;case $t.SCRIPT.size:return e.script;case $t.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};tt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Tr(n[0]),text:Tr(n[1]),script:Tr(n[2]),scriptscript:Tr(n[3])}},htmlBuilder:(e,n)=>{var t=Ok(e,n),r=Ur(t,n,!1);return No(r)},mathmlBuilder:(e,n)=>{var t=Ok(e,n);return wl(t,n)}});var RA=(e,n,t,r,s,a,o)=>{e=Fe([],[e]);var l=t&&Co(t),c,d;if(n){var _=wn(n,r.havingStyle(s.sup()),r);d={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var f=wn(t,r.havingStyle(s.sub()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var m;if(d&&c){var g=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;m=xn({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ke(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ke(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var S=e.height-o;m=xn({positionType:"top",positionData:S,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ke(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(d){var k=e.depth+o;m=xn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ke(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[m];if(c&&a!==0&&!l){var v=Fe(["mspace"],[],r);v.style.marginRight=Ke(a),b.unshift(v)}return Fe(["mop","op-limits"],b,r)},DA=new Set(["\\smallint"]),pd=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Yt(e.base,"op"),s=!0):a=Yt(e,"op");var o=n.style,l=!1;o.size===$t.DISPLAY.size&&a.symbol&&!DA.has(a.name)&&(l=!0);var c,d;if(a.symbol){var _=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),c=Es(a.name,_,"math",n,["mop","op-symbol",l?"large-op":"small-op"]),d=c.italic,f.length>0){var m=nA(f+"Size"+(l?"2":"1"),n);c=xn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:m,shift:l?.08:0}]}),a.name="\\"+f,c.classes.unshift("mop"),c.italic=d}}else if(a.body){var g=Ur(a.body,n,!0);g.length===1&&g[0]instanceof mi?(c=g[0],c.classes[0]="mop"):c=Fe(["mop"],g,n)}else{for(var S=[],k=1;k{var t;if(e.symbol)t=new Ge("mo",[Li(e.name,e.mode)]),DA.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ge("mo",xi(e.body,n));else{t=new Ge("mi",[new jr(e.name.slice(1))]);var r=new Ge("mo",[Li("⁡","text")]);e.parentIsSupSub?t=new Ge("mrow",[t,r]):t=iA([t,r])}return t},aat={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};tt({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=aat[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:pd,mathmlBuilder:Nh});tt({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:Tr(r)}},htmlBuilder:pd,mathmlBuilder:Nh});var oat={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};tt({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:pd,mathmlBuilder:Nh});tt({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:pd,mathmlBuilder:Nh});tt({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=oat[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:pd,mathmlBuilder:Nh});var LA=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Yt(e.base,"operatorname"),s=!0):a=Yt(e,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(f=>{var m="text"in f?f.text:void 0;return typeof m=="string"?{type:"textord",mode:f.mode,text:m}:f}),c=Ur(l,n.withFont("mathrm"),!0),d=0;d{for(var t=xi(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new jr(l)]}var c=new Ge("mi",t);c.setAttribute("mathvariant","normal");var d=new Ge("mo",[Li("⁡","text")]);return e.parentIsSupSub?new Ge("mrow",[c,d]):iA([c,d])};tt({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:Tr(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:LA,mathmlBuilder:lat});ne("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Tc({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?No(Ur(e.body,n,!1)):Fe(["mord"],Ur(e.body,n,!0),n)},mathmlBuilder(e,n){return wl(e.body,n,!0)}});tt({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=wn(e.body,n.havingCrampedStyle()),r=Zu("overline-line",n),s=n.fontMetrics().defaultRuleThickness,a=xn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Fe(["mord","overline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new jr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("mover",[$n(e.body,n),t]);return r.setAttribute("accent","true"),r}});tt({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:Tr(r)}},htmlBuilder:(e,n)=>{var t=Ur(e.body,n.withPhantom(),!1);return No(t)},mathmlBuilder:(e,n)=>{var t=xi(e.body,n);return new Ge("mphantom",t)}});ne("\\hphantom","\\smash{\\phantom{#1}}");tt({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=Fe(["inner"],[wn(e.body,n.withPhantom())]),r=Fe(["fix"],[]);return Fe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=xi(Tr(e.body),n),r=new Ge("mphantom",t),s=new Ge("mpadded",[r]);return s.setAttribute("width","0px"),s}});tt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=Yt(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=wn(e.body,n),r=ar(e.dy,n);return xn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[$n(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});tt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});tt({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],a=Yt(n[0],"size"),o=Yt(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&Yt(s,"size").value,width:a.value,height:o.value}},htmlBuilder(e,n){var t=Fe(["mord","rule"],[],n),r=ar(e.width,n),s=ar(e.height,n),a=e.shift?ar(e.shift,n):0;return t.style.borderRightWidth=Ke(r),t.style.borderTopWidth=Ke(s),t.style.bottom=Ke(a),t.width=r,t.height=s+a,t.depth=-a,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=ar(e.width,n),r=ar(e.height,n),s=e.shift?ar(e.shift,n):0,a=n.color&&n.getColor()||"black",o=new Ge("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",Ke(t)),o.setAttribute("height",Ke(r));var l=new Ge("mpadded",[o]);return s>=0?l.setAttribute("height",Ke(s)):(l.setAttribute("height",Ke(s)),l.setAttribute("depth",Ke(-s))),l.setAttribute("voffset",Ke(s)),l}});function OA(e,n,t){for(var r=Ur(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,a=0;a{var t=n.havingSize(e.size);return OA(e.body,t,n)};tt({type:"sizing",names:Ik,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:Ik.indexOf(r)+1,body:a}},htmlBuilder:cat,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=xi(e.body,t),s=new Ge("mstyle",r);return s.setAttribute("mathsize",Ke(t.sizeMultiplier)),s}});tt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,a=!1,o=t[0]&&Yt(t[0],"ordgroup");if(o)for(var l,c=0;c{var t=Fe([],[wn(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 Fe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ge("mpadded",[$n(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});tt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],a=n[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,n){var t=wn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Qu(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,a=s;n.style.id<$t.TEXT.id&&(a=n.fontMetrics().xHeight);var o=s+a/4,l=t.height+t.depth+o+s,{span:c,ruleWidth:d,advanceWidth:_}=Yit(l,n),f=c.height-d;f>t.height+t.depth+o&&(o=(o+f-t.height-t.depth)/2);var m=c.height-t.height-o-d;t.style.paddingLeft=Ke(_);var g=xn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+m)},{type:"elem",elem:c},{type:"kern",size:d}]});if(e.index){var S=n.havingStyle($t.SCRIPTSCRIPT),k=wn(e.index,S,n),b=.6*(g.height-g.depth),v=xn({positionType:"shift",positionData:-b,children:[{type:"elem",elem:k}]}),x=Fe(["root"],[v]);return Fe(["mord","sqrt"],[x,g],n)}else return Fe(["mord","sqrt"],[g],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ge("mroot",[$n(t,n),$n(r,n)]):new Ge("msqrt",[$n(t,n)])}});var _2={display:$t.DISPLAY,text:$t.TEXT,script:$t.SCRIPT,scriptscript:$t.SCRIPTSCRIPT};function uat(e){return e in _2}tt({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,a=s.parseExpression(!0,t),o=r.slice(1,r.length-5);if(!uat(o))throw new Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:a}},htmlBuilder(e,n){var t=_2[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),OA(e.body,r,n)},mathmlBuilder(e,n){var t=_2[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=xi(e.body,r),a=new Ge("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});var dat=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===$t.DISPLAY.size||r.alwaysHandleSupSub);return s?pd:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(t.style.size===$t.DISPLAY.size||r.limits);return a?LA:null}else{if(r.type==="accent")return Co(r.base)?hy:null;if(r.type==="horizBrace"){var o=!n.sub;return o===r.isOver?MA:null}else return null}else return null};Tc({type:"supsub",htmlBuilder(e,n){var t=dat(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:a}=e,o=wn(r,n),l,c,d=n.fontMetrics(),_=0,f=0,m=r&&Co(r);if(s){var g=n.havingStyle(n.style.sup());l=wn(s,g,n),m||(_=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/n.sizeMultiplier)}if(a){var S=n.havingStyle(n.style.sub());c=wn(a,S,n),m||(f=o.depth+S.fontMetrics().subDrop*S.sizeMultiplier/n.sizeMultiplier)}var k;n.style===$t.DISPLAY?k=d.sup1:n.style.cramped?k=d.sup3:k=d.sup2;var b=n.sizeMultiplier,v=Ke(.5/d.ptPerEm/b),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof mi||y){var C;x=Ke(-((C=o.italic)!=null?C:0))}}var A;if(l&&c){_=Math.max(_,k,l.depth+.25*d.xHeight),f=Math.max(f,d.sub2);var E=d.defaultRuleThickness,j=4*E;if(_-l.depth-(c.height-f)0&&(_+=T,f-=T)}var D=[{type:"elem",elem:c,shift:f,marginRight:v,marginLeft:x},{type:"elem",elem:l,shift:-_,marginRight:v}];A=xn({positionType:"individualShift",children:D})}else if(c){f=Math.max(f,d.sub1,c.height-.8*d.xHeight);var I=[{type:"elem",elem:c,marginLeft:x,marginRight:v}];A=xn({positionType:"shift",positionData:f,children:I})}else if(l)_=Math.max(_,k,l.depth+.25*d.xHeight),A=xn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:l,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var P=c2(o,"right")||"mord";return Fe([P],[o,Fe(["msupsub"],[A])],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 a=[$n(e.base,n)];e.sub&&a.push($n(e.sub,n)),e.sup&&a.push($n(e.sup,n));var o;if(t)o=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&n.style===$t.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(n.style===$t.DISPLAY||d.limits)?o="munderover":o="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===$t.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===$t.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===$t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===$t.DISPLAY)?o="mover":o="msup"}return new Ge(o,a)}});Tc({type:"atom",htmlBuilder(e,n){return cy(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ge("mo",[Li(e.text,e.mode)]);if(e.family==="bin"){var r=fy(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 IA={mi:"italic",mn:"normal",mtext:"normal"};Tc({type:"mathord",htmlBuilder(e,n){return Zp(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ge("mi",[Li(e.text,e.mode,n)]),r=fy(e,n)||"italic";return r!==IA[t.type]&&t.setAttribute("mathvariant",r),t}});Tc({type:"textord",htmlBuilder(e,n){return Zp(e,n,"textord")},mathmlBuilder(e,n){var t=Li(e.text,e.mode,n),r=fy(e,n)||"normal",s;return e.mode==="text"?s=new Ge("mtext",[t]):/[0-9]/.test(e.text)?s=new Ge("mn",[t]):e.text==="\\prime"?s=new Ge("mo",[t]):s=new Ge("mi",[t]),r!==IA[s.type]&&s.setAttribute("mathvariant",r),s}});var Nv={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},zv={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Tc({type:"spacing",htmlBuilder(e,n){if(zv.hasOwnProperty(e.text)){var t=zv[e.text].className||"";if(e.mode==="text"){var r=Zp(e,n,"textord");return r.classes.push(t),r}else return Fe(["mspace",t],[cy(e.text,e.mode,n)],n)}else{if(Nv.hasOwnProperty(e.text))return Fe(["mspace",Nv[e.text]],[],n);throw new qe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(zv.hasOwnProperty(e.text))t=new Ge("mtext",[new jr(" ")]);else{if(Nv.hasOwnProperty(e.text))return new Ge("mspace");throw new qe('Unknown type of space "'+e.text+'"')}return t}});var Bk=()=>{var e=new Ge("mtd",[]);return e.setAttribute("width","50%"),e};Tc({type:"tag",mathmlBuilder(e,n){var t=new Ge("mtable",[new Ge("mtr",[Bk(),new Ge("mtd",[wl(e.body,n)]),Bk(),new Ge("mtd",[wl(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var $k={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Hk={"\\textbf":"textbf","\\textmd":"textmd"},fat={"\\textit":"textit","\\textup":"textup"},Pk=(e,n)=>{var t=e.font;if(t){if($k[t])return n.withTextFontFamily($k[t]);if(Hk[t])return n.withTextFontWeight(Hk[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(fat[t])};tt({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:Tr(s),font:r}},htmlBuilder(e,n){var t=Pk(e,n),r=Ur(e.body,t,!0);return Fe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=Pk(e,n);return wl(e.body,t)}});tt({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=wn(e.body,n),r=Zu("underline-line",n),s=n.fontMetrics().defaultRuleThickness,a=xn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Fe(["mord","underline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new jr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("munder",[$n(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});tt({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=wn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return xn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[$n(e.body,n)],["vcenter"]);return new Ge("mrow",[t])}});tt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=Fk(e),r=[],s=n.havingStyle(n.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),gl=rA,BA=`[ \r + ]`,hat="\\\\[a-zA-Z@]+",_at="\\\\[^\uD800-\uDFFF]",pat="("+hat+")"+BA+"*",mat=`\\\\( |[ \r ]+ -?)[ \r ]*`,h2="[̀-ͯ]",ast=new RegExp(h2+"+$"),ost="("+CA+"+)|"+(ist+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(h2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(h2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+sst)+("|"+rst+")");class B8{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(ost,"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 Ji("EOF",new qs(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new qe("Unexpected character: '"+n[t]+"'",new Ji(n[t],new qs(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=n.indexOf(` -`,this.tokenRegex.lastIndex);return a===-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=a+1,this.lex()}return new Ji(s,new qs(this,t,this.tokenRegex.lastIndex))}}class lst{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 qe("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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(n)&&(a[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var cst=hA;ne("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ne("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ne("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ne("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ne("\\@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}});ne("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ne("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var $8={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};ne("\\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 qe("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=$8[n.text],r==null||r>=t)throw new qe("Invalid base-"+t+" digit "+n.text);for(var s;(s=$8[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new qe("\\newcommand's first argument must be a macro name");var a=s[0].text,o=e.isDefined(a);if(o&&!n)throw new qe("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!t)throw new qe("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new qe("Invalid number of arguments: "+c);l=parseInt(c),s=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:s,numArgs:l}),""};ne("\\newcommand",e=>fy(e,!1,!0,!1));ne("\\renewcommand",e=>fy(e,!0,!1,!1));ne("\\providecommand",e=>fy(e,!0,!0,!0));ne("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ne("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ne("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),vl[t],Qn.math[t],Qn.text[t]),""});ne("\\bgroup","{");ne("\\egroup","}");ne("~","\\nobreakspace");ne("\\lq","`");ne("\\rq","'");ne("\\aa","\\r a");ne("\\AA","\\r A");ne("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ne("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ne("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ne("ℬ","\\mathscr{B}");ne("ℰ","\\mathscr{E}");ne("ℱ","\\mathscr{F}");ne("ℋ","\\mathscr{H}");ne("ℐ","\\mathscr{I}");ne("ℒ","\\mathscr{L}");ne("ℳ","\\mathscr{M}");ne("ℛ","\\mathscr{R}");ne("ℭ","\\mathfrak{C}");ne("ℌ","\\mathfrak{H}");ne("ℨ","\\mathfrak{Z}");ne("\\Bbbk","\\Bbb{k}");ne("\\llap","\\mathllap{\\textrm{#1}}");ne("\\rlap","\\mathrlap{\\textrm{#1}}");ne("\\clap","\\mathclap{\\textrm{#1}}");ne("\\mathstrut","\\vphantom{(}");ne("\\underbar","\\underline{\\text{#1}}");ne("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ne("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ne("\\ne","\\neq");ne("≠","\\neq");ne("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ne("∉","\\notin");ne("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ne("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ne("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ne("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ne("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ne("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ne("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ne("⟂","\\perp");ne("‼","\\mathclose{!\\mkern-0.8mu!}");ne("∌","\\notni");ne("⌜","\\ulcorner");ne("⌝","\\urcorner");ne("⌞","\\llcorner");ne("⌟","\\lrcorner");ne("©","\\copyright");ne("®","\\textregistered");ne("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ne("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ne("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ne("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ne("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ne("⋮","\\vdots");ne("\\varGamma","\\mathit{\\Gamma}");ne("\\varDelta","\\mathit{\\Delta}");ne("\\varTheta","\\mathit{\\Theta}");ne("\\varLambda","\\mathit{\\Lambda}");ne("\\varXi","\\mathit{\\Xi}");ne("\\varPi","\\mathit{\\Pi}");ne("\\varSigma","\\mathit{\\Sigma}");ne("\\varUpsilon","\\mathit{\\Upsilon}");ne("\\varPhi","\\mathit{\\Phi}");ne("\\varPsi","\\mathit{\\Psi}");ne("\\varOmega","\\mathit{\\Omega}");ne("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ne("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ne("\\boxed","\\fbox{$\\displaystyle{#1}$}");ne("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ne("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ne("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ne("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ne("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var H8={",":"\\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"},ust=new Set(["bin","rel"]);ne("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in H8?n=H8[t]:(t.slice(0,4)==="\\not"||t in Qn.math&&ust.has(Qn.math[t].group))&&(n="\\dotsb"),n});var hy={")":!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};ne("\\dotso",function(e){var n=e.future().text;return n in hy?"\\ldots\\,":"\\ldots"});ne("\\dotsc",function(e){var n=e.future().text;return n in hy&&n!==","?"\\ldots\\,":"\\ldots"});ne("\\cdots",function(e){var n=e.future().text;return n in hy?"\\@cdots\\,":"\\@cdots"});ne("\\dotsb","\\cdots");ne("\\dotsm","\\cdots");ne("\\dotsi","\\!\\cdots");ne("\\dotsx","\\ldots\\,");ne("\\DOTSI","\\relax");ne("\\DOTSB","\\relax");ne("\\DOTSX","\\relax");ne("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ne("\\,","\\tmspace+{3mu}{.1667em}");ne("\\thinspace","\\,");ne("\\>","\\mskip{4mu}");ne("\\:","\\tmspace+{4mu}{.2222em}");ne("\\medspace","\\:");ne("\\;","\\tmspace+{5mu}{.2777em}");ne("\\thickspace","\\;");ne("\\!","\\tmspace-{3mu}{.1667em}");ne("\\negthinspace","\\!");ne("\\negmedspace","\\tmspace-{4mu}{.2222em}");ne("\\negthickspace","\\tmspace-{5mu}{.277em}");ne("\\enspace","\\kern.5em ");ne("\\enskip","\\hskip.5em\\relax");ne("\\quad","\\hskip1em\\relax");ne("\\qquad","\\hskip2em\\relax");ne("\\tag","\\@ifstar\\tag@literal\\tag@paren");ne("\\tag@paren","\\tag@literal{({#1})}");ne("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ne("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ne("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ne("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ne("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ne("\\newline","\\\\\\relax");ne("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var EA=Ke(Sa["Main-Regular"][84][1]-.7*Sa["Main-Regular"][65][1]);ne("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+EA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ne("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+EA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ne("\\hspace","\\@ifstar\\@hspacer\\@hspace");ne("\\@hspace","\\hskip #1\\relax");ne("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ne("\\ordinarycolon",":");ne("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ne("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ne("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ne("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ne("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ne("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ne("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ne("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ne("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ne("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ne("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ne("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ne("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ne("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ne("∷","\\dblcolon");ne("∹","\\eqcolon");ne("≔","\\coloneqq");ne("≕","\\eqqcolon");ne("⩴","\\Coloneqq");ne("\\ratio","\\vcentcolon");ne("\\coloncolon","\\dblcolon");ne("\\colonequals","\\coloneqq");ne("\\coloncolonequals","\\Coloneqq");ne("\\equalscolon","\\eqqcolon");ne("\\equalscoloncolon","\\Eqqcolon");ne("\\colonminus","\\coloneq");ne("\\coloncolonminus","\\Coloneq");ne("\\minuscolon","\\eqcolon");ne("\\minuscoloncolon","\\Eqcolon");ne("\\coloncolonapprox","\\Colonapprox");ne("\\coloncolonsim","\\Colonsim");ne("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ne("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ne("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ne("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ne("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ne("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ne("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ne("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ne("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ne("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ne("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ne("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ne("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ne("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ne("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ne("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ne("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ne("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ne("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ne("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ne("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ne("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ne("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ne("\\imath","\\html@mathml{\\@imath}{ı}");ne("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ne("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ne("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ne("⟦","\\llbracket");ne("⟧","\\rrbracket");ne("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ne("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ne("⦃","\\lBrace");ne("⦄","\\rBrace");ne("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ne("⦵","\\minuso");ne("\\darr","\\downarrow");ne("\\dArr","\\Downarrow");ne("\\Darr","\\Downarrow");ne("\\lang","\\langle");ne("\\rang","\\rangle");ne("\\uarr","\\uparrow");ne("\\uArr","\\Uparrow");ne("\\Uarr","\\Uparrow");ne("\\N","\\mathbb{N}");ne("\\R","\\mathbb{R}");ne("\\Z","\\mathbb{Z}");ne("\\alef","\\aleph");ne("\\alefsym","\\aleph");ne("\\Alpha","\\mathrm{A}");ne("\\Beta","\\mathrm{B}");ne("\\bull","\\bullet");ne("\\Chi","\\mathrm{X}");ne("\\clubs","\\clubsuit");ne("\\cnums","\\mathbb{C}");ne("\\Complex","\\mathbb{C}");ne("\\Dagger","\\ddagger");ne("\\diamonds","\\diamondsuit");ne("\\empty","\\emptyset");ne("\\Epsilon","\\mathrm{E}");ne("\\Eta","\\mathrm{H}");ne("\\exist","\\exists");ne("\\harr","\\leftrightarrow");ne("\\hArr","\\Leftrightarrow");ne("\\Harr","\\Leftrightarrow");ne("\\hearts","\\heartsuit");ne("\\image","\\Im");ne("\\infin","\\infty");ne("\\Iota","\\mathrm{I}");ne("\\isin","\\in");ne("\\Kappa","\\mathrm{K}");ne("\\larr","\\leftarrow");ne("\\lArr","\\Leftarrow");ne("\\Larr","\\Leftarrow");ne("\\lrarr","\\leftrightarrow");ne("\\lrArr","\\Leftrightarrow");ne("\\Lrarr","\\Leftrightarrow");ne("\\Mu","\\mathrm{M}");ne("\\natnums","\\mathbb{N}");ne("\\Nu","\\mathrm{N}");ne("\\Omicron","\\mathrm{O}");ne("\\plusmn","\\pm");ne("\\rarr","\\rightarrow");ne("\\rArr","\\Rightarrow");ne("\\Rarr","\\Rightarrow");ne("\\real","\\Re");ne("\\reals","\\mathbb{R}");ne("\\Reals","\\mathbb{R}");ne("\\Rho","\\mathrm{P}");ne("\\sdot","\\cdot");ne("\\sect","\\S");ne("\\spades","\\spadesuit");ne("\\sub","\\subset");ne("\\sube","\\subseteq");ne("\\supe","\\supseteq");ne("\\Tau","\\mathrm{T}");ne("\\thetasym","\\vartheta");ne("\\weierp","\\wp");ne("\\Zeta","\\mathrm{Z}");ne("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ne("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ne("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ne("\\bra","\\mathinner{\\langle{#1}|}");ne("\\ket","\\mathinner{|{#1}\\rangle}");ne("\\braket","\\mathinner{\\langle{#1}\\rangle}");ne("\\Bra","\\left\\langle#1\\right|");ne("\\Ket","\\left|#1\\right\\rangle");var NA=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,a=n.consumeArg().tokens,o=n.macros.get("|"),l=n.macros.get("\\|");n.macros.beginGroup();var c=f=>m=>{e&&(m.macros.set("|",o),s.length&&m.macros.set("\\|",l));var g=f;if(!f&&s.length){var S=m.future();S.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var d=n.consumeArg().tokens,_=n.expandTokens([...a,...d,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ne("\\bra@ket",NA(!1));ne("\\bra@set",NA(!0));ne("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ne("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ne("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ne("\\angln","{\\angl n}");ne("\\blue","\\textcolor{##6495ed}{#1}");ne("\\orange","\\textcolor{##ffa500}{#1}");ne("\\pink","\\textcolor{##ff00af}{#1}");ne("\\red","\\textcolor{##df0030}{#1}");ne("\\green","\\textcolor{##28ae7b}{#1}");ne("\\gray","\\textcolor{gray}{#1}");ne("\\purple","\\textcolor{##9d38bd}{#1}");ne("\\blueA","\\textcolor{##ccfaff}{#1}");ne("\\blueB","\\textcolor{##80f6ff}{#1}");ne("\\blueC","\\textcolor{##63d9ea}{#1}");ne("\\blueD","\\textcolor{##11accd}{#1}");ne("\\blueE","\\textcolor{##0c7f99}{#1}");ne("\\tealA","\\textcolor{##94fff5}{#1}");ne("\\tealB","\\textcolor{##26edd5}{#1}");ne("\\tealC","\\textcolor{##01d1c1}{#1}");ne("\\tealD","\\textcolor{##01a995}{#1}");ne("\\tealE","\\textcolor{##208170}{#1}");ne("\\greenA","\\textcolor{##b6ffb0}{#1}");ne("\\greenB","\\textcolor{##8af281}{#1}");ne("\\greenC","\\textcolor{##74cf70}{#1}");ne("\\greenD","\\textcolor{##1fab54}{#1}");ne("\\greenE","\\textcolor{##0d923f}{#1}");ne("\\goldA","\\textcolor{##ffd0a9}{#1}");ne("\\goldB","\\textcolor{##ffbb71}{#1}");ne("\\goldC","\\textcolor{##ff9c39}{#1}");ne("\\goldD","\\textcolor{##e07d10}{#1}");ne("\\goldE","\\textcolor{##a75a05}{#1}");ne("\\redA","\\textcolor{##fca9a9}{#1}");ne("\\redB","\\textcolor{##ff8482}{#1}");ne("\\redC","\\textcolor{##f9685d}{#1}");ne("\\redD","\\textcolor{##e84d39}{#1}");ne("\\redE","\\textcolor{##bc2612}{#1}");ne("\\maroonA","\\textcolor{##ffbde0}{#1}");ne("\\maroonB","\\textcolor{##ff92c6}{#1}");ne("\\maroonC","\\textcolor{##ed5fa6}{#1}");ne("\\maroonD","\\textcolor{##ca337c}{#1}");ne("\\maroonE","\\textcolor{##9e034e}{#1}");ne("\\purpleA","\\textcolor{##ddd7ff}{#1}");ne("\\purpleB","\\textcolor{##c6b9fc}{#1}");ne("\\purpleC","\\textcolor{##aa87ff}{#1}");ne("\\purpleD","\\textcolor{##7854ab}{#1}");ne("\\purpleE","\\textcolor{##543b78}{#1}");ne("\\mintA","\\textcolor{##f5f9e8}{#1}");ne("\\mintB","\\textcolor{##edf2df}{#1}");ne("\\mintC","\\textcolor{##e0e5cc}{#1}");ne("\\grayA","\\textcolor{##f6f7f7}{#1}");ne("\\grayB","\\textcolor{##f0f1f2}{#1}");ne("\\grayC","\\textcolor{##e3e5e6}{#1}");ne("\\grayD","\\textcolor{##d6d8da}{#1}");ne("\\grayE","\\textcolor{##babec2}{#1}");ne("\\grayF","\\textcolor{##888d93}{#1}");ne("\\grayG","\\textcolor{##626569}{#1}");ne("\\grayH","\\textcolor{##3b3e40}{#1}");ne("\\grayI","\\textcolor{##21242c}{#1}");ne("\\kaBlue","\\textcolor{##314453}{#1}");ne("\\kaGreen","\\textcolor{##71B307}{#1}");var zA={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class dst{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 lst(cst,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new B8(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 Ji("EOF",r.loc)),this.pushTokens(s),new Ji("",qs.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(),a,o=0,l=0;do{if(a=this.popToken(),t.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new qe("Extra }",a)}else if(a.text==="EOF")throw new qe("Unexpected end of input in a macro argument, expected '"+(n&&r?n[l]:"}")+"'",a);if(n&&r)if((o===0||o===1&&n[l]==="{")&&a.text===n[l]){if(++l,l===n.length){t.splice(-l,l);break}}else l=0}while(o!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:a}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new qe("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new qe("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 qe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=s.tokens,o=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var c=a[l];if(c.text==="#"){if(l===0)throw new qe("Incomplete placeholder at end of macro body",c);if(c=a[--l],c.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(c.text))a.splice(l,2,...o[+c.text-1]);else throw new qe("Not a valid argument number",c)}}}return this.pushTokens(a),a.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 Ji(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 a=0;if(s.includes("#"))for(var o=s.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new B8(s,this.settings),c=[],d=l.lex();d.text!=="EOF";)c.push(d),d=l.lex();c.reverse();var _={tokens:c,numArgs:a};return _}return s}isDefined(n){return this.macros.has(n)||vl.hasOwnProperty(n)||Qn.math.hasOwnProperty(n)||Qn.text.hasOwnProperty(n)||zA.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:vl.hasOwnProperty(n)&&!vl[n].primitive}}var P8=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,o0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Nv={"́":{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"}},F8={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class im{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 dst(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 qe("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 Ji("}")),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(im.endOfExpression.has(s.text)||t&&s.text===t||n&&vl[s.text]&&vl[s.text].infix)break;var a=this.parseAtom(t);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(Dz(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)),o={type:"textord",mode:"text",loc:qs.range(n),text:t};else return null;if(this.consume(),a)for(var _=0;_0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=C+1:(S!==C&&x.push({type:"text",value:d.value.slice(S,C)}),Array.isArray(E)?x.push(...E):E&&x.push(E),S=C+y[0].length,v=!0),!m.global)break;y=m.exec(d.value)}return v?(S?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=q8(e,"(");let a=q8(e,")");for(;r!==-1&&s>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function MA(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||gc(t)||Fp(t))&&(!n||t!==47)}RA.peek=qst;function Ost(){this.buffer()}function Ist(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Bst(){this.buffer()}function $st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Hst(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Pst(e){this.exit(e)}function Fst(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Ust(e){this.exit(e)}function qst(){return"["}function RA(e,n,t,r){const s=t.createTracker(r);let a=s.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=s.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=s.move("]"),a}function Gst(){return{enter:{gfmFootnoteCallString:Ost,gfmFootnoteCall:Ist,gfmFootnoteDefinitionLabelString:Bst,gfmFootnoteDefinition:$st},exit:{gfmFootnoteCallString:Hst,gfmFootnoteCall:Pst,gfmFootnoteDefinitionLabelString:Fst,gfmFootnoteDefinition:Ust}}}function Vst(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:RA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,a,o){const l=a.createTracker(o);let c=l.move("[^");const d=a.enter("footnoteDefinition"),_=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),_(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(r,l.current()),n?DA:Wst))),d(),c}}function Wst(e,n,t){return n===0?e:DA(e,n,t)}function DA(e,n,t){return(t?"":" ")+e}const Kst=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];LA.peek=Jst;function Yst(){return{canContainEols:["delete"],enter:{strikethrough:Zst},exit:{strikethrough:Qst}}}function Xst(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Kst}],handlers:{delete:LA}}}function Zst(e){this.enter({type:"delete",children:[]},e)}function Qst(e){this.exit(e)}function LA(e,n,t,r){const s=t.createTracker(r),a=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),a(),o}function Jst(){return"~"}function eit(e){return e.length}function tit(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||eit,a=[],o=[],l=[],c=[];let d=0,_=-1;for(;++_d&&(d=e[_].length);++vc[v])&&(c[v]=y)}k.push(x)}o[_]=k,l[_]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=x),g[f]=x),m[f]=y}o.splice(1,0,m),l.splice(1,0,g),_=-1;const S=[];for(;++_ "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),sit);return s(),o}function sit(e,n,t){return">"+(t?"":" ")+e}function iit(e,n){return V8(e,n.inConstruct,!0)&&!V8(e,n.notInConstruct,!1)}function V8(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ro&&(o=a):a=1,s=r+n.length,r=t.indexOf(n,s);return o}function ait(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 oit(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 lit(e,n,t,r){const s=oit(t),a=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(ait(e,t)){const f=t.enter("codeIndented"),m=t.indentLines(a,cit);return f(),m}const l=t.createTracker(r),c=s.repeat(Math.max(OA(a,s)+1,3)),d=t.enter("codeFenced");let _=l.move(c);if(e.lang){const f=t.enter(`codeFencedLang${o}`);_+=l.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${o}`);_+=l.move(" "),_+=l.move(t.safe(e.meta,{before:_,after:` +?)[ \r ]*`,p2="[̀-ͯ]",gat=new RegExp(p2+"+$"),vat="("+BA+"+)|"+(mat+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(p2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(p2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+pat)+("|"+_at+")");class Uk{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(vat,"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 Ji("EOF",new Gs(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new qe("Unexpected character: '"+n[t]+"'",new Ji(n[t],new Gs(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=n.indexOf(` +`,this.tokenRegex.lastIndex);return a===-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=a+1,this.lex()}return new Ji(s,new Gs(this,t,this.tokenRegex.lastIndex))}}class bat{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 qe("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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(n)&&(a[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var xat=EA;ne("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ne("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ne("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ne("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ne("\\@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}});ne("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ne("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var qk={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};ne("\\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 qe("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=qk[n.text],r==null||r>=t)throw new qe("Invalid base-"+t+" digit "+n.text);for(var s;(s=qk[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new qe("\\newcommand's first argument must be a macro name");var a=s[0].text,o=e.isDefined(a);if(o&&!n)throw new qe("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!t)throw new qe("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new qe("Invalid number of arguments: "+c);l=parseInt(c),s=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:s,numArgs:l}),""};ne("\\newcommand",e=>gy(e,!1,!0,!1));ne("\\renewcommand",e=>gy(e,!0,!1,!1));ne("\\providecommand",e=>gy(e,!0,!0,!0));ne("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ne("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ne("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),gl[t],Qn.math[t],Qn.text[t]),""});ne("\\bgroup","{");ne("\\egroup","}");ne("~","\\nobreakspace");ne("\\lq","`");ne("\\rq","'");ne("\\aa","\\r a");ne("\\AA","\\r A");ne("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ne("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ne("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ne("ℬ","\\mathscr{B}");ne("ℰ","\\mathscr{E}");ne("ℱ","\\mathscr{F}");ne("ℋ","\\mathscr{H}");ne("ℐ","\\mathscr{I}");ne("ℒ","\\mathscr{L}");ne("ℳ","\\mathscr{M}");ne("ℛ","\\mathscr{R}");ne("ℭ","\\mathfrak{C}");ne("ℌ","\\mathfrak{H}");ne("ℨ","\\mathfrak{Z}");ne("\\Bbbk","\\Bbb{k}");ne("\\llap","\\mathllap{\\textrm{#1}}");ne("\\rlap","\\mathrlap{\\textrm{#1}}");ne("\\clap","\\mathclap{\\textrm{#1}}");ne("\\mathstrut","\\vphantom{(}");ne("\\underbar","\\underline{\\text{#1}}");ne("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ne("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ne("\\ne","\\neq");ne("≠","\\neq");ne("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ne("∉","\\notin");ne("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ne("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ne("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ne("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ne("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ne("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ne("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ne("⟂","\\perp");ne("‼","\\mathclose{!\\mkern-0.8mu!}");ne("∌","\\notni");ne("⌜","\\ulcorner");ne("⌝","\\urcorner");ne("⌞","\\llcorner");ne("⌟","\\lrcorner");ne("©","\\copyright");ne("®","\\textregistered");ne("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ne("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ne("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ne("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ne("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ne("⋮","\\vdots");ne("\\varGamma","\\mathit{\\Gamma}");ne("\\varDelta","\\mathit{\\Delta}");ne("\\varTheta","\\mathit{\\Theta}");ne("\\varLambda","\\mathit{\\Lambda}");ne("\\varXi","\\mathit{\\Xi}");ne("\\varPi","\\mathit{\\Pi}");ne("\\varSigma","\\mathit{\\Sigma}");ne("\\varUpsilon","\\mathit{\\Upsilon}");ne("\\varPhi","\\mathit{\\Phi}");ne("\\varPsi","\\mathit{\\Psi}");ne("\\varOmega","\\mathit{\\Omega}");ne("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ne("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ne("\\boxed","\\fbox{$\\displaystyle{#1}$}");ne("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ne("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ne("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ne("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ne("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Gk={",":"\\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"},yat=new Set(["bin","rel"]);ne("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in Gk?n=Gk[t]:(t.slice(0,4)==="\\not"||t in Qn.math&&yat.has(Qn.math[t].group))&&(n="\\dotsb"),n});var vy={")":!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};ne("\\dotso",function(e){var n=e.future().text;return n in vy?"\\ldots\\,":"\\ldots"});ne("\\dotsc",function(e){var n=e.future().text;return n in vy&&n!==","?"\\ldots\\,":"\\ldots"});ne("\\cdots",function(e){var n=e.future().text;return n in vy?"\\@cdots\\,":"\\@cdots"});ne("\\dotsb","\\cdots");ne("\\dotsm","\\cdots");ne("\\dotsi","\\!\\cdots");ne("\\dotsx","\\ldots\\,");ne("\\DOTSI","\\relax");ne("\\DOTSB","\\relax");ne("\\DOTSX","\\relax");ne("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ne("\\,","\\tmspace+{3mu}{.1667em}");ne("\\thinspace","\\,");ne("\\>","\\mskip{4mu}");ne("\\:","\\tmspace+{4mu}{.2222em}");ne("\\medspace","\\:");ne("\\;","\\tmspace+{5mu}{.2777em}");ne("\\thickspace","\\;");ne("\\!","\\tmspace-{3mu}{.1667em}");ne("\\negthinspace","\\!");ne("\\negmedspace","\\tmspace-{4mu}{.2222em}");ne("\\negthickspace","\\tmspace-{5mu}{.277em}");ne("\\enspace","\\kern.5em ");ne("\\enskip","\\hskip.5em\\relax");ne("\\quad","\\hskip1em\\relax");ne("\\qquad","\\hskip2em\\relax");ne("\\tag","\\@ifstar\\tag@literal\\tag@paren");ne("\\tag@paren","\\tag@literal{({#1})}");ne("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ne("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ne("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ne("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ne("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ne("\\newline","\\\\\\relax");ne("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var $A=Ke(ka["Main-Regular"][84][1]-.7*ka["Main-Regular"][65][1]);ne("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+$A+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ne("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+$A+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ne("\\hspace","\\@ifstar\\@hspacer\\@hspace");ne("\\@hspace","\\hskip #1\\relax");ne("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ne("\\ordinarycolon",":");ne("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ne("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ne("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ne("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ne("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ne("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ne("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ne("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ne("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ne("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ne("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ne("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ne("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ne("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ne("∷","\\dblcolon");ne("∹","\\eqcolon");ne("≔","\\coloneqq");ne("≕","\\eqqcolon");ne("⩴","\\Coloneqq");ne("\\ratio","\\vcentcolon");ne("\\coloncolon","\\dblcolon");ne("\\colonequals","\\coloneqq");ne("\\coloncolonequals","\\Coloneqq");ne("\\equalscolon","\\eqqcolon");ne("\\equalscoloncolon","\\Eqqcolon");ne("\\colonminus","\\coloneq");ne("\\coloncolonminus","\\Coloneq");ne("\\minuscolon","\\eqcolon");ne("\\minuscoloncolon","\\Eqcolon");ne("\\coloncolonapprox","\\Colonapprox");ne("\\coloncolonsim","\\Colonsim");ne("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ne("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ne("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ne("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ne("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ne("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ne("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ne("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ne("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ne("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ne("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ne("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ne("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ne("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ne("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ne("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ne("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ne("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ne("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ne("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ne("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ne("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ne("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ne("\\imath","\\html@mathml{\\@imath}{ı}");ne("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ne("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ne("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ne("⟦","\\llbracket");ne("⟧","\\rrbracket");ne("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ne("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ne("⦃","\\lBrace");ne("⦄","\\rBrace");ne("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ne("⦵","\\minuso");ne("\\darr","\\downarrow");ne("\\dArr","\\Downarrow");ne("\\Darr","\\Downarrow");ne("\\lang","\\langle");ne("\\rang","\\rangle");ne("\\uarr","\\uparrow");ne("\\uArr","\\Uparrow");ne("\\Uarr","\\Uparrow");ne("\\N","\\mathbb{N}");ne("\\R","\\mathbb{R}");ne("\\Z","\\mathbb{Z}");ne("\\alef","\\aleph");ne("\\alefsym","\\aleph");ne("\\Alpha","\\mathrm{A}");ne("\\Beta","\\mathrm{B}");ne("\\bull","\\bullet");ne("\\Chi","\\mathrm{X}");ne("\\clubs","\\clubsuit");ne("\\cnums","\\mathbb{C}");ne("\\Complex","\\mathbb{C}");ne("\\Dagger","\\ddagger");ne("\\diamonds","\\diamondsuit");ne("\\empty","\\emptyset");ne("\\Epsilon","\\mathrm{E}");ne("\\Eta","\\mathrm{H}");ne("\\exist","\\exists");ne("\\harr","\\leftrightarrow");ne("\\hArr","\\Leftrightarrow");ne("\\Harr","\\Leftrightarrow");ne("\\hearts","\\heartsuit");ne("\\image","\\Im");ne("\\infin","\\infty");ne("\\Iota","\\mathrm{I}");ne("\\isin","\\in");ne("\\Kappa","\\mathrm{K}");ne("\\larr","\\leftarrow");ne("\\lArr","\\Leftarrow");ne("\\Larr","\\Leftarrow");ne("\\lrarr","\\leftrightarrow");ne("\\lrArr","\\Leftrightarrow");ne("\\Lrarr","\\Leftrightarrow");ne("\\Mu","\\mathrm{M}");ne("\\natnums","\\mathbb{N}");ne("\\Nu","\\mathrm{N}");ne("\\Omicron","\\mathrm{O}");ne("\\plusmn","\\pm");ne("\\rarr","\\rightarrow");ne("\\rArr","\\Rightarrow");ne("\\Rarr","\\Rightarrow");ne("\\real","\\Re");ne("\\reals","\\mathbb{R}");ne("\\Reals","\\mathbb{R}");ne("\\Rho","\\mathrm{P}");ne("\\sdot","\\cdot");ne("\\sect","\\S");ne("\\spades","\\spadesuit");ne("\\sub","\\subset");ne("\\sube","\\subseteq");ne("\\supe","\\supseteq");ne("\\Tau","\\mathrm{T}");ne("\\thetasym","\\vartheta");ne("\\weierp","\\wp");ne("\\Zeta","\\mathrm{Z}");ne("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ne("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ne("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ne("\\bra","\\mathinner{\\langle{#1}|}");ne("\\ket","\\mathinner{|{#1}\\rangle}");ne("\\braket","\\mathinner{\\langle{#1}\\rangle}");ne("\\Bra","\\left\\langle#1\\right|");ne("\\Ket","\\left|#1\\right\\rangle");var HA=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,a=n.consumeArg().tokens,o=n.macros.get("|"),l=n.macros.get("\\|");n.macros.beginGroup();var c=f=>m=>{e&&(m.macros.set("|",o),s.length&&m.macros.set("\\|",l));var g=f;if(!f&&s.length){var S=m.future();S.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var d=n.consumeArg().tokens,_=n.expandTokens([...a,...d,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ne("\\bra@ket",HA(!1));ne("\\bra@set",HA(!0));ne("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ne("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ne("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ne("\\angln","{\\angl n}");ne("\\blue","\\textcolor{##6495ed}{#1}");ne("\\orange","\\textcolor{##ffa500}{#1}");ne("\\pink","\\textcolor{##ff00af}{#1}");ne("\\red","\\textcolor{##df0030}{#1}");ne("\\green","\\textcolor{##28ae7b}{#1}");ne("\\gray","\\textcolor{gray}{#1}");ne("\\purple","\\textcolor{##9d38bd}{#1}");ne("\\blueA","\\textcolor{##ccfaff}{#1}");ne("\\blueB","\\textcolor{##80f6ff}{#1}");ne("\\blueC","\\textcolor{##63d9ea}{#1}");ne("\\blueD","\\textcolor{##11accd}{#1}");ne("\\blueE","\\textcolor{##0c7f99}{#1}");ne("\\tealA","\\textcolor{##94fff5}{#1}");ne("\\tealB","\\textcolor{##26edd5}{#1}");ne("\\tealC","\\textcolor{##01d1c1}{#1}");ne("\\tealD","\\textcolor{##01a995}{#1}");ne("\\tealE","\\textcolor{##208170}{#1}");ne("\\greenA","\\textcolor{##b6ffb0}{#1}");ne("\\greenB","\\textcolor{##8af281}{#1}");ne("\\greenC","\\textcolor{##74cf70}{#1}");ne("\\greenD","\\textcolor{##1fab54}{#1}");ne("\\greenE","\\textcolor{##0d923f}{#1}");ne("\\goldA","\\textcolor{##ffd0a9}{#1}");ne("\\goldB","\\textcolor{##ffbb71}{#1}");ne("\\goldC","\\textcolor{##ff9c39}{#1}");ne("\\goldD","\\textcolor{##e07d10}{#1}");ne("\\goldE","\\textcolor{##a75a05}{#1}");ne("\\redA","\\textcolor{##fca9a9}{#1}");ne("\\redB","\\textcolor{##ff8482}{#1}");ne("\\redC","\\textcolor{##f9685d}{#1}");ne("\\redD","\\textcolor{##e84d39}{#1}");ne("\\redE","\\textcolor{##bc2612}{#1}");ne("\\maroonA","\\textcolor{##ffbde0}{#1}");ne("\\maroonB","\\textcolor{##ff92c6}{#1}");ne("\\maroonC","\\textcolor{##ed5fa6}{#1}");ne("\\maroonD","\\textcolor{##ca337c}{#1}");ne("\\maroonE","\\textcolor{##9e034e}{#1}");ne("\\purpleA","\\textcolor{##ddd7ff}{#1}");ne("\\purpleB","\\textcolor{##c6b9fc}{#1}");ne("\\purpleC","\\textcolor{##aa87ff}{#1}");ne("\\purpleD","\\textcolor{##7854ab}{#1}");ne("\\purpleE","\\textcolor{##543b78}{#1}");ne("\\mintA","\\textcolor{##f5f9e8}{#1}");ne("\\mintB","\\textcolor{##edf2df}{#1}");ne("\\mintC","\\textcolor{##e0e5cc}{#1}");ne("\\grayA","\\textcolor{##f6f7f7}{#1}");ne("\\grayB","\\textcolor{##f0f1f2}{#1}");ne("\\grayC","\\textcolor{##e3e5e6}{#1}");ne("\\grayD","\\textcolor{##d6d8da}{#1}");ne("\\grayE","\\textcolor{##babec2}{#1}");ne("\\grayF","\\textcolor{##888d93}{#1}");ne("\\grayG","\\textcolor{##626569}{#1}");ne("\\grayH","\\textcolor{##3b3e40}{#1}");ne("\\grayI","\\textcolor{##21242c}{#1}");ne("\\kaBlue","\\textcolor{##314453}{#1}");ne("\\kaGreen","\\textcolor{##71B307}{#1}");var PA={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class wat{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 bat(xat,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new Uk(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 Ji("EOF",r.loc)),this.pushTokens(s),new Ji("",Gs.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(),a,o=0,l=0;do{if(a=this.popToken(),t.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new qe("Extra }",a)}else if(a.text==="EOF")throw new qe("Unexpected end of input in a macro argument, expected '"+(n&&r?n[l]:"}")+"'",a);if(n&&r)if((o===0||o===1&&n[l]==="{")&&a.text===n[l]){if(++l,l===n.length){t.splice(-l,l);break}}else l=0}while(o!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:a}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new qe("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new qe("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 qe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=s.tokens,o=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var c=a[l];if(c.text==="#"){if(l===0)throw new qe("Incomplete placeholder at end of macro body",c);if(c=a[--l],c.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(c.text))a.splice(l,2,...o[+c.text-1]);else throw new qe("Not a valid argument number",c)}}}return this.pushTokens(a),a.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 Ji(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 a=0;if(s.includes("#"))for(var o=s.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new Uk(s,this.settings),c=[],d=l.lex();d.text!=="EOF";)c.push(d),d=l.lex();c.reverse();var _={tokens:c,numArgs:a};return _}return s}isDefined(n){return this.macros.has(n)||gl.hasOwnProperty(n)||Qn.math.hasOwnProperty(n)||Qn.text.hasOwnProperty(n)||PA.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:gl.hasOwnProperty(n)&&!gl[n].primitive}}var Vk=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,l0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Av={"́":{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"}},Wk={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class om{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 wat(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 qe("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 Ji("}")),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(om.endOfExpression.has(s.text)||t&&s.text===t||n&&gl[s.text]&&gl[s.text].infix)break;var a=this.parseAtom(t);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(Wz(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)),o={type:"textord",mode:"text",loc:Gs.range(n),text:t};else return null;if(this.consume(),a)for(var _=0;_0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=C+1:(S!==C&&x.push({type:"text",value:d.value.slice(S,C)}),Array.isArray(E)?x.push(...E):E&&x.push(E),S=C+y[0].length,v=!0),!m.global)break;y=m.exec(d.value)}return v?(S?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=Yk(e,"(");let a=Yk(e,")");for(;r!==-1&&s>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function GA(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||vc(t)||qp(t))&&(!n||t!==47)}VA.peek=tot;function Wat(){this.buffer()}function Kat(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Yat(){this.buffer()}function Xat(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Zat(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Qat(e){this.exit(e)}function Jat(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function eot(e){this.exit(e)}function tot(){return"["}function VA(e,n,t,r){const s=t.createTracker(r);let a=s.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=s.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=s.move("]"),a}function not(){return{enter:{gfmFootnoteCallString:Wat,gfmFootnoteCall:Kat,gfmFootnoteDefinitionLabelString:Yat,gfmFootnoteDefinition:Xat},exit:{gfmFootnoteCallString:Zat,gfmFootnoteCall:Qat,gfmFootnoteDefinitionLabelString:Jat,gfmFootnoteDefinition:eot}}}function rot(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:VA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,a,o){const l=a.createTracker(o);let c=l.move("[^");const d=a.enter("footnoteDefinition"),_=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),_(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(r,l.current()),n?WA:sot))),d(),c}}function sot(e,n,t){return n===0?e:WA(e,n,t)}function WA(e,n,t){return(t?"":" ")+e}const iot=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];KA.peek=uot;function aot(){return{canContainEols:["delete"],enter:{strikethrough:lot},exit:{strikethrough:cot}}}function oot(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iot}],handlers:{delete:KA}}}function lot(e){this.enter({type:"delete",children:[]},e)}function cot(e){this.exit(e)}function KA(e,n,t,r){const s=t.createTracker(r),a=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),a(),o}function uot(){return"~"}function dot(e){return e.length}function fot(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||dot,a=[],o=[],l=[],c=[];let d=0,_=-1;for(;++_d&&(d=e[_].length);++vc[v])&&(c[v]=y)}k.push(x)}o[_]=k,l[_]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=x),g[f]=x),m[f]=y}o.splice(1,0,m),l.splice(1,0,g),_=-1;const S=[];for(;++_ "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),pot);return s(),o}function pot(e,n,t){return">"+(t?"":" ")+e}function mot(e,n){return Zk(e,n.inConstruct,!0)&&!Zk(e,n.notInConstruct,!1)}function Zk(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ro&&(o=a):a=1,s=r+n.length,r=t.indexOf(n,s);return o}function got(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 vot(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 bot(e,n,t,r){const s=vot(t),a=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(got(e,t)){const f=t.enter("codeIndented"),m=t.indentLines(a,xot);return f(),m}const l=t.createTracker(r),c=s.repeat(Math.max(YA(a,s)+1,3)),d=t.enter("codeFenced");let _=l.move(c);if(e.lang){const f=t.enter(`codeFencedLang${o}`);_+=l.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${o}`);_+=l.move(" "),_+=l.move(t.safe(e.meta,{before:_,after:` `,encode:["`"],...l.current()})),f()}return _+=l.move(` `),a&&(_+=l.move(a+` -`)),_+=l.move(c),d(),_}function cit(e,n,t){return(t?"":" ")+e}function my(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 uit(e,n,t,r){const s=my(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` -`,...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),o(),d}function dit(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 Gf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function hp(e,n,t){const r=Gu(e),s=Gu(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}}IA.peek=fit;function IA(e,n,t,r){const s=dit(t),a=t.enter("emphasis"),o=t.createTracker(r),l=o.move(s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=hp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Gf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=hp(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Gf(f));const g=o.move(s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function fit(e,n,t){return t.options.emphasis||"*"}function hit(e,n){let t=!1;return Fx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,Ib}),!!((!e.depth||e.depth<3)&&Yx(e)&&(n.options.setext||t))}function _it(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(hit(e,t)){const _=t.enter("headingSetext"),f=t.enter("phrasing"),m=t.containerPhrasing(e,{...a.current(),before:` +`)),_+=l.move(c),d(),_}function xot(e,n,t){return(t?"":" ")+e}function yy(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 yot(e,n,t,r){const s=yy(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` +`,...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),o(),d}function wot(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 Wf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _p(e,n,t){const r=Yu(e),s=Yu(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}}XA.peek=Sot;function XA(e,n,t,r){const s=wot(t),a=t.enter("emphasis"),o=t.createTracker(r),l=o.move(s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=_p(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Wf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=_p(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Wf(f));const g=o.move(s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function Sot(e,n,t){return t.options.emphasis||"*"}function kot(e,n){let t=!1;return Wx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,$b}),!!((!e.depth||e.depth<3)&&ey(e)&&(n.options.setext||t))}function Cot(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(kot(e,t)){const _=t.enter("headingSetext"),f=t.enter("phrasing"),m=t.containerPhrasing(e,{...a.current(),before:` `,after:` `});return f(),_(),m+` `+(s===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` `))+1))}const o="#".repeat(s),l=t.enter("headingAtx"),c=t.enter("phrasing");a.move(o+" ");let d=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(d)&&(d=Gf(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,t.options.closeAtx&&(d+=" "+o),c(),l(),d}BA.peek=pit;function BA(e){return e.value||""}function pit(){return"<"}$A.peek=mit;function $A(e,n,t,r){const s=my(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("![");return d+=c.move(t.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),d+=c.move(")"),o(),d}function mit(){return"!"}HA.peek=git;function HA(e,n,t,r){const s=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("![");const d=t.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function git(){return"!"}PA.peek=vit;function PA(e,n,t){let r=e.value||"",s="`",a=-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+" ");++a\u007F]/.test(e.url))}UA.peek=bit;function UA(e,n,t,r){const s=my(t),a=s==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let l,c;if(FA(e,t)){const _=t.stack;t.stack=[],l=t.enter("autolink");let f=o.move("<");return f+=o.move(t.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),l(),t.stack=_,f}l=t.enter("link"),c=t.enter("label");let d=o.move("[");return d+=o.move(t.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(t.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(c=t.enter("destinationRaw"),d+=o.move(t.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=t.enter(`title${a}`),d+=o.move(" "+s),d+=o.move(t.safe(e.title,{before:d,after:s,...o.current()})),d+=o.move(s),c()),d+=o.move(")"),l(),d}function bit(e,n,t){return FA(e,t)?"<":"["}qA.peek=xit;function qA(e,n,t,r){const s=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function xit(){return"["}function gy(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 yit(e){const n=gy(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 wit(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 GA(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 Sit(e,n,t,r){const s=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?wit(t):gy(t);const l=e.ordered?o==="."?")":".":yit(t);let c=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&_&&(!_.children||!_.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),GA(t)===o&&_){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,l.current()),_);return c(),d;function _(f,m,g){return m?(g?"":" ".repeat(o))+f:(g?a:a+" ".repeat(o-a.length))+f}}function Eit(e,n,t,r){const s=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,r);return a(),s(),o}const Nit=xh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zit(e,n,t,r){return(e.children.some(function(o){return Nit(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Ait(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}VA.peek=Tit;function VA(e,n,t,r){const s=Ait(t),a=t.enter("strong"),o=t.createTracker(r),l=o.move(s+s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=hp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Gf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=hp(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Gf(f));const g=o.move(s+s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function Tit(e,n,t){return t.options.strong||"*"}function jit(e,n,t,r){return t.safe(e.value,r)}function Mit(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 Rit(e,n,t){const r=(GA(t)+(t.options.ruleSpaces?" ":"")).repeat(Mit(t));return t.options.ruleSpaces?r.slice(0,-1):r}const WA={blockquote:rit,break:W8,code:lit,definition:uit,emphasis:IA,hardBreak:W8,heading:_it,html:BA,image:$A,imageReference:HA,inlineCode:PA,link:UA,linkReference:qA,list:Sit,listItem:Cit,paragraph:Eit,root:zit,strong:VA,text:jit,thematicBreak:Rit};function Dit(){return{enter:{table:Lit,tableData:K8,tableHeader:K8,tableRow:Iit},exit:{codeText:Bit,table:Oit,tableData:jv,tableHeader:jv,tableRow:jv}}}function Lit(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 Oit(e){this.exit(e),this.data.inTable=void 0}function Iit(e){this.enter({type:"tableRow",children:[]},e)}function jv(e){this.exit(e)}function K8(e){this.enter({type:"tableCell",children:[]},e)}function Bit(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,$it));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function $it(e,n){return n==="|"?n:e}function Hit(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...a.current()});return/^[\t ]/.test(d)&&(d=Wf(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,t.options.closeAtx&&(d+=" "+o),c(),l(),d}ZA.peek=Eot;function ZA(e){return e.value||""}function Eot(){return"<"}QA.peek=Not;function QA(e,n,t,r){const s=yy(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("![");return d+=c.move(t.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),d+=c.move(")"),o(),d}function Not(){return"!"}JA.peek=zot;function JA(e,n,t,r){const s=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("![");const d=t.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function zot(){return"!"}eT.peek=Aot;function eT(e,n,t){let r=e.value||"",s="`",a=-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+" ");++a\u007F]/.test(e.url))}nT.peek=Tot;function nT(e,n,t,r){const s=yy(t),a=s==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let l,c;if(tT(e,t)){const _=t.stack;t.stack=[],l=t.enter("autolink");let f=o.move("<");return f+=o.move(t.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),l(),t.stack=_,f}l=t.enter("link"),c=t.enter("label");let d=o.move("[");return d+=o.move(t.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(t.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(c=t.enter("destinationRaw"),d+=o.move(t.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=t.enter(`title${a}`),d+=o.move(" "+s),d+=o.move(t.safe(e.title,{before:d,after:s,...o.current()})),d+=o.move(s),c()),d+=o.move(")"),l(),d}function Tot(e,n,t){return tT(e,t)?"<":"["}rT.peek=jot;function rT(e,n,t,r){const s=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function jot(){return"["}function wy(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 Mot(e){const n=wy(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 Rot(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 sT(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 Dot(e,n,t,r){const s=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Rot(t):wy(t);const l=e.ordered?o==="."?")":".":Mot(t);let c=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&_&&(!_.children||!_.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),sT(t)===o&&_){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,l.current()),_);return c(),d;function _(f,m,g){return m?(g?"":" ".repeat(o))+f:(g?a:a+" ".repeat(o-a.length))+f}}function Iot(e,n,t,r){const s=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,r);return a(),s(),o}const Bot=wh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $ot(e,n,t,r){return(e.children.some(function(o){return Bot(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Hot(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}iT.peek=Pot;function iT(e,n,t,r){const s=Hot(t),a=t.enter("strong"),o=t.createTracker(r),l=o.move(s+s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=_p(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Wf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=_p(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Wf(f));const g=o.move(s+s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function Pot(e,n,t){return t.options.strong||"*"}function Fot(e,n,t,r){return t.safe(e.value,r)}function Uot(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 qot(e,n,t){const r=(sT(t)+(t.options.ruleSpaces?" ":"")).repeat(Uot(t));return t.options.ruleSpaces?r.slice(0,-1):r}const aT={blockquote:_ot,break:Qk,code:bot,definition:yot,emphasis:XA,hardBreak:Qk,heading:Cot,html:ZA,image:QA,imageReference:JA,inlineCode:eT,link:nT,linkReference:rT,list:Dot,listItem:Oot,paragraph:Iot,root:$ot,strong:iT,text:Fot,thematicBreak:qot};function Got(){return{enter:{table:Vot,tableData:Jk,tableHeader:Jk,tableRow:Kot},exit:{codeText:Yot,table:Wot,tableData:Rv,tableHeader:Rv,tableRow:Rv}}}function Vot(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 Wot(e){this.exit(e),this.data.inTable=void 0}function Kot(e){this.enter({type:"tableRow",children:[]},e)}function Rv(e){this.exit(e)}function Jk(e){this.enter({type:"tableCell",children:[]},e)}function Yot(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Xot));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Xot(e,n){return n==="|"?n:e}function Zot(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,a=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:m,table:o,tableCell:c,tableRow:l}};function o(g,S,k,b){return d(_(g,k,b),g.align)}function l(g,S,k,b){const v=f(g,k,b),x=d([v]);return x.slice(0,x.indexOf(` -`))}function c(g,S,k,b){const v=k.enter("tableCell"),x=k.enter("phrasing"),y=k.containerPhrasing(g,{...b,before:a,after:a});return x(),v(),y}function d(g,S){return tit(g,{align:S,alignDelimiters:r,padding:t,stringLength:s})}function _(g,S,k){const b=g.children;let v=-1;const x=[],y=S.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const sat={tokenize:fat,partial:!0};function iat(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cat,continuation:{tokenize:uat},exit:dat}},text:{91:{name:"gfmFootnoteCall",tokenize:lat},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:aat,resolveTo:oat}}}}function aat(e,n,t){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return t(c);const d=Zi(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function oat(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 a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...l),e}function lat(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(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",d)}function d(f){if(a>999||f===93&&!o||f===null||f===91||Bn(f))return t(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(Zi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return Bn(f)||(o=!0),a++,e.consume(f),f===92?_:d}function _(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function cat(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(S)}function _(S){if(o>999||S===93&&!l||S===null||S===91||Bn(S))return t(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Zi(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Bn(S)||(l=!0),o++,e.consume(S),S===92?f:_}function f(S){return S===91||S===92||S===93?(e.consume(S),o++,_):_(S)}function m(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),en(e,g,"gfmFootnoteDefinitionWhitespace")):t(S)}function g(S){return n(S)}}function uat(e,n,t){return e.check(Sh,n,e.attempt(sat,n,t))}function dat(e){e.exit("gfmFootnoteDefinition")}function fat(e,n,t){const r=this;return en(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function hat(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,l){let c=-1;for(;++c1?c(S):(o.consume(S),f++,g);if(f<2&&!t)return c(S);const b=o.exit("strikethroughSequenceTemporary"),v=Gu(S);return b._open=!v||v===2&&!!k,b._close=!k||k===2&&!!v,l(S)}}}class _at{constructor(){this.map=[]}add(n,t,r){pat(this,n,t,r)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[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 a of s)n.push(a);s=r.pop()}this.map.length=0}}function pat(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const V=r.events[P][1].type;if(V==="lineEnding"||V==="linePrefix")P--;else break}const $=P>-1?r.events[P][1].type:null,F=$==="tableHead"||$==="tableRow"?E:c;return F===E&&r.parser.lazy[r.now().line]?t(O):F(O)}function c(O){return e.enter("tableHead"),e.enter("tableRow"),d(O)}function d(O){return O===124||(o=!0,a+=1),_(O)}function _(O){return O===null?t(O):ht(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),g):t(O):on(O)?en(e,_,"whitespace")(O):(a+=1,o&&(o=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,_):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||Bn(O)?(e.exit("data"),_(O)):(e.consume(O),O===92?m:f)}function m(O){return O===92||O===124?(e.consume(O),f):f(O)}function g(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(O):(e.enter("tableDelimiterRow"),o=!1,on(O)?en(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):S(O))}function S(O){return O===45||O===58?b(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),k):z(O)}function k(O){return on(O)?en(e,b,"whitespace")(O):b(O)}function b(O){return O===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(a+=1,v(O)):O===null||ht(O)?C(O):z(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),x(O)):z(O)}function x(O){return O===45?(e.consume(O),x):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(O))}function y(O){return on(O)?en(e,C,"whitespace")(O):C(O)}function C(O){return O===124?S(O):O===null||ht(O)?!o||s!==a?z(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(O)):z(O)}function z(O){return t(O)}function E(O){return e.enter("tableRow"),j(O)}function j(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),j):O===null||ht(O)?(e.exit("tableRow"),n(O)):on(O)?en(e,j,"whitespace")(O):(e.enter("data"),A(O))}function A(O){return O===null||O===124||Bn(O)?(e.exit("data"),j(O)):(e.consume(O),O===92?D:A)}function D(O){return O===92||O===124?(e.consume(O),A):A(O)}}function bat(e,n){let t=-1,r=!0,s=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,d,_,f;const m=new _at;for(;++tt[2]+1){const S=t[2]+1,k=t[3]-t[2]-1;e.add(S,k,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(a.end=Object.assign({},bu(n.events,s)),e.add(s,0,[["exit",a,n]]),a=void 0),a}function X8(e,n,t,r,s){const a=[],o=bu(n.events,t);s&&(s.end=Object.assign({},o),a.push(["exit",s,n])),r.end=Object.assign({},o),a.push(["exit",r,n]),e.add(t+1,0,a)}function bu(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const xat={name:"tasklistCheck",tokenize:wat};function yat(){return{text:{91:xat}}}function wat(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"),a)}function a(c){return Bn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):t(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(c)}function l(c){return ht(c)?n(c):on(c)?e.check({tokenize:Sat},n,t)(c):t(c)}}function Sat(e,n,t){return en(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function kat(e){return oz([Yit(),iat(),hat(e),gat(),yat()])}const Cat={};function nT(e){const n=this,t=e||Cat,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(kat(t)),a.push(Git()),o.push(Vit(t))}function Eat(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:a},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:l,mathText:o,mathTextData:l}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d;const f=_.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function a(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function o(c){const d=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d,_.data.hChildren.push({type:"text",value:d})}function l(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function Nat(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(a,o,l,c){const d=a.value||"",_=l.createTracker(c),f="$".repeat(Math.max(OA(d,"$")+1,2)),m=l.enter("mathFlow");let g=_.move(f);if(a.meta){const S=l.enter("mathFlowMeta");g+=_.move(l.safe(a.meta,{after:` +`))}function c(g,S,k,b){const v=k.enter("tableCell"),x=k.enter("phrasing"),y=k.containerPhrasing(g,{...b,before:a,after:a});return x(),v(),y}function d(g,S){return fot(g,{align:S,alignDelimiters:r,padding:t,stringLength:s})}function _(g,S,k){const b=g.children;let v=-1;const x=[],y=S.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const plt={tokenize:Slt,partial:!0};function mlt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xlt,continuation:{tokenize:ylt},exit:wlt}},text:{91:{name:"gfmFootnoteCall",tokenize:blt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:glt,resolveTo:vlt}}}}function glt(e,n,t){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return t(c);const d=Zi(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function vlt(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 a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...l),e}function blt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(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",d)}function d(f){if(a>999||f===93&&!o||f===null||f===91||Bn(f))return t(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(Zi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return Bn(f)||(o=!0),a++,e.consume(f),f===92?_:d}function _(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function xlt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(S)}function _(S){if(o>999||S===93&&!l||S===null||S===91||Bn(S))return t(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Zi(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Bn(S)||(l=!0),o++,e.consume(S),S===92?f:_}function f(S){return S===91||S===92||S===93?(e.consume(S),o++,_):_(S)}function m(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),tn(e,g,"gfmFootnoteDefinitionWhitespace")):t(S)}function g(S){return n(S)}}function ylt(e,n,t){return e.check(Ch,n,e.attempt(plt,n,t))}function wlt(e){e.exit("gfmFootnoteDefinition")}function Slt(e,n,t){const r=this;return tn(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function klt(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,l){let c=-1;for(;++c1?c(S):(o.consume(S),f++,g);if(f<2&&!t)return c(S);const b=o.exit("strikethroughSequenceTemporary"),v=Yu(S);return b._open=!v||v===2&&!!k,b._close=!k||k===2&&!!v,l(S)}}}class Clt{constructor(){this.map=[]}add(n,t,r){Elt(this,n,t,r)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[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 a of s)n.push(a);s=r.pop()}this.map.length=0}}function Elt(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const V=r.events[P][1].type;if(V==="lineEnding"||V==="linePrefix")P--;else break}const H=P>-1?r.events[P][1].type:null,F=H==="tableHead"||H==="tableRow"?E:c;return F===E&&r.parser.lazy[r.now().line]?t(I):F(I)}function c(I){return e.enter("tableHead"),e.enter("tableRow"),d(I)}function d(I){return I===124||(o=!0,a+=1),_(I)}function _(I){return I===null?t(I):ht(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g):t(I):on(I)?tn(e,_,"whitespace")(I):(a+=1,o&&(o=!1,s+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,_):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||Bn(I)?(e.exit("data"),_(I)):(e.consume(I),I===92?m:f)}function m(I){return I===92||I===124?(e.consume(I),f):f(I)}function g(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(I):(e.enter("tableDelimiterRow"),o=!1,on(I)?tn(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):S(I))}function S(I){return I===45||I===58?b(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),k):A(I)}function k(I){return on(I)?tn(e,b,"whitespace")(I):b(I)}function b(I){return I===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),v):I===45?(a+=1,v(I)):I===null||ht(I)?C(I):A(I)}function v(I){return I===45?(e.enter("tableDelimiterFiller"),x(I)):A(I)}function x(I){return I===45?(e.consume(I),x):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(I))}function y(I){return on(I)?tn(e,C,"whitespace")(I):C(I)}function C(I){return I===124?S(I):I===null||ht(I)?!o||s!==a?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(I)):A(I)}function A(I){return t(I)}function E(I){return e.enter("tableRow"),j(I)}function j(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),j):I===null||ht(I)?(e.exit("tableRow"),n(I)):on(I)?tn(e,j,"whitespace")(I):(e.enter("data"),T(I))}function T(I){return I===null||I===124||Bn(I)?(e.exit("data"),j(I)):(e.consume(I),I===92?D:T)}function D(I){return I===92||I===124?(e.consume(I),T):T(I)}}function Tlt(e,n){let t=-1,r=!0,s=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,d,_,f;const m=new Clt;for(;++tt[2]+1){const S=t[2]+1,k=t[3]-t[2]-1;e.add(S,k,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(a.end=Object.assign({},Su(n.events,s)),e.add(s,0,[["exit",a,n]]),a=void 0),a}function t8(e,n,t,r,s){const a=[],o=Su(n.events,t);s&&(s.end=Object.assign({},o),a.push(["exit",s,n])),r.end=Object.assign({},o),a.push(["exit",r,n]),e.add(t+1,0,a)}function Su(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const jlt={name:"tasklistCheck",tokenize:Rlt};function Mlt(){return{text:{91:jlt}}}function Rlt(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"),a)}function a(c){return Bn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):t(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(c)}function l(c){return ht(c)?n(c):on(c)?e.check({tokenize:Dlt},n,t)(c):t(c)}}function Dlt(e,n,t){return tn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function Llt(e){return xz([alt(),mlt(),klt(e),zlt(),Mlt()])}const Olt={};function pT(e){const n=this,t=e||Olt,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Llt(t)),a.push(nlt()),o.push(rlt(t))}function Ilt(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:a},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:l,mathText:o,mathTextData:l}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d;const f=_.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function a(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function o(c){const d=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d,_.data.hChildren.push({type:"text",value:d})}function l(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function Blt(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(a,o,l,c){const d=a.value||"",_=l.createTracker(c),f="$".repeat(Math.max(YA(d,"$")+1,2)),m=l.enter("mathFlow");let g=_.move(f);if(a.meta){const S=l.enter("mathFlowMeta");g+=_.move(l.safe(a.meta,{after:` `,before:g,encode:["$"],..._.current()})),S()}return g+=_.move(` `),d&&(g+=_.move(d+` -`)),g+=_.move(f),m(),g}function r(a,o,l){let c=a.value||"",d=1;for(n||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const _="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let f=-1;for(;++f]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Eh.displayName="c";Eh.aliases=[];function Eh(e){e.register(Ia),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}am.displayName="cpp";am.aliases=[];function am(e){e.register(Eh),(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)}xy.displayName="arduino";xy.aliases=["ino"];function xy(e){e.register(am),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}yy.displayName="bash";yy.aliases=["sh","shell"];function yy(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 a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l>/g,function(Y,G){return"(?:"+B[+G]+")"})}function r(L,B,Y){return RegExp(t(L,B),"")}function s(L,B){for(var Y=0;Y>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var a={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 o(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var l=o(a.typeDeclaration),c=RegExp(o(a.type+" "+a.typeDeclaration+" "+a.contextual+" "+a.other)),d=o(a.typeDeclaration+" "+a.contextual+" "+a.other),_=o(a.type+" "+a.typeDeclaration+" "+a.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=s(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,S=t(/<<0>>(?:\s*<<1>>)?/.source,[g,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,S]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,m,b]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,b]),z={keyword:c,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,A=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[A]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:z},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:z},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,S]),lookbehind:!0,inside:z},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:z},{pattern:r(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:z},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,g]),inside:z}],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,[g]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:z},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:z,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:z,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,f]),inside:{function:r(/^<<0>>/.source,[g]),generic:{pattern:RegExp(f),alias:"class-name",inside:z}}},"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,[l,S,g,C,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[S,m]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:z},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 D=j+"|"+E,O=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),P=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),$=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,F=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,P]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[$,F]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[$]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[P]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var V=/:[^}\r\n]+/.source,X=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[O]),2),W=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,V]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[D]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,V]);function H(L,B){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[B,V]),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,[W]),lookbehind:!0,greedy:!0,inside:H(W,X)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:H(J,Z)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Nh.displayName="markup";Nh.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Nh(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 a={"included-cdata":{pattern://i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",o)}}),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}fd.displayName="css";fd.aliases=[];function fd(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)}Sy.displayName="diff";Sy.aliases=[];function Sy(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],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +`)),g+=_.move(f),m(),g}function r(a,o,l){let c=a.value||"",d=1;for(n||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const _="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let f=-1;for(;++f]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}zh.displayName="c";zh.aliases=[];function zh(e){e.register(Ia),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}lm.displayName="cpp";lm.aliases=[];function lm(e){e.register(zh),(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)}Cy.displayName="arduino";Cy.aliases=["ino"];function Cy(e){e.register(lm),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}Ey.displayName="bash";Ey.aliases=["sh","shell"];function Ey(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 a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l>/g,function(K,G){return"(?:"+$[+G]+")"})}function r(L,$,K){return RegExp(t(L,$),"")}function s(L,$){for(var K=0;K<$;K++)L=L.replace(/<>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var a={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 o(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var l=o(a.typeDeclaration),c=RegExp(o(a.type+" "+a.typeDeclaration+" "+a.contextual+" "+a.other)),d=o(a.typeDeclaration+" "+a.contextual+" "+a.other),_=o(a.type+" "+a.typeDeclaration+" "+a.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=s(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,S=t(/<<0>>(?:\s*<<1>>)?/.source,[g,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,S]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,m,b]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,b]),A={keyword:c,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:A},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:A},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,S]),lookbehind:!0,inside:A},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:A},{pattern:r(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:A},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,g]),inside:A}],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,[g]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:A},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:A,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:A,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,f]),inside:{function:r(/^<<0>>/.source,[g]),generic:{pattern:RegExp(f),alias:"class-name",inside:A}}},"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,[l,S,g,C,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[S,m]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:A},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 D=j+"|"+E,I=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),P=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),H=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,F=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,P]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[H,F]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[H]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[P]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var V=/:[^}\r\n]+/.source,X=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),W=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,V]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[D]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,V]);function B(L,$){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[$,V]),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,[W]),lookbehind:!0,greedy:!0,inside:B(W,X)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:B(J,Z)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Ah.displayName="markup";Ah.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Ah(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 a={"included-cdata":{pattern://i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",o)}}),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}md.displayName="css";md.aliases=[];function md(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)}zy.displayName="diff";zy.aliases=[];function zy(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],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| -|(?![\\s\\S])))+`,"m"),alias:a,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)}ky.displayName="go";ky.aliases=[];function ky(e){e.register(Ia),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"]}Cy.displayName="ini";Cy.aliases=[];function Cy(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:/=/}}Ey.displayName="java";Ey.aliases=[];function Ey(e){e.register(Ia),(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)}Ny.displayName="regex";Ny.aliases=[];function Ny(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"},a={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o="(?:[^\\\\-]|"+r.source+")",l=RegExp(o+"-"+o),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:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":a,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}zy.displayName="json";zy.aliases=["webmanifest"];function zy(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}Ay.displayName="kotlin";Ay.aliases=["kt","kts"];function Ay(e){e.register(Ia),(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)}Ty.displayName="less";Ty.aliases=[];function Ty(e){e.register(fd),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"}})}jy.displayName="lua";jy.aliases=[];function jy(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:/[\[\](){},;]|\.+|:+/}}My.displayName="makefile";My.aliases=[];function My(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:/[:;(){}]/}}Ry.displayName="yaml";Ry.aliases=["yml"];function Ry(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(c,d){d=(d||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(_,d)}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"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\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:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(o),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?: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)}Dy.displayName="markdown";Dy.aliases=["md"];function Dy(e){e.register(Nh),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),o=/\|?[ \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("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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(l){["url","bold","italic","strike","code-snippet"].forEach(function(c){l!==c&&(n.languages.markdown[l].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function c(d){if(!(!d||typeof d=="string"))for(var _=0,f=d.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}Oy.displayName="perl";Oy.aliases=[];function Oy(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)}lm.displayName="markup-templating";lm.aliases=[];function lm(e){e.register(Nh),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,a,o){if(r.language===s){var l=r.tokenStack=[];r.code=r.code.replace(a,function(c){if(typeof o=="function"&&!o(c))return c;for(var d=l.length,_;r.code.indexOf(_=t(s,d))!==-1;)++d;return l[d]=c,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var a=0,o=Object.keys(r.tokenStack);function l(c){for(var d=0;d=o.length);d++){var _=c[d];if(typeof _=="string"||_.content&&typeof _.content=="string"){var f=o[a],m=r.tokenStack[f],g=typeof _=="string"?_:_.content,S=t(s,f),k=g.indexOf(S);if(k>-1){++a;var b=g.substring(0,k),v=new n.Token(s,n.tokenize(m,r.grammar),"language-"+s,m),x=g.substring(k+S.length),y=[];b&&y.push.apply(y,l([b])),y.push(v),x&&y.push.apply(y,l([x])),typeof _=="string"?c.splice.apply(c,[d,1].concat(y)):_.content=y}}else _.content&&l(_.content)}return c}l(r.tokens)}}})})(e)}Iy.displayName="php";Iy.aliases=[];function Iy(e){e.register(lm),(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,a=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;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:a,punctuation:o};var l={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:l}},{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:l}}];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:a,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(d){if(/<\?/.test(d.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(d,"php",_)}}),n.hooks.add("after-tokenize",function(d){n.languages["markup-templating"].tokenizePlaceholders(d,"php")})})(e)}By.displayName="python";By.aliases=["py"];function By(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}$y.displayName="r";$y.aliases=[];function $y(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:/[(){}\[\],;]/}}Hy.displayName="ruby";Hy.aliases=["rb"];function Hy(e){e.register(Ia),(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)}Py.displayName="rust";Py.aliases=[];function Py(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)}Fy.displayName="sass";Fy.aliases=[];function Fy(e){e.register(fd),(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)}Uy.displayName="scss";Uy.aliases=[];function Uy(e){e.register(fd),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}qy.displayName="sql";qy.aliases=[];function qy(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:/[;[\]()`,.]/}}Gy.displayName="swift";Gy.aliases=[];function Gy(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})}Vy.displayName="typescript";Vy.aliases=["ts"];function Vy(e){e.register(om),(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)}cm.displayName="basic";cm.aliases=[];function cm(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:/[,;:()]/}}Wy.displayName="vbnet";Wy.aliases=[];function Wy(e){e.register(cm),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:/[,;:(){}]/})}const Bat=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Q8={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function sT(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function $at(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function Hat(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function J8(e){return Hat(e)||sT(e)}const Pat=["","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 Fat(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let a=0,o=-1,l="",c,d;t.position&&("start"in t.position||"indent"in t.position?(d=t.position.indent,c=t.position.start):c=t.position);let _=(c?c.line:0)||1,f=(c?c.column:0)||1,m=S(),g;for(a--;++a<=e.length;)if(g===10&&(f=(d?d[o]:0)||1),g=e.charCodeAt(a),g===38){const v=e.charCodeAt(a+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){l+=String.fromCharCode(g),f++;continue}const x=a+1;let y=x,C=x,z;if(v===35){C=++y;const F=e.charCodeAt(C);F===88||F===120?(z="hexadecimal",C=++y):z="decimal"}else z="named";let E="",j="",A="";const D=z==="named"?J8:z==="decimal"?sT:$at;for(C--;++C<=e.length;){const F=e.charCodeAt(C);if(!D(F))break;A+=String.fromCharCode(F),z==="named"&&Bat.includes(A)&&(E=A,j=Ff(A))}let O=e.charCodeAt(C)===59;if(O){C++;const F=z==="named"?Ff(A):!1;F&&(E=A,j=F)}let P=1+C-x,$="";if(!(!O&&t.nonTerminated===!1))if(!A)z!=="named"&&k(4,P);else if(z==="named"){if(O&&!j)k(5,1);else if(E!==A&&(C=y+E.length,P=1+C-y,O=!1),!O){const F=E?1:3;if(t.attribute){const V=e.charCodeAt(C);V===61?(k(F,P),j=""):J8(V)?j="":k(F,P)}else k(F,P)}$=j}else{O||k(2,P);let F=Number.parseInt(A,z==="hexadecimal"?16:10);if(Uat(F))k(7,P),$="�";else if(F in Q8)k(6,P),$=Q8[F];else{let V="";qat(F)&&k(6,P),F>65535&&(F-=65536,V+=String.fromCharCode(F>>>10|55296),F=56320|F&1023),$=V+String.fromCharCode(F)}}if($){b(),m=S(),a=C-1,f+=C-x+1,s.push($);const F=S();F.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,$,{start:m,end:F},e.slice(x-1,C)),m=F}else A=e.slice(x-1,C),l+=A,f+=A.length,a=C-1}else g===10&&(_++,o++,f=0),Number.isNaN(g)?b():(l+=String.fromCharCode(g),f++);return s.join("");function S(){return{line:_,column:f,offset:a+((c?c.offset:0)||0)}}function k(v,x){let y;t.warning&&(y=S(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,Pat[v],y,v))}function b(){l&&(s.push(l),t.text&&t.text.call(t.textContext||void 0,l,{start:m,end:S()}),l="")}}function Uat(e){return e>=55296&&e<=57343||e>1114111}function qat(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 Gat=0,c0={},Xr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Gat}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Xr.util.type(n)){case"Object":if(s=Xr.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var a in n)n.hasOwnProperty(a)&&(r[a]=e(n[a],t));return r;case"Array":return s=Xr.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(o,l){r[l]=e(o,t)}),r);default:return n}}},languages:{plain:c0,plaintext:c0,text:c0,txt:c0,extend:function(e,n){var t=Xr.util.clone(Xr.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Xr.languages;var s=r[e],a={};for(var o in s)if(s.hasOwnProperty(o)){if(o==n)for(var l in t)t.hasOwnProperty(l)&&(a[l]=t[l]);t.hasOwnProperty(o)||(a[o]=s[o])}var c=r[e];return r[e]=a,Xr.languages.DFS(Xr.languages,function(d,_){_===c&&d!=e&&(this[d]=a)}),a},DFS:function e(n,t,r,s){s=s||{};var a=Xr.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var l=n[o],c=Xr.util.type(l);c==="Object"&&!s[a(l)]?(s[a(l)]=!0,e(l,t,null,s)):c==="Array"&&!s[a(l)]&&(s[a(l)]=!0,e(l,t,o,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Xr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Xr.tokenize(r.code,r.grammar),Xr.hooks.run("after-tokenize",r),jf.stringify(Xr.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 Vat;return D0(s,s.head,e),iT(e,s,n,s.head,0),Kat(s)},hooks:{all:{},add:function(e,n){var t=Xr.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Xr.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:jf};function jf(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function ek(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var a=s[1].length;s.index+=a,s[0]=s[0].slice(a)}return s}function iT(e,n,t,r,s,a){for(var o in t)if(!(!t.hasOwnProperty(o)||!t[o])){var l=t[o];l=Array.isArray(l)?l:[l];for(var c=0;c=a.reach);v+=b.value.length,b=b.next){var x=b.value;if(n.length>e.length)return;if(!(x instanceof jf)){var y=1,C;if(m){if(C=ek(k,v,e,f),!C||C.index>=e.length)break;var A=C.index,z=C.index+C[0].length,E=v;for(E+=b.value.length;A>=E;)b=b.next,E+=b.value.length;if(E-=b.value.length,v=E,b.value instanceof jf)continue;for(var j=b;j!==n.tail&&(Ea.reach&&(a.reach=$);var F=b.prev;O&&(F=D0(n,F,O),v+=O.length),Wat(n,F,y);var V=new jf(o,_?Xr.tokenize(D,_):D,g,D);if(b=D0(n,F,V),P&&D0(n,b,P),y>1){var X={cause:o+","+c,reach:$};iT(e,n,t,b.prev,v,X),a&&X.reach>a.reach&&(a.reach=X.reach)}}}}}}function Vat(){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 D0(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 Wat(e,n,t){for(var r=n.next,s=0;st)return null;try{return gt.highlight(e,n).children}catch{return null}}function cT(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:h.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(cT)},n)}function not(e,n,t=3e5){var r;return((r=lT(e,n,t))==null?void 0:r.map(cT))??e}function uT(e,n,t=3e5){const r=lT(e,n,t);if(!r)return e.split(` +|(?![\\s\\S])))+`,"m"),alias:a,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)}Ay.displayName="go";Ay.aliases=[];function Ay(e){e.register(Ia),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"]}Ty.displayName="ini";Ty.aliases=[];function Ty(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:/=/}}jy.displayName="java";jy.aliases=[];function jy(e){e.register(Ia),(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)}My.displayName="regex";My.aliases=[];function My(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"},a={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o="(?:[^\\\\-]|"+r.source+")",l=RegExp(o+"-"+o),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:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":a,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}Ry.displayName="json";Ry.aliases=["webmanifest"];function Ry(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}Dy.displayName="kotlin";Dy.aliases=["kt","kts"];function Dy(e){e.register(Ia),(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)}Ly.displayName="less";Ly.aliases=[];function Ly(e){e.register(md),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"}})}Oy.displayName="lua";Oy.aliases=[];function Oy(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:/[\[\](){},;]|\.+|:+/}}Iy.displayName="makefile";Iy.aliases=[];function Iy(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:/[:;(){}]/}}By.displayName="yaml";By.aliases=["yml"];function By(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(c,d){d=(d||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(_,d)}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"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\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:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(o),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?: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)}$y.displayName="markdown";$y.aliases=["md"];function $y(e){e.register(Ah),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),o=/\|?[ \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("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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(l){["url","bold","italic","strike","code-snippet"].forEach(function(c){l!==c&&(n.languages.markdown[l].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function c(d){if(!(!d||typeof d=="string"))for(var _=0,f=d.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}Py.displayName="perl";Py.aliases=[];function Py(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)}um.displayName="markup-templating";um.aliases=[];function um(e){e.register(Ah),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,a,o){if(r.language===s){var l=r.tokenStack=[];r.code=r.code.replace(a,function(c){if(typeof o=="function"&&!o(c))return c;for(var d=l.length,_;r.code.indexOf(_=t(s,d))!==-1;)++d;return l[d]=c,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var a=0,o=Object.keys(r.tokenStack);function l(c){for(var d=0;d=o.length);d++){var _=c[d];if(typeof _=="string"||_.content&&typeof _.content=="string"){var f=o[a],m=r.tokenStack[f],g=typeof _=="string"?_:_.content,S=t(s,f),k=g.indexOf(S);if(k>-1){++a;var b=g.substring(0,k),v=new n.Token(s,n.tokenize(m,r.grammar),"language-"+s,m),x=g.substring(k+S.length),y=[];b&&y.push.apply(y,l([b])),y.push(v),x&&y.push.apply(y,l([x])),typeof _=="string"?c.splice.apply(c,[d,1].concat(y)):_.content=y}}else _.content&&l(_.content)}return c}l(r.tokens)}}})})(e)}Fy.displayName="php";Fy.aliases=[];function Fy(e){e.register(um),(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,a=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;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:a,punctuation:o};var l={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:l}},{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:l}}];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:a,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(d){if(/<\?/.test(d.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(d,"php",_)}}),n.hooks.add("after-tokenize",function(d){n.languages["markup-templating"].tokenizePlaceholders(d,"php")})})(e)}Uy.displayName="python";Uy.aliases=["py"];function Uy(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}qy.displayName="r";qy.aliases=[];function qy(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:/[(){}\[\],;]/}}Gy.displayName="ruby";Gy.aliases=["rb"];function Gy(e){e.register(Ia),(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)}Vy.displayName="rust";Vy.aliases=[];function Vy(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)}Wy.displayName="sass";Wy.aliases=[];function Wy(e){e.register(md),(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)}Ky.displayName="scss";Ky.aliases=[];function Ky(e){e.register(md),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}Yy.displayName="sql";Yy.aliases=[];function Yy(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:/[;[\]()`,.]/}}Xy.displayName="swift";Xy.aliases=[];function Xy(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})}Zy.displayName="typescript";Zy.aliases=["ts"];function Zy(e){e.register(cm),(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)}dm.displayName="basic";dm.aliases=[];function dm(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:/[,;:()]/}}Qy.displayName="vbnet";Qy.aliases=[];function Qy(e){e.register(dm),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:/[,;:(){}]/})}const Ylt=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],r8={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function gT(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function Xlt(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function Zlt(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function s8(e){return Zlt(e)||gT(e)}const Qlt=["","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 Jlt(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let a=0,o=-1,l="",c,d;t.position&&("start"in t.position||"indent"in t.position?(d=t.position.indent,c=t.position.start):c=t.position);let _=(c?c.line:0)||1,f=(c?c.column:0)||1,m=S(),g;for(a--;++a<=e.length;)if(g===10&&(f=(d?d[o]:0)||1),g=e.charCodeAt(a),g===38){const v=e.charCodeAt(a+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){l+=String.fromCharCode(g),f++;continue}const x=a+1;let y=x,C=x,A;if(v===35){C=++y;const F=e.charCodeAt(C);F===88||F===120?(A="hexadecimal",C=++y):A="decimal"}else A="named";let E="",j="",T="";const D=A==="named"?s8:A==="decimal"?gT:Xlt;for(C--;++C<=e.length;){const F=e.charCodeAt(C);if(!D(F))break;T+=String.fromCharCode(F),A==="named"&&Ylt.includes(T)&&(E=T,j=qf(T))}let I=e.charCodeAt(C)===59;if(I){C++;const F=A==="named"?qf(T):!1;F&&(E=T,j=F)}let P=1+C-x,H="";if(!(!I&&t.nonTerminated===!1))if(!T)A!=="named"&&k(4,P);else if(A==="named"){if(I&&!j)k(5,1);else if(E!==T&&(C=y+E.length,P=1+C-y,I=!1),!I){const F=E?1:3;if(t.attribute){const V=e.charCodeAt(C);V===61?(k(F,P),j=""):s8(V)?j="":k(F,P)}else k(F,P)}H=j}else{I||k(2,P);let F=Number.parseInt(T,A==="hexadecimal"?16:10);if(ect(F))k(7,P),H="�";else if(F in r8)k(6,P),H=r8[F];else{let V="";tct(F)&&k(6,P),F>65535&&(F-=65536,V+=String.fromCharCode(F>>>10|55296),F=56320|F&1023),H=V+String.fromCharCode(F)}}if(H){b(),m=S(),a=C-1,f+=C-x+1,s.push(H);const F=S();F.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,H,{start:m,end:F},e.slice(x-1,C)),m=F}else T=e.slice(x-1,C),l+=T,f+=T.length,a=C-1}else g===10&&(_++,o++,f=0),Number.isNaN(g)?b():(l+=String.fromCharCode(g),f++);return s.join("");function S(){return{line:_,column:f,offset:a+((c?c.offset:0)||0)}}function k(v,x){let y;t.warning&&(y=S(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,Qlt[v],y,v))}function b(){l&&(s.push(l),t.text&&t.text.call(t.textContext||void 0,l,{start:m,end:S()}),l="")}}function ect(e){return e>=55296&&e<=57343||e>1114111}function tct(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 nct=0,u0={},Kr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++nct}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Kr.util.type(n)){case"Object":if(s=Kr.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var a in n)n.hasOwnProperty(a)&&(r[a]=e(n[a],t));return r;case"Array":return s=Kr.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(o,l){r[l]=e(o,t)}),r);default:return n}}},languages:{plain:u0,plaintext:u0,text:u0,txt:u0,extend:function(e,n){var t=Kr.util.clone(Kr.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Kr.languages;var s=r[e],a={};for(var o in s)if(s.hasOwnProperty(o)){if(o==n)for(var l in t)t.hasOwnProperty(l)&&(a[l]=t[l]);t.hasOwnProperty(o)||(a[o]=s[o])}var c=r[e];return r[e]=a,Kr.languages.DFS(Kr.languages,function(d,_){_===c&&d!=e&&(this[d]=a)}),a},DFS:function e(n,t,r,s){s=s||{};var a=Kr.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var l=n[o],c=Kr.util.type(l);c==="Object"&&!s[a(l)]?(s[a(l)]=!0,e(l,t,null,s)):c==="Array"&&!s[a(l)]&&(s[a(l)]=!0,e(l,t,o,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Kr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Kr.tokenize(r.code,r.grammar),Kr.hooks.run("after-tokenize",r),Rf.stringify(Kr.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 rct;return L0(s,s.head,e),vT(e,s,n,s.head,0),ict(s)},hooks:{all:{},add:function(e,n){var t=Kr.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Kr.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Rf};function Rf(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function i8(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var a=s[1].length;s.index+=a,s[0]=s[0].slice(a)}return s}function vT(e,n,t,r,s,a){for(var o in t)if(!(!t.hasOwnProperty(o)||!t[o])){var l=t[o];l=Array.isArray(l)?l:[l];for(var c=0;c=a.reach);v+=b.value.length,b=b.next){var x=b.value;if(n.length>e.length)return;if(!(x instanceof Rf)){var y=1,C;if(m){if(C=i8(k,v,e,f),!C||C.index>=e.length)break;var T=C.index,A=C.index+C[0].length,E=v;for(E+=b.value.length;T>=E;)b=b.next,E+=b.value.length;if(E-=b.value.length,v=E,b.value instanceof Rf)continue;for(var j=b;j!==n.tail&&(Ea.reach&&(a.reach=H);var F=b.prev;I&&(F=L0(n,F,I),v+=I.length),sct(n,F,y);var V=new Rf(o,_?Kr.tokenize(D,_):D,g,D);if(b=L0(n,F,V),P&&L0(n,b,P),y>1){var X={cause:o+","+c,reach:H};vT(e,n,t,b.prev,v,X),a&&X.reach>a.reach&&(a.reach=X.reach)}}}}}}function rct(){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 L0(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 sct(e,n,t){for(var r=n.next,s=0;st)return null;try{return gt.highlight(e,n).children}catch{return null}}function wT(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:h.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(wT)},n)}function hct(e,n,t=3e5){var r;return((r=yT(e,n,t))==null?void 0:r.map(wT))??e}function ST(e,n,t=3e5){const r=yT(e,n,t);if(!r)return e.split(` `);const s=[];let a=[];const o=[];let l=0;const c=_=>{let f=_;for(let m=o.length-1;m>=0;m--)f=h.jsx("span",{className:o[m],children:f},l++);a.push(f)},d=_=>{var f;if(_.type==="text"){(_.value??"").split(` -`).forEach((m,g)=>{g>0&&(s.push(a),a=[]),m&&c(m)});return}_.type==="element"&&(o.push((((f=_.properties)==null?void 0:f.className)??[]).join(" ")),(_.children??[]).forEach(d),o.pop())};return r.forEach(d),s.push(a),s}function dT(e){return Array.isArray(e)?e.length===0:e===""}const tk=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function Yu(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function Vf(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function g2(e){var o;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(l){r+=l[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 a=((o=/^[ \t]*/.exec(e.slice(r)))==null?void 0:o[0].length)??0;return{hasListMarker:n,indentation:a,listIndent:t,offset:r+a,quoteDepth:s}}function rot(e,n){const t=e[n];if(t!=="`"&&t!=="~"||Vf(e,n)||Yu(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`).forEach((m,g)=>{g>0&&(s.push(a),a=[]),m&&c(m)});return}_.type==="element"&&(o.push((((f=_.properties)==null?void 0:f.className)??[]).join(" ")),(_.children??[]).forEach(d),o.pop())};return r.forEach(d),s.push(a),s}function kT(e){return Array.isArray(e)?e.length===0:e===""}const a8=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function Ju(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function Kf(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function b2(e){var o;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(l){r+=l[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 a=((o=/^[ \t]*/.exec(e.slice(r)))==null?void 0:o[0].length)??0;return{hasListMarker:n,indentation:a,listIndent:t,offset:r+a,quoteDepth:s}}function _ct(e,n){const t=e[n];if(t!=="`"&&t!=="~"||Kf(e,n)||Ju(e,n,t)<3)return!1;const r=e.lastIndexOf(` `,n-1)+1,s=e.indexOf(` -`,n),a=e.slice(r,s===-1?e.length:s),o=g2(a);return o.indentation<=3&&r+o.offset===n}function sot(e,n){const t=e[n],r=Yu(e,n,t),s=e.lastIndexOf(` +`,n),a=e.slice(r,s===-1?e.length:s),o=b2(a);return o.indentation<=3&&r+o.offset===n}function pct(e,n){const t=e[n],r=Ju(e,n,t),s=e.lastIndexOf(` `,n-1)+1,a=e.indexOf(` -`,n),o=g2(e.slice(s,a===-1?e.length:a));let l=e.indexOf(` +`,n),o=b2(e.slice(s,a===-1?e.length:a));let l=e.indexOf(` `,n+r);if(l===-1)return e.length;for(l+=1;l=o.listIndent&&f.indentation<=o.listIndent+3&&g>=r&&/^[ \t\r]*$/.test(e.slice(m+g,d)))return c===-1?e.length:c+1;if(c===-1)return e.length;l=c+1}return e.length}function iot(e,n,t){const r=Yu(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function oot(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 cot(e,{predictMath:n=!1}={}){const t=oot(e),r=new Set,s=new Set;for(let d=0;d=o.listIndent&&f.indentation<=o.listIndent+3&&g>=r&&/^[ \t\r]*$/.test(e.slice(m+g,d)))return c===-1?e.length:c+1;if(c===-1)return e.length;l=c+1}return e.length}function mct(e,n,t){const r=Ju(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function vct(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 xct(e,{predictMath:n=!1}={}){const t=vct(e),r=new Set,s=new Set;for(let d=0;d`$$${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}`)),cot(t,n)}function fT(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 fot(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function vr(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=fot(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const hot=1e5;function _ot({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var a;(a=navigator.clipboard)==null||a.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return h.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[h.jsx(Qt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:rE(),"aria-label":a0e(),onClick:s,children:t?h.jsx(di,{size:13}):h.jsx(Dp,{size:13})}),h.jsx("pre",{children:h.jsx("code",{children:not(e,n,hot)})})]})}function pot(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 rk(e,n,t){let r=n.line,s=n.column;for(let a=0;a]*?)\/?>/gi,r=[];let s=0,a=!1;for(const o of n.matchAll(t)){const l=(o[1]??"").toLowerCase(),c=pot(o[2]??"");if(!c[l==="run"?"id":"path"])continue;a=!0,o.index>s&&r.push({type:"text",value:n.slice(s,o.index),position:Mv(e,s,o.index)});const _=o.index+o[0].length;r.push({children:[],data:{hName:l==="run"?"run-mention":"file-mention",hProperties:c},position:Mv(e,o.index,_),type:l==="run"?"runMention":"fileMention"}),s=_}return a?(shT(e)}function got(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=Cz(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function ik({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,a=n&&Number.parseInt(n,10)||void 0,o=a!=null?`${s}:${a}`:s;return h.jsxs("button",{className:"file-chip",title:r?rI({path:Ae(e)}):e,...vr(l=>r==null?void 0:r(e,a,t,void 0,l)),disabled:!r,children:[h.jsx(FE,{size:12}),h.jsx("span",{className:"file-chip-label",children:o}),h.jsx(VE,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function vot({id:e,label:n,onOpenRun:t}){return h.jsxs("button",{className:"file-chip run-chip",title:t?vI({id:Ae(e)}):VI({id:Ae(e)}),...vr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[h.jsx(wx,{size:12}),h.jsx("span",{className:"file-chip-label",children:n||RE()}),h.jsx(VE,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const _T={singleDollarTextMath:!0},bot=qx().use(Zx).use(nT).use(rT,_T).use(mot).use(ap).use(got).use(jA);function xot(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const pT={code:({node:e,className:n,children:t,...r})=>{const s=n??"",a=/language-(\w+)/.exec(s),o=String(t??"").replace(/\n$/,"");if(!(a!=null||o.includes(` -`)))return h.jsx("code",{className:s,...r,children:t});const c=a?p2(a[1]):null;return h.jsx(_ot,{code:o,lang:c})},pre:({children:e})=>h.jsx(h.Fragment,{children:e})},Na=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:a,predict:o=!1}){kc();const l=M.useMemo(()=>({"file-mention":c=>h.jsx(ik,{path:c.path,lines:c.lines,exp:c.exp,onOpenFile:t}),"run-mention":c=>h.jsx(vot,{id:c.id,label:c.label,onOpenRun:r}),a:({node:c,href:d,children:_,...f})=>{if(d&&xot(d)&&t){let m;try{m=decodeURI(d)}catch{return h.jsx("span",{children:_})}const g=s?s(m):m;return g?h.jsx(ik,{path:g,onOpenFile:t}):h.jsx("span",{children:_})}return h.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",...f,children:_})},th:({node:c,...d})=>h.jsx("th",{dir:"auto",...d}),td:({node:c,...d})=>h.jsx("td",{dir:"auto",...d}),img:({node:c,src:d,alt:_,className:f,...m})=>{if(!d||typeof d!="string")return null;const g=a?a(d):d;return g?h.jsx("img",{...m,src:g,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${f??""}`}):null},...pT}),[t,r,s,a]);return h.jsx("div",{dir:"auto","data-streaming":o||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:h.jsx(Ltt,{content:fT(n,{predictMath:o}),processor:bot,components:l,predict:o})})}),ak="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function yot({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:a,onRevise:o}){const[l,c]=M.useState(!1),d=M.useRef(null),[_,f]=M.useState(!1),[m,g]=M.useState(""),S=M.useRef(null);M.useEffect(()=>{if(!l)return;const b=v=>{d.current&&!d.current.contains(v.target)&&c(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[l]),M.useEffect(()=>{var b;_&&((b=S.current)==null||b.focus())},[_]);const k=()=>{o(m.trim()||"no specific feedback — use your judgment"),g(""),f(!1)};return h.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:[h.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[h.jsx(wx,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),h.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?_we({agent:Ae(n)}):uwe({agent:Ae(n)})}),h.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",...vr(t),children:Ewe()})]}),_?h.jsxs(h.Fragment,{children:[h.jsx("textarea",{dir:"auto",ref:S,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:Fwe(),rows:2,value:m,onChange:b=>g(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),g(""),f(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),k())}}),h.jsxs("div",{className:ak,children:[h.jsx(Qe,{size:"small",onClick:()=>{g(""),f(!1)},children:vwe()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),h.jsxs(Qe,{size:"small",variant:"primary",onClick:k,children:[Dwe(),h.jsx(PE,{size:13})]})]})]}):h.jsxs("div",{className:ak,children:[h.jsx(Qe,{size:"small",onClick:a,children:Twe()}),h.jsx(Qe,{size:"small",onClick:()=>f(!0),children:Bwe()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),s?h.jsxs("div",{className:"plan-strip-approve relative flex",ref:d,children:[h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:Q4e()}),h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":wwe(),onClick:()=>c(b=>!b),children:h.jsx(ja,{size:13})}),l&&h.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:h.jsx(Zr,{onClick:()=>{c(!1),r("bypassPermissions")},children:nwe()})})]}):h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>r(),children:awe()})]})]})}function mT(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{let s=!1;const a=YKe(o=>{s=!0,n(o)});return LWe().then(o=>!s&&n(o)).catch(o=>r(o instanceof Error?o.message:String(o))),a},[]),{status:e,error:t,apply:n}}function wot(){const{status:e}=mT(),[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null;return!r||n===r?null:h.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[h.jsx(sd,{size:13,className:"shrink-0 text-subtext"}),h.jsx("span",{className:"min-w-0",children:TUe({version:Ae(r)})}),h.jsx(Qt,{type:"button",size:"small",className:"ms-auto","aria-label":DUe(),onClick:()=>t(r),children:h.jsx(hs,{size:13})})]})}function Sot({save:e,onSaved:n,placeholder:t,createHref:r}){const[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null);async function _(f){if(f.preventDefault(),!(o||!s.trim())){l(!0),d(null);try{n(await e(s.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return h.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[h.jsx("input",{type:"password",value:s,onChange:f=>a(f.target.value),placeholder:t,autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:o||!s.trim(),children:o?Ta():Sc()}),h.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:yhe()}),c&&h.jsx("div",{className:"error",children:c})]})}function kot({cmd:e}){const[n,t]=M.useState(!1);return h.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[h.jsx("code",{className:"font-mono text-sm",children:e}),h.jsx("button",{type:"button",className:"cmd-inline-copy 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",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?K0():xO({value:Ae(e)}),title:n?K0():rE(),children:n?h.jsx(di,{size:11,strokeWidth:3}):h.jsx(Dp,{size:11})})]})}function zh(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?h.jsx(kot,{cmd:n},t):n):null}const Cot="/assets/slurm-logo-aGSXVZcE.svg",Eot="/assets/thinking-machines-BOdslTfm.png";function Not(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 eE();case"tinker_job":return"Tinker";default:return e||"—"}}function zot({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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 Aot({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[h.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"}),h.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)"}),h.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)"}),h.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"}),h.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"}),h.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)"}),h.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)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),h.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function Tot({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:h.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 jot({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:h.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 Mot({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.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 Rot({size:e=16}){return h.jsx("img",{className:"tinker-logo block flex-none object-contain",src:Eot,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 Dot({size:e=16}){return h.jsx("img",{className:"block flex-none object-contain",src:Cot,width:e,height:e,alt:"","aria-hidden":"true"})}function um({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.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 dm({kind:e,size:n=16}){switch(e){case"modal_job":return h.jsx(Aot,{size:n});case"hf_job":return h.jsx(zot,{size:n});case"k8s_job":return h.jsx(Tot,{size:n});case"ssh_job":return h.jsx($7,{size:n,strokeWidth:1.5});case"slurm_job":return h.jsx(Dot,{size:n});case"ray_job":return h.jsx(jot,{size:n});case"openresearch_job":return h.jsx(Mot,{size:n});case"tinker_job":return h.jsx(Rot,{size:n});case"local_job":return h.jsx(oVe,{size:n,strokeWidth:1.5});default:return h.jsx($7,{size:n})}}function Yy({backend:e}){const n=Nx(e),t=HKe(e);return n?h.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:[h.jsx(dm,{kind:n}),h.jsx("span",{className:"backend-name",children:Not(n)}),t&&h.jsx("span",{className:"backend-detail text-sm",children:t})]}):h.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 gT({value:e,max:n,label:t,caption:r,fillColor:s}){const a=n>0?Math.min(100,Math.round(e/n*100)):0;return h.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:[h.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:h.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${a}%`,background:s}})}),(t!==void 0||r!==void 0)&&h.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[h.jsx("span",{children:t??`${a}%`}),r]})]})}function v2({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:h.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"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):h.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:h.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"})})}const vT=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),ok=["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(" "),wf={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function Lot(e){var r,s;const n=e.find(a=>a.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:Q0(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:$p(n,t).defaultId}}function zo(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=o=>{var l;(l=r.current)!=null&&l.contains(o.target)||t(!1)},a=o=>{var l;o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),t(!1),(l=e==null?void 0:e.current)==null||l.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",a,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function Oot({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:l,onHarnesses:c,lockHarness:d=!1,className:_}){var oe,se,q,te,le,ge;const[f,m]=M.useState([]),g=M.useRef(null),S=M.useRef(null),{open:k,setOpen:b,ref:v}=zo(g),[x,y]=M.useState(""),[C,z]=M.useState("root"),E=()=>{b(!1),z("root"),y("")};M.useEffect(()=>{var ue;k&&(C==="reasoning"||C==="speed"||C==="permissions")&&((ue=S.current)==null||ue.focus())},[k,C]),M.useEffect(()=>{let ue=!0;const Ce=(Le=!1)=>J0(Le).then(Pe=>{ue&&(m(Pe),c==null||c(Pe))}).catch(()=>{});Ce();const Ee=Ax(()=>void Ce(!0));return()=>{ue=!1,Ee()}},[]);const j=M.useMemo(()=>{const ue=x.trim().toLowerCase();return(d&&e?f.filter(Ee=>Ee.id===e.harness):f).map(Ee=>{let Le=Ee.models;return ue?Le=Le.filter(Pe=>Pe.id.toLowerCase().includes(ue)):Ee.id==="opencode"&&(Le=Le.slice(0,6)),{harness:Ee,models:Le,hidden:ue?0:Ee.models.length-Le.length}})},[f,x,d,e]),A=(ue,Ce)=>{var Le;const Ee=(e==null?void 0:e.harness)===ue.id;n({harness:ue.id,model:Ce,serviceTier:Q0(ue,Ce,Ee?e==null?void 0:e.serviceTier:null),permissionMode:Ee?e.permissionMode:((Le=ue.options)==null?void 0:Le.defaultPermissionMode)??null,reasoningLevel:lN(ue,Ce,Ee?e.reasoningLevel:null)}),E()},D=(e==null?void 0:e.model)!=null?(oe=f.find(ue=>ue.id===e.harness))==null?void 0:oe.models.find(ue=>ue.id===e.model):void 0,O=e?e.model?D?X0(D):cN(e.model):a7():q1(),P=(e==null?void 0:e.reasoningLevel)??o??((se=a[0])==null?void 0:se.id),$=(q=a.find(ue=>ue.id===P))==null?void 0:q.label,F=(e==null?void 0:e.permissionMode)??r??((te=t[0])==null?void 0:te.id),V=(le=t.find(ue=>ue.id===F))==null?void 0:le.label,X=(e==null?void 0:e.harness)==="opencode"?mpe():T0e(),W=f.find(ue=>ue.id===(e==null?void 0:e.harness)),Z=oN(W,e==null?void 0:e.model),J=Q0(W,e==null?void 0:e.model,e==null?void 0:e.serviceTier),H=(ge=Z.find(ue=>ue.id===J))==null?void 0:ge.label,L=ue=>{l==null||l(ue),E()},B=ue=>{s==null||s(ue),E()},Y=ue=>{e&&n({...e,serviceTier:ue}),E()},G=(ue,Ce,Ee)=>h.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:()=>z(Ee),children:[h.jsx("span",{className:"flex-1",children:ue}),Ce&&h.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:Ce}),h.jsx(Ma,{size:14,className:"shrink-0 text-muted"})]}),re=ue=>h.jsxs("button",{ref:S,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{z("root"),y("")},children:[h.jsx(IE,{size:15}),ue]}),he=(ue,Ce,Ee,Le)=>h.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ue.map(Pe=>h.jsxs(Zr,{onClick:()=>Le(Pe.id),children:[h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[Pe.label,Pe.id===Ee&&h.jsxs("span",{className:"font-normal text-muted",children:[" ",aE()]})]}),Pe.description&&h.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Pe.description})]}),Pe.id===Ce&&h.jsx(di,{size:13})]},Pe.id))});return h.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:v,children:[h.jsxs("button",{ref:g,type:"button",className:is("composer-pill inline-flex h-8 min-w-0 max-w-full items-center gap-[5px] rounded-md px-2 text-sm text-text whitespace-nowrap transition-[background,color] duration-150 ease-standard hover:bg-surface",_),title:sO({label:`${O}${$?` · ${$}`:""}${H?` · ${H}`:""}`}),"aria-haspopup":"menu","aria-expanded":k,onClick:()=>{k?E():(z("root"),b(!0))},children:[J==="priority"?h.jsx(JVe,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?h.jsx(v2,{harness:e.harness,size:14}):null,J==="priority"&&h.jsxs("span",{className:"sr-only",children:[D0e()," "]}),h.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[O,$&&h.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:$})]}),h.jsx(ja,{size:14,className:"shrink-0 text-muted"})]}),k&&h.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:[C==="root"&&h.jsxs("div",{className:"model-root-menu p-1",children:[G(q1(),O,"models"),a.length>0&&G(X,$,"reasoning"),Z.length>0&&G(l7(),H,"speed"),t.length>0&&G(o7(),V,"permissions")]}),C==="models"&&h.jsxs(h.Fragment,{children:[re(q1()),h.jsx("input",{autoFocus:!0,type:"text",placeholder:Q0e(),value:x,onChange:ue=>y(ue.target.value)}),h.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[j.map(({harness:ue,models:Ce,hidden:Ee})=>h.jsxs("div",{className:"[&_.model-item]:ps-6",children:[h.jsxs("div",{className:vT,children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(v2,{harness:ue.id,size:14}),ue.name]}),!ue.agentReady&&h.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[h.jsx(B7,{size:10})," ",oE()]})]}),ue.agentReady?h.jsxs(h.Fragment,{children:[ue.models.length===0&&h.jsxs(Zr,{onClick:()=>A(ue,null),children:[h.jsxs("span",{children:[a7(),h.jsx("span",{className:"model-id",children:iE()})]}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===null&&h.jsx(di,{size:13})]}),Ce.map(Le=>h.jsxs(Zr,{title:Le.id,onClick:()=>A(ue,Le.id),children:[h.jsx("span",{children:X0(Le)}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===Le.id&&h.jsx(di,{size:13})]},Le.id)),Ee>0&&h.jsx("div",{className:ok,children:q0e({count:an(Ee)})}),x.trim().length>0&&!ue.models.some(Le=>Le.id===x.trim())&&h.jsx(Zr,{onClick:()=>A(ue,x.trim()),children:h.jsx("span",{children:fpe({id:Ae(x.trim())})})})]}):h.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:ue.agentNote?zh(ue.agentNote):K0e()})]},ue.id)),f.length===0&&h.jsx("div",{className:ok,children:E0e()})]}),d&&e&&f.length>1&&h.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[h.jsx(B7,{size:11}),npe()]})]}),C==="reasoning"&&h.jsxs(h.Fragment,{children:[re(X),he(a,P,o,L)]}),C==="permissions"&&h.jsxs(h.Fragment,{children:[re(o7()),he(t,F,r,B)]}),C==="speed"&&h.jsxs(h.Fragment,{children:[re(l7()),he(Z,J??void 0,"default",Y)]})]})]})}function Wf({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:a=!1,disabled:o=!1,variant:l="pill",title:c,numbered:d=!1,renderIcon:_,onSelect:f,className:m}){var j,A;const{open:g,setOpen:S,ref:k}=zo();if(e.length===0)return null;const b=n??t??((j=e[0])==null?void 0:j.id)??null,v=e.find(D=>D.id===b),x=e.find(D=>D.id===t),y=l==="bare"&&(x==null?void 0:x.id)===Z0?x:void 0,C=y?e.filter(D=>D.id!==y.id):e,z=(v==null?void 0:v.label)??((A=e[0])==null?void 0:A.label)??"",E=D=>{f(D),S(!1)};return h.jsxs("div",{className:`option-picker relative inline-flex${l==="field"?" w-full":""}`,ref:k,children:[h.jsxs("button",{type:"button",className:is(l==="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 ${l==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,m),title:c,"aria-haspopup":"menu","aria-expanded":g,disabled:o,onClick:()=>S(D=>!D),children:[h.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),h.jsx("span",{className:"truncate",children:z})]}),h.jsx(ja,{size:12})]}),g&&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 ${e.some(D=>D.description)?"min-w-80":""} ${l==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${a?"drop-down":""}`,children:[r&&h.jsx("div",{className:vT,children:r}),y&&h.jsxs(h.Fragment,{children:[h.jsxs(Zr,{type:"button",onClick:()=>E(y.id),children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(y),h.jsxs("span",{children:[y.label,h.jsx("span",{className:"option-default text-muted font-normal",children:iE()})]})]}),b===y.id&&h.jsx(di,{size:13})]}),h.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((D,O)=>h.jsxs(Zr,{type:"button",onClick:()=>E(D.id),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(D),h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[D.label,!y&&D.id===t&&h.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",aE()]})]}),D.description&&h.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:D.description})]})]}),b===D.id?h.jsx(di,{size:13}):d&&h.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:O+1})]},D.id))]})]})}const lk={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 Iot(e){return lk[e]??lk.idle}const Bot={done:Q$e,failed:aHe,running:_He,starting:vHe,cancelling:K$e,cancelled:q$e,editing:nHe,idle:uHe};function bT(e){const n=Bot[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function bo({status:e,label:n,className:t}){const r=Iot(e);return h.jsx(Rx,{tone:r.tone,live:r.live,className:t,children:n??bT(e)})}var Rv={exports:{}},ck;function $ot(){return ck||(ck=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 a=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(a._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,a=s._renderService.dimensions;if(a.css.cell.width===0||a.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,l=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(l.getPropertyValue("height")),d=Math.max(0,parseInt(l.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),f=c-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),m=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(m/a.css.cell.width)),rows:Math.max(1,Math.floor(f/a.css.cell.height))}}}})(),t})()))})(Rv)),Rv.exports}var Hot=$ot(),Dv={exports:{}},uk;function Pot(){return uk||(uk=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(o,l)=>{function c(_){try{const f=new URL(_),m=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 _.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(l,"__esModule",{value:!0}),l.LinkComputer=l.WebLinkProvider=void 0,l.WebLinkProvider=class{constructor(_,f,m,g={}){this._terminal=_,this._regex=f,this._handler=m,this._options=g}provideLinks(_,f){const m=d.computeLink(_,this._regex,this._terminal,this._handler);f(this._addCallbacks(m))}_addCallbacks(_){return _.map((f=>(f.leave=this._options.leave,f.hover=(m,g)=>{if(this._options.hover){const{range:S}=f;this._options.hover(m,g,S)}},f)))}};class d{static computeLink(f,m,g,S){const k=new RegExp(m.source,(m.flags||"")+"g"),[b,v]=d._getWindowedLineStrings(f-1,g),x=b.join("");let y;const C=[];for(;y=k.exec(x);){const z=y[0];if(!c(z))continue;const[E,j]=d._mapStrIdx(g,v,0,y.index),[A,D]=d._mapStrIdx(g,E,j,z.length);if(E===-1||j===-1||A===-1||D===-1)continue;const O={start:{x:j+1,y:E+1},end:{x:D,y:A+1}};C.push({range:O,text:z,activate:S})}return C}static _getWindowedLineStrings(f,m){let g,S=f,k=f,b=0,v="";const x=[];if(g=m.buffer.active.getLine(f)){const y=g.translateToString(!0);if(g.isWrapped&&y[0]!==" "){for(b=0;(g=m.buffer.active.getLine(--S))&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),g.isWrapped&&v.indexOf(" ")===-1););x.reverse()}for(x.push(y),b=0;(g=m.buffer.active.getLine(++k))&&g.isWrapped&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),v.indexOf(" ")===-1););}return[x,S]}static _mapStrIdx(f,m,g,S){const k=f.buffer.active,b=k.getNullCell();let v=g;for(;S;){const x=k.getLine(m);if(!x)return[-1,-1];for(let y=v;y{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.WebLinksAddon=void 0;const l=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(_,f){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}o.WebLinksAddon=class{constructor(_=d,f={}){this._handler=_,this._options=f}activate(_){this._terminal=_;const f=this._options,m=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new l.WebLinkProvider(this._terminal,m,this._handler,f))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),a})()))})(Dv)),Dv.exports}var Fot=Pot(),Lv={exports:{}},dk;function Uot(){return dk||(dk=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,z){var E,j=arguments.length,A=j<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,C):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(x,y,C,z);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(A=(j<3?E(A):j>3?E(y,C,A):E(y,C))||A);return j>3&&A&&Object.defineProperty(y,C,A),A},_=this&&this.__param||function(x,y){return function(C,z){y(C,z,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=c(9042),m=c(9924),g=c(844),S=c(4725),k=c(2585),b=c(3656);let v=l.AccessibilityManager=class extends g.Disposable{constructor(x,y,C,z){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=z,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 E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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 m.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((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`,d+3),m=f===-1?e.length:f;/^[ \t]*$/.test(e.slice(_,d))&&/^[ \t\r]*$/.test(e.slice(d+3,m))&&o.push(d)}for(let d=0;d+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}`)),xct(t,n)}function CT(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 Sct(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function gr(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=Sct(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const kct=1e5;function Cct({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var a;(a=navigator.clipboard)==null||a.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return h.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[h.jsx(Jt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:cE(),"aria-label":T0e(),onClick:s,children:t?h.jsx(Ws,{size:13}):h.jsx(Lp,{size:13})}),h.jsx("pre",{children:h.jsx("code",{children:hct(e,n,kct)})})]})}function Ect(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 l8(e,n,t){let r=n.line,s=n.column;for(let a=0;a]*?)\/?>/gi,r=[];let s=0,a=!1;for(const o of n.matchAll(t)){const l=(o[1]??"").toLowerCase(),c=Ect(o[2]??"");if(!c[l==="run"?"id":"path"])continue;a=!0,o.index>s&&r.push({type:"text",value:n.slice(s,o.index),position:Dv(e,s,o.index)});const _=o.index+o[0].length;r.push({children:[],data:{hName:l==="run"?"run-mention":"file-mention",hProperties:c},position:Dv(e,o.index,_),type:l==="run"?"runMention":"fileMention"}),s=_}return a?(sET(e)}function zct(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=Bz(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function u8({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,a=n&&Number.parseInt(n,10)||void 0,o=a!=null?`${s}:${a}`:s;return h.jsxs("button",{className:"file-chip",title:r?mI({path:Ae(e)}):e,...gr(l=>r==null?void 0:r(e,a,t,void 0,l)),disabled:!r,children:[h.jsx(XE,{size:12}),h.jsx("span",{className:"file-chip-label",children:o}),h.jsx(eN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function Act({id:e,label:n,onOpenRun:t}){return h.jsxs("button",{className:"file-chip run-chip",title:t?jI({id:Ae(e)}):iB({id:Ae(e)}),...gr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[h.jsx(Nx,{size:12}),h.jsx("span",{className:"file-chip-label",children:n||PE()}),h.jsx(eN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const NT={singleDollarTextMath:!0},Tct=Yx().use(ny).use(pT).use(mT,NT).use(Nct).use(op).use(zct).use(qA);function jct(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const zT={code:({node:e,className:n,children:t,...r})=>{const s=n??"",a=/language-(\w+)/.exec(s),o=String(t??"").replace(/\n$/,"");if(!(a!=null||o.includes(` +`)))return h.jsx("code",{className:s,...r,children:t});const c=a?g2(a[1]):null;return h.jsx(Cct,{code:o,lang:c})},pre:({children:e})=>h.jsx(h.Fragment,{children:e})},za=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:a,predict:o=!1}){Cc();const l=M.useMemo(()=>({"file-mention":c=>h.jsx(u8,{path:c.path,lines:c.lines,exp:c.exp,onOpenFile:t}),"run-mention":c=>h.jsx(Act,{id:c.id,label:c.label,onOpenRun:r}),a:({node:c,href:d,children:_,...f})=>{if(d&&jct(d)&&t){let m;try{m=decodeURI(d)}catch{return h.jsx("span",{children:_})}const g=s?s(m):m;return g?h.jsx(u8,{path:g,onOpenFile:t}):h.jsx("span",{children:_})}return h.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",...f,children:_})},th:({node:c,...d})=>h.jsx("th",{dir:"auto",...d}),td:({node:c,...d})=>h.jsx("td",{dir:"auto",...d}),img:({node:c,src:d,alt:_,className:f,...m})=>{if(!d||typeof d!="string")return null;const g=a?a(d):d;return g?h.jsx("img",{...m,src:g,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${f??""}`}):null},...zT}),[t,r,s,a]);return h.jsx("div",{dir:"auto","data-streaming":o||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:h.jsx(Vrt,{content:CT(n,{predictMath:o}),processor:Tct,components:l,predict:o})})}),d8="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function Mct({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:a,onRevise:o}){const[l,c]=M.useState(!1),d=M.useRef(null),[_,f]=M.useState(!1),[m,g]=M.useState(""),S=M.useRef(null);M.useEffect(()=>{if(!l)return;const b=v=>{d.current&&!d.current.contains(v.target)&&c(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[l]),M.useEffect(()=>{var b;_&&((b=S.current)==null||b.focus())},[_]);const k=()=>{o(m.trim()||"no specific feedback — use your judgment"),g(""),f(!1)};return h.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:[h.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[h.jsx(Nx,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),h.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?Bwe({agent:Ae(n)}):Dwe({agent:Ae(n)})}),h.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",...gr(t),children:Xwe()})]}),_?h.jsxs(h.Fragment,{children:[h.jsx("textarea",{dir:"auto",ref:S,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:f5e(),rows:2,value:m,onChange:b=>g(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),g(""),f(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),k())}}),h.jsxs("div",{className:d8,children:[h.jsx(Qe,{size:"small",onClick:()=>{g(""),f(!1)},children:Fwe()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),h.jsxs(Qe,{size:"small",variant:"primary",onClick:k,children:[s5e(),h.jsx(YE,{size:13})]})]})]}):h.jsxs("div",{className:d8,children:[h.jsx(Qe,{size:"small",onClick:a,children:e5e()}),h.jsx(Qe,{size:"small",onClick:()=>f(!0),children:l5e()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),s?h.jsxs("div",{className:"plan-strip-approve relative flex",ref:d,children:[h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:wwe()}),h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":Vwe(),onClick:()=>c(b=>!b),children:h.jsx(ta,{size:13})}),l&&h.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:h.jsx(Yr,{onClick:()=>{c(!1),r("bypassPermissions")},children:Ewe()})})]}):h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>r(),children:Twe()})]})]})}function Rct({status:e,live:n}){const t={size:15,strokeWidth:1.75,"aria-hidden":!0},[r,s]=e==="completed"?[h.jsx(Ws,{...t,strokeWidth:2.25}),"text-accent-green"]:e==="in_progress"?[h.jsx(gKe,{...t,className:n?"animate-spin":""}),"text-primary"]:e==="cancelled"?[h.jsx(kWe,{...t}),"text-muted"]:[h.jsx(zWe,{...t}),"text-muted"];return h.jsx("span",{className:`flex h-5 w-4 shrink-0 items-center justify-center ${s}`,children:r})}function AT({items:e,live:n}){return h.jsx("ol",{className:"task-items m-0 flex list-none flex-col gap-0.5 p-0",children:e.map((t,r)=>{const s=t.status==="in_progress",a=s?t.activeText??t.text:t.text;return h.jsxs("li",{className:"flex items-start gap-2 text-sm leading-5","aria-current":s?"step":void 0,children:[h.jsx(Rct,{status:t.status,live:n}),h.jsx("span",{className:`min-w-0 break-words ${t.status==="completed"?"text-subtext":t.status==="cancelled"?"text-muted line-through":s?`text-text ${n?"tool-running-shimmer":"font-medium"}`:"text-text"}`,children:a})]},r)})})}function x2(e){return{done:Vt(e.done),total:Vt(e.total)}}function Dct(e){return wN(e)?$E():HE(x2(e))}function Lct({list:e,live:n}){return h.jsxs("div",{className:"task-list-card my-3.5 flex flex-col gap-2 rounded-md border border-border bg-surface py-2.5 px-3.5",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(Sx,{size:16,strokeWidth:1.75,className:"shrink-0 text-muted","aria-hidden":"true"}),h.jsx("span",{className:"font-semibold text-text",children:xx()}),h.jsx("span",{className:"text-muted",children:Dct(e)})]}),h.jsx(AT,{items:e.items,live:n})]})}function Oct({list:e}){const[n,t]=M.useState(!1),r=e.current?e.current.activeText??e.current.text:wN(e)?$E():xx(),s=e.total>0?Math.round(e.done/e.total*100):0;return h.jsxs("div",{className:"task-strip mb-2 overflow-hidden rounded-md border border-border bg-surface",children:[h.jsxs("button",{type:"button",className:"flex w-full cursor-pointer items-center gap-2 py-2 px-3 text-start text-sm",onClick:()=>t(a=>!a),"aria-expanded":n,children:[h.jsx(Sx,{size:16,strokeWidth:1.75,className:"shrink-0 text-muted","aria-hidden":"true"}),h.jsx("span",{className:`min-w-0 flex-1 truncate text-text ${e.current?"tool-running-shimmer":""}`,title:r,children:r}),h.jsx("span",{className:"shrink-0 tabular-nums text-muted",children:cFe(x2(e))}),h.jsx("span",{className:"sr-only",children:n?hFe():xFe()}),h.jsx(ta,{size:16,className:`shrink-0 text-muted transition-transform duration-120 ease-standard ${n?"rotate-180":""}`,"aria-hidden":"true"})]}),h.jsx("div",{className:"h-0.5 w-full bg-border",role:"progressbar","aria-valuenow":e.done,"aria-valuemin":0,"aria-valuemax":e.total,"aria-label":HE(x2(e)),children:h.jsx("div",{className:"h-full bg-accent-green transition-[width] duration-200 ease-standard",style:{width:`${s}%`}})}),n&&h.jsx("div",{className:"px-3 pt-2 pb-2.5",children:h.jsx(AT,{items:e.items,live:!0})})]})}function TT(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{let s=!1;const a=aZe(o=>{s=!0,n(o)});return UYe().then(o=>!s&&n(o)).catch(o=>r(o instanceof Error?o.message:String(o))),a},[]),{status:e,error:t,apply:n}}function Ict(){const{status:e}=TT(),[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null;return!r||n===r?null:h.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[h.jsx(ld,{size:13,className:"shrink-0 text-subtext"}),h.jsx("span",{className:"min-w-0",children:jGe({version:Ae(r)})}),h.jsx(Jt,{type:"button",size:"small",className:"ms-auto","aria-label":LGe(),onClick:()=>t(r),children:h.jsx(_s,{size:13})})]})}function Bct({save:e,onSaved:n,placeholder:t,createHref:r}){const[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null);async function _(f){if(f.preventDefault(),!(o||!s.trim())){l(!0),d(null);try{n(await e(s.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return h.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[h.jsx("input",{type:"password",value:s,onChange:f=>a(f.target.value),placeholder:t,autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:o||!s.trim(),children:o?ja():kc()}),h.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:Ghe()}),c&&h.jsx("div",{className:"error",children:c})]})}function $ct({cmd:e}){const[n,t]=M.useState(!1);return h.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[h.jsx("code",{className:"font-mono text-sm",children:e}),h.jsx("button",{type:"button",className:"cmd-inline-copy 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",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?Y0():RO({value:Ae(e)}),title:n?Y0():cE(),children:n?h.jsx(Ws,{size:11,strokeWidth:3}):h.jsx(Lp,{size:11})})]})}function Th(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?h.jsx($ct,{cmd:n},t):n):null}const Hct="/assets/slurm-logo-aGSXVZcE.svg",Pct="/assets/thinking-machines-BOdslTfm.png";function Fct(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 aE();case"tinker_job":return"Tinker";default:return e||"—"}}function Uct({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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 qct({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[h.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"}),h.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)"}),h.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)"}),h.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"}),h.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"}),h.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)"}),h.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)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),h.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function Gct({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:h.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 Vct({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:h.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 Wct({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.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 Kct({size:e=16}){return h.jsx("img",{className:"tinker-logo block flex-none object-contain",src:Pct,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 Yct({size:e=16}){return h.jsx("img",{className:"block flex-none object-contain",src:Hct,width:e,height:e,alt:"","aria-hidden":"true"})}function fm({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.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 hm({kind:e,size:n=16}){switch(e){case"modal_job":return h.jsx(qct,{size:n});case"hf_job":return h.jsx(Uct,{size:n});case"k8s_job":return h.jsx(Gct,{size:n});case"ssh_job":return h.jsx(q7,{size:n,strokeWidth:1.5});case"slurm_job":return h.jsx(Yct,{size:n});case"ray_job":return h.jsx(Vct,{size:n});case"openresearch_job":return h.jsx(Wct,{size:n});case"tinker_job":return h.jsx(Kct,{size:n});case"local_job":return h.jsx(fKe,{size:n,strokeWidth:1.5});default:return h.jsx(q7,{size:n})}}function e4({backend:e}){const n=Mx(e),t=KXe(e);return n?h.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:[h.jsx(hm,{kind:n}),h.jsx("span",{className:"backend-name",children:Fct(n)}),t&&h.jsx("span",{className:"backend-detail text-sm",children:t})]}):h.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 jT({value:e,max:n,label:t,caption:r,fillColor:s}){const a=n>0?Math.min(100,Math.round(e/n*100)):0;return h.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:[h.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:h.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${a}%`,background:s}})}),(t!==void 0||r!==void 0)&&h.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[h.jsx("span",{children:t??`${a}%`}),r]})]})}function y2({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:h.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"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):h.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:h.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"})})}const MT=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),f8=["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(" "),kf={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function Xct(e){var r,s;const n=e.find(a=>a.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:J0(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Hp(n,t).defaultId}}function Ao(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=o=>{var l;(l=r.current)!=null&&l.contains(o.target)||t(!1)},a=o=>{var l;o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),t(!1),(l=e==null?void 0:e.current)==null||l.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",a,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function Zct({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:l,onHarnesses:c,lockHarness:d=!1,className:_}){var he,ie,q,te,le,ge;const[f,m]=M.useState([]),g=M.useRef(null),S=M.useRef(null),{open:k,setOpen:b,ref:v}=Ao(g),[x,y]=M.useState(""),[C,A]=M.useState("root"),E=()=>{b(!1),A("root"),y("")};M.useEffect(()=>{var ue;k&&(C==="reasoning"||C==="speed"||C==="permissions")&&((ue=S.current)==null||ue.focus())},[k,C]),M.useEffect(()=>{let ue=!0;const Ce=(Le=!1)=>ep(Le).then(Pe=>{ue&&(m(Pe),c==null||c(Pe))}).catch(()=>{});Ce();const Ee=Dx(()=>void Ce(!0));return()=>{ue=!1,Ee()}},[]);const j=M.useMemo(()=>{const ue=x.trim().toLowerCase();return(d&&e?f.filter(Ee=>Ee.id===e.harness):f).map(Ee=>{let Le=Ee.models;return ue?Le=Le.filter(Pe=>Pe.id.toLowerCase().includes(ue)):Ee.id==="opencode"&&(Le=Le.slice(0,6)),{harness:Ee,models:Le,hidden:ue?0:Ee.models.length-Le.length}})},[f,x,d,e]),T=(ue,Ce)=>{var Le;const Ee=(e==null?void 0:e.harness)===ue.id;n({harness:ue.id,model:Ce,serviceTier:J0(ue,Ce,Ee?e==null?void 0:e.serviceTier:null),permissionMode:Ee?e.permissionMode:((Le=ue.options)==null?void 0:Le.defaultPermissionMode)??null,reasoningLevel:mN(ue,Ce,Ee?e.reasoningLevel:null)}),E()},D=(e==null?void 0:e.model)!=null?(he=f.find(ue=>ue.id===e.harness))==null?void 0:he.models.find(ue=>ue.id===e.model):void 0,I=e?e.model?D?Z0(D):gN(e.model):d7():V1(),P=(e==null?void 0:e.reasoningLevel)??o??((ie=a[0])==null?void 0:ie.id),H=(q=a.find(ue=>ue.id===P))==null?void 0:q.label,F=(e==null?void 0:e.permissionMode)??r??((te=t[0])==null?void 0:te.id),V=(le=t.find(ue=>ue.id===F))==null?void 0:le.label,X=(e==null?void 0:e.harness)==="opencode"?Hpe():epe(),W=f.find(ue=>ue.id===(e==null?void 0:e.harness)),Z=pN(W,e==null?void 0:e.model),J=J0(W,e==null?void 0:e.model,e==null?void 0:e.serviceTier),B=(ge=Z.find(ue=>ue.id===J))==null?void 0:ge.label,L=ue=>{l==null||l(ue),E()},$=ue=>{s==null||s(ue),E()},K=ue=>{e&&n({...e,serviceTier:ue}),E()},G=(ue,Ce,Ee)=>h.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:()=>A(Ee),children:[h.jsx("span",{className:"flex-1",children:ue}),Ce&&h.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:Ce}),h.jsx(Ma,{size:14,className:"shrink-0 text-muted"})]}),re=ue=>h.jsxs("button",{ref:S,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{A("root"),y("")},children:[h.jsx(GE,{size:15}),ue]}),oe=(ue,Ce,Ee,Le)=>h.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ue.map(Pe=>h.jsxs(Yr,{onClick:()=>Le(Pe.id),children:[h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[Pe.label,Pe.id===Ee&&h.jsxs("span",{className:"font-normal text-muted",children:[" ",fE()]})]}),Pe.description&&h.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Pe.description})]}),Pe.id===Ce&&h.jsx(Ws,{size:13})]},Pe.id))});return h.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:v,children:[h.jsxs("button",{ref:g,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",_),title:gO({label:`${I}${H?` · ${H}`:""}${B?` · ${B}`:""}`}),"aria-haspopup":"menu","aria-expanded":k,onClick:()=>{k?E():(A("root"),b(!0))},children:[J==="priority"?h.jsx(oYe,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?h.jsx(y2,{harness:e.harness,size:14}):null,J==="priority"&&h.jsxs("span",{className:"sr-only",children:[spe()," "]}),h.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[I,H&&h.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:H})]}),h.jsx(ta,{size:14,className:"shrink-0 text-muted"})]}),k&&h.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:[C==="root"&&h.jsxs("div",{className:"model-root-menu p-1",children:[G(V1(),I,"models"),a.length>0&&G(X,H,"reasoning"),Z.length>0&&G(h7(),B,"speed"),t.length>0&&G(f7(),V,"permissions")]}),C==="models"&&h.jsxs(h.Fragment,{children:[re(V1()),h.jsx("input",{autoFocus:!0,type:"text",placeholder:wpe(),value:x,onChange:ue=>y(ue.target.value)}),h.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[j.map(({harness:ue,models:Ce,hidden:Ee})=>h.jsxs("div",{className:"[&_.model-item]:ps-6",children:[h.jsxs("div",{className:MT,children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(y2,{harness:ue.id,size:14}),ue.name]}),!ue.agentReady&&h.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[h.jsx(U7,{size:10})," ",hE()]})]}),ue.agentReady?h.jsxs(h.Fragment,{children:[ue.models.length===0&&h.jsxs(Yr,{onClick:()=>T(ue,null),children:[h.jsxs("span",{children:[d7(),h.jsx("span",{className:"model-id",children:dE()})]}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===null&&h.jsx(Ws,{size:13})]}),Ce.map(Le=>h.jsxs(Yr,{title:Le.id,onClick:()=>T(ue,Le.id),children:[h.jsx("span",{children:Z0(Le)}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===Le.id&&h.jsx(Ws,{size:13})]},Le.id)),Ee>0&&h.jsx("div",{className:f8,children:_pe({count:Vt(Ee)})}),x.trim().length>0&&!ue.models.some(Le=>Le.id===x.trim())&&h.jsx(Yr,{onClick:()=>T(ue,x.trim()),children:h.jsx("span",{children:Ope({id:Ae(x.trim())})})})]}):h.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:ue.agentNote?Th(ue.agentNote):vpe()})]},ue.id)),f.length===0&&h.jsx("div",{className:f8,children:X0e()})]}),d&&e&&f.length>1&&h.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[h.jsx(U7,{size:11}),Epe()]})]}),C==="reasoning"&&h.jsxs(h.Fragment,{children:[re(X),oe(a,P,o,L)]}),C==="permissions"&&h.jsxs(h.Fragment,{children:[re(f7()),oe(t,F,r,$)]}),C==="speed"&&h.jsxs(h.Fragment,{children:[re(h7()),oe(Z,J??void 0,"default",K)]})]})]})}function Yf({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:a=!1,disabled:o=!1,variant:l="pill",title:c,numbered:d=!1,renderIcon:_,onSelect:f,className:m}){var j,T;const{open:g,setOpen:S,ref:k}=Ao();if(e.length===0)return null;const b=n??t??((j=e[0])==null?void 0:j.id)??null,v=e.find(D=>D.id===b),x=e.find(D=>D.id===t),y=l==="bare"&&(x==null?void 0:x.id)===Q0?x:void 0,C=y?e.filter(D=>D.id!==y.id):e,A=(v==null?void 0:v.label)??((T=e[0])==null?void 0:T.label)??"",E=D=>{f(D),S(!1)};return h.jsxs("div",{className:`option-picker relative inline-flex${l==="field"?" w-full":""}`,ref:k,children:[h.jsxs("button",{type:"button",className:ss(l==="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 ${l==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,m),title:c,"aria-haspopup":"menu","aria-expanded":g,disabled:o,onClick:()=>S(D=>!D),children:[h.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),h.jsx("span",{className:"truncate",children:A})]}),h.jsx(ta,{size:12})]}),g&&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 ${e.some(D=>D.description)?"min-w-80":""} ${l==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${a?"drop-down":""}`,children:[r&&h.jsx("div",{className:MT,children:r}),y&&h.jsxs(h.Fragment,{children:[h.jsxs(Yr,{type:"button",onClick:()=>E(y.id),children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(y),h.jsxs("span",{children:[y.label,h.jsx("span",{className:"option-default text-muted font-normal",children:dE()})]})]}),b===y.id&&h.jsx(Ws,{size:13})]}),h.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((D,I)=>h.jsxs(Yr,{type:"button",onClick:()=>E(D.id),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(D),h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[D.label,!y&&D.id===t&&h.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",fE()]})]}),D.description&&h.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:D.description})]})]}),b===D.id?h.jsx(Ws,{size:13}):d&&h.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:I+1})]},D.id))]})]})}const h8={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 Qct(e){return h8[e]??h8.idle}const Jct={done:wHe,failed:THe,running:BHe,starting:FHe,cancelling:vHe,cancelled:_He,editing:EHe,idle:DHe};function RT(e){const n=Jct[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function xo({status:e,label:n,className:t}){const r=Qct(e);return h.jsx(Bx,{tone:r.tone,live:r.live,className:t,children:n??RT(e)})}var Lv={exports:{}},_8;function eut(){return _8||(_8=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 a=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(a._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,a=s._renderService.dimensions;if(a.css.cell.width===0||a.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,l=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(l.getPropertyValue("height")),d=Math.max(0,parseInt(l.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),f=c-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),m=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(m/a.css.cell.width)),rows:Math.max(1,Math.floor(f/a.css.cell.height))}}}})(),t})()))})(Lv)),Lv.exports}var tut=eut(),Ov={exports:{}},p8;function nut(){return p8||(p8=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(o,l)=>{function c(_){try{const f=new URL(_),m=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 _.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(l,"__esModule",{value:!0}),l.LinkComputer=l.WebLinkProvider=void 0,l.WebLinkProvider=class{constructor(_,f,m,g={}){this._terminal=_,this._regex=f,this._handler=m,this._options=g}provideLinks(_,f){const m=d.computeLink(_,this._regex,this._terminal,this._handler);f(this._addCallbacks(m))}_addCallbacks(_){return _.map((f=>(f.leave=this._options.leave,f.hover=(m,g)=>{if(this._options.hover){const{range:S}=f;this._options.hover(m,g,S)}},f)))}};class d{static computeLink(f,m,g,S){const k=new RegExp(m.source,(m.flags||"")+"g"),[b,v]=d._getWindowedLineStrings(f-1,g),x=b.join("");let y;const C=[];for(;y=k.exec(x);){const A=y[0];if(!c(A))continue;const[E,j]=d._mapStrIdx(g,v,0,y.index),[T,D]=d._mapStrIdx(g,E,j,A.length);if(E===-1||j===-1||T===-1||D===-1)continue;const I={start:{x:j+1,y:E+1},end:{x:D,y:T+1}};C.push({range:I,text:A,activate:S})}return C}static _getWindowedLineStrings(f,m){let g,S=f,k=f,b=0,v="";const x=[];if(g=m.buffer.active.getLine(f)){const y=g.translateToString(!0);if(g.isWrapped&&y[0]!==" "){for(b=0;(g=m.buffer.active.getLine(--S))&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),g.isWrapped&&v.indexOf(" ")===-1););x.reverse()}for(x.push(y),b=0;(g=m.buffer.active.getLine(++k))&&g.isWrapped&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),v.indexOf(" ")===-1););}return[x,S]}static _mapStrIdx(f,m,g,S){const k=f.buffer.active,b=k.getNullCell();let v=g;for(;S;){const x=k.getLine(m);if(!x)return[-1,-1];for(let y=v;y{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.WebLinksAddon=void 0;const l=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(_,f){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}o.WebLinksAddon=class{constructor(_=d,f={}){this._handler=_,this._options=f}activate(_){this._terminal=_;const f=this._options,m=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new l.WebLinkProvider(this._terminal,m,this._handler,f))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),a})()))})(Ov)),Ov.exports}var rut=nut(),Iv={exports:{}},m8;function sut(){return m8||(m8=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=c(9042),m=c(9924),g=c(844),S=c(4725),k=c(2585),b=c(3656);let v=l.AccessibilityManager=class extends g.Disposable{constructor(x,y,C,A){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=A,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 E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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 m.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((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` `)))),this.register(this._terminal.onA11yTab((E=>this._handleTab(E)))),this.register(this._terminal.onKey((E=>this._handleKey(E.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,b.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,g.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let y=0;y0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const C=this._terminal.buffer,z=C.lines.length.toString();for(let E=x;E<=y;E++){const j=C.lines.get(C.ydisp+E),A=[],D=(j==null?void 0:j.translateToString(!0,void 0,void 0,A))||"",O=(C.ydisp+E+1).toString(),P=this._rowElements[E];P&&(D.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=D,this._rowColumns.set(P,A)),P.setAttribute("aria-posinset",O),P.setAttribute("aria-setsize",z))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const C=x.target,z=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==z)return;let E,j;if(y===0?(E=C,j=this._rowElements.pop(),this._rowContainer.removeChild(j)):(E=this._rowElements.shift(),j=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),j.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const A=this._createAccessibilityTreeNode();this._rowElements.unshift(A),this._rowContainer.insertAdjacentElement("afterbegin",A)}else{const A=this._createAccessibilityTreeNode();this._rowElements.push(A),this._rowContainer.appendChild(A)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const z=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(z)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:z,offset:((D=z.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:O,offset:P})=>{const $=O instanceof Text?O.parentNode:O;let F=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const V=this._rowColumns.get($);if(!V)return console.warn("columns is null. Race condition?"),null;let X=P=this._terminal.cols&&(++F,X=0),{row:F,column:X}},j=E(y),A=E(C);if(j&&A){if(j.row>A.row||j.row===A.row&&j.column>=A.column)throw new Error("invalid range");this._terminal.select(j.column,j.row,(A.row-j.row)*this._terminal.cols-j.column+A.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(m){return m.replace(/\r?\n/g,"\r")}function d(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function _(m,g,S,k){m=d(m=c(m),S.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(m,!0),g.value=""}function f(m,g,S){const k=S.getBoundingClientRect(),b=m.clientX-k.left-10,v=m.clientY-k.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${b}px`,g.style.top=`${v}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=c,l.bracketTextForPaste=d,l.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},l.handlePasteEvent=function(m,g,S,k){m.stopPropagation(),m.clipboardData&&_(m.clipboardData.getData("text/plain"),g,S,k)},l.paste=_,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(m,g,S,k,b){f(m,g,S),b&&k.rightClickSelect(m),g.value=k.selectionText,g.select()}},7239:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const d=c(1505);l.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,f,m){this._css.set(_,f,m)}getCss(_,f){return this._css.get(_,f)}setColor(_,f,m){this._color.set(_,f,m)}getColor(_,f){return this._color.get(_,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(c,d,_,f){c.addEventListener(d,_,f);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(d,_,f))}}}},3551:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var z,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var A=v.length-1;A>=0;A--)(z=v[A])&&(j=(E<3?z(j):E>3?z(x,y,j):z(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=c(3656),m=c(8460),g=c(844),S=c(2585),k=c(4725);let b=l.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(v,x,y,C,z){super(),this._element=v,this._mouseService=x,this._renderService=y,this._bufferService=C,this._linkProviderService=z,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.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(v){this._lastMouseEvent=v;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=v.composedPath();for(let C=0;C{E==null||E.forEach((j=>{j.link.dispose&&j.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[E,j]of this._linkProviderService.linkProviders.entries())x?(z=this._activeProviderReplies)!=null&&z.get(E)&&(y=this._checkLinkProviderResult(E,v,y)):j.provideLinks(v.y,(A=>{var O,P;if(this._isMouseOut)return;const D=A==null?void 0:A.map(($=>({link:$})));(O=this._activeProviderReplies)==null||O.set(E,D),y=this._checkLinkProviderResult(E,v,y),((P=this._activeProviderReplies)==null?void 0:P.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,x){const y=new Set;for(let C=0;Cv?this._bufferService.cols:j.link.range.end.x;for(let O=A;O<=D;O++){if(y.has(O)){z.splice(E--,1);break}y.add(O)}}}}_checkLinkProviderResult(v,x,y){var E;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(v);let z=!1;for(let j=0;jthis._linkAtPosition(A.link,x)));j&&(y=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let j=0;jthis._linkAtPosition(D.link,x)));if(A){y=!0,this._handleNewLink(A);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,x){this._currentLink&&this._lastMouseEvent&&(!v||!x||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(v.link,x)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,z,E;(C=this._currentLink)!=null&&C.state&&((E=(z=this._currentLink)==null?void 0:z.state)==null?void 0:E.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,z=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=z&&(this._clearCurrentLink(C,z),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(v,x){const y=v.range,C=this._bufferService.buffer.ydisp,z=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(z)}_linkLeave(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(v,x){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,z=x.y*this._bufferService.cols+x.x;return y<=z&&z<=C}_positionFromMouseEvent(v,x,y){const C=y.getCoords(v,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,x,y,C,z){return{x1:v,y1:x,x2:y,y2:C,cols:this._bufferService.cols,fg:z}}};l.Linkifier=b=d([_(1,k.IMouseService),_(2,k.IRenderService),_(3,S.IBufferService),_(4,k.ILinkProviderService)],b)},9042:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,z=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(z=(C<3?y(z):C>3?y(b,v,z):y(b,v))||z);return C>3&&z&&Object.defineProperty(b,v,z),z},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=c(511),m=c(2585);let g=l.OscLinkProvider=class{constructor(k,b,v){this._bufferService=k,this._optionsService=b,this._oscLinkService=v}provideLinks(k,b){var D;const v=this._bufferService.buffer.lines.get(k-1);if(!v)return void b(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,C=new f.CellData,z=v.getTrimmedLength();let E=-1,j=-1,A=!1;for(let O=0;Oy?y.activate(V,X,$):S(0,X),hover:(V,X)=>{var W;return(W=y==null?void 0:y.hover)==null?void 0:W.call(y,V,X,$)},leave:(V,X)=>{var W;return(W=y==null?void 0:y.leave)==null?void 0:W.call(y,V,X,$)}})}A=!1,C.hasExtendedAttrs()&&C.extended.urlId?(j=O,E=C.extended.urlId):(j=-1,E=-1)}}b(x)}};function S(k,b){if(confirm(`Do you want to navigate to ${b}? +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const C=this._terminal.buffer,A=C.lines.length.toString();for(let E=x;E<=y;E++){const j=C.lines.get(C.ydisp+E),T=[],D=(j==null?void 0:j.translateToString(!0,void 0,void 0,T))||"",I=(C.ydisp+E+1).toString(),P=this._rowElements[E];P&&(D.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=D,this._rowColumns.set(P,T)),P.setAttribute("aria-posinset",I),P.setAttribute("aria-setsize",A))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const C=x.target,A=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==A)return;let E,j;if(y===0?(E=C,j=this._rowElements.pop(),this._rowContainer.removeChild(j)):(E=this._rowElements.shift(),j=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),j.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const A=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(A)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:A,offset:((D=A.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:I,offset:P})=>{const H=I instanceof Text?I.parentNode:I;let F=parseInt(H==null?void 0:H.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const V=this._rowColumns.get(H);if(!V)return console.warn("columns is null. Race condition?"),null;let X=P=this._terminal.cols&&(++F,X=0),{row:F,column:X}},j=E(y),T=E(C);if(j&&T){if(j.row>T.row||j.row===T.row&&j.column>=T.column)throw new Error("invalid range");this._terminal.select(j.column,j.row,(T.row-j.row)*this._terminal.cols-j.column+T.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(m){return m.replace(/\r?\n/g,"\r")}function d(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function _(m,g,S,k){m=d(m=c(m),S.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(m,!0),g.value=""}function f(m,g,S){const k=S.getBoundingClientRect(),b=m.clientX-k.left-10,v=m.clientY-k.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${b}px`,g.style.top=`${v}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=c,l.bracketTextForPaste=d,l.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},l.handlePasteEvent=function(m,g,S,k){m.stopPropagation(),m.clipboardData&&_(m.clipboardData.getData("text/plain"),g,S,k)},l.paste=_,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(m,g,S,k,b){f(m,g,S),b&&k.rightClickSelect(m),g.value=k.selectionText,g.select()}},7239:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const d=c(1505);l.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,f,m){this._css.set(_,f,m)}getCss(_,f){return this._css.get(_,f)}setColor(_,f,m){this._color.set(_,f,m)}getColor(_,f){return this._color.get(_,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(c,d,_,f){c.addEventListener(d,_,f);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(d,_,f))}}}},3551:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=c(3656),m=c(8460),g=c(844),S=c(2585),k=c(4725);let b=l.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(v,x,y,C,A){super(),this._element=v,this._mouseService=x,this._renderService=y,this._bufferService=C,this._linkProviderService=A,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.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(v){this._lastMouseEvent=v;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=v.composedPath();for(let C=0;C{E==null||E.forEach((j=>{j.link.dispose&&j.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[E,j]of this._linkProviderService.linkProviders.entries())x?(A=this._activeProviderReplies)!=null&&A.get(E)&&(y=this._checkLinkProviderResult(E,v,y)):j.provideLinks(v.y,(T=>{var I,P;if(this._isMouseOut)return;const D=T==null?void 0:T.map((H=>({link:H})));(I=this._activeProviderReplies)==null||I.set(E,D),y=this._checkLinkProviderResult(E,v,y),((P=this._activeProviderReplies)==null?void 0:P.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,x){const y=new Set;for(let C=0;Cv?this._bufferService.cols:j.link.range.end.x;for(let I=T;I<=D;I++){if(y.has(I)){A.splice(E--,1);break}y.add(I)}}}}_checkLinkProviderResult(v,x,y){var E;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(v);let A=!1;for(let j=0;jthis._linkAtPosition(T.link,x)));j&&(y=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let j=0;jthis._linkAtPosition(D.link,x)));if(T){y=!0,this._handleNewLink(T);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,x){this._currentLink&&this._lastMouseEvent&&(!v||!x||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(v.link,x)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,A,E;(C=this._currentLink)!=null&&C.state&&((E=(A=this._currentLink)==null?void 0:A.state)==null?void 0:E.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=A&&(this._clearCurrentLink(C,A),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(v,x){const y=v.range,C=this._bufferService.buffer.ydisp,A=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(A)}_linkLeave(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(v,x){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,A=x.y*this._bufferService.cols+x.x;return y<=A&&A<=C}_positionFromMouseEvent(v,x,y){const C=y.getCoords(v,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,x,y,C,A){return{x1:v,y1:x,x2:y,y2:C,cols:this._bufferService.cols,fg:A}}};l.Linkifier=b=d([_(1,k.IMouseService),_(2,k.IRenderService),_(3,S.IBufferService),_(4,k.ILinkProviderService)],b)},9042:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=c(511),m=c(2585);let g=l.OscLinkProvider=class{constructor(k,b,v){this._bufferService=k,this._optionsService=b,this._oscLinkService=v}provideLinks(k,b){var D;const v=this._bufferService.buffer.lines.get(k-1);if(!v)return void b(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,C=new f.CellData,A=v.getTrimmedLength();let E=-1,j=-1,T=!1;for(let I=0;Iy?y.activate(V,X,H):S(0,X),hover:(V,X)=>{var W;return(W=y==null?void 0:y.hover)==null?void 0:W.call(y,V,X,H)},leave:(V,X)=>{var W;return(W=y==null?void 0:y.leave)==null?void 0:W.call(y,V,X,H)}})}T=!1,C.hasExtendedAttrs()&&C.extended.urlId?(j=I,E=C.extended.urlId):(j=-1,E=-1)}}b(x)}};function S(k,b){if(confirm(`Do you want to navigate to ${b}? -WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}l.OscLinkProvider=g=d([_(0,m.IBufferService),_(1,m.IOptionsService),_(2,m.IOscLinkService)],g)},6193:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.RenderDebouncer=void 0,l.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const d=c(3614),_=c(3656),f=c(3551),m=c(9042),g=c(3730),S=c(1680),k=c(3107),b=c(5744),v=c(2950),x=c(1296),y=c(428),C=c(4269),z=c(5114),E=c(8934),j=c(3230),A=c(9312),D=c(4725),O=c(6731),P=c(8055),$=c(8969),F=c(8460),V=c(844),X=c(6114),W=c(8437),Z=c(2584),J=c(7399),H=c(5941),L=c(9074),B=c(2585),Y=c(5435),G=c(4567),re=c(779);class he extends $.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=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(B.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,te)=>this.refresh(q,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,V.toDisposable)((()=>{var q,te;this._customKeyEventHandler=void 0,(te=(q=this.element)==null?void 0:q.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const q of se){let te,le="";switch(q.index){case 256:te="foreground",le="10";break;case 257:te="background",le="11";break;case 258:te="cursor",le="12";break;default:te="ansi",le="4;"+q.index}switch(q.type){case 0:const ge=P.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${le};${(0,H.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((ue=>ue.ansi[q.index]=P.channels.toColor(...q.color)));else{const ue=te;this._themeService.modifyColors((Ce=>Ce[ue]=P.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.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(G.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,q=this.buffer.lines.get(se);if(!q)return;const te=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ge=q.getWidth(te),ue=this._renderService.dimensions.css.cell.width*ge,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,Ee=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ee+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,d.copyHandler)(q,this._selectionService)})));const se=q=>(0,d.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,_.addDisposableDomListener)(this.element,"paste",se)),X.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var te;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"),((te=this.element)==null?void 0:te.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 q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),X.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(z.CoreBrowserService,this.textarea,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(O.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(j.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(A.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,q=this.element;function te(ue){const Ce=se._mouseService.getMouseReportCoords(ue,se.screenElement);if(!Ce)return!1;let Ee,Le;switch(ue.overrideType||ue.type){case"mousemove":Le=32,ue.buttons===void 0?(Ee=3,ue.button!==void 0&&(Ee=ue.button<3?ue.button:3)):Ee=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":Le=0,Ee=ue.button<3?ue.button:3;break;case"mousedown":Le=1,Ee=ue.button<3?ue.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(ue)===!1||se.viewport.getLinesScrolled(ue)===0)return!1;Le=ue.deltaY<0?0:1,Ee=4;break;default:return!1}return!(Le===void 0||Ee===void 0||Ee>4)&&se.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:Ee,action:Le,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:ue=>(te(ue),ue.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ue)),wheel:ue=>(te(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&te(ue)},mousemove:ue=>{ue.buttons||te(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),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&ue?le.mousemove||(q.addEventListener("mousemove",ge.mousemove),le.mousemove=ge.mousemove):(q.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ue?le.wheel||(q.addEventListener("wheel",ge.wheel,{passive:!1}),le.wheel=ge.wheel):(q.removeEventListener("wheel",le.wheel),le.wheel=null),2&ue?le.mouseup||(le.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ue?le.mousedrag||(le.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(q,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return te(ue),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ue)}))),this.register((0,_.addDisposableDomListener)(q,"wheel",(ue=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ue)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(ue);if(Ce===0)return;const Ee=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let Le="";for(let Pe=0;Pe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(q,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(se,q){var te;(te=this._renderService)==null||te.refreshRows(se,q)}updateCursorStyle(se){var q;(q=this._selectionService)!=null&&q.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,q,te=0){var le;te===1?(super.scrollLines(se,q,te),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(se)}paste(se){(0,d.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 q=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),q}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,q,te){this._selectionService.setSelection(se,q,te)}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,q){var te;(te=this._selectionService)==null||te.selectLines(se,q)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!q&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,J.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),te.type===3||te.type===2){const le=this.rows-1;return this.scrollLines(te.type===2?-le:le),this.cancel(se,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(te.cancel&&this.cancel(se,!0),!te.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):(te.key!==Z.C0.ETX&&te.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,q){const te=se.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||se.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||se.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?te:te&&(!q.keyCode||q.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)q=se.charCode;else if(se.which===null||se.which===void 0)q=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;q=se.which}return!(!q||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(q,!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 q=se.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(se),!0}return!1}resize(se,q){se!==this.cols||q!==this.rows?super.resize(se,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,q){var te,le;(te=this._charSizeService)==null||te.measure(),(le=this.viewport)==null||le.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 q=1;q{Object.defineProperty(l,"__esModule",{value:!0}),l.TimeBasedDebouncer=void 0,l.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=f-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var z,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var A=v.length-1;A>=0;A--)(z=v[A])&&(j=(E<3?z(j):E>3?z(x,y,j):z(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Viewport=void 0;const f=c(3656),m=c(4725),g=c(8460),S=c(844),k=c(2585);let b=l.Viewport=class extends S.Disposable{constructor(v,x,y,C,z,E,j,A){super(),this._viewportElement=v,this._scrollArea=x,this._bufferService=y,this._optionsService=C,this._charSizeService=z,this._renderService=E,this._coreBrowserService=j,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 g.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((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(A.colors),this.register(A.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.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(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<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(v,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=$),C=""}}return{bufferElements:z,cursorElement:y}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let x=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(v,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const x=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(v,x))}};l.Viewport=b=d([_(2,k.IBufferService),_(3,k.IOptionsService),_(4,m.ICharSizeService),_(5,m.IRenderService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],b)},3107:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,z=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(z=(C<3?y(z):C>3?y(b,v,z):y(b,v))||z);return C>3&&z&&Object.defineProperty(b,v,z),z},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferDecorationRenderer=void 0;const f=c(4725),m=c(844),g=c(2585);let S=l.BufferDecorationRenderer=class extends m.Disposable{constructor(k,b,v,x,y){super(),this._screenElement=k,this._bufferService=b,this._coreBrowserService=v,this._decorationService=x,this._renderService=y,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,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var x;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),b.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=k.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(k,b),b}_refreshStyle(k){const b=k.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let v=this._decorationElements.get(k);v||(v=this._createElement(k),k.element=v,this._decorationElements.set(k,v),this._container.appendChild(v),k.onDispose((()=>{this._decorationElements.delete(k),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(v)}}_refreshXPosition(k,b=k.element){if(!b)return;const v=k.options.x??0;(k.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var b;(b=this._decorationElements.get(k))==null||b.remove(),this._decorationElements.delete(k),k.dispose()}};l.BufferDecorationRenderer=S=d([_(1,g.IBufferService),_(2,f.ICoreBrowserService),_(3,g.IDecorationService),_(4,f.IRenderService)],S)},5871:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorZoneStore=void 0,l.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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,_){return d>=c.startBufferLine-this._linePadding[_||"full"]&&d<=c.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(o,l,c){var d=this&&this.__decorate||function(y,C,z,E){var j,A=arguments.length,D=A<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,z):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,z,E);else for(var O=y.length-1;O>=0;O--)(j=y[O])&&(D=(A<3?j(D):A>3?j(C,z,D):j(C,z))||D);return A>3&&D&&Object.defineProperty(C,z,D),D},_=this&&this.__param||function(y,C){return function(z,E){C(z,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OverviewRulerRenderer=void 0;const f=c(5871),m=c(4725),g=c(844),S=c(2585),k={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let x=l.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,z,E,j,A,D){var P;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=z,this._decorationService=E,this._renderService=j,this._optionsService=A,this._coreBrowserService=D,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(),(P=this._viewportElement.parentElement)==null||P.insertBefore(this._canvas,this._viewportElement);const O=this._canvas.getContext("2d");if(!O)throw new Error("Ctx cannot be null");this._ctx=O,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)((()=>{var $;($=this._canvas)==null||$.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=C,b.right=y,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(v[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};l.OverviewRulerRenderer=x=d([_(2,S.IBufferService),_(3,S.IDecorationService),_(4,m.IRenderService),_(5,S.IOptionsService),_(6,m.ICoreBrowserService)],x)},2950:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,z=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(z=(C<3?y(z):C>3?y(b,v,z):y(b,v))||z);return C>3&&z&&Object.defineProperty(b,v,z),z},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CompositionHelper=void 0;const f=c(4725),m=c(2585),g=c(2584);let S=l.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,b,v,x,y,C){this._textarea=k,this._compositionView=b,this._bufferService=v,this._optionsService=x,this._coreService=y,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 b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(k,"");this._dataAlreadySent=v,b.length>k.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};l.CompositionHelper=S=d([_(2,m.IBufferService),_(3,m.IOptionsService),_(4,m.ICoreService),_(5,f.IRenderService)],S)},9806:(o,l)=>{function c(d,_,f){const m=f.getBoundingClientRect(),g=d.getComputedStyle(f),S=parseInt(g.getPropertyValue("padding-left")),k=parseInt(g.getPropertyValue("padding-top"));return[_.clientX-m.left-S,_.clientY-m.top-k]}Object.defineProperty(l,"__esModule",{value:!0}),l.getCoords=l.getCoordsRelativeToElement=void 0,l.getCoordsRelativeToElement=c,l.getCoords=function(d,_,f,m,g,S,k,b,v){if(!S)return;const x=c(d,_,f);return x?(x[0]=Math.ceil((x[0]+(v?k/2:0))/k),x[1]=Math.ceil(x[1]/b),x[0]=Math.min(Math.max(x[0],1),m+(v?1:0)),x[1]=Math.min(Math.max(x[1],1),g),x):void 0}},9504:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.moveToCellSequence=void 0;const d=c(2584);function _(b,v,x,y){const C=b-f(b,x),z=v-f(v,x),E=Math.abs(C-z)-(function(j,A,D){let O=0;const P=j-f(j,D),$=A-f(A,D);for(let F=0;F=0&&bv?"A":"B"}function g(b,v,x,y,C,z){let E=b,j=v,A="";for(;E!==x||j!==y;)E+=C?1:-1,C&&E>z.cols-1?(A+=z.buffer.translateBufferLineToString(j,!1,b,E),E=0,b=0,j++):!C&&E<0&&(A+=z.buffer.translateBufferLineToString(j,!1,0,b+1),E=z.cols-1,b=E,j--);return A+z.buffer.translateBufferLineToString(j,!1,b,E)}function S(b,v){const x=v?"O":"[";return d.C0.ESC+x+b}function k(b,v){b=Math.floor(b);let x="";for(let y=0;y0?P-f(P,$):D;const X=P,W=(function(Z,J,H,L,B,Y){let G;return G=_(H,L,B,Y).length>0?L-f(L,B):J,Z=H&&Gb?"D":"C",k(Math.abs(C-b),S(E,y));E=z>v?"D":"C";const j=Math.abs(z-v);return k((function(A,D){return D.cols-A})(z>v?b:C,x)+(j-1)*x.cols+1+((z>v?C:b)-1),S(E,y))}},1296:function(o,l,c){var d=this&&this.__decorate||function(F,V,X,W){var Z,J=arguments.length,H=J<3?V:W===null?W=Object.getOwnPropertyDescriptor(V,X):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(F,V,X,W);else for(var L=F.length-1;L>=0;L--)(Z=F[L])&&(H=(J<3?Z(H):J>3?Z(V,X,H):Z(V,X))||H);return J>3&&H&&Object.defineProperty(V,X,H),H},_=this&&this.__param||function(F,V){return function(X,W){V(X,W,F)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRenderer=void 0;const f=c(3787),m=c(2550),g=c(2223),S=c(6171),k=c(6052),b=c(4725),v=c(8055),x=c(8460),y=c(844),C=c(2585),z="xterm-dom-renderer-owner-",E="xterm-rows",j="xterm-fg-",A="xterm-bg-",D="xterm-focus",O="xterm-selection";let P=1,$=l.DomRenderer=class extends y.Disposable{constructor(F,V,X,W,Z,J,H,L,B,Y,G,re,he){super(),this._terminal=F,this._document=V,this._element=X,this._screenElement=W,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=H,this._charSizeService=B,this._optionsService=Y,this._bufferService=G,this._coreBrowserService=re,this._themeService=he,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),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(O),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((oe=>this._injectCss(oe)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(z+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((oe=>this._handleLinkHover(oe)))),this.register(this._linkifier2.onHideLinkUnderline((oe=>this._handleLinkLeave(oe)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(z+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${E} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${E} .xterm-dim { color: ${v.color.multiplyOpacity(F.foreground,.5).css};}`,V+=`${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 X=`blink_underline_${this._terminalClass}`,W=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;V+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${W} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Z} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,V+=`${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${O} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${O} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${O} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,H]of F.ansi.entries())V+=`${this._terminalSelector} .${j}${J} { color: ${H.css}; }${this._terminalSelector} .${j}${J}.xterm-dim { color: ${v.color.multiplyOpacity(H,.5).css}; }${this._terminalSelector} .${A}${J} { background-color: ${H.css}; }`;V+=`${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(F.background).css}; }${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${A}${g.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,V){for(let X=this._rowElements.length;X<=V;X++){const W=this._document.createElement("div");this._rowContainer.appendChild(W),this._rowElements.push(W)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,V){this._refreshRowElements(F,V),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,V,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,V,X),this.renderRows(0,this._bufferService.rows-1),!F||!V)return;this._selectionRenderModel.update(this._terminal,F,V,X);const W=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,H=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||H<0)return;const L=this._document.createDocumentFragment();if(X){const B=F[0]>V[0];L.appendChild(this._createSelectionElement(J,B?V[0]:F[0],B?F[0]:V[0],H-J+1))}else{const B=W===J?F[0]:0,Y=J===Z?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,B,Y));const G=H-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,G)),J!==H){const re=Z===H?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(H,0,re))}}this._selectionContainer.appendChild(L)}_createSelectionElement(F,V,X,W=1){const Z=this._document.createElement("div"),J=V*this.dimensions.css.cell.width;let H=this.dimensions.css.cell.width*(X-V);return J+H>this.dimensions.css.canvas.width&&(H=this.dimensions.css.canvas.width-J),Z.style.height=W*this.dimensions.css.cell.height+"px",Z.style.top=F*this.dimensions.css.cell.height+"px",Z.style.left=`${J}px`,Z.style.width=`${H}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 F of this._rowElements)F.replaceChildren()}renderRows(F,V){const X=this._bufferService.buffer,W=X.ybase+X.y,Z=Math.min(X.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,H=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let B=F;B<=V;B++){const Y=B+X.ydisp,G=this._rowElements[B],re=X.lines.get(Y);if(!G||!re)break;G.replaceChildren(...this._rowFactory.createRow(re,Y,Y===W,H,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${z}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,V,X,W,Z,J){X<0&&(F=0),W<0&&(V=0);const H=this._bufferService.rows-1;X=Math.max(Math.min(X,H),0),W=Math.max(Math.min(W,H),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,B=L.ybase+L.y,Y=Math.min(L.x,Z-1),G=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let oe=X;oe<=W;++oe){const se=oe+L.ydisp,q=this._rowElements[oe],te=L.lines.get(se);if(!q||!te)break;q.replaceChildren(...this._rowFactory.createRow(te,se,se===B,re,he,Y,G,this.dimensions.css.cell.width,this._widthCache,J?oe===X?F:0:-1,J?(oe===W?V:Z)-1:-1))}}};l.DomRenderer=$=d([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],$)},3787:function(o,l,c){var d=this&&this.__decorate||function(E,j,A,D){var O,P=arguments.length,$=P<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,A):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(E,j,A,D);else for(var F=E.length-1;F>=0;F--)(O=E[F])&&($=(P<3?O($):P>3?O(j,A,$):O(j,A))||$);return P>3&&$&&Object.defineProperty(j,A,$),$},_=this&&this.__param||function(E,j){return function(A,D){j(A,D,E)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRendererRowFactory=void 0;const f=c(2223),m=c(643),g=c(511),S=c(2585),k=c(8055),b=c(4725),v=c(4269),x=c(6171),y=c(3734);let C=l.DomRendererRowFactory=class{constructor(E,j,A,D,O,P,$){this._document=E,this._characterJoinerService=j,this._optionsService=A,this._coreBrowserService=D,this._coreService=O,this._decorationService=P,this._themeService=$,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,j,A){this._selectionStart=E,this._selectionEnd=j,this._columnSelectMode=A}createRow(E,j,A,D,O,P,$,F,V,X,W){const Z=[],J=this._characterJoinerService.getJoinedCharacters(j),H=this._themeService.colors;let L,B=E.getNoBgTrimmedLength();A&&B0&&Ce===J[0][0]){Le=!0;const bt=J.shift();Ve=new v.JoinedCellData(this._workCell,E.translateToString(!0,bt[0],bt[1]),bt[1]-bt[0]),Pe=bt[1]-1,Ee=Ve.getWidth()}const ft=this._isCellInSelection(Ce,j),Be=A&&Ce===P,wt=ue&&Ce>=X&&Ce<=W;let zt=!1;this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{zt=!0}));let vt=Ve.getChars()||m.WHITESPACE_CELL_CHAR;if(vt===" "&&(Ve.isUnderline()||Ve.isOverline())&&(vt=" "),le=Ee*F-V.get(vt,Ve.isBold(),Ve.isItalic()),L){if(Y&&(ft&&te||!ft&&!te&&Ve.bg===re)&&(ft&&te&&H.selectionForeground||Ve.fg===he)&&Ve.extended.ext===oe&&wt===se&&le===q&&!Be&&!Le&&!zt){Ve.isInvisible()?G+=m.WHITESPACE_CELL_CHAR:G+=vt,Y++;continue}Y&&(L.textContent=G),L=this._document.createElement("span"),Y=0,G=""}else L=this._document.createElement("span");if(re=Ve.bg,he=Ve.fg,oe=Ve.extended.ext,se=wt,q=le,te=ft,Le&&P>=Ce&&P<=Pe&&(P=Ce),!this._coreService.isCursorHidden&&Be&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)$&&ge.push("xterm-cursor-blink"),ge.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(O)switch(O){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(Ve.isBold()&&ge.push("xterm-bold"),Ve.isItalic()&&ge.push("xterm-italic"),Ve.isDim()&&ge.push("xterm-dim"),G=Ve.isInvisible()?m.WHITESPACE_CELL_CHAR:Ve.getChars()||m.WHITESPACE_CELL_CHAR,Ve.isUnderline()&&(ge.push(`xterm-underline-${Ve.extended.underlineStyle}`),G===" "&&(G=" "),!Ve.isUnderlineColorDefault()))if(Ve.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Ve.getUnderlineColor()).join(",")})`;else{let bt=Ve.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ve.isBold()&&bt<8&&(bt+=8),L.style.textDecorationColor=H.ansi[bt].css}Ve.isOverline()&&(ge.push("xterm-overline"),G===" "&&(G=" ")),Ve.isStrikethrough()&&ge.push("xterm-strikethrough"),wt&&(L.style.textDecoration="underline");let Lt=Ve.getFgColor(),St=Ve.getFgColorMode(),kt=Ve.getBgColor(),xe=Ve.getBgColorMode();const je=!!Ve.isInverse();if(je){const bt=Lt;Lt=kt,kt=bt;const tn=St;St=xe,xe=tn}let We,st,nt,Ht=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{bt.options.layer!=="top"&&Ht||(bt.backgroundColorRGB&&(xe=50331648,kt=bt.backgroundColorRGB.rgba>>8&16777215,We=bt.backgroundColorRGB),bt.foregroundColorRGB&&(St=50331648,Lt=bt.foregroundColorRGB.rgba>>8&16777215,st=bt.foregroundColorRGB),Ht=bt.options.layer==="top")})),!Ht&&ft&&(We=this._coreBrowserService.isFocused?H.selectionBackgroundOpaque:H.selectionInactiveBackgroundOpaque,kt=We.rgba>>8&16777215,xe=50331648,Ht=!0,H.selectionForeground&&(St=50331648,Lt=H.selectionForeground.rgba>>8&16777215,st=H.selectionForeground)),Ht&&ge.push("xterm-decoration-top"),xe){case 16777216:case 33554432:nt=H.ansi[kt],ge.push(`xterm-bg-${kt}`);break;case 50331648:nt=k.channels.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(L,`background-color:#${z((kt>>>0).toString(16),"0",6)}`);break;default:je?(nt=H.foreground,ge.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):nt=H.background}switch(We||Ve.isDim()&&(We=k.color.multiplyOpacity(nt,.5)),St){case 16777216:case 33554432:Ve.isBold()&&Lt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Lt+=8),this._applyMinimumContrast(L,nt,H.ansi[Lt],Ve,We,void 0)||ge.push(`xterm-fg-${Lt}`);break;case 50331648:const bt=k.channels.toColor(Lt>>16&255,Lt>>8&255,255&Lt);this._applyMinimumContrast(L,nt,bt,Ve,We,st)||this._addStyle(L,`color:#${z(Lt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,nt,H.foreground,Ve,We,st)||je&&ge.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ge.length&&(L.className=ge.join(" "),ge.length=0),Be||Le||zt?L.textContent=G:Y++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),Z.push(L),Ce=Pe}return L&&Y&&(L.textContent=G),Z}_applyMinimumContrast(E,j,A,D,O,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const $=this._getContrastCache(D);let F;if(O||P||(F=$.getColor(j.rgba,A.rgba)),F===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);F=k.color.ensureContrastRatio(O||j,P||A,V),$.setColor((O||j).rgba,(P||A).rgba,F??null)}return!!F&&(this._addStyle(E,`color:${F.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,j){E.setAttribute("style",`${E.getAttribute("style")||""}${j};`)}_isCellInSelection(E,j){const A=this._selectionStart,D=this._selectionEnd;return!(!A||!D)&&(this._columnSelectMode?A[0]<=D[0]?E>=A[0]&&j>=A[1]&&E=A[1]&&E>=D[0]&&j<=D[1]:j>A[1]&&j=A[0]&&E=A[0])}};function z(E,j,A){for(;E.length{Object.defineProperty(l,"__esModule",{value:!0}),l.WidthCache=void 0,l.WidthCache=class{constructor(c,d){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 _=c.createElement("span");_.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=c.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[_,f,m,g],this._container.appendChild(_),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(g),d.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,d,_,f){c===this._font&&d===this._fontSize&&_===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=d,this._weight=_,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,d,_){let f=0;if(!d&&!_&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const S=this._measure(c,0);return S>0&&(this._flat[f]=S),S}let m=c;d&&(m+="B"),_&&(m+="I");let g=this._holey.get(m);if(g===void 0){let S=0;d&&(S|=1),_&&(S|=2),g=this._measure(c,S),g>0&&this._holey.set(m,g)}return g}_measure(c,d){const _=this._measureElements[d];return _.textContent=c.repeat(32),_.offsetWidth/32}}},2223:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.TEXT_BASELINE=l.DIM_OPACITY=l.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);l.INVERTED_DEFAULT_COLOR=257,l.DIM_OPACITY=.5,l.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(o,l)=>{function c(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(l,"__esModule",{value:!0}),l.computeNextVariantOffset=l.createRenderDimensions=l.treatGlyphAsBackgroundColor=l.allowRescaling=l.isEmoji=l.isRestrictedPowerlineGlyph=l.isPowerlineGlyph=l.throwIfFalsy=void 0,l.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},l.isPowerlineGlyph=c,l.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},l.isEmoji=d,l.allowRescaling=function(_,f,m,g){return f===1&&m>Math.ceil(1.5*g)&&_!==void 0&&_>255&&!d(_)&&!c(_)&&!(function(S){return 57344<=S&&S<=63743})(_)},l.treatGlyphAsBackgroundColor=function(_){return c(_)||(function(f){return 9472<=f&&f<=9631})(_)},l.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}}}},l.computeNextVariantOffset=function(_,f,m=0){return(_-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.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(_,f,m,g=!1){if(this.selectionStart=f,this.selectionEnd=m,!f||!m||f[0]===m[0]&&f[1]===m[1])return void this.clear();const S=_.buffers.active.ydisp,k=f[1]-S,b=m[1]-S,v=Math.max(k,0),x=Math.min(b,_.rows-1);v>=_.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=k,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=m[0])}isCellSelected(_,f,m){return!!this.hasSelection&&(m-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&m>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m=this.startCol&&f=this.startCol)}}l.createSelectionRenderModel=function(){return new c}},456:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionModel=void 0,l.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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(o,l,c){var d=this&&this.__decorate||function(x,y,C,z){var E,j=arguments.length,A=j<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,C):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(x,y,C,z);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(A=(j<3?E(A):j>3?E(y,C,A):E(y,C))||A);return j>3&&A&&Object.defineProperty(y,C,A),A},_=this&&this.__param||function(x,y){return function(C,z){y(C,z,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharSizeService=void 0;const f=c(2585),m=c(8460),g=c(844);let S=l.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};l.CharSizeService=S=d([_(2,f.IOptionsService)],S);class k extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class b extends k{constructor(y,C,z){super(),this._document=y,this._parentElement=C,this._optionsService=z,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 v extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var z,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var A=v.length-1;A>=0;A--)(z=v[A])&&(j=(E<3?z(j):E>3?z(x,y,j):z(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharacterJoinerService=l.JoinedCellData=void 0;const f=c(3734),m=c(643),g=c(511),S=c(2585);class k extends f.AttributeData{constructor(x,y,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.JoinedCellData=k;let b=l.CharacterJoinerService=class xT{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const $=this._getJoinedRanges(z,A,j,y,E);for(let F=0;F<$.length;F++)C.push($[F])}E=P,A=j,D=this._workCell.fg,O=this._workCell.bg}j+=this._workCell.getChars().length||m.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-E>1){const P=this._getJoinedRanges(z,A,j,y,E);for(let $=0;${Object.defineProperty(l,"__esModule",{value:!0}),l.CoreBrowserService=void 0;const d=c(844),_=c(8460),f=c(3656);class m extends d.Disposable{constructor(k,b,v){super(),this._textarea=k,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,_.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}}l.CoreBrowserService=m;class g extends d.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.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:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.LinkProviderService=void 0;const d=c(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}l.LinkProviderService=_},8934:function(o,l,c){var d=this&&this.__decorate||function(S,k,b,v){var x,y=arguments.length,C=y<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(S,k,b,v);else for(var z=S.length-1;z>=0;z--)(x=S[z])&&(C=(y<3?x(C):y>3?x(k,b,C):x(k,b))||C);return y>3&&C&&Object.defineProperty(k,b,C),C},_=this&&this.__param||function(S,k){return function(b,v){k(b,v,S)}};Object.defineProperty(l,"__esModule",{value:!0}),l.MouseService=void 0;const f=c(4725),m=c(9806);let g=l.MouseService=class{constructor(S,k){this._renderService=S,this._charSizeService=k}getCoords(S,k,b,v,x){return(0,m.getCoords)(window,S,k,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(S,k){const b=(0,m.getCoordsRelativeToElement)(window,S,k);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};l.MouseService=g=d([_(0,f.IRenderService),_(1,f.ICharSizeService)],g)},3230:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,z){var E,j=arguments.length,A=j<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,C):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(x,y,C,z);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(A=(j<3?E(A):j>3?E(y,C,A):E(y,C))||A);return j>3&&A&&Object.defineProperty(y,C,A),A},_=this&&this.__param||function(x,y){return function(C,z){y(C,z,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.RenderService=void 0;const f=c(6193),m=c(4725),g=c(8460),S=c(844),k=c(7226),b=c(2585);let v=l.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,C,z,E,j,A,D){super(),this._rowCount=x,this._charSizeService=z,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new S.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((O,P)=>this._renderRows(O,P)),A),this.register(this._renderDebouncer),this.register(A.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(j.onResize((()=>this._fullRefresh()))),this.register(j.buffers.onBufferActivate((()=>{var O;return(O=this._renderer.value)==null?void 0:O.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(j.cols,j.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(j.buffer.y,j.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(A.window,y),this.register(A.onWindowChange((O=>this._registerIntersectionObserver(O,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((z=>this._handleIntersectionChange(z[z.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,S.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,C){var z;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(z=this._renderer.value)==null||z.handleSelectionChanged(x,y,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};l.RenderService=v=d([_(2,b.IOptionsService),_(3,m.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],v)},9312:function(o,l,c){var d=this&&this.__decorate||function(A,D,O,P){var $,F=arguments.length,V=F<3?D:P===null?P=Object.getOwnPropertyDescriptor(D,O):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(A,D,O,P);else for(var X=A.length-1;X>=0;X--)($=A[X])&&(V=(F<3?$(V):F>3?$(D,O,V):$(D,O))||V);return F>3&&V&&Object.defineProperty(D,O,V),V},_=this&&this.__param||function(A,D){return function(O,P){D(O,P,A)}};Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionService=void 0;const f=c(9806),m=c(9504),g=c(456),S=c(4725),k=c(8460),b=c(844),v=c(6114),x=c(4841),y=c(511),C=c(2585),z=" ",E=new RegExp(z,"g");let j=l.SelectionService=class extends b.Disposable{constructor(A,D,O,P,$,F,V,X,W){super(),this._element=A,this._screenElement=D,this._linkifier=O,this._bufferService=P,this._coreService=$,this._mouseService=F,this._optionsService=V,this._renderService=X,this._coreBrowserService=W,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.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 g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.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 A=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!A||!D||A[0]===D[0]&&A[1]===D[1])}get selectionText(){const A=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!A||!D)return"";const O=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(A[0]===D[0])return"";const $=A[0]$.replace(E," "))).join(v.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}l.OscLinkProvider=g=d([_(0,m.IBufferService),_(1,m.IOptionsService),_(2,m.IOscLinkService)],g)},6193:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.RenderDebouncer=void 0,l.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const d=c(3614),_=c(3656),f=c(3551),m=c(9042),g=c(3730),S=c(1680),k=c(3107),b=c(5744),v=c(2950),x=c(1296),y=c(428),C=c(4269),A=c(5114),E=c(8934),j=c(3230),T=c(9312),D=c(4725),I=c(6731),P=c(8055),H=c(8969),F=c(8460),V=c(844),X=c(6114),W=c(8437),Z=c(2584),J=c(7399),B=c(5941),L=c(9074),$=c(2585),K=c(5435),G=c(4567),re=c(779);class oe extends H.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(ie={}){super(ie),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService($.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,te)=>this.refresh(q,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,V.toDisposable)((()=>{var q,te;this._customKeyEventHandler=void 0,(te=(q=this.element)==null?void 0:q.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(ie){if(this._themeService)for(const q of ie){let te,le="";switch(q.index){case 256:te="foreground",le="10";break;case 257:te="background",le="11";break;case 258:te="cursor",le="12";break;default:te="ansi",le="4;"+q.index}switch(q.type){case 0:const ge=P.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${le};${(0,B.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((ue=>ue.ansi[q.index]=P.channels.toColor(...q.color)));else{const ue=te;this._themeService.modifyColors((Ce=>Ce[ue]=P.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ie){ie?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ie;return(ie=this.textarea)==null?void 0:ie.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 ie=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(ie);if(!q)return;const te=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ge=q.getWidth(te),ue=this._renderService.dimensions.css.cell.width*ge,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,Ee=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ee+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,d.copyHandler)(q,this._selectionService)})));const ie=q=>(0,d.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,_.addDisposableDomListener)(this.element,"paste",ie)),X.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(ie=>this._keyUp(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(ie=>this._keyDown(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(ie=>this._keyPress(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(ie=>this._compositionHelper.compositionupdate(ie)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(ie=>this._inputEvent(ie)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ie){var te;if(!ie)throw new Error("Terminal requires a parent element.");if(ie.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((te=this.element)==null?void 0:te.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ie.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"),ie.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),X.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(A.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(I.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(j.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ie=this,q=this.element;function te(ue){const Ce=ie._mouseService.getMouseReportCoords(ue,ie.screenElement);if(!Ce)return!1;let Ee,Le;switch(ue.overrideType||ue.type){case"mousemove":Le=32,ue.buttons===void 0?(Ee=3,ue.button!==void 0&&(Ee=ue.button<3?ue.button:3)):Ee=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":Le=0,Ee=ue.button<3?ue.button:3;break;case"mousedown":Le=1,Ee=ue.button<3?ue.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(ue)===!1||ie.viewport.getLinesScrolled(ue)===0)return!1;Le=ue.deltaY<0?0:1,Ee=4;break;default:return!1}return!(Le===void 0||Ee===void 0||Ee>4)&&ie.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:Ee,action:Le,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:ue=>(te(ue),ue.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ue)),wheel:ue=>(te(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&te(ue)},mousemove:ue=>{ue.buttons||te(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),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&ue?le.mousemove||(q.addEventListener("mousemove",ge.mousemove),le.mousemove=ge.mousemove):(q.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ue?le.wheel||(q.addEventListener("wheel",ge.wheel,{passive:!1}),le.wheel=ge.wheel):(q.removeEventListener("wheel",le.wheel),le.wheel=null),2&ue?le.mouseup||(le.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ue?le.mousedrag||(le.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(q,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return te(ue),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ue)}))),this.register((0,_.addDisposableDomListener)(q,"wheel",(ue=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ue)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(ue);if(Ce===0)return;const Ee=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let Le="";for(let Pe=0;Pe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(q,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(ie,q){var te;(te=this._renderService)==null||te.refreshRows(ie,q)}updateCursorStyle(ie){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(ie)?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(ie,q,te=0){var le;te===1?(super.scrollLines(ie,q,te),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ie)}paste(ie){(0,d.paste)(ie,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ie){this._customKeyEventHandler=ie}attachCustomWheelEventHandler(ie){this._customWheelEventHandler=ie}registerLinkProvider(ie){return this._linkProviderService.registerLinkProvider(ie)}registerCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ie)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ie){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ie)}registerDecoration(ie){return this._decorationService.registerDecoration(ie)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ie,q,te){this._selectionService.setSelection(ie,q,te)}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 ie;(ie=this._selectionService)==null||ie.clearSelection()}selectAll(){var ie;(ie=this._selectionService)==null||ie.selectAll()}selectLines(ie,q){var te;(te=this._selectionService)==null||te.selectLines(ie,q)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!q&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,J.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),te.type===3||te.type===2){const le=this.rows-1;return this.scrollLines(te.type===2?-le:le),this.cancel(ie,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(te.cancel&&this.cancel(ie,!0),!te.key||!!(ie.key&&!ie.ctrlKey&&!ie.altKey&&!ie.metaKey&&ie.key.length===1&&ie.key.charCodeAt(0)>=65&&ie.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==Z.C0.ETX&&te.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,q){const te=ie.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||ie.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||ie.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?te:te&&(!q.keyCode||q.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)q=ie.charCode;else if(ie.which===null||ie.which===void 0)q=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;q=ie.which}return!(!q||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ie){if(ie.data&&ie.inputType==="insertText"&&(!ie.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=ie.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(ie),!0}return!1}resize(ie,q){ie!==this.cols||q!==this.rows?super.resize(ie,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,q){var te,le;(te=this._charSizeService)==null||te.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ie;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 q=1;q{Object.defineProperty(l,"__esModule",{value:!0}),l.TimeBasedDebouncer=void 0,l.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=f-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Viewport=void 0;const f=c(3656),m=c(4725),g=c(8460),S=c(844),k=c(2585);let b=l.Viewport=class extends S.Disposable{constructor(v,x,y,C,A,E,j,T){super(),this._viewportElement=v,this._scrollArea=x,this._bufferService=y,this._optionsService=C,this._charSizeService=A,this._renderService=E,this._coreBrowserService=j,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 g.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((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.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(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<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(v,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=H),C=""}}return{bufferElements:A,cursorElement:y}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let x=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(v,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const x=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(v,x))}};l.Viewport=b=d([_(2,k.IBufferService),_(3,k.IOptionsService),_(4,m.ICharSizeService),_(5,m.IRenderService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],b)},3107:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferDecorationRenderer=void 0;const f=c(4725),m=c(844),g=c(2585);let S=l.BufferDecorationRenderer=class extends m.Disposable{constructor(k,b,v,x,y){super(),this._screenElement=k,this._bufferService=b,this._coreBrowserService=v,this._decorationService=x,this._renderService=y,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,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var x;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),b.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=k.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(k,b),b}_refreshStyle(k){const b=k.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let v=this._decorationElements.get(k);v||(v=this._createElement(k),k.element=v,this._decorationElements.set(k,v),this._container.appendChild(v),k.onDispose((()=>{this._decorationElements.delete(k),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(v)}}_refreshXPosition(k,b=k.element){if(!b)return;const v=k.options.x??0;(k.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var b;(b=this._decorationElements.get(k))==null||b.remove(),this._decorationElements.delete(k),k.dispose()}};l.BufferDecorationRenderer=S=d([_(1,g.IBufferService),_(2,f.ICoreBrowserService),_(3,g.IDecorationService),_(4,f.IRenderService)],S)},5871:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorZoneStore=void 0,l.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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,_){return d>=c.startBufferLine-this._linePadding[_||"full"]&&d<=c.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(o,l,c){var d=this&&this.__decorate||function(y,C,A,E){var j,T=arguments.length,D=T<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,A):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,A,E);else for(var I=y.length-1;I>=0;I--)(j=y[I])&&(D=(T<3?j(D):T>3?j(C,A,D):j(C,A))||D);return T>3&&D&&Object.defineProperty(C,A,D),D},_=this&&this.__param||function(y,C){return function(A,E){C(A,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OverviewRulerRenderer=void 0;const f=c(5871),m=c(4725),g=c(844),S=c(2585),k={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let x=l.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,A,E,j,T,D){var P;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=A,this._decorationService=E,this._renderService=j,this._optionsService=T,this._coreBrowserService=D,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(),(P=this._viewportElement.parentElement)==null||P.insertBefore(this._canvas,this._viewportElement);const I=this._canvas.getContext("2d");if(!I)throw new Error("Ctx cannot be null");this._ctx=I,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)((()=>{var H;(H=this._canvas)==null||H.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=C,b.right=y,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(v[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};l.OverviewRulerRenderer=x=d([_(2,S.IBufferService),_(3,S.IDecorationService),_(4,m.IRenderService),_(5,S.IOptionsService),_(6,m.ICoreBrowserService)],x)},2950:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CompositionHelper=void 0;const f=c(4725),m=c(2585),g=c(2584);let S=l.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,b,v,x,y,C){this._textarea=k,this._compositionView=b,this._bufferService=v,this._optionsService=x,this._coreService=y,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 b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(k,"");this._dataAlreadySent=v,b.length>k.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};l.CompositionHelper=S=d([_(2,m.IBufferService),_(3,m.IOptionsService),_(4,m.ICoreService),_(5,f.IRenderService)],S)},9806:(o,l)=>{function c(d,_,f){const m=f.getBoundingClientRect(),g=d.getComputedStyle(f),S=parseInt(g.getPropertyValue("padding-left")),k=parseInt(g.getPropertyValue("padding-top"));return[_.clientX-m.left-S,_.clientY-m.top-k]}Object.defineProperty(l,"__esModule",{value:!0}),l.getCoords=l.getCoordsRelativeToElement=void 0,l.getCoordsRelativeToElement=c,l.getCoords=function(d,_,f,m,g,S,k,b,v){if(!S)return;const x=c(d,_,f);return x?(x[0]=Math.ceil((x[0]+(v?k/2:0))/k),x[1]=Math.ceil(x[1]/b),x[0]=Math.min(Math.max(x[0],1),m+(v?1:0)),x[1]=Math.min(Math.max(x[1],1),g),x):void 0}},9504:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.moveToCellSequence=void 0;const d=c(2584);function _(b,v,x,y){const C=b-f(b,x),A=v-f(v,x),E=Math.abs(C-A)-(function(j,T,D){let I=0;const P=j-f(j,D),H=T-f(T,D);for(let F=0;F=0&&bv?"A":"B"}function g(b,v,x,y,C,A){let E=b,j=v,T="";for(;E!==x||j!==y;)E+=C?1:-1,C&&E>A.cols-1?(T+=A.buffer.translateBufferLineToString(j,!1,b,E),E=0,b=0,j++):!C&&E<0&&(T+=A.buffer.translateBufferLineToString(j,!1,0,b+1),E=A.cols-1,b=E,j--);return T+A.buffer.translateBufferLineToString(j,!1,b,E)}function S(b,v){const x=v?"O":"[";return d.C0.ESC+x+b}function k(b,v){b=Math.floor(b);let x="";for(let y=0;y0?P-f(P,H):D;const X=P,W=(function(Z,J,B,L,$,K){let G;return G=_(B,L,$,K).length>0?L-f(L,$):J,Z=B&&Gb?"D":"C",k(Math.abs(C-b),S(E,y));E=A>v?"D":"C";const j=Math.abs(A-v);return k((function(T,D){return D.cols-T})(A>v?b:C,x)+(j-1)*x.cols+1+((A>v?C:b)-1),S(E,y))}},1296:function(o,l,c){var d=this&&this.__decorate||function(F,V,X,W){var Z,J=arguments.length,B=J<3?V:W===null?W=Object.getOwnPropertyDescriptor(V,X):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(F,V,X,W);else for(var L=F.length-1;L>=0;L--)(Z=F[L])&&(B=(J<3?Z(B):J>3?Z(V,X,B):Z(V,X))||B);return J>3&&B&&Object.defineProperty(V,X,B),B},_=this&&this.__param||function(F,V){return function(X,W){V(X,W,F)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRenderer=void 0;const f=c(3787),m=c(2550),g=c(2223),S=c(6171),k=c(6052),b=c(4725),v=c(8055),x=c(8460),y=c(844),C=c(2585),A="xterm-dom-renderer-owner-",E="xterm-rows",j="xterm-fg-",T="xterm-bg-",D="xterm-focus",I="xterm-selection";let P=1,H=l.DomRenderer=class extends y.Disposable{constructor(F,V,X,W,Z,J,B,L,$,K,G,re,oe){super(),this._terminal=F,this._document=V,this._element=X,this._screenElement=W,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=B,this._charSizeService=$,this._optionsService=K,this._bufferService=G,this._coreBrowserService=re,this._themeService=oe,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),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(I),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(A+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(A+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${E} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${E} .xterm-dim { color: ${v.color.multiplyOpacity(F.foreground,.5).css};}`,V+=`${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 X=`blink_underline_${this._terminalClass}`,W=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;V+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${W} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Z} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,V+=`${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${I} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${I} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${I} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,B]of F.ansi.entries())V+=`${this._terminalSelector} .${j}${J} { color: ${B.css}; }${this._terminalSelector} .${j}${J}.xterm-dim { color: ${v.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${T}${J} { background-color: ${B.css}; }`;V+=`${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(F.background).css}; }${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,V){for(let X=this._rowElements.length;X<=V;X++){const W=this._document.createElement("div");this._rowContainer.appendChild(W),this._rowElements.push(W)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,V){this._refreshRowElements(F,V),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,V,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,V,X),this.renderRows(0,this._bufferService.rows-1),!F||!V)return;this._selectionRenderModel.update(this._terminal,F,V,X);const W=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||B<0)return;const L=this._document.createDocumentFragment();if(X){const $=F[0]>V[0];L.appendChild(this._createSelectionElement(J,$?V[0]:F[0],$?F[0]:V[0],B-J+1))}else{const $=W===J?F[0]:0,K=J===Z?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,$,K));const G=B-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,G)),J!==B){const re=Z===B?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,0,re))}}this._selectionContainer.appendChild(L)}_createSelectionElement(F,V,X,W=1){const Z=this._document.createElement("div"),J=V*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(X-V);return J+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-J),Z.style.height=W*this.dimensions.css.cell.height+"px",Z.style.top=F*this.dimensions.css.cell.height+"px",Z.style.left=`${J}px`,Z.style.width=`${B}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 F of this._rowElements)F.replaceChildren()}renderRows(F,V){const X=this._bufferService.buffer,W=X.ybase+X.y,Z=Math.min(X.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let $=F;$<=V;$++){const K=$+X.ydisp,G=this._rowElements[$],re=X.lines.get(K);if(!G||!re)break;G.replaceChildren(...this._rowFactory.createRow(re,K,K===W,B,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${A}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,V,X,W,Z,J){X<0&&(F=0),W<0&&(V=0);const B=this._bufferService.rows-1;X=Math.max(Math.min(X,B),0),W=Math.max(Math.min(W,B),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,$=L.ybase+L.y,K=Math.min(L.x,Z-1),G=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=X;he<=W;++he){const ie=he+L.ydisp,q=this._rowElements[he],te=L.lines.get(ie);if(!q||!te)break;q.replaceChildren(...this._rowFactory.createRow(te,ie,ie===$,re,oe,K,G,this.dimensions.css.cell.width,this._widthCache,J?he===X?F:0:-1,J?(he===W?V:Z)-1:-1))}}};l.DomRenderer=H=d([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],H)},3787:function(o,l,c){var d=this&&this.__decorate||function(E,j,T,D){var I,P=arguments.length,H=P<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(E,j,T,D);else for(var F=E.length-1;F>=0;F--)(I=E[F])&&(H=(P<3?I(H):P>3?I(j,T,H):I(j,T))||H);return P>3&&H&&Object.defineProperty(j,T,H),H},_=this&&this.__param||function(E,j){return function(T,D){j(T,D,E)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRendererRowFactory=void 0;const f=c(2223),m=c(643),g=c(511),S=c(2585),k=c(8055),b=c(4725),v=c(4269),x=c(6171),y=c(3734);let C=l.DomRendererRowFactory=class{constructor(E,j,T,D,I,P,H){this._document=E,this._characterJoinerService=j,this._optionsService=T,this._coreBrowserService=D,this._coreService=I,this._decorationService=P,this._themeService=H,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,j,T){this._selectionStart=E,this._selectionEnd=j,this._columnSelectMode=T}createRow(E,j,T,D,I,P,H,F,V,X,W){const Z=[],J=this._characterJoinerService.getJoinedCharacters(j),B=this._themeService.colors;let L,$=E.getNoBgTrimmedLength();T&&$0&&Ce===J[0][0]){Le=!0;const bt=J.shift();Ve=new v.JoinedCellData(this._workCell,E.translateToString(!0,bt[0],bt[1]),bt[1]-bt[0]),Pe=bt[1]-1,Ee=Ve.getWidth()}const ft=this._isCellInSelection(Ce,j),Be=T&&Ce===P,wt=ue&&Ce>=X&&Ce<=W;let At=!1;this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{At=!0}));let vt=Ve.getChars()||m.WHITESPACE_CELL_CHAR;if(vt===" "&&(Ve.isUnderline()||Ve.isOverline())&&(vt=" "),le=Ee*F-V.get(vt,Ve.isBold(),Ve.isItalic()),L){if(K&&(ft&&te||!ft&&!te&&Ve.bg===re)&&(ft&&te&&B.selectionForeground||Ve.fg===oe)&&Ve.extended.ext===he&&wt===ie&&le===q&&!Be&&!Le&&!At){Ve.isInvisible()?G+=m.WHITESPACE_CELL_CHAR:G+=vt,K++;continue}K&&(L.textContent=G),L=this._document.createElement("span"),K=0,G=""}else L=this._document.createElement("span");if(re=Ve.bg,oe=Ve.fg,he=Ve.extended.ext,ie=wt,q=le,te=ft,Le&&P>=Ce&&P<=Pe&&(P=Ce),!this._coreService.isCursorHidden&&Be&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)H&&ge.push("xterm-cursor-blink"),ge.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(I)switch(I){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(Ve.isBold()&&ge.push("xterm-bold"),Ve.isItalic()&&ge.push("xterm-italic"),Ve.isDim()&&ge.push("xterm-dim"),G=Ve.isInvisible()?m.WHITESPACE_CELL_CHAR:Ve.getChars()||m.WHITESPACE_CELL_CHAR,Ve.isUnderline()&&(ge.push(`xterm-underline-${Ve.extended.underlineStyle}`),G===" "&&(G=" "),!Ve.isUnderlineColorDefault()))if(Ve.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Ve.getUnderlineColor()).join(",")})`;else{let bt=Ve.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ve.isBold()&&bt<8&&(bt+=8),L.style.textDecorationColor=B.ansi[bt].css}Ve.isOverline()&&(ge.push("xterm-overline"),G===" "&&(G=" ")),Ve.isStrikethrough()&&ge.push("xterm-strikethrough"),wt&&(L.style.textDecoration="underline");let Ot=Ve.getFgColor(),St=Ve.getFgColorMode(),kt=Ve.getBgColor(),xe=Ve.getBgColorMode();const je=!!Ve.isInverse();if(je){const bt=Ot;Ot=kt,kt=bt;const nn=St;St=xe,xe=nn}let We,st,nt,Ht=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{bt.options.layer!=="top"&&Ht||(bt.backgroundColorRGB&&(xe=50331648,kt=bt.backgroundColorRGB.rgba>>8&16777215,We=bt.backgroundColorRGB),bt.foregroundColorRGB&&(St=50331648,Ot=bt.foregroundColorRGB.rgba>>8&16777215,st=bt.foregroundColorRGB),Ht=bt.options.layer==="top")})),!Ht&&ft&&(We=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,kt=We.rgba>>8&16777215,xe=50331648,Ht=!0,B.selectionForeground&&(St=50331648,Ot=B.selectionForeground.rgba>>8&16777215,st=B.selectionForeground)),Ht&&ge.push("xterm-decoration-top"),xe){case 16777216:case 33554432:nt=B.ansi[kt],ge.push(`xterm-bg-${kt}`);break;case 50331648:nt=k.channels.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(L,`background-color:#${A((kt>>>0).toString(16),"0",6)}`);break;default:je?(nt=B.foreground,ge.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):nt=B.background}switch(We||Ve.isDim()&&(We=k.color.multiplyOpacity(nt,.5)),St){case 16777216:case 33554432:Ve.isBold()&&Ot<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ot+=8),this._applyMinimumContrast(L,nt,B.ansi[Ot],Ve,We,void 0)||ge.push(`xterm-fg-${Ot}`);break;case 50331648:const bt=k.channels.toColor(Ot>>16&255,Ot>>8&255,255&Ot);this._applyMinimumContrast(L,nt,bt,Ve,We,st)||this._addStyle(L,`color:#${A(Ot.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,nt,B.foreground,Ve,We,st)||je&&ge.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ge.length&&(L.className=ge.join(" "),ge.length=0),Be||Le||At?L.textContent=G:K++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),Z.push(L),Ce=Pe}return L&&K&&(L.textContent=G),Z}_applyMinimumContrast(E,j,T,D,I,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const H=this._getContrastCache(D);let F;if(I||P||(F=H.getColor(j.rgba,T.rgba)),F===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);F=k.color.ensureContrastRatio(I||j,P||T,V),H.setColor((I||j).rgba,(P||T).rgba,F??null)}return!!F&&(this._addStyle(E,`color:${F.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,j){E.setAttribute("style",`${E.getAttribute("style")||""}${j};`)}_isCellInSelection(E,j){const T=this._selectionStart,D=this._selectionEnd;return!(!T||!D)&&(this._columnSelectMode?T[0]<=D[0]?E>=T[0]&&j>=T[1]&&E=T[1]&&E>=D[0]&&j<=D[1]:j>T[1]&&j=T[0]&&E=T[0])}};function A(E,j,T){for(;E.length{Object.defineProperty(l,"__esModule",{value:!0}),l.WidthCache=void 0,l.WidthCache=class{constructor(c,d){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 _=c.createElement("span");_.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=c.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[_,f,m,g],this._container.appendChild(_),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(g),d.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,d,_,f){c===this._font&&d===this._fontSize&&_===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=d,this._weight=_,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,d,_){let f=0;if(!d&&!_&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const S=this._measure(c,0);return S>0&&(this._flat[f]=S),S}let m=c;d&&(m+="B"),_&&(m+="I");let g=this._holey.get(m);if(g===void 0){let S=0;d&&(S|=1),_&&(S|=2),g=this._measure(c,S),g>0&&this._holey.set(m,g)}return g}_measure(c,d){const _=this._measureElements[d];return _.textContent=c.repeat(32),_.offsetWidth/32}}},2223:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.TEXT_BASELINE=l.DIM_OPACITY=l.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);l.INVERTED_DEFAULT_COLOR=257,l.DIM_OPACITY=.5,l.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(o,l)=>{function c(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(l,"__esModule",{value:!0}),l.computeNextVariantOffset=l.createRenderDimensions=l.treatGlyphAsBackgroundColor=l.allowRescaling=l.isEmoji=l.isRestrictedPowerlineGlyph=l.isPowerlineGlyph=l.throwIfFalsy=void 0,l.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},l.isPowerlineGlyph=c,l.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},l.isEmoji=d,l.allowRescaling=function(_,f,m,g){return f===1&&m>Math.ceil(1.5*g)&&_!==void 0&&_>255&&!d(_)&&!c(_)&&!(function(S){return 57344<=S&&S<=63743})(_)},l.treatGlyphAsBackgroundColor=function(_){return c(_)||(function(f){return 9472<=f&&f<=9631})(_)},l.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}}}},l.computeNextVariantOffset=function(_,f,m=0){return(_-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.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(_,f,m,g=!1){if(this.selectionStart=f,this.selectionEnd=m,!f||!m||f[0]===m[0]&&f[1]===m[1])return void this.clear();const S=_.buffers.active.ydisp,k=f[1]-S,b=m[1]-S,v=Math.max(k,0),x=Math.min(b,_.rows-1);v>=_.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=k,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=m[0])}isCellSelected(_,f,m){return!!this.hasSelection&&(m-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&m>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m=this.startCol&&f=this.startCol)}}l.createSelectionRenderModel=function(){return new c}},456:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionModel=void 0,l.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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharSizeService=void 0;const f=c(2585),m=c(8460),g=c(844);let S=l.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};l.CharSizeService=S=d([_(2,f.IOptionsService)],S);class k extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class b extends k{constructor(y,C,A){super(),this._document=y,this._parentElement=C,this._optionsService=A,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 v extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharacterJoinerService=l.JoinedCellData=void 0;const f=c(3734),m=c(643),g=c(511),S=c(2585);class k extends f.AttributeData{constructor(x,y,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.JoinedCellData=k;let b=l.CharacterJoinerService=class DT{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const H=this._getJoinedRanges(A,T,j,y,E);for(let F=0;F1){const P=this._getJoinedRanges(A,T,j,y,E);for(let H=0;H{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreBrowserService=void 0;const d=c(844),_=c(8460),f=c(3656);class m extends d.Disposable{constructor(k,b,v){super(),this._textarea=k,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,_.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}}l.CoreBrowserService=m;class g extends d.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.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:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.LinkProviderService=void 0;const d=c(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}l.LinkProviderService=_},8934:function(o,l,c){var d=this&&this.__decorate||function(S,k,b,v){var x,y=arguments.length,C=y<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(S,k,b,v);else for(var A=S.length-1;A>=0;A--)(x=S[A])&&(C=(y<3?x(C):y>3?x(k,b,C):x(k,b))||C);return y>3&&C&&Object.defineProperty(k,b,C),C},_=this&&this.__param||function(S,k){return function(b,v){k(b,v,S)}};Object.defineProperty(l,"__esModule",{value:!0}),l.MouseService=void 0;const f=c(4725),m=c(9806);let g=l.MouseService=class{constructor(S,k){this._renderService=S,this._charSizeService=k}getCoords(S,k,b,v,x){return(0,m.getCoords)(window,S,k,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(S,k){const b=(0,m.getCoordsRelativeToElement)(window,S,k);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};l.MouseService=g=d([_(0,f.IRenderService),_(1,f.ICharSizeService)],g)},3230:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.RenderService=void 0;const f=c(6193),m=c(4725),g=c(8460),S=c(844),k=c(7226),b=c(2585);let v=l.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,C,A,E,j,T,D){super(),this._rowCount=x,this._charSizeService=A,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new S.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((I,P)=>this._renderRows(I,P)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(j.onResize((()=>this._fullRefresh()))),this.register(j.buffers.onBufferActivate((()=>{var I;return(I=this._renderer.value)==null?void 0:I.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(j.cols,j.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(j.buffer.y,j.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,y),this.register(T.onWindowChange((I=>this._registerIntersectionObserver(I,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((A=>this._handleIntersectionChange(A[A.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,S.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,C){var A;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(A=this._renderer.value)==null||A.handleSelectionChanged(x,y,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};l.RenderService=v=d([_(2,b.IOptionsService),_(3,m.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],v)},9312:function(o,l,c){var d=this&&this.__decorate||function(T,D,I,P){var H,F=arguments.length,V=F<3?D:P===null?P=Object.getOwnPropertyDescriptor(D,I):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,D,I,P);else for(var X=T.length-1;X>=0;X--)(H=T[X])&&(V=(F<3?H(V):F>3?H(D,I,V):H(D,I))||V);return F>3&&V&&Object.defineProperty(D,I,V),V},_=this&&this.__param||function(T,D){return function(I,P){D(I,P,T)}};Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionService=void 0;const f=c(9806),m=c(9504),g=c(456),S=c(4725),k=c(8460),b=c(844),v=c(6114),x=c(4841),y=c(511),C=c(2585),A=" ",E=new RegExp(A,"g");let j=l.SelectionService=class extends b.Disposable{constructor(T,D,I,P,H,F,V,X,W){super(),this._element=T,this._screenElement=D,this._linkifier=I,this._bufferService=P,this._coreService=H,this._mouseService=F,this._optionsService=V,this._renderService=X,this._coreBrowserService=W,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.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 g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.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 T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!T||!D||T[0]===D[0]&&T[1]===D[1])}get selectionText(){const T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!T||!D)return"";const I=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(T[0]===D[0])return"";const H=T[0]H.replace(E," "))).join(v.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(A){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&A&&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(A){const D=this._getMouseBufferCoords(A),O=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(O&&P&&D)&&this._areCoordsInSelection(D,O,P)}isCellInSelection(A,D){const O=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!O||!P)&&this._areCoordsInSelection([A,D],O,P)}_areCoordsInSelection(A,D,O){return A[1]>D[1]&&A[1]=D[0]&&A[0]=D[0]}_selectWordAtCursor(A,D){var $,F;const O=(F=($=this._linkifier.currentLink)==null?void 0:$.link)==null?void 0:F.range;if(O)return this._model.selectionStart=[O.start.x-1,O.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(O,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(A);return!!P&&(this._selectWordAt(P,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(A,D){this._model.clearSelection(),A=Math.max(A,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,A],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(A){this._model.handleTrim(A)&&this.refresh()}_getMouseBufferCoords(A){const D=this._mouseService.getCoords(A,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(A){let D=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,A,this._screenElement)[1];const O=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=O?0:(D>O&&(D-=O),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(A){return v.isMac?A.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:A.shiftKey}handleMouseDown(A){if(this._mouseDownTimeStamp=A.timeStamp,(A.button!==2||!this.hasSelection)&&A.button===0){if(!this._enabled){if(!this.shouldForceSelection(A))return;A.stopPropagation()}A.preventDefault(),this._dragScrollAmount=0,this._enabled&&A.shiftKey?this._handleIncrementalClick(A):A.detail===1?this._handleSingleClick(A):A.detail===2?this._handleDoubleClick(A):A.detail===3&&this._handleTripleClick(A),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(A){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(A))}_handleSingleClick(A){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(A)?3:0,this._model.selectionStart=this._getMouseBufferCoords(A),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(A){this._selectWordAtCursor(A,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(A){const D=this._getMouseBufferCoords(A);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(A){return A.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(A){if(A.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(A),!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 O=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(A.ydisp+this._bufferService.rows,A.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=A.ydisp),this.refresh()}}_handleMouseUp(A){const D=A.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&A.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const O=this._mouseService.getCoords(A,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(O&&O[0]!==void 0&&O[1]!==void 0){const P=(0,m.moveToCellSequence)(O[0]-1,O[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const A=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,O=!(!A||!D||A[0]===D[0]&&A[1]===D[1]);O?A&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&A[0]===this._oldSelectionStart[0]&&A[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(A,D,O)):this._oldHasSelection&&this._fireOnSelectionChange(A,D,O)}_fireOnSelectionChange(A,D,O){this._oldSelectionStart=A,this._oldSelectionEnd=D,this._oldHasSelection=O,this._onSelectionChange.fire()}_handleBufferActivate(A){this.clearSelection(),this._trimListener.dispose(),this._trimListener=A.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(A,D){let O=D;for(let P=0;D>=P;P++){const $=A.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?O--:$>1&&D!==P&&(O+=$-1)}return O}setSelection(A,D,O){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[A,D],this._model.selectionStartLength=O,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(A){this._isClickInSelection(A)||(this._selectWordAtCursor(A,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(A,D,O=!0,P=!0){if(A[0]>=this._bufferService.cols)return;const $=this._bufferService.buffer,F=$.lines.get(A[1]);if(!F)return;const V=$.translateBufferLineToString(A[1],!1);let X=this._convertViewportColToCharacterIndex(F,A[0]),W=X;const Z=A[0]-X;let J=0,H=0,L=0,B=0;if(V.charAt(X)===" "){for(;X>0&&V.charAt(X-1)===" ";)X--;for(;W1&&(B+=oe-1,W+=oe-1);re>0&&X>0&&!this._isCharWordSeparator(F.loadCell(re-1,this._workCell));){F.loadCell(re-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,re--):se>1&&(L+=se-1,X-=se-1),X--,re--}for(;he1&&(B+=se-1,W+=se-1),W++,he++}}W++;let Y=X+Z-J+L,G=Math.min(this._bufferService.cols,W-X+J+H-L-B);if(D||V.slice(X,W).trim()!==""){if(O&&Y===0&&F.getCodePoint(0)!==32){const re=$.lines.get(A[1]-1);if(re&&F.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,A[1]-1],!1,!0,!1);if(he){const oe=this._bufferService.cols-he.start;Y-=oe,G+=oe}}}if(P&&Y+G===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const re=$.lines.get(A[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const he=this._getWordAt([0,A[1]+1],!1,!1,!0);he&&(G+=he.length)}}return{start:Y,length:G}}}_selectWordAt(A,D){const O=this._getWordAt(A,D);if(O){for(;O.start<0;)O.start+=this._bufferService.cols,A[1]--;this._model.selectionStart=[O.start,A[1]],this._model.selectionStartLength=O.length}}_selectToWordAt(A){const D=this._getWordAt(A,!0);if(D){let O=A[1];for(;D.start<0;)D.start+=this._bufferService.cols,O--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,O++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,O]}}_isCharWordSeparator(A){return A.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(A.getChars())>=0}_selectLineAt(A){const D=this._bufferService.buffer.getWrappedRangeForLine(A),O={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(O,this._bufferService.cols)}};l.SelectionService=j=d([_(3,C.IBufferService),_(4,C.ICoreService),_(5,S.IMouseService),_(6,C.IOptionsService),_(7,S.IRenderService),_(8,S.ICoreBrowserService)],j)},4725:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ILinkProviderService=l.IThemeService=l.ICharacterJoinerService=l.ISelectionService=l.IRenderService=l.IMouseService=l.ICoreBrowserService=l.ICharSizeService=void 0;const d=c(8343);l.ICharSizeService=(0,d.createDecorator)("CharSizeService"),l.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),l.IMouseService=(0,d.createDecorator)("MouseService"),l.IRenderService=(0,d.createDecorator)("RenderService"),l.ISelectionService=(0,d.createDecorator)("SelectionService"),l.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),l.IThemeService=(0,d.createDecorator)("ThemeService"),l.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(o,l,c){var d=this&&this.__decorate||function(j,A,D,O){var P,$=arguments.length,F=$<3?A:O===null?O=Object.getOwnPropertyDescriptor(A,D):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(j,A,D,O);else for(var V=j.length-1;V>=0;V--)(P=j[V])&&(F=($<3?P(F):$>3?P(A,D,F):P(A,D))||F);return $>3&&F&&Object.defineProperty(A,D,F),F},_=this&&this.__param||function(j,A){return function(D,O){A(D,O,j)}};Object.defineProperty(l,"__esModule",{value:!0}),l.ThemeService=l.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),m=c(8055),g=c(8460),S=c(844),k=c(2585),b=m.css.toColor("#ffffff"),v=m.css.toColor("#000000"),x=m.css.toColor("#ffffff"),y=m.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};l.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const j=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],A=[0,95,135,175,215,255];for(let D=0;D<216;D++){const O=A[D/36%6|0],P=A[D/6%6|0],$=A[D%6];j.push({css:m.channels.toCss(O,P,$),rgba:m.channels.toRgba(O,P,$)})}for(let D=0;D<24;D++){const O=8+10*D;j.push({css:m.channels.toCss(O,O,O),rgba:m.channels.toRgba(O,O,O)})}return j})());let z=l.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(j){super(),this._optionsService=j,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:m.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:m.color.blend(v,C),ansi:l.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(j={}){const A=this._colors;if(A.foreground=E(j.foreground,b),A.background=E(j.background,v),A.cursor=E(j.cursor,x),A.cursorAccent=E(j.cursorAccent,y),A.selectionBackgroundTransparent=E(j.selectionBackground,C),A.selectionBackgroundOpaque=m.color.blend(A.background,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundTransparent=E(j.selectionInactiveBackground,A.selectionBackgroundTransparent),A.selectionInactiveBackgroundOpaque=m.color.blend(A.background,A.selectionInactiveBackgroundTransparent),A.selectionForeground=j.selectionForeground?E(j.selectionForeground,m.NULL_COLOR):void 0,A.selectionForeground===m.NULL_COLOR&&(A.selectionForeground=void 0),m.color.isOpaque(A.selectionBackgroundTransparent)&&(A.selectionBackgroundTransparent=m.color.opacity(A.selectionBackgroundTransparent,.3)),m.color.isOpaque(A.selectionInactiveBackgroundTransparent)&&(A.selectionInactiveBackgroundTransparent=m.color.opacity(A.selectionInactiveBackgroundTransparent,.3)),A.ansi=l.DEFAULT_ANSI_COLORS.slice(),A.ansi[0]=E(j.black,l.DEFAULT_ANSI_COLORS[0]),A.ansi[1]=E(j.red,l.DEFAULT_ANSI_COLORS[1]),A.ansi[2]=E(j.green,l.DEFAULT_ANSI_COLORS[2]),A.ansi[3]=E(j.yellow,l.DEFAULT_ANSI_COLORS[3]),A.ansi[4]=E(j.blue,l.DEFAULT_ANSI_COLORS[4]),A.ansi[5]=E(j.magenta,l.DEFAULT_ANSI_COLORS[5]),A.ansi[6]=E(j.cyan,l.DEFAULT_ANSI_COLORS[6]),A.ansi[7]=E(j.white,l.DEFAULT_ANSI_COLORS[7]),A.ansi[8]=E(j.brightBlack,l.DEFAULT_ANSI_COLORS[8]),A.ansi[9]=E(j.brightRed,l.DEFAULT_ANSI_COLORS[9]),A.ansi[10]=E(j.brightGreen,l.DEFAULT_ANSI_COLORS[10]),A.ansi[11]=E(j.brightYellow,l.DEFAULT_ANSI_COLORS[11]),A.ansi[12]=E(j.brightBlue,l.DEFAULT_ANSI_COLORS[12]),A.ansi[13]=E(j.brightMagenta,l.DEFAULT_ANSI_COLORS[13]),A.ansi[14]=E(j.brightCyan,l.DEFAULT_ANSI_COLORS[14]),A.ansi[15]=E(j.brightWhite,l.DEFAULT_ANSI_COLORS[15]),j.extendedAnsi){const D=Math.min(A.ansi.length-16,j.extendedAnsi.length);for(let O=0;O{Object.defineProperty(l,"__esModule",{value:!0}),l.CircularList=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(g){if(this._maxLength===g)return;const S=new Array(g);for(let k=0;kthis._length)for(let S=this._length;S=g;b--)this._array[this._getCyclicIndex(b+k.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+k.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=k.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,k){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let v=S-1;v>=0;v--)this.set(g+v+k,this.get(g+v));const b=g+S+k-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(l,"__esModule",{value:!0}),l.clone=void 0,l.clone=function c(d,_=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const m in d)f[m]=_<=1?d[m]:d[m]&&c(d[m],_-1);return f}},8055:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.contrastRatio=l.toPaddedHex=l.rgba=l.rgb=l.css=l.color=l.channels=l.NULL_COLOR=void 0;let c=0,d=0,_=0,f=0;var m,g,S,k,b;function v(y){const C=y.toString(16);return C.length<2?"0"+C:C}function x(y,C){return y>>0},y.toColor=function(C,z,E,j){return{css:y.toCss(C,z,E,j),rgba:y.toRgba(C,z,E,j)}}})(m||(l.channels=m={})),(function(y){function C(z,E){return f=Math.round(255*E),[c,d,_]=b.toChannels(z.rgba),{css:m.toCss(c,d,_,f),rgba:m.toRgba(c,d,_,f)}}y.blend=function(z,E){if(f=(255&E.rgba)/255,f===1)return{css:E.css,rgba:E.rgba};const j=E.rgba>>24&255,A=E.rgba>>16&255,D=E.rgba>>8&255,O=z.rgba>>24&255,P=z.rgba>>16&255,$=z.rgba>>8&255;return c=O+Math.round((j-O)*f),d=P+Math.round((A-P)*f),_=$+Math.round((D-$)*f),{css:m.toCss(c,d,_),rgba:m.toRgba(c,d,_)}},y.isOpaque=function(z){return(255&z.rgba)==255},y.ensureContrastRatio=function(z,E,j){const A=b.ensureContrastRatio(z.rgba,E.rgba,j);if(A)return m.toColor(A>>24&255,A>>16&255,A>>8&255)},y.opaque=function(z){const E=(255|z.rgba)>>>0;return[c,d,_]=b.toChannels(E),{css:m.toCss(c,d,_),rgba:E}},y.opacity=C,y.multiplyOpacity=function(z,E){return f=255&z.rgba,C(z,f*E/255)},y.toColorRGB=function(z){return[z.rgba>>24&255,z.rgba>>16&255,z.rgba>>8&255]}})(g||(l.color=g={})),(function(y){let C,z;try{const E=document.createElement("canvas");E.width=1,E.height=1;const j=E.getContext("2d",{willReadFrequently:!0});j&&(C=j,C.globalCompositeOperation="copy",z=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),m.toColor(c,d,_);case 5:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),f=parseInt(E.slice(4,5).repeat(2),16),m.toColor(c,d,_,f);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const j=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(j)return c=parseInt(j[1]),d=parseInt(j[2]),_=parseInt(j[3]),f=Math.round(255*(j[5]===void 0?1:parseFloat(j[5]))),m.toColor(c,d,_,f);if(!C||!z)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=z,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,d,_,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,d,_,f),css:E}}})(S||(l.css=S={})),(function(y){function C(z,E,j){const A=z/255,D=E/255,O=j/255;return .2126*(A<=.03928?A/12.92:Math.pow((A+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(O<=.03928?O/12.92:Math.pow((O+.055)/1.055,2.4))}y.relativeLuminance=function(z){return C(z>>16&255,z>>8&255,255&z)},y.relativeLuminance2=C})(k||(l.rgb=k={})),(function(y){function C(E,j,A){const D=E>>24&255,O=E>>16&255,P=E>>8&255;let $=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2($,F,V),k.relativeLuminance2(D,O,P));for(;X0||F>0||V>0);)$-=Math.max(0,Math.ceil(.1*$)),F-=Math.max(0,Math.ceil(.1*F)),V-=Math.max(0,Math.ceil(.1*V)),X=x(k.relativeLuminance2($,F,V),k.relativeLuminance2(D,O,P));return($<<24|F<<16|V<<8|255)>>>0}function z(E,j,A){const D=E>>24&255,O=E>>16&255,P=E>>8&255;let $=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2($,F,V),k.relativeLuminance2(D,O,P));for(;X>>0}y.blend=function(E,j){if(f=(255&j)/255,f===1)return j;const A=j>>24&255,D=j>>16&255,O=j>>8&255,P=E>>24&255,$=E>>16&255,F=E>>8&255;return c=P+Math.round((A-P)*f),d=$+Math.round((D-$)*f),_=F+Math.round((O-F)*f),m.toRgba(c,d,_)},y.ensureContrastRatio=function(E,j,A){const D=k.relativeLuminance(E>>8),O=k.relativeLuminance(j>>8);if(x(D,O)>8));if(Vx(D,k.relativeLuminance(X>>8))?F:X}return F}const P=z(E,j,A),$=x(D,k.relativeLuminance(P>>8));if($x(D,k.relativeLuminance(F>>8))?P:F}return P}},y.reduceLuminance=C,y.increaseLuminance=z,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(b||(l.rgba=b={})),l.toPaddedHex=v,l.contrastRatio=x},8969:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreTerminal=void 0;const d=c(844),_=c(2585),f=c(4348),m=c(7866),g=c(744),S=c(7302),k=c(6975),b=c(8460),v=c(1753),x=c(1480),y=c(7994),C=c(9282),z=c(5435),E=c(5981),j=c(2660);let A=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((P=>{var $;($=this._onScrollApi)==null||$.fire(P.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(P){for(const $ in P)this.optionsService.options[$]=P[$]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new S.OptionsService(P)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(j.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new z.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.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(($=>{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(($=>{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 E.WriteBuffer((($,F)=>this._inputHandler.parse($,F)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,$){this._writeBuffer.write(P,$)}writeSync(P,$){this._logService.logLevel<=_.LogLevelEnum.WARN&&!A&&(this._logService.warn("writeSync is unreliable and will be removed soon."),A=!0),this._writeBuffer.writeSync(P,$)}input(P,$=!0){this.coreService.triggerDataEvent(P,$)}resize(P,$){isNaN(P)||isNaN($)||(P=Math.max(P,g.MINIMUM_COLS),$=Math.max($,g.MINIMUM_ROWS),this._bufferService.resize(P,$))}scroll(P,$=!1){this._bufferService.scroll(P,$)}scrollLines(P,$,F){this._bufferService.scrollLines(P,$,F)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const $=P-this._bufferService.buffer.ydisp;$!==0&&this.scrollLines($)}registerEscHandler(P,$){return this._inputHandler.registerEscHandler(P,$)}registerDcsHandler(P,$){return this._inputHandler.registerDcsHandler(P,$)}registerCsiHandler(P,$){return this._inputHandler.registerCsiHandler(P,$)}registerOscHandler(P,$){return this._inputHandler.registerOscHandler(P,$)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const $=this.optionsService.rawOptions.windowsPty;$&&$.buildNumber!==void 0&&$.buildNumber!==void 0?P=$.backend==="conpty"&&$.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const $ of P)$.dispose()}))}}}l.CoreTerminal=D},8460:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.runAndSubscribe=l.forwardEvent=l.EventEmitter=void 0,l.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 d=0;dd.fire(_)))},l.runAndSubscribe=function(c,d){return d(void 0),c((_=>d(_)))}},5435:function(o,l,c){var d=this&&this.__decorate||function(J,H,L,B){var Y,G=arguments.length,re=G<3?H:B===null?B=Object.getOwnPropertyDescriptor(H,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(J,H,L,B);else for(var he=J.length-1;he>=0;he--)(Y=J[he])&&(re=(G<3?Y(re):G>3?Y(H,L,re):Y(H,L))||re);return G>3&&re&&Object.defineProperty(H,L,re),re},_=this&&this.__param||function(J,H){return function(L,B){H(L,B,J)}};Object.defineProperty(l,"__esModule",{value:!0}),l.InputHandler=l.WindowsOptionsReportType=void 0;const f=c(2584),m=c(7116),g=c(2015),S=c(844),k=c(482),b=c(8437),v=c(8460),x=c(643),y=c(511),C=c(3734),z=c(2585),E=c(1480),j=c(6242),A=c(6351),D=c(5941),O={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=131072;function $(J,H){if(J>24)return H.setWinLines||!1;switch(J){case 1:return!!H.restoreWin;case 2:return!!H.minimizeWin;case 3:return!!H.setWinPosition;case 4:return!!H.setWinSizePixels;case 5:return!!H.raiseWin;case 6:return!!H.lowerWin;case 7:return!!H.refreshWin;case 8:return!!H.setWinSizeChars;case 9:return!!H.maximizeWin;case 10:return!!H.fullscreenWin;case 11:return!!H.getWinState;case 13:return!!H.getWinPosition;case 14:return!!H.getWinSizePixels;case 15:return!!H.getScreenSizePixels;case 16:return!!H.getCellSizePixels;case 18:return!!H.getWinSizeChars;case 19:return!!H.getScreenSizeChars;case 20:return!!H.getIconTitle;case 21:return!!H.getWinTitle;case 22:return!!H.pushTitle;case 23:return!!H.popTitle;case 24:return!!H.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(l.WindowsOptionsReportType=F={}));let V=0;class X extends S.Disposable{getAttrData(){return this._curAttrData}constructor(H,L,B,Y,G,re,he,oe,se=new g.EscapeSequenceParser){super(),this._bufferService=H,this._charsetService=L,this._coreService=B,this._logService=Y,this._optionsService=G,this._oscLinkService=re,this._coreMouseService=he,this._unicodeService=oe,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.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 W(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:te.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,te,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:te,data:le})})),this._parser.setDcsHandlerFallback(((q,te,le)=>{te==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:te,payload:le})})),this._parser.setPrintHandler(((q,te,le)=>this.print(q,te,le))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!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 j.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new j.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new j.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new j.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new j.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new j.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new j.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new j.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new j.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new j.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new j.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new j.OscHandler((q=>this.restoreCursorColor(q)))),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 q in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new A.DcsHandler(((q,te)=>this.requestStatusString(q,te))))}_preserveStack(H,L,B,Y){this._parseStack.paused=!0,this._parseStack.cursorStartX=H,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=B,this._parseStack.position=Y}_logSlowResolvingAsync(H){this._logService.logLevel<=z.LogLevelEnum.WARN&&Promise.race([H,new Promise(((L,B)=>setTimeout((()=>B("#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(H,L){let B,Y=this._activeBuffer.x,G=this._activeBuffer.y,re=0;const he=this._parseStack.paused;if(he){if(B=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(B),B;Y=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,H.length>P&&(re=this._parseStack.position+P)}if(this._logService.logLevel<=z.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof H=="string"?` "${H}"`:` "${Array.prototype.map.call(H,(q=>String.fromCharCode(q))).join("")}"`),typeof H=="string"?H.split("").map((q=>q.charCodeAt(0))):H),this._parseBuffer.lengthP)for(let q=re;q0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let ge=this._parser.precedingJoinState;for(let ue=L;ueoe){if(se){const Pe=le;let Ve=this._activeBuffer.x-Le;for(this._activeBuffer.x=Le,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Le>0&&le instanceof b.BufferLine&&le.copyCellsFrom(Pe,Ve,0,Le,!1);Ve=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(q&&(le.insertCells(this._activeBuffer.x,G-Le,this._activeBuffer.getNullCell(te)),le.getWidth(oe-1)===2&&le.setCellFromCodepoint(oe-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,te)),le.setCellFromCodepoint(this._activeBuffer.x++,Y,G,te),G>0)for(;--G;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=ge,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(H,L){return H.final!=="t"||H.prefix||H.intermediates?this._parser.registerCsiHandler(H,L):this._parser.registerCsiHandler(H,(B=>!$(B.params[0],this._optionsService.rawOptions.windowOptions)||L(B)))}registerDcsHandler(H,L){return this._parser.registerDcsHandler(H,new A.DcsHandler(L))}registerEscHandler(H,L){return this._parser.registerEscHandler(H,L)}registerOscHandler(H,L){return this._parser.registerOscHandler(H,new j.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 H;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&&((H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&H.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 H=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-H),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(H=this._bufferService.cols-1){this._activeBuffer.x=Math.min(H,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(H,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=H,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=H,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(H,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+H,this._activeBuffer.y+L)}cursorUp(H){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,H.params[0]||1)):this._moveCursor(0,-(H.params[0]||1)),!0}cursorDown(H){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,H.params[0]||1)):this._moveCursor(0,H.params[0]||1),!0}cursorForward(H){return this._moveCursor(H.params[0]||1,0),!0}cursorBackward(H){return this._moveCursor(-(H.params[0]||1),0),!0}cursorNextLine(H){return this.cursorDown(H),this._activeBuffer.x=0,!0}cursorPrecedingLine(H){return this.cursorUp(H),this._activeBuffer.x=0,!0}cursorCharAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(H){return this._setCursor(H.length>=2?(H.params[1]||1)-1:0,(H.params[0]||1)-1),!0}charPosAbsolute(H){return this._setCursor((H.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(H){return this._moveCursor(H.params[0]||1,0),!0}linePosAbsolute(H){return this._setCursor(this._activeBuffer.x,(H.params[0]||1)-1),!0}vPositionRelative(H){return this._moveCursor(0,H.params[0]||1),!0}hVPosition(H){return this.cursorPosition(H),!0}tabClear(H){const L=H.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=H.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(H){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=H.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(H){const L=H.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(H,L,B,Y=!1,G=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);re.replaceCells(L,B,this._activeBuffer.getNullCell(this._eraseAttrData()),G),Y&&(re.isWrapped=!1)}_resetBufferLine(H,L=!1){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+H);B&&(B.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+H),B.isWrapped=!1)}eraseInDisplay(H,L=!1){let B;switch(this._restrictCursor(this._bufferService.cols),H.params[0]){case 0:for(B=this._activeBuffer.y,this._dirtyRowTracker.markDirty(B),this._eraseInBufferLine(B++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);B=this._bufferService.cols&&(this._activeBuffer.lines.get(B+1).isWrapped=!1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(B=this._bufferService.rows,this._dirtyRowTracker.markDirty(B-1);B--;)this._resetBufferLine(B,L);this._dirtyRowTracker.markDirty(0);break;case 3:const Y=this._activeBuffer.lines.length-this._bufferService.rows;Y>0&&(this._activeBuffer.lines.trimStart(Y),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Y,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Y,0),this._onScroll.fire(0))}return!0}eraseInLine(H,L=!1){switch(this._restrictCursor(this._bufferService.cols),H.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(H){this._restrictCursor();let L=H.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=oe;for(let q=1;q0||(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(H){return H.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(H.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(H){return(this._optionsService.rawOptions.termName+"").indexOf(H)===0}setMode(H){for(let L=0;LEe?1:2,ge=H.params[0];return ue=ge,Ce=L?ge===2?4:ge===4?le(re.modes.insertMode):ge===12?3:ge===20?le(te.convertEol):0:ge===1?le(B.applicationCursorKeys):ge===3?te.windowOptions.setWinLines?oe===80?2:oe===132?1:0:0:ge===6?le(B.origin):ge===7?le(B.wraparound):ge===8?3:ge===9?le(Y==="X10"):ge===12?le(te.cursorBlink):ge===25?le(!re.isCursorHidden):ge===45?le(B.reverseWraparound):ge===66?le(B.applicationKeypad):ge===67?4:ge===1e3?le(Y==="VT200"):ge===1002?le(Y==="DRAG"):ge===1003?le(Y==="ANY"):ge===1004?le(B.sendFocus):ge===1005?4:ge===1006?le(G==="SGR"):ge===1015?4:ge===1016?le(G==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?le(se===q):ge===2004?le(B.bracketedPasteMode):0,re.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ue};${Ce}$y`),!0;var ue,Ce}_updateAttrColor(H,L,B,Y,G){return L===2?(H|=50331648,H&=-16777216,H|=C.AttributeData.fromColorRGB([B,Y,G])):L===5&&(H&=-50331904,H|=33554432|255&B),H}_extractColor(H,L,B){const Y=[0,0,-1,0,0,0];let G=0,re=0;do{if(Y[re+G]=H.params[L+re],H.hasSubParams(L+re)){const he=H.getSubParams(L+re);let oe=0;do Y[1]===5&&(G=1),Y[re+oe+1+G]=he[oe];while(++oe=2||Y[1]===2&&re+G>=5)break;Y[1]&&(G=1)}while(++re+L5)&&(H=1),L.extended.underlineStyle=H,L.fg|=268435456,H===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(H){H.fg=b.DEFAULT_ATTR_DATA.fg,H.bg=b.DEFAULT_ATTR_DATA.bg,H.extended=H.extended.clone(),H.extended.underlineStyle=0,H.extended.underlineColor&=-67108864,H.updateExtended()}charAttributes(H){if(H.length===1&&H.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=H.length;let B;const Y=this._curAttrData;for(let G=0;G=30&&B<=37?(Y.fg&=-50331904,Y.fg|=16777216|B-30):B>=40&&B<=47?(Y.bg&=-50331904,Y.bg|=16777216|B-40):B>=90&&B<=97?(Y.fg&=-50331904,Y.fg|=16777224|B-90):B>=100&&B<=107?(Y.bg&=-50331904,Y.bg|=16777224|B-100):B===0?this._processSGR0(Y):B===1?Y.fg|=134217728:B===3?Y.bg|=67108864:B===4?(Y.fg|=268435456,this._processUnderline(H.hasSubParams(G)?H.getSubParams(G)[0]:1,Y)):B===5?Y.fg|=536870912:B===7?Y.fg|=67108864:B===8?Y.fg|=1073741824:B===9?Y.fg|=2147483648:B===2?Y.bg|=134217728:B===21?this._processUnderline(2,Y):B===22?(Y.fg&=-134217729,Y.bg&=-134217729):B===23?Y.bg&=-67108865:B===24?(Y.fg&=-268435457,this._processUnderline(0,Y)):B===25?Y.fg&=-536870913:B===27?Y.fg&=-67108865:B===28?Y.fg&=-1073741825:B===29?Y.fg&=2147483647:B===39?(Y.fg&=-67108864,Y.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):B===49?(Y.bg&=-67108864,Y.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):B===38||B===48||B===58?G+=this._extractColor(H,G,Y):B===53?Y.bg|=1073741824:B===55?Y.bg&=-1073741825:B===59?(Y.extended=Y.extended.clone(),Y.extended.underlineColor=-1,Y.updateExtended()):B===100?(Y.fg&=-67108864,Y.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,Y.bg&=-67108864,Y.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",B);return!0}deviceStatus(H){switch(H.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${B}R`)}return!0}deviceStatusPrivate(H){if(H.params[0]===6){const L=this._activeBuffer.y+1,B=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${B}R`)}return!0}softReset(H){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.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(H){const L=H.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 B=L%2==1;return this._optionsService.options.cursorBlink=B,!0}setScrollRegion(H){const L=H.params[0]||1;let B;return(H.length<2||(B=H.params[1])>this._bufferService.rows||B===0)&&(B=this._bufferService.rows),B>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=B-1,this._setCursor(0,0)),!0}windowOptions(H){if(!$(H.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=H.length>1?H.params[1]:0;switch(H.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.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(H){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(H){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(H){return this._windowTitle=H,this._onTitleChange.fire(H),!0}setIconName(H){return this._iconName=H,!0}setOrReportIndexedColor(H){const L=[],B=H.split(";");for(;B.length>1;){const Y=B.shift(),G=B.shift();if(/^\d+$/.exec(Y)){const re=parseInt(Y);if(Z(re))if(G==="?")L.push({type:0,index:re});else{const he=(0,D.parseColor)(G);he&&L.push({type:1,index:re,color:he})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(H){const L=H.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(H,L){this._getCurrentLinkId()&&this._finishHyperlink();const B=H.split(":");let Y;const G=B.findIndex((re=>re.startsWith("id=")));return G!==-1&&(Y=B[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Y,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(H,L){const B=H.split(";");for(let Y=0;Y=this._specialColors.length);++Y,++L)if(B[Y]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,D.parseColor)(B[Y]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}return!0}setOrReportFgColor(H){return this._setOrReportSpecialColor(H,0)}setOrReportBgColor(H){return this._setOrReportSpecialColor(H,1)}setOrReportCursorColor(H){return this._setOrReportSpecialColor(H,2)}restoreIndexedColor(H){if(!H)return this._onColor.fire([{type:2}]),!0;const L=[],B=H.split(";");for(let Y=0;Y=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 H=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,H,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=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(H){return this._charsetService.setgLevel(H),!0}screenAlignmentPattern(){const H=new y.CellData;H.content=4194373,H.fg=this._curAttrData.fg,H.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${G}${f.C0.ESC}\\`),!0))(H==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:H==='"p'?'P1$r61;1"p':H==="r"?`P1$r${B.scrollTop+1};${B.scrollBottom+1}r`:H==="m"?"P1$r0m":H===" q"?`P1$r${{block:2,underline:4,bar:6}[Y.cursorStyle]-(Y.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(H,L){this._dirtyRowTracker.markRangeDirty(H,L)}}l.InputHandler=X;let W=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,H){J>H&&(V=J,J=H,H=V),Jthis.end&&(this.end=H)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}W=d([_(0,z.IBufferService)],W)},844:(o,l)=>{function c(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(l,"__esModule",{value:!0}),l.getDisposeArrayDisposable=l.disposeArray=l.toDisposable=l.MutableDisposable=l.Disposable=void 0,l.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},l.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},l.toDisposable=function(d){return{dispose:d}},l.disposeArray=c,l.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.FourKeyMap=l.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(_,f,m){this._data[_]||(this._data[_]={}),this._data[_][f]=m}get(_,f){return this._data[_]?this._data[_][f]:void 0}clear(){this._data={}}}l.TwoKeyMap=c,l.FourKeyMap=class{constructor(){this._data=new c}set(d,_,f,m,g){this._data.get(d,_)||this._data.set(d,_,new c),this._data.get(d,_).set(f,m,g)}get(d,_,f,m){var g;return(g=this._data.get(d,_))==null?void 0:g.get(f,m)}clear(){this._data.clear()}}},6114:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.isChromeOS=l.isLinux=l.isWindows=l.isIphone=l.isIpad=l.isMac=l.getSafariVersion=l.isSafari=l.isLegacyEdge=l.isFirefox=l.isNode=void 0,l.isNode=typeof process<"u"&&"title"in process;const c=l.isNode?"node":navigator.userAgent,d=l.isNode?"node":navigator.platform;l.isFirefox=c.includes("Firefox"),l.isLegacyEdge=c.includes("Edge"),l.isSafari=/^((?!chrome|android).)*safari/i.test(c),l.getSafariVersion=function(){if(!l.isSafari)return 0;const _=c.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},l.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),l.isIpad=d==="iPad",l.isIphone=d==="iPhone",l.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),l.isLinux=d.indexOf("Linux")>=0,l.isChromeOS=/\bCrOS\b/.test(c)},6106:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SortedList=void 0;let c=0;l.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(c=this._search(_),c===-1)||this._getKey(this._array[c])!==_)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===d))do _(this._array[c]);while(++c=_;){let m=_+f>>1;const g=this._getKey(this._array[m]);if(g>d)f=m-1;else{if(!(g0&&this._getKey(this._array[m-1])===d;)m--;return m}_=m+1}}return _}}},7226:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DebouncedIdleTask=l.IdleTaskQueue=l.PriorityTaskQueue=void 0;const d=c(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iv)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=v}this.clear()}}class f extends _{_requestCallback(g){return setTimeout((()=>g(this._createDeadline(16))))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}l.PriorityTaskQueue=f,l.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,l.DebouncedIdleTask=class{constructor(){this._queue=new l.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.updateWindowsModeWrappedState=void 0;const d=c(643);l.updateWindowsModeWrappedState=function(_){const f=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),m=f==null?void 0:f.get(_.cols-1),g=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);g&&m&&(g.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ExtendedAttrs=l.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new d}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}}l.AttributeData=c;class d{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,m=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}l.ExtendedAttrs=d},9092:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Buffer=l.MAX_BUFFER_SIZE=void 0;const d=c(6349),_=c(7226),f=c(3734),m=c(8437),g=c(4634),S=c(511),k=c(643),b=c(4863),v=c(7116);l.MAX_BUFFER_SIZE=4294967295,l.Buffer=class{constructor(x,y,C){this._hasScrollback=x,this._optionsService=y,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=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new m.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xl.MAX_BUFFER_SIZE?l.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=m.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let z=0;const E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+j+1?(this.ybase--,j++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(x,C)));else for(let A=this._rows;A>y;A--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(A),this.ybase=Math.max(this.ybase-A,0),this.ydisp=Math.max(this.ydisp-A,0),this.savedY=Math.max(this.savedY-A,0)),this.lines.maxLength=E}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),j&&(this.y+=j),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let j=0;j.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const C=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(C.length>0){const z=(0,g.reflowLargerCreateNewLayout)(this.lines,C);(0,g.reflowLargerApplyNewLayout)(this.lines,z.layout),this._reflowLargerAdjustViewport(x,y,z.countRemoved)}}_reflowLargerAdjustViewport(x,y,C){const z=this.getNullCell(m.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;j--){let A=this.lines.get(j);if(!A||!A.isWrapped&&A.getTrimmedLength()<=x)continue;const D=[A];for(;A.isWrapped&&j>0;)A=this.lines.get(--j),D.unshift(A);const O=this.ybase+this.y;if(O>=j&&O0&&(z.push({start:j+D.length+E,newLines:X}),E+=X.length),D.push(...X);let W=$.length-1,Z=$[W];Z===0&&(W--,Z=$[W]);let J=D.length-F-1,H=P;for(;J>=0;){const B=Math.min(H,Z);if(D[W]===void 0)break;if(D[W].copyCellsFrom(D[J],H-B,Z-B,B,!0),Z-=B,Z===0&&(W--,Z=$[W]),H-=B,H===0){J--;const Y=Math.max(J,0);H=(0,g.getWrappedLineTrimmedLength)(D,Y,this._cols)}}for(let B=0;B0;)this.ybase===0?this.y0){const j=[],A=[];for(let W=0;W=0;W--)if($&&$.start>O+F){for(let Z=$.newLines.length-1;Z>=0;Z--)this.lines.set(W--,$.newLines[Z]);W++,j.push({index:O+1,amount:$.newLines.length}),F+=$.newLines.length,$=z[++P]}else this.lines.set(W,A[O--]);let V=0;for(let W=j.length-1;W>=0;W--)j[W].index+=V,this.lines.onInsertEmitter.fire(j[W]),V+=j[W].amount;const X=Math.max(0,D+E-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(x,y,C=0,z){const E=this.lines.get(x);return E?E.translateToString(y,C,z):""}getWrappedRangeForLine(x){let y=x,C=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLine=l.DEFAULT_ATTR_DATA=void 0;const d=c(3734),_=c(511),f=c(643),m=c(482);l.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let g=0;class S{constructor(b,v,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const y=v||_.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):x]}set(b,v){this._data[3*b+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,m.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return g=3*b,v.content=this._data[g+0],v.fg=this._data[g+1],v.bg=this._data[g+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,x,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=v|x<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,v,x){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,m.stringFromCodePoint)(v):2097151&y?(this._combined[b]=(0,m.stringFromCodePoint)(2097151&y)+(0,m.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*b+0]=y}insertCells(b,v,x){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,x),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let z=0;z=b&&delete this._extendedAttrs[E]}}return this.length=b,4*x*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,x,y,C){const z=b._data;if(C)for(let j=y-1;j>=0;j--){for(let A=0;A<3;A++)this._data[3*(x+j)+A]=z[3*(v+j)+A];268435456&z[3*(v+j)+2]&&(this._extendedAttrs[x+j]=b._extendedAttrs[v+j])}else for(let j=0;j=v&&(this._combined[A-v+x]=b._combined[A])}}translateToString(b,v,x,y){v=v??0,x=x??this.length,b&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;v>22||1}return y&&y.push(v),C}}l.BufferLine=S},4841:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.getRangeLength=void 0,l.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(o,l)=>{function c(d,_,f){if(_===d.length-1)return d[_].getTrimmedLength();const m=!d[_].hasContent(f-1)&&d[_].getWidth(f-1)===1,g=d[_+1].getWidth(0)===2;return m&&g?f-1:f}Object.defineProperty(l,"__esModule",{value:!0}),l.getWrappedLineTrimmedLength=l.reflowSmallerGetNewLineLengths=l.reflowLargerApplyNewLayout=l.reflowLargerCreateNewLayout=l.reflowLargerGetLinesToRemove=void 0,l.reflowLargerGetLinesToRemove=function(d,_,f,m,g){const S=[];for(let k=0;k=k&&m0&&(A>y||x[A].getTrimmedLength()===0);A--)j++;j>0&&(S.push(k+x.length-j),S.push(j)),k+=x.length-1}return S},l.reflowLargerCreateNewLayout=function(d,_){const f=[];let m=0,g=_[m],S=0;for(let k=0;kc(d,x,_))).reduce(((v,x)=>v+x));let S=0,k=0,b=0;for(;bv&&(S-=v,k++);const x=d[k].getWidth(S-1)===2;x&&S--;const y=x?f-1:f;m.push(y),b+=y}return m},l.getWrappedLineTrimmedLength=c},5295:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferSet=void 0;const d=c(8460),_=c(844),f=c(9092);class m extends _.Disposable{constructor(S,k){super(),this._optionsService=S,this._bufferService=k,this._onBufferActivate=this.register(new d.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,k){this._normal.resize(S,k),this._alt.resize(S,k),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}l.BufferSet=m},511:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CellData=void 0;const d=c(482),_=c(643),f=c(3734);class m extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const k=new m;return k.setFromCharData(S),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(S[_.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(S[_.CHAR_DATA_CHAR_INDEX].length===2){const b=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|S[_.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[_.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=S[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.CellData=m},643:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WHITESPACE_CELL_CODE=l.WHITESPACE_CELL_WIDTH=l.WHITESPACE_CELL_CHAR=l.NULL_CELL_CODE=l.NULL_CELL_WIDTH=l.NULL_CELL_CHAR=l.CHAR_DATA_CODE_INDEX=l.CHAR_DATA_WIDTH_INDEX=l.CHAR_DATA_CHAR_INDEX=l.CHAR_DATA_ATTR_INDEX=l.DEFAULT_EXT=l.DEFAULT_ATTR=l.DEFAULT_COLOR=void 0,l.DEFAULT_COLOR=0,l.DEFAULT_ATTR=256|l.DEFAULT_COLOR<<9,l.DEFAULT_EXT=0,l.CHAR_DATA_ATTR_INDEX=0,l.CHAR_DATA_CHAR_INDEX=1,l.CHAR_DATA_WIDTH_INDEX=2,l.CHAR_DATA_CODE_INDEX=3,l.NULL_CELL_CHAR="",l.NULL_CELL_WIDTH=1,l.NULL_CELL_CODE=0,l.WHITESPACE_CELL_CHAR=" ",l.WHITESPACE_CELL_WIDTH=1,l.WHITESPACE_CELL_CODE=32},4863:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Marker=void 0;const d=c(8460),_=c(844);class f{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}l.Marker=f,f._nextId=1},7116:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DEFAULT_CHARSET=l.CHARSETS=void 0,l.CHARSETS={},l.DEFAULT_CHARSET=l.CHARSETS.B,l.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:"≥","{":"π","|":"≠","}":"£","~":"·"},l.CHARSETS.A={"#":"£"},l.CHARSETS.B=void 0,l.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},l.CHARSETS.C=l.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},l.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},l.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},l.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},l.CHARSETS.E=l.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},l.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},l.CHARSETS.H=l.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(o,l)=>{var c,d,_;Object.defineProperty(l,"__esModule",{value:!0}),l.C1_ESCAPED=l.C1=l.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||(l.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="Ÿ"})(d||(l.C1=d={})),(function(f){f.ST=`${c.ESC}\\`})(_||(l.C1_ESCAPED=_={}))},7399:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.evaluateKeyboardEvent=void 0;const d=c(2584),_={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:["'",'"']};l.evaluateKeyboardEvent=function(f,m,g,S){const k={type:0,cancel:!1,key:void 0},b=(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=m?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:k.key=f.ctrlKey?"\b":d.C0.DEL,f.altKey&&(k.key=d.C0.ESC+k.key);break;case 9:if(f.shiftKey){k.key=d.C0.ESC+"[Z";break}k.key=d.C0.HT,k.cancel=!0;break;case 13:k.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,k.cancel=!0;break;case 27:k.key=d.C0.ESC,f.altKey&&(k.key=d.C0.ESC+d.C0.ESC),k.cancel=!0;break;case 37:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"D",k.key===d.C0.ESC+"[1;3D"&&(k.key=d.C0.ESC+(g?"b":"[1;5D"))):k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"C",k.key===d.C0.ESC+"[1;3C"&&(k.key=d.C0.ESC+(g?"f":"[1;5C"))):k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"A",g||k.key!==d.C0.ESC+"[1;3A"||(k.key=d.C0.ESC+"[1;5A")):k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"B",g||k.key!==d.C0.ESC+"[1;3B"||(k.key=d.C0.ESC+"[1;5B")):k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(k.key=d.C0.ESC+"[2~");break;case 46:k.key=b?d.C0.ESC+"[3;"+(b+1)+"~":d.C0.ESC+"[3~";break;case 36:k.key=b?d.C0.ESC+"[1;"+(b+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:k.key=b?d.C0.ESC+"[1;"+(b+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?k.type=2:f.ctrlKey?k.key=d.C0.ESC+"[5;"+(b+1)+"~":k.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?k.type=3:f.ctrlKey?k.key=d.C0.ESC+"[6;"+(b+1)+"~":k.key=d.C0.ESC+"[6~";break;case 112:k.key=b?d.C0.ESC+"[1;"+(b+1)+"P":d.C0.ESC+"OP";break;case 113:k.key=b?d.C0.ESC+"[1;"+(b+1)+"Q":d.C0.ESC+"OQ";break;case 114:k.key=b?d.C0.ESC+"[1;"+(b+1)+"R":d.C0.ESC+"OR";break;case 115:k.key=b?d.C0.ESC+"[1;"+(b+1)+"S":d.C0.ESC+"OS";break;case 116:k.key=b?d.C0.ESC+"[15;"+(b+1)+"~":d.C0.ESC+"[15~";break;case 117:k.key=b?d.C0.ESC+"[17;"+(b+1)+"~":d.C0.ESC+"[17~";break;case 118:k.key=b?d.C0.ESC+"[18;"+(b+1)+"~":d.C0.ESC+"[18~";break;case 119:k.key=b?d.C0.ESC+"[19;"+(b+1)+"~":d.C0.ESC+"[19~";break;case 120:k.key=b?d.C0.ESC+"[20;"+(b+1)+"~":d.C0.ESC+"[20~";break;case 121:k.key=b?d.C0.ESC+"[21;"+(b+1)+"~":d.C0.ESC+"[21~";break;case 122:k.key=b?d.C0.ESC+"[23;"+(b+1)+"~":d.C0.ESC+"[23~";break;case 123:k.key=b?d.C0.ESC+"[24;"+(b+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(g&&!S||!f.altKey||f.metaKey)!g||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=d.C0.US),f.key==="@"&&(k.key=d.C0.NUL)):f.keyCode===65&&(k.type=1);else{const v=_[f.keyCode],x=v==null?void 0:v[f.shiftKey?1:0];if(x)k.key=d.C0.ESC+x;else if(f.keyCode>=65&&f.keyCode<=90){const y=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(y);f.shiftKey&&(C=C.toUpperCase()),k.key=d.C0.ESC+C}else if(f.keyCode===32)k.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let y=f.code.slice(3,4);f.shiftKey||(y=y.toLowerCase()),k.key=d.C0.ESC+y,k.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?k.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?k.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?k.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?k.key=d.C0.DEL:f.keyCode===219?k.key=d.C0.ESC:f.keyCode===220?k.key=d.C0.FS:f.keyCode===221&&(k.key=d.C0.GS)}return k}},482:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Utf8ToUtf32=l.StringToUtf32=l.utf32ToString=l.stringFromCodePoint=void 0,l.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},l.utf32ToString=function(c,d=0,_=c.length){let f="";for(let m=d;m<_;++m){let g=c[m];g>65535?(g-=65536,f+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):f+=String.fromCharCode(g)}return f},l.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const _=c.length;if(!_)return 0;let f=0,m=0;if(this._interim){const g=c.charCodeAt(m++);56320<=g&&g<=57343?d[f++]=1024*(this._interim-55296)+g-56320+65536:(d[f++]=this._interim,d[f++]=g),this._interim=0}for(let g=m;g<_;++g){const S=c.charCodeAt(g);if(55296<=S&&S<=56319){if(++g>=_)return this._interim=S,f;const k=c.charCodeAt(g);56320<=k&&k<=57343?d[f++]=1024*(S-55296)+k-56320+65536:(d[f++]=S,d[f++]=k)}else S!==65279&&(d[f++]=S)}return f}},l.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const _=c.length;if(!_)return 0;let f,m,g,S,k=0,b=0,v=0;if(this.interim[0]){let C=!1,z=this.interim[0];z&=(224&z)==192?31:(240&z)==224?15:7;let E,j=0;for(;(E=63&this.interim[++j])&&j<4;)z<<=6,z|=E;const A=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=A-j;for(;v=_)return 0;if(E=c[v++],(192&E)!=128){v--,C=!0;break}this.interim[j++]=E,z<<=6,z|=63&E}C||(A===2?z<128?v--:d[k++]=z:A===3?z<2048||z>=55296&&z<=57343||z===65279||(d[k++]=z):z<65536||z>1114111||(d[k++]=z)),this.interim.fill(0)}const x=_-4;let y=v;for(;y<_;){for(;!(!(y=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(b=(31&f)<<6|63&m,b<128){y--;continue}d[k++]=b}else if((240&f)==224){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(b=(15&f)<<12|(63&m)<<6|63&g,b<2048||b>=55296&&b<=57343||b===65279)continue;d[k++]=b}else if((248&f)==240){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=g,k;if(S=c[y++],(192&S)!=128){y--;continue}if(b=(7&f)<<18|(63&m)<<12|(63&g)<<6|63&S,b<65536||b>1114111)continue;d[k++]=b}}return k}}},225:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeV6=void 0;const d=c(1480),_=[[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 m;l.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<_.length;++g)m.fill(0,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:(function(S,k){let b,v=0,x=k.length-1;if(Sk[x][1])return!1;for(;x>=v;)if(b=v+x>>1,S>k[b][1])v=b+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let k=this.wcwidth(g),b=k===0&&S!==0;if(b){const v=d.UnicodeService.extractWidth(S);v===0?b=!1:v>k&&(k=v)}return d.UnicodeService.createPropertyValue(0,k,b)}}},5981:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WriteBuffer=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,S){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){const k=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,S);if(v){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=b.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()}}l.WriteBuffer=f},5941:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.toRgbString=l.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})$/,d=/^[\da-f]+$/;function _(f,m){const g=f.toString(16),S=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}l.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=c.exec(m);if(g){const S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,S=[0,0,0];for(let k=0;k<3;++k){const b=parseInt(m.slice(g*k,g*k+g),16);S[k]=g===1?b<<4:g===2?b:g===3?b>>4:b>>8}return S}},l.toRgbString=function(f,m=16){const[g,S,k]=f;return`rgb:${_(g,m)}/${_(S,m)}/${_(k,m)}`}},5770:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.PAYLOAD_LIMIT=void 0,l.PAYLOAD_LIMIT=1e7},6351:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DcsHandler=l.DcsParser=void 0;const d=c(482),_=c(8742),f=c(5770),m=[];l.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(S,k){this._handlers[S]===void 0&&(this._handlers[S]=[]);const b=this._handlers[S];return b.push(k),{dispose:()=>{const v=b.indexOf(k);v!==-1&&b.splice(v,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(S,k){if(this.reset(),this._ident=S,this._active=this._handlers[S]||m,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(S,k,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(S,k,b);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,k,b))}unhook(S,k=!0){if(this._active.length){let b=!1,v=this._active.length-1,x=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&b===!1){for(;v>=0&&(b=this._active[v].unhook(S),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=m,this._ident=0}};const g=new _.Params;g.addParam(0),l.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,k,b){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,k,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let k=!1;if(this._hitLimit)k=!1;else if(S&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((b=>(this._params=g,this._data="",this._hitLimit=!1,b)));return this._params=g,this._data="",this._hitLimit=!1,k}}},2015:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.EscapeSequenceParser=l.VT500_TRANSITION_TABLE=l.TransitionTable=void 0;const d=c(844),_=c(8742),f=c(6242),m=c(6351);class g{constructor(v){this.table=new Uint8Array(v)}setDefault(v,x){this.table.fill(v<<4|x)}add(v,x,y,C){this.table[x<<8|v]=y<<4|C}addMany(v,x,y,C){for(let z=0;zA)),x=(j,A)=>v.slice(j,A),y=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const z=x(0,14);let E;for(E in b.setDefault(1,0),b.addMany(y,0,2,0),z)b.addMany([24,26,153,154],E,3,0),b.addMany(x(128,144),E,3,0),b.addMany(x(144,152),E,3,0),b.add(156,E,0,0),b.add(27,E,11,1),b.add(157,E,4,8),b.addMany([152,158,159],E,0,7),b.add(155,E,11,3),b.add(144,E,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class k extends d.Disposable{constructor(v=l.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.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 m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,x=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let z=0;zE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=C,y}identToString(v){const x=[];for(;v;)x.push(String.fromCharCode(255&v)),v>>=8;return x.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,x){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(x),{dispose:()=>{const z=C.indexOf(x);z!==-1&&C.splice(z,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,x){this._executeHandlers[v.charCodeAt(0)]=x}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,x){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(x),{dispose:()=>{const z=C.indexOf(x);z!==-1&&C.splice(z,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,x){return this._dcsParser.registerHandler(this._identifier(v),x)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,x){return this._oscParser.registerHandler(v,x)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}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(v,x,y,C,z){this._parseStack.state=v,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=z}parse(v,x,y){let C,z=0,E=0,j=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,j=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const A=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&D>-1){for(;D>=0&&(C=A[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&D>-1){for(;D>=0&&(C=A[D](),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 6:if(z=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(z!==24&&z!==26,y),C)return C;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(z=v[this._parseStack.chunkPos],C=this._oscParser.end(z!==24&&z!==26,y),C)return C;z===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,j=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let A=j;A>4){case 2:for(let F=A+1;;++F){if(F>=x||(z=v[F])<32||z>126&&z=x||(z=v[F])<32||z>126&&z=x||(z=v[F])<32||z>126&&z=x||(z=v[F])<32||z>126&&z=0&&(C=D[O](this._params),C!==!0);O--)if(C instanceof Promise)return this._preserveStack(3,D,O,E,A),C;O<0&&this._csiHandlerFb(this._collect<<8|z,this._params),this.precedingJoinState=0;break;case 8:do switch(z){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(z-48)}while(++A47&&z<60);A--;break;case 9:this._collect<<=8,this._collect|=z;break;case 10:const P=this._escHandlers[this._collect<<8|z];let $=P?P.length-1:-1;for(;$>=0&&(C=P[$](),C!==!0);$--)if(C instanceof Promise)return this._preserveStack(4,P,$,E,A),C;$<0&&this._escHandlerFb(this._collect<<8|z),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|z,this._params);break;case 13:for(let F=A+1;;++F)if(F>=x||(z=v[F])===24||z===26||z===27||z>127&&z=x||(z=v[F])<32||z>127&&z{Object.defineProperty(l,"__esModule",{value:!0}),l.OscHandler=l.OscParser=void 0;const d=c(5770),_=c(482),f=[];l.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(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const S=this._handlers[m];return S.push(g),{dispose:()=>{const k=S.indexOf(g);k!==-1&&S.splice(k,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].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 m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,S){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(m,g,S);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(m,g,S))}start(){this.reset(),this._state=1}put(m,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(m,g,S)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,k=this._active.length-1,b=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,S=g,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;k>=0&&(S=this._active[k].end(m),S!==!0);k--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,S;k--}for(;k>=0;k--)if(S=this._active[k].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},l.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,S){this._hitLimit||(this._data+=(0,_.utf32ToString)(m,g,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,g}}},8742:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Params=void 0;const c=2147483647;class d{static fromArray(f){const m=new d;if(!f.length)return m;for(let g=Array.isArray(f[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(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 m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&f.push(Array.prototype.slice.call(this._subParams,g,S))}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 m=this._subParamsIdx[f]>>8,g=255&this._subParamsIdx[f];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const f={};for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&(f[m]=this._subParams.slice(g,S))}return f}addDigit(f){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,S=g[m-1];g[m-1]=~S?Math.min(10*S+f,c):f}}l.Params=d},5741:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.AddonManager=void 0,l.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let _=0;_{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferApiView=void 0;const d=c(3785),_=c(511);l.BufferApiView=class{constructor(f,m){this._buffer=f,this.type=m}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 m=this._buffer.lines.get(f);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new _.CellData}}},3785:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLineApiView=void 0;const d=c(511);l.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,f){if(!(_<0||_>=this._line.length))return f?(this._line.loadCell(_,f),f):this._line.loadCell(_,new d.CellData)}translateToString(_,f,m){return this._line.translateToString(_,f,m)}}},8285:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferNamespaceApi=void 0;const d=c(8771),_=c(8460),f=c(844);class m extends f.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}l.BufferNamespaceApi=m},7975:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ParserApi=void 0,l.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(_=>d(_.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((_,f)=>d(_,f.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeApi=void 0,l.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(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,z=arguments.length,E=z<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(z<3?C(E):z>3?C(v,x,E):C(v,x))||E);return z>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferService=l.MINIMUM_ROWS=l.MINIMUM_COLS=void 0;const f=c(8460),m=c(844),g=c(5295),S=c(2585);l.MINIMUM_COLS=2,l.MINIMUM_ROWS=1;let k=l.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(b){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(b.rawOptions.cols||0,l.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,l.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=x.getBlankLine(b,v),this._cachedBlankLine=y),y.isWrapped=v;const C=x.ybase+x.scrollTop,z=x.ybase+x.scrollBottom;if(x.scrollTop===0){const E=x.lines.isFull;z===x.lines.length-1?E?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(z+1,0,y.clone()),E?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const E=z-C+1;x.lines.shiftElements(C+1,E-1,-1),x.lines.set(z,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(b,v,x){const y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),C!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};l.BufferService=k=d([_(0,S.IOptionsService)],k)},7994:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CharsetService=void 0,l.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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(o,l,c){var d=this&&this.__decorate||function(y,C,z,E){var j,A=arguments.length,D=A<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,z):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,z,E);else for(var O=y.length-1;O>=0;O--)(j=y[O])&&(D=(A<3?j(D):A>3?j(C,z,D):j(C,z))||D);return A>3&&D&&Object.defineProperty(C,z,D),D},_=this&&this.__param||function(y,C){return function(z,E){C(z,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreMouseService=void 0;const f=c(2585),m=c(8460),g=c(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let z=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(z|=64,z|=y.action):(z|=3&y.button,4&y.button&&(z|=64),8&y.button&&(z|=128),y.action===32?z|=32:y.action!==0||C||(z|=3)),z}const b=String.fromCharCode,v={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${b(C[0])}${b(C[1])}${b(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let x=l.CoreMouseService=class extends g.Disposable{constructor(y,C){super(),this._bufferService=y,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const z of Object.keys(S))this.addProtocol(z,S[z]);for(const z of Object.keys(v))this.addEncoding(z,v[z]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,z){if(z){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};l.CoreMouseService=x=d([_(0,f.IBufferService),_(1,f.ICoreService)],x)},6975:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,z){var E,j=arguments.length,A=j<3?y:z===null?z=Object.getOwnPropertyDescriptor(y,C):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(x,y,C,z);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(A=(j<3?E(A):j>3?E(y,C,A):E(y,C))||A);return j>3&&A&&Object.defineProperty(y,C,A),A},_=this&&this.__param||function(x,y){return function(C,z){y(C,z,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreService=void 0;const f=c(1439),m=c(8460),g=c(844),S=c(2585),k=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=l.CoreService=class extends g.Disposable{constructor(x,y,C){super(),this._bufferService=x,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}reset(){this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}triggerDataEvent(x,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((z=>z.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};l.CoreService=v=d([_(0,S.IBufferService),_(1,S.ILogService),_(2,S.IOptionsService)],v)},9074:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DecorationService=void 0;const d=c(8055),_=c(8460),f=c(844),m=c(6106);let g=0,S=0;class k extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new b(x);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,C){let z=0,E=0;for(const j of this._decorations.getKeyIterator(y))z=j.options.x??0,E=z+(j.options.width??1),x>=z&&x{g=E.options.x??0,S=g+(E.options.width??1),x>=g&&x{Object.defineProperty(l,"__esModule",{value:!0}),l.InstantiationService=l.ServiceCollection=void 0;const d=c(2585),_=c(8343);class f{constructor(...g){this._entries=new Map;for(const[S,k]of g)this.set(S,k)}set(g,S){const k=this._entries.get(g);return this._entries.set(g,S),k}forEach(g){for(const[S,k]of this._entries.entries())g(S,k)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}l.ServiceCollection=f,l.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const S=(0,_.getServiceDependencies)(m).sort(((v,x)=>v.index-x.index)),k=[];for(const v of S){const x=this._services.get(v.id);if(!x)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${v.id}.`);k.push(x)}const b=S.length>0?S[0].index:g.length;if(g.length!==b)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${b+1} conflicts with ${g.length} static arguments`);return new m(...g,...k)}}},7866:function(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,z=arguments.length,E=z<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(z<3?C(E):z>3?C(v,x,E):C(v,x))||E);return z>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.traceCall=l.setTraceLogger=l.LogService=void 0;const f=c(844),m=c(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let S,k=l.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(E))).join(", ")})`);const z=y.apply(this,C);return S.trace(`GlyphRenderer#${y.name} return`,z),z}}},7302:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.OptionsService=l.DEFAULT_OPTIONS=void 0;const d=c(8460),_=c(844),f=c(6114);l.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 m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends _.Disposable{constructor(k){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...l.DEFAULT_OPTIONS};for(const v in k)if(v in b)try{const x=k[v];b[v]=this._sanitizeAndValidateOption(v,x)}catch(x){console.error(x)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,b){return this.onOptionChange((v=>{v===k&&b(this.rawOptions[k])}))}onMultipleOptionChange(k,b){return this.onOptionChange((v=>{k.indexOf(v)!==-1&&b()}))}_setupOptions(){const k=v=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,x)=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);x=this._sanitizeAndValidateOption(v,x),this.rawOptions[v]!==x&&(this.rawOptions[v]=x,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const x={get:k.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,x)}}_sanitizeAndValidateOption(k,b){switch(k){case"cursorStyle":if(b||(b=l.DEFAULT_OPTIONS[k]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${k}`);break;case"wordSeparator":b||(b=l.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=m.includes(b)?b:l.DEFAULT_OPTIONS[k];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${k} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${k} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}l.OptionsService=g},2660:function(o,l,c){var d=this&&this.__decorate||function(g,S,k,b){var v,x=arguments.length,y=x<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,k):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,S,k,b);else for(var C=g.length-1;C>=0;C--)(v=g[C])&&(y=(x<3?v(y):x>3?v(S,k,y):v(S,k))||y);return x>3&&y&&Object.defineProperty(S,k,y),y},_=this&&this.__param||function(g,S){return function(k,b){S(k,b,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkService=void 0;const f=c(2585);let m=l.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const S=this._bufferService.buffer;if(g.id===void 0){const C=S.addMarker(S.ybase+S.y),z={data:g,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(z,C))),this._dataByLinkId.set(z.id,z),z.id}const k=g,b=this._getEntryIdKey(k),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,S.ybase+S.y),v.id;const x=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,S){const k=this._dataByLinkId.get(g);if(k&&k.lines.every((b=>b.line!==S))){const b=this._bufferService.buffer.addMarker(S);k.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(k,b)))}}getLinkData(g){var S;return(S=this._dataByLinkId.get(g))==null?void 0:S.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){const k=g.lines.indexOf(S);k!==-1&&(g.lines.splice(k,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};l.OscLinkService=m=d([_(0,f.IBufferService)],m)},8343:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.createDecorator=l.getServiceDependencies=l.serviceRegistry=void 0;const c="di$target",d="di$dependencies";l.serviceRegistry=new Map,l.getServiceDependencies=function(_){return _[d]||[]},l.createDecorator=function(_){if(l.serviceRegistry.has(_))return l.serviceRegistry.get(_);const f=function(m,g,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,b,v){b[c]===b?b[d].push({id:k,index:v}):(b[d]=[{id:k,index:v}],b[c]=b)})(f,m,S)};return f.toString=()=>_,l.serviceRegistry.set(_,f),f}},2585:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.IDecorationService=l.IUnicodeService=l.IOscLinkService=l.IOptionsService=l.ILogService=l.LogLevelEnum=l.IInstantiationService=l.ICharsetService=l.ICoreService=l.ICoreMouseService=l.IBufferService=void 0;const d=c(8343);var _;l.IBufferService=(0,d.createDecorator)("BufferService"),l.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),l.ICoreService=(0,d.createDecorator)("CoreService"),l.ICharsetService=(0,d.createDecorator)("CharsetService"),l.IInstantiationService=(0,d.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"})(_||(l.LogLevelEnum=_={})),l.ILogService=(0,d.createDecorator)("LogService"),l.IOptionsService=(0,d.createDecorator)("OptionsService"),l.IOscLinkService=(0,d.createDecorator)("OscLinkService"),l.IUnicodeService=(0,d.createDecorator)("UnicodeService"),l.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeService=void 0;const d=c(8460),_=c(225);class f{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,k=!1){return(16777215&g)<<3|(3&S)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const g=new _.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,k=0;const b=g.length;for(let v=0;v=b)return S+this.wcwidth(x);const z=g.charCodeAt(v);56320<=z&&z<=57343?x=1024*(x-55296)+z-56320+65536:S+=this.wcwidth(z)}const y=this.charProperties(x,k);let C=f.extractWidth(y);f.extractShouldJoin(y)&&(C-=f.extractWidth(k)),S+=C,k=y}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}l.UnicodeService=f}},r={};function s(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return t[o].call(c.exports,c,c.exports,s),c.exports}var a={};return(()=>{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const l=s(9042),c=s(3236),d=s(844),_=s(5741),f=s(8285),m=s(7975),g=s(7090),S=["cols","rows"];class k extends d.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],y=(C,z)=>{this._checkReadonlyOptions(C),this._core.options[C]=z};for(const C in this._core.options){const z={get:x.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,z)}}_checkReadonlyOptions(v){if(S.includes(v))throw new Error(`Option "${v}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.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 v=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const x in v)this._publicOptions[x]=v[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,x=!0){this._core.input(v,x)}resize(v,x){this._verifyIntegers(v,x),this._core.resize(v,x)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,x,y){this._verifyIntegers(v,x,y),this._core.select(v,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,x){this._verifyIntegers(v,x),this._core.selectLines(v,x)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,x){this._core.write(v,x)}writeln(v,x){this._core.write(v),this._core.write(`\r -`,x)}paste(v){this._core.paste(v)}refresh(v,x){this._verifyIntegers(v,x),this._core.refresh(v,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return l}_verifyIntegers(...v){for(const x of v)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const x of v)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}o.Terminal=k})(),a})()))})(Lv)),Lv.exports}var qot=Uot();function Xy(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new qot.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),a=new Hot.FitAddon;s.loadAddon(a),t&&s.loadAddon(new Fot.WebLinksAddon((c,d)=>{let _;try{_=new URL(d)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const o=()=>{try{a.fit()}catch{}};o();const l=new ResizeObserver(o);return l.observe(e),{terminal:s,dispose(){l.disconnect(),s.dispose()}}}const yT="h-40 overflow-hidden rounded-md bg-terminal p-2";function fm(e){return typeof e=="object"&&e!==null}function wT(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function Got(e){return fm(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||wT(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function Vot(e){return fm(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&wT(e.partitions)&&(e.error===null||typeof e.error=="string")}function Wot(e){return!fm(e)||e.type!=="complete"?null:e.backend==="ssh"&&Got(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&Vot(e.result)?{backend:"slurm",result:e.result}:null}function Kot(e){return fm(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function ST({host:e,backend:n,active:t=!0,onComplete:r,onError:s}){const a=M.useRef(null),o=M.useRef(null),l=M.useRef(r),c=M.useRef(s),[d,_]=M.useState(null);return l.current=r,c.current=s,M.useEffect(()=>{const f=a.current;if(!f)return;const{terminal:m,dispose:g}=Xy(f,!1,!0);o.current=m,m.focus();const S=location.protocol==="https:"?"wss:":"ws:",k=new URL("/api/settings/ssh/connect",`${S}//${location.host}`);k.searchParams.set("host",e),k.searchParams.set("backend",n);const b=new WebSocket(k);b.binaryType="arraybuffer";let v=!1,x=!1,y=!1;const C=j=>{x||(x=!0,y||m.writeln(j),m.options.disableStdin=!0,m.blur(),_(j),c.current(j))},z=m.onData(j=>{b.readyState===WebSocket.OPEN&&b.send(new TextEncoder().encode(j))}),E=m.onResize(({cols:j,rows:A})=>{b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"resize",cols:j,rows:A}))});return b.onopen=()=>{b.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}))},b.onmessage=j=>{if(j.data instanceof ArrayBuffer){y=!0,m.write(new Uint8Array(j.data));return}if(typeof j.data!="string")return;let A;try{A=JSON.parse(j.data)}catch{return}const D=Wot(A);if(D){v=!0,l.current(D),b.close();return}const O=Kot(A);O&&C(O)},b.onerror=()=>C(L7()),b.onclose=()=>{!v&&!x&&C(L7())},()=>{b.onopen=null,b.onmessage=null,b.onerror=null,b.onclose=null,z.dispose(),E.dispose(),b.close(),o.current=null,g()}},[n,e]),M.useEffect(()=>{const f=o.current;f&&(f.options.disableStdin=!t||d!==null,t&&d===null?f.focus():f.blur())},[t,d]),h.jsxs("div",{className:"mt-3",children:[h.jsx("div",{className:yT,role:"group","aria-label":TE({host:Ae(e)}),children:h.jsx("div",{ref:a,className:"h-full overflow-hidden"})}),d?h.jsx("p",{role:"alert",className:"sr-only",children:d}):null]})}function Yot({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:a}=Xy(r,!0,!0);return s.write(n),a},[n]),h.jsx("div",{className:`mt-3 ${yT}`,role:"group","aria-label":TE({host:Ae(e)}),children:h.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}const za=["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(" "),Xu=["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(" "),Tc=["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(" "),Zy="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",fs=["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(" "),Ah=["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(" "),mo=["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(" "),b2=["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(" "),L0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),_u=["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(" ");function Ov(e){return e.agentReady?{cls:"ok",variant:"success",label:kE()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:tze()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:HDe()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:WDe()}:{cls:"warn",variant:"warning",label:dje()}:{cls:"warn",variant:"warning",label:GTe()}}function Xot({h:e}){return e.authMethod?h.jsx(h.Fragment,{children:e.authMethod==="oauth"?gCe():lE()}):h.jsx(h.Fragment,{children:"—"})}function Zot(){const[e,n]=M.useState(null),[t,r]=M.useState("claude-code"),[s,a]=M.useState(!1),o=(c,d=!1)=>{a(!0),J0(c,d).then(n).catch(()=>{}).finally(()=>a(!1))};M.useEffect(()=>o(!1),[]),M.useEffect(()=>Ax(()=>o(!0)),[]);const l=e==null?void 0:e.find(c=>c.id===t);return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:NNe()}),h.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(e??[]).map(c=>h.jsxs("button",{className:c.id===t?"active":"",onClick:()=>r(c.id),children:[c.name,h.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${Ov(c).cls}`})]},c.id))}),e?l?h.jsxs("div",{className:za,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx(Rt,{variant:Ov(l).variant,children:Ov(l).label}),h.jsx("div",{className:"spacer flex-1"}),h.jsxs(Qe,{size:"small",onClick:()=>o(!0,!0),disabled:s,children:[h.jsx(sd,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Mp()]})]}),h.jsxs("div",{className:Xu,children:[h.jsx("span",{className:"k",children:l9e()}),h.jsx("span",{className:"v",children:l.binPath??tCe()}),h.jsx("span",{className:"k",children:zE()}),h.jsx("span",{className:"v",children:l.version??"—"}),h.jsx("span",{className:"k",children:UCe()}),h.jsx("span",{className:"v",children:h.jsx(Xot,{h:l})}),l.account&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:l.id==="opencode"?TLe():ux()}),h.jsx("span",{className:"v",children:l.account})]}),l.org&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:Rje()}),h.jsx("span",{className:"v",children:l.org})]}),l.plan&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:pMe()}),h.jsx("span",{className:"v",children:l.plan})]}),h.jsx("span",{className:"k",children:OCe()}),h.jsx("span",{className:"v",children:l.models.length>0?gke({count:an(l.models.length),models:new Intl.ListFormat(N()).format(l.models.slice(0,4).map(c=>Ae(X0(c))))}):cx()})]}),l.agentNote&&h.jsx("p",{className:fs,children:zh(l.agentNote)})]}):null:h.jsxs(br,{children:[h.jsx(dn,{})," ",KEe()]})]})}function Qot({s:e}){if(!e.configured)return h.jsx(Rt,{children:jp()});const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?h.jsx(Rt,{variant:"success",children:fx()}):h.jsx(Rt,{variant:"error",children:dTe()}):h.jsx(Rt,{variant:"error",children:Y9e()}):h.jsx(Rt,{variant:"error",children:Oze()})}function Jot(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(!1),[_,f]=M.useState(null),m=k=>{n(k),a(k.context??""),l(k.namespace)};M.useEffect(()=>{$We().then(m).catch(k=>r(k instanceof Error?k.message:String(k)))},[]);const g=e!==null&&s===(e.context??"")&&o.trim()===e.namespace;async function S(k){if(k.preventDefault(),!c){d(!0),f(null);try{m(await HWe({context:s,namespace:o.trim()}))}catch(b){f(b instanceof Error?b.message:String(b))}finally{d(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:B9e()}),h.jsx("span",{className:"v",children:h.jsx(Qot,{s:e})})]}),e.preflight.error&&h.jsx("p",{className:Zy,children:e.preflight.error}),h.jsxs("form",{className:Ah,onSubmit:S,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[cEe(),h.jsx(Wf,{choices:[{id:"",label:e.currentContext?j8e({context:Ae(e.currentContext)}):N8e()},...s&&!e.contexts.includes(s)?[{id:s,label:iCe({context:Ae(s)})}]:[],...e.contexts.map(k=>({id:k,label:k}))],value:s,variant:"field",dropDown:!0,disabled:c,onSelect:a})]}),h.jsxs("label",{children:[IAe(),h.jsx("input",{type:"text",value:o,onChange:k=>l(k.target.value),placeholder:REe(),autoComplete:"off",spellCheck:!1})]})]}),_&&h.jsx("div",{className:"error",children:_}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:c||g,children:c?Ta():Sc()})})]}),h.jsxs("section",{className:"mt-7",children:[h.jsx("h3",{className:"mt-0 mx-0 mb-1.5 text-base font-semibold text-text",children:oRe()}),h.jsx("p",{className:"m-0 font-sans text-sm leading-relaxed text-text",children:W8e({placeholder:Ae("{{ORX_RUN}}"),command:Ae("--manifest ")})})]})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",N9e()]})})}const elt={env:tke,syncedEnv:hke,modalToml:ike};function tlt({s:e}){return e.ready?h.jsx(Rt,{variant:"success",children:fx()}):!e.tokenConfigured&&!e.modalImportable?h.jsx(Rt,{children:oje()}):e.modalImportable?e.tokenConfigured?h.jsx(Rt,{children:EE()}):h.jsx(Rt,{variant:"error",children:jTe()}):h.jsx(Rt,{variant:"error",children:e.envProvisioned?gSe():ySe()})}function nlt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1),[o,l]=M.useState(null);M.useEffect(()=>{PWe().then(n).catch(d=>r(d instanceof Error?d.message:String(d)))},[]);async function c(){if(!s){a(!0),l(null);try{n(await FWe())}catch(d){l(d instanceof Error?d.message:String(d))}finally{a(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:Rp()}),h.jsx("span",{className:"v",children:h.jsx(tlt,{s:e})}),h.jsx("span",{className:"k",children:hx()}),h.jsx("span",{className:"v",children:e.modalImportable?px():e.envProvisioned?Z8e():Kke()}),h.jsx("span",{className:"k",children:CE()}),h.jsx("span",{className:"v",children:e.tokenSource?elt[e.tokenSource]():jp()})]}),!e.tokenConfigured&&h.jsx("p",{className:fs,children:cke({command:Ae("modal token new"),id:Ae("MODAL_TOKEN_ID"),secret:Ae("MODAL_TOKEN_SECRET")})}),e.error&&e.envProvisioned&&!e.modalImportable&&h.jsx("p",{className:fs,children:e.error}),o&&h.jsx("div",{className:"error",children:o}),!e.modalImportable&&h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsx(Qe,{variant:"primary",onClick:()=>void c(),disabled:s,children:s?LOe():jOe()})})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",j9e()]})})}const kT="rounded-sm border-border-strong bg-surface text-subtext",CT="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",rlt=5e3;function ET(e){const[n,t]=M.useState({}),r=e.join("\0");return M.useEffect(()=>{const a=r?r.split("\0"):[];if(a.length===0){t({});return}let o=!1;const l=async()=>{const d=await Promise.all(a.map(async _=>{try{return[_,(await YWe(_)).running]}catch{return null}}));o||t(_=>{const f={};for(const m of d)m&&(f[m[0]]=m[1]);for(const m of a)f[m]===void 0&&_[m]!==void 0&&(f[m]=_[m]);return f})};l();const c=window.setInterval(l,rlt);return()=>{o=!0,window.clearInterval(c)}},[r]),[n,a=>t(o=>({...o,[a]:!0}))]}function slt({test:e,connecting:n,masterRunning:t}){if(n)return h.jsx("span",{role:"status",children:h.jsx(Rt,{className:CT,children:pE()})});if(e===void 0)return h.jsx(Rt,{className:kT,children:wE()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,a=e.reachable?e.toolsFound?s?h.jsx(Rt,{className:"rounded-sm",variant:"warning",children:gE()}):h.jsx(Rt,{className:"rounded-sm",variant:"success",children:px()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:r.length===1?yke({tool:Ae(r[0])}):Cke()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:_x()});return h.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!s&&h.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Ea(e.testedAt)})]})}function ilt(){const[e,n]=M.useState(null),[t,r]=M.useState({}),[s,a]=M.useState({}),[o,l]=M.useState(null),[c,d]=M.useState(!1),[_,f]=M.useState(0),m=(e==null?void 0:e.filter(x=>{const y=t[x.host]??x.lastTest;return(y==null?void 0:y.reachable)&&y.toolsFound}).map(x=>x.host))??[],[g,S]=ET(m);M.useEffect(()=>{KWe().then(n).catch(()=>n([]))},[]);function k(x){d(!1),f(y=>y+1),l(x),a(y=>({...y,[x]:!0}))}function b(){d(!1),l(null)}function v(x,y){a(C=>({...C,[x]:!y}))}return h.jsx(h.Fragment,{children:e===null?h.jsxs(br,{children:[h.jsx(dn,{})," ",jMe()]}):e.length===0?h.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:oTe()}):h.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:e.map(x=>{const y=t[x.host]??x.lastTest,C=o===x.host,z=s[x.host]??!1,E=C||(y==null?void 0:y.reachable)===!1,j=`${x.user?`${x.user}@`:""}${x.hostname??x.host}${x.port?`:${x.port}`:""}`;return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[E?h.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":z,"aria-label":z?lO({name:Ae(x.host)}):TO({name:Ae(x.host)}),onClick:A=>{A.stopPropagation(),v(x.host,z)},children:h.jsx(ja,{size:15,className:`text-muted transition-transform duration-120 ease-standard${z?" rotate-180":""}`})}):h.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-base font-medium text-text",title:x.host,children:x.host}),h.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:j,children:j})]})]}),h.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[h.jsx("div",{className:"text-start",children:h.jsx(slt,{test:y,connecting:C&&!c,masterRunning:g[x.host]})}),h.jsx(Qe,{size:"small",type:"button",className:"justify-self-end",onClick:A=>{A.stopPropagation(),C&&!c?b():k(x.host)},disabled:!C&&o!==null&&!c,children:C?c?Pu():dx():(y==null?void 0:y.reachable)===!1?Pu():y?AE():lx()})]})]}),E&&(z||C)&&h.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${z?"":" hidden"}`,children:[!C&&(y==null?void 0:y.error)&&h.jsx(Yot,{host:x.host,transcript:y.error}),C&&h.jsx(ST,{host:x.host,backend:"ssh",active:z,onComplete:A=>{A.backend==="ssh"&&(r(D=>({...D,[x.host]:A.result})),S(x.host),d(!1),l(null))},onError:A=>{d(!0),r(D=>({...D,[x.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:A,testedAt:Date.now()}}))}},_)]})]},x.host)})})})}function alt({test:e,connecting:n,masterRunning:t}){return n?h.jsx(Rt,{className:CT,children:pE()}):e===null?h.jsx(Rt,{className:kT,children:wE()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?h.jsx(Rt,{className:"rounded-sm",variant:"warning",children:gE()}):h.jsx(Rt,{className:"rounded-sm",variant:"success",children:px()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:yAe()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:NTe()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:_x()})}function olt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(""),[_,f]=M.useState(""),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,z]=M.useState(!1),[E,j]=M.useState(0),A=s&&(b!=null&&b.reachable)&&b.slurmFound&&b.toolsFound?[s]:[],[D,O]=ET(A);function P(){z(!1),j(X=>X+1),y(!0)}const $=X=>{n(X),a(X.host??""),l(X.partition??""),d(X.account??""),f(X.timeLimit??"")};M.useEffect(()=>{XWe().then($).catch(X=>r(X instanceof Error?X.message:String(X)))},[]);const F=e!==null&&s===(e.host??"")&&o.trim()===(e.partition??"")&&c.trim()===(e.account??"")&&_.trim()===(e.timeLimit??"");async function V(X){if(X.preventDefault(),!m){g(!0),k(null);try{$(await ZWe({host:s,partition:o.trim(),account:c.trim(),timeLimit:_.trim()}))}catch(W){k(W instanceof Error?W.message:String(W))}finally{g(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[!x&&(b==null?void 0:b.error)&&h.jsx("p",{className:Zy,children:b.error}),b&&b.partitions.length>0&&h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:oMe()}),h.jsx("span",{className:"v",children:b.partitions.join(", ")})]}),h.jsxs("form",{className:Ah,onSubmit:V,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[hAe(),h.jsx(Wf,{choices:[{id:"",label:rje()},...s&&!e.hosts.some(X=>X.host===s)?[{id:s,label:`${s} (not in ~/.ssh/config)`}]:[],...e.hosts.map(X=>({id:X.host,label:X.host}))],value:s,variant:"field",dropDown:!0,disabled:m||x,onSelect:X=>{a(X),v(null),y(!1),z(!1)}})]}),h.jsxs("label",{children:[rMe(),h.jsx("input",{type:"text",list:"slurm-partitions",value:o,onChange:X=>l(X.target.value),placeholder:A7(),autoComplete:"off",spellCheck:!1}),h.jsx("datalist",{id:"slurm-partitions",children:b==null?void 0:b.partitions.map(X=>h.jsx("option",{value:X},X))})]})]}),h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[ux(),h.jsx("input",{type:"text",value:c,onChange:X=>d(X.target.value),placeholder:A7(),autoComplete:"off",spellCheck:!1})]}),h.jsxs("label",{children:[RDe(),h.jsx("input",{type:"text",value:_,onChange:X=>f(X.target.value),placeholder:G9e(),autoComplete:"off",spellCheck:!1})]})]}),S&&h.jsx("div",{className:"error",children:S}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:m||F||x,children:m?Ta():Sc()}),h.jsx(Qe,{type:"button",onClick:()=>{x&&!C?(z(!1),y(!1)):P()},disabled:!s,title:s?void 0:ELe(),children:x?C?Pu():dx():b?AE():lx()}),h.jsx("span",{role:"status",children:h.jsx(alt,{test:b,connecting:x&&!C,masterRunning:D[s]})})]})]}),x&&h.jsx(ST,{host:s,backend:"slurm",onComplete:X=>{X.backend==="slurm"&&(v(X.result),O(s),z(!1),y(!1))},onError:X=>{z(!0),v({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:X})}},E)]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",Zze()]})})}function llt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState(null),m=_!==null&&_!=="testing"?_:null,g=v=>{n(v),a(v.address??"")};M.useEffect(()=>{QWe().then(g).catch(v=>r(v instanceof Error?v.message:String(v)))},[]);const S=e!==null&&s===(e.address??"");async function k(v){if(v.preventDefault(),!o){l(!0),d(null);try{g(await JWe({address:s}))}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(!1)}}}async function b(){f("testing");try{f(await eKe(s.trim()||void 0))}catch(v){f({reachable:!1,address:s.trim()||"(unknown)",rayVersion:null,error:v instanceof Error?v.message:String(v)})}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:nNe()}),h.jsx("span",{className:"v",children:e.resolvedAddress}),h.jsx("span",{className:"k",children:mx()}),h.jsx("span",{className:"v",children:e.source}),(m==null?void 0:m.reachable)&&m.rayVersion&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:SMe()}),h.jsx("span",{className:"v",children:m.rayVersion})]})]}),(m==null?void 0:m.error)&&h.jsx("p",{className:Zy,children:m.error}),h.jsxs("form",{className:Ah,onSubmit:k,children:[h.jsxs("label",{children:[kze(),h.jsx("input",{type:"text",value:s,onChange:v=>{a(v.target.value),f(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:o||S,children:o?Ta():Sc()}),h.jsx(Qe,{type:"button",onClick:()=>void b(),disabled:_==="testing",children:cDe()}),h.jsx(clt,{test:_})]})]})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",Wze()]})})}function clt({test:e}){return e===null?null:e==="testing"?h.jsx(Rt,{children:hDe()}):e.reachable?h.jsx(Rt,{variant:"success",children:NMe()}):h.jsx(Rt,{variant:"error",children:_x()})}function ult(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{rKe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:$Ne()}),h.jsx("span",{className:"v",children:e.hostname}),h.jsx("span",{className:"k",children:iDe()}),h.jsxs("span",{className:"v",children:[e.os,"/",e.arch,e.chip?` — ${e.chip}`:""]}),h.jsx("span",{className:"k",children:"CPU"}),h.jsx("span",{className:"v",children:e.cpuCount>0?`${e.cpuCount} cores`:"—"}),h.jsx("span",{className:"k",children:"RAM"}),h.jsx("span",{className:"v",children:e.memBytes!==null?wa(e.memBytes):"—"}),h.jsx("span",{className:"k",children:"GPUs"}),h.jsx("span",{className:"v",children:e.gpus.length===0?"none detected (nvidia-smi)":e.gpus.map(s=>`${s.name}${s.memMib!==null?` — ${wa(s.memMib*1024*1024)}`:""}`).join(", ")})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",qEe()]})})}function dlt(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{sKe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?e.loggedIn?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:Rp()}),h.jsx("span",{className:"v",children:h.jsx(Rt,{variant:"success",children:kE()})}),h.jsx("span",{className:"k",children:Ije()}),h.jsx("span",{className:"v",children:e.orgs.length>0?e.orgs.join(", "):"—"}),h.jsx("span",{className:"k",children:MRe()}),h.jsx("span",{className:"v",children:e.sshKeyStatus==="matched"?h.jsx(Rt,{variant:"success",children:pje()}):e.sshKeyStatus==="no_local_match"?h.jsx(Rt,{variant:"warning",children:JTe()}):e.sshKeyStatus==="none_registered"?h.jsx(Rt,{variant:"error",children:LTe()}):h.jsx(Rt,{children:EE()})})]}),e.sshKeyStatus==="none_registered"&&(e.sshKeyPath?h.jsxs("p",{dir:"auto",className:fs,children:[zCe()," ",h.jsxs("code",{children:["orx ssh-key add ",e.sshKeyPath]}),"."]}):h.jsxs("p",{dir:"auto",className:fs,children:[STe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),gDe()," ",h.jsx("code",{children:"orx ssh-key add"}),"."]})),e.sshKeyStatus==="no_local_match"&&(e.sshKeyPath?h.jsx("p",{dir:"auto",className:fs,children:ILe({register:Ae(`orx ssh-key add ${e.sshKeyPath}`),load:Ae("ssh-add")})}):h.jsxs("p",{dir:"auto",className:fs,children:[bTe()," ",h.jsx("code",{children:"ssh-add"}),Aje()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),e.error&&h.jsx("p",{dir:"auto",className:fs,children:e.error})]}):h.jsx("p",{className:fs,children:$8e({command:Ae("orx login")})}):h.jsxs(br,{children:[h.jsx(dn,{})," ",S9e()]})})}const _p={local:eE,tinker:Qie,hf:yie,modal:Mie,k8s:Cie,ssh:Kie,slurm:qie,ray:Hie,openresearch:Oie},flt={local:Wse,ssh:hie,tinker:gie,hf:$se,modal:Zse,k8s:Use,slurm:cie,ray:iie,openresearch:tie},Qy={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"},hlt={local:uae,ssh:Tae,tinker:Dae,hf:nae,modal:_ae,k8s:aae,slurm:Eae,ray:wae,openresearch:vae};function _lt(e){switch(e.id){case"local":return dse();case"ssh":return jse({summary:Ae(e.summary)});case"tinker":return Lse({summary:Ae(e.summary)});case"hf":return rse({summary:Ae(e.summary)});case"modal":return pse({summary:Ae(e.summary)});case"k8s":return ose({summary:Ae(e.summary)});case"slurm":return Nse({summary:Ae(e.summary)});case"ray":return Sse({summary:Ae(e.summary)});case"openresearch":return bse({summary:Ae(e.summary)})}}function plt({target:e}){return h.jsxs("dl",{className:"m-0 mt-8 grid grid-cols-[9rem_minmax(0,1fr)] gap-x-5 gap-y-4 font-sans",children:[h.jsx("dt",{className:"text-sm font-medium text-subtext",children:UNe()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:_lt(e)}),h.jsx("dt",{className:"text-sm font-medium text-subtext",children:_Le()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:hlt[e.id]()})]})}const fk=["hf","modal","slurm","ray","openresearch"],Iv=["hf","modal","openresearch"],NT={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"]},hk="__custom__";function ff(e,n){return!!(n&&!(NT[e]??[]).includes(n))}function mlt({settings:e,projectId:n,onSaved:t}){const r=e.configuredDefaultBackend??e.defaultBackend??"local",s=e.defaultFlavor??"",[a,o]=M.useState(r),[l,c]=M.useState(s),[d,_]=M.useState(ff(r,s)),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=e.targets.find(O=>O.id===a),b=e.targets.filter(O=>O.configured||O.id===r),v=fk.includes(a),x=Iv.includes(a),y=NT[a]??[],C=a===r&&(!v||l.trim()===s),z=_p[a](),E=f?EIe():x&&!l.trim()?z7e({destination:z}):a==="ssh"?Rke():Ake({destination:z});M.useEffect(()=>{o(r),c(s),_(ff(r,s))},[r,s]);async function j(O,P){const $=fk.includes(O);if(!(f||Iv.includes(O)&&!P.trim())){m(!0),S(null);try{t(await nKe({backend:O,flavor:$&&P.trim()||null,projectId:n}))}catch(F){S(F instanceof Error?F.message:String(F)),o(r),c(s),_(ff(r,s))}finally{m(!1)}}}function A(O){const P=e.targets.find(F=>F.id===O);if(!P)return;o(P.id);const $=P.id===r?s:"";c($),_(ff(P.id,$)),Iv.includes(P.id)||j(P.id,$)}function D(O){if(O===hk){_(!0);return}_(!1),c(O),(!x||O)&&j(a,O)}return h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:HEe()}),h.jsxs("div",{children:[h.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:O=>{O.preventDefault(),C||j(a,l)},children:[h.jsx(Wf,{choices:b.map(O=>({id:O.id,label:_p[O.id]()})),value:a,variant:"field",dropDown:!0,disabled:f,renderIcon:O=>{const P=e.targets.find($=>$.id===O.id);return P?h.jsx(dm,{kind:Qy[P.id],size:16}):null},onSelect:A}),v&&h.jsx("div",{children:d?h.jsxs("div",{className:"relative",children:[h.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:l,onChange:O=>c(O.target.value),onBlur:()=>{if(x&&!l.trim()){a===r&&(c(s),_(ff(r,s)));return}C||j(a,l)},placeholder:yEe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:f}),h.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":z7(),title:z7(),onMouseDown:O=>O.preventDefault(),onClick:()=>_(!1),children:h.jsx(ja,{size:12})})]}):h.jsx(Wf,{choices:[{id:"",label:x?k7e():Pke()},...l&&!y.includes(l)?[{id:l,label:oSe({value:Ae(l)})}]:[],...y.map(O=>({id:O,label:O})),{id:hk,label:CEe()}],value:l,variant:"field",dropDown:!0,disabled:f,onSelect:D})})]}),g&&h.jsx("div",{className:"error mt-2.5",children:g}),k&&!k.configured&&h.jsx("p",{className:fs,children:CDe()})]}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:E})]})}function glt({target:e,isDefault:n,onOpen:t}){const r=e.unverified?m7e():e.id==="openresearch"?$Oe():e.id==="ray"?lx():NOe();return h.jsxs("button",{type:"button",className:"group flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans transition-colors duration-120 ease-standard hover:border-text hover:bg-surface disabled:cursor-default disabled:opacity-52",onClick:t,disabled:!e.enabled,children:[h.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:h.jsx(dm,{kind:Qy[e.id],size:48})}),h.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:_p[e.id]()}),h.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:flt[e.id]()}),h.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[h.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?yE():e.configured?BIe():r}),h.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:h.jsx(z0,{size:16})})]})]})}function vlt({target:e,isDefault:n,onBack:t}){return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back mb-10 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[h.jsx(Of,{size:16})," ",bE()]}),h.jsxs("div",{className:"flex items-center justify-between gap-6",children:[h.jsxs("div",{className:`flex min-w-0 items-center ${e.id==="tinker"?"gap-8":"gap-5"}`,children:[h.jsx("span",{className:"flex h-20 w-24 flex-none items-center justify-start",children:h.jsx(dm,{kind:Qy[e.id],size:72})}),h.jsx("h1",{className:"m-0 min-w-0",children:_p[e.id]()})]}),n&&h.jsx(Rt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:yE()})]}),h.jsx(plt,{target:e}),e.id!=="tinker"&&h.jsxs("div",{className:"mt-8 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==="local"&&h.jsx(ult,{}),e.id==="hf"&&h.jsx(Slt,{}),e.id==="modal"&&h.jsx(nlt,{}),e.id==="k8s"&&h.jsx(Jot,{}),e.id==="ssh"&&h.jsx(ilt,{}),e.id==="slurm"&&h.jsx(olt,{}),e.id==="ray"&&h.jsx(llt,{}),e.id==="openresearch"&&h.jsx(dlt,{})]})]})}function blt({project:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useRef(0);M.useEffect(()=>{_.current++,r(null),l(null),a(null),d(null)},[e==null?void 0:e.id]),M.useEffect(()=>{const y=++_.current;tKe(e==null?void 0:e.id).then(C=>{y===_.current&&(r(C),a(null))}).catch(C=>{if(y!==_.current)return;const z=C instanceof Error?C.message:String(C);r(E=>(E===null?a(z):d(z),E))})},[o,e==null?void 0:e.id]);const f=y=>{_.current++,r(y),d(null)},m=t?t.targets:null,g=(t==null?void 0:t.configuredDefaultBackend)??(t==null?void 0:t.defaultBackend),S=m?[...m].sort((y,C)=>+(C.id===g)-+(y.id===g)):null,k=(S==null?void 0:S.filter(y=>y.configured))??[],b=(S==null?void 0:S.filter(y=>!y.configured))??[],v=y=>h.jsx(glt,{target:y,isDefault:g===y.id,onOpen:()=>l(y.id)},`${(e==null?void 0:e.id)??"none"}:${y.id}`),x=o?t==null?void 0:t.targets.find(y=>y.id===o):null;return x?h.jsx(vlt,{target:x,isDefault:g===x.id,onBack:()=>l(null)}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:xE()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:nEe()}),h.jsx(Hlt,{projectId:e==null?void 0:e.id,onViewHistory:n}),s?h.jsx("div",{className:"error",children:s}):t?h.jsxs(h.Fragment,{children:[c&&h.jsx("div",{className:"error",children:c}),h.jsx(mlt,{settings:t,projectId:e==null?void 0:e.id,onSaved:f}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:FMe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:k.map(v)})]}),b.length>0&&h.jsxs("section",{className:"mb-3.5",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:CAe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map(v)})]})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",b9e()]})]})}const xlt={env:YSe,openresearchEnv:JSe,hfCache:GSe};function ylt({settings:e}){return e.configured?e.valid?h.jsx(Rt,{variant:"success",children:fx()}):h.jsx(Rt,{variant:"error",children:mze()}):h.jsx(Rt,{children:jp()})}function wlt({settings:e}){return!e.configured||!e.valid?null:e.jobsWrite===!0?h.jsx(Rt,{variant:"success",children:Mze()}):e.jobsWrite===!1?h.jsx(Rt,{variant:"error",children:pTe()}):h.jsx(Rt,{children:zze()})}function Slt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),_=M.useRef(!1);M.useEffect(()=>{RWe().then(m=>{_.current||n(m)}).catch(m=>{_.current||r(m instanceof Error?m.message:String(m))})},[]);async function f(m){if(m.preventDefault(),!(!s.trim()||o)){l(!0),d(null);try{const g=await DWe(s.trim());_.current=!0,n(g),r(null),a("")}catch(g){d(g instanceof Error?g.message:String(g))}finally{l(!1)}}}return h.jsxs(h.Fragment,{children:[t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Tc,children:[h.jsx("span",{className:"k",children:Rp()}),h.jsx("span",{className:"v",children:h.jsx(ylt,{settings:e})}),h.jsx("span",{className:"k",children:ux()}),h.jsx("span",{className:"v",children:e.username??"—"}),h.jsx("span",{className:"k",children:CE()}),h.jsx("span",{className:"v",children:e.maskedToken??"—"}),h.jsx("span",{className:"k",children:mx()}),h.jsx("span",{className:"v",children:e.source?xlt[e.source]():jp()}),h.jsx("span",{className:"k",children:xze()}),h.jsxs("span",{className:"v",children:[h.jsx(wlt,{settings:e}),(!e.configured||!e.valid)&&"—"]})]}),e.source==="env"&&h.jsx("p",{className:fs,children:LNe()}),e.valid&&e.jobsWrite===null&&h.jsx("p",{className:fs,children:r8e({login:Ae("hf auth login"),url:Ae("huggingface.co/settings/tokens")})})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",tAe()]}),h.jsxs("form",{className:Ah,onSubmit:f,children:[h.jsxs("label",{children:[e!=null&&e.configured?oOe():Ike(),h.jsx("input",{type:"password",value:s,onChange:m=>a(m.target.value),placeholder:jNe(),autoComplete:"off"})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:!s.trim()||o,children:o?DIe():Sc()})})]})]})}const zT=/^hf_[A-Za-z0-9]{10,}$/;function AT(){return h.jsx("tr",{children:h.jsx("td",{colSpan:3,children:h.jsxs("p",{dir:"auto",className:fs,children:[ADe()," ",h.jsx("code",{children:"HF_TOKEN"}),bRe()]})})})}const _k=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function x2(e,n){const t=n instanceof Error?n.message:String(n);DN(t.includes(e)?t:`${e}: ${t}`,"error")}function klt({name:e,entry:n,onVars:t}){const[r,s]=M.useState(""),[a,o]=M.useState(!1);async function l(){if(!(!r.trim()||a)){o(!0);try{t(await rN(e,r.trim())),s("")}catch(d){x2(e,d)}finally{o(!1)}}}async function c(){if(!a){o(!0);try{t(await qWe(e))}catch(d){x2(e,d)}finally{o(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{className:"font-mono text-sm",children:e}),h.jsx("td",{className:"text-base text-subtext",children:n?h.jsxs(h.Fragment,{children:[n.maskedValue,n.inProcessEnv&&h.jsx(Rt,{children:Jje()})]}):h.jsx(Db,{variant:"inline",className:"text-base",type:"password",value:r,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),l()),d.key==="Escape"&&!a&&s("")},placeholder:NE(),"aria-label":lB({name:Ae(e)}),autoComplete:"new-password",disabled:a})}),h.jsx("td",{children:n?h.jsx(Qt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:gb({name:Ae(e)}),"aria-label":gb({name:Ae(e)}),onClick:()=>void c(),disabled:a,children:h.jsx(id,{size:13})}):r.trim()&&h.jsx(Qe,{size:"small",onClick:()=>void l(),disabled:a,children:a?Ta():Sc()})})]}),!n&&e!=="HF_TOKEN"&&zT.test(r.trim())&&h.jsx(AT,{})]})}function Clt({onVars:e,onDone:n}){const[t,r]=M.useState(""),[s,a]=M.useState(""),[o,l]=M.useState(!1);async function c(){if(!(!t.trim()||!s.trim()||o)){l(!0);try{e(await rN(t.trim(),s.trim())),n()}catch(_){x2(t.trim(),_)}finally{l(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),c()),_.key==="Escape"&&!o&&n()};return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(Db,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:t,onChange:_=>r(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":YAe(),autoComplete:"off",spellCheck:!1,disabled:o})}),h.jsx("td",{children:h.jsx(Db,{variant:"inline",className:"text-base",type:"password",value:s,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:NE(),"aria-label":JAe(),autoComplete:"new-password",disabled:o})}),h.jsxs("td",{children:[h.jsx(Qe,{size:"small",onClick:()=>void c(),disabled:o||!t.trim()||!s.trim(),children:o?Ta():Sc()}),h.jsx(Qt,{title:dx(),"aria-label":p9e(),onClick:n,disabled:o,children:h.jsx(hs,{size:13})})]})]}),t.trim()!=="HF_TOKEN"&&zT.test(s.trim())&&h.jsx(AT,{})]})}function Elt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1);M.useEffect(()=>{UWe().then(n).catch(c=>r(c instanceof Error?c.message:String(c)))},[]);const o=e===null?[]:e.map(c=>c.key).filter(c=>!_k.includes(c)),l=[..._k,...o];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:oLe()}),h.jsxs(Qe,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:s||e===null,children:[h.jsx(yx,{size:12})," ",MCe()]})]}),h.jsx("div",{className:za,children:t?h.jsx("div",{className:"error",children:t}):e===null?h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]}):h.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:h.jsxs("tbody",{children:[l.map(c=>h.jsx(klt,{name:c,entry:e.find(d=>d.key===c),onVars:n},c)),s&&h.jsx(Clt,{onVars:n,onDone:()=>a(!1)})]})})})]})}const hf=[{value:"system",label:uIe,icon:gVe},{value:"light",label:aIe,icon:FVe},{value:"dark",label:JOe,icon:bVe}],Nlt=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function zlt(){const e=kc(),[n,t]=RN(),r=s=>{var _;const a=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!a)return;s.preventDefault();const o=[...s.currentTarget.querySelectorAll('[role="radio"]')],l=o.findIndex(f=>f===document.activeElement),d=((l===-1?hf.findIndex(f=>f.value===n):l)+a+hf.length)%hf.length;t(hf[d].value),(_=o[d])==null||_.focus()};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:X6e()}),h.jsxs("div",{className:`${za} mt-3`,children:[h.jsxs("div",{className:`${mo} pb-3.5`,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:O7()}),h.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":O7(),onKeyDown:r,children:hf.map(({value:s,label:a,icon:o})=>h.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:[h.jsx(o,{size:14}),a()]},s))})]}),h.jsxs("div",{className:mo,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:L8e()}),h.jsx("div",{className:"w-52 flex-none",children:h.jsx(Wf,{choices:Nlt,value:e,variant:"field",dropDown:!0,onSelect:s=>{RL(s)&&Yqe(s)}})})]})]})]})}const Alt={installer:XUe,"app-bundle":BUe,cargo:FUe,homebrew:VUe,nix:eqe,unknown:sqe},Bv={cargo:lqe,homebrew:fqe,nix:mqe};function Tlt(){var c;const{status:e,error:n,apply:t}=mT(),[r,s]=M.useState(null),[a,o]=M.useState(null);if(!e)return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:D7()}),n?h.jsx("div",{className:za,children:h.jsx("div",{className:"error",children:n})}):h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]})]});const l=async(d,_)=>{s(d),o(null);try{await _()}catch(f){o(f instanceof Error?f.message:String(f))}finally{s(null)}};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:D7()}),h.jsxs("div",{className:`${za} mt-3`,children:[h.jsxs("div",{className:`${Xu} pb-3.5`,children:[h.jsx("div",{className:"k",children:zE()}),h.jsx("div",{className:"v",children:e.current}),h.jsx("div",{className:"k",children:Hze()}),h.jsx("div",{className:"v",children:e.latest??"—"}),h.jsx("div",{className:"k",children:ZNe()}),h.jsx("div",{className:"v",children:Alt[e.channel]()})]}),e.restartRequired&&h.jsx("div",{className:mo,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:rRe()}),h.jsx("p",{children:pOe({installed:Ae(e.installedVersion??"—"),current:Ae(e.current??e.installedVersion??"—")})})]})}),e.selfUpdates?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:j7()}),h.jsxs("p",{children:[GAe(),e.envDisabled&&wIe()]})]}),h.jsx(Dx,{type:"button",checked:e.autoUpdate,"aria-label":j7(),disabled:r!==null,onClick:()=>void l("auto",()=>IWe(!e.autoUpdate).then(t))})]}),h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:e.updateAvailable?vIe({version:Ae(e.latest??"—")}):l7e()}),h.jsx("p",{children:e.updateAvailable?S8e():x7e()})]}),h.jsx(Qe,{size:"small",type:"button",disabled:r!==null,onClick:()=>void l("apply",()=>OWe().then(t)),children:r==="apply"?ox():e.updateAvailable?_Ie():f7e()})]})]}):h.jsx("div",{className:mo,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:Pje()}),h.jsx("p",{children:((c=Bv[e.channel])==null?void 0:c.call(Bv))??PLe()})]})}),e.channel==="app-bundle"&&h.jsx(Mlt,{busy:r,run:l}),a&&h.jsx("div",{className:"error",children:a})]})]})}function jlt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);M.useEffect(()=>{mKe().then(n).catch(l=>a(l instanceof Error?l.message:String(l)))},[]);const o=()=>{!e||t||(r(!0),a(null),gKe(!e.preferenceEnabled).then(n).catch(l=>a(l instanceof Error?l.message:String(l))).finally(()=>r(!1)))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:eLe()}),e?h.jsxs("div",{className:`${za} mt-3`,children:[h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[N7(),e.locked&&e.reason&&h.jsx(tZe,{content:`${gEe()} ${e.reason}.`,className:"text-subtext",children:h.jsx(iVe,{size:15})})]}),h.jsx("p",{children:rTe()})]}),h.jsx(Dx,{type:"button",checked:e.enabled,"aria-label":N7(),disabled:t||e.locked,onClick:o})]}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]})]})}function Mlt({busy:e,run:n}){const[t,r]=M.useState(null),[s,a]=M.useState(!1),o=l=>void n("cli",()=>BWe(l).then(c=>{r(c),a(!1)}).catch(c=>{throw a(!l&&String((c==null?void 0:c.message)??c).includes("--force")),c}));return h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:p8e({command:Ae("orx")})}),t?h.jsxs("p",{children:[t.alreadyCurrent?O7e({link:Ae(t.link)}):H7e({link:Ae(t.link)}),!t.onPath&&V6e({directory:Ae(t.dir)})]}):h.jsx("p",{children:d8e({command:Ae("orx")})})]}),h.jsx(Qe,{size:"small",type:"button",disabled:e!==null,onClick:()=>o(s),children:e==="cli"?ox():s?rOe():t?GLe():o8e()})]})}function Rlt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),o=()=>(a(null),Ex().then(n).catch(c=>a(c instanceof Error?c.message:String(c))));M.useEffect(()=>void o(),[]);const l=()=>{if(!e||t)return;const c=!e.githubForNewProjects;r(!0),a(null),aN(c,!0).then(n).catch(d=>a(d instanceof Error?d.message:String(d))).finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:pNe()}),e?h.jsxs("div",{className:`${za} 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:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx("h3",{children:bNe()}),h.jsx(Rt,{variant:e.githubAuthenticated?"success":e.ghInstalled?"warning":"error",children:e.githubAuthenticated?_E():vE()})]}),h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:T7()}),h.jsx("p",{children:vLe()})]}),h.jsx(Dx,{type:"button",checked:e.githubForNewProjects,"aria-label":T7(),disabled:t||!e.githubAuthenticated&&!e.githubForNewProjects,onClick:l})]}),!e.githubAuthenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(TT,{ghInstalled:e.ghInstalled,onCheck:o})}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]})]})}function TT({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:zh(e?bOe():b8e())}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&h.jsxs(Rb,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[ize()," ",h.jsx(mc,{size:12})]}),h.jsx(Qe,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?Tp():s7e()})]})]})}function Dlt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);return M.useEffect(()=>{CWe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o)))},[]),h.jsxs("div",{className:b2,children:[h.jsx("h3",{children:Gje()}),h.jsxs("div",{className:Xu,children:[h.jsx("span",{className:"k",children:SNe()}),h.jsx("span",{className:"v",children:h.jsx(Rt,{variant:e?"success":"default",children:e===null?s?oE():Tp():e?SOe():hCe()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:wLe()}),e?h.jsx("div",{className:L0,children:h.jsx(Qe,{disabled:t,onClick:()=>{r(!0),a(null),EWe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o))).finally(()=>r(!1))},children:t?JLe():YLe()})}):h.jsx(Sot,{save:tN,onSaved:o=>n(o.hasToken),placeholder:Yje(),createHref:"https://www.overleaf.com/user/settings"}),s&&h.jsx("div",{className:"error",children:s})]})}function Llt({project:e,publicationError:n,onProjectUpdate:t}){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(null),[d,_]=M.useState(!1),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=M.useRef(0),b=!!(r!=null&&r.github.owner&&r.github.repo),v=(z=!0)=>{const E=++k.current;return z&&s(null),c(null),e?fKe(e.id).then(j=>{E===k.current&&s(j)}).catch(j=>{E===k.current&&c(j instanceof Error?j.message:String(j))}):Promise.resolve()};M.useEffect(()=>void v(),[e==null?void 0:e.id]);const x=z=>{const E=z instanceof Error?z.message:String(z);return E.toLowerCase().includes("archived")?ASe():E.includes("(fetch first)")||E.includes("non-fast-forward")?RSe():E.includes("403")||E.toLowerCase().includes("permission denied")?ISe():E},y=()=>{e&&(o(!0),c(null),_Ke(e.id).then(z=>{s(z.git),t(z.project),Ex().then(E=>{!E.githubForNewProjects&&!E.githubDefaultPromptSeen&&_(!0)}).catch(()=>{})}).catch(z=>c(x(z))).finally(()=>o(!1)))},C=z=>{m(!0),S(null),aN(z,!0).then(()=>_(!1)).catch(E=>S(E instanceof Error?E.message:String(E))).finally(()=>m(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:JMe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:dOe({project:(e==null?void 0:e.name)??rSe()})}),e?l&&!r?h.jsx("div",{className:"error",children:l}):r?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:b2,children:[h.jsx("h3",{children:cAe()}),h.jsxs("div",{className:Xu,children:[h.jsx("span",{className:"k",children:dMe()}),h.jsx("span",{className:"v",children:r.path}),h.jsx("span",{className:"k",children:"Git"}),h.jsx("span",{className:"v",children:r.gitVersion??cE()}),h.jsx("span",{className:"k",children:HRe()}),h.jsx("span",{className:"v",children:r.initialized?CSe({branch:Ae(r.currentBranch??mE()),state:r.clean?M7e():PSe()}):cCe()}),h.jsx("span",{className:"k",children:s9e()}),h.jsx("span",{className:"v",children:r.baselineBranch}),h.jsx("span",{className:"k",children:YMe()}),h.jsx("span",{className:"v",children:r.remotes.length?r.remotes.map(z=>`${z.name}: ${z.url}`).join(" · "):cx()})]}),!r.initialized&&h.jsx("div",{className:L0,children:h.jsx(Qe,{variant:"primary",onClick:()=>void hKe(e.id).then(s).catch(z=>c(String(z))),children:WNe()})})]}),h.jsxs("div",{className:b2,children:[h.jsx("h3",{children:"GitHub"}),h.jsxs("div",{className:Xu,children:[h.jsx("span",{className:"k",children:WCe()}),h.jsx("span",{className:"v",children:h.jsx(Rt,{variant:r.github.authenticated?"success":r.github.ghInstalled?"warning":"error",children:r.github.authenticated?_E():vE()})}),h.jsx("span",{className:"k",children:bMe()}),h.jsx("span",{className:"v",children:b?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[r.github.owner,"/",r.github.repo]}),!r.github.enabled&&h.jsx(Rt,{children:tDe()})]}):h.jsx(Rt,{children:iAe()})}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:ZRe()}),h.jsx("span",{className:"v",children:r.github.syncStatus})]})]}),!r.github.authenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(TT,{ghInstalled:r.github.ghInstalled,onCheck:()=>v(!1)})}),r.github.authenticated&&!r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:b?TIe():J7e()}),h.jsxs("div",{className:L0,children:[b&&r.github.url&&h.jsxs(Rb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[R7()," ",h.jsx(mc,{size:12})]}),h.jsx(Qe,{variant:"primary",disabled:a,onClick:y,children:a?Y3e():G3e()})]})]}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:QEe()}),h.jsxs("div",{className:L0,children:[r.github.url&&h.jsxs(Rb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[R7()," ",h.jsx(mc,{size:12})]}),h.jsx(Qe,{disabled:a,onClick:()=>{o(!0),pKe(e.id).then(z=>{s(z.git),t(z.project)}).catch(z=>c(z instanceof Error?z.message:String(z))).finally(()=>o(!1))},children:a?J3e():P3e()})]})]})]}),h.jsx(Dlt,{}),n&&h.jsx("div",{className:"error",children:x(n)}),l&&h.jsx("div",{className:"error",children:x(l)})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]}):h.jsx("div",{className:za,children:h.jsx("p",{className:fs,children:bje()})}),d&&h.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:()=>C(!1),children:h.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:z=>z.stopPropagation(),children:[h.jsx("h2",{id:"github-default-title",children:gAe()}),h.jsx("p",{children:yDe()}),g&&h.jsx("div",{className:"error",children:g}),h.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[h.jsx(Qe,{disabled:f,onClick:()=>C(!1),children:YTe()}),h.jsx(Qe,{variant:"primary",disabled:f,onClick:()=>C(!0),children:f?Ta():U8e()})]})]})})]})}const Olt={env:sPe,config:lPe,xdg:fPe,default:ePe},$v={preparing:VHe,copying:wHe,verifying:mPe,finalizing:EHe},Ilt=e=>{var n;return((n=$v[e])==null?void 0:n.call($v))??e};function Blt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState({kind:"idle"}),[m,g]=M.useState(null),S=()=>GWe().then(C=>{n(C),a(z=>z||C.current)}).catch(C=>r(C instanceof Error?C.message:String(C)));M.useEffect(()=>{S()},[]),M.useEffect(()=>KKe(C=>{C.type==="progress"?f(z=>{const E=z.kind==="moving"?z.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),d(null),a(""),S()):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const k=(e==null?void 0:e.source)==="env",b=s.trim(),v=e!==null&&b===e.current;async function x(){if(!(o||!b)){l(!0),g(null),d(null);try{d(await VWe(b))}catch(C){g(C instanceof Error?C.message:String(C))}finally{l(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!b||v)&&(g(null),!!window.confirm(DHe({path:Ae(b)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await WWe(b)}catch(z){f({kind:"idle"}),g(z instanceof Error?z.message:String(z))}}}return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:WRe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:YOe()}),t?h.jsx("div",{className:za,children:h.jsx("div",{className:"error",children:t})}):e?h.jsxs("div",{className:za,children:[h.jsx("div",{className:"settings-card-head mb-3",children:h.jsx("h3",{children:AEe()})}),h.jsxs("div",{className:Xu,children:[h.jsx("span",{className:"k",children:hEe()}),h.jsx("span",{className:"v",children:e.current}),h.jsx("span",{className:"k",children:mx()}),h.jsx("span",{className:"v",children:Olt[e.source]()})]}),!k&&h.jsxs("form",{className:Ah,onSubmit:y,children:[h.jsxs("label",{children:[PAe(),h.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{a(C.target.value),d(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),c&&!c.error&&c.ok&&h.jsxs("p",{className:fs,children:[BMe()," ",wa(c.treeBytes??0),c.freeBytes!=null&&` — ${THe({size:Ae(wa(c.freeBytes))})}`,c.sameFilesystem?XHe():"","."]}),c&&c.ok===!1&&c.error&&h.jsx("div",{className:"error",children:c.error}),m&&h.jsx("div",{className:"error",children:m}),_.kind==="moving"&&h.jsx(gT,{value:_.copied,max:_.total,label:Ilt(_.phase),caption:_.total>0?h.jsxs("span",{className:"text-sm",children:[wa(_.copied)," / ",wa(_.total)]}):void 0}),_.kind==="done"&&h.jsxs("p",{className:fs,children:[RAe(),_.oldPathLeft&&h.jsxs(h.Fragment,{children:[" ",yCe({path:Ae(_.oldPathLeft)})]})]}),_.kind==="error"&&h.jsxs("div",{className:"error",children:[AAe()," ",_.message]}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{type:"button",onClick:x,disabled:o||!b||v||_.kind==="moving",children:o?Tp():e7e()}),h.jsx(Qe,{variant:"primary",type:"submit",disabled:!b||v||_.kind==="moving",children:_.kind==="moving"?FHe():BHe()})]})]})]}):h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]})]})}const y2=e=>e==="running"||e==="starting";function $lt(e){return y2(e.status)?ep(Date.now()-e.createdAt):e.endedAt?ep(e.endedAt-e.createdAt):"—"}function jT({instances:e,emptyLabel:n}){return e.length===0?h.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}):h.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:h.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:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:e9e()}),h.jsx("th",{children:Rp()}),h.jsx("th",{children:ORe()}),h.jsx("th",{children:pRe()})]})}),h.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 h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[h.jsx(Yy,{backend:t.backend}),r&&h.jsx(Hp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:M7(),"aria-label":M7(),onClick:a=>a.stopPropagation(),children:h.jsx(mc,{size:12})})]})}),h.jsx("td",{children:h.jsx(bo,{status:Di(t)})}),h.jsx("td",{children:Ea(t.createdAt)}),h.jsx("td",{children:$lt(t)})]},t.id)})})]})})}function Hlt({projectId:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const g=setInterval(()=>c(S=>S+1),3e4);return()=>clearInterval(g)},[]);const d=()=>{if(!e){r([]);return}l(!0),Cx(e).then(g=>{r(g),a(null)}).catch(g=>{a(g instanceof Error?g.message:String(g)),r(S=>S??[])}).finally(()=>l(!1))};M.useEffect(()=>d(),[e]);const _=(g,S)=>S.createdAt-g.createdAt,f=t==null?void 0:t.filter(g=>y2(g.status)).sort(_),m=t==null?void 0:t.filter(g=>!y2(g.status)).sort(_);return h.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:[h.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:[h.jsx("div",{children:h.jsxs("h2",{children:[dRe(),f&&f.length>0&&h.jsx("span",{className:"count-badge",children:f.length})]})}),h.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(sd,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Mp()]}),h.jsx(Qe,{size:"small",onClick:n,children:m!=null&&m.length?G_e({count:an(m.length)}):P_e()})]})]}),s&&h.jsx("div",{className:"error",children:s}),!f||!m?h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]}):h.jsx(jT,{instances:f,emptyLabel:e?A_e():I_e()})]})}function Plt({projectId:e,onBack:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const _=setInterval(()=>c(f=>f+1),3e4);return()=>clearInterval(_)},[]);const d=()=>{if(!e){r([]);return}l(!0),Cx(e).then(_=>{r(_.sort((f,m)=>m.createdAt-f.createdAt)),a(null)}).catch(_=>{a(_ instanceof Error?_.message:String(_)),r(f=>f??[])}).finally(()=>l(!1))};return M.useEffect(d,[e]),h.jsxs(h.Fragment,{children:[h.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:[h.jsx(Of,{size:14})," ",bE()]}),h.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[h.jsx("h1",{children:fze()}),h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(sd,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Mp()]})]}),s&&h.jsx("div",{className:"error",children:s}),t?h.jsx(jT,{instances:t,emptyLabel:e?C_e():R_e()}):h.jsxs(br,{children:[h.jsx(dn,{})," ",zl()]})]})}const MT=["projects","harnesses","storage"],Flt=[{id:"compute",label:xE,icon:h.jsx(DGe,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:hx,icon:h.jsx(Sx,{size:15}),activeTabs:["environment"]},{id:"settings",label:SE,icon:h.jsx(IVe,{size:15}),activeTabs:["settings",...MT]}];function Ult(e){return MT.includes(e)}function qlt({tab:e,project:n,githubPublicationError:t,onProjectUpdate:r,onSelectTab:s}){const a=e==="settings"||Ult(e);return h.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:[a&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:SE()}),h.jsxs("div",{className:"settings-stack mt-4.5",children:[h.jsx("section",{className:_u,children:h.jsx(zlt,{})}),h.jsx("section",{className:_u,children:h.jsx(Rlt,{})}),h.jsx("section",{className:_u,children:h.jsx(Zot,{})}),h.jsx("section",{className:_u,children:h.jsx(Blt,{})}),h.jsx("section",{className:_u,children:h.jsx(jlt,{})}),h.jsx("section",{className:_u,children:h.jsx(Tlt,{})})]})]}),e==="compute"&&h.jsx(blt,{project:n,onViewHistory:()=>s("instances")}),e==="instances"&&h.jsx(Plt,{projectId:n==null?void 0:n.id,onBack:()=>s("compute")}),e==="environment"&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:hx()}),h.jsx(Elt,{})]}),e==="git"&&h.jsx(Llt,{project:n,publicationError:t,onProjectUpdate:r})]})}function Glt({skills:e,activeIndex:n,onPick:t,onHover:r}){return h.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,a)=>h.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(s)},onMouseEnter:()=>r(a),children:[h.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&h.jsx(Rt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:jE()})]}),h.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const pk={name:"plan",get description(){return K4e()},source:"command"};function Hv(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(;r1&&/[ \t]$/.test(a)&&(a=a.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let o=e.slice(n.end);if(!o)o=s;else if(!o.startsWith(` -`)){const _=(c=/^[ \t]+/.exec(o))==null?void 0:c[0];o=_?`${_.length>=r?_:s}${o.slice(_.length)}`:s+o}const l=((d=/^[ \t]+/.exec(o))==null?void 0:d[0].length)??0;return{text:`${a}/${t}${o}`,cursor:a.length+t.length+1+l}}function gk(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 Wlt(e,n){const t=e.filter(r=>r.name.toLowerCase()!==pk.name);return n?[pk,...t]:t}function Klt(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function Ylt(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const Xlt=["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"],Pv=new Map;function Zlt(e,n){const t=`${n}\0${e}`,r=Pv.get(t);if(r)return r;const s=bKe(e,n).catch(a=>{throw Pv.delete(t),a});return Pv.set(t,s),s}function RT(e,n,t,r,s,a=!1){let o=0;return Vlt(e,n).map((l,c)=>{const d=o+l.text.length;o=d;const _=l.text.slice(1).toLowerCase();return l.command&&s?s(l.text,_,d,c):l.command?h.jsxs("span",{className:t,onMouseDown:void 0,children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),l.text.slice(1)]},c):a?h.jsx("span",{"aria-hidden":"true",children:l.text},c):h.jsx(M.Fragment,{children:l.text},c)})}function Qlt({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:a}){const o=M.useRef(null),l=M.useRef(null),c=M.useRef(null),d=M.useId(),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState({}),x=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const E=o.current;if(!E)return;const j=E.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),D=Math.max(16,Math.min(j.left-4,window.innerWidth-A-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:D,width:A}:{left:D,top:j.bottom+12,width:A})},C=()=>{x(),y(),f(!0),!(m!==null||S)&&(k(!0),Zlt(n,s).then(g).catch(()=>g(null)).finally(()=>k(!1)))},z=()=>{x(),c.current=window.setTimeout(()=>f(!1),120)};return M.useEffect(()=>()=>x(),[]),M.useEffect(()=>{if(!_)return;const E=()=>y();return window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[_]),h.jsxs(M.Fragment,{children:[h.jsxs("span",{ref:o,role:"button",tabIndex:0,"aria-controls":d,"aria-expanded":_,"aria-label":EI({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:C,onMouseLeave:z,onFocus:C,onBlur:z,onKeyDown:E=>{var j,A;if(E.key==="Escape"){f(!1);return}if(E.key==="Enter"||E.key===" "){E.preventDefault(),C();return}_&&(E.key==="ArrowDown"||E.key==="PageDown")&&(E.preventDefault(),(j=l.current)==null||j.scrollBy({top:E.key==="PageDown"?240:48,behavior:"smooth"})),_&&(E.key==="ArrowUp"||E.key==="PageUp")&&(E.preventDefault(),(A=l.current)==null||A.scrollBy({top:E.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:E=>{var j,A;E.preventDefault(),(j=a.current)==null||j.focus(),(A=a.current)==null||A.setSelectionRange(t,t),x()},children:[h.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),h.jsxs("span",{className:"relative z-1",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Pp.createPortal(h.jsxs("div",{id:d,ref:l,role:"dialog","aria-label":sB({name:n}),style:{...b,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:x,onMouseLeave:z,onFocus:x,onBlur:z,onMouseDown:E=>E.stopPropagation(),children:[h.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:[h.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),h.jsx(Rt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:jE()})]}),h.jsx("div",{className:"p-4 text-sm text-text",children:S&&m===null?h.jsx("span",{className:"text-muted",children:GIe()}):h.jsx(Na,{text:m??r.description})})]}),document.body)]})}function Jlt({text:e,isCommand:n}){return h.jsx(h.Fragment,{children:RT(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function ect({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const a=M.useRef(null);return M.useLayoutEffect(()=>{const o=s.current,l=a.current;if(!o||!l)return;const c=()=>{const _=getComputedStyle(o);for(const f of Xlt)l.style.setProperty(f,_.getPropertyValue(f));l.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};c();const d=new ResizeObserver(c);return d.observe(o),()=>d.disconnect()},[e,s]),M.useLayoutEffect(()=>{const o=s.current;if(!o)return;const l=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return l(),o.addEventListener("scroll",l),()=>o.removeEventListener("scroll",l)},[s,e]),h.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:[RT(e,n,"",void 0,(o,l,c,d)=>{const _=t.find(f=>f.name===l);return _&&_.source!=="command"?h.jsx(Qlt,{label:o,name:l,end:c,skill:_,projectId:r,textareaRef:s},`${d}:${c}`):h.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${d}:${c}`)},!0),"​"]})}function tct(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const w2=6.5,vk=2*Math.PI*w2;function nct({usage:e}){return!e||e.usedTokens<=0?null:h.jsx(rct,{usage:e})}function rct({usage:e}){const{open:n,setOpen:t,ref:r}=zo(),{usedTokens:s,contextWindow:a}=e,o=a&&a>0?Math.min(100,Math.round(s/a*100)):null,l=o===null?"var(--accent)":tct(o),c=o===null?"":new Intl.NumberFormat(N(),{style:"percent"}).format(o/100);return h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[h.jsx("button",{type:"button",className:`${o===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:Fae(),onClick:()=>t(d=>!d),children:o===null?W_(s):h.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:w2,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),h.jsx("circle",{cx:"8",cy:"8",r:w2,fill:"none",stroke:l,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${vk*Math.max(o,2)/100} ${vk}`,transform:"rotate(-90 8 8)"})]})}),n&&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 [&.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:[h.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[h.jsx("span",{children:Bae()}),h.jsx("span",{className:"context-meter-value text-text tabular-nums",children:o===null?Vae({value:Ae(W_(s))}):Xae({used:Ae(W_(s)),total:Ae(W_(a)),percent:Ae(c)})})]}),o!==null&&h.jsx(gT,{value:s,max:a,fillColor:l})]})]})}const Jy="orx:demo-read-sessions";function DT(){try{const e=JSON.parse(sessionStorage.getItem(Jy)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function sct(e){try{const n=DT();n.add(e),sessionStorage.setItem(Jy,JSON.stringify([...n]))}catch{}}function ict(){try{sessionStorage.removeItem(Jy)}catch{}}function act(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 oct(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 lct(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&T&&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(T){const D=this._getMouseBufferCoords(T),I=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(I&&P&&D)&&this._areCoordsInSelection(D,I,P)}isCellInSelection(T,D){const I=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!I||!P)&&this._areCoordsInSelection([T,D],I,P)}_areCoordsInSelection(T,D,I){return T[1]>D[1]&&T[1]=D[0]&&T[0]=D[0]}_selectWordAtCursor(T,D){var H,F;const I=(F=(H=this._linkifier.currentLink)==null?void 0:H.link)==null?void 0:F.range;if(I)return this._model.selectionStart=[I.start.x-1,I.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(I,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(T);return!!P&&(this._selectWordAt(P,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,D){this._model.clearSelection(),T=Math.max(T,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const D=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(T){let D=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const I=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=I?0:(D>I&&(D-=I),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(T){return v.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const D=this._getMouseBufferCoords(T);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(T){return T.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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 I=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(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const D=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const I=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(I&&I[0]!==void 0&&I[1]!==void 0){const P=(0,m.moveToCellSequence)(I[0]-1,I[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,I=!(!T||!D||T[0]===D[0]&&T[1]===D[1]);I?T&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,D,I)):this._oldHasSelection&&this._fireOnSelectionChange(T,D,I)}_fireOnSelectionChange(T,D,I){this._oldSelectionStart=T,this._oldSelectionEnd=D,this._oldHasSelection=I,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(T,D){let I=D;for(let P=0;D>=P;P++){const H=T.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?I--:H>1&&D!==P&&(I+=H-1)}return I}setSelection(T,D,I){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,D],this._model.selectionStartLength=I,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,D,I=!0,P=!0){if(T[0]>=this._bufferService.cols)return;const H=this._bufferService.buffer,F=H.lines.get(T[1]);if(!F)return;const V=H.translateBufferLineToString(T[1],!1);let X=this._convertViewportColToCharacterIndex(F,T[0]),W=X;const Z=T[0]-X;let J=0,B=0,L=0,$=0;if(V.charAt(X)===" "){for(;X>0&&V.charAt(X-1)===" ";)X--;for(;W1&&($+=he-1,W+=he-1);re>0&&X>0&&!this._isCharWordSeparator(F.loadCell(re-1,this._workCell));){F.loadCell(re-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,re--):ie>1&&(L+=ie-1,X-=ie-1),X--,re--}for(;oe1&&($+=ie-1,W+=ie-1),W++,oe++}}W++;let K=X+Z-J+L,G=Math.min(this._bufferService.cols,W-X+J+B-L-$);if(D||V.slice(X,W).trim()!==""){if(I&&K===0&&F.getCodePoint(0)!==32){const re=H.lines.get(T[1]-1);if(re&&F.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(oe){const he=this._bufferService.cols-oe.start;K-=he,G+=he}}}if(P&&K+G===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const re=H.lines.get(T[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const oe=this._getWordAt([0,T[1]+1],!1,!1,!0);oe&&(G+=oe.length)}}return{start:K,length:G}}}_selectWordAt(T,D){const I=this._getWordAt(T,D);if(I){for(;I.start<0;)I.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[I.start,T[1]],this._model.selectionStartLength=I.length}}_selectToWordAt(T){const D=this._getWordAt(T,!0);if(D){let I=T[1];for(;D.start<0;)D.start+=this._bufferService.cols,I--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,I++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,I]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const D=this._bufferService.buffer.getWrappedRangeForLine(T),I={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(I,this._bufferService.cols)}};l.SelectionService=j=d([_(3,C.IBufferService),_(4,C.ICoreService),_(5,S.IMouseService),_(6,C.IOptionsService),_(7,S.IRenderService),_(8,S.ICoreBrowserService)],j)},4725:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ILinkProviderService=l.IThemeService=l.ICharacterJoinerService=l.ISelectionService=l.IRenderService=l.IMouseService=l.ICoreBrowserService=l.ICharSizeService=void 0;const d=c(8343);l.ICharSizeService=(0,d.createDecorator)("CharSizeService"),l.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),l.IMouseService=(0,d.createDecorator)("MouseService"),l.IRenderService=(0,d.createDecorator)("RenderService"),l.ISelectionService=(0,d.createDecorator)("SelectionService"),l.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),l.IThemeService=(0,d.createDecorator)("ThemeService"),l.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(o,l,c){var d=this&&this.__decorate||function(j,T,D,I){var P,H=arguments.length,F=H<3?T:I===null?I=Object.getOwnPropertyDescriptor(T,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(j,T,D,I);else for(var V=j.length-1;V>=0;V--)(P=j[V])&&(F=(H<3?P(F):H>3?P(T,D,F):P(T,D))||F);return H>3&&F&&Object.defineProperty(T,D,F),F},_=this&&this.__param||function(j,T){return function(D,I){T(D,I,j)}};Object.defineProperty(l,"__esModule",{value:!0}),l.ThemeService=l.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),m=c(8055),g=c(8460),S=c(844),k=c(2585),b=m.css.toColor("#ffffff"),v=m.css.toColor("#000000"),x=m.css.toColor("#ffffff"),y=m.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};l.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const j=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let D=0;D<216;D++){const I=T[D/36%6|0],P=T[D/6%6|0],H=T[D%6];j.push({css:m.channels.toCss(I,P,H),rgba:m.channels.toRgba(I,P,H)})}for(let D=0;D<24;D++){const I=8+10*D;j.push({css:m.channels.toCss(I,I,I),rgba:m.channels.toRgba(I,I,I)})}return j})());let A=l.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(j){super(),this._optionsService=j,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:m.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:m.color.blend(v,C),ansi:l.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(j={}){const T=this._colors;if(T.foreground=E(j.foreground,b),T.background=E(j.background,v),T.cursor=E(j.cursor,x),T.cursorAccent=E(j.cursorAccent,y),T.selectionBackgroundTransparent=E(j.selectionBackground,C),T.selectionBackgroundOpaque=m.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=E(j.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=m.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=j.selectionForeground?E(j.selectionForeground,m.NULL_COLOR):void 0,T.selectionForeground===m.NULL_COLOR&&(T.selectionForeground=void 0),m.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=m.color.opacity(T.selectionBackgroundTransparent,.3)),m.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=m.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=l.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=E(j.black,l.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=E(j.red,l.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=E(j.green,l.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=E(j.yellow,l.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=E(j.blue,l.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=E(j.magenta,l.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=E(j.cyan,l.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=E(j.white,l.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=E(j.brightBlack,l.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=E(j.brightRed,l.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=E(j.brightGreen,l.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=E(j.brightYellow,l.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=E(j.brightBlue,l.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=E(j.brightMagenta,l.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=E(j.brightCyan,l.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=E(j.brightWhite,l.DEFAULT_ANSI_COLORS[15]),j.extendedAnsi){const D=Math.min(T.ansi.length-16,j.extendedAnsi.length);for(let I=0;I{Object.defineProperty(l,"__esModule",{value:!0}),l.CircularList=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(g){if(this._maxLength===g)return;const S=new Array(g);for(let k=0;kthis._length)for(let S=this._length;S=g;b--)this._array[this._getCyclicIndex(b+k.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+k.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=k.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,k){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let v=S-1;v>=0;v--)this.set(g+v+k,this.get(g+v));const b=g+S+k-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(l,"__esModule",{value:!0}),l.clone=void 0,l.clone=function c(d,_=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const m in d)f[m]=_<=1?d[m]:d[m]&&c(d[m],_-1);return f}},8055:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.contrastRatio=l.toPaddedHex=l.rgba=l.rgb=l.css=l.color=l.channels=l.NULL_COLOR=void 0;let c=0,d=0,_=0,f=0;var m,g,S,k,b;function v(y){const C=y.toString(16);return C.length<2?"0"+C:C}function x(y,C){return y>>0},y.toColor=function(C,A,E,j){return{css:y.toCss(C,A,E,j),rgba:y.toRgba(C,A,E,j)}}})(m||(l.channels=m={})),(function(y){function C(A,E){return f=Math.round(255*E),[c,d,_]=b.toChannels(A.rgba),{css:m.toCss(c,d,_,f),rgba:m.toRgba(c,d,_,f)}}y.blend=function(A,E){if(f=(255&E.rgba)/255,f===1)return{css:E.css,rgba:E.rgba};const j=E.rgba>>24&255,T=E.rgba>>16&255,D=E.rgba>>8&255,I=A.rgba>>24&255,P=A.rgba>>16&255,H=A.rgba>>8&255;return c=I+Math.round((j-I)*f),d=P+Math.round((T-P)*f),_=H+Math.round((D-H)*f),{css:m.toCss(c,d,_),rgba:m.toRgba(c,d,_)}},y.isOpaque=function(A){return(255&A.rgba)==255},y.ensureContrastRatio=function(A,E,j){const T=b.ensureContrastRatio(A.rgba,E.rgba,j);if(T)return m.toColor(T>>24&255,T>>16&255,T>>8&255)},y.opaque=function(A){const E=(255|A.rgba)>>>0;return[c,d,_]=b.toChannels(E),{css:m.toCss(c,d,_),rgba:E}},y.opacity=C,y.multiplyOpacity=function(A,E){return f=255&A.rgba,C(A,f*E/255)},y.toColorRGB=function(A){return[A.rgba>>24&255,A.rgba>>16&255,A.rgba>>8&255]}})(g||(l.color=g={})),(function(y){let C,A;try{const E=document.createElement("canvas");E.width=1,E.height=1;const j=E.getContext("2d",{willReadFrequently:!0});j&&(C=j,C.globalCompositeOperation="copy",A=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),m.toColor(c,d,_);case 5:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),f=parseInt(E.slice(4,5).repeat(2),16),m.toColor(c,d,_,f);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const j=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(j)return c=parseInt(j[1]),d=parseInt(j[2]),_=parseInt(j[3]),f=Math.round(255*(j[5]===void 0?1:parseFloat(j[5]))),m.toColor(c,d,_,f);if(!C||!A)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=A,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,d,_,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,d,_,f),css:E}}})(S||(l.css=S={})),(function(y){function C(A,E,j){const T=A/255,D=E/255,I=j/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))}y.relativeLuminance=function(A){return C(A>>16&255,A>>8&255,255&A)},y.relativeLuminance2=C})(k||(l.rgb=k={})),(function(y){function C(E,j,T){const D=E>>24&255,I=E>>16&255,P=E>>8&255;let H=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2(H,F,V),k.relativeLuminance2(D,I,P));for(;X0||F>0||V>0);)H-=Math.max(0,Math.ceil(.1*H)),F-=Math.max(0,Math.ceil(.1*F)),V-=Math.max(0,Math.ceil(.1*V)),X=x(k.relativeLuminance2(H,F,V),k.relativeLuminance2(D,I,P));return(H<<24|F<<16|V<<8|255)>>>0}function A(E,j,T){const D=E>>24&255,I=E>>16&255,P=E>>8&255;let H=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2(H,F,V),k.relativeLuminance2(D,I,P));for(;X>>0}y.blend=function(E,j){if(f=(255&j)/255,f===1)return j;const T=j>>24&255,D=j>>16&255,I=j>>8&255,P=E>>24&255,H=E>>16&255,F=E>>8&255;return c=P+Math.round((T-P)*f),d=H+Math.round((D-H)*f),_=F+Math.round((I-F)*f),m.toRgba(c,d,_)},y.ensureContrastRatio=function(E,j,T){const D=k.relativeLuminance(E>>8),I=k.relativeLuminance(j>>8);if(x(D,I)>8));if(Vx(D,k.relativeLuminance(X>>8))?F:X}return F}const P=A(E,j,T),H=x(D,k.relativeLuminance(P>>8));if(Hx(D,k.relativeLuminance(F>>8))?P:F}return P}},y.reduceLuminance=C,y.increaseLuminance=A,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(b||(l.rgba=b={})),l.toPaddedHex=v,l.contrastRatio=x},8969:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreTerminal=void 0;const d=c(844),_=c(2585),f=c(4348),m=c(7866),g=c(744),S=c(7302),k=c(6975),b=c(8460),v=c(1753),x=c(1480),y=c(7994),C=c(9282),A=c(5435),E=c(5981),j=c(2660);let T=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((P=>{var H;(H=this._onScrollApi)==null||H.fire(P.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(P){for(const H in P)this.optionsService.options[H]=P[H]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new S.OptionsService(P)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(j.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new A.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.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((H=>{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((H=>{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 E.WriteBuffer(((H,F)=>this._inputHandler.parse(H,F)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,H){this._writeBuffer.write(P,H)}writeSync(P,H){this._logService.logLevel<=_.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(P,H)}input(P,H=!0){this.coreService.triggerDataEvent(P,H)}resize(P,H){isNaN(P)||isNaN(H)||(P=Math.max(P,g.MINIMUM_COLS),H=Math.max(H,g.MINIMUM_ROWS),this._bufferService.resize(P,H))}scroll(P,H=!1){this._bufferService.scroll(P,H)}scrollLines(P,H,F){this._bufferService.scrollLines(P,H,F)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const H=P-this._bufferService.buffer.ydisp;H!==0&&this.scrollLines(H)}registerEscHandler(P,H){return this._inputHandler.registerEscHandler(P,H)}registerDcsHandler(P,H){return this._inputHandler.registerDcsHandler(P,H)}registerCsiHandler(P,H){return this._inputHandler.registerCsiHandler(P,H)}registerOscHandler(P,H){return this._inputHandler.registerOscHandler(P,H)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const H=this.optionsService.rawOptions.windowsPty;H&&H.buildNumber!==void 0&&H.buildNumber!==void 0?P=H.backend==="conpty"&&H.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const H of P)H.dispose()}))}}}l.CoreTerminal=D},8460:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.runAndSubscribe=l.forwardEvent=l.EventEmitter=void 0,l.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 d=0;dd.fire(_)))},l.runAndSubscribe=function(c,d){return d(void 0),c((_=>d(_)))}},5435:function(o,l,c){var d=this&&this.__decorate||function(J,B,L,$){var K,G=arguments.length,re=G<3?B:$===null?$=Object.getOwnPropertyDescriptor(B,L):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(J,B,L,$);else for(var oe=J.length-1;oe>=0;oe--)(K=J[oe])&&(re=(G<3?K(re):G>3?K(B,L,re):K(B,L))||re);return G>3&&re&&Object.defineProperty(B,L,re),re},_=this&&this.__param||function(J,B){return function(L,$){B(L,$,J)}};Object.defineProperty(l,"__esModule",{value:!0}),l.InputHandler=l.WindowsOptionsReportType=void 0;const f=c(2584),m=c(7116),g=c(2015),S=c(844),k=c(482),b=c(8437),v=c(8460),x=c(643),y=c(511),C=c(3734),A=c(2585),E=c(1480),j=c(6242),T=c(6351),D=c(5941),I={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=131072;function H(J,B){if(J>24)return B.setWinLines||!1;switch(J){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(l.WindowsOptionsReportType=F={}));let V=0;class X extends S.Disposable{getAttrData(){return this._curAttrData}constructor(B,L,$,K,G,re,oe,he,ie=new g.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=L,this._coreService=$,this._logService=K,this._optionsService=G,this._oscLinkService=re,this._coreMouseService=oe,this._unicodeService=he,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.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 W(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:te.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,te,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:te,data:le})})),this._parser.setDcsHandlerFallback(((q,te,le)=>{te==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:te,payload:le})})),this._parser.setPrintHandler(((q,te,le)=>this.print(q,te,le))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!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 j.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new j.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new j.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new j.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new j.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new j.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new j.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new j.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new j.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new j.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new j.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new j.OscHandler((q=>this.restoreCursorColor(q)))),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 q in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((q,te)=>this.requestStatusString(q,te))))}_preserveStack(B,L,$,K){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=$,this._parseStack.position=K}_logSlowResolvingAsync(B){this._logService.logLevel<=A.LogLevelEnum.WARN&&Promise.race([B,new Promise(((L,$)=>setTimeout((()=>$("#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(B,L){let $,K=this._activeBuffer.x,G=this._activeBuffer.y,re=0;const oe=this._parseStack.paused;if(oe){if($=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync($),$;K=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>P&&(re=this._parseStack.position+P)}if(this._logService.logLevel<=A.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(q=>String.fromCharCode(q))).join("")}"`),typeof B=="string"?B.split("").map((q=>q.charCodeAt(0))):B),this._parseBuffer.lengthP)for(let q=re;q0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let ge=this._parser.precedingJoinState;for(let ue=L;ue<$;++ue){if(K=B[ue],K<127&&re){const Pe=re[String.fromCharCode(K)];Pe&&(K=Pe.charCodeAt(0))}const Ce=this._unicodeService.charProperties(K,ge);G=E.UnicodeService.extractWidth(Ce);const Ee=E.UnicodeService.extractShouldJoin(Ce),Le=Ee?E.UnicodeService.extractWidth(ge):0;if(ge=Ce,oe&&this._onA11yChar.fire((0,k.stringFromCodePoint)(K)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Le>he){if(ie){const Pe=le;let Ve=this._activeBuffer.x-Le;for(this._activeBuffer.x=Le,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Le>0&&le instanceof b.BufferLine&&le.copyCellsFrom(Pe,Ve,0,Le,!1);Ve=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(q&&(le.insertCells(this._activeBuffer.x,G-Le,this._activeBuffer.getNullCell(te)),le.getWidth(he-1)===2&&le.setCellFromCodepoint(he-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,te)),le.setCellFromCodepoint(this._activeBuffer.x++,K,G,te),G>0)for(;--G;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=ge,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,L){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,L):this._parser.registerCsiHandler(B,($=>!H($.params[0],this._optionsService.rawOptions.windowOptions)||L($)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new T.DcsHandler(L))}registerEscHandler(B,L){return this._parser.registerEscHandler(B,L)}registerOscHandler(B,L){return this._parser.registerOscHandler(B,new j.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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=B,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+L)}cursorUp(B){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const L=B.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const L=B.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,L,$,K=!1,G=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);re.replaceCells(L,$,this._activeBuffer.getNullCell(this._eraseAttrData()),G),K&&(re.isWrapped=!1)}_resetBufferLine(B,L=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);$&&($.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),$.isWrapped=!1)}eraseInDisplay(B,L=!1){let $;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for($=this._activeBuffer.y,this._dirtyRowTracker.markDirty($),this._eraseInBufferLine($++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);$=this._bufferService.cols&&(this._activeBuffer.lines.get($+1).isWrapped=!1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 2:for($=this._bufferService.rows,this._dirtyRowTracker.markDirty($-1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 3:const K=this._activeBuffer.lines.length-this._bufferService.rows;K>0&&(this._activeBuffer.lines.trimStart(K),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-K,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-K,0),this._onScroll.fire(0))}return!0}eraseInLine(B,L=!1){switch(this._restrictCursor(this._bufferService.cols),B.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(B){this._restrictCursor();let L=B.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 ie=he;for(let q=1;q<$;++q)oe.copyWithin(ie,0,he),ie+=he;return this.print(oe,0,ie),!0}sendDeviceAttributesPrimary(B){return B.params[0]>0||(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(B){return B.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(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let L=0;LEe?1:2,ge=B.params[0];return ue=ge,Ce=L?ge===2?4:ge===4?le(re.modes.insertMode):ge===12?3:ge===20?le(te.convertEol):0:ge===1?le($.applicationCursorKeys):ge===3?te.windowOptions.setWinLines?he===80?2:he===132?1:0:0:ge===6?le($.origin):ge===7?le($.wraparound):ge===8?3:ge===9?le(K==="X10"):ge===12?le(te.cursorBlink):ge===25?le(!re.isCursorHidden):ge===45?le($.reverseWraparound):ge===66?le($.applicationKeypad):ge===67?4:ge===1e3?le(K==="VT200"):ge===1002?le(K==="DRAG"):ge===1003?le(K==="ANY"):ge===1004?le($.sendFocus):ge===1005?4:ge===1006?le(G==="SGR"):ge===1015?4:ge===1016?le(G==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?le(ie===q):ge===2004?le($.bracketedPasteMode):0,re.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ue};${Ce}$y`),!0;var ue,Ce}_updateAttrColor(B,L,$,K,G){return L===2?(B|=50331648,B&=-16777216,B|=C.AttributeData.fromColorRGB([$,K,G])):L===5&&(B&=-50331904,B|=33554432|255&$),B}_extractColor(B,L,$){const K=[0,0,-1,0,0,0];let G=0,re=0;do{if(K[re+G]=B.params[L+re],B.hasSubParams(L+re)){const oe=B.getSubParams(L+re);let he=0;do K[1]===5&&(G=1),K[re+he+1+G]=oe[he];while(++he=2||K[1]===2&&re+G>=5)break;K[1]&&(G=1)}while(++re+L5)&&(B=1),L.extended.underlineStyle=B,L.fg|=268435456,B===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(B){B.fg=b.DEFAULT_ATTR_DATA.fg,B.bg=b.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=B.length;let $;const K=this._curAttrData;for(let G=0;G=30&&$<=37?(K.fg&=-50331904,K.fg|=16777216|$-30):$>=40&&$<=47?(K.bg&=-50331904,K.bg|=16777216|$-40):$>=90&&$<=97?(K.fg&=-50331904,K.fg|=16777224|$-90):$>=100&&$<=107?(K.bg&=-50331904,K.bg|=16777224|$-100):$===0?this._processSGR0(K):$===1?K.fg|=134217728:$===3?K.bg|=67108864:$===4?(K.fg|=268435456,this._processUnderline(B.hasSubParams(G)?B.getSubParams(G)[0]:1,K)):$===5?K.fg|=536870912:$===7?K.fg|=67108864:$===8?K.fg|=1073741824:$===9?K.fg|=2147483648:$===2?K.bg|=134217728:$===21?this._processUnderline(2,K):$===22?(K.fg&=-134217729,K.bg&=-134217729):$===23?K.bg&=-67108865:$===24?(K.fg&=-268435457,this._processUnderline(0,K)):$===25?K.fg&=-536870913:$===27?K.fg&=-67108865:$===28?K.fg&=-1073741825:$===29?K.fg&=2147483647:$===39?(K.fg&=-67108864,K.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):$===49?(K.bg&=-67108864,K.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):$===38||$===48||$===58?G+=this._extractColor(B,G,K):$===53?K.bg|=1073741824:$===55?K.bg&=-1073741825:$===59?(K.extended=K.extended.clone(),K.extended.underlineColor=-1,K.updateExtended()):$===100?(K.fg&=-67108864,K.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,K.bg&=-67108864,K.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",$);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${$}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${$}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.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(B){const L=B.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 $=L%2==1;return this._optionsService.options.cursorBlink=$,!0}setScrollRegion(B){const L=B.params[0]||1;let $;return(B.length<2||($=B.params[1])>this._bufferService.rows||$===0)&&($=this._bufferService.rows),$>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=$-1,this._setCursor(0,0)),!0}windowOptions(B){if(!H(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.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(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const L=[],$=B.split(";");for(;$.length>1;){const K=$.shift(),G=$.shift();if(/^\d+$/.exec(K)){const re=parseInt(K);if(Z(re))if(G==="?")L.push({type:0,index:re});else{const oe=(0,D.parseColor)(G);oe&&L.push({type:1,index:re,color:oe})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(B){const L=B.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(B,L){this._getCurrentLinkId()&&this._finishHyperlink();const $=B.split(":");let K;const G=$.findIndex((re=>re.startsWith("id=")));return G!==-1&&(K=$[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:K,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(B,L){const $=B.split(";");for(let K=0;K<$.length&&!(L>=this._specialColors.length);++K,++L)if($[K]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,D.parseColor)($[K]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const L=[],$=B.split(";");for(let K=0;K<$.length;++K)if(/^\d+$/.exec($[K])){const G=parseInt($[K]);Z(G)&&L.push({type:2,index:G})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(I[B[0]],m.CHARSETS[B[1]]||m.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),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._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${G}${f.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${$.scrollTop+1};${$.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[K.cursorStyle]-(K.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,L){this._dirtyRowTracker.markRangeDirty(B,L)}}l.InputHandler=X;let W=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,B){J>B&&(V=J,J=B,B=V),Jthis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}W=d([_(0,A.IBufferService)],W)},844:(o,l)=>{function c(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(l,"__esModule",{value:!0}),l.getDisposeArrayDisposable=l.disposeArray=l.toDisposable=l.MutableDisposable=l.Disposable=void 0,l.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},l.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},l.toDisposable=function(d){return{dispose:d}},l.disposeArray=c,l.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.FourKeyMap=l.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(_,f,m){this._data[_]||(this._data[_]={}),this._data[_][f]=m}get(_,f){return this._data[_]?this._data[_][f]:void 0}clear(){this._data={}}}l.TwoKeyMap=c,l.FourKeyMap=class{constructor(){this._data=new c}set(d,_,f,m,g){this._data.get(d,_)||this._data.set(d,_,new c),this._data.get(d,_).set(f,m,g)}get(d,_,f,m){var g;return(g=this._data.get(d,_))==null?void 0:g.get(f,m)}clear(){this._data.clear()}}},6114:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.isChromeOS=l.isLinux=l.isWindows=l.isIphone=l.isIpad=l.isMac=l.getSafariVersion=l.isSafari=l.isLegacyEdge=l.isFirefox=l.isNode=void 0,l.isNode=typeof process<"u"&&"title"in process;const c=l.isNode?"node":navigator.userAgent,d=l.isNode?"node":navigator.platform;l.isFirefox=c.includes("Firefox"),l.isLegacyEdge=c.includes("Edge"),l.isSafari=/^((?!chrome|android).)*safari/i.test(c),l.getSafariVersion=function(){if(!l.isSafari)return 0;const _=c.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},l.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),l.isIpad=d==="iPad",l.isIphone=d==="iPhone",l.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),l.isLinux=d.indexOf("Linux")>=0,l.isChromeOS=/\bCrOS\b/.test(c)},6106:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SortedList=void 0;let c=0;l.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(c=this._search(_),c===-1)||this._getKey(this._array[c])!==_)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===d))do _(this._array[c]);while(++c=_;){let m=_+f>>1;const g=this._getKey(this._array[m]);if(g>d)f=m-1;else{if(!(g0&&this._getKey(this._array[m-1])===d;)m--;return m}_=m+1}}return _}}},7226:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DebouncedIdleTask=l.IdleTaskQueue=l.PriorityTaskQueue=void 0;const d=c(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iv)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=v}this.clear()}}class f extends _{_requestCallback(g){return setTimeout((()=>g(this._createDeadline(16))))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}l.PriorityTaskQueue=f,l.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,l.DebouncedIdleTask=class{constructor(){this._queue=new l.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.updateWindowsModeWrappedState=void 0;const d=c(643);l.updateWindowsModeWrappedState=function(_){const f=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),m=f==null?void 0:f.get(_.cols-1),g=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);g&&m&&(g.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ExtendedAttrs=l.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new d}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}}l.AttributeData=c;class d{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,m=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}l.ExtendedAttrs=d},9092:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Buffer=l.MAX_BUFFER_SIZE=void 0;const d=c(6349),_=c(7226),f=c(3734),m=c(8437),g=c(4634),S=c(511),k=c(643),b=c(4863),v=c(7116);l.MAX_BUFFER_SIZE=4294967295,l.Buffer=class{constructor(x,y,C){this._hasScrollback=x,this._optionsService=y,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=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new m.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xl.MAX_BUFFER_SIZE?l.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=m.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let A=0;const E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+j+1?(this.ybase--,j++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(x,C)));else for(let T=this._rows;T>y;T--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=E}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),j&&(this.y+=j),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let j=0;j.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const C=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(C.length>0){const A=(0,g.reflowLargerCreateNewLayout)(this.lines,C);(0,g.reflowLargerApplyNewLayout)(this.lines,A.layout),this._reflowLargerAdjustViewport(x,y,A.countRemoved)}}_reflowLargerAdjustViewport(x,y,C){const A=this.getNullCell(m.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;j--){let T=this.lines.get(j);if(!T||!T.isWrapped&&T.getTrimmedLength()<=x)continue;const D=[T];for(;T.isWrapped&&j>0;)T=this.lines.get(--j),D.unshift(T);const I=this.ybase+this.y;if(I>=j&&I0&&(A.push({start:j+D.length+E,newLines:X}),E+=X.length),D.push(...X);let W=H.length-1,Z=H[W];Z===0&&(W--,Z=H[W]);let J=D.length-F-1,B=P;for(;J>=0;){const $=Math.min(B,Z);if(D[W]===void 0)break;if(D[W].copyCellsFrom(D[J],B-$,Z-$,$,!0),Z-=$,Z===0&&(W--,Z=H[W]),B-=$,B===0){J--;const K=Math.max(J,0);B=(0,g.getWrappedLineTrimmedLength)(D,K,this._cols)}}for(let $=0;$0;)this.ybase===0?this.y0){const j=[],T=[];for(let W=0;W=0;W--)if(H&&H.start>I+F){for(let Z=H.newLines.length-1;Z>=0;Z--)this.lines.set(W--,H.newLines[Z]);W++,j.push({index:I+1,amount:H.newLines.length}),F+=H.newLines.length,H=A[++P]}else this.lines.set(W,T[I--]);let V=0;for(let W=j.length-1;W>=0;W--)j[W].index+=V,this.lines.onInsertEmitter.fire(j[W]),V+=j[W].amount;const X=Math.max(0,D+E-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(x,y,C=0,A){const E=this.lines.get(x);return E?E.translateToString(y,C,A):""}getWrappedRangeForLine(x){let y=x,C=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLine=l.DEFAULT_ATTR_DATA=void 0;const d=c(3734),_=c(511),f=c(643),m=c(482);l.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let g=0;class S{constructor(b,v,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const y=v||_.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):x]}set(b,v){this._data[3*b+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,m.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return g=3*b,v.content=this._data[g+0],v.fg=this._data[g+1],v.bg=this._data[g+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,x,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=v|x<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,v,x){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,m.stringFromCodePoint)(v):2097151&y?(this._combined[b]=(0,m.stringFromCodePoint)(2097151&y)+(0,m.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*b+0]=y}insertCells(b,v,x){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,x),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let A=0;A=b&&delete this._extendedAttrs[E]}}return this.length=b,4*x*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,x,y,C){const A=b._data;if(C)for(let j=y-1;j>=0;j--){for(let T=0;T<3;T++)this._data[3*(x+j)+T]=A[3*(v+j)+T];268435456&A[3*(v+j)+2]&&(this._extendedAttrs[x+j]=b._extendedAttrs[v+j])}else for(let j=0;j=v&&(this._combined[T-v+x]=b._combined[T])}}translateToString(b,v,x,y){v=v??0,x=x??this.length,b&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;v>22||1}return y&&y.push(v),C}}l.BufferLine=S},4841:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.getRangeLength=void 0,l.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(o,l)=>{function c(d,_,f){if(_===d.length-1)return d[_].getTrimmedLength();const m=!d[_].hasContent(f-1)&&d[_].getWidth(f-1)===1,g=d[_+1].getWidth(0)===2;return m&&g?f-1:f}Object.defineProperty(l,"__esModule",{value:!0}),l.getWrappedLineTrimmedLength=l.reflowSmallerGetNewLineLengths=l.reflowLargerApplyNewLayout=l.reflowLargerCreateNewLayout=l.reflowLargerGetLinesToRemove=void 0,l.reflowLargerGetLinesToRemove=function(d,_,f,m,g){const S=[];for(let k=0;k=k&&m0&&(T>y||x[T].getTrimmedLength()===0);T--)j++;j>0&&(S.push(k+x.length-j),S.push(j)),k+=x.length-1}return S},l.reflowLargerCreateNewLayout=function(d,_){const f=[];let m=0,g=_[m],S=0;for(let k=0;kc(d,x,_))).reduce(((v,x)=>v+x));let S=0,k=0,b=0;for(;bv&&(S-=v,k++);const x=d[k].getWidth(S-1)===2;x&&S--;const y=x?f-1:f;m.push(y),b+=y}return m},l.getWrappedLineTrimmedLength=c},5295:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferSet=void 0;const d=c(8460),_=c(844),f=c(9092);class m extends _.Disposable{constructor(S,k){super(),this._optionsService=S,this._bufferService=k,this._onBufferActivate=this.register(new d.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,k){this._normal.resize(S,k),this._alt.resize(S,k),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}l.BufferSet=m},511:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CellData=void 0;const d=c(482),_=c(643),f=c(3734);class m extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const k=new m;return k.setFromCharData(S),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(S[_.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(S[_.CHAR_DATA_CHAR_INDEX].length===2){const b=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|S[_.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[_.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=S[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.CellData=m},643:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WHITESPACE_CELL_CODE=l.WHITESPACE_CELL_WIDTH=l.WHITESPACE_CELL_CHAR=l.NULL_CELL_CODE=l.NULL_CELL_WIDTH=l.NULL_CELL_CHAR=l.CHAR_DATA_CODE_INDEX=l.CHAR_DATA_WIDTH_INDEX=l.CHAR_DATA_CHAR_INDEX=l.CHAR_DATA_ATTR_INDEX=l.DEFAULT_EXT=l.DEFAULT_ATTR=l.DEFAULT_COLOR=void 0,l.DEFAULT_COLOR=0,l.DEFAULT_ATTR=256|l.DEFAULT_COLOR<<9,l.DEFAULT_EXT=0,l.CHAR_DATA_ATTR_INDEX=0,l.CHAR_DATA_CHAR_INDEX=1,l.CHAR_DATA_WIDTH_INDEX=2,l.CHAR_DATA_CODE_INDEX=3,l.NULL_CELL_CHAR="",l.NULL_CELL_WIDTH=1,l.NULL_CELL_CODE=0,l.WHITESPACE_CELL_CHAR=" ",l.WHITESPACE_CELL_WIDTH=1,l.WHITESPACE_CELL_CODE=32},4863:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Marker=void 0;const d=c(8460),_=c(844);class f{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}l.Marker=f,f._nextId=1},7116:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DEFAULT_CHARSET=l.CHARSETS=void 0,l.CHARSETS={},l.DEFAULT_CHARSET=l.CHARSETS.B,l.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:"≥","{":"π","|":"≠","}":"£","~":"·"},l.CHARSETS.A={"#":"£"},l.CHARSETS.B=void 0,l.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},l.CHARSETS.C=l.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},l.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},l.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},l.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},l.CHARSETS.E=l.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},l.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},l.CHARSETS.H=l.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(o,l)=>{var c,d,_;Object.defineProperty(l,"__esModule",{value:!0}),l.C1_ESCAPED=l.C1=l.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||(l.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="Ÿ"})(d||(l.C1=d={})),(function(f){f.ST=`${c.ESC}\\`})(_||(l.C1_ESCAPED=_={}))},7399:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.evaluateKeyboardEvent=void 0;const d=c(2584),_={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:["'",'"']};l.evaluateKeyboardEvent=function(f,m,g,S){const k={type:0,cancel:!1,key:void 0},b=(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=m?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:k.key=f.ctrlKey?"\b":d.C0.DEL,f.altKey&&(k.key=d.C0.ESC+k.key);break;case 9:if(f.shiftKey){k.key=d.C0.ESC+"[Z";break}k.key=d.C0.HT,k.cancel=!0;break;case 13:k.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,k.cancel=!0;break;case 27:k.key=d.C0.ESC,f.altKey&&(k.key=d.C0.ESC+d.C0.ESC),k.cancel=!0;break;case 37:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"D",k.key===d.C0.ESC+"[1;3D"&&(k.key=d.C0.ESC+(g?"b":"[1;5D"))):k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"C",k.key===d.C0.ESC+"[1;3C"&&(k.key=d.C0.ESC+(g?"f":"[1;5C"))):k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"A",g||k.key!==d.C0.ESC+"[1;3A"||(k.key=d.C0.ESC+"[1;5A")):k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"B",g||k.key!==d.C0.ESC+"[1;3B"||(k.key=d.C0.ESC+"[1;5B")):k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(k.key=d.C0.ESC+"[2~");break;case 46:k.key=b?d.C0.ESC+"[3;"+(b+1)+"~":d.C0.ESC+"[3~";break;case 36:k.key=b?d.C0.ESC+"[1;"+(b+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:k.key=b?d.C0.ESC+"[1;"+(b+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?k.type=2:f.ctrlKey?k.key=d.C0.ESC+"[5;"+(b+1)+"~":k.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?k.type=3:f.ctrlKey?k.key=d.C0.ESC+"[6;"+(b+1)+"~":k.key=d.C0.ESC+"[6~";break;case 112:k.key=b?d.C0.ESC+"[1;"+(b+1)+"P":d.C0.ESC+"OP";break;case 113:k.key=b?d.C0.ESC+"[1;"+(b+1)+"Q":d.C0.ESC+"OQ";break;case 114:k.key=b?d.C0.ESC+"[1;"+(b+1)+"R":d.C0.ESC+"OR";break;case 115:k.key=b?d.C0.ESC+"[1;"+(b+1)+"S":d.C0.ESC+"OS";break;case 116:k.key=b?d.C0.ESC+"[15;"+(b+1)+"~":d.C0.ESC+"[15~";break;case 117:k.key=b?d.C0.ESC+"[17;"+(b+1)+"~":d.C0.ESC+"[17~";break;case 118:k.key=b?d.C0.ESC+"[18;"+(b+1)+"~":d.C0.ESC+"[18~";break;case 119:k.key=b?d.C0.ESC+"[19;"+(b+1)+"~":d.C0.ESC+"[19~";break;case 120:k.key=b?d.C0.ESC+"[20;"+(b+1)+"~":d.C0.ESC+"[20~";break;case 121:k.key=b?d.C0.ESC+"[21;"+(b+1)+"~":d.C0.ESC+"[21~";break;case 122:k.key=b?d.C0.ESC+"[23;"+(b+1)+"~":d.C0.ESC+"[23~";break;case 123:k.key=b?d.C0.ESC+"[24;"+(b+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(g&&!S||!f.altKey||f.metaKey)!g||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=d.C0.US),f.key==="@"&&(k.key=d.C0.NUL)):f.keyCode===65&&(k.type=1);else{const v=_[f.keyCode],x=v==null?void 0:v[f.shiftKey?1:0];if(x)k.key=d.C0.ESC+x;else if(f.keyCode>=65&&f.keyCode<=90){const y=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(y);f.shiftKey&&(C=C.toUpperCase()),k.key=d.C0.ESC+C}else if(f.keyCode===32)k.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let y=f.code.slice(3,4);f.shiftKey||(y=y.toLowerCase()),k.key=d.C0.ESC+y,k.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?k.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?k.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?k.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?k.key=d.C0.DEL:f.keyCode===219?k.key=d.C0.ESC:f.keyCode===220?k.key=d.C0.FS:f.keyCode===221&&(k.key=d.C0.GS)}return k}},482:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Utf8ToUtf32=l.StringToUtf32=l.utf32ToString=l.stringFromCodePoint=void 0,l.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},l.utf32ToString=function(c,d=0,_=c.length){let f="";for(let m=d;m<_;++m){let g=c[m];g>65535?(g-=65536,f+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):f+=String.fromCharCode(g)}return f},l.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const _=c.length;if(!_)return 0;let f=0,m=0;if(this._interim){const g=c.charCodeAt(m++);56320<=g&&g<=57343?d[f++]=1024*(this._interim-55296)+g-56320+65536:(d[f++]=this._interim,d[f++]=g),this._interim=0}for(let g=m;g<_;++g){const S=c.charCodeAt(g);if(55296<=S&&S<=56319){if(++g>=_)return this._interim=S,f;const k=c.charCodeAt(g);56320<=k&&k<=57343?d[f++]=1024*(S-55296)+k-56320+65536:(d[f++]=S,d[f++]=k)}else S!==65279&&(d[f++]=S)}return f}},l.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const _=c.length;if(!_)return 0;let f,m,g,S,k=0,b=0,v=0;if(this.interim[0]){let C=!1,A=this.interim[0];A&=(224&A)==192?31:(240&A)==224?15:7;let E,j=0;for(;(E=63&this.interim[++j])&&j<4;)A<<=6,A|=E;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=T-j;for(;v=_)return 0;if(E=c[v++],(192&E)!=128){v--,C=!0;break}this.interim[j++]=E,A<<=6,A|=63&E}C||(T===2?A<128?v--:d[k++]=A:T===3?A<2048||A>=55296&&A<=57343||A===65279||(d[k++]=A):A<65536||A>1114111||(d[k++]=A)),this.interim.fill(0)}const x=_-4;let y=v;for(;y<_;){for(;!(!(y=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(b=(31&f)<<6|63&m,b<128){y--;continue}d[k++]=b}else if((240&f)==224){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(b=(15&f)<<12|(63&m)<<6|63&g,b<2048||b>=55296&&b<=57343||b===65279)continue;d[k++]=b}else if((248&f)==240){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=g,k;if(S=c[y++],(192&S)!=128){y--;continue}if(b=(7&f)<<18|(63&m)<<12|(63&g)<<6|63&S,b<65536||b>1114111)continue;d[k++]=b}}return k}}},225:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeV6=void 0;const d=c(1480),_=[[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 m;l.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<_.length;++g)m.fill(0,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:(function(S,k){let b,v=0,x=k.length-1;if(Sk[x][1])return!1;for(;x>=v;)if(b=v+x>>1,S>k[b][1])v=b+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let k=this.wcwidth(g),b=k===0&&S!==0;if(b){const v=d.UnicodeService.extractWidth(S);v===0?b=!1:v>k&&(k=v)}return d.UnicodeService.createPropertyValue(0,k,b)}}},5981:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WriteBuffer=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,S){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){const k=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,S);if(v){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=b.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()}}l.WriteBuffer=f},5941:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.toRgbString=l.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})$/,d=/^[\da-f]+$/;function _(f,m){const g=f.toString(16),S=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}l.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=c.exec(m);if(g){const S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,S=[0,0,0];for(let k=0;k<3;++k){const b=parseInt(m.slice(g*k,g*k+g),16);S[k]=g===1?b<<4:g===2?b:g===3?b>>4:b>>8}return S}},l.toRgbString=function(f,m=16){const[g,S,k]=f;return`rgb:${_(g,m)}/${_(S,m)}/${_(k,m)}`}},5770:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.PAYLOAD_LIMIT=void 0,l.PAYLOAD_LIMIT=1e7},6351:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DcsHandler=l.DcsParser=void 0;const d=c(482),_=c(8742),f=c(5770),m=[];l.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(S,k){this._handlers[S]===void 0&&(this._handlers[S]=[]);const b=this._handlers[S];return b.push(k),{dispose:()=>{const v=b.indexOf(k);v!==-1&&b.splice(v,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(S,k){if(this.reset(),this._ident=S,this._active=this._handlers[S]||m,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(S,k,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(S,k,b);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,k,b))}unhook(S,k=!0){if(this._active.length){let b=!1,v=this._active.length-1,x=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&b===!1){for(;v>=0&&(b=this._active[v].unhook(S),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=m,this._ident=0}};const g=new _.Params;g.addParam(0),l.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,k,b){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,k,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let k=!1;if(this._hitLimit)k=!1;else if(S&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((b=>(this._params=g,this._data="",this._hitLimit=!1,b)));return this._params=g,this._data="",this._hitLimit=!1,k}}},2015:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.EscapeSequenceParser=l.VT500_TRANSITION_TABLE=l.TransitionTable=void 0;const d=c(844),_=c(8742),f=c(6242),m=c(6351);class g{constructor(v){this.table=new Uint8Array(v)}setDefault(v,x){this.table.fill(v<<4|x)}add(v,x,y,C){this.table[x<<8|v]=y<<4|C}addMany(v,x,y,C){for(let A=0;AT)),x=(j,T)=>v.slice(j,T),y=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const A=x(0,14);let E;for(E in b.setDefault(1,0),b.addMany(y,0,2,0),A)b.addMany([24,26,153,154],E,3,0),b.addMany(x(128,144),E,3,0),b.addMany(x(144,152),E,3,0),b.add(156,E,0,0),b.add(27,E,11,1),b.add(157,E,4,8),b.addMany([152,158,159],E,0,7),b.add(155,E,11,3),b.add(144,E,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class k extends d.Disposable{constructor(v=l.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.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 m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,x=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let A=0;AE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=C,y}identToString(v){const x=[];for(;v;)x.push(String.fromCharCode(255&v)),v>>=8;return x.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,x){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(x),{dispose:()=>{const A=C.indexOf(x);A!==-1&&C.splice(A,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,x){this._executeHandlers[v.charCodeAt(0)]=x}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,x){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(x),{dispose:()=>{const A=C.indexOf(x);A!==-1&&C.splice(A,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,x){return this._dcsParser.registerHandler(this._identifier(v),x)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,x){return this._oscParser.registerHandler(v,x)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}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(v,x,y,C,A){this._parseStack.state=v,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=A}parse(v,x,y){let C,A=0,E=0,j=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,j=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&D>-1){for(;D>=0&&(C=T[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&D>-1){for(;D>=0&&(C=T[D](),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 6:if(A=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(A!==24&&A!==26,y),C)return C;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(A=v[this._parseStack.chunkPos],C=this._oscParser.end(A!==24&&A!==26,y),C)return C;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,j=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=j;T>4){case 2:for(let F=T+1;;++F){if(F>=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=0&&(C=D[I](this._params),C!==!0);I--)if(C instanceof Promise)return this._preserveStack(3,D,I,E,T),C;I<0&&this._csiHandlerFb(this._collect<<8|A,this._params),this.precedingJoinState=0;break;case 8:do switch(A){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(A-48)}while(++T47&&A<60);T--;break;case 9:this._collect<<=8,this._collect|=A;break;case 10:const P=this._escHandlers[this._collect<<8|A];let H=P?P.length-1:-1;for(;H>=0&&(C=P[H](),C!==!0);H--)if(C instanceof Promise)return this._preserveStack(4,P,H,E,T),C;H<0&&this._escHandlerFb(this._collect<<8|A),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|A,this._params);break;case 13:for(let F=T+1;;++F)if(F>=x||(A=v[F])===24||A===26||A===27||A>127&&A=x||(A=v[F])<32||A>127&&A{Object.defineProperty(l,"__esModule",{value:!0}),l.OscHandler=l.OscParser=void 0;const d=c(5770),_=c(482),f=[];l.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(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const S=this._handlers[m];return S.push(g),{dispose:()=>{const k=S.indexOf(g);k!==-1&&S.splice(k,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].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 m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,S){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(m,g,S);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(m,g,S))}start(){this.reset(),this._state=1}put(m,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(m,g,S)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,k=this._active.length-1,b=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,S=g,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;k>=0&&(S=this._active[k].end(m),S!==!0);k--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,S;k--}for(;k>=0;k--)if(S=this._active[k].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},l.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,S){this._hitLimit||(this._data+=(0,_.utf32ToString)(m,g,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,g}}},8742:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Params=void 0;const c=2147483647;class d{static fromArray(f){const m=new d;if(!f.length)return m;for(let g=Array.isArray(f[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(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 m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&f.push(Array.prototype.slice.call(this._subParams,g,S))}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 m=this._subParamsIdx[f]>>8,g=255&this._subParamsIdx[f];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const f={};for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&(f[m]=this._subParams.slice(g,S))}return f}addDigit(f){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,S=g[m-1];g[m-1]=~S?Math.min(10*S+f,c):f}}l.Params=d},5741:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.AddonManager=void 0,l.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let _=0;_{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferApiView=void 0;const d=c(3785),_=c(511);l.BufferApiView=class{constructor(f,m){this._buffer=f,this.type=m}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 m=this._buffer.lines.get(f);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new _.CellData}}},3785:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLineApiView=void 0;const d=c(511);l.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,f){if(!(_<0||_>=this._line.length))return f?(this._line.loadCell(_,f),f):this._line.loadCell(_,new d.CellData)}translateToString(_,f,m){return this._line.translateToString(_,f,m)}}},8285:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferNamespaceApi=void 0;const d=c(8771),_=c(8460),f=c(844);class m extends f.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}l.BufferNamespaceApi=m},7975:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ParserApi=void 0,l.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(_=>d(_.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((_,f)=>d(_,f.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeApi=void 0,l.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(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,A=arguments.length,E=A<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(A<3?C(E):A>3?C(v,x,E):C(v,x))||E);return A>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferService=l.MINIMUM_ROWS=l.MINIMUM_COLS=void 0;const f=c(8460),m=c(844),g=c(5295),S=c(2585);l.MINIMUM_COLS=2,l.MINIMUM_ROWS=1;let k=l.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(b){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(b.rawOptions.cols||0,l.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,l.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=x.getBlankLine(b,v),this._cachedBlankLine=y),y.isWrapped=v;const C=x.ybase+x.scrollTop,A=x.ybase+x.scrollBottom;if(x.scrollTop===0){const E=x.lines.isFull;A===x.lines.length-1?E?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(A+1,0,y.clone()),E?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const E=A-C+1;x.lines.shiftElements(C+1,E-1,-1),x.lines.set(A,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(b,v,x){const y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),C!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};l.BufferService=k=d([_(0,S.IOptionsService)],k)},7994:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CharsetService=void 0,l.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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(o,l,c){var d=this&&this.__decorate||function(y,C,A,E){var j,T=arguments.length,D=T<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,A):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,A,E);else for(var I=y.length-1;I>=0;I--)(j=y[I])&&(D=(T<3?j(D):T>3?j(C,A,D):j(C,A))||D);return T>3&&D&&Object.defineProperty(C,A,D),D},_=this&&this.__param||function(y,C){return function(A,E){C(A,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreMouseService=void 0;const f=c(2585),m=c(8460),g=c(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let A=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(A|=64,A|=y.action):(A|=3&y.button,4&y.button&&(A|=64),8&y.button&&(A|=128),y.action===32?A|=32:y.action!==0||C||(A|=3)),A}const b=String.fromCharCode,v={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${b(C[0])}${b(C[1])}${b(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let x=l.CoreMouseService=class extends g.Disposable{constructor(y,C){super(),this._bufferService=y,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const A of Object.keys(S))this.addProtocol(A,S[A]);for(const A of Object.keys(v))this.addEncoding(A,v[A]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,A){if(A){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};l.CoreMouseService=x=d([_(0,f.IBufferService),_(1,f.ICoreService)],x)},6975:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreService=void 0;const f=c(1439),m=c(8460),g=c(844),S=c(2585),k=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=l.CoreService=class extends g.Disposable{constructor(x,y,C){super(),this._bufferService=x,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}reset(){this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}triggerDataEvent(x,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((A=>A.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};l.CoreService=v=d([_(0,S.IBufferService),_(1,S.ILogService),_(2,S.IOptionsService)],v)},9074:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DecorationService=void 0;const d=c(8055),_=c(8460),f=c(844),m=c(6106);let g=0,S=0;class k extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new b(x);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,C){let A=0,E=0;for(const j of this._decorations.getKeyIterator(y))A=j.options.x??0,E=A+(j.options.width??1),x>=A&&x{g=E.options.x??0,S=g+(E.options.width??1),x>=g&&x{Object.defineProperty(l,"__esModule",{value:!0}),l.InstantiationService=l.ServiceCollection=void 0;const d=c(2585),_=c(8343);class f{constructor(...g){this._entries=new Map;for(const[S,k]of g)this.set(S,k)}set(g,S){const k=this._entries.get(g);return this._entries.set(g,S),k}forEach(g){for(const[S,k]of this._entries.entries())g(S,k)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}l.ServiceCollection=f,l.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const S=(0,_.getServiceDependencies)(m).sort(((v,x)=>v.index-x.index)),k=[];for(const v of S){const x=this._services.get(v.id);if(!x)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${v.id}.`);k.push(x)}const b=S.length>0?S[0].index:g.length;if(g.length!==b)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${b+1} conflicts with ${g.length} static arguments`);return new m(...g,...k)}}},7866:function(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,A=arguments.length,E=A<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(A<3?C(E):A>3?C(v,x,E):C(v,x))||E);return A>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.traceCall=l.setTraceLogger=l.LogService=void 0;const f=c(844),m=c(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let S,k=l.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(E))).join(", ")})`);const A=y.apply(this,C);return S.trace(`GlyphRenderer#${y.name} return`,A),A}}},7302:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.OptionsService=l.DEFAULT_OPTIONS=void 0;const d=c(8460),_=c(844),f=c(6114);l.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 m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends _.Disposable{constructor(k){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...l.DEFAULT_OPTIONS};for(const v in k)if(v in b)try{const x=k[v];b[v]=this._sanitizeAndValidateOption(v,x)}catch(x){console.error(x)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,b){return this.onOptionChange((v=>{v===k&&b(this.rawOptions[k])}))}onMultipleOptionChange(k,b){return this.onOptionChange((v=>{k.indexOf(v)!==-1&&b()}))}_setupOptions(){const k=v=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,x)=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);x=this._sanitizeAndValidateOption(v,x),this.rawOptions[v]!==x&&(this.rawOptions[v]=x,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const x={get:k.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,x)}}_sanitizeAndValidateOption(k,b){switch(k){case"cursorStyle":if(b||(b=l.DEFAULT_OPTIONS[k]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${k}`);break;case"wordSeparator":b||(b=l.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=m.includes(b)?b:l.DEFAULT_OPTIONS[k];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${k} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${k} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}l.OptionsService=g},2660:function(o,l,c){var d=this&&this.__decorate||function(g,S,k,b){var v,x=arguments.length,y=x<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,k):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,S,k,b);else for(var C=g.length-1;C>=0;C--)(v=g[C])&&(y=(x<3?v(y):x>3?v(S,k,y):v(S,k))||y);return x>3&&y&&Object.defineProperty(S,k,y),y},_=this&&this.__param||function(g,S){return function(k,b){S(k,b,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkService=void 0;const f=c(2585);let m=l.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const S=this._bufferService.buffer;if(g.id===void 0){const C=S.addMarker(S.ybase+S.y),A={data:g,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(A,C))),this._dataByLinkId.set(A.id,A),A.id}const k=g,b=this._getEntryIdKey(k),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,S.ybase+S.y),v.id;const x=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,S){const k=this._dataByLinkId.get(g);if(k&&k.lines.every((b=>b.line!==S))){const b=this._bufferService.buffer.addMarker(S);k.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(k,b)))}}getLinkData(g){var S;return(S=this._dataByLinkId.get(g))==null?void 0:S.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){const k=g.lines.indexOf(S);k!==-1&&(g.lines.splice(k,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};l.OscLinkService=m=d([_(0,f.IBufferService)],m)},8343:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.createDecorator=l.getServiceDependencies=l.serviceRegistry=void 0;const c="di$target",d="di$dependencies";l.serviceRegistry=new Map,l.getServiceDependencies=function(_){return _[d]||[]},l.createDecorator=function(_){if(l.serviceRegistry.has(_))return l.serviceRegistry.get(_);const f=function(m,g,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,b,v){b[c]===b?b[d].push({id:k,index:v}):(b[d]=[{id:k,index:v}],b[c]=b)})(f,m,S)};return f.toString=()=>_,l.serviceRegistry.set(_,f),f}},2585:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.IDecorationService=l.IUnicodeService=l.IOscLinkService=l.IOptionsService=l.ILogService=l.LogLevelEnum=l.IInstantiationService=l.ICharsetService=l.ICoreService=l.ICoreMouseService=l.IBufferService=void 0;const d=c(8343);var _;l.IBufferService=(0,d.createDecorator)("BufferService"),l.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),l.ICoreService=(0,d.createDecorator)("CoreService"),l.ICharsetService=(0,d.createDecorator)("CharsetService"),l.IInstantiationService=(0,d.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"})(_||(l.LogLevelEnum=_={})),l.ILogService=(0,d.createDecorator)("LogService"),l.IOptionsService=(0,d.createDecorator)("OptionsService"),l.IOscLinkService=(0,d.createDecorator)("OscLinkService"),l.IUnicodeService=(0,d.createDecorator)("UnicodeService"),l.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeService=void 0;const d=c(8460),_=c(225);class f{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,k=!1){return(16777215&g)<<3|(3&S)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const g=new _.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,k=0;const b=g.length;for(let v=0;v=b)return S+this.wcwidth(x);const A=g.charCodeAt(v);56320<=A&&A<=57343?x=1024*(x-55296)+A-56320+65536:S+=this.wcwidth(A)}const y=this.charProperties(x,k);let C=f.extractWidth(y);f.extractShouldJoin(y)&&(C-=f.extractWidth(k)),S+=C,k=y}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}l.UnicodeService=f}},r={};function s(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return t[o].call(c.exports,c,c.exports,s),c.exports}var a={};return(()=>{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const l=s(9042),c=s(3236),d=s(844),_=s(5741),f=s(8285),m=s(7975),g=s(7090),S=["cols","rows"];class k extends d.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],y=(C,A)=>{this._checkReadonlyOptions(C),this._core.options[C]=A};for(const C in this._core.options){const A={get:x.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,A)}}_checkReadonlyOptions(v){if(S.includes(v))throw new Error(`Option "${v}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.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 v=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const x in v)this._publicOptions[x]=v[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,x=!0){this._core.input(v,x)}resize(v,x){this._verifyIntegers(v,x),this._core.resize(v,x)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,x,y){this._verifyIntegers(v,x,y),this._core.select(v,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,x){this._verifyIntegers(v,x),this._core.selectLines(v,x)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,x){this._core.write(v,x)}writeln(v,x){this._core.write(v),this._core.write(`\r +`,x)}paste(v){this._core.paste(v)}refresh(v,x){this._verifyIntegers(v,x),this._core.refresh(v,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return l}_verifyIntegers(...v){for(const x of v)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const x of v)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}o.Terminal=k})(),a})()))})(Iv)),Iv.exports}var iut=sut();function t4(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new iut.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),a=new tut.FitAddon;s.loadAddon(a),t&&s.loadAddon(new rut.WebLinksAddon((c,d)=>{let _;try{_=new URL(d)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const o=()=>{try{a.fit()}catch{}};o();const l=new ResizeObserver(o);return l.observe(e),{terminal:s,dispose(){l.disconnect(),s.dispose()}}}const LT="h-40 overflow-hidden rounded-md bg-terminal p-2";function _m(e){return typeof e=="object"&&e!==null}function OT(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function aut(e){return _m(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||OT(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function out(e){return _m(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&OT(e.partitions)&&(e.error===null||typeof e.error=="string")}function lut(e){return!_m(e)||e.type!=="complete"?null:e.backend==="ssh"&&aut(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&out(e.result)?{backend:"slurm",result:e.result}:null}function cut(e){return _m(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function IT({host:e,backend:n,active:t=!0,onComplete:r,onError:s}){const a=M.useRef(null),o=M.useRef(null),l=M.useRef(r),c=M.useRef(s),[d,_]=M.useState(null);return l.current=r,c.current=s,M.useEffect(()=>{const f=a.current;if(!f)return;const{terminal:m,dispose:g}=t4(f,!1,!0);o.current=m,m.focus();const S=location.protocol==="https:"?"wss:":"ws:",k=new URL("/api/settings/ssh/connect",`${S}//${location.host}`);k.searchParams.set("host",e),k.searchParams.set("backend",n);const b=new WebSocket(k);b.binaryType="arraybuffer";let v=!1,x=!1,y=!1;const C=j=>{x||(x=!0,y||m.writeln(j),m.options.disableStdin=!0,m.blur(),_(j),c.current(j))},A=m.onData(j=>{b.readyState===WebSocket.OPEN&&b.send(new TextEncoder().encode(j))}),E=m.onResize(({cols:j,rows:T})=>{b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"resize",cols:j,rows:T}))});return b.onopen=()=>{b.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}))},b.onmessage=j=>{if(j.data instanceof ArrayBuffer){y=!0,m.write(new Uint8Array(j.data));return}if(typeof j.data!="string")return;let T;try{T=JSON.parse(j.data)}catch{return}const D=lut(T);if(D){v=!0,l.current(D),b.close();return}const I=cut(T);I&&C(I)},b.onerror=()=>C(H7()),b.onclose=()=>{!v&&!x&&C(H7())},()=>{b.onopen=null,b.onmessage=null,b.onerror=null,b.onclose=null,A.dispose(),E.dispose(),b.close(),o.current=null,g()}},[n,e]),M.useEffect(()=>{const f=o.current;f&&(f.options.disableStdin=!t||d!==null,t&&d===null?f.focus():f.blur())},[t,d]),h.jsxs("div",{className:"mt-3",children:[h.jsx("div",{className:LT,role:"group","aria-label":OE({host:Ae(e)}),children:h.jsx("div",{ref:a,className:"h-full overflow-hidden"})}),d?h.jsx("p",{role:"alert",className:"sr-only",children:d}):null]})}function uut({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:a}=t4(r,!0,!0);return s.write(n),a},[n]),h.jsx("div",{className:`mt-3 ${LT}`,role:"group","aria-label":OE({host:Ae(e)}),children:h.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}const Aa=["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(" "),ed=["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(" "),jc=["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(" "),n4="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",hs=["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(" "),jh=["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(" "),go=["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(" "),w2=["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(" "),O0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),vu=["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(" ");function Bv(e){return e.agentReady?{cls:"ok",variant:"success",label:TE()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:Cze()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:uLe()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:gLe()}:{cls:"warn",variant:"warning",label:Lje()}:{cls:"warn",variant:"warning",label:pje()}}function dut({h:e}){return e.authMethod?h.jsx(h.Fragment,{children:e.authMethod==="oauth"?PCe():_E()}):h.jsx(h.Fragment,{children:"—"})}function fut(){const[e,n]=M.useState(null),[t,r]=M.useState("claude-code"),[s,a]=M.useState(!1),o=(c,d=!1)=>{a(!0),ep(c,d).then(n).catch(()=>{}).finally(()=>a(!1))};M.useEffect(()=>o(!1),[]),M.useEffect(()=>Dx(()=>o(!0)),[]);const l=e==null?void 0:e.find(c=>c.id===t);return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:ZNe()}),h.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(e??[]).map(c=>h.jsxs("button",{className:c.id===t?"active":"",onClick:()=>r(c.id),children:[c.name,h.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${Bv(c).cls}`})]},c.id))}),e?l?h.jsxs("div",{className:Aa,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx(Dt,{variant:Bv(l).variant,children:Bv(l).label}),h.jsx("div",{className:"spacer flex-1"}),h.jsxs(Qe,{size:"small",onClick:()=>o(!0,!0),disabled:s,children:[h.jsx(ld,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]})]}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:M9e()}),h.jsx("span",{className:"v",children:l.binPath??CCe()}),h.jsx("span",{className:"k",children:DE()}),h.jsx("span",{className:"v",children:l.version??"—"}),h.jsx("span",{className:"k",children:h9e()}),h.jsx("span",{className:"v",children:h.jsx(dut,{h:l})}),l.account&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:l.id==="opencode"?eOe():hx()}),h.jsx("span",{className:"v",children:l.account})]}),l.org&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:rMe()}),h.jsx("span",{className:"v",children:l.org})]}),l.plan&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:$Me()}),h.jsx("span",{className:"v",children:l.plan})]}),h.jsx("span",{className:"k",children:a9e()}),h.jsx("span",{className:"v",children:l.models.length>0?P8e({count:Vt(l.models.length),models:new Intl.ListFormat(N()).format(l.models.slice(0,4).map(c=>Ae(Z0(c))))}):fx()})]}),l.agentNote&&h.jsx("p",{className:hs,children:Th(l.agentNote)})]}):null:h.jsxs(vr,{children:[h.jsx(dn,{})," ",vNe()]})]})}function hut({s:e}){if(!e.configured)return h.jsx(Dt,{children:Mp()});const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?h.jsx(Dt,{variant:"success",children:px()}):h.jsx(Dt,{variant:"error",children:LTe()}):h.jsx(Dt,{variant:"error",children:bEe()}):h.jsx(Dt,{variant:"error",children:aAe()})}function _ut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(!1),[_,f]=M.useState(null),m=k=>{n(k),a(k.context??""),l(k.namespace)};M.useEffect(()=>{WYe().then(m).catch(k=>r(k instanceof Error?k.message:String(k)))},[]);const g=e!==null&&s===(e.context??"")&&o.trim()===e.namespace;async function S(k){if(k.preventDefault(),!c){d(!0),f(null);try{m(await KYe({context:s,namespace:o.trim()}))}catch(b){f(b instanceof Error?b.message:String(b))}finally{d(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:lEe()}),h.jsx("span",{className:"v",children:h.jsx(hut,{s:e})})]}),e.preflight.error&&h.jsx("p",{className:n4,children:e.preflight.error}),h.jsxs("form",{className:jh,onSubmit:S,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[REe(),h.jsx(Yf,{choices:[{id:"",label:e.currentContext?t8e({context:Ae(e.currentContext)}):Zke()},...s&&!e.contexts.includes(s)?[{id:s,label:ACe({context:Ae(s)})}]:[],...e.contexts.map(k=>({id:k,label:k}))],value:s,variant:"field",dropDown:!0,disabled:c,onSelect:a})]}),h.jsxs("label",{children:[oTe(),h.jsx("input",{type:"text",value:o,onChange:k=>l(k.target.value),placeholder:rNe(),autoComplete:"off",spellCheck:!1})]})]}),_&&h.jsx("div",{className:"error",children:_}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:c||g,children:c?ja():kc()})})]}),h.jsxs("section",{className:"mt-7",children:[h.jsx("h3",{className:"mt-0 mx-0 mb-1.5 text-base font-semibold text-text",children:jRe()}),h.jsx("p",{className:"m-0 font-sans text-sm leading-relaxed text-text",children:g8e({placeholder:Ae("{{ORX_RUN}}"),command:Ae("--manifest ")})})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Z9e()]})})}const put={env:C8e,syncedEnv:I8e,modalToml:A8e};function mut({s:e}){return e.ready?h.jsx(Dt,{variant:"success",children:px()}):!e.tokenConfigured&&!e.modalImportable?h.jsx(Dt,{children:jje()}):e.modalImportable?e.tokenConfigured?h.jsx(Dt,{children:ME()}):h.jsx(Dt,{variant:"error",children:tje()}):h.jsx(Dt,{variant:"error",children:e.envProvisioned?PSe():GSe()})}function gut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1),[o,l]=M.useState(null);M.useEffect(()=>{YYe().then(n).catch(d=>r(d instanceof Error?d.message:String(d)))},[]);async function c(){if(!s){a(!0),l(null);try{n(await XYe())}catch(d){l(d instanceof Error?d.message:String(d))}finally{a(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:Dp()}),h.jsx("span",{className:"v",children:h.jsx(mut,{s:e})}),h.jsx("span",{className:"k",children:mx()}),h.jsx("span",{className:"v",children:e.modalImportable?vx():e.envProvisioned?y8e():vCe()}),h.jsx("span",{className:"k",children:jE()}),h.jsx("span",{className:"v",children:e.tokenSource?put[e.tokenSource]():Mp()})]}),!e.tokenConfigured&&h.jsx("p",{className:hs,children:R8e({command:Ae("modal token new"),id:Ae("MODAL_TOKEN_ID"),secret:Ae("MODAL_TOKEN_SECRET")})}),e.error&&e.envProvisioned&&!e.modalImportable&&h.jsx("p",{className:hs,children:e.error}),o&&h.jsx("div",{className:"error",children:o}),!e.modalImportable&&h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsx(Qe,{variant:"primary",onClick:()=>void c(),disabled:s,children:s?iIe():tIe()})})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",tEe()]})})}const BT="rounded-sm border-border-strong bg-surface text-subtext",$T="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",vut=5e3;function HT(e){const[n,t]=M.useState({}),r=e.join("\0");return M.useEffect(()=>{const a=r?r.split("\0"):[];if(a.length===0){t({});return}let o=!1;const l=async()=>{const d=await Promise.all(a.map(async _=>{try{return[_,(await rXe(_)).running]}catch{return null}}));o||t(_=>{const f={};for(const m of d)m&&(f[m[0]]=m[1]);for(const m of a)f[m]===void 0&&_[m]!==void 0&&(f[m]=_[m]);return f})};l();const c=window.setInterval(l,vut);return()=>{o=!0,window.clearInterval(c)}},[r]),[n,a=>t(o=>({...o,[a]:!0}))]}function but({test:e,connecting:n,masterRunning:t}){if(n)return h.jsx("span",{role:"status",children:h.jsx(Dt,{className:$T,children:yE()})});if(e===void 0)return h.jsx(Dt,{className:BT,children:zE()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,a=e.reachable?e.toolsFound?s?h.jsx(Dt,{className:"rounded-sm",variant:"warning",children:SE()}):h.jsx(Dt,{className:"rounded-sm",variant:"success",children:vx()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:r.length===1?G8e({tool:Ae(r[0])}):Y8e()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:gx()});return h.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!s&&h.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Na(e.testedAt)})]})}function xut(){const[e,n]=M.useState(null),[t,r]=M.useState({}),[s,a]=M.useState({}),[o,l]=M.useState(null),[c,d]=M.useState(!1),[_,f]=M.useState(0),m=(e==null?void 0:e.filter(x=>{const y=t[x.host]??x.lastTest;return(y==null?void 0:y.reachable)&&y.toolsFound}).map(x=>x.host))??[],[g,S]=HT(m);M.useEffect(()=>{nXe().then(n).catch(()=>n([]))},[]);function k(x){d(!1),f(y=>y+1),l(x),a(y=>({...y,[x]:!0}))}function b(){d(!1),l(null)}function v(x,y){a(C=>({...C,[x]:!y}))}return h.jsx(h.Fragment,{children:e===null?h.jsxs(vr,{children:[h.jsx(dn,{})," ",tRe()]}):e.length===0?h.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:jTe()}):h.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:e.map(x=>{const y=t[x.host]??x.lastTest,C=o===x.host,A=s[x.host]??!1,E=C||(y==null?void 0:y.reachable)===!1,j=`${x.user?`${x.user}@`:""}${x.hostname??x.host}${x.port?`:${x.port}`:""}`;return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[E?h.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":A,"aria-label":A?yO({name:Ae(x.host)}):UO({name:Ae(x.host)}),onClick:T=>{T.stopPropagation(),v(x.host,A)},children:h.jsx(ta,{size:15,className:`text-muted transition-transform duration-120 ease-standard${A?" rotate-180":""}`})}):h.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-base font-medium text-text",title:x.host,children:x.host}),h.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:j,children:j})]})]}),h.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[h.jsx("div",{className:"text-start",children:h.jsx(but,{test:y,connecting:C&&!c,masterRunning:g[x.host]})}),h.jsx(Qe,{size:"small",type:"button",className:"justify-self-end",onClick:T=>{T.stopPropagation(),C&&!c?b():k(x.host)},disabled:!C&&o!==null&&!c,children:C?c?Gu():_x():(y==null?void 0:y.reachable)===!1?Gu():y?LE():dx()})]})]}),E&&(A||C)&&h.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${A?"":" hidden"}`,children:[!C&&(y==null?void 0:y.error)&&h.jsx(uut,{host:x.host,transcript:y.error}),C&&h.jsx(IT,{host:x.host,backend:"ssh",active:A,onComplete:T=>{T.backend==="ssh"&&(r(D=>({...D,[x.host]:T.result})),S(x.host),d(!1),l(null))},onError:T=>{d(!0),r(D=>({...D,[x.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:T,testedAt:Date.now()}}))}},_)]})]},x.host)})})})}function yut({test:e,connecting:n,masterRunning:t}){return n?h.jsx(Dt,{className:$T,children:yE()}):e===null?h.jsx(Dt,{className:BT,children:zE()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?h.jsx(Dt,{className:"rounded-sm",variant:"warning",children:SE()}):h.jsx(Dt,{className:"rounded-sm",variant:"success",children:vx()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:GAe()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:ZTe()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:gx()})}function wut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(""),[_,f]=M.useState(""),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,A]=M.useState(!1),[E,j]=M.useState(0),T=s&&(b!=null&&b.reachable)&&b.slurmFound&&b.toolsFound?[s]:[],[D,I]=HT(T);function P(){A(!1),j(X=>X+1),y(!0)}const H=X=>{n(X),a(X.host??""),l(X.partition??""),d(X.account??""),f(X.timeLimit??"")};M.useEffect(()=>{sXe().then(H).catch(X=>r(X instanceof Error?X.message:String(X)))},[]);const F=e!==null&&s===(e.host??"")&&o.trim()===(e.partition??"")&&c.trim()===(e.account??"")&&_.trim()===(e.timeLimit??"");async function V(X){if(X.preventDefault(),!m){g(!0),k(null);try{H(await iXe({host:s,partition:o.trim(),account:c.trim(),timeLimit:_.trim()}))}catch(W){k(W instanceof Error?W.message:String(W))}finally{g(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[!x&&(b==null?void 0:b.error)&&h.jsx("p",{className:n4,children:b.error}),b&&b.partitions.length>0&&h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:jMe()}),h.jsx("span",{className:"v",children:b.partitions.join(", ")})]}),h.jsxs("form",{className:jh,onSubmit:V,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[IAe(),h.jsx(Yf,{choices:[{id:"",label:Nje()},...s&&!e.hosts.some(X=>X.host===s)?[{id:s,label:`${s} (not in ~/.ssh/config)`}]:[],...e.hosts.map(X=>({id:X.host,label:X.host}))],value:s,variant:"field",dropDown:!0,disabled:m||x,onSelect:X=>{a(X),v(null),y(!1),A(!1)}})]}),h.jsxs("label",{children:[NMe(),h.jsx("input",{type:"text",list:"slurm-partitions",value:o,onChange:X=>l(X.target.value),placeholder:D7(),autoComplete:"off",spellCheck:!1}),h.jsx("datalist",{id:"slurm-partitions",children:b==null?void 0:b.partitions.map(X=>h.jsx("option",{value:X},X))})]})]}),h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[hx(),h.jsx("input",{type:"text",value:c,onChange:X=>d(X.target.value),placeholder:D7(),autoComplete:"off",spellCheck:!1})]}),h.jsxs("label",{children:[rLe(),h.jsx("input",{type:"text",value:_,onChange:X=>f(X.target.value),placeholder:pEe(),autoComplete:"off",spellCheck:!1})]})]}),S&&h.jsx("div",{className:"error",children:S}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:m||F||x,children:m?ja():kc()}),h.jsx(Qe,{type:"button",onClick:()=>{x&&!C?(A(!1),y(!1)):P()},disabled:!s,title:s?void 0:XLe(),children:x?C?Gu():_x():b?LE():dx()}),h.jsx("span",{role:"status",children:h.jsx(yut,{test:b,connecting:x&&!C,masterRunning:D[s]})})]})]}),x&&h.jsx(IT,{host:s,backend:"slurm",onComplete:X=>{X.backend==="slurm"&&(v(X.result),I(s),A(!1),y(!1))},onError:X=>{A(!0),v({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:X})}},E)]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",yAe()]})})}function Sut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState(null),m=_!==null&&_!=="testing"?_:null,g=v=>{n(v),a(v.address??"")};M.useEffect(()=>{aXe().then(g).catch(v=>r(v instanceof Error?v.message:String(v)))},[]);const S=e!==null&&s===(e.address??"");async function k(v){if(v.preventDefault(),!o){l(!0),d(null);try{g(await oXe({address:s}))}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(!1)}}}async function b(){f("testing");try{f(await lXe(s.trim()||void 0))}catch(v){f({reachable:!1,address:s.trim()||"(unknown)",rayVersion:null,error:v instanceof Error?v.message:String(v)})}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:ENe()}),h.jsx("span",{className:"v",children:e.resolvedAddress}),h.jsx("span",{className:"k",children:bx()}),h.jsx("span",{className:"v",children:e.source}),(m==null?void 0:m.reachable)&&m.rayVersion&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:WMe()}),h.jsx("span",{className:"v",children:m.rayVersion})]})]}),(m==null?void 0:m.error)&&h.jsx("p",{className:n4,children:m.error}),h.jsxs("form",{className:jh,onSubmit:k,children:[h.jsxs("label",{children:[Kze(),h.jsx("input",{type:"text",value:s,onChange:v=>{a(v.target.value),f(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:o||S,children:o?ja():kc()}),h.jsx(Qe,{type:"button",onClick:()=>void b(),disabled:_==="testing",children:RDe()}),h.jsx(kut,{test:_})]})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",gAe()]})})}function kut({test:e}){return e===null?null:e==="testing"?h.jsx(Dt,{children:IDe()}):e.reachable?h.jsx(Dt,{variant:"success",children:ZMe()}):h.jsx(Dt,{variant:"error",children:gx()})}function Cut(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{dXe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:cze()}),h.jsx("span",{className:"v",children:e.hostname}),h.jsx("span",{className:"k",children:ADe()}),h.jsxs("span",{className:"v",children:[e.os,"/",e.arch,e.chip?` — ${e.chip}`:""]}),h.jsx("span",{className:"k",children:"CPU"}),h.jsx("span",{className:"v",children:e.cpuCount>0?`${e.cpuCount} cores`:"—"}),h.jsx("span",{className:"k",children:"RAM"}),h.jsx("span",{className:"v",children:e.memBytes!==null?Sa(e.memBytes):"—"}),h.jsx("span",{className:"k",children:"GPUs"}),h.jsx("span",{className:"v",children:e.gpus.length===0?"none detected (nvidia-smi)":e.gpus.map(s=>`${s.name}${s.memMib!==null?` — ${Sa(s.memMib*1024*1024)}`:""}`).join(", ")})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",_Ne()]})})}function Eut(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{fXe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?e.loggedIn?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:Dp()}),h.jsx("span",{className:"v",children:h.jsx(Dt,{variant:"success",children:TE()})}),h.jsx("span",{className:"k",children:oMe()}),h.jsx("span",{className:"v",children:e.orgs.length>0?e.orgs.join(", "):"—"}),h.jsx("span",{className:"k",children:nDe()}),h.jsx("span",{className:"v",children:e.sshKeyStatus==="matched"?h.jsx(Dt,{variant:"success",children:$je()}):e.sshKeyStatus==="no_local_match"?h.jsx(Dt,{variant:"warning",children:Sje()}):e.sshKeyStatus==="none_registered"?h.jsx(Dt,{variant:"error",children:ije()}):h.jsx(Dt,{children:ME()})})]}),e.sshKeyStatus==="none_registered"&&(e.sshKeyPath?h.jsxs("p",{dir:"auto",className:hs,children:[QCe()," ",h.jsxs("code",{children:["orx ssh-key add ",e.sshKeyPath]}),"."]}):h.jsxs("p",{dir:"auto",className:hs,children:[WTe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),PDe()," ",h.jsx("code",{children:"orx ssh-key add"}),"."]})),e.sshKeyStatus==="no_local_match"&&(e.sshKeyPath?h.jsx("p",{dir:"auto",className:hs,children:oOe({register:Ae(`orx ssh-key add ${e.sshKeyPath}`),load:Ae("ssh-add")})}):h.jsxs("p",{dir:"auto",className:hs,children:[UTe()," ",h.jsx("code",{children:"ssh-add"}),Jje()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),e.error&&h.jsx("p",{dir:"auto",className:hs,children:e.error})]}):h.jsx("p",{className:hs,children:c8e({command:Ae("orx login")})}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",W9e()]})})}const pp={local:aE,tinker:wae,hf:Gie,modal:nae,k8s:Yie,ssh:vae,slurm:_ae,ray:uae,openresearch:aae},Nut={local:gie,ssh:Iie,tinker:Pie,hf:cie,modal:yie,k8s:hie,slurm:Rie,ray:Aie,openresearch:Cie},r4={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"},zut={local:Dae,ssh:eoe,tinker:soe,hf:Eae,modal:Bae,k8s:Tae,slurm:Xae,ray:Vae,openresearch:Fae};function Aut(e){switch(e.id){case"local":return Lse();case"ssh":return tie({summary:Ae(e.summary)});case"tinker":return iie({summary:Ae(e.summary)});case"hf":return Nse({summary:Ae(e.summary)});case"modal":return $se({summary:Ae(e.summary)});case"k8s":return jse({summary:Ae(e.summary)});case"slurm":return Zse({summary:Ae(e.summary)});case"ray":return Wse({summary:Ae(e.summary)});case"openresearch":return Use({summary:Ae(e.summary)})}}function Tut({target:e}){return h.jsxs("dl",{className:"m-0 mt-8 grid grid-cols-[9rem_minmax(0,1fr)] gap-x-5 gap-y-4 font-sans",children:[h.jsx("dt",{className:"text-sm font-medium text-subtext",children:hze()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Aut(e)}),h.jsx("dt",{className:"text-sm font-medium text-subtext",children:BLe()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:zut[e.id]()})]})}const g8=["hf","modal","slurm","ray","openresearch"],$v=["hf","modal","openresearch"],PT={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"]},v8="__custom__";function _f(e,n){return!!(n&&!(PT[e]??[]).includes(n))}function jut({settings:e,projectId:n,onSaved:t}){const r=e.configuredDefaultBackend??e.defaultBackend??"local",s=e.defaultFlavor??"",[a,o]=M.useState(r),[l,c]=M.useState(s),[d,_]=M.useState(_f(r,s)),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=e.targets.find(I=>I.id===a),b=e.targets.filter(I=>I.configured||I.id===r),v=g8.includes(a),x=$v.includes(a),y=PT[a]??[],C=a===r&&(!v||l.trim()===s),A=pp[a](),E=f?XIe():x&&!l.trim()?Q7e({destination:A}):a==="ssh"?rCe():J8e({destination:A});M.useEffect(()=>{o(r),c(s),_(_f(r,s))},[r,s]);async function j(I,P){const H=g8.includes(I);if(!(f||$v.includes(I)&&!P.trim())){m(!0),S(null);try{t(await uXe({backend:I,flavor:H&&P.trim()||null,projectId:n}))}catch(F){S(F instanceof Error?F.message:String(F)),o(r),c(s),_(_f(r,s))}finally{m(!1)}}}function T(I){const P=e.targets.find(F=>F.id===I);if(!P)return;o(P.id);const H=P.id===r?s:"";c(H),_(_f(P.id,H)),$v.includes(P.id)||j(P.id,H)}function D(I){if(I===v8){_(!0);return}_(!1),c(I),(!x||I)&&j(a,I)}return h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:uNe()}),h.jsxs("div",{children:[h.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:I=>{I.preventDefault(),C||j(a,l)},children:[h.jsx(Yf,{choices:b.map(I=>({id:I.id,label:pp[I.id]()})),value:a,variant:"field",dropDown:!0,disabled:f,renderIcon:I=>{const P=e.targets.find(H=>H.id===I.id);return P?h.jsx(hm,{kind:r4[P.id],size:16}):null},onSelect:T}),v&&h.jsx("div",{children:d?h.jsxs("div",{className:"relative",children:[h.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:l,onChange:I=>c(I.target.value),onBlur:()=>{if(x&&!l.trim()){a===r&&(c(s),_(_f(r,s)));return}C||j(a,l)},placeholder:GEe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:f}),h.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":R7(),title:R7(),onMouseDown:I=>I.preventDefault(),onClick:()=>_(!1),children:h.jsx(ta,{size:12})})]}):h.jsx(Yf,{choices:[{id:"",label:x?K7e():dCe()},...l&&!y.includes(l)?[{id:l,label:jSe({value:Ae(l)})}]:[],...y.map(I=>({id:I,label:I})),{id:v8,label:YEe()}],value:l,variant:"field",dropDown:!0,disabled:f,onSelect:D})})]}),g&&h.jsx("div",{className:"error mt-2.5",children:g}),k&&!k.configured&&h.jsx("p",{className:hs,children:YDe()})]}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:E})]})}function Mut({target:e,isDefault:n,onOpen:t}){const r=e.unverified?H7e():e.id==="openresearch"?cIe():e.id==="ray"?dx():ZOe();return h.jsxs("button",{type:"button",className:"group flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans transition-colors duration-120 ease-standard hover:border-text hover:bg-surface disabled:cursor-default disabled:opacity-52",onClick:t,disabled:!e.enabled,children:[h.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:h.jsx(hm,{kind:r4[e.id],size:48})}),h.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:pp[e.id]()}),h.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:Nut[e.id]()}),h.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[h.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?NE():e.configured?lBe():r}),h.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:h.jsx(A0,{size:16})})]})]})}function Rut({target:e,isDefault:n,onBack:t}){return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back mb-10 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[h.jsx(Bf,{size:16})," ",CE()]}),h.jsxs("div",{className:"flex items-center justify-between gap-6",children:[h.jsxs("div",{className:`flex min-w-0 items-center ${e.id==="tinker"?"gap-8":"gap-5"}`,children:[h.jsx("span",{className:"flex h-20 w-24 flex-none items-center justify-start",children:h.jsx(hm,{kind:r4[e.id],size:72})}),h.jsx("h1",{className:"m-0 min-w-0",children:pp[e.id]()})]}),n&&h.jsx(Dt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:NE()})]}),h.jsx(Tut,{target:e}),e.id!=="tinker"&&h.jsxs("div",{className:"mt-8 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==="local"&&h.jsx(Cut,{}),e.id==="hf"&&h.jsx(But,{}),e.id==="modal"&&h.jsx(gut,{}),e.id==="k8s"&&h.jsx(_ut,{}),e.id==="ssh"&&h.jsx(xut,{}),e.id==="slurm"&&h.jsx(wut,{}),e.id==="ray"&&h.jsx(Sut,{}),e.id==="openresearch"&&h.jsx(Eut,{})]})]})}function Dut({project:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useRef(0);M.useEffect(()=>{_.current++,r(null),l(null),a(null),d(null)},[e==null?void 0:e.id]),M.useEffect(()=>{const y=++_.current;cXe(e==null?void 0:e.id).then(C=>{y===_.current&&(r(C),a(null))}).catch(C=>{if(y!==_.current)return;const A=C instanceof Error?C.message:String(C);r(E=>(E===null?a(A):d(A),E))})},[o,e==null?void 0:e.id]);const f=y=>{_.current++,r(y),d(null)},m=t?t.targets:null,g=(t==null?void 0:t.configuredDefaultBackend)??(t==null?void 0:t.defaultBackend),S=m?[...m].sort((y,C)=>+(C.id===g)-+(y.id===g)):null,k=(S==null?void 0:S.filter(y=>y.configured))??[],b=(S==null?void 0:S.filter(y=>!y.configured))??[],v=y=>h.jsx(Mut,{target:y,isDefault:g===y.id,onOpen:()=>l(y.id)},`${(e==null?void 0:e.id)??"none"}:${y.id}`),x=o?t==null?void 0:t.targets.find(y=>y.id===o):null;return x?h.jsx(Rut,{target:x,isDefault:g===x.id,onBack:()=>l(null)}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:EE()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:EEe()}),h.jsx(tdt,{projectId:e==null?void 0:e.id,onViewHistory:n}),s?h.jsx("div",{className:"error",children:s}):t?h.jsxs(h.Fragment,{children:[c&&h.jsx("div",{className:"error",children:c}),h.jsx(jut,{settings:t,projectId:e==null?void 0:e.id,onSaved:f}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:fRe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:k.map(v)})]}),b.length>0&&h.jsxs("section",{className:"mb-3.5",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:YAe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map(v)})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",U9e()]})]})}const Lut={env:bke,openresearchEnv:Ske,hfCache:pke};function Out({settings:e}){return e.configured?e.valid?h.jsx(Dt,{variant:"success",children:px()}):h.jsx(Dt,{variant:"error",children:Hze()}):h.jsx(Dt,{children:Mp()})}function Iut({settings:e}){return!e.configured||!e.valid?null:e.jobsWrite===!0?h.jsx(Dt,{variant:"success",children:nAe()}):e.jobsWrite===!1?h.jsx(Dt,{variant:"error",children:$Te()}):h.jsx(Dt,{children:Qze()})}function But(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),_=M.useRef(!1);M.useEffect(()=>{PYe().then(m=>{_.current||n(m)}).catch(m=>{_.current||r(m instanceof Error?m.message:String(m))})},[]);async function f(m){if(m.preventDefault(),!(!s.trim()||o)){l(!0),d(null);try{const g=await FYe(s.trim());_.current=!0,n(g),r(null),a("")}catch(g){d(g instanceof Error?g.message:String(g))}finally{l(!1)}}}return h.jsxs(h.Fragment,{children:[t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:Dp()}),h.jsx("span",{className:"v",children:h.jsx(Out,{settings:e})}),h.jsx("span",{className:"k",children:hx()}),h.jsx("span",{className:"v",children:e.username??"—"}),h.jsx("span",{className:"k",children:jE()}),h.jsx("span",{className:"v",children:e.maskedToken??"—"}),h.jsx("span",{className:"k",children:bx()}),h.jsx("span",{className:"v",children:e.source?Lut[e.source]():Mp()}),h.jsx("span",{className:"k",children:qze()}),h.jsxs("span",{className:"v",children:[h.jsx(Iut,{settings:e}),(!e.configured||!e.valid)&&"—"]})]}),e.source==="env"&&h.jsx("p",{className:hs,children:ize()}),e.valid&&e.jobsWrite===null&&h.jsx("p",{className:hs,children:Nke({login:Ae("hf auth login"),url:Ae("huggingface.co/settings/tokens")})})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",CAe()]}),h.jsxs("form",{className:jh,onSubmit:f,children:[h.jsxs("label",{children:[e!=null&&e.configured?jOe():oCe(),h.jsx("input",{type:"password",value:s,onChange:m=>a(m.target.value),placeholder:tze(),autoComplete:"off"})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:!s.trim()||o,children:o?sBe():kc()})})]})]})}const FT=/^hf_[A-Za-z0-9]{10,}$/;function UT(){return h.jsx("tr",{children:h.jsx("td",{colSpan:3,children:h.jsxs("p",{dir:"auto",className:hs,children:[JDe()," ",h.jsx("code",{children:"HF_TOKEN"}),URe()]})})})}const b8=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function S2(e,n){const t=n instanceof Error?n.message:String(n);WN(t.includes(e)?t:`${e}: ${t}`,"error")}function $ut({name:e,entry:n,onVars:t}){const[r,s]=M.useState(""),[a,o]=M.useState(!1);async function l(){if(!(!r.trim()||a)){o(!0);try{t(await dN(e,r.trim())),s("")}catch(d){S2(e,d)}finally{o(!1)}}}async function c(){if(!a){o(!0);try{t(await QYe(e))}catch(d){S2(e,d)}finally{o(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{className:"font-mono text-sm",children:e}),h.jsx("td",{className:"text-base text-subtext",children:n?h.jsxs(h.Fragment,{children:[n.maskedValue,n.inProcessEnv&&h.jsx(Dt,{children:SMe()})]}):h.jsx(Ob,{variant:"inline",className:"text-base",type:"password",value:r,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),l()),d.key==="Escape"&&!a&&s("")},placeholder:RE(),"aria-label":yB({name:Ae(e)}),autoComplete:"new-password",disabled:a})}),h.jsx("td",{children:n?h.jsx(Jt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:bb({name:Ae(e)}),"aria-label":bb({name:Ae(e)}),onClick:()=>void c(),disabled:a,children:h.jsx(cd,{size:13})}):r.trim()&&h.jsx(Qe,{size:"small",onClick:()=>void l(),disabled:a,children:a?ja():kc()})})]}),!n&&e!=="HF_TOKEN"&&FT.test(r.trim())&&h.jsx(UT,{})]})}function Hut({onVars:e,onDone:n}){const[t,r]=M.useState(""),[s,a]=M.useState(""),[o,l]=M.useState(!1);async function c(){if(!(!t.trim()||!s.trim()||o)){l(!0);try{e(await dN(t.trim(),s.trim())),n()}catch(_){S2(t.trim(),_)}finally{l(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),c()),_.key==="Escape"&&!o&&n()};return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(Ob,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:t,onChange:_=>r(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":bTe(),autoComplete:"off",spellCheck:!1,disabled:o})}),h.jsx("td",{children:h.jsx(Ob,{variant:"inline",className:"text-base",type:"password",value:s,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:RE(),"aria-label":STe(),autoComplete:"new-password",disabled:o})}),h.jsxs("td",{children:[h.jsx(Qe,{size:"small",onClick:()=>void c(),disabled:o||!t.trim()||!s.trim(),children:o?ja():kc()}),h.jsx(Jt,{title:_x(),"aria-label":$9e(),onClick:n,disabled:o,children:h.jsx(_s,{size:13})})]})]}),t.trim()!=="HF_TOKEN"&&FT.test(s.trim())&&h.jsx(UT,{})]})}function Put(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1);M.useEffect(()=>{ZYe().then(n).catch(c=>r(c instanceof Error?c.message:String(c)))},[]);const o=e===null?[]:e.map(c=>c.key).filter(c=>!b8.includes(c)),l=[...b8,...o];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:jLe()}),h.jsxs(Qe,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:s||e===null,children:[h.jsx(Ex,{size:12})," ",n9e()]})]}),h.jsx("div",{className:Aa,children:t?h.jsx("div",{className:"error",children:t}):e===null?h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]}):h.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:h.jsxs("tbody",{children:[l.map(c=>h.jsx($ut,{name:c,entry:e.find(d=>d.key===c),onVars:n},c)),s&&h.jsx(Hut,{onVars:n,onDone:()=>a(!1)})]})})})]})}const pf=[{value:"system",label:DIe,icon:CKe},{value:"light",label:TIe,icon:XKe},{value:"dark",label:SIe,icon:NKe}],Fut=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function Uut(){const e=Cc(),[n,t]=VN(),r=s=>{var _;const a=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!a)return;s.preventDefault();const o=[...s.currentTarget.querySelectorAll('[role="radio"]')],l=o.findIndex(f=>f===document.activeElement),d=((l===-1?pf.findIndex(f=>f.value===n):l)+a+pf.length)%pf.length;t(pf[d].value),(_=o[d])==null||_.focus()};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:x7e()}),h.jsxs("div",{className:`${Aa} mt-3`,children:[h.jsxs("div",{className:`${go} pb-3.5`,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:P7()}),h.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":P7(),onKeyDown:r,children:pf.map(({value:s,label:a,icon:o})=>h.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:[h.jsx(o,{size:14}),a()]},s))})]}),h.jsxs("div",{className:go,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:i8e()}),h.jsx("div",{className:"w-52 flex-none",children:h.jsx(Yf,{choices:Fut,value:e,variant:"field",dropDown:!0,onSelect:s=>{VL(s)&&XVe(s)}})})]})]})]})}const qut={installer:ZGe,"app-bundle":$Ge,cargo:UGe,homebrew:WGe,nix:tVe,unknown:iVe},Hv={cargo:cVe,homebrew:hVe,nix:gVe};function Gut(){var c;const{status:e,error:n,apply:t}=TT(),[r,s]=M.useState(null),[a,o]=M.useState(null);if(!e)return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:$7()}),n?h.jsx("div",{className:Aa,children:h.jsx("div",{className:"error",children:n})}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]});const l=async(d,_)=>{s(d),o(null);try{await _()}catch(f){o(f instanceof Error?f.message:String(f))}finally{s(null)}};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:$7()}),h.jsxs("div",{className:`${Aa} mt-3`,children:[h.jsxs("div",{className:`${ed} pb-3.5`,children:[h.jsx("div",{className:"k",children:DE()}),h.jsx("div",{className:"v",children:e.current}),h.jsx("div",{className:"k",children:uAe()}),h.jsx("div",{className:"v",children:e.latest??"—"}),h.jsx("div",{className:"k",children:yze()}),h.jsx("div",{className:"v",children:qut[e.channel]()})]}),e.restartRequired&&h.jsx("div",{className:go,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:NRe()}),h.jsx("p",{children:$Oe({installed:Ae(e.installedVersion??"—"),current:Ae(e.current??e.installedVersion??"—")})})]})}),e.selfUpdates?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:O7()}),h.jsxs("p",{children:[pTe(),e.envDisabled&&VIe()]})]}),h.jsx($x,{type:"button",checked:e.autoUpdate,"aria-label":O7(),disabled:r!==null,onClick:()=>void l("auto",()=>GYe(!e.autoUpdate).then(t))})]}),h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:e.updateAvailable?FIe({version:Ae(e.latest??"—")}):M7e()}),h.jsx("p",{children:e.updateAvailable?Wke():q7e()})]}),h.jsx(Qe,{size:"small",type:"button",disabled:r!==null,onClick:()=>void l("apply",()=>qYe().then(t)),children:r==="apply"?ux():e.updateAvailable?BIe():O7e()})]})]}):h.jsx("div",{className:go,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:dMe()}),h.jsx("p",{children:((c=Hv[e.channel])==null?void 0:c.call(Hv))??dOe()})]})}),e.channel==="app-bundle"&&h.jsx(Wut,{busy:r,run:l}),a&&h.jsx("div",{className:"error",children:a})]})]})}function Vut(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);M.useEffect(()=>{kXe().then(n).catch(l=>a(l instanceof Error?l.message:String(l)))},[]);const o=()=>{!e||t||(r(!0),a(null),CXe(!e.preferenceEnabled).then(n).catch(l=>a(l instanceof Error?l.message:String(l))).finally(()=>r(!1)))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:kLe()}),e?h.jsxs("div",{className:`${Aa} mt-3`,children:[h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[M7(),e.locked&&e.reason&&h.jsx(fJe,{content:`${PEe()} ${e.reason}.`,className:"text-subtext",children:h.jsx(uKe,{size:15})})]}),h.jsx("p",{children:NTe()})]}),h.jsx($x,{type:"button",checked:e.enabled,"aria-label":M7(),disabled:t||e.locked,onClick:o})]}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}function Wut({busy:e,run:n}){const[t,r]=M.useState(null),[s,a]=M.useState(!1),o=l=>void n("cli",()=>VYe(l).then(c=>{r(c),a(!1)}).catch(c=>{throw a(!l&&String((c==null?void 0:c.message)??c).includes("--force")),c}));return h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:$ke({command:Ae("orx")})}),t?h.jsxs("p",{children:[t.alreadyCurrent?aSe({link:Ae(t.link)}):uSe({link:Ae(t.link)}),!t.onPath&&m7e({directory:Ae(t.dir)})]}):h.jsx("p",{children:Lke({command:Ae("orx")})})]}),h.jsx(Qe,{size:"small",type:"button",disabled:e!==null,onClick:()=>o(s),children:e==="cli"?ux():s?NOe():t?pOe():jke()})]})}function Kut(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),o=()=>(a(null),jx().then(n).catch(c=>a(c instanceof Error?c.message:String(c))));M.useEffect(()=>void o(),[]);const l=()=>{if(!e||t)return;const c=!e.githubForNewProjects;r(!0),a(null),_N(c,!0).then(n).catch(d=>a(d instanceof Error?d.message:String(d))).finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:$Ne()}),e?h.jsxs("div",{className:`${Aa} 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:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx("h3",{children:UNe()}),h.jsx(Dt,{variant:e.githubAuthenticated?"success":e.ghInstalled?"warning":"error",children:e.githubAuthenticated?xE():kE()})]}),h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:L7()}),h.jsx("p",{children:FLe()})]}),h.jsx($x,{type:"button",checked:e.githubForNewProjects,"aria-label":L7(),disabled:t||!e.githubAuthenticated&&!e.githubForNewProjects,onClick:l})]}),!e.githubAuthenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(qT,{ghInstalled:e.ghInstalled,onCheck:o})}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}function qT({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Th(e?UOe():Uke())}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&h.jsxs(Lb,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[Aze()," ",h.jsx(gc,{size:12})]}),h.jsx(Qe,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?jp():z7e()})]})]})}function Yut(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);return M.useEffect(()=>{RYe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o)))},[]),h.jsxs("div",{className:w2,children:[h.jsx("h3",{children:pMe()}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:WNe()}),h.jsx("span",{className:"v",children:h.jsx(Dt,{variant:e?"success":"default",children:e===null?s?hE():jp():e?WOe():ICe()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:VLe()}),e?h.jsx("div",{className:O0,children:h.jsx(Qe,{disabled:t,onClick:()=>{r(!0),a(null),DYe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o))).finally(()=>r(!1))},children:t?SOe():bOe()})}):h.jsx(Bct,{save:cN,onSaved:o=>n(o.hasToken),placeholder:bMe(),createHref:"https://www.overleaf.com/user/settings"}),s&&h.jsx("div",{className:"error",children:s})]})}function Xut({project:e,publicationError:n,onProjectUpdate:t}){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(null),[d,_]=M.useState(!1),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=M.useRef(0),b=!!(r!=null&&r.github.owner&&r.github.repo),v=(A=!0)=>{const E=++k.current;return A&&s(null),c(null),e?xXe(e.id).then(j=>{E===k.current&&s(j)}).catch(j=>{E===k.current&&c(j instanceof Error?j.message:String(j))}):Promise.resolve()};M.useEffect(()=>void v(),[e==null?void 0:e.id]);const x=A=>{const E=A instanceof Error?A.message:String(A);return E.toLowerCase().includes("archived")?JSe():E.includes("(fetch first)")||E.includes("non-fast-forward")?rke():E.includes("403")||E.toLowerCase().includes("permission denied")?oke():E},y=()=>{e&&(o(!0),c(null),wXe(e.id).then(A=>{s(A.git),t(A.project),jx().then(E=>{!E.githubForNewProjects&&!E.githubDefaultPromptSeen&&_(!0)}).catch(()=>{})}).catch(A=>c(x(A))).finally(()=>o(!1)))},C=A=>{m(!0),S(null),_N(A,!0).then(()=>_(!1)).catch(E=>S(E instanceof Error?E.message:String(E))).finally(()=>m(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:SRe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:LOe({project:(e==null?void 0:e.name)??NSe()})}),e?l&&!r?h.jsx("div",{className:"error",children:l}):r?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:w2,children:[h.jsx("h3",{children:RAe()}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:LMe()}),h.jsx("span",{className:"v",children:r.path}),h.jsx("span",{className:"k",children:"Git"}),h.jsx("span",{className:"v",children:r.gitVersion??pE()}),h.jsx("span",{className:"k",children:uDe()}),h.jsx("span",{className:"v",children:r.initialized?YSe({branch:Ae(r.currentBranch??wE()),state:r.clean?nSe():dke()}):RCe()}),h.jsx("span",{className:"k",children:z9e()}),h.jsx("span",{className:"v",children:r.baselineBranch}),h.jsx("span",{className:"k",children:bRe()}),h.jsx("span",{className:"v",children:r.remotes.length?r.remotes.map(A=>`${A.name}: ${A.url}`).join(" · "):fx()})]}),!r.initialized&&h.jsx("div",{className:O0,children:h.jsx(Qe,{variant:"primary",onClick:()=>void yXe(e.id).then(s).catch(A=>c(String(A))),children:gze()})})]}),h.jsxs("div",{className:w2,children:[h.jsx("h3",{children:"GitHub"}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:g9e()}),h.jsx("span",{className:"v",children:h.jsx(Dt,{variant:r.github.authenticated?"success":r.github.ghInstalled?"warning":"error",children:r.github.authenticated?xE():kE()})}),h.jsx("span",{className:"k",children:UMe()}),h.jsx("span",{className:"v",children:b?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[r.github.owner,"/",r.github.repo]}),!r.github.enabled&&h.jsx(Dt,{children:CDe()})]}):h.jsx(Dt,{children:AAe()})}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:yDe()}),h.jsx("span",{className:"v",children:r.github.syncStatus})]})]}),!r.github.authenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(qT,{ghInstalled:r.github.ghInstalled,onCheck:()=>v(!1)})}),r.github.authenticated&&!r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:b?eBe():SSe()}),h.jsxs("div",{className:O0,children:[b&&r.github.url&&h.jsxs(Lb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[B7()," ",h.jsx(gc,{size:12})]}),h.jsx(Qe,{variant:"primary",disabled:a,onClick:y,children:a?b6e():p6e()})]})]}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:wNe()}),h.jsxs("div",{className:O0,children:[r.github.url&&h.jsxs(Lb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[B7()," ",h.jsx(gc,{size:12})]}),h.jsx(Qe,{disabled:a,onClick:()=>{o(!0),SXe(e.id).then(A=>{s(A.git),t(A.project)}).catch(A=>c(A instanceof Error?A.message:String(A))).finally(()=>o(!1))},children:a?S6e():d6e()})]})]})]}),h.jsx(Yut,{}),n&&h.jsx("div",{className:"error",children:x(n)}),l&&h.jsx("div",{className:"error",children:x(l)})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]}):h.jsx("div",{className:Aa,children:h.jsx("p",{className:hs,children:Uje()})}),d&&h.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:()=>C(!1),children:h.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:A=>A.stopPropagation(),children:[h.jsx("h2",{id:"github-default-title",children:PAe()}),h.jsx("p",{children:GDe()}),g&&h.jsx("div",{className:"error",children:g}),h.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[h.jsx(Qe,{disabled:f,onClick:()=>C(!1),children:bje()}),h.jsx(Qe,{variant:"primary",disabled:f,onClick:()=>C(!0),children:f?ja():h8e()})]})]})})]})}const Zut={env:zPe,config:MPe,xdg:OPe,default:kPe},Pv={preparing:mPe,copying:VHe,verifying:HPe,finalizing:XHe},Qut=e=>{var n;return((n=Pv[e])==null?void 0:n.call(Pv))??e};function Jut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState({kind:"idle"}),[m,g]=M.useState(null),S=()=>JYe().then(C=>{n(C),a(A=>A||C.current)}).catch(C=>r(C instanceof Error?C.message:String(C)));M.useEffect(()=>{S()},[]),M.useEffect(()=>iZe(C=>{C.type==="progress"?f(A=>{const E=A.kind==="moving"?A.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),d(null),a(""),S()):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const k=(e==null?void 0:e.source)==="env",b=s.trim(),v=e!==null&&b===e.current;async function x(){if(!(o||!b)){l(!0),g(null),d(null);try{d(await eXe(b))}catch(C){g(C instanceof Error?C.message:String(C))}finally{l(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!b||v)&&(g(null),!!window.confirm(sPe({path:Ae(b)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await tXe(b)}catch(A){f({kind:"idle"}),g(A instanceof Error?A.message:String(A))}}}return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:gDe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:bIe()}),t?h.jsx("div",{className:Aa,children:h.jsx("div",{className:"error",children:t})}):e?h.jsxs("div",{className:Aa,children:[h.jsx("div",{className:"settings-card-head mb-3",children:h.jsx("h3",{children:JEe()})}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:IEe()}),h.jsx("span",{className:"v",children:e.current}),h.jsx("span",{className:"k",children:bx()}),h.jsx("span",{className:"v",children:Zut[e.source]()})]}),!k&&h.jsxs("form",{className:jh,onSubmit:y,children:[h.jsxs("label",{children:[dTe(),h.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{a(C.target.value),d(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),c&&!c.error&&c.ok&&h.jsxs("p",{className:hs,children:[lRe()," ",Sa(c.treeBytes??0),c.freeBytes!=null&&` — ${ePe({size:Ae(Sa(c.freeBytes))})}`,c.sameFilesystem?xPe():"","."]}),c&&c.ok===!1&&c.error&&h.jsx("div",{className:"error",children:c.error}),m&&h.jsx("div",{className:"error",children:m}),_.kind==="moving"&&h.jsx(jT,{value:_.copied,max:_.total,label:Qut(_.phase),caption:_.total>0?h.jsxs("span",{className:"text-sm",children:[Sa(_.copied)," / ",Sa(_.total)]}):void 0}),_.kind==="done"&&h.jsxs("p",{className:hs,children:[rTe(),_.oldPathLeft&&h.jsxs(h.Fragment,{children:[" ",GCe({path:Ae(_.oldPathLeft)})]})]}),_.kind==="error"&&h.jsxs("div",{className:"error",children:[JAe()," ",_.message]}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{type:"button",onClick:x,disabled:o||!b||v||_.kind==="moving",children:o?jp():k7e()}),h.jsx(Qe,{variant:"primary",type:"submit",disabled:!b||v||_.kind==="moving",children:_.kind==="moving"?fPe():lPe()})]})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}const k2=e=>e==="running"||e==="starting";function edt(e){return k2(e.status)?tp(Date.now()-e.createdAt):e.endedAt?tp(e.endedAt-e.createdAt):"—"}function GT({instances:e,emptyLabel:n}){return e.length===0?h.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}):h.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:h.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:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:k9e()}),h.jsx("th",{children:Dp()}),h.jsx("th",{children:aDe()}),h.jsx("th",{children:$Re()})]})}),h.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 h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[h.jsx(e4,{backend:t.backend}),r&&h.jsx(Fp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:I7(),"aria-label":I7(),onClick:a=>a.stopPropagation(),children:h.jsx(gc,{size:12})})]})}),h.jsx("td",{children:h.jsx(xo,{status:Di(t)})}),h.jsx("td",{children:Na(t.createdAt)}),h.jsx("td",{children:edt(t)})]},t.id)})})]})})}function tdt({projectId:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const g=setInterval(()=>c(S=>S+1),3e4);return()=>clearInterval(g)},[]);const d=()=>{if(!e){r([]);return}l(!0),Tx(e).then(g=>{r(g),a(null)}).catch(g=>{a(g instanceof Error?g.message:String(g)),r(S=>S??[])}).finally(()=>l(!1))};M.useEffect(()=>d(),[e]);const _=(g,S)=>S.createdAt-g.createdAt,f=t==null?void 0:t.filter(g=>k2(g.status)).sort(_),m=t==null?void 0:t.filter(g=>!k2(g.status)).sort(_);return h.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:[h.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:[h.jsx("div",{children:h.jsxs("h2",{children:[LRe(),f&&f.length>0&&h.jsx("span",{className:"count-badge",children:f.length})]})}),h.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(ld,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]}),h.jsx(Qe,{size:"small",onClick:n,children:m!=null&&m.length?p0e({count:Vt(m.length)}):d0e()})]})]}),s&&h.jsx("div",{className:"error",children:s}),!f||!m?h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]}):h.jsx(GT,{instances:f,emptyLabel:e?J_e():o0e()})]})}function ndt({projectId:e,onBack:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const _=setInterval(()=>c(f=>f+1),3e4);return()=>clearInterval(_)},[]);const d=()=>{if(!e){r([]);return}l(!0),Tx(e).then(_=>{r(_.sort((f,m)=>m.createdAt-f.createdAt)),a(null)}).catch(_=>{a(_ instanceof Error?_.message:String(_)),r(f=>f??[])}).finally(()=>l(!1))};return M.useEffect(d,[e]),h.jsxs(h.Fragment,{children:[h.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:[h.jsx(Bf,{size:14})," ",CE()]}),h.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[h.jsx("h1",{children:Oze()}),h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(ld,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]})]}),s&&h.jsx("div",{className:"error",children:s}),t?h.jsx(GT,{instances:t,emptyLabel:e?Y_e():r0e()}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}const VT=["projects","harnesses","storage"],rdt=[{id:"compute",label:EE,icon:h.jsx($We,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:mx,icon:h.jsx(zx,{size:15}),activeTabs:["environment"]},{id:"settings",label:AE,icon:h.jsx(GKe,{size:15}),activeTabs:["settings",...VT]}];function sdt(e){return VT.includes(e)}function idt({tab:e,project:n,githubPublicationError:t,onProjectUpdate:r,onSelectTab:s}){const a=e==="settings"||sdt(e);return h.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:[a&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:AE()}),h.jsxs("div",{className:"settings-stack mt-4.5",children:[h.jsx("section",{className:vu,children:h.jsx(Uut,{})}),h.jsx("section",{className:vu,children:h.jsx(Kut,{})}),h.jsx("section",{className:vu,children:h.jsx(fut,{})}),h.jsx("section",{className:vu,children:h.jsx(Jut,{})}),h.jsx("section",{className:vu,children:h.jsx(Vut,{})}),h.jsx("section",{className:vu,children:h.jsx(Gut,{})})]})]}),e==="compute"&&h.jsx(Dut,{project:n,onViewHistory:()=>s("instances")}),e==="instances"&&h.jsx(ndt,{projectId:n==null?void 0:n.id,onBack:()=>s("compute")}),e==="environment"&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:mx()}),h.jsx(Put,{})]}),e==="git"&&h.jsx(Xut,{project:n,publicationError:t,onProjectUpdate:r})]})}function adt({skills:e,activeIndex:n,onPick:t,onHover:r}){return h.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,a)=>h.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(s)},onMouseEnter:()=>r(a),children:[h.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&h.jsx(Dt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:IE()})]}),h.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const x8={name:"plan",get description(){return vwe()},source:"command"};function Fv(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(;r1&&/[ \t]$/.test(a)&&(a=a.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let o=e.slice(n.end);if(!o)o=s;else if(!o.startsWith(` +`)){const _=(c=/^[ \t]+/.exec(o))==null?void 0:c[0];o=_?`${_.length>=r?_:s}${o.slice(_.length)}`:s+o}const l=((d=/^[ \t]+/.exec(o))==null?void 0:d[0].length)??0;return{text:`${a}/${t}${o}`,cursor:a.length+t.length+1+l}}function w8(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 ldt(e,n){const t=e.filter(r=>r.name.toLowerCase()!==x8.name);return n?[x8,...t]:t}function cdt(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function udt(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const ddt=["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"],Uv=new Map;function fdt(e,n){const t=`${n}\0${e}`,r=Uv.get(t);if(r)return r;const s=NXe(e,n).catch(a=>{throw Uv.delete(t),a});return Uv.set(t,s),s}function WT(e,n,t,r,s,a=!1){let o=0;return odt(e,n).map((l,c)=>{const d=o+l.text.length;o=d;const _=l.text.slice(1).toLowerCase();return l.command&&s?s(l.text,_,d,c):l.command?h.jsxs("span",{className:t,onMouseDown:void 0,children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),l.text.slice(1)]},c):a?h.jsx("span",{"aria-hidden":"true",children:l.text},c):h.jsx(M.Fragment,{children:l.text},c)})}function hdt({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:a}){const o=M.useRef(null),l=M.useRef(null),c=M.useRef(null),d=M.useId(),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState({}),x=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const E=o.current;if(!E)return;const j=E.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),D=Math.max(16,Math.min(j.left-4,window.innerWidth-T-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:D,width:T}:{left:D,top:j.bottom+12,width:T})},C=()=>{x(),y(),f(!0),!(m!==null||S)&&(k(!0),fdt(n,s).then(g).catch(()=>g(null)).finally(()=>k(!1)))},A=()=>{x(),c.current=window.setTimeout(()=>f(!1),120)};return M.useEffect(()=>()=>x(),[]),M.useEffect(()=>{if(!_)return;const E=()=>y();return window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[_]),h.jsxs(M.Fragment,{children:[h.jsxs("span",{ref:o,role:"button",tabIndex:0,"aria-controls":d,"aria-expanded":_,"aria-label":$I({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:C,onMouseLeave:A,onFocus:C,onBlur:A,onKeyDown:E=>{var j,T;if(E.key==="Escape"){f(!1);return}if(E.key==="Enter"||E.key===" "){E.preventDefault(),C();return}_&&(E.key==="ArrowDown"||E.key==="PageDown")&&(E.preventDefault(),(j=l.current)==null||j.scrollBy({top:E.key==="PageDown"?240:48,behavior:"smooth"})),_&&(E.key==="ArrowUp"||E.key==="PageUp")&&(E.preventDefault(),(T=l.current)==null||T.scrollBy({top:E.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:E=>{var j,T;E.preventDefault(),(j=a.current)==null||j.focus(),(T=a.current)==null||T.setSelectionRange(t,t),x()},children:[h.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),h.jsxs("span",{className:"relative z-1",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Up.createPortal(h.jsxs("div",{id:d,ref:l,role:"dialog","aria-label":gB({name:n}),style:{...b,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:x,onMouseLeave:A,onFocus:x,onBlur:A,onMouseDown:E=>E.stopPropagation(),children:[h.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:[h.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),h.jsx(Dt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:IE()})]}),h.jsx("div",{className:"p-4 text-sm text-text",children:S&&m===null?h.jsx("span",{className:"text-muted",children:pBe()}):h.jsx(za,{text:m??r.description})})]}),document.body)]})}function _dt({text:e,isCommand:n}){return h.jsx(h.Fragment,{children:WT(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function pdt({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const a=M.useRef(null);return M.useLayoutEffect(()=>{const o=s.current,l=a.current;if(!o||!l)return;const c=()=>{const _=getComputedStyle(o);for(const f of ddt)l.style.setProperty(f,_.getPropertyValue(f));l.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};c();const d=new ResizeObserver(c);return d.observe(o),()=>d.disconnect()},[e,s]),M.useLayoutEffect(()=>{const o=s.current;if(!o)return;const l=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return l(),o.addEventListener("scroll",l),()=>o.removeEventListener("scroll",l)},[s,e]),h.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:[WT(e,n,"",void 0,(o,l,c,d)=>{const _=t.find(f=>f.name===l);return _&&_.source!=="command"?h.jsx(hdt,{label:o,name:l,end:c,skill:_,projectId:r,textareaRef:s},`${d}:${c}`):h.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${d}:${c}`)},!0),"​"]})}function mdt(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const C2=6.5,S8=2*Math.PI*C2;function gdt({usage:e}){return!e||e.usedTokens<=0?null:h.jsx(vdt,{usage:e})}function vdt({usage:e}){const{open:n,setOpen:t,ref:r}=Ao(),{usedTokens:s,contextWindow:a}=e,o=a&&a>0?Math.min(100,Math.round(s/a*100)):null,l=o===null?"var(--accent)":mdt(o),c=o===null?"":new Intl.NumberFormat(N(),{style:"percent"}).format(o/100);return h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[h.jsx("button",{type:"button",className:`${o===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:foe(),onClick:()=>t(d=>!d),children:o===null?K_(s):h.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:C2,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),h.jsx("circle",{cx:"8",cy:"8",r:C2,fill:"none",stroke:l,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${S8*Math.max(o,2)/100} ${S8}`,transform:"rotate(-90 8 8)"})]})}),n&&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 [&.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:[h.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[h.jsx("span",{children:loe()}),h.jsx("span",{className:"context-meter-value text-text tabular-nums",children:o===null?moe({value:Ae(K_(s))}):xoe({used:Ae(K_(s)),total:Ae(K_(a)),percent:Ae(c)})})]}),o!==null&&h.jsx(jT,{value:s,max:a,fillColor:l})]})]})}const s4="orx:demo-read-sessions";function KT(){try{const e=JSON.parse(sessionStorage.getItem(s4)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function bdt(e){try{const n=KT();n.add(e),sessionStorage.setItem(s4,JSON.stringify([...n]))}catch{}}function xdt(){try{sessionStorage.removeItem(s4)}catch{}}function ydt(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 wdt(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 Sdt(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 S2(e,n){return n?` +`}function E2(e,n){return n?` \\[ ${e} \\] -`:`\\(${e}\\)`}function cct(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function kdt(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 uct(e,n){if(e.length===0)return"";const t=Math.max(...e.map(o=>o.length)),r=o=>`| ${Array.from({length:t},(l,c)=>o[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),a=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...a.map(r)].join(` -`)}function dct(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function fct(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function hct(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const _ct={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 Kf({variant:e="list",className:n,...t}){return h.jsx("span",{className:is("title",_ct[e],n),...t})}const LT="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",kl=256,OT=1024,IT=2e4,Fv=8,u0="chat-annotations";function oc(e){return e instanceof Element?e:e.parentElement}function bk(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function Uv(e,n){return bk(e).compareBoundaryPoints(Range.START_TO_START,bk(n))<0}function xk(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const pct=new Set(["A","B","CODE","EM","I","STRONG"]);function mct(e,n){var s,a;const t=oc(e.endContainer);if(Array.from(n.childNodes).every(o=>o.nodeType===Node.TEXT_NODE)){let o=oc(e.startContainer);for(;o&&o.matches(".md *")&&o.contains(t);){if(pct.has(o.tagName)){const l=o.cloneNode(!1);l instanceof HTMLElement&&(l.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(l))}o=o.parentElement}}const r=(s=oc(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const o=(a=r.querySelector("code"))==null?void 0:a.cloneNode(!1),l=r.cloneNode(!1);l instanceof HTMLElement&&o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),l.replaceChildren(o),n.replaceChildren(l))}}function gct(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 vct(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const a=Array.from(n.querySelectorAll(".katex")).filter(o=>e.intersectsNode(o));for(const o of a){const l=o.closest(".katex-display")??o,c=document.createRange();c.selectNode(l);const d={container:c.startContainer,offset:c.startOffset},_={container:c.endContainer,offset:c.endOffset};if(Uv(s,d)&&t.append(xk(s,d)),t.append(l.cloneNode(!0)),s=_,!Uv(s,r))break}return a.length===0?t.append(e.cloneContents()):Uv(s,r)&&t.append(xk(s,r)),mct(e,t),gct(t),t}function bct(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>Yf(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function Cdt(e,n){if(e.length===0)return"";const t=Math.max(...e.map(o=>o.length)),r=o=>`| ${Array.from({length:t},(l,c)=>o[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),a=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...a.map(r)].join(` +`)}function Edt(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function Ndt(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function zdt(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Adt={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 Xf({variant:e="list",className:n,...t}){return h.jsx("span",{className:ss("title",Adt[e],n),...t})}const YT="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",Sl=256,XT=1024,ZT=2e4,qv=8,d0="chat-annotations";function lc(e){return e instanceof Element?e:e.parentElement}function k8(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function Gv(e,n){return k8(e).compareBoundaryPoints(Range.START_TO_START,k8(n))<0}function C8(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const Tdt=new Set(["A","B","CODE","EM","I","STRONG"]);function jdt(e,n){var s,a;const t=lc(e.endContainer);if(Array.from(n.childNodes).every(o=>o.nodeType===Node.TEXT_NODE)){let o=lc(e.startContainer);for(;o&&o.matches(".md *")&&o.contains(t);){if(Tdt.has(o.tagName)){const l=o.cloneNode(!1);l instanceof HTMLElement&&(l.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(l))}o=o.parentElement}}const r=(s=lc(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const o=(a=r.querySelector("code"))==null?void 0:a.cloneNode(!1),l=r.cloneNode(!1);l instanceof HTMLElement&&o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),l.replaceChildren(o),n.replaceChildren(l))}}function Mdt(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 Rdt(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const a=Array.from(n.querySelectorAll(".katex")).filter(o=>e.intersectsNode(o));for(const o of a){const l=o.closest(".katex-display")??o,c=document.createRange();c.selectNode(l);const d={container:c.startContainer,offset:c.startOffset},_={container:c.endContainer,offset:c.endOffset};if(Gv(s,d)&&t.append(C8(s,d)),t.append(l.cloneNode(!0)),s=_,!Gv(s,r))break}return a.length===0?t.append(e.cloneContents()):Gv(s,r)&&t.append(C8(s,r)),jdt(e,t),Mdt(t),t}function Ddt(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>Zf(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${uct(n,!!e.querySelector("tr:first-child th"))} +${Cdt(n,!!e.querySelector("tr:first-child th"))} -`:""}function BT(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const a=[];for(const o of Array.from(e.children).filter(l=>l instanceof HTMLElement&&l.tagName==="LI")){const l=o.getAttribute("value"),c=l===null?s:Number(l),d=Number.isFinite(c)?c:s;s=d+1;const _=Array.from(o.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` -${BT(f).trim()} -`:Yf(f)).join("").trim();a.push(cct(n?`${d}.`:"-",_))}return` +`:""}function QT(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const a=[];for(const o of Array.from(e.children).filter(l=>l instanceof HTMLElement&&l.tagName==="LI")){const l=o.getAttribute("value"),c=l===null?s:Number(l),d=Number.isFinite(c)?c:s;s=d+1;const _=Array.from(o.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` +${QT(f).trim()} +`:Zf(f)).join("").trim();a.push(kdt(n?`${d}.`:"-",_))}return` ${a.join(` `)} -`}function Yf(e){var r,s,a,o,l;if(e.nodeType===Node.TEXT_NODE)return act(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(Yf).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?S2(c,!0):""}if(e.matches(".katex")){const c=(o=(a=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();return c?S2(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return bct(e);if(e.matches("UL, OL"))return BT(e);if(e.tagName==="CODE"&&((l=e.parentElement)==null?void 0:l.tagName)!=="PRE")return oct(e.textContent??"");if(e.tagName==="PRE")return lct(e.textContent??"");const n=Array.from(e.childNodes).map(Yf).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 Zf(e){var r,s,a,o,l;if(e.nodeType===Node.TEXT_NODE)return ydt(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(Zf).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?E2(c,!0):""}if(e.matches(".katex")){const c=(o=(a=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();return c?E2(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return Ddt(e);if(e.matches("UL, OL"))return QT(e);if(e.tagName==="CODE"&&((l=e.parentElement)==null?void 0:l.tagName)!=="PRE")return wdt(e.textContent??"");if(e.tagName==="PRE")return Sdt(e.textContent??"");const n=Array.from(e.childNodes).map(Zf).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` @@ -973,7 +993,7 @@ ${n.trim().split(` `).map(c=>`> ${c}`).join(` `)} -`;const t=dct(e.tagName,n);return t?` +`;const t=Edt(e.tagName,n);return t?` ${t} @@ -981,55 +1001,55 @@ ${t} ${n.trim()} -`:n}function xct(e,n){return Yf(e).replace(/\r\n?/g,` +`:n}function Ldt(e,n){return Zf(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function yk(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function yct(e,n){var s,a,o,l;if(!fct(e))return;const t=yk(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const _=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(a=c.querySelector(".katex-html"))==null?void 0:a.textContent,c.textContent].filter(S=>!!S).map(yk).find(S=>hct(S,t));if(!_)continue;const f=(l=(o=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:o.textContent)==null?void 0:l.trim();if(!f)continue;const m=!!c.closest(".katex-display"),g={markdown:S2(f,m).trim(),delta:Math.abs(_.length-t.length)};(!r||g.delta .md .katex")){const _=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(a=c.querySelector(".katex-html"))==null?void 0:a.textContent,c.textContent].filter(S=>!!S).map(E8).find(S=>zdt(S,t));if(!_)continue;const f=(l=(o=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:o.textContent)==null?void 0:l.trim();if(!f)continue;const m=!!c.closest(".katex-display"),g={markdown:E2(f,m).trim(),delta:Math.abs(_.length-t.length)};(!r||g.deltaA.width>0&&A.height>0),S=g[0]??t.getBoundingClientRect(),k=g.filter(A=>A.topS.top),b=k.length>0?k:[S],v=Math.min(...b.map(A=>A.left)),x=Math.max(...b.map(A=>A.right)),y=Math.min(...b.map(A=>A.top)),C=Math.max(...b.map(A=>A.bottom)),z=34,E=74,j=y>=z+Fv?y-z-Fv:C+Fv;return{text:xct(m,f),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,v+(x-v)/2)),top:j}}function Sct(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),a=M.useCallback(()=>{const c=e.current;r(c?wct(c):null)},[e]);M.useEffect(()=>{let c=null;const d=()=>{s.current||a()},_=m=>{const g=e.current,S=m.target;!m.isPrimary||m.button!==0||!g||!(S instanceof Node)||!g.contains(S)||(s.current=!0,r(null))},f=m=>{!m.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(a))};return document.addEventListener("selectionchange",d),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",d),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[a]),M.useEffect(()=>{if(!t)return;const c=d=>{const _=d.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",a),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",a)}},[t,a]);const o=M.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),l=M.useCallback(()=>r(null),[]);return{action:t,add:o,dismiss:l}}function kct(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(u0);return}const t=new Highlight(...n);return CSS.highlights.set(u0,t),()=>{CSS.highlights.get(u0)===t&&CSS.highlights.delete(u0)}},[e])}function Cct({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var a;const s=(a=n.current)==null?void 0:a.closest(".chat-thread-inner");r(s?yct(e.text,s):void 0)},[e.id,e.text]),h.jsx("div",{ref:n,children:h.jsx(Na,{text:t??e.text})})}function Ect({annotations:e,onRemove:n}){return e.map((t,r)=>h.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:[h.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-muted mb-1",children:hJ()}),h.jsx(Cct,{annotation:t})]}),n&&h.jsx(Qt,{type:"button",size:"small","data-annotation-remove":!0,title:FQ(),"aria-label":TI({number:an(r+1)}),onClick:()=>n(t.id),children:h.jsx(hs,{size:13})})]},t.id))}function e4({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),a=M.useRef(null),o=M.useId(),l=zo(s),c=n==="sent",d=M.useRef(null),_=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null,l.setOpen(!0)},f=()=>{d.current=window.setTimeout(()=>{var S;(S=a.current)!=null&&S.contains(document.activeElement)||l.setOpen(!1)},160)},m=()=>{const S=c||!l.open;l.setOpen(S),S&&window.requestAnimationFrame(()=>{var k;return(k=a.current)==null?void 0:k.focus()})},g=S=>{r==null||r(S),window.requestAnimationFrame(()=>{var b,v;(v=((b=a.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??a.current??s.current)==null||v.focus()})};return M.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]),h.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:l.ref,onMouseEnter:c?_:void 0,onMouseLeave:c?f:void 0,children:[h.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[h.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":l.open,"aria-haspopup":"dialog","aria-controls":o,onClick:m,children:[h.jsx(qE,{size:c?13:14,className:"text-muted"}),e.length===1?CK():VV({count:an(e.length)})]}),t&&h.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:M6(),"aria-label":M6(),onClick:t,children:h.jsx(hs,{size:13})})]}),l.open&&h.jsx("div",{id:o,ref:a,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":cJ(),children:h.jsx(Ect,{annotations:e,onRemove:r?g:void 0})})]})}function Nct(e){return h.jsx(e4,{...e,variant:"composer"})}const zct=["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(" "),wk=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),Act=["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(" "),Tct=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),k2="prompt-actions flex flex-wrap gap-2",Mu="local-",Sk=[];function jct(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(Mu)),n]}function Mct(e,n){switch(n.type){case"reset":return{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}};case"seed":return n.onlyIfAbsent&&n.sessionId in e.messagesBySession?e:{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:n.messages},queuedBySession:{...e.queuedBySession,[n.sessionId]:n.queued??[]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.activeLeafId??null}};case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(l=>l.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,a=n.message.role==="user"&&s!==null&&s.startsWith(Mu),o=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:jct(t,n.message)},activeLeafBySession:r&&!a&&!o?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${Mu}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"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((a,o)=>r.push({id:`img${o}`,type:"image",text:a.url,name:a.name})),n.annotations.forEach((a,o)=>r.push({id:`annotation${o}`,type:"annotation",text:a.text}));const s={id:`${Mu}${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"busy":{const t=new Set(e.busySessions);return n.busy?t.add(n.sessionId):t.delete(n.sessionId),{...e,busySessions:t}}case"seedBusy":{const t=new Set(n.sessions),r=new Set(n.known);for(const s of e.busySessions)r.has(s)||t.add(s);return{...e,busySessions:t}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}};case"forget":{const t={...e.messagesBySession};delete t[n.sessionId];const r=new Set(e.busySessions);r.delete(n.sessionId);const s={...e.queuedBySession};delete s[n.sessionId];const a={...e.activeLeafBySession};return delete a[n.sessionId],{messagesBySession:t,busySessions:r,queuedBySession:s,activeLeafBySession:a}}}}function Rct(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return I3e();const t=Math.floor(n/60);if(t<60)return R3e({value:an(t)});const r=Math.floor(t/60);return r<24?A3e({value:an(r)}):C3e({value:an(Math.floor(r/24))})}function rc(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function qv(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 Dct(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 Cs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function Gv(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 a=s[t];if(typeof a=="string"&&a)return a}return null}function Vv(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=kl));s++);return r}function Lct(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 Ru(...e){const n=new Set,t=new RegExp(`^${hc}$`,"i");let r=0;for(const s of e)for(const a of s){if(n.size>=kl||r++>=OT)return[...n];t.test(a)&&n.add(a.toLowerCase())}return[...n]}function hm(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!f)return null;const m=Rdt(t,e),g=Array.from(t.getClientRects()).filter(T=>T.width>0&&T.height>0),S=g[0]??t.getBoundingClientRect(),k=g.filter(T=>T.topS.top),b=k.length>0?k:[S],v=Math.min(...b.map(T=>T.left)),x=Math.max(...b.map(T=>T.right)),y=Math.min(...b.map(T=>T.top)),C=Math.max(...b.map(T=>T.bottom)),A=34,E=74,j=y>=A+qv?y-A-qv:C+qv;return{text:Ldt(m,f),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,v+(x-v)/2)),top:j}}function Bdt(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),a=M.useCallback(()=>{const c=e.current;r(c?Idt(c):null)},[e]);M.useEffect(()=>{let c=null;const d=()=>{s.current||a()},_=m=>{const g=e.current,S=m.target;!m.isPrimary||m.button!==0||!g||!(S instanceof Node)||!g.contains(S)||(s.current=!0,r(null))},f=m=>{!m.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(a))};return document.addEventListener("selectionchange",d),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",d),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[a]),M.useEffect(()=>{if(!t)return;const c=d=>{const _=d.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",a),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",a)}},[t,a]);const o=M.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),l=M.useCallback(()=>r(null),[]);return{action:t,add:o,dismiss:l}}function $dt(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(d0);return}const t=new Highlight(...n);return CSS.highlights.set(d0,t),()=>{CSS.highlights.get(d0)===t&&CSS.highlights.delete(d0)}},[e])}function Hdt({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var a;const s=(a=n.current)==null?void 0:a.closest(".chat-thread-inner");r(s?Odt(e.text,s):void 0)},[e.id,e.text]),h.jsx("div",{ref:n,children:h.jsx(za,{text:t??e.text})})}function Pdt({annotations:e,onRemove:n}){return e.map((t,r)=>h.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:[h.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-muted mb-1",children:IJ()}),h.jsx(Hdt,{annotation:t})]}),n&&h.jsx(Jt,{type:"button",size:"small","data-annotation-remove":!0,title:fJ(),"aria-label":UI({number:Vt(r+1)}),onClick:()=>n(t.id),children:h.jsx(_s,{size:13})})]},t.id))}function i4({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),a=M.useRef(null),o=M.useId(),l=Ao(s),c=n==="sent",d=M.useRef(null),_=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null,l.setOpen(!0)},f=()=>{d.current=window.setTimeout(()=>{var S;(S=a.current)!=null&&S.contains(document.activeElement)||l.setOpen(!1)},160)},m=()=>{const S=c||!l.open;l.setOpen(S),S&&window.requestAnimationFrame(()=>{var k;return(k=a.current)==null?void 0:k.focus()})},g=S=>{r==null||r(S),window.requestAnimationFrame(()=>{var b,v;(v=((b=a.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??a.current??s.current)==null||v.focus()})};return M.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]),h.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:l.ref,onMouseEnter:c?_:void 0,onMouseLeave:c?f:void 0,children:[h.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[h.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":l.open,"aria-haspopup":"dialog","aria-controls":o,onClick:m,children:[h.jsx(QE,{size:c?13:14,className:"text-muted"}),e.length===1?YK():mW({count:Vt(e.length)})]}),t&&h.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:I6(),"aria-label":I6(),onClick:t,children:h.jsx(_s,{size:13})})]}),l.open&&h.jsx("div",{id:o,ref:a,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":RJ(),children:h.jsx(Pdt,{annotations:e,onRemove:r?g:void 0})})]})}function Fdt(e){return h.jsx(i4,{...e,variant:"composer"})}const Udt=["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(" "),N8=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),qdt=["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(" "),Gdt=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),N2="prompt-actions flex flex-wrap gap-2",Ou="local-",z8=[];function Vdt(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(Ou)),n]}function Wdt(e,n){switch(n.type){case"reset":return{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}};case"seed":return n.onlyIfAbsent&&n.sessionId in e.messagesBySession?e:{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:n.messages},queuedBySession:{...e.queuedBySession,[n.sessionId]:n.queued??[]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.activeLeafId??null}};case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(l=>l.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,a=n.message.role==="user"&&s!==null&&s.startsWith(Ou),o=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Vdt(t,n.message)},activeLeafBySession:r&&!a&&!o?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${Ou}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"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((a,o)=>r.push({id:`img${o}`,type:"image",text:a.url,name:a.name})),n.annotations.forEach((a,o)=>r.push({id:`annotation${o}`,type:"annotation",text:a.text}));const s={id:`${Ou}${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"busy":{const t=new Set(e.busySessions);return n.busy?t.add(n.sessionId):t.delete(n.sessionId),{...e,busySessions:t}}case"seedBusy":{const t=new Set(n.sessions),r=new Set(n.known);for(const s of e.busySessions)r.has(s)||t.add(s);return{...e,busySessions:t}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}};case"forget":{const t={...e.messagesBySession};delete t[n.sessionId];const r=new Set(e.busySessions);r.delete(n.sessionId);const s={...e.queuedBySession};delete s[n.sessionId];const a={...e.activeLeafBySession};return delete a[n.sessionId],{messagesBySession:t,busySessions:r,queuedBySession:s,activeLeafBySession:a}}}}function Kdt(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return o6e();const t=Math.floor(n/60);if(t<60)return r6e({value:Vt(t)});const r=Math.floor(t/60);return r<24?J3e({value:Vt(r)}):Y3e({value:Vt(Math.floor(r/24))})}function sc(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function Vv(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 Ydt(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 Cs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function Wv(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 a=s[t];if(typeof a=="string"&&a)return a}return null}function Kv(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Sl));s++);return r}function Xdt(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 Iu(...e){const n=new Set,t=new RegExp(`^${_c}$`,"i");let r=0;for(const s of e)for(const a of s){if(n.size>=Sl||r++>=XT)return[...n];t.test(a)&&n.add(a.toLowerCase())}return[...n]}function pm(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function Oct(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 Ict(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=aYe(r),$T(r)}function $T(e){return $ct(e).replace(/[\t\r ]+/g," ").trim()}function Bct(e){let n=null,t=!1;for(let r=0;r!a.startsWith("-")&&a.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&PT(s)?{ref:r,path:s}:null}function Fct(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 kk(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 a of n.split("/"))if(!(!a||a===".")){if(a===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(a);continue}r.push(a)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function Uct(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let a=0;a!d.startsWith("-"));if(!l)return null;const c=kk(s,l);if(!c)return null;s=c}return s?kk(s,e):e}const ba="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",qct=new RegExp(`\\bchat_(${ba})\\b`,"gi"),hc=`(?:${ba}|[0-9a-f]{8})`;function Du(e){const n=[];let t="",r="",s=null,a=!1;const o=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},l=d=>{let _=1,f=null,m=!1;for(let g=d;g{let _=!1;for(let f=d;fcYe(t.raw,n))}function ji(e,n){return _m(e,n).length>0}function Gct(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,IT).matchAll(qct))if(n.add(t[0].toLowerCase()),n.size>=kl)break;return[...n]}function C2(e,n){if(!e)return[];const t=new Set,r=e.slice(0,IT),s=n==="runs"?[new RegExp(`/runs/(${ba})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${ba})`,"gi"),new RegExp(`^\\s*RUN\\s+(${ba})\\b`,"gim"),new RegExp(`={3,}\\s*(${ba})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${ba})`,"gi"),new RegExp(`^\\s*id:\\s*(${ba})`,"gim"),new RegExp(`={3,}\\s*(${ba})\\s*={3,}`,"gi")];for(const o of s)for(const l of r.matchAll(o))if(t.add(l[1]),t.size>=kl)return[...t];const a=new RegExp(`^\\s*(${ba})(?:\\s|$)`,"gim");for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=kl)break;return[...t]}function UT(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),a=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,a+r.raw.length),{invocation:r,offset:Math.max(0,a)}})}function qT(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let a="";for(const o of e.matchAll(s)){if((o.index??0)>=t)break;a=o[1]??o[2]??o[3]??""}return[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function GT(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let a="";for(const o of e.matchAll(s)){const l=o.index??0;if(l>=t)break;const c=l+o[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(a=o[1])}return/\$\(|`/.test(a)?[]:[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function Vct(e,n,t=[],r=[]){const s=_m(e,"logs"),a=new Set;if(s.length===0){if(!ji(e,"logs"))return[];const l=t.length>0?[]:C2(n,"runs");for(const c of t.length>0?t:l.length>0?l:r)if(a.add(c),a.size>=kl)break;return Ru([...a])}let o=!1;for(const{invocation:l,offset:c}of UT(e,s)){const d=qu(l.raw);if((d==null?void 0:d[0])!=="logs")continue;const _=d.slice(1);let f=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){f=v;break}}}if(!f){o=!0;continue}if(new RegExp(`^${hc}$`,"i").test(f)){a.add(f);continue}const m=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(f);if(!m){o=!0;continue}const g=m[1],S=qT(e,g,c,hc);for(const b of S)a.add(b);const k=GT(e,g,c,hc);for(const b of k)a.add(b);S.length===0&&k.length===0&&(o=!0)}if(a.size===0||o){const l=t.length>0?[]:C2(n,"runs"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=kl)break}return Ru([...a])}function pu(e,n,t=[],r=[]){const s=_m(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const a=new Set;let o=!1;for(const{invocation:l,offset:c}of UT(e,s)){const d=qu(l.raw),_=(d==null?void 0:d[0])==="exp"&&(d[1]==="status"||d[1]==="desc")?d[2]:null;let f=!1;_&&new RegExp(`^${hc}$`,"i").test(_)&&(a.add(_),f=!0);const m=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(m){const g=m[1],S=qT(e,g,c,hc);if(S.length>0){for(const b of S)a.add(b);f=!0}const k=GT(e,g,c,hc);for(const b of k)a.add(b);k.length>0&&(f=!0)}f||(o=!0)}if(a.size===0||o){const l=t.length>0?[]:C2(n,"experiments"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=kl)break}return Ru([...a])}function Cl(e){var v,x,y,C;const n=e.tool??"tool",t=((v=e.state)==null?void 0:v.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},a={...t,...s},o=Cs(a,"command","cmd"),l=Lct(a,"commandArgv"),c=((x=e.state)==null?void 0:x.output)||((y=e.state)==null?void 0:y.error),d=Ru(Vv(a,"targetIds")),_=Ru(Vv(a,"runTargetIds")),f=Ru(Vv(a,"experimentTargetIds")),m=Cs(a,"filePath","file_path","notebookPath","notebook_path","path"),g=Cs(a,"description"),S=n.toLowerCase().split(/(?::|\.|__)+/),k=S.at(-1)??n.toLowerCase();if(k==="run"&&S.includes("web")){const z=Gv(a,"search_query","q"),E=Gv(a,"image_query","q"),j=Gv(a,"find","pattern");return z?{kind:"web",label:p6({query:z})}:E?{kind:"web",label:wP({query:E})}:j?{kind:"web",label:HP({pattern:j})}:Array.isArray(a.open)?{kind:"web",label:PZ()}:Array.isArray(a.weather)?{kind:"web",label:lX()}:Array.isArray(a.finance)?{kind:"web",label:eX()}:Array.isArray(a.sports)?{kind:"web",label:sX()}:Array.isArray(a.time)?{kind:"web",label:XY()}:{kind:"web",label:T6()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(k)??k){case"bash":{if(!o&&!(l!=null&&l.length))return{kind:"command",label:_Q()};const z=Ict(o??(l==null?void 0:l.join(" "))??""),E=Du(z);let j=E.map(oe=>oe.raw);if(l!=null&&l.length){const oe=lYe(l);j=oe===null?[l]:Du($T(oe)).map(se=>se.raw)}let A=null;for(const oe of j)if(A=uYe(oe),A)break;const D=j.some(oe=>{const se=qu(oe);return se!==null&&se[0]!=="discover"&&se[0]!=="paper"});if(A&&!D){const oe=A.kind==="discover"?{keyword:sP(),embedding:lP(),openalex:RP(),biorxiv:fP()}[A.strategy]:null,se=A.kind==="discover"?A.query?_$({activity:oe??_6(),query:A.query}):oe??_6():A.id?af({target:Ae(A.id)}):sH();return{kind:A.kind==="paper"?"read":"search",label:se,litCall:A}}if(ji(z,"agent\\s+spawn"))return{kind:"agent",label:EX(),spawnedSessionIds:Gct(c),litCall:A??void 0};const O=E.map(oe=>FT(oe.raw)),P=ji(z,"exp\\s+status"),$=ji(z,"exp\\s+desc"),F=_m(z,"exp\\s+desc").some(oe=>(qu(oe.raw)??[]).some(q=>q==="--set"||q.startsWith("--set=")||q==="--stdin")),V=F?_F():eH(),X=F?kB():BH();if(ji(z,"logs")){const oe=Vct(z,c,_,d);return{kind:"project",label:oe.length===1?TH():DH(),runIds:oe,litCall:A??void 0}}if(ji(z,"exp\\s+run"))return{kind:"project",label:TJ(),litCall:A??void 0};if(ji(z,"exp\\s+wait"))return{kind:"project",label:uee(),litCall:A??void 0};if(ji(z,"exp\\s+cancel"))return{kind:"project",label:jY(),litCall:A??void 0};const W=ji(z,"project\\s+view");if(W&&P&&$)return{kind:"project",label:X,experimentIds:pu(z,c,f,d),litCall:A??void 0};if(W&&$)return{kind:"project",label:V,experimentIds:pu(z,c,f,d),litCall:A??void 0};if(W&&P)return{kind:"project",label:j6(),experimentIds:pu(z,c,f,d),litCall:A??void 0};if(W)return{kind:"project",label:TQ(),litCall:A??void 0};if(P&&$)return{kind:"project",label:X,experimentIds:pu(z,c,f,d),litCall:A??void 0};if(P)return{kind:"project",label:j6(),experimentIds:pu(z,c,f,d),litCall:A??void 0};if($)return{kind:"project",label:V,experimentIds:pu(z,c,f,d),litCall:A??void 0};if(ji(z,"runs?"))return{kind:"project",label:wZ(),litCall:A??void 0};if(ji(z,"projects"))return{kind:"project",label:EZ(),litCall:A??void 0};if(ji(z,"compute"))return{kind:"project",label:$Y(),litCall:A??void 0};const Z=O.map(Pct).find(oe=>oe!=null);if(Z){const oe=qv(Z.path);return{kind:oe?"skill":"read",label:oe?$1({name:Ae(oe)}):af({target:Ae(rc(Z.path))}),filePath:Z.path,fileRef:Z.ref,labelTarget:oe?`${oe} skill`:rc(Z.path)}}const J=O.findIndex(oe=>oe!=null&&["sed","cat","head","tail"].includes(oe.name)),H=J>=0?O[J]:null,L=H?Hct(H):null,B=L?Uct(L,E,J,Cs(a,"cwd","workdir")):null;if(L&&B){const oe=qv(B);return{kind:oe?"skill":"read",label:oe?$1({name:Ae(oe)}):af({target:Ae(rc(L))}),filePath:B,labelTarget:oe?`${oe} skill`:rc(L)}}if(O.some(oe=>(oe==null?void 0:oe.name)==="find"||(oe==null?void 0:oe.name)==="ls"||(oe==null?void 0:oe.name)==="rg"&&oe.args.includes("--files")))return{kind:"search",label:I6()};const Y=O.findIndex(oe=>(oe==null?void 0:oe.name)==="rg"||(oe==null?void 0:oe.name)==="grep");if(Y>=0){const oe=Fct(E[Y].raw);return{kind:"search",label:oe?P1({pattern:Ae(oe)}):H1(),searchPattern:oe??void 0}}const G=O.find(oe=>(oe==null?void 0:oe.name)==="git"),re=G==null?void 0:G.args[0];if(re==="grep"){const oe=G==null?void 0:G.args.slice(1).find(se=>!se.startsWith("-"));return{kind:"search",label:oe?P1({pattern:Ae(oe)}):H1(),searchPattern:oe}}if(re==="status")return{kind:"command",label:VY()};if(re==="diff")return{kind:"command",label:iJ()};if(re==="log")return{kind:"command",label:EQ()};const he=oe=>O.some(se=>!se||!["cargo","pnpm","npm","yarn"].includes(se.name)?!1:se.args[0]===oe||se.args[0]==="run"&&se.args[1]===oe);return he("test")?{kind:"command",label:vQ()}:O.some(oe=>(oe==null?void 0:oe.name)==="tsc")||he("typecheck")?{kind:"command",label:fX()}:he("lint")?{kind:"command",label:LY()}:he("build")?{kind:"command",label:SY()}:{kind:"command",label:F$({command:Ae(z)})}}case"skill":{const z=Cs(a,"skill","name"),E=z?Dct(n,z):null;return{kind:"skill",label:z?T$({name:Ae(z)}):E$(),filePath:E??void 0,labelTarget:E&&z?`${z} skill`:void 0}}case"read":{const z=m?rc(m):null,E=m?qv(m):null;return E?{kind:"skill",label:$1({name:Ae(E)}),filePath:m??void 0,labelTarget:`${E} skill`}:z?{kind:"read",label:af({target:Ae(z)}),filePath:m??void 0,labelTarget:z}:{kind:"read",label:wQ()}}case"edit":case"write":case"notebookedit":{const z=Oct(a),E=m??(z==null?void 0:z.path)??null,j=E?rc(E):null,A=j?(z==null?void 0:z.type)==="add"?HB({target:Ae(j)}):(z==null?void 0:z.type)==="delete"?QB({target:Ae(j)}):a$({target:Ae(j)}):null;return j?{kind:"edit",label:A??D6(),filePath:E??void 0,labelTarget:j}:{kind:"edit",label:D6()}}case"grep":{const z=Cs(a,"pattern");return{kind:"search",label:z?P1({pattern:Ae(z)}):H1(),searchPattern:z??void 0}}case"glob":{const z=Cs(a,"pattern");return{kind:"search",label:z?v$({pattern:Ae(z)}):I6()}}case"websearch":{const z=Cs(a,"query"),E=Cs(a,"url"),j=Cs(a,"pattern");return z?{kind:"web",label:p6({query:z})}:j&&E?{kind:"web",label:AP({pattern:j})}:E?{kind:"web",label:B$({target:Ae(E)})}:{kind:"web",label:g??T6()}}case"webfetch":{const z=Cs(a,"url");return{kind:"web",label:z?af({target:Ae(z)}):g??_H()}}case"task":return{kind:"agent",label:g??V$()};case"subagent":return{kind:"agent",label:Wct(a)};case"error":return{kind:"command",label:JJ()};case"contextcompaction":return{kind:"command",label:MB(),progressLabel:OB()};default:{const z=g??m??o??((C=e.state)==null?void 0:C.title)??"";return{kind:"command",label:z?`${n}: ${z}`:n}}}}function Wct(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 QP();case"sendInput":return KP();case"resumeAgent":return wH();case"wait":return vF();case"closeAgent":return zB()}switch(typeof e.kind=="string"?e.kind:""){case"started":return uF();case"interacted":return fB();case"interrupted":return aF()}return nF()}function pp({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=h.jsx(Sx,{...t});if(e.litCall)r=h.jsx(_N,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=h.jsx(LE,{...t});break;case"read":case"project":r=h.jsx(OE,{...t});break;case"search":r=h.jsx(KE,{...t});break;case"edit":r=h.jsx(xx,{...t});break;case"web":r=h.jsx(tVe,{...t});break;case"agent":r=h.jsx(kx,{...t});break}return h.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function Wv({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,a]=M.useState(!1),o=M.useRef(null),l=M.useRef(!1);return M.useEffect(()=>{var c,d;!s||!l.current||(l.current=!1,(d=(c=o.current)==null?void 0:c.querySelector("button"))==null||d.focus())},[s]),h.jsxs("span",{className:"tool-target-overflow inline",children:[s&&h.jsx("span",{className:"tool-target-reveal",ref:o,children:e.map((c,d)=>h.jsxs("span",{children:[d>0&&", ",n||t?h.jsx("button",{className:"tool-target",...n?vr(_=>n(c.id,_),{stopPropagation:!0}):{onClick:_=>{_.stopPropagation(),t==null||t(c.id)}},children:c.label}):h.jsx("span",{children:c.label})]},c.id))}),s&&", ",h.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?DO({target:r}):eB({count:an(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),l.current=!s&&c.detail===0,a(d=>!d)},children:s?Q9():Nre({count:an(e.length)})})]})}function E2({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:a,experimentName:o}){var l,c,d,_;if(e.searchPattern)return e.label;if(((l=e.litCall)==null?void 0:l.kind)==="paper"&&e.litCall.id)return h.jsxs("a",{className:"tool-target",href:mYe(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,h.jsx(lGe,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return h.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...vr(m=>n(f,void 0,void 0,e.fileRef,m),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const f=e.spawnedSessionIds,m=f.slice(0,3),g=f.slice(m.length).map((S,k)=>({id:S,label:C6({number:an(m.length+k+1)})}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",h.jsx("button",{className:"tool-target",title:IZ(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(S)},children:C6({number:an(k+1)})})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Wv,{items:g,onSelect:r,targetType:BV()})]})]})}if((d=e.runIds)!=null&&d.length){const f=s?e.runIds.filter(S=>!!s(S)):e.runIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(s==null?void 0:s(S))||_o()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",t?h.jsx("button",{className:"tool-target",title:dI({run:Ae(S)}),...vr(b=>t(S,b),{stopPropagation:!0}),children:(s==null?void 0:s(S))||_o()}):h.jsx("span",{children:(s==null?void 0:s(S))||_o()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Wv,{items:g,onOpen:t,targetType:yte()})]})]})}if((_=e.experimentIds)!=null&&_.length){const f=o?e.experimentIds.filter(S=>!!o(S)):e.experimentIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(o==null?void 0:o(S))||_o()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",a?h.jsx("button",{className:"tool-target",title:JO({name:(o==null?void 0:o(S))||Ae(S)}),...vr(b=>a(S,b),{stopPropagation:!0}),children:(o==null?void 0:o(S))||_o()}):h.jsx("span",{children:(o==null?void 0:o(S))||_o()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Wv,{items:g,onOpen:a,targetType:qW()})]})]})}return e.label}function t4(e){const n=e.progressLabel??{skill:D$(),read:vH(),search:qP(),edit:u$(),project:FH(),web:xB(),agent:KB(),command:XH()}[e.kind];return{...e,label:n}}function VT(e,n){const t=Cl({tool:e,state:{status:"running",input:n}});return{skill:w$(),read:X$(),search:eP(),edit:n$(),project:EH(),web:mB(),agent:qB(),command:VH()}[t.kind]}function Kct(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const Yct=250;function Xct(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),a=M.useRef(e);return M.useEffect(()=>{if(a.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 o=Yct-(Date.now()-s.current);if(o<=0){s.current=Date.now(),r(e);return}const l=window.setTimeout(()=>{s.current=Date.now(),r(a.current)},o);return()=>window.clearTimeout(l)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const Zct=160;function WT(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),Zct);return()=>window.clearTimeout(r)},[e]),e&&n}function Qct(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:W9()}}function Jct(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 eut(e){const n=[];let t=null;for(const r of e){const s=Cl(r),a=Jct(r,s),o=n[n.length-1];a&&o&&t===a?o.count++:n.push({part:r,activity:s,count:1}),t=a}return n}function tut({part:e,busy:n,recovering:t,onRecover:r}){var m,g;const s=(m=e.state)==null?void 0:m.input,a=(s==null?void 0:s.nextRetryAt)??null,[o,l]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof a!="number"||(l(Date.now()),a<=Date.now()))return;const S=window.setInterval(()=>{const k=Date.now();l(k),k>=a&&window.clearInterval(S)},1e3);return()=>window.clearInterval(S)},[a]),e.id==="turn-retry"){const S=tYe(s??{},o);return h.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[h.jsx(dn,{}),h.jsx("span",{children:S})]})}const c=fN(s==null?void 0:s.recoveryAction),d=s==null?void 0:s.turnId;if(c!=="retry"&&c!=="continue"||!d)return null;const _=c==="retry"?Pu():kW(),f=hm(((g=e.state)==null?void 0:g.error)||fne());return h.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[h.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:f,children:f}),h.jsx(Qe,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(d,c),children:t?$te():_})]})}function Ck({part:e,repeatCount:n=1,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const c=e.state,d=Cl(e),_=(c==null?void 0:c.status)==="error",f=hm((c==null?void 0:c.error)||(c==null?void 0:c.output)||""),m=_&&!!f,[g,S]=M.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=h.jsxs(h.Fragment,{children:[_&&h.jsxs("span",{className:"sr-only",children:[ax()," "]}),_?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(HE,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):h.jsx(pp,{activity:d,className:"text-muted"}),h.jsxs("span",{className:`${LT} ${_?"text-accent-red":"text-subtext"}`,children:[h.jsx(E2,{activity:d,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}),n>1&&h.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:FO({count:an(n)}),children:["×",n]})]})]});return m?h.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[h.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[b,h.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":g,"aria-controls":k,"aria-label":g?BO({activity:d.label}):XI({activity:d.label}),onClick:()=>S(v=>!v),children:h.jsx(Ma,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${g?"rotate-90":""}`})})]}),g&&h.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:h.jsx("div",{className:"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",children:f.slice(0,2e4)})})]}):h.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function nut({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){var z,E,j,A;const[c,d]=M.useState(!1),_=eut(e),f=_.map(({activity:D})=>D),m=n?_.at(-1):void 0,g=m==null?void 0:m.part,S=m==null?void 0:m.activity,k=((z=g==null?void 0:g.state)==null?void 0:z.status)!=="error"?(S&&t4(S))??null:null,b=!!g&&((E=g.state)==null?void 0:E.status)==="running"&&!(k!=null&&k.progressLabel)&&(Kct((j=g.state)==null?void 0:j.input)||(k==null?void 0:k.kind)==="command"&&!Cs(((A=g.state)==null?void 0:A.input)??{},"command","cmd")),v=Xct(k,b),x=WT(v!=null),y=v??Qct(f),C=v?v.label:W9();return e.length===1?v?h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[h.jsx(pp,{activity:v,className:x?"tool-running-shimmer-icon":"text-muted"}),h.jsx("span",{className:`${x?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:C,children:h.jsx(E2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})})]})}):h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsx(Ck,{part:e[0],onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[h.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:[h.jsx(pp,{activity:y,className:x?"tool-running-shimmer-icon":"text-muted"}),v?h.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${x?"tool-running-shimmer":""}`,title:C,children:h.jsx(E2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:()=>d(D=>!D),"aria-expanded":c,children:C}),h.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:()=>d(D=>!D),"aria-expanded":c,"aria-label":c?xW():HW(),children:h.jsx(Ma,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),h.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:h.jsx("div",{className:"tool-group-disclosure-inner",children:h.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:_.map(({part:D,count:O})=>h.jsx(Ck,{part:D,repeatCount:O,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l},D.id))})})})]})}function rut({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[a,o]=M.useState([]),l=!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 g=s.approved===!0?{label:YZ(),icon:di,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:oQ(),icon:xx,iconClass:"text-accent-amber"}:s.approved===!1?{label:JZ(),icon:hs,iconClass:"text-accent-red"}:{label:rQ(),icon:Fu,iconClass:"text-muted"},S=g.icon;return h.jsxs("details",{className:Act,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?K9():V6()}),h.jsx(S,{size:17,strokeWidth:1.8,className:`shrink-0 ${g.iconClass}`}),h.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:g.label}),h.jsx(Ma,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),h.jsxs("div",{className:`${wk} ms-6`,children:[h.jsx(Na,{text:s.plan??"",onOpenFile:t}),s.note&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",m=(s.annotations??[]).map((g,S)=>({id:`${e.id}-annotation-${S}`,text:g.text}));return h.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[m.length>0&&h.jsx(e4,{annotations:m,variant:"sent"}),h.jsxs("details",{className:zct,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||Hee()}),h.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||hte()})]}),h.jsxs("div",{className:wk,children:[s.header&&s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&h.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(g=>{var S;return h.jsx("li",{className:(S=s.answers)!=null&&S.includes(g.label)?"sel":"",children:g.label},g.label)})}),s.note&&s.note!==f&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return h.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 ${l?"readonly":""}`,children:[h.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?Ree():V6()}),h.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:h.jsx(Na,{text:s.plan??"",onOpenFile:t})}),f&&h.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...vr(m=>r(s.plan??"",e.id,m)),children:aee()}),!l&&!f&&h.jsxs("div",{className:k2,children:[h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:OK()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:HK()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!1}),children:DQ()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},m=Cs(f,"command","cmd","filePath","file_path","path")||"",g=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",S=Cs(f,"description")||"",k=g||S||VT(s.tool,f),b=`permission-heading-${e.id}`;return h.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 ${l?"readonly":""}`,role:"group","aria-labelledby":b,children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[h.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:h.jsx(YE,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),h.jsx("span",{id:b,className:"text-base font-semibold text-text",children:nY()})]}),h.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[h.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),m&&h.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:m}),!l&&h.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[h.jsx(Qe,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:DX()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:QK()})]})]})]})}const d=f=>o(m=>s.multiSelect?m.includes(f)?m.filter(g=>g!==f):[...m,f]:[f]);return h.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 ${l?"readonly":""}`,children:[s.header&&h.jsx("div",{className:Tct,children:s.header}),s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),h.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const m=a.includes(f.label);return h.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 ${m?"sel":""}`,disabled:l,onClick:()=>l?void 0:s.multiSelect?d(f.label):c({answers:[f.label]}),children:[h.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&h.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!l&&h.jsx("div",{className:k2,children:h.jsx(Qe,{size:"small",variant:"primary",disabled:a.length===0,onClick:()=>c({answers:a}),children:GJ()})})]})}function sut(e,n){return e.role==="user"?!0:e.parts.some(t=>tp(t,n))}function iut(e){const n=e.text??"",t=n.startsWith("data:")?n:DKe(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",a=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:a,name:s}}function aut({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:a,onEdit:o,editDisabled:l}){const c=e>1;return h.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${c?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[c&&h.jsxs(h.Fragment,{children:[h.jsx(Qt,{size:"small",title:$6(),"aria-label":$6(),disabled:a||!t,onClick:()=>t&&s(t),children:h.jsx(IE,{size:14})}),h.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),h.jsx(Qt,{size:"small",title:B6(),"aria-label":B6(),disabled:a||!r,onClick:()=>r&&s(r),children:h.jsx(Ma,{size:14})})]}),h.jsx(Qt,{size:"small",title:R6(),"aria-label":R6(),disabled:l,onClick:o,children:h.jsx(xx,{size:13})})]})}const out=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,busy:g=!1,recoveringTurnId:S,onRecover:k,skills:b,predictTextTail:v=!1,forkCount:x,forkIndex:y=0,forkPrevId:C,forkNextId:z,forkDisabled:E,branchDisabled:j,onFork:A,onSelectFork:D}){var V,X;kc();const[O,P]=M.useState(null);if(n.role==="user"){const W=n.parts.filter(Y=>Y.type==="text").map(Y=>Y.text??"").join(` -`),Z=Y=>!!(b!=null&&b.some(G=>G.name===Y)),J=n.parts.filter(Y=>Y.type==="image"&&Y.text).map(iut),H=J.filter(Y=>!Y.isPdf),L=J.filter(Y=>Y.isPdf),B=n.parts.filter(Y=>Y.type==="annotation"&&Y.text).map(Y=>({id:Y.id,text:Y.text??""}));if(O!==null){const Y=()=>{const G=O.trim();!G||E||(P(null),A(n.id,G))};return h.jsx("div",{className:"msg-user-group self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:h.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[h.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":PX(),value:O,autoFocus:!0,onChange:G=>P(G.target.value),onKeyDown:G=>{G.key==="Escape"?(G.preventDefault(),P(null)):G.key==="Enter"&&!G.shiftKey&&!G.nativeEvent.isComposing&&(G.preventDefault(),Y())}}),h.jsxs("div",{className:`${k2} justify-end`,children:[h.jsx(Qe,{size:"small",onClick:()=>P(null),children:NY()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:Y,disabled:E||!O.trim(),children:vb()})]})]})})}return h.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[B.length>0&&h.jsx(e4,{annotations:B,variant:"sent"}),h.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]:me-0.5 [&_.skill-chip]:align-baseline",children:[h.jsx(Jlt,{text:W,isCommand:Z}),H.length>0&&h.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:H.map((Y,G)=>h.jsx("a",{href:Y.src,target:"_blank",rel:"noreferrer",children:h.jsx("img",{src:Y.src,alt:lW()})},G))}),L.length>0&&h.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:L.map((Y,G)=>h.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:Y.src,target:"_blank",rel:"noreferrer",children:[h.jsx(Fu,{size:15}),h.jsx("span",{children:Y.name})]},G))})]}),x!==void 0&&h.jsx(aut,{count:x,index:y,prevId:C,nextId:z,onSelect:D,pagerDisabled:j,onEdit:()=>P(W),editDisabled:E})]})}const $=n.parts.find(bh),F=$?n.parts.filter(W=>W!==$):n.parts;return h.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[KT(F,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:v}),$&&h.jsx(tut,{part:$,busy:g,recovering:S===((X=(V=$.state)==null?void 0:V.input)==null?void 0:X.turnId),onRecover:k})]})});function KT(e,n){var x,y;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:g=!1}=n,S=e.filter(C=>C.type!=="steer"&&tp(C,t)).at(-1),k=[];let b=[];const v=()=>{b.length!==0&&(k.push(h.jsx(nut,{parts:b,pendingTail:b.some(C=>C.id===r),onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d},`tg-${b[0].id}`)),b=[])};for(const C of e)if(tp(C,t)){if(C.type==="tool"&&(cut(C.tool)||(((x=C.children)==null?void 0:x.length)??0)>0)){v(),k.push(h.jsx(dut,{part:C,pendingTail:g&&((y=C.state)==null?void 0:y.status)==="running"||C.id===r,onOpenSubagent:m},C.id));continue}if(C.type==="tool"){b.push(C);continue}v(),C.type==="text"?k.push(h.jsx(Na,{text:C.text,onOpenFile:s,onOpenRun:a,predict:g&&C.id===(S==null?void 0:S.id)},C.id)):C.type==="steer"?k.push(h.jsx("div",{dir:"auto",role:"note","aria-label":wee(),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(h.jsx(rut,{part:C,onRespond:_,onOpenFile:s,onOpenPlan:f},C.id))}return v(),k}function lut(e){return Cl(e).label}function cut(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function YT(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 n4(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&n4(t.children,n);if(r)return r}return null}function uut({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o}){var S,k,b,v;const l=e.children??[],c=((S=e.state)==null?void 0:S.status)==="running",d=((k=e.state)==null?void 0:k.status)==="error",_=d?hm(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",f=KT(l,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o,predictTextTail:c,pendingTailToolId:c?uN(l):null}),g=l.some(x=>x.type==="text"&&!!x.text)?"":YT(e);return h.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[d&&h.jsxs("span",{className:"sr-only",children:[ax()," "]}),_&&h.jsx("div",{className:"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",children:_.slice(0,2e4)}),f.length===0&&!g&&!_?h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?ox():hK()}):h.jsxs(h.Fragment,{children:[f,g&&h.jsx(Na,{text:g,onOpenFile:n,onOpenRun:t})]})]})}function dut({part:e,pendingTail:n,onOpenSubagent:t}){var d,_,f,m;const r=((d=e.state)==null?void 0:d.status)==="error",s=hm(((_=e.state)==null?void 0:_.error)||((f=e.state)==null?void 0:f.output)||""),a=n&&!r?t4(Cl(e)):Cl(e),o=WT(!!(n&&!r)),l=(((m=e.children)==null?void 0:m.length)??0)===0&&!r&&!YT(e),c=h.jsxs(h.Fragment,{children:[r&&h.jsxs("span",{className:"sr-only",children:[ax()," "]}),r?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(HE,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):h.jsx(pp,{activity:a,className:`subagent-icon ${o?"tool-running-shimmer-icon":"text-muted"}`}),h.jsx("span",{className:`${LT} ${o?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:a.label})]});return l?h.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}):h.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:AK(),...vr(g=>t==null?void 0:t(e.id,a.label,g)),disabled:!t,children:[c,h.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:h.jsx(Ma,{size:12})})]})}function fut(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,a)=>{var o,l;for(const c of s){const d=`${a}/${c.id}`;c.type==="tool"&&((o=c.state)!=null&&o.status)&&n.set(d,{status:c.state.status,part:c}),(l=c.children)!=null&&l.length&&r(c.children,d)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function r4(e){const n=(t,r)=>{var s;for(const a of t){const o=a.prompt;if(a.type==="prompt"&&(o==null?void 0:o.kind)==="permission"&&!o.resolved){const l=o.toolInput??{},d=Cs(l,"reason","description")||VT(o.tool,l);return{id:a.id,path:`${r}/${a.id}`,label:d}}if((s=a.children)!=null&&s.length){const l=n(a.children,`${r}/${a.id}`);if(l)return l}}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 hut(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var S,k,b,v,x;const s=((S=e[0])==null?void 0:S.id)??"",{messageId:a,states:o}=fut(e),l=r4(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},t(y=>({text:l?m6({label:ka(l.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===a?r.current.states:new Map,d=r.current.permissionPath,_=[...o].filter(([y,C])=>{var z;return((z=c.get(y))==null?void 0:z.status)!==C.status});if(r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},l&&l.path!==d){t(y=>({text:m6({label:ka(l.label)}),sequence:y.sequence+1}));return}const f=(k=_.find(([,y])=>bh(y.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const y=fN((v=(b=f.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${JF()}${y?` ${y==="retry"?RF():AF()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(y=>({text:CF(),sequence:y.sequence+1}));return}const m=_.filter(([,y])=>y.status==="error");if(m.length>0){const y=m.slice(0,2).map(([,C])=>Cl(C.part).label).join(", ");t(C=>({text:m.length===1?GF({labels:y}):YF({count:an(m.length),labels:y}),sequence:C.sequence+1}));return}const g=_.filter(([,y])=>y.status==="running");if(g.length>0){const y=(x=g.at(-1))==null?void 0:x[1].part;t(C=>({text:y?t4(Cl(y)).label:IF(),sequence:C.sequence+1}));return}_.some(([,y])=>y.status==="completed")&&t(y=>({text:PF(),sequence:y.sequence+1}))},[e]),n}const _ut=M.memo(function({messages:n,allMessages:t,canFork:r,onFork:s,onSelectFork:a,busy:o,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,recoveringTurnId:b,onRecover:v,skills:x}){var D;kc();const y=((D=r4(n))==null?void 0:D.id)??null,C=M.useMemo(()=>n.filter(O=>sut(O,y)),[n,y]),z=M.useMemo(()=>{const O=C.filter(P=>P.role==="user"&&!P.id.startsWith(Mu));return UKe(t,n,O,P=>P.startsWith(Mu))},[n,C,t]),E=C.at(-1),j=hut(n),A=o?dN(n):null;return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:h.jsx("span",{children:j.text},j.sequence)}),C.map(O=>{var V,X,W,Z,J,H;const P=O.parts.find(bh),$=(X=(V=P==null?void 0:P.state)==null?void 0:V.input)==null?void 0:X.turnId,F=P?o||b!==null:!1;return h.jsx(out,{message:O,forkCount:(W=z.get(O.id))==null?void 0:W.count,forkIndex:(Z=z.get(O.id))==null?void 0:Z.index,forkPrevId:(J=z.get(O.id))==null?void 0:J.prevId,forkNextId:(H=z.get(O.id))==null?void 0:H.nextId,forkDisabled:!r,branchDisabled:o,onFork:s,onSelectFork:a,activePermissionId:y,pendingTailToolId:(A==null?void 0:A.messageId)===O.id?A.toolId:null,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,busy:F,recoveringTurnId:$===b?b:null,onRecover:v,skills:x,predictTextTail:o&&O===E&&O.role==="assistant"},O.id)})]})}),Ek=(e,n)=>e==="all"?!0:e==="archived"?n:!n,XT=[{id:"active",label:qK,railLabel:Y9},{id:"archived",label:z6,railLabel:z6},{id:"all",label:KK,railLabel:FV}];function put({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=zo();return h.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[h.jsx(Qt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:O6(),"aria-label":O6(),onClick:()=>r(a=>!a),children:h.jsx($Ve,{size:13})}),t&&h.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:XT.map(a=>h.jsxs(Zr,{onClick:()=>{n(a.id),r(!1)},children:[h.jsx("span",{children:a.label()}),e===a.id&&h.jsx(di,{size:13})]},a.id))})]})}const mut=14,gut=500,vut=1200;function ZT({title:e,animate:n}){return n?h.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?h.jsx("span",{"aria-hidden":!0,children:t},r):h.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*mut,gut)}ms`},children:t},r))}):h.jsx(h.Fragment,{children:e})}function but({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:a,onOpen:o,onRename:l,onSetArchived:c,onDelete:d}){var z;const{open:_,setOpen:f,ref:m}=zo(),g=((z=e.title)==null?void 0:z.trim())||"Untitled",[S,k]=M.useState(!1),[b,v]=M.useState(""),x=M.useRef(null);function y(){var E;v(((E=e.title)==null?void 0:E.trim())||""),k(!0)}function C(){var j;const E=b.trim();k(!1),E&&E!==(((j=e.title)==null?void 0:j.trim())||"")&&l(E)}return M.useEffect(()=>{var E,j;S&&((E=x.current)==null||E.focus(),(j=x.current)==null||j.select())},[S]),h.jsxs("div",{ref:m,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]:w-3.5 [&_.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]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.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-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]: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-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${S?"editing":""}`,title:`${wf[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?Lte():""}`,onClick:()=>{S||(_?f(!1):o())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?f(!1):o())},children:[h.jsx("span",{className:"session-dot",children:r?h.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&h.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!S&&h.jsx(kx,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),S?h.jsx("input",{ref:x,className:"session-title-input","aria-label":SJ(),value:b,onChange:E=>v(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),k(!1))}}):h.jsx("span",{className:"session-title",children:h.jsx(ZT,{title:g,animate:a!==void 0},a??"static")}),h.jsx("span",{className:"session-time",children:Rct(e.updatedAt)}),h.jsx("button",{className:"session-menu-btn",title:U6(),"aria-label":U6(),onClick:E=>{E.stopPropagation(),f(j=>!j)},children:h.jsx(gx,{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:[h.jsx(Zr,{onClick:E=>{E.stopPropagation(),f(!1),y()},children:h.jsx("span",{children:tJ()})}),h.jsx(Zr,{onClick:E=>{E.stopPropagation(),f(!1),c(!e.archived)},children:h.jsx("span",{children:e.archived?xne():XV()})}),h.jsx(Zr,{danger:!0,onClick:E=>{E.stopPropagation(),f(!1),d()},children:h.jsx("span",{children:TX()})})]})]})}const Nk=[OE,KE,Sx,vx],Kv=[{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"}],zk="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function xut({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:a,onSelectMainView:o,experimentsActive:l,filesActive:c,artifactsActive:d,onOpenExperiments:_,onOpenArtifacts:f,onOpenFile:m,onOpenRun:g,runExperimentName:S,onOpenExperiment:k,experimentName:b,onOpenPlan:v,onOpenSubagent:x,onOpenWorktree:y,onOpenDemoWelcome:C,composerPrefill:z=null,onActiveSessionChange:E,preferredAgent:j,onPreferredAgentChange:A,children:D}){var Io,Ih,Bh;const[O,P]=M.useState([]),[$,F]=M.useState(null),[V,X]=M.useState(new Set),[W,Z]=M.useState("active"),[J,H]=M.useState(""),[L,B]=M.useState([]),Y=M.useRef(0),G=M.useRef({projectId:e,activeId:$});G.current={projectId:e,activeId:$};const[re,he]=M.useState([]),[oe,se]=M.useState(null),[q,te]=M.useState(null),le=M.useRef(Promise.resolve()),ge=M.useRef(0),ue=M.useRef(0),[Ce,Ee]=M.useState(null),Le=M.useRef(null),Pe=M.useRef(!1),Ve=M.useRef(null),[ft,Be]=M.useReducer(Mct,{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}}),[wt,zt]=M.useState([]),[vt,Lt]=M.useState(j);M.useEffect(()=>Lt(j),[j]);const[St,kt]=M.useState({}),[xe,je]=M.useState({}),[We,st]=M.useState(null),nt=M.useRef(!1),Ht=M.useRef(null),[bt,tn]=M.useState(null),Vt=M.useRef(null),[pn,Dt]=M.useState(new Map),En=M.useRef(new Map),Ft=M.useRef(new Set),xr=M.useRef(new Set),mn=M.useRef(0),Ye=M.useRef([]),xt=M.useRef(null),Vn=M.useRef(null),Wn=M.useRef(!0),[Et,rt]=M.useState(!0),Ie=M.useRef(null),it=zo(),Ut=M.useCallback(ie=>{var me;Y.current+=1,B(ze=>[...ze,{id:`annotation-${Y.current}`,...ie}]),(me=Ie.current)==null||me.focus()},[]),Jt=Sct(Vn,Ut);kct(L),M.useEffect(()=>{B([]),Jt.dismiss()},[$,e,Jt.dismiss]);const[jt,Dn]=M.useState([]),[_r,as]=M.useState(0),[ar,yr]=M.useState(!1),[Ts,Nn]=M.useState(0),nn=M.useRef(!1);M.useEffect(()=>{vKe().then(Dn).catch(()=>{})},[a]);function Pn(ie){if(!Sr)return;if(ie.source==="command"&&ie.name==="plan"){Br(J,Sr);return}const me=mk(J,Sr,ie.name,2);H(me.text),window.requestAnimationFrame(()=>{var ze,Te;(ze=Ie.current)==null||ze.focus(),(Te=Ie.current)==null||Te.setSelectionRange(me.cursor,me.cursor),Nn(me.cursor)})}function Or(ie){const me=ie.selectionStart;if(nn.current||me!==ie.selectionEnd)return!1;const ze=Hv(J,me);if(!ze||ze.end!==me||!Ro(ze.query))return!1;const Te=gk(J,ze);return H(Te.text),Nn(Te.cursor),window.requestAnimationFrame(()=>ie.setSelectionRange(Te.cursor,Te.cursor)),!0}function Ir(ie){se(null);let Te=re.reduce((Xe,At)=>Xe+At.size,0);for(const Xe of ie){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Xe.type))continue;if(Xe.size>31457280){se(fW({name:Ae(Xe.name)}));continue}if(Te+Xe.size>41943040){se(mW());continue}Te+=Xe.size;const At=new FileReader;At.onload=()=>{const Qr=At.result;he(Jr=>[...Jr,{dataUrl:Qr,mediaType:Xe.type,name:Xe.name,size:Xe.size}])},At.readAsDataURL(Xe)}}function Gr(ie){const me=Array.from(ie.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);me.length>0&&(ie.preventDefault(),Ir(me))}const ln=O.find(ie=>ie.id===$),or=vt??Lot(wt),Cn=ln?{harness:ln.harness,model:St.model??ln.model,serviceTier:St.serviceTier!==void 0?St.serviceTier:ln.serviceTier,permissionMode:St.permissionMode??ln.permissionMode,reasoningLevel:St.reasoningLevel??ln.reasoningLevel}:or?{...or,...St}:null,Je=Cn?wt.find(ie=>ie.id===Cn.harness):void 0,_t=Je==null?void 0:Je.options,wr=M.useMemo(()=>Wlt(jt,_t==null?void 0:_t.planActivation),[jt,_t==null?void 0:_t.planActivation]),Sr=Hv(J,Ts),Vr=(Sr==null?void 0:Sr.query)??null,Fn=Vr===null?[]:wr.filter(ie=>ie.name.startsWith(Vr)),gs=Vr!==null&&(Sr==null?void 0:Sr.end)===Ts&&Fn.some(ie=>ie.name!==Vr)&&!ar?Fn:[],os=gs.length>0,js=Math.min(_r,Math.max(0,gs.length-1));M.useEffect(()=>as(0),[Vr]);const Xt=Cn&&Je&&Je.models.length>0&&!Je.models.some(ie=>ie.id===Cn.model)?Je.models[0].id:(Cn==null?void 0:Cn.model)??null,Ot=Cn&&{...Cn,model:Xt,serviceTier:Q0(Je,Xt,Cn.serviceTier),reasoningLevel:lN(Je,Xt,Cn.reasoningLevel)},Ws=$p(Je,Ot==null?void 0:Ot.model),Ii=ie=>{if(!Ot)return;const me={...Ot,...ie},ze={};ie.model!==void 0&&ie.model!==Ot.model&&(ze.model=ie.model),ie.serviceTier!==void 0&&ie.serviceTier!==Ot.serviceTier&&(ze.serviceTier=ie.serviceTier),ie.permissionMode!==void 0&&ie.permissionMode!==Ot.permissionMode&&(ze.permissionMode=ie.permissionMode),ie.reasoningLevel!==void 0&&ie.reasoningLevel!==Ot.reasoningLevel&&(ze.reasoningLevel=ie.reasoningLevel),je(Te=>({...Te,...ze})),Lt(me),A(me).catch(()=>{}),ln?kt(Te=>({...Te,...ie})):ie.harness&&ie.harness!==Ot.harness&&kt({})},kr=M.useCallback(ie=>{const me=le.current.catch(()=>{}).then(ie);return le.current=me.then(()=>{},()=>{}),me},[]),ls=ie=>{if(ie==="plan"&&(Je==null?void 0:Je.id)==="claude-code"?(je(Te=>({...Te,permissionMode:ie})),kt(Te=>({...Te,permissionMode:ie}))):(kt(Te=>{const Xe={...Te};return delete Xe.permissionMode,Xe}),Ii({permissionMode:ie})),!ln)return;const me=ln.id,ze=++ge.current;te(null),kr(()=>jKe(me,ie)).then(Te=>{P(Xe=>Xe.map(At=>At.id===Te.id?Te:At)),ge.current===ze&&kt(Xe=>{const At={...Xe};return delete At.permissionMode,At})}).catch(()=>{ge.current===ze&&(kt(Te=>{const Xe={...Te};return delete Xe.permissionMode,Xe}),te(Nne()))})},vs=ie=>Ii({reasoningLevel:ie}),lr=(Ot==null?void 0:Ot.harness)==="claude-code"?Ot.permissionMode==="plan":(_t==null?void 0:_t.planActivation)==="command"?Ce??(ln==null?void 0:ln.planMode)??!1:!1;M.useEffect(()=>{Ce===null||(ln==null?void 0:ln.planMode)!==Ce||(Le.current=null,Ee(null))},[ln==null?void 0:ln.planMode,Ce]);async function Ks(ie){if(je(Te=>({...Te,planMode:ie})),Le.current=ie,Ee(ie),!ln)return;const me=ln.id,ze=++ue.current;te(null);try{const Te=await kr(()=>TKe(me,ie));P(Xe=>Xe.map(At=>At.id===Te.id?Te:At)),ue.current===ze&&(Le.current=null,Ee(null),te(null))}catch(Te){throw ue.current===ze&&(Le.current=null,Ee(null)),Te}}async function Rl(){if((Ot==null?void 0:Ot.harness)==="claude-code"){ls("auto");return}if(ln)try{await Ks(!1)}catch{te(OW())}}async function $a(){const ie=!lr;try{if((Ot==null?void 0:Ot.harness)==="claude-code")ls(ie?"plan":"auto");else if((_t==null?void 0:_t.planActivation)==="command")await Ks(ie);else throw new Error(K6())}catch{te(Y6())}}function Br(ie,me){const ze=gk(ie,me);H(ze.text),yr(!0),$a(),window.requestAnimationFrame(()=>{var Te,Xe;(Te=Ie.current)==null||Te.focus(),(Xe=Ie.current)==null||Xe.setSelectionRange(ze.cursor,ze.cursor),Nn(ze.cursor)})}Ye.current=O;const cs=M.useCallback(async()=>{const ie=Ye.current.map(me=>me.id);try{const me=(await A0(e)).filter(Te=>!xr.current.has(Te.id)),ze=new Set(me.map(Te=>Te.id));for(const Te of ie)ze.has(Te)||ke(Te);return P(Te=>{const Xe=new Map(Te.map(At=>[At.id,At.contextUsage]));return me.map(At=>({...At,contextUsage:At.contextUsage??Xe.get(At.id)}))}),En.current=new Map(me.map(Te=>[Te.id,Te.title])),Be({type:"seedBusy",sessions:me.filter(Te=>Te.busy).map(Te=>Te.id),known:me.map(Te=>Te.id)}),me}catch{return null}},[e]),Ys=M.useCallback(async ie=>{const me=G.current.activeId===ie?Ht.current:void 0,[{messages:ze,queued:Te,activeLeafId:Xe}]=await Promise.all([Cu(ie),cs()]),At=me!==void 0&&G.current.activeId===ie&&Ht.current!==me;Be({type:"seed",sessionId:ie,messages:ze,queued:Te,activeLeafId:At?Ht.current:Xe})},[cs,Be]);M.useEffect(()=>{P([]),Ye.current=[],F(null);const ie=DT();X(e===V1?new Set([XE,ZE].filter(me=>!ie.has(me))):new Set),H(""),he([]),Be({type:"reset"}),Ft.current=new Set,Dt(new Map),En.current=new Map,cs().then(me=>{me&&F(ze=>{var Te,Xe;return ze??(e===V1?(Te=me.find(At=>At.id===Cf))==null?void 0:Te.id:void 0)??((Xe=me.find(At=>!At.archived))==null?void 0:Xe.id)??null})})},[e,cs]),M.useEffect(()=>{je({}),Vt.current=null},[$]),M.useEffect(()=>{!$||Ft.current.has($)||(Ft.current.add($),Cu($).then(({messages:ie,queued:me,activeLeafId:ze})=>Be({type:"seed",sessionId:$,messages:ie,queued:me,activeLeafId:ze})).catch(()=>{Be({type:"seed",sessionId:$,messages:[],onlyIfAbsent:!0}),Ft.current.delete($)}))},[$]),M.useEffect(()=>Bf(ie=>{switch(ie.type){case"session":{if(ie.session.projectId!==e||xr.current.has(ie.session.id))return;const me=En.current.has(ie.session.id),ze=En.current.get(ie.session.id)!==ie.session.title;En.current.set(ie.session.id,ie.session.title),me&&ze&&ie.session.titleSource==="generated"&&(Dt(Te=>{const Xe=new Map(Te);return Xe.set(ie.session.id,(Te.get(ie.session.id)??0)+1),Xe}),window.setTimeout(()=>{Dt(Te=>{if(!Te.has(ie.session.id))return Te;const Xe=new Map(Te);return Xe.delete(ie.session.id),Xe})},vut)),P(Te=>{const Xe=Te.findIndex(Qr=>Qr.id===ie.session.id);if(Xe<0)return[ie.session,...Te];const At=Te.slice();return At[Xe]={...ie.session,contextUsage:ie.session.contextUsage??Te[Xe].contextUsage},At});break}case"sessionDeleted":ke(ie.sessionId);break;case"message":mn.current++,Be({type:"upsertMessage",sessionId:ie.sessionId,message:ie.message});break;case"busy":Be({type:"busy",sessionId:ie.sessionId,busy:ie.busy});break;case"queued":Be({type:"setQueued",sessionId:ie.sessionId,items:ie.items});break;case"branch":Be({type:"activeLeaf",sessionId:ie.sessionId,leafId:ie.activeLeafId});break;case"usage":P(me=>me.map(ze=>ze.id===ie.sessionId?{...ze,contextUsage:ie.usage}:ze));break}}),[e]),M.useEffect(()=>Bf(ie=>{if(ie.type!=="reconnected"||(cs(),!$||!Ft.current.has($)))return;const me=ze=>{const Te=mn.current;Cu($).then(({messages:Xe,queued:At,activeLeafId:Qr})=>{Be({type:"seed",sessionId:$,messages:Xe,queued:At,activeLeafId:Qr}),ze&&mn.current!==Te&&me(!1)}).catch(()=>{})};me(!0)}),[$,cs]);const Kn=$?ft.messagesBySession[$]??Sk:Sk,Bi=$?ft.activeLeafBySession[$]??null:null;Ht.current=Bi;const Yn=M.useMemo(()=>PKe(Kn,Bi),[Kn,Bi]),Ln=$?ft.busySessions.has($):!1,Xs=!Ln&&!!(Je!=null&&Je.agentReady),na=Ln&&dN(Yn)!=null,Rc=Ln&&qKe(Yn),cr=$?ft.queuedBySession[$]??[]:[],Ha=cr.some(ie=>ie.dispatchState==="retrying"),Pa=cr.findIndex(ie=>ie.dispatchState==="blocked"),Fa=cr.reduce((ie,me)=>me.dispatchState!=="retrying"||typeof me.nextRetryAt!="number"?ie:ie===null?me.nextRetryAt:Math.min(ie,me.nextRetryAt),null),[Mo,Ms]=M.useState(()=>Date.now());M.useEffect(()=>{if(!Ha||Fa===null||(Ms(Date.now()),Fa<=Date.now()))return;const ie=window.setInterval(()=>{const me=Date.now();Ms(me),me>=Fa&&window.clearInterval(ie)},1e3);return()=>window.clearInterval(ie)},[Ha,Fa]),M.useEffect(()=>{const ie=cr.reduce((me,ze)=>ze.planMode??me,void 0);ie!==void 0?(Pe.current=!0,Le.current=ie,Ee(ie)):Pe.current&&(Pe.current=!1,Le.current=null,Ee(null))},[cr]);const Dc=!!$&&!($ in ft.messagesBySession),Ua=M.useMemo(()=>{const ie=new Set;for(const me of ft.busySessions)(ft.messagesBySession[me]??[]).some(ze=>ze.parts.some(Te=>Te.type==="prompt"&&Te.prompt&&!Te.prompt.resolved&&Te.prompt.nativeId))&&ie.add(me);return ie},[ft.busySessions,ft.messagesBySession]),bs=$?Ua.has($):!1,nr=ln,qa=nr?pn.get(nr.id):void 0,ur=M.useMemo(()=>{var ie;for(let me=Yn.length-1;me>=0;me--)for(const ze of Yn[me].parts)if(ze.type==="prompt"&&((ie=ze.prompt)==null?void 0:ie.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[Yn]),Wr=M.useMemo(()=>{const ie=nr==null?void 0:nr.harness;if(!$||ie!=="claude-code"&&ie!=="codex")return null;for(let me=Yn.length-1;me>=0;me--)for(const ze of Yn[me].parts)if(!(ze.type!=="prompt"||!ze.prompt||ze.prompt.resolved)&&ze.prompt.kind==="question")return ze.prompt.nativeId&&!ft.busySessions.has($)?null:ze.id;return null},[Yn,nr==null?void 0:nr.harness,$,ft.busySessions]),Ro=ie=>!Wr&&wr.some(me=>me.name===ie),[us,Do]=M.useState(null),ra=us&&us.sessionId===$?us:null;M.useEffect(()=>{if(!us)return;const ie=ft.busySessions.has(us.sessionId),me=us.sessionId===$&&ur&&ur.promptId!==us.promptId;(!ie||me)&&Do(null)},[us,ur,ft.busySessions,$]);const Zs=M.useMemo(()=>r4(Yn),[Yn]),sa=Ln&&!!(Je!=null&&Je.supportsSteering)&&!!(Je!=null&&Je.agentReady)&&!ur&&!Wr&&!Zs&&re.length===0&&L.length===0,xi=M.useMemo(()=>v&&$?(ie,me,ze)=>v(ie,$,me,ze):void 0,[v,$]),Rs=M.useMemo(()=>x&&$?(ie,me,ze)=>x($,ie,me,ze):void 0,[x,$]),Lo=M.useMemo(()=>m&&((ie,me,ze,Te,Xe)=>m(ie,$??void 0,me,ze,Te,Xe)),[m,$]);M.useEffect(()=>{ge.current+=1,ue.current+=1;const ie=($?ft.queuedBySession[$]??[]:[]).reduce((me,ze)=>ze.planMode??me,void 0);Pe.current=ie!==void 0,Le.current=ie??null,Ee(ie??null),kt({}),te(null)},[$]),M.useEffect(()=>{E==null||E($)},[$,E]);const pr=a==="chat"&&(Yn.length>0||Ln),Hn=(Ot==null?void 0:Ot.harness)??null,Qs=(Ot==null?void 0:Ot.model)??null,[Ds,yi]=M.useState(null),gn=`${e}\0${Hn??""}\0${Qs??""}`,Js=a==="chat"&&!pr&&!Dc;M.useEffect(()=>{if(!Js||!Hn)return;let ie=!0;return fWe(e,Hn,Qs,N()).then(me=>{ie&&yi({key:gn,prompts:me.prompts})}).catch(()=>{ie&&yi({key:gn,prompts:null})}),()=>{ie=!1}},[e,Hn,Qs,gn,Js]);const Cr=(Ds==null?void 0:Ds.key)===gn?Ds.prompts:null,ia=Hn!==null&&(Ds==null?void 0:Ds.key)!==gn,_d=ie=>{H(ie),yr(!1),window.requestAnimationFrame(()=>{const me=Ie.current;me&&(me.focus(),me.setSelectionRange(ie.length,ie.length),Nn(ie.length))})};M.useEffect(()=>{z&&(H(z),yr(!1),Nn(z.length))},[z]);const Ga=M.useCallback(ie=>{const me=ie.scrollHeight-ie.scrollTop-ie.clientHeight<60;Wn.current=me,rt(me)},[]),$r=M.useCallback(()=>{Wn.current=!0,rt(!0);const ie=xt.current;ie&&(ie.scrollTop=ie.scrollHeight)},[]);M.useLayoutEffect(()=>{$r()},[$,pr,$r]),M.useLayoutEffect(()=>{Wn.current&&$r()},[Yn,Ln,$r]),M.useEffect(()=>{const ie=xt.current,me=Vn.current;if(!ie||!me)return;const ze=new ResizeObserver(()=>{if(Wn.current){ie.scrollTop=ie.scrollHeight;return}Ga(ie)});return ze.observe(me),ze.observe(ie),()=>ze.disconnect()},[pr,Ga]);const aa=M.useCallback(ie=>{ie.currentTarget.blur(),$r()},[$r]);async function Ls({queue:ie=!1}={}){var Ph,Ll,yd,wd,Oc;const me=J.trim(),ze=Wr?null:Klt(me,_t==null?void 0:_t.planActivation),Te=!!ze,Xe=!lr,At=Ylt(_t==null?void 0:_t.planActivation,Te?Xe:void 0,Le.current),Qr=Te&&(Je==null?void 0:Je.id)==="claude-code"?Xe?"plan":"auto":void 0,Jr=ze?ze.prompt:me,Hi=re,oa=L,Dl=oa.map(xn=>({text:xn.text})),$h=e;let gd=$;const vd=()=>{const xn=G.current;return xn.projectId===$h&&xn.activeId===gd},Pi=()=>{vd()&&(H(xn=>xn||me),he(xn=>xn.length?xn:Hi),B(xn=>xn.length?xn:oa))};if(Te&&!Jr&&Hi.length===0&&oa.length===0){H(""),yr(!1);try{if((Je==null?void 0:Je.id)==="claude-code")ls(Xe?"plan":"auto");else if((_t==null?void 0:_t.planActivation)==="command")await Ks(Xe);else throw new Error(K6())}catch{te(Y6()),Pi()}return}const rr=Ot?{...Ot,...Qr?{permissionMode:Qr}:{}}:null;Qr&&ls(Qr);let bd=null;const Hh=Le.current;Te&&(_t==null?void 0:_t.planActivation)==="command"&&(bd=++ue.current,Le.current=Xe,Ee(Xe));const Bo=()=>{bd===null||ue.current!==bd||(Le.current=Hh,Ee(Hh))};if(!Jr&&Hi.length===0&&oa.length===0)return;if((Jr||oa.length>0)&&Wr&&Hi.length===0){H(""),B([]),at({promptId:Wr,answers:[],note:Jr||void 0,annotations:Dl}).then(xn=>{xn||Pi()});return}const xd=JSON.stringify({text:Jr,images:Hi.map(xn=>({mediaType:xn.mediaType,name:xn.name,dataUrl:xn.dataUrl})),annotations:Dl,settings:rr?{model:rr.model,serviceTier:rr.serviceTier,permissionMode:rr.permissionMode,planMode:At,reasoningLevel:rr.reasoningLevel}:null}),Fi=((Ph=Vt.current)==null?void 0:Ph.signature)===xd?Vt.current.id:`ct_${crypto.randomUUID()}`;if(Vt.current={signature:xd,id:Fi},Ln){if(!$||!(Je!=null&&Je.agentReady)){Bo();return}const xn=$;H(""),he([]),B([]),se(null);const la=rr?{model:rr.model,serviceTier:rr.serviceTier,permissionMode:rr.permissionMode,planMode:(_t==null?void 0:_t.planActivation)==="command"?At??(ln==null?void 0:ln.planMode):At,reasoningLevel:rr.reasoningLevel}:{};kt({});const ca=Hi.map(Er=>({mediaType:Er.mediaType,dataBase64:Er.dataUrl.slice(Er.dataUrl.indexOf(",")+1),name:Er.name}));try{(Ll=(await kr(()=>q7(xn,Jr,la,ca.length?ca:void 0,Dl,Fi,sa&&!ie&&!Te?"steer":void 0))).turn)!=null&&Ll.existing&&await Ys(xn),je({}),((yd=Vt.current)==null?void 0:yd.id)===Fi&&(Vt.current=null)}catch{Bo(),Pi()}return}if(!(Je!=null&&Je.agentReady)){Bo();return}if(!rr){Bo();return}H(""),he([]),B([]),se(null);let ws=$;try{if(!ws){const Hr=await EKe(e,rr.harness,{model:rr.model,serviceTier:rr.serviceTier,permissionMode:rr.permissionMode,planMode:At,reasoningLevel:rr.reasoningLevel});Ft.current.add(Hr.id),P(Pm=>[Hr,...Pm]),F(Hr.id),ws=Hr.id,gd=Hr.id,G.current={projectId:e,activeId:Hr.id}}Be({type:"optimisticUser",sessionId:ws,text:Jr||sW(),attachments:Hi.map(Hr=>({url:Hr.dataUrl,mediaType:Hr.mediaType,name:Hr.name})),annotations:oa}),Be({type:"busy",sessionId:ws,busy:!0}),$r(),W==="archived"&&Z("active");const xn=rr?{model:rr.model,serviceTier:rr.serviceTier,permissionMode:rr.permissionMode,planMode:At,reasoningLevel:rr.reasoningLevel}:{};kt({});const la=Hi.map(Hr=>({mediaType:Hr.mediaType,dataBase64:Hr.dataUrl.slice(Hr.dataUrl.indexOf(",")+1),name:Hr.name})),ca=ws;if(!ca)throw new Error(jte());(wd=(await kr(()=>q7(ca,Jr,xn,la.length?la:void 0,Dl,Fi))).turn)!=null&&wd.existing&&await Ys(ca),je({}),((Oc=Vt.current)==null?void 0:Oc.id)===Fi&&(Vt.current=null)}catch(xn){if(Pi(),Bo(),!ws)return;const la=xn instanceof Error?xn.message:String(xn);if(!/session is busy/i.test(la)&&await A0(e).then(Er=>{var Ic;return!!((Ic=Er.find(Hr=>Hr.id===ws))!=null&&Ic.busy)}).catch(()=>!1)){vd()&&(H(Er=>Er===Jr?"":Er),he(Er=>Er===Hi?[]:Er),B(Er=>Er===oa?[]:Er));return}Be({type:"busy",sessionId:ws,busy:!1}),Be({type:"localError",sessionId:ws,text:nK({error:Ae(la)})})}}function Va(){$&&BKe($).catch(()=>{te(Wte())})}const pd=M.useCallback(async(ie,me)=>{if(!(!$||nt.current)){nt.current=!0,te(null),st(ie);try{const ze=rYe({model:xe.model,serviceTier:xe.serviceTier,permissionMode:xe.permissionMode,planMode:xe.planMode,reasoningLevel:xe.reasoningLevel}),Te=$;(await LKe(Te,ie,me,ze)).turn.existing&&await Ys(Te),je({})}catch{te(tte())}finally{nt.current=!1,st(null)}}},[$,xe,Ys]),md=M.useCallback((ie,me)=>{if(!$||Ln||!(Je!=null&&Je.agentReady))return;const ze=$;Be({type:"busy",sessionId:ze,busy:!0}),$r(),kr(()=>OKe(ze,ie,me)).catch(Te=>{Be({type:"busy",sessionId:ze,busy:!1});const Xe=Te instanceof Error?Te.message:String(Te);Be({type:"localError",sessionId:ze,text:cte({error:Ae(Xe)})})})},[$,Ln,Je==null?void 0:Je.agentReady,$r,kr]),Lc=M.useCallback(ie=>{if(!$||Ln)return;const me=$,ze=Ht.current;Be({type:"activeLeaf",sessionId:me,leafId:ie}),kr(()=>IKe(me,ie)).catch(Te=>{Be({type:"activeLeaf",sessionId:me,leafId:ze});const Xe=Te instanceof Error?Te.message:String(Te);Be({type:"localError",sessionId:me,text:Zte({error:Ae(Xe)})})})},[$,Ln,kr]);function ae(ie){if(!$)return;const me=$;MKe(me,ie).then(({removed:ze})=>{if(ze)return Ys(me)}).catch(()=>te(ite()))}async function be(ie){if(!$||bt)return;const me=$;te(null),tn(ie);try{await RKe(me,ie),await Ys(me)}catch{te(gte())}finally{tn(null)}}M.useEffect(()=>{if(!Ln||a!=="chat")return;function ie(me){var ze;me.key!=="Escape"||me.defaultPrevented||(me.preventDefault(),Va(),(ze=Ie.current)==null||ze.focus())}return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[Ln,$,a]);function ke(ie){xr.current.add(ie),P(me=>me.filter(ze=>ze.id!==ie)),F(me=>me===ie?null:me),X(me=>{if(!me.has(ie))return me;const ze=new Set(me);return ze.delete(ie),ze}),Ft.current.delete(ie),En.current.delete(ie),Be({type:"forget",sessionId:ie})}function De(ie,me){const ze=ie.archived;P(Te=>Te.map(Xe=>Xe.id===ie.id?{...Xe,archived:me}:Xe)),Ek(W,me)||F(Te=>Te===ie.id?null:Te),zKe(ie.id,me).catch(()=>{P(Te=>Te.map(Xe=>Xe.id===ie.id?{...Xe,archived:ze}:Xe))})}function $e(ie,me){const ze=ie.title;P(Te=>Te.map(Xe=>Xe.id===ie.id?{...Xe,title:me}:Xe)),AKe(ie.id,me).catch(()=>{P(Te=>Te.map(Xe=>Xe.id===ie.id?{...Xe,title:ze}:Xe))})}async function pt(ie){var ze;const me=((ze=ie.title)==null?void 0:ze.trim())||U1();if(window.confirm(zW({title:ka(me)}))){try{await NKe(ie.id)}catch(Te){DN(MW({title:ka(me),error:Ae(Te instanceof Error?Te.message:String(Te))}),"error");return}ke(ie.id)}}const at=M.useCallback(ie=>{if(!$)return Promise.resolve(!1);const me=$;return Be({type:"busy",sessionId:me,busy:!0}),kr(()=>$Ke(me,ie)).then(()=>!0).catch(()=>!1).finally(()=>{Cu(me).then(({messages:ze,queued:Te,activeLeafId:Xe})=>Be({type:"seed",sessionId:me,messages:ze,queued:Te,activeLeafId:Xe})).catch(()=>{}),A0(e).then(ze=>{var Te;return Be({type:"busy",sessionId:me,busy:!!((Te=ze.find(Xe=>Xe.id===me))!=null&&Te.busy)})}).catch(()=>{})})},[$,e,kr]),It=O.filter(ie=>Ek(W,ie.archived)),zn=/Mac|iPhone|iPad/.test(navigator.platform),xs=zn?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",ys=zn?"⌘ Enter":"Ctrl + Enter",Kr=M.useCallback(()=>{Z("active"),F(null),o("chat")},[o]),wi=M.useCallback(ie=>{Z("all"),F(ie),o("chat")},[o]);M.useEffect(()=>{const ie=me=>{me.repeat||me.key!=="Enter"||!me.metaKey&&!me.ctrlKey||me.altKey||!me.shiftKey||(me.preventDefault(),Kr())};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[Kr]);const Oo=h.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 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]:py-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,h.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[h.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 ${c?"active":""}`,onClick:y,children:[h.jsx(If,{size:15}),sZ()]}),h.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 ${d?"active":""}`,"data-onboarding":"nav-artifacts",onClick:f,children:[h.jsx(bx,{size:15}),cY()]}),h.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 ${l?"active":""}`,onClick:_,children:[h.jsx(vx,{size:15}),ZX()]}),h.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 ${a==="skills"?"active":""}`,onClick:()=>o("skills"),children:[h.jsx(LE,{size:15}),bX()]}),Flt.map(ie=>h.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 ${a!=="chat"&&a!=="skills"&&ie.activeTabs.includes(a)?"active":""}`,"data-onboarding":ie.id==="compute"?"nav-compute":void 0,onClick:()=>o(ie.id),children:[ie.icon,ie.label()]},ie.id))]}),h.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-1.5 ps-4.5",children:[h.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((Io=XT.find(ie=>ie.id===W))==null?void 0:Io.railLabel())??Y9()}),h.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[h.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":xs,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Kr,children:[h.jsx(yx,{size:13}),YJ()]}),h.jsx(put,{value:W,onChange:Z})]})]}),h.jsxs("div",{className:"rail-body",children:[It.map(ie=>h.jsx(but,{session:ie,active:ie.id===$&&a==="chat",unread:V.has(ie.id),busy:ft.busySessions.has(ie.id),waiting:Ua.has(ie.id),revealTitle:pn.get(ie.id),onOpen:()=>{F(ie.id),e===V1&&sct(ie.id),X(me=>{if(!me.has(ie.id))return me;const ze=new Set(me);return ze.delete(ie.id),ze}),o("chat")},onRename:me=>$e(ie,me),onSetArchived:me=>De(ie,me),onDelete:()=>void pt(ie)},ie.id)),It.length===0&&h.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:W==="archived"?gK():O.length>0?cK():yK()})]})]}),$i=`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 [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::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${r?"":" rail-hidden"}`,Wa=!r&&h.jsx(Qt,{title:q6(),"aria-label":q6(),onClick:s,children:h.jsx(GE,{size:15})});return a!=="chat"?h.jsxs(h.Fragment,{children:[r&&Oo,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&h.jsx("div",{className:$i,children:Wa}),h.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):h.jsxs(h.Fragment,{children:[r&&Oo,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[h.jsxs("div",{className:$i,children:[Wa,h.jsx(Kf,{variant:"header",title:nr?((Ih=nr.title)==null?void 0:Ih.trim())||U1():E6(),children:nr?h.jsx(ZT,{title:((Bh=nr.title)==null?void 0:Bh.trim())||U1(),animate:qa!==void 0},qa??"static"):E6()}),C&&h.jsx(Qt,{"data-tip":N6(),"aria-label":N6(),onClick:C,children:h.jsx(yGe,{size:15})})]}),Dc?h.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:[h.jsx(dn,{}),h.jsx("span",{children:TZ()})]}):pr?h.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:xt,onScroll:ie=>{Ga(ie.currentTarget),Jt.dismiss()},children:h.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:Vn,children:[h.jsx(_ut,{messages:Yn,allMessages:Kn,canFork:Xs,onFork:md,onSelectFork:Lc,busy:Ln,onOpenFile:Lo,onOpenRun:g,onOpenSpawnedSession:wi,runExperimentName:S,onOpenExperiment:k,experimentName:b,onRespond:at,onOpenPlan:xi,onOpenSubagent:Rs,recoveringTurnId:We,onRecover:pd,skills:wr}),Ln&&bs&&h.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:_ee()}),Ln&&!bs&&!na&&!Rc&&h.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:h.jsx("span",{className:"tool-running-shimmer",children:ine()})})]})}):h.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:[h.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:h.jsx(zx,{})}),h.jsx("h2",{children:vee()}),h.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:[h.jsx(If,{size:19}),h.jsx("span",{children:n})]}),ia&&h.jsx("div",{className:zk,role:"status","aria-live":"polite","aria-label":DJ(),"aria-busy":"true",children:Nk.map((ie,me)=>h.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 ${Kv[me].box}`,children:[h.jsxs("span",{className:`flex w-full items-center gap-2.5 ${Kv[me].icon}`,children:[h.jsx(ie,{size:17}),h.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),h.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},me))}),Cr&&h.jsx("div",{className:zk,role:"group","aria-label":BJ(),children:Cr.map((ie,me)=>{const ze=Nk[me],Te=Kv[me];return h.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 ${Te.box}`,onClick:()=>_d(ie.prompt),children:[h.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[h.jsx(ze,{size:17,className:Te.icon}),ie.title]}),h.jsx("span",{className:"w-full truncate text-sm text-subtext",children:ie.prompt})]},me)})})]}),Jt.action&&h.jsxs(Qe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:Jt.action.x,top:Jt.action.top,transform:"translateX(-50%)"},onMouseDown:ie=>ie.preventDefault(),onClick:Jt.add,children:[h.jsx(qE,{size:14}),hY()]}),h.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:[pr&&h.jsx(Qt,{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 ${Et?"opacity-0":"opacity-100"}`,title:W6(),"aria-label":W6(),inert:Et,onClick:aa,children:Ln&&!bs?h.jsx(gx,{size:18,className:"tool-running-shimmer-icon"}):h.jsx(sGe,{size:16})}),ur&&!(ra&&ur.promptId===ra.promptId)&&h.jsx(yot,{synthesized:ur.synthesized,agentLabel:nr?wf[nr.harness]:tne(),showResumeModes:(nr==null?void 0:nr.harness)==="claude-code",onView:ie=>xi==null?void 0:xi(ur.plan,ur.promptId,ie),onApprove:ie=>at({promptId:ur.promptId,approve:!0,...ie?{resumeMode:ie}:{}}),onReject:()=>at({promptId:ur.promptId,approve:!1}),onRevise:ie=>{$&&Do({sessionId:$,promptId:ur.promptId}),at({promptId:ur.promptId,approve:!1,note:ie})}}),cr.length>0&&h.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:cr.map((ie,me)=>h.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:ie.error?`${ie.text} +`).trim()}function Zdt(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 Qdt(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=gZe(r),JT(r)}function JT(e){return eft(e).replace(/[\t\r ]+/g," ").trim()}function Jdt(e){let n=null,t=!1;for(let r=0;r!a.startsWith("-")&&a.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&tj(s)?{ref:r,path:s}:null}function rft(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 A8(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 a of n.split("/"))if(!(!a||a===".")){if(a===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(a);continue}r.push(a)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function sft(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let a=0;a!d.startsWith("-"));if(!l)return null;const c=A8(s,l);if(!c)return null;s=c}return s?A8(s,e):e}const xa="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",ift=new RegExp(`\\bchat_(${xa})\\b`,"gi"),_c=`(?:${xa}|[0-9a-f]{8})`;function Bu(e){const n=[];let t="",r="",s=null,a=!1;const o=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},l=d=>{let _=1,f=null,m=!1;for(let g=d;g{let _=!1;for(let f=d;fxZe(t.raw,n))}function ji(e,n){return mm(e,n).length>0}function aft(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,ZT).matchAll(ift))if(n.add(t[0].toLowerCase()),n.size>=Sl)break;return[...n]}function z2(e,n){if(!e)return[];const t=new Set,r=e.slice(0,ZT),s=n==="runs"?[new RegExp(`/runs/(${xa})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${xa})`,"gi"),new RegExp(`^\\s*RUN\\s+(${xa})\\b`,"gim"),new RegExp(`={3,}\\s*(${xa})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${xa})`,"gi"),new RegExp(`^\\s*id:\\s*(${xa})`,"gim"),new RegExp(`={3,}\\s*(${xa})\\s*={3,}`,"gi")];for(const o of s)for(const l of r.matchAll(o))if(t.add(l[1]),t.size>=Sl)return[...t];const a=new RegExp(`^\\s*(${xa})(?:\\s|$)`,"gim");for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Sl)break;return[...t]}function rj(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),a=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,a+r.raw.length),{invocation:r,offset:Math.max(0,a)}})}function sj(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let a="";for(const o of e.matchAll(s)){if((o.index??0)>=t)break;a=o[1]??o[2]??o[3]??""}return[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function ij(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let a="";for(const o of e.matchAll(s)){const l=o.index??0;if(l>=t)break;const c=l+o[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(a=o[1])}return/\$\(|`/.test(a)?[]:[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function oft(e,n,t=[],r=[]){const s=mm(e,"logs"),a=new Set;if(s.length===0){if(!ji(e,"logs"))return[];const l=t.length>0?[]:z2(n,"runs");for(const c of t.length>0?t:l.length>0?l:r)if(a.add(c),a.size>=Sl)break;return Iu([...a])}let o=!1;for(const{invocation:l,offset:c}of rj(e,s)){const d=Ku(l.raw);if((d==null?void 0:d[0])!=="logs")continue;const _=d.slice(1);let f=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){f=v;break}}}if(!f){o=!0;continue}if(new RegExp(`^${_c}$`,"i").test(f)){a.add(f);continue}const m=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(f);if(!m){o=!0;continue}const g=m[1],S=sj(e,g,c,_c);for(const b of S)a.add(b);const k=ij(e,g,c,_c);for(const b of k)a.add(b);S.length===0&&k.length===0&&(o=!0)}if(a.size===0||o){const l=t.length>0?[]:z2(n,"runs"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=Sl)break}return Iu([...a])}function bu(e,n,t=[],r=[]){const s=mm(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const a=new Set;let o=!1;for(const{invocation:l,offset:c}of rj(e,s)){const d=Ku(l.raw),_=(d==null?void 0:d[0])==="exp"&&(d[1]==="status"||d[1]==="desc")?d[2]:null;let f=!1;_&&new RegExp(`^${_c}$`,"i").test(_)&&(a.add(_),f=!0);const m=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(m){const g=m[1],S=sj(e,g,c,_c);if(S.length>0){for(const b of S)a.add(b);f=!0}const k=ij(e,g,c,_c);for(const b of k)a.add(b);k.length>0&&(f=!0)}f||(o=!0)}if(a.size===0||o){const l=t.length>0?[]:z2(n,"experiments"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=Sl)break}return Iu([...a])}function kl(e){var b,v,x,y;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)):{},a={...t,...s},o=Cs(a,"command","cmd"),l=Xdt(a,"commandArgv"),c=((v=e.state)==null?void 0:v.output)||((x=e.state)==null?void 0:x.error),d=Iu(Kv(a,"targetIds")),_=Iu(Kv(a,"runTargetIds")),f=Iu(Kv(a,"experimentTargetIds")),m=Cs(a,"filePath","file_path","notebookPath","notebook_path","path"),g=Cs(a,"description"),S=bN(n);if(Pp(n)){const C=xN(e);return{kind:"task",label:C?LF({done:Vt(C.done),total:Vt(C.total)}):Z9()}}if(S==="run"&&vN(n).includes("web")){const C=Wv(a,"search_query","q"),A=Wv(a,"image_query","q"),E=Wv(a,"find","pattern");return C?{kind:"web",label:x6({query:C})}:A?{kind:"web",label:LP({query:A})}:E?{kind:"web",label:JP({pattern:E})}:Array.isArray(a.open)?{kind:"web",label:dQ()}:Array.isArray(a.weather)?{kind:"web",label:MX()}:Array.isArray(a.finance)?{kind:"web",label:kX()}:Array.isArray(a.sports)?{kind:"web",label:zX()}:Array.isArray(a.time)?{kind:"web",label:xX()}:{kind:"web",label:L6()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(S)??S){case"bash":{if(!o&&!(l!=null&&l.length))return{kind:"command",label:BQ()};const C=Qdt(o??(l==null?void 0:l.join(" "))??""),A=Bu(C);let E=A.map(oe=>oe.raw);if(l!=null&&l.length){const oe=bZe(l);E=oe===null?[l]:Bu(JT(oe)).map(he=>he.raw)}let j=null;for(const oe of E)if(j=yZe(oe),j)break;const T=E.some(oe=>{const he=Ku(oe);return he!==null&&he[0]!=="discover"&&he[0]!=="paper"});if(j&&!T){const oe=j.kind==="discover"?{keyword:gP(),embedding:yP(),openalex:VP(),biorxiv:CP()}[j.strategy]:null,he=j.kind==="discover"?j.query?N$({activity:oe??b6(),query:j.query}):oe??b6():j.id?lf({target:Ae(j.id)}):gH();return{kind:j.kind==="paper"?"read":"search",label:he,litCall:j}}if(ji(C,"agent\\s+spawn"))return{kind:"agent",label:XX(),spawnedSessionIds:aft(c),litCall:j??void 0};const D=A.map(oe=>nj(oe.raw)),I=ji(C,"exp\\s+status"),P=ji(C,"exp\\s+desc"),H=mm(C,"exp\\s+desc").some(oe=>(Ku(oe.raw)??[]).some(ie=>ie==="--set"||ie.startsWith("--set=")||ie==="--stdin")),F=H?jF():hH(),V=H?IB():ZH();if(ji(C,"logs")){const oe=oft(C,c,_,d);return{kind:"project",label:oe.length===1?UH():WH(),runIds:oe,litCall:j??void 0}}if(ji(C,"exp\\s+run"))return{kind:"project",label:eee(),litCall:j??void 0};if(ji(C,"exp\\s+wait"))return{kind:"project",label:Dee(),litCall:j??void 0};if(ji(C,"exp\\s+cancel"))return{kind:"project",label:tX(),litCall:j??void 0};const X=ji(C,"project\\s+view");if(X&&I&&P)return{kind:"project",label:V,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(X&&P)return{kind:"project",label:F,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(X&&I)return{kind:"project",label:O6(),experimentIds:bu(C,c,f,d),litCall:j??void 0};if(X)return{kind:"project",label:eJ(),litCall:j??void 0};if(I&&P)return{kind:"project",label:V,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(I)return{kind:"project",label:O6(),experimentIds:bu(C,c,f,d),litCall:j??void 0};if(P)return{kind:"project",label:F,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(ji(C,"runs?"))return{kind:"project",label:VZ(),litCall:j??void 0};if(ji(C,"projects"))return{kind:"project",label:XZ(),litCall:j??void 0};if(ji(C,"compute"))return{kind:"project",label:cX(),litCall:j??void 0};const W=D.map(nft).find(oe=>oe!=null);if(W){const oe=Vv(W.path);return{kind:oe?"skill":"read",label:oe?P1({name:Ae(oe)}):lf({target:Ae(sc(W.path))}),filePath:W.path,fileRef:W.ref,labelTarget:oe?`${oe} skill`:sc(W.path)}}const Z=D.findIndex(oe=>oe!=null&&["sed","cat","head","tail"].includes(oe.name)),J=Z>=0?D[Z]:null,B=J?tft(J):null,L=B?sft(B,A,Z,Cs(a,"cwd","workdir")):null;if(B&&L){const oe=Vv(L);return{kind:oe?"skill":"read",label:oe?P1({name:Ae(oe)}):lf({target:Ae(sc(B))}),filePath:L,labelTarget:oe?`${oe} skill`:sc(B)}}if(D.some(oe=>(oe==null?void 0:oe.name)==="find"||(oe==null?void 0:oe.name)==="ls"||(oe==null?void 0:oe.name)==="rg"&&oe.args.includes("--files")))return{kind:"search",label:F6()};const $=D.findIndex(oe=>(oe==null?void 0:oe.name)==="rg"||(oe==null?void 0:oe.name)==="grep");if($>=0){const oe=rft(A[$].raw);return{kind:"search",label:oe?U1({pattern:Ae(oe)}):F1(),searchPattern:oe??void 0}}const K=D.find(oe=>(oe==null?void 0:oe.name)==="git"),G=K==null?void 0:K.args[0];if(G==="grep"){const oe=K==null?void 0:K.args.slice(1).find(he=>!he.startsWith("-"));return{kind:"search",label:oe?U1({pattern:Ae(oe)}):F1(),searchPattern:oe}}if(G==="status")return{kind:"command",label:mX()};if(G==="diff")return{kind:"command",label:AJ()};if(G==="log")return{kind:"command",label:XQ()};const re=oe=>D.some(he=>!he||!["cargo","pnpm","npm","yarn"].includes(he.name)?!1:he.args[0]===oe||he.args[0]==="run"&&he.args[1]===oe);return re("test")?{kind:"command",label:FQ()}:D.some(oe=>(oe==null?void 0:oe.name)==="tsc")||re("typecheck")?{kind:"command",label:OX()}:re("lint")?{kind:"command",label:iX()}:re("build")?{kind:"command",label:WY()}:{kind:"command",label:tH({command:Ae(C)})}}case"skill":{const C=Cs(a,"skill","name"),A=C?Ydt(n,C):null;return{kind:"skill",label:C?U$({name:Ae(C)}):$$(),filePath:A??void 0,labelTarget:A&&C?`${C} skill`:void 0}}case"read":{const C=m?sc(m):null,A=m?Vv(m):null;return A?{kind:"skill",label:P1({name:Ae(A)}),filePath:m??void 0,labelTarget:`${A} skill`}:C?{kind:"read",label:lf({target:Ae(C)}),filePath:m??void 0,labelTarget:C}:{kind:"read",label:VQ()}}case"edit":case"write":case"notebookedit":{const C=Zdt(a),A=m??(C==null?void 0:C.path)??null,E=A?sc(A):null,j=E?(C==null?void 0:C.type)==="add"?JB({target:Ae(E)}):(C==null?void 0:C.type)==="delete"?d$({target:Ae(E)}):b$({target:Ae(E)}):null;return E?{kind:"edit",label:j??$6(),filePath:A??void 0,labelTarget:E}:{kind:"edit",label:$6()}}case"grep":{const C=Cs(a,"pattern");return{kind:"search",label:C?U1({pattern:Ae(C)}):F1(),searchPattern:C??void 0}}case"glob":{const C=Cs(a,"pattern");return{kind:"search",label:C?j$({pattern:Ae(C)}):F6()}}case"websearch":{const C=Cs(a,"query"),A=Cs(a,"url"),E=Cs(a,"pattern");return C?{kind:"web",label:x6({query:C})}:E&&A?{kind:"web",label:FP({pattern:E})}:A?{kind:"web",label:Z$({target:Ae(A)})}:{kind:"web",label:g??L6()}}case"webfetch":{const C=Cs(a,"url");return{kind:"web",label:C?lf({target:Ae(C)}):g??NH()}}case"task":return{kind:"agent",label:g??iH()};case"subagent":return{kind:"agent",label:lft(a)};case"error":return{kind:"command",label:See()};case"contextcompaction":return{kind:"command",label:GB(),progressLabel:YB()};default:{const C=g??m??o??((y=e.state)==null?void 0:y.title)??"";return{kind:"command",label:C?`${n}: ${C}`:n}}}}function lft(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 dF();case"sendInput":return oF();case"resumeAgent":return LH();case"wait":return FF();case"closeAgent":return PB()}switch(typeof e.kind=="string"?e.kind:""){case"started":return SF();case"interacted":return CB();case"interrupted":return bF()}return pF()}function mp({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=h.jsx(zx,{...t});if(e.litCall)r=h.jsx(NN,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=h.jsx(UE,{...t});break;case"read":case"project":r=h.jsx(qE,{...t});break;case"search":r=h.jsx(nN,{...t});break;case"edit":r=h.jsx(Cx,{...t});break;case"web":r=h.jsx(aKe,{...t});break;case"agent":r=h.jsx(Ax,{...t});break;case"task":r=h.jsx(Sx,{...t});break}return h.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function Yv({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,a]=M.useState(!1),o=M.useRef(null),l=M.useRef(!1);return M.useEffect(()=>{var c,d;!s||!l.current||(l.current=!1,(d=(c=o.current)==null?void 0:c.querySelector("button"))==null||d.focus())},[s]),h.jsxs("span",{className:"tool-target-overflow inline",children:[s&&h.jsx("span",{className:"tool-target-reveal",ref:o,children:e.map((c,d)=>h.jsxs("span",{children:[d>0&&", ",n||t?h.jsx("button",{className:"tool-target",...n?gr(_=>n(c.id,_),{stopPropagation:!0}):{onClick:_=>{_.stopPropagation(),t==null||t(c.id)}},children:c.label}):h.jsx("span",{children:c.label})]},c.id))}),s&&", ",h.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?WO({target:r}):hB({count:Vt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),l.current=!s&&c.detail===0,a(d=>!d)},children:s?sE():Zre({count:Vt(e.length)})})]})}function A2({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:a,experimentName:o}){var l,c,d,_;if(e.searchPattern)return e.label;if(((l=e.litCall)==null?void 0:l.kind)==="paper"&&e.litCall.id)return h.jsxs("a",{className:"tool-target",href:NZe(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,h.jsx(cWe,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return h.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...gr(m=>n(f,void 0,void 0,e.fileRef,m),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const f=e.spawnedSessionIds,m=f.slice(0,3),g=f.slice(m.length).map((S,k)=>({id:S,label:T6({number:Vt(m.length+k+1)})}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",h.jsx("button",{className:"tool-target",title:oQ(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(S)},children:T6({number:Vt(k+1)})})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Yv,{items:g,onSelect:r,targetType:lW()})]})]})}if((d=e.runIds)!=null&&d.length){const f=s?e.runIds.filter(S=>!!s(S)):e.runIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(s==null?void 0:s(S))||po()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",t?h.jsx("button",{className:"tool-target",title:kI({run:Ae(S)}),...gr(b=>t(S,b),{stopPropagation:!0}),children:(s==null?void 0:s(S))||po()}):h.jsx("span",{children:(s==null?void 0:s(S))||po()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Yv,{items:g,onOpen:t,targetType:Gte()})]})]})}if((_=e.experimentIds)!=null&&_.length){const f=o?e.experimentIds.filter(S=>!!o(S)):e.experimentIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(o==null?void 0:o(S))||po()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",a?h.jsx("button",{className:"tool-target",title:fI({name:(o==null?void 0:o(S))||Ae(S)}),...gr(b=>a(S,b),{stopPropagation:!0}),children:(o==null?void 0:o(S))||po()}):h.jsx("span",{children:(o==null?void 0:o(S))||po()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Yv,{items:g,onOpen:a,targetType:_K()})]})]})}return e.label}function a4(e){const n=e.progressLabel??{skill:W$(),read:jH(),search:rF(),edit:S$(),project:tP(),web:RB(),agent:o$(),command:cP(),task:Z9()}[e.kind];return{...e,label:n}}function aj(e,n){const t=kl({type:"tool",tool:e,state:{status:"running",input:n}});return{skill:L$(),read:cH(),search:hP(),edit:p$(),project:$H(),web:AB(),agent:r$(),command:iP(),task:NF()}[t.kind]}function cft(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const uft=250;function dft(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),a=M.useRef(e);return M.useEffect(()=>{if(a.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 o=uft-(Date.now()-s.current);if(o<=0){s.current=Date.now(),r(e);return}const l=window.setTimeout(()=>{s.current=Date.now(),r(a.current)},o);return()=>window.clearTimeout(l)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const fft=160;function oj(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),fft);return()=>window.clearTimeout(r)},[e]),e&&n}function hft(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:J9()}}function _ft(e){const n=new Map,t=new Set;for(const{activity:a,count:o}of e){const c=a.kind==="read"||a.kind==="edit"||a.kind==="web"?`${a.kind}:${a.filePath??a.fileRef??a.label}`:null;if(c){if(t.has(c))continue;t.add(c)}n.set(a.kind,(n.get(a.kind)??0)+(c?1:o))}const s=["read","search","edit","command","web","project","skill","agent"].flatMap(a=>{const o=n.get(a);return o?[pft(a,o)]:[]});return s.length>0?s.join(" · "):J9()}function pft(e,n){const t=n===1,r=Vt(n);switch(e){case"read":return t?iUe():cUe({count:r});case"search":return t?hUe():gUe({count:r});case"edit":return t?UFe():WFe({count:r});case"web":return t?AUe():RUe({count:r});case"project":return t?ZFe():tUe({count:r});case"skill":return t?yUe():CUe({count:r});case"agent":return t?NFe():jFe({count:r});case"command":return t?LFe():$Fe({count:r});case"task":return xx()}}function mft(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 gft(e){const n=[];let t=null;for(const r of e){const s=kl(r),a=mft(r,s),o=n[n.length-1];a&&o&&t===a?o.count++:n.push({part:r,activity:s,count:1}),t=a}return n}function vft({part:e,busy:n,recovering:t,onRecover:r}){var m,g;const s=(m=e.state)==null?void 0:m.input,a=(s==null?void 0:s.nextRetryAt)??null,[o,l]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof a!="number"||(l(Date.now()),a<=Date.now()))return;const S=window.setInterval(()=>{const k=Date.now();l(k),k>=a&&window.clearInterval(S)},1e3);return()=>window.clearInterval(S)},[a]),e.id==="turn-retry"){const S=fZe(s??{},o);return h.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[h.jsx(dn,{}),h.jsx("span",{children:S})]})}const c=CN(s==null?void 0:s.recoveryAction),d=s==null?void 0:s.turnId;if(c!=="retry"&&c!=="continue"||!d)return null;const _=c==="retry"?Gu():KW(),f=pm(((g=e.state)==null?void 0:g.error)||One());return h.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[h.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:f,children:f}),h.jsx(Qe,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(d,c),children:t?cne():_})]})}function T8({part:e,repeatCount:n=1,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const c=e.state,d=kl(e),_=(c==null?void 0:c.status)==="error",f=pm((c==null?void 0:c.error)||(c==null?void 0:c.output)||""),m=_&&!!f,[g,S]=M.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=h.jsxs(h.Fragment,{children:[_&&h.jsxs("span",{className:"sr-only",children:[cx()," "]}),_?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(KE,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):h.jsx(mp,{activity:d,className:"text-muted"}),h.jsxs("span",{className:`${YT} ${_?"text-accent-red":"text-subtext"}`,children:[h.jsx(A2,{activity:d,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}),n>1&&h.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:tI({count:Vt(n)}),children:["×",n]})]})]});return m?h.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[h.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[b,h.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":g,"aria-controls":k,"aria-label":g?ZO({activity:d.label}):cB({activity:d.label}),onClick:()=>S(v=>!v),children:h.jsx(Ma,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${g?"rotate-90":""}`})})]}),g&&h.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:h.jsx("div",{className:"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",children:f.slice(0,2e4)})})]}):h.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function bft({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){var A,E,j,T;const[c,d]=M.useState(!1),_=gft(e),f=_.map(({activity:D})=>D),m=n?_.at(-1):void 0,g=m==null?void 0:m.part,S=m==null?void 0:m.activity,k=((A=g==null?void 0:g.state)==null?void 0:A.status)!=="error"?(S&&a4(S))??null:null,b=!!g&&((E=g.state)==null?void 0:E.status)==="running"&&!(k!=null&&k.progressLabel)&&(cft((j=g.state)==null?void 0:j.input)||(k==null?void 0:k.kind)==="command"&&!Cs(((T=g.state)==null?void 0:T.input)??{},"command","cmd")),v=dft(k,b),x=oj(v!=null),y=v??hft(f),C=v?v.label:_ft(_);return e.length===1?v?h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[h.jsx(mp,{activity:v,className:x?"tool-running-shimmer-icon":"text-muted"}),h.jsx("span",{className:`${x?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:C,children:h.jsx(A2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})})]})}):h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsx(T8,{part:e[0],onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[h.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:[h.jsx(mp,{activity:y,className:x?"tool-running-shimmer-icon":"text-muted"}),v?h.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${x?"tool-running-shimmer":""}`,title:C,children:h.jsx(A2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:()=>d(D=>!D),"aria-expanded":c,children:C}),h.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:()=>d(D=>!D),"aria-expanded":c,"aria-label":c?qW():uK(),children:h.jsx(Ma,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),h.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:h.jsx("div",{className:"tool-group-disclosure-inner",children:h.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:_.map(({part:D,count:I})=>h.jsx(T8,{part:D,repeatCount:I,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l},D.id))})})})]})}function xft({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[a,o]=M.useState([]),l=!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 g=s.approved===!0?{label:bQ(),icon:Ws,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:jQ(),icon:Cx,iconClass:"text-accent-amber"}:s.approved===!1?{label:SQ(),icon:_s,iconClass:"text-accent-red"}:{label:NQ(),icon:Vu,iconClass:"text-muted"},S=g.icon;return h.jsxs("details",{className:qdt,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?eE():Z6()}),h.jsx(S,{size:17,strokeWidth:1.8,className:`shrink-0 ${g.iconClass}`}),h.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:g.label}),h.jsx(Ma,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),h.jsxs("div",{className:`${N8} ms-6`,children:[h.jsx(za,{text:s.plan??"",onOpenFile:t}),s.note&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",m=(s.annotations??[]).map((g,S)=>({id:`${e.id}-annotation-${S}`,text:g.text}));return h.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[m.length>0&&h.jsx(i4,{annotations:m,variant:"sent"}),h.jsxs("details",{className:Udt,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||ute()}),h.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||Ite()})]}),h.jsxs("div",{className:N8,children:[s.header&&s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&h.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(g=>{var S;return h.jsx("li",{className:(S=s.answers)!=null&&S.includes(g.label)?"sel":"",children:g.label},g.label)})}),s.note&&s.note!==f&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return h.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 ${l?"readonly":""}`,children:[h.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?rte():Z6()}),h.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:h.jsx(za,{text:s.plan??"",onOpenFile:t})}),f&&h.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...gr(m=>r(s.plan??"",e.id,m)),children:Tee()}),!l&&!f&&h.jsxs("div",{className:N2,children:[h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:aY()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:uY()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!1}),children:sJ()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},m=Cs(f,"command","cmd","filePath","file_path","path")||"",g=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",S=Cs(f,"description")||"",k=g||S||aj(s.tool,f),b=`permission-heading-${e.id}`;return h.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 ${l?"readonly":""}`,role:"group","aria-labelledby":b,children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[h.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:h.jsx(rN,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),h.jsx("span",{id:b,className:"text-base font-semibold text-text",children:EY()})]}),h.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[h.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),m&&h.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:m}),!l&&h.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[h.jsx(Qe,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:sZ()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:wY()})]})]})]})}const d=f=>o(m=>s.multiSelect?m.includes(f)?m.filter(g=>g!==f):[...m,f]:[f]);return h.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 ${l?"readonly":""}`,children:[s.header&&h.jsx("div",{className:Gdt,children:s.header}),s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),h.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const m=a.includes(f.label);return h.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 ${m?"sel":""}`,disabled:l,onClick:()=>l?void 0:s.multiSelect?d(f.label):c({answers:[f.label]}),children:[h.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&h.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!l&&h.jsx("div",{className:N2,children:h.jsx(Qe,{size:"small",variant:"primary",disabled:a.length===0,onClick:()=>c({answers:a}),children:pee()})})]})}function yft(e,n){return e.role==="user"?!0:e.parts.some(t=>np(t,n))}function wft(e){const n=e.text??"",t=n.startsWith("data:")?n:FXe(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",a=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:a,name:s}}function Sft({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:a,onEdit:o,editDisabled:l}){const c=e>1;return h.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${c?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[c&&h.jsxs(h.Fragment,{children:[h.jsx(Jt,{size:"small",title:q6(),"aria-label":q6(),disabled:a||!t,onClick:()=>t&&s(t),children:h.jsx(GE,{size:14})}),h.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),h.jsx(Jt,{size:"small",title:U6(),"aria-label":U6(),disabled:a||!r,onClick:()=>r&&s(r),children:h.jsx(Ma,{size:14})})]}),h.jsx(Jt,{size:"small",title:B6(),"aria-label":B6(),disabled:l,onClick:o,children:h.jsx(Cx,{size:13})})]})}const kft=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,busy:g=!1,recoveringTurnId:S,onRecover:k,skills:b,predictTextTail:v=!1,forkCount:x,forkIndex:y=0,forkPrevId:C,forkNextId:A,forkDisabled:E,branchDisabled:j,onFork:T,onSelectFork:D}){var V,X;Cc();const[I,P]=M.useState(null);if(n.role==="user"){const W=n.parts.filter(K=>K.type==="text").map(K=>K.text??"").join(` +`),Z=K=>!!(b!=null&&b.some(G=>G.name===K)),J=n.parts.filter(K=>K.type==="image"&&K.text).map(wft),B=J.filter(K=>!K.isPdf),L=J.filter(K=>K.isPdf),$=n.parts.filter(K=>K.type==="annotation"&&K.text).map(K=>({id:K.id,text:K.text??""}));if(I!==null){const K=()=>{const G=I.trim();!G||E||(P(null),T(n.id,G))};return h.jsx("div",{className:"msg-user-group self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:h.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[h.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":dZ(),value:I,autoFocus:!0,onChange:G=>P(G.target.value),onKeyDown:G=>{G.key==="Escape"?(G.preventDefault(),P(null)):G.key==="Enter"&&!G.shiftKey&&!G.nativeEvent.isComposing&&(G.preventDefault(),K())}}),h.jsxs("div",{className:`${N2} justify-end`,children:[h.jsx(Qe,{size:"small",onClick:()=>P(null),children:ZY()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:K,disabled:E||!I.trim(),children:xb()})]})]})})}return h.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[$.length>0&&h.jsx(i4,{annotations:$,variant:"sent"}),h.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]:me-0.5 [&_.skill-chip]:align-baseline",children:[h.jsx(_dt,{text:W,isCommand:Z}),B.length>0&&h.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:B.map((K,G)=>h.jsx("a",{href:K.src,target:"_blank",rel:"noreferrer",children:h.jsx("img",{src:K.src,alt:MW()})},G))}),L.length>0&&h.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:L.map((K,G)=>h.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:K.src,target:"_blank",rel:"noreferrer",children:[h.jsx(Vu,{size:15}),h.jsx("span",{children:K.name})]},G))})]}),x!==void 0&&h.jsx(Sft,{count:x,index:y,prevId:C,nextId:A,onSelect:D,pagerDisabled:j,onEdit:()=>P(W),editDisabled:E})]})}const H=n.parts.find(yh),F=H?n.parts.filter(W=>W!==H):n.parts;return h.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[lj(F,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:v}),H&&h.jsx(vft,{part:H,busy:g,recovering:S===((X=(V=H.state)==null?void 0:V.input)==null?void 0:X.turnId),onRecover:k})]})});function lj(e,n){var y,C,A;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:g=!1}=n,S=e.filter(E=>E.type!=="steer"&&np(E,t)).at(-1),k=[],b=yN(e);let v=[];const x=()=>{v.length!==0&&(k.push(h.jsx(bft,{parts:v,pendingTail:v.some(E=>E.id===r),onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d},`tg-${v[0].id}`)),v=[])};for(const E of e)if(np(E,t)){if(E.type==="tool"&&(Eft(E.tool)||(((y=E.children)==null?void 0:y.length)??0)>0)){x(),k.push(h.jsx(zft,{part:E,pendingTail:g&&((C=E.state)==null?void 0:C.status)==="running"||E.id===r,onOpenSubagent:m},E.id));continue}if(E.type==="tool"&&Pp(E.tool)&&((A=E.state)==null?void 0:A.status)!=="error"){E.id===(b==null?void 0:b.id)&&(x(),k.push(h.jsx(Lct,{list:b.list,live:g},E.id)));continue}if(E.type==="tool"){v.push(E);continue}x(),E.type==="text"?k.push(h.jsx(za,{text:E.text,onOpenFile:s,onOpenRun:a,predict:g&&E.id===(S==null?void 0:S.id)},E.id)):E.type==="steer"?k.push(h.jsx("div",{dir:"auto",role:"note","aria-label":Vee(),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:E.text},E.id)):E.type==="prompt"&&E.prompt&&k.push(h.jsx(xft,{part:E,onRespond:_,onOpenFile:s,onOpenPlan:f},E.id))}return x(),k}function Cft(e){return kl(e).label}function Eft(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function cj(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 o4(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&o4(t.children,n);if(r)return r}return null}function Nft({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o}){var S,k,b,v;const l=e.children??[],c=((S=e.state)==null?void 0:S.status)==="running",d=((k=e.state)==null?void 0:k.status)==="error",_=d?pm(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",f=lj(l,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o,predictTextTail:c,pendingTailToolId:c?SN(l):null}),g=l.some(x=>x.type==="text"&&!!x.text)?"":cj(e);return h.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[d&&h.jsxs("span",{className:"sr-only",children:[cx()," "]}),_&&h.jsx("div",{className:"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",children:_.slice(0,2e4)}),f.length===0&&!g&&!_?h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?ux():IK()}):h.jsxs(h.Fragment,{children:[f,g&&h.jsx(za,{text:g,onOpenFile:n,onOpenRun:t})]})]})}function zft({part:e,pendingTail:n,onOpenSubagent:t}){var d,_,f,m;const r=((d=e.state)==null?void 0:d.status)==="error",s=pm(((_=e.state)==null?void 0:_.error)||((f=e.state)==null?void 0:f.output)||""),a=n&&!r?a4(kl(e)):kl(e),o=oj(!!(n&&!r)),l=(((m=e.children)==null?void 0:m.length)??0)===0&&!r&&!cj(e),c=h.jsxs(h.Fragment,{children:[r&&h.jsxs("span",{className:"sr-only",children:[cx()," "]}),r?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(KE,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):h.jsx(mp,{activity:a,className:`subagent-icon ${o?"tool-running-shimmer-icon":"text-muted"}`}),h.jsx("span",{className:`${YT} ${o?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:a.label})]});return l?h.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}):h.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:JK(),...gr(g=>t==null?void 0:t(e.id,a.label,g)),disabled:!t,children:[c,h.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:h.jsx(Ma,{size:12})})]})}function Aft(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,a)=>{var o,l;for(const c of s){const d=`${a}/${c.id}`;c.type==="tool"&&((o=c.state)!=null&&o.status)&&n.set(d,{status:c.state.status,part:c}),(l=c.children)!=null&&l.length&&r(c.children,d)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function l4(e){const n=(t,r)=>{var s;for(const a of t){const o=a.prompt;if(a.type==="prompt"&&(o==null?void 0:o.kind)==="permission"&&!o.resolved){const l=o.toolInput??{},d=Cs(l,"reason","description")||aj(o.tool,l);return{id:a.id,path:`${r}/${a.id}`,label:d}}if((s=a.children)!=null&&s.length){const l=n(a.children,`${r}/${a.id}`);if(l)return l}}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 Tft(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var S,k,b,v,x;const s=((S=e[0])==null?void 0:S.id)??"",{messageId:a,states:o}=Aft(e),l=l4(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},t(y=>({text:l?y6({label:Ca(l.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===a?r.current.states:new Map,d=r.current.permissionPath,_=[...o].filter(([y,C])=>{var A;return((A=c.get(y))==null?void 0:A.status)!==C.status});if(r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},l&&l.path!==d){t(y=>({text:y6({label:Ca(l.label)}),sequence:y.sequence+1}));return}const f=(k=_.find(([,y])=>yh(y.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const y=CN((v=(b=f.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${SU()}${y?` ${y==="retry"?rU():JF()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(y=>({text:YF(),sequence:y.sequence+1}));return}const m=_.filter(([,y])=>y.status==="error");if(m.length>0){const y=m.slice(0,2).map(([,C])=>kl(C.part).label).join(", ");t(C=>({text:m.length===1?pU({labels:y}):bU({count:Vt(m.length),labels:y}),sequence:C.sequence+1}));return}const g=_.filter(([,y])=>y.status==="running");if(g.length>0){const y=(x=g.at(-1))==null?void 0:x[1].part;t(C=>({text:y?a4(kl(y)).label:oU(),sequence:C.sequence+1}));return}_.some(([,y])=>y.status==="completed")&&t(y=>({text:dU(),sequence:y.sequence+1}))},[e]),n}const jft=M.memo(function({messages:n,allMessages:t,canFork:r,onFork:s,onSelectFork:a,busy:o,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,recoveringTurnId:b,onRecover:v,skills:x}){var D;Cc();const y=((D=l4(n))==null?void 0:D.id)??null,C=M.useMemo(()=>n.filter(I=>yft(I,y)),[n,y]),A=M.useMemo(()=>{const I=C.filter(P=>P.role==="user"&&!P.id.startsWith(Ou));return ZXe(t,n,I,P=>P.startsWith(Ou))},[n,C,t]),E=C.at(-1),j=Tft(n),T=o?kN(n):null;return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:h.jsx("span",{children:j.text},j.sequence)}),C.map(I=>{var V,X,W,Z,J,B;const P=I.parts.find(yh),H=(X=(V=P==null?void 0:P.state)==null?void 0:V.input)==null?void 0:X.turnId,F=P?o||b!==null:!1;return h.jsx(kft,{message:I,forkCount:(W=A.get(I.id))==null?void 0:W.count,forkIndex:(Z=A.get(I.id))==null?void 0:Z.index,forkPrevId:(J=A.get(I.id))==null?void 0:J.prevId,forkNextId:(B=A.get(I.id))==null?void 0:B.nextId,forkDisabled:!r,branchDisabled:o,onFork:s,onSelectFork:a,activePermissionId:y,pendingTailToolId:(T==null?void 0:T.messageId)===I.id?T.toolId:null,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,busy:F,recoveringTurnId:H===b?b:null,onRecover:v,skills:x,predictTextTail:o&&I===E&&I.role==="assistant"},I.id)})]})}),j8=(e,n)=>e==="all"?!0:e==="archived"?n:!n,uj=[{id:"active",label:_Y,railLabel:tE},{id:"archived",label:R6,railLabel:R6},{id:"all",label:vY,railLabel:fW}];function Mft({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Ao();return h.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[h.jsx(Jt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:P6(),"aria-label":P6(),onClick:()=>r(a=>!a),children:h.jsx(WKe,{size:13})}),t&&h.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:uj.map(a=>h.jsxs(Yr,{onClick:()=>{n(a.id),r(!1)},children:[h.jsx("span",{children:a.label()}),e===a.id&&h.jsx(Ws,{size:13})]},a.id))})]})}const Rft=14,Dft=500,Lft=1200;function dj({title:e,animate:n}){return n?h.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?h.jsx("span",{"aria-hidden":!0,children:t},r):h.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*Rft,Dft)}ms`},children:t},r))}):h.jsx(h.Fragment,{children:e})}function Oft({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:a,onOpen:o,onRename:l,onSetArchived:c,onDelete:d}){var A;const{open:_,setOpen:f,ref:m}=Ao(),g=((A=e.title)==null?void 0:A.trim())||"Untitled",[S,k]=M.useState(!1),[b,v]=M.useState(""),x=M.useRef(null);function y(){var E;v(((E=e.title)==null?void 0:E.trim())||""),k(!0)}function C(){var j;const E=b.trim();k(!1),E&&E!==(((j=e.title)==null?void 0:j.trim())||"")&&l(E)}return M.useEffect(()=>{var E,j;S&&((E=x.current)==null||E.focus(),(j=x.current)==null||j.select())},[S]),h.jsxs("div",{ref:m,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]:w-3.5 [&_.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]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.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-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]: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-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${S?"editing":""}`,title:`${kf[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?ine():""}`,onClick:()=>{S||(_?f(!1):o())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?f(!1):o())},children:[h.jsx("span",{className:"session-dot",children:r?h.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&h.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!S&&h.jsx(Ax,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),S?h.jsx("input",{ref:x,className:"session-title-input","aria-label":WJ(),value:b,onChange:E=>v(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),k(!1))}}):h.jsx("span",{className:"session-title",children:h.jsx(dj,{title:g,animate:a!==void 0},a??"static")}),h.jsx("span",{className:"session-time",children:Kdt(e.updatedAt)}),h.jsx("button",{className:"session-menu-btn",title:K6(),"aria-label":K6(),onClick:E=>{E.stopPropagation(),f(j=>!j)},children:h.jsx(yx,{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:[h.jsx(Yr,{onClick:E=>{E.stopPropagation(),f(!1),y()},children:h.jsx("span",{children:CJ()})}),h.jsx(Yr,{onClick:E=>{E.stopPropagation(),f(!1),c(!e.archived)},children:h.jsx("span",{children:e.archived?qne():xW()})}),h.jsx(Yr,{danger:!0,onClick:E=>{E.stopPropagation(),f(!1),d()},children:h.jsx("span",{children:eZ()})})]})]})}const M8=[qE,nN,zx,wx],Xv=[{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"}],R8="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function Ift({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:a,onSelectMainView:o,experimentsActive:l,filesActive:c,artifactsActive:d,onOpenExperiments:_,onOpenArtifacts:f,onOpenFile:m,onOpenRun:g,runExperimentName:S,onOpenExperiment:k,experimentName:b,onOpenPlan:v,onOpenSubagent:x,onOpenWorktree:y,onOpenDemoWelcome:C,composerPrefill:A=null,onActiveSessionChange:E,preferredAgent:j,onPreferredAgentChange:T,children:D}){var $h,Hh,Ph;const[I,P]=M.useState([]),[H,F]=M.useState(null),[V,X]=M.useState(new Set),[W,Z]=M.useState("active"),[J,B]=M.useState(""),[L,$]=M.useState([]),K=M.useRef(0),G=M.useRef({projectId:e,activeId:H});G.current={projectId:e,activeId:H};const[re,oe]=M.useState([]),[he,ie]=M.useState(null),[q,te]=M.useState(null),le=M.useRef(Promise.resolve()),ge=M.useRef(0),ue=M.useRef(0),[Ce,Ee]=M.useState(null),Le=M.useRef(null),Pe=M.useRef(!1),Ve=M.useRef(null),[ft,Be]=M.useReducer(Wdt,{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}}),[wt,At]=M.useState([]),[vt,Ot]=M.useState(j);M.useEffect(()=>Ot(j),[j]);const[St,kt]=M.useState({}),[xe,je]=M.useState({}),[We,st]=M.useState(null),nt=M.useRef(!1),Ht=M.useRef(null),[bt,nn]=M.useState(null),Wt=M.useRef(null),[pn,Lt]=M.useState(new Map),En=M.useRef(new Map),Ft=M.useRef(new Set),br=M.useRef(new Set),mn=M.useRef(0),Ye=M.useRef([]),xt=M.useRef(null),Wn=M.useRef(null),Kn=M.useRef(!0),[Nt,rt]=M.useState(!0),Ie=M.useRef(null),it=Ao(),Ut=M.useCallback(se=>{var me;K.current+=1,$(ze=>[...ze,{id:`annotation-${K.current}`,...se}]),(me=Ie.current)==null||me.focus()},[]),en=Bdt(Wn,Ut);$dt(L),M.useEffect(()=>{$([]),en.dismiss()},[H,e,en.dismiss]);const[Mt,Ln]=M.useState([]),[_r,is]=M.useState(0),[or,xr]=M.useState(!1),[Ts,Nn]=M.useState(0),rn=M.useRef(!1);M.useEffect(()=>{EXe().then(Ln).catch(()=>{})},[a]);function Fn(se){if(!wr)return;if(se.source==="command"&&se.name==="plan"){Or(J,wr);return}const me=y8(J,wr,se.name,2);B(me.text),window.requestAnimationFrame(()=>{var ze,Te;(ze=Ie.current)==null||ze.focus(),(Te=Ie.current)==null||Te.setSelectionRange(me.cursor,me.cursor),Nn(me.cursor)})}function Dr(se){const me=se.selectionStart;if(rn.current||me!==se.selectionEnd)return!1;const ze=Fv(J,me);if(!ze||ze.end!==me||!sa(ze.query))return!1;const Te=w8(J,ze);return B(Te.text),Nn(Te.cursor),window.requestAnimationFrame(()=>se.setSelectionRange(Te.cursor,Te.cursor)),!0}function Lr(se){ie(null);let Te=re.reduce((Xe,Ct)=>Xe+Ct.size,0);for(const Xe of se){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Xe.type))continue;if(Xe.size>31457280){ie(OW({name:Ae(Xe.name)}));continue}if(Te+Xe.size>41943040){ie(HW());continue}Te+=Xe.size;const Ct=new FileReader;Ct.onload=()=>{const Ir=Ct.result;oe(ti=>[...ti,{dataUrl:Ir,mediaType:Xe.type,name:Xe.name,size:Xe.size}])},Ct.readAsDataURL(Xe)}}function qr(se){const me=Array.from(se.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);me.length>0&&(se.preventDefault(),Lr(me))}const ln=I.find(se=>se.id===H),lr=vt??Xct(wt),Sn=ln?{harness:ln.harness,model:St.model??ln.model,serviceTier:St.serviceTier!==void 0?St.serviceTier:ln.serviceTier,permissionMode:St.permissionMode??ln.permissionMode,reasoningLevel:St.reasoningLevel??ln.reasoningLevel}:lr?{...lr,...St}:null,et=Sn?wt.find(se=>se.id===Sn.harness):void 0,_t=et==null?void 0:et.options,yr=M.useMemo(()=>ldt(Mt,_t==null?void 0:_t.planActivation),[Mt,_t==null?void 0:_t.planActivation]),wr=Fv(J,Ts),Gr=(wr==null?void 0:wr.query)??null,Un=Gr===null?[]:yr.filter(se=>se.name.startsWith(Gr)),vs=Gr!==null&&(wr==null?void 0:wr.end)===Ts&&Un.some(se=>se.name!==Gr)&&!or?Un:[],as=vs.length>0,js=Math.min(_r,Math.max(0,vs.length-1));M.useEffect(()=>is(0),[Gr]);const Zt=Sn&&et&&et.models.length>0&&!et.models.some(se=>se.id===Sn.model)?et.models[0].id:(Sn==null?void 0:Sn.model)??null,It=Sn&&{...Sn,model:Zt,serviceTier:J0(et,Zt,Sn.serviceTier),reasoningLevel:mN(et,Zt,Sn.reasoningLevel)},Ys=Hp(et,It==null?void 0:It.model),Ii=se=>{if(!It)return;const me={...It,...se},ze={};se.model!==void 0&&se.model!==It.model&&(ze.model=se.model),se.serviceTier!==void 0&&se.serviceTier!==It.serviceTier&&(ze.serviceTier=se.serviceTier),se.permissionMode!==void 0&&se.permissionMode!==It.permissionMode&&(ze.permissionMode=se.permissionMode),se.reasoningLevel!==void 0&&se.reasoningLevel!==It.reasoningLevel&&(ze.reasoningLevel=se.reasoningLevel),je(Te=>({...Te,...ze})),Ot(me),T(me).catch(()=>{}),ln?kt(Te=>({...Te,...se})):se.harness&&se.harness!==It.harness&&kt({})},Sr=M.useCallback(se=>{const me=le.current.catch(()=>{}).then(se);return le.current=me.then(()=>{},()=>{}),me},[]),os=se=>{if(se==="plan"&&(et==null?void 0:et.id)==="claude-code"?(je(Te=>({...Te,permissionMode:se})),kt(Te=>({...Te,permissionMode:se}))):(kt(Te=>{const Xe={...Te};return delete Xe.permissionMode,Xe}),Ii({permissionMode:se})),!ln)return;const me=ln.id,ze=++ge.current;te(null),Sr(()=>$Xe(me,se)).then(Te=>{P(Xe=>Xe.map(Ct=>Ct.id===Te.id?Te:Ct)),ge.current===ze&&kt(Xe=>{const Ct={...Xe};return delete Ct.permissionMode,Ct})}).catch(()=>{ge.current===ze&&(kt(Te=>{const Xe={...Te};return delete Xe.permissionMode,Xe}),te(Zne()))})},bs=se=>Ii({reasoningLevel:se}),cr=(It==null?void 0:It.harness)==="claude-code"?It.permissionMode==="plan":(_t==null?void 0:_t.planActivation)==="command"?Ce??(ln==null?void 0:ln.planMode)??!1:!1;M.useEffect(()=>{Ce===null||(ln==null?void 0:ln.planMode)!==Ce||(Le.current=null,Ee(null))},[ln==null?void 0:ln.planMode,Ce]);async function Xs(se){if(je(Te=>({...Te,planMode:se})),Le.current=se,Ee(se),!ln)return;const me=ln.id,ze=++ue.current;te(null);try{const Te=await Sr(()=>BXe(me,se));P(Xe=>Xe.map(Ct=>Ct.id===Te.id?Te:Ct)),ue.current===ze&&(Le.current=null,Ee(null),te(null))}catch(Te){throw ue.current===ze&&(Le.current=null,Ee(null)),Te}}async function Ml(){if((It==null?void 0:It.harness)==="claude-code"){os("auto");return}if(ln)try{await Xs(!1)}catch{te(aK())}}async function $a(){const se=!cr;try{if((It==null?void 0:It.harness)==="claude-code")os(se?"plan":"auto");else if((_t==null?void 0:_t.planActivation)==="command")await Xs(se);else throw new Error(J6())}catch{te(e7())}}function Or(se,me){const ze=w8(se,me);B(ze.text),xr(!0),$a(),window.requestAnimationFrame(()=>{var Te,Xe;(Te=Ie.current)==null||Te.focus(),(Xe=Ie.current)==null||Xe.setSelectionRange(ze.cursor,ze.cursor),Nn(ze.cursor)})}Ye.current=I;const ls=M.useCallback(async()=>{const se=Ye.current.map(me=>me.id);try{const me=(await T0(e)).filter(Te=>!br.current.has(Te.id)),ze=new Set(me.map(Te=>Te.id));for(const Te of se)ze.has(Te)||De(Te);return P(Te=>{const Xe=new Map(Te.map(Ct=>[Ct.id,Ct.contextUsage]));return me.map(Ct=>({...Ct,contextUsage:Ct.contextUsage??Xe.get(Ct.id)}))}),En.current=new Map(me.map(Te=>[Te.id,Te.title])),Be({type:"seedBusy",sessions:me.filter(Te=>Te.busy).map(Te=>Te.id),known:me.map(Te=>Te.id)}),me}catch{return null}},[e]),Zs=M.useCallback(async se=>{const me=G.current.activeId===se?Ht.current:void 0,[{messages:ze,queued:Te,activeLeafId:Xe}]=await Promise.all([Au(se),ls()]),Ct=me!==void 0&&G.current.activeId===se&&Ht.current!==me;Be({type:"seed",sessionId:se,messages:ze,queued:Te,activeLeafId:Ct?Ht.current:Xe})},[ls,Be]);M.useEffect(()=>{P([]),Ye.current=[],F(null);const se=KT();X(e===K1?new Set([sN,iN].filter(me=>!se.has(me))):new Set),B(""),oe([]),Be({type:"reset"}),Ft.current=new Set,Lt(new Map),En.current=new Map,ls().then(me=>{me&&F(ze=>{var Te,Xe;return ze??(e===K1?(Te=me.find(Ct=>Ct.id===Nf))==null?void 0:Te.id:void 0)??((Xe=me.find(Ct=>!Ct.archived))==null?void 0:Xe.id)??null})})},[e,ls]),M.useEffect(()=>{je({}),Wt.current=null},[H]),M.useEffect(()=>{!H||Ft.current.has(H)||(Ft.current.add(H),Au(H).then(({messages:se,queued:me,activeLeafId:ze})=>Be({type:"seed",sessionId:H,messages:se,queued:me,activeLeafId:ze})).catch(()=>{Be({type:"seed",sessionId:H,messages:[],onlyIfAbsent:!0}),Ft.current.delete(H)}))},[H]),M.useEffect(()=>Hf(se=>{switch(se.type){case"session":{if(se.session.projectId!==e||br.current.has(se.session.id))return;const me=En.current.has(se.session.id),ze=En.current.get(se.session.id)!==se.session.title;En.current.set(se.session.id,se.session.title),me&&ze&&se.session.titleSource==="generated"&&(Lt(Te=>{const Xe=new Map(Te);return Xe.set(se.session.id,(Te.get(se.session.id)??0)+1),Xe}),window.setTimeout(()=>{Lt(Te=>{if(!Te.has(se.session.id))return Te;const Xe=new Map(Te);return Xe.delete(se.session.id),Xe})},Lft)),P(Te=>{const Xe=Te.findIndex(Ir=>Ir.id===se.session.id);if(Xe<0)return[se.session,...Te];const Ct=Te.slice();return Ct[Xe]={...se.session,contextUsage:se.session.contextUsage??Te[Xe].contextUsage},Ct});break}case"sessionDeleted":De(se.sessionId);break;case"message":mn.current++,Be({type:"upsertMessage",sessionId:se.sessionId,message:se.message});break;case"busy":Be({type:"busy",sessionId:se.sessionId,busy:se.busy});break;case"queued":Be({type:"setQueued",sessionId:se.sessionId,items:se.items});break;case"branch":Be({type:"activeLeaf",sessionId:se.sessionId,leafId:se.activeLeafId});break;case"usage":P(me=>me.map(ze=>ze.id===se.sessionId?{...ze,contextUsage:se.usage}:ze));break}}),[e]),M.useEffect(()=>Hf(se=>{if(se.type!=="reconnected"||(ls(),!H||!Ft.current.has(H)))return;const me=ze=>{const Te=mn.current;Au(H).then(({messages:Xe,queued:Ct,activeLeafId:Ir})=>{Be({type:"seed",sessionId:H,messages:Xe,queued:Ct,activeLeafId:Ir}),ze&&mn.current!==Te&&me(!1)}).catch(()=>{})};me(!0)}),[H,ls]);const Yn=H?ft.messagesBySession[H]??z8:z8,Bi=H?ft.activeLeafBySession[H]??null:null;Ht.current=Bi;const Hn=M.useMemo(()=>YXe(Yn,Bi),[Yn,Bi]),zn=H?ft.busySessions.has(H):!1,Qs=!zn&&!!(et!=null&&et.agentReady),ra=zn&&kN(Hn)!=null,Dc=zn&&tZe(Hn),ur=H?ft.queuedBySession[H]??[]:[],Ha=ur.some(se=>se.dispatchState==="retrying"),Pa=ur.findIndex(se=>se.dispatchState==="blocked"),Fa=ur.reduce((se,me)=>me.dispatchState!=="retrying"||typeof me.nextRetryAt!="number"?se:se===null?me.nextRetryAt:Math.min(se,me.nextRetryAt),null),[Ro,Ms]=M.useState(()=>Date.now());M.useEffect(()=>{if(!Ha||Fa===null||(Ms(Date.now()),Fa<=Date.now()))return;const se=window.setInterval(()=>{const me=Date.now();Ms(me),me>=Fa&&window.clearInterval(se)},1e3);return()=>window.clearInterval(se)},[Ha,Fa]),M.useEffect(()=>{const se=ur.reduce((me,ze)=>ze.planMode??me,void 0);se!==void 0?(Pe.current=!0,Le.current=se,Ee(se)):Pe.current&&(Pe.current=!1,Le.current=null,Ee(null))},[ur]);const Lc=!!H&&!(H in ft.messagesBySession),Ua=M.useMemo(()=>{const se=new Set;for(const me of ft.busySessions)(ft.messagesBySession[me]??[]).some(ze=>ze.parts.some(Te=>Te.type==="prompt"&&Te.prompt&&!Te.prompt.resolved&&Te.prompt.nativeId))&&se.add(me);return se},[ft.busySessions,ft.messagesBySession]),xs=H?Ua.has(H):!1,nr=ln,qa=nr?pn.get(nr.id):void 0,rr=M.useMemo(()=>{var se;for(let me=Hn.length-1;me>=0;me--)for(const ze of Hn[me].parts)if(ze.type==="prompt"&&((se=ze.prompt)==null?void 0:se.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[Hn]),yi=M.useMemo(()=>zn?eZe(Hn):null,[Hn,zn]),Rs=M.useMemo(()=>{const se=nr==null?void 0:nr.harness;if(!H||se!=="claude-code"&&se!=="codex")return null;for(let me=Hn.length-1;me>=0;me--)for(const ze of Hn[me].parts)if(!(ze.type!=="prompt"||!ze.prompt||ze.prompt.resolved)&&ze.prompt.kind==="question")return ze.prompt.nativeId&&!ft.busySessions.has(H)?null:ze.id;return null},[Hn,nr==null?void 0:nr.harness,H,ft.busySessions]),sa=se=>!Rs&&yr.some(me=>me.name===se),[Ds,ia]=M.useState(null),Ls=Ds&&Ds.sessionId===H?Ds:null;M.useEffect(()=>{if(!Ds)return;const se=ft.busySessions.has(Ds.sessionId),me=Ds.sessionId===H&&rr&&rr.promptId!==Ds.promptId;(!se||me)&&ia(null)},[Ds,rr,ft.busySessions,H]);const Ga=M.useMemo(()=>l4(Hn),[Hn]),aa=zn&&!!(et!=null&&et.supportsSteering)&&!!(et!=null&&et.agentReady)&&!rr&&!Rs&&!Ga&&re.length===0&&L.length===0,Xr=M.useMemo(()=>v&&H?(se,me,ze)=>v(se,H,me,ze):void 0,[v,H]),Do=M.useMemo(()=>x&&H?(se,me,ze)=>x(H,se,me,ze):void 0,[x,H]),Zr=M.useMemo(()=>m&&((se,me,ze,Te,Xe)=>m(se,H??void 0,me,ze,Te,Xe)),[m,H]);M.useEffect(()=>{ge.current+=1,ue.current+=1;const se=(H?ft.queuedBySession[H]??[]:[]).reduce((me,ze)=>ze.planMode??me,void 0);Pe.current=se!==void 0,Le.current=se??null,Ee(se??null),kt({}),te(null)},[H]),M.useEffect(()=>{E==null||E(H)},[H,E]);const Pn=a==="chat"&&(Hn.length>0||zn),ys=(It==null?void 0:It.harness)??null,oa=(It==null?void 0:It.model)??null,[Qr,kn]=M.useState(null),cs=`${e}\0${ys??""}\0${oa??""}`,kr=a==="chat"&&!Pn&&!Lc;M.useEffect(()=>{if(!kr||!ys)return;let se=!0;return xYe(e,ys,oa,N()).then(me=>{se&&kn({key:cs,prompts:me.prompts})}).catch(()=>{se&&kn({key:cs,prompts:null})}),()=>{se=!1}},[e,ys,oa,cs,kr]);const $i=(Qr==null?void 0:Qr.key)===cs?Qr.prompts:null,vd=ys!==null&&(Qr==null?void 0:Qr.key)!==cs,Rl=se=>{B(se),xr(!1),window.requestAnimationFrame(()=>{const me=Ie.current;me&&(me.focus(),me.setSelectionRange(se.length,se.length),Nn(se.length))})};M.useEffect(()=>{A&&(B(A),xr(!1),Nn(A.length))},[A]);const Js=M.useCallback(se=>{const me=se.scrollHeight-se.scrollTop-se.clientHeight<60;Kn.current=me,rt(me)},[]),Vr=M.useCallback(()=>{Kn.current=!0,rt(!0);const se=xt.current;se&&(se.scrollTop=se.scrollHeight)},[]);M.useLayoutEffect(()=>{Vr()},[H,Pn,Vr]),M.useLayoutEffect(()=>{Kn.current&&Vr()},[Hn,zn,Vr]),M.useEffect(()=>{const se=xt.current,me=Wn.current;if(!se||!me)return;const ze=new ResizeObserver(()=>{if(Kn.current){se.scrollTop=se.scrollHeight;return}Js(se)});return ze.observe(me),ze.observe(se),()=>ze.disconnect()},[Pn,Js]);const ei=M.useCallback(se=>{se.currentTarget.blur(),Vr()},[Vr]);async function Va({queue:se=!1}={}){var Ol,Sd,kd,$c,Hc;const me=J.trim(),ze=Rs?null:cdt(me,_t==null?void 0:_t.planActivation),Te=!!ze,Xe=!cr,Ct=udt(_t==null?void 0:_t.planActivation,Te?Xe:void 0,Le.current),Ir=Te&&(et==null?void 0:et.id)==="claude-code"?Xe?"plan":"auto":void 0,ti=ze?ze.prompt:me,wi=re,la=L,Ll=la.map(Cn=>({text:Cn.text})),Fh=e;let xd=H;const Ka=()=>{const Cn=G.current;return Cn.projectId===Fh&&Cn.activeId===xd},Bc=()=>{Ka()&&(B(Cn=>Cn||me),oe(Cn=>Cn.length?Cn:wi),$(Cn=>Cn.length?Cn:la))};if(Te&&!ti&&wi.length===0&&la.length===0){B(""),xr(!1);try{if((et==null?void 0:et.id)==="claude-code")os(Xe?"plan":"auto");else if((_t==null?void 0:_t.planActivation)==="command")await Xs(Xe);else throw new Error(J6())}catch{te(e7()),Bc()}return}const sr=It?{...It,...Ir?{permissionMode:Ir}:{}}:null;Ir&&os(Ir);let yd=null;const wd=Le.current;Te&&(_t==null?void 0:_t.planActivation)==="command"&&(yd=++ue.current,Le.current=Xe,Ee(Xe));const Oo=()=>{yd===null||ue.current!==yd||(Le.current=wd,Ee(wd))};if(!ti&&wi.length===0&&la.length===0)return;if((ti||la.length>0)&&Rs&&wi.length===0){B(""),$([]),Tt({promptId:Rs,answers:[],note:ti||void 0,annotations:Ll}).then(Cn=>{Cn||Bc()});return}const Io=JSON.stringify({text:ti,images:wi.map(Cn=>({mediaType:Cn.mediaType,name:Cn.name,dataUrl:Cn.dataUrl})),annotations:Ll,settings:sr?{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:Ct,reasoningLevel:sr.reasoningLevel}:null}),Pi=((Ol=Wt.current)==null?void 0:Ol.signature)===Io?Wt.current.id:`ct_${crypto.randomUUID()}`;if(Wt.current={signature:Io,id:Pi},zn){if(!H||!(et!=null&&et.agentReady)){Oo();return}const Cn=H;B(""),oe([]),$([]),ie(null);const ca=sr?{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:(_t==null?void 0:_t.planActivation)==="command"?Ct??(ln==null?void 0:ln.planMode):Ct,reasoningLevel:sr.reasoningLevel}:{};kt({});const ua=wi.map(Br=>({mediaType:Br.mediaType,dataBase64:Br.dataUrl.slice(Br.dataUrl.indexOf(",")+1),name:Br.name}));try{(Sd=(await Sr(()=>Y7(Cn,ti,ca,ua.length?ua:void 0,Ll,Pi,aa&&!se&&!Te?"steer":void 0))).turn)!=null&&Sd.existing&&await Zs(Cn),je({}),((kd=Wt.current)==null?void 0:kd.id)===Pi&&(Wt.current=null)}catch{Oo(),Bc()}return}if(!(et!=null&&et.agentReady)){Oo();return}if(!sr){Oo();return}B(""),oe([]),$([]),ie(null);let Fi=H;try{if(!Fi){const $r=await DXe(e,sr.harness,{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:Ct,reasoningLevel:sr.reasoningLevel});Ft.current.add($r.id),P(Um=>[$r,...Um]),F($r.id),Fi=$r.id,xd=$r.id,G.current={projectId:e,activeId:$r.id}}Be({type:"optimisticUser",sessionId:Fi,text:ti||zW(),attachments:wi.map($r=>({url:$r.dataUrl,mediaType:$r.mediaType,name:$r.name})),annotations:la}),Be({type:"busy",sessionId:Fi,busy:!0}),Vr(),W==="archived"&&Z("active");const Cn=sr?{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:Ct,reasoningLevel:sr.reasoningLevel}:{};kt({});const ca=wi.map($r=>({mediaType:$r.mediaType,dataBase64:$r.dataUrl.slice($r.dataUrl.indexOf(",")+1),name:$r.name})),ua=Fi;if(!ua)throw new Error(tne());($c=(await Sr(()=>Y7(ua,ti,Cn,ca.length?ca:void 0,Ll,Pi))).turn)!=null&&$c.existing&&await Zs(ua),je({}),((Hc=Wt.current)==null?void 0:Hc.id)===Pi&&(Wt.current=null)}catch(Cn){if(Bc(),Oo(),!Fi)return;const ca=Cn instanceof Error?Cn.message:String(Cn);if(!/session is busy/i.test(ca)&&await T0(e).then(Br=>{var Pc;return!!((Pc=Br.find($r=>$r.id===Fi))!=null&&Pc.busy)}).catch(()=>!1)){Ka()&&(B(Br=>Br===ti?"":Br),oe(Br=>Br===wi?[]:Br),$(Br=>Br===la?[]:Br));return}Be({type:"busy",sessionId:Fi,busy:!1}),Be({type:"localError",sessionId:Fi,text:EK({error:Ae(ca)})})}}function Oc(){H&&VXe(H).catch(()=>{te(gne())})}const bd=M.useCallback(async(se,me)=>{if(!(!H||nt.current)){nt.current=!0,te(null),st(se);try{const ze=_Ze({model:xe.model,serviceTier:xe.serviceTier,permissionMode:xe.permissionMode,planMode:xe.planMode,reasoningLevel:xe.reasoningLevel}),Te=H;(await UXe(Te,se,me,ze)).turn.existing&&await Zs(Te),je({})}catch{te(Cte())}finally{nt.current=!1,st(null)}}},[H,xe,Zs]),Ic=M.useCallback((se,me)=>{if(!H||zn||!(et!=null&&et.agentReady))return;const ze=H;Be({type:"busy",sessionId:ze,busy:!0}),Vr(),Sr(()=>qXe(ze,se,me)).catch(Te=>{Be({type:"busy",sessionId:ze,busy:!1});const Xe=Te instanceof Error?Te.message:String(Te);Be({type:"localError",sessionId:ze,text:Rte({error:Ae(Xe)})})})},[H,zn,et==null?void 0:et.agentReady,Vr,Sr]),ae=M.useCallback(se=>{if(!H||zn)return;const me=H,ze=Ht.current;Be({type:"activeLeaf",sessionId:me,leafId:se}),Sr(()=>GXe(me,se)).catch(Te=>{Be({type:"activeLeaf",sessionId:me,leafId:ze});const Xe=Te instanceof Error?Te.message:String(Te);Be({type:"localError",sessionId:me,text:yne({error:Ae(Xe)})})})},[H,zn,Sr]);function be(se){if(!H)return;const me=H;HXe(me,se).then(({removed:ze})=>{if(ze)return Zs(me)}).catch(()=>te(Ate()))}async function ke(se){if(!H||bt)return;const me=H;te(null),nn(se);try{await PXe(me,se),await Zs(me)}catch{te(Pte())}finally{nn(null)}}M.useEffect(()=>{if(!zn||a!=="chat")return;function se(me){var ze;me.key!=="Escape"||me.defaultPrevented||(me.preventDefault(),Oc(),(ze=Ie.current)==null||ze.focus())}return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[zn,H,a]);function De(se){br.current.add(se),P(me=>me.filter(ze=>ze.id!==se)),F(me=>me===se?null:me),X(me=>{if(!me.has(se))return me;const ze=new Set(me);return ze.delete(se),ze}),Ft.current.delete(se),En.current.delete(se),Be({type:"forget",sessionId:se})}function $e(se,me){const ze=se.archived;P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,archived:me}:Xe)),j8(W,me)||F(Te=>Te===se.id?null:Te),OXe(se.id,me).catch(()=>{P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,archived:ze}:Xe))})}function pt(se,me){const ze=se.title;P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,title:me}:Xe)),IXe(se.id,me).catch(()=>{P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,title:ze}:Xe))})}async function ct(se){var ze;const me=((ze=se.title)==null?void 0:ze.trim())||G1();if(window.confirm(QW({title:Ca(me)}))){try{await LXe(se.id)}catch(Te){WN(nK({title:Ca(me),error:Ae(Te instanceof Error?Te.message:String(Te))}),"error");return}De(se.id)}}const Tt=M.useCallback(se=>{if(!H)return Promise.resolve(!1);const me=H;return Be({type:"busy",sessionId:me,busy:!0}),Sr(()=>WXe(me,se)).then(()=>!0).catch(()=>!1).finally(()=>{Au(me).then(({messages:ze,queued:Te,activeLeafId:Xe})=>Be({type:"seed",sessionId:me,messages:ze,queued:Te,activeLeafId:Xe})).catch(()=>{}),T0(e).then(ze=>{var Te;return Be({type:"busy",sessionId:me,busy:!!((Te=ze.find(Xe=>Xe.id===me))!=null&&Te.busy)})}).catch(()=>{})})},[H,e,Sr]),An=I.filter(se=>j8(W,se.archived)),us=/Mac|iPhone|iPad/.test(navigator.platform),ws=us?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",ds=us?"⌘ Enter":"Ctrl + Enter",Os=M.useCallback(()=>{Z("active"),F(null),o("chat")},[o]),Dl=M.useCallback(se=>{Z("all"),F(se),o("chat")},[o]);M.useEffect(()=>{const se=me=>{me.repeat||me.key!=="Enter"||!me.metaKey&&!me.ctrlKey||me.altKey||!me.shiftKey||(me.preventDefault(),Os())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[Os]);const Hi=h.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 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]:py-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,h.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[h.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 ${c?"active":""}`,onClick:y,children:[h.jsx($f,{size:15}),zZ()]}),h.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 ${d?"active":""}`,"data-onboarding":"nav-artifacts",onClick:f,children:[h.jsx(kx,{size:15}),RY()]}),h.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 ${l?"active":""}`,onClick:_,children:[h.jsx(wx,{size:15}),yZ()]}),h.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 ${a==="skills"?"active":""}`,onClick:()=>o("skills"),children:[h.jsx(UE,{size:15}),UX()]}),rdt.map(se=>h.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 ${a!=="chat"&&a!=="skills"&&se.activeTabs.includes(a)?"active":""}`,"data-onboarding":se.id==="compute"?"nav-compute":void 0,onClick:()=>o(se.id),children:[se.icon,se.label()]},se.id))]}),h.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-1.5 ps-4.5",children:[h.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:(($h=uj.find(se=>se.id===W))==null?void 0:$h.railLabel())??tE()}),h.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[h.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":ws,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Os,children:[h.jsx(Ex,{size:13}),bee()]}),h.jsx(Mft,{value:W,onChange:Z})]})]}),h.jsxs("div",{className:"rail-body",children:[An.map(se=>h.jsx(Oft,{session:se,active:se.id===H&&a==="chat",unread:V.has(se.id),busy:ft.busySessions.has(se.id),waiting:Ua.has(se.id),revealTitle:pn.get(se.id),onOpen:()=>{F(se.id),e===K1&&bdt(se.id),X(me=>{if(!me.has(se.id))return me;const ze=new Set(me);return ze.delete(se.id),ze}),o("chat")},onRename:me=>pt(se,me),onSetArchived:me=>$e(se,me),onDelete:()=>void ct(se)},se.id)),An.length===0&&h.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:W==="archived"?PK():I.length>0?RK():GK()})]})]}),Wa=`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 [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::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${r?"":" rail-hidden"}`,Lo=!r&&h.jsx(Jt,{title:Y6(),"aria-label":Y6(),onClick:s,children:h.jsx(JE,{size:15})});return a!=="chat"?h.jsxs(h.Fragment,{children:[r&&Hi,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&h.jsx("div",{className:Wa,children:Lo}),h.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):h.jsxs(h.Fragment,{children:[r&&Hi,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[h.jsxs("div",{className:Wa,children:[Lo,h.jsx(Xf,{variant:"header",title:nr?((Hh=nr.title)==null?void 0:Hh.trim())||G1():j6(),children:nr?h.jsx(dj,{title:((Ph=nr.title)==null?void 0:Ph.trim())||G1(),animate:qa!==void 0},qa??"static"):j6()}),C&&h.jsx(Jt,{"data-tip":M6(),"aria-label":M6(),onClick:C,children:h.jsx(wWe,{size:15})})]}),Lc?h.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:[h.jsx(dn,{}),h.jsx("span",{children:eQ()})]}):Pn?h.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:xt,onScroll:se=>{Js(se.currentTarget),en.dismiss()},children:h.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:Wn,children:[h.jsx(jft,{messages:Hn,allMessages:Yn,canFork:Qs,onFork:Ic,onSelectFork:ae,busy:zn,onOpenFile:Zr,onOpenRun:g,onOpenSpawnedSession:Dl,runExperimentName:S,onOpenExperiment:k,experimentName:b,onRespond:Tt,onOpenPlan:Xr,onOpenSubagent:Do,recoveringTurnId:We,onRecover:bd,skills:yr}),zn&&xs&&h.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Bee()}),zn&&!xs&&!ra&&!Dc&&h.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:h.jsx("span",{className:"tool-running-shimmer",children:Ane()})})]})}):h.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:[h.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:h.jsx(Rx,{})}),h.jsx("h2",{children:Fee()}),h.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:[h.jsx($f,{size:19}),h.jsx("span",{children:n})]}),vd&&h.jsx("div",{className:R8,role:"status","aria-live":"polite","aria-label":see(),"aria-busy":"true",children:M8.map((se,me)=>h.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 ${Xv[me].box}`,children:[h.jsxs("span",{className:`flex w-full items-center gap-2.5 ${Xv[me].icon}`,children:[h.jsx(se,{size:17}),h.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),h.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},me))}),$i&&h.jsx("div",{className:R8,role:"group","aria-label":lee(),children:$i.map((se,me)=>{const ze=M8[me],Te=Xv[me];return h.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 ${Te.box}`,onClick:()=>Rl(se.prompt),children:[h.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[h.jsx(ze,{size:17,className:Te.icon}),se.title]}),h.jsx("span",{className:"w-full truncate text-sm text-subtext",children:se.prompt})]},me)})})]}),en.action&&h.jsxs(Qe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:en.action.x,top:en.action.top,transform:"translateX(-50%)"},onMouseDown:se=>se.preventDefault(),onClick:en.add,children:[h.jsx(QE,{size:14}),IY()]}),h.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:[Pn&&h.jsx(Jt,{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 ${Nt?"opacity-0":"opacity-100"}`,title:Q6(),"aria-label":Q6(),inert:Nt,onClick:ei,children:zn&&!xs?h.jsx(yx,{size:18,className:"tool-running-shimmer-icon"}):h.jsx(iWe,{size:16})}),yi&&!rr&&h.jsx(Oct,{list:yi}),rr&&!(Ls&&rr.promptId===Ls.promptId)&&h.jsx(Mct,{synthesized:rr.synthesized,agentLabel:nr?kf[nr.harness]:Cne(),showResumeModes:(nr==null?void 0:nr.harness)==="claude-code",onView:se=>Xr==null?void 0:Xr(rr.plan,rr.promptId,se),onApprove:se=>Tt({promptId:rr.promptId,approve:!0,...se?{resumeMode:se}:{}}),onReject:()=>Tt({promptId:rr.promptId,approve:!1}),onRevise:se=>{H&&ia({sessionId:H,promptId:rr.promptId}),Tt({promptId:rr.promptId,approve:!1,note:se})}}),ur.length>0&&h.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ur.map((se,me)=>h.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:se.error?`${se.text} -${ie.error}`:ie.text,children:[ie.dispatchState==="blocked"?h.jsx(YE,{size:13,className:"shrink-0 text-accent-amber"}):h.jsx(NGe,{size:13,className:"shrink-0 text-muted"}),h.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:ie.text}),ie.dispatchState!=="blocked"&&h.jsx("span",{className:"shrink-0 text-sm text-muted",children:ie.dispatchState==="retrying"?nYe(ie.nextRetryAt,Mo):qee()}),ie.dispatchState==="blocked"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>void be(ie.id),"aria-label":FI({text:ie.text}),disabled:bt!==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:bt===ie.id?hE():Pu()}),h.jsx("button",{onClick:()=>ae(ie.id),"aria-label":BI({text:ie.text}),disabled:bt!==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:BQ()}),me===Pa&&meae(ie.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:h.jsx(hs,{size:11})})]},ie.id))}),h.jsxs("div",{className:"composer-box relative flex flex-col border border-border rounded-lg bg-background shadow-elevated","data-onboarding":"composer",children:[Je&&!Je.agentReady&&h.jsxs("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:[h.jsxs("strong",{children:[Je.name," ",dZ()]})," ",Je.agentNote?zh(Je.agentNote):Zee()]}),os&&h.jsx(Glt,{skills:gs,activeIndex:js,onPick:Pn,onHover:as}),L.length>0&&h.jsx(Nct,{annotations:L,onClear:()=>{B([]),window.requestAnimationFrame(()=>{var ie;return(ie=Ie.current)==null?void 0:ie.focus()})},onRemove:ie=>{const me=L.filter(ze=>ze.id!==ie);B(me),me.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=Ie.current)==null?void 0:ze.focus()})}}),re.length>0&&h.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:re.map((ie,me)=>{const ze=()=>he(Te=>Te.filter((Xe,At)=>At!==me));return ie.mediaType==="application/pdf"?h.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:ie.name,children:[h.jsx(Fu,{size:22}),h.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:ie.name??"document.pdf"}),h.jsx("button",{title:H6(),"aria-label":H6(),onClick:ze,children:h.jsx(hs,{size:11})})]},me):h.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:[h.jsx("img",{src:ie.dataUrl,alt:Eee()}),h.jsx("button",{title:P6(),"aria-label":P6(),onClick:ze,children:h.jsx(hs,{size:11})})]},me)})}),oe&&h.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:oe}),q&&h.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:q}),h.jsxs("div",{className:"composer-input relative flex overflow-hidden [&_textarea]:flex-1",children:[h.jsx("textarea",{dir:"auto",ref:Ie,className:"relative z-1 bg-transparent",value:J,placeholder:Wr?mne():sa&&Je?Ute({harness:Ae(wf[Je.id]),shortcut:Ae(ys)}):Ot?Je!=null&&Je.agentReady?QW({harness:Ae(wf[Ot.harness])}):KW({harness:Ae(wf[Ot.harness])}):eW(),rows:2,onPaste:Gr,onDragOver:ie=>{ie.dataTransfer.types.includes("Files")&&ie.preventDefault()},onDrop:ie=>{ie.dataTransfer.files.length!==0&&(ie.preventDefault(),Ir(Array.from(ie.dataTransfer.files)))},onChange:ie=>{const me=ie.target.value,ze=ie.target.selectionStart;Nn(ze);const Te=ze>0&&/\s/.test(me[ze-1])&&!Wr&&!nn.current?Hv(me,ze-1):null;if((Te==null?void 0:Te.query)==="plan"&&(_t!=null&&_t.planActivation)){Br(me,Te);return}const Xe=Te?wr.find(At=>At.source!=="command"&&At.name===Te.query):void 0;if(Xe&&Te){const At=mk(me,Te,Xe.name,2);H(At.text),window.requestAnimationFrame(()=>{var Qr;(Qr=Ie.current)==null||Qr.setSelectionRange(At.cursor,At.cursor),Nn(At.cursor)});return}H(me),yr(!1)},onSelect:ie=>Nn(ie.currentTarget.selectionStart),onCompositionStart:()=>{nn.current=!0},onCompositionEnd:()=>{nn.current=!1},onKeyDown:ie=>{if(os){if(ie.key==="ArrowDown"||ie.key==="ArrowUp"){ie.preventDefault();const me=ie.key==="ArrowDown"?1:-1;as((js+me+gs.length)%gs.length);return}if(ie.key==="Tab"||ie.key==="Enter"){ie.preventDefault(),Pn(gs[js]);return}if(ie.key==="Escape"){ie.preventDefault(),yr(!0);return}}if(ie.key==="Backspace"&&Or(ie.currentTarget)){ie.preventDefault();return}ie.key==="Enter"&&!ie.shiftKey&&!ie.nativeEvent.isComposing&&(ie.preventDefault(),Ls({queue:ie.metaKey||ie.ctrlKey}))}}),h.jsx(ect,{text:J,isCommand:Ro,skills:wr,projectId:e,textareaRef:Ie})]}),h.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:it.ref,children:[h.jsx(Qt,{type:"button",className:"composer-bare",title:F1(),"aria-label":F1(),"aria-haspopup":"dialog","aria-expanded":it.open,onClick:()=>it.setOpen(ie=>!ie),children:h.jsx(GVe,{size:16})}),it.open&&h.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:[h.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:F1()}),h.jsx(rZe,{})]})]}),h.jsx("input",{ref:Ve,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:ie=>{Ir(Array.from(ie.target.files??[])),ie.target.value=""}}),h.jsx(Qt,{type:"button",className:"composer-attach",title:A6(),"aria-label":A6(),onClick:()=>{var ie;return(ie=Ve.current)==null?void 0:ie.click()},children:h.jsx(EVe,{size:16})}),lr&&h.jsxs(Qe,{type:"button",variant:"ghost",active:!0,className:"group",title:L6(),"aria-label":L6(),onClick:()=>void Rl(),children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(cVe,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(hs,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:GZ()})]}),h.jsx("div",{className:"min-w-0 flex-1"}),h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(Oot,{value:Ot,onSelect:Ii,permissionChoices:Je!=null&&Je.agentReady?(_t==null?void 0:_t.permissionModes)??[]:[],defaultPermissionId:(_t==null?void 0:_t.defaultPermissionMode)??null,onSelectPermission:ls,reasoningChoices:Je!=null&&Je.agentReady?Ws.choices:[],defaultReasoningId:Ws.defaultId,onSelectReasoning:vs,onHarnesses:zt,lockHarness:!!ln}),h.jsx(nct,{usage:ln==null?void 0:ln.contextUsage})]}),Ln&&!Wr?h.jsx(Qt,{className:"send-btn",variant:"stop",title:G6(),"aria-label":G6(),onClick:Va,children:h.jsx(hs,{size:16})}):h.jsx(Qt,{className:"send-btn",variant:"primary",title:vb(),"aria-label":vb(),onClick:()=>void Ls(),disabled:!(Je!=null&&Je.agentReady)||!J.trim()&&re.length===0&&L.length===0,children:h.jsx(PE,{size:16})})]})]})]})]})]})}function ho({className:e,...n}){return h.jsx("div",{className:is("relative flex min-h-0 flex-1 flex-col",e),...n})}function Lu({className:e,...n}){return h.jsx("div",{className:is("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Wi({className:e,...n}){return h.jsx("div",{className:is("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const Ak=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function yut({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}){const[c,d]=M.useState(null),_=M.useRef(null),f=M.useRef(null),m=M.useRef(!0);if(M.useLayoutEffect(()=>{m.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&m.current&&(S.scrollTop=S.scrollHeight)},[c]),M.useEffect(()=>{const S=_.current,k=f.current;if(!S||!k)return;const b=new ResizeObserver(()=>{m.current&&(S.scrollTop=S.scrollHeight)});return b.observe(k),b.observe(S),()=>b.disconnect()},[c===null]),M.useEffect(()=>{let S=!0;const k=new Set;let b=0;const v=()=>{const y=++b;Cu(e).then(({messages:C})=>{!S||y!==b||d(z=>{if(!z)return C;const E=C.map(A=>k.has(A.id)?z.find(D=>D.id===A.id)??A:A),j=new Set(C.map(A=>A.id));return[...E,...z.filter(A=>!j.has(A.id))]})}).catch(()=>S&&d(C=>C??[]))};v();const x=Bf(y=>{if(y.type==="reconnected"){k.clear(),v();return}y.type!=="message"||y.sessionId!==e||(k.add(y.message.id),d(C=>{const z=C?C.slice():[],E=z.findIndex(j=>j.id===y.message.id);return E===-1?z.push(y.message):z[E]=y.message,z}))});return()=>{S=!1,x()}},[e]),c===null)return h.jsx(ho,{children:h.jsx("div",{className:Ak,children:h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:xPe()})})});let g=null;for(const S of c)if(g=n4(S.parts,n),g)break;return h.jsx(ho,{children:h.jsx("div",{className:Ak,ref:_,onScroll:S=>{const k=S.currentTarget;m.current=k.scrollHeight-k.scrollTop-k.clientHeight<60},children:h.jsx("div",{ref:f,children:g?h.jsx(uut,{spawn:g,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}):h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:kPe()})})})})}function Tk(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 Sn(e){for(var n=1;n=0||(_[c]=o[c]);return _})(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function hn(e,n){return JT(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var a,o,l,c,d=[],_=!0,f=!1;try{if(l=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(a=l.call(s)).done)&&(d.push(a.value),d.length!==r);_=!0);}catch(m){f=!0,o=m}finally{try{if(!_&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw o}}return d}})(e,n)||pm(e,n)||tj()}function QT(e){return JT(e)||ej(e)||pm(e)||tj()}function hi(e){return(function(n){if(Array.isArray(n))return z2(n)})(e)||ej(e)||pm(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 JT(e){if(Array.isArray(e))return e}function ej(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pm(e,n){if(e){if(typeof e=="string")return z2(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)?z2(e,n):void 0}}function z2(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 a,o=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){l=!0,a=c},f:function(){try{o||t.return==null||t.return()}finally{if(l)throw a}}}}var d0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Th(e,n){return e(n={exports:{}},n.exports),n.exports}var ui=Th((function(e){/*! +${se.error}`:se.text,children:[se.dispatchState==="blocked"?h.jsx(rN,{size:13,className:"shrink-0 text-accent-amber"}):h.jsx(MWe,{size:13,className:"shrink-0 text-muted"}),h.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:se.text}),se.dispatchState!=="blocked"&&h.jsx("span",{className:"shrink-0 text-sm text-muted",children:se.dispatchState==="retrying"?hZe(se.nextRetryAt,Ro):_te()}),se.dispatchState==="blocked"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>void ke(se.id),"aria-label":tB({text:se.text}),disabled:bt!==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:bt===se.id?bE():Gu()}),h.jsx("button",{onClick:()=>be(se.id),"aria-label":ZI({text:se.text}),disabled:bt!==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:lJ()}),me===Pa&&mebe(se.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:h.jsx(_s,{size:11})})]},se.id))}),h.jsxs("div",{className:"composer-box relative flex flex-col border border-border rounded-lg bg-background shadow-elevated","data-onboarding":"composer",children:[et&&!et.agentReady&&h.jsxs("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:[h.jsxs("strong",{children:[et.name," ",LZ()]})," ",et.agentNote?Th(et.agentNote):yte()]}),as&&h.jsx(adt,{skills:vs,activeIndex:js,onPick:Fn,onHover:is}),L.length>0&&h.jsx(Fdt,{annotations:L,onClear:()=>{$([]),window.requestAnimationFrame(()=>{var se;return(se=Ie.current)==null?void 0:se.focus()})},onRemove:se=>{const me=L.filter(ze=>ze.id!==se);$(me),me.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=Ie.current)==null?void 0:ze.focus()})}}),re.length>0&&h.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:re.map((se,me)=>{const ze=()=>oe(Te=>Te.filter((Xe,Ct)=>Ct!==me));return se.mediaType==="application/pdf"?h.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:se.name,children:[h.jsx(Vu,{size:22}),h.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:se.name??"document.pdf"}),h.jsx("button",{title:G6(),"aria-label":G6(),onClick:ze,children:h.jsx(_s,{size:11})})]},me):h.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:[h.jsx("img",{src:se.dataUrl,alt:Xee()}),h.jsx("button",{title:V6(),"aria-label":V6(),onClick:ze,children:h.jsx(_s,{size:11})})]},me)})}),he&&h.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:he}),q&&h.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:q}),h.jsxs("div",{className:"composer-input relative flex overflow-hidden [&_textarea]:flex-1",children:[h.jsx("textarea",{dir:"auto",ref:Ie,className:"relative z-1 bg-transparent",value:J,placeholder:Rs?Hne():aa&&et?hne({harness:Ae(kf[et.id]),shortcut:Ae(ds)}):It?et!=null&&et.agentReady?wK({harness:Ae(kf[It.harness])}):vK({harness:Ae(kf[It.harness])}):kW(),rows:2,onPaste:qr,onDragOver:se=>{se.dataTransfer.types.includes("Files")&&se.preventDefault()},onDrop:se=>{se.dataTransfer.files.length!==0&&(se.preventDefault(),Lr(Array.from(se.dataTransfer.files)))},onChange:se=>{const me=se.target.value,ze=se.target.selectionStart;Nn(ze);const Te=ze>0&&/\s/.test(me[ze-1])&&!Rs&&!rn.current?Fv(me,ze-1):null;if((Te==null?void 0:Te.query)==="plan"&&(_t!=null&&_t.planActivation)){Or(me,Te);return}const Xe=Te?yr.find(Ct=>Ct.source!=="command"&&Ct.name===Te.query):void 0;if(Xe&&Te){const Ct=y8(me,Te,Xe.name,2);B(Ct.text),window.requestAnimationFrame(()=>{var Ir;(Ir=Ie.current)==null||Ir.setSelectionRange(Ct.cursor,Ct.cursor),Nn(Ct.cursor)});return}B(me),xr(!1)},onSelect:se=>Nn(se.currentTarget.selectionStart),onCompositionStart:()=>{rn.current=!0},onCompositionEnd:()=>{rn.current=!1},onKeyDown:se=>{if(as){if(se.key==="ArrowDown"||se.key==="ArrowUp"){se.preventDefault();const me=se.key==="ArrowDown"?1:-1;is((js+me+vs.length)%vs.length);return}if(se.key==="Tab"||se.key==="Enter"){se.preventDefault(),Fn(vs[js]);return}if(se.key==="Escape"){se.preventDefault(),xr(!0);return}}if(se.key==="Backspace"&&Dr(se.currentTarget)){se.preventDefault();return}se.key==="Enter"&&!se.shiftKey&&!se.nativeEvent.isComposing&&(se.preventDefault(),Va({queue:se.metaKey||se.ctrlKey}))}}),h.jsx(pdt,{text:J,isCommand:sa,skills:yr,projectId:e,textareaRef:Ie})]}),h.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:it.ref,children:[h.jsx(Jt,{type:"button",className:"composer-bare",title:q1(),"aria-label":q1(),"aria-haspopup":"dialog","aria-expanded":it.open,onClick:()=>it.setOpen(se=>!se),children:h.jsx(JKe,{size:16})}),it.open&&h.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:[h.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:q1()}),h.jsx(_Je,{})]})]}),h.jsx("input",{ref:Ve,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:se=>{Lr(Array.from(se.target.files??[])),se.target.value=""}}),h.jsx(Jt,{type:"button",className:"composer-attach",title:D6(),"aria-label":D6(),onClick:()=>{var se;return(se=Ve.current)==null?void 0:se.click()},children:h.jsx(DKe,{size:16})}),cr&&h.jsxs(Qe,{type:"button",variant:"ghost",active:!0,className:"group",title:H6(),"aria-label":H6(),onClick:()=>void Ml(),children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(_Ke,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(_s,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:pQ()})]}),h.jsx("div",{className:"min-w-0 flex-1"}),h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(Zct,{value:It,onSelect:Ii,permissionChoices:et!=null&&et.agentReady?(_t==null?void 0:_t.permissionModes)??[]:[],defaultPermissionId:(_t==null?void 0:_t.defaultPermissionMode)??null,onSelectPermission:os,reasoningChoices:et!=null&&et.agentReady?Ys.choices:[],defaultReasoningId:Ys.defaultId,onSelectReasoning:bs,onHarnesses:At,lockHarness:!!ln}),h.jsx(gdt,{usage:ln==null?void 0:ln.contextUsage})]}),zn&&!Rs?h.jsx(Jt,{className:"send-btn",variant:"stop",title:X6(),"aria-label":X6(),onClick:Oc,children:h.jsx(_s,{size:16})}):h.jsx(Jt,{className:"send-btn",variant:"primary",title:xb(),"aria-label":xb(),onClick:()=>void Va(),disabled:!(et!=null&&et.agentReady)||!J.trim()&&re.length===0&&L.length===0,children:h.jsx(YE,{size:16})})]})]})]})]})]})}function _o({className:e,...n}){return h.jsx("div",{className:ss("relative flex min-h-0 flex-1 flex-col",e),...n})}function $u({className:e,...n}){return h.jsx("div",{className:ss("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Wi({className:e,...n}){return h.jsx("div",{className:ss("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const D8=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function Bft({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}){const[c,d]=M.useState(null),_=M.useRef(null),f=M.useRef(null),m=M.useRef(!0);if(M.useLayoutEffect(()=>{m.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&m.current&&(S.scrollTop=S.scrollHeight)},[c]),M.useEffect(()=>{const S=_.current,k=f.current;if(!S||!k)return;const b=new ResizeObserver(()=>{m.current&&(S.scrollTop=S.scrollHeight)});return b.observe(k),b.observe(S),()=>b.disconnect()},[c===null]),M.useEffect(()=>{let S=!0;const k=new Set;let b=0;const v=()=>{const y=++b;Au(e).then(({messages:C})=>{!S||y!==b||d(A=>{if(!A)return C;const E=C.map(T=>k.has(T.id)?A.find(D=>D.id===T.id)??T:T),j=new Set(C.map(T=>T.id));return[...E,...A.filter(T=>!j.has(T.id))]})}).catch(()=>S&&d(C=>C??[]))};v();const x=Hf(y=>{if(y.type==="reconnected"){k.clear(),v();return}y.type!=="message"||y.sessionId!==e||(k.add(y.message.id),d(C=>{const A=C?C.slice():[],E=A.findIndex(j=>j.id===y.message.id);return E===-1?A.push(y.message):A[E]=y.message,A}))});return()=>{S=!1,x()}},[e]),c===null)return h.jsx(_o,{children:h.jsx("div",{className:D8,children:h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:qPe()})})});let g=null;for(const S of c)if(g=o4(S.parts,n),g)break;return h.jsx(_o,{children:h.jsx("div",{className:D8,ref:_,onScroll:S=>{const k=S.currentTarget;m.current=k.scrollHeight-k.scrollTop-k.clientHeight<60},children:h.jsx("div",{ref:f,children:g?h.jsx(Nft,{spawn:g,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}):h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:KPe()})})})})}function L8(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 yn(e){for(var n=1;n=0||(_[c]=o[c]);return _})(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function hn(e,n){return hj(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var a,o,l,c,d=[],_=!0,f=!1;try{if(l=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(a=l.call(s)).done)&&(d.push(a.value),d.length!==r);_=!0);}catch(m){f=!0,o=m}finally{try{if(!_&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw o}}return d}})(e,n)||gm(e,n)||pj()}function fj(e){return hj(e)||_j(e)||gm(e)||pj()}function _i(e){return(function(n){if(Array.isArray(n))return j2(n)})(e)||_j(e)||gm(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 hj(e){if(Array.isArray(e))return e}function _j(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gm(e,n){if(e){if(typeof e=="string")return j2(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)?j2(e,n):void 0}}function j2(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 a,o=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){l=!0,a=c},f:function(){try{o||t.return==null||t.return()}finally{if(l)throw a}}}}var f0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mh(e,n){return e(n={exports:{}},n.exports),n.exports}var fi=Mh((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?v.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var z=v.slice(y+1);z.indexOf("file mode")===0&&(o[C==="new"?"newMode":"oldMode"]=z.slice(10));break;case"similarity":o.similarity=parseInt(v.split(" ")[2],10);break;case"index":var E=v.slice(y+1).split(" "),j=E[0].split("..");o.oldRevision=j[0],o.newRevision=j[1],E[1]&&(o.oldMode=o.newMode=E[1]);break;case"copy":case"rename":var A=v.slice(y+1);A.indexOf("from")===0?o.oldPath=A.slice(5):o.newPath=A.slice(3),x=C;break;case"---":var D=v.slice(y+1),O=g[++k].slice(4);D==="/dev/null"?(O=O.slice(2),x="add"):O==="/dev/null"?(D=D.slice(2),x="delete"):(x="modify",D=D.slice(2),O=O.slice(2)),D&&(o.oldPath=D),O&&(o.newPath=O),m=5;break e}}o.type=x||"modify"}else if(b.indexOf("Binary")===0)o.isBinary=!0,o.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",m=2,o=null;else if(m===5)if(b.indexOf("@@")===0){var P=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);l={content:b,oldStart:P[1]-0,newStart:P[4]-0,oldLines:P[3]-0||1,newLines:P[6]-0||1,changes:[]},o.hunks.push(l),c=l.oldStart,d=l.newStart}else{var $=b.slice(0,1),F={content:b.slice(1)};switch($){case"+":F.type="insert",F.isInsert=!0,F.lineNumber=d,d++;break;case"-":F.type="delete",F.isDelete=!0,F.lineNumber=c,c++;break;case" ":F.type="normal",F.isNormal=!0,F.oldLineNumber=c,F.newLineNumber=d,c++,d++;break;case"\\":var V=l.changes[l.changes.length-1];V.isDelete||(o.newEndingNewLine=!1),V.isInsert||(o.oldEndingNewLine=!1)}F.type&&l.changes.push(F)}k++}return f}};e.exports=s})()}));function Ml(e){return e.type==="insert"}function _i(e){return e.type==="delete"}function wo(e){return e.type==="normal"}function Cut(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(a,o,l){var c=hn(a,3),d=c[0],_=c[1],f=c[2];return _?Ml(o)&&f>=0?(d.splice(f+1,0,o),[d,o,f+2]):(d.push(o),[d,o,_i(o)&&_i(_)?f:l]):(d.push(o),[d,o,_i(o)?l:-1])}),[[],null,-1]);return hn(s,1)[0]})(e.changes):e.changes;return Sn(Sn({},e),{},{isPlain:!1,changes:t})}function A2(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?v.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var A=v.slice(y+1);A.indexOf("file mode")===0&&(o[C==="new"?"newMode":"oldMode"]=A.slice(10));break;case"similarity":o.similarity=parseInt(v.split(" ")[2],10);break;case"index":var E=v.slice(y+1).split(" "),j=E[0].split("..");o.oldRevision=j[0],o.newRevision=j[1],E[1]&&(o.oldMode=o.newMode=E[1]);break;case"copy":case"rename":var T=v.slice(y+1);T.indexOf("from")===0?o.oldPath=T.slice(5):o.newPath=T.slice(3),x=C;break;case"---":var D=v.slice(y+1),I=g[++k].slice(4);D==="/dev/null"?(I=I.slice(2),x="add"):I==="/dev/null"?(D=D.slice(2),x="delete"):(x="modify",D=D.slice(2),I=I.slice(2)),D&&(o.oldPath=D),I&&(o.newPath=I),m=5;break e}}o.type=x||"modify"}else if(b.indexOf("Binary")===0)o.isBinary=!0,o.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",m=2,o=null;else if(m===5)if(b.indexOf("@@")===0){var P=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);l={content:b,oldStart:P[1]-0,newStart:P[4]-0,oldLines:P[3]-0||1,newLines:P[6]-0||1,changes:[]},o.hunks.push(l),c=l.oldStart,d=l.newStart}else{var H=b.slice(0,1),F={content:b.slice(1)};switch(H){case"+":F.type="insert",F.isInsert=!0,F.lineNumber=d,d++;break;case"-":F.type="delete",F.isDelete=!0,F.lineNumber=c,c++;break;case" ":F.type="normal",F.isNormal=!0,F.oldLineNumber=c,F.newLineNumber=d,c++,d++;break;case"\\":var V=l.changes[l.changes.length-1];V.isDelete||(o.newEndingNewLine=!1),V.isInsert||(o.oldEndingNewLine=!1)}F.type&&l.changes.push(F)}k++}return f}};e.exports=s})()}));function jl(e){return e.type==="insert"}function pi(e){return e.type==="delete"}function So(e){return e.type==="normal"}function Fft(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(a,o,l){var c=hn(a,3),d=c[0],_=c[1],f=c[2];return _?jl(o)&&f>=0?(d.splice(f+1,0,o),[d,o,f+2]):(d.push(o),[d,o,pi(o)&&pi(_)?f:l]):(d.push(o),[d,o,pi(o)?l:-1])}),[[],null,-1]);return hn(s,1)[0]})(e.changes):e.changes;return yn(yn({},e),{},{isPlain:!1,changes:t})}function M2(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(` `),a=r.indexOf(` `,s+1),o=r.slice(0,s),l=r.slice(s+1,a),c=o.split(" ").slice(1,-3).join(" "),d=l.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(d),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(d),r.slice(a+1)].join(` -`)})(e.trimStart());return kut.parse(t).map((function(r){return(function(s,a){var o=s.hunks.map((function(l){return Cut(l,a)}));return Sn(Sn({},s),{},{hunks:o})})(r,n)}))}function Eut(e){return e[0]}function Nut(e){return e[e.length-1]}function T2(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function Xf(e){return e==="old"?function(n){return Ml(n)?-1:wo(n)?n.oldLineNumber:n.lineNumber}:function(n){return _i(n)?-1:wo(n)?n.newLineNumber:n.lineNumber}}function rj(e,n){return function(t,r){var s=t[e],a=s+t[n];return r>=s&&r=a&&s-1},Lut=function(e,n){var t=this.__data__,r=mm(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function xu(e){var n=-1,t=e==null?0:e.length;for(this.clear();++nl))return!1;var d=a.get(e),_=a.get(n);if(d&&_)return d==n&&_==e;var f=-1,m=!0,g=2&t?new vdt:void 0;for(a.set(e,n),a.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Gn={};Gn["[object Float32Array]"]=Gn["[object Float64Array]"]=Gn["[object Int8Array]"]=Gn["[object Int16Array]"]=Gn["[object Int32Array]"]=Gn["[object Uint8Array]"]=Gn["[object Uint8ClampedArray]"]=Gn["[object Uint16Array]"]=Gn["[object Uint32Array]"]=!0,Gn["[object Arguments]"]=Gn["[object Array]"]=Gn["[object ArrayBuffer]"]=Gn["[object Boolean]"]=Gn["[object DataView]"]=Gn["[object Date]"]=Gn["[object Error]"]=Gn["[object Function]"]=Gn["[object Map]"]=Gn["[object Number]"]=Gn["[object Object]"]=Gn["[object RegExp]"]=Gn["[object Set]"]=Gn["[object String]"]=Gn["[object WeakMap]"]=!1;var Ddt=function(e){return Zu(e)&&a4(e.length)&&!!Gn[hd(e)]},Ldt=function(e){return function(n){return e(n)}},Bk=Th((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&aj.process,a=(function(){try{var o=r&&r.require&&r.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})),$k=Bk&&Bk.isTypedArray,o4=$k?Ldt($k):Ddt,Odt=Object.prototype.hasOwnProperty,Idt=function(e,n){var t=mi(e),r=!t&&xm(e),s=!t&&!r&&mp(e),a=!t&&!r&&!s&&o4(e),o=t||r||s||a,l=o?Adt(e.length,String):[],c=l.length;for(var d in e)!Odt.call(e,d)||o&&(d=="length"||s&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||fj(d,c))||l.push(d);return l},Bdt=Object.prototype,hj=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||Bdt)},$dt=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),Hdt=Object.prototype.hasOwnProperty,_j=function(e){if(!hj(e))return $dt(e);var n=[];for(var t in Object(e))Hdt.call(e,t)&&t!="constructor"&&n.push(t);return n},ym=function(e){return e!=null&&a4(e.length)&&!lj(e)},l4=function(e){return ym(e)?Idt(e):_j(e)},Hk=function(e){return kdt(e,l4,zdt)},Pdt=Object.prototype.hasOwnProperty,Fdt=function(e,n,t,r,s,a){var o=1&t,l=Hk(e),c=l.length;if(c!=Hk(n).length&&!o)return!1;for(var d=c;d--;){var _=l[d];if(!(o?_ in n:Pdt.call(n,_)))return!1}var f=a.get(e),m=a.get(n);if(f&&m)return f==n&&m==e;var g=!0;a.set(e,n),a.set(n,e);for(var S=o;++d1)return!1;if(e.length===1){var n=hn(e,1)[0];return n.type==="text"&&!n.value}return!0}function Tft(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,a=El(e,zft),o=s?function(l,c){return s(l,Gk,c)}:Gk;return h.jsx("td",Sn(Sn({},a),{},{"data-change-key":n,children:r?Aft(r)?" ":r.map(o):t||" "}))}var wj=M.memo(Tft);function Sj(e,n){return function(){var t=n==="old"?Em(e):Nm(e);return t===-1?void 0:t}}function kj(e,n){return function(t){return e&&t?h.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function gp(e,n){return n?function(t){e(),n(t)}:e}function Vk(e,n,t,r){return M.useMemo((function(){var s=yj(e,(function(a){return function(o){return a&&a(n,o)}}));return s.onMouseEnter=gp(t,s.onMouseEnter),s.onMouseLeave=gp(r,s.onMouseLeave),s}),[e,t,r,n])}function Wk(e,n,t,r,s,a,o,l,c){var d={change:n,side:r,inHoverState:l,renderDefault:Sj(n,r),wrapInAnchor:kj(s,a)};return h.jsx("td",Sn(Sn({className:e},o),{},{"data-change-key":t,children:c(d)}))}function jft(e){var n,t,r,s=e.change,a=e.selected,o=e.tokens,l=e.className,c=e.generateLineClassName,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.gutterAnchor,k=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,x=s.type,y=s.content,C=bl(s),z=(n=hn(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),E=hn(z,3),j=E[0],A=E[1],D=E[2],O=M.useMemo((function(){return{change:s}}),[s]),P=Vk(f,O,A,D),$=Vk(m,O,A,D),F=k(s),V=c({changes:[s],defaultGenerate:function(){return l}}),X=ui("diff-gutter","diff-gutter-".concat(x),d,{"diff-gutter-selected":a}),W=ui("diff-code","diff-code-".concat(x),_,{"diff-code-selected":a});return h.jsxs("tr",{id:F,className:ui("diff-line",V),children:[!g&&Wk(X,s,C,"old",S,F,P,j,v),!g&&Wk(X,s,C,"new",S,F,P,j,v),h.jsx(wj,Sn({className:W,changeKey:C,text:y,tokens:o,renderToken:b},$))]})}var Mft=M.memo(jft);function Rft(e){var n=e.hideGutter,t=e.element;return h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var Dft=["hideGutter","selectedChanges","tokens","lineClassName"],Lft=["hunk","widgets","className"];function Oft(e){var n=e.hunk,t=e.widgets,r=e.className,s=El(e,Lft),a=(function(o,l){return o.reduce((function(c,d){var _=bl(d);c.push(["change",_,d]);var f=l[_];return f&&c.push(["widget",_,f]),c}),[])})(n.changes,t);return h.jsx("tbody",{className:ui("diff-hunk",r),children:a.map((function(o){return(function(l,c){var d=hn(l,3),_=d[0],f=d[1],m=d[2],g=c.hideGutter,S=c.selectedChanges,k=c.tokens,b=c.lineClassName,v=El(c,Dft);if(_==="change"){var x=_i(m)?"old":"new",y=_i(m)?Em(m):Nm(m),C=k?k[x][y-1]:null;return h.jsx(Mft,Sn({className:b,change:m,hideGutter:g,selected:S.includes(f),tokens:C},v),"change".concat(f))}return _==="widget"?h.jsx(Rft,{hideGutter:g,element:m},"widget".concat(f)):null})(o,s)}))})}var Cj=0;function h0(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),a=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var o=yj(r,(function(l){return function(c){return l&&l({side:e,change:t},c)}}));return o.onMouseEnter=gp(s,o.onMouseEnter),o.onMouseLeave=gp(a,o.onMouseLeave),o}),[t,r,s,e,a])}function Zv(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,a=e.gutterClassName,o=e.codeClassName,l=e.gutterEvents,c=e.codeEvents,d=e.anchorID,_=e.gutterAnchor,f=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,S=e.renderToken,k=e.renderGutter;if(!n){var b=ui("diff-gutter","diff-gutter-omit",a),v=ui("diff-code","diff-code-omit",o);return[!m&&h.jsx("td",{className:b},"gutter"),h.jsx("td",{className:v},"code")]}var x=n.type,y=n.content,C=bl(n),z=t===Cj?"old":"new",E=Sn({id:d||void 0,className:ui("diff-gutter","diff-gutter-".concat(x),N2({"diff-gutter-selected":r},"diff-line-hover-"+z,g),a),children:k({change:n,side:z,inHoverState:g,renderDefault:Sj(n,z),wrapInAnchor:kj(_,f)})},l),j=ui("diff-code","diff-code-".concat(x),N2({"diff-code-selected":r},"diff-line-hover-"+z,g),o);return[!m&&h.jsx("td",Sn(Sn({},E),{},{"data-change-key":C}),"gutter"),h.jsx(wj,Sn({className:j,changeKey:C,text:y,tokens:s,renderToken:S},c),"code")]}function Ift(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,a=e.newSelected,o=e.oldTokens,l=e.newTokens,c=e.monotonous,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.generateAnchorID,k=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,x=e.renderGutter,y=hn(M.useState(""),2),C=y[0],z=y[1],E=h0("old",z,t,f),j=h0("new",z,r,f),A=h0("old",z,t,m),D=h0("new",z,r,m),O=t&&S(t),P=r&&S(r),$=k({changes:[t,r],defaultGenerate:function(){return n}}),F={monotonous:c,hideGutter:g,gutterClassName:d,codeClassName:_,gutterEvents:f,codeEvents:m,renderToken:v,renderGutter:x},V=Sn(Sn({},F),{},{change:t,side:Cj,selected:s,tokens:o,gutterEvents:E,codeEvents:A,anchorID:O,gutterAnchor:b,gutterAnchorTarget:O,hover:C==="old"}),X=Sn(Sn({},F),{},{change:r,side:1,selected:a,tokens:l,gutterEvents:j,codeEvents:D,anchorID:t===r?null:P,gutterAnchor:b,gutterAnchorTarget:t===r?O:P,hover:C==="new"});if(c)return h.jsx("tr",{className:ui("diff-line",$),children:Zv(t?V:X)});var W=(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 h.jsxs("tr",{className:ui("diff-line",W,$),children:[Zv(V),Zv(X)]})}var Bft=M.memo(Ift);function $ft(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):h.jsxs("tr",{className:"diff-widget",children:[h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var Hft=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],Pft=["hunk","widgets","className"];function _0(e,n){return(e?bl(e):"00")+(n?bl(n):"00")}function Fft(e){var n=e.hunk,t=e.widgets,r=e.className,s=El(e,Pft),a=(function(o,l){for(var c=function(v){if(!v)return null;var x=bl(v);return l[x]||null},d=[],_=0;_=s&&r=a&&s-1},Qft=function(e,n){var t=this.__data__,r=vm(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function ku(e){var n=-1,t=e==null?0:e.length;for(this.clear();++nl))return!1;var d=a.get(e),_=a.get(n);if(d&&_)return d==n&&_==e;var f=-1,m=!0,g=2&t?new Lht:void 0;for(a.set(e,n),a.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Vn={};Vn["[object Float32Array]"]=Vn["[object Float64Array]"]=Vn["[object Int8Array]"]=Vn["[object Int16Array]"]=Vn["[object Int32Array]"]=Vn["[object Uint8Array]"]=Vn["[object Uint8ClampedArray]"]=Vn["[object Uint16Array]"]=Vn["[object Uint32Array]"]=!0,Vn["[object Arguments]"]=Vn["[object Array]"]=Vn["[object ArrayBuffer]"]=Vn["[object Boolean]"]=Vn["[object DataView]"]=Vn["[object Date]"]=Vn["[object Error]"]=Vn["[object Function]"]=Vn["[object Map]"]=Vn["[object Number]"]=Vn["[object Object]"]=Vn["[object RegExp]"]=Vn["[object Set]"]=Vn["[object String]"]=Vn["[object WeakMap]"]=!1;var Zht=function(e){return td(e)&&d4(e.length)&&!!Vn[gd(e)]},Qht=function(e){return function(n){return e(n)}},U8=Mh((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&xj.process,a=(function(){try{var o=r&&r.require&&r.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})),q8=U8&&U8.isTypedArray,f4=q8?Qht(q8):Zht,Jht=Object.prototype.hasOwnProperty,e_t=function(e,n){var t=gi(e),r=!t&&wm(e),s=!t&&!r&&gp(e),a=!t&&!r&&!s&&f4(e),o=t||r||s||a,l=o?Vht(e.length,String):[],c=l.length;for(var d in e)!Jht.call(e,d)||o&&(d=="length"||s&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Ej(d,c))||l.push(d);return l},t_t=Object.prototype,Nj=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||t_t)},n_t=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),r_t=Object.prototype.hasOwnProperty,zj=function(e){if(!Nj(e))return n_t(e);var n=[];for(var t in Object(e))r_t.call(e,t)&&t!="constructor"&&n.push(t);return n},Sm=function(e){return e!=null&&d4(e.length)&&!wj(e)},h4=function(e){return Sm(e)?e_t(e):zj(e)},G8=function(e){return Pht(e,h4,Ght)},s_t=Object.prototype.hasOwnProperty,i_t=function(e,n,t,r,s,a){var o=1&t,l=G8(e),c=l.length;if(c!=G8(n).length&&!o)return!1;for(var d=c;d--;){var _=l[d];if(!(o?_ in n:s_t.call(n,_)))return!1}var f=a.get(e),m=a.get(n);if(f&&m)return f==n&&m==e;var g=!0;a.set(e,n),a.set(n,e);for(var S=o;++d1)return!1;if(e.length===1){var n=hn(e,1)[0];return n.type==="text"&&!n.value}return!0}function W_t(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,a=Cl(e,G_t),o=s?function(l,c){return s(l,X8,c)}:X8;return h.jsx("td",yn(yn({},a),{},{"data-change-key":n,children:r?V_t(r)?" ":r.map(o):t||" "}))}var Oj=M.memo(W_t);function Ij(e,n){return function(){var t=n==="old"?zm(e):Am(e);return t===-1?void 0:t}}function Bj(e,n){return function(t){return e&&t?h.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function vp(e,n){return n?function(t){e(),n(t)}:e}function Z8(e,n,t,r){return M.useMemo((function(){var s=Lj(e,(function(a){return function(o){return a&&a(n,o)}}));return s.onMouseEnter=vp(t,s.onMouseEnter),s.onMouseLeave=vp(r,s.onMouseLeave),s}),[e,t,r,n])}function Q8(e,n,t,r,s,a,o,l,c){var d={change:n,side:r,inHoverState:l,renderDefault:Ij(n,r),wrapInAnchor:Bj(s,a)};return h.jsx("td",yn(yn({className:e},o),{},{"data-change-key":t,children:c(d)}))}function K_t(e){var n,t,r,s=e.change,a=e.selected,o=e.tokens,l=e.className,c=e.generateLineClassName,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.gutterAnchor,k=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,x=s.type,y=s.content,C=vl(s),A=(n=hn(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),E=hn(A,3),j=E[0],T=E[1],D=E[2],I=M.useMemo((function(){return{change:s}}),[s]),P=Z8(f,I,T,D),H=Z8(m,I,T,D),F=k(s),V=c({changes:[s],defaultGenerate:function(){return l}}),X=fi("diff-gutter","diff-gutter-".concat(x),d,{"diff-gutter-selected":a}),W=fi("diff-code","diff-code-".concat(x),_,{"diff-code-selected":a});return h.jsxs("tr",{id:F,className:fi("diff-line",V),children:[!g&&Q8(X,s,C,"old",S,F,P,j,v),!g&&Q8(X,s,C,"new",S,F,P,j,v),h.jsx(Oj,yn({className:W,changeKey:C,text:y,tokens:o,renderToken:b},H))]})}var Y_t=M.memo(K_t);function X_t(e){var n=e.hideGutter,t=e.element;return h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var Z_t=["hideGutter","selectedChanges","tokens","lineClassName"],Q_t=["hunk","widgets","className"];function J_t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cl(e,Q_t),a=(function(o,l){return o.reduce((function(c,d){var _=vl(d);c.push(["change",_,d]);var f=l[_];return f&&c.push(["widget",_,f]),c}),[])})(n.changes,t);return h.jsx("tbody",{className:fi("diff-hunk",r),children:a.map((function(o){return(function(l,c){var d=hn(l,3),_=d[0],f=d[1],m=d[2],g=c.hideGutter,S=c.selectedChanges,k=c.tokens,b=c.lineClassName,v=Cl(c,Z_t);if(_==="change"){var x=pi(m)?"old":"new",y=pi(m)?zm(m):Am(m),C=k?k[x][y-1]:null;return h.jsx(Y_t,yn({className:b,change:m,hideGutter:g,selected:S.includes(f),tokens:C},v),"change".concat(f))}return _==="widget"?h.jsx(X_t,{hideGutter:g,element:m},"widget".concat(f)):null})(o,s)}))})}var $j=0;function _0(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),a=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var o=Lj(r,(function(l){return function(c){return l&&l({side:e,change:t},c)}}));return o.onMouseEnter=vp(s,o.onMouseEnter),o.onMouseLeave=vp(a,o.onMouseLeave),o}),[t,r,s,e,a])}function Jv(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,a=e.gutterClassName,o=e.codeClassName,l=e.gutterEvents,c=e.codeEvents,d=e.anchorID,_=e.gutterAnchor,f=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,S=e.renderToken,k=e.renderGutter;if(!n){var b=fi("diff-gutter","diff-gutter-omit",a),v=fi("diff-code","diff-code-omit",o);return[!m&&h.jsx("td",{className:b},"gutter"),h.jsx("td",{className:v},"code")]}var x=n.type,y=n.content,C=vl(n),A=t===$j?"old":"new",E=yn({id:d||void 0,className:fi("diff-gutter","diff-gutter-".concat(x),T2({"diff-gutter-selected":r},"diff-line-hover-"+A,g),a),children:k({change:n,side:A,inHoverState:g,renderDefault:Ij(n,A),wrapInAnchor:Bj(_,f)})},l),j=fi("diff-code","diff-code-".concat(x),T2({"diff-code-selected":r},"diff-line-hover-"+A,g),o);return[!m&&h.jsx("td",yn(yn({},E),{},{"data-change-key":C}),"gutter"),h.jsx(Oj,yn({className:j,changeKey:C,text:y,tokens:s,renderToken:S},c),"code")]}function e0t(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,a=e.newSelected,o=e.oldTokens,l=e.newTokens,c=e.monotonous,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.generateAnchorID,k=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,x=e.renderGutter,y=hn(M.useState(""),2),C=y[0],A=y[1],E=_0("old",A,t,f),j=_0("new",A,r,f),T=_0("old",A,t,m),D=_0("new",A,r,m),I=t&&S(t),P=r&&S(r),H=k({changes:[t,r],defaultGenerate:function(){return n}}),F={monotonous:c,hideGutter:g,gutterClassName:d,codeClassName:_,gutterEvents:f,codeEvents:m,renderToken:v,renderGutter:x},V=yn(yn({},F),{},{change:t,side:$j,selected:s,tokens:o,gutterEvents:E,codeEvents:T,anchorID:I,gutterAnchor:b,gutterAnchorTarget:I,hover:C==="old"}),X=yn(yn({},F),{},{change:r,side:1,selected:a,tokens:l,gutterEvents:j,codeEvents:D,anchorID:t===r?null:P,gutterAnchor:b,gutterAnchorTarget:t===r?I:P,hover:C==="new"});if(c)return h.jsx("tr",{className:fi("diff-line",H),children:Jv(t?V:X)});var W=(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 h.jsxs("tr",{className:fi("diff-line",W,H),children:[Jv(V),Jv(X)]})}var t0t=M.memo(e0t);function n0t(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):h.jsxs("tr",{className:"diff-widget",children:[h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var r0t=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],s0t=["hunk","widgets","className"];function p0(e,n){return(e?vl(e):"00")+(n?vl(n):"00")}function i0t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cl(e,s0t),a=(function(o,l){for(var c=function(v){if(!v)return null;var x=vl(v);return l[x]||null},d=[],_=0;_=(a==null?void 0:a.value.length))return[e];var l=function(f,m){var g=a.value.slice(f,m);return[].concat(hi(s),[Sn(Sn({},a),{},{value:g})])};if(n>0){var c=l(0,n);o.push(Nu(c))}var d=l(Math.max(n,0),t);if(o.push(r?(function(f,m){return[m].concat(hi(Nu(f)))})(d,r):Nu(d)),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=El(e,lht);t.push(s);var a,o=s4(r);try{for(o.s();!(a=o.n()).done;)Aj(a.value,n,t)}catch(l){o.e(l)}finally{o.f()}t.pop()}else n.push(Nu([].concat(hi(t.slice(1)),[e])));return n}function cht(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var d=h4(c);return d.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[m0(r(n.oldSource)),m0(r(t))]}var s=hn(x0t(e),2),a=s[0],o=s[1],l=n.highlight?function(c){return m0(n.refractor.highlight(c,n.language))}:function(c){return m0([{type:"text",value:c}])};return[l(a),l(o)]}function ju(e){return e.map((function(n){return yn({},n)}))}function w0t(e,n){return[].concat(_i(ju(e.slice(0,-1))),[n])}function S0t(e){return e.type==="text"}function v4(e){var n=e[e.length-1];if(S0t(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function k0t(e,n,t,r){var s=e.slice(0,-1),a=v4(e),o=[];if(t<=0||n>=(a==null?void 0:a.value.length))return[e];var l=function(f,m){var g=a.value.slice(f,m);return[].concat(_i(s),[yn(yn({},a),{},{value:g})])};if(n>0){var c=l(0,n);o.push(ju(c))}var d=l(Math.max(n,0),t);if(o.push(r?(function(f,m){return[m].concat(_i(ju(f)))})(d,r):ju(d)),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=Cl(e,C0t);t.push(s);var a,o=c4(r);try{for(o.s();!(a=o.n()).done;)Uj(a.value,n,t)}catch(l){o.e(l)}finally{o.f()}t.pop()}else n.push(ju([].concat(_i(t.slice(1)),[e])));return n}function E0t(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var d=v4(c);return d.value.includes(` `)?d.value.split(` -`).map((function(_){return iht(c,Sn(Sn({},d),{},{value:_}))})):[c]})(t),a=QT(s),o=a[0],l=a.slice(1);return[].concat(hi(n.slice(0,-1)),[[].concat(hi(r),[o])],hi(l.map((function(c){return[c]}))))}),[[]])}function Zk(e){return cht(Aj(e))}var uht=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?wm(e,n,void 0,t):!!r},dht=function(e,n){return wm(e,n)},fht=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function hht(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=fht(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&uht(t,r,(function(a,o,l){return l==="chlidren"||dht(a,o)}))))?e.children[e.children.length-1]=(function(a,o){return"value"in a&&"value"in o?Sn(Sn({},a),{},{value:"".concat(a.value).concat(o.value)}):a})(s,n):e.children.push(n),e.children[e.children.length-1]}function Qk(e){var n,t={type:"root",children:[]},r=s4(e);try{var s=function(){var a=n.value;a.reduce((function(o,l,c){return hht(o,c===a.length-1?Sn({},l):Sn(Sn({},l),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(a){r.e(a)}finally{r.f()}return t}var _ht=Object.prototype.hasOwnProperty,pht=Nj((function(e,n,t){_ht.call(e,t)?e[t].push(n):d4(e,t,[n])})),mht=Object.prototype.hasOwnProperty,ght=function(e){if(e==null)return!0;if(ym(e)&&(mi(e)||typeof e=="string"||typeof e.splice=="function"||mp(e)||o4(e)||xm(e)))return!e.length;var n=L2(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(hj(e))return!_j(e).length;for(var t in e)if(mht.call(e,t))return!1;return!0},vht=function(e,n){var t=n.start,r=n.length,s=t+r,a=e.reduce((function(o,l){var c=hn(o,2),d=c[0],_=c[1],f=_+h4(l).value.length;if(_>s||fr.length?t:r,c=t.length>r.length?r:t,d=l.indexOf(c);if(d!=-1)return o=[new n.Diff(1,l.substring(0,d)),new n.Diff(0,c),new n.Diff(1,l.substring(d+c.length))],t.length>r.length&&(o[0][0]=o[2][0]=-1),o;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var f=_[0],m=_[1],g=_[2],S=_[3],k=_[4],b=this.diff_main(f,g,s,a),v=this.diff_main(m,S,s,a);return b.concat([new n.Diff(0,k)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,a):this.diff_bisect_(t,r,a)},n.prototype.diff_lineMode_=function(t,r,s){var a=this.diff_linesToChars_(t,r);t=a.chars1,r=a.chars2;var o=a.lineArray,l=this.diff_main(t,r,!1,s);this.diff_charsToLines_(l,o),this.diff_cleanupSemantic(l),l.push(new n.Diff(0,""));for(var c=0,d=0,_=0,f="",m="";c=1&&_>=1){l.splice(c-d-_,d+_),c=c-d-_;for(var g=this.diff_main(f,m,!1,s),S=g.length-1;S>=0;S--)l.splice(c,0,g[S]);c+=g.length}_=0,d=0,f="",m=""}c++}return l.pop(),l},n.prototype.diff_bisect_=function(t,r,s){for(var a=t.length,o=r.length,l=Math.ceil((a+o)/2),c=l,d=2*l,_=new Array(d),f=new Array(d),m=0;ms);y++){for(var C=-y+k;C<=y-b;C+=2){for(var z=c+C,E=(P=C==-y||C!=y&&_[z-1]<_[z+1]?_[z+1]:_[z-1]+1)-C;Pa)b+=2;else if(E>o)k+=2;else if(S&&(D=c+g-C)>=0&&D=(A=a-f[D]))return this.diff_bisectSplit_(t,r,P,E,s)}for(var j=-y+v;j<=y-x;j+=2){for(var A,D=c+j,O=(A=j==-y||j!=y&&f[D-1]a)x+=2;else if(O>o)v+=2;else if(!S&&(z=c+g-j)>=0&&z=(A=a-A))return this.diff_bisectSplit_(t,r,P,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,a,o){var l=t.substring(0,s),c=r.substring(0,a),d=t.substring(s),_=r.substring(a),f=this.diff_main(l,c,!1,o),m=this.diff_main(d,_,!1,o);return f.concat(m)},n.prototype.diff_linesToChars_=function(t,r){var s=[],a={};function o(d){for(var _="",f=0,m=-1,g=s.length;ma?t=t.substring(s-a):sr.length?t:r,a=t.length>r.length?r:t;if(s.length<4||2*a.length=k.length?[x,y,C,z,A]:null}var c,d,_,f,m,g=l(s,a,Math.ceil(s.length/4)),S=l(s,a,Math.ceil(s.length/2));return g||S?(c=S?g&&g[4].length>S[4].length?g:S:g,t.length>r.length?(d=c[0],_=c[1],f=c[2],m=c[3]):(f=c[0],m=c[1],d=c[2],_=c[3]),[d,_,f,m,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],a=0,o=null,l=0,c=0,d=0,_=0,f=0;l0?s[a-1]:-1,c=0,d=0,_=0,f=0,o=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),l=1;l=k?(S>=m.length/2||S>=g.length/2)&&(t.splice(l,0,new n.Diff(0,g.substring(0,S))),t[l-1][1]=m.substring(0,m.length-S),t[l+1][1]=g.substring(S),l++):(k>=m.length/2||k>=g.length/2)&&(t.splice(l,0,new n.Diff(0,m.substring(0,k))),t[l-1][0]=1,t[l-1][1]=g.substring(0,g.length-k),t[l+1][0]=-1,t[l+1][1]=m.substring(k),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,b){if(!k||!b)return 6;var v=k.charAt(k.length-1),x=b.charAt(0),y=v.match(n.nonAlphaNumericRegex_),C=x.match(n.nonAlphaNumericRegex_),z=y&&v.match(n.whitespaceRegex_),E=C&&x.match(n.whitespaceRegex_),j=z&&v.match(n.linebreakRegex_),A=E&&x.match(n.linebreakRegex_),D=j&&k.match(n.blanklineEndRegex_),O=A&&b.match(n.blanklineStartRegex_);return D||O?5:j||A?4:y&&!z&&E?3:z||E?2:y||C?1:0}for(var s=1;s=g&&(g=S,_=a,f=o,m=l)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=f,m?t[s+1][1]=m:(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=[],a=0,o=null,l=0,c=!1,d=!1,_=!1,f=!1;l0?s[a-1]:-1,_=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,a=0,o=0,l="",c="";s1?(a!==0&&o!==0&&((r=this.diff_commonPrefix(c,l))!==0&&(s-a-o>0&&t[s-a-o-1][0]==0?t[s-a-o-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),l=l.substring(r)),(r=this.diff_commonSuffix(c,l))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.length-r),l=l.substring(0,l.length-r))),s-=a+o,t.splice(s,a+o),l.length&&(t.splice(s,0,new n.Diff(-1,l)),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++,o=0,a=0,l="",c=""}t[t.length-1][1]===""&&t.pop();var d=!1;for(s=1;sr));s++)l=a,c=o;return t.length!=s&&t[s][0]===-1?c:c+(r-l)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,a=//g,l=/\n/g,c=0;c");switch(d){case 1:r[c]=''+_+"";break;case-1:r[c]=''+_+"";break;case 0:r[c]=""+_+""}}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 a=this.match_alphabet_(r),o=this;function l(E,j){var A=E/r.length,D=Math.abs(s-j);return o.Match_Distance?A+D/o.Match_Distance:D?1:A}var c=this.Match_Threshold,d=t.indexOf(r,s);d!=-1&&(c=Math.min(l(0,d),c),(d=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(l(0,d),c)));var _,f,m=1<=b;y--){var C=a[t.charAt(y-1)];if(x[y]=k===0?(x[y+1]<<1|1)&C:(x[y+1]<<1|1)&C|(g[y+1]|g[y])<<1|1|g[y+1],x[y]&m){var z=l(k,y-1);if(z<=c){if(c=z,!((d=y-1)>s))break;b=Math.max(1,2*s-d)}}}if(l(k+1,s)>c)break;g=x}return d},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)o=t,a=this.diff_text1(o);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)a=t,o=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");a=t,o=s}if(o.length===0)return[];for(var l=[],c=new n.patch_obj,d=0,_=0,f=0,m=a,g=a,S=0;S=2*this.Patch_Margin&&d&&(this.patch_addContext_(c,m),l.push(c),c=new n.patch_obj,d=0,m=g,_=f)}k!==1&&(_+=b.length),k!==-1&&(f+=b.length)}return d&&(this.patch_addContext_(c,m),l.push(c)),l},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),_))!=-1&&((m=this.match_main(r,f.substring(f.length-this.Match_MaxBits),_+f.length-this.Match_MaxBits))==-1||c>=m)&&(c=-1):c=this.match_main(r,f,_),c==-1)o[l]=!1,a-=t[l].length2-t[l].length1;else if(o[l]=!0,a=c-_,f==(d=m==-1?r.substring(c,c+f.length):r.substring(c,m+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[l].diffs)+r.substring(c+f.length);else{var g=this.diff_main(f,d,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(g)/f.length>this.Patch_DeleteThreshold)o[l]=!1;else{this.diff_cleanupSemanticLossless(g);for(var S,k=0,b=0;bl[0][1].length){var c=r-l[0][1].length;l[0][1]=s.substring(l[0][1].length)+l[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}return(l=(o=t[t.length-1]).diffs).length==0||l[l.length-1][0]!=0?(l.push(new n.Diff(0,s)),o.length1+=r,o.length2+=r):r>l[l.length-1][1].length&&(c=r-l[l.length-1][1].length,l[l.length-1][1]+=s.substring(0,c),o.length1+=c,o.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(d.length1+=m.length,o+=m.length,_=!1,d.diffs.push(new n.Diff(f,m)),a.diffs.shift()):(m=m.substring(0,r-d.length1-this.Patch_Margin),d.length1+=m.length,o+=m.length,f===0?(d.length2+=m.length,l+=m.length):_=!1,d.diffs.push(new n.Diff(f,m)),m==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(m.length))}c=(c=this.diff_text2(d.diffs)).substring(c.length-this.Patch_Margin);var g=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);g!==""&&(d.length1+=g.length,d.length2+=g.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===0?d.diffs[d.diffs.length-1][1]+=g:d.diffs.push(new n.Diff(0,g))),_||t.splice(++s,0,d)}}},n.prototype.patch_toText=function(t){for(var r=[],s=0;ss||fr.length?t:r,c=t.length>r.length?r:t,d=l.indexOf(c);if(d!=-1)return o=[new n.Diff(1,l.substring(0,d)),new n.Diff(0,c),new n.Diff(1,l.substring(d+c.length))],t.length>r.length&&(o[0][0]=o[2][0]=-1),o;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var f=_[0],m=_[1],g=_[2],S=_[3],k=_[4],b=this.diff_main(f,g,s,a),v=this.diff_main(m,S,s,a);return b.concat([new n.Diff(0,k)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,a):this.diff_bisect_(t,r,a)},n.prototype.diff_lineMode_=function(t,r,s){var a=this.diff_linesToChars_(t,r);t=a.chars1,r=a.chars2;var o=a.lineArray,l=this.diff_main(t,r,!1,s);this.diff_charsToLines_(l,o),this.diff_cleanupSemantic(l),l.push(new n.Diff(0,""));for(var c=0,d=0,_=0,f="",m="";c=1&&_>=1){l.splice(c-d-_,d+_),c=c-d-_;for(var g=this.diff_main(f,m,!1,s),S=g.length-1;S>=0;S--)l.splice(c,0,g[S]);c+=g.length}_=0,d=0,f="",m=""}c++}return l.pop(),l},n.prototype.diff_bisect_=function(t,r,s){for(var a=t.length,o=r.length,l=Math.ceil((a+o)/2),c=l,d=2*l,_=new Array(d),f=new Array(d),m=0;ms);y++){for(var C=-y+k;C<=y-b;C+=2){for(var A=c+C,E=(P=C==-y||C!=y&&_[A-1]<_[A+1]?_[A+1]:_[A-1]+1)-C;Pa)b+=2;else if(E>o)k+=2;else if(S&&(D=c+g-C)>=0&&D=(T=a-f[D]))return this.diff_bisectSplit_(t,r,P,E,s)}for(var j=-y+v;j<=y-x;j+=2){for(var T,D=c+j,I=(T=j==-y||j!=y&&f[D-1]a)x+=2;else if(I>o)v+=2;else if(!S&&(A=c+g-j)>=0&&A=(T=a-T))return this.diff_bisectSplit_(t,r,P,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,a,o){var l=t.substring(0,s),c=r.substring(0,a),d=t.substring(s),_=r.substring(a),f=this.diff_main(l,c,!1,o),m=this.diff_main(d,_,!1,o);return f.concat(m)},n.prototype.diff_linesToChars_=function(t,r){var s=[],a={};function o(d){for(var _="",f=0,m=-1,g=s.length;ma?t=t.substring(s-a):sr.length?t:r,a=t.length>r.length?r:t;if(s.length<4||2*a.length=k.length?[x,y,C,A,T]:null}var c,d,_,f,m,g=l(s,a,Math.ceil(s.length/4)),S=l(s,a,Math.ceil(s.length/2));return g||S?(c=S?g&&g[4].length>S[4].length?g:S:g,t.length>r.length?(d=c[0],_=c[1],f=c[2],m=c[3]):(f=c[0],m=c[1],d=c[2],_=c[3]),[d,_,f,m,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],a=0,o=null,l=0,c=0,d=0,_=0,f=0;l0?s[a-1]:-1,c=0,d=0,_=0,f=0,o=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),l=1;l=k?(S>=m.length/2||S>=g.length/2)&&(t.splice(l,0,new n.Diff(0,g.substring(0,S))),t[l-1][1]=m.substring(0,m.length-S),t[l+1][1]=g.substring(S),l++):(k>=m.length/2||k>=g.length/2)&&(t.splice(l,0,new n.Diff(0,m.substring(0,k))),t[l-1][0]=1,t[l-1][1]=g.substring(0,g.length-k),t[l+1][0]=-1,t[l+1][1]=m.substring(k),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,b){if(!k||!b)return 6;var v=k.charAt(k.length-1),x=b.charAt(0),y=v.match(n.nonAlphaNumericRegex_),C=x.match(n.nonAlphaNumericRegex_),A=y&&v.match(n.whitespaceRegex_),E=C&&x.match(n.whitespaceRegex_),j=A&&v.match(n.linebreakRegex_),T=E&&x.match(n.linebreakRegex_),D=j&&k.match(n.blanklineEndRegex_),I=T&&b.match(n.blanklineStartRegex_);return D||I?5:j||T?4:y&&!A&&E?3:A||E?2:y||C?1:0}for(var s=1;s=g&&(g=S,_=a,f=o,m=l)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=f,m?t[s+1][1]=m:(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=[],a=0,o=null,l=0,c=!1,d=!1,_=!1,f=!1;l0?s[a-1]:-1,_=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,a=0,o=0,l="",c="";s1?(a!==0&&o!==0&&((r=this.diff_commonPrefix(c,l))!==0&&(s-a-o>0&&t[s-a-o-1][0]==0?t[s-a-o-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),l=l.substring(r)),(r=this.diff_commonSuffix(c,l))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.length-r),l=l.substring(0,l.length-r))),s-=a+o,t.splice(s,a+o),l.length&&(t.splice(s,0,new n.Diff(-1,l)),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++,o=0,a=0,l="",c=""}t[t.length-1][1]===""&&t.pop();var d=!1;for(s=1;sr));s++)l=a,c=o;return t.length!=s&&t[s][0]===-1?c:c+(r-l)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,a=//g,l=/\n/g,c=0;c");switch(d){case 1:r[c]=''+_+"";break;case-1:r[c]=''+_+"";break;case 0:r[c]=""+_+""}}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 a=this.match_alphabet_(r),o=this;function l(E,j){var T=E/r.length,D=Math.abs(s-j);return o.Match_Distance?T+D/o.Match_Distance:D?1:T}var c=this.Match_Threshold,d=t.indexOf(r,s);d!=-1&&(c=Math.min(l(0,d),c),(d=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(l(0,d),c)));var _,f,m=1<=b;y--){var C=a[t.charAt(y-1)];if(x[y]=k===0?(x[y+1]<<1|1)&C:(x[y+1]<<1|1)&C|(g[y+1]|g[y])<<1|1|g[y+1],x[y]&m){var A=l(k,y-1);if(A<=c){if(c=A,!((d=y-1)>s))break;b=Math.max(1,2*s-d)}}}if(l(k+1,s)>c)break;g=x}return d},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)o=t,a=this.diff_text1(o);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)a=t,o=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");a=t,o=s}if(o.length===0)return[];for(var l=[],c=new n.patch_obj,d=0,_=0,f=0,m=a,g=a,S=0;S=2*this.Patch_Margin&&d&&(this.patch_addContext_(c,m),l.push(c),c=new n.patch_obj,d=0,m=g,_=f)}k!==1&&(_+=b.length),k!==-1&&(f+=b.length)}return d&&(this.patch_addContext_(c,m),l.push(c)),l},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),_))!=-1&&((m=this.match_main(r,f.substring(f.length-this.Match_MaxBits),_+f.length-this.Match_MaxBits))==-1||c>=m)&&(c=-1):c=this.match_main(r,f,_),c==-1)o[l]=!1,a-=t[l].length2-t[l].length1;else if(o[l]=!0,a=c-_,f==(d=m==-1?r.substring(c,c+f.length):r.substring(c,m+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[l].diffs)+r.substring(c+f.length);else{var g=this.diff_main(f,d,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(g)/f.length>this.Patch_DeleteThreshold)o[l]=!1;else{this.diff_cleanupSemanticLossless(g);for(var S,k=0,b=0;bl[0][1].length){var c=r-l[0][1].length;l[0][1]=s.substring(l[0][1].length)+l[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}return(l=(o=t[t.length-1]).diffs).length==0||l[l.length-1][0]!=0?(l.push(new n.Diff(0,s)),o.length1+=r,o.length2+=r):r>l[l.length-1][1].length&&(c=r-l[l.length-1][1].length,l[l.length-1][1]+=s.substring(0,c),o.length1+=c,o.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(d.length1+=m.length,o+=m.length,_=!1,d.diffs.push(new n.Diff(f,m)),a.diffs.shift()):(m=m.substring(0,r-d.length1-this.Patch_Margin),d.length1+=m.length,o+=m.length,f===0?(d.length2+=m.length,l+=m.length):_=!1,d.diffs.push(new n.Diff(f,m)),m==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(m.length))}c=(c=this.diff_text2(d.diffs)).substring(c.length-this.Patch_Margin);var g=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);g!==""&&(d.length1+=g.length,d.length2+=g.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===0?d.diffs[d.diffs.length-1][1]+=g:d.diffs.push(new n.Diff(0,g))),_||t.splice(++s,0,d)}}},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"?kht:Cht,r=f4(e.map((function(l){return l.changes})),Tj).map(t).reduce((function(l,c){var d=hn(l,2),_=d[0],f=d[1],m=hn(c,2),g=m[0],S=m[1];return[_.concat(g),f.concat(S)]}),[[],[]]),s=hn(r,2),a=s[0],o=s[1];return bht(eC(a),eC(o))}var Nht=["enhancers"],sC=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,a=hn(sht(e,El(t,Nht)),2),o=a[0],l=a[1],c=[Zk(o),Zk(l)],d=(n=[c[0],c[1]],s.reduce((function(k,b){return b(k)}),n)),_=hn(d,2),f=_[0],m=_[1],g=[f.map(Qk),m.map(Qk)],S=g[1];return{old:g[0].map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]})),new:S.map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]}))}};const I2=["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]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.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_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.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]:leading-[1.55]","[&_.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]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.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(" "),zht=2e3,Aht={highlight(e,n){return gt.highlight(e,n).children}};function Tht(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function _4(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 jht(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function B2(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 Mht(e){const n=[Eht(e.hunks,{type:"line"})],t=by(jht(e));return t&>.registered(t)?sC(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:Aht}):sC(e.hunks,{enhancers:n,highlight:!1})}function Rht(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:A2(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:A2(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const Dht=({change:e,side:n})=>n==="old"?null:Tht(e);function Mj({bytesRead:e,byteLimit:n}){return h.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:[h.jsx("h4",{children:Lfe()}),h.jsx("p",{children:hhe({limit:Ae(wa(n)),read:Ae(wa(e))})})]})}function Rj({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:a}=M.useMemo(()=>_4(e),[e]),o=t&&s+a<=zht,l=M.useMemo(()=>{if(o)try{return Mht(e)}catch{return}},[e,o]);return h.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:[h.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-semibold [&_.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:[h.jsx("span",{className:"chev",children:t?h.jsx(ja,{size:14}):h.jsx(Ma,{size:14})}),h.jsx("span",{className:"path",children:h.jsx("code",{children:B2(e)})}),h.jsxs("span",{className:"stats",children:[h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",a]})]})]}),t&&(e.hunks.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:Zfe()}):h.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:h.jsx(Kft,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:Dht,tokens:l,viewType:"unified"})}))]})}function Lht({files:e,className:n}){return h.jsx("div",{className:n?`${I2} ${n}`:I2,children:e.map((t,r)=>h.jsx(Rj,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function Oht(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 Dj({diff:e,partial:n=!1}){var m;const t=M.useMemo(()=>Rht(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((g,S)=>({file:g,key:`${g.oldPath}→${g.newPath}#${S}`,changes:_4(g)})),[r]),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=l&&!n,_=s.some(g=>g.key===a)?a:((m=s[0])==null?void 0:m.key)??null,f=s.find(g=>g.key===_)??null;return t.failed?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?Wfe():che()}):s.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:Ufe()}):h.jsxs("div",{className:"diff-explorer @container",children:[h.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:[h.jsx("strong",{children:n?s.length===1?ihe():$fe({count:an(s.length)}):s.length===1?the():Nfe({count:an(s.length)})}),!n&&h.jsx("button",{type:"button",onClick:()=>c(g=>!g),children:d?Sfe():ghe()})]}),d?h.jsx(Lht,{files:r}):h.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:[h.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":jfe(),children:s.map(g=>h.jsxs("button",{type:"button",className:g.key===_?"active":"","aria-pressed":g.key===_,onClick:()=>o(g.key),children:[h.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-${g.file.type}`,children:Oht(g.file)}),h.jsx("code",{title:B2(g.file),children:B2(g.file)}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",g.changes.additions]}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",g.changes.deletions]})]},g.key))}),h.jsx("div",{className:`${I2} diff-explorer-preview min-w-0`,children:f&&h.jsx(Rj,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function Iht({experiment:e,refreshKey:n,onLoadingChange:t}){const[r,s]=M.useState(null),[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;return t(!0),o(null),s(null),vWe(e.id).then(c=>{l||s(c)}).catch(c=>{l||o(c.message)}).finally(()=>{l||t(!1)}),()=>{l=!0}},[e.id,n,t]),h.jsx(Lu,{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:a?h.jsxs(Wi,{children:[SV()," ",Ae(a)]}):r?r.diff.trim()?h.jsxs(h.Fragment,{children:[r.truncated&&h.jsx(Mj,{bytesRead:r.bytesRead,byteLimit:r.byteLimit}),h.jsx(Dj,{diff:r.diff,partial:r.truncated})]}):h.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?jV():bV()}):h.jsx(Wi,{children:NV()})})}function Lj({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:a,githubTitle:o,refreshing:l,onRefresh:c}){return h.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&&h.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":Fne(),children:[h.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:Vne()}),h.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:Bne()})]}),r&&h.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:[h.jsx(Op,{size:12}),h.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),a&&h.jsx(Hp,{href:a,target:"_blank",rel:"noopener noreferrer",title:o,"aria-label":o,children:h.jsx(um,{size:13})}),h.jsx("span",{className:"flex-1"}),h.jsx(Qt,{title:X6(),"aria-label":X6(),onClick:c,children:l?h.jsx(dn,{}):h.jsx(WE,{size:13})})]})}const Bht=/\.(md|mdx|markdown)$/i,$ht=/\.tex$/i,Hht=/\.html?$/i,Pht=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,Fht=/\.(csv|tsv|xlsx?|ods)$/i,Uht=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,qht=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,Ght=/\.pdf$/i,Vht=/\.(docx?|log|rtf|txt)$/i;function Wht(e){return Pht.test(e)}function p4(e){return Bht.test(e)}function Oj(e){return $ht.test(e)}function Kht(e){return Hht.test(e)}function Ij({name:e}){const n=p4(e)?"markdown":Wht(e)?"image":Fht.test(e)?"spreadsheet":Uht.test(e)?"code":qht.test(e)?"archive":Ght.test(e)?"pdf":Vht.test(e)||Oj(e)?"document":"file";let t;return n==="markdown"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),h.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=h.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=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),h.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),h.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 Bj=["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(" "),iC=["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 aC(){return{dirs:new Map,files:[]}}function $j(e){const n=aC();for(const t of e){const r=t.split("/");let s=n;for(let a=0;aa(t),title:t,children:[c?h.jsx(ja,{size:13,className:iC}):h.jsx(Ma,{size:13,className:iC}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),c&&h.jsx(m4,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:a,onOpenFile:o})]})}function m4({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:a}){const o=[...e.dirs.keys()].sort((c,d)=>c.localeCompare(d)),l=[...e.files].sort((c,d)=>c.localeCompare(d));return h.jsxs(h.Fragment,{children:[o.map(c=>{const d=n?`${n}/${c}`:c;return h.jsx(Yht,{name:c,node:e.dirs.get(c),path:d,depth:t,toggled:r,onToggle:s,onOpenFile:a},`d:${d}`)}),l.map(c=>{const d=n?`${n}/${c}`:c;return h.jsxs("button",{type:"button",className:Bj,style:{paddingInlineStart:8+t*14},...vr(_=>a(d,_)),title:VO({name:Ae(d)}),children:[h.jsx(Ij,{name:c}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c})]},`f:${d}`)})]})}function Xht({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:a,onToggledChange:o,onOpenFile:l}){const c=t.branchName,d=`${e}:${c}`,[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState(!1),[x,y]=M.useState(0),[C,z]=M.useState(void 0),E=M.useRef(0),j=M.useRef(null),A=M.useCallback(()=>{j.current=d;const $=++E.current;k(!0),Sb(e,{ref:c}).then(F=>{$===E.current&&(f(F),g(null))}).catch(F=>{$===E.current&&g(F.message)}).finally(()=>{$===E.current&&k(!1)})},[e,c,d]);M.useEffect(()=>(E.current++,j.current=null,f(null),g(null),k(!1),()=>{E.current++}),[d]),M.useEffect(()=>{r==="files"&&j.current!==d&&A()},[r,d,A]),M.useEffect(()=>{z(void 0);const $=t.chatSessionId;if(!$)return;let F=!1;return nN($).then(V=>{!F&&V.exists&&V.branch===c&&z($)}).catch(()=>{}),()=>{F=!0}},[t.chatSessionId,c]);const D=M.useMemo(()=>_?$j(_.entries):null,[_]),O=r==="files"?S:b,P=M.useCallback($=>{const F=new Set(s);F.has($)?F.delete($):F.add($),o(F)},[s,o]);return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[h.jsx(Lj,{view:r,onViewChange:a,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Bp(n.githubOwner,n.githubRepo,c):void 0,githubTitle:G9({branch:Ae(c)}),refreshing:O,onRefresh:()=>r==="files"?A():y($=>$+1)}),r==="changes"?h.jsx(Iht,{experiment:t,refreshKey:x,onLoadingChange:v},t.id):h.jsxs(h.Fragment,{children:[(_==null?void 0:_.truncated)&&h.jsx(Wi,{children:Jne()}),m&&D&&h.jsxs(Wi,{children:[ore()," ",Ae(m)]}),h.jsx(Lu,{children:D?D.dirs.size===0&&D.files.length===0?h.jsx(Wi,{children:rre()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(m4,{node:D,parentPath:"",depth:0,toggled:s,onToggle:P,onOpenFile:($,F)=>C?l($,C,void 0,F):l($,void 0,c,F)})}):h.jsx(Wi,{children:m?X9({error:Ae(m)}):Z9()})})]})]})}const Zht=5e3;function Qht({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:a,onOpenFile:o}){var D;const l=n.id,[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!0),b=M.useRef(0),v=M.useCallback(()=>{const O=++b.current;k(!0),(async()=>{if(!e)return[null,await Sb(l,{ref:n.baselineBranch})];const $=await nN(e),F=$.exists?{sessionId:e}:{ref:n.baselineBranch};return[$,await Sb(l,F)]})().then(([$,F])=>{O===b.current&&(d($),f(F),g(null))}).catch($=>{O===b.current&&g($.message)}).finally(()=>{O===b.current&&k(!1)})},[e,l,n.baselineBranch]);M.useEffect(()=>(d(null),f(null),g(null),v(),()=>{b.current++}),[v]),M.useEffect(()=>{if(!e)return;let O=!1,P=!1,$=!1,F=null;const V=()=>{F||(F=setInterval(v,Zht))},X=()=>{F&&(clearInterval(F),F=null)},W=Bf(Z=>{Z.type!=="busy"||Z.sessionId!==e||(P=!0,Z.busy&&!O?(O=!0,V()):!Z.busy&&O&&(O=!1,X(),v()))});return A0(l).then(Z=>{var J;$||P||O||(J=Z.find(H=>H.id===e))!=null&&J.busy&&(O=!0,V())}).catch(()=>{}),()=>{$=!0,W(),X()}},[e,l,v]);const x=M.useMemo(()=>_?$j(_.entries):null,[_]),y=M.useCallback(O=>{const P=new Set(r);P.has(O)?P.delete(O):P.add(O),a(P)},[r,a]),C=e&&(c!=null&&c.exists)?c:null,z=(C==null?void 0:C.branch)??(C!=null&&C.baselineBranch?zqe({branch:Ae(C.baselineBranch)}):mE()),E=((D=C==null?void 0:C.files)==null?void 0:D.length)??0,j=C?xqe({branch:Ae(`${z}${E>0?"*":""}`)}):kqe({branch:Ae(n.baselineBranch)}),A=C?C.branch:n.baselineBranch;return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[h.jsx(Lj,{view:C?t:"files",onViewChange:s,showViewToggle:!!C,branchLabel:j,branchTitle:j,githubHref:n.githubEnabled&&A?Bp(n.githubOwner,n.githubRepo,A):void 0,githubTitle:A?G9({branch:Ae(A)}):void 0,refreshing:S,onRefresh:v}),m&&(c||_)&&h.jsxs(Wi,{children:[Kqe()," ",Ae(m)]}),!_||e&&!c?h.jsx(Lu,{children:h.jsx(Wi,{children:m?X9({error:Ae(m)}):Z9()})}):C&&t==="changes"?h.jsx(Lu,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:E===0||!C.diff?h.jsx("div",{className:"changes-note text-sm text-muted",children:Hqe()}):h.jsxs(h.Fragment,{children:[C.diff.truncated&&h.jsx(Mj,{bytesRead:C.diff.bytesRead,byteLimit:C.diff.byteLimit}),h.jsx(Dj,{diff:C.diff.diff,partial:C.diff.truncated})]})}):h.jsxs(Lu,{children:[_.truncated&&h.jsx(Wi,{children:Mqe()}),x?x.dirs.size===0&&x.files.length===0?h.jsx(Wi,{children:qqe()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(m4,{node:x,parentPath:"",depth:0,toggled:r,onToggle:y,onOpenFile:(O,P)=>C?o(O,e,void 0,P):o(O,void 0,n.baselineBranch,P)})}):h.jsx(Wi,{children:Oqe()})]})]})}const vp="font-mono text-sm leading-[1.55] [tab-size:4]",Hj="whitespace-pre-wrap break-words",Pj="file-view-gutter text-right text-muted select-none";function Fj(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function Uj({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const a=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` -`),f=uT(_,by(n));return _.endsWith(` -`)?f.slice(0,-1):f},[e,n]),o=t&&a.length>0?Math.min(Math.max(Math.trunc(t),1),a.length):void 0,l=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(o?((_=l.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):a.length===0&&(s==null||s()))},[a.length,s,r,o]);const{ruleCh:c}=Fj(a.length),d=M.useMemo(()=>a.map((_,f)=>h.jsxs("div",{ref:f+1===o?l:void 0,className:`file-view-line flex items-stretch ${f+1===o?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[h.jsx("span",{"data-line":f+1,className:`${Pj} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),h.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${vp} ${Hj}`,children:dT(_)?h.jsx("br",{}):_})]},f)),[a,c,o]);return h.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${vp}`,children:[a.length>0&&h.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"}),d]})}function qj(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function oC({url:e,name:n}){return h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[h0e()," ",h.jsxs("a",{href:e,download:n,children:[sE()," ",Ae(n)]})]})}function $2({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,a]=M.useState(!1);if(M.useEffect(()=>a(!1),[e,n]),s)return h.jsx(oC,{url:n,name:t});let o;return e==="image"?o=h.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:h.jsx("img",{src:n,alt:t,onError:()=>a(!0)})}):e==="audio"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):e==="video"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):o=h.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>a(!0),children:h.jsx(oC,{url:n,name:t})}),h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&h.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:h.jsxs("a",{href:n,download:t,children:[sE()," ",t]})})]})}const lC="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function Jht(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function e_t(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),a=r===-1?"":t.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1),d=l.startsWith("/")?[]:n.split("/").filter(g=>g.length>0);for(const g of l.split("/"))if(!(!g||g==="."))if(g===".."){if(d.length===0)return null;d.pop()}else d.push(g);const _=d.join("/");if(!_)return null;const f=new URLSearchParams(c);f.delete("path");const m=f.toString();return`${vh(e,_)}${m?`&${m}`:""}${a}`}function t_t(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const Gj="orx:files-tree-width",Vj="orx:artifacts-collapsed:",Wj=180,Kj=560,n_t=8,r_t=280;function s_t(){try{const e=Number(localStorage.getItem(Gj));if(Number.isFinite(e)&&e>=Wj&&e<=Kj)return e}catch{}return r_t}function i_t(e){try{const n=localStorage.getItem(`${Vj}${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 H2(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=H2(t.children??[],n);if(r)return r}}return null}function Yj({projectId:e,folder:n,markdown:t}){const r=s=>Jht(s)?s:e_t(e,n,s);return h.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:h.jsx(Ftt,{remarkPlugins:[nT,[rT,_T]],rehypePlugins:[jA],components:{a:({href:s,children:a,...o})=>{const l=!s||s.startsWith("#"),c=l?s:r(s);return c?h.jsx("a",{...o,href:c,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):h.jsx("span",{children:a})},img:({src:s,alt:a})=>{if(!s||typeof s!="string")return null;const o=r(s);return o?h.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[h.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&h.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...pT},children:fT(t_t(t))})})}function a_t(e){return e.presentation==="text"&&p4(e.name)?"markdown":qj(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function o_t(e,n,t){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(!1),[d,_]=M.useState(null),f=M.useRef(0),m=M.useRef(!1),g=t==="markdown"||t==="text"&&n.size<=sN;return M.useEffect(()=>{if(o(!1),c(!1),_(null),!g)return;let S=!1;const k=++f.current;return iN(e,n.path).then(v=>{if(!v)throw new Error(lG());return v}).then(v=>{S||k!==f.current||(v.binary?o(!0):(m.current=!0,s(v.content)),c(v.truncated))}).catch(v=>{!S&&k===f.current&&!m.current&&_(v instanceof Error?v.message:String(v))}),()=>{S=!0}},[e,n.path,n.modifiedAt,t,g]),{text:r,binary:a,truncated:l,error:d,wantsText:g}}function l_t({projectId:e,entry:n,onDelete:t}){const r=a_t(n),{text:s,binary:a,truncated:o,error:l,wantsText:c}=o_t(e,n,r),[d,_]=M.useState(!1),f=r==="markdown",m=n.path.split("/").slice(0,-1).join("/"),g=`${vh(e,n.path)}&v=${n.modifiedAt}`;let S;return r==="image"||r==="audio"||r==="video"||r==="pdf"?S=h.jsx($2,{kind:r,url:g,name:n.name}):r==="download"||!c||a?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[r==="download"||a?eG():pV()," ",h.jsx("a",{href:g,...r==="download"||a?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:r==="download"||a?tE():fG()})]}):l?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[jG()," ",Ae(l)]}):s===null?S=h.jsxs(br,{children:[h.jsx(dn,{})," ",UG()]}):f&&!d?S=h.jsx(Yj,{projectId:e,folder:m,markdown:s}):S=h.jsx(Uj,{text:s,path:n.path}),h.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"fpreview-head h-10 flex items-center gap-2 py-0 px-3.5 border-b border-b-border-variant text-subtext shrink-0",children:[h.jsx(Fu,{size:13,className:"shrink-0"}),h.jsx("code",{className:"fpreview-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Ae(n.path),children:n.path}),h.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[ZG()," ",new Date(n.modifiedAt).toLocaleString(N(),{dateStyle:"medium",timeStyle:"short"})]}),(r==="text"||r==="download")&&h.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:wa(n.size)}),f&&h.jsx(Qt,{active:d,"data-tip":d?Y0():ku(),"data-tip-align":"end","aria-label":d?Y0():ku(),onClick:()=>_(k=>!k),children:h.jsx(xb,{size:13})}),h.jsx(Hp,{href:g,target:"_blank",rel:"noopener noreferrer","data-tip":S6(),"data-tip-align":"end","aria-label":S6(),children:h.jsx(mc,{size:13})}),h.jsx(Qt,{"data-tip":w6(),"data-tip-align":"end","aria-label":w6(),onClick:()=>{window.confirm(V9({path:Ae(n.path)}))&&t(n.path)},children:h.jsx(id,{size:13})})]}),h.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 ${f&&!d?"doc":""}`,children:[S,o&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:LG()})]})]})}function Xj({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l}){return h.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(c=>{var _;const d={paddingInlineStart:8+Math.min(n,n_t)*14};if(c.isDir){const f=!t.has(c.path);return h.jsxs("div",{className:"min-w-0 max-w-full",children:[h.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:d,onClick:()=>s(c.path),children:[h.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":f?$q({name:Ae(c.name)}):Xq({name:Ae(c.name)}),onClick:m=>{m.stopPropagation(),s(c.path)},children:h.jsx(Ma,{size:13,className:f?"open":""})}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name}),h.jsx(Qt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":NG(),"data-tip-align":"end","aria-label":Vq({name:Ae(c.name)}),onClick:m=>{m.stopPropagation(),window.confirm(V9({path:Ae(c.path)}))&&l(c.path)},children:h.jsx(id,{size:12})})]}),f&&(((_=c.children)==null?void 0:_.length)??0)>0&&h.jsx(Xj,{entries:c.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l})]},c.path)}return h.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===c.path?"selected":""}`,style:d,title:WL({path:Ae(c.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===c.path,onClick:()=>a(c.path),onDoubleClick:()=>o(c.path),onAuxClick:f=>{f.button===1&&(f.preventDefault(),a(c.path),o(c.path))},onKeyDown:f=>{if(f.key===" "){f.preventDefault(),f.stopPropagation(),a(c.path);return}f.key==="Enter"&&(f.preventDefault(),f.stopPropagation(),a(c.path),o(c.path))},children:[h.jsx(Ij,{name:c.name}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name})]},c.path)})})}function cC({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return h.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:Ae(e),children:[h.jsx("code",{className:"path-front-ellipsis",children:e}),h.jsx(Qt,{size:"small",className:lC,"data-tip":t?K0():sG(),"aria-label":xG(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?h.jsx(di,{size:12}):h.jsx(Dp,{size:12})}),h.jsx(Qt,{size:"small",className:lC,"data-tip":k6(),"data-tip-align":"end","aria-label":k6(),onClick:n,children:h.jsx(LVe,{size:12})})]})}function c_t({project:e,artifacts:n,onChanged:t,onOpenFile:r,onOpenStorage:s}){const[a,o]=M.useState(null),[l,c]=M.useState(()=>i_t(e.id)),[d,_]=M.useState(s_t),f=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${Vj}${e.id}`,JSON.stringify([...l]))}catch{}},[e.id,l]);const m=v=>{var E;v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const x=(E=f.current)==null?void 0:E.getBoundingClientRect(),y=document.body.style.userSelect;document.body.style.userSelect="none";const C=j=>{const A=Math.round(j.clientX-((x==null?void 0:x.left)??0)),D=Math.min(Math.max(A,Wj),Kj);_(D);try{localStorage.setItem(Gj,String(D))}catch{}},z=()=>{window.removeEventListener("pointermove",C),window.removeEventListener("pointerup",z),window.removeEventListener("pointercancel",z),document.body.style.userSelect=y};window.addEventListener("pointermove",C),window.addEventListener("pointerup",z),window.addEventListener("pointercancel",z)};M.useEffect(()=>{if(!a||!n)return;const v=H2(n.entries,a);(!v||v.isDir)&&o(null)},[a,n]);const g=v=>c(x=>{const y=new Set(x);return y.has(v)?y.delete(v):y.add(v),y}),S=v=>{(a===v||a!=null&&a.startsWith(v+"/"))&&o(null),iKe(e.id,v).catch(()=>{}).finally(t)};if(!n)return h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs(br,{className:"p-5",children:[h.jsx(dn,{})," ",WG()]})});const k=v=>h.jsx(Xj,{entries:v,depth:0,collapsed:l,selected:a,onToggle:g,onSelect:o,onOpenFile:r,onDelete:S}),b=a?H2(n.entries,a):null;return n.entries.length===0?h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[h.jsx(bx,{size:28,strokeWidth:1.5}),h.jsx("h3",{children:tV()}),h.jsx("p",{children:dV()}),h.jsx(cC,{dir:n.dir,onOpenStorage:s})]})}):h.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background",children:[h.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",ref:f,style:{width:d},children:[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",onPointerDown:m}),h.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[k(n.entries),n.truncated&&h.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:$G()})]}),h.jsx(cC,{dir:n.dir,onOpenStorage:s})]}),b?h.jsx(l_t,{projectId:e.id,entry:b,onDelete:S},b.path):h.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",children:[h.jsx(yVe,{size:22,strokeWidth:1.5}),h.jsx("span",{children:mG()})]})]})}const Zj=20*1024*1024,Qj="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",Jj="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",eM="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",u_t="font-mono text-base font-medium text-text",d_t="mt-1 mb-0 text-sm leading-relaxed text-text";function tM(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 a=s.indexOf(",");n(a>=0?s.slice(a+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function f_t(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function nM({accept:e,busy:n,prompt:t,onFile:r}){const[s,a]=M.useState(!1),o=M.useRef(null);return h.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:l=>{l.preventDefault(),a(!0)},onDragLeave:()=>a(!1),onDrop:l=>{var d;if(l.preventDefault(),a(!1),n)return;const c=(d=l.dataTransfer.files)==null?void 0:d[0];c&&r(c)},onClick:()=>{var l;n||(l=o.current)==null||l.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:l=>{var c;(l.key==="Enter"||l.key===" ")&&!n&&(l.preventDefault(),(c=o.current)==null||c.click())},children:[h.jsx("input",{ref:o,type:"file",accept:e,hidden:!0,onChange:l=>{var d;const c=(d=l.target.files)==null?void 0:d[0];c&&r(c),l.target.value=""}}),n?h.jsxs(h.Fragment,{children:[h.jsx(dn,{}),h.jsx("span",{children:z$e()})]}):h.jsxs(h.Fragment,{children:[h.jsx(YVe,{size:20,strokeWidth:1.5}),h.jsx("span",{children:t})]})]})}function rM({bytes:e,updatedAt:n}){return h.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[wa(e),n>0&&h.jsxs("span",{className:"text-muted",children:[" · ",Ea(n)]})]})}function h_t({skill:e,onDeleted:n,onError:t}){const[r,s]=M.useState(!1);return h.jsxs("div",{className:eM,children:[h.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[h.jsxs("code",{className:u_t,children:["/",e.name]}),e.origin&&h.jsx(Rt,{children:e.origin})]}),h.jsx(rM,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&h.jsx(Qt,{"data-tip":XBe(),"data-tip-align":"end","aria-label":JIe({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(YIe({name:Ae(e.name)}))&&(s(!0),CKe(e.name).then(n).catch(a=>{s(!1),t(a instanceof Error?a.message:String(a))}))},children:h.jsx(id,{size:13})})]})}function __t({template:e,onChanged:n,onError:t}){const[r,s]=M.useState(!1),a=e.supportFiles.length;return h.jsxs("div",{className:eM,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("span",{className:"text-base font-medium text-text",children:e.name}),h.jsxs("p",{className:d_t,children:[e.entry,a>0&&(a===1?EBe():DBe({count:an(a)}))]})]}),h.jsx(rM,{bytes:e.bytes,updatedAt:e.updatedAt}),h.jsx(Qt,{"data-tip":e$e(),"data-tip-align":"end","aria-label":oBe({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(rBe({name:Ae(e.name)}))&&(s(!0),wKe(e.name).then(n).catch(o=>{s(!1),t(o instanceof Error?o.message:String(o))}))},children:h.jsx(id,{size:13})})]})}function p_t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useCallback(()=>{a(!0),SKe().then(g=>{n(g),d(null)}).catch(g=>{n([]),d(g instanceof Error?g.message:String(g))}).finally(()=>a(!1))},[]);M.useEffect(()=>{_()},[_]);const f=M.useRef(!1),m=M.useCallback(async g=>{if(!f.current){if(l(null),!f_t(g.name)){l(O$e());return}if(g.size>Zj){l(ME());return}f.current=!0,r(!0);try{await kKe({filename:g.name,contentBase64:await tM(g)}),_()}catch(S){l(S instanceof Error?S.message:String(S))}finally{f.current=!1,r(!1)}}},[_]);return h.jsxs("section",{className:Qj,children:[h.jsxs("div",{className:"flex items-baseline gap-2.5",children:[h.jsx("h3",{children:k$e()}),h.jsxs(Qe,{className:"ms-auto",size:"small",onClick:_,disabled:s,children:[h.jsx(sd,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Mp()]})]}),h.jsx("p",{className:Jj,children:dBe()}),h.jsx(nM,{accept:".md,.markdown,.zip",busy:t,prompt:pBe(),onFile:g=>void m(g)}),o&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:o}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",l$e()]}):c?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[BBe()," ",c]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:m$e()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(g=>h.jsx(h_t,{skill:g,onDeleted:_,onError:l},g.name))})]})}function m_t(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),[o,l]=M.useState(null),c=M.useCallback(()=>{xKe().then(f=>{n(f),l(null)}).catch(f=>{n([]),l(f instanceof Error?f.message:String(f))})},[]);M.useEffect(()=>{c()},[c]);const d=M.useRef(!1),_=M.useCallback(async f=>{if(d.current)return;a(null);const m=f.name.toLowerCase();if(!m.endsWith(".tex")&&!m.endsWith(".zip")){a(H$e());return}if(f.size>Zj){a(ME());return}d.current=!0,r(!0);try{await yKe({filename:f.name,contentBase64:await tM(f)}),c()}catch(g){a(g instanceof Error?g.message:String(g))}finally{d.current=!1,r(!1)}},[c]);return h.jsxs("section",{className:Qj,children:[h.jsx("h3",{children:s$e()}),h.jsx("p",{className:Jj,children:M$e()}),h.jsx(nM,{accept:".tex,.zip",busy:t,prompt:bBe(),onFile:f=>void _(f)}),s&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:s}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",f$e()]}):o?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[FBe()," ",o]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:x$e()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(f=>h.jsx(__t,{template:f,onChanged:c,onError:a},f.name))})]})}function g_t(){return h.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:[h.jsx("h1",{children:VBe()}),h.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:TBe()}),h.jsx(p_t,{}),h.jsx(m_t,{})]})}const v_t="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function hl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:a,onPromote:o,onClose:l}){return h.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-24 [&: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?v_t:""}`,onClick:a,onDoubleClick:o,title:s?MPe({label:n}):n,"aria-label":s?zPe({label:n}):n,children:[t,h.jsx("span",{className:"tab-label","data-label":n,children:h.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),h.jsx("span",{role:"button",className:"tab-close",title:Dne(),onClick:c=>{c.stopPropagation(),l()},children:h.jsx(hs,{size:12})})]})}const uC=["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 b_t({owner:e,repo:n,branch:t}){return!e||!n?h.jsx("span",{className:uC,children:h.jsx("code",{children:t})}):h.jsxs("a",{className:uC,href:Bp(e,n,t),target:"_blank",rel:"noopener noreferrer",title:W0({name:Ae(t)}),children:[h.jsx("code",{children:t}),h.jsx(um,{size:12})]})}const Qv=["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(" "),dC=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function fC(e){return new Date(e).toLocaleString(N(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function hC(e,n){return ep((e.endedAt??n)-e.createdAt)}function x_t({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:a}){const o=r[0]??null,l=r.some(_=>_.status==="running"||_.status==="starting"),[c,d]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!l)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[l]),h.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:h.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:[h.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[h.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[h.jsx("h1",{children:e.title||e.slug}),h.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),h.jsx(bo,{status:o?Di(o):"idle"})]}),h.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[o&&h.jsxs(Qe,{...vr(_=>s(o.id,_)),children:[h.jsx(Uu,{size:15}),yle()]}),h.jsxs(Qe,{...vr(a),children:[h.jsx(Lp,{size:15}),Woe()]})]}),e.description&&h.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:[h.jsx("h2",{children:ile()}),h.jsx(Na,{text:e.description})]}),h.jsxs("section",{className:Qv,children:[h.jsx("h2",{children:o?Uoe():Ile()}),o&&h.jsxs(h.Fragment,{children:[h.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:[h.jsx(bo,{status:Di(o)}),h.jsx(Yy,{backend:o.backend}),h.jsxs("span",{title:Rle(),children:[h.jsx(fGe,{size:13}),fC(o.createdAt)]}),h.jsxs("span",{title:cle(),children:[h.jsx(CGe,{size:13}),hC(o,c)]}),o.commitSha&&h.jsxs("span",{title:Zoe(),children:[h.jsx(JGe,{size:14}),h.jsx("code",{children:o.commitSha.slice(0,7)})]}),o.exitCode!==null&&o.exitCode!==void 0&&o.exitCode!==0&&h.jsxs("span",{children:[hle()," ",o.exitCode]})]}),o.command&&h.jsxs("code",{className:dC,children:["$ ",o.command]}),o.resultMarkdown&&h.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${o.status==="failed"?"failed":""}`,children:h.jsx(Na,{text:o.resultMarkdown})})]})]}),h.jsxs("section",{className:Qv,children:[h.jsx("h2",{children:"Git"}),h.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:[h.jsx(b_t,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&h.jsxs("span",{children:[gle()," ",h.jsx("code",{children:n.slug})]}),h.jsxs("span",{title:fC(e.createdAt),children:[tle()," ",Ea(e.createdAt)]})]}),e.runCommand!==(o==null?void 0:o.command)&&h.jsxs("code",{className:dC,children:["$ ",e.runCommand]})]}),r.length>0&&h.jsxs("section",{className:Qv,children:[h.jsx("h2",{children:Ale()}),h.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)=>h.jsxs("button",{...vr(m=>s(_.id,m)),children:[h.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[Cle()," ",r.length-f]}),h.jsx(bo,{status:Di(_)}),h.jsx("span",{children:Ea(_.createdAt)}),h.jsx("span",{children:hC(_,c)}),h.jsx(Uu,{size:13})]},_.id))})]})]})})}function _C(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}=Xy(t,!0);let a=!1,o=0,l=!1,c=!1;async function d(){if(l){c=!0;return}l=!0;try{for(;;){const f=await mWe(e,o);if(a)return;if(f.dataBase64&&r.write(_C(f.dataBase64)),o=f.nextOffset,f.eof)break}}catch{}finally{l=!1,c&&!a&&(c=!1,d())}}const _=GKe(e,f=>{if(a)return;const m=_C(f.dataBase64);!l&&f.offset===o?(r.write(m),o+=m.length):f.offset+m.length>o&&d()});return d(),()=>{a=!0,_(),s()}},[e]),h.jsx("div",{ref:n,className:"h-full w-full"})}function w_t({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:a,parentExperiment:o,onOpenView:l,onOpenCode:c}){const d=r.filter(_=>_.experimentId===e.id).sort((_,f)=>f.createdAt-_.createdAt);return t==="overview"?h.jsx(x_t,{experiment:e,parentExperiment:o,project:n,runs:d,onOpenLogs:(_,f)=>l("terminal",_,f),onOpenCode:_=>c("files",_)}):h.jsx(S_t,{experiment:e,expRuns:d,selectedRunId:s,onSelectRun:a})}function S_t({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),f=t&&n.find(v=>v.id===t)||n[0]||null,m=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",g=!!(f&&m&&(f.cancelRequested||o===f.id)),S=v=>{const x=n.findIndex(y=>y.id===v);return x===-1?n.length:n.length-x},k=M.useRef(null);M.useEffect(()=>{if(k.current===null){k.current=new Set(n.map(x=>x.id));return}const v=n.find(x=>!k.current.has(x.id));for(const x of n)k.current.add(x.id);v&&r(v.id)},[n,r]),M.useEffect(()=>{if(!c)return;const v=x=>{var y;(y=_.current)!=null&&y.contains(x.target)||d(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function b(){if(f){a(null),l(f.id);try{await eN(f.id)}catch(v){l(null),a(v instanceof Error?v.message:String(v))}}}return h.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[h.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:[h.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}),h.jsx("span",{className:"flex-1"}),s&&h.jsx("span",{className:"error",role:"alert",children:s}),m&&h.jsxs(Qe,{size:"small",variant:"ghost",disabled:g,onClick:()=>void b(),children:[h.jsx($E,{size:13}),g?dre():J9()]}),n.length>0&&f&&h.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[h.jsxs(Qe,{title:ooe(),"aria-expanded":c,onClick:()=>d(v=>!v),children:[h.jsxs("span",{children:[Z6()," ",S(f.id)]}),h.jsx(bo,{status:g?"cancelling":Di(f)}),h.jsx(ja,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&h.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=>h.jsxs(Zr,{className:"justify-start",active:v.id===(f==null?void 0:f.id),onClick:()=>{r(v.id),d(!1)},children:[h.jsxs("span",{className:"font-medium",children:[Z6()," ",S(v.id)]}),h.jsx(bo,{status:Di(v)}),h.jsx("span",{className:"ms-auto text-xs text-muted",children:Ea(v.createdAt)})]},v.id))})]})]}),h.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?h.jsx(y_t,{runId:f.id},f.id):h.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:eoe()})})]})}function k_t({projectId:e,filePath:n,sessionId:t,enabled:r,ready:s,source:a}){const[o,l]=M.useState(void 0),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,z]=M.useState(null),[E,j]=M.useState(null),[A,D]=M.useState(!1),[O,P]=M.useState(0),$=M.useCallback(Z=>{D(Z),Z&&P(J=>J+1)},[]),F=M.useRef(a);F.current=a,M.useEffect(()=>{if(!r)return;let Z=!1;return SWe().then(J=>{Z||(l(J.engine),d(J.hint),f(J.installCommand))}).catch(()=>{Z||l(null)}),()=>{Z=!0}},[r]);const V=M.useRef(!1),X=M.useCallback(()=>{if(V.current)return;V.current=!0,g(!0);const Z=F.current;j(null),v(null),z(null),kWe(e,n,{sessionId:t}).then(J=>{var L,B;const H=J.pdfPath;if(J.ok&&H){k(Y=>({path:H,version:((Y==null?void 0:Y.version)??0)+1,source:Z})),y(J.hadErrors),z(J.note),J.hadErrors&&v(((L=J.log)==null?void 0:L.trim())||null),$(!0);return}k(null),y(!1),z(J.note),D(!1),v(((B=J.log)==null?void 0:B.trim())||Y_e())}).catch(J=>{k(null),y(!1),z(null),D(!1),j(J instanceof Error?J.message:String(J))}).finally(()=>{V.current=!1,g(!1)})},[e,n,t,$]),W=M.useRef(null);return M.useEffect(()=>{!r||!s||!o||W.current!==n&&(W.current=n,X())},[r,s,o,n,X]),{engine:o,installHint:c,installCommand:_,compiling:m,compiled:S,stale:S!==null&&S.source!==a,log:b,builtWithErrors:x,note:C,error:E,showPdf:A,setShowPdf:$,viewNonce:O,compile:X,dismiss:()=>{j(null),v(null)}}}const C_t=3e4;function E_t({projectId:e,filePath:n,sessionId:t,enabled:r,savedSource:s,dirty:a,onPulled:o}){const[l,c]=M.useState(!1),[d,_]=M.useState(null),[f,m]=M.useState(!1),[g,S]=M.useState(!1),[k,b]=M.useState(null),[v,x]=M.useState(null),[y,C]=M.useState(!1),z=M.useCallback($=>{c($.hasToken),_($.link)},[]);M.useEffect(()=>{let $=!1;if(m(!1),_(null),b(null),x(null),C(!1),D.current=!1,!!r)return NWe(e,n,{sessionId:t}).then(F=>{$||z(F)}).catch(F=>{$||x(F instanceof Error?F.message:String(F))}).finally(()=>{$||m(!0)}),()=>{$=!0}},[r,e,n,t,z]),M.useEffect(()=>{C(!1)},[s]);const E=M.useRef(!1),j=M.useRef(o);j.current=o;const A=M.useRef(a);A.current=a;const D=M.useRef(!1),O=M.useCallback($=>E.current||A.current?!1:(E.current=!0,S(!0),x(null),TWe(e,n,{sessionId:t,resolve:$}).then(F=>{D.current=!1,b(F),F.pulled.includes(n)&&(A.current?C(!0):j.current(F.pulled))}).catch(F=>{D.current=!0,b(null),x(F instanceof Error?F.message:String(F))}).finally(()=>{E.current=!1,S(!1)}),!0),[e,n,t]),P=M.useRef(null);return M.useEffect(()=>{if(!r||!f||!d||a)return;const $=`${n}:${d.projectId}:${s}`;P.current!==$&&O()&&(P.current=$)},[r,f,d,n,s,a,g,O]),M.useEffect(()=>{if(!r||!f||!d||a)return;const $=setInterval(()=>{E.current||D.current||jWe(e,n,{sessionId:t}).then(F=>{F.remoteChanged&&O()}).catch(F=>{D.current=!0,x(F instanceof Error?F.message:String(F))})},C_t);return()=>clearInterval($)},[r,f,d,a,e,n,t,O]),{hasToken:l,link:d,loaded:f,syncing:g,last:k,error:v,blocked:a,staleOnDisk:y,reloaded:()=>C(!1),uploadUrl:MWe(e,n,{sessionId:t}),saveToken:async $=>{const F=await tN($);c(F.hasToken)},linkProject:async $=>{z(await zWe(e,n,{project:$,sessionId:t}))},unlink:async()=>{z(await AWe(e,n,{sessionId:t})),P.current=null,D.current=!1,b(null),x(null)},sync:$=>{D.current=!1,O($)},dismiss:()=>{D.current=!1,x(null)}}}function sM(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function pC(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),a=r===-1?"":n.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1);let d;try{d=decodeURI(l)}catch{return null}if(!d||d.includes("\0"))return null;const _=d.startsWith("/"),f=_?[]:e.split("/").filter(Boolean);for(const m of d.split("/"))if(!(!m||m===".")){if(m===".."){if(f.length===0)return null;f.pop();continue}f.push(m)}return f.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:a}}function N_t(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function z_t({value:e,onChange:n,onSave:t,onBlur:r,path:s,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l}){const c=M.useMemo(()=>uT(e,by(s)),[e,s]),{ruleCh:d,codeCh:_}=Fj(c.length),f=M.useRef(null),m=M.useRef(null),g=()=>{const b=f.current;b&&m.current&&(m.current.scrollTop=b.scrollTop)};M.useLayoutEffect(g,[e]),M.useLayoutEffect(()=>{var z;const b=f.current;if(!b||!a)return;const v=e.split(` -`),x=Math.min(Math.max(Math.trunc(a),1),v.length);let y=0;for(let E=0;E{if((b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="s"){b.preventDefault(),t();return}if(b.key==="Tab"){b.preventDefault();const v=b.currentTarget,{selectionStart:x,selectionEnd:y}=v,C=e.slice(0,x)+" "+e.slice(y);n(C),requestAnimationFrame(()=>{v.selectionStart=v.selectionEnd=x+1})}},k=`absolute inset-0 m-0 py-3.5 pe-4 ${vp} ${Hj} [scrollbar-gutter:stable]`;return h.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${vp}`,children:[h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${d}ch`},"aria-hidden":"true"}),h.jsx("div",{ref:m,className:`file-view-code ${k} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:c.map((b,v)=>h.jsxs("div",{"data-line":v+1,className:"relative",style:{paddingInlineStart:`${_}ch`},children:[h.jsx("span",{className:`${Pj} absolute start-0 pe-[1ch]`,style:{width:`${d}ch`},children:v+1}),dT(b)?h.jsx("br",{}):b]},v))}),h.jsx("textarea",{ref:f,className:`file-view-editarea ${k} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${_}ch`},value:e,onChange:b=>n(b.target.value),onScroll:g,onKeyDown:S,onBlur:r,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}const mC=[{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"]}],A_t=4e6,T_t=200,gC=16e6,j_t=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)}),vC=e=>e.startsWith("//")?`https:${e}`:e;async function M_t(e,n){var s;let t=A_t;const r=new Map;for(const{element:a,attribute:o,url:l,typePrefixes:c}of e){if(r.has(l)){const S=r.get(l);S&&a.setAttribute(o,S);continue}if(n.aborted)return;if(r.size>=T_t)continue;r.set(l,null);const d=await fetch(l,{signal:n}).catch(()=>null);if(!(d!=null&&d.ok))continue;const _=d.headers.get("content-type")??"",f=Number(d.headers.get("content-length"));if(!c.some(S=>_.startsWith(S))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=d.body)==null?void 0:s.cancel().catch(()=>{}));continue}const m=await d.blob().catch(()=>null),g=m&&await j_t(m);!m||!g||(t-=m.size,r.set(l,g),a.setAttribute(o,g))}}async function R_t(e,n,t){var o;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const l of r.querySelectorAll(mC.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:d,typePrefixes:_}of mC){if(!l.matches(c))continue;const f=l.getAttribute(d);if(!f)continue;const m=n(f);m&&(m===f?l.setAttribute(d,vC(f)):s.push({element:l,attribute:d,url:m,typePrefixes:_}))}await M_t(s,t);for(const l of r.querySelectorAll("a[href]")){const c=l.getAttribute("href");!c||!sM(c)||(l.setAttribute("href",vC(c)),l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer"))}const a=((o=r.querySelector("base[href]"))==null?void 0:o.getAttribute("href"))??"";if(!/^https?:\/\//i.test(a)){const l=r.createElement("base");l.setAttribute("href","about:srcdoc"),r.head.prepend(l)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function D_t(e,n,t,r){var l;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${gC-1}`}}).catch(()=>null),a=s!=null&&s.ok?await s.text().catch(()=>null):null;if(a===null)return{text:e,partial:!0};const o=Number((l=s==null?void 0:s.headers.get("content-range"))==null?void 0:l.split("/").pop());return{text:a,partial:Number.isFinite(o)&&o>gC}}function L_t({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;const c=new AbortController;return o(null),D_t(e,n,t,c.signal).then(async({text:d,partial:_})=>({source:await R_t(d,s,c.signal),partial:_})).then(d=>{l||o(d)}),()=>{l=!0,c.abort()}},[e,n,t,s]),a===null?h.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[h.jsx(dn,{})," ",nE()]}):h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a.partial&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:Bue()}),h.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:Fue({name:Ae(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:a.source})]})}const m0=e=>ka(new Intl.ListFormat(N()).format(e.map(Ae)));function O_t(e){if(e.error)return sye();if(e.syncing)return O4e();if(e.blocked)return dE();const n=e.last;return n?n.pulled.length&&n.pushed.length?c4e({pulled:m0(n.pulled),pushed:m0(n.pushed)}):n.pulled.length?i4e({paths:m0(n.pulled)}):n.pushed.length?h4e({paths:m0(n.pushed)}):n.conflicts.length?mye():uE():t4e()}function bC({href:e}){return h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:Wye()})}function I_t({overleaf:e}){var m,g;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=()=>{t(""),o(null),c(!0)},_=!e.hasToken||l;async function f(S){S.preventDefault();const k=n.trim();if(!(r||!k)){s(!0),o(null);try{_?(await e.saveToken(k),c(!1)):await e.linkProject(k),t("")}catch(b){o(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!l){const S=((m=e.last)==null?void 0:m.conflicts)??[];return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-subtext",children:[h.jsx("span",{className:"flex-1 min-w-0",children:O_t(e)}),e.syncing&&h.jsx(dn,{}),h.jsxs("a",{className:"inline-flex items-center gap-1 text-sm text-subtext whitespace-nowrap",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Mye()," ",h.jsx(mc,{size:11})]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,"data-tip":e.blocked?g4e():void 0,onClick:()=>e.sync(),children:$ye()}),h.jsx(Qe,{variant:"ghost",disabled:e.syncing,onClick:()=>void e.unlink().catch(k=>{o(k instanceof Error?k.message:String(k))}),children:Uye()})]}),S.map(k=>h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-accent-red",children:[h.jsxs("span",{className:"flex-1 min-w-0",children:[h.jsx("code",{className:"font-mono",children:k})," ",kye()]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"keep-local"}),children:zye()}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"take-overleaf"}),children:Zye()})]},k)),((g=e.last)==null?void 0:g.note)&&h.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(bC,{href:e.uploadUrl}),h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:w7()})]})]})}return h.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[h.jsx("div",{className:"text-sm text-subtext",children:_?H4e():q4e()}),h.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[h.jsx("input",{className:"flex-1 min-w-55 text-sm",type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?Zxe():"https://www.overleaf.com/project/…",autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:r||!n.trim(),children:r?_?Ta():Tp():_?k4e():lye()}),h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?Wxe():fye()})]}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(bC,{href:e.uploadUrl}),l?h.jsx(Qe,{variant:"ghost",type:"button",onClick:()=>c(!1),children:xye()}):e.hasToken&&h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:w7()})]})]})}function B_t({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const a=r.current;if(a){const o=document.createRange();o.selectNodeContents(a);const l=window.getSelection();l==null||l.removeAllRanges(),l==null||l.addRange(o)}t("select"),setTimeout(()=>t("idle"),4e3)}};return h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.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}),h.jsx(Qt,{"data-tip":n==="copied"?K0():n==="select"?Wde():eue(),"aria-label":sue(),onClick:()=>void s(),children:n==="copied"?h.jsx(di,{size:13}):h.jsx(Dp,{size:13})})]})}function $_t({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:a,branchLabel:o,onOpenFile:l,scrollPosition:c,onScrollPositionChange:d,lineScrollRequest:_,onLineScrollRequestHandled:f,onEdit:m}){var mn;const[g,S]=M.useState(null),[k,b]=M.useState(null),[v,x]=M.useState(!0),[y,C]=M.useState(0),z=t==="artifacts",E=t==="abs",j=p4(n),A=Oj(n),D=Kht(n),O=j||D,[P,$]=M.useState(!1),[F,V]=M.useState(""),[X,W]=M.useState(!1),[Z,J]=M.useState(null),H=M.useRef(null),L=M.useRef(c),B=(g==null?void 0:g.file)??null,Y=(g==null?void 0:g.source)==="checkout"?g.file.path:n,G=Y.split("/").slice(0,-1).join("/"),re=(g==null?void 0:g.source)==="artifact",he=M.useCallback(Ye=>{var xt;return((xt=pC(G,Ye,E))==null?void 0:xt.path)??null},[E,G]),oe=M.useCallback(Ye=>E?xWe(Ye):re?vh(e,Ye):F7(e,Ye,{sessionId:r,ref:s}),[re,s,E,e,r]),se=M.useCallback(Ye=>{if(sM(Ye))return Ye;const xt=pC(G,Ye,E);return xt?N_t(oe(xt.path),xt):null},[E,G,oe]),q=qj(B==null?void 0:B.presentation),te=(g==null?void 0:g.source)==="artifact"&&!z,le=z&&(g==null?void 0:g.source)==="checkout",ge=!s&&(g==null?void 0:g.source)==="checkout"&&B!=null&&!B.notFound,ue=r!=null&&(g==null?void 0:g.source)==="checkout"&&g.file.root==="clone",Ce=ge&&B!=null&&!B.binary&&!B.truncated&&!q&&!ue,Ee=M.useMemo(()=>((B==null?void 0:B.content)??"").replace(/\r\n/g,` -`),[B==null?void 0:B.content]),Le=Ce&&F!==Ee,Pe=M.useRef(null);M.useEffect(()=>{const Ye=(B==null?void 0:B.content)??"";if(Pe.current!==null&&Ye===Pe.current){Pe.current=null;return}V(Ye.replace(/\r\n/g,` -`)),J(null)},[B==null?void 0:B.content,n]);const Ve=async()=>{if(!Ce||B==null||!Le||X)return!Le;const Ye=B.content.includes(`\r +`:"")+_.content]}),["",""]),t=hn(n,2),r=hn(Gj(t[0],t[1]),2),s=r[0],a=r[1];if(s.length===0&&a.length===0)return[[],[]];var o=function(d){if(d&&!So(d))return d.lineNumber},l=o(e.find(pi)),c=o(e.find(jl));if(l===void 0||c===void 0)throw new Error("Could not find start line number for edit");return[lC(oC(s),l),lC(oC(a),c)]}function F0t(e){var n=e.reduce((function(r,s){var a=hn(r,3),o=a[0],l=a[1],c=a[2];if(!c||!pi(c)||!jl(s))return[o,l,s];var d=hn(Gj(c.content,s.content),2),_=d[0],f=d[1];return[o.concat($2(_,c.lineNumber)),l.concat($2(f,s.lineNumber)),s]}),[[],[],null]),t=hn(n,2);return[t[0],t[1]]}function U0t(e){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?P0t:F0t,r=g4(e.map((function(l){return l.changes})),qj).map(t).reduce((function(l,c){var d=hn(l,2),_=d[0],f=d[1],m=hn(c,2),g=m[0],S=m[1];return[_.concat(g),f.concat(S)]}),[[],[]]),s=hn(r,2),a=s[0],o=s[1];return O0t(iC(a),iC(o))}var q0t=["enhancers"],cC=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,a=hn(y0t(e,Cl(t,q0t)),2),o=a[0],l=a[1],c=[nC(o),nC(l)],d=(n=[c[0],c[1]],s.reduce((function(k,b){return b(k)}),n)),_=hn(d,2),f=_[0],m=_[1],g=[f.map(rC),m.map(rC)],S=g[1];return{old:g[0].map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]})),new:S.map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]}))}};const H2=["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]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.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_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.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]:leading-[1.55]","[&_.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]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.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(" "),G0t=2e3,V0t={highlight(e,n){return gt.highlight(e,n).children}};function W0t(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function b4(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 K0t(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function P2(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 Y0t(e){const n=[U0t(e.hunks,{type:"line"})],t=ky(K0t(e));return t&>.registered(t)?cC(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:V0t}):cC(e.hunks,{enhancers:n,highlight:!1})}function X0t(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:M2(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:M2(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const Z0t=({change:e,side:n})=>n==="old"?null:W0t(e);function Vj({bytesRead:e,byteLimit:n}){return h.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:[h.jsx("h4",{children:ihe()}),h.jsx("p",{children:Ihe({limit:Ae(Sa(n)),read:Ae(Sa(e))})})]})}function Wj({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:a}=M.useMemo(()=>b4(e),[e]),o=t&&s+a<=G0t,l=M.useMemo(()=>{if(o)try{return Y0t(e)}catch{return}},[e,o]);return h.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:[h.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-semibold [&_.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:[h.jsx("span",{className:"chev",children:t?h.jsx(ta,{size:14}):h.jsx(Ma,{size:14})}),h.jsx("span",{className:"path",children:h.jsx("code",{children:P2(e)})}),h.jsxs("span",{className:"stats",children:[h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",a]})]})]}),t&&(e.hunks.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:yhe()}):h.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:h.jsx(d0t,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:Z0t,tokens:l,viewType:"unified"})}))]})}function Q0t({files:e,className:n}){return h.jsx("div",{className:n?`${H2} ${n}`:H2,children:e.map((t,r)=>h.jsx(Wj,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function J0t(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 Kj({diff:e,partial:n=!1}){var m;const t=M.useMemo(()=>X0t(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((g,S)=>({file:g,key:`${g.oldPath}→${g.newPath}#${S}`,changes:b4(g)})),[r]),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=l&&!n,_=s.some(g=>g.key===a)?a:((m=s[0])==null?void 0:m.key)??null,f=s.find(g=>g.key===_)??null;return t.failed?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?ghe():Rhe()}):s.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:hhe()}):h.jsxs("div",{className:"diff-explorer @container",children:[h.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:[h.jsx("strong",{children:n?s.length===1?Ahe():che({count:Vt(s.length)}):s.length===1?Che():Zfe({count:Vt(s.length)})}),!n&&h.jsx("button",{type:"button",onClick:()=>c(g=>!g),children:d?Wfe():Phe()})]}),d?h.jsx(Q0t,{files:r}):h.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:[h.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":the(),children:s.map(g=>h.jsxs("button",{type:"button",className:g.key===_?"active":"","aria-pressed":g.key===_,onClick:()=>o(g.key),children:[h.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-${g.file.type}`,children:J0t(g.file)}),h.jsx("code",{title:P2(g.file),children:P2(g.file)}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",g.changes.additions]}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",g.changes.deletions]})]},g.key))}),h.jsx("div",{className:`${H2} diff-explorer-preview min-w-0`,children:f&&h.jsx(Wj,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function ept({experiment:e,refreshKey:n,onLoadingChange:t}){const[r,s]=M.useState(null),[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;return t(!0),o(null),s(null),EYe(e.id).then(c=>{l||s(c)}).catch(c=>{l||o(c.message)}).finally(()=>{l||t(!1)}),()=>{l=!0}},[e.id,n,t]),h.jsx($u,{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:a?h.jsxs(Wi,{children:[WV()," ",Ae(a)]}):r?r.diff.trim()?h.jsxs(h.Fragment,{children:[r.truncated&&h.jsx(Vj,{bytesRead:r.bytesRead,byteLimit:r.byteLimit}),h.jsx(Kj,{diff:r.diff,partial:r.truncated})]}):h.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?tW():UV()}):h.jsx(Wi,{children:ZV()})})}function Yj({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:a,githubTitle:o,refreshing:l,onRefresh:c}){return h.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&&h.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":fre(),children:[h.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:mre()}),h.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:lre()})]}),r&&h.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:[h.jsx(Ip,{size:12}),h.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),a&&h.jsx(Fp,{href:a,target:"_blank",rel:"noopener noreferrer",title:o,"aria-label":o,children:h.jsx(fm,{size:13})}),h.jsx("span",{className:"flex-1"}),h.jsx(Jt,{title:t7(),"aria-label":t7(),onClick:c,children:l?h.jsx(dn,{}):h.jsx(tN,{size:13})})]})}const tpt=/\.(md|mdx|markdown)$/i,npt=/\.tex$/i,rpt=/\.html?$/i,spt=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,ipt=/\.(csv|tsv|xlsx?|ods)$/i,apt=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,opt=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,lpt=/\.pdf$/i,cpt=/\.(docx?|log|rtf|txt)$/i;function upt(e){return spt.test(e)}function x4(e){return tpt.test(e)}function Xj(e){return npt.test(e)}function dpt(e){return rpt.test(e)}function Zj({name:e}){const n=x4(e)?"markdown":upt(e)?"image":ipt.test(e)?"spreadsheet":apt.test(e)?"code":opt.test(e)?"archive":lpt.test(e)?"pdf":cpt.test(e)||Xj(e)?"document":"file";let t;return n==="markdown"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),h.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=h.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=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),h.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),h.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 Qj=["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(" "),uC=["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 dC(){return{dirs:new Map,files:[]}}function Jj(e){const n=dC();for(const t of e){const r=t.split("/");let s=n;for(let a=0;aa(t),title:t,children:[c?h.jsx(ta,{size:13,className:uC}):h.jsx(Ma,{size:13,className:uC}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),c&&h.jsx(y4,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:a,onOpenFile:o})]})}function y4({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:a}){const o=[...e.dirs.keys()].sort((c,d)=>c.localeCompare(d)),l=[...e.files].sort((c,d)=>c.localeCompare(d));return h.jsxs(h.Fragment,{children:[o.map(c=>{const d=n?`${n}/${c}`:c;return h.jsx(fpt,{name:c,node:e.dirs.get(c),path:d,depth:t,toggled:r,onToggle:s,onOpenFile:a},`d:${d}`)}),l.map(c=>{const d=n?`${n}/${c}`:c;return h.jsxs("button",{type:"button",className:Qj,style:{paddingInlineStart:8+t*14},...gr(_=>a(d,_)),title:iI({name:Ae(d)}),children:[h.jsx(Zj,{name:c}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c})]},`f:${d}`)})]})}function hpt({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:a,onToggledChange:o,onOpenFile:l}){const c=t.branchName,d=`${e}:${c}`,[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState(!1),[x,y]=M.useState(0),[C,A]=M.useState(void 0),E=M.useRef(0),j=M.useRef(null),T=M.useCallback(()=>{j.current=d;const H=++E.current;k(!0),Cb(e,{ref:c}).then(F=>{H===E.current&&(f(F),g(null))}).catch(F=>{H===E.current&&g(F.message)}).finally(()=>{H===E.current&&k(!1)})},[e,c,d]);M.useEffect(()=>(E.current++,j.current=null,f(null),g(null),k(!1),()=>{E.current++}),[d]),M.useEffect(()=>{r==="files"&&j.current!==d&&T()},[r,d,T]),M.useEffect(()=>{A(void 0);const H=t.chatSessionId;if(!H)return;let F=!1;return uN(H).then(V=>{!F&&V.exists&&V.branch===c&&A(H)}).catch(()=>{}),()=>{F=!0}},[t.chatSessionId,c]);const D=M.useMemo(()=>_?Jj(_.entries):null,[_]),I=r==="files"?S:b,P=M.useCallback(H=>{const F=new Set(s);F.has(H)?F.delete(H):F.add(H),o(F)},[s,o]);return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[h.jsx(Yj,{view:r,onViewChange:a,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?$p(n.githubOwner,n.githubRepo,c):void 0,githubTitle:X9({branch:Ae(c)}),refreshing:I,onRefresh:()=>r==="files"?T():y(H=>H+1)}),r==="changes"?h.jsx(ept,{experiment:t,refreshKey:x,onLoadingChange:v},t.id):h.jsxs(h.Fragment,{children:[(_==null?void 0:_.truncated)&&h.jsx(Wi,{children:Sre()}),m&&D&&h.jsxs(Wi,{children:[jre()," ",Ae(m)]}),h.jsx($u,{children:D?D.dirs.size===0&&D.files.length===0?h.jsx(Wi,{children:Nre()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(y4,{node:D,parentPath:"",depth:0,toggled:s,onToggle:P,onOpenFile:(H,F)=>C?l(H,C,void 0,F):l(H,void 0,c,F)})}):h.jsx(Wi,{children:m?nE({error:Ae(m)}):rE()})})]})]})}const _pt=5e3;function ppt({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:a,onOpenFile:o}){var D;const l=n.id,[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!0),b=M.useRef(0),v=M.useCallback(()=>{const I=++b.current;k(!0),(async()=>{if(!e)return[null,await Cb(l,{ref:n.baselineBranch})];const H=await uN(e),F=H.exists?{sessionId:e}:{ref:n.baselineBranch};return[H,await Cb(l,F)]})().then(([H,F])=>{I===b.current&&(d(H),f(F),g(null))}).catch(H=>{I===b.current&&g(H.message)}).finally(()=>{I===b.current&&k(!1)})},[e,l,n.baselineBranch]);M.useEffect(()=>(d(null),f(null),g(null),v(),()=>{b.current++}),[v]),M.useEffect(()=>{if(!e)return;let I=!1,P=!1,H=!1,F=null;const V=()=>{F||(F=setInterval(v,_pt))},X=()=>{F&&(clearInterval(F),F=null)},W=Hf(Z=>{Z.type!=="busy"||Z.sessionId!==e||(P=!0,Z.busy&&!I?(I=!0,V()):!Z.busy&&I&&(I=!1,X(),v()))});return T0(l).then(Z=>{var J;H||P||I||(J=Z.find(B=>B.id===e))!=null&&J.busy&&(I=!0,V())}).catch(()=>{}),()=>{H=!0,W(),X()}},[e,l,v]);const x=M.useMemo(()=>_?Jj(_.entries):null,[_]),y=M.useCallback(I=>{const P=new Set(r);P.has(I)?P.delete(I):P.add(I),a(P)},[r,a]),C=e&&(c!=null&&c.exists)?c:null,A=(C==null?void 0:C.branch)??(C!=null&&C.baselineBranch?AVe({branch:Ae(C.baselineBranch)}):wE()),E=((D=C==null?void 0:C.files)==null?void 0:D.length)??0,j=C?yVe({branch:Ae(`${A}${E>0?"*":""}`)}):CVe({branch:Ae(n.baselineBranch)}),T=C?C.branch:n.baselineBranch;return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[h.jsx(Yj,{view:C?t:"files",onViewChange:s,showViewToggle:!!C,branchLabel:j,branchTitle:j,githubHref:n.githubEnabled&&T?$p(n.githubOwner,n.githubRepo,T):void 0,githubTitle:T?X9({branch:Ae(T)}):void 0,refreshing:S,onRefresh:v}),m&&(c||_)&&h.jsxs(Wi,{children:[YVe()," ",Ae(m)]}),!_||e&&!c?h.jsx($u,{children:h.jsx(Wi,{children:m?nE({error:Ae(m)}):rE()})}):C&&t==="changes"?h.jsx($u,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:E===0||!C.diff?h.jsx("div",{className:"changes-note text-sm text-muted",children:PVe()}):h.jsxs(h.Fragment,{children:[C.diff.truncated&&h.jsx(Vj,{bytesRead:C.diff.bytesRead,byteLimit:C.diff.byteLimit}),h.jsx(Kj,{diff:C.diff.diff,partial:C.diff.truncated})]})}):h.jsxs($u,{children:[_.truncated&&h.jsx(Wi,{children:RVe()}),x?x.dirs.size===0&&x.files.length===0?h.jsx(Wi,{children:GVe()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(y4,{node:x,parentPath:"",depth:0,toggled:r,onToggle:y,onOpenFile:(I,P)=>C?o(I,e,void 0,P):o(I,void 0,n.baselineBranch,P)})}):h.jsx(Wi,{children:IVe()})]})]})}const bp="font-mono text-sm leading-[1.55] [tab-size:4]",eM="whitespace-pre-wrap break-words",tM="file-view-gutter text-right text-muted select-none";function nM(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function rM({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const a=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` +`),f=ST(_,ky(n));return _.endsWith(` +`)?f.slice(0,-1):f},[e,n]),o=t&&a.length>0?Math.min(Math.max(Math.trunc(t),1),a.length):void 0,l=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(o?((_=l.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):a.length===0&&(s==null||s()))},[a.length,s,r,o]);const{ruleCh:c}=nM(a.length),d=M.useMemo(()=>a.map((_,f)=>h.jsxs("div",{ref:f+1===o?l:void 0,className:`file-view-line flex items-stretch ${f+1===o?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[h.jsx("span",{"data-line":f+1,className:`${tM} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),h.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${bp} ${eM}`,children:kT(_)?h.jsx("br",{}):_})]},f)),[a,c,o]);return h.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${bp}`,children:[a.length>0&&h.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"}),d]})}function sM(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function fC({url:e,name:n}){return h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[I0e()," ",h.jsxs("a",{href:e,download:n,children:[uE()," ",Ae(n)]})]})}function F2({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,a]=M.useState(!1);if(M.useEffect(()=>a(!1),[e,n]),s)return h.jsx(fC,{url:n,name:t});let o;return e==="image"?o=h.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:h.jsx("img",{src:n,alt:t,onError:()=>a(!0)})}):e==="audio"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):e==="video"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):o=h.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>a(!0),children:h.jsx(fC,{url:n,name:t})}),h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&h.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:h.jsxs("a",{href:n,download:t,children:[uE()," ",t]})})]})}const hC="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function mpt(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function gpt(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),a=r===-1?"":t.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1),d=l.startsWith("/")?[]:n.split("/").filter(g=>g.length>0);for(const g of l.split("/"))if(!(!g||g==="."))if(g===".."){if(d.length===0)return null;d.pop()}else d.push(g);const _=d.join("/");if(!_)return null;const f=new URLSearchParams(c);f.delete("path");const m=f.toString();return`${xh(e,_)}${m?`&${m}`:""}${a}`}function vpt(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const iM="orx:files-tree-width",aM="orx:artifacts-collapsed:",oM=180,lM=560,bpt=8,xpt=280;function ypt(){try{const e=Number(localStorage.getItem(iM));if(Number.isFinite(e)&&e>=oM&&e<=lM)return e}catch{}return xpt}function wpt(e){try{const n=localStorage.getItem(`${aM}${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 U2(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=U2(t.children??[],n);if(r)return r}}return null}function cM({projectId:e,folder:n,markdown:t}){const r=s=>mpt(s)?s:gpt(e,n,s);return h.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:h.jsx(Jrt,{remarkPlugins:[pT,[mT,NT]],rehypePlugins:[qA],components:{a:({href:s,children:a,...o})=>{const l=!s||s.startsWith("#"),c=l?s:r(s);return c?h.jsx("a",{...o,href:c,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):h.jsx("span",{children:a})},img:({src:s,alt:a})=>{if(!s||typeof s!="string")return null;const o=r(s);return o?h.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[h.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&h.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...zT},children:CT(vpt(t))})})}function Spt(e){return e.presentation==="text"&&x4(e.name)?"markdown":sM(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function kpt(e,n,t){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(!1),[d,_]=M.useState(null),f=M.useRef(0),m=M.useRef(!1),g=t==="markdown"||t==="text"&&n.size<=fN;return M.useEffect(()=>{if(o(!1),c(!1),_(null),!g)return;let S=!1;const k=++f.current;return hN(e,n.path).then(v=>{if(!v)throw new Error(MG());return v}).then(v=>{S||k!==f.current||(v.binary?o(!0):(m.current=!0,s(v.content)),c(v.truncated))}).catch(v=>{!S&&k===f.current&&!m.current&&_(v instanceof Error?v.message:String(v))}),()=>{S=!0}},[e,n.path,n.modifiedAt,t,g]),{text:r,binary:a,truncated:l,error:d,wantsText:g}}function Cpt({projectId:e,entry:n,onDelete:t}){const r=Spt(n),{text:s,binary:a,truncated:o,error:l,wantsText:c}=kpt(e,n,r),[d,_]=M.useState(!1),f=r==="markdown",m=n.path.split("/").slice(0,-1).join("/"),g=`${xh(e,n.path)}&v=${n.modifiedAt}`;let S;return r==="image"||r==="audio"||r==="video"||r==="pdf"?S=h.jsx(F2,{kind:r,url:g,name:n.name}):r==="download"||!c||a?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[r==="download"||a?kG():$V()," ",h.jsx("a",{href:g,...r==="download"||a?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:r==="download"||a?oE():OG()})]}):l?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[tV()," ",Ae(l)]}):s===null?S=h.jsxs(vr,{children:[h.jsx(dn,{})," ",hV()]}):f&&!d?S=h.jsx(cM,{projectId:e,folder:m,markdown:s}):S=h.jsx(rM,{text:s,path:n.path}),h.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"fpreview-head h-10 flex items-center gap-2 py-0 px-3.5 border-b border-b-border-variant text-subtext shrink-0",children:[h.jsx(Vu,{size:13,className:"shrink-0"}),h.jsx("code",{className:"fpreview-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Ae(n.path),children:n.path}),h.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[yV()," ",new Date(n.modifiedAt).toLocaleString(N(),{dateStyle:"medium",timeStyle:"short"})]}),(r==="text"||r==="download")&&h.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Sa(n.size)}),f&&h.jsx(Jt,{active:d,"data-tip":d?X0():zu(),"data-tip-align":"end","aria-label":d?X0():zu(),onClick:()=>_(k=>!k),children:h.jsx(wb,{size:13})}),h.jsx(Fp,{href:g,target:"_blank",rel:"noopener noreferrer","data-tip":z6(),"data-tip-align":"end","aria-label":z6(),children:h.jsx(gc,{size:13})}),h.jsx(Jt,{"data-tip":N6(),"data-tip-align":"end","aria-label":N6(),onClick:()=>{window.confirm(Q9({path:Ae(n.path)}))&&t(n.path)},children:h.jsx(cd,{size:13})})]}),h.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 ${f&&!d?"doc":""}`,children:[S,o&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:iV()})]})]})}function uM({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l}){return h.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(c=>{var _;const d={paddingInlineStart:8+Math.min(n,bpt)*14};if(c.isDir){const f=!t.has(c.path);return h.jsxs("div",{className:"min-w-0 max-w-full",children:[h.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:d,onClick:()=>s(c.path),children:[h.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":f?cG({name:Ae(c.name)}):xG({name:Ae(c.name)}),onClick:m=>{m.stopPropagation(),s(c.path)},children:h.jsx(Ma,{size:13,className:f?"open":""})}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name}),h.jsx(Jt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":ZG(),"data-tip-align":"end","aria-label":mG({name:Ae(c.name)}),onClick:m=>{m.stopPropagation(),window.confirm(Q9({path:Ae(c.path)}))&&l(c.path)},children:h.jsx(cd,{size:12})})]}),f&&(((_=c.children)==null?void 0:_.length)??0)>0&&h.jsx(uM,{entries:c.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l})]},c.path)}return h.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===c.path?"selected":""}`,style:d,title:aO({path:Ae(c.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===c.path,onClick:()=>a(c.path),onDoubleClick:()=>o(c.path),onAuxClick:f=>{f.button===1&&(f.preventDefault(),a(c.path),o(c.path))},onKeyDown:f=>{if(f.key===" "){f.preventDefault(),f.stopPropagation(),a(c.path);return}f.key==="Enter"&&(f.preventDefault(),f.stopPropagation(),a(c.path),o(c.path))},children:[h.jsx(Zj,{name:c.name}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name})]},c.path)})})}function _C({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return h.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:Ae(e),children:[h.jsx("code",{className:"path-front-ellipsis",children:e}),h.jsx(Jt,{size:"small",className:hC,"data-tip":t?Y0():zG(),"aria-label":qG(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?h.jsx(Ws,{size:12}):h.jsx(Lp,{size:12})}),h.jsx(Jt,{size:"small",className:hC,"data-tip":A6(),"data-tip-align":"end","aria-label":A6(),onClick:n,children:h.jsx(UKe,{size:12})})]})}function Ept({project:e,artifacts:n,onChanged:t,onOpenFile:r,onOpenStorage:s}){const[a,o]=M.useState(null),[l,c]=M.useState(()=>wpt(e.id)),[d,_]=M.useState(ypt),f=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${aM}${e.id}`,JSON.stringify([...l]))}catch{}},[e.id,l]);const m=v=>{var E;v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const x=(E=f.current)==null?void 0:E.getBoundingClientRect(),y=document.body.style.userSelect;document.body.style.userSelect="none";const C=j=>{const T=Math.round(j.clientX-((x==null?void 0:x.left)??0)),D=Math.min(Math.max(T,oM),lM);_(D);try{localStorage.setItem(iM,String(D))}catch{}},A=()=>{window.removeEventListener("pointermove",C),window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",A),document.body.style.userSelect=y};window.addEventListener("pointermove",C),window.addEventListener("pointerup",A),window.addEventListener("pointercancel",A)};M.useEffect(()=>{if(!a||!n)return;const v=U2(n.entries,a);(!v||v.isDir)&&o(null)},[a,n]);const g=v=>c(x=>{const y=new Set(x);return y.has(v)?y.delete(v):y.add(v),y}),S=v=>{(a===v||a!=null&&a.startsWith(v+"/"))&&o(null),hXe(e.id,v).catch(()=>{}).finally(t)};if(!n)return h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs(vr,{className:"p-5",children:[h.jsx(dn,{})," ",gV()]})});const k=v=>h.jsx(uM,{entries:v,depth:0,collapsed:l,selected:a,onToggle:g,onSelect:o,onOpenFile:r,onDelete:S}),b=a?U2(n.entries,a):null;return n.entries.length===0?h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[h.jsx(kx,{size:28,strokeWidth:1.5}),h.jsx("h3",{children:CV()}),h.jsx("p",{children:LV()}),h.jsx(_C,{dir:n.dir,onOpenStorage:s})]})}):h.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background",children:[h.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",ref:f,style:{width:d},children:[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",onPointerDown:m}),h.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[k(n.entries),n.truncated&&h.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:cV()})]}),h.jsx(_C,{dir:n.dir,onOpenStorage:s})]}),b?h.jsx(Cpt,{projectId:e.id,entry:b,onDelete:S},b.path):h.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",children:[h.jsx(AKe,{size:22,strokeWidth:1.5}),h.jsx("span",{children:HG()})]})]})}const dM=20*1024*1024,fM="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",hM="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",_M="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",Npt="font-mono text-base font-medium text-text",zpt="mt-1 mb-0 text-sm leading-relaxed text-text";function pM(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 a=s.indexOf(",");n(a>=0?s.slice(a+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function Apt(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function mM({accept:e,busy:n,prompt:t,onFile:r}){const[s,a]=M.useState(!1),o=M.useRef(null);return h.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:l=>{l.preventDefault(),a(!0)},onDragLeave:()=>a(!1),onDrop:l=>{var d;if(l.preventDefault(),a(!1),n)return;const c=(d=l.dataTransfer.files)==null?void 0:d[0];c&&r(c)},onClick:()=>{var l;n||(l=o.current)==null||l.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:l=>{var c;(l.key==="Enter"||l.key===" ")&&!n&&(l.preventDefault(),(c=o.current)==null||c.click())},children:[h.jsx("input",{ref:o,type:"file",accept:e,hidden:!0,onChange:l=>{var d;const c=(d=l.target.files)==null?void 0:d[0];c&&r(c),l.target.value=""}}),n?h.jsxs(h.Fragment,{children:[h.jsx(dn,{}),h.jsx("span",{children:Q$e()})]}):h.jsxs(h.Fragment,{children:[h.jsx(rYe,{size:20,strokeWidth:1.5}),h.jsx("span",{children:t})]})]})}function gM({bytes:e,updatedAt:n}){return h.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Sa(e),n>0&&h.jsxs("span",{className:"text-muted",children:[" · ",Na(n)]})]})}function Tpt({skill:e,onDeleted:n,onError:t}){const[r,s]=M.useState(!1);return h.jsxs("div",{className:_M,children:[h.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[h.jsxs("code",{className:Npt,children:["/",e.name]}),e.origin&&h.jsx(Dt,{children:e.origin})]}),h.jsx(gM,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&h.jsx(Jt,{"data-tip":x$e(),"data-tip-align":"end","aria-label":SBe({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(bBe({name:Ae(e.name)}))&&(s(!0),RXe(e.name).then(n).catch(a=>{s(!1),t(a instanceof Error?a.message:String(a))}))},children:h.jsx(cd,{size:13})})]})}function jpt({template:e,onChanged:n,onError:t}){const[r,s]=M.useState(!1),a=e.supportFiles.length;return h.jsxs("div",{className:_M,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("span",{className:"text-base font-medium text-text",children:e.name}),h.jsxs("p",{className:zpt,children:[e.entry,a>0&&(a===1?XBe():s$e({count:Vt(a)}))]})]}),h.jsx(gM,{bytes:e.bytes,updatedAt:e.updatedAt}),h.jsx(Jt,{"data-tip":k$e(),"data-tip-align":"end","aria-label":jBe({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(NBe({name:Ae(e.name)}))&&(s(!0),TXe(e.name).then(n).catch(o=>{s(!1),t(o instanceof Error?o.message:String(o))}))},children:h.jsx(cd,{size:13})})]})}function Mpt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useCallback(()=>{a(!0),jXe().then(g=>{n(g),d(null)}).catch(g=>{n([]),d(g instanceof Error?g.message:String(g))}).finally(()=>a(!1))},[]);M.useEffect(()=>{_()},[_]);const f=M.useRef(!1),m=M.useCallback(async g=>{if(!f.current){if(l(null),!Apt(g.name)){l(aHe());return}if(g.size>dM){l(BE());return}f.current=!0,r(!0);try{await MXe({filename:g.name,contentBase64:await pM(g)}),_()}catch(S){l(S instanceof Error?S.message:String(S))}finally{f.current=!1,r(!1)}}},[_]);return h.jsxs("section",{className:fM,children:[h.jsxs("div",{className:"flex items-baseline gap-2.5",children:[h.jsx("h3",{children:K$e()}),h.jsxs(Qe,{className:"ms-auto",size:"small",onClick:_,disabled:s,children:[h.jsx(ld,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]})]}),h.jsx("p",{className:hM,children:LBe()}),h.jsx(mM,{accept:".md,.markdown,.zip",busy:t,prompt:$Be(),onFile:g=>void m(g)}),o&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:o}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",M$e()]}):c?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[l$e()," ",c]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:H$e()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(g=>h.jsx(Tpt,{skill:g,onDeleted:_,onError:l},g.name))})]})}function Rpt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),[o,l]=M.useState(null),c=M.useCallback(()=>{zXe().then(f=>{n(f),l(null)}).catch(f=>{n([]),l(f instanceof Error?f.message:String(f))})},[]);M.useEffect(()=>{c()},[c]);const d=M.useRef(!1),_=M.useCallback(async f=>{if(d.current)return;a(null);const m=f.name.toLowerCase();if(!m.endsWith(".tex")&&!m.endsWith(".zip")){a(uHe());return}if(f.size>dM){a(BE());return}d.current=!0,r(!0);try{await AXe({filename:f.name,contentBase64:await pM(f)}),c()}catch(g){a(g instanceof Error?g.message:String(g))}finally{d.current=!1,r(!1)}},[c]);return h.jsxs("section",{className:fM,children:[h.jsx("h3",{children:z$e()}),h.jsx("p",{className:hM,children:nHe()}),h.jsx(mM,{accept:".tex,.zip",busy:t,prompt:UBe(),onFile:f=>void _(f)}),s&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:s}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",O$e()]}):o?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[f$e()," ",o]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:q$e()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(f=>h.jsx(jpt,{template:f,onChanged:c,onError:a},f.name))})]})}function Dpt(){return h.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:[h.jsx("h1",{children:m$e()}),h.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:e$e()}),h.jsx(Mpt,{}),h.jsx(Rpt,{})]})}const Lpt="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function fl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:a,onPromote:o,onClose:l}){return h.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-24 [&: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?Lpt:""}`,onClick:a,onDoubleClick:o,title:s?nFe({label:n}):n,"aria-label":s?QPe({label:n}):n,children:[t,h.jsx("span",{className:"tab-label","data-label":n,children:h.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),h.jsx("span",{role:"button",className:"tab-close",title:sre(),onClick:c=>{c.stopPropagation(),l()},children:h.jsx(_s,{size:12})})]})}const pC=["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 Opt({owner:e,repo:n,branch:t}){return!e||!n?h.jsx("span",{className:pC,children:h.jsx("code",{children:t})}):h.jsxs("a",{className:pC,href:$p(e,n,t),target:"_blank",rel:"noopener noreferrer",title:K0({name:Ae(t)}),children:[h.jsx("code",{children:t}),h.jsx(fm,{size:12})]})}const eb=["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(" "),mC=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function gC(e){return new Date(e).toLocaleString(N(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function vC(e,n){return tp((e.endedAt??n)-e.createdAt)}function Ipt({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:a}){const o=r[0]??null,l=r.some(_=>_.status==="running"||_.status==="starting"),[c,d]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!l)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[l]),h.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:h.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:[h.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[h.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[h.jsx("h1",{children:e.title||e.slug}),h.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),h.jsx(xo,{status:o?Di(o):"idle"})]}),h.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[o&&h.jsxs(Qe,{...gr(_=>s(o.id,_)),children:[h.jsx(Wu,{size:15}),Gle()]}),h.jsxs(Qe,{...gr(a),children:[h.jsx(Op,{size:15}),gle()]})]}),e.description&&h.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:[h.jsx("h2",{children:Ale()}),h.jsx(za,{text:e.description})]}),h.jsxs("section",{className:eb,children:[h.jsx("h2",{children:o?hle():oce()}),o&&h.jsxs(h.Fragment,{children:[h.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:[h.jsx(xo,{status:Di(o)}),h.jsx(e4,{backend:o.backend}),h.jsxs("span",{title:rce(),children:[h.jsx(hWe,{size:13}),gC(o.createdAt)]}),h.jsxs("span",{title:Rle(),children:[h.jsx(TWe,{size:13}),vC(o,c)]}),o.commitSha&&h.jsxs("span",{title:yle(),children:[h.jsx(sKe,{size:14}),h.jsx("code",{children:o.commitSha.slice(0,7)})]}),o.exitCode!==null&&o.exitCode!==void 0&&o.exitCode!==0&&h.jsxs("span",{children:[Ile()," ",o.exitCode]})]}),o.command&&h.jsxs("code",{className:mC,children:["$ ",o.command]}),o.resultMarkdown&&h.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${o.status==="failed"?"failed":""}`,children:h.jsx(za,{text:o.resultMarkdown})})]})]}),h.jsxs("section",{className:eb,children:[h.jsx("h2",{children:"Git"}),h.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:[h.jsx(Opt,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&h.jsxs("span",{children:[Ple()," ",h.jsx("code",{children:n.slug})]}),h.jsxs("span",{title:gC(e.createdAt),children:[Cle()," ",Na(e.createdAt)]})]}),e.runCommand!==(o==null?void 0:o.command)&&h.jsxs("code",{className:mC,children:["$ ",e.runCommand]})]}),r.length>0&&h.jsxs("section",{className:eb,children:[h.jsx("h2",{children:Jle()}),h.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)=>h.jsxs("button",{...gr(m=>s(_.id,m)),children:[h.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[Yle()," ",r.length-f]}),h.jsx(xo,{status:Di(_)}),h.jsx("span",{children:Na(_.createdAt)}),h.jsx("span",{children:vC(_,c)}),h.jsx(Wu,{size:13})]},_.id))})]})]})})}function bC(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}=t4(t,!0);let a=!1,o=0,l=!1,c=!1;async function d(){if(l){c=!0;return}l=!0;try{for(;;){const f=await kYe(e,o);if(a)return;if(f.dataBase64&&r.write(bC(f.dataBase64)),o=f.nextOffset,f.eof)break}}catch{}finally{l=!1,c&&!a&&(c=!1,d())}}const _=nZe(e,f=>{if(a)return;const m=bC(f.dataBase64);!l&&f.offset===o?(r.write(m),o+=m.length):f.offset+m.length>o&&d()});return d(),()=>{a=!0,_(),s()}},[e]),h.jsx("div",{ref:n,className:"h-full w-full"})}function $pt({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:a,parentExperiment:o,onOpenView:l,onOpenCode:c}){const d=r.filter(_=>_.experimentId===e.id).sort((_,f)=>f.createdAt-_.createdAt);return t==="overview"?h.jsx(Ipt,{experiment:e,parentExperiment:o,project:n,runs:d,onOpenLogs:(_,f)=>l("terminal",_,f),onOpenCode:_=>c("files",_)}):h.jsx(Hpt,{experiment:e,expRuns:d,selectedRunId:s,onSelectRun:a})}function Hpt({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),f=t&&n.find(v=>v.id===t)||n[0]||null,m=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",g=!!(f&&m&&(f.cancelRequested||o===f.id)),S=v=>{const x=n.findIndex(y=>y.id===v);return x===-1?n.length:n.length-x},k=M.useRef(null);M.useEffect(()=>{if(k.current===null){k.current=new Set(n.map(x=>x.id));return}const v=n.find(x=>!k.current.has(x.id));for(const x of n)k.current.add(x.id);v&&r(v.id)},[n,r]),M.useEffect(()=>{if(!c)return;const v=x=>{var y;(y=_.current)!=null&&y.contains(x.target)||d(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function b(){if(f){a(null),l(f.id);try{await lN(f.id)}catch(v){l(null),a(v instanceof Error?v.message:String(v))}}}return h.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[h.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:[h.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}),h.jsx("span",{className:"flex-1"}),s&&h.jsx("span",{className:"error",role:"alert",children:s}),m&&h.jsxs(Qe,{size:"small",variant:"ghost",disabled:g,onClick:()=>void b(),children:[h.jsx(WE,{size:13}),g?Lre():iE()]}),n.length>0&&f&&h.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[h.jsxs(Qe,{title:joe(),"aria-expanded":c,onClick:()=>d(v=>!v),children:[h.jsxs("span",{children:[n7()," ",S(f.id)]}),h.jsx(xo,{status:g?"cancelling":Di(f)}),h.jsx(ta,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&h.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=>h.jsxs(Yr,{className:"justify-start",active:v.id===(f==null?void 0:f.id),onClick:()=>{r(v.id),d(!1)},children:[h.jsxs("span",{className:"font-medium",children:[n7()," ",S(v.id)]}),h.jsx(xo,{status:Di(v)}),h.jsx("span",{className:"ms-auto text-xs text-muted",children:Na(v.createdAt)})]},v.id))})]})]}),h.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?h.jsx(Bpt,{runId:f.id},f.id):h.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:koe()})})]})}function Ppt({projectId:e,filePath:n,sessionId:t,enabled:r,ready:s,source:a}){const[o,l]=M.useState(void 0),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,A]=M.useState(null),[E,j]=M.useState(null),[T,D]=M.useState(!1),[I,P]=M.useState(0),H=M.useCallback(Z=>{D(Z),Z&&P(J=>J+1)},[]),F=M.useRef(a);F.current=a,M.useEffect(()=>{if(!r)return;let Z=!1;return jYe().then(J=>{Z||(l(J.engine),d(J.hint),f(J.installCommand))}).catch(()=>{Z||l(null)}),()=>{Z=!0}},[r]);const V=M.useRef(!1),X=M.useCallback(()=>{if(V.current)return;V.current=!0,g(!0);const Z=F.current;j(null),v(null),A(null),MYe(e,n,{sessionId:t}).then(J=>{var L,$;const B=J.pdfPath;if(J.ok&&B){k(K=>({path:B,version:((K==null?void 0:K.version)??0)+1,source:Z})),y(J.hadErrors),A(J.note),J.hadErrors&&v(((L=J.log)==null?void 0:L.trim())||null),H(!0);return}k(null),y(!1),A(J.note),D(!1),v((($=J.log)==null?void 0:$.trim())||b0e())}).catch(J=>{k(null),y(!1),A(null),D(!1),j(J instanceof Error?J.message:String(J))}).finally(()=>{V.current=!1,g(!1)})},[e,n,t,H]),W=M.useRef(null);return M.useEffect(()=>{!r||!s||!o||W.current!==n&&(W.current=n,X())},[r,s,o,n,X]),{engine:o,installHint:c,installCommand:_,compiling:m,compiled:S,stale:S!==null&&S.source!==a,log:b,builtWithErrors:x,note:C,error:E,showPdf:T,setShowPdf:H,viewNonce:I,compile:X,dismiss:()=>{j(null),v(null)}}}const Fpt=3e4;function Upt({projectId:e,filePath:n,sessionId:t,enabled:r,savedSource:s,dirty:a,onPulled:o}){const[l,c]=M.useState(!1),[d,_]=M.useState(null),[f,m]=M.useState(!1),[g,S]=M.useState(!1),[k,b]=M.useState(null),[v,x]=M.useState(null),[y,C]=M.useState(!1),A=M.useCallback(H=>{c(H.hasToken),_(H.link)},[]);M.useEffect(()=>{let H=!1;if(m(!1),_(null),b(null),x(null),C(!1),D.current=!1,!!r)return LYe(e,n,{sessionId:t}).then(F=>{H||A(F)}).catch(F=>{H||x(F instanceof Error?F.message:String(F))}).finally(()=>{H||m(!0)}),()=>{H=!0}},[r,e,n,t,A]),M.useEffect(()=>{C(!1)},[s]);const E=M.useRef(!1),j=M.useRef(o);j.current=o;const T=M.useRef(a);T.current=a;const D=M.useRef(!1),I=M.useCallback(H=>E.current||T.current?!1:(E.current=!0,S(!0),x(null),BYe(e,n,{sessionId:t,resolve:H}).then(F=>{D.current=!1,b(F),F.pulled.includes(n)&&(T.current?C(!0):j.current(F.pulled))}).catch(F=>{D.current=!0,b(null),x(F instanceof Error?F.message:String(F))}).finally(()=>{E.current=!1,S(!1)}),!0),[e,n,t]),P=M.useRef(null);return M.useEffect(()=>{if(!r||!f||!d||a)return;const H=`${n}:${d.projectId}:${s}`;P.current!==H&&I()&&(P.current=H)},[r,f,d,n,s,a,g,I]),M.useEffect(()=>{if(!r||!f||!d||a)return;const H=setInterval(()=>{E.current||D.current||$Ye(e,n,{sessionId:t}).then(F=>{F.remoteChanged&&I()}).catch(F=>{D.current=!0,x(F instanceof Error?F.message:String(F))})},Fpt);return()=>clearInterval(H)},[r,f,d,a,e,n,t,I]),{hasToken:l,link:d,loaded:f,syncing:g,last:k,error:v,blocked:a,staleOnDisk:y,reloaded:()=>C(!1),uploadUrl:HYe(e,n,{sessionId:t}),saveToken:async H=>{const F=await cN(H);c(F.hasToken)},linkProject:async H=>{A(await OYe(e,n,{project:H,sessionId:t}))},unlink:async()=>{A(await IYe(e,n,{sessionId:t})),P.current=null,D.current=!1,b(null),x(null)},sync:H=>{D.current=!1,I(H)},dismiss:()=>{D.current=!1,x(null)}}}function vM(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function xC(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),a=r===-1?"":n.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1);let d;try{d=decodeURI(l)}catch{return null}if(!d||d.includes("\0"))return null;const _=d.startsWith("/"),f=_?[]:e.split("/").filter(Boolean);for(const m of d.split("/"))if(!(!m||m===".")){if(m===".."){if(f.length===0)return null;f.pop();continue}f.push(m)}return f.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:a}}function qpt(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function Gpt({value:e,onChange:n,onSave:t,onBlur:r,path:s,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l}){const c=M.useMemo(()=>ST(e,ky(s)),[e,s]),{ruleCh:d,codeCh:_}=nM(c.length),f=M.useRef(null),m=M.useRef(null),g=()=>{const b=f.current;b&&m.current&&(m.current.scrollTop=b.scrollTop)};M.useLayoutEffect(g,[e]),M.useLayoutEffect(()=>{var A;const b=f.current;if(!b||!a)return;const v=e.split(` +`),x=Math.min(Math.max(Math.trunc(a),1),v.length);let y=0;for(let E=0;E{if((b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="s"){b.preventDefault(),t();return}if(b.key==="Tab"){b.preventDefault();const v=b.currentTarget,{selectionStart:x,selectionEnd:y}=v,C=e.slice(0,x)+" "+e.slice(y);n(C),requestAnimationFrame(()=>{v.selectionStart=v.selectionEnd=x+1})}},k=`absolute inset-0 m-0 py-3.5 pe-4 ${bp} ${eM} [scrollbar-gutter:stable]`;return h.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${bp}`,children:[h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${d}ch`},"aria-hidden":"true"}),h.jsx("div",{ref:m,className:`file-view-code ${k} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:c.map((b,v)=>h.jsxs("div",{"data-line":v+1,className:"relative",style:{paddingInlineStart:`${_}ch`},children:[h.jsx("span",{className:`${tM} absolute start-0 pe-[1ch]`,style:{width:`${d}ch`},children:v+1}),kT(b)?h.jsx("br",{}):b]},v))}),h.jsx("textarea",{ref:f,className:`file-view-editarea ${k} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${_}ch`},value:e,onChange:b=>n(b.target.value),onScroll:g,onKeyDown:S,onBlur:r,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}const yC=[{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"]}],Vpt=4e6,Wpt=200,wC=16e6,Kpt=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)}),SC=e=>e.startsWith("//")?`https:${e}`:e;async function Ypt(e,n){var s;let t=Vpt;const r=new Map;for(const{element:a,attribute:o,url:l,typePrefixes:c}of e){if(r.has(l)){const S=r.get(l);S&&a.setAttribute(o,S);continue}if(n.aborted)return;if(r.size>=Wpt)continue;r.set(l,null);const d=await fetch(l,{signal:n}).catch(()=>null);if(!(d!=null&&d.ok))continue;const _=d.headers.get("content-type")??"",f=Number(d.headers.get("content-length"));if(!c.some(S=>_.startsWith(S))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=d.body)==null?void 0:s.cancel().catch(()=>{}));continue}const m=await d.blob().catch(()=>null),g=m&&await Kpt(m);!m||!g||(t-=m.size,r.set(l,g),a.setAttribute(o,g))}}async function Xpt(e,n,t){var o;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const l of r.querySelectorAll(yC.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:d,typePrefixes:_}of yC){if(!l.matches(c))continue;const f=l.getAttribute(d);if(!f)continue;const m=n(f);m&&(m===f?l.setAttribute(d,SC(f)):s.push({element:l,attribute:d,url:m,typePrefixes:_}))}await Ypt(s,t);for(const l of r.querySelectorAll("a[href]")){const c=l.getAttribute("href");!c||!vM(c)||(l.setAttribute("href",SC(c)),l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer"))}const a=((o=r.querySelector("base[href]"))==null?void 0:o.getAttribute("href"))??"";if(!/^https?:\/\//i.test(a)){const l=r.createElement("base");l.setAttribute("href","about:srcdoc"),r.head.prepend(l)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function Zpt(e,n,t,r){var l;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${wC-1}`}}).catch(()=>null),a=s!=null&&s.ok?await s.text().catch(()=>null):null;if(a===null)return{text:e,partial:!0};const o=Number((l=s==null?void 0:s.headers.get("content-range"))==null?void 0:l.split("/").pop());return{text:a,partial:Number.isFinite(o)&&o>wC}}function Qpt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;const c=new AbortController;return o(null),Zpt(e,n,t,c.signal).then(async({text:d,partial:_})=>({source:await Xpt(d,s,c.signal),partial:_})).then(d=>{l||o(d)}),()=>{l=!0,c.abort()}},[e,n,t,s]),a===null?h.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[h.jsx(dn,{})," ",lE()]}):h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a.partial&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:lde()}),h.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:fde({name:Ae(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:a.source})]})}const g0=e=>Ca(new Intl.ListFormat(N()).format(e.map(Ae)));function Jpt(e){if(e.error)return zye();if(e.syncing)return awe();if(e.blocked)return gE();const n=e.last;return n?n.pulled.length&&n.pushed.length?R4e({pulled:g0(n.pulled),pushed:g0(n.pushed)}):n.pulled.length?A4e({paths:g0(n.pulled)}):n.pushed.length?I4e({paths:g0(n.pushed)}):n.conflicts.length?Hye():mE():C4e()}function kC({href:e}){return h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:g4e()})}function emt({overleaf:e}){var m,g;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=()=>{t(""),o(null),c(!0)},_=!e.hasToken||l;async function f(S){S.preventDefault();const k=n.trim();if(!(r||!k)){s(!0),o(null);try{_?(await e.saveToken(k),c(!1)):await e.linkProject(k),t("")}catch(b){o(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!l){const S=((m=e.last)==null?void 0:m.conflicts)??[];return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-subtext",children:[h.jsx("span",{className:"flex-1 min-w-0",children:Jpt(e)}),e.syncing&&h.jsx(dn,{}),h.jsxs("a",{className:"inline-flex items-center gap-1 text-sm text-subtext whitespace-nowrap",href:e.link.url,target:"_blank",rel:"noreferrer",children:[n4e()," ",h.jsx(gc,{size:11})]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,"data-tip":e.blocked?P4e():void 0,onClick:()=>e.sync(),children:c4e()}),h.jsx(Qe,{variant:"ghost",disabled:e.syncing,onClick:()=>void e.unlink().catch(k=>{o(k instanceof Error?k.message:String(k))}),children:h4e()})]}),S.map(k=>h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-accent-red",children:[h.jsxs("span",{className:"flex-1 min-w-0",children:[h.jsx("code",{className:"font-mono",children:k})," ",Kye()]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"keep-local"}),children:Qye()}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"take-overleaf"}),children:y4e()})]},k)),((g=e.last)==null?void 0:g.note)&&h.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(kC,{href:e.uploadUrl}),h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:N7()})]})]})}return h.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[h.jsx("div",{className:"text-sm text-subtext",children:_?uwe():_we()}),h.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[h.jsx("input",{className:"flex-1 min-w-55 text-sm",type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?yye():"https://www.overleaf.com/project/…",autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:r||!n.trim(),children:r?_?ja():jp():_?K4e():Mye()}),h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?gye():Oye()})]}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(kC,{href:e.uploadUrl}),l?h.jsx(Qe,{variant:"ghost",type:"button",onClick:()=>c(!1),children:qye()}):e.hasToken&&h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:N7()})]})]})}function tmt({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const a=r.current;if(a){const o=document.createRange();o.selectNodeContents(a);const l=window.getSelection();l==null||l.removeAllRanges(),l==null||l.addRange(o)}t("select"),setTimeout(()=>t("idle"),4e3)}};return h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.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}),h.jsx(Jt,{"data-tip":n==="copied"?Y0():n==="select"?gfe():kue(),"aria-label":zue(),onClick:()=>void s(),children:n==="copied"?h.jsx(Ws,{size:13}):h.jsx(Lp,{size:13})})]})}function nmt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:a,branchLabel:o,onOpenFile:l,scrollPosition:c,onScrollPositionChange:d,lineScrollRequest:_,onLineScrollRequestHandled:f,onEdit:m}){var mn;const[g,S]=M.useState(null),[k,b]=M.useState(null),[v,x]=M.useState(!0),[y,C]=M.useState(0),A=t==="artifacts",E=t==="abs",j=x4(n),T=Xj(n),D=dpt(n),I=j||D,[P,H]=M.useState(!1),[F,V]=M.useState(""),[X,W]=M.useState(!1),[Z,J]=M.useState(null),B=M.useRef(null),L=M.useRef(c),$=(g==null?void 0:g.file)??null,K=(g==null?void 0:g.source)==="checkout"?g.file.path:n,G=K.split("/").slice(0,-1).join("/"),re=(g==null?void 0:g.source)==="artifact",oe=M.useCallback(Ye=>{var xt;return((xt=xC(G,Ye,E))==null?void 0:xt.path)??null},[E,G]),he=M.useCallback(Ye=>E?zYe(Ye):re?xh(e,Ye):W7(e,Ye,{sessionId:r,ref:s}),[re,s,E,e,r]),ie=M.useCallback(Ye=>{if(vM(Ye))return Ye;const xt=xC(G,Ye,E);return xt?qpt(he(xt.path),xt):null},[E,G,he]),q=sM($==null?void 0:$.presentation),te=(g==null?void 0:g.source)==="artifact"&&!A,le=A&&(g==null?void 0:g.source)==="checkout",ge=!s&&(g==null?void 0:g.source)==="checkout"&&$!=null&&!$.notFound,ue=r!=null&&(g==null?void 0:g.source)==="checkout"&&g.file.root==="clone",Ce=ge&&$!=null&&!$.binary&&!$.truncated&&!q&&!ue,Ee=M.useMemo(()=>(($==null?void 0:$.content)??"").replace(/\r\n/g,` +`),[$==null?void 0:$.content]),Le=Ce&&F!==Ee,Pe=M.useRef(null);M.useEffect(()=>{const Ye=($==null?void 0:$.content)??"";if(Pe.current!==null&&Ye===Pe.current){Pe.current=null;return}V(Ye.replace(/\r\n/g,` +`)),J(null)},[$==null?void 0:$.content,n]);const Ve=async()=>{if(!Ce||$==null||!Le||X)return!Le;const Ye=$.content.includes(`\r `)?F.replace(/\n/g,`\r -`):F;W(!0),J(null);try{return await yWe(e,Y,Ye,{sessionId:r}),Pe.current=Ye,S(xt=>xt&&xt.source==="checkout"?{source:"checkout",file:{...xt.file,content:Ye}}:xt),!0}catch(xt){return J(xt instanceof Error?xt.message:String(xt)),!1}finally{W(!1)}},ft=A&&ge&&!ue,Be=k_t({projectId:e,filePath:Y,sessionId:r,enabled:ft,ready:B!=null&&!B.notFound,source:Ce?F:(B==null?void 0:B.content)??""}),wt=E_t({projectId:e,filePath:Y,sessionId:r,enabled:ft,savedSource:Ee,dirty:Le,onPulled:M.useCallback(Ye=>{Ye.includes(Y)&&C(xt=>xt+1)},[Y])}),[zt,vt]=M.useState(!1),Lt=((mn=wt.last)==null?void 0:mn.conflicts.length)??0;M.useEffect(()=>{Lt>0&&vt(!0)},[Lt]);const St=wt.error?M4e():Lt>0?Uxe():wt.blocked?dE():wt.link?uE():z4e(),kt=wt.error||Lt>0?"text-accent-red":wt.link?"text-accent-green":void 0,xe=A&&Be.showPdf&&Be.compiled!=null,je=Ce&&!(O&&!P)&&!xe,We=Be.compiled?`${F7(e,Be.compiled.path,{sessionId:r})}&v=${Be.compiled.version}`:null,st=We?`${We}&view=${Be.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,nt=Be.compiled?Be.compiled.path.split("/").pop()??Be.compiled.path:null,Ht=async()=>{Le&&!await Ve()||A&&Be.engine&&Be.compile()},bt=async()=>{Le&&await Ht()},[tn,Vt]=M.useState(!1),[pn,Dt]=M.useState(null),En=async()=>{Vt(!0),Dt(null);try{await wWe(e,Y,{sessionId:r})}catch(Ye){Dt(Ye instanceof Error?Ye.message:String(Ye))}finally{Vt(!1)}},Ft=`${oe(Y)}&v=${y}`;M.useEffect(()=>{let Ye=!1;x(!0);const xt=async()=>{const Et=await lKe(e,n),rt=(Et==null?void 0:Et.presentation)==="text"||(Et==null?void 0:Et.presentation)==="unknown",Ie=Et&&rt?await iN(e,n):null,it=Et===null||rt&&Ie===null;return{path:n,content:(Ie==null?void 0:Ie.content)??"",truncated:(Ie==null?void 0:Ie.truncated)??!1,binary:(Ie==null?void 0:Ie.binary)??(Et==null?void 0:Et.presentation)==="download",notFound:it,presentation:Ie?Ie.binary?"download":"text":(Et==null?void 0:Et.presentation)??"download"}},Vn=async()=>{for(const Et of[`artifacts/${n}`,n]){const rt=await P7(e,Et,{sessionId:r}).catch(()=>null);if(rt&&!rt.notFound)return rt}return null};return(E?bWe(n).then(Et=>({source:"absolute",file:Et})):z?xt().then(async Et=>{if(!Et.notFound)return{source:"artifact",file:Et};const rt=await Vn();return rt?{source:"checkout",file:rt}:{source:"artifact",file:Et}}):P7(e,n,{sessionId:r,ref:s}).then(Et=>Et.notFound&&!s?xt().then(rt=>rt.notFound?{source:"checkout",file:Et}:{source:"artifact",file:rt,checkoutRoot:Et.root}):{source:"checkout",file:Et})).then(Et=>{Ye||(S(Et),b(null))}).catch(Et=>{Ye||b(Et.message)}).finally(()=>{Ye||x(!1)}),()=>{Ye=!0}},[e,n,t,r,s,y]),M.useLayoutEffect(()=>{const Ye=H.current,xt=L.current;!Ye||!B||!xt||(Ye.scrollTop=xt.top,Ye.scrollLeft=xt.left)},[B]);const xr=Ye=>{if(Ye.source==="absolute")return ode();if(z)return Jue({root:r?G_():q_()});if(s)return rde({branch:Ae(s)});if(r&&Ye.source==="checkout"&&Ye.file.root==="clone")return bfe();const xt=Ye.source==="checkout"?Ye.file.root:Ye.checkoutRoot;return dde({root:xt==="worktree"?G_():q_()})};return h.jsxs("div",{className:"file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"file-view-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant text-text shrink-0",children:[h.jsx(Fu,{size:13,className:"shrink-0"}),h.jsx("code",{className:"file-view-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Y,children:Y}),o&&h.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 shrink-0 [&_svg]:flex-none",title:ZL({branch:Ae(o)}),children:[h.jsx(Op,{size:11}),o]}),je&&(X||Le||Z)&&h.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${Z?"text-accent-red":"text-muted"}`,title:Z??(X?Ta():pfe()),children:X?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",Ude()]}):Z?$de():dfe()}),A&&Be.compiled&&h.jsx(Qt,{active:!Be.showPdf,"data-tip":Be.stale&&Be.showPdf?Ede():Be.showPdf?ku():r7(),"data-tip-align":"end","aria-label":Be.showPdf?ku():r7(),onClick:()=>Be.setShowPdf(!Be.showPdf),children:Be.showPdf?h.jsx(xb,{size:13}):h.jsx(Fu,{size:13,className:Be.stale?"text-accent-amber":void 0})}),A&&We&&nt&&h.jsx(Hp,{"data-tip":Be.stale?Eue({name:Ae(nt)}):h6({name:Ae(nt)}),"data-tip-align":"end","aria-label":h6({name:Ae(nt)}),href:We,download:nt,children:h.jsx(OGe,{size:13,className:Be.stale?"text-accent-amber":void 0})}),ft&&h.jsx(Qt,{active:zt,"data-tip":St,"data-tip-align":"end","aria-label":wI({status:St}),"aria-expanded":zt,onClick:()=>vt(Ye=>!Ye),children:wt.syncing?h.jsx(dn,{}):h.jsx(AGe,{size:13,className:kt})}),A&&ge&&h.jsx(Qt,{"data-tip":Be.compiled?t7():Q6(),"data-tip-align":"end","aria-label":Be.compiled?t7():Q6(),disabled:Be.compiling||!Be.engine,onClick:()=>void Ht(),children:Be.compiling?h.jsx(dn,{}):h.jsx(PGe,{size:13})}),O&&h.jsx(Qt,{active:P,"data-tip":P?Y0():ku(),"data-tip-align":"end","aria-label":P?Y0():ku(),onClick:()=>$(Ye=>!Ye),children:h.jsx(xb,{size:13})}),ge&&h.jsx(Qt,{"data-tip":pn??e7(),"data-tip-align":"end","aria-label":e7(),disabled:tn,onClick:()=>void En(),children:tn?h.jsx(dn,{}):h.jsx(mc,{size:13})}),h.jsx(Qt,{"data-tip":n7(),"data-tip-align":"end","aria-label":n7(),onClick:()=>C(Ye=>Ye+1),children:v?h.jsx(dn,{}):h.jsx(WE,{size:13})})]}),!k&&le&&(g==null?void 0:g.source)==="checkout"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:pde({root:g.file.root==="worktree"?G_():q_()})}),(Be.error||Be.log)&&h.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:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:`flex-1 min-w-0 text-sm ${Be.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Be.error??(Be.builtWithErrors?Xce():Uce())}),h.jsx(Qt,{"data-tip":J6(),"data-tip-align":"end","aria-label":pue(),onClick:Be.dismiss,children:h.jsx(hs,{size:13})})]}),Be.log&&h.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Be.log})]}),ft&&wt.staleOnDisk&&h.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:[h.jsx("span",{className:"flex-1 min-w-0",children:wde()}),h.jsx(Qe,{onClick:()=>{wt.reloaded(),C(Ye=>Ye+1)},children:lue()})]}),ft&&wt.error&&h.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4 flex items-start gap-2",children:[h.jsx("span",{className:"flex-1 min-w-0 text-sm text-accent-red whitespace-pre-wrap",children:wt.error}),h.jsx(Qt,{"data-tip":J6(),"data-tip-align":"end","aria-label":bue(),onClick:wt.dismiss,children:h.jsx(hs,{size:13})})]}),ft&&zt&&wt.loaded&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4",children:h.jsx(I_t,{overleaf:wt})}),A&&ge&&Be.engine===null&&Be.installHint&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Be.installHint,Be.installCommand&&h.jsx(B_t,{command:Be.installCommand})]}),Be.note&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Be.note}),xe&&Be.stale&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:rfe()}),h.jsxs("div",{ref:H,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ye=>{const xt={top:Ye.currentTarget.scrollTop,left:Ye.currentTarget.scrollLeft};L.current=xt,d==null||d(xt)},children:[!je&&!k&&!z&&(g==null?void 0:g.source)==="checkout"&&!g.file.notFound&&!s&&r&&g.file.root==="clone"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:ofe()}),!je&&!k&&(g==null?void 0:g.source)==="artifact"&&!g.file.notFound&&te&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Lce({root:g.checkoutRoot==="worktree"?G_():q_()})}),k?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Tue()," ",Ae(k)]}):B===null?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:nE()}):B.notFound?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:g?xr(g):Yue()}):q?h.jsx($2,{kind:q,url:Ft,name:n.split("/").pop()??n}):B.binary?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[$ce()," ",h.jsx("a",{href:Ft,download:n.split("/").pop()??n,children:tE()})]}):xe&&st&&nt?h.jsx($2,{kind:"pdf",url:st,name:nt,downloadBar:!1},st):j&&!P?h.jsx("div",{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:re?h.jsx(Yj,{projectId:e,folder:G,markdown:B.content}):h.jsx(Na,{text:B.content,resolveFilePath:he,resolveImageSrc:se,onOpenFile:l&&((Ye,xt,Vn,Wn,Et)=>l(Ye,r,s,Et))})}):D&&!P?h.jsx(L_t,{html:B.content,truncated:B.truncated,url:Ft,name:Y,resolveSrc:se}):je?h.jsx(z_t,{value:F,onChange:Ye=>{V(Ye),m==null||m(),Z&&J(null)},onSave:()=>void bt(),onBlur:()=>void bt(),path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}):h.jsxs(h.Fragment,{children:[h.jsx(Uj,{text:B.content,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}),B.truncated&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Due()})]})]})]})}const Jv=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function H_t({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:a,setOpen:o,ref:l}=zo(),c=M.useRef(null);return M.useEffect(()=>{if(!a)return;const d=_=>{var f;_.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[a]),h.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[h.jsx(Qt,{className:"project-back text-text","aria-label":s7(),onClick:n,children:h.jsx(Of,{size:18})}),h.jsxs("div",{className:"project-switcher",ref:l,children:[h.jsxs("button",{ref:c,className:`brand${a?" open":""}`,onClick:()=>o(d=>!d),"aria-expanded":a,children:[h.jsxs("span",{className:"brand-project-copy",children:[h.jsx("span",{className:"brand-project-label",children:$he()}),h.jsx("span",{className:"brand-project",children:e})]}),h.jsx(ja,{className:"project-chevron",size:14})]}),a&&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 project-menu",children:[h.jsx(Zr,{onClick:()=>{o(!1),r()},children:h.jsxs("span",{className:Jv,children:[h.jsx(UE,{size:14}),zhe()]})}),h.jsx(Zr,{onClick:()=>{o(!1),n()},children:h.jsxs("span",{className:Jv,children:[h.jsx(rVe,{size:14}),s7()]})}),h.jsx(Zr,{onClick:()=>{var d;(d=c.current)==null||d.focus(),o(!1),t()},children:h.jsxs("span",{className:Jv,children:[h.jsx(WGe,{size:14}),Mhe()]})})]})]}),s&&h.jsx(Qt,{"data-tip":i7(),"data-tip-align":"end","aria-label":i7(),onClick:s,children:h.jsx(GE,{size:15})})]})}function xC(){const e=M.useSyncExternalStore(ZKe,V7,V7);return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":g7()}),!e&&h.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[h.jsx(BE,{size:13,className:"shrink-0 text-accent-amber"}),h.jsx("span",{dir:"auto",className:"min-w-0",children:g7()})]})]})}const yC=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),eh=["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(" "),wC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),iM=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),SC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),P_t=[{id:"AI/ML",label:H1e},{id:"Biology",label:q1e},{id:"Physics",label:Q1e},{id:"Other",label:K1e}];function F_t({onDone:e,preferredAgent:n}){const[t,r]=M.useState(0),[s,a]=M.useState(null),[o,l]=M.useState(),[c,d]=M.useState(!1),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState([]),[x,y]=M.useState(""),[C,z]=M.useState(""),[E,j]=M.useState([]),[A,D]=M.useState(""),[O,P]=M.useState([]),[$,F]=M.useState(!1),V=M.useRef(0),[X,W]=M.useState(!1),[Z,J]=M.useState(!1),H=(s==null?void 0:s.some(q=>q.agentReady))??!1,L=o!=null,B=M.useRef(0),Y=(q,te=!1)=>{const le=++B.current;k(!0),W(!1),J(!1),l(void 0);const ge=()=>le===B.current;Promise.allSettled([J0(q,te).then(ue=>ge()&&a(ue)),QE().then(ue=>ge()&&l(ue.gitVersion))]).then(([ue,Ce])=>{ge()&&(ue.status==="rejected"&&(W(!0),a(null)),Ce.status==="rejected"&&(J(!0),l(void 0)))}).finally(()=>ge()&&k(!1))};M.useEffect(()=>Y(!1),[]),M.useEffect(()=>{if(s===null)return;const q=s.filter(te=>te.agentReady);g(te=>{var ge;if(te&&q.some(ue=>ue.id===te))return te;const le=n&&q.find(ue=>ue.id===n.harness);return(le==null?void 0:le.id)??((ge=q[0])==null?void 0:ge.id)??null})},[s,n]),M.useEffect(()=>Ax(()=>{J0(!0).then(q=>{a(q),W(!1)}).catch(()=>W(!0))}),[]),M.useEffect(()=>{cKe().then(q=>{v(q.researchAreas),y(q.otherArea??""),z(q.background??""),j(q.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const q=A.trim();if(q.length<3){P([]),F(!1);return}const te=++V.current;F(!0);const le=setTimeout(()=>{JE(q).then(ge=>te===V.current&&P(ge)).catch(()=>te===V.current&&P([])).finally(()=>te===V.current&&F(!1))},350);return()=>clearTimeout(le)},[A]);const G=q=>{const te=E.some(le=>le.paperId===q.paperId);j(le=>le.some(ge=>ge.paperId===q.paperId)?le:[...le,{paperId:q.paperId,title:kC(q.title)}]),D(""),P([]),te||wb(q.paperId).then(le=>{var ue;const ge=(ue=le.title)==null?void 0:ue.trim();ge&&j(Ce=>Ce.map(Ee=>Ee.paperId===q.paperId?{...Ee,title:ge}:Ee))}).catch(()=>{})},re=q=>j(te=>te.filter(le=>le.paperId!==q)),he=q=>{v(te=>te.includes(q)?te.filter(le=>le!==q):[...te,q])},oe=b.length>0&&(!b.includes("Other")||x.trim().length>0),se=async()=>{const q=s==null?void 0:s.find(le=>le.id===m&&le.agentReady);if(!q||c)return;const te=q_t(q);d(!0),f(null);try{const le=await iWe(te,{researchAreas:b,otherArea:b.includes("Other")?x:null,background:C||null,papers:E});e(le.project,le.selection)}catch(le){f(le instanceof Error?le.message:String(le))}finally{d(!1)}};return h.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${t===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:h.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${t===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:t===0?h.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:[h.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[h.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:h.jsx(W1,{})}),h.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:A1e()})]}),h.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[h.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),h.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Ive()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:dxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:_be()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:G2e()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:nbe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Lxe()})]})})]})]}),h.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:h.jsxs(Qe,{variant:"primary",size:"large",onClick:()=>r(1),children:[b7()," ",h.jsx(z0,{size:20})]})})]}):t===1?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(W1,{}),h.jsx("span",{children:Y2e()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:gve()}),h.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:Hbe()}),s!==null&&!H&&h.jsx("p",{className:yC,children:I2e()}),s!==null&&H&&m===null&&h.jsx("p",{className:yC,children:yve()}),h.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:s!==null?s.map(q=>h.jsx(V_t,{h:q,selected:m===q.id,onSelect:()=>g(q.id)},q.id)):X?h.jsx("div",{className:eh,children:y7()}):h.jsxs(br,{className:"py-2",children:[h.jsx(dn,{})," ",Kve()]})}),(o===null||Z)&&h.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[h.jsx(W_t,{gitVersion:o,error:Z}),Z?h.jsx("p",{className:wC,children:y7()}):h.jsx("p",{className:wC,children:ube()})]}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(0),children:[h.jsx(Of,{size:12})," ",v7()]}),(X||Z||o===null||s!==null&&!H)&&h.jsxs(Qe,{variant:"ghost",onClick:()=>Y(!0,!0),disabled:S,children:[h.jsx(sd,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",Kbe()]}),h.jsx("div",{className:"flex-1"}),h.jsxs(Qe,{variant:"primary",onClick:()=>r(2),disabled:S||!H||m===null||!L,title:S?Nxe():H?m===null?Rve():Z?n2e():o===void 0?Sxe():o===null?wbe():void 0:R2e(),children:[b7()," ",h.jsx(z0,{size:13})]})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(W1,{}),h.jsx("span",{children:J2e()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:rxe()}),h.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:h.jsxs("div",{className:iM,children:[h.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:[h.jsx("legend",{children:jxe()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Ave()}),h.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:P_t.map(q=>h.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:[h.jsx("input",{type:"checkbox",checked:b.includes(q.id),onChange:()=>he(q.id),disabled:c}),h.jsx("span",{children:q.label()})]},q.id))}),b.includes("Other")&&h.jsx("input",{className:"onb-other-area w-full mt-2",value:x,onChange:q=>y(q.target.value),disabled:c,placeholder:oxe(),"aria-label":qbe()})]}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:u2e()}),h.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:C,onChange:q=>z(q.target.value),disabled:c,rows:4,placeholder:Qve()}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:a2e()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:R1e()}),h.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[h.jsx("input",{id:"onb-paper-search",value:A,onChange:q=>D(q.target.value),disabled:c,placeholder:g2e()}),$?h.jsx("div",{className:eh,children:y2e()}):O.length>0?h.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:O.map(q=>h.jsxs("button",{type:"button",onClick:()=>G(q),disabled:c,children:[h.jsx(Kf,{children:kC(q.title)}),h.jsx("span",{className:"id",children:q.paperId})]},q.paperId))}):null]}),E.length>0&&h.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:E.map(q=>h.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:[h.jsx(Kf,{children:q.title||q.paperId}),h.jsx("span",{className:"id",children:q.paperId}),h.jsx("button",{type:"button","aria-label":DI({name:Ae(q.paperId)}),onClick:()=>re(q.paperId),disabled:c,children:h.jsx(hs,{size:12})})]},q.paperId))})]})}),!oe&&h.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:b.length===0?Cve():qve()}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(1),disabled:c,children:[h.jsx(Of,{size:12})," ",v7()]}),h.jsx("div",{className:"flex-1"}),h.jsx(Qe,{variant:"primary",onClick:()=>void se(),disabled:c||m===null||!oe,children:c?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",A2e()]}):h.jsxs(h.Fragment,{children:[abe()," ",h.jsx(z0,{size:13})]})})]}),m===null&&h.jsx("p",{className:SC,children:$xe()}),_&&h.jsx("p",{className:SC,children:_})]})})})}function kC(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function U_t(e){return e.agentReady?{tone:"success",label:P2e()}:e.installed?e.installBroken?{tone:"warning",label:vbe()}:e.authState==="unknown"?{tone:"warning",label:pxe()}:e.authState==="unsupported"?{tone:"warning",label:bxe()}:e.installed?{tone:"warning",label:Obe()}:{tone:"neutral",label:x7()}:{tone:"neutral",label:x7()}}function q_t(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:$p(e,n).defaultId}}function G_t({harness:e}){return h.jsx(v2,{harness:e,size:26})}function V_t({h:e,selected:n,onSelect:t}){var c;const r=U_t(e),s=n?{tone:"success",label:C2e()}:r,o=[(c=e.version)==null?void 0:c.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(d=>X0(d)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),l=h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[h.jsx(G_t,{harness:e.id}),h.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),h.jsx(Rx,{tone:s.tone,children:s.label})]});return e.agentReady?h.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[l,h.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??lE(),e.plan?` · ${e.plan}`:""]}),h.jsx("div",{className:`${eh} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:o,children:o})]}):h.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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:[l,h.jsx("div",{className:eh,children:zh(e.agentNote)})]})}function W_t({gitVersion:e,error:n}){return h.jsxs("div",{className:iM,children:[h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsx("span",{className:"onb-card-name font-semibold text-base",children:Ebe()}),h.jsx(Rx,{tone:e?"success":n||e===null?"danger":"warning",children:e?Qbe():n?ive():e===null?cE():cve()})]}),(e||!n&&e===void 0)&&h.jsx("div",{className:eh,children:e??hve()})]})}function eb(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function K_t(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 Y_t(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 X_t(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function Z_t({onCreated:e,onCancel:n}){const[t,r]=M.useState("blank"),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(""),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(null),[b,v]=M.useState(!1),[x,y]=M.useState(!1),[C,z]=M.useState(!1),[E,j]=M.useState(null),[A,D]=M.useState(!1),[O,P]=M.useState(!1),[$,F]=M.useState(void 0),[V,X]=M.useState("research-project"),[W,Z]=M.useState(null),[J,H]=M.useState(!1),[L,B]=M.useState(!1),[Y,G]=M.useState(""),[re,he]=M.useState(null),[oe,se]=M.useState([]),[q,te]=M.useState(!1),[le,ge]=M.useState(""),[ue,Ce]=M.useState(0),Ee=M.useRef(0),Le=M.useRef(0),Pe=M.useRef(0),Ve=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),ft=t==="paper"?Y_t(re==null?void 0:re.repoUrl):null,Be=s.trim()?`~/OpenResearch/${eb(s,48)}`:"",wt=`~/OpenResearch/${eb(s||(re==null?void 0:re.title)||(re==null?void 0:re.paperId)||"")}`,zt=t==="blank"&&!_?Be:t==="paper"&&re&&!_?wt:c,vt=ft??(t==="folder"&&(m!=null&&m.githubOwner)&&m.githubRepo?{owner:m.githubOwner,repo:m.githubRepo}:null);M.useEffect(()=>{lWe().then(({login:Ie})=>F(Ie)).catch(()=>F(null)),Ex().then(Ie=>P(Ie.githubForNewProjects)).catch(()=>{})},[]),M.useEffect(()=>{let Ie=!0;H(!0);const it=setTimeout(()=>{cWe(s.trim()).then(({repo:Ut})=>Ie&&X(Ut)).catch(()=>Ie&&X(eb(s,48))).finally(()=>Ie&&H(!1))},150);return()=>{Ie=!1,clearTimeout(it)}},[s]),M.useEffect(()=>{let Ie=!0;if(Z(null),B(!!vt),!!vt)return uWe(vt.owner,vt.repo).then(({canPush:it})=>{Ie&&it&&Z(`github.com/${vt.owner}/${vt.repo}`)}).catch(()=>{}).finally(()=>Ie&&B(!1)),()=>{Ie=!1}},[vt==null?void 0:vt.owner,vt==null?void 0:vt.repo]),M.useEffect(()=>{const Ie=++Le.current,it=zt.trim();if(!it){g(null),k(null),v(!1);return}v(!0),k(null);const Ut=setTimeout(()=>{QE(it).then(Jt=>{Ie===Le.current&&g(Jt)}).catch(Jt=>{Ie===Le.current&&(g(null),k(Jt instanceof Error?Jt.message:String(Jt)))}).finally(()=>{Ie===Le.current&&v(!1)})},200);return()=>clearTimeout(Ut)},[t,ue,zt]),M.useEffect(()=>{const Ie=++Ee.current;if(t!=="paper"||re){te(!1);return}const it=Y.trim(),Ut=K_t(it);if(!Ut&&it.length<3){se([]),ge(""),te(!1);return}j(null),te(!0),se([]),ge("");const Jt=setTimeout(()=>{if(Ut){wb(Ut).then(jt=>{var Dn;Ie===Ee.current&&(he(jt),o||a(((Dn=jt.title)==null?void 0:Dn.trim())||jt.paperId))}).catch(jt=>Ie===Ee.current&&j(jt instanceof Error?jt.message:String(jt))).finally(()=>Ie===Ee.current&&te(!1));return}JE(it).then(jt=>{Ie===Ee.current&&(se(jt),ge(it))}).catch(jt=>Ie===Ee.current&&j(jt instanceof Error?jt.message:String(jt))).finally(()=>Ie===Ee.current&&te(!1))},350);return()=>clearTimeout(Jt)},[t,re,Y,o]);async function Lt(Ie){var Ut;const it=++Ee.current;te(!0),j(null);try{const Jt=await wb(Ie);if(it!==Ee.current)return;he(Jt),se([]),o||a(((Ut=Jt.title)==null?void 0:Ut.trim())||Jt.paperId)}catch(Jt){it===Ee.current&&j(Jt instanceof Error?Jt.message:String(Jt))}finally{it===Ee.current&&te(!1)}}function St(){Ee.current+=1,Pe.current+=1,he(null),G(""),se([]),ge(""),te(!1),y(!1),d(""),f(!1),Ve.current.paper={name:o?s:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function kt(Ie){if(Ie===t)return;Ee.current+=1,Pe.current+=1,Ve.current[t]={name:s,nameTouched:o,path:c,pathTouched:_};const it=Ve.current[Ie];r(Ie),j(null),k(null),g(null),te(!1),y(!1),a(it.name),l(it.nameTouched),d(it.path),f(it.pathTouched)}async function xe(){if(x)return;const Ie=++Pe.current;y(!0),j(null);try{const it=await aWe();if(Ie!==Pe.current||!it)return;if(f(!0),g(null),v(!0),d(it),Ce(Ut=>Ut+1),t==="folder"&&!o){const Ut=it.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Ut&&a(Ut)}}catch(it){Ie===Pe.current&&j(it instanceof Error?it.message:String(it))}finally{Ie===Pe.current&&y(!1)}}async function je(Ie){if(Ie.preventDefault(),!!Vn){z(!0),j(null);try{const it=await oWe({name:s.trim(),path:zt.trim(),createFolder:t!=="folder",requireNewFolder:t==="blank",initializeGit:!0,githubSyncEnabled:O,locale:N(),...t==="paper"&&re?{paperId:re.paperId,cloneUrl:re.repoUrl??void 0}:{}});e(it.project,it.githubPublicationError)}catch(it){j(it instanceof Error?it.message:String(it))}finally{z(!1)}}}const We=s.trim(),st=t==="paper"&&re&&!re.repoUrl?re.paperId:null,nt=t==="folder"&&(m==null?void 0:m.gitState)==="ready"?m.resolvedPath??null:null,Ht=We!==""&&(t==="blank"||st!==null||nt!==null);M.useEffect(()=>{if(!Ht)return;const Ie=window.setTimeout(()=>{dWe({name:We,paperId:st??void 0,path:nt??void 0,locale:N()}).catch(()=>{})},1200);return()=>window.clearTimeout(Ie)},[Ht,We,st,nt]);const bt=(m==null?void 0:m.gitVersion)===null,tn=t==="folder"&&!!zt.trim()&&m!==null&&m.exists===!1,Vt=t==="blank"&&(m==null?void 0:m.exists)===!0,pn=!!zt.trim()&&(m==null?void 0:m.exists)===!0&&m.directory===!1,Dt=t==="paper"&&!!(re!=null&&re.repoUrl)&&(m==null?void 0:m.empty)===!1,En=t==="paper"&&!!re&&!(re!=null&&re.repoUrl)&&(m==null?void 0:m.empty)===!1,Ft=t==="folder"&&((m==null?void 0:m.gitState)==="detached"||(m==null?void 0:m.gitState)==="invalid"),xr=_&&!zt.trim()||pn||Dt||En,mn=_&&!zt.trim()||pn||Vt,Ye=_&&!zt.trim()?m7():pn?d7():Vt?dme():null,xt=_&&!zt.trim()?m7():pn?d7():Dt?a1e():En?Mpe():null,Vn=!!(s.trim()&&zt.trim())&&!C&&!x&&!b&&m!==null&&!S&&!bt&&!tn&&!Vt&&!pn&&!Dt&&!En&&!Ft&&(t!=="paper"||!!re)&&(!O||typeof $=="string"&&!J&&!L),Wn=W??`github.com/${$??"you"}/${V}`,Et=$===void 0||J||L,rt=t==="paper"&&!re&&Y.trim().length>=3&&le===Y.trim()&&!q&&oe.length===0&&!E;return h.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:je,children:[h.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:[h.jsx("button",{type:"button",className:t==="blank"?"active":"","aria-pressed":t==="blank",onClick:()=>kt("blank"),children:pme()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="paper"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="folder"?"active":"","aria-pressed":t==="folder",onClick:()=>kt("folder"),children:Bme()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="blank"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="paper"?"active":"","aria-pressed":t==="paper",onClick:()=>kt("paper"),children:Vme()})]}),t==="paper"&&!re&&h.jsxs("label",{className:"!font-normal",children:[pge(),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:Y,onChange:Ie=>{j(null),ge(""),G(Ie.target.value)},placeholder:Cge()}),!rt&&h.jsx("span",{className:"repo-hint",children:q?v1e():u1e()}),rt&&h.jsx("span",{className:"project-path-notice block",children:rge()}),oe.length>0&&h.jsx("div",{className:"paper-results",children:oe.map(Ie=>h.jsxs("button",{type:"button",onClick:()=>void Lt(Ie.paperId),children:[h.jsx(Kf,{children:Ie.title}),h.jsx("span",{className:"id",children:Ie.paperId})]},Ie.paperId))})]}),re&&t==="paper"&&h.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[h.jsxs("div",{className:"meta",children:[h.jsx(Kf,{className:"block",children:re.title||re.paperId}),re.repoUrl&&h.jsx("div",{className:"id",children:X_t(re.repoUrl)})]}),h.jsx(Qe,{size:"small",type:"button","aria-label":Nme(),onClick:St,children:Sme()})]}),!re.repoUrl&&h.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:[h.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[h.jsx(BE,{size:16})," ",oge()]}),h.jsx("span",{className:"text-sm font-normal text-accent-amber",children:dge()})]})]}),(t!=="paper"||re)&&h.jsxs(h.Fragment,{children:[t==="blank"&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:p7()}),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:h7()})]}),t==="paper"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:re!=null&&re.repoUrl?Wpe():_7()}),h.jsx("input",{className:"text-sm font-normal",value:zt,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},"aria-describedby":xr?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f7()}),xr&&h.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:xt})]}):t==="folder"?h.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":c?Ope({path:Ae(c)}):c7(),disabled:x,title:c||void 0,onClick:()=>void xe(),children:[h.jsx(If,{className:c?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),h.jsx("span",{className:c?"text-sm":"placeholder",children:x?Upe():c||c7()}),h.jsx(Ma,{className:"folder-picker-chevron",size:15})]}):s.trim()?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:_7()}),h.jsx("input",{className:"text-sm font-normal",value:zt,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":mn?"blank-destination-description":void 0,spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:f7()}),mn&&h.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Ye})]}):null,t!=="blank"&&zt&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:p7()}),h.jsx("input",{className:"text-sm font-normal",value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:h7()})]}),bt&&h.jsx("div",{className:"project-path-notice error",children:Xme()}),!bt&&t==="folder"&&c.trim()&&!b&&(m==null?void 0:m.exists)===!1&&h.jsx("div",{className:"project-path-notice error",children:Rge()}),!bt&&t==="folder"&&c.trim()&&!b&&pn&&h.jsx("div",{className:"project-path-notice error",children:Pge()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="detached"&&h.jsx("div",{className:"project-path-notice error",children:jme()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="invalid"&&h.jsx("div",{className:"project-path-notice error",children:Ige()}),S&&h.jsx("div",{className:"project-path-notice error",role:"alert",children:S})]}),E&&h.jsx("div",{className:"error",role:"alert",children:E}),(t!=="paper"||re)&&zt&&(t!=="blank"||s.trim())&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[h.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${O&&$===null?" text-accent-red":" text-text"}`,"aria-expanded":A,"aria-controls":"new-project-advanced-settings",onClick:()=>D(Ie=>!Ie),children:[O?$===null?kpe():zpe():xpe(),h.jsx(ja,{className:A?"rotate-180":"",size:16})]}),A&&h.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[h.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[h.jsx("input",{className:"m-0",type:"checkbox",checked:O,onChange:Ie=>P(Ie.target.checked),disabled:C}),h.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Age()})]}),h.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[h.jsx("span",{children:Et?Gge({repository:Ae(Wn)}):W?Jge({repository:Ae(Wn)}):Yge({repository:Ae(Wn)})}),h.jsx("span",{children:Fme()}),$===null&&h.jsx("span",{children:_1e({command:Ae("gh auth login")})})]})]})]}),h.jsxs("div",{className:"actions new-project-actions",children:[n&&h.jsx(Qe,{type:"button",onClick:n,children:bme()}),h.jsx(Qe,{variant:"primary",className:"ms-auto",disabled:!Vn,children:C?sme():t==="paper"?re!=null&&re.repoUrl?Zpe():u7():t==="folder"?w1e():u7()})]})]})}function aM({onClose:e,onCreated:n}){const t=M.useRef(null),r=M.useRef(e);return r.current=e,M.useEffect(()=>{const s=t.current;if(!s)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...s.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(s.querySelector("[data-initial-focus]")??o()[0]??s).focus();const l=c=>{if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&!c.altKey&&c.shiftKey){c.preventDefault(),c.stopPropagation();return}if(c.key!=="Tab")return;const d=o();if(d.length===0){c.preventDefault(),s.focus();return}const _=d[0],f=d[d.length-1];c.shiftKey&&document.activeElement===_?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),_.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),h.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:s=>{s.target===s.currentTarget&&e()},children:h.jsxs("div",{ref:t,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:[h.jsx("h2",{id:"new-project-dialog-title",children:fE()}),h.jsx(Z_t,{onCancel:e,onCreated:n})]})})}function Q_t({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const a=M.useRef(null),o=M.useRef(r),l=M.useRef(n);o.current=r,l.current=n,M.useEffect(()=>{const d=a.current;if(!d)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...d.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??d).focus();const m=g=>{if(g.key==="Escape"){g.preventDefault(),l.current||o.current();return}if(g.key!=="Tab")return;const S=f();if(S.length===0){g.preventDefault(),d.focus();return}const k=S[0],b=S[S.length-1];g.shiftKey&&document.activeElement===k?(g.preventDefault(),b.focus()):!g.shiftKey&&document.activeElement===b&&(g.preventDefault(),k.focus())};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0),_==null||_.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:d=>{!n&&d.target===d.currentTarget&&r()},children:h.jsxs("div",{ref:a,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:[h.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:b5e()}),h.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[h.jsx("p",{className:"m-0",children:e5e({name:ka(e.name)})}),h.jsx("p",{className:"m-0",children:c?D5e():B5e()}),t&&h.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx(Qe,{disabled:n,onClick:r,children:d5e()}),h.jsx(Qe,{variant:"danger",disabled:n,onClick:s,children:n?N5e():S5e()})]})]})})}function CC(){return h.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 EC({projects:e,onOpen:n,onCreated:t,onDeleted:r}){const[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState({}),S=M.useRef(0),k=e.map(v=>v.id).join("\0");M.useEffect(()=>{let v=!0,x=null;const y=()=>{x=null;const E=++S.current;rWe().then(j=>{!v||E!==S.current||g(Object.fromEntries(j.map(A=>[A.projectId,A])))}).catch(()=>{})},C=()=>{x===null&&(x=setTimeout(y,100))};y();const z=WKe(C);return()=>{v=!1,z(),x!==null&&clearTimeout(x)}},[k]);async function b(v){l(v.id),d(null);try{await _We(v.id),d(null),f(null),r(v.id)}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(null)}}return h.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[h.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",children:[h.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:[h.jsx("h2",{children:J5e()}),h.jsxs(Qe,{onClick:()=>a(!0),children:[h.jsx(yx,{size:15})," ",fE()]})]}),h.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:h.jsxs("div",{children:[h.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:[h.jsx("span",{children:Y5e()}),h.jsx("span",{children:S7()}),h.jsx("span",{children:k7()}),h.jsx("span",{children:C7()})]}),e.length===0?h.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:G5e()}):[...e].sort((v,x)=>{var z,E;const y=((z=m[v.id])==null?void 0:z.lastMessageAt)??v.createdAt;return(((E=m[x.id])==null?void 0:E.lastMessageAt)??x.createdAt)-y||v.name.localeCompare(x.name)}).map(v=>{const x=m[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,C=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):u3e(),z=x?x.activeAgents>0?Vwe({count:an(x.activeAgents)}):a3e():"—",E=x?x.totalAgents===1?_3e():Xwe({count:an(x.totalAgents)}):"—",j=x?x.runningExperiments>0?v3e({count:an(x.runningExperiments)}):x.totalExperiments===0?cx():E7({count:an(x.totalExperiments)}):"—",A=x&&x.runningExperiments>0?E7({count:an(x.totalExperiments)}):null;return h.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:[h.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":oI({name:ka(v.name)}),onClick:()=>n(v.id)}),h.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:[h.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),h.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[h.jsxs("span",{children:[p5e()," ",Ea(v.createdAt)]}),v.paperId&&h.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&h.jsxs("span",{children:[o5e()," ",Ae(v.paperId)]}),h.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":gb({name:ka(v.name)}),disabled:o===v.id,onClick:D=>{D.stopPropagation(),d(null),f(v)},children:h.jsx(id,{size:14})})]})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:S7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.activeAgents>0&&h.jsx(CC,{}),z]}),h.jsx("span",{className:"text-xs text-muted",children:E})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:k7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.runningExperiments>0&&h.jsx(CC,{}),j]}),A&&h.jsx("span",{className:"text-xs text-muted",children:A})]}),h.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[h.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:C7()}),y?h.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":W0({name:ka(v.name)}),children:[h.jsx("span",{className:"inline-flex shrink-0",children:h.jsx(um,{size:14})}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ae(C)})]}):h.jsx("span",{className:"text-sm text-text pointer-events-none",children:C})]})]},v.id)})]})})]}),s&&h.jsx(aM,{onClose:()=>a(!1),onCreated:(v,x)=>{a(!1),t(v,x)}}),_&&h.jsx(Q_t,{project:_,deleting:o===_.id,error:c,onClose:()=>{d(null),f(null)},onConfirm:()=>void b(_)})]})}function J_t({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:a,onCancel:o}){const[l,c]=M.useState(new Set),[d,_]=M.useState(null),f=new Map;for(const S of e){const k=f.get(S.experimentId);k?k.push(S):f.set(S.experimentId,[S])}for(const S of f.values())S.sort((k,b)=>b.createdAt-k.createdAt);const m=[...n].sort((S,k)=>{var x,y,C,z;const b=((y=(x=f.get(S.id))==null?void 0:x[0])==null?void 0:y.createdAt)??S.createdAt;return(((z=(C=f.get(k.id))==null?void 0:C[0])==null?void 0:z.createdAt)??k.createdAt)-b});if(m.length===0)return h.jsx("div",{className:"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]: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 experiments-empty-state [&_p]:text-2xl",children:h.jsx("p",{children:t??Gle()})});async function g(S){_(null),c(k=>new Set(k).add(S));try{await o(S)}catch(k){c(b=>{const v=new Set(b);return v.delete(S),v}),_(k instanceof Error?k.message:String(k))}}return h.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[d&&h.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[jce()," ",d]}),h.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":Sce(),children:m.map(S=>{const k=f.get(S.id)??[],b=k[0]??null,v=k.find(z=>z.status==="running"||z.status==="starting"),x=v??b,y=!!(v&&(v.cancelRequested||l.has(v.id))),C=v?y?"cancelling":Di(v):b?Di(b):"idle";return h.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:()=>r(S,"preview"),onDoubleClick:()=>r(S,"keepOpen"),onAuxClick:z=>{z.button===1&&(z.preventDefault(),r(S,"keepOpen"))},children:[h.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[h.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...vr(z=>r(S,z),{stopPropagation:!0}),children:S.title||S.slug}),h.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:S.branchName,children:[h.jsx(Op,{size:14,"aria-hidden":"true"}),h.jsx("code",{children:S.branchName})]})]}),h.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:[h.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:h.jsx(bo,{status:C})}),h.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:h.jsx("span",{children:k.length===1?Jle():oce({count:an(k.length)})})}),h.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:h.jsx("span",{children:b?Ea(b.createdAt):Yle()})})]}),h.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":UL({name:S.title||S.slug}),onClick:z=>z.stopPropagation(),onDoubleClick:z=>z.stopPropagation(),onAuxClick:z=>z.stopPropagation(),children:[h.jsxs(Qe,{size:"small",disabled:!x,title:x?rce():Ple(),...vr(z=>{x&&s(S.id,x.id,z)},{stopPropagation:!0}),children:[h.jsx(Uu,{size:15}),Nce()]}),h.jsxs(Qe,{size:"small",title:q9({branch:Ae(S.branchName)}),...vr(z=>a(S.id,z),{stopPropagation:!0}),children:[h.jsx(Lp,{size:15}),bce()]}),v&&h.jsxs(Qe,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?dce():pce(),onClick:()=>void g(v.id),children:[h.jsx($E,{size:15}),y?Xre():J9()]})]})]},S.id)})})]})}function e0t({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,a]=M.useState(null),o=M.useRef(null),l=M.useCallback(c=>{t||(r(!0),a(null),c().catch(()=>a(uFe())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const c=d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),l(e))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,l]),M.useEffect(()=>{const c=o.current;if(!c)return;const d=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??c).focus();const f=m=>{if(m.key!=="Tab")return;const g=_();if(g.length===0){m.preventDefault(),c.focus();return}const S=g[0],k=g[g.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),k.focus()):!m.shiftKey&&document.activeElement===k&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),d==null||d.focus()}},[]),Pp.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:h.jsxs("div",{ref:o,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:[h.jsx(Qt,{className:"absolute end-3.5 top-3.5","aria-label":HPe(),onClick:()=>l(e),disabled:t,children:h.jsx(hs,{size:16})}),h.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[h.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:h.jsx(zx,{})}),h.jsxs("div",{children:[h.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:KPe()}),h.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:vFe()})]})]}),h.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[h.jsxs("p",{dir:"auto",children:[_Fe()," ",h.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:aFe()}),OPe()]}),h.jsx("p",{dir:"auto",children:nFe()})]}),s&&h.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),h.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[h.jsx(Qe,{onClick:()=>l(n),disabled:t,children:qPe()}),h.jsx(Qe,{variant:"primary",onClick:()=>l(e),disabled:t,children:t?Ta():QPe()})]})]})}),document.body)}function Lr(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Am(){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}})}B0.prototype=Am.prototype={constructor:B0,on:function(e,n){var t=this._,r=n0t(e+"",t),s,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(s),r=0,s,a;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),zC.hasOwnProperty(n)?{space:zC[n],local:e}:e}function s0t(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===P2&&n.documentElement.namespaceURI===P2?n.createElement(e):n.createElementNS(t,e)}}function i0t(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function oM(e){var n=Tm(e);return(n.local?i0t:s0t)(n)}function a0t(){}function g4(e){return e==null?a0t:function(){return this.querySelector(e)}}function o0t(e){typeof e!="function"&&(e=g4(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=x+1);!(z=b[y])&&++y=0;)(o=r[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function M0t(e){e||(e=R0t);function n(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var t=this._groups,r=t.length,s=new Array(r),a=0;an?1:e>=n?0:NaN}function D0t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function L0t(){return Array.from(this)}function O0t(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?W0t:typeof n=="function"?Y0t:K0t)(e,n,t??"")):Qu(this.node(),e)}function Qu(e,n){return e.style.getPropertyValue(n)||fM(e).getComputedStyle(e,null).getPropertyValue(n)}function Z0t(e){return function(){delete this[e]}}function Q0t(e,n){return function(){this[e]=n}}function J0t(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function ept(e,n){return arguments.length>1?this.each((n==null?Z0t:typeof n=="function"?J0t:Q0t)(e,n)):this.node()[e]}function hM(e){return e.trim().split(/^|\s+/)}function v4(e){return e.classList||new _M(e)}function _M(e){this._node=e,this._names=hM(e.getAttribute("class")||"")}_M.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 pM(e,n){for(var t=v4(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function zpt(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,a;t()=>e;function F2(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:a,x:o,y:l,dx:c,dy:d,dispatch:_}){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:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:_}})}F2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Bpt(e){return!e.ctrlKey&&!e.button}function $pt(){return this.parentNode}function Hpt(e,n){return n??{x:e.x,y:e.y}}function Ppt(){return navigator.maxTouchPoints||"ontouchstart"in this}function yM(){var e=Bpt,n=$pt,t=Hpt,r=Ppt,s={},a=Am("start","drag","end"),o=0,l,c,d,_,f=0;function m(C){C.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,Ipt).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,z){if(!(_||!e.call(this,C,z))){var E=y(this,n.call(this,C,z),C,z,"mouse");E&&(ci(C.view).on("mousemove.drag",S,th).on("mouseup.drag",k,th),bM(C.view),tb(C),d=!1,l=C.clientX,c=C.clientY,E("start",C))}}function S(C){if(Ou(C),!d){var z=C.clientX-l,E=C.clientY-c;d=z*z+E*E>f}s.mouse("drag",C)}function k(C){ci(C.view).on("mousemove.drag mouseup.drag",null),xM(C.view,d),Ou(C),s.mouse("end",C)}function b(C,z){if(e.call(this,C,z)){var E=C.changedTouches,j=n.call(this,C,z),A=E.length,D,O;for(D=0;D>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?v0(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?v0(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=Upt.exec(e))?new Gs(n[1],n[2],n[3],1):(n=qpt.exec(e))?new Gs(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=Gpt.exec(e))?v0(n[1],n[2],n[3],n[4]):(n=Vpt.exec(e))?v0(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=Wpt.exec(e))?LC(n[1],n[2]/100,n[3]/100,1):(n=Kpt.exec(e))?LC(n[1],n[2]/100,n[3]/100,n[4]):AC.hasOwnProperty(e)?MC(AC[e]):e==="transparent"?new Gs(NaN,NaN,NaN,0):null}function MC(e){return new Gs(e>>16&255,e>>8&255,e&255,1)}function v0(e,n,t,r){return r<=0&&(e=n=t=NaN),new Gs(e,n,t,r)}function Zpt(e){return e instanceof Mh||(e=vc(e)),e?(e=e.rgb(),new Gs(e.r,e.g,e.b,e.opacity)):new Gs}function U2(e,n,t,r){return arguments.length===1?Zpt(e):new Gs(e,n,t,r??1)}function Gs(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}b4(Gs,U2,wM(Mh,{brighter(e){return e=e==null?xp:Math.pow(xp,e),new Gs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?nh:Math.pow(nh,e),new Gs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gs(_c(this.r),_c(this.g),_c(this.b),yp(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:RC,formatHex:RC,formatHex8:Qpt,formatRgb:DC,toString:DC}));function RC(){return`#${lc(this.r)}${lc(this.g)}${lc(this.b)}`}function Qpt(){return`#${lc(this.r)}${lc(this.g)}${lc(this.b)}${lc((isNaN(this.opacity)?1:this.opacity)*255)}`}function DC(){const e=yp(this.opacity);return`${e===1?"rgb(":"rgba("}${_c(this.r)}, ${_c(this.g)}, ${_c(this.b)}${e===1?")":`, ${e})`}`}function yp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _c(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function lc(e){return e=_c(e),(e<16?"0":"")+e.toString(16)}function LC(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ki(e,n,t,r)}function SM(e){if(e instanceof Ki)return new Ki(e.h,e.s,e.l,e.opacity);if(e instanceof Mh||(e=vc(e)),!e)return new Ki;if(e instanceof Ki)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),a=Math.max(n,t,r),o=NaN,l=a-s,c=(a+s)/2;return l?(n===a?o=(t-r)/l+(t0&&c<1?0:o,new Ki(o,l,c,e.opacity)}function Jpt(e,n,t,r){return arguments.length===1?SM(e):new Ki(e,n,t,r??1)}function Ki(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}b4(Ki,Jpt,wM(Mh,{brighter(e){return e=e==null?xp:Math.pow(xp,e),new Ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nh:Math.pow(nh,e),new Ki(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 Gs(nb(e>=240?e-240:e+120,s,r),nb(e,s,r),nb(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ki(OC(this.h),b0(this.s),b0(this.l),yp(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=yp(this.opacity);return`${e===1?"hsl(":"hsla("}${OC(this.h)}, ${b0(this.s)*100}%, ${b0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function OC(e){return e=(e||0)%360,e<0?e+360:e}function b0(e){return Math.max(0,Math.min(1,e||0))}function nb(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 x4=e=>()=>e;function emt(e,n){return function(t){return e+t*n}}function tmt(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 nmt(e){return(e=+e)==1?kM:function(n,t){return t-n?tmt(n,t,e):x4(isNaN(n)?t:n)}}function kM(e,n){var t=n-e;return t?emt(e,t):x4(isNaN(e)?n:e)}const wp=(function e(n){var t=nmt(n);function r(s,a){var o=t((s=U2(s)).r,(a=U2(a)).r),l=t(s.g,a.g),c=t(s.b,a.b),d=kM(s.opacity,a.opacity);return function(_){return s.r=o(_),s.g=l(_),s.b=c(_),s.opacity=d(_),s+""}}return r.gamma=e,r})(1);function rmt(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(a){for(s=0;st&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:ya(r,s)})),t=rb.lastIndex;return t180?_+=360:_-d>180&&(d+=360),m.push({i:f.push(s(f)+"rotate(",null,r)-2,x:ya(d,_)})):_&&f.push(s(f)+"rotate("+_+r)}function l(d,_,f,m){d!==_?m.push({i:f.push(s(f)+"skewX(",null,r)-2,x:ya(d,_)}):_&&f.push(s(f)+"skewX("+_+r)}function c(d,_,f,m,g,S){if(d!==f||_!==m){var k=g.push(s(g)+"scale(",null,",",null,")");S.push({i:k-4,x:ya(d,f)},{i:k-2,x:ya(_,m)})}else(f!==1||m!==1)&&g.push(s(g)+"scale("+f+","+m+")")}return function(d,_){var f=[],m=[];return d=e(d),_=e(_),a(d.translateX,d.translateY,_.translateX,_.translateY,f,m),o(d.rotate,_.rotate,f,m),l(d.skewX,_.skewX,f,m),c(d.scaleX,d.scaleY,_.scaleX,_.scaleY,f,m),d=_=null,function(g){for(var S=-1,k=m.length,b;++S=0&&e._call.call(void 0,n),e=e._next;--Ju}function $C(){bc=(kp=sh.now())+jm,Ju=Sf=0;try{vmt()}finally{Ju=0,xmt(),bc=0}}function bmt(){var e=sh.now(),n=e-kp;n>zM&&(jm-=n,kp=e)}function xmt(){for(var e,n=Sp,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:Sp=t);kf=e,V2(r)}function V2(e){if(!Ju){Sf&&(Sf=clearTimeout(Sf));var n=e-bc;n>24?(e<1/0&&(Sf=setTimeout($C,e-sh.now()-jm)),pf&&(pf=clearInterval(pf))):(pf||(kp=sh.now(),pf=setInterval(bmt,zM)),Ju=1,AM($C))}}function HC(e,n,t){var r=new Cp;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var ymt=Am("start","end","cancel","interrupt"),wmt=[],jM=0,PC=1,W2=2,H0=3,FC=4,K2=5,P0=6;function Mm(e,n,t,r,s,a){var o=e.__transition;if(!o)e.__transition={};else if(t in o)return;Smt(e,t,{name:n,index:r,group:s,on:ymt,tween:wmt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:jM})}function w4(e,n){var t=ta(e,n);if(t.state>jM)throw new Error("too late; already scheduled");return t}function Ba(e,n){var t=ta(e,n);if(t.state>H0)throw new Error("too late; already running");return t}function ta(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function Smt(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=TM(a,0,t.time);function a(d){t.state=PC,t.timer.restart(o,t.delay,t.time),t.delay<=d&&o(d-t.delay)}function o(d){var _,f,m,g;if(t.state!==PC)return c();for(_ in r)if(g=r[_],g.name===t.name){if(g.state===H0)return HC(o);g.state===FC?(g.state=P0,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[_]):+_W2&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function Jmt(e,n,t){var r,s,a=Qmt(n)?w4:Ba;return function(){var o=a(this,e),l=o.on;l!==r&&(s=(r=l).copy()).on(n,t),o.on=s}}function egt(e,n){var t=this._id;return arguments.length<2?ta(this.node(),t).on.on(e):this.each(Jmt(t,e,n))}function tgt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function ngt(){return this.on("end.remove",tgt(this._id))}function rgt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=g4(e));for(var r=this._groups,s=r.length,a=new Array(s),o=0;o()=>e;function zgt(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 go(e,n,t){this.k=e,this.x=n,this.y=t}go.prototype={constructor:go,scale:function(e){return e===1?this:new go(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new go(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 Rm=new go(1,0,0);LM.prototype=go.prototype;function LM(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Rm;return e.__zoom}function sb(e){e.stopImmediatePropagation()}function mf(e){e.preventDefault(),e.stopImmediatePropagation()}function Agt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Tgt(){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 UC(){return this.__zoom||Rm}function jgt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Mgt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Rgt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],a=e.invertY(n[0][1])-t[0][1],o=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function OM(){var e=Agt,n=Tgt,t=Rgt,r=jgt,s=Mgt,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=$0,d=Am("start","zoom","end"),_,f,m,g=500,S=150,k=0,b=10;function v(V){V.property("__zoom",UC).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",P).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(V,X,W,Z){var J=V.selection?V.selection():V;J.property("__zoom",UC),V!==J?z(V,X,W,Z):J.interrupt().each(function(){E(this,arguments).event(Z).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},v.scaleBy=function(V,X,W,Z){v.scaleTo(V,function(){var J=this.__zoom.k,H=typeof X=="function"?X.apply(this,arguments):X;return J*H},W,Z)},v.scaleTo=function(V,X,W,Z){v.transform(V,function(){var J=n.apply(this,arguments),H=this.__zoom,L=W==null?C(J):typeof W=="function"?W.apply(this,arguments):W,B=H.invert(L),Y=typeof X=="function"?X.apply(this,arguments):X;return t(y(x(H,Y),L,B),J,o)},W,Z)},v.translateBy=function(V,X,W,Z){v.transform(V,function(){return t(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof W=="function"?W.apply(this,arguments):W),n.apply(this,arguments),o)},null,Z)},v.translateTo=function(V,X,W,Z,J){v.transform(V,function(){var H=n.apply(this,arguments),L=this.__zoom,B=Z==null?C(H):typeof Z=="function"?Z.apply(this,arguments):Z;return t(Rm.translate(B[0],B[1]).scale(L.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof W=="function"?-W.apply(this,arguments):-W),H,o)},Z,J)};function x(V,X){return X=Math.max(a[0],Math.min(a[1],X)),X===V.k?V:new go(X,V.x,V.y)}function y(V,X,W){var Z=X[0]-W[0]*V.k,J=X[1]-W[1]*V.k;return Z===V.x&&J===V.y?V:new go(V.k,Z,J)}function C(V){return[(+V[0][0]+ +V[1][0])/2,(+V[0][1]+ +V[1][1])/2]}function z(V,X,W,Z){V.on("start.zoom",function(){E(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,H=arguments,L=E(J,H).event(Z),B=n.apply(J,H),Y=W==null?C(B):typeof W=="function"?W.apply(J,H):W,G=Math.max(B[1][0]-B[0][0],B[1][1]-B[0][1]),re=J.__zoom,he=typeof X=="function"?X.apply(J,H):X,oe=c(re.invert(Y).concat(G/re.k),he.invert(Y).concat(G/he.k));return function(se){if(se===1)se=he;else{var q=oe(se),te=G/q[2];se=new go(te,Y[0]-q[0]*te,Y[1]-q[1]*te)}L.zoom(null,se)}})}function E(V,X,W){return!W&&V.__zooming||new j(V,X)}function j(V,X){this.that=V,this.args=X,this.active=0,this.sourceEvent=null,this.extent=n.apply(V,X),this.taps=0}j.prototype={event:function(V){return V&&(this.sourceEvent=V),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(V,X){return this.mouse&&V!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&V!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&V!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(V){var X=ci(this.that).datum();d.call(V,this.that,new zgt(V,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:d}),X)}};function A(V,...X){if(!e.apply(this,arguments))return;var W=E(this,X).event(V),Z=this.__zoom,J=Math.max(a[0],Math.min(a[1],Z.k*Math.pow(2,r.apply(this,arguments)))),H=Vi(V);if(W.wheel)(W.mouse[0][0]!==H[0]||W.mouse[0][1]!==H[1])&&(W.mouse[1]=Z.invert(W.mouse[0]=H)),clearTimeout(W.wheel);else{if(Z.k===J)return;W.mouse=[H,Z.invert(H)],F0(this),W.start()}mf(V),W.wheel=setTimeout(L,S),W.zoom("mouse",t(y(x(Z,J),W.mouse[0],W.mouse[1]),W.extent,o));function L(){W.wheel=null,W.end()}}function D(V,...X){if(m||!e.apply(this,arguments))return;var W=V.currentTarget,Z=E(this,X,!0).event(V),J=ci(V.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",G,!0),H=Vi(V,W),L=V.clientX,B=V.clientY;bM(V.view),sb(V),Z.mouse=[H,this.__zoom.invert(H)],F0(this),Z.start();function Y(re){if(mf(re),!Z.moved){var he=re.clientX-L,oe=re.clientY-B;Z.moved=he*he+oe*oe>k}Z.event(re).zoom("mouse",t(y(Z.that.__zoom,Z.mouse[0]=Vi(re,W),Z.mouse[1]),Z.extent,o))}function G(re){J.on("mousemove.zoom mouseup.zoom",null),xM(re.view,Z.moved),mf(re),Z.event(re).end()}}function O(V,...X){if(e.apply(this,arguments)){var W=this.__zoom,Z=Vi(V.changedTouches?V.changedTouches[0]:V,this),J=W.invert(Z),H=W.k*(V.shiftKey?.5:2),L=t(y(x(W,H),Z,J),n.apply(this,X),o);mf(V),l>0?ci(this).transition().duration(l).call(z,L,Z,V):ci(this).call(v.transform,L,Z,V)}}function P(V,...X){if(e.apply(this,arguments)){var W=V.touches,Z=W.length,J=E(this,X,V.changedTouches.length===Z).event(V),H,L,B,Y;for(sb(V),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.`},ih=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],IM=["Enter"," ","Escape"],BM={"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 ed;(function(e){e.Strict="strict",e.Loose="loose"})(ed||(ed={}));var pc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(pc||(pc={}));var ah;(function(e){e.Partial="partial",e.Full="full"})(ah||(ah={}));const $M={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ml;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ml||(ml={}));var Ep;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Ep||(Ep={}));var mt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(mt||(mt={}));const qC={[mt.Left]:mt.Right,[mt.Right]:mt.Left,[mt.Top]:mt.Bottom,[mt.Bottom]:mt.Top};function HM(e){return e===null?null:e?"valid":"invalid"}const PM=e=>"id"in e&&"source"in e&&"target"in e,Dgt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),k4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Rh=(e,n=[0,0])=>{const{width:t,height:r}=To(e),s=e.origin??n,a=t*s[0],o=r*s[1];return{x:e.position.x-a,y:e.position.y-o}},Lgt=(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 a=typeof s=="string";let o=!n.nodeLookup&&!a?s:void 0;n.nodeLookup&&(o=a?n.nodeLookup.get(s):k4(s)?s:n.nodeLookup.get(s.id));const l=o?Np(o,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Dm(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Lm(t)},Dh=(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=Dm(t,Np(s)),r=!0)}),r?Lm(t):{x:0,y:0,width:0,height:0}},C4=(e,n,[t,r,s]=[0,0,1],a=!1,o=!1)=>{const l=(n.x-t)/s,c=(n.y-r)/s,d=n.width/s,_=n.height/s,f=[];for(const m of e.values()){const{measured:g,selectable:S=!0,hidden:k=!1}=m;if(o&&!S||k)continue;const b=g.width??m.width??m.initialWidth??0,v=g.height??m.height??m.initialHeight??0,{x,y}=m.internals.positionAbsolute,C=GM(l,c,d,_,x,y,b,v),z=b*v,E=a&&C>0;(!m.internals.handleBounds||E||C>=z||m.dragging)&&f.push(m)}return f},Ogt=(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 Igt(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 Bgt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:a},o){if(e.size===0)return!0;const l=Igt(e,o),c=Dh(l),d=N4(c,n,t,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(d,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),!0}function FM({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:a}){const o=t.get(e),l=o.parentId?t.get(o.parentId):void 0,{x:c,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},_=o.origin??r;let f=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",ea.error005());else{const g=l.measured.width,S=l.measured.height;g&&S&&(f=[[c,d],[c+g,d+S]])}else l&&yc(o.extent)&&(f=[[o.extent[0][0]+c,o.extent[0][1]+d],[o.extent[1][0]+c,o.extent[1][1]+d]]);const m=yc(f)?xc(n,f,o.measured):n;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ea.error015())),{position:{x:m.x-c+(o.measured.width??0)*_[0],y:m.y-d+(o.measured.height??0)*_[1]},positionAbsolute:m}}async function $gt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of t){if(m.deletable===!1)continue;const g=a.has(m.id),S=!g&&m.parentId&&o.find(k=>k.id===m.parentId);(g||S)&&o.push(m)}const l=new Set(n.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),_=Ogt(o,c);for(const m of c)l.has(m.id)&&!_.find(S=>S.id===m.id)&&_.push(m);if(!s)return{edges:_,nodes:o};const f=await s({nodes:o,edges:_});return typeof f=="boolean"?f?{edges:_,nodes:o}:{edges:[],nodes:[]}:f}const td=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),xc=(e={x:0,y:0},n,t)=>({x:td(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:td(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function UM(e,n,t){const{width:r,height:s}=To(t),{x:a,y:o}=t.internals.positionAbsolute;return xc(e,[[a,o],[a+r,o+s]],n)}const GC=(e,n,t)=>et?-td(Math.abs(e-t),1,n)/n:0,E4=(e,n,t=15,r=40)=>{const s=GC(e.x,r,n.width-r)*t,a=GC(e.y,r,n.height-r)*t;return[s,a]},Dm=(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)}),Y2=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Lm=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),oh=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=k4(e)?e.internals.positionAbsolute:Rh(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},Np=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=k4(e)?e.internals.positionAbsolute:Rh(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},qM=(e,n)=>Lm(Dm(Y2(e),Y2(n))),GM=(e,n,t,r,s,a,o,l)=>{const c=Math.max(0,Math.min(e+t,s+o)-Math.max(e,s)),d=Math.max(0,Math.min(n+r,a+l)-Math.max(n,a));return Math.ceil(c*d)},zp=(e,n)=>GM(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),VC=e=>Yi(e.width)&&Yi(e.height)&&Yi(e.x)&&Yi(e.y),Yi=e=>!isNaN(e)&&isFinite(e),VM=(e,n)=>(t,r)=>{},Lh=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Oh=({x:e,y:n},[t,r,s],a=!1,o=[1,1])=>{const l={x:(e-t)/s,y:(n-r)/s};return a?Lh(l,o):l},nd=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function mu(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 Hgt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=mu(e,t),s=mu(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=mu(e.top??e.y??0,t),s=mu(e.bottom??e.y??0,t),a=mu(e.left??e.x??0,n),o=mu(e.right??e.x??0,n);return{top:r,right:o,bottom:s,left:a,x:a+o,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Pgt(e,n,t,r,s,a){const{x:o,y:l}=nd(e,[n,t,r]),{x:c,y:d}=nd({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-c,f=a-d;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(_),bottom:Math.floor(f)}}const N4=(e,n,t,r,s,a)=>{const o=Hgt(a,n,t),l=(n-o.x)/e.width,c=(t-o.y)/e.height,d=Math.min(l,c),_=td(d,r,s),f=e.x+e.width/2,m=e.y+e.height/2,g=n/2-f*_,S=t/2-m*_,k=Pgt(e,g,S,_,n,t),b={left:Math.min(k.left-o.left,0),top:Math.min(k.top-o.top,0),right:Math.min(k.right-o.right,0),bottom:Math.min(k.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:S-b.top+b.bottom,zoom:_}},lh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function yc(e){return e!=null&&e!=="parent"}function To(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 WM(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 KM(e,n={width:0,height:0},t,r,s){const a={...e},o=r.get(t);if(o){const l=o.origin||s;a.x+=o.internals.positionAbsolute.x-(n.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(n.height??0)*l[1]}return a}function WC(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function Fgt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function Ugt(e){return{...BM,...e||{}}}function Rf(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:a,y:o}=Xi(e),l=Oh({x:a-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},r),{x:c,y:d}=t?Lh(l,n):l;return{xSnapped:c,ySnapped:d,...l}}const z4=e=>({width:e.offsetWidth,height:e.offsetHeight}),YM=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},qgt=["INPUT","SELECT","TEXTAREA"];function XM(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:qgt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const ZM=e=>"clientX"in e,Xi=(e,n)=>{var a,o;const t=ZM(e),r=t?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,s=t?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},KC=(e,n,t,r,s)=>{const a=n.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(l.left-t.left)/r,y:(l.top-t.top)/r,...z4(o)}})};function QM({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+s*.375+o*.375+t*.125,d=n*.125+a*.375+l*.375+r*.125,_=Math.abs(c-e),f=Math.abs(d-n);return[c,d,_,f]}function w0(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function YC({pos:e,x1:n,y1:t,x2:r,y2:s,c:a}){switch(e){case mt.Left:return[n-w0(n-r,a),t];case mt.Right:return[n+w0(r-n,a),t];case mt.Top:return[n,t-w0(t-s,a)];case mt.Bottom:return[n,t+w0(s-t,a)]}}function JM({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top,curvature:o=.25}){const[l,c]=YC({pos:t,x1:e,y1:n,x2:r,y2:s,c:o}),[d,_]=YC({pos:a,x1:r,y1:s,x2:e,y2:n,c:o}),[f,m,g,S]=QM({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:_});return[`M${e},${n} C${l},${c} ${d},${_} ${r},${s}`,f,m,g,S]}function eR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,a=t0}const Wgt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,Kgt=(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)),Ygt=(e,n,t={})=>{var a;if(!e.source||!e.target)return(a=t.onError)==null||a.call(t,"006",ea.error006()),n;const r=t.getEdgeId||Wgt;let s;return PM(e)?s={...e}:s={...e,id:r(e)},Kgt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function tR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,a,o,l]=eR({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,a,o,l]}const XC={[mt.Left]:{x:-1,y:0},[mt.Right]:{x:1,y:0},[mt.Top]:{x:0,y:-1},[mt.Bottom]:{x:0,y:1}},Xgt=({source:e,sourcePosition:n=mt.Bottom,target:t})=>n===mt.Left||n===mt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function Zgt({source:e,sourcePosition:n=mt.Bottom,target:t,targetPosition:r=mt.Top,center:s,offset:a,stepPosition:o}){const l=XC[n],c=XC[r],d={x:e.x+l.x*a,y:e.y+l.y*a},_={x:t.x+c.x*a,y:t.y+c.y*a},f=Xgt({source:d,sourcePosition:n,target:_}),m=f.x!==0?"x":"y",g=f[m];let S=[],k,b;const v={x:0,y:0},x={x:0,y:0},[,,y,C]=eR({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(l[m]*c[m]===-1){m==="x"?(k=s.x??d.x+(_.x-d.x)*o,b=s.y??(d.y+_.y)/2):(k=s.x??(d.x+_.x)/2,b=s.y??d.y+(_.y-d.y)*o);const A=[{x:k,y:d.y},{x:k,y:_.y}],D=[{x:d.x,y:b},{x:_.x,y:b}];l[m]===g?S=m==="x"?A:D:S=m==="x"?D:A}else{const A=[{x:d.x,y:_.y}],D=[{x:_.x,y:d.y}];if(m==="x"?S=l.x===g?D:A:S=l.y===g?A:D,n===r){const V=Math.abs(e[m]-t[m]);if(V<=a){const X=Math.min(a-1,a-V);l[m]===g?v[m]=(d[m]>e[m]?-1:1)*X:x[m]=(_[m]>t[m]?-1:1)*X}}if(n!==r){const V=m==="x"?"y":"x",X=l[m]===c[V],W=d[V]>_[V],Z=d[V]<_[V];(l[m]===1&&(!X&&W||X&&Z)||l[m]!==1&&(!X&&Z||X&&W))&&(S=m==="x"?A:D)}const O={x:d.x+v.x,y:d.y+v.y},P={x:_.x+x.x,y:_.y+x.y},$=Math.max(Math.abs(O.x-S[0].x),Math.abs(P.x-S[0].x)),F=Math.max(Math.abs(O.y-S[0].y),Math.abs(P.y-S[0].y));$>=F?(k=(O.x+P.x)/2,b=S[0].y):(k=S[0].x,b=(O.y+P.y)/2)}const z={x:d.x+v.x,y:d.y+v.y},E={x:_.x+x.x,y:_.y+x.y};return[[e,...z.x!==S[0].x||z.y!==S[0].y?[z]:[],...S,...E.x!==S[S.length-1].x||E.y!==S[S.length-1].y?[E]:[],t],k,b,y,C]}function Qgt(e,n,t,r){const s=Math.min(ZC(e,n)/2,ZC(n,t)/2,r),{x:a,y:o}=n;if(e.x===a&&a===t.x||e.y===o&&o===t.y)return`L${a} ${o}`;if(e.y===o){const d=e.xt.id===n):e[0])||null}function Z2(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function e1t(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const d=Z2(c,n);a.has(d)||(o.push({id:d,color:c.color||t,...c}),a.add(d))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const nR=1e3,t1t=10,A4={nodeOrigin:[0,0],nodeExtent:ih,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},n1t={...A4,checkEquality:!0};function T4(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function r1t(e,n,t){const r=T4(A4,t);for(const s of e.values())if(s.parentId)M4(s,e,n,r);else{const a=Rh(s,r.nodeOrigin),o=yc(s.extent)?s.extent:r.nodeExtent,l=xc(a,o,To(s));s.internals.positionAbsolute=l}}function s1t(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 a={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(a):s.type==="target"&&r.push(a)}return{source:t,target:r}}function j4(e){return e==="manual"}function Q2(e,n,t,r={}){var _,f;const s=T4(n1t,r),a={i:0},o=new Map(n),l=s!=null&&s.elevateNodesOnSelect&&!j4(s.zIndexMode)?nR:0;let c=e.length>0,d=!1;n.clear(),t.clear();for(const m of e){let g=o.get(m.id);if(s.checkEquality&&m===(g==null?void 0:g.internals.userNode))n.set(m.id,g);else{const S=Rh(m,s.nodeOrigin),k=yc(m.extent)?m.extent:s.nodeExtent,b=xc(S,k,To(m));g={...s.defaults,...m,measured:{width:(_=m.measured)==null?void 0:_.width,height:(f=m.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:s1t(m,g),z:rR(m,l,s.zIndexMode),userNode:m}},n.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),m.parentId&&M4(g,n,t,r,a),d||(d=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function i1t(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 M4(e,n,t,r,s){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:c}=T4(A4,r),d=e.parentId,_=n.get(d);if(!_){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}i1t(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&c==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*t1t),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const f=a&&!j4(c)?nR:0,{x:m,y:g,z:S}=a1t(e,_,o,l,f,c),{positionAbsolute:k}=e.internals,b=m!==k.x||g!==k.y;(b||S!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:g}:k,z:S}})}function rR(e,n,t){const r=Yi(e.zIndex)?e.zIndex:0;return j4(t)?r:r+(e.selected?n:0)}function a1t(e,n,t,r,s,a){const{x:o,y:l}=n.internals.positionAbsolute,c=To(e),d=Rh(e,t),_=yc(e.extent)?xc(d,e.extent,c):d;let f=xc({x:o+_.x,y:l+_.y},r,c);e.extent==="parent"&&(f=UM(f,c,n));const m=rR(e,s,a),g=n.internals.z??0;return{x:f.x,y:f.y,z:g>=m?g+1:m}}function R4(e,n,t,r=[0,0]){var o;const s=[],a=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const d=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??oh(c),_=qM(d,l.rect);a.set(l.parentId,{expandedRect:_,parent:c})}return a.size>0&&a.forEach(({expandedRect:l,parent:c},d)=>{var y;const _=c.internals.positionAbsolute,f=To(c),m=c.origin??r,g=l.x<_.x?Math.round(Math.abs(_.x-l.x)):0,S=l.y<_.y?Math.round(Math.abs(_.y-l.y)):0,k=Math.max(f.width,Math.round(l.width)),b=Math.max(f.height,Math.round(l.height)),v=(k-f.width)*m[0],x=(b-f.height)*m[1];(g>0||S>0||v||x)&&(s.push({id:d,type:"position",position:{x:c.position.x-g+v,y:c.position.y-S+x}}),(y=t.get(d))==null||y.forEach(C=>{e.some(z=>z.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+g,y:C.position.y+S}})})),(f.width0){const g=R4(m,n,t,s);d.push(...g)}return{changes:d,updatedInternals:c}}async function l1t({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:a}){if(!n||!e.x&&!e.y)return!1;const o=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,a]],r);return!!o&&(o.x!==t[0]||o.y!==t[1]||o.k!==t[2])}function t9(e,n,t,r,s,a){let o=s;const l=r.get(o)||new Map;r.set(o,l.set(t,n)),o=`${s}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(t,n)),a){o=`${s}-${e}-${a}`;const d=r.get(o)||new Map;r.set(o,d.set(t,n))}}function sR(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:s,target:a,sourceHandle:o,targetHandle:l},d=`${s}-${o}--${a}-${l}`,_=`${a}-${l}--${s}-${o}`;t9("source",c,_,e,s,o),t9("target",c,d,e,a,l),n.set(r.id,r)}}function iR(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:iR(t,n):!1}function n9(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 c1t(e,n,t,r){const s=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!iR(o,e))&&(o.draggable||n&&typeof o.draggable>"u")){const l=e.get(a);l&&s.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:t.x-l.internals.positionAbsolute.x,y:t.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function ib({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var o,l,c;const s=[];for(const[d,_]of n){const f=(o=t.get(d))==null?void 0:o.internals.userNode;f&&s.push({...f,position:_.position,dragging:r})}if(!e)return[s[0],s];const a=(l=t.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((c=n.get(e))==null?void 0:c.position)||a.position,dragging:r}:s[0],s]}function u1t({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const a={x:t-s.distance.x,y:r-s.distance.y},o=Lh(a,n);return{x:o.x-a.x,y:o.y-a.y}}function d1t({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let a={x:null,y:null},o=0,l=new Map,c=!1,d={x:0,y:0},_=null,f=!1,m=null,g=!1,S=!1,k=null;function b({noDragClassName:x,handleSelector:y,domNode:C,isSelectable:z,nodeId:E,nodeClickDistance:j=0}){m=ci(C);function A({x:$,y:F}){const{nodeLookup:V,nodeExtent:X,snapGrid:W,snapToGrid:Z,nodeOrigin:J,onNodeDrag:H,onSelectionDrag:L,onError:B,updateNodePositions:Y}=n();a={x:$,y:F};let G=!1;const re=l.size>1,he=re&&X?Y2(Dh(l)):null,oe=re&&Z?u1t({dragItems:l,snapGrid:W,x:$,y:F}):null;for(const[se,q]of l){if(!V.has(se))continue;let te={x:$-q.distance.x,y:F-q.distance.y};Z&&(te=oe?{x:Math.round(te.x+oe.x),y:Math.round(te.y+oe.y)}:Lh(te,W));let le=null;if(re&&X&&!q.extent&&he){const{positionAbsolute:Ce}=q.internals,Ee=Ce.x-he.x+X[0][0],Le=Ce.x+q.measured.width-he.x2+X[1][0],Pe=Ce.y-he.y+X[0][1],Ve=Ce.y+q.measured.height-he.y2+X[1][1];le=[[Ee,Pe],[Le,Ve]]}const{position:ge,positionAbsolute:ue}=FM({nodeId:se,nextPosition:te,nodeLookup:V,nodeExtent:le||X,nodeOrigin:J,onError:B});G=G||q.position.x!==ge.x||q.position.y!==ge.y,q.position=ge,q.internals.positionAbsolute=ue}if(S=S||G,!!G&&(Y(l,!0),k&&(r||H||!E&&L))){const[se,q]=ib({nodeId:E,dragItems:l,nodeLookup:V});r==null||r(k,l,se,q),H==null||H(k,se,q),E||L==null||L(k,q)}}async function D(){if(!_)return;const{transform:$,panBy:F,autoPanSpeed:V,autoPanOnNodeDrag:X}=n();if(!X){c=!1,cancelAnimationFrame(o);return}const[W,Z]=E4(d,_,V);(W!==0||Z!==0)&&(a.x=(a.x??0)-W/$[2],a.y=(a.y??0)-Z/$[2],await F({x:W,y:Z})&&A(a)),o=requestAnimationFrame(D)}function O($){var re;const{nodeLookup:F,multiSelectionActive:V,nodesDraggable:X,transform:W,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:H,onNodeDragStart:L,onSelectionDragStart:B,unselectNodesAndEdges:Y}=n();f=!0,(!H||!z)&&!V&&E&&((re=F.get(E))!=null&&re.selected||Y()),z&&H&&E&&(e==null||e(E));const G=Rf($.sourceEvent,{transform:W,snapGrid:Z,snapToGrid:J,containerBounds:_});if(a=G,l=c1t(F,X,G,E),l.size>0&&(t||L||!E&&B)){const[he,oe]=ib({nodeId:E,dragItems:l,nodeLookup:F});t==null||t($.sourceEvent,l,he,oe),L==null||L($.sourceEvent,he,oe),E||B==null||B($.sourceEvent,oe)}}const P=yM().clickDistance(j).on("start",$=>{const{domNode:F,nodeDragThreshold:V,transform:X,snapGrid:W,snapToGrid:Z}=n();_=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,S=!1,k=$.sourceEvent,V===0&&O($),a=Rf($.sourceEvent,{transform:X,snapGrid:W,snapToGrid:Z,containerBounds:_}),d=Xi($.sourceEvent,_)}).on("drag",$=>{const{autoPanOnNodeDrag:F,transform:V,snapGrid:X,snapToGrid:W,nodeDragThreshold:Z,nodeLookup:J}=n(),H=Rf($.sourceEvent,{transform:V,snapGrid:X,snapToGrid:W,containerBounds:_});if(k=$.sourceEvent,($.sourceEvent.type==="touchmove"&&$.sourceEvent.touches.length>1||E&&!J.has(E))&&(g=!0),!g){if(!c&&F&&f&&(c=!0,D()),!f){const L=Xi($.sourceEvent,_),B=L.x-d.x,Y=L.y-d.y;Math.sqrt(B*B+Y*Y)>Z&&O($)}(a.x!==H.xSnapped||a.y!==H.ySnapped)&&l&&f&&(d=Xi($.sourceEvent,_),A(H))}}).on("end",$=>{if(!f||g){g&&l.size>0&&n().updateNodePositions(l,!1);return}if(c=!1,f=!1,cancelAnimationFrame(o),l.size>0){const{nodeLookup:F,updateNodePositions:V,onNodeDragStop:X,onSelectionDragStop:W}=n();if(S&&(V(l,!1),S=!1),s||X||!E&&W){const[Z,J]=ib({nodeId:E,dragItems:l,nodeLookup:F,dragging:!1});s==null||s($.sourceEvent,l,Z,J),X==null||X($.sourceEvent,Z,J),E||W==null||W($.sourceEvent,J)}}}).filter($=>{const F=$.target;return!$.button&&(!x||!n9(F,`.${x}`,C))&&(!y||n9(F,y,C))});m.call(P)}function v(){m==null||m.on(".drag",null)}return{update:b,destroy:v}}function f1t(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of n.values())zp(s,oh(a))>0&&r.push(a);return r}const h1t=250;function _1t(e,n,t,r){var l,c;let s=[],a=1/0;const o=f1t(e,t,n+h1t);for(const d of o){const _=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of _){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:m,y:g}=wc(d,f,f.position,!0),S=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));S>n||(S1){const d=r.type==="source"?"target":"source";return s.find(_=>_.type===d)??s[0]}return s[0]}function aR(e,n,t,r,s,a=!1){var d,_,f;const o=r.get(e);if(!o)return null;const l=s==="strict"?(d=o.internals.handleBounds)==null?void 0:d[n]:[...((_=o.internals.handleBounds)==null?void 0:_.source)??[],...((f=o.internals.handleBounds)==null?void 0:f.target)??[]],c=(t?l==null?void 0:l.find(m=>m.id===t):l==null?void 0:l[0])??null;return c&&a?{...c,...wc(o,c,c.position,!0)}:c}function oR(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function p1t(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const lR=()=>!0;function m1t(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:d,autoPanOnConnect:_,flowId:f,panBy:m,cancelConnection:g,onConnectStart:S,onConnect:k,onConnectEnd:b,isValidConnection:v=lR,onReconnectEnd:x,updateConnection:y,getTransform:C,getFromHandle:z,autoPanSpeed:E,dragThreshold:j=1,handleDomNode:A}){const D=YM(e.target);let O=0,P;const{x:$,y:F}=Xi(e),V=oR(a,A),X=l==null?void 0:l.getBoundingClientRect();let W=!1;if(!X||!V)return;const Z=aR(s,V,r,c,n);if(!Z)return;let J=Xi(e,X),H=!1,L=null,B=!1,Y=null;function G(){if(!_||!X)return;const[ge,ue]=E4(J,X,E);m({x:ge,y:ue}),O=requestAnimationFrame(G)}const re={...Z,nodeId:s,type:V,position:Z.position},he=c.get(s);let se={inProgress:!0,isValid:null,from:wc(he,re,mt.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:he,to:J,toHandle:null,toPosition:qC[re.position],toNode:null,pointer:J};function q(){W=!0,y(se),S==null||S(e,{nodeId:s,handleId:r,handleType:V})}j===0&&q();function te(ge){if(!W){const{x:Ve,y:ft}=Xi(ge),Be=Ve-$,wt=ft-F;if(!(Be*Be+wt*wt>j*j))return;q()}if(!z()||!re){le(ge);return}const ue=C();J=Xi(ge,X),P=_1t(Oh(J,ue,!1,[1,1]),t,c,re),H||(G(),H=!0);const Ce=cR(ge,{handle:P,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:o?"target":"source",isValidConnection:v,doc:D,lib:d,flowId:f,nodeLookup:c});Y=Ce.handleDomNode,L=Ce.connection,B=p1t(!!P,Ce.isValid);const Ee=c.get(s),Le=Ee?wc(Ee,re,mt.Left,!0):se.from,Pe={...se,from:Le,isValid:B,to:Ce.toHandle&&B?nd({x:Ce.toHandle.x,y:Ce.toHandle.y},ue):J,toHandle:Ce.toHandle,toPosition:B&&Ce.toHandle?Ce.toHandle.position:qC[re.position],toNode:Ce.toHandle?c.get(Ce.toHandle.nodeId):null,pointer:J};y(Pe),se=Pe}function le(ge){if(!("touches"in ge&&ge.touches.length>0)){if(W){(P||Y)&&L&&B&&(k==null||k(L));const{inProgress:ue,...Ce}=se,Ee={...Ce,toPosition:se.toHandle?se.toPosition:null};b==null||b(ge,Ee),a&&(x==null||x(ge,Ee))}g(),cancelAnimationFrame(O),H=!1,B=!1,L=null,Y=null,D.removeEventListener("mousemove",te),D.removeEventListener("mouseup",le),D.removeEventListener("touchmove",te),D.removeEventListener("touchend",le)}}D.addEventListener("mousemove",te),D.addEventListener("mouseup",le),D.addEventListener("touchmove",te),D.addEventListener("touchend",le)}function cR(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:d=lR,nodeLookup:_}){const f=a==="target",m=n?o.querySelector(`.${l}-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:g,y:S}=Xi(e),k=o.elementFromPoint(g,S),b=k!=null&&k.classList.contains(`${l}-flow__handle`)?k:m,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const x=oR(void 0,b),y=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),z=b.classList.contains("connectable"),E=b.classList.contains("connectableend");if(!y||!x)return v;const j={source:f?y:r,sourceHandle:f?C:s,target:f?r:y,targetHandle:f?s:C};v.connection=j;const D=z&&E&&(t===ed.Strict?f&&x==="source"||!f&&x==="target":y!==r||C!==s);v.isValid=D&&d(j),v.toHandle=aR(y,x,C,_,t,!0)}return v}const J2={onPointerDown:m1t,isValid:cR};function g1t({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=ci(e);function a({translateExtent:l,width:c,height:d,zoomStep:_=1,pannable:f=!0,zoomable:m=!0,inversePan:g=!1}){const S=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),z=y.sourceEvent.ctrlKey&&lh()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*_,j=C[2]*Math.pow(2,E*z);n.scaleTo(j)};let k=[0,0];const b=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},v=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const z=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[z[0]-k[0],z[1]-k[1]];k=z;const j=r()*Math.max(C[2],Math.log(C[2]))*(g?-1:1),A={x:C[0]-E[0]*j,y:C[1]-E[1]*j},D=[[0,0],[c,d]];n.setViewportConstrained({x:A.x,y:A.y,zoom:C[2]},D,l)},x=OM().on("start",b).on("zoom",f?v:null).on("zoom.wheel",m?S:null);s.call(x,{})}function o(){s.on("zoom",null)}return{update:a,destroy:o,pointer:Vi}}const Om=e=>({x:e.x,y:e.y,zoom:e.k}),ab=({x:e,y:n,zoom:t})=>Rm.translate(e,n).scale(t),zu=(e,n)=>e.target.closest(`.${n}`),uR=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),v1t=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ob=(e,n=0,t=v1t,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},dR=e=>{const n=e.ctrlKey&&lh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function b1t({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:d}){return _=>{if(zu(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(_.ctrlKey&&o){const b=Vi(_),v=dR(_),x=f*Math.pow(2,v);r.scaleTo(t,x,b,_);return}const m=_.deltaMode===1?20:1;let g=s===pc.Vertical?0:_.deltaX*m,S=s===pc.Horizontal?0:_.deltaY*m;!lh()&&_.shiftKey&&s!==pc.Vertical&&(g=_.deltaY*m,S=0),r.translateBy(t,-(g/f)*a,-(S/f)*a,{internal:!0});const k=Om(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(_,k),e.panScrollTimeout=setTimeout(()=>{d==null||d(_,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(_,k))}}function x1t({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const a=r.type==="wheel",o=!n&&a&&!r.ctrlKey,l=zu(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),t.call(this,r,s)}}function y1t({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const s=Om(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function w1t({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return a=>{var o,l;e.usedRightMouseButton=!!(t&&uR(n,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),s&&!((l=a.sourceEvent)!=null&&l.internal)&&(s==null||s(a.sourceEvent,Om(a.transform)))}}function S1t({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&uR(n,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Om(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,c)},t?150:0)}}}function k1t({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:d,connectionInProgress:_}){return f=>{var b;const m=e||n,g=t&&f.ctrlKey,S=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(zu(f,`${d}-flow__node`)||zu(f,`${d}-flow__edge`)))return!0;if(!r&&!m&&!s&&!a&&!t||o||_&&!S||zu(f,l)&&S||zu(f,c)&&(!S||s&&S&&!e)||!t&&f.ctrlKey&&S)return!1;if(!t&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!m&&!s&&!g&&S||!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||S)&&k}}function C1t({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),f=OM().scaleExtent([n,t]).translateExtent(r),m=ci(e).call(f);x({x:s.x,y:s.y,zoom:td(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const g=m.on("wheel.zoom"),S=m.on("dblclick.zoom");f.wheelDelta(dR);async function k(P,$){return m?new Promise(F=>{f==null||f.interpolate(($==null?void 0:$.interpolate)==="linear"?Mf:$0).transform(ob(m,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>F(!0)),P)}):!1}function b({noWheelClassName:P,noPanClassName:$,onPaneContextMenu:F,userSelectionActive:V,panOnScroll:X,panOnDrag:W,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:H,zoomOnPinch:L,zoomOnScroll:B,zoomOnDoubleClick:Y,zoomActivationKeyPressed:G,lib:re,onTransformChange:he,connectionInProgress:oe,paneClickDistance:se,selectionOnDrag:q}){V&&!d.isZoomingOrPanning&&v();const te=X&&!G&&!V;f.clickDistance(q?1/0:!Yi(se)||se<0?0:se);const le=te?b1t({zoomPanValues:d,noWheelClassName:P,d3Selection:m,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):x1t({noWheelClassName:P,preventScrolling:H,d3ZoomHandler:g});m.on("wheel.zoom",le,{passive:!1});const ge=y1t({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:o});f.on("start",ge);const ue=w1t({zoomPanValues:d,panOnDrag:W,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:he});f.on("zoom",ue);const Ce=S1t({zoomPanValues:d,panOnDrag:W,panOnScroll:X,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});f.on("end",Ce);const Ee=k1t({zoomActivationKeyPressed:G,panOnDrag:W,zoomOnScroll:B,panOnScroll:X,zoomOnDoubleClick:Y,zoomOnPinch:L,userSelectionActive:V,noPanClassName:$,noWheelClassName:P,lib:re,connectionInProgress:oe});f.filter(Ee),Y?m.on("dblclick.zoom",S):m.on("dblclick.zoom",null)}function v(){f.on("zoom",null)}async function x(P,$,F){const V=ab(P),X=f==null?void 0:f.constrain()(V,$,F);return X&&await k(X),X}async function y(P,$){const F=ab(P);return await k(F,$),F}function C(P){if(m){const $=ab(P),F=m.property("__zoom");(F.k!==P.zoom||F.x!==P.x||F.y!==P.y)&&(f==null||f.transform(m,$,null,{sync:!0}))}}function z(){const P=m?LM(m.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function E(P,$){return m?new Promise(F=>{f==null||f.interpolate(($==null?void 0:$.interpolate)==="linear"?Mf:$0).scaleTo(ob(m,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>F(!0)),P)}):!1}async function j(P,$){return m?new Promise(F=>{f==null||f.interpolate(($==null?void 0:$.interpolate)==="linear"?Mf:$0).scaleBy(ob(m,$==null?void 0:$.duration,$==null?void 0:$.ease,()=>F(!0)),P)}):!1}function A(P){f==null||f.scaleExtent(P)}function D(P){f==null||f.translateExtent(P)}function O(P){const $=!Yi(P)||P<0?0:P;f==null||f.clickDistance($)}return{update:b,destroy:v,setViewport:y,setViewportConstrained:x,getViewport:z,scaleTo:E,scaleBy:j,setScaleExtent:A,setTranslateExtent:D,syncViewport:C,setClickDistance:O}}var rd;(function(e){e.Line="line",e.Handle="handle"})(rd||(rd={}));function E1t({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:a}){const o=e-n,l=t-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&s&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function r9(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 _l(e,n){return Math.max(0,n-e)}function pl(e,n){return Math.max(0,e-n)}function S0(e,n,t){return Math.max(0,n-e,e-t)}function s9(e,n){return e?!n:n}function N1t(e,n,t,r,s,a,o,l){let{affectsX:c,affectsY:d}=n;const{isHorizontal:_,isVertical:f}=n,m=_&&f,{xSnapped:g,ySnapped:S}=t,{minWidth:k,maxWidth:b,minHeight:v,maxHeight:x}=r,{x:y,y:C,width:z,height:E,aspectRatio:j}=e;let A=Math.floor(_?g-e.pointerX:0),D=Math.floor(f?S-e.pointerY:0);const O=z+(c?-A:A),P=E+(d?-D:D),$=-a[0]*z,F=-a[1]*E;let V=S0(O,k,b),X=S0(P,v,x);if(o){let J=0,H=0;c&&A<0?J=_l(y+A+$,o[0][0]):!c&&A>0&&(J=pl(y+O+$,o[1][0])),d&&D<0?H=_l(C+D+F,o[0][1]):!d&&D>0&&(H=pl(C+P+F,o[1][1])),V=Math.max(V,J),X=Math.max(X,H)}if(l){let J=0,H=0;c&&A>0?J=pl(y+A,l[0][0]):!c&&A<0&&(J=_l(y+O,l[1][0])),d&&D>0?H=pl(C+D,l[0][1]):!d&&D<0&&(H=_l(C+P,l[1][1])),V=Math.max(V,J),X=Math.max(X,H)}if(s){if(_){const J=S0(O/j,v,x)*j;if(V=Math.max(V,J),o){let H=0;!c&&!d||c&&!d&&m?H=pl(C+F+O/j,o[1][1])*j:H=_l(C+F+(c?A:-A)/j,o[0][1])*j,V=Math.max(V,H)}if(l){let H=0;!c&&!d||c&&!d&&m?H=_l(C+O/j,l[1][1])*j:H=pl(C+(c?A:-A)/j,l[0][1])*j,V=Math.max(V,H)}}if(f){const J=S0(P*j,k,b)/j;if(X=Math.max(X,J),o){let H=0;!c&&!d||d&&!c&&m?H=pl(y+P*j+$,o[1][0])/j:H=_l(y+(d?D:-D)*j+$,o[0][0])/j,X=Math.max(X,H)}if(l){let H=0;!c&&!d||d&&!c&&m?H=_l(y+P*j,l[1][0])/j:H=pl(y+(d?D:-D)*j,l[0][0])/j,X=Math.max(X,H)}}}D=D+(D<0?X:-X),A=A+(A<0?V:-V),s&&(m?O>P*j?D=(s9(c,d)?-A:A)/j:A=(s9(c,d)?-D:D)*j:_?(D=A/j,d=c):(A=D*j,c=d));const W=c?y+A:y,Z=d?C+D:C;return{width:z+(c?-A:A),height:E+(d?-D:D),x:a[0]*A*(c?-1:1)+W,y:a[1]*D*(d?-1:1)+Z}}const fR={width:0,height:0,x:0,y:0},z1t={...fR,pointerX:0,pointerY:0,aspectRatio:1};function A1t(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=t[0]*a,c=t[1]*o;return[[r-l,s-c],[r+a-l,s+o-c]]}function T1t({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const a=ci(e);let o={controlDirection:r9("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:d,boundaries:_,keepAspectRatio:f,resizeDirection:m,onResizeStart:g,onResize:S,onResizeEnd:k,shouldResize:b}){let v={...fR},x={...z1t};o={boundaries:_,resizeDirection:m,keepAspectRatio:f,controlDirection:r9(d)};let y,C=null,z=[],E,j,A,D=!1;const O=yM().on("start",P=>{const{nodeLookup:$,transform:F,snapGrid:V,snapToGrid:X,nodeOrigin:W,paneDomNode:Z}=t();if(y=$.get(n),!y)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:H}=Rf(P.sourceEvent,{transform:F,snapGrid:V,snapToGrid:X,containerBounds:C});v={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},x={...v,pointerX:J,pointerY:H,aspectRatio:v.width/v.height},E=void 0,j=yc(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=$.get(y.parentId)),E&&y.extent==="parent"&&(j=[[0,0],[E.measured.width,E.measured.height]]),z=[],A=void 0;for(const[L,B]of $)if(B.parentId===n&&(z.push({id:L,position:{...B.position},extent:B.extent}),B.extent==="parent"||B.expandParent)){const Y=A1t(B,y,B.origin??W);A?A=[[Math.min(Y[0][0],A[0][0]),Math.min(Y[0][1],A[0][1])],[Math.max(Y[1][0],A[1][0]),Math.max(Y[1][1],A[1][1])]]:A=Y}g==null||g(P,{...v})}).on("drag",P=>{const{transform:$,snapGrid:F,snapToGrid:V,nodeOrigin:X}=t(),W=Rf(P.sourceEvent,{transform:$,snapGrid:F,snapToGrid:V,containerBounds:C}),Z=[];if(!y)return;const{x:J,y:H,width:L,height:B}=v,Y={},G=y.origin??X,{width:re,height:he,x:oe,y:se}=N1t(x,o.controlDirection,W,o.boundaries,o.keepAspectRatio,G,j,A),q=re!==L,te=he!==B,le=oe!==J&&q,ge=se!==H&&te;if(!le&&!ge&&!q&&!te)return;if((le||ge||G[0]===1||G[1]===1)&&(Y.x=le?oe:v.x,Y.y=ge?se:v.y,v.x=Y.x,v.y=Y.y,z.length>0)){const Le=oe-J,Pe=se-H;for(const Ve of z)Ve.position={x:Ve.position.x-Le+G[0]*(re-L),y:Ve.position.y-Pe+G[1]*(he-B)},Z.push(Ve)}if((q||te)&&(Y.width=q&&(!o.resizeDirection||o.resizeDirection==="horizontal")?re:v.width,Y.height=te&&(!o.resizeDirection||o.resizeDirection==="vertical")?he:v.height,v.width=Y.width,v.height=Y.height),E&&y.expandParent){const Le=G[0]*(Y.width??0);Y.x&&Y.x{D&&(k==null||k(P,{...v}),s==null||s({...v}),D=!1)});a.call(O)}function c(){a.on(".drag",null)}return{update:l,destroy:c}}var lb={exports:{}},cb={},ub={exports:{}},db={};/** +`):F;W(!0),J(null);try{return await AYe(e,K,Ye,{sessionId:r}),Pe.current=Ye,S(xt=>xt&&xt.source==="checkout"?{source:"checkout",file:{...xt.file,content:Ye}}:xt),!0}catch(xt){return J(xt instanceof Error?xt.message:String(xt)),!1}finally{W(!1)}},ft=T&&ge&&!ue,Be=Ppt({projectId:e,filePath:K,sessionId:r,enabled:ft,ready:$!=null&&!$.notFound,source:Ce?F:($==null?void 0:$.content)??""}),wt=Upt({projectId:e,filePath:K,sessionId:r,enabled:ft,savedSource:Ee,dirty:Le,onPulled:M.useCallback(Ye=>{Ye.includes(K)&&C(xt=>xt+1)},[K])}),[At,vt]=M.useState(!1),Ot=((mn=wt.last)==null?void 0:mn.conflicts.length)??0;M.useEffect(()=>{Ot>0&&vt(!0)},[Ot]);const St=wt.error?nwe():Ot>0?hye():wt.blocked?gE():wt.link?mE():Q4e(),kt=wt.error||Ot>0?"text-accent-red":wt.link?"text-accent-green":void 0,xe=T&&Be.showPdf&&Be.compiled!=null,je=Ce&&!(I&&!P)&&!xe,We=Be.compiled?`${W7(e,Be.compiled.path,{sessionId:r})}&v=${Be.compiled.version}`:null,st=We?`${We}&view=${Be.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,nt=Be.compiled?Be.compiled.path.split("/").pop()??Be.compiled.path:null,Ht=async()=>{Le&&!await Ve()||T&&Be.engine&&Be.compile()},bt=async()=>{Le&&await Ht()},[nn,Wt]=M.useState(!1),[pn,Lt]=M.useState(null),En=async()=>{Wt(!0),Lt(null);try{await TYe(e,K,{sessionId:r})}catch(Ye){Lt(Ye instanceof Error?Ye.message:String(Ye))}finally{Wt(!1)}},Ft=`${he(K)}&v=${y}`;M.useEffect(()=>{let Ye=!1;x(!0);const xt=async()=>{const Nt=await mXe(e,n),rt=(Nt==null?void 0:Nt.presentation)==="text"||(Nt==null?void 0:Nt.presentation)==="unknown",Ie=Nt&&rt?await hN(e,n):null,it=Nt===null||rt&&Ie===null;return{path:n,content:(Ie==null?void 0:Ie.content)??"",truncated:(Ie==null?void 0:Ie.truncated)??!1,binary:(Ie==null?void 0:Ie.binary)??(Nt==null?void 0:Nt.presentation)==="download",notFound:it,presentation:Ie?Ie.binary?"download":"text":(Nt==null?void 0:Nt.presentation)??"download"}},Wn=async()=>{for(const Nt of[`artifacts/${n}`,n]){const rt=await V7(e,Nt,{sessionId:r}).catch(()=>null);if(rt&&!rt.notFound)return rt}return null};return(E?NYe(n).then(Nt=>({source:"absolute",file:Nt})):A?xt().then(async Nt=>{if(!Nt.notFound)return{source:"artifact",file:Nt};const rt=await Wn();return rt?{source:"checkout",file:rt}:{source:"artifact",file:Nt}}):V7(e,n,{sessionId:r,ref:s}).then(Nt=>Nt.notFound&&!s?xt().then(rt=>rt.notFound?{source:"checkout",file:Nt}:{source:"artifact",file:rt,checkoutRoot:Nt.root}):{source:"checkout",file:Nt})).then(Nt=>{Ye||(S(Nt),b(null))}).catch(Nt=>{Ye||b(Nt.message)}).finally(()=>{Ye||x(!1)}),()=>{Ye=!0}},[e,n,t,r,s,y]),M.useLayoutEffect(()=>{const Ye=B.current,xt=L.current;!Ye||!$||!xt||(Ye.scrollTop=xt.top,Ye.scrollLeft=xt.left)},[$]);const br=Ye=>{if(Ye.source==="absolute")return jde();if(A)return Sde({root:r?V_():G_()});if(s)return Nde({branch:Ae(s)});if(r&&Ye.source==="checkout"&&Ye.file.root==="clone")return Ufe();const xt=Ye.source==="checkout"?Ye.file.root:Ye.checkoutRoot;return Lde({root:xt==="worktree"?V_():G_()})};return h.jsxs("div",{className:"file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"file-view-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant text-text shrink-0",children:[h.jsx(Vu,{size:13,className:"shrink-0"}),h.jsx("code",{className:"file-view-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:K,children:K}),o&&h.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 shrink-0 [&_svg]:flex-none",title:uO({branch:Ae(o)}),children:[h.jsx(Ip,{size:11}),o]}),je&&(X||Le||Z)&&h.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${Z?"text-accent-red":"text-muted"}`,title:Z??(X?ja():$fe()),children:X?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",hfe()]}):Z?cfe():Lfe()}),T&&Be.compiled&&h.jsx(Jt,{active:!Be.showPdf,"data-tip":Be.stale&&Be.showPdf?Xde():Be.showPdf?zu():l7(),"data-tip-align":"end","aria-label":Be.showPdf?zu():l7(),onClick:()=>Be.setShowPdf(!Be.showPdf),children:Be.showPdf?h.jsx(wb,{size:13}):h.jsx(Vu,{size:13,className:Be.stale?"text-accent-amber":void 0})}),T&&We&&nt&&h.jsx(Fp,{"data-tip":Be.stale?Xue({name:Ae(nt)}):v6({name:Ae(nt)}),"data-tip-align":"end","aria-label":v6({name:Ae(nt)}),href:We,download:nt,children:h.jsx(PWe,{size:13,className:Be.stale?"text-accent-amber":void 0})}),ft&&h.jsx(Jt,{active:At,"data-tip":St,"data-tip-align":"end","aria-label":LI({status:St}),"aria-expanded":At,onClick:()=>vt(Ye=>!Ye),children:wt.syncing?h.jsx(dn,{}):h.jsx(DWe,{size:13,className:kt})}),T&&ge&&h.jsx(Jt,{"data-tip":Be.compiled?a7():r7(),"data-tip-align":"end","aria-label":Be.compiled?a7():r7(),disabled:Be.compiling||!Be.engine,onClick:()=>void Ht(),children:Be.compiling?h.jsx(dn,{}):h.jsx(VWe,{size:13})}),I&&h.jsx(Jt,{active:P,"data-tip":P?X0():zu(),"data-tip-align":"end","aria-label":P?X0():zu(),onClick:()=>H(Ye=>!Ye),children:h.jsx(wb,{size:13})}),ge&&h.jsx(Jt,{"data-tip":pn??i7(),"data-tip-align":"end","aria-label":i7(),disabled:nn,onClick:()=>void En(),children:nn?h.jsx(dn,{}):h.jsx(gc,{size:13})}),h.jsx(Jt,{"data-tip":o7(),"data-tip-align":"end","aria-label":o7(),onClick:()=>C(Ye=>Ye+1),children:v?h.jsx(dn,{}):h.jsx(tN,{size:13})})]}),!k&&le&&(g==null?void 0:g.source)==="checkout"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:$de({root:g.file.root==="worktree"?V_():G_()})}),(Be.error||Be.log)&&h.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:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:`flex-1 min-w-0 text-sm ${Be.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Be.error??(Be.builtWithErrors?xue():hue())}),h.jsx(Jt,{"data-tip":s7(),"data-tip-align":"end","aria-label":$ue(),onClick:Be.dismiss,children:h.jsx(_s,{size:13})})]}),Be.log&&h.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Be.log})]}),ft&&wt.staleOnDisk&&h.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:[h.jsx("span",{className:"flex-1 min-w-0",children:Vde()}),h.jsx(Qe,{onClick:()=>{wt.reloaded(),C(Ye=>Ye+1)},children:Mue()})]}),ft&&wt.error&&h.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4 flex items-start gap-2",children:[h.jsx("span",{className:"flex-1 min-w-0 text-sm text-accent-red whitespace-pre-wrap",children:wt.error}),h.jsx(Jt,{"data-tip":s7(),"data-tip-align":"end","aria-label":Uue(),onClick:wt.dismiss,children:h.jsx(_s,{size:13})})]}),ft&&At&&wt.loaded&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4",children:h.jsx(emt,{overleaf:wt})}),T&&ge&&Be.engine===null&&Be.installHint&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Be.installHint,Be.installCommand&&h.jsx(tmt,{command:Be.installCommand})]}),Be.note&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Be.note}),xe&&Be.stale&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:Nfe()}),h.jsxs("div",{ref:B,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ye=>{const xt={top:Ye.currentTarget.scrollTop,left:Ye.currentTarget.scrollLeft};L.current=xt,d==null||d(xt)},children:[!je&&!k&&!A&&(g==null?void 0:g.source)==="checkout"&&!g.file.notFound&&!s&&r&&g.file.root==="clone"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:jfe()}),!je&&!k&&(g==null?void 0:g.source)==="artifact"&&!g.file.notFound&&te&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:iue({root:g.checkoutRoot==="worktree"?V_():G_()})}),k?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[ede()," ",Ae(k)]}):$===null?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:lE()}):$.notFound?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:g?br(g):bde()}):q?h.jsx(F2,{kind:q,url:Ft,name:n.split("/").pop()??n}):$.binary?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[cue()," ",h.jsx("a",{href:Ft,download:n.split("/").pop()??n,children:oE()})]}):xe&&st&&nt?h.jsx(F2,{kind:"pdf",url:st,name:nt,downloadBar:!1},st):j&&!P?h.jsx("div",{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:re?h.jsx(cM,{projectId:e,folder:G,markdown:$.content}):h.jsx(za,{text:$.content,resolveFilePath:oe,resolveImageSrc:ie,onOpenFile:l&&((Ye,xt,Wn,Kn,Nt)=>l(Ye,r,s,Nt))})}):D&&!P?h.jsx(Qpt,{html:$.content,truncated:$.truncated,url:Ft,name:K,resolveSrc:ie}):je?h.jsx(Gpt,{value:F,onChange:Ye=>{V(Ye),m==null||m(),Z&&J(null)},onSave:()=>void bt(),onBlur:()=>void bt(),path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}):h.jsxs(h.Fragment,{children:[h.jsx(rM,{text:$.content,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}),$.truncated&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:sde()})]})]})]})}const tb=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function rmt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:a,setOpen:o,ref:l}=Ao(),c=M.useRef(null);return M.useEffect(()=>{if(!a)return;const d=_=>{var f;_.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[a]),h.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[h.jsx(Jt,{className:"project-back text-text","aria-label":c7(),onClick:n,children:h.jsx(Bf,{size:18})}),h.jsxs("div",{className:"project-switcher",ref:l,children:[h.jsxs("button",{ref:c,className:`brand${a?" open":""}`,onClick:()=>o(d=>!d),"aria-expanded":a,children:[h.jsxs("span",{className:"brand-project-copy",children:[h.jsx("span",{className:"brand-project-label",children:c_e()}),h.jsx("span",{className:"brand-project",children:e})]}),h.jsx(ta,{className:"project-chevron",size:14})]}),a&&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 project-menu",children:[h.jsx(Yr,{onClick:()=>{o(!1),r()},children:h.jsxs("span",{className:tb,children:[h.jsx(ZE,{size:14}),Qhe()]})}),h.jsx(Yr,{onClick:()=>{o(!1),n()},children:h.jsxs("span",{className:tb,children:[h.jsx(lKe,{size:14}),c7()]})}),h.jsx(Yr,{onClick:()=>{var d;(d=c.current)==null||d.focus(),o(!1),t()},children:h.jsxs("span",{className:tb,children:[h.jsx(QWe,{size:14}),n_e()]})})]})]}),s&&h.jsx(Jt,{"data-tip":u7(),"data-tip-align":"end","aria-label":u7(),onClick:s,children:h.jsx(JE,{size:15})})]})}function CC(){const e=M.useSyncExternalStore(lZe,Z7,Z7);return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":w7()}),!e&&h.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[h.jsx(VE,{size:13,className:"shrink-0 text-accent-amber"}),h.jsx("span",{dir:"auto",className:"min-w-0",children:w7()})]})]})}const EC=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),nh=["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(" "),NC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),bM=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),zC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),smt=[{id:"AI/ML",label:uve},{id:"Biology",label:_ve},{id:"Physics",label:wve},{id:"Other",label:vve}];function imt({onDone:e,preferredAgent:n}){const[t,r]=M.useState(0),[s,a]=M.useState(null),[o,l]=M.useState(),[c,d]=M.useState(!1),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState([]),[x,y]=M.useState(""),[C,A]=M.useState(""),[E,j]=M.useState([]),[T,D]=M.useState(""),[I,P]=M.useState([]),[H,F]=M.useState(!1),V=M.useRef(0),[X,W]=M.useState(!1),[Z,J]=M.useState(!1),B=(s==null?void 0:s.some(q=>q.agentReady))??!1,L=o!=null,$=M.useRef(0),K=(q,te=!1)=>{const le=++$.current;k(!0),W(!1),J(!1),l(void 0);const ge=()=>le===$.current;Promise.allSettled([ep(q,te).then(ue=>ge()&&a(ue)),aN().then(ue=>ge()&&l(ue.gitVersion))]).then(([ue,Ce])=>{ge()&&(ue.status==="rejected"&&(W(!0),a(null)),Ce.status==="rejected"&&(J(!0),l(void 0)))}).finally(()=>ge()&&k(!1))};M.useEffect(()=>K(!1),[]),M.useEffect(()=>{if(s===null)return;const q=s.filter(te=>te.agentReady);g(te=>{var ge;if(te&&q.some(ue=>ue.id===te))return te;const le=n&&q.find(ue=>ue.id===n.harness);return(le==null?void 0:le.id)??((ge=q[0])==null?void 0:ge.id)??null})},[s,n]),M.useEffect(()=>Dx(()=>{ep(!0).then(q=>{a(q),W(!1)}).catch(()=>W(!0))}),[]),M.useEffect(()=>{gXe().then(q=>{v(q.researchAreas),y(q.otherArea??""),A(q.background??""),j(q.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const q=T.trim();if(q.length<3){P([]),F(!1);return}const te=++V.current;F(!0);const le=setTimeout(()=>{oN(q).then(ge=>te===V.current&&P(ge)).catch(()=>te===V.current&&P([])).finally(()=>te===V.current&&F(!1))},350);return()=>clearTimeout(le)},[T]);const G=q=>{const te=E.some(le=>le.paperId===q.paperId);j(le=>le.some(ge=>ge.paperId===q.paperId)?le:[...le,{paperId:q.paperId,title:AC(q.title)}]),D(""),P([]),te||kb(q.paperId).then(le=>{var ue;const ge=(ue=le.title)==null?void 0:ue.trim();ge&&j(Ce=>Ce.map(Ee=>Ee.paperId===q.paperId?{...Ee,title:ge}:Ee))}).catch(()=>{})},re=q=>j(te=>te.filter(le=>le.paperId!==q)),oe=q=>{v(te=>te.includes(q)?te.filter(le=>le!==q):[...te,q])},he=b.length>0&&(!b.includes("Other")||x.trim().length>0),ie=async()=>{const q=s==null?void 0:s.find(le=>le.id===m&&le.agentReady);if(!q||c)return;const te=omt(q);d(!0),f(null);try{const le=await hYe(te,{researchAreas:b,otherArea:b.includes("Other")?x:null,background:C||null,papers:E});e(le.project,le.selection)}catch(le){f(le instanceof Error?le.message:String(le))}finally{d(!1)}};return h.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${t===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:h.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${t===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:t===0?h.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:[h.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[h.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:h.jsx(Y1,{})}),h.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:J1e()})]}),h.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[h.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),h.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:obe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Lxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Bbe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:pxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Ebe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:iye()})]})})]})]}),h.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:h.jsxs(Qe,{variant:"primary",size:"large",onClick:()=>r(1),children:[k7()," ",h.jsx(A0,{size:20})]})})]}):t===1?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(Y1,{}),h.jsx("span",{children:bxe()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Pve()}),h.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:u2e()}),s!==null&&!B&&h.jsx("p",{className:EC,children:oxe()}),s!==null&&B&&m===null&&h.jsx("p",{className:EC,children:Gve()}),h.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:s!==null?s.map(q=>h.jsx(cmt,{h:q,selected:m===q.id,onSelect:()=>g(q.id)},q.id)):X?h.jsx("div",{className:nh,children:E7()}):h.jsxs(vr,{className:"py-2",children:[h.jsx(dn,{})," ",vbe()]})}),(o===null||Z)&&h.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[h.jsx(umt,{gitVersion:o,error:Z}),Z?h.jsx("p",{className:NC,children:E7()}):h.jsx("p",{className:NC,children:Dbe()})]}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(0),children:[h.jsx(Bf,{size:12})," ",S7()]}),(X||Z||o===null||s!==null&&!B)&&h.jsxs(Qe,{variant:"ghost",onClick:()=>K(!0,!0),disabled:S,children:[h.jsx(ld,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",v2e()]}),h.jsx("div",{className:"flex-1"}),h.jsxs(Qe,{variant:"primary",onClick:()=>r(2),disabled:S||!B||m===null||!L,title:S?Zxe():B?m===null?rbe():Z?E2e():o===void 0?Wxe():o===null?Vbe():void 0:rxe(),children:[k7()," ",h.jsx(A0,{size:13})]})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(Y1,{}),h.jsx("span",{children:Sxe()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:Nxe()}),h.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:h.jsxs("div",{className:bM,children:[h.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:[h.jsx("legend",{children:tye()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Jve()}),h.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:smt.map(q=>h.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:[h.jsx("input",{type:"checkbox",checked:b.includes(q.id),onChange:()=>oe(q.id),disabled:c}),h.jsx("span",{children:q.label()})]},q.id))}),b.includes("Other")&&h.jsx("input",{className:"onb-other-area w-full mt-2",value:x,onChange:q=>y(q.target.value),disabled:c,placeholder:jxe(),"aria-label":_2e()})]}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:D2e()}),h.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:C,onChange:q=>A(q.target.value),disabled:c,rows:4,placeholder:wbe()}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:T2e()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:rve()}),h.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[h.jsx("input",{id:"onb-paper-search",value:T,onChange:q=>D(q.target.value),disabled:c,placeholder:P2e()}),H?h.jsx("div",{className:nh,children:G2e()}):I.length>0?h.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:I.map(q=>h.jsxs("button",{type:"button",onClick:()=>G(q),disabled:c,children:[h.jsx(Xf,{children:AC(q.title)}),h.jsx("span",{className:"id",children:q.paperId})]},q.paperId))}):null]}),E.length>0&&h.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:E.map(q=>h.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:[h.jsx(Xf,{children:q.title||q.paperId}),h.jsx("span",{className:"id",children:q.paperId}),h.jsx("button",{type:"button","aria-label":WI({name:Ae(q.paperId)}),onClick:()=>re(q.paperId),disabled:c,children:h.jsx(_s,{size:12})})]},q.paperId))})]})}),!he&&h.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:b.length===0?Yve():_be()}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(1),disabled:c,children:[h.jsx(Bf,{size:12})," ",S7()]}),h.jsx("div",{className:"flex-1"}),h.jsx(Qe,{variant:"primary",onClick:()=>void ie(),disabled:c||m===null||!he,children:c?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",J2e()]}):h.jsxs(h.Fragment,{children:[Tbe()," ",h.jsx(A0,{size:13})]})})]}),m===null&&h.jsx("p",{className:zC,children:cye()}),_&&h.jsx("p",{className:zC,children:_})]})})})}function AC(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function amt(e){return e.agentReady?{tone:"success",label:dxe()}:e.installed?e.installBroken?{tone:"warning",label:Fbe()}:e.authState==="unknown"?{tone:"warning",label:$xe()}:e.authState==="unsupported"?{tone:"warning",label:Uxe()}:e.installed?{tone:"warning",label:a2e()}:{tone:"neutral",label:C7()}:{tone:"neutral",label:C7()}}function omt(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:Hp(e,n).defaultId}}function lmt({harness:e}){return h.jsx(y2,{harness:e,size:26})}function cmt({h:e,selected:n,onSelect:t}){var c;const r=amt(e),s=n?{tone:"success",label:Y2e()}:r,o=[(c=e.version)==null?void 0:c.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(d=>Z0(d)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),l=h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[h.jsx(lmt,{harness:e.id}),h.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),h.jsx(Bx,{tone:s.tone,children:s.label})]});return e.agentReady?h.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[l,h.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??_E(),e.plan?` · ${e.plan}`:""]}),h.jsx("div",{className:`${nh} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:o,children:o})]}):h.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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:[l,h.jsx("div",{className:nh,children:Th(e.agentNote)})]})}function umt({gitVersion:e,error:n}){return h.jsxs("div",{className:bM,children:[h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsx("span",{className:"onb-card-name font-semibold text-base",children:Xbe()}),h.jsx(Bx,{tone:e?"success":n||e===null?"danger":"warning",children:e?w2e():n?Ave():e===null?pE():Rve()})]}),(e||!n&&e===void 0)&&h.jsx("div",{className:nh,children:e??Ive()})]})}function nb(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function dmt(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 fmt(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 hmt(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function _mt({onCreated:e,onCancel:n}){const[t,r]=M.useState("blank"),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(""),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(null),[b,v]=M.useState(!1),[x,y]=M.useState(!1),[C,A]=M.useState(!1),[E,j]=M.useState(null),[T,D]=M.useState(!1),[I,P]=M.useState(!1),[H,F]=M.useState(void 0),[V,X]=M.useState("research-project"),[W,Z]=M.useState(null),[J,B]=M.useState(!1),[L,$]=M.useState(!1),[K,G]=M.useState(""),[re,oe]=M.useState(null),[he,ie]=M.useState([]),[q,te]=M.useState(!1),[le,ge]=M.useState(""),[ue,Ce]=M.useState(0),Ee=M.useRef(0),Le=M.useRef(0),Pe=M.useRef(0),Ve=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),ft=t==="paper"?fmt(re==null?void 0:re.repoUrl):null,Be=s.trim()?`~/OpenResearch/${nb(s,48)}`:"",wt=`~/OpenResearch/${nb(s||(re==null?void 0:re.title)||(re==null?void 0:re.paperId)||"")}`,At=t==="blank"&&!_?Be:t==="paper"&&re&&!_?wt:c,vt=ft??(t==="folder"&&(m!=null&&m.githubOwner)&&m.githubRepo?{owner:m.githubOwner,repo:m.githubRepo}:null);M.useEffect(()=>{mYe().then(({login:Ie})=>F(Ie)).catch(()=>F(null)),jx().then(Ie=>P(Ie.githubForNewProjects)).catch(()=>{})},[]),M.useEffect(()=>{let Ie=!0;B(!0);const it=setTimeout(()=>{gYe(s.trim()).then(({repo:Ut})=>Ie&&X(Ut)).catch(()=>Ie&&X(nb(s,48))).finally(()=>Ie&&B(!1))},150);return()=>{Ie=!1,clearTimeout(it)}},[s]),M.useEffect(()=>{let Ie=!0;if(Z(null),$(!!vt),!!vt)return vYe(vt.owner,vt.repo).then(({canPush:it})=>{Ie&&it&&Z(`github.com/${vt.owner}/${vt.repo}`)}).catch(()=>{}).finally(()=>Ie&&$(!1)),()=>{Ie=!1}},[vt==null?void 0:vt.owner,vt==null?void 0:vt.repo]),M.useEffect(()=>{const Ie=++Le.current,it=At.trim();if(!it){g(null),k(null),v(!1);return}v(!0),k(null);const Ut=setTimeout(()=>{aN(it).then(en=>{Ie===Le.current&&g(en)}).catch(en=>{Ie===Le.current&&(g(null),k(en instanceof Error?en.message:String(en)))}).finally(()=>{Ie===Le.current&&v(!1)})},200);return()=>clearTimeout(Ut)},[t,ue,At]),M.useEffect(()=>{const Ie=++Ee.current;if(t!=="paper"||re){te(!1);return}const it=K.trim(),Ut=dmt(it);if(!Ut&&it.length<3){ie([]),ge(""),te(!1);return}j(null),te(!0),ie([]),ge("");const en=setTimeout(()=>{if(Ut){kb(Ut).then(Mt=>{var Ln;Ie===Ee.current&&(oe(Mt),o||a(((Ln=Mt.title)==null?void 0:Ln.trim())||Mt.paperId))}).catch(Mt=>Ie===Ee.current&&j(Mt instanceof Error?Mt.message:String(Mt))).finally(()=>Ie===Ee.current&&te(!1));return}oN(it).then(Mt=>{Ie===Ee.current&&(ie(Mt),ge(it))}).catch(Mt=>Ie===Ee.current&&j(Mt instanceof Error?Mt.message:String(Mt))).finally(()=>Ie===Ee.current&&te(!1))},350);return()=>clearTimeout(en)},[t,re,K,o]);async function Ot(Ie){var Ut;const it=++Ee.current;te(!0),j(null);try{const en=await kb(Ie);if(it!==Ee.current)return;oe(en),ie([]),o||a(((Ut=en.title)==null?void 0:Ut.trim())||en.paperId)}catch(en){it===Ee.current&&j(en instanceof Error?en.message:String(en))}finally{it===Ee.current&&te(!1)}}function St(){Ee.current+=1,Pe.current+=1,oe(null),G(""),ie([]),ge(""),te(!1),y(!1),d(""),f(!1),Ve.current.paper={name:o?s:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function kt(Ie){if(Ie===t)return;Ee.current+=1,Pe.current+=1,Ve.current[t]={name:s,nameTouched:o,path:c,pathTouched:_};const it=Ve.current[Ie];r(Ie),j(null),k(null),g(null),te(!1),y(!1),a(it.name),l(it.nameTouched),d(it.path),f(it.pathTouched)}async function xe(){if(x)return;const Ie=++Pe.current;y(!0),j(null);try{const it=await _Ye();if(Ie!==Pe.current||!it)return;if(f(!0),g(null),v(!0),d(it),Ce(Ut=>Ut+1),t==="folder"&&!o){const Ut=it.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Ut&&a(Ut)}}catch(it){Ie===Pe.current&&j(it instanceof Error?it.message:String(it))}finally{Ie===Pe.current&&y(!1)}}async function je(Ie){if(Ie.preventDefault(),!!Wn){A(!0),j(null);try{const it=await pYe({name:s.trim(),path:At.trim(),createFolder:t!=="folder",requireNewFolder:t==="blank",initializeGit:!0,githubSyncEnabled:I,locale:N(),...t==="paper"&&re?{paperId:re.paperId,cloneUrl:re.repoUrl??void 0}:{}});e(it.project,it.githubPublicationError)}catch(it){j(it instanceof Error?it.message:String(it))}finally{A(!1)}}}const We=s.trim(),st=t==="paper"&&re&&!re.repoUrl?re.paperId:null,nt=t==="folder"&&(m==null?void 0:m.gitState)==="ready"?m.resolvedPath??null:null,Ht=We!==""&&(t==="blank"||st!==null||nt!==null);M.useEffect(()=>{if(!Ht)return;const Ie=window.setTimeout(()=>{bYe({name:We,paperId:st??void 0,path:nt??void 0,locale:N()}).catch(()=>{})},1200);return()=>window.clearTimeout(Ie)},[Ht,We,st,nt]);const bt=(m==null?void 0:m.gitVersion)===null,nn=t==="folder"&&!!At.trim()&&m!==null&&m.exists===!1,Wt=t==="blank"&&(m==null?void 0:m.exists)===!0,pn=!!At.trim()&&(m==null?void 0:m.exists)===!0&&m.directory===!1,Lt=t==="paper"&&!!(re!=null&&re.repoUrl)&&(m==null?void 0:m.empty)===!1,En=t==="paper"&&!!re&&!(re!=null&&re.repoUrl)&&(m==null?void 0:m.empty)===!1,Ft=t==="folder"&&((m==null?void 0:m.gitState)==="detached"||(m==null?void 0:m.gitState)==="invalid"),br=_&&!At.trim()||pn||Lt||En,mn=_&&!At.trim()||pn||Wt,Ye=_&&!At.trim()?y7():pn?m7():Wt?Lme():null,xt=_&&!At.trim()?y7():pn?m7():Lt?T1e():En?nme():null,Wn=!!(s.trim()&&At.trim())&&!C&&!x&&!b&&m!==null&&!S&&!bt&&!nn&&!Wt&&!pn&&!Lt&&!En&&!Ft&&(t!=="paper"||!!re)&&(!I||typeof H=="string"&&!J&&!L),Kn=W??`github.com/${H??"you"}/${V}`,Nt=H===void 0||J||L,rt=t==="paper"&&!re&&K.trim().length>=3&&le===K.trim()&&!q&&he.length===0&&!E;return h.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:je,children:[h.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:[h.jsx("button",{type:"button",className:t==="blank"?"active":"","aria-pressed":t==="blank",onClick:()=>kt("blank"),children:$me()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="paper"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="folder"?"active":"","aria-pressed":t==="folder",onClick:()=>kt("folder"),children:lge()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="blank"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="paper"?"active":"","aria-pressed":t==="paper",onClick:()=>kt("paper"),children:mge()})]}),t==="paper"&&!re&&h.jsxs("label",{className:"!font-normal",children:[$ge(),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:K,onChange:Ie=>{j(null),ge(""),G(Ie.target.value)},placeholder:Yge()}),!rt&&h.jsx("span",{className:"repo-hint",children:q?F1e():D1e()}),rt&&h.jsx("span",{className:"project-path-notice block",children:Nge()}),he.length>0&&h.jsx("div",{className:"paper-results",children:he.map(Ie=>h.jsxs("button",{type:"button",onClick:()=>void Ot(Ie.paperId),children:[h.jsx(Xf,{children:Ie.title}),h.jsx("span",{className:"id",children:Ie.paperId})]},Ie.paperId))})]}),re&&t==="paper"&&h.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[h.jsxs("div",{className:"meta",children:[h.jsx(Xf,{className:"block",children:re.title||re.paperId}),re.repoUrl&&h.jsx("div",{className:"id",children:hmt(re.repoUrl)})]}),h.jsx(Qe,{size:"small",type:"button","aria-label":Zme(),onClick:St,children:Wme()})]}),!re.repoUrl&&h.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:[h.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[h.jsx(VE,{size:16})," ",jge()]}),h.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Lge()})]})]}),(t!=="paper"||re)&&h.jsxs(h.Fragment,{children:[t==="blank"&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:x7()}),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:v7()})]}),t==="paper"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:re!=null&&re.repoUrl?gme():b7()}),h.jsx("input",{className:"text-sm font-normal",value:At,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},"aria-describedby":br?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g7()}),br&&h.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:xt})]}):t==="folder"?h.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":c?ame({path:Ae(c)}):_7(),disabled:x,title:c||void 0,onClick:()=>void xe(),children:[h.jsx($f,{className:c?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),h.jsx("span",{className:c?"text-sm":"placeholder",children:x?hme():c||_7()}),h.jsx(Ma,{className:"folder-picker-chevron",size:15})]}):s.trim()?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:b7()}),h.jsx("input",{className:"text-sm font-normal",value:At,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":mn?"blank-destination-description":void 0,spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g7()}),mn&&h.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Ye})]}):null,t!=="blank"&&At&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:x7()}),h.jsx("input",{className:"text-sm font-normal",value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:v7()})]}),bt&&h.jsx("div",{className:"project-path-notice error",children:xge()}),!bt&&t==="folder"&&c.trim()&&!b&&(m==null?void 0:m.exists)===!1&&h.jsx("div",{className:"project-path-notice error",children:r1e()}),!bt&&t==="folder"&&c.trim()&&!b&&pn&&h.jsx("div",{className:"project-path-notice error",children:d1e()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="detached"&&h.jsx("div",{className:"project-path-notice error",children:tge()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="invalid"&&h.jsx("div",{className:"project-path-notice error",children:o1e()}),S&&h.jsx("div",{className:"project-path-notice error",role:"alert",children:S})]}),E&&h.jsx("div",{className:"error",role:"alert",children:E}),(t!=="paper"||re)&&At&&(t!=="blank"||s.trim())&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[h.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${I&&H===null?" text-accent-red":" text-text"}`,"aria-expanded":T,"aria-controls":"new-project-advanced-settings",onClick:()=>D(Ie=>!Ie),children:[I?H===null?Kpe():Qpe():qpe(),h.jsx(ta,{className:T?"rotate-180":"",size:16})]}),T&&h.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[h.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[h.jsx("input",{className:"m-0",type:"checkbox",checked:I,onChange:Ie=>P(Ie.target.checked),disabled:C}),h.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Jge()})]}),h.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[h.jsx("span",{children:Nt?p1e({repository:Ae(Kn)}):W?S1e({repository:Ae(Kn)}):b1e({repository:Ae(Kn)})}),h.jsx("span",{children:fge()}),H===null&&h.jsx("span",{children:B1e({command:Ae("gh auth login")})})]})]})]}),h.jsxs("div",{className:"actions new-project-actions",children:[n&&h.jsx(Qe,{type:"button",onClick:n,children:Ume()}),h.jsx(Qe,{variant:"primary",className:"ms-auto",disabled:!Wn,children:C?zme():t==="paper"?re!=null&&re.repoUrl?yme():p7():t==="folder"?V1e():p7()})]})]})}function xM({onClose:e,onCreated:n}){const t=M.useRef(null),r=M.useRef(e);return r.current=e,M.useEffect(()=>{const s=t.current;if(!s)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...s.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(s.querySelector("[data-initial-focus]")??o()[0]??s).focus();const l=c=>{if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&!c.altKey&&c.shiftKey){c.preventDefault(),c.stopPropagation();return}if(c.key!=="Tab")return;const d=o();if(d.length===0){c.preventDefault(),s.focus();return}const _=d[0],f=d[d.length-1];c.shiftKey&&document.activeElement===_?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),_.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),h.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:s=>{s.target===s.currentTarget&&e()},children:h.jsxs("div",{ref:t,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:[h.jsx("h2",{id:"new-project-dialog-title",children:vE()}),h.jsx(_mt,{onCancel:e,onCreated:n})]})})}function pmt({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const a=M.useRef(null),o=M.useRef(r),l=M.useRef(n);o.current=r,l.current=n,M.useEffect(()=>{const d=a.current;if(!d)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...d.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??d).focus();const m=g=>{if(g.key==="Escape"){g.preventDefault(),l.current||o.current();return}if(g.key!=="Tab")return;const S=f();if(S.length===0){g.preventDefault(),d.focus();return}const k=S[0],b=S[S.length-1];g.shiftKey&&document.activeElement===k?(g.preventDefault(),b.focus()):!g.shiftKey&&document.activeElement===b&&(g.preventDefault(),k.focus())};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0),_==null||_.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:d=>{!n&&d.target===d.currentTarget&&r()},children:h.jsxs("div",{ref:a,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:[h.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:U5e()}),h.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[h.jsx("p",{className:"m-0",children:k5e({name:Ca(e.name)})}),h.jsx("p",{className:"m-0",children:c?s3e():l3e()}),t&&h.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx(Qe,{disabled:n,onClick:r,children:L5e()}),h.jsx(Qe,{variant:"danger",disabled:n,onClick:s,children:n?Z5e():W5e()})]})]})})}function TC(){return h.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 jC({projects:e,onOpen:n,onCreated:t,onDeleted:r}){const[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState({}),S=M.useRef(0),k=e.map(v=>v.id).join("\0");M.useEffect(()=>{let v=!0,x=null;const y=()=>{x=null;const E=++S.current;dYe().then(j=>{!v||E!==S.current||g(Object.fromEntries(j.map(T=>[T.projectId,T])))}).catch(()=>{})},C=()=>{x===null&&(x=setTimeout(y,100))};y();const A=sZe(C);return()=>{v=!1,A(),x!==null&&clearTimeout(x)}},[k]);async function b(v){l(v.id),d(null);try{await wYe(v.id),d(null),f(null),r(v.id)}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(null)}}return h.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[h.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",children:[h.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:[h.jsx("h2",{children:S3e()}),h.jsxs(Qe,{onClick:()=>a(!0),children:[h.jsx(Ex,{size:15})," ",vE()]})]}),h.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:h.jsxs("div",{children:[h.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:[h.jsx("span",{children:b3e()}),h.jsx("span",{children:z7()}),h.jsx("span",{children:A7()}),h.jsx("span",{children:T7()})]}),e.length===0?h.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:p3e()}):[...e].sort((v,x)=>{var A,E;const y=((A=m[v.id])==null?void 0:A.lastMessageAt)??v.createdAt;return(((E=m[x.id])==null?void 0:E.lastMessageAt)??x.createdAt)-y||v.name.localeCompare(x.name)}).map(v=>{const x=m[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,C=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):D3e(),A=x?x.activeAgents>0?m5e({count:Vt(x.activeAgents)}):T3e():"—",E=x?x.totalAgents===1?B3e():x5e({count:Vt(x.totalAgents)}):"—",j=x?x.runningExperiments>0?F3e({count:Vt(x.runningExperiments)}):x.totalExperiments===0?fx():j7({count:Vt(x.totalExperiments)}):"—",T=x&&x.runningExperiments>0?j7({count:Vt(x.totalExperiments)}):null;return h.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:[h.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":xI({name:Ca(v.name)}),onClick:()=>n(v.id)}),h.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:[h.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),h.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[h.jsxs("span",{children:[$5e()," ",Na(v.createdAt)]}),v.paperId&&h.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&h.jsxs("span",{children:[j5e()," ",Ae(v.paperId)]}),h.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":bb({name:Ca(v.name)}),disabled:o===v.id,onClick:D=>{D.stopPropagation(),d(null),f(v)},children:h.jsx(cd,{size:14})})]})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:z7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.activeAgents>0&&h.jsx(TC,{}),A]}),h.jsx("span",{className:"text-xs text-muted",children:E})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:A7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.runningExperiments>0&&h.jsx(TC,{}),j]}),T&&h.jsx("span",{className:"text-xs text-muted",children:T})]}),h.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[h.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:T7()}),y?h.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":K0({name:Ca(v.name)}),children:[h.jsx("span",{className:"inline-flex shrink-0",children:h.jsx(fm,{size:14})}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ae(C)})]}):h.jsx("span",{className:"text-sm text-text pointer-events-none",children:C})]})]},v.id)})]})})]}),s&&h.jsx(xM,{onClose:()=>a(!1),onCreated:(v,x)=>{a(!1),t(v,x)}}),_&&h.jsx(pmt,{project:_,deleting:o===_.id,error:c,onClose:()=>{d(null),f(null)},onConfirm:()=>void b(_)})]})}function mmt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:a,onCancel:o}){const[l,c]=M.useState(new Set),[d,_]=M.useState(null),f=new Map;for(const S of e){const k=f.get(S.experimentId);k?k.push(S):f.set(S.experimentId,[S])}for(const S of f.values())S.sort((k,b)=>b.createdAt-k.createdAt);const m=[...n].sort((S,k)=>{var x,y,C,A;const b=((y=(x=f.get(S.id))==null?void 0:x[0])==null?void 0:y.createdAt)??S.createdAt;return(((A=(C=f.get(k.id))==null?void 0:C[0])==null?void 0:A.createdAt)??k.createdAt)-b});if(m.length===0)return h.jsx("div",{className:"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]: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 experiments-empty-state [&_p]:text-2xl",children:h.jsx("p",{children:t??pce()})});async function g(S){_(null),c(k=>new Set(k).add(S));try{await o(S)}catch(k){c(b=>{const v=new Set(b);return v.delete(S),v}),_(k instanceof Error?k.message:String(k))}}return h.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[d&&h.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[tue()," ",d]}),h.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":Wce(),children:m.map(S=>{const k=f.get(S.id)??[],b=k[0]??null,v=k.find(A=>A.status==="running"||A.status==="starting"),x=v??b,y=!!(v&&(v.cancelRequested||l.has(v.id))),C=v?y?"cancelling":Di(v):b?Di(b):"idle";return h.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:()=>r(S,"preview"),onDoubleClick:()=>r(S,"keepOpen"),onAuxClick:A=>{A.button===1&&(A.preventDefault(),r(S,"keepOpen"))},children:[h.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[h.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...gr(A=>r(S,A),{stopPropagation:!0}),children:S.title||S.slug}),h.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:S.branchName,children:[h.jsx(Ip,{size:14,"aria-hidden":"true"}),h.jsx("code",{children:S.branchName})]})]}),h.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:[h.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:h.jsx(xo,{status:C})}),h.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:h.jsx("span",{children:k.length===1?Sce():jce({count:Vt(k.length)})})}),h.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:h.jsx("span",{children:b?Na(b.createdAt):bce()})})]}),h.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":nO({name:S.title||S.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[h.jsxs(Qe,{size:"small",disabled:!x,title:x?Nce():dce(),...gr(A=>{x&&s(S.id,x.id,A)},{stopPropagation:!0}),children:[h.jsx(Wu,{size:15}),Zce()]}),h.jsxs(Qe,{size:"small",title:Y9({branch:Ae(S.branchName)}),...gr(A=>a(S.id,A),{stopPropagation:!0}),children:[h.jsx(Op,{size:15}),Uce()]}),v&&h.jsxs(Qe,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?Lce():$ce(),onClick:()=>void g(v.id),children:[h.jsx(WE,{size:15}),y?xse():iE()]})]})]},S.id)})})]})}function gmt({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,a]=M.useState(null),o=M.useRef(null),l=M.useCallback(c=>{t||(r(!0),a(null),c().catch(()=>a(dqe())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const c=d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),l(e))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,l]),M.useEffect(()=>{const c=o.current;if(!c)return;const d=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??c).focus();const f=m=>{if(m.key!=="Tab")return;const g=_();if(g.length===0){m.preventDefault(),c.focus();return}const S=g[0],k=g[g.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),k.focus()):!m.shiftKey&&document.activeElement===k&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),d==null||d.focus()}},[]),Up.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:h.jsxs("div",{ref:o,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:[h.jsx(Jt,{className:"absolute end-3.5 top-3.5","aria-label":PUe(),onClick:()=>l(e),disabled:t,children:h.jsx(_s,{size:16})}),h.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[h.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:h.jsx(Rx,{})}),h.jsxs("div",{children:[h.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:YUe()}),h.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:bqe()})]})]}),h.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[h.jsxs("p",{dir:"auto",children:[pqe()," ",h.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:oqe()}),IUe()]}),h.jsx("p",{dir:"auto",children:rqe()})]}),s&&h.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),h.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[h.jsx(Qe,{onClick:()=>l(n),disabled:t,children:GUe()}),h.jsx(Qe,{variant:"primary",onClick:()=>l(e),disabled:t,children:t?ja():JUe()})]})]})}),document.body)}function Rr(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function jm(){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}})}$0.prototype=jm.prototype={constructor:$0,on:function(e,n){var t=this._,r=bmt(e+"",t),s,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(s),r=0,s,a;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),RC.hasOwnProperty(n)?{space:RC[n],local:e}:e}function ymt(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===q2&&n.documentElement.namespaceURI===q2?n.createElement(e):n.createElementNS(t,e)}}function wmt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function yM(e){var n=Mm(e);return(n.local?wmt:ymt)(n)}function Smt(){}function w4(e){return e==null?Smt:function(){return this.querySelector(e)}}function kmt(e){typeof e!="function"&&(e=w4(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=x+1);!(A=b[y])&&++y=0;)(o=r[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ymt(e){e||(e=Xmt);function n(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var t=this._groups,r=t.length,s=new Array(r),a=0;an?1:e>=n?0:NaN}function Zmt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Qmt(){return Array.from(this)}function Jmt(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?ugt:typeof n=="function"?fgt:dgt)(e,n,t??"")):nd(this.node(),e)}function nd(e,n){return e.style.getPropertyValue(n)||EM(e).getComputedStyle(e,null).getPropertyValue(n)}function _gt(e){return function(){delete this[e]}}function pgt(e,n){return function(){this[e]=n}}function mgt(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function ggt(e,n){return arguments.length>1?this.each((n==null?_gt:typeof n=="function"?mgt:pgt)(e,n)):this.node()[e]}function NM(e){return e.trim().split(/^|\s+/)}function S4(e){return e.classList||new zM(e)}function zM(e){this._node=e,this._names=NM(e.getAttribute("class")||"")}zM.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 AM(e,n){for(var t=S4(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function Ggt(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,a;t()=>e;function G2(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:a,x:o,y:l,dx:c,dy:d,dispatch:_}){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:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:_}})}G2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function t1t(e){return!e.ctrlKey&&!e.button}function n1t(){return this.parentNode}function r1t(e,n){return n??{x:e.x,y:e.y}}function s1t(){return navigator.maxTouchPoints||"ontouchstart"in this}function LM(){var e=t1t,n=n1t,t=r1t,r=s1t,s={},a=jm("start","drag","end"),o=0,l,c,d,_,f=0;function m(C){C.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,e1t).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,A){if(!(_||!e.call(this,C,A))){var E=y(this,n.call(this,C,A),C,A,"mouse");E&&(di(C.view).on("mousemove.drag",S,rh).on("mouseup.drag",k,rh),RM(C.view),rb(C),d=!1,l=C.clientX,c=C.clientY,E("start",C))}}function S(C){if(Hu(C),!d){var A=C.clientX-l,E=C.clientY-c;d=A*A+E*E>f}s.mouse("drag",C)}function k(C){di(C.view).on("mousemove.drag mouseup.drag",null),DM(C.view,d),Hu(C),s.mouse("end",C)}function b(C,A){if(e.call(this,C,A)){var E=C.changedTouches,j=n.call(this,C,A),T=E.length,D,I;for(D=0;D>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?b0(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?b0(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=a1t.exec(e))?new Vs(n[1],n[2],n[3],1):(n=o1t.exec(e))?new Vs(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=l1t.exec(e))?b0(n[1],n[2],n[3],n[4]):(n=c1t.exec(e))?b0(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=u1t.exec(e))?HC(n[1],n[2]/100,n[3]/100,1):(n=d1t.exec(e))?HC(n[1],n[2]/100,n[3]/100,n[4]):DC.hasOwnProperty(e)?IC(DC[e]):e==="transparent"?new Vs(NaN,NaN,NaN,0):null}function IC(e){return new Vs(e>>16&255,e>>8&255,e&255,1)}function b0(e,n,t,r){return r<=0&&(e=n=t=NaN),new Vs(e,n,t,r)}function _1t(e){return e instanceof Dh||(e=bc(e)),e?(e=e.rgb(),new Vs(e.r,e.g,e.b,e.opacity)):new Vs}function V2(e,n,t,r){return arguments.length===1?_1t(e):new Vs(e,n,t,r??1)}function Vs(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}k4(Vs,V2,OM(Dh,{brighter(e){return e=e==null?yp:Math.pow(yp,e),new Vs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sh:Math.pow(sh,e),new Vs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vs(pc(this.r),pc(this.g),pc(this.b),wp(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:BC,formatHex:BC,formatHex8:p1t,formatRgb:$C,toString:$C}));function BC(){return`#${cc(this.r)}${cc(this.g)}${cc(this.b)}`}function p1t(){return`#${cc(this.r)}${cc(this.g)}${cc(this.b)}${cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function $C(){const e=wp(this.opacity);return`${e===1?"rgb(":"rgba("}${pc(this.r)}, ${pc(this.g)}, ${pc(this.b)}${e===1?")":`, ${e})`}`}function wp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cc(e){return e=pc(e),(e<16?"0":"")+e.toString(16)}function HC(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ki(e,n,t,r)}function IM(e){if(e instanceof Ki)return new Ki(e.h,e.s,e.l,e.opacity);if(e instanceof Dh||(e=bc(e)),!e)return new Ki;if(e instanceof Ki)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),a=Math.max(n,t,r),o=NaN,l=a-s,c=(a+s)/2;return l?(n===a?o=(t-r)/l+(t0&&c<1?0:o,new Ki(o,l,c,e.opacity)}function m1t(e,n,t,r){return arguments.length===1?IM(e):new Ki(e,n,t,r??1)}function Ki(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}k4(Ki,m1t,OM(Dh,{brighter(e){return e=e==null?yp:Math.pow(yp,e),new Ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sh:Math.pow(sh,e),new Ki(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 Vs(sb(e>=240?e-240:e+120,s,r),sb(e,s,r),sb(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ki(PC(this.h),x0(this.s),x0(this.l),wp(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=wp(this.opacity);return`${e===1?"hsl(":"hsla("}${PC(this.h)}, ${x0(this.s)*100}%, ${x0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PC(e){return e=(e||0)%360,e<0?e+360:e}function x0(e){return Math.max(0,Math.min(1,e||0))}function sb(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 C4=e=>()=>e;function g1t(e,n){return function(t){return e+t*n}}function v1t(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 b1t(e){return(e=+e)==1?BM:function(n,t){return t-n?v1t(n,t,e):C4(isNaN(n)?t:n)}}function BM(e,n){var t=n-e;return t?g1t(e,t):C4(isNaN(e)?n:e)}const Sp=(function e(n){var t=b1t(n);function r(s,a){var o=t((s=V2(s)).r,(a=V2(a)).r),l=t(s.g,a.g),c=t(s.b,a.b),d=BM(s.opacity,a.opacity);return function(_){return s.r=o(_),s.g=l(_),s.b=c(_),s.opacity=d(_),s+""}}return r.gamma=e,r})(1);function x1t(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(a){for(s=0;st&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:wa(r,s)})),t=ib.lastIndex;return t180?_+=360:_-d>180&&(d+=360),m.push({i:f.push(s(f)+"rotate(",null,r)-2,x:wa(d,_)})):_&&f.push(s(f)+"rotate("+_+r)}function l(d,_,f,m){d!==_?m.push({i:f.push(s(f)+"skewX(",null,r)-2,x:wa(d,_)}):_&&f.push(s(f)+"skewX("+_+r)}function c(d,_,f,m,g,S){if(d!==f||_!==m){var k=g.push(s(g)+"scale(",null,",",null,")");S.push({i:k-4,x:wa(d,f)},{i:k-2,x:wa(_,m)})}else(f!==1||m!==1)&&g.push(s(g)+"scale("+f+","+m+")")}return function(d,_){var f=[],m=[];return d=e(d),_=e(_),a(d.translateX,d.translateY,_.translateX,_.translateY,f,m),o(d.rotate,_.rotate,f,m),l(d.skewX,_.skewX,f,m),c(d.scaleX,d.scaleY,_.scaleX,_.scaleY,f,m),d=_=null,function(g){for(var S=-1,k=m.length,b;++S=0&&e._call.call(void 0,n),e=e._next;--rd}function qC(){xc=(Cp=ah.now())+Rm,rd=Cf=0;try{L1t()}finally{rd=0,I1t(),xc=0}}function O1t(){var e=ah.now(),n=e-Cp;n>FM&&(Rm-=n,Cp=e)}function I1t(){for(var e,n=kp,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:kp=t);Ef=e,Y2(r)}function Y2(e){if(!rd){Cf&&(Cf=clearTimeout(Cf));var n=e-xc;n>24?(e<1/0&&(Cf=setTimeout(qC,e-ah.now()-Rm)),gf&&(gf=clearInterval(gf))):(gf||(Cp=ah.now(),gf=setInterval(O1t,FM)),rd=1,UM(qC))}}function GC(e,n,t){var r=new Ep;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var B1t=jm("start","end","cancel","interrupt"),$1t=[],GM=0,VC=1,X2=2,P0=3,WC=4,Z2=5,F0=6;function Dm(e,n,t,r,s,a){var o=e.__transition;if(!o)e.__transition={};else if(t in o)return;H1t(e,t,{name:n,index:r,group:s,on:B1t,tween:$1t,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:GM})}function N4(e,n){var t=na(e,n);if(t.state>GM)throw new Error("too late; already scheduled");return t}function Ba(e,n){var t=na(e,n);if(t.state>P0)throw new Error("too late; already running");return t}function na(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function H1t(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=qM(a,0,t.time);function a(d){t.state=VC,t.timer.restart(o,t.delay,t.time),t.delay<=d&&o(d-t.delay)}function o(d){var _,f,m,g;if(t.state!==VC)return c();for(_ in r)if(g=r[_],g.name===t.name){if(g.state===P0)return GC(o);g.state===WC?(g.state=F0,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[_]):+_X2&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function mvt(e,n,t){var r,s,a=pvt(n)?N4:Ba;return function(){var o=a(this,e),l=o.on;l!==r&&(s=(r=l).copy()).on(n,t),o.on=s}}function gvt(e,n){var t=this._id;return arguments.length<2?na(this.node(),t).on.on(e):this.each(mvt(t,e,n))}function vvt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function bvt(){return this.on("end.remove",vvt(this._id))}function xvt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=w4(e));for(var r=this._groups,s=r.length,a=new Array(s),o=0;o()=>e;function Gvt(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 vo(e,n,t){this.k=e,this.x=n,this.y=t}vo.prototype={constructor:vo,scale:function(e){return e===1?this:new vo(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new vo(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 Lm=new vo(1,0,0);YM.prototype=vo.prototype;function YM(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Lm;return e.__zoom}function ab(e){e.stopImmediatePropagation()}function vf(e){e.preventDefault(),e.stopImmediatePropagation()}function Vvt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Wvt(){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 KC(){return this.__zoom||Lm}function Kvt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Yvt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xvt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],a=e.invertY(n[0][1])-t[0][1],o=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function XM(){var e=Vvt,n=Wvt,t=Xvt,r=Kvt,s=Yvt,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=H0,d=jm("start","zoom","end"),_,f,m,g=500,S=150,k=0,b=10;function v(V){V.property("__zoom",KC).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",I).filter(s).on("touchstart.zoom",P).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(V,X,W,Z){var J=V.selection?V.selection():V;J.property("__zoom",KC),V!==J?A(V,X,W,Z):J.interrupt().each(function(){E(this,arguments).event(Z).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},v.scaleBy=function(V,X,W,Z){v.scaleTo(V,function(){var J=this.__zoom.k,B=typeof X=="function"?X.apply(this,arguments):X;return J*B},W,Z)},v.scaleTo=function(V,X,W,Z){v.transform(V,function(){var J=n.apply(this,arguments),B=this.__zoom,L=W==null?C(J):typeof W=="function"?W.apply(this,arguments):W,$=B.invert(L),K=typeof X=="function"?X.apply(this,arguments):X;return t(y(x(B,K),L,$),J,o)},W,Z)},v.translateBy=function(V,X,W,Z){v.transform(V,function(){return t(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof W=="function"?W.apply(this,arguments):W),n.apply(this,arguments),o)},null,Z)},v.translateTo=function(V,X,W,Z,J){v.transform(V,function(){var B=n.apply(this,arguments),L=this.__zoom,$=Z==null?C(B):typeof Z=="function"?Z.apply(this,arguments):Z;return t(Lm.translate($[0],$[1]).scale(L.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof W=="function"?-W.apply(this,arguments):-W),B,o)},Z,J)};function x(V,X){return X=Math.max(a[0],Math.min(a[1],X)),X===V.k?V:new vo(X,V.x,V.y)}function y(V,X,W){var Z=X[0]-W[0]*V.k,J=X[1]-W[1]*V.k;return Z===V.x&&J===V.y?V:new vo(V.k,Z,J)}function C(V){return[(+V[0][0]+ +V[1][0])/2,(+V[0][1]+ +V[1][1])/2]}function A(V,X,W,Z){V.on("start.zoom",function(){E(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,B=arguments,L=E(J,B).event(Z),$=n.apply(J,B),K=W==null?C($):typeof W=="function"?W.apply(J,B):W,G=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),re=J.__zoom,oe=typeof X=="function"?X.apply(J,B):X,he=c(re.invert(K).concat(G/re.k),oe.invert(K).concat(G/oe.k));return function(ie){if(ie===1)ie=oe;else{var q=he(ie),te=G/q[2];ie=new vo(te,K[0]-q[0]*te,K[1]-q[1]*te)}L.zoom(null,ie)}})}function E(V,X,W){return!W&&V.__zooming||new j(V,X)}function j(V,X){this.that=V,this.args=X,this.active=0,this.sourceEvent=null,this.extent=n.apply(V,X),this.taps=0}j.prototype={event:function(V){return V&&(this.sourceEvent=V),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(V,X){return this.mouse&&V!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&V!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&V!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(V){var X=di(this.that).datum();d.call(V,this.that,new Gvt(V,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:d}),X)}};function T(V,...X){if(!e.apply(this,arguments))return;var W=E(this,X).event(V),Z=this.__zoom,J=Math.max(a[0],Math.min(a[1],Z.k*Math.pow(2,r.apply(this,arguments)))),B=Vi(V);if(W.wheel)(W.mouse[0][0]!==B[0]||W.mouse[0][1]!==B[1])&&(W.mouse[1]=Z.invert(W.mouse[0]=B)),clearTimeout(W.wheel);else{if(Z.k===J)return;W.mouse=[B,Z.invert(B)],U0(this),W.start()}vf(V),W.wheel=setTimeout(L,S),W.zoom("mouse",t(y(x(Z,J),W.mouse[0],W.mouse[1]),W.extent,o));function L(){W.wheel=null,W.end()}}function D(V,...X){if(m||!e.apply(this,arguments))return;var W=V.currentTarget,Z=E(this,X,!0).event(V),J=di(V.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",G,!0),B=Vi(V,W),L=V.clientX,$=V.clientY;RM(V.view),ab(V),Z.mouse=[B,this.__zoom.invert(B)],U0(this),Z.start();function K(re){if(vf(re),!Z.moved){var oe=re.clientX-L,he=re.clientY-$;Z.moved=oe*oe+he*he>k}Z.event(re).zoom("mouse",t(y(Z.that.__zoom,Z.mouse[0]=Vi(re,W),Z.mouse[1]),Z.extent,o))}function G(re){J.on("mousemove.zoom mouseup.zoom",null),DM(re.view,Z.moved),vf(re),Z.event(re).end()}}function I(V,...X){if(e.apply(this,arguments)){var W=this.__zoom,Z=Vi(V.changedTouches?V.changedTouches[0]:V,this),J=W.invert(Z),B=W.k*(V.shiftKey?.5:2),L=t(y(x(W,B),Z,J),n.apply(this,X),o);vf(V),l>0?di(this).transition().duration(l).call(A,L,Z,V):di(this).call(v.transform,L,Z,V)}}function P(V,...X){if(e.apply(this,arguments)){var W=V.touches,Z=W.length,J=E(this,X,V.changedTouches.length===Z).event(V),B,L,$,K;for(ab(V),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.`},oh=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ZM=["Enter"," ","Escape"],QM={"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 sd;(function(e){e.Strict="strict",e.Loose="loose"})(sd||(sd={}));var mc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(mc||(mc={}));var lh;(function(e){e.Partial="partial",e.Full="full"})(lh||(lh={}));const JM={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var pl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(pl||(pl={}));var Np;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Np||(Np={}));var mt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(mt||(mt={}));const YC={[mt.Left]:mt.Right,[mt.Right]:mt.Left,[mt.Top]:mt.Bottom,[mt.Bottom]:mt.Top};function eR(e){return e===null?null:e?"valid":"invalid"}const tR=e=>"id"in e&&"source"in e&&"target"in e,Zvt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),A4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lh=(e,n=[0,0])=>{const{width:t,height:r}=jo(e),s=e.origin??n,a=t*s[0],o=r*s[1];return{x:e.position.x-a,y:e.position.y-o}},Qvt=(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 a=typeof s=="string";let o=!n.nodeLookup&&!a?s:void 0;n.nodeLookup&&(o=a?n.nodeLookup.get(s):A4(s)?s:n.nodeLookup.get(s.id));const l=o?zp(o,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Om(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Im(t)},Oh=(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=Om(t,zp(s)),r=!0)}),r?Im(t):{x:0,y:0,width:0,height:0}},T4=(e,n,[t,r,s]=[0,0,1],a=!1,o=!1)=>{const l=(n.x-t)/s,c=(n.y-r)/s,d=n.width/s,_=n.height/s,f=[];for(const m of e.values()){const{measured:g,selectable:S=!0,hidden:k=!1}=m;if(o&&!S||k)continue;const b=g.width??m.width??m.initialWidth??0,v=g.height??m.height??m.initialHeight??0,{x,y}=m.internals.positionAbsolute,C=iR(l,c,d,_,x,y,b,v),A=b*v,E=a&&C>0;(!m.internals.handleBounds||E||C>=A||m.dragging)&&f.push(m)}return f},Jvt=(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 ebt(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 tbt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:a},o){if(e.size===0)return!0;const l=ebt(e,o),c=Oh(l),d=M4(c,n,t,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(d,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),!0}function nR({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:a}){const o=t.get(e),l=o.parentId?t.get(o.parentId):void 0,{x:c,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},_=o.origin??r;let f=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",ea.error005());else{const g=l.measured.width,S=l.measured.height;g&&S&&(f=[[c,d],[c+g,d+S]])}else l&&wc(o.extent)&&(f=[[o.extent[0][0]+c,o.extent[0][1]+d],[o.extent[1][0]+c,o.extent[1][1]+d]]);const m=wc(f)?yc(n,f,o.measured):n;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ea.error015())),{position:{x:m.x-c+(o.measured.width??0)*_[0],y:m.y-d+(o.measured.height??0)*_[1]},positionAbsolute:m}}async function nbt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of t){if(m.deletable===!1)continue;const g=a.has(m.id),S=!g&&m.parentId&&o.find(k=>k.id===m.parentId);(g||S)&&o.push(m)}const l=new Set(n.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),_=Jvt(o,c);for(const m of c)l.has(m.id)&&!_.find(S=>S.id===m.id)&&_.push(m);if(!s)return{edges:_,nodes:o};const f=await s({nodes:o,edges:_});return typeof f=="boolean"?f?{edges:_,nodes:o}:{edges:[],nodes:[]}:f}const id=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),yc=(e={x:0,y:0},n,t)=>({x:id(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:id(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function rR(e,n,t){const{width:r,height:s}=jo(t),{x:a,y:o}=t.internals.positionAbsolute;return yc(e,[[a,o],[a+r,o+s]],n)}const XC=(e,n,t)=>et?-id(Math.abs(e-t),1,n)/n:0,j4=(e,n,t=15,r=40)=>{const s=XC(e.x,r,n.width-r)*t,a=XC(e.y,r,n.height-r)*t;return[s,a]},Om=(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)}),Q2=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Im=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),ch=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=A4(e)?e.internals.positionAbsolute:Lh(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},zp=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=A4(e)?e.internals.positionAbsolute:Lh(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},sR=(e,n)=>Im(Om(Q2(e),Q2(n))),iR=(e,n,t,r,s,a,o,l)=>{const c=Math.max(0,Math.min(e+t,s+o)-Math.max(e,s)),d=Math.max(0,Math.min(n+r,a+l)-Math.max(n,a));return Math.ceil(c*d)},Ap=(e,n)=>iR(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),ZC=e=>Yi(e.width)&&Yi(e.height)&&Yi(e.x)&&Yi(e.y),Yi=e=>!isNaN(e)&&isFinite(e),aR=(e,n)=>(t,r)=>{},Ih=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Bh=({x:e,y:n},[t,r,s],a=!1,o=[1,1])=>{const l={x:(e-t)/s,y:(n-r)/s};return a?Ih(l,o):l},ad=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function xu(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 rbt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=xu(e,t),s=xu(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=xu(e.top??e.y??0,t),s=xu(e.bottom??e.y??0,t),a=xu(e.left??e.x??0,n),o=xu(e.right??e.x??0,n);return{top:r,right:o,bottom:s,left:a,x:a+o,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function sbt(e,n,t,r,s,a){const{x:o,y:l}=ad(e,[n,t,r]),{x:c,y:d}=ad({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-c,f=a-d;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(_),bottom:Math.floor(f)}}const M4=(e,n,t,r,s,a)=>{const o=rbt(a,n,t),l=(n-o.x)/e.width,c=(t-o.y)/e.height,d=Math.min(l,c),_=id(d,r,s),f=e.x+e.width/2,m=e.y+e.height/2,g=n/2-f*_,S=t/2-m*_,k=sbt(e,g,S,_,n,t),b={left:Math.min(k.left-o.left,0),top:Math.min(k.top-o.top,0),right:Math.min(k.right-o.right,0),bottom:Math.min(k.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:S-b.top+b.bottom,zoom:_}},uh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function wc(e){return e!=null&&e!=="parent"}function jo(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 oR(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 lR(e,n={width:0,height:0},t,r,s){const a={...e},o=r.get(t);if(o){const l=o.origin||s;a.x+=o.internals.positionAbsolute.x-(n.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(n.height??0)*l[1]}return a}function QC(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function ibt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function abt(e){return{...QM,...e||{}}}function Lf(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:a,y:o}=Xi(e),l=Bh({x:a-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},r),{x:c,y:d}=t?Ih(l,n):l;return{xSnapped:c,ySnapped:d,...l}}const R4=e=>({width:e.offsetWidth,height:e.offsetHeight}),cR=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},obt=["INPUT","SELECT","TEXTAREA"];function uR(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:obt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const dR=e=>"clientX"in e,Xi=(e,n)=>{var a,o;const t=dR(e),r=t?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,s=t?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},JC=(e,n,t,r,s)=>{const a=n.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(l.left-t.left)/r,y:(l.top-t.top)/r,...R4(o)}})};function fR({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+s*.375+o*.375+t*.125,d=n*.125+a*.375+l*.375+r*.125,_=Math.abs(c-e),f=Math.abs(d-n);return[c,d,_,f]}function S0(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function e9({pos:e,x1:n,y1:t,x2:r,y2:s,c:a}){switch(e){case mt.Left:return[n-S0(n-r,a),t];case mt.Right:return[n+S0(r-n,a),t];case mt.Top:return[n,t-S0(t-s,a)];case mt.Bottom:return[n,t+S0(s-t,a)]}}function hR({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top,curvature:o=.25}){const[l,c]=e9({pos:t,x1:e,y1:n,x2:r,y2:s,c:o}),[d,_]=e9({pos:a,x1:r,y1:s,x2:e,y2:n,c:o}),[f,m,g,S]=fR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:_});return[`M${e},${n} C${l},${c} ${d},${_} ${r},${s}`,f,m,g,S]}function _R({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,a=t0}const ubt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,dbt=(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)),fbt=(e,n,t={})=>{var a;if(!e.source||!e.target)return(a=t.onError)==null||a.call(t,"006",ea.error006()),n;const r=t.getEdgeId||ubt;let s;return tR(e)?s={...e}:s={...e,id:r(e)},dbt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function pR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,a,o,l]=_R({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,a,o,l]}const t9={[mt.Left]:{x:-1,y:0},[mt.Right]:{x:1,y:0},[mt.Top]:{x:0,y:-1},[mt.Bottom]:{x:0,y:1}},hbt=({source:e,sourcePosition:n=mt.Bottom,target:t})=>n===mt.Left||n===mt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function _bt({source:e,sourcePosition:n=mt.Bottom,target:t,targetPosition:r=mt.Top,center:s,offset:a,stepPosition:o}){const l=t9[n],c=t9[r],d={x:e.x+l.x*a,y:e.y+l.y*a},_={x:t.x+c.x*a,y:t.y+c.y*a},f=hbt({source:d,sourcePosition:n,target:_}),m=f.x!==0?"x":"y",g=f[m];let S=[],k,b;const v={x:0,y:0},x={x:0,y:0},[,,y,C]=_R({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(l[m]*c[m]===-1){m==="x"?(k=s.x??d.x+(_.x-d.x)*o,b=s.y??(d.y+_.y)/2):(k=s.x??(d.x+_.x)/2,b=s.y??d.y+(_.y-d.y)*o);const T=[{x:k,y:d.y},{x:k,y:_.y}],D=[{x:d.x,y:b},{x:_.x,y:b}];l[m]===g?S=m==="x"?T:D:S=m==="x"?D:T}else{const T=[{x:d.x,y:_.y}],D=[{x:_.x,y:d.y}];if(m==="x"?S=l.x===g?D:T:S=l.y===g?T:D,n===r){const V=Math.abs(e[m]-t[m]);if(V<=a){const X=Math.min(a-1,a-V);l[m]===g?v[m]=(d[m]>e[m]?-1:1)*X:x[m]=(_[m]>t[m]?-1:1)*X}}if(n!==r){const V=m==="x"?"y":"x",X=l[m]===c[V],W=d[V]>_[V],Z=d[V]<_[V];(l[m]===1&&(!X&&W||X&&Z)||l[m]!==1&&(!X&&Z||X&&W))&&(S=m==="x"?T:D)}const I={x:d.x+v.x,y:d.y+v.y},P={x:_.x+x.x,y:_.y+x.y},H=Math.max(Math.abs(I.x-S[0].x),Math.abs(P.x-S[0].x)),F=Math.max(Math.abs(I.y-S[0].y),Math.abs(P.y-S[0].y));H>=F?(k=(I.x+P.x)/2,b=S[0].y):(k=S[0].x,b=(I.y+P.y)/2)}const A={x:d.x+v.x,y:d.y+v.y},E={x:_.x+x.x,y:_.y+x.y};return[[e,...A.x!==S[0].x||A.y!==S[0].y?[A]:[],...S,...E.x!==S[S.length-1].x||E.y!==S[S.length-1].y?[E]:[],t],k,b,y,C]}function pbt(e,n,t,r){const s=Math.min(n9(e,n)/2,n9(n,t)/2,r),{x:a,y:o}=n;if(e.x===a&&a===t.x||e.y===o&&o===t.y)return`L${a} ${o}`;if(e.y===o){const d=e.xt.id===n):e[0])||null}function ex(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function gbt(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const d=ex(c,n);a.has(d)||(o.push({id:d,color:c.color||t,...c}),a.add(d))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const mR=1e3,vbt=10,D4={nodeOrigin:[0,0],nodeExtent:oh,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},bbt={...D4,checkEquality:!0};function L4(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function xbt(e,n,t){const r=L4(D4,t);for(const s of e.values())if(s.parentId)I4(s,e,n,r);else{const a=Lh(s,r.nodeOrigin),o=wc(s.extent)?s.extent:r.nodeExtent,l=yc(a,o,jo(s));s.internals.positionAbsolute=l}}function ybt(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 a={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(a):s.type==="target"&&r.push(a)}return{source:t,target:r}}function O4(e){return e==="manual"}function tx(e,n,t,r={}){var _,f;const s=L4(bbt,r),a={i:0},o=new Map(n),l=s!=null&&s.elevateNodesOnSelect&&!O4(s.zIndexMode)?mR:0;let c=e.length>0,d=!1;n.clear(),t.clear();for(const m of e){let g=o.get(m.id);if(s.checkEquality&&m===(g==null?void 0:g.internals.userNode))n.set(m.id,g);else{const S=Lh(m,s.nodeOrigin),k=wc(m.extent)?m.extent:s.nodeExtent,b=yc(S,k,jo(m));g={...s.defaults,...m,measured:{width:(_=m.measured)==null?void 0:_.width,height:(f=m.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:ybt(m,g),z:gR(m,l,s.zIndexMode),userNode:m}},n.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),m.parentId&&I4(g,n,t,r,a),d||(d=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function wbt(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 I4(e,n,t,r,s){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:c}=L4(D4,r),d=e.parentId,_=n.get(d);if(!_){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}wbt(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&c==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*vbt),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const f=a&&!O4(c)?mR:0,{x:m,y:g,z:S}=Sbt(e,_,o,l,f,c),{positionAbsolute:k}=e.internals,b=m!==k.x||g!==k.y;(b||S!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:g}:k,z:S}})}function gR(e,n,t){const r=Yi(e.zIndex)?e.zIndex:0;return O4(t)?r:r+(e.selected?n:0)}function Sbt(e,n,t,r,s,a){const{x:o,y:l}=n.internals.positionAbsolute,c=jo(e),d=Lh(e,t),_=wc(e.extent)?yc(d,e.extent,c):d;let f=yc({x:o+_.x,y:l+_.y},r,c);e.extent==="parent"&&(f=rR(f,c,n));const m=gR(e,s,a),g=n.internals.z??0;return{x:f.x,y:f.y,z:g>=m?g+1:m}}function B4(e,n,t,r=[0,0]){var o;const s=[],a=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const d=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??ch(c),_=sR(d,l.rect);a.set(l.parentId,{expandedRect:_,parent:c})}return a.size>0&&a.forEach(({expandedRect:l,parent:c},d)=>{var y;const _=c.internals.positionAbsolute,f=jo(c),m=c.origin??r,g=l.x<_.x?Math.round(Math.abs(_.x-l.x)):0,S=l.y<_.y?Math.round(Math.abs(_.y-l.y)):0,k=Math.max(f.width,Math.round(l.width)),b=Math.max(f.height,Math.round(l.height)),v=(k-f.width)*m[0],x=(b-f.height)*m[1];(g>0||S>0||v||x)&&(s.push({id:d,type:"position",position:{x:c.position.x-g+v,y:c.position.y-S+x}}),(y=t.get(d))==null||y.forEach(C=>{e.some(A=>A.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+g,y:C.position.y+S}})})),(f.width0){const g=B4(m,n,t,s);d.push(...g)}return{changes:d,updatedInternals:c}}async function Cbt({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:a}){if(!n||!e.x&&!e.y)return!1;const o=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,a]],r);return!!o&&(o.x!==t[0]||o.y!==t[1]||o.k!==t[2])}function a9(e,n,t,r,s,a){let o=s;const l=r.get(o)||new Map;r.set(o,l.set(t,n)),o=`${s}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(t,n)),a){o=`${s}-${e}-${a}`;const d=r.get(o)||new Map;r.set(o,d.set(t,n))}}function vR(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:s,target:a,sourceHandle:o,targetHandle:l},d=`${s}-${o}--${a}-${l}`,_=`${a}-${l}--${s}-${o}`;a9("source",c,_,e,s,o),a9("target",c,d,e,a,l),n.set(r.id,r)}}function bR(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:bR(t,n):!1}function o9(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 Ebt(e,n,t,r){const s=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!bR(o,e))&&(o.draggable||n&&typeof o.draggable>"u")){const l=e.get(a);l&&s.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:t.x-l.internals.positionAbsolute.x,y:t.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function ob({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var o,l,c;const s=[];for(const[d,_]of n){const f=(o=t.get(d))==null?void 0:o.internals.userNode;f&&s.push({...f,position:_.position,dragging:r})}if(!e)return[s[0],s];const a=(l=t.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((c=n.get(e))==null?void 0:c.position)||a.position,dragging:r}:s[0],s]}function Nbt({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const a={x:t-s.distance.x,y:r-s.distance.y},o=Ih(a,n);return{x:o.x-a.x,y:o.y-a.y}}function zbt({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let a={x:null,y:null},o=0,l=new Map,c=!1,d={x:0,y:0},_=null,f=!1,m=null,g=!1,S=!1,k=null;function b({noDragClassName:x,handleSelector:y,domNode:C,isSelectable:A,nodeId:E,nodeClickDistance:j=0}){m=di(C);function T({x:H,y:F}){const{nodeLookup:V,nodeExtent:X,snapGrid:W,snapToGrid:Z,nodeOrigin:J,onNodeDrag:B,onSelectionDrag:L,onError:$,updateNodePositions:K}=n();a={x:H,y:F};let G=!1;const re=l.size>1,oe=re&&X?Q2(Oh(l)):null,he=re&&Z?Nbt({dragItems:l,snapGrid:W,x:H,y:F}):null;for(const[ie,q]of l){if(!V.has(ie))continue;let te={x:H-q.distance.x,y:F-q.distance.y};Z&&(te=he?{x:Math.round(te.x+he.x),y:Math.round(te.y+he.y)}:Ih(te,W));let le=null;if(re&&X&&!q.extent&&oe){const{positionAbsolute:Ce}=q.internals,Ee=Ce.x-oe.x+X[0][0],Le=Ce.x+q.measured.width-oe.x2+X[1][0],Pe=Ce.y-oe.y+X[0][1],Ve=Ce.y+q.measured.height-oe.y2+X[1][1];le=[[Ee,Pe],[Le,Ve]]}const{position:ge,positionAbsolute:ue}=nR({nodeId:ie,nextPosition:te,nodeLookup:V,nodeExtent:le||X,nodeOrigin:J,onError:$});G=G||q.position.x!==ge.x||q.position.y!==ge.y,q.position=ge,q.internals.positionAbsolute=ue}if(S=S||G,!!G&&(K(l,!0),k&&(r||B||!E&&L))){const[ie,q]=ob({nodeId:E,dragItems:l,nodeLookup:V});r==null||r(k,l,ie,q),B==null||B(k,ie,q),E||L==null||L(k,q)}}async function D(){if(!_)return;const{transform:H,panBy:F,autoPanSpeed:V,autoPanOnNodeDrag:X}=n();if(!X){c=!1,cancelAnimationFrame(o);return}const[W,Z]=j4(d,_,V);(W!==0||Z!==0)&&(a.x=(a.x??0)-W/H[2],a.y=(a.y??0)-Z/H[2],await F({x:W,y:Z})&&T(a)),o=requestAnimationFrame(D)}function I(H){var re;const{nodeLookup:F,multiSelectionActive:V,nodesDraggable:X,transform:W,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:B,onNodeDragStart:L,onSelectionDragStart:$,unselectNodesAndEdges:K}=n();f=!0,(!B||!A)&&!V&&E&&((re=F.get(E))!=null&&re.selected||K()),A&&B&&E&&(e==null||e(E));const G=Lf(H.sourceEvent,{transform:W,snapGrid:Z,snapToGrid:J,containerBounds:_});if(a=G,l=Ebt(F,X,G,E),l.size>0&&(t||L||!E&&$)){const[oe,he]=ob({nodeId:E,dragItems:l,nodeLookup:F});t==null||t(H.sourceEvent,l,oe,he),L==null||L(H.sourceEvent,oe,he),E||$==null||$(H.sourceEvent,he)}}const P=LM().clickDistance(j).on("start",H=>{const{domNode:F,nodeDragThreshold:V,transform:X,snapGrid:W,snapToGrid:Z}=n();_=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,S=!1,k=H.sourceEvent,V===0&&I(H),a=Lf(H.sourceEvent,{transform:X,snapGrid:W,snapToGrid:Z,containerBounds:_}),d=Xi(H.sourceEvent,_)}).on("drag",H=>{const{autoPanOnNodeDrag:F,transform:V,snapGrid:X,snapToGrid:W,nodeDragThreshold:Z,nodeLookup:J}=n(),B=Lf(H.sourceEvent,{transform:V,snapGrid:X,snapToGrid:W,containerBounds:_});if(k=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||E&&!J.has(E))&&(g=!0),!g){if(!c&&F&&f&&(c=!0,D()),!f){const L=Xi(H.sourceEvent,_),$=L.x-d.x,K=L.y-d.y;Math.sqrt($*$+K*K)>Z&&I(H)}(a.x!==B.xSnapped||a.y!==B.ySnapped)&&l&&f&&(d=Xi(H.sourceEvent,_),T(B))}}).on("end",H=>{if(!f||g){g&&l.size>0&&n().updateNodePositions(l,!1);return}if(c=!1,f=!1,cancelAnimationFrame(o),l.size>0){const{nodeLookup:F,updateNodePositions:V,onNodeDragStop:X,onSelectionDragStop:W}=n();if(S&&(V(l,!1),S=!1),s||X||!E&&W){const[Z,J]=ob({nodeId:E,dragItems:l,nodeLookup:F,dragging:!1});s==null||s(H.sourceEvent,l,Z,J),X==null||X(H.sourceEvent,Z,J),E||W==null||W(H.sourceEvent,J)}}}).filter(H=>{const F=H.target;return!H.button&&(!x||!o9(F,`.${x}`,C))&&(!y||o9(F,y,C))});m.call(P)}function v(){m==null||m.on(".drag",null)}return{update:b,destroy:v}}function Abt(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of n.values())Ap(s,ch(a))>0&&r.push(a);return r}const Tbt=250;function jbt(e,n,t,r){var l,c;let s=[],a=1/0;const o=Abt(e,t,n+Tbt);for(const d of o){const _=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of _){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:m,y:g}=Sc(d,f,f.position,!0),S=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));S>n||(S1){const d=r.type==="source"?"target":"source";return s.find(_=>_.type===d)??s[0]}return s[0]}function xR(e,n,t,r,s,a=!1){var d,_,f;const o=r.get(e);if(!o)return null;const l=s==="strict"?(d=o.internals.handleBounds)==null?void 0:d[n]:[...((_=o.internals.handleBounds)==null?void 0:_.source)??[],...((f=o.internals.handleBounds)==null?void 0:f.target)??[]],c=(t?l==null?void 0:l.find(m=>m.id===t):l==null?void 0:l[0])??null;return c&&a?{...c,...Sc(o,c,c.position,!0)}:c}function yR(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function Mbt(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const wR=()=>!0;function Rbt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:d,autoPanOnConnect:_,flowId:f,panBy:m,cancelConnection:g,onConnectStart:S,onConnect:k,onConnectEnd:b,isValidConnection:v=wR,onReconnectEnd:x,updateConnection:y,getTransform:C,getFromHandle:A,autoPanSpeed:E,dragThreshold:j=1,handleDomNode:T}){const D=cR(e.target);let I=0,P;const{x:H,y:F}=Xi(e),V=yR(a,T),X=l==null?void 0:l.getBoundingClientRect();let W=!1;if(!X||!V)return;const Z=xR(s,V,r,c,n);if(!Z)return;let J=Xi(e,X),B=!1,L=null,$=!1,K=null;function G(){if(!_||!X)return;const[ge,ue]=j4(J,X,E);m({x:ge,y:ue}),I=requestAnimationFrame(G)}const re={...Z,nodeId:s,type:V,position:Z.position},oe=c.get(s);let ie={inProgress:!0,isValid:null,from:Sc(oe,re,mt.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:oe,to:J,toHandle:null,toPosition:YC[re.position],toNode:null,pointer:J};function q(){W=!0,y(ie),S==null||S(e,{nodeId:s,handleId:r,handleType:V})}j===0&&q();function te(ge){if(!W){const{x:Ve,y:ft}=Xi(ge),Be=Ve-H,wt=ft-F;if(!(Be*Be+wt*wt>j*j))return;q()}if(!A()||!re){le(ge);return}const ue=C();J=Xi(ge,X),P=jbt(Bh(J,ue,!1,[1,1]),t,c,re),B||(G(),B=!0);const Ce=SR(ge,{handle:P,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:o?"target":"source",isValidConnection:v,doc:D,lib:d,flowId:f,nodeLookup:c});K=Ce.handleDomNode,L=Ce.connection,$=Mbt(!!P,Ce.isValid);const Ee=c.get(s),Le=Ee?Sc(Ee,re,mt.Left,!0):ie.from,Pe={...ie,from:Le,isValid:$,to:Ce.toHandle&&$?ad({x:Ce.toHandle.x,y:Ce.toHandle.y},ue):J,toHandle:Ce.toHandle,toPosition:$&&Ce.toHandle?Ce.toHandle.position:YC[re.position],toNode:Ce.toHandle?c.get(Ce.toHandle.nodeId):null,pointer:J};y(Pe),ie=Pe}function le(ge){if(!("touches"in ge&&ge.touches.length>0)){if(W){(P||K)&&L&&$&&(k==null||k(L));const{inProgress:ue,...Ce}=ie,Ee={...Ce,toPosition:ie.toHandle?ie.toPosition:null};b==null||b(ge,Ee),a&&(x==null||x(ge,Ee))}g(),cancelAnimationFrame(I),B=!1,$=!1,L=null,K=null,D.removeEventListener("mousemove",te),D.removeEventListener("mouseup",le),D.removeEventListener("touchmove",te),D.removeEventListener("touchend",le)}}D.addEventListener("mousemove",te),D.addEventListener("mouseup",le),D.addEventListener("touchmove",te),D.addEventListener("touchend",le)}function SR(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:d=wR,nodeLookup:_}){const f=a==="target",m=n?o.querySelector(`.${l}-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:g,y:S}=Xi(e),k=o.elementFromPoint(g,S),b=k!=null&&k.classList.contains(`${l}-flow__handle`)?k:m,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const x=yR(void 0,b),y=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),A=b.classList.contains("connectable"),E=b.classList.contains("connectableend");if(!y||!x)return v;const j={source:f?y:r,sourceHandle:f?C:s,target:f?r:y,targetHandle:f?s:C};v.connection=j;const D=A&&E&&(t===sd.Strict?f&&x==="source"||!f&&x==="target":y!==r||C!==s);v.isValid=D&&d(j),v.toHandle=xR(y,x,C,_,t,!0)}return v}const nx={onPointerDown:Rbt,isValid:SR};function Dbt({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=di(e);function a({translateExtent:l,width:c,height:d,zoomStep:_=1,pannable:f=!0,zoomable:m=!0,inversePan:g=!1}){const S=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),A=y.sourceEvent.ctrlKey&&uh()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*_,j=C[2]*Math.pow(2,E*A);n.scaleTo(j)};let k=[0,0];const b=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},v=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const A=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[A[0]-k[0],A[1]-k[1]];k=A;const j=r()*Math.max(C[2],Math.log(C[2]))*(g?-1:1),T={x:C[0]-E[0]*j,y:C[1]-E[1]*j},D=[[0,0],[c,d]];n.setViewportConstrained({x:T.x,y:T.y,zoom:C[2]},D,l)},x=XM().on("start",b).on("zoom",f?v:null).on("zoom.wheel",m?S:null);s.call(x,{})}function o(){s.on("zoom",null)}return{update:a,destroy:o,pointer:Vi}}const Bm=e=>({x:e.x,y:e.y,zoom:e.k}),lb=({x:e,y:n,zoom:t})=>Lm.translate(e,n).scale(t),Mu=(e,n)=>e.target.closest(`.${n}`),kR=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),Lbt=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,cb=(e,n=0,t=Lbt,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},CR=e=>{const n=e.ctrlKey&&uh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function Obt({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:d}){return _=>{if(Mu(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(_.ctrlKey&&o){const b=Vi(_),v=CR(_),x=f*Math.pow(2,v);r.scaleTo(t,x,b,_);return}const m=_.deltaMode===1?20:1;let g=s===mc.Vertical?0:_.deltaX*m,S=s===mc.Horizontal?0:_.deltaY*m;!uh()&&_.shiftKey&&s!==mc.Vertical&&(g=_.deltaY*m,S=0),r.translateBy(t,-(g/f)*a,-(S/f)*a,{internal:!0});const k=Bm(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(_,k),e.panScrollTimeout=setTimeout(()=>{d==null||d(_,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(_,k))}}function Ibt({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const a=r.type==="wheel",o=!n&&a&&!r.ctrlKey,l=Mu(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),t.call(this,r,s)}}function Bbt({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const s=Bm(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function $bt({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return a=>{var o,l;e.usedRightMouseButton=!!(t&&kR(n,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),s&&!((l=a.sourceEvent)!=null&&l.internal)&&(s==null||s(a.sourceEvent,Bm(a.transform)))}}function Hbt({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&kR(n,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Bm(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,c)},t?150:0)}}}function Pbt({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:d,connectionInProgress:_}){return f=>{var b;const m=e||n,g=t&&f.ctrlKey,S=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Mu(f,`${d}-flow__node`)||Mu(f,`${d}-flow__edge`)))return!0;if(!r&&!m&&!s&&!a&&!t||o||_&&!S||Mu(f,l)&&S||Mu(f,c)&&(!S||s&&S&&!e)||!t&&f.ctrlKey&&S)return!1;if(!t&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!m&&!s&&!g&&S||!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||S)&&k}}function Fbt({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),f=XM().scaleExtent([n,t]).translateExtent(r),m=di(e).call(f);x({x:s.x,y:s.y,zoom:id(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const g=m.on("wheel.zoom"),S=m.on("dblclick.zoom");f.wheelDelta(CR);async function k(P,H){return m?new Promise(F=>{f==null||f.interpolate((H==null?void 0:H.interpolate)==="linear"?Df:H0).transform(cb(m,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>F(!0)),P)}):!1}function b({noWheelClassName:P,noPanClassName:H,onPaneContextMenu:F,userSelectionActive:V,panOnScroll:X,panOnDrag:W,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:$,zoomOnDoubleClick:K,zoomActivationKeyPressed:G,lib:re,onTransformChange:oe,connectionInProgress:he,paneClickDistance:ie,selectionOnDrag:q}){V&&!d.isZoomingOrPanning&&v();const te=X&&!G&&!V;f.clickDistance(q?1/0:!Yi(ie)||ie<0?0:ie);const le=te?Obt({zoomPanValues:d,noWheelClassName:P,d3Selection:m,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):Ibt({noWheelClassName:P,preventScrolling:B,d3ZoomHandler:g});m.on("wheel.zoom",le,{passive:!1});const ge=Bbt({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:o});f.on("start",ge);const ue=$bt({zoomPanValues:d,panOnDrag:W,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:oe});f.on("zoom",ue);const Ce=Hbt({zoomPanValues:d,panOnDrag:W,panOnScroll:X,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});f.on("end",Ce);const Ee=Pbt({zoomActivationKeyPressed:G,panOnDrag:W,zoomOnScroll:$,panOnScroll:X,zoomOnDoubleClick:K,zoomOnPinch:L,userSelectionActive:V,noPanClassName:H,noWheelClassName:P,lib:re,connectionInProgress:he});f.filter(Ee),K?m.on("dblclick.zoom",S):m.on("dblclick.zoom",null)}function v(){f.on("zoom",null)}async function x(P,H,F){const V=lb(P),X=f==null?void 0:f.constrain()(V,H,F);return X&&await k(X),X}async function y(P,H){const F=lb(P);return await k(F,H),F}function C(P){if(m){const H=lb(P),F=m.property("__zoom");(F.k!==P.zoom||F.x!==P.x||F.y!==P.y)&&(f==null||f.transform(m,H,null,{sync:!0}))}}function A(){const P=m?YM(m.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function E(P,H){return m?new Promise(F=>{f==null||f.interpolate((H==null?void 0:H.interpolate)==="linear"?Df:H0).scaleTo(cb(m,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>F(!0)),P)}):!1}async function j(P,H){return m?new Promise(F=>{f==null||f.interpolate((H==null?void 0:H.interpolate)==="linear"?Df:H0).scaleBy(cb(m,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>F(!0)),P)}):!1}function T(P){f==null||f.scaleExtent(P)}function D(P){f==null||f.translateExtent(P)}function I(P){const H=!Yi(P)||P<0?0:P;f==null||f.clickDistance(H)}return{update:b,destroy:v,setViewport:y,setViewportConstrained:x,getViewport:A,scaleTo:E,scaleBy:j,setScaleExtent:T,setTranslateExtent:D,syncViewport:C,setClickDistance:I}}var od;(function(e){e.Line="line",e.Handle="handle"})(od||(od={}));function Ubt({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:a}){const o=e-n,l=t-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&s&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function l9(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 hl(e,n){return Math.max(0,n-e)}function _l(e,n){return Math.max(0,e-n)}function k0(e,n,t){return Math.max(0,n-e,e-t)}function c9(e,n){return e?!n:n}function qbt(e,n,t,r,s,a,o,l){let{affectsX:c,affectsY:d}=n;const{isHorizontal:_,isVertical:f}=n,m=_&&f,{xSnapped:g,ySnapped:S}=t,{minWidth:k,maxWidth:b,minHeight:v,maxHeight:x}=r,{x:y,y:C,width:A,height:E,aspectRatio:j}=e;let T=Math.floor(_?g-e.pointerX:0),D=Math.floor(f?S-e.pointerY:0);const I=A+(c?-T:T),P=E+(d?-D:D),H=-a[0]*A,F=-a[1]*E;let V=k0(I,k,b),X=k0(P,v,x);if(o){let J=0,B=0;c&&T<0?J=hl(y+T+H,o[0][0]):!c&&T>0&&(J=_l(y+I+H,o[1][0])),d&&D<0?B=hl(C+D+F,o[0][1]):!d&&D>0&&(B=_l(C+P+F,o[1][1])),V=Math.max(V,J),X=Math.max(X,B)}if(l){let J=0,B=0;c&&T>0?J=_l(y+T,l[0][0]):!c&&T<0&&(J=hl(y+I,l[1][0])),d&&D>0?B=_l(C+D,l[0][1]):!d&&D<0&&(B=hl(C+P,l[1][1])),V=Math.max(V,J),X=Math.max(X,B)}if(s){if(_){const J=k0(I/j,v,x)*j;if(V=Math.max(V,J),o){let B=0;!c&&!d||c&&!d&&m?B=_l(C+F+I/j,o[1][1])*j:B=hl(C+F+(c?T:-T)/j,o[0][1])*j,V=Math.max(V,B)}if(l){let B=0;!c&&!d||c&&!d&&m?B=hl(C+I/j,l[1][1])*j:B=_l(C+(c?T:-T)/j,l[0][1])*j,V=Math.max(V,B)}}if(f){const J=k0(P*j,k,b)/j;if(X=Math.max(X,J),o){let B=0;!c&&!d||d&&!c&&m?B=_l(y+P*j+H,o[1][0])/j:B=hl(y+(d?D:-D)*j+H,o[0][0])/j,X=Math.max(X,B)}if(l){let B=0;!c&&!d||d&&!c&&m?B=hl(y+P*j,l[1][0])/j:B=_l(y+(d?D:-D)*j,l[0][0])/j,X=Math.max(X,B)}}}D=D+(D<0?X:-X),T=T+(T<0?V:-V),s&&(m?I>P*j?D=(c9(c,d)?-T:T)/j:T=(c9(c,d)?-D:D)*j:_?(D=T/j,d=c):(T=D*j,c=d));const W=c?y+T:y,Z=d?C+D:C;return{width:A+(c?-T:T),height:E+(d?-D:D),x:a[0]*T*(c?-1:1)+W,y:a[1]*D*(d?-1:1)+Z}}const ER={width:0,height:0,x:0,y:0},Gbt={...ER,pointerX:0,pointerY:0,aspectRatio:1};function Vbt(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=t[0]*a,c=t[1]*o;return[[r-l,s-c],[r+a-l,s+o-c]]}function Wbt({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const a=di(e);let o={controlDirection:l9("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:d,boundaries:_,keepAspectRatio:f,resizeDirection:m,onResizeStart:g,onResize:S,onResizeEnd:k,shouldResize:b}){let v={...ER},x={...Gbt};o={boundaries:_,resizeDirection:m,keepAspectRatio:f,controlDirection:l9(d)};let y,C=null,A=[],E,j,T,D=!1;const I=LM().on("start",P=>{const{nodeLookup:H,transform:F,snapGrid:V,snapToGrid:X,nodeOrigin:W,paneDomNode:Z}=t();if(y=H.get(n),!y)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:B}=Lf(P.sourceEvent,{transform:F,snapGrid:V,snapToGrid:X,containerBounds:C});v={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},x={...v,pointerX:J,pointerY:B,aspectRatio:v.width/v.height},E=void 0,j=wc(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=H.get(y.parentId)),E&&y.extent==="parent"&&(j=[[0,0],[E.measured.width,E.measured.height]]),A=[],T=void 0;for(const[L,$]of H)if($.parentId===n&&(A.push({id:L,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const K=Vbt($,y,$.origin??W);T?T=[[Math.min(K[0][0],T[0][0]),Math.min(K[0][1],T[0][1])],[Math.max(K[1][0],T[1][0]),Math.max(K[1][1],T[1][1])]]:T=K}g==null||g(P,{...v})}).on("drag",P=>{const{transform:H,snapGrid:F,snapToGrid:V,nodeOrigin:X}=t(),W=Lf(P.sourceEvent,{transform:H,snapGrid:F,snapToGrid:V,containerBounds:C}),Z=[];if(!y)return;const{x:J,y:B,width:L,height:$}=v,K={},G=y.origin??X,{width:re,height:oe,x:he,y:ie}=qbt(x,o.controlDirection,W,o.boundaries,o.keepAspectRatio,G,j,T),q=re!==L,te=oe!==$,le=he!==J&&q,ge=ie!==B&&te;if(!le&&!ge&&!q&&!te)return;if((le||ge||G[0]===1||G[1]===1)&&(K.x=le?he:v.x,K.y=ge?ie:v.y,v.x=K.x,v.y=K.y,A.length>0)){const Le=he-J,Pe=ie-B;for(const Ve of A)Ve.position={x:Ve.position.x-Le+G[0]*(re-L),y:Ve.position.y-Pe+G[1]*(oe-$)},Z.push(Ve)}if((q||te)&&(K.width=q&&(!o.resizeDirection||o.resizeDirection==="horizontal")?re:v.width,K.height=te&&(!o.resizeDirection||o.resizeDirection==="vertical")?oe:v.height,v.width=K.width,v.height=K.height),E&&y.expandParent){const Le=G[0]*(K.width??0);K.x&&K.x{D&&(k==null||k(P,{...v}),s==null||s({...v}),D=!1)});a.call(I)}function c(){a.on(".drag",null)}return{update:l,destroy:c}}var ub={exports:{}},db={},fb={exports:{}},hb={};/** * @license React * use-sync-external-store-shim.production.js * @@ -1037,7 +1057,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var i9;function j1t(){if(i9)return db;i9=1;var e=gh();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(f,m){var g=m(),S=r({inst:{value:g,getSnapshot:m}}),k=S[0].inst,b=S[1];return a(function(){k.value=g,k.getSnapshot=m,c(k)&&b({inst:k})},[f,g,m]),s(function(){return c(k)&&b({inst:k}),f(function(){c(k)&&b({inst:k})})},[f]),o(g),g}function c(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!t(f,g)}catch{return!0}}function d(f,m){return m()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return db.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,db}var a9;function M1t(){return a9||(a9=1,ub.exports=j1t()),ub.exports}/** + */var u9;function Kbt(){if(u9)return hb;u9=1;var e=bh();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(f,m){var g=m(),S=r({inst:{value:g,getSnapshot:m}}),k=S[0].inst,b=S[1];return a(function(){k.value=g,k.getSnapshot=m,c(k)&&b({inst:k})},[f,g,m]),s(function(){return c(k)&&b({inst:k}),f(function(){c(k)&&b({inst:k})})},[f]),o(g),g}function c(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!t(f,g)}catch{return!0}}function d(f,m){return m()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return hb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,hb}var d9;function Ybt(){return d9||(d9=1,fb.exports=Kbt()),fb.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -1045,12 +1065,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var o9;function R1t(){if(o9)return cb;o9=1;var e=gh(),n=M1t();function t(d,_){return d===_&&(d!==0||1/d===1/_)||d!==d&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return cb.useSyncExternalStoreWithSelector=function(d,_,f,m,g){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=l(function(){function v(E){if(!x){if(x=!0,y=E,E=m(E),g!==void 0&&k.hasValue){var j=k.value;if(g(j,E))return C=j}return C=E}if(j=C,r(y,E))return j;var A=m(E);return g!==void 0&&g(j,A)?(y=E,j):(y=E,C=A)}var x=!1,y,C,z=f===void 0?null:f;return[function(){return v(_())},z===null?void 0:function(){return v(z())}]},[_,f,m,g]);var b=s(d,S[0],S[1]);return o(function(){k.hasValue=!0,k.value=b},[b]),c(b),b},cb}var l9;function D1t(){return l9||(l9=1,lb.exports=R1t()),lb.exports}var L1t=D1t();const O1t=mh(L1t),I1t={},c9=e=>{let n;const t=new Set,r=(_,f)=>{const m=typeof _=="function"?_(n):_;if(!Object.is(m,n)){const g=n;n=f??(typeof m!="object"||m===null)?m:Object.assign({},n,m),t.forEach(S=>S(n,g))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>d,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(I1t?"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()}},d=n=e(r,s,c);return c},B1t=e=>e?c9(e):c9,{useDebugValue:$1t}=Ze,{useSyncExternalStoreWithSelector:H1t}=O1t,P1t=e=>e;function hR(e,n=P1t,t){const r=H1t(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return $1t(r),r}const u9=(e,n)=>{const t=B1t(e),r=(s,a=n)=>hR(t,s,a);return Object.assign(r,t),r},F1t=(e,n)=>e?u9(e,n):u9;function Jn(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 Im=M.createContext(null),U1t=Im.Provider,_R=ea.error001("react");function _n(e,n){const t=M.useContext(Im);if(t===null)throw new Error(_R);return hR(t,e,n)}function tr(){const e=M.useContext(Im);if(e===null)throw new Error(_R);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const d9={display:"none"},q1t={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},pR="react-flow__node-desc",mR="react-flow__edge-desc",G1t="react-flow__aria-live",V1t=e=>e.ariaLiveMessage,W1t=e=>e.ariaLabelConfig;function K1t({rfId:e}){const n=_n(V1t);return h.jsx("div",{id:`${G1t}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:q1t,children:n})}function Y1t({rfId:e,disableKeyboardA11y:n}){const t=_n(W1t);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${pR}-${e}`,style:d9,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${mR}-${e}`,style:d9,children:t["edge.a11yDescription.default"]}),!n&&h.jsx(K1t,{rfId:e})]})}const Bm=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},a)=>{const o=`${e}`.split("-");return h.jsx("div",{className:Lr(["react-flow__panel",t,...o]),style:r,ref:a,...s,children:n})});Bm.displayName="Panel";const f9="https://reactflow.dev?utm_source=attribution";function X1t({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Bm,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${f9}`,children:h.jsx("a",{href:f9,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Z1t=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}},k0=e=>e.id;function Q1t(e,n){return Jn(e.selectedNodes.map(k0),n.selectedNodes.map(k0))&&Jn(e.selectedEdges.map(k0),n.selectedEdges.map(k0))}function J1t({onSelectionChange:e}){const n=tr(),{selectedNodes:t,selectedEdges:r}=_n(Z1t,Q1t);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(a=>a(s))},[t,r,e]),null}const evt=e=>!!e.onSelectionChangeHandlers;function tvt({onSelectionChange:e}){const n=_n(evt);return e||n?h.jsx(J1t,{onSelectionChange:e}):null}const gR=[0,0],nvt={x:0,y:0,zoom:1},rvt=["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"],h9=[...rvt,"rfId"],svt=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}),_9={translateExtent:ih,nodeOrigin:gR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function ivt(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c}=_n(svt,Jn),d=tr();M.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{_.current=_9,l()}),[]);const _=M.useRef(_9);return M.useEffect(()=>{for(const f of h9){const m=e[f],g=_.current[f];m!==g&&(typeof e[f]>"u"||(f==="nodes"?n(m):f==="edges"?t(m):f==="minZoom"?r(m):f==="maxZoom"?s(m):f==="translateExtent"?a(m):f==="nodeExtent"?o(m):f==="ariaLabelConfig"?d.setState({ariaLabelConfig:Ugt(m)}):f==="fitView"?d.setState({fitViewQueued:m}):f==="fitViewOptions"?d.setState({fitViewOptions:m}):d.setState({[f]:m})))}_.current=e},h9.map(f=>e[f])),null}function p9(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function avt(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=p9(),a=()=>t(s!=null&&s.matches?"dark":"light");return a(),s==null||s.addEventListener("change",a),()=>{s==null||s.removeEventListener("change",a)}},[e]),n!==null?n:(r=p9())!=null&&r.matches?"dark":"light"}const m9=typeof document<"u"?document:null;function ch(e=null,n={target:m9,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),a=M.useRef(new Set([])),[o,l]=M.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` + */var f9;function Xbt(){if(f9)return db;f9=1;var e=bh(),n=Ybt();function t(d,_){return d===_&&(d!==0||1/d===1/_)||d!==d&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return db.useSyncExternalStoreWithSelector=function(d,_,f,m,g){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=l(function(){function v(E){if(!x){if(x=!0,y=E,E=m(E),g!==void 0&&k.hasValue){var j=k.value;if(g(j,E))return C=j}return C=E}if(j=C,r(y,E))return j;var T=m(E);return g!==void 0&&g(j,T)?(y=E,j):(y=E,C=T)}var x=!1,y,C,A=f===void 0?null:f;return[function(){return v(_())},A===null?void 0:function(){return v(A())}]},[_,f,m,g]);var b=s(d,S[0],S[1]);return o(function(){k.hasValue=!0,k.value=b},[b]),c(b),b},db}var h9;function Zbt(){return h9||(h9=1,ub.exports=Xbt()),ub.exports}var Qbt=Zbt();const Jbt=vh(Qbt),e2t={},_9=e=>{let n;const t=new Set,r=(_,f)=>{const m=typeof _=="function"?_(n):_;if(!Object.is(m,n)){const g=n;n=f??(typeof m!="object"||m===null)?m:Object.assign({},n,m),t.forEach(S=>S(n,g))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>d,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(e2t?"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()}},d=n=e(r,s,c);return c},t2t=e=>e?_9(e):_9,{useDebugValue:n2t}=Ze,{useSyncExternalStoreWithSelector:r2t}=Jbt,s2t=e=>e;function NR(e,n=s2t,t){const r=r2t(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return n2t(r),r}const p9=(e,n)=>{const t=t2t(e),r=(s,a=n)=>NR(t,s,a);return Object.assign(r,t),r},i2t=(e,n)=>e?p9(e,n):p9;function Jn(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 $m=M.createContext(null),a2t=$m.Provider,zR=ea.error001("react");function _n(e,n){const t=M.useContext($m);if(t===null)throw new Error(zR);return NR(t,e,n)}function tr(){const e=M.useContext($m);if(e===null)throw new Error(zR);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const m9={display:"none"},o2t={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},AR="react-flow__node-desc",TR="react-flow__edge-desc",l2t="react-flow__aria-live",c2t=e=>e.ariaLiveMessage,u2t=e=>e.ariaLabelConfig;function d2t({rfId:e}){const n=_n(c2t);return h.jsx("div",{id:`${l2t}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:o2t,children:n})}function f2t({rfId:e,disableKeyboardA11y:n}){const t=_n(u2t);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${AR}-${e}`,style:m9,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${TR}-${e}`,style:m9,children:t["edge.a11yDescription.default"]}),!n&&h.jsx(d2t,{rfId:e})]})}const Hm=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},a)=>{const o=`${e}`.split("-");return h.jsx("div",{className:Rr(["react-flow__panel",t,...o]),style:r,ref:a,...s,children:n})});Hm.displayName="Panel";const g9="https://reactflow.dev?utm_source=attribution";function h2t({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Hm,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${g9}`,children:h.jsx("a",{href:g9,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const _2t=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}},C0=e=>e.id;function p2t(e,n){return Jn(e.selectedNodes.map(C0),n.selectedNodes.map(C0))&&Jn(e.selectedEdges.map(C0),n.selectedEdges.map(C0))}function m2t({onSelectionChange:e}){const n=tr(),{selectedNodes:t,selectedEdges:r}=_n(_2t,p2t);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(a=>a(s))},[t,r,e]),null}const g2t=e=>!!e.onSelectionChangeHandlers;function v2t({onSelectionChange:e}){const n=_n(g2t);return e||n?h.jsx(m2t,{onSelectionChange:e}):null}const jR=[0,0],b2t={x:0,y:0,zoom:1},x2t=["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"],v9=[...x2t,"rfId"],y2t=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}),b9={translateExtent:oh,nodeOrigin:jR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function w2t(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c}=_n(y2t,Jn),d=tr();M.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{_.current=b9,l()}),[]);const _=M.useRef(b9);return M.useEffect(()=>{for(const f of v9){const m=e[f],g=_.current[f];m!==g&&(typeof e[f]>"u"||(f==="nodes"?n(m):f==="edges"?t(m):f==="minZoom"?r(m):f==="maxZoom"?s(m):f==="translateExtent"?a(m):f==="nodeExtent"?o(m):f==="ariaLabelConfig"?d.setState({ariaLabelConfig:abt(m)}):f==="fitView"?d.setState({fitViewQueued:m}):f==="fitViewOptions"?d.setState({fitViewOptions:m}):d.setState({[f]:m})))}_.current=e},v9.map(f=>e[f])),null}function x9(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function S2t(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=x9(),a=()=>t(s!=null&&s.matches?"dark":"light");return a(),s==null||s.addEventListener("change",a),()=>{s==null||s.removeEventListener("change",a)}},[e]),n!==null?n:(r=x9())!=null&&r.matches?"dark":"light"}const y9=typeof document<"u"?document:null;function dh(e=null,n={target:y9,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),a=M.useRef(new Set([])),[o,l]=M.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` `).replace(` `,` +`).split(` -`)),_=d.reduce((f,m)=>f.concat(...m),[]);return[d,_]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(n==null?void 0:n.target)??m9,d=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=g=>{var b,v;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!d)&&XM(g))return!1;const k=v9(g.code,l);if(a.current.add(g[k]),g9(o,a.current,!1)){const x=((v=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:v[0])||g.target,y=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&g.preventDefault(),r(!0)}},f=g=>{const S=v9(g.code,l);g9(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[S]),g.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",_),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",_),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),t}function g9(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function v9(e,n){return n.includes(e)?"code":"key"}const ovt=()=>{const e=tr();return M.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,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??a},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:a,maxZoom:o,panZoom:l}=e.getState(),c=N4(n,r,s,a,o,(t==null?void 0:t.padding)??.1);return l?(await l.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:a,domNode:o}=e.getState();if(!o)return n;const{x:l,y:c}=o.getBoundingClientRect(),d={x:n.x-l,y:n.y-c},_=t.snapGrid??s,f=t.snapToGrid??a;return Oh(d,r,f,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:a}=r.getBoundingClientRect(),o=nd(n,t);return{x:o.x+s,y:o.y+a}}}),[])};function vR(e,n){const t=[],r=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of n){const o=r.get(a.id);if(!o){t.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){t.push({...o[0].item});continue}const l={...a};for(const c of o)lvt(c,l);t.push(l)}return s.length&&s.forEach(a=>{a.index!==void 0?t.splice(a.index,0,{...a.item}):t.push({...a.item})}),t}function lvt(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 cvt(e,n){return vR(e,n)}function uvt(e,n){return vR(e,n)}function ic(e,n){return{id:e,type:"select",selected:n}}function Au(e,n=new Set,t=!1){const r=[];for(const[s,a]of e){const o=n.has(s);!(a.selected===void 0&&!o)&&a.selected!==o&&(t&&(a.selected=o),r.push(ic(a.id,o)))}return r}function b9({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=n.get(o.id),c=((s=l==null?void 0:l.internals)==null?void 0:s.userNode)??l;c!==void 0&&c!==o&&t.push({id:o.id,item:o,type:"replace"}),c===void 0&&t.push({item:o,type:"add",index:a})}for(const[a]of n)r.get(a)===void 0&&t.push({id:a,type:"remove"});return t}function x9(e){return{id:e.id,type:"remove"}}const dvt=VM();function fvt(e,n,t={}){return Ygt(e,n,{...t,onError:t.onError??dvt})}const y9=e=>Dgt(e),hvt=e=>PM(e);function bR(e){return M.forwardRef(e)}const _vt=typeof window<"u"?M.useLayoutEffect:M.useEffect;function w9(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>pvt(()=>t(s=>s+BigInt(1))));return _vt(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function pvt(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const xR=M.createContext(null);function mvt({children:e}){const n=tr(),t=M.useCallback(l=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:_,onNodesChange:f,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:S}=n.getState();let k=c;for(const v of l)k=typeof v=="function"?v(k):v;let b=b9({items:k,lookup:m});for(const v of S.values())b=v(b);_&&d(k),b.length>0?f==null||f(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:x,setNodes:y}=n.getState();v&&y(x)})},[]),r=w9(t),s=M.useCallback(l=>{const{edges:c=[],setEdges:d,hasDefaultEdges:_,onEdgesChange:f,edgeLookup:m}=n.getState();let g=c;for(const S of l)g=typeof S=="function"?S(g):S;_?d(g):f&&f(b9({items:g,lookup:m}))},[]),a=w9(s),o=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return h.jsx(xR.Provider,{value:o,children:e})}function gvt(){const e=M.useContext(xR);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const vvt=e=>!!e.panZoom;function D4(){const e=ovt(),n=tr(),t=gvt(),r=_n(vvt),s=M.useMemo(()=>{const a=f=>n.getState().nodeLookup.get(f),o=f=>{t.nodeQueue.push(f)},l=f=>{t.edgeQueue.push(f)},c=f=>{var v,x;const{nodeLookup:m,nodeOrigin:g}=n.getState(),S=y9(f)?f:m.get(f.id),k=S.parentId?KM(S.position,S.measured,S.parentId,m,g):S.position,b={...S,position:k,width:((v=S.measured)==null?void 0:v.width)??S.width,height:((x=S.measured)==null?void 0:x.height)??S.height};return oh(b)},d=(f,m,g={replace:!1})=>{o(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&y9(b)?b:{...k,...b}}return k}))},_=(f,m,g={replace:!1})=>{l(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&hvt(b)?b:{...k,...b}}return k}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var m;return(m=a(f))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(m=>({...m}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:o,setEdges:l,addNodes:f=>{const m=Array.isArray(f)?f:[f];t.nodeQueue.push(g=>[...g,...m])},addEdges:f=>{const m=Array.isArray(f)?f:[f];t.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:f=[],edges:m=[],transform:g}=n.getState(),[S,k,b]=g;return{nodes:f.map(v=>({...v})),edges:m.map(v=>({...v})),viewport:{x:S,y:k,zoom:b}}},deleteElements:async({nodes:f=[],edges:m=[]})=>{const{nodes:g,edges:S,onNodesDelete:k,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:x,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:z,edges:E}=await $gt({nodesToRemove:f,edgesToRemove:m,nodes:g,edges:S,onBeforeDelete:C}),j=E.length>0,A=z.length>0;if(j){const D=E.map(x9);b==null||b(E),x(D)}if(A){const D=z.map(x9);k==null||k(z),v(D)}return(A||j)&&(y==null||y({nodes:z,edges:E})),{deletedNodes:z,deletedEdges:E}},getIntersectingNodes:(f,m=!0,g)=>{const S=VC(f),k=S?f:c(f),b=g!==void 0;return k?(g||n.getState().nodes).filter(v=>{const x=n.getState().nodeLookup.get(v.id);if(x&&!S&&(v.id===f.id||!x.internals.positionAbsolute))return!1;const y=oh(b?v:x),C=zp(y,k);return m&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,m,g=!0)=>{const k=VC(f)?f:c(f);if(!k)return!1;const b=zp(k,m);return g&&b>0||b>=m.width*m.height||b>=k.width*k.height},updateNode:d,updateNodeData:(f,m,g={replace:!1})=>{d(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},updateEdge:_,updateEdgeData:(f,m,g={replace:!1})=>{_(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},getNodesBounds:f=>{const{nodeLookup:m,nodeOrigin:g}=n.getState();return Lgt(f,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:f,id:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}-${f}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:f,handleId:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}${f?m?`-${f}-${m}`:`-${f}`:""}`))==null?void 0:S.values())??[])},fitView:async f=>{const m=n.getState().fitViewResolver??Fgt();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:m}),t.nodeQueue.push(g=>[...g]),m.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const S9=e=>e.selected,bvt=typeof window<"u"?window:void 0;function xvt({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=tr(),{deleteElements:r}=D4(),s=ch(e,{actInsideInputWithModifier:!1}),a=ch(n,{target:bvt});M.useEffect(()=>{if(s){const{edges:o,nodes:l}=t.getState();r({nodes:l.filter(S9),edges:o.filter(S9)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:a})},[a])}function yvt(e){const n=tr();M.useEffect(()=>{const t=()=>{var s,a,o,l;if(!e.current||!(((a=(s=e.current).checkVisibility)==null?void 0:a.call(s))??!0))return!1;const r=z4(e.current);(r.height===0||r.width===0)&&((l=(o=n.getState()).onError)==null||l.call(o,"004",ea.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 $m={position:"absolute",width:"100%",height:"100%",top:0,left:0},wvt=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Svt({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=pc.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:_,maxZoom:f,zoomActivationKeyCode:m,preventScrolling:g=!0,children:S,noWheelClassName:k,noPanClassName:b,onViewportChange:v,isControlledViewport:x,paneClickDistance:y,selectionOnDrag:C}){const z=tr(),E=M.useRef(null),{userSelectionActive:j,lib:A,connectionInProgress:D}=_n(wvt,Jn),O=ch(m),P=M.useRef();yvt(E);const $=M.useCallback(F=>{v==null||v({x:F[0],y:F[1],zoom:F[2]}),x||z.setState({transform:F})},[v,x]);return M.useEffect(()=>{if(E.current){P.current=C1t({domNode:E.current,minZoom:_,maxZoom:f,translateExtent:d,viewport:c,onDraggingChange:W=>z.setState(Z=>Z.paneDragging===W?Z:{paneDragging:W}),onPanZoomStart:(W,Z)=>{const{onViewportChangeStart:J,onMoveStart:H}=z.getState();H==null||H(W,Z),J==null||J(Z)},onPanZoom:(W,Z)=>{const{onViewportChange:J,onMove:H}=z.getState();H==null||H(W,Z),J==null||J(Z)},onPanZoomEnd:(W,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:H}=z.getState();H==null||H(W,Z),J==null||J(Z)}});const{x:F,y:V,zoom:X}=P.current.getViewport();return z.setState({panZoom:P.current,transform:[F,V,X],domNode:E.current.closest(".react-flow")}),()=>{var W;(W=P.current)==null||W.destroy()}}},[]),M.useEffect(()=>{var F;(F=P.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:O,preventScrolling:g,noPanClassName:b,userSelectionActive:j,noWheelClassName:k,lib:A,onTransformChange:$,connectionInProgress:D,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,a,o,l,O,g,b,j,k,A,$,D,C,y]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:$m,children:S})}const kvt=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Cvt(){const{userSelectionActive:e,userSelectionRect:n}=_n(kvt,Jn);return e&&n?h.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 fb=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},Evt=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Nvt({isSelecting:e,selectionKeyPressed:n,selectionMode:t=ah.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:l,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:_,onPaneScroll:f,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:S,children:k}){const b=M.useRef(0),v=tr(),{userSelectionActive:x,elementsSelectable:y,dragging:C,panBy:z,autoPanSpeed:E}=_n(Evt,Jn),j=y&&(e||x),A=M.useRef(null),D=M.useRef(),O=M.useRef(new Set),P=M.useRef(new Set),$=M.useRef(!1),F=M.useRef(!1),V=M.useRef({x:0,y:0}),X=M.useRef(!1),W=q=>{if(F.current||$.current||v.getState().connection.inProgress){F.current=!1,$.current=!1;return}d==null||d(q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},Z=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}_==null||_(q)},J=f?q=>f(q):void 0,H=q=>{F.current&&(q.stopPropagation(),F.current=!1)},L=q=>{var Ve,ft;const{domNode:te,transform:le}=v.getState();if(D.current=te==null?void 0:te.getBoundingClientRect(),!D.current)return;const ge=q.target===A.current;if(!ge&&!!q.target.closest(".nokey")||!e||!(o&&ge||n)||q.button!==0||!q.isPrimary)return;(ft=(Ve=q.target)==null?void 0:Ve.setPointerCapture)==null||ft.call(Ve,q.pointerId),F.current=!1;const{x:Ee,y:Le}=Xi(q.nativeEvent,D.current),Pe=Oh({x:Ee,y:Le},le);v.setState({userSelectionRect:{width:0,height:0,startX:Pe.x,startY:Pe.y,x:Ee,y:Le}}),ge||(q.stopPropagation(),q.preventDefault())};function B(q,te){const{userSelectionRect:le}=v.getState();if(!le)return;const{transform:ge,nodeLookup:ue,edgeLookup:Ce,connectionLookup:Ee,triggerNodeChanges:Le,triggerEdgeChanges:Pe,defaultEdgeOptions:Ve}=v.getState(),ft={x:le.startX,y:le.startY},{x:Be,y:wt}=nd(ft,ge),zt={startX:ft.x,startY:ft.y,x:qkt.id)),P.current=new Set;const St=(Ve==null?void 0:Ve.selectable)??!0;for(const kt of O.current){const xe=Ee.get(kt);if(xe)for(const{edgeId:je}of xe.values()){const We=Ce.get(je);We&&(We.selectable??St)&&P.current.add(je)}}if(!WC(vt,O.current)){const kt=Au(ue,O.current,!0);Le(kt)}if(!WC(Lt,P.current)){const kt=Au(Ce,P.current);Pe(kt)}v.setState({userSelectionRect:zt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!s||!D.current)return;const[q,te]=E4(V.current,D.current,E);z({x:q,y:te}).then(le=>{if(!F.current||!le){b.current=requestAnimationFrame(Y);return}const{x:ge,y:ue}=V.current;B(ge,ue),b.current=requestAnimationFrame(Y)})}const G=()=>{cancelAnimationFrame(b.current),b.current=0,X.current=!1};M.useEffect(()=>()=>G(),[]);const re=q=>{const{userSelectionRect:te,transform:le,resetSelectedElements:ge}=v.getState();if(!D.current||!te)return;const{x:ue,y:Ce}=Xi(q.nativeEvent,D.current);V.current={x:ue,y:Ce};const Ee=nd({x:te.startX,y:te.startY},le);if(!F.current){const Le=n?0:a;if(Math.hypot(ue-Ee.x,Ce-Ee.y)<=Le)return;ge(),l==null||l(q)}F.current=!0,X.current||(Y(),X.current=!0),B(ue,Ce)},he=q=>{var te,le;if(!j){q.target===A.current&&v.getState().connection.inProgress&&($.current=!0);return}q.button===0&&((le=(te=q.target)==null?void 0:te.releasePointerCapture)==null||le.call(te,q.pointerId),!x&&q.target===A.current&&v.getState().userSelectionRect&&(W==null||W(q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(c==null||c(q),v.setState({nodesSelectionActive:O.current.size>0})),G())},oe=q=>{var te,le;(le=(te=q.target)==null?void 0:te.releasePointerCapture)==null||le.call(te,q.pointerId),G()},se=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Lr(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:j?void 0:fb(W,A),onContextMenu:fb(Z,A),onWheel:fb(J,A),onPointerEnter:j?void 0:m,onPointerMove:j?re:g,onPointerUp:he,onPointerCancel:j?oe:void 0,onPointerDownCapture:j?L:void 0,onClickCapture:j?H:void 0,onPointerLeave:S,ref:A,style:$m,children:[k,h.jsx(Cvt,{})]})}function ex({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=n.getState(),d=l.get(e);if(!d){c==null||c("012",ea.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(t||d.selected&&o)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function yR({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:a,nodeClickDistance:o}){const l=tr(),[c,d]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=d1t({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{ex({id:f,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:s,nodeClickDistance:o}),()=>{var f;(f=_.current)==null||f.destroy()}},[t,r,n,a,e,s,o]),c}const zvt=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function wR(){const e=tr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:d,nodeOrigin:_}=e.getState(),f=new Map,m=zvt(o),g=s?a[0]:5,S=s?a[1]:5,k=t.direction.x*g*t.factor,b=t.direction.y*S*t.factor;for(const[,v]of d){if(!m(v))continue;let x={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+b};s&&(x=Lh(x,a));const{position:y,positionAbsolute:C}=FM({nodeId:v.id,nextPosition:x,nodeLookup:d,nodeExtent:r,nodeOrigin:_,onError:l});v.position=y,v.internals.positionAbsolute=C,f.set(v.id,v)}c(f)},[])}const L4=M.createContext(null),Avt=L4.Provider;L4.Consumer;const SR=()=>M.useContext(L4),Tvt=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),kR=M.createContext(null);function jvt({children:e}){const n=_n(Tvt,Jn);return h.jsx(kR.Provider,{value:n,children:e})}function Mvt(){const e=M.useContext(kR);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const Rvt={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Dvt=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:d}=o;if(!l&&!s)return Rvt;const _=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===t;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t,connectingTo:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:a===ed.Strict?(l==null?void 0:l.type)!==t:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!s,valid:_&&d}};function Lvt({type:e="source",position:n=mt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:d,onMouseDown:_,onTouchStart:f,...m},g){var X,W;const S=o||null,k=e==="target",b=tr(),v=SR(),{connectOnClick:x,noPanClassName:y,rfId:C}=Mvt(),{connectingFrom:z,connectingTo:E,clickConnecting:j,isPossibleEndHandle:A,connectionInProcess:D,clickConnectionInProcess:O,valid:P}=_n(Dvt(v,S,e),Jn);v||(W=(X=b.getState()).onError)==null||W.call(X,"010",ea.error010());const $=Z=>{const{defaultEdgeOptions:J,onConnect:H,hasDefaultEdges:L}=b.getState(),B={...J,...Z};if(L){const{edges:Y,setEdges:G,onError:re}=b.getState();G(fvt(B,Y,{onError:re}))}H==null||H(B),l==null||l(B)},F=Z=>{if(!v)return;const J=ZM(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){const H=b.getState();J2.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:H.autoPanOnConnect,connectionMode:H.connectionMode,connectionRadius:H.connectionRadius,domNode:H.domNode,nodeLookup:H.nodeLookup,lib:H.lib,isTarget:k,handleId:S,nodeId:v,flowId:H.rfId,panBy:H.panBy,cancelConnection:H.cancelConnection,onConnectStart:H.onConnectStart,onConnectEnd:(...L)=>{var B,Y;return(Y=(B=b.getState()).onConnectEnd)==null?void 0:Y.call(B,...L)},updateConnection:H.updateConnection,onConnect:$,isValidConnection:t||((...L)=>{var B,Y;return((Y=(B=b.getState()).isValidConnection)==null?void 0:Y.call(B,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:H.autoPanSpeed,dragThreshold:H.connectionDragThreshold})}J?_==null||_(Z):f==null||f(Z)},V=Z=>{const{onClickConnectStart:J,onClickConnectEnd:H,connectionClickStartHandle:L,connectionMode:B,isValidConnection:Y,lib:G,rfId:re,nodeLookup:he,connection:oe}=b.getState();if(!v||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:v,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:S}});return}const se=YM(Z.target),q=t||Y,{connection:te,isValid:le}=J2.isValid(Z.nativeEvent,{handle:{nodeId:v,id:S,type:e},connectionMode:B,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:q,flowId:re,doc:se,lib:G,nodeLookup:he});le&&te&&$(te);const ge=structuredClone(oe);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,H==null||H(Z,ge),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":S,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${S}-${e}`,className:Lr(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,d,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:a,clickconnecting:j,connectingfrom:z,connectingto:E,valid:P,connectionindicator:r&&(!D||A)&&(D||O?a:s)}]),onMouseDown:F,onTouchStart:F,onClick:x?V:void 0,ref:g,...m,children:c})}const Nl=M.memo(bR(Lvt));function Ovt({data:e,isConnectable:n,sourcePosition:t=mt.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(Nl,{type:"source",position:t,isConnectable:n})]})}function Ivt({data:e,isConnectable:n,targetPosition:t=mt.Top,sourcePosition:r=mt.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(Nl,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,h.jsx(Nl,{type:"source",position:r,isConnectable:n})]})}function Bvt(){return null}function $vt({data:e,isConnectable:n,targetPosition:t=mt.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(Nl,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Ap={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},k9={input:Ovt,default:Ivt,output:$vt,group:Bvt};function Hvt(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 Pvt=e=>{const{width:n,height:t,x:r,y:s}=Dh(e.nodeLookup,{filter:a=>!!a.selected});return{width:Yi(n)?n:null,height:Yi(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 Fvt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=tr(),{width:s,height:a,transformString:o,userSelectionActive:l}=_n(Pvt,Jn),c=wR(),d=M.useRef(null);M.useEffect(()=>{var g;t||(g=d.current)==null||g.focus({preventScroll:!0})},[t]);const _=!l&&s!==null&&a!==null;if(yR({nodeRef:d,disabled:!_}),!_)return null;const f=e?g=>{const S=r.getState().nodes.filter(k=>k.selected);e(g,S)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Ap,g.key)&&(g.preventDefault(),c({direction:Ap[g.key],factor:g.shiftKey?4:1}))};return h.jsx("div",{className:Lr(["react-flow__nodesselection","react-flow__container",n]),style:{transform:o},children:h.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:m,style:{width:s,height:a}})})}const C9=typeof window<"u"?window:void 0,Uvt=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function CR({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:_,selectionMode:f,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:z,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:A,autoPanOnSelection:D,defaultViewport:O,translateExtent:P,minZoom:$,maxZoom:F,preventScrolling:V,onSelectionContextMenu:X,noWheelClassName:W,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:H,isControlledViewport:L}){const{nodesSelectionActive:B,userSelectionActive:Y}=_n(Uvt,Jn),G=ch(d,{target:C9}),re=ch(k,{target:C9}),he=re||A,oe=re||C,se=_&&he!==!0,q=G||Y||se;return xvt({deleteKeyCode:c,multiSelectionKeyCode:S}),h.jsx(Svt,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:oe,panOnScrollSpeed:z,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:!G&&he,defaultViewport:O,translateExtent:P,minZoom:$,maxZoom:F,zoomActivationKeyCode:b,preventScrolling:V,noWheelClassName:W,noPanClassName:Z,onViewportChange:H,isControlledViewport:L,paneClickDistance:l,selectionOnDrag:se,children:h.jsxs(Nvt,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:he,autoPanOnSelection:D,isSelecting:!!q,selectionMode:f,selectionKeyPressed:G,paneClickDistance:l,selectionOnDrag:se,children:[e,B&&h.jsx(Fvt,{onSelectionContextMenu:X,noPanClassName:Z,disableKeyboardA11y:J})]})})}CR.displayName="FlowRenderer";const qvt=M.memo(CR),Gvt=e=>n=>e?C4(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 Vvt(e){return _n(M.useCallback(Gvt(e),[e]),Jn)}const Wvt=e=>e.updateNodeInternals;function Kvt(){const e=_n(Wvt),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const a=s.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function Yvt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=tr(),a=M.useRef(null),o=M.useRef(null),l=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),d=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!_||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[_,e.hidden]),M.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),M.useEffect(()=>{if(a.current){const f=d.current!==n,m=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(f||m||g)&&(d.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),a}function Xvt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:_,resizeObserver:f,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:S,rfId:k,nodeTypes:b,nodeClickDistance:v,onError:x}){const{node:y,internals:C,isParent:z}=_n(q=>{const te=q.nodeLookup.get(e),le=q.parentLookup.has(e);return{node:te,internals:te.internals,isParent:le}},Jn);let E=y.type||"default",j=(b==null?void 0:b[E])||k9[E];j===void 0&&(x==null||x("003",ea.error003(E)),E="default",j=(b==null?void 0:b.default)||k9.default);const A=!!(y.draggable||l&&typeof y.draggable>"u"),D=!!(y.selectable||c&&typeof y.selectable>"u"),O=!!(y.connectable||d&&typeof y.connectable>"u"),P=!!(y.focusable||_&&typeof y.focusable>"u"),$=tr(),F=WM(y),V=Yvt({node:y,nodeType:E,hasDimensions:F,resizeObserver:f}),X=yR({nodeRef:V,disabled:y.hidden||!A,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:v}),W=wR();if(y.hidden)return null;const Z=To(y),J=Hvt(y),H=D||A||n||t||r||s,L=t?q=>t(q,{...C.userNode}):void 0,B=r?q=>r(q,{...C.userNode}):void 0,Y=s?q=>s(q,{...C.userNode}):void 0,G=a?q=>a(q,{...C.userNode}):void 0,re=o?q=>o(q,{...C.userNode}):void 0,he=q=>{const{selectNodesOnDrag:te,nodeDragThreshold:le}=$.getState();D&&(!te||!A||le>0)&&ex({id:e,store:$,nodeRef:V}),n&&n(q,{...C.userNode})},oe=q=>{if(!(XM(q.nativeEvent)||S)){if(IM.includes(q.key)&&D){const te=q.key==="Escape";ex({id:e,store:$,unselect:te,nodeRef:V})}else if(A&&y.selected&&Object.prototype.hasOwnProperty.call(Ap,q.key)){q.preventDefault();const{ariaLabelConfig:te}=$.getState();$.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),W({direction:Ap[q.key],factor:q.shiftKey?4:1})}}},se=()=>{var Ee;if(S||!((Ee=V.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:q,width:te,height:le,autoPanOnNodeFocus:ge,setCenter:ue}=$.getState();if(!ge)return;C4(new Map([[e,y]]),{x:0,y:0,width:te,height:le},q,!0).length>0||ue(y.position.x+Z.width/2,y.position.y+Z.height/2,{zoom:q[2]})};return h.jsx("div",{className:Lr(["react-flow__node",`react-flow__node-${E}`,{[g]:A},y.className,{selected:y.selected,selectable:D,parent:z,draggable:A,dragging:X}]),ref:V,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:H?"all":"none",visibility:F?"visible":"hidden",...y.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:B,onMouseLeave:Y,onContextMenu:G,onClick:he,onDoubleClick:re,onKeyDown:P?oe:void 0,tabIndex:P?0:void 0,onFocus:P?se:void 0,role:y.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${pR}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:h.jsx(Avt,{value:e,children:h.jsx(j,{id:e,data:y.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:A,deletable:y.deletable??!0,isConnectable:O,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:X,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...Z})})})}var Zvt=M.memo(Xvt);const Qvt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function ER(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:a}=_n(Qvt,Jn),o=Vvt(e.onlyRenderVisibleElements),l=Kvt();return h.jsx("div",{className:"react-flow__nodes",style:$m,children:o.map(c=>h.jsx(Zvt,{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:l,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}ER.displayName="NodeRenderer";const Jvt=M.memo(ER);function ebt(e){return _n(M.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 a=t.nodeLookup.get(s.source),o=t.nodeLookup.get(s.target);a&&o&&Vgt({sourceNode:a,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Jn)}const tbt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},nbt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},E9={[Ep.Arrow]:tbt,[Ep.ArrowClosed]:nbt};function rbt(e){const n=tr();return M.useMemo(()=>{var s,a;return Object.prototype.hasOwnProperty.call(E9,e)?E9[e]:((a=(s=n.getState()).onError)==null||a.call(s,"009",ea.error009(e)),null)},[e])}const sbt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=rbt(n);return c?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:h.jsx(c,{color:t,strokeWidth:o})}):null},NR=({defaultColor:e,rfId:n})=>{const t=_n(a=>a.edges),r=_n(a=>a.defaultEdgeOptions),s=M.useMemo(()=>e1t(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?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(a=>h.jsx(sbt,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};NR.displayName="MarkerDefinitions";var ibt=M.memo(NR);function zR({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:d,..._}){const[f,m]=M.useState({x:1,y:0,width:0,height:0}),g=Lr(["react-flow__edge-textwrapper",d]),S=M.useRef(null);return M.useEffect(()=>{if(S.current){const k=S.current.getBBox();m({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?h.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:g,visibility:f.width?"visible":"hidden",..._,children:[s&&h.jsx("rect",{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),h.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:S,style:r,children:t}),c]}):null}zR.displayName="EdgeText";const abt=M.memo(zR);function Hm({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:d=20,..._}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{..._,d:e,fill:"none",className:Lr(["react-flow__edge-path",_.className])}),d?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Yi(n)&&Yi(t)?h.jsx(abt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function N9({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===mt.Left||e===mt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function AR({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top}){const[o,l]=N9({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,d]=N9({pos:a,x1:r,y1:s,x2:e,y2:n}),[_,f,m,g]=QM({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${n} C${o},${l} ${c},${d} ${r},${s}`,_,f,m,g]}function TR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})=>{const[x,y,C]=AR({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l}),z=e.isInternal?void 0:n;return h.jsx(Hm,{id:z,path:x,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})})}const obt=TR({isInternal:!1}),jR=TR({isInternal:!0});obt.displayName="SimpleBezierEdge";jR.displayName="SimpleBezierEdgeInternal";function MR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,sourcePosition:g=mt.Bottom,targetPosition:S=mt.Top,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,z]=X2({sourceX:t,sourceY:r,sourcePosition:g,targetX:s,targetY:a,targetPosition:S,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return h.jsx(Hm,{id:E,path:y,labelX:C,labelY:z,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:k,markerStart:b,interactionWidth:x})})}const RR=MR({isInternal:!1}),DR=MR({isInternal:!0});RR.displayName="SmoothStepEdge";DR.displayName="SmoothStepEdgeInternal";function LR(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return h.jsx(RR,{...t,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=t.pathOptions)==null?void 0:a.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const lbt=LR({isInternal:!1}),OR=LR({isInternal:!0});lbt.displayName="StepEdge";OR.displayName="StepEdgeInternal";function IR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})=>{const[b,v,x]=tR({sourceX:t,sourceY:r,targetX:s,targetY:a}),y=e.isInternal?void 0:n;return h.jsx(Hm,{id:y,path:b,labelX:v,labelY:x,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})})}const cbt=IR({isInternal:!1}),BR=IR({isInternal:!0});cbt.displayName="StraightEdge";BR.displayName="StraightEdgeInternal";function $R(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o=mt.Bottom,targetPosition:l=mt.Top,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,z]=JM({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return h.jsx(Hm,{id:E,path:y,labelX:C,labelY:z,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:x})})}const ubt=$R({isInternal:!1}),HR=$R({isInternal:!0});ubt.displayName="BezierEdge";HR.displayName="BezierEdgeInternal";const z9={default:HR,straight:BR,step:OR,smoothstep:DR,simplebezier:jR},A9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},dbt=(e,n,t)=>t===mt.Left?e-n:t===mt.Right?e+n:e,fbt=(e,n,t)=>t===mt.Top?e-n:t===mt.Bottom?e+n:e,T9="react-flow__edgeupdater";function j9({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:a,onMouseOut:o,type:l}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:o,className:Lr([T9,`${T9}-${l}`]),cx:dbt(n,r,e),cy:fbt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function hbt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:d,onReconnectStart:_,onReconnectEnd:f,setReconnecting:m,setUpdateHover:g}){const S=tr(),k=(C,z)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:j,connectionMode:A,connectionRadius:D,lib:O,onConnectStart:P,cancelConnection:$,nodeLookup:F,rfId:V,panBy:X,updateConnection:W}=S.getState(),Z=z.type==="target",J=(B,Y)=>{m(!1),f==null||f(B,t,z.type,Y)},H=B=>d==null?void 0:d(t,B),L=(B,Y)=>{m(!0),_==null||_(C,t,z.type),P==null||P(B,Y)};J2.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:A,connectionRadius:D,domNode:j,handleId:z.id,nodeId:z.nodeId,nodeLookup:F,isTarget:Z,edgeUpdaterType:z.type,lib:O,flowId:V,cancelConnection:$,panBy:X,isValidConnection:(...B)=>{var Y,G;return((G=(Y=S.getState()).isValidConnection)==null?void 0:G.call(Y,...B))??!0},onConnect:H,onConnectStart:L,onConnectEnd:(...B)=>{var Y,G;return(G=(Y=S.getState()).onConnectEnd)==null?void 0:G.call(Y,...B)},onReconnectEnd:J,updateConnection:W,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>g(!0),y=()=>g(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(j9,{position:l,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:x,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&h.jsx(j9,{position:c,centerX:a,centerY:o,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:y,type:"target"})]})}function _bt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,rfId:S,edgeTypes:k,noPanClassName:b,onError:v,disableKeyboardA11y:x}){let y=_n(ue=>ue.edgeLookup.get(e));const C=_n(ue=>ue.defaultEdgeOptions);y=C?{...C,...y}:y;let z=y.type||"default",E=(k==null?void 0:k[z])||z9[z];E===void 0&&(v==null||v("011",ea.error011(z)),z="default",E=(k==null?void 0:k.default)||z9.default);const j=!!(y.focusable||n&&typeof y.focusable>"u"),A=typeof f<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),D=!!(y.selectable||r&&typeof y.selectable>"u"),O=M.useRef(null),[P,$]=M.useState(!1),[F,V]=M.useState(!1),X=tr(),{zIndex:W=y.zIndex,sourceX:Z,sourceY:J,targetX:H,targetY:L,sourcePosition:B,targetPosition:Y}=_n(M.useCallback(ue=>{const Ce=ue.nodeLookup.get(y.source),Ee=ue.nodeLookup.get(y.target);if(!Ce||!Ee)return A9;const Le=Jgt({id:e,sourceNode:Ce,targetNode:Ee,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ue.connectionMode,onError:v}),Pe=Ggt({selected:y.selected,zIndex:y.zIndex,sourceNode:Ce,targetNode:Ee,elevateOnSelect:ue.elevateEdgesOnSelect,zIndexMode:ue.zIndexMode});return{...Le||A9,zIndex:Pe}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Jn),G=M.useMemo(()=>y.markerStart?`url('#${Z2(y.markerStart,S)}')`:void 0,[y.markerStart,S]),re=M.useMemo(()=>y.markerEnd?`url('#${Z2(y.markerEnd,S)}')`:void 0,[y.markerEnd,S]);if(y.hidden||Z===null||J===null||H===null||L===null)return null;const he=ue=>{var Pe;const{addSelectedEdges:Ce,unselectNodesAndEdges:Ee,multiSelectionActive:Le}=X.getState();D&&(X.setState({nodesSelectionActive:!1}),y.selected&&Le?(Ee({nodes:[],edges:[y]}),(Pe=O.current)==null||Pe.blur()):Ce([e])),s&&s(ue,y)},oe=a?ue=>{a(ue,{...y})}:void 0,se=o?ue=>{o(ue,{...y})}:void 0,q=l?ue=>{l(ue,{...y})}:void 0,te=c?ue=>{c(ue,{...y})}:void 0,le=d?ue=>{d(ue,{...y})}:void 0,ge=ue=>{var Ce;if(!x&&IM.includes(ue.key)&&D){const{unselectNodesAndEdges:Ee,addSelectedEdges:Le}=X.getState();ue.key==="Escape"?((Ce=O.current)==null||Ce.blur(),Ee({edges:[y]})):Le([e])}};return h.jsx("svg",{style:{zIndex:W},children:h.jsxs("g",{className:Lr(["react-flow__edge",`react-flow__edge-${z}`,y.className,b,{selected:y.selected,animated:y.animated,inactive:!D&&!s,updating:P,selectable:D}]),onClick:he,onDoubleClick:oe,onContextMenu:se,onMouseEnter:q,onMouseMove:te,onMouseLeave:le,onKeyDown:j?ge:void 0,tabIndex:j?0:void 0,role:y.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":j?`${mR}-${S}`:void 0,ref:O,...y.domAttributes,children:[!F&&h.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:D,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:H,targetY:L,sourcePosition:B,targetPosition:Y,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:G,markerEnd:re,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),A&&h.jsx(hbt,{edge:y,isReconnectable:A,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,sourceX:Z,sourceY:J,targetX:H,targetY:L,sourcePosition:B,targetPosition:Y,setUpdateHover:$,setReconnecting:V})]})})}var pbt=M.memo(_bt);const mbt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function PR({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:_,reconnectRadius:f,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,disableKeyboardA11y:k}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,onError:y}=_n(mbt,Jn),C=ebt(n);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(ibt,{defaultColor:e,rfId:t}),C.map(z=>h.jsx(pbt,{id:z,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,noPanClassName:s,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:_,reconnectRadius:f,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},z))]})}PR.displayName="EdgeRenderer";const gbt=M.memo(PR),vbt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function bbt({children:e}){const n=_n(vbt);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function xbt(e){const n=D4(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const ybt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function wbt(e){const n=_n(ybt),t=tr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function Sbt(e){return e.connection.inProgress?{...e.connection,to:Oh(e.connection.to,e.transform)}:{...e.connection}}function kbt(e){return Sbt}function Cbt(e){const n=kbt();return _n(n,Jn)}const Ebt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Nbt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:a,height:o,isValid:l,inProgress:c}=_n(Ebt,Jn);return!(a&&s&&c)?null:h.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Lr(["react-flow__connection",HM(l)]),children:h.jsx(FR,{style:n,type:t,CustomComponent:r,isValid:l})})})}const FR=({style:e,type:n=ml.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:d,toNode:_,toHandle:f,toPosition:m,pointer:g}=Cbt();if(!s)return;if(t)return h.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:HM(r),toNode:_,toHandle:f,pointer:g});let S="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(n){case ml.Bezier:[S]=JM(k);break;case ml.SimpleBezier:[S]=AR(k);break;case ml.Step:[S]=X2({...k,borderRadius:0});break;case ml.SmoothStep:[S]=X2(k);break;default:[S]=tR(k)}return h.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};FR.displayName="ConnectionLine";const zbt={};function M9(e=zbt){M.useRef(e),tr(),M.useEffect(()=>{},[e])}function Abt(){tr(),M.useRef(!1),M.useEffect(()=>{},[])}function UR({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,onSelectionContextMenu:f,onSelectionStart:m,onSelectionEnd:g,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:z,panActivationKeyCode:E,zoomActivationKeyCode:j,deleteKeyCode:A,onlyRenderVisibleElements:D,elementsSelectable:O,defaultViewport:P,translateExtent:$,minZoom:F,maxZoom:V,preventScrolling:X,defaultMarkerColor:W,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:H,panOnScrollSpeed:L,panOnScrollMode:B,zoomOnDoubleClick:Y,panOnDrag:G,autoPanOnSelection:re,onPaneClick:he,onPaneMouseEnter:oe,onPaneMouseMove:se,onPaneMouseLeave:q,onPaneScroll:te,onPaneContextMenu:le,paneClickDistance:ge,nodeClickDistance:ue,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,onReconnect:ft,onReconnectStart:Be,onReconnectEnd:wt,noDragClassName:zt,noWheelClassName:vt,noPanClassName:Lt,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe,viewport:je,onViewportChange:We}){return M9(e),M9(n),Abt(),xbt(t),wbt(je),h.jsx(qvt,{onPaneClick:he,onPaneMouseEnter:oe,onPaneMouseMove:se,onPaneMouseLeave:q,onPaneContextMenu:le,onPaneScroll:te,paneClickDistance:ge,deleteKeyCode:A,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:z,panActivationKeyCode:E,zoomActivationKeyCode:j,elementsSelectable:O,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:Y,panOnScroll:H,panOnScrollSpeed:L,panOnScrollMode:B,panOnDrag:G,autoPanOnSelection:re,defaultViewport:P,translateExtent:$,minZoom:F,maxZoom:V,onSelectionContextMenu:f,preventScrolling:X,noDragClassName:zt,noWheelClassName:vt,noPanClassName:Lt,disableKeyboardA11y:St,onViewportChange:We,isControlledViewport:!!je,children:h.jsxs(bbt,{children:[h.jsx(gbt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:o,onReconnect:ft,onReconnectStart:Be,onReconnectEnd:wt,onlyRenderVisibleElements:D,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,defaultMarkerColor:W,noPanClassName:Lt,disableKeyboardA11y:St,rfId:xe}),h.jsx(Nbt,{style:k,type:S,component:b,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(Jvt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,nodeClickDistance:ue,onlyRenderVisibleElements:D,noPanClassName:Lt,noDragClassName:zt,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}UR.displayName="GraphView";const Tbt=M.memo(UR),jbt=VM(),R9=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:d=2,nodeOrigin:_,nodeExtent:f,zIndexMode:m="basic"}={})=>{const g=new Map,S=new Map,k=new Map,b=new Map,v=r??n??[],x=t??e??[],y=_??[0,0],C=f??ih;sR(k,b,v);const{nodesInitialized:z}=Q2(x,g,S,{nodeOrigin:y,nodeExtent:C,zIndexMode:m});let E=[0,0,1];if(o&&s&&a){const j=Dh(g,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:A,y:D,zoom:O}=N4(j,s,a,c,d,(l==null?void 0:l.padding)??.1);E=[A,D,O]}return{rfId:"1",width:s??0,height:a??0,transform:E,nodes:x,nodesInitialized:z,nodeLookup:g,parentLookup:S,edges:v,edgeLookup:b,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:ih,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ed.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...$M},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:jbt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BM,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Mbt=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m})=>F1t((g,S)=>{async function k(){const{nodeLookup:b,panZoom:v,fitViewOptions:x,fitViewResolver:y,width:C,height:z,minZoom:E,maxZoom:j}=S();v&&(await Bgt({nodes:b,width:C,height:z,panZoom:v,minZoom:E,maxZoom:j},x),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...R9({nodes:e,edges:n,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:m}),setNodes:b=>{const{nodeLookup:v,parentLookup:x,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:z,zIndexMode:E,nodesSelectionActive:j}=S(),{nodesInitialized:A,hasSelectedNodes:D}=Q2(b,v,x,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),O=j&&D;z&&A?(k(),g({nodes:b,nodesInitialized:A,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:O})):g({nodes:b,nodesInitialized:A,nodesSelectionActive:O})},setEdges:b=>{const{connectionLookup:v,edgeLookup:x}=S();sR(v,x,b),g({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:x}=S();x(b),g({hasDefaultNodes:!0})}if(v){const{setEdges:x}=S();x(v),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:x,parentLookup:y,domNode:C,nodeOrigin:z,nodeExtent:E,debug:j,fitViewQueued:A,zIndexMode:D}=S(),{changes:O,updatedInternals:P}=o1t(b,x,y,C,z,E,D);P&&(r1t(x,y,{nodeOrigin:z,nodeExtent:E,zIndexMode:D}),A?(k(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(O==null?void 0:O.length)>0&&(j&&console.log("React Flow: trigger node changes",O),v==null||v(O)))},updateNodePositions:(b,v=!1)=>{const x=[];let y=[];const{nodeLookup:C,triggerNodeChanges:z,connection:E,updateConnection:j,onNodesChangeMiddlewareMap:A}=S();for(const[D,O]of b){const P=C.get(D),$=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(O!=null&&O.position)),F={id:D,type:"position",position:$?{x:Math.max(0,O.position.x),y:Math.max(0,O.position.y)}:O.position,dragging:v};if(P&&E.inProgress&&E.fromNode.id===P.id){const V=wc(P,E.fromHandle,mt.Left,!0);j({...E,from:V})}$&&P.parentId&&x.push({id:D,parentId:P.parentId,rect:{...O.internals.positionAbsolute,width:O.measured.width??0,height:O.measured.height??0}}),y.push(F)}if(x.length>0){const{parentLookup:D,nodeOrigin:O}=S(),P=R4(x,C,D,O);y.push(...P)}for(const D of A.values())y=D(y);z(y)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:x,nodes:y,hasDefaultNodes:C,debug:z}=S();if(b!=null&&b.length){if(C){const E=cvt(b,y);x(E)}z&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:x,edges:y,hasDefaultEdges:C,debug:z}=S();if(b!=null&&b.length){if(C){const E=uvt(b,y);x(E)}z&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:z}=S();if(v){const E=b.map(j=>ic(j,!0));C(E);return}C(Au(y,new Set([...b]),!0)),z(Au(x))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:z}=S();if(v){const E=b.map(j=>ic(j,!0));z(E);return}z(Au(x,new Set([...b]))),C(Au(y,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:x,nodes:y,nodeLookup:C,triggerNodeChanges:z,triggerEdgeChanges:E}=S(),j=b||y,A=v||x,D=[];for(const P of j){if(!P.selected)continue;const $=C.get(P.id);$&&($.selected=!1),D.push(ic(P.id,!1))}const O=[];for(const P of A)P.selected&&O.push(ic(P.id,!1));z(D),E(O)},setMinZoom:b=>{const{panZoom:v,maxZoom:x}=S();v==null||v.setScaleExtent([b,x]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:x}=S();v==null||v.setScaleExtent([x,b]),g({maxZoom:b})},setTranslateExtent:b=>{var v;(v=S().panZoom)==null||v.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:x,triggerEdgeChanges:y,elementsSelectable:C}=S();if(!C)return;const z=v.reduce((j,A)=>A.selected?[...j,ic(A.id,!1)]:j,[]),E=b.reduce((j,A)=>A.selected?[...j,ic(A.id,!1)]:j,[]);x(z),y(E)},setNodeExtent:b=>{const{nodes:v,nodeLookup:x,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:z,nodeExtent:E,zIndexMode:j}=S();b[0][0]===E[0][0]&&b[0][1]===E[0][1]&&b[1][0]===E[1][0]&&b[1][1]===E[1][1]||(Q2(v,x,y,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:z,checkEquality:!1,zIndexMode:j}),g({nodeExtent:b}))},panBy:b=>{const{transform:v,width:x,height:y,panZoom:C,translateExtent:z}=S();return l1t({delta:b,panZoom:C,transform:v,translateExtent:z,width:x,height:y})},setCenter:async(b,v,x)=>{const{width:y,height:C,maxZoom:z,panZoom:E}=S();if(!E)return!1;const j=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:z;return await E.setViewport({x:y/2-b*j,y:C/2-v*j,zoom:j},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{g({connection:{...$M}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...R9()})}},Object.is);function Rbt({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m,children:g}){const[S]=M.useState(()=>Mbt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:d,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:_,nodeExtent:f,zIndexMode:m}));return h.jsx(U1t,{value:S,children:h.jsx(mvt,{children:h.jsx(jvt,{children:g})})})}function Dbt({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g}){return M.useContext(Im)?h.jsx(h.Fragment,{children:e}):h.jsx(Rbt,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g,children:e})}const Lbt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Obt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:_,onMoveStart:f,onMoveEnd:m,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:z,onNodeDoubleClick:E,onNodeDragStart:j,onNodeDrag:A,onNodeDragStop:D,onNodesDelete:O,onEdgesDelete:P,onDelete:$,onSelectionChange:F,onSelectionDragStart:V,onSelectionDrag:X,onSelectionDragStop:W,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:H,onBeforeDelete:L,connectionMode:B,connectionLineType:Y=ml.Bezier,connectionLineStyle:G,connectionLineComponent:re,connectionLineContainerStyle:he,deleteKeyCode:oe="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:q=!1,selectionMode:te=ah.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ge=lh()?"Meta":"Control",zoomActivationKeyCode:ue=lh()?"Meta":"Control",snapToGrid:Ce,snapGrid:Ee,onlyRenderVisibleElements:Le=!1,selectNodesOnDrag:Pe,nodesDraggable:Ve,autoPanOnNodeFocus:ft,nodesConnectable:Be,nodesFocusable:wt,nodeOrigin:zt=gR,edgesFocusable:vt,edgesReconnectable:Lt,elementsSelectable:St=!0,defaultViewport:kt=nvt,minZoom:xe=.5,maxZoom:je=2,translateExtent:We=ih,preventScrolling:st=!0,nodeExtent:nt,defaultMarkerColor:Ht="#b1b1b7",zoomOnScroll:bt=!0,zoomOnPinch:tn=!0,panOnScroll:Vt=!1,panOnScrollSpeed:pn=.5,panOnScrollMode:Dt=pc.Free,zoomOnDoubleClick:En=!0,panOnDrag:Ft=!0,onPaneClick:xr,onPaneMouseEnter:mn,onPaneMouseMove:Ye,onPaneMouseLeave:xt,onPaneScroll:Vn,onPaneContextMenu:Wn,paneClickDistance:Et=1,nodeClickDistance:rt=0,children:Ie,onReconnect:it,onReconnectStart:Ut,onReconnectEnd:Jt,onEdgeContextMenu:jt,onEdgeDoubleClick:Dn,onEdgeMouseEnter:_r,onEdgeMouseMove:as,onEdgeMouseLeave:ar,reconnectRadius:yr=10,onNodesChange:Ts,onEdgesChange:Nn,noDragClassName:nn="nodrag",noWheelClassName:Pn="nowheel",noPanClassName:Or="nopan",fitView:Ir,fitViewOptions:Gr,connectOnClick:ln,attributionPosition:or,proOptions:Cn,defaultEdgeOptions:Je,elevateNodesOnSelect:_t=!0,elevateEdgesOnSelect:wr=!1,disableKeyboardA11y:Sr=!1,autoPanOnConnect:Vr,autoPanOnNodeDrag:Fn,autoPanOnSelection:jo=!0,autoPanSpeed:gs,connectionRadius:os,isValidConnection:js,onError:Xt,style:Ot,id:Ws,nodeDragThreshold:Ii,connectionDragThreshold:kr,viewport:ls,onViewportChange:vs,width:lr,height:Ks,colorMode:Rl="light",debug:$a,onScroll:Br,ariaLabelConfig:cs,zIndexMode:Ys="basic",...Kn},Bi){const Yn=Ws||"1",Ln=avt(Rl),Xs=M.useCallback(na=>{na.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Br==null||Br(na)},[Br]);return h.jsx("div",{"data-testid":"rf__wrapper",...Kn,onScroll:Xs,style:{...Ot,...Lbt},ref:Bi,className:Lr(["react-flow",s,Ln]),id:Ws,role:"application",children:h.jsxs(Dbt,{nodes:e,edges:n,width:lr,height:Ks,fitView:Ir,fitViewOptions:Gr,minZoom:xe,maxZoom:je,nodeOrigin:zt,nodeExtent:nt,zIndexMode:Ys,children:[h.jsx(ivt,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:Ve,autoPanOnNodeFocus:ft,nodesConnectable:Be,nodesFocusable:wt,edgesFocusable:vt,edgesReconnectable:Lt,elementsSelectable:St,elevateNodesOnSelect:_t,elevateEdgesOnSelect:wr,minZoom:xe,maxZoom:je,nodeExtent:nt,onNodesChange:Ts,onEdgesChange:Nn,snapToGrid:Ce,snapGrid:Ee,connectionMode:B,translateExtent:We,connectOnClick:ln,defaultEdgeOptions:Je,fitView:Ir,fitViewOptions:Gr,onNodesDelete:O,onEdgesDelete:P,onDelete:$,onNodeDragStart:j,onNodeDrag:A,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:V,onSelectionDragStop:W,onMove:_,onMoveStart:f,onMoveEnd:m,noPanClassName:Or,nodeOrigin:zt,rfId:Yn,autoPanOnConnect:Vr,autoPanOnNodeDrag:Fn,autoPanSpeed:gs,onError:Xt,connectionRadius:os,isValidConnection:js,selectNodesOnDrag:Pe,nodeDragThreshold:Ii,connectionDragThreshold:kr,onBeforeDelete:L,debug:$a,ariaLabelConfig:cs,zIndexMode:Ys}),h.jsx(Tbt,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:z,onNodeDoubleClick:E,nodeTypes:a,edgeTypes:o,connectionLineType:Y,connectionLineStyle:G,connectionLineComponent:re,connectionLineContainerStyle:he,selectionKeyCode:se,selectionOnDrag:q,selectionMode:te,deleteKeyCode:oe,multiSelectionKeyCode:ge,panActivationKeyCode:le,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Le,defaultViewport:kt,translateExtent:We,minZoom:xe,maxZoom:je,preventScrolling:st,zoomOnScroll:bt,zoomOnPinch:tn,zoomOnDoubleClick:En,panOnScroll:Vt,panOnScrollSpeed:pn,panOnScrollMode:Dt,panOnDrag:Ft,autoPanOnSelection:jo,onPaneClick:xr,onPaneMouseEnter:mn,onPaneMouseMove:Ye,onPaneMouseLeave:xt,onPaneScroll:Vn,onPaneContextMenu:Wn,paneClickDistance:Et,nodeClickDistance:rt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:H,onReconnect:it,onReconnectStart:Ut,onReconnectEnd:Jt,onEdgeContextMenu:jt,onEdgeDoubleClick:Dn,onEdgeMouseEnter:_r,onEdgeMouseMove:as,onEdgeMouseLeave:ar,reconnectRadius:yr,defaultMarkerColor:Ht,noDragClassName:nn,noWheelClassName:Pn,noPanClassName:Or,rfId:Yn,disableKeyboardA11y:Sr,nodeExtent:nt,viewport:ls,onViewportChange:vs}),h.jsx(tvt,{onSelectionChange:F}),Ie,h.jsx(X1t,{proOptions:Cn,position:or}),h.jsx(Y1t,{rfId:Yn,disableKeyboardA11y:Sr})]})})}var Ibt=bR(Obt);function Bbt({dimensions:e,lineWidth:n,variant:t,className:r}){return h.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Lr(["react-flow__background-pattern",t,r])})}function $bt({radius:e,className:n}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Lr(["react-flow__background-pattern","dots",n])})}var xo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xo||(xo={}));const Hbt={[xo.Dots]:1,[xo.Lines]:1,[xo.Cross]:6},Pbt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function qR({id:e,variant:n=xo.Dots,gap:t=20,size:r,lineWidth:s=1,offset:a=0,color:o,bgColor:l,style:c,className:d,patternClassName:_}){const f=M.useRef(null),{transform:m,patternId:g}=_n(Pbt,Jn),S=r||Hbt[n],k=n===xo.Dots,b=n===xo.Cross,v=Array.isArray(t)?t:[t,t],x=[v[0]*m[2]||1,v[1]*m[2]||1],y=S*m[2],C=Array.isArray(a)?a:[a,a],z=b?[y,y]:x,E=[C[0]*m[2]||1+z[0]/2,C[1]*m[2]||1+z[1]/2],j=`${g}${e||""}`;return h.jsxs("svg",{className:Lr(["react-flow__background",d]),style:{...c,...$m,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:f,"data-testid":"rf__background",children:[h.jsx("pattern",{id:j,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:k?h.jsx($bt,{radius:y/2,className:_}):h.jsx(Bbt,{dimensions:z,lineWidth:s,variant:n,className:_})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}qR.displayName="Background";const Fbt=M.memo(qR);function Ubt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function qbt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Gbt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 Vbt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 Wbt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 C0({children:e,className:n,...t}){return h.jsx("button",{type:"button",className:Lr(["react-flow__controls-button",n]),...t,children:e})}const Kbt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function GR({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:d,children:_,position:f="bottom-left",orientation:m="vertical","aria-label":g}){const S=tr(),{isInteractive:k,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:x}=_n(Kbt,Jn),{zoomIn:y,zoomOut:C,fitView:z}=D4(),E=()=>{y(),a==null||a()},j=()=>{C(),o==null||o()},A=()=>{z(s),l==null||l()},D=()=>{S.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},O=m==="horizontal"?"horizontal":"vertical";return h.jsxs(Bm,{className:Lr(["react-flow__controls",O,d]),position:f,style:e,"data-testid":"rf__controls","aria-label":g??x["controls.ariaLabel"],children:[n&&h.jsxs(h.Fragment,{children:[h.jsx(C0,{onClick:E,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(Ubt,{})}),h.jsx(C0,{onClick:j,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(qbt,{})})]}),t&&h.jsx(C0,{className:"react-flow__controls-fitview",onClick:A,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:h.jsx(Gbt,{})}),r&&h.jsx(C0,{className:"react-flow__controls-interactive",onClick:D,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?h.jsx(Wbt,{}):h.jsx(Vbt,{})}),_]})}GR.displayName="Controls";M.memo(GR);function Ybt({id:e,x:n,y:t,width:r,height:s,style:a,color:o,strokeColor:l,strokeWidth:c,className:d,borderRadius:_,shapeRendering:f,selected:m,onClick:g}){const{background:S,backgroundColor:k}=a||{},b=o||S||k;return h.jsx("rect",{className:Lr(["react-flow__minimap-node",{selected:m},d]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:l,strokeWidth:c},shapeRendering:f,onClick:g?v=>g(v,e):void 0})}const Xbt=M.memo(Ybt),Zbt=e=>e.nodes.map(n=>n.id),hb=e=>e instanceof Function?e:()=>e;function Qbt({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:a=Xbt,onClick:o}){const l=_n(Zbt,Jn),c=hb(n),d=hb(e),_=hb(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:l.map(m=>h.jsx(e2t,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:a,onClick:o,shapeRendering:f},m))})}function Jbt({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:d,x:_,y:f,width:m,height:g}=_n(S=>{const k=S.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const b=k.internals.userNode,{x:v,y:x}=k.internals.positionAbsolute,{width:y,height:C}=To(b);return{node:b,x:v,y:x,width:y,height:C}},Jn);return!d||d.hidden||!WM(d)?null:h.jsx(l,{x:_,y:f,width:m,height:g,style:d.style,selected:!!d.selected,className:r(d),color:n(d),borderRadius:s,strokeColor:t(d),strokeWidth:a,shapeRendering:o,onClick:c,id:d.id})}const e2t=M.memo(Jbt);var t2t=M.memo(Qbt);const n2t=200,r2t=150,s2t=e=>!e.hidden,i2t=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?qM(Dh(e.nodeLookup,{filter:s2t}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},a2t="react-flow__minimap-desc";function VR({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:_,maskStrokeWidth:f,position:m="bottom-right",onClick:g,onNodeClick:S,pannable:k=!1,zoomable:b=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:C=5}){const z=tr(),E=M.useRef(null),{boundingRect:j,viewBB:A,rfId:D,panZoom:O,translateExtent:P,flowWidth:$,flowHeight:F,ariaLabelConfig:V}=_n(i2t,Jn),X=(e==null?void 0:e.width)??n2t,W=(e==null?void 0:e.height)??r2t,Z=j.width/X,J=j.height/W,H=Math.max(Z,J),L=H*X,B=H*W,Y=C*H,G=j.x-(L-j.width)/2-Y,re=j.y-(B-j.height)/2-Y,he=L+Y*2,oe=B+Y*2,se=`${a2t}-${D}`,q=M.useRef(0),te=M.useRef();q.current=H,M.useEffect(()=>{if(E.current&&O)return te.current=g1t({domNode:E.current,panZoom:O,getTransform:()=>z.getState().transform,getViewScale:()=>q.current}),()=>{var Ce;(Ce=te.current)==null||Ce.destroy()}},[O]),M.useEffect(()=>{var Ce;(Ce=te.current)==null||Ce.update({translateExtent:P,width:$,height:F,inversePan:x,pannable:k,zoomStep:y,zoomable:b})},[k,b,x,y,P,$,F]);const le=g?Ce=>{var Pe;const[Ee,Le]=((Pe=te.current)==null?void 0:Pe.pointer(Ce))||[0,0];g(Ce,{x:Ee,y:Le})}:void 0,ge=S?M.useCallback((Ce,Ee)=>{const Le=z.getState().nodeLookup.get(Ee).internals.userNode;S(Ce,Le)},[]):void 0,ue=v??V["minimap.ariaLabel"];return h.jsx(Bm,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*H: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 o=="number"?o:void 0},className:Lr(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:X,height:W,viewBox:`${G} ${re} ${he} ${oe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:E,onClick:le,children:[ue&&h.jsx("title",{id:se,children:ue}),h.jsx(t2t,{onClick:ge,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:a,nodeClassName:s,nodeStrokeWidth:o,nodeComponent:l}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-Y},${re-Y}h${he+Y*2}v${oe+Y*2}h${-he-Y*2}z - M${A.x},${A.y}h${A.width}v${A.height}h${-A.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}VR.displayName="MiniMap";M.memo(VR);const o2t=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,l2t={[rd.Line]:"right",[rd.Handle]:"bottom-right"};function c2t({nodeId:e,position:n,variant:t=rd.Handle,className:r,style:s=void 0,children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:m,autoScale:g=!0,shouldResize:S,onResizeStart:k,onResize:b,onResizeEnd:v}){const x=SR(),y=typeof e=="string"?e:x,C=tr(),z=M.useRef(null),E=t===rd.Handle,j=_n(M.useCallback(o2t(E&&g),[E,g]),Jn),A=M.useRef(null),D=n??l2t[t];M.useEffect(()=>{if(!(!z.current||!y))return A.current||(A.current=T1t({domNode:z.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:P,transform:$,snapGrid:F,snapToGrid:V,nodeOrigin:X,domNode:W}=C.getState();return{nodeLookup:P,transform:$,snapGrid:F,snapToGrid:V,nodeOrigin:X,paneDomNode:W}},onChange:(P,$)=>{const{triggerNodeChanges:F,nodeLookup:V,parentLookup:X,nodeOrigin:W}=C.getState(),Z=[],J={x:P.x,y:P.y},H=V.get(y);if(H&&H.expandParent&&H.parentId){const L=H.origin??W,B=P.width??H.measured.width??0,Y=P.height??H.measured.height??0,G={id:H.id,parentId:H.parentId,rect:{width:B,height:Y,...KM({x:P.x??H.position.x,y:P.y??H.position.y},{width:B,height:Y},H.parentId,V,L)}},re=R4([G],V,X,W);Z.push(...re),J.x=P.x?Math.max(L[0]*B,P.x):void 0,J.y=P.y?Math.max(L[1]*Y,P.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:y,type:"position",position:{...J}};Z.push(L)}if(P.width!==void 0&&P.height!==void 0){const B={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};Z.push(B)}for(const L of $){const B={...L,type:"position"};Z.push(B)}F(Z)},onEnd:({width:P,height:$})=>{const F={id:y,type:"dimensions",resizing:!1,dimensions:{width:P,height:$}};C.getState().triggerNodeChanges([F])}})),A.current.update({controlPosition:D,boundaries:{minWidth:l,minHeight:c,maxWidth:d,maxHeight:_},keepAspectRatio:f,resizeDirection:m,onResizeStart:k,onResize:b,onResizeEnd:v,shouldResize:S}),()=>{var P;(P=A.current)==null||P.destroy()}},[D,l,c,d,_,f,k,b,v,S]);const O=D.split("-");return h.jsx("div",{className:Lr(["react-flow__resize-control","nodrag",...O,t,r]),ref:z,style:{...s,scale:j,...o&&{[E?"backgroundColor":"borderColor"]:o}},children:a})}M.memo(c2t);function u2t(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(a=>{if(!a)return;function o(){n(a.offsetWidth),r(a.offsetHeight)}const l=new ResizeObserver(o),c=new MutationObserver(o);return l.observe(a),c.observe(a,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),o(),()=>{l.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const E0=8;function d2t(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:a},o]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){o({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let l=0,c=0,d=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":l=e.x-t-_,c=e.y+e.height/2-r/2;break;case"right":l=e.x+e.width+_,c=e.y+e.height/2-r/2;break;case"below":l=e.x+e.width/2-t/2,c=e.y+e.height+_;break;case"above":l=e.x+e.width/2-t/2,c=e.y-r-_;break}const f=l,m=c;l=Math.min(Math.max(l,E0),a-t-E0),c=Math.min(Math.max(c,E0),s-r-E0),d=e.anchor==="left"||e.anchor==="right"?m-c:f-l}return{x:l,y:c,arrowAdjustment:d}}const _b=380,pb=12,f2t=350,h2t=150,tx=new EventTarget;function _2t(){tx.dispatchEvent(new Event("move"))}function p2t(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),a=M.useRef(void 0);M.useEffect(()=>{const d=()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),r(null)};return tx.addEventListener("move",d),()=>{tx.removeEventListener("move",d),window.clearTimeout(s.current),window.clearTimeout(a.current)}},[]),M.useEffect(()=>{r(d=>{var f;if(!d)return d;const _=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return _&&d.x===_.x&&d.y===_.y&&d.width===_.width&&d.height===_.height?d:_})},[e,n]);const o=M.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var d;r(((d=e.current)==null?void 0:d.getBoundingClientRect())??null)},f2t)},[e]),l=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),a.current=window.setTimeout(()=>r(null),h2t)},[]),c=M.useCallback(()=>window.clearTimeout(a.current),[]);return{rect:t,onMouseEnter:o,onMouseLeave:l,keepOpen:c}}function m2t(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(N(),t)}function g2t({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:a,onOpenCode:o,onMouseEnter:l,onMouseLeave:c}){const d=u2t(),_=s.right+pb+_b<=window.innerWidth,f=s.x-pb-_b>=0,m=_?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:g,y:S}=d2t({x:s.x,y:s.y,width:s.width,height:s.height,anchor:m,distance:pb},d),[k,b]=M.useState(null),v=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null;M.useEffect(()=>{if(b(null),!v)return;let P=!1;return gWe(v).then($=>{let F=$.diff;if($.truncated){const Z=F.lastIndexOf(` +`)),_=d.reduce((f,m)=>f.concat(...m),[]);return[d,_]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(n==null?void 0:n.target)??y9,d=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=g=>{var b,v;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!d)&&uR(g))return!1;const k=S9(g.code,l);if(a.current.add(g[k]),w9(o,a.current,!1)){const x=((v=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:v[0])||g.target,y=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&g.preventDefault(),r(!0)}},f=g=>{const S=S9(g.code,l);w9(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[S]),g.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",_),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",_),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),t}function w9(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function S9(e,n){return n.includes(e)?"code":"key"}const k2t=()=>{const e=tr();return M.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,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??a},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:a,maxZoom:o,panZoom:l}=e.getState(),c=M4(n,r,s,a,o,(t==null?void 0:t.padding)??.1);return l?(await l.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:a,domNode:o}=e.getState();if(!o)return n;const{x:l,y:c}=o.getBoundingClientRect(),d={x:n.x-l,y:n.y-c},_=t.snapGrid??s,f=t.snapToGrid??a;return Bh(d,r,f,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:a}=r.getBoundingClientRect(),o=ad(n,t);return{x:o.x+s,y:o.y+a}}}),[])};function MR(e,n){const t=[],r=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of n){const o=r.get(a.id);if(!o){t.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){t.push({...o[0].item});continue}const l={...a};for(const c of o)C2t(c,l);t.push(l)}return s.length&&s.forEach(a=>{a.index!==void 0?t.splice(a.index,0,{...a.item}):t.push({...a.item})}),t}function C2t(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 E2t(e,n){return MR(e,n)}function N2t(e,n){return MR(e,n)}function ac(e,n){return{id:e,type:"select",selected:n}}function Ru(e,n=new Set,t=!1){const r=[];for(const[s,a]of e){const o=n.has(s);!(a.selected===void 0&&!o)&&a.selected!==o&&(t&&(a.selected=o),r.push(ac(a.id,o)))}return r}function k9({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=n.get(o.id),c=((s=l==null?void 0:l.internals)==null?void 0:s.userNode)??l;c!==void 0&&c!==o&&t.push({id:o.id,item:o,type:"replace"}),c===void 0&&t.push({item:o,type:"add",index:a})}for(const[a]of n)r.get(a)===void 0&&t.push({id:a,type:"remove"});return t}function C9(e){return{id:e.id,type:"remove"}}const z2t=aR();function A2t(e,n,t={}){return fbt(e,n,{...t,onError:t.onError??z2t})}const E9=e=>Zvt(e),T2t=e=>tR(e);function RR(e){return M.forwardRef(e)}const j2t=typeof window<"u"?M.useLayoutEffect:M.useEffect;function N9(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>M2t(()=>t(s=>s+BigInt(1))));return j2t(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function M2t(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const DR=M.createContext(null);function R2t({children:e}){const n=tr(),t=M.useCallback(l=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:_,onNodesChange:f,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:S}=n.getState();let k=c;for(const v of l)k=typeof v=="function"?v(k):v;let b=k9({items:k,lookup:m});for(const v of S.values())b=v(b);_&&d(k),b.length>0?f==null||f(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:x,setNodes:y}=n.getState();v&&y(x)})},[]),r=N9(t),s=M.useCallback(l=>{const{edges:c=[],setEdges:d,hasDefaultEdges:_,onEdgesChange:f,edgeLookup:m}=n.getState();let g=c;for(const S of l)g=typeof S=="function"?S(g):S;_?d(g):f&&f(k9({items:g,lookup:m}))},[]),a=N9(s),o=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return h.jsx(DR.Provider,{value:o,children:e})}function D2t(){const e=M.useContext(DR);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const L2t=e=>!!e.panZoom;function $4(){const e=k2t(),n=tr(),t=D2t(),r=_n(L2t),s=M.useMemo(()=>{const a=f=>n.getState().nodeLookup.get(f),o=f=>{t.nodeQueue.push(f)},l=f=>{t.edgeQueue.push(f)},c=f=>{var v,x;const{nodeLookup:m,nodeOrigin:g}=n.getState(),S=E9(f)?f:m.get(f.id),k=S.parentId?lR(S.position,S.measured,S.parentId,m,g):S.position,b={...S,position:k,width:((v=S.measured)==null?void 0:v.width)??S.width,height:((x=S.measured)==null?void 0:x.height)??S.height};return ch(b)},d=(f,m,g={replace:!1})=>{o(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&E9(b)?b:{...k,...b}}return k}))},_=(f,m,g={replace:!1})=>{l(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&T2t(b)?b:{...k,...b}}return k}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var m;return(m=a(f))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(m=>({...m}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:o,setEdges:l,addNodes:f=>{const m=Array.isArray(f)?f:[f];t.nodeQueue.push(g=>[...g,...m])},addEdges:f=>{const m=Array.isArray(f)?f:[f];t.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:f=[],edges:m=[],transform:g}=n.getState(),[S,k,b]=g;return{nodes:f.map(v=>({...v})),edges:m.map(v=>({...v})),viewport:{x:S,y:k,zoom:b}}},deleteElements:async({nodes:f=[],edges:m=[]})=>{const{nodes:g,edges:S,onNodesDelete:k,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:x,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:A,edges:E}=await nbt({nodesToRemove:f,edgesToRemove:m,nodes:g,edges:S,onBeforeDelete:C}),j=E.length>0,T=A.length>0;if(j){const D=E.map(C9);b==null||b(E),x(D)}if(T){const D=A.map(C9);k==null||k(A),v(D)}return(T||j)&&(y==null||y({nodes:A,edges:E})),{deletedNodes:A,deletedEdges:E}},getIntersectingNodes:(f,m=!0,g)=>{const S=ZC(f),k=S?f:c(f),b=g!==void 0;return k?(g||n.getState().nodes).filter(v=>{const x=n.getState().nodeLookup.get(v.id);if(x&&!S&&(v.id===f.id||!x.internals.positionAbsolute))return!1;const y=ch(b?v:x),C=Ap(y,k);return m&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,m,g=!0)=>{const k=ZC(f)?f:c(f);if(!k)return!1;const b=Ap(k,m);return g&&b>0||b>=m.width*m.height||b>=k.width*k.height},updateNode:d,updateNodeData:(f,m,g={replace:!1})=>{d(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},updateEdge:_,updateEdgeData:(f,m,g={replace:!1})=>{_(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},getNodesBounds:f=>{const{nodeLookup:m,nodeOrigin:g}=n.getState();return Qvt(f,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:f,id:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}-${f}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:f,handleId:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}${f?m?`-${f}-${m}`:`-${f}`:""}`))==null?void 0:S.values())??[])},fitView:async f=>{const m=n.getState().fitViewResolver??ibt();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:m}),t.nodeQueue.push(g=>[...g]),m.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const z9=e=>e.selected,O2t=typeof window<"u"?window:void 0;function I2t({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=tr(),{deleteElements:r}=$4(),s=dh(e,{actInsideInputWithModifier:!1}),a=dh(n,{target:O2t});M.useEffect(()=>{if(s){const{edges:o,nodes:l}=t.getState();r({nodes:l.filter(z9),edges:o.filter(z9)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:a})},[a])}function B2t(e){const n=tr();M.useEffect(()=>{const t=()=>{var s,a,o,l;if(!e.current||!(((a=(s=e.current).checkVisibility)==null?void 0:a.call(s))??!0))return!1;const r=R4(e.current);(r.height===0||r.width===0)&&((l=(o=n.getState()).onError)==null||l.call(o,"004",ea.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 Pm={position:"absolute",width:"100%",height:"100%",top:0,left:0},$2t=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function H2t({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=mc.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:_,maxZoom:f,zoomActivationKeyCode:m,preventScrolling:g=!0,children:S,noWheelClassName:k,noPanClassName:b,onViewportChange:v,isControlledViewport:x,paneClickDistance:y,selectionOnDrag:C}){const A=tr(),E=M.useRef(null),{userSelectionActive:j,lib:T,connectionInProgress:D}=_n($2t,Jn),I=dh(m),P=M.useRef();B2t(E);const H=M.useCallback(F=>{v==null||v({x:F[0],y:F[1],zoom:F[2]}),x||A.setState({transform:F})},[v,x]);return M.useEffect(()=>{if(E.current){P.current=Fbt({domNode:E.current,minZoom:_,maxZoom:f,translateExtent:d,viewport:c,onDraggingChange:W=>A.setState(Z=>Z.paneDragging===W?Z:{paneDragging:W}),onPanZoomStart:(W,Z)=>{const{onViewportChangeStart:J,onMoveStart:B}=A.getState();B==null||B(W,Z),J==null||J(Z)},onPanZoom:(W,Z)=>{const{onViewportChange:J,onMove:B}=A.getState();B==null||B(W,Z),J==null||J(Z)},onPanZoomEnd:(W,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:B}=A.getState();B==null||B(W,Z),J==null||J(Z)}});const{x:F,y:V,zoom:X}=P.current.getViewport();return A.setState({panZoom:P.current,transform:[F,V,X],domNode:E.current.closest(".react-flow")}),()=>{var W;(W=P.current)==null||W.destroy()}}},[]),M.useEffect(()=>{var F;(F=P.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:I,preventScrolling:g,noPanClassName:b,userSelectionActive:j,noWheelClassName:k,lib:T,onTransformChange:H,connectionInProgress:D,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,a,o,l,I,g,b,j,k,T,H,D,C,y]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:Pm,children:S})}const P2t=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function F2t(){const{userSelectionActive:e,userSelectionRect:n}=_n(P2t,Jn);return e&&n?h.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 _b=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},U2t=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function q2t({isSelecting:e,selectionKeyPressed:n,selectionMode:t=lh.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:l,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:_,onPaneScroll:f,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:S,children:k}){const b=M.useRef(0),v=tr(),{userSelectionActive:x,elementsSelectable:y,dragging:C,panBy:A,autoPanSpeed:E}=_n(U2t,Jn),j=y&&(e||x),T=M.useRef(null),D=M.useRef(),I=M.useRef(new Set),P=M.useRef(new Set),H=M.useRef(!1),F=M.useRef(!1),V=M.useRef({x:0,y:0}),X=M.useRef(!1),W=q=>{if(F.current||H.current||v.getState().connection.inProgress){F.current=!1,H.current=!1;return}d==null||d(q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},Z=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}_==null||_(q)},J=f?q=>f(q):void 0,B=q=>{F.current&&(q.stopPropagation(),F.current=!1)},L=q=>{var Ve,ft;const{domNode:te,transform:le}=v.getState();if(D.current=te==null?void 0:te.getBoundingClientRect(),!D.current)return;const ge=q.target===T.current;if(!ge&&!!q.target.closest(".nokey")||!e||!(o&&ge||n)||q.button!==0||!q.isPrimary)return;(ft=(Ve=q.target)==null?void 0:Ve.setPointerCapture)==null||ft.call(Ve,q.pointerId),F.current=!1;const{x:Ee,y:Le}=Xi(q.nativeEvent,D.current),Pe=Bh({x:Ee,y:Le},le);v.setState({userSelectionRect:{width:0,height:0,startX:Pe.x,startY:Pe.y,x:Ee,y:Le}}),ge||(q.stopPropagation(),q.preventDefault())};function $(q,te){const{userSelectionRect:le}=v.getState();if(!le)return;const{transform:ge,nodeLookup:ue,edgeLookup:Ce,connectionLookup:Ee,triggerNodeChanges:Le,triggerEdgeChanges:Pe,defaultEdgeOptions:Ve}=v.getState(),ft={x:le.startX,y:le.startY},{x:Be,y:wt}=ad(ft,ge),At={startX:ft.x,startY:ft.y,x:qkt.id)),P.current=new Set;const St=(Ve==null?void 0:Ve.selectable)??!0;for(const kt of I.current){const xe=Ee.get(kt);if(xe)for(const{edgeId:je}of xe.values()){const We=Ce.get(je);We&&(We.selectable??St)&&P.current.add(je)}}if(!QC(vt,I.current)){const kt=Ru(ue,I.current,!0);Le(kt)}if(!QC(Ot,P.current)){const kt=Ru(Ce,P.current);Pe(kt)}v.setState({userSelectionRect:At,userSelectionActive:!0,nodesSelectionActive:!1})}function K(){if(!s||!D.current)return;const[q,te]=j4(V.current,D.current,E);A({x:q,y:te}).then(le=>{if(!F.current||!le){b.current=requestAnimationFrame(K);return}const{x:ge,y:ue}=V.current;$(ge,ue),b.current=requestAnimationFrame(K)})}const G=()=>{cancelAnimationFrame(b.current),b.current=0,X.current=!1};M.useEffect(()=>()=>G(),[]);const re=q=>{const{userSelectionRect:te,transform:le,resetSelectedElements:ge}=v.getState();if(!D.current||!te)return;const{x:ue,y:Ce}=Xi(q.nativeEvent,D.current);V.current={x:ue,y:Ce};const Ee=ad({x:te.startX,y:te.startY},le);if(!F.current){const Le=n?0:a;if(Math.hypot(ue-Ee.x,Ce-Ee.y)<=Le)return;ge(),l==null||l(q)}F.current=!0,X.current||(K(),X.current=!0),$(ue,Ce)},oe=q=>{var te,le;if(!j){q.target===T.current&&v.getState().connection.inProgress&&(H.current=!0);return}q.button===0&&((le=(te=q.target)==null?void 0:te.releasePointerCapture)==null||le.call(te,q.pointerId),!x&&q.target===T.current&&v.getState().userSelectionRect&&(W==null||W(q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(c==null||c(q),v.setState({nodesSelectionActive:I.current.size>0})),G())},he=q=>{var te,le;(le=(te=q.target)==null?void 0:te.releasePointerCapture)==null||le.call(te,q.pointerId),G()},ie=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Rr(["react-flow__pane",{draggable:ie,dragging:C,selection:e}]),onClick:j?void 0:_b(W,T),onContextMenu:_b(Z,T),onWheel:_b(J,T),onPointerEnter:j?void 0:m,onPointerMove:j?re:g,onPointerUp:oe,onPointerCancel:j?he:void 0,onPointerDownCapture:j?L:void 0,onClickCapture:j?B:void 0,onPointerLeave:S,ref:T,style:Pm,children:[k,h.jsx(F2t,{})]})}function rx({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=n.getState(),d=l.get(e);if(!d){c==null||c("012",ea.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(t||d.selected&&o)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function LR({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:a,nodeClickDistance:o}){const l=tr(),[c,d]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=zbt({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{rx({id:f,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:s,nodeClickDistance:o}),()=>{var f;(f=_.current)==null||f.destroy()}},[t,r,n,a,e,s,o]),c}const G2t=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function OR(){const e=tr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:d,nodeOrigin:_}=e.getState(),f=new Map,m=G2t(o),g=s?a[0]:5,S=s?a[1]:5,k=t.direction.x*g*t.factor,b=t.direction.y*S*t.factor;for(const[,v]of d){if(!m(v))continue;let x={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+b};s&&(x=Ih(x,a));const{position:y,positionAbsolute:C}=nR({nodeId:v.id,nextPosition:x,nodeLookup:d,nodeExtent:r,nodeOrigin:_,onError:l});v.position=y,v.internals.positionAbsolute=C,f.set(v.id,v)}c(f)},[])}const H4=M.createContext(null),V2t=H4.Provider;H4.Consumer;const IR=()=>M.useContext(H4),W2t=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),BR=M.createContext(null);function K2t({children:e}){const n=_n(W2t,Jn);return h.jsx(BR.Provider,{value:n,children:e})}function Y2t(){const e=M.useContext(BR);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const X2t={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Z2t=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:d}=o;if(!l&&!s)return X2t;const _=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===t;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t,connectingTo:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:a===sd.Strict?(l==null?void 0:l.type)!==t:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!s,valid:_&&d}};function Q2t({type:e="source",position:n=mt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:d,onMouseDown:_,onTouchStart:f,...m},g){var X,W;const S=o||null,k=e==="target",b=tr(),v=IR(),{connectOnClick:x,noPanClassName:y,rfId:C}=Y2t(),{connectingFrom:A,connectingTo:E,clickConnecting:j,isPossibleEndHandle:T,connectionInProcess:D,clickConnectionInProcess:I,valid:P}=_n(Z2t(v,S,e),Jn);v||(W=(X=b.getState()).onError)==null||W.call(X,"010",ea.error010());const H=Z=>{const{defaultEdgeOptions:J,onConnect:B,hasDefaultEdges:L}=b.getState(),$={...J,...Z};if(L){const{edges:K,setEdges:G,onError:re}=b.getState();G(A2t($,K,{onError:re}))}B==null||B($),l==null||l($)},F=Z=>{if(!v)return;const J=dR(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){const B=b.getState();nx.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:k,handleId:S,nodeId:v,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...L)=>{var $,K;return(K=($=b.getState()).onConnectEnd)==null?void 0:K.call($,...L)},updateConnection:B.updateConnection,onConnect:H,isValidConnection:t||((...L)=>{var $,K;return((K=($=b.getState()).isValidConnection)==null?void 0:K.call($,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}J?_==null||_(Z):f==null||f(Z)},V=Z=>{const{onClickConnectStart:J,onClickConnectEnd:B,connectionClickStartHandle:L,connectionMode:$,isValidConnection:K,lib:G,rfId:re,nodeLookup:oe,connection:he}=b.getState();if(!v||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:v,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:S}});return}const ie=cR(Z.target),q=t||K,{connection:te,isValid:le}=nx.isValid(Z.nativeEvent,{handle:{nodeId:v,id:S,type:e},connectionMode:$,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:q,flowId:re,doc:ie,lib:G,nodeLookup:oe});le&&te&&H(te);const ge=structuredClone(he);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,B==null||B(Z,ge),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":S,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${S}-${e}`,className:Rr(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,d,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:a,clickconnecting:j,connectingfrom:A,connectingto:E,valid:P,connectionindicator:r&&(!D||T)&&(D||I?a:s)}]),onMouseDown:F,onTouchStart:F,onClick:x?V:void 0,ref:g,...m,children:c})}const El=M.memo(RR(Q2t));function J2t({data:e,isConnectable:n,sourcePosition:t=mt.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(El,{type:"source",position:t,isConnectable:n})]})}function ext({data:e,isConnectable:n,targetPosition:t=mt.Top,sourcePosition:r=mt.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(El,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,h.jsx(El,{type:"source",position:r,isConnectable:n})]})}function txt(){return null}function nxt({data:e,isConnectable:n,targetPosition:t=mt.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(El,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Tp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},A9={input:J2t,default:ext,output:nxt,group:txt};function rxt(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 sxt=e=>{const{width:n,height:t,x:r,y:s}=Oh(e.nodeLookup,{filter:a=>!!a.selected});return{width:Yi(n)?n:null,height:Yi(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 ixt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=tr(),{width:s,height:a,transformString:o,userSelectionActive:l}=_n(sxt,Jn),c=OR(),d=M.useRef(null);M.useEffect(()=>{var g;t||(g=d.current)==null||g.focus({preventScroll:!0})},[t]);const _=!l&&s!==null&&a!==null;if(LR({nodeRef:d,disabled:!_}),!_)return null;const f=e?g=>{const S=r.getState().nodes.filter(k=>k.selected);e(g,S)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Tp,g.key)&&(g.preventDefault(),c({direction:Tp[g.key],factor:g.shiftKey?4:1}))};return h.jsx("div",{className:Rr(["react-flow__nodesselection","react-flow__container",n]),style:{transform:o},children:h.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:m,style:{width:s,height:a}})})}const T9=typeof window<"u"?window:void 0,axt=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function $R({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:_,selectionMode:f,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:A,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:T,autoPanOnSelection:D,defaultViewport:I,translateExtent:P,minZoom:H,maxZoom:F,preventScrolling:V,onSelectionContextMenu:X,noWheelClassName:W,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:B,isControlledViewport:L}){const{nodesSelectionActive:$,userSelectionActive:K}=_n(axt,Jn),G=dh(d,{target:T9}),re=dh(k,{target:T9}),oe=re||T,he=re||C,ie=_&&oe!==!0,q=G||K||ie;return I2t({deleteKeyCode:c,multiSelectionKeyCode:S}),h.jsx(H2t,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:he,panOnScrollSpeed:A,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:!G&&oe,defaultViewport:I,translateExtent:P,minZoom:H,maxZoom:F,zoomActivationKeyCode:b,preventScrolling:V,noWheelClassName:W,noPanClassName:Z,onViewportChange:B,isControlledViewport:L,paneClickDistance:l,selectionOnDrag:ie,children:h.jsxs(q2t,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:oe,autoPanOnSelection:D,isSelecting:!!q,selectionMode:f,selectionKeyPressed:G,paneClickDistance:l,selectionOnDrag:ie,children:[e,$&&h.jsx(ixt,{onSelectionContextMenu:X,noPanClassName:Z,disableKeyboardA11y:J})]})})}$R.displayName="FlowRenderer";const oxt=M.memo($R),lxt=e=>n=>e?T4(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 cxt(e){return _n(M.useCallback(lxt(e),[e]),Jn)}const uxt=e=>e.updateNodeInternals;function dxt(){const e=_n(uxt),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const a=s.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function fxt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=tr(),a=M.useRef(null),o=M.useRef(null),l=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),d=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!_||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[_,e.hidden]),M.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),M.useEffect(()=>{if(a.current){const f=d.current!==n,m=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(f||m||g)&&(d.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),a}function hxt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:_,resizeObserver:f,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:S,rfId:k,nodeTypes:b,nodeClickDistance:v,onError:x}){const{node:y,internals:C,isParent:A}=_n(q=>{const te=q.nodeLookup.get(e),le=q.parentLookup.has(e);return{node:te,internals:te.internals,isParent:le}},Jn);let E=y.type||"default",j=(b==null?void 0:b[E])||A9[E];j===void 0&&(x==null||x("003",ea.error003(E)),E="default",j=(b==null?void 0:b.default)||A9.default);const T=!!(y.draggable||l&&typeof y.draggable>"u"),D=!!(y.selectable||c&&typeof y.selectable>"u"),I=!!(y.connectable||d&&typeof y.connectable>"u"),P=!!(y.focusable||_&&typeof y.focusable>"u"),H=tr(),F=oR(y),V=fxt({node:y,nodeType:E,hasDimensions:F,resizeObserver:f}),X=LR({nodeRef:V,disabled:y.hidden||!T,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:v}),W=OR();if(y.hidden)return null;const Z=jo(y),J=rxt(y),B=D||T||n||t||r||s,L=t?q=>t(q,{...C.userNode}):void 0,$=r?q=>r(q,{...C.userNode}):void 0,K=s?q=>s(q,{...C.userNode}):void 0,G=a?q=>a(q,{...C.userNode}):void 0,re=o?q=>o(q,{...C.userNode}):void 0,oe=q=>{const{selectNodesOnDrag:te,nodeDragThreshold:le}=H.getState();D&&(!te||!T||le>0)&&rx({id:e,store:H,nodeRef:V}),n&&n(q,{...C.userNode})},he=q=>{if(!(uR(q.nativeEvent)||S)){if(ZM.includes(q.key)&&D){const te=q.key==="Escape";rx({id:e,store:H,unselect:te,nodeRef:V})}else if(T&&y.selected&&Object.prototype.hasOwnProperty.call(Tp,q.key)){q.preventDefault();const{ariaLabelConfig:te}=H.getState();H.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),W({direction:Tp[q.key],factor:q.shiftKey?4:1})}}},ie=()=>{var Ee;if(S||!((Ee=V.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:q,width:te,height:le,autoPanOnNodeFocus:ge,setCenter:ue}=H.getState();if(!ge)return;T4(new Map([[e,y]]),{x:0,y:0,width:te,height:le},q,!0).length>0||ue(y.position.x+Z.width/2,y.position.y+Z.height/2,{zoom:q[2]})};return h.jsx("div",{className:Rr(["react-flow__node",`react-flow__node-${E}`,{[g]:T},y.className,{selected:y.selected,selectable:D,parent:A,draggable:T,dragging:X}]),ref:V,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:F?"visible":"hidden",...y.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:$,onMouseLeave:K,onContextMenu:G,onClick:oe,onDoubleClick:re,onKeyDown:P?he:void 0,tabIndex:P?0:void 0,onFocus:P?ie:void 0,role:y.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${AR}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:h.jsx(V2t,{value:e,children:h.jsx(j,{id:e,data:y.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:T,deletable:y.deletable??!0,isConnectable:I,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:X,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...Z})})})}var _xt=M.memo(hxt);const pxt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function HR(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:a}=_n(pxt,Jn),o=cxt(e.onlyRenderVisibleElements),l=dxt();return h.jsx("div",{className:"react-flow__nodes",style:Pm,children:o.map(c=>h.jsx(_xt,{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:l,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}HR.displayName="NodeRenderer";const mxt=M.memo(HR);function gxt(e){return _n(M.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 a=t.nodeLookup.get(s.source),o=t.nodeLookup.get(s.target);a&&o&&cbt({sourceNode:a,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Jn)}const vxt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},bxt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},j9={[Np.Arrow]:vxt,[Np.ArrowClosed]:bxt};function xxt(e){const n=tr();return M.useMemo(()=>{var s,a;return Object.prototype.hasOwnProperty.call(j9,e)?j9[e]:((a=(s=n.getState()).onError)==null||a.call(s,"009",ea.error009(e)),null)},[e])}const yxt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=xxt(n);return c?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:h.jsx(c,{color:t,strokeWidth:o})}):null},PR=({defaultColor:e,rfId:n})=>{const t=_n(a=>a.edges),r=_n(a=>a.defaultEdgeOptions),s=M.useMemo(()=>gbt(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?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(a=>h.jsx(yxt,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};PR.displayName="MarkerDefinitions";var wxt=M.memo(PR);function FR({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:d,..._}){const[f,m]=M.useState({x:1,y:0,width:0,height:0}),g=Rr(["react-flow__edge-textwrapper",d]),S=M.useRef(null);return M.useEffect(()=>{if(S.current){const k=S.current.getBBox();m({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?h.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:g,visibility:f.width?"visible":"hidden",..._,children:[s&&h.jsx("rect",{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),h.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:S,style:r,children:t}),c]}):null}FR.displayName="EdgeText";const Sxt=M.memo(FR);function Fm({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:d=20,..._}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{..._,d:e,fill:"none",className:Rr(["react-flow__edge-path",_.className])}),d?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Yi(n)&&Yi(t)?h.jsx(Sxt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function M9({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===mt.Left||e===mt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function UR({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top}){const[o,l]=M9({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,d]=M9({pos:a,x1:r,y1:s,x2:e,y2:n}),[_,f,m,g]=fR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${n} C${o},${l} ${c},${d} ${r},${s}`,_,f,m,g]}function qR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})=>{const[x,y,C]=UR({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l}),A=e.isInternal?void 0:n;return h.jsx(Fm,{id:A,path:x,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})})}const kxt=qR({isInternal:!1}),GR=qR({isInternal:!0});kxt.displayName="SimpleBezierEdge";GR.displayName="SimpleBezierEdgeInternal";function VR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,sourcePosition:g=mt.Bottom,targetPosition:S=mt.Top,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,A]=J2({sourceX:t,sourceY:r,sourcePosition:g,targetX:s,targetY:a,targetPosition:S,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return h.jsx(Fm,{id:E,path:y,labelX:C,labelY:A,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:k,markerStart:b,interactionWidth:x})})}const WR=VR({isInternal:!1}),KR=VR({isInternal:!0});WR.displayName="SmoothStepEdge";KR.displayName="SmoothStepEdgeInternal";function YR(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return h.jsx(WR,{...t,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=t.pathOptions)==null?void 0:a.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const Cxt=YR({isInternal:!1}),XR=YR({isInternal:!0});Cxt.displayName="StepEdge";XR.displayName="StepEdgeInternal";function ZR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})=>{const[b,v,x]=pR({sourceX:t,sourceY:r,targetX:s,targetY:a}),y=e.isInternal?void 0:n;return h.jsx(Fm,{id:y,path:b,labelX:v,labelY:x,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})})}const Ext=ZR({isInternal:!1}),QR=ZR({isInternal:!0});Ext.displayName="StraightEdge";QR.displayName="StraightEdgeInternal";function JR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o=mt.Bottom,targetPosition:l=mt.Top,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,A]=hR({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return h.jsx(Fm,{id:E,path:y,labelX:C,labelY:A,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:x})})}const Nxt=JR({isInternal:!1}),eD=JR({isInternal:!0});Nxt.displayName="BezierEdge";eD.displayName="BezierEdgeInternal";const R9={default:eD,straight:QR,step:XR,smoothstep:KR,simplebezier:GR},D9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},zxt=(e,n,t)=>t===mt.Left?e-n:t===mt.Right?e+n:e,Axt=(e,n,t)=>t===mt.Top?e-n:t===mt.Bottom?e+n:e,L9="react-flow__edgeupdater";function O9({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:a,onMouseOut:o,type:l}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:o,className:Rr([L9,`${L9}-${l}`]),cx:zxt(n,r,e),cy:Axt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function Txt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:d,onReconnectStart:_,onReconnectEnd:f,setReconnecting:m,setUpdateHover:g}){const S=tr(),k=(C,A)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:j,connectionMode:T,connectionRadius:D,lib:I,onConnectStart:P,cancelConnection:H,nodeLookup:F,rfId:V,panBy:X,updateConnection:W}=S.getState(),Z=A.type==="target",J=($,K)=>{m(!1),f==null||f($,t,A.type,K)},B=$=>d==null?void 0:d(t,$),L=($,K)=>{m(!0),_==null||_(C,t,A.type),P==null||P($,K)};nx.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:T,connectionRadius:D,domNode:j,handleId:A.id,nodeId:A.nodeId,nodeLookup:F,isTarget:Z,edgeUpdaterType:A.type,lib:I,flowId:V,cancelConnection:H,panBy:X,isValidConnection:(...$)=>{var K,G;return((G=(K=S.getState()).isValidConnection)==null?void 0:G.call(K,...$))??!0},onConnect:B,onConnectStart:L,onConnectEnd:(...$)=>{var K,G;return(G=(K=S.getState()).onConnectEnd)==null?void 0:G.call(K,...$)},onReconnectEnd:J,updateConnection:W,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>g(!0),y=()=>g(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(O9,{position:l,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:x,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&h.jsx(O9,{position:c,centerX:a,centerY:o,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:y,type:"target"})]})}function jxt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,rfId:S,edgeTypes:k,noPanClassName:b,onError:v,disableKeyboardA11y:x}){let y=_n(ue=>ue.edgeLookup.get(e));const C=_n(ue=>ue.defaultEdgeOptions);y=C?{...C,...y}:y;let A=y.type||"default",E=(k==null?void 0:k[A])||R9[A];E===void 0&&(v==null||v("011",ea.error011(A)),A="default",E=(k==null?void 0:k.default)||R9.default);const j=!!(y.focusable||n&&typeof y.focusable>"u"),T=typeof f<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),D=!!(y.selectable||r&&typeof y.selectable>"u"),I=M.useRef(null),[P,H]=M.useState(!1),[F,V]=M.useState(!1),X=tr(),{zIndex:W=y.zIndex,sourceX:Z,sourceY:J,targetX:B,targetY:L,sourcePosition:$,targetPosition:K}=_n(M.useCallback(ue=>{const Ce=ue.nodeLookup.get(y.source),Ee=ue.nodeLookup.get(y.target);if(!Ce||!Ee)return D9;const Le=mbt({id:e,sourceNode:Ce,targetNode:Ee,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ue.connectionMode,onError:v}),Pe=lbt({selected:y.selected,zIndex:y.zIndex,sourceNode:Ce,targetNode:Ee,elevateOnSelect:ue.elevateEdgesOnSelect,zIndexMode:ue.zIndexMode});return{...Le||D9,zIndex:Pe}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Jn),G=M.useMemo(()=>y.markerStart?`url('#${ex(y.markerStart,S)}')`:void 0,[y.markerStart,S]),re=M.useMemo(()=>y.markerEnd?`url('#${ex(y.markerEnd,S)}')`:void 0,[y.markerEnd,S]);if(y.hidden||Z===null||J===null||B===null||L===null)return null;const oe=ue=>{var Pe;const{addSelectedEdges:Ce,unselectNodesAndEdges:Ee,multiSelectionActive:Le}=X.getState();D&&(X.setState({nodesSelectionActive:!1}),y.selected&&Le?(Ee({nodes:[],edges:[y]}),(Pe=I.current)==null||Pe.blur()):Ce([e])),s&&s(ue,y)},he=a?ue=>{a(ue,{...y})}:void 0,ie=o?ue=>{o(ue,{...y})}:void 0,q=l?ue=>{l(ue,{...y})}:void 0,te=c?ue=>{c(ue,{...y})}:void 0,le=d?ue=>{d(ue,{...y})}:void 0,ge=ue=>{var Ce;if(!x&&ZM.includes(ue.key)&&D){const{unselectNodesAndEdges:Ee,addSelectedEdges:Le}=X.getState();ue.key==="Escape"?((Ce=I.current)==null||Ce.blur(),Ee({edges:[y]})):Le([e])}};return h.jsx("svg",{style:{zIndex:W},children:h.jsxs("g",{className:Rr(["react-flow__edge",`react-flow__edge-${A}`,y.className,b,{selected:y.selected,animated:y.animated,inactive:!D&&!s,updating:P,selectable:D}]),onClick:oe,onDoubleClick:he,onContextMenu:ie,onMouseEnter:q,onMouseMove:te,onMouseLeave:le,onKeyDown:j?ge:void 0,tabIndex:j?0:void 0,role:y.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":j?`${TR}-${S}`:void 0,ref:I,...y.domAttributes,children:[!F&&h.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:D,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:B,targetY:L,sourcePosition:$,targetPosition:K,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:G,markerEnd:re,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),T&&h.jsx(Txt,{edge:y,isReconnectable:T,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,sourceX:Z,sourceY:J,targetX:B,targetY:L,sourcePosition:$,targetPosition:K,setUpdateHover:H,setReconnecting:V})]})})}var Mxt=M.memo(jxt);const Rxt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function tD({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:_,reconnectRadius:f,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,disableKeyboardA11y:k}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,onError:y}=_n(Rxt,Jn),C=gxt(n);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(wxt,{defaultColor:e,rfId:t}),C.map(A=>h.jsx(Mxt,{id:A,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,noPanClassName:s,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:_,reconnectRadius:f,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},A))]})}tD.displayName="EdgeRenderer";const Dxt=M.memo(tD),Lxt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Oxt({children:e}){const n=_n(Lxt);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function Ixt(e){const n=$4(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const Bxt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function $xt(e){const n=_n(Bxt),t=tr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function Hxt(e){return e.connection.inProgress?{...e.connection,to:Bh(e.connection.to,e.transform)}:{...e.connection}}function Pxt(e){return Hxt}function Fxt(e){const n=Pxt();return _n(n,Jn)}const Uxt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function qxt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:a,height:o,isValid:l,inProgress:c}=_n(Uxt,Jn);return!(a&&s&&c)?null:h.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Rr(["react-flow__connection",eR(l)]),children:h.jsx(nD,{style:n,type:t,CustomComponent:r,isValid:l})})})}const nD=({style:e,type:n=pl.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:d,toNode:_,toHandle:f,toPosition:m,pointer:g}=Fxt();if(!s)return;if(t)return h.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:eR(r),toNode:_,toHandle:f,pointer:g});let S="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(n){case pl.Bezier:[S]=hR(k);break;case pl.SimpleBezier:[S]=UR(k);break;case pl.Step:[S]=J2({...k,borderRadius:0});break;case pl.SmoothStep:[S]=J2(k);break;default:[S]=pR(k)}return h.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};nD.displayName="ConnectionLine";const Gxt={};function I9(e=Gxt){M.useRef(e),tr(),M.useEffect(()=>{},[e])}function Vxt(){tr(),M.useRef(!1),M.useEffect(()=>{},[])}function rD({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,onSelectionContextMenu:f,onSelectionStart:m,onSelectionEnd:g,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:j,deleteKeyCode:T,onlyRenderVisibleElements:D,elementsSelectable:I,defaultViewport:P,translateExtent:H,minZoom:F,maxZoom:V,preventScrolling:X,defaultMarkerColor:W,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:$,zoomOnDoubleClick:K,panOnDrag:G,autoPanOnSelection:re,onPaneClick:oe,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:q,onPaneScroll:te,onPaneContextMenu:le,paneClickDistance:ge,nodeClickDistance:ue,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,onReconnect:ft,onReconnectStart:Be,onReconnectEnd:wt,noDragClassName:At,noWheelClassName:vt,noPanClassName:Ot,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe,viewport:je,onViewportChange:We}){return I9(e),I9(n),Vxt(),Ixt(t),$xt(je),h.jsx(oxt,{onPaneClick:oe,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:q,onPaneContextMenu:le,onPaneScroll:te,paneClickDistance:ge,deleteKeyCode:T,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:j,elementsSelectable:I,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:K,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:$,panOnDrag:G,autoPanOnSelection:re,defaultViewport:P,translateExtent:H,minZoom:F,maxZoom:V,onSelectionContextMenu:f,preventScrolling:X,noDragClassName:At,noWheelClassName:vt,noPanClassName:Ot,disableKeyboardA11y:St,onViewportChange:We,isControlledViewport:!!je,children:h.jsxs(Oxt,{children:[h.jsx(Dxt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:o,onReconnect:ft,onReconnectStart:Be,onReconnectEnd:wt,onlyRenderVisibleElements:D,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,defaultMarkerColor:W,noPanClassName:Ot,disableKeyboardA11y:St,rfId:xe}),h.jsx(qxt,{style:k,type:S,component:b,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(mxt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,nodeClickDistance:ue,onlyRenderVisibleElements:D,noPanClassName:Ot,noDragClassName:At,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}rD.displayName="GraphView";const Wxt=M.memo(rD),Kxt=aR(),B9=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:d=2,nodeOrigin:_,nodeExtent:f,zIndexMode:m="basic"}={})=>{const g=new Map,S=new Map,k=new Map,b=new Map,v=r??n??[],x=t??e??[],y=_??[0,0],C=f??oh;vR(k,b,v);const{nodesInitialized:A}=tx(x,g,S,{nodeOrigin:y,nodeExtent:C,zIndexMode:m});let E=[0,0,1];if(o&&s&&a){const j=Oh(g,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:T,y:D,zoom:I}=M4(j,s,a,c,d,(l==null?void 0:l.padding)??.1);E=[T,D,I]}return{rfId:"1",width:s??0,height:a??0,transform:E,nodes:x,nodesInitialized:A,nodeLookup:g,parentLookup:S,edges:v,edgeLookup:b,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:oh,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:sd.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...JM},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Kxt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:QM,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Yxt=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m})=>i2t((g,S)=>{async function k(){const{nodeLookup:b,panZoom:v,fitViewOptions:x,fitViewResolver:y,width:C,height:A,minZoom:E,maxZoom:j}=S();v&&(await tbt({nodes:b,width:C,height:A,panZoom:v,minZoom:E,maxZoom:j},x),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...B9({nodes:e,edges:n,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:m}),setNodes:b=>{const{nodeLookup:v,parentLookup:x,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:A,zIndexMode:E,nodesSelectionActive:j}=S(),{nodesInitialized:T,hasSelectedNodes:D}=tx(b,v,x,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),I=j&&D;A&&T?(k(),g({nodes:b,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:I})):g({nodes:b,nodesInitialized:T,nodesSelectionActive:I})},setEdges:b=>{const{connectionLookup:v,edgeLookup:x}=S();vR(v,x,b),g({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:x}=S();x(b),g({hasDefaultNodes:!0})}if(v){const{setEdges:x}=S();x(v),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:x,parentLookup:y,domNode:C,nodeOrigin:A,nodeExtent:E,debug:j,fitViewQueued:T,zIndexMode:D}=S(),{changes:I,updatedInternals:P}=kbt(b,x,y,C,A,E,D);P&&(xbt(x,y,{nodeOrigin:A,nodeExtent:E,zIndexMode:D}),T?(k(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(I==null?void 0:I.length)>0&&(j&&console.log("React Flow: trigger node changes",I),v==null||v(I)))},updateNodePositions:(b,v=!1)=>{const x=[];let y=[];const{nodeLookup:C,triggerNodeChanges:A,connection:E,updateConnection:j,onNodesChangeMiddlewareMap:T}=S();for(const[D,I]of b){const P=C.get(D),H=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(I!=null&&I.position)),F={id:D,type:"position",position:H?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:v};if(P&&E.inProgress&&E.fromNode.id===P.id){const V=Sc(P,E.fromHandle,mt.Left,!0);j({...E,from:V})}H&&P.parentId&&x.push({id:D,parentId:P.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),y.push(F)}if(x.length>0){const{parentLookup:D,nodeOrigin:I}=S(),P=B4(x,C,D,I);y.push(...P)}for(const D of T.values())y=D(y);A(y)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:x,nodes:y,hasDefaultNodes:C,debug:A}=S();if(b!=null&&b.length){if(C){const E=E2t(b,y);x(E)}A&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:x,edges:y,hasDefaultEdges:C,debug:A}=S();if(b!=null&&b.length){if(C){const E=N2t(b,y);x(E)}A&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:A}=S();if(v){const E=b.map(j=>ac(j,!0));C(E);return}C(Ru(y,new Set([...b]),!0)),A(Ru(x))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:A}=S();if(v){const E=b.map(j=>ac(j,!0));A(E);return}A(Ru(x,new Set([...b]))),C(Ru(y,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:x,nodes:y,nodeLookup:C,triggerNodeChanges:A,triggerEdgeChanges:E}=S(),j=b||y,T=v||x,D=[];for(const P of j){if(!P.selected)continue;const H=C.get(P.id);H&&(H.selected=!1),D.push(ac(P.id,!1))}const I=[];for(const P of T)P.selected&&I.push(ac(P.id,!1));A(D),E(I)},setMinZoom:b=>{const{panZoom:v,maxZoom:x}=S();v==null||v.setScaleExtent([b,x]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:x}=S();v==null||v.setScaleExtent([x,b]),g({maxZoom:b})},setTranslateExtent:b=>{var v;(v=S().panZoom)==null||v.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:x,triggerEdgeChanges:y,elementsSelectable:C}=S();if(!C)return;const A=v.reduce((j,T)=>T.selected?[...j,ac(T.id,!1)]:j,[]),E=b.reduce((j,T)=>T.selected?[...j,ac(T.id,!1)]:j,[]);x(A),y(E)},setNodeExtent:b=>{const{nodes:v,nodeLookup:x,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:A,nodeExtent:E,zIndexMode:j}=S();b[0][0]===E[0][0]&&b[0][1]===E[0][1]&&b[1][0]===E[1][0]&&b[1][1]===E[1][1]||(tx(v,x,y,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:A,checkEquality:!1,zIndexMode:j}),g({nodeExtent:b}))},panBy:b=>{const{transform:v,width:x,height:y,panZoom:C,translateExtent:A}=S();return Cbt({delta:b,panZoom:C,transform:v,translateExtent:A,width:x,height:y})},setCenter:async(b,v,x)=>{const{width:y,height:C,maxZoom:A,panZoom:E}=S();if(!E)return!1;const j=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:A;return await E.setViewport({x:y/2-b*j,y:C/2-v*j,zoom:j},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{g({connection:{...JM}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...B9()})}},Object.is);function Xxt({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m,children:g}){const[S]=M.useState(()=>Yxt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:d,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:_,nodeExtent:f,zIndexMode:m}));return h.jsx(a2t,{value:S,children:h.jsx(R2t,{children:h.jsx(K2t,{children:g})})})}function Zxt({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g}){return M.useContext($m)?h.jsx(h.Fragment,{children:e}):h.jsx(Xxt,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g,children:e})}const Qxt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Jxt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:_,onMoveStart:f,onMoveEnd:m,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:A,onNodeDoubleClick:E,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:D,onNodesDelete:I,onEdgesDelete:P,onDelete:H,onSelectionChange:F,onSelectionDragStart:V,onSelectionDrag:X,onSelectionDragStop:W,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:B,onBeforeDelete:L,connectionMode:$,connectionLineType:K=pl.Bezier,connectionLineStyle:G,connectionLineComponent:re,connectionLineContainerStyle:oe,deleteKeyCode:he="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:q=!1,selectionMode:te=lh.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ge=uh()?"Meta":"Control",zoomActivationKeyCode:ue=uh()?"Meta":"Control",snapToGrid:Ce,snapGrid:Ee,onlyRenderVisibleElements:Le=!1,selectNodesOnDrag:Pe,nodesDraggable:Ve,autoPanOnNodeFocus:ft,nodesConnectable:Be,nodesFocusable:wt,nodeOrigin:At=jR,edgesFocusable:vt,edgesReconnectable:Ot,elementsSelectable:St=!0,defaultViewport:kt=b2t,minZoom:xe=.5,maxZoom:je=2,translateExtent:We=oh,preventScrolling:st=!0,nodeExtent:nt,defaultMarkerColor:Ht="#b1b1b7",zoomOnScroll:bt=!0,zoomOnPinch:nn=!0,panOnScroll:Wt=!1,panOnScrollSpeed:pn=.5,panOnScrollMode:Lt=mc.Free,zoomOnDoubleClick:En=!0,panOnDrag:Ft=!0,onPaneClick:br,onPaneMouseEnter:mn,onPaneMouseMove:Ye,onPaneMouseLeave:xt,onPaneScroll:Wn,onPaneContextMenu:Kn,paneClickDistance:Nt=1,nodeClickDistance:rt=0,children:Ie,onReconnect:it,onReconnectStart:Ut,onReconnectEnd:en,onEdgeContextMenu:Mt,onEdgeDoubleClick:Ln,onEdgeMouseEnter:_r,onEdgeMouseMove:is,onEdgeMouseLeave:or,reconnectRadius:xr=10,onNodesChange:Ts,onEdgesChange:Nn,noDragClassName:rn="nodrag",noWheelClassName:Fn="nowheel",noPanClassName:Dr="nopan",fitView:Lr,fitViewOptions:qr,connectOnClick:ln,attributionPosition:lr,proOptions:Sn,defaultEdgeOptions:et,elevateNodesOnSelect:_t=!0,elevateEdgesOnSelect:yr=!1,disableKeyboardA11y:wr=!1,autoPanOnConnect:Gr,autoPanOnNodeDrag:Un,autoPanOnSelection:Mo=!0,autoPanSpeed:vs,connectionRadius:as,isValidConnection:js,onError:Zt,style:It,id:Ys,nodeDragThreshold:Ii,connectionDragThreshold:Sr,viewport:os,onViewportChange:bs,width:cr,height:Xs,colorMode:Ml="light",debug:$a,onScroll:Or,ariaLabelConfig:ls,zIndexMode:Zs="basic",...Yn},Bi){const Hn=Ys||"1",zn=S2t(Ml),Qs=M.useCallback(ra=>{ra.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Or==null||Or(ra)},[Or]);return h.jsx("div",{"data-testid":"rf__wrapper",...Yn,onScroll:Qs,style:{...It,...Qxt},ref:Bi,className:Rr(["react-flow",s,zn]),id:Ys,role:"application",children:h.jsxs(Zxt,{nodes:e,edges:n,width:cr,height:Xs,fitView:Lr,fitViewOptions:qr,minZoom:xe,maxZoom:je,nodeOrigin:At,nodeExtent:nt,zIndexMode:Zs,children:[h.jsx(w2t,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:Ve,autoPanOnNodeFocus:ft,nodesConnectable:Be,nodesFocusable:wt,edgesFocusable:vt,edgesReconnectable:Ot,elementsSelectable:St,elevateNodesOnSelect:_t,elevateEdgesOnSelect:yr,minZoom:xe,maxZoom:je,nodeExtent:nt,onNodesChange:Ts,onEdgesChange:Nn,snapToGrid:Ce,snapGrid:Ee,connectionMode:$,translateExtent:We,connectOnClick:ln,defaultEdgeOptions:et,fitView:Lr,fitViewOptions:qr,onNodesDelete:I,onEdgesDelete:P,onDelete:H,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:V,onSelectionDragStop:W,onMove:_,onMoveStart:f,onMoveEnd:m,noPanClassName:Dr,nodeOrigin:At,rfId:Hn,autoPanOnConnect:Gr,autoPanOnNodeDrag:Un,autoPanSpeed:vs,onError:Zt,connectionRadius:as,isValidConnection:js,selectNodesOnDrag:Pe,nodeDragThreshold:Ii,connectionDragThreshold:Sr,onBeforeDelete:L,debug:$a,ariaLabelConfig:ls,zIndexMode:Zs}),h.jsx(Wxt,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:A,onNodeDoubleClick:E,nodeTypes:a,edgeTypes:o,connectionLineType:K,connectionLineStyle:G,connectionLineComponent:re,connectionLineContainerStyle:oe,selectionKeyCode:ie,selectionOnDrag:q,selectionMode:te,deleteKeyCode:he,multiSelectionKeyCode:ge,panActivationKeyCode:le,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Le,defaultViewport:kt,translateExtent:We,minZoom:xe,maxZoom:je,preventScrolling:st,zoomOnScroll:bt,zoomOnPinch:nn,zoomOnDoubleClick:En,panOnScroll:Wt,panOnScrollSpeed:pn,panOnScrollMode:Lt,panOnDrag:Ft,autoPanOnSelection:Mo,onPaneClick:br,onPaneMouseEnter:mn,onPaneMouseMove:Ye,onPaneMouseLeave:xt,onPaneScroll:Wn,onPaneContextMenu:Kn,paneClickDistance:Nt,nodeClickDistance:rt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:B,onReconnect:it,onReconnectStart:Ut,onReconnectEnd:en,onEdgeContextMenu:Mt,onEdgeDoubleClick:Ln,onEdgeMouseEnter:_r,onEdgeMouseMove:is,onEdgeMouseLeave:or,reconnectRadius:xr,defaultMarkerColor:Ht,noDragClassName:rn,noWheelClassName:Fn,noPanClassName:Dr,rfId:Hn,disableKeyboardA11y:wr,nodeExtent:nt,viewport:os,onViewportChange:bs}),h.jsx(v2t,{onSelectionChange:F}),Ie,h.jsx(h2t,{proOptions:Sn,position:lr}),h.jsx(f2t,{rfId:Hn,disableKeyboardA11y:wr})]})})}var eyt=RR(Jxt);function tyt({dimensions:e,lineWidth:n,variant:t,className:r}){return h.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Rr(["react-flow__background-pattern",t,r])})}function nyt({radius:e,className:n}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Rr(["react-flow__background-pattern","dots",n])})}var yo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(yo||(yo={}));const ryt={[yo.Dots]:1,[yo.Lines]:1,[yo.Cross]:6},syt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function sD({id:e,variant:n=yo.Dots,gap:t=20,size:r,lineWidth:s=1,offset:a=0,color:o,bgColor:l,style:c,className:d,patternClassName:_}){const f=M.useRef(null),{transform:m,patternId:g}=_n(syt,Jn),S=r||ryt[n],k=n===yo.Dots,b=n===yo.Cross,v=Array.isArray(t)?t:[t,t],x=[v[0]*m[2]||1,v[1]*m[2]||1],y=S*m[2],C=Array.isArray(a)?a:[a,a],A=b?[y,y]:x,E=[C[0]*m[2]||1+A[0]/2,C[1]*m[2]||1+A[1]/2],j=`${g}${e||""}`;return h.jsxs("svg",{className:Rr(["react-flow__background",d]),style:{...c,...Pm,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:f,"data-testid":"rf__background",children:[h.jsx("pattern",{id:j,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:k?h.jsx(nyt,{radius:y/2,className:_}):h.jsx(tyt,{dimensions:A,lineWidth:s,variant:n,className:_})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}sD.displayName="Background";const iyt=M.memo(sD);function ayt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function oyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function lyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 cyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 uyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 E0({children:e,className:n,...t}){return h.jsx("button",{type:"button",className:Rr(["react-flow__controls-button",n]),...t,children:e})}const dyt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function iD({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:d,children:_,position:f="bottom-left",orientation:m="vertical","aria-label":g}){const S=tr(),{isInteractive:k,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:x}=_n(dyt,Jn),{zoomIn:y,zoomOut:C,fitView:A}=$4(),E=()=>{y(),a==null||a()},j=()=>{C(),o==null||o()},T=()=>{A(s),l==null||l()},D=()=>{S.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},I=m==="horizontal"?"horizontal":"vertical";return h.jsxs(Hm,{className:Rr(["react-flow__controls",I,d]),position:f,style:e,"data-testid":"rf__controls","aria-label":g??x["controls.ariaLabel"],children:[n&&h.jsxs(h.Fragment,{children:[h.jsx(E0,{onClick:E,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(ayt,{})}),h.jsx(E0,{onClick:j,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(oyt,{})})]}),t&&h.jsx(E0,{className:"react-flow__controls-fitview",onClick:T,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:h.jsx(lyt,{})}),r&&h.jsx(E0,{className:"react-flow__controls-interactive",onClick:D,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?h.jsx(uyt,{}):h.jsx(cyt,{})}),_]})}iD.displayName="Controls";M.memo(iD);function fyt({id:e,x:n,y:t,width:r,height:s,style:a,color:o,strokeColor:l,strokeWidth:c,className:d,borderRadius:_,shapeRendering:f,selected:m,onClick:g}){const{background:S,backgroundColor:k}=a||{},b=o||S||k;return h.jsx("rect",{className:Rr(["react-flow__minimap-node",{selected:m},d]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:l,strokeWidth:c},shapeRendering:f,onClick:g?v=>g(v,e):void 0})}const hyt=M.memo(fyt),_yt=e=>e.nodes.map(n=>n.id),pb=e=>e instanceof Function?e:()=>e;function pyt({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:a=hyt,onClick:o}){const l=_n(_yt,Jn),c=pb(n),d=pb(e),_=pb(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:l.map(m=>h.jsx(gyt,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:a,onClick:o,shapeRendering:f},m))})}function myt({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:d,x:_,y:f,width:m,height:g}=_n(S=>{const k=S.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const b=k.internals.userNode,{x:v,y:x}=k.internals.positionAbsolute,{width:y,height:C}=jo(b);return{node:b,x:v,y:x,width:y,height:C}},Jn);return!d||d.hidden||!oR(d)?null:h.jsx(l,{x:_,y:f,width:m,height:g,style:d.style,selected:!!d.selected,className:r(d),color:n(d),borderRadius:s,strokeColor:t(d),strokeWidth:a,shapeRendering:o,onClick:c,id:d.id})}const gyt=M.memo(myt);var vyt=M.memo(pyt);const byt=200,xyt=150,yyt=e=>!e.hidden,wyt=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?sR(Oh(e.nodeLookup,{filter:yyt}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Syt="react-flow__minimap-desc";function aD({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:_,maskStrokeWidth:f,position:m="bottom-right",onClick:g,onNodeClick:S,pannable:k=!1,zoomable:b=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:C=5}){const A=tr(),E=M.useRef(null),{boundingRect:j,viewBB:T,rfId:D,panZoom:I,translateExtent:P,flowWidth:H,flowHeight:F,ariaLabelConfig:V}=_n(wyt,Jn),X=(e==null?void 0:e.width)??byt,W=(e==null?void 0:e.height)??xyt,Z=j.width/X,J=j.height/W,B=Math.max(Z,J),L=B*X,$=B*W,K=C*B,G=j.x-(L-j.width)/2-K,re=j.y-($-j.height)/2-K,oe=L+K*2,he=$+K*2,ie=`${Syt}-${D}`,q=M.useRef(0),te=M.useRef();q.current=B,M.useEffect(()=>{if(E.current&&I)return te.current=Dbt({domNode:E.current,panZoom:I,getTransform:()=>A.getState().transform,getViewScale:()=>q.current}),()=>{var Ce;(Ce=te.current)==null||Ce.destroy()}},[I]),M.useEffect(()=>{var Ce;(Ce=te.current)==null||Ce.update({translateExtent:P,width:H,height:F,inversePan:x,pannable:k,zoomStep:y,zoomable:b})},[k,b,x,y,P,H,F]);const le=g?Ce=>{var Pe;const[Ee,Le]=((Pe=te.current)==null?void 0:Pe.pointer(Ce))||[0,0];g(Ce,{x:Ee,y:Le})}:void 0,ge=S?M.useCallback((Ce,Ee)=>{const Le=A.getState().nodeLookup.get(Ee).internals.userNode;S(Ce,Le)},[]):void 0,ue=v??V["minimap.ariaLabel"];return h.jsx(Hm,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*B: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 o=="number"?o:void 0},className:Rr(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:X,height:W,viewBox:`${G} ${re} ${oe} ${he}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ie,ref:E,onClick:le,children:[ue&&h.jsx("title",{id:ie,children:ue}),h.jsx(vyt,{onClick:ge,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:a,nodeClassName:s,nodeStrokeWidth:o,nodeComponent:l}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-K},${re-K}h${oe+K*2}v${he+K*2}h${-oe-K*2}z + M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}aD.displayName="MiniMap";M.memo(aD);const kyt=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,Cyt={[od.Line]:"right",[od.Handle]:"bottom-right"};function Eyt({nodeId:e,position:n,variant:t=od.Handle,className:r,style:s=void 0,children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:m,autoScale:g=!0,shouldResize:S,onResizeStart:k,onResize:b,onResizeEnd:v}){const x=IR(),y=typeof e=="string"?e:x,C=tr(),A=M.useRef(null),E=t===od.Handle,j=_n(M.useCallback(kyt(E&&g),[E,g]),Jn),T=M.useRef(null),D=n??Cyt[t];M.useEffect(()=>{if(!(!A.current||!y))return T.current||(T.current=Wbt({domNode:A.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:P,transform:H,snapGrid:F,snapToGrid:V,nodeOrigin:X,domNode:W}=C.getState();return{nodeLookup:P,transform:H,snapGrid:F,snapToGrid:V,nodeOrigin:X,paneDomNode:W}},onChange:(P,H)=>{const{triggerNodeChanges:F,nodeLookup:V,parentLookup:X,nodeOrigin:W}=C.getState(),Z=[],J={x:P.x,y:P.y},B=V.get(y);if(B&&B.expandParent&&B.parentId){const L=B.origin??W,$=P.width??B.measured.width??0,K=P.height??B.measured.height??0,G={id:B.id,parentId:B.parentId,rect:{width:$,height:K,...lR({x:P.x??B.position.x,y:P.y??B.position.y},{width:$,height:K},B.parentId,V,L)}},re=B4([G],V,X,W);Z.push(...re),J.x=P.x?Math.max(L[0]*$,P.x):void 0,J.y=P.y?Math.max(L[1]*K,P.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:y,type:"position",position:{...J}};Z.push(L)}if(P.width!==void 0&&P.height!==void 0){const $={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};Z.push($)}for(const L of H){const $={...L,type:"position"};Z.push($)}F(Z)},onEnd:({width:P,height:H})=>{const F={id:y,type:"dimensions",resizing:!1,dimensions:{width:P,height:H}};C.getState().triggerNodeChanges([F])}})),T.current.update({controlPosition:D,boundaries:{minWidth:l,minHeight:c,maxWidth:d,maxHeight:_},keepAspectRatio:f,resizeDirection:m,onResizeStart:k,onResize:b,onResizeEnd:v,shouldResize:S}),()=>{var P;(P=T.current)==null||P.destroy()}},[D,l,c,d,_,f,k,b,v,S]);const I=D.split("-");return h.jsx("div",{className:Rr(["react-flow__resize-control","nodrag",...I,t,r]),ref:A,style:{...s,scale:j,...o&&{[E?"backgroundColor":"borderColor"]:o}},children:a})}M.memo(Eyt);function Nyt(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(a=>{if(!a)return;function o(){n(a.offsetWidth),r(a.offsetHeight)}const l=new ResizeObserver(o),c=new MutationObserver(o);return l.observe(a),c.observe(a,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),o(),()=>{l.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const N0=8;function zyt(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:a},o]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){o({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let l=0,c=0,d=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":l=e.x-t-_,c=e.y+e.height/2-r/2;break;case"right":l=e.x+e.width+_,c=e.y+e.height/2-r/2;break;case"below":l=e.x+e.width/2-t/2,c=e.y+e.height+_;break;case"above":l=e.x+e.width/2-t/2,c=e.y-r-_;break}const f=l,m=c;l=Math.min(Math.max(l,N0),a-t-N0),c=Math.min(Math.max(c,N0),s-r-N0),d=e.anchor==="left"||e.anchor==="right"?m-c:f-l}return{x:l,y:c,arrowAdjustment:d}}const mb=380,gb=12,Ayt=350,Tyt=150,sx=new EventTarget;function jyt(){sx.dispatchEvent(new Event("move"))}function Myt(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),a=M.useRef(void 0);M.useEffect(()=>{const d=()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),r(null)};return sx.addEventListener("move",d),()=>{sx.removeEventListener("move",d),window.clearTimeout(s.current),window.clearTimeout(a.current)}},[]),M.useEffect(()=>{r(d=>{var f;if(!d)return d;const _=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return _&&d.x===_.x&&d.y===_.y&&d.width===_.width&&d.height===_.height?d:_})},[e,n]);const o=M.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var d;r(((d=e.current)==null?void 0:d.getBoundingClientRect())??null)},Ayt)},[e]),l=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),a.current=window.setTimeout(()=>r(null),Tyt)},[]),c=M.useCallback(()=>window.clearTimeout(a.current),[]);return{rect:t,onMouseEnter:o,onMouseLeave:l,keepOpen:c}}function Ryt(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(N(),t)}function Dyt({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:a,onOpenCode:o,onMouseEnter:l,onMouseLeave:c}){const d=Nyt(),_=s.right+gb+mb<=window.innerWidth,f=s.x-gb-mb>=0,m=_?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:g,y:S}=zyt({x:s.x,y:s.y,width:s.width,height:s.height,anchor:m,distance:gb},d),[k,b]=M.useState(null),v=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null;M.useEffect(()=>{if(b(null),!v)return;let P=!1;return CYe(v).then(H=>{let F=H.diff;if(H.truncated){const Z=F.lastIndexOf(` diff --git `);F=Z!==-1?F.slice(0,Z+1):F.slice(0,F.lastIndexOf(` -`)+1)}let V=[];try{V=F.trim()?A2(F):[]}catch{return}if($.truncated&&V.every(Z=>Z.hunks.length===0))return;let X=0,W=0;for(const Z of V){const J=_4(Z);X+=J.additions,W+=J.deletions}P||b({fileCount:V.length,additions:X,deletions:W,truncated:$.truncated})}).catch(()=>{}),()=>{P=!0}},[v]);const x={done:0,failed:0,cancelled:0,live:0};for(const P of n)P.status==="done"?x.done+=1:P.status==="failed"?x.failed+=1:P.status==="cancelled"?x.cancelled+=1:x.live+=1;const y=t?ep((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,z=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=M.useRef(null),[j,A]=M.useState(!1),[D,O]=M.useState(!1);return M.useEffect(()=>{A(!1)},[z]),M.useEffect(()=>{const P=E.current;P&&O(P.scrollHeight>P.clientHeight+1)},[z,j]),Pp.createPortal(h.jsxs("div",{ref:d.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-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:_b,left:g,top:S,visibility:d.offsetHeight===0?"hidden":void 0},onMouseEnter:l,onMouseLeave:c,children:[h.jsxs("div",{className:"hc-head",children:[h.jsx("span",{className:"hc-slug",children:e.slug}),h.jsx(bo,{status:t?Di(t):"idle"})]}),e.title&&h.jsx("div",{className:"hc-title",children:e.title}),h.jsxs("div",{className:"hc-actions",children:[a&&h.jsxs("button",{type:"button",...vr(a),children:[h.jsx(Uu,{size:13}),$oe()]}),h.jsxs("button",{type:"button",...vr(o),children:[h.jsx(Lp,{size:13}),Noe()]})]}),z&&h.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:E,children:z}),z&&(D||j)&&h.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>A(P=>!P),children:j?Q9():Ure()}),C&&h.jsx("div",{className:"hc-failure",children:C}),h.jsxs("div",{className:"hc-stats",children:[h.jsx("span",{children:new Intl.ListFormat(N(),{style:"short"}).format([n.length===1?g_e():y_e({count:an(n.length)}),...x.done>0?[Whe({count:an(x.done)})]:[],...x.failed>0?[Zhe({count:an(x.failed)})]:[],...x.cancelled>0?[Uhe({count:an(x.cancelled)})]:[],...x.live>0?[c_e({count:an(x.live)})]:[]])}),t&&Nx(t.backend)&&h.jsx(Yy,{backend:t.backend}),y&&h.jsx("span",{children:y}),t&&h.jsx("span",{children:Ea(t.createdAt)})]}),h.jsxs("div",{className:"hc-git",children:[h.jsxs("div",{className:"hc-git-row",children:[h.jsxs("span",{className:"hc-branch",title:e.branchName,children:[h.jsx(Op,{size:12}),e.branchName]}),r&&h.jsxs("span",{children:[Loe()," ",h.jsx("span",{children:r})]})]}),k&&k.fileCount>0&&h.jsx("div",{className:"hc-git-row",title:k.truncated?mO({parent:Ae(r??"parent")}):fO({parent:Ae(r??"parent")}),children:h.jsxs("span",{children:[k.truncated&&"≥ ",h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",k.additions]})," ",h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",k.deletions]})," · ",k.fileCount===1&&!k.truncated?h_e():k.truncated?i_e({count:an(k.fileCount)}):t_e({count:an(k.fileCount)})]})})]}),h.jsxs("div",{className:"hc-foot",children:[h.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),h.jsxs("span",{children:[joe()," ",m2t(e.createdAt)]})]})]}),document.body)}const D9=["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(" "),v2t=264,L9=132,U0=44,b2t=72,x2t=148,y2t=44;function w2t(e){const n=new Map(e.map(a=>[a.id,{exp:a,children:[]}])),t=[];for(const a of e){const o=n.get(a.id),l=a.parentExperimentId?n.get(a.parentExperimentId):void 0;l?l.children.push(o):t.push(o)}const r=(a,o)=>a.exp.createdAt-o.exp.createdAt,s=a=>{a.children.sort(r),a.children.forEach(s)};return t.sort(r),t.forEach(s),t}function S2t(e,n){const t=new Map,r=l=>{const c=t.get(l)??1+l.children.reduce((d,_)=>d+r(_),0);return t.set(l,c),c},s=new Map,a=l=>{const c=s.get(l)??(n(l)||l.children.some(a));return s.set(l,c),c};function o(l){if(n(l)){const _=[];let f=0;for(const m of l.children)a(m)?_.push(...o(m)):f+=r(m);return f>0&&_.push({kind:"elided",id:`el-${l.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:l.exp,children:_}]}if(!a(l))return[];let c=0;const d=[];return(function _(f){c+=1;for(const m of f.children)n(m)?d.push(...o(m)):a(m)?_(m):c+=r(m)})(l),[{kind:"elided",id:`el-${l.exp.id}`,count:c,children:d}]}return e.flatMap(o)}function nx(e){return e.kind==="exp"?v2t:x2t}function N0(e){return e.kind==="exp"?e.exp.id:e.id}function q0(e){if(e.children.length===0)return nx(e);const n=e.children.reduce((t,r)=>t+q0(r),0)+U0*(e.children.length-1);return Math.max(nx(e),n)}function k2t(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const C2t=M.memo(function({data:n}){kc();const{exp:t,latestRun:r,runs:s,isBaseline:a,parentSlug:o,githubOwner:l,githubRepo:c,onOpenView:d,onOpenCode:_}=n,f=r?Di(r):void 0,m=f==="running"||f==="starting"||f==="cancelling",g=a?wFe():m?IFe():_o(),S=s.slice(-8),k=M.useRef(null),b=p2t(k,n);return h.jsxs("div",{ref:k,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] ${m?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[h.jsx(Nl,{type:"target",position:mt.Top}),h.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...vr(v=>d(t.id,"overview",v)),children:[h.jsxs("div",{className:"node-eyebrow",children:[h.jsx("span",{children:g}),h.jsx(bo,{status:f??"idle"})]}),h.jsx("div",{className:"node-head",children:h.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&h.jsx("div",{className:"node-title",children:t.title||t.description}),h.jsxs("div",{className:"node-meta",children:[h.jsx("span",{children:wUe()}),S.length>0?h.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:S.map(v=>h.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 ${k2t(Di(v))}`,title:bT(Di(v))},v.id))}):h.jsx("span",{children:uUe()}),h.jsx("span",{className:"flex-1"}),r&&h.jsx("span",{children:Ea(r.createdAt)})]})]}),h.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&h.jsxs("button",{className:"node-action",title:_Ue(),...vr(v=>d(t.id,"terminal",v)),children:[h.jsx(Uu,{size:13}),RE()]}),h.jsxs("button",{className:"node-action",title:q9({branch:Ae(t.branchName)}),...vr(v=>_(t.id,t.branchName,"files",v)),children:[h.jsx(Lp,{size:13}),YFe()]}),l&&c&&h.jsx("a",{className:"node-action node-action-ext",title:W0({name:Ae(t.branchName)}),"aria-label":W0({name:Ae(t.branchName)}),href:Bp(l,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:h.jsx(um,{size:13})})]}),h.jsx(Nl,{type:"source",position:mt.Bottom}),b.rect&&h.jsx(g2t,{exp:t,runs:s,latestRun:r,parentSlug:o,anchor:b.rect,onOpenLogs:s.length>0?v=>d(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),E2t=M.memo(function({data:n}){kc();const{count:t,onShowProjectScope:r}=n;return h.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:EUe(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[h.jsx(Nl,{type:"target",position:mt.Top}),h.jsx(gx,{size:14}),h.jsxs("span",{className:"elided-node-label",children:[t===1?RFe():AFe({count:an(t)}),h.jsx("span",{className:"elided-node-sub",children:vUe()})]}),h.jsx(Nl,{type:"source",position:mt.Bottom})]})}),N2t={exp:C2t,elided:E2t},WR={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},z2t={...WR.style,strokeDasharray:"4 4"};function A2t({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:a,onShowProjectScope:o}){const{nodes:l,edges:c}=M.useMemo(()=>{const d=new Map;for(const v of n){const x=d.get(v.experimentId);x?x.push(v):d.set(v.experimentId,[v])}for(const v of d.values())v.sort((x,y)=>x.createdAt-y.createdAt);const _=[],f=[],m=v=>!a||v.exp.chatSessionId===a,g=S2t(w2t(e),m),S=new Map(e.map(v=>[v.id,v.slug]));function k(v,x,y){const C=x-nx(v)/2;if(v.kind==="exp"){const j=d.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y},data:{exp:v.exp,latestRun:j[j.length-1]??null,runs:j,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?S.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:y+(L9-y2t)/2},data:{count:v.count,onShowProjectScope:o}});if(v.children.length===0)return;const z=v.children.reduce((j,A)=>j+q0(A),0)+U0*(v.children.length-1);let E=x-z/2;for(const j of v.children){const A=q0(j),D=v.kind==="elided"||j.kind==="elided";f.push({id:`e-${N0(v)}-${N0(j)}`,source:N0(v),target:N0(j),...D?{style:z2t}:{}}),k(j,E+A/2,y+L9+b2t),E+=A+U0}}let b=0;for(const v of g){const x=q0(v);k(v,b+x/2,0),b+=x+U0}return{nodes:_,edges:f}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,a,o]);return e.length===0?h.jsxs("div",{className:D9,children:[h.jsx("p",{className:"empty-state-title",children:aUe()}),h.jsx("p",{className:"empty-state-hint",children:GFe()})]}):l.length===0&&a?h.jsxs("div",{className:D9,children:[h.jsx("p",{className:"empty-state-title",children:nUe()}),h.jsx("p",{className:"empty-state-hint",children:PFe()})]}):h.jsx(Ibt,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.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:l,edges:c,nodeTypes:N2t,defaultEdgeOptions:WR,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:_2t,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:h.jsx(Fbt,{variant:xo.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},a??"project")}const O9=["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(" "),mb=(e,n)=>e.id===n.id&&e.view===n.view,gu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,O4=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,gf=(e,n,t)=>`${e}:${n??""}:${O4(t)}`,KR=e=>({...e,lineScrollRequest:void 0});function vf(e){return typeof e=="object"&&"path"in e?KR(e):e}const vu=(e,n)=>e.branch===n.branch;function Gt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${O4(e)}`:`experiment:${e.id}:${e.view}`}function bf(e,n){const t=e.filter(r=>Gt(r)!==n);return t.length===e.length?e:t}function T2t(e){return e!==void 0}function I9(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===Cf&&n){const r={path:yb,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[Gt(r)],panelOpen:!0}}if(e===XE){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(Gt),panelOpen:!0}}if(e===ZE){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Gt),panelOpen:!0}}return t}function j2t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function M2t(e,n,t,r,s){let a=e,o;const l=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(a.startsWith("artifacts/"))return a=a.slice(10),a?{path:a,source:"artifacts"}:null;if(a==="~"||a.startsWith("~/"))return{path:a,source:"abs"};const d=m=>{const g=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[S,k]=[g(a),g(m)];return S===k?"":S.startsWith(`${k}/`)?S.slice(k.length).replace(/^\/+/,""):null},_=a.startsWith("/")&&c?d(c):null,f=a.startsWith("/")&&l?d(l):null;if(!a.startsWith("/"))o=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(f!==null)a=f;else{const m=s?j2t(s):"[^/]+",g=a.match(new RegExp(`/files/${m}/(.+)$`)),S=g?null:a.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=g||S?null:a.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(g)return{path:g[1],source:"artifacts"};S?(o=S[1],a=S[2]):k&&(a=k[1])}}return a?a.startsWith("/")?{path:a,source:"abs"}:{path:a,sessionId:o}:null}function R2t(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const rx="orx:panel-width",YR="orx:experiments-view";function D2t(){try{return localStorage.getItem(YR)==="tree"?"tree":"table"}catch{return"table"}}const uh=360,L2t=10,O2t=272,I2t=380,B2t=O2t+56,$2t=80,H2t=48;function G0(){return Math.max(uh,window.innerWidth-B2t-I2t)}function P2t(){const e=G0();try{const n=Number(localStorage.getItem(rx));if(Number.isFinite(n)&&n>=uh)return Math.min(n,e)}catch{}return Math.max(uh,Math.min(760,e,Math.round(window.innerWidth*.42)))}function xf(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 B9(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function F2t(){var Lc;const e=kc(),[n,t]=M.useState(null),[r,s]=M.useState(null),a=M.useRef(void 0);a.current=r==null?void 0:r.tourCompleted;const o=M.useRef(!1),[l,c]=M.useState(null),d=M.useRef(null),[_,f]=M.useState(null),[m,g]=M.useState([]),[S,k]=M.useState([]),b=M.useRef(S);b.current=S;const v=M.useRef(new Map),x=M.useRef(new Set),y=M.useRef(null),C=M.useRef(!1),z=M.useRef(new Map),E=M.useRef(new Map),j=M.useRef(0),A=M.useRef(m);A.current=m;const[D,O]=M.useState(null),[P,$]=M.useState(D2t),[F,V]=M.useState("project"),X=M.useRef(null),{open:W,setOpen:Z,ref:J}=zo(X),[H,L]=M.useState(null),[B,Y]=M.useState(!1),G=m.every(ae=>ae.chatSessionId),re=H&&G?F:"project",he=M.useMemo(()=>re!=="agent"?m:m.filter(ae=>ae.chatSessionId===H),[m,re,H]),oe=M.useMemo(()=>{if(re!=="agent")return S;const ae=new Set(he.map(be=>be.id));return S.filter(be=>ae.has(be.experimentId))},[S,he,re]);M.useEffect(()=>{try{localStorage.setItem(YR,P)}catch{}},[P]);const[se,q]=M.useState(null),[te,le]=M.useState("experiments"),[ge,ue]=M.useState([]),[Ce,Ee]=M.useState(!1),[Le,Pe]=M.useState(!1),[Ve,ft]=M.useState(!1),[Be,wt]=M.useState([]),[zt,vt]=M.useState([]),Lt=M.useRef(new Map),St=M.useRef(0),[kt,xe]=M.useState([]),[je,We]=M.useState([]),[st,nt]=M.useState([]),[Ht,bt]=M.useState([]),[tn,Vt]=M.useState(null),[pn,Dt]=M.useState("files"),[En,Ft]=M.useState(new Set),[xr,mn]=M.useState(!1),[Ye,xt]=M.useState(!1),[Vn,Wn]=M.useState(P2t),[Et,rt]=M.useState(!0),[Ie,it]=M.useState(!1),[Ut,Jt]=M.useState(!1),[jt,Dn]=M.useState("chat"),[_r,as]=M.useState(null),ar=M.useRef(new Map),yr=M.useRef(I9()),Ts=M.useRef(null),Nn=M.useRef(!1),nn=M.useRef(ge);nn.current=ge;const Pn=M.useRef(Ht);Pn.current=Ht;const Or=M.useRef(null),Ir=M.useCallback(ae=>{const be=[...ae];Pn.current=be,bt(be)},[]),Gr=M.useCallback(ae=>{Or.current=ae,Vt(ae)},[]),ln=M.useCallback(ae=>{const be=Gt(ae);wt($e=>bf($e,be)),vt($e=>bf($e,be)),xe($e=>bf($e,be)),We($e=>bf($e,be)),nt($e=>bf($e,be));const ke=Ot.current;ke&&"path"in ae&&Lt.current.delete(gf(ke,Ts.current,ae));const De=nn.current.filter($e=>Gt($e)!==be);nn.current=De,ue(De)},[]),or=M.useCallback(ae=>{Nn.current=!1;const be=Gt(ae),ke=[...nn.current.filter(De=>Gt(De)!==be),vf(ae)];nn.current=ke,ue(ke),le(ae)},[]),Cn=M.useCallback((ae,be)=>{Nn.current=!1;const ke=Gt(ae),De=Or.current,$e=uot({order:Pn.current,previewKey:De?Gt(De):null},ke,be);$e.replacedKey&&De&&typeof De!="string"&&Gt(De)===$e.replacedKey&&ln(De),Ir($e.order),$e.previewKey===null?Gr(null):$e.previewKey===ke&&Gr(vf(ae));const pt=[...nn.current.filter(at=>Gt(at)!==ke),vf(ae)];nn.current=pt,ue(pt),le(ae)},[ln,Ir,Gr]),Je=M.useCallback(ae=>{const be=Or.current;be&&Gt(be)===Gt(ae)&&Gr(null)},[Gr]);M.useEffect(()=>{let ae=!1;const be=De=>{const $e=Or.current,pt=De.target;if(pt instanceof Element&&pt.closest("input, textarea, [contenteditable='true']")!==null){ae=!1;return}if($e&&Gt($e)===Gt(yr.current.rightTab)&&(De.metaKey||De.ctrlKey)&&!De.altKey&&!De.shiftKey&&De.key.toLowerCase()==="k"){De.preventDefault(),ae=!0;return}if(ae&&De.key==="Enter"){De.preventDefault(),ae=!1;const It=Or.current;It&&Je(It);return}ae=!1},ke=()=>{ae=!1};return window.addEventListener("keydown",be),window.addEventListener("blur",ke),window.addEventListener("pointerdown",ke),()=>{window.removeEventListener("keydown",be),window.removeEventListener("blur",ke),window.removeEventListener("pointerdown",ke)}},[Je]);const _t=M.useCallback((ae,be)=>{Nn.current=!1;const ke=Gt(ae),De=Or.current;De&&Gt(De)===ke&&Gr(null);const $e=dot({order:Pn.current,previewKey:De?Gt(De):null},ke,nn.current.map(Gt));Ir($e.order);const pt=nn.current.filter(It=>Gt(It)!==ke);if(nn.current=pt,ue(pt),!be)return;const at=$e.fallbackKey?pt.find(It=>Gt(It)===$e.fallbackKey):void 0;at?le(at):(mn(!1),xt(!1))},[Ir,Gr]),wr=M.useCallback(ae=>{ae!=="chat"&&(Nn.current=!1),Dn(ae)},[]);yr.current={rightTab:vf(te),tabHistory:ge,experimentsTabOpen:Ce,filesTabOpen:Le,artifactsTabOpen:Ve,expTabs:Be,fileTabs:zt,planTabs:kt,subagentTabs:je,codeTabs:st,contentTabOrder:Pn.current,previewTab:Or.current,filesView:pn,filesToggled:En,selectedRunId:se,scope:F,panelOpen:xr,panelMax:Ye};const Sr=M.useCallback(ae=>{const be=Ts.current;if(be===ae)return;be&&ar.current.set(be,yr.current);let ke=ae?ar.current.get(ae):void 0;if(!ke){const De=ae===Cf&&a.current===!1&&!o.current;De&&(o.current=!0,Y(!0)),ke=I9(ae??void 0,De)}if(ae&&Nn.current){Nn.current=!1;const De="experiments";ke={...ke,rightTab:De,tabHistory:[...ke.tabHistory.filter($e=>Gt($e)!==Gt(De)),De],experimentsTabOpen:!0,panelOpen:!0}}le(ke.rightTab),nn.current=ke.tabHistory,ue(ke.tabHistory),Ee(ke.experimentsTabOpen),Pe(ke.filesTabOpen),ft(ke.artifactsTabOpen),wt(ke.expTabs),vt(ke.fileTabs),xe(ke.planTabs),We(ke.subagentTabs),nt(ke.codeTabs),Ir(ke.contentTabOrder),Gr(ke.previewTab),Dt(ke.filesView),Ft(ke.filesToggled),q(ke.selectedRunId),V(ke.scope),mn(ke.panelOpen),xt(ke.panelMax),Ts.current=ae,L(ae)},[Ir,Gr]),Vr=(r==null?void 0:r.onboardingCompleted)??!1,[Fn,jo]=M.useState(!1),gs=M.useCallback(()=>jo(!0),[]),os=M.useCallback(async()=>{const ae=await H7({tourCompleted:!0});s(be=>be&&{...be,tourCompleted:ae.tourCompleted}),jo(!1)},[]),js=M.useCallback(async()=>{await os(),Jt(!0)},[os]);M.useEffect(()=>{!_||!V_(_)||Ie||!Vr||r!=null&&r.tourCompleted||gs()},[_,Ie,Vr,gs,r==null?void 0:r.tourCompleted]);const Xt=(n==null?void 0:n.find(ae=>ae.id===_))??null;M.useEffect(()=>{const ae=Ie||l||r===null?null:Xt==null?void 0:Xt.name;document.title=ae?`${ka(ae)} - OpenResearch`:"OpenResearch"},[Ie,l,r,Xt]);const Ot=M.useRef(_);Ot.current=_;const Ws=M.useCallback(()=>{Dn("chat"),Ee(!0),or("experiments"),mn(!0),Ts.current||(Nn.current=!0)},[or]),Ii=M.useCallback(()=>{c(null),t(null),s(null),Promise.allSettled([nWe(),sWe()]).then(([ae,be])=>{const ke=[];ae.status==="fulfilled"?(t(ae.value),f(De=>{var $e;return De&&ae.value.some(pt=>pt.id===De)?De:(($e=ae.value[0])==null?void 0:$e.id)??null})):ke.push(iq()),be.status==="fulfilled"?(d.current=be.value.preferredAgent,s(be.value)):ke.push(bq()),ke.length>0&&c(Sq({items:new Intl.ListFormat(N()).format(ke)}))})},[]);M.useEffect(()=>{Ii()},[Ii]);const kr=M.useRef(Promise.resolve()),ls=M.useRef(0),vs=M.useCallback(ae=>{const be=++ls.current;s(De=>De&&{...De,preferredAgent:ae});const ke=kr.current.then(()=>H7({preferredAgent:ae})).then(De=>{d.current=De.preferredAgent,be===ls.current&&s($e=>$e&&{...$e,preferredAgent:De.preferredAgent})}).catch(De=>{throw be===ls.current&&s($e=>$e&&{...$e,preferredAgent:d.current}),De});return kr.current=ke.catch(()=>{}),ke},[]);M.useEffect(()=>{const ae=()=>Wn(be=>Math.min(be,G0()));return window.addEventListener("resize",ae),()=>window.removeEventListener("resize",ae)},[]);const lr=M.useCallback(ae=>{C.current=!1,z.current.clear(),E.current.clear();const be=++j.current;Cx(ae).then(ke=>{if(Ot.current!==ae||y.current!==ae||j.current!==be)return;z.current=new Map(ke.map($e=>[$e.id,$e]));const De=[...E.current.values()].some($e=>{const pt=z.current.get($e.id);return!pt||pt.status!=="running"&&pt.updatedAt<=$e.updatedAt});E.current.clear();for(const $e of ke){const pt=v.current.get($e.id);(!pt||pt.updatedAt<$e.updatedAt)&&v.current.set($e.id,$e)}k($e=>{const pt=new Map(ke.map(at=>[at.id,at]));for(const at of $e){const It=pt.get(at.id);(!It||It.updatedAt<=at.updatedAt)&&pt.set(at.id,at)}return[...pt.values()]}),C.current=!0,De&&Ws()}).catch(()=>{j.current===be&&E.current.clear()})},[Ws]);M.useEffect(()=>{if(!_)return;const ae=Ts.current;ae&&ar.current.set(ae,yr.current),Ts.current=null,Nn.current=!1,L(null),y.current=_,v.current.clear(),x.current.clear(),hWe(_).catch(()=>{}),g([]),k([]),O(null),q(null),wt([]),vt([]),Y(!1),xe([]),We([]),nt([]),Ir([]),Gr(null),Dt("files"),Ft(new Set),nn.current=[],ue([]),le("experiments"),Ee(!1),Pe(!1),ft(!1),mn(!1),xt(!1),V("project"),pWe(_).then(g).catch(()=>{}),lr(_),U7(_).then(O).catch(()=>{})},[lr,_,Ir,Gr]);const Ks=M.useCallback(()=>{const ae=Ot.current;ae&&U7(ae).then(O).catch(()=>{})},[]),Rl=M.useCallback(()=>{Ks(),Dn("chat"),ft(!0),or("artifacts"),mn(!0)},[Ks,or]);eYe({onReconnect:()=>{const ae=Ot.current;ae&&(y.current=ae,v.current.clear(),x.current.clear(),lr(ae))},onRun:ae=>{if(ae.projectId!==Ot.current||ae.projectId!==y.current)return;const be=v.current.get(ae.id),ke=x.current.has(ae.id);if(be&&be.updatedAt>ae.updatedAt||(v.current.set(ae.id,ae),x.current.add(ae.id),k(pt=>xf(pt,ae)),ae.status!=="running"||(be==null?void 0:be.status)==="running"))return;const De=z.current.get(ae.id),$e=C.current&&(!De||De.status!=="running"&&De.updatedAt<=ae.updatedAt);ke&&be||$e?Ws():C.current||E.current.set(ae.id,ae)},onExperiment:ae=>{ae.projectId===Ot.current&&g(be=>xf(be,ae))},onProject:ae=>{t(be=>be?xf(be,ae):[ae])},onArtifacts:ae=>{ae===Ot.current&&Ks()}});const $a=M.useCallback(()=>V("project"),[]),Br=M.useCallback((ae,be="overview",ke="preview")=>{const De={id:ae,view:be};wt($e=>$e.some(pt=>mb(pt,De))?$e:[...$e,De]),Cn(De,ke),mn(!0)},[Cn]),cs=M.useCallback((ae,be="preview")=>{const ke=b.current.filter($e=>$e.id===ae||$e.id.startsWith(ae)),De=ke.length===1?ke[0]:null;De&&(q(De.id),Br(De.experimentId,"terminal",be))},[Br]),Ys=M.useMemo(()=>new Map(m.map(ae=>{var be;return[ae.id,((be=ae.title)==null?void 0:be.trim())||ae.slug||_o()]})),[m,e]),Kn=B9(Ys),Bi=M.useMemo(()=>{const ae=new Map;for(const be of S)ae.set(be.id,Kn.get(be.experimentId)??_o());return ae},[Kn,S,e]),Yn=B9(Bi),Ln=M.useCallback(ae=>{const be=Yn.get(ae);if(be)return be;const ke=[...Yn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Yn]),Xs=M.useCallback(ae=>{const be=Kn.get(ae);if(be)return be;const ke=[...Kn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Kn]),na=M.useCallback((ae,be="preview")=>{const ke=A.current.filter(De=>De.id===ae||De.id.startsWith(ae));ke.length===1&&Br(ke[0].id,"overview",be)},[Br]),Rc=M.useCallback(ae=>{const be=Be.findIndex(ke=>mb(ke,ae));be!==-1&&(wt(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[Be,_t,te]),cr=M.useCallback((ae,be="preview")=>{const ke=KR(ae);vt(De=>{const $e=De.findIndex(at=>gu(at,ae));if($e===-1)return[...De,ke];const pt=De.slice();return pt[$e]=ke,pt}),Cn(ae,be),mn(!0)},[Cn]),Ha=M.useCallback((ae,be,ke,De,$e,pt)=>{const at=n==null?void 0:n.find(Kr=>Kr.id===_),It=M2t(ae,at==null?void 0:at.repoPath,be,(at==null?void 0:at.artifactsDir)??(at==null?void 0:at.filesDir),at==null?void 0:at.slug);if(!It)return null;const zn=$e?A.current.find(Kr=>Kr.id===$e||$e.length>=6&&Kr.id.startsWith($e)):void 0,xs=ke??(zn==null?void 0:zn.branchName),ys=It.source==null||It.source==="repo";return xs&&ys&&(It.ref=xs),pt&&!It.ref&&ys&&(It.branchLabel=pt),De!=null&&(It.line=De,It.lineScrollRequest=++St.current),It},[n,_]),Pa=M.useCallback((ae,be,ke,De,$e,pt,at="preview")=>{const It=Ha(ae,be,ke,De,$e,pt);It&&cr(It,at)},[cr,Ha]),Fa=M.useCallback(ae=>cr({path:ae,source:"artifacts"},"keepOpen"),[cr]),Mo=M.useCallback((ae,be,ke,De,$e,pt="preview")=>{const at=Ha(ae,be,$e,ke,De);at&&cr(at,pt)},[cr,Ha]),Ms=M.useCallback((ae,be)=>{Je(ae),be()},[Je]),Dc=M.useCallback(ae=>{const be=zt.findIndex(ke=>gu(ke,ae));be!==-1&&(vt(ke=>ke.filter((De,$e)=>$e!==be)),_&&Lt.current.delete(gf(_,H,ae)),H===Cf&&gu(ae,{path:yb,source:"artifacts"})&&Y(!1),_t(ae,Gt(te)===Gt(ae)))},[H,zt,_t,_,te]),Ua=M.useCallback(ae=>{ae.lineScrollRequest!==void 0&&le(be=>typeof be!="object"||!("path"in be)||!gu(be,ae)||be.lineScrollRequest!==ae.lineScrollRequest?be:vf(be))},[]),bs=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"plan",sessionId:be,promptId:ke,plan:ae};xe(pt=>{const at=pt.findIndex(zn=>zn.promptId===ke);if(at===-1)return[...pt,$e];const It=pt.slice();return It[at]=$e,It}),Cn($e,De),mn(!0)},[Cn]),nr=M.useCallback(ae=>{const be=kt.findIndex(ke=>ke.promptId===ae.promptId);be!==-1&&(xe(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[_t,kt,te]),qa=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"subagent",sessionId:ae,spawnPartId:be,label:ke};We(pt=>pt.some(at=>at.spawnPartId===be)?pt:[...pt,$e]),Cn($e,De),mn(!0)},[Cn]),ur=M.useCallback(ae=>{const be=je.findIndex(ke=>ke.spawnPartId===ae.spawnPartId);be!==-1&&(We(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[_t,te,je]),[Wr,Ro]=M.useState({});M.useEffect(()=>{if(Ro(at=>{const It=new Set(je.map(zn=>zn.spawnPartId));return Object.keys(at).every(zn=>It.has(zn))?at:Object.fromEntries(Object.entries(at).filter(([zn])=>It.has(zn)))}),je.length===0)return;let ae=!0;const be=new Set,ke=(at,It,zn)=>{Ro(xs=>{var Kr;let ys=xs;for(const wi of It)if(!(zn&&be.has(wi.spawnPartId)))for(const Oo of at){const $i=n4(Oo.parts,wi.spawnPartId);if(!$i)continue;zn||be.add(wi.spawnPartId);const Wa={label:lut($i),running:((Kr=$i.state)==null?void 0:Kr.status)==="running"},Io=ys[wi.spawnPartId];(!Io||Io.label!==Wa.label||Io.running!==Wa.running)&&(ys===xs&&(ys={...xs}),ys[wi.spawnPartId]=Wa);break}return ys})};let De=0;const $e=()=>{const at=++De;for(const It of new Set(je.map(zn=>zn.sessionId)))Cu(It).then(({messages:zn})=>{ae&&at===De&&ke(zn,je.filter(xs=>xs.sessionId===It),!0)}).catch(()=>{})};$e();const pt=Bf(at=>{if(at.type==="reconnected"){be.clear(),$e();return}if(at.type!=="message")return;const It=je.filter(zn=>zn.sessionId===at.sessionId);It.length&&ke([at.message],It,!1)});return()=>{ae=!1,pt()}},[je]);const us=M.useCallback((ae,be,ke="files",De="preview")=>{const $e={code:!0,experimentId:ae,branch:be,view:ke,toggled:new Set};nt(pt=>pt.some(at=>vu(at,$e))?pt.map(at=>vu(at,$e)?{...at,experimentId:ae,view:ke}:at):[...pt,$e]),Cn($e,De),mn(!0)},[Cn]),Do=M.useCallback((ae,be)=>{nt(ke=>ke.map(De=>vu(De,ae)?{...De,...be}:De))},[]),ra=M.useCallback(ae=>{const be=st.findIndex(ke=>vu(ke,ae));be!==-1&&(nt(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[st,_t,te]),Zs=M.useCallback(()=>{Dn("chat"),Pe(!0),or("files"),mn(!0)},[or]),sa=M.useCallback(ae=>{ae==="experiments"?Ee(!1):ae==="files"?Pe(!1):ft(!1),_t(ae,te===ae)},[_t,te]),xi=ae=>{ae.preventDefault(),ae.currentTarget.setPointerCapture(ae.pointerId);const ke=document.body.style.userSelect;document.body.style.userSelect="none";const De=Ye,$e=ae.clientX,pt=Vn;let at=!1;function It(){window.removeEventListener("pointermove",zn),window.removeEventListener("pointerup",It),window.removeEventListener("pointercancel",It),document.body.style.userSelect=ke}function zn(xs){if(De){const Oo=xs.clientX-$e;if(at||OoKr+$2t){xt(!0);return}xt(!1);const wi=Math.min(Math.max(ys,uh),Kr);Wn(wi);try{localStorage.setItem(rx,String(wi))}catch{}}window.addEventListener("pointermove",zn),window.addEventListener("pointerup",It),window.addEventListener("pointercancel",It)},Rs=(ae,be)=>{t(ke=>ke?xf(ke,ae):[ae]),f(ae.id),it(!1),be&&(as({projectId:ae.id,message:be}),wr("git"))},Lo=ae=>{t(be=>be&&be.filter(ke=>ke.id!==ae)),_===ae&&f(null)},pr=typeof te=="object"&&"id"in te?te:null,Hn=typeof te=="object"&&"path"in te?te:null,Qs=H===Cf&&B?zt.find(ae=>gu(ae,{path:yb,source:"artifacts"})):void 0,Ds=Qs?[Qs]:[],yi=typeof te=="object"&&"kind"in te&&te.kind==="plan"?te:null,gn=typeof te=="object"&&"kind"in te&&te.kind==="subagent"?te:null,Js=typeof te=="object"&&"code"in te?te:null,Cr=Js?st.find(ae=>vu(ae,Js))??null:null,ia=new Map;for(const ae of[...Be,...zt,...kt,...je,...st])ia.set(Gt(ae),ae);const _d=Qs?Gt(Qs):null,Ga=Ht.filter(ae=>ae!==_d).map(ae=>ia.get(ae)).filter(T2t),$r=ae=>tn!==null&&Gt(tn)===Gt(ae),aa=ae=>h.jsx(hl,{active:Hn!==null&&gu(Hn,ae),label:ae.path.split("/").pop()||ae.path,icon:h.jsx(FE,{size:12,className:"shrink-0"}),preview:$r(ae),onSelect:()=>or(ae),onPromote:()=>Je(ae),onClose:()=>Dc(ae)},`file:${O4(ae)}`),Ls=pr?m.find(ae=>ae.id===pr.id)??null:null,Va=Cr?m.find(ae=>ae.id===Cr.experimentId)??null:null,pd=ae=>{var ke,De;if("path"in ae)return aa(ae);if("id"in ae){const $e=m.find(pt=>pt.id===ae.id);return h.jsx(hl,{active:pr!==null&&mb(pr,ae),label:$e?$e.title||$e.slug:"…",icon:ae.view==="overview"?h.jsx(_Ge,{size:12,className:"shrink-0"}):h.jsx(Uu,{size:12,className:"shrink-0"}),preview:$r(ae),onSelect:()=>or(ae),onPromote:()=>Je(ae),onClose:()=>Rc(ae)},Gt(ae))}if("kind"in ae&&ae.kind==="plan")return h.jsx(hl,{active:yi!==null&&yi.promptId===ae.promptId,label:K9(),icon:h.jsx(wx,{size:12,className:"shrink-0"}),preview:$r(ae),onSelect:()=>or(ae),onPromote:()=>Je(ae),onClose:()=>nr(ae)},Gt(ae));if("kind"in ae)return h.jsx(hl,{active:gn!==null&&gn.spawnPartId===ae.spawnPartId,label:((ke=Wr[ae.spawnPartId])==null?void 0:ke.label)??ae.label??Nq(),shimmer:((De=Wr[ae.spawnPartId])==null?void 0:De.running)??!1,icon:h.jsx(kx,{size:12,className:"shrink-0"}),preview:$r(ae),onSelect:()=>or(ae),onPromote:()=>Je(ae),onClose:()=>ur(ae)},Gt(ae));const be=m.find($e=>$e.id===ae.experimentId);return h.jsx(hl,{active:Cr!==null&&vu(Cr,ae),label:(be==null?void 0:be.slug)??ae.branch,icon:h.jsx(If,{size:12,className:"shrink-0"}),preview:$r(ae),onSelect:()=>or(ae),onPromote:()=>Je(ae),onClose:()=>ra(ae)},Gt(ae))};if(l)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsxs("div",{className:O9,children:[h.jsx("p",{children:l}),h.jsx(Qe,{variant:"primary",onClick:Ii,children:Pu()})]})});if(n===null||r===null)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsx("div",{className:O9,children:h.jsx(dn,{})})});if(n.length===0)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(xC,{}),Vr?h.jsx(EC,{projects:n,onOpen:f,onCreated:Rs,onDeleted:Lo}):h.jsx(F_t,{preferredAgent:r.preferredAgent,onDone:(ae,be)=>{ict(),d.current=be,t([ae]),f(ae.id),s(ke=>({...ke??{tourCompleted:!1},onboardingCompleted:!0,preferredAgent:be}))}})]});const md=h.jsx(H_t,{projectName:((Lc=n.find(ae=>ae.id===_))==null?void 0:Lc.name)??"",onHome:()=>it(!0),onNewProject:()=>Jt(!0),onRepository:()=>wr("git"),onCollapse:()=>rt(!1)});return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(xC,{}),h.jsx(wot,{}),Ie?h.jsx(EC,{projects:n,onOpen:ae=>{f(ae),it(!1)},onCreated:Rs,onDeleted:Lo}):h.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[_&&h.jsx(xut,{projectId:_,projectName:(Xt==null?void 0:Xt.name)??"",railHeader:md,railOpen:Et,onShowRail:()=>rt(!0),mainView:jt,onSelectMainView:wr,experimentsActive:jt==="chat"&&xr&&te==="experiments",filesActive:jt==="chat"&&xr&&te==="files",artifactsActive:jt==="chat"&&xr&&te==="artifacts",onOpenExperiments:Ws,onOpenArtifacts:Rl,onOpenFile:Mo,onOpenRun:cs,runExperimentName:Ln,onOpenExperiment:na,experimentName:Xs,onOpenPlan:bs,onOpenSubagent:qa,onOpenWorktree:Zs,composerPrefill:Xt&&V_(Xt.id)&&(r==null?void 0:r.tourCompleted)===!1?eWe:null,onOpenDemoWelcome:Xt&&V_(Xt.id)?gs:void 0,onActiveSessionChange:Sr,preferredAgent:r.preferredAgent,onPreferredAgentChange:vs,children:jt==="skills"?h.jsx(g_t,{}):jt!=="chat"?h.jsx(qlt,{tab:jt,project:Xt,githubPublicationError:_r&&_r.projectId===(Xt==null?void 0:Xt.id)?_r.message:null,onProjectUpdate:ae=>{t(be=>be?xf(be,ae):[ae]),ae.githubEnabled&&as(null)},onSelectTab:wr}):null}),jt==="chat"&&xr&&h.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Ye?"max":""}`,style:Ye?void 0:{width:Vn},"data-onboarding":"experiments",children:[h.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 ${Ye?"cursor-e-resize":"cursor-col-resize"}`,title:Ye?gU():hU(),onPointerDown:xi}),h.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:[h.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:[Ds.map(aa),Le&&h.jsx(hl,{active:te==="files",label:$U(),icon:h.jsx(If,{size:12,className:"shrink-0"}),onSelect:()=>or("files"),onClose:()=>sa("files")}),Ve&&h.jsx(hl,{active:te==="artifacts",label:rU(),icon:h.jsx(bx,{size:12,className:"shrink-0"}),onSelect:()=>or("artifacts"),onClose:()=>sa("artifacts")}),Ce&&h.jsx(hl,{active:te==="experiments",label:LU(),icon:h.jsx(vx,{size:12,className:"shrink-0"}),onSelect:()=>or("experiments"),onClose:()=>sa("experiments")}),Ga.map(pd)]}),h.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[h.jsx(Qt,{title:Ye?y6():x6(),"aria-label":Ye?y6():x6(),onClick:()=>xt(ae=>!ae),children:Ye?h.jsx(pVe,{size:14}):h.jsx(fVe,{size:14})}),h.jsx(Qt,{title:g6(),"aria-label":g6(),onClick:()=>{Nn.current=!1,mn(!1),xt(!1)},children:h.jsx(hs,{size:14})})]})]}),te==="artifacts"?h.jsx(ho,{children:Xt&&h.jsx(c_t,{project:Xt,artifacts:D,onChanged:Ks,onOpenFile:Fa,onOpenStorage:()=>wr("storage")},Xt.id)}):te==="experiments"?h.jsxs(ho,{children:[h.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[h.jsx("span",{className:"flex-1"}),h.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[h.jsxs("div",{className:"option-picker relative inline-flex",ref:J,children:[h.jsx(Qt,{size:"small",ref:X,className:"experiment-scope-trigger",active:re==="agent",title:NU({scope:re==="agent"?v6():b6()}),"aria-label":UU(),"aria-expanded":W,onClick:()=>Z(ae=>!ae),children:h.jsx(XGe,{size:16,strokeWidth:2.5})}),W&&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 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:[h.jsxs(Zr,{"aria-pressed":re==="agent",disabled:!H||!G,title:H?G?void 0:WU():tq(),onClick:()=>{V("agent"),Z(!1)},children:[h.jsx("span",{children:v6()}),re==="agent"&&h.jsx(di,{size:13})]}),h.jsxs(Zr,{"aria-pressed":re==="project",onClick:()=>{V("project"),Z(!1)},children:[h.jsx("span",{children:b6()}),re==="project"&&h.jsx(di,{size:13})]})]})]}),h.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":jU(),children:[h.jsx("button",{className:P==="table"?"active":"","aria-pressed":P==="table",onClick:()=>$("table"),children:jq()}),h.jsx("button",{className:P==="tree"?"active":"","aria-pressed":P==="tree",onClick:()=>$("tree"),children:Lq()})]})]})]}),h.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:P==="tree"?Xt&&h.jsx(A2t,{experiments:m,runs:oe,project:Xt,onOpenView:Br,onOpenCode:us,agentSessionId:re==="agent"?H:null,onShowProjectScope:$a}):h.jsx(J_t,{runs:oe,emptyHint:re==="agent"&&m.length>0?ZU():void 0,experiments:he,onOpen:(ae,be)=>{Br(ae.id,"overview",be)},onOpenLogs:(ae,be,ke)=>{q(be),Br(ae,"terminal",ke)},onOpenCode:(ae,be)=>{const ke=m.find(De=>De.id===ae);ke&&us(ke.id,ke.branchName,"files",be)},onCancel:eN})})]}):te==="files"?h.jsx(ho,{children:Xt?h.jsx(Qht,{sessionId:H??void 0,project:Xt,view:pn,toggled:En,onViewChange:Dt,onToggledChange:Ft,onOpenFile:(ae,be,ke,De)=>Pa(ae,be,ke,void 0,void 0,void 0,De)},`files:${H??`project:${Xt.id}`}`):h.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:h.jsx(Lu,{children:h.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:[h.jsx(UE,{size:22}),h.jsx("p",{children:pq()})]})})})}):Hn?h.jsx(ho,{children:_&&h.jsx($_t,{projectId:_,path:Hn.path,source:Hn.source,sessionId:Hn.source==="artifacts"?H??void 0:Hn.sessionId,gitRef:Hn.ref,line:Hn.line,branchLabel:R2t(Hn,Xt==null?void 0:Xt.baselineBranch),onOpenFile:(ae,be,ke,De)=>Ms(Hn,()=>Pa(ae,be,ke,void 0,void 0,void 0,De)),scrollPosition:Lt.current.get(gf(_,H,Hn)),onScrollPositionChange:ae=>{Lt.current.set(gf(_,H,Hn),ae)},lineScrollRequest:Hn.lineScrollRequest,onLineScrollRequestHandled:()=>Ua(Hn),onEdit:()=>Je(Hn)},gf(_,H,Hn))}):yi?h.jsx(ho,{children:h.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:h.jsx(Na,{text:yi.plan,onOpenFile:(ae,be,ke,De,$e)=>Ms(yi,()=>Pa(ae,yi.sessionId,De,be,ke,void 0,$e))})})}):gn?h.jsx(yut,{sessionId:gn.sessionId,spawnPartId:gn.spawnPartId,onOpenFile:(ae,be,ke,De,$e)=>Ms(gn,()=>Mo(ae,gn.sessionId,be,ke,De,$e)),onOpenRun:(ae,be)=>Ms(gn,()=>cs(ae,be)),runExperimentName:Ln,onOpenExperiment:(ae,be)=>Ms(gn,()=>na(ae,be)),experimentName:Xs,onOpenSubagent:(ae,be,ke)=>Ms(gn,()=>qa(gn.sessionId,ae,be,ke))},gn.spawnPartId):Cr?h.jsx(ho,{children:_&&Xt&&Cr&&Va&&h.jsx(Xht,{projectId:_,project:Xt,experiment:Va,view:Cr.view,toggled:Cr.toggled,onViewChange:ae=>Do(Cr,{view:ae}),onToggledChange:ae=>Do(Cr,{toggled:ae}),onOpenFile:(ae,be,ke,De)=>Ms(Cr,()=>Pa(ae,be,ke,void 0,void 0,Va.branchName,De))},`code:${Cr.branch}`)}):h.jsx(ho,{children:pr&&Ls&&Xt&&h.jsx(w_t,{experiment:Ls,project:Xt,view:pr.view,runs:S,selectedRunId:se,onSelectRun:q,parentExperiment:m.find(ae=>ae.id===Ls.parentExperimentId)??null,onOpenView:(ae,be,ke)=>{be&&q(be),Ms(pr,()=>Br(Ls.id,ae,ke))},onOpenCode:(ae,be)=>Ms(pr,()=>us(Ls.id,Ls.branchName,ae,be))},`${pr.id}:${pr.view}`)})]})]}),Ut&&h.jsx(aM,{onClose:()=>Jt(!1),onCreated:(ae,be)=>{Jt(!1),Rs(ae,be)}}),Fn&&!Ie&&Xt&&V_(Xt.id)&&h.jsx(e0t,{onClose:os,onCreateProject:js})]})}const U2t=N();document.documentElement.lang=U2t;document.documentElement.dir="ltr";NL.createRoot(document.getElementById("root")).render(h.jsxs(M.StrictMode,{children:[h.jsx(F2t,{}),h.jsx(eZe,{})]})); +`)+1)}let V=[];try{V=F.trim()?M2(F):[]}catch{return}if(H.truncated&&V.every(Z=>Z.hunks.length===0))return;let X=0,W=0;for(const Z of V){const J=b4(Z);X+=J.additions,W+=J.deletions}P||b({fileCount:V.length,additions:X,deletions:W,truncated:H.truncated})}).catch(()=>{}),()=>{P=!0}},[v]);const x={done:0,failed:0,cancelled:0,live:0};for(const P of n)P.status==="done"?x.done+=1:P.status==="failed"?x.failed+=1:P.status==="cancelled"?x.cancelled+=1:x.live+=1;const y=t?tp((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,A=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=M.useRef(null),[j,T]=M.useState(!1),[D,I]=M.useState(!1);return M.useEffect(()=>{T(!1)},[A]),M.useEffect(()=>{const P=E.current;P&&I(P.scrollHeight>P.clientHeight+1)},[A,j]),Up.createPortal(h.jsxs("div",{ref:d.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-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:mb,left:g,top:S,visibility:d.offsetHeight===0?"hidden":void 0},onMouseEnter:l,onMouseLeave:c,children:[h.jsxs("div",{className:"hc-head",children:[h.jsx("span",{className:"hc-slug",children:e.slug}),h.jsx(xo,{status:t?Di(t):"idle"})]}),e.title&&h.jsx("div",{className:"hc-title",children:e.title}),h.jsxs("div",{className:"hc-actions",children:[a&&h.jsxs("button",{type:"button",...gr(a),children:[h.jsx(Wu,{size:13}),cle()]}),h.jsxs("button",{type:"button",...gr(o),children:[h.jsx(Op,{size:13}),Zoe()]})]}),A&&h.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:E,children:A}),A&&(D||j)&&h.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>T(P=>!P),children:j?sE():hse()}),C&&h.jsx("div",{className:"hc-failure",children:C}),h.jsxs("div",{className:"hc-stats",children:[h.jsx("span",{children:new Intl.ListFormat(N(),{style:"short"}).format([n.length===1?P_e():G_e({count:Vt(n.length)}),...x.done>0?[g_e({count:Vt(x.done)})]:[],...x.failed>0?[y_e({count:Vt(x.failed)})]:[],...x.cancelled>0?[h_e({count:Vt(x.cancelled)})]:[],...x.live>0?[R_e({count:Vt(x.live)})]:[]])}),t&&Mx(t.backend)&&h.jsx(e4,{backend:t.backend}),y&&h.jsx("span",{children:y}),t&&h.jsx("span",{children:Na(t.createdAt)})]}),h.jsxs("div",{className:"hc-git",children:[h.jsxs("div",{className:"hc-git-row",children:[h.jsxs("span",{className:"hc-branch",title:e.branchName,children:[h.jsx(Ip,{size:12}),e.branchName]}),r&&h.jsxs("span",{children:[ile()," ",h.jsx("span",{children:r})]})]}),k&&k.fileCount>0&&h.jsx("div",{className:"hc-git-row",title:k.truncated?AO({parent:Ae(r??"parent")}):CO({parent:Ae(r??"parent")}),children:h.jsxs("span",{children:[k.truncated&&"≥ ",h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",k.additions]})," ",h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",k.deletions]})," · ",k.fileCount===1&&!k.truncated?I_e():k.truncated?A_e({count:Vt(k.fileCount)}):C_e({count:Vt(k.fileCount)})]})})]}),h.jsxs("div",{className:"hc-foot",children:[h.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),h.jsxs("span",{children:[tle()," ",Ryt(e.createdAt)]})]})]}),document.body)}const $9=["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(" "),Lyt=264,H9=132,q0=44,Oyt=72,Iyt=148,Byt=44;function $yt(e){const n=new Map(e.map(a=>[a.id,{exp:a,children:[]}])),t=[];for(const a of e){const o=n.get(a.id),l=a.parentExperimentId?n.get(a.parentExperimentId):void 0;l?l.children.push(o):t.push(o)}const r=(a,o)=>a.exp.createdAt-o.exp.createdAt,s=a=>{a.children.sort(r),a.children.forEach(s)};return t.sort(r),t.forEach(s),t}function Hyt(e,n){const t=new Map,r=l=>{const c=t.get(l)??1+l.children.reduce((d,_)=>d+r(_),0);return t.set(l,c),c},s=new Map,a=l=>{const c=s.get(l)??(n(l)||l.children.some(a));return s.set(l,c),c};function o(l){if(n(l)){const _=[];let f=0;for(const m of l.children)a(m)?_.push(...o(m)):f+=r(m);return f>0&&_.push({kind:"elided",id:`el-${l.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:l.exp,children:_}]}if(!a(l))return[];let c=0;const d=[];return(function _(f){c+=1;for(const m of f.children)n(m)?d.push(...o(m)):a(m)?_(m):c+=r(m)})(l),[{kind:"elided",id:`el-${l.exp.id}`,count:c,children:d}]}return e.flatMap(o)}function ix(e){return e.kind==="exp"?Lyt:Iyt}function z0(e){return e.kind==="exp"?e.exp.id:e.id}function G0(e){if(e.children.length===0)return ix(e);const n=e.children.reduce((t,r)=>t+G0(r),0)+q0*(e.children.length-1);return Math.max(ix(e),n)}function Pyt(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const Fyt=M.memo(function({data:n}){Cc();const{exp:t,latestRun:r,runs:s,isBaseline:a,parentSlug:o,githubOwner:l,githubRepo:c,onOpenView:d,onOpenCode:_}=n,f=r?Di(r):void 0,m=f==="running"||f==="starting"||f==="cancelling",g=a?Sqe():m?Bqe():po(),S=s.slice(-8),k=M.useRef(null),b=Myt(k,n);return h.jsxs("div",{ref:k,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] ${m?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[h.jsx(El,{type:"target",position:mt.Top}),h.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...gr(v=>d(t.id,"overview",v)),children:[h.jsxs("div",{className:"node-eyebrow",children:[h.jsx("span",{children:g}),h.jsx(xo,{status:f??"idle"})]}),h.jsx("div",{className:"node-head",children:h.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&h.jsx("div",{className:"node-title",children:t.title||t.description}),h.jsxs("div",{className:"node-meta",children:[h.jsx("span",{children:SGe()}),S.length>0?h.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:S.map(v=>h.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 ${Pyt(Di(v))}`,title:RT(Di(v))},v.id))}):h.jsx("span",{children:dGe()}),h.jsx("span",{className:"flex-1"}),r&&h.jsx("span",{children:Na(r.createdAt)})]})]}),h.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&h.jsxs("button",{className:"node-action",title:pGe(),...gr(v=>d(t.id,"terminal",v)),children:[h.jsx(Wu,{size:13}),PE()]}),h.jsxs("button",{className:"node-action",title:Y9({branch:Ae(t.branchName)}),...gr(v=>_(t.id,t.branchName,"files",v)),children:[h.jsx(Op,{size:13}),Xqe()]}),l&&c&&h.jsx("a",{className:"node-action node-action-ext",title:K0({name:Ae(t.branchName)}),"aria-label":K0({name:Ae(t.branchName)}),href:$p(l,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:h.jsx(fm,{size:13})})]}),h.jsx(El,{type:"source",position:mt.Bottom}),b.rect&&h.jsx(Dyt,{exp:t,runs:s,latestRun:r,parentSlug:o,anchor:b.rect,onOpenLogs:s.length>0?v=>d(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),Uyt=M.memo(function({data:n}){Cc();const{count:t,onShowProjectScope:r}=n;return h.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:NGe(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[h.jsx(El,{type:"target",position:mt.Top}),h.jsx(yx,{size:14}),h.jsxs("span",{className:"elided-node-label",children:[t===1?Dqe():Tqe({count:Vt(t)}),h.jsx("span",{className:"elided-node-sub",children:bGe()})]}),h.jsx(El,{type:"source",position:mt.Bottom})]})}),qyt={exp:Fyt,elided:Uyt},oD={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},Gyt={...oD.style,strokeDasharray:"4 4"};function Vyt({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:a,onShowProjectScope:o}){const{nodes:l,edges:c}=M.useMemo(()=>{const d=new Map;for(const v of n){const x=d.get(v.experimentId);x?x.push(v):d.set(v.experimentId,[v])}for(const v of d.values())v.sort((x,y)=>x.createdAt-y.createdAt);const _=[],f=[],m=v=>!a||v.exp.chatSessionId===a,g=Hyt($yt(e),m),S=new Map(e.map(v=>[v.id,v.slug]));function k(v,x,y){const C=x-ix(v)/2;if(v.kind==="exp"){const j=d.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y},data:{exp:v.exp,latestRun:j[j.length-1]??null,runs:j,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?S.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:y+(H9-Byt)/2},data:{count:v.count,onShowProjectScope:o}});if(v.children.length===0)return;const A=v.children.reduce((j,T)=>j+G0(T),0)+q0*(v.children.length-1);let E=x-A/2;for(const j of v.children){const T=G0(j),D=v.kind==="elided"||j.kind==="elided";f.push({id:`e-${z0(v)}-${z0(j)}`,source:z0(v),target:z0(j),...D?{style:Gyt}:{}}),k(j,E+T/2,y+H9+Oyt),E+=T+q0}}let b=0;for(const v of g){const x=G0(v);k(v,b+x/2,0),b+=x+q0}return{nodes:_,edges:f}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,a,o]);return e.length===0?h.jsxs("div",{className:$9,children:[h.jsx("p",{className:"empty-state-title",children:oGe()}),h.jsx("p",{className:"empty-state-hint",children:Vqe()})]}):l.length===0&&a?h.jsxs("div",{className:$9,children:[h.jsx("p",{className:"empty-state-title",children:rGe()}),h.jsx("p",{className:"empty-state-hint",children:Fqe()})]}):h.jsx(eyt,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.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:l,edges:c,nodeTypes:qyt,defaultEdgeOptions:oD,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:jyt,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:h.jsx(iyt,{variant:yo.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},a??"project")}const P9=["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(" "),vb=(e,n)=>e.id===n.id&&e.view===n.view,yu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,P4=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,bf=(e,n,t)=>`${e}:${n??""}:${P4(t)}`,lD=e=>({...e,lineScrollRequest:void 0});function xf(e){return typeof e=="object"&&"path"in e?lD(e):e}const wu=(e,n)=>e.branch===n.branch;function Gt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${P4(e)}`:`experiment:${e.id}:${e.view}`}function yf(e,n){const t=e.filter(r=>Gt(r)!==n);return t.length===e.length?e:t}function Wyt(e){return e!==void 0}function F9(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===Nf&&n){const r={path:Sb,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[Gt(r)],panelOpen:!0}}if(e===sN){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(Gt),panelOpen:!0}}if(e===iN){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Gt),panelOpen:!0}}return t}function Kyt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yyt(e,n,t,r,s){let a=e,o;const l=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(a.startsWith("artifacts/"))return a=a.slice(10),a?{path:a,source:"artifacts"}:null;if(a==="~"||a.startsWith("~/"))return{path:a,source:"abs"};const d=m=>{const g=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[S,k]=[g(a),g(m)];return S===k?"":S.startsWith(`${k}/`)?S.slice(k.length).replace(/^\/+/,""):null},_=a.startsWith("/")&&c?d(c):null,f=a.startsWith("/")&&l?d(l):null;if(!a.startsWith("/"))o=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(f!==null)a=f;else{const m=s?Kyt(s):"[^/]+",g=a.match(new RegExp(`/files/${m}/(.+)$`)),S=g?null:a.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=g||S?null:a.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(g)return{path:g[1],source:"artifacts"};S?(o=S[1],a=S[2]):k&&(a=k[1])}}return a?a.startsWith("/")?{path:a,source:"abs"}:{path:a,sessionId:o}:null}function Xyt(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const ax="orx:panel-width",cD="orx:experiments-view";function Zyt(){try{return localStorage.getItem(cD)==="tree"?"tree":"table"}catch{return"table"}}const fh=360,Qyt=10,Jyt=272,e4t=380,t4t=Jyt+56,n4t=80,r4t=48;function V0(){return Math.max(fh,window.innerWidth-t4t-e4t)}function s4t(){const e=V0();try{const n=Number(localStorage.getItem(ax));if(Number.isFinite(n)&&n>=fh)return Math.min(n,e)}catch{}return Math.max(fh,Math.min(760,e,Math.round(window.innerWidth*.42)))}function wf(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 U9(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function i4t(){var Ic;const e=Cc(),[n,t]=M.useState(null),[r,s]=M.useState(null),a=M.useRef(void 0);a.current=r==null?void 0:r.tourCompleted;const o=M.useRef(!1),[l,c]=M.useState(null),d=M.useRef(null),[_,f]=M.useState(null),[m,g]=M.useState([]),[S,k]=M.useState([]),b=M.useRef(S);b.current=S;const v=M.useRef(new Map),x=M.useRef(new Set),y=M.useRef(null),C=M.useRef(!1),A=M.useRef(new Map),E=M.useRef(new Map),j=M.useRef(0),T=M.useRef(m);T.current=m;const[D,I]=M.useState(null),[P,H]=M.useState(Zyt),[F,V]=M.useState("project"),X=M.useRef(null),{open:W,setOpen:Z,ref:J}=Ao(X),[B,L]=M.useState(null),[$,K]=M.useState(!1),G=m.every(ae=>ae.chatSessionId),re=B&&G?F:"project",oe=M.useMemo(()=>re!=="agent"?m:m.filter(ae=>ae.chatSessionId===B),[m,re,B]),he=M.useMemo(()=>{if(re!=="agent")return S;const ae=new Set(oe.map(be=>be.id));return S.filter(be=>ae.has(be.experimentId))},[S,oe,re]);M.useEffect(()=>{try{localStorage.setItem(cD,P)}catch{}},[P]);const[ie,q]=M.useState(null),[te,le]=M.useState("experiments"),[ge,ue]=M.useState([]),[Ce,Ee]=M.useState(!1),[Le,Pe]=M.useState(!1),[Ve,ft]=M.useState(!1),[Be,wt]=M.useState([]),[At,vt]=M.useState([]),Ot=M.useRef(new Map),St=M.useRef(0),[kt,xe]=M.useState([]),[je,We]=M.useState([]),[st,nt]=M.useState([]),[Ht,bt]=M.useState([]),[nn,Wt]=M.useState(null),[pn,Lt]=M.useState("files"),[En,Ft]=M.useState(new Set),[br,mn]=M.useState(!1),[Ye,xt]=M.useState(!1),[Wn,Kn]=M.useState(s4t),[Nt,rt]=M.useState(!0),[Ie,it]=M.useState(!1),[Ut,en]=M.useState(!1),[Mt,Ln]=M.useState("chat"),[_r,is]=M.useState(null),or=M.useRef(new Map),xr=M.useRef(F9()),Ts=M.useRef(null),Nn=M.useRef(!1),rn=M.useRef(ge);rn.current=ge;const Fn=M.useRef(Ht);Fn.current=Ht;const Dr=M.useRef(null),Lr=M.useCallback(ae=>{const be=[...ae];Fn.current=be,bt(be)},[]),qr=M.useCallback(ae=>{Dr.current=ae,Wt(ae)},[]),ln=M.useCallback(ae=>{const be=Gt(ae);wt($e=>yf($e,be)),vt($e=>yf($e,be)),xe($e=>yf($e,be)),We($e=>yf($e,be)),nt($e=>yf($e,be));const ke=It.current;ke&&"path"in ae&&Ot.current.delete(bf(ke,Ts.current,ae));const De=rn.current.filter($e=>Gt($e)!==be);rn.current=De,ue(De)},[]),lr=M.useCallback(ae=>{Nn.current=!1;const be=Gt(ae),ke=[...rn.current.filter(De=>Gt(De)!==be),xf(ae)];rn.current=ke,ue(ke),le(ae)},[]),Sn=M.useCallback((ae,be)=>{Nn.current=!1;const ke=Gt(ae),De=Dr.current,$e=yct({order:Fn.current,previewKey:De?Gt(De):null},ke,be);$e.replacedKey&&De&&typeof De!="string"&&Gt(De)===$e.replacedKey&&ln(De),Lr($e.order),$e.previewKey===null?qr(null):$e.previewKey===ke&&qr(xf(ae));const pt=[...rn.current.filter(ct=>Gt(ct)!==ke),xf(ae)];rn.current=pt,ue(pt),le(ae)},[ln,Lr,qr]),et=M.useCallback(ae=>{const be=Dr.current;be&&Gt(be)===Gt(ae)&&qr(null)},[qr]);M.useEffect(()=>{let ae=!1;const be=De=>{const $e=Dr.current,pt=De.target;if(pt instanceof Element&&pt.closest("input, textarea, [contenteditable='true']")!==null){ae=!1;return}if($e&&Gt($e)===Gt(xr.current.rightTab)&&(De.metaKey||De.ctrlKey)&&!De.altKey&&!De.shiftKey&&De.key.toLowerCase()==="k"){De.preventDefault(),ae=!0;return}if(ae&&De.key==="Enter"){De.preventDefault(),ae=!1;const Tt=Dr.current;Tt&&et(Tt);return}ae=!1},ke=()=>{ae=!1};return window.addEventListener("keydown",be),window.addEventListener("blur",ke),window.addEventListener("pointerdown",ke),()=>{window.removeEventListener("keydown",be),window.removeEventListener("blur",ke),window.removeEventListener("pointerdown",ke)}},[et]);const _t=M.useCallback((ae,be)=>{Nn.current=!1;const ke=Gt(ae),De=Dr.current;De&&Gt(De)===ke&&qr(null);const $e=wct({order:Fn.current,previewKey:De?Gt(De):null},ke,rn.current.map(Gt));Lr($e.order);const pt=rn.current.filter(Tt=>Gt(Tt)!==ke);if(rn.current=pt,ue(pt),!be)return;const ct=$e.fallbackKey?pt.find(Tt=>Gt(Tt)===$e.fallbackKey):void 0;ct?le(ct):(mn(!1),xt(!1))},[Lr,qr]),yr=M.useCallback(ae=>{ae!=="chat"&&(Nn.current=!1),Ln(ae)},[]);xr.current={rightTab:xf(te),tabHistory:ge,experimentsTabOpen:Ce,filesTabOpen:Le,artifactsTabOpen:Ve,expTabs:Be,fileTabs:At,planTabs:kt,subagentTabs:je,codeTabs:st,contentTabOrder:Fn.current,previewTab:Dr.current,filesView:pn,filesToggled:En,selectedRunId:ie,scope:F,panelOpen:br,panelMax:Ye};const wr=M.useCallback(ae=>{const be=Ts.current;if(be===ae)return;be&&or.current.set(be,xr.current);let ke=ae?or.current.get(ae):void 0;if(!ke){const De=ae===Nf&&a.current===!1&&!o.current;De&&(o.current=!0,K(!0)),ke=F9(ae??void 0,De)}if(ae&&Nn.current){Nn.current=!1;const De="experiments";ke={...ke,rightTab:De,tabHistory:[...ke.tabHistory.filter($e=>Gt($e)!==Gt(De)),De],experimentsTabOpen:!0,panelOpen:!0}}le(ke.rightTab),rn.current=ke.tabHistory,ue(ke.tabHistory),Ee(ke.experimentsTabOpen),Pe(ke.filesTabOpen),ft(ke.artifactsTabOpen),wt(ke.expTabs),vt(ke.fileTabs),xe(ke.planTabs),We(ke.subagentTabs),nt(ke.codeTabs),Lr(ke.contentTabOrder),qr(ke.previewTab),Lt(ke.filesView),Ft(ke.filesToggled),q(ke.selectedRunId),V(ke.scope),mn(ke.panelOpen),xt(ke.panelMax),Ts.current=ae,L(ae)},[Lr,qr]),Gr=(r==null?void 0:r.onboardingCompleted)??!1,[Un,Mo]=M.useState(!1),vs=M.useCallback(()=>Mo(!0),[]),as=M.useCallback(async()=>{const ae=await G7({tourCompleted:!0});s(be=>be&&{...be,tourCompleted:ae.tourCompleted}),Mo(!1)},[]),js=M.useCallback(async()=>{await as(),en(!0)},[as]);M.useEffect(()=>{!_||!W_(_)||Ie||!Gr||r!=null&&r.tourCompleted||vs()},[_,Ie,Gr,vs,r==null?void 0:r.tourCompleted]);const Zt=(n==null?void 0:n.find(ae=>ae.id===_))??null;M.useEffect(()=>{const ae=Ie||l||r===null?null:Zt==null?void 0:Zt.name;document.title=ae?`${Ca(ae)} - OpenResearch`:"OpenResearch"},[Ie,l,r,Zt]);const It=M.useRef(_);It.current=_;const Ys=M.useCallback(()=>{Ln("chat"),Ee(!0),lr("experiments"),mn(!0),Ts.current||(Nn.current=!0)},[lr]),Ii=M.useCallback(()=>{c(null),t(null),s(null),Promise.allSettled([uYe(),fYe()]).then(([ae,be])=>{const ke=[];ae.status==="fulfilled"?(t(ae.value),f(De=>{var $e;return De&&ae.value.some(pt=>pt.id===De)?De:(($e=ae.value[0])==null?void 0:$e.id)??null})):ke.push(Aq()),be.status==="fulfilled"?(d.current=be.value.preferredAgent,s(be.value)):ke.push(Uq()),ke.length>0&&c(Wq({items:new Intl.ListFormat(N()).format(ke)}))})},[]);M.useEffect(()=>{Ii()},[Ii]);const Sr=M.useRef(Promise.resolve()),os=M.useRef(0),bs=M.useCallback(ae=>{const be=++os.current;s(De=>De&&{...De,preferredAgent:ae});const ke=Sr.current.then(()=>G7({preferredAgent:ae})).then(De=>{d.current=De.preferredAgent,be===os.current&&s($e=>$e&&{...$e,preferredAgent:De.preferredAgent})}).catch(De=>{throw be===os.current&&s($e=>$e&&{...$e,preferredAgent:d.current}),De});return Sr.current=ke.catch(()=>{}),ke},[]);M.useEffect(()=>{const ae=()=>Kn(be=>Math.min(be,V0()));return window.addEventListener("resize",ae),()=>window.removeEventListener("resize",ae)},[]);const cr=M.useCallback(ae=>{C.current=!1,A.current.clear(),E.current.clear();const be=++j.current;Tx(ae).then(ke=>{if(It.current!==ae||y.current!==ae||j.current!==be)return;A.current=new Map(ke.map($e=>[$e.id,$e]));const De=[...E.current.values()].some($e=>{const pt=A.current.get($e.id);return!pt||pt.status!=="running"&&pt.updatedAt<=$e.updatedAt});E.current.clear();for(const $e of ke){const pt=v.current.get($e.id);(!pt||pt.updatedAt<$e.updatedAt)&&v.current.set($e.id,$e)}k($e=>{const pt=new Map(ke.map(ct=>[ct.id,ct]));for(const ct of $e){const Tt=pt.get(ct.id);(!Tt||Tt.updatedAt<=ct.updatedAt)&&pt.set(ct.id,ct)}return[...pt.values()]}),C.current=!0,De&&Ys()}).catch(()=>{j.current===be&&E.current.clear()})},[Ys]);M.useEffect(()=>{if(!_)return;const ae=Ts.current;ae&&or.current.set(ae,xr.current),Ts.current=null,Nn.current=!1,L(null),y.current=_,v.current.clear(),x.current.clear(),yYe(_).catch(()=>{}),g([]),k([]),I(null),q(null),wt([]),vt([]),K(!1),xe([]),We([]),nt([]),Lr([]),qr(null),Lt("files"),Ft(new Set),rn.current=[],ue([]),le("experiments"),Ee(!1),Pe(!1),ft(!1),mn(!1),xt(!1),V("project"),SYe(_).then(g).catch(()=>{}),cr(_),K7(_).then(I).catch(()=>{})},[cr,_,Lr,qr]);const Xs=M.useCallback(()=>{const ae=It.current;ae&&K7(ae).then(I).catch(()=>{})},[]),Ml=M.useCallback(()=>{Xs(),Ln("chat"),ft(!0),lr("artifacts"),mn(!0)},[Xs,lr]);dZe({onReconnect:()=>{const ae=It.current;ae&&(y.current=ae,v.current.clear(),x.current.clear(),cr(ae))},onRun:ae=>{if(ae.projectId!==It.current||ae.projectId!==y.current)return;const be=v.current.get(ae.id),ke=x.current.has(ae.id);if(be&&be.updatedAt>ae.updatedAt||(v.current.set(ae.id,ae),x.current.add(ae.id),k(pt=>wf(pt,ae)),ae.status!=="running"||(be==null?void 0:be.status)==="running"))return;const De=A.current.get(ae.id),$e=C.current&&(!De||De.status!=="running"&&De.updatedAt<=ae.updatedAt);ke&&be||$e?Ys():C.current||E.current.set(ae.id,ae)},onExperiment:ae=>{ae.projectId===It.current&&g(be=>wf(be,ae))},onProject:ae=>{t(be=>be?wf(be,ae):[ae])},onArtifacts:ae=>{ae===It.current&&Xs()}});const $a=M.useCallback(()=>V("project"),[]),Or=M.useCallback((ae,be="overview",ke="preview")=>{const De={id:ae,view:be};wt($e=>$e.some(pt=>vb(pt,De))?$e:[...$e,De]),Sn(De,ke),mn(!0)},[Sn]),ls=M.useCallback((ae,be="preview")=>{const ke=b.current.filter($e=>$e.id===ae||$e.id.startsWith(ae)),De=ke.length===1?ke[0]:null;De&&(q(De.id),Or(De.experimentId,"terminal",be))},[Or]),Zs=M.useMemo(()=>new Map(m.map(ae=>{var be;return[ae.id,((be=ae.title)==null?void 0:be.trim())||ae.slug||po()]})),[m,e]),Yn=U9(Zs),Bi=M.useMemo(()=>{const ae=new Map;for(const be of S)ae.set(be.id,Yn.get(be.experimentId)??po());return ae},[Yn,S,e]),Hn=U9(Bi),zn=M.useCallback(ae=>{const be=Hn.get(ae);if(be)return be;const ke=[...Hn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Hn]),Qs=M.useCallback(ae=>{const be=Yn.get(ae);if(be)return be;const ke=[...Yn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Yn]),ra=M.useCallback((ae,be="preview")=>{const ke=T.current.filter(De=>De.id===ae||De.id.startsWith(ae));ke.length===1&&Or(ke[0].id,"overview",be)},[Or]),Dc=M.useCallback(ae=>{const be=Be.findIndex(ke=>vb(ke,ae));be!==-1&&(wt(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[Be,_t,te]),ur=M.useCallback((ae,be="preview")=>{const ke=lD(ae);vt(De=>{const $e=De.findIndex(ct=>yu(ct,ae));if($e===-1)return[...De,ke];const pt=De.slice();return pt[$e]=ke,pt}),Sn(ae,be),mn(!0)},[Sn]),Ha=M.useCallback((ae,be,ke,De,$e,pt)=>{const ct=n==null?void 0:n.find(ds=>ds.id===_),Tt=Yyt(ae,ct==null?void 0:ct.repoPath,be,(ct==null?void 0:ct.artifactsDir)??(ct==null?void 0:ct.filesDir),ct==null?void 0:ct.slug);if(!Tt)return null;const An=$e?T.current.find(ds=>ds.id===$e||$e.length>=6&&ds.id.startsWith($e)):void 0,us=ke??(An==null?void 0:An.branchName),ws=Tt.source==null||Tt.source==="repo";return us&&ws&&(Tt.ref=us),pt&&!Tt.ref&&ws&&(Tt.branchLabel=pt),De!=null&&(Tt.line=De,Tt.lineScrollRequest=++St.current),Tt},[n,_]),Pa=M.useCallback((ae,be,ke,De,$e,pt,ct="preview")=>{const Tt=Ha(ae,be,ke,De,$e,pt);Tt&&ur(Tt,ct)},[ur,Ha]),Fa=M.useCallback(ae=>ur({path:ae,source:"artifacts"},"keepOpen"),[ur]),Ro=M.useCallback((ae,be,ke,De,$e,pt="preview")=>{const ct=Ha(ae,be,$e,ke,De);ct&&ur(ct,pt)},[ur,Ha]),Ms=M.useCallback((ae,be)=>{et(ae),be()},[et]),Lc=M.useCallback(ae=>{const be=At.findIndex(ke=>yu(ke,ae));be!==-1&&(vt(ke=>ke.filter((De,$e)=>$e!==be)),_&&Ot.current.delete(bf(_,B,ae)),B===Nf&&yu(ae,{path:Sb,source:"artifacts"})&&K(!1),_t(ae,Gt(te)===Gt(ae)))},[B,At,_t,_,te]),Ua=M.useCallback(ae=>{ae.lineScrollRequest!==void 0&&le(be=>typeof be!="object"||!("path"in be)||!yu(be,ae)||be.lineScrollRequest!==ae.lineScrollRequest?be:xf(be))},[]),xs=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"plan",sessionId:be,promptId:ke,plan:ae};xe(pt=>{const ct=pt.findIndex(An=>An.promptId===ke);if(ct===-1)return[...pt,$e];const Tt=pt.slice();return Tt[ct]=$e,Tt}),Sn($e,De),mn(!0)},[Sn]),nr=M.useCallback(ae=>{const be=kt.findIndex(ke=>ke.promptId===ae.promptId);be!==-1&&(xe(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[_t,kt,te]),qa=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"subagent",sessionId:ae,spawnPartId:be,label:ke};We(pt=>pt.some(ct=>ct.spawnPartId===be)?pt:[...pt,$e]),Sn($e,De),mn(!0)},[Sn]),rr=M.useCallback(ae=>{const be=je.findIndex(ke=>ke.spawnPartId===ae.spawnPartId);be!==-1&&(We(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[_t,te,je]),[yi,Rs]=M.useState({});M.useEffect(()=>{if(Rs(ct=>{const Tt=new Set(je.map(An=>An.spawnPartId));return Object.keys(ct).every(An=>Tt.has(An))?ct:Object.fromEntries(Object.entries(ct).filter(([An])=>Tt.has(An)))}),je.length===0)return;let ae=!0;const be=new Set,ke=(ct,Tt,An)=>{Rs(us=>{var ds;let ws=us;for(const Os of Tt)if(!(An&&be.has(Os.spawnPartId)))for(const Dl of ct){const Hi=o4(Dl.parts,Os.spawnPartId);if(!Hi)continue;An||be.add(Os.spawnPartId);const Wa={label:Cft(Hi),running:((ds=Hi.state)==null?void 0:ds.status)==="running"},Lo=ws[Os.spawnPartId];(!Lo||Lo.label!==Wa.label||Lo.running!==Wa.running)&&(ws===us&&(ws={...us}),ws[Os.spawnPartId]=Wa);break}return ws})};let De=0;const $e=()=>{const ct=++De;for(const Tt of new Set(je.map(An=>An.sessionId)))Au(Tt).then(({messages:An})=>{ae&&ct===De&&ke(An,je.filter(us=>us.sessionId===Tt),!0)}).catch(()=>{})};$e();const pt=Hf(ct=>{if(ct.type==="reconnected"){be.clear(),$e();return}if(ct.type!=="message")return;const Tt=je.filter(An=>An.sessionId===ct.sessionId);Tt.length&&ke([ct.message],Tt,!1)});return()=>{ae=!1,pt()}},[je]);const sa=M.useCallback((ae,be,ke="files",De="preview")=>{const $e={code:!0,experimentId:ae,branch:be,view:ke,toggled:new Set};nt(pt=>pt.some(ct=>wu(ct,$e))?pt.map(ct=>wu(ct,$e)?{...ct,experimentId:ae,view:ke}:ct):[...pt,$e]),Sn($e,De),mn(!0)},[Sn]),Ds=M.useCallback((ae,be)=>{nt(ke=>ke.map(De=>wu(De,ae)?{...De,...be}:De))},[]),ia=M.useCallback(ae=>{const be=st.findIndex(ke=>wu(ke,ae));be!==-1&&(nt(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[st,_t,te]),Ls=M.useCallback(()=>{Ln("chat"),Pe(!0),lr("files"),mn(!0)},[lr]),Ga=M.useCallback(ae=>{ae==="experiments"?Ee(!1):ae==="files"?Pe(!1):ft(!1),_t(ae,te===ae)},[_t,te]),aa=ae=>{ae.preventDefault(),ae.currentTarget.setPointerCapture(ae.pointerId);const ke=document.body.style.userSelect;document.body.style.userSelect="none";const De=Ye,$e=ae.clientX,pt=Wn;let ct=!1;function Tt(){window.removeEventListener("pointermove",An),window.removeEventListener("pointerup",Tt),window.removeEventListener("pointercancel",Tt),document.body.style.userSelect=ke}function An(us){if(De){const Dl=us.clientX-$e;if(ct||Dlds+n4t){xt(!0);return}xt(!1);const Os=Math.min(Math.max(ws,fh),ds);Kn(Os);try{localStorage.setItem(ax,String(Os))}catch{}}window.addEventListener("pointermove",An),window.addEventListener("pointerup",Tt),window.addEventListener("pointercancel",Tt)},Xr=(ae,be)=>{t(ke=>ke?wf(ke,ae):[ae]),f(ae.id),it(!1),be&&(is({projectId:ae.id,message:be}),yr("git"))},Do=ae=>{t(be=>be&&be.filter(ke=>ke.id!==ae)),_===ae&&f(null)},Zr=typeof te=="object"&&"id"in te?te:null,Pn=typeof te=="object"&&"path"in te?te:null,ys=B===Nf&&$?At.find(ae=>yu(ae,{path:Sb,source:"artifacts"})):void 0,oa=ys?[ys]:[],Qr=typeof te=="object"&&"kind"in te&&te.kind==="plan"?te:null,kn=typeof te=="object"&&"kind"in te&&te.kind==="subagent"?te:null,cs=typeof te=="object"&&"code"in te?te:null,kr=cs?st.find(ae=>wu(ae,cs))??null:null,$i=new Map;for(const ae of[...Be,...At,...kt,...je,...st])$i.set(Gt(ae),ae);const vd=ys?Gt(ys):null,Rl=Ht.filter(ae=>ae!==vd).map(ae=>$i.get(ae)).filter(Wyt),Js=ae=>nn!==null&&Gt(nn)===Gt(ae),Vr=ae=>h.jsx(fl,{active:Pn!==null&&yu(Pn,ae),label:ae.path.split("/").pop()||ae.path,icon:h.jsx(XE,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>Lc(ae)},`file:${P4(ae)}`),ei=Zr?m.find(ae=>ae.id===Zr.id)??null:null,Va=kr?m.find(ae=>ae.id===kr.experimentId)??null:null,Oc=ae=>{var ke,De;if("path"in ae)return Vr(ae);if("id"in ae){const $e=m.find(pt=>pt.id===ae.id);return h.jsx(fl,{active:Zr!==null&&vb(Zr,ae),label:$e?$e.title||$e.slug:"…",icon:ae.view==="overview"?h.jsx(pWe,{size:12,className:"shrink-0"}):h.jsx(Wu,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>Dc(ae)},Gt(ae))}if("kind"in ae&&ae.kind==="plan")return h.jsx(fl,{active:Qr!==null&&Qr.promptId===ae.promptId,label:eE(),icon:h.jsx(Nx,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>nr(ae)},Gt(ae));if("kind"in ae)return h.jsx(fl,{active:kn!==null&&kn.spawnPartId===ae.spawnPartId,label:((ke=yi[ae.spawnPartId])==null?void 0:ke.label)??ae.label??Zq(),shimmer:((De=yi[ae.spawnPartId])==null?void 0:De.running)??!1,icon:h.jsx(Ax,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>rr(ae)},Gt(ae));const be=m.find($e=>$e.id===ae.experimentId);return h.jsx(fl,{active:kr!==null&&wu(kr,ae),label:(be==null?void 0:be.slug)??ae.branch,icon:h.jsx($f,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>ia(ae)},Gt(ae))};if(l)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsxs("div",{className:P9,children:[h.jsx("p",{children:l}),h.jsx(Qe,{variant:"primary",onClick:Ii,children:Gu()})]})});if(n===null||r===null)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsx("div",{className:P9,children:h.jsx(dn,{})})});if(n.length===0)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(CC,{}),Gr?h.jsx(jC,{projects:n,onOpen:f,onCreated:Xr,onDeleted:Do}):h.jsx(imt,{preferredAgent:r.preferredAgent,onDone:(ae,be)=>{xdt(),d.current=be,t([ae]),f(ae.id),s(ke=>({...ke??{tourCompleted:!1},onboardingCompleted:!0,preferredAgent:be}))}})]});const bd=h.jsx(rmt,{projectName:((Ic=n.find(ae=>ae.id===_))==null?void 0:Ic.name)??"",onHome:()=>it(!0),onNewProject:()=>en(!0),onRepository:()=>yr("git"),onCollapse:()=>rt(!1)});return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(CC,{}),h.jsx(Ict,{}),Ie?h.jsx(jC,{projects:n,onOpen:ae=>{f(ae),it(!1)},onCreated:Xr,onDeleted:Do}):h.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[_&&h.jsx(Ift,{projectId:_,projectName:(Zt==null?void 0:Zt.name)??"",railHeader:bd,railOpen:Nt,onShowRail:()=>rt(!0),mainView:Mt,onSelectMainView:yr,experimentsActive:Mt==="chat"&&br&&te==="experiments",filesActive:Mt==="chat"&&br&&te==="files",artifactsActive:Mt==="chat"&&br&&te==="artifacts",onOpenExperiments:Ys,onOpenArtifacts:Ml,onOpenFile:Ro,onOpenRun:ls,runExperimentName:zn,onOpenExperiment:ra,experimentName:Qs,onOpenPlan:xs,onOpenSubagent:qa,onOpenWorktree:Ls,composerPrefill:Zt&&W_(Zt.id)&&(r==null?void 0:r.tourCompleted)===!1?lYe:null,onOpenDemoWelcome:Zt&&W_(Zt.id)?vs:void 0,onActiveSessionChange:wr,preferredAgent:r.preferredAgent,onPreferredAgentChange:bs,children:Mt==="skills"?h.jsx(Dpt,{}):Mt!=="chat"?h.jsx(idt,{tab:Mt,project:Zt,githubPublicationError:_r&&_r.projectId===(Zt==null?void 0:Zt.id)?_r.message:null,onProjectUpdate:ae=>{t(be=>be?wf(be,ae):[ae]),ae.githubEnabled&&is(null)},onSelectTab:yr}):null}),Mt==="chat"&&br&&h.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Ye?"max":""}`,style:Ye?void 0:{width:Wn},"data-onboarding":"experiments",children:[h.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 ${Ye?"cursor-e-resize":"cursor-col-resize"}`,title:Ye?PU():IU(),onPointerDown:aa}),h.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:[h.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:[oa.map(Vr),Le&&h.jsx(fl,{active:te==="files",label:cq(),icon:h.jsx($f,{size:12,className:"shrink-0"}),onSelect:()=>lr("files"),onClose:()=>Ga("files")}),Ve&&h.jsx(fl,{active:te==="artifacts",label:NU(),icon:h.jsx(kx,{size:12,className:"shrink-0"}),onSelect:()=>lr("artifacts"),onClose:()=>Ga("artifacts")}),Ce&&h.jsx(fl,{active:te==="experiments",label:iq(),icon:h.jsx(wx,{size:12,className:"shrink-0"}),onSelect:()=>lr("experiments"),onClose:()=>Ga("experiments")}),Rl.map(Oc)]}),h.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[h.jsx(Jt,{title:Ye?E6():C6(),"aria-label":Ye?E6():C6(),onClick:()=>xt(ae=>!ae),children:Ye?h.jsx(SKe,{size:14}):h.jsx(xKe,{size:14})}),h.jsx(Jt,{title:w6(),"aria-label":w6(),onClick:()=>{Nn.current=!1,mn(!1),xt(!1)},children:h.jsx(_s,{size:14})})]})]}),te==="artifacts"?h.jsx(_o,{children:Zt&&h.jsx(Ept,{project:Zt,artifacts:D,onChanged:Xs,onOpenFile:Fa,onOpenStorage:()=>yr("storage")},Zt.id)}):te==="experiments"?h.jsxs(_o,{children:[h.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[h.jsx("span",{className:"flex-1"}),h.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[h.jsxs("div",{className:"option-picker relative inline-flex",ref:J,children:[h.jsx(Jt,{size:"small",ref:X,className:"experiment-scope-trigger",active:re==="agent",title:ZU({scope:re==="agent"?S6():k6()}),"aria-label":hq(),"aria-expanded":W,onClick:()=>Z(ae=>!ae),children:h.jsx(tKe,{size:16,strokeWidth:2.5})}),W&&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 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:[h.jsxs(Yr,{"aria-pressed":re==="agent",disabled:!B||!G,title:B?G?void 0:gq():Cq(),onClick:()=>{V("agent"),Z(!1)},children:[h.jsx("span",{children:S6()}),re==="agent"&&h.jsx(Ws,{size:13})]}),h.jsxs(Yr,{"aria-pressed":re==="project",onClick:()=>{V("project"),Z(!1)},children:[h.jsx("span",{children:k6()}),re==="project"&&h.jsx(Ws,{size:13})]})]})]}),h.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":tq(),children:[h.jsx("button",{className:P==="table"?"active":"","aria-pressed":P==="table",onClick:()=>H("table"),children:tG()}),h.jsx("button",{className:P==="tree"?"active":"","aria-pressed":P==="tree",onClick:()=>H("tree"),children:iG()})]})]})]}),h.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:P==="tree"?Zt&&h.jsx(Vyt,{experiments:m,runs:he,project:Zt,onOpenView:Or,onOpenCode:sa,agentSessionId:re==="agent"?B:null,onShowProjectScope:$a}):h.jsx(mmt,{runs:he,emptyHint:re==="agent"&&m.length>0?yq():void 0,experiments:oe,onOpen:(ae,be)=>{Or(ae.id,"overview",be)},onOpenLogs:(ae,be,ke)=>{q(be),Or(ae,"terminal",ke)},onOpenCode:(ae,be)=>{const ke=m.find(De=>De.id===ae);ke&&sa(ke.id,ke.branchName,"files",be)},onCancel:lN})})]}):te==="files"?h.jsx(_o,{children:Zt?h.jsx(ppt,{sessionId:B??void 0,project:Zt,view:pn,toggled:En,onViewChange:Lt,onToggledChange:Ft,onOpenFile:(ae,be,ke,De)=>Pa(ae,be,ke,void 0,void 0,void 0,De)},`files:${B??`project:${Zt.id}`}`):h.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:h.jsx($u,{children:h.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:[h.jsx(ZE,{size:22}),h.jsx("p",{children:$q()})]})})})}):Pn?h.jsx(_o,{children:_&&h.jsx(nmt,{projectId:_,path:Pn.path,source:Pn.source,sessionId:Pn.source==="artifacts"?B??void 0:Pn.sessionId,gitRef:Pn.ref,line:Pn.line,branchLabel:Xyt(Pn,Zt==null?void 0:Zt.baselineBranch),onOpenFile:(ae,be,ke,De)=>Ms(Pn,()=>Pa(ae,be,ke,void 0,void 0,void 0,De)),scrollPosition:Ot.current.get(bf(_,B,Pn)),onScrollPositionChange:ae=>{Ot.current.set(bf(_,B,Pn),ae)},lineScrollRequest:Pn.lineScrollRequest,onLineScrollRequestHandled:()=>Ua(Pn),onEdit:()=>et(Pn)},bf(_,B,Pn))}):Qr?h.jsx(_o,{children:h.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:h.jsx(za,{text:Qr.plan,onOpenFile:(ae,be,ke,De,$e)=>Ms(Qr,()=>Pa(ae,Qr.sessionId,De,be,ke,void 0,$e))})})}):kn?h.jsx(Bft,{sessionId:kn.sessionId,spawnPartId:kn.spawnPartId,onOpenFile:(ae,be,ke,De,$e)=>Ms(kn,()=>Ro(ae,kn.sessionId,be,ke,De,$e)),onOpenRun:(ae,be)=>Ms(kn,()=>ls(ae,be)),runExperimentName:zn,onOpenExperiment:(ae,be)=>Ms(kn,()=>ra(ae,be)),experimentName:Qs,onOpenSubagent:(ae,be,ke)=>Ms(kn,()=>qa(kn.sessionId,ae,be,ke))},kn.spawnPartId):kr?h.jsx(_o,{children:_&&Zt&&kr&&Va&&h.jsx(hpt,{projectId:_,project:Zt,experiment:Va,view:kr.view,toggled:kr.toggled,onViewChange:ae=>Ds(kr,{view:ae}),onToggledChange:ae=>Ds(kr,{toggled:ae}),onOpenFile:(ae,be,ke,De)=>Ms(kr,()=>Pa(ae,be,ke,void 0,void 0,Va.branchName,De))},`code:${kr.branch}`)}):h.jsx(_o,{children:Zr&&ei&&Zt&&h.jsx($pt,{experiment:ei,project:Zt,view:Zr.view,runs:S,selectedRunId:ie,onSelectRun:q,parentExperiment:m.find(ae=>ae.id===ei.parentExperimentId)??null,onOpenView:(ae,be,ke)=>{be&&q(be),Ms(Zr,()=>Or(ei.id,ae,ke))},onOpenCode:(ae,be)=>Ms(Zr,()=>sa(ei.id,ei.branchName,ae,be))},`${Zr.id}:${Zr.view}`)})]})]}),Ut&&h.jsx(xM,{onClose:()=>en(!1),onCreated:(ae,be)=>{en(!1),Xr(ae,be)}}),Un&&!Ie&&Zt&&W_(Zt.id)&&h.jsx(gmt,{onClose:as,onCreateProject:js})]})}const a4t=N();document.documentElement.lang=a4t;document.documentElement.dir="ltr";HL.createRoot(document.getElementById("root")).render(h.jsxs(M.StrictMode,{children:[h.jsx(i4t,{}),h.jsx(dJe,{})]})); diff --git a/ui/dist/index.html b/ui/dist/index.html index b1689956..7e92cdc3 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,8 +49,8 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - - + +
= 0; index--) { const part = parts[index]; if (part.type === "steer" || isTurnStatusPart(part) || !partIsVisible(part)) continue; - if (part.type !== "tool" || part.state?.status === "error") return null; + if (part.type !== "tool" || part.state?.status === "error" || isTaskListTool(part.tool)) return null; return part.id; } return null; diff --git a/ui/src/components/ChatPanel.tsx b/ui/src/components/ChatPanel.tsx index 6b8e410c..751e981f 100644 --- a/ui/src/components/ChatPanel.tsx +++ b/ui/src/components/ChatPanel.tsx @@ -18,6 +18,7 @@ import { Globe, HelpCircle, Lightbulb, + ListChecks, MessageSquareQuote, MoreHorizontal, PanelLeft, @@ -110,10 +111,12 @@ import { shellWrapperBody, unwrapShellBody, } from "../orxCommand"; +import { activeTurnTaskList, isTaskListTool, lastTaskList, parseTaskList, toolBaseName, toolSegments } from "../taskProgress"; import { LitSourceLogo, parseOrxLit, paperUrl } from "./LitSourceLogo"; import { LitSourcesList } from "./LitSourcesPicker"; import { Md } from "./Md"; import { PlanStrip } from "./PlanStrip"; +import { TaskListCard, TaskStrip } from "./TaskList"; import { SETTINGS_NAV, type SettingsTab } from "./SettingsPage"; import { SkillMenu } from "./SkillMenu"; import { ComposerSkillChips, MessageWithChips } from "./SkillChips"; @@ -943,7 +946,7 @@ function nativeOrxSkillPath(tool: string, skillName: string): string | null { return null; } -type ToolActivityKind = "skill" | "read" | "search" | "edit" | "web" | "agent" | "project" | "command"; +type ToolActivityKind = "skill" | "read" | "search" | "edit" | "web" | "agent" | "project" | "command" | "task"; interface ToolActivity { kind: ToolActivityKind; @@ -1593,9 +1596,17 @@ function toolActivity(part: ChatPart): ToolActivity { const resourceExperimentIds = normalizedTargetIds(inputStringArray(normalizedInput, "experimentTargetIds")); const filePath = inputString(normalizedInput, "filePath", "file_path", "notebookPath", "notebook_path", "path"); const description = inputString(normalizedInput, "description"); - const toolSegments = tool.toLowerCase().split(/(?::|\.|__)+/); - const baseTool = toolSegments.at(-1) ?? tool.toLowerCase(); - if (baseTool === "run" && toolSegments.includes("web")) { + const baseTool = toolBaseName(tool); + if (isTaskListTool(tool)) { + const list = parseTaskList(part); + return { + kind: "task", + label: list + ? m.activity_updated_tasks({ done: fmtNumber(list.done), total: fmtNumber(list.total) }) + : m.activity_updating_tasks(), + }; + } + if (baseTool === "run" && toolSegments(tool).includes("web")) { const query = arrayInputString(normalizedInput, "search_query", "q"); const imageQuery = arrayInputString(normalizedInput, "image_query", "q"); const pattern = arrayInputString(normalizedInput, "find", "pattern"); @@ -1986,6 +1997,9 @@ function ToolActivityIcon({ activity, className = "" }: { activity: ToolActivity case "agent": icon = ; break; + case "task": + icon = ; + break; case "command": break; } @@ -2242,6 +2256,7 @@ function activityInProgress(activity: ToolActivity): ToolActivity { web: m.activity_browsing(), agent: m.activity_delegating(), command: m.activity_running(), + task: m.activity_updating_tasks(), }[activity.kind]; return { ...activity, label }; } @@ -2262,6 +2277,7 @@ function permissionActivityLabel(tool: string | undefined, input: Record(); + const seen = new Set(); + for (const { activity, count } of parts) { + const distinct = activity.kind === "read" || activity.kind === "edit" || activity.kind === "web"; + const target = distinct ? `${activity.kind}:${activity.filePath ?? activity.fileRef ?? activity.label}` : null; + if (target) { + if (seen.has(target)) continue; + seen.add(target); + } + counts.set(activity.kind, (counts.get(activity.kind) ?? 0) + (target ? 1 : count)); + } + const order: ToolActivityKind[] = ["read", "search", "edit", "command", "web", "project", "skill", "agent"]; + const segments = order.flatMap((kind) => { + const count = counts.get(kind); + return count ? [toolKindSummary(kind, count)] : []; + }); + return segments.length > 0 ? segments.join(" · ") : m.chat_panel_used_tools(); +} + +function toolKindSummary(kind: ToolActivityKind, count: number): string { + const single = count === 1; + const n = fmtNumber(count); + switch (kind) { + case "read": + return single ? m.tool_summary_read_one() : m.tool_summary_read_other({ count: n }); + case "search": + return single ? m.tool_summary_search_one() : m.tool_summary_search_other({ count: n }); + case "edit": + return single ? m.tool_summary_edit_one() : m.tool_summary_edit_other({ count: n }); + case "web": + return single ? m.tool_summary_web_one() : m.tool_summary_web_other({ count: n }); + case "project": + return single ? m.tool_summary_project_one() : m.tool_summary_project_other({ count: n }); + case "skill": + return single ? m.tool_summary_skill_one() : m.tool_summary_skill_other({ count: n }); + case "agent": + return single ? m.tool_summary_agent_one() : m.tool_summary_agent_other({ count: n }); + case "command": + return single ? m.tool_summary_command_one() : m.tool_summary_command_other({ count: n }); + case "task": + return m.tasks_title(); + } +} + interface SquashedToolPart { part: ChatPart; activity: ToolActivity; @@ -2561,7 +2625,7 @@ function ToolGroup({ const iconActivity = pendingActivity ?? groupIconActivity(activities); const summaryLabel = pendingActivity ? pendingActivity.label - : m.chat_panel_used_tools(); + : toolGroupSummary(displayParts); if (parts.length === 1) { if (pendingActivity) { return ( @@ -3247,6 +3311,10 @@ function renderParts( .filter((part) => part.type !== "steer" && partIsVisible(part, activePermissionId)) .at(-1); const rendered: React.ReactNode[] = []; + // Only the newest task-list update renders (as the checklist card); earlier + // ones are superseded bookkeeping and paint nothing. A failed write stays + // an ordinary error row. + const taskCard = lastTaskList(parts); let toolRun: ChatPart[] = []; const flushTools = () => { if (toolRun.length === 0) return; @@ -3296,6 +3364,13 @@ function renderParts( ); continue; } + if (part.type === "tool" && isTaskListTool(part.tool) && part.state?.status !== "error") { + if (part.id === taskCard?.id) { + flushTools(); + rendered.push(); + } + continue; + } if (part.type === "tool") { toolRun.push(part); continue; @@ -4886,6 +4961,10 @@ export function ChatPanel({ return null; }, [messages]); + // The running turn's task list, docked so the current step stays in view + // as the transcript scrolls. + const liveTasks = useMemo(() => (busy ? activeTurnTaskList(messages) : null), [messages, busy]); + // The newest ANSWERABLE unresolved question card's part id: typed composer // text answers IT as a custom answer, instead of racing the held turn with // a new message (which the busy guard would reject/drop). Plan cards have @@ -5952,6 +6031,7 @@ export function ChatPanel({ in when it arrives (effect above). The transcript status covers the interim ("Waiting for your input…" for a beat until the old card's resolve broadcast lands, then Working…). */} + {liveTasks && !pendingPlan && } {pendingPlan && !(revisingPlan && pendingPlan.promptId === revisingPlan.promptId) && ( , "text-accent-green"] + : status === "in_progress" + ? [, "text-primary"] + : status === "cancelled" + ? [, "text-muted"] + : [, "text-muted"]; + return {icon}; +} + +function TaskItems({ items, live }: { items: TaskItem[]; live: boolean }) { + return ( +
    + {items.map((item, index) => { + const active = item.status === "in_progress"; + const label = active ? item.activeText ?? item.text : item.text; + return ( +
  1. + + + {label} + +
  2. + ); + })} +
+ ); +} + +function counts(list: TaskList): { done: string; total: string } { + return { done: fmtNumber(list.done), total: fmtNumber(list.total) }; +} + +function progressLabel(list: TaskList): string { + return taskAllDone(list) ? m.tasks_all_done() : m.tasks_progress(counts(list)); +} + +/** Inline transcript record of the agent's task list at the point it was last + * updated. `live` animates the in-progress step while the turn streams. */ +export function TaskListCard({ list, live }: { list: TaskList; live: boolean }) { + return ( +
+
+
+ +
+ ); +} + +/** Docked above the composer while a turn runs: the current step and a + * progress bar stay in view as the transcript scrolls; the full list expands + * on demand. */ +export function TaskStrip({ list }: { list: TaskList }) { + const [open, setOpen] = useState(false); + const headline = list.current + ? list.current.activeText ?? list.current.text + : taskAllDone(list) + ? m.tasks_all_done() + : m.tasks_title(); + const pct = list.total > 0 ? Math.round((list.done / list.total) * 100) : 0; + return ( +
+ +
+
+
+ {open && ( +
+ +
+ )} +
+ ); +} diff --git a/ui/src/taskProgress.ts b/ui/src/taskProgress.ts new file mode 100644 index 00000000..7d51d971 --- /dev/null +++ b/ui/src/taskProgress.ts @@ -0,0 +1,95 @@ +import type { ChatMessage, ChatPart } from "./api"; + +/** One step of the agent's own task list. `activeText` is the present-tense + * form Claude Code sends alongside each item ("Running the tests"). */ +export interface TaskItem { + text: string; + status: TaskStatus; + activeText?: string; +} + +export type TaskStatus = "pending" | "in_progress" | "completed" | "cancelled"; + +export interface TaskList { + items: TaskItem[]; + done: number; + /** Items still in play — cancelled ones are listed but not counted. */ + total: number; + /** The first in-progress item, when the agent is mid-step. */ + current: TaskItem | null; +} + +/** A tool name split on its MCP server / namespace separators, lowercased. */ +export function toolSegments(tool: string): string[] { + return tool.toLowerCase().split(/(?::|\.|__)+/); +} + +export function toolBaseName(tool: string): string { + return toolSegments(tool).at(-1) ?? tool.toLowerCase(); +} + +// Claude Code `TodoWrite`, OpenCode `todowrite`, Codex `update_plan`. +export function isTaskListTool(tool: string | undefined): boolean { + if (!tool) return false; + const base = toolBaseName(tool); + return base === "todowrite" || base === "update_plan"; +} + +function taskStatus(raw: unknown): TaskStatus { + const status = typeof raw === "string" ? raw.toLowerCase() : ""; + if (status === "in_progress" || status === "inprogress") return "in_progress"; + if (status === "completed") return "completed"; + if (status === "cancelled") return "cancelled"; + return "pending"; +} + +function taskItem(raw: unknown): TaskItem | null { + if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null; + const record = Object.fromEntries(Object.entries(raw)); + const text = [record.content, record.step].find( + (value): value is string => typeof value === "string" && value.trim() !== "", + ); + if (!text) return null; + const activeText = typeof record.activeForm === "string" && record.activeForm.trim() !== "" + ? record.activeForm.trim() + : undefined; + return { text: text.trim(), status: taskStatus(record.status), activeText }; +} + +/** The task list a tool call carries; null for other tools, empty lists, and + * failed writes (a denied `TodoWrite` never became the agent's list). */ +export function parseTaskList(part: ChatPart): TaskList | null { + if (part.type !== "tool" || !isTaskListTool(part.tool) || part.state?.status === "error") return null; + const input = part.state?.input ?? {}; + const raw = [input.todos, input.plan].find(Array.isArray); + if (!raw) return null; + const items = raw.map(taskItem).filter((item): item is TaskItem => item !== null); + if (items.length === 0) return null; + return { + items, + done: items.filter((item) => item.status === "completed").length, + total: items.filter((item) => item.status !== "cancelled").length, + current: items.find((item) => item.status === "in_progress") ?? null, + }; +} + +/** The last task-list part among `parts` — the one whose state is current; + * earlier updates are superseded. */ +export function lastTaskList(parts: ChatPart[]): { id: string; list: TaskList } | null { + for (let index = parts.length - 1; index >= 0; index--) { + const list = parseTaskList(parts[index]); + if (list) return { id: parts[index].id, list }; + } + return null; +} + +export function taskAllDone(list: TaskList): boolean { + return list.total > 0 && list.done === list.total; +} + +/** The running turn's task list: the newest one in the tail assistant + * message. Earlier turns' lists are history, not live progress. */ +export function activeTurnTaskList(messages: ChatMessage[]): TaskList | null { + const message = messages.at(-1); + return message?.role === "assistant" ? lastTaskList(message.parts)?.list ?? null : null; +} diff --git a/ui/tests/chatRendering.test.mjs b/ui/tests/chatRendering.test.mjs index cce93c57..cf090b51 100644 --- a/ui/tests/chatRendering.test.mjs +++ b/ui/tests/chatRendering.test.mjs @@ -43,3 +43,12 @@ test("thinking replaces a text tail while steer and status parts do not", () => assert.equal(streamTailIsText([message(text, { id: "steer", type: "steer" })]), true); assert.equal(streamTailIsText([message(text, { id: "turn-retry", type: "tool" })]), true); }); + +test("a task-list write never becomes the shimmering tool tail", () => { + const todo = { id: "todo", type: "tool", tool: "TodoWrite", state: { status: "completed", input: { todos: [] } } }; + const bash = { id: "bash", type: "tool", tool: "Bash", state: { status: "running" } }; + + assert.equal(partsTailToolId([bash, todo]), null); + assert.equal(partsTailToolId([todo, bash]), "bash"); + assert.equal(streamTailTool([message(todo)]), null); +}); diff --git a/ui/tests/taskProgress.test.mjs b/ui/tests/taskProgress.test.mjs new file mode 100644 index 00000000..56111ef1 --- /dev/null +++ b/ui/tests/taskProgress.test.mjs @@ -0,0 +1,101 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { + activeTurnTaskList, + isTaskListTool, + lastTaskList, + parseTaskList, + taskAllDone, + toolBaseName, +} from "../src/taskProgress.ts"; + +const tool = (id, name, input, status = "completed") => ({ id, type: "tool", tool: name, state: { status, input } }); +const message = (id, role, ...parts) => ({ id, role, parts, createdAt: 0 }); + +test("recognizes each harness's task-list tool by base name", () => { + assert.equal(toolBaseName("mcp__planner__update_plan"), "update_plan"); + assert.equal(isTaskListTool("TodoWrite"), true); + assert.equal(isTaskListTool("todowrite"), true); + assert.equal(isTaskListTool("update_plan"), true); + assert.equal(isTaskListTool("mcp__planner__update_plan"), true); + assert.equal(isTaskListTool("todoread"), false); + assert.equal(isTaskListTool("Bash"), false); + assert.equal(isTaskListTool(undefined), false); +}); + +test("parses Claude Code TodoWrite input with active forms", () => { + const list = parseTaskList(tool("t1", "TodoWrite", { + todos: [ + { content: "Read the config", status: "completed", activeForm: "Reading the config" }, + { content: "Run the tests", status: "in_progress", activeForm: "Running the tests" }, + { content: "Write the report", status: "pending", activeForm: "Writing the report" }, + ], + })); + assert.deepEqual(list, { + items: [ + { text: "Read the config", status: "completed", activeText: "Reading the config" }, + { text: "Run the tests", status: "in_progress", activeText: "Running the tests" }, + { text: "Write the report", status: "pending", activeText: "Writing the report" }, + ], + done: 1, + total: 3, + current: { text: "Run the tests", status: "in_progress", activeText: "Running the tests" }, + }); +}); + +test("parses Codex update_plan steps with camel-case statuses", () => { + const plan = parseTaskList(tool("p", "update_plan", { + plan: [ + { step: "Inspect the repo", status: "completed" }, + { step: "Patch the loader", status: "inProgress" }, + { step: "Verify", status: "pending" }, + ], + explanation: "Starting the fix", + })); + assert.equal(plan.done, 1); + assert.equal(plan.total, 3); + assert.equal(plan.current.text, "Patch the loader"); +}); + +test("cancelled OpenCode todos are listed but leave the count", () => { + const list = parseTaskList(tool("o", "todowrite", { + todos: [ + { content: "Keep", status: "completed", priority: "high" }, + { content: "Drop", status: "cancelled", priority: "low" }, + { content: "", status: "pending" }, + ], + })); + assert.deepEqual(list.items.map((item) => item.status), ["completed", "cancelled"]); + assert.equal(list.done, 1); + assert.equal(list.total, 1); + assert.equal(list.current, null); + assert.equal(taskAllDone(list), true); + const abandoned = parseTaskList(tool("x", "todowrite", { todos: [{ content: "Drop", status: "cancelled" }] })); + assert.equal(taskAllDone(abandoned), false); +}); + +test("non-task tools, empty lists, and failed writes parse as null", () => { + assert.equal(parseTaskList(tool("b", "Bash", { command: "ls" })), null); + assert.equal(parseTaskList(tool("e", "TodoWrite", { todos: [] })), null); + assert.equal(parseTaskList(tool("n", "TodoWrite", {})), null); + assert.equal(parseTaskList(tool("d", "TodoWrite", { todos: [{ content: "a", status: "pending" }] }, "error")), null); + assert.equal(parseTaskList({ id: "x", type: "text", text: "TodoWrite" }), null); +}); + +test("the last parsable task-list part in a message is the current one", () => { + const first = tool("t1", "TodoWrite", { todos: [{ content: "a", status: "pending" }] }); + const second = tool("t2", "TodoWrite", { todos: [{ content: "a", status: "completed" }] }); + const denied = tool("t3", "TodoWrite", { todos: [{ content: "a", status: "pending" }] }, "error"); + const bash = tool("b", "Bash", { command: "ls" }); + assert.equal(lastTaskList([first, bash, second, bash, denied]).id, "t2"); + assert.equal(lastTaskList([first, bash, second, bash, denied]).list.done, 1); + assert.equal(lastTaskList([bash]), null); +}); + +test("activeTurnTaskList only reads the tail assistant message", () => { + const older = tool("t1", "TodoWrite", { todos: [{ content: "old", status: "in_progress" }] }); + const live = tool("t2", "TodoWrite", { todos: [{ content: "new", status: "in_progress" }] }); + assert.equal(activeTurnTaskList([message("a1", "assistant", older), message("u1", "user")]), null); + assert.equal(activeTurnTaskList([message("a1", "assistant", older), message("u1", "user"), message("a2", "assistant")]), null); + assert.equal(activeTurnTaskList([message("a1", "assistant", older), message("u1", "user"), message("a2", "assistant", live)]).current.text, "new"); +}); diff --git a/ui/tsconfig.json b/ui/tsconfig.json index 3beab74d..16797d06 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -13,7 +13,8 @@ "isolatedModules": true, "verbatimModuleSyntax": true, "useDefineForClassFields": true, - "noEmit": true + "noEmit": true, + "allowImportingTsExtensions": true }, "include": ["src"] } From 8de857d9a9d2a0dda5d44fd6a740e74f39051010 Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Thu, 3 Sep 2026 13:44:26 -0700 Subject: [PATCH 2/3] feat: ask agents to keep their task list current on multi-step work The checklist only renders when the agent writes a task list, and Claude Code skips TodoWrite on many coding turns. The shared playbook now tells every harness to write the list up front and mark steps as it goes. Co-Authored-By: Claude Fable 5.1 --- SYSTEM_PROMPT.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SYSTEM_PROMPT.md b/SYSTEM_PROMPT.md index c135d09b..b039e779 100644 --- a/SYSTEM_PROMPT.md +++ b/SYSTEM_PROMPT.md @@ -38,6 +38,15 @@ Use `orx` as the source of truth for the experiment tree, runs, and logs. Use normal repository tools for code and file inspection. Use this project id (`{id}`) for every `orx` command that takes one. +## Show your progress + +For any task with more than one or two steps, keep your task list current with +your native task-list tool (`TodoWrite` in Claude Code, `update_plan` in Codex, +`todowrite` in OpenCode): write the full list before you start, mark each step +in progress when you begin it, and mark it complete as soon as it is done. The +dashboard renders that list as a live checklist, so it is how the user follows +what you have finished and what you are doing now. + ## Evidence and links in chat Ground substantive claims about this project's code, files, artifacts, or From 1ab8e1913bcf5167728fe8571e6ed8d77db67128 Mon Sep 17 00:00:00 2001 From: Myles Anderson Date: Thu, 3 Sep 2026 14:29:01 -0700 Subject: [PATCH 3/3] feat: fold Claude Code task tools and fall back to a turn outline Claude Code 2.1 exposes no task-list tool to newer models unless CLAUDE_CODE_ENABLE_TODO_TOOLS is set, and then exposes incremental TaskCreate/TaskUpdate/TaskList calls rather than TodoWrite. Set the flag for chat sessions and fold those calls (across turns) into the checklist. Sonnet 5 still often skips the tools, so while a turn runs without a task list the composer docks a progress outline read off the turn itself: each narration paragraph is a phase, with the tool activity it produced. Also: the shared playbook asks every harness to keep its task list current, and prior task lists are only threaded to messages that touch the list so memoized messages stay stable while streaming. Co-Authored-By: Claude Fable 5.1 --- SYSTEM_PROMPT.md | 15 +- src/local/claude.rs | 3 + .../{index-EjlOBJbC.js => index-CKxS-VhW.js} | 417 +++++++++--------- ui/dist/index.html | 2 +- ui/messages/en.json | 1 + ui/messages/fa.json | 1 + ui/messages/zh-CN.json | 1 + ui/src/components/ChatPanel.tsx | 36 +- ui/src/components/TaskList.tsx | 116 +++-- ui/src/taskProgress.ts | 160 +++++-- ui/src/turnOutline.ts | 55 +++ ui/tests/taskProgress.test.mjs | 100 +++-- ui/tests/turnOutline.test.mjs | 40 ++ 13 files changed, 645 insertions(+), 302 deletions(-) rename ui/dist/assets/{index-EjlOBJbC.js => index-CKxS-VhW.js} (58%) create mode 100644 ui/src/turnOutline.ts create mode 100644 ui/tests/turnOutline.test.mjs diff --git a/SYSTEM_PROMPT.md b/SYSTEM_PROMPT.md index b039e779..5bd2439e 100644 --- a/SYSTEM_PROMPT.md +++ b/SYSTEM_PROMPT.md @@ -38,14 +38,13 @@ Use `orx` as the source of truth for the experiment tree, runs, and logs. Use normal repository tools for code and file inspection. Use this project id (`{id}`) for every `orx` command that takes one. -## Show your progress - -For any task with more than one or two steps, keep your task list current with -your native task-list tool (`TodoWrite` in Claude Code, `update_plan` in Codex, -`todowrite` in OpenCode): write the full list before you start, mark each step -in progress when you begin it, and mark it complete as soon as it is done. The -dashboard renders that list as a live checklist, so it is how the user follows -what you have finished and what you are doing now. +**Always keep a task list.** Whenever a request takes more than one step — a +survey, an implementation, an experiment, a write-up — your first tool call is +your task-list tool (`TaskCreate` in Claude Code, `update_plan` in Codex, +`todowrite` in OpenCode) with every step listed. Mark each step in progress as +you begin it and completed the moment it is done (`TaskUpdate` in Claude +Code). The dashboard renders that list as a live checklist; without it the +user cannot see what you have finished or what you are doing now. ## Evidence and links in chat diff --git a/src/local/claude.rs b/src/local/claude.rs index 2640955a..17cd122c 100644 --- a/src/local/claude.rs +++ b/src/local/claude.rs @@ -557,6 +557,9 @@ async fn spawn_client(spec: &SpawnSpec, auth_generation: u64) -> Result{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn=(e,n,t)=>(n6(e,n,"read from private field"),t?t.call(e):n.get(e)),ci=(e,n,t)=>n.has(e)?t6("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),rs=(e,n,t,r)=>(n6(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t);var r6=(e,n,t,r)=>({set _(s){rs(e,n,s,t)},get _(){return Zn(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 a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function vh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L1={exports:{}},af={};/** +var a6=e=>{throw TypeError(e)};var o6=(e,n,t)=>n.has(e)||a6("Cannot "+t);var Qn=(e,n,t)=>(o6(e,n,"read from private field"),t?t.call(e):n.get(e)),oi=(e,n,t)=>n.has(e)?a6("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),rs=(e,n,t,r)=>(o6(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t);var l6=(e,n,t,r)=>({set _(s){rs(e,n,s,t)},get _(){return Qn(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 a of s)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=t(s);fetch(s.href,a)}})();function xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $1={exports:{}},af={};/** * @license React * react-jsx-runtime.production.js * @@ -6,7 +6,7 @@ var t6=e=>{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var s6;function ML(){if(s6)return af;s6=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:a}}return af.Fragment=n,af.jsx=t,af.jsxs=t,af}var i6;function RL(){return i6||(i6=1,L1.exports=ML()),L1.exports}var h=RL(),O1={exports:{}},Pt={};/** + */var c6;function qL(){if(c6)return af;c6=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function t(r,s,a){var o=null;if(a!==void 0&&(o=""+a),s.key!==void 0&&(o=""+s.key),"key"in s){a={};for(var l in s)l!=="key"&&(a[l]=s[l])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:o,ref:s!==void 0?s:null,props:a}}return af.Fragment=n,af.jsx=t,af.jsxs=t,af}var u6;function GL(){return u6||(u6=1,$1.exports=qL()),$1.exports}var h=GL(),H1={exports:{}},Pt={};/** * @license React * react.production.js * @@ -14,7 +14,7 @@ var t6=e=>{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var a6;function DL(){if(a6)return Pt;a6=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"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g($){return $===null||typeof $!="object"?null:($=m&&$[m]||$["@@iterator"],typeof $=="function"?$:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,b={};function v($,K,G){this.props=$,this.context=K,this.refs=b,this.updater=G||S}v.prototype.isReactComponent={},v.prototype.setState=function($,K){if(typeof $!="object"&&typeof $!="function"&&$!=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,$,K,"setState")},v.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function x(){}x.prototype=v.prototype;function y($,K,G){this.props=$,this.context=K,this.refs=b,this.updater=G||S}var C=y.prototype=new x;C.constructor=y,k(C,v.prototype),C.isPureReactComponent=!0;var A=Array.isArray;function E(){}var j={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function D($,K,G){var re=G.ref;return{$$typeof:e,type:$,key:K,ref:re!==void 0?re:null,props:G}}function I($,K){return D($.type,K,$.props)}function P($){return typeof $=="object"&&$!==null&&$.$$typeof===e}function H($){var K={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(G){return K[G]})}var F=/\/+/g;function V($,K){return typeof $=="object"&&$!==null&&$.key!=null?H(""+$.key):K.toString(36)}function X($){switch($.status){case"fulfilled":return $.value;case"rejected":throw $.reason;default:switch(typeof $.status=="string"?$.then(E,E):($.status="pending",$.then(function(K){$.status==="pending"&&($.status="fulfilled",$.value=K)},function(K){$.status==="pending"&&($.status="rejected",$.reason=K)})),$.status){case"fulfilled":return $.value;case"rejected":throw $.reason}}throw $}function W($,K,G,re,oe){var he=typeof $;(he==="undefined"||he==="boolean")&&($=null);var ie=!1;if($===null)ie=!0;else switch(he){case"bigint":case"string":case"number":ie=!0;break;case"object":switch($.$$typeof){case e:case n:ie=!0;break;case _:return ie=$._init,W(ie($._payload),K,G,re,oe)}}if(ie)return oe=oe($),ie=re===""?"."+V($,0):re,A(oe)?(G="",ie!=null&&(G=ie.replace(F,"$&/")+"/"),W(oe,K,G,"",function(le){return le})):oe!=null&&(P(oe)&&(oe=I(oe,G+(oe.key==null||$&&$.key===oe.key?"":(""+oe.key).replace(F,"$&/")+"/")+ie)),K.push(oe)),1;ie=0;var q=re===""?".":re+":";if(A($))for(var te=0;te<$.length;te++)re=$[te],he=q+V(re,te),ie+=W(re,K,G,he,oe);else if(te=g($),typeof te=="function")for($=te.call($),te=0;!(re=$.next()).done;)re=re.value,he=q+V(re,te++),ie+=W(re,K,G,he,oe);else if(he==="object"){if(typeof $.then=="function")return W(X($),K,G,re,oe);throw K=String($),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return ie}function Z($,K,G){if($==null)return $;var re=[],oe=0;return W($,re,"","",function(he){return K.call(G,he,oe++)}),re}function J($){if($._status===-1){var K=$._result;K=K(),K.then(function(G){($._status===0||$._status===-1)&&($._status=1,$._result=G)},function(G){($._status===0||$._status===-1)&&($._status=2,$._result=G)}),$._status===-1&&($._status=0,$._result=K)}if($._status===1)return $._result.default;throw $._result}var B=typeof reportError=="function"?reportError:function($){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof $=="object"&&$!==null&&typeof $.message=="string"?String($.message):String($),error:$});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",$);return}console.error($)},L={map:Z,forEach:function($,K,G){Z($,function(){K.apply(this,arguments)},G)},count:function($){var K=0;return Z($,function(){K++}),K},toArray:function($){return Z($,function(K){return K})||[]},only:function($){if(!P($))throw Error("React.Children.only expected to receive a single React element child.");return $}};return Pt.Activity=f,Pt.Children=L,Pt.Component=v,Pt.Fragment=t,Pt.Profiler=s,Pt.PureComponent=y,Pt.StrictMode=r,Pt.Suspense=c,Pt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,Pt.__COMPILER_RUNTIME={__proto__:null,c:function($){return j.H.useMemoCache($)}},Pt.cache=function($){return function(){return $.apply(null,arguments)}},Pt.cacheSignal=function(){return null},Pt.cloneElement=function($,K,G){if($==null)throw Error("The argument must be a React element, but you passed "+$+".");var re=k({},$.props),oe=$.key;if(K!=null)for(he in K.key!==void 0&&(oe=""+K.key),K)!T.call(K,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&K.ref===void 0||(re[he]=K[he]);var he=arguments.length-2;if(he===1)re.children=G;else if(1{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var l6;function LL(){return l6||(l6=1,(function(e){function n(W,Z){var J=W.length;W.push(Z);e:for(;0>>1,L=W[B];if(0>>1;B<$;){var K=2*(B+1)-1,G=W[K],re=K+1,oe=W[re];if(0>s(G,J))res(oe,G)?(W[B]=oe,W[re]=J,B=re):(W[B]=G,W[K]=J,B=K);else if(res(oe,J))W[B]=oe,W[re]=J,B=re;else break e}}return Z}function s(W,Z){var J=W.sortIndex-Z.sortIndex;return J!==0?J:W.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],_=1,f=null,m=3,g=!1,S=!1,k=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(W){for(var Z=t(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=W)r(d),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(d)}}function A(W){if(k=!1,C(W),!S)if(t(c)!==null)S=!0,E||(E=!0,H());else{var Z=t(d);Z!==null&&X(A,Z.startTime-W)}}var E=!1,j=-1,T=5,D=-1;function I(){return b?!0:!(e.unstable_now()-DW&&I());){var B=f.callback;if(typeof B=="function"){f.callback=null,m=f.priorityLevel;var L=B(f.expirationTime<=W);if(W=e.unstable_now(),typeof L=="function"){f.callback=L,C(W),Z=!0;break t}f===t(c)&&r(c),C(W)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var $=t(d);$!==null&&X(A,$.startTime-W),Z=!1}}break e}finally{f=null,m=J,g=!1}Z=void 0}}finally{Z?H():E=!1}}}var H;if(typeof y=="function")H=function(){y(P)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,V=F.port2;F.port1.onmessage=P,H=function(){V.postMessage(null)}}else H=function(){v(P,0)};function X(W,Z){j=v(function(){W(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(W){W.callback=null},e.unstable_forceFrameRate=function(W){0>W||125B?(W.sortIndex=J,n(d,W),t(c)===null&&W===t(d)&&(k?(x(j),j=-1):k=!0,X(A,J-B))):(W.sortIndex=L,n(c,W),S||g||(S=!0,E||(E=!0,H()))),W},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(W){var Z=m;return function(){var J=m;m=Z;try{return W.apply(this,arguments)}finally{m=J}}}})($1)),$1}var c6;function OL(){return c6||(c6=1,B1.exports=LL()),B1.exports}var H1={exports:{}},fs={};/** + */var h6;function WL(){return h6||(h6=1,(function(e){function n(W,Z){var J=W.length;W.push(Z);e:for(;0>>1,L=W[$];if(0>>1;$s(G,J))ees(oe,G)?(W[$]=oe,W[ee]=J,$=ee):(W[$]=G,W[Y]=J,$=Y);else if(ees(oe,J))W[$]=oe,W[ee]=J,$=ee;else break e}}return Z}function s(W,Z){var J=W.sortIndex-Z.sortIndex;return J!==0?J:W.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],d=[],_=1,f=null,m=3,g=!1,S=!1,k=!1,b=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function C(W){for(var Z=t(d);Z!==null;){if(Z.callback===null)r(d);else if(Z.startTime<=W)r(d),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(d)}}function A(W){if(k=!1,C(W),!S)if(t(c)!==null)S=!0,E||(E=!0,B());else{var Z=t(d);Z!==null&&X(A,Z.startTime-W)}}var E=!1,j=-1,T=5,D=-1;function I(){return b?!0:!(e.unstable_now()-DW&&I());){var $=f.callback;if(typeof $=="function"){f.callback=null,m=f.priorityLevel;var L=$(f.expirationTime<=W);if(W=e.unstable_now(),typeof L=="function"){f.callback=L,C(W),Z=!0;break t}f===t(c)&&r(c),C(W)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var H=t(d);H!==null&&X(A,H.startTime-W),Z=!1}}break e}finally{f=null,m=J,g=!1}Z=void 0}}finally{Z?B():E=!1}}}var B;if(typeof y=="function")B=function(){y(P)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,V=F.port2;F.port1.onmessage=P,B=function(){V.postMessage(null)}}else B=function(){v(P,0)};function X(W,Z){j=v(function(){W(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(W){W.callback=null},e.unstable_forceFrameRate=function(W){0>W||125$?(W.sortIndex=J,n(d,W),t(c)===null&&W===t(d)&&(k?(x(j),j=-1):k=!0,X(A,J-$))):(W.sortIndex=L,n(c,W),S||g||(S=!0,E||(E=!0,B()))),W},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(W){var Z=m;return function(){var J=m;m=Z;try{return W.apply(this,arguments)}finally{m=J}}}})(U1)),U1}var _6;function KL(){return _6||(_6=1,F1.exports=WL()),F1.exports}var q1={exports:{}},fs={};/** * @license React * react-dom.production.js * @@ -30,7 +30,7 @@ var t6=e=>{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var u6;function IL(){if(u6)return fs;u6=1;var e=bh();function n(c){var d="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(),H1.exports=IL(),H1.exports}/** + */var p6;function YL(){if(p6)return fs;p6=1;var e=yh();function n(c){var d="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(),q1.exports=YL(),q1.exports}/** * @license React * react-dom-client.production.js * @@ -38,457 +38,458 @@ var t6=e=>{throw TypeError(e)};var n6=(e,n,t)=>n.has(e)||t6("Cannot "+t);var Zn= * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var f6;function BL(){if(f6)return of;f6=1;var e=OL(),n=bh(),t=q9();function r(i){var u="https://react.dev/errors/"+i;if(1L||(i.current=B[L],B[L]=null,L--)}function G(i,u){L++,B[L]=i.current,i.current=u}var re=$(null),oe=$(null),he=$(null),ie=$(null);function q(i,u){switch(G(he,u),G(oe,i),G(re,null),u.nodeType){case 9:case 11:i=(i=u.documentElement)&&(i=i.namespaceURI)?k3(i):0;break;default:if(i=u.tagName,u=u.namespaceURI)u=k3(u),i=C3(u,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}K(re),G(re,i)}function te(){K(re),K(oe),K(he)}function le(i){i.memoizedState!==null&&G(ie,i);var u=re.current,p=C3(u,i.type);u!==p&&(G(oe,i),G(re,p))}function ge(i){oe.current===i&&(K(re),K(oe)),ie.current===i&&(K(ie),tf._currentValue=J)}var ue,Ce;function Ee(i){if(ue===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ue=u&&u[1]||"",Ce=-1L||(i.current=$[L],$[L]=null,L--)}function G(i,u){L++,$[L]=i.current,i.current=u}var ee=H(null),oe=H(null),he=H(null),ie=H(null);function q(i,u){switch(G(he,u),G(oe,i),G(ee,null),u.nodeType){case 9:case 11:i=(i=u.documentElement)&&(i=i.namespaceURI)?A3(i):0;break;default:if(i=u.tagName,u=u.namespaceURI)u=A3(u),i=T3(u,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Y(ee),G(ee,i)}function ne(){Y(ee),Y(oe),Y(he)}function le(i){i.memoizedState!==null&&G(ie,i);var u=ee.current,p=T3(u,i.type);u!==p&&(G(oe,i),G(ee,p))}function ge(i){oe.current===i&&(Y(ee),Y(oe)),ie.current===i&&(Y(ie),tf._currentValue=J)}var ue,Ce;function Ee(i){if(ue===void 0)try{throw Error()}catch(p){var u=p.stack.trim().match(/\n( *(at )?)/);ue=u&&u[1]||"",Ce=-1)":-1z||fe[w]!==we[z]){var Me=` -`+fe[w].replace(" at new "," at ");return i.displayName&&Me.includes("")&&(Me=Me.replace("",i.displayName)),Me}while(1<=w&&0<=z);break}}}finally{Le=!1,Error.prepareStackTrace=p}return(p=i?i.displayName||i.name:"")?Ee(p):""}function Ve(i,u){switch(i.tag){case 26:case 27:case 5:return Ee(i.type);case 16:return Ee("Lazy");case 13:return i.child!==u&&u!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Pe(i.type,!1);case 11:return Pe(i.type.render,!1);case 1:return Pe(i.type,!0);case 31:return Ee("Activity");default:return""}}function ft(i){try{var u="",p=null;do u+=Ve(i,p),p=i,i=i.return;while(i);return u}catch(w){return` +`+fe[w].replace(" at new "," at ");return i.displayName&&Me.includes("")&&(Me=Me.replace("",i.displayName)),Me}while(1<=w&&0<=z);break}}}finally{Le=!1,Error.prepareStackTrace=p}return(p=i?i.displayName||i.name:"")?Ee(p):""}function Ve(i,u){switch(i.tag){case 26:case 27:case 5:return Ee(i.type);case 16:return Ee("Lazy");case 13:return i.child!==u&&u!==null?Ee("Suspense Fallback"):Ee("Suspense");case 19:return Ee("SuspenseList");case 0:case 15:return Pe(i.type,!1);case 11:return Pe(i.type.render,!1);case 1:return Pe(i.type,!0);case 31:return Ee("Activity");default:return""}}function ht(i){try{var u="",p=null;do u+=Ve(i,p),p=i,i=i.return;while(i);return u}catch(w){return` Error generating stack: `+w.message+` -`+w.stack}}var Be=Object.prototype.hasOwnProperty,wt=e.unstable_scheduleCallback,At=e.unstable_cancelCallback,vt=e.unstable_shouldYield,Ot=e.unstable_requestPaint,St=e.unstable_now,kt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,st=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Ht=e.log,bt=e.unstable_setDisableYieldValue,nn=null,Wt=null;function pn(i){if(typeof Ht=="function"&&bt(i),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(nn,i)}catch{}}var Lt=Math.clz32?Math.clz32:br,En=Math.log,Ft=Math.LN2;function br(i){return i>>>=0,i===0?32:31-(En(i)/Ft|0)|0}var mn=256,Ye=262144,xt=4194304;function Wn(i){var u=i&42;if(u!==0)return u;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Kn(i,u,p){var w=i.pendingLanes;if(w===0)return 0;var z=0,R=i.suspendedLanes,Y=i.pingedLanes;i=i.warmLanes;var ee=w&134217727;return ee!==0?(w=ee&~R,w!==0?z=Wn(w):(Y&=ee,Y!==0?z=Wn(Y):p||(p=ee&~i,p!==0&&(z=Wn(p))))):(ee=w&~R,ee!==0?z=Wn(ee):Y!==0?z=Wn(Y):p||(p=w&~i,p!==0&&(z=Wn(p)))),z===0?0:u!==0&&u!==z&&(u&R)===0&&(R=z&-z,p=u&-u,R>=p||R===32&&(p&4194048)!==0)?u:z}function Nt(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function rt(i,u){switch(i){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Ie(){var i=xt;return xt<<=1,(xt&62914560)===0&&(xt=4194304),i}function it(i){for(var u=[],p=0;31>p;p++)u.push(i);return u}function Ut(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function en(i,u,p,w,z,R){var Y=i.pendingLanes;i.pendingLanes=p,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=p,i.entangledLanes&=p,i.errorRecoveryDisabledLanes&=p,i.shellSuspendCounter=0;var ee=i.entanglements,fe=i.expirationTimes,we=i.hiddenUpdates;for(p=Y&~p;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Zs=/[\n"\\]/g;function Yn(i){return i.replace(Zs,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function Bi(i,u,p,w,z,R,Y,ee){i.name="",Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"?i.type=Y:i.removeAttribute("type"),u!=null?Y==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+cr(u)):i.value!==""+cr(u)&&(i.value=""+cr(u)):Y!=="submit"&&Y!=="reset"||i.removeAttribute("value"),u!=null?zn(i,Y,cr(u)):p!=null?zn(i,Y,cr(p)):w!=null&&i.removeAttribute("value"),z==null&&R!=null&&(i.defaultChecked=!!R),z!=null&&(i.checked=z&&typeof z!="function"&&typeof z!="symbol"),ee!=null&&typeof ee!="function"&&typeof ee!="symbol"&&typeof ee!="boolean"?i.name=""+cr(ee):i.removeAttribute("name")}function Hn(i,u,p,w,z,R,Y,ee){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),u!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||u!=null)){$a(i);return}p=p!=null?""+cr(p):"",u=u!=null?""+cr(u):p,ee||u===i.value||(i.value=u),i.defaultValue=u}w=w??z,w=typeof w!="function"&&typeof w!="symbol"&&!!w,i.checked=ee?i.checked:!!w,i.defaultChecked=!!w,Y!=null&&typeof Y!="function"&&typeof Y!="symbol"&&typeof Y!="boolean"&&(i.name=Y),$a(i)}function zn(i,u,p){u==="number"&&ls(i.ownerDocument)===i||i.defaultValue===""+p||(i.defaultValue=""+p)}function Qs(i,u,p,w){if(i=i.options,u){u={};for(var z=0;z"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ga=!1;if(Ls)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){Ga=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{Ga=!1}var Xr=null,Do=null,Zr=null;function Pn(){if(Zr)return Zr;var i,u=Do,p=u.length,w,z="value"in Xr?Xr.value:Xr.textContent,R=z.length;for(i=0;i=Ir),la=" ",Ll=!1;function Fh(i,u){switch(i){case"keyup":return Xe.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ka=!1;function Bc(i,u){switch(i){case"compositionend":return xd(u);case"keypress":return u.which!==32?null:(Ll=!0,la);case"textInput":return i=u.data,i===la&&Ll?null:i;default:return null}}function sr(i,u){if(Ka)return i==="compositionend"||!Ct&&Fh(i,u)?(i=Pn(),Zr=Do=Xr=null,Ka=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-i};i=w}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=F4(p)}}function q4(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?q4(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function G4(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=ls(i.document);u instanceof i.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)i=u.contentWindow;else break;u=ls(i.document)}return u}function qm(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}var dD=Ls&&"documentMode"in document&&11>=document.documentMode,Fc=null,Gm=null,Ed=null,Vm=!1;function V4(i,u,p){var w=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Vm||Fc==null||Fc!==ls(w)||(w=Fc,"selectionStart"in w&&qm(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),Ed&&Cd(Ed,w)||(Ed=w,w=T_(Gm,"onSelect"),0>=Y,z-=Y,da=1<<32-Lt(u)+z|p<Kt?(un=dt,dt=null):un=dt.sibling;var vn=Se(ve,dt,ye[Kt],Re);if(vn===null){dt===null&&(dt=un);break}i&&dt&&vn.alternate===null&&u(ve,dt),_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn,dt=un}if(Kt===ye.length)return p(ve,dt),fn&&Xa(ve,Kt),yt;if(dt===null){for(;KtKt?(un=dt,dt=null):un=dt.sibling;var il=Se(ve,dt,vn.value,Re);if(il===null){dt===null&&(dt=un);break}i&&dt&&il.alternate===null&&u(ve,dt),_e=R(il,_e,Kt),gn===null?yt=il:gn.sibling=il,gn=il,dt=un}if(vn.done)return p(ve,dt),fn&&Xa(ve,Kt),yt;if(dt===null){for(;!vn.done;Kt++,vn=ye.next())vn=Oe(ve,vn.value,Re),vn!==null&&(_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn);return fn&&Xa(ve,Kt),yt}for(dt=w(dt);!vn.done;Kt++,vn=ye.next())vn=Ne(dt,ve,Kt,vn.value,Re),vn!==null&&(i&&vn.alternate!==null&&dt.delete(vn.key===null?Kt:vn.key),_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn);return i&&dt.forEach(function(jL){return u(ve,jL)}),fn&&Xa(ve,Kt),yt}function Dn(ve,_e,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===k&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case g:e:{for(var yt=ye.key;_e!==null;){if(_e.key===yt){if(yt=ye.type,yt===k){if(_e.tag===7){p(ve,_e.sibling),Re=z(_e,ye.props.children),Re.return=ve,ve=Re;break e}}else if(_e.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===T&&Gl(yt)===_e.type){p(ve,_e.sibling),Re=z(_e,ye.props),Md(Re,ye),Re.return=ve,ve=Re;break e}p(ve,_e);break}else u(ve,_e);_e=_e.sibling}ye.type===k?(Re=Hl(ye.props.children,ve.mode,Re,ye.key),Re.return=ve,ve=Re):(Re=Wh(ye.type,ye.key,ye.props,null,ve.mode,Re),Md(Re,ye),Re.return=ve,ve=Re)}return Y(ve);case S:e:{for(yt=ye.key;_e!==null;){if(_e.key===yt)if(_e.tag===4&&_e.stateNode.containerInfo===ye.containerInfo&&_e.stateNode.implementation===ye.implementation){p(ve,_e.sibling),Re=z(_e,ye.children||[]),Re.return=ve,ve=Re;break e}else{p(ve,_e);break}else u(ve,_e);_e=_e.sibling}Re=Jm(ye,ve.mode,Re),Re.return=ve,ve=Re}return Y(ve);case T:return ye=Gl(ye),Dn(ve,_e,ye,Re)}if(X(ye))return ut(ve,_e,ye,Re);if(H(ye)){if(yt=H(ye),typeof yt!="function")throw Error(r(150));return ye=yt.call(ye),zt(ve,_e,ye,Re)}if(typeof ye.then=="function")return Dn(ve,_e,e_(ye),Re);if(ye.$$typeof===y)return Dn(ve,_e,Xh(ve,ye),Re);t_(ve,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint"?(ye=""+ye,_e!==null&&_e.tag===6?(p(ve,_e.sibling),Re=z(_e,ye),Re.return=ve,ve=Re):(p(ve,_e),Re=Qm(ye,ve.mode,Re),Re.return=ve,ve=Re),Y(ve)):p(ve,_e)}return function(ve,_e,ye,Re){try{jd=0;var yt=Dn(ve,_e,ye,Re);return Jc=null,yt}catch(dt){if(dt===Qc||dt===Qh)throw dt;var gn=ri(29,dt,null,ve.mode);return gn.lanes=Re,gn.return=ve,gn}finally{}}}var Wl=pw(!0),mw=pw(!1),Fo=!1;function dg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fg(i,u){i=i.updateQueue,u.updateQueue===i&&(u.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Uo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function qo(i,u,p){var w=i.updateQueue;if(w===null)return null;if(w=w.shared,(bn&2)!==0){var z=w.pending;return z===null?u.next=u:(u.next=z.next,z.next=u),w.pending=u,u=Vh(i),J4(i,null,p),u}return Gh(i,w,u,p),Vh(i)}function Rd(i,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Ln(i,p)}}function hg(i,u){var p=i.updateQueue,w=i.alternate;if(w!==null&&(w=w.updateQueue,p===w)){var z=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var Y={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?z=R=Y:R=R.next=Y,p=p.next}while(p!==null);R===null?z=R=u:R=R.next=u}else z=R=u;p={baseState:w.baseState,firstBaseUpdate:z,lastBaseUpdate:R,shared:w.shared,callbacks:w.callbacks},i.updateQueue=p;return}i=p.lastBaseUpdate,i===null?p.firstBaseUpdate=u:i.next=u,p.lastBaseUpdate=u}var _g=!1;function Dd(){if(_g){var i=Zc;if(i!==null)throw i}}function Ld(i,u,p,w){_g=!1;var z=i.updateQueue;Fo=!1;var R=z.firstBaseUpdate,Y=z.lastBaseUpdate,ee=z.shared.pending;if(ee!==null){z.shared.pending=null;var fe=ee,we=fe.next;fe.next=null,Y===null?R=we:Y.next=we,Y=fe;var Me=i.alternate;Me!==null&&(Me=Me.updateQueue,ee=Me.lastBaseUpdate,ee!==Y&&(ee===null?Me.firstBaseUpdate=we:ee.next=we,Me.lastBaseUpdate=fe))}if(R!==null){var Oe=z.baseState;Y=0,Me=we=fe=null,ee=R;do{var Se=ee.lane&-536870913,Ne=Se!==ee.lane;if(Ne?(cn&Se)===Se:(w&Se)===Se){Se!==0&&Se===Xc&&(_g=!0),Me!==null&&(Me=Me.next={lane:0,tag:ee.tag,payload:ee.payload,callback:null,next:null});e:{var ut=i,zt=ee;Se=u;var Dn=p;switch(zt.tag){case 1:if(ut=zt.payload,typeof ut=="function"){Oe=ut.call(Dn,Oe,Se);break e}Oe=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=zt.payload,Se=typeof ut=="function"?ut.call(Dn,Oe,Se):ut,Se==null)break e;Oe=f({},Oe,Se);break e;case 2:Fo=!0}}Se=ee.callback,Se!==null&&(i.flags|=64,Ne&&(i.flags|=8192),Ne=z.callbacks,Ne===null?z.callbacks=[Se]:Ne.push(Se))}else Ne={lane:Se,tag:ee.tag,payload:ee.payload,callback:ee.callback,next:null},Me===null?(we=Me=Ne,fe=Oe):Me=Me.next=Ne,Y|=Se;if(ee=ee.next,ee===null){if(ee=z.shared.pending,ee===null)break;Ne=ee,ee=Ne.next,Ne.next=null,z.lastBaseUpdate=Ne,z.shared.pending=null}}while(!0);Me===null&&(fe=Oe),z.baseState=fe,z.firstBaseUpdate=we,z.lastBaseUpdate=Me,R===null&&(z.shared.lanes=0),Yo|=Y,i.lanes=Y,i.memoizedState=Oe}}function gw(i,u){if(typeof i!="function")throw Error(r(191,i));i.call(u)}function vw(i,u){var p=i.callbacks;if(p!==null)for(i.callbacks=null,i=0;iR?R:8;var Y=W.T,ee={};W.T=ee,Rg(i,!1,u,p);try{var fe=z(),we=W.S;if(we!==null&&we(ee,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Me=xD(fe,w);Bd(i,u,Me,li(i))}else Bd(i,u,w,li(i))}catch(Oe){Bd(i,u,{then:function(){},status:"rejected",reason:Oe},li())}finally{Z.p=R,Y!==null&&ee.types!==null&&(Y.types=ee.types),W.T=Y}}function ED(){}function jg(i,u,p,w){if(i.tag!==5)throw Error(r(476));var z=Xw(i).queue;Yw(i,z,u,J,p===null?ED:function(){return Zw(i),p(w)})}function Xw(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:J},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:eo,lastRenderedState:p},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function Zw(i){var u=Xw(i);u.next===null&&(u=i.alternate.memoizedState),Bd(i,u.next.queue,{},li())}function Mg(){return es(tf)}function Qw(){return mr().memoizedState}function Jw(){return mr().memoizedState}function ND(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var p=li();i=Uo(p);var w=qo(u,i,p);w!==null&&(Ps(w,u,p),Rd(w,u,p)),u={cache:og()},i.payload=u;return}u=u.return}}function zD(i,u,p){var w=li();p={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},d_(i)?t5(u,p):(p=Xm(i,u,p,w),p!==null&&(Ps(p,i,w),n5(p,u,w)))}function e5(i,u,p){var w=li();Bd(i,u,p,w)}function Bd(i,u,p,w){var z={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(d_(i))t5(u,z);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var Y=u.lastRenderedState,ee=R(Y,p);if(z.hasEagerState=!0,z.eagerState=ee,ni(ee,Y))return Gh(i,u,z,0),On===null&&qh(),!1}catch{}finally{}if(p=Xm(i,u,z,w),p!==null)return Ps(p,i,w),n5(p,u,w),!0}return!1}function Rg(i,u,p,w){if(w={lane:2,revertLane:d1(),gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},d_(i)){if(u)throw Error(r(479))}else u=Xm(i,p,w,2),u!==null&&Ps(u,i,2)}function d_(i){var u=i.alternate;return i===qt||u!==null&&u===qt}function t5(i,u){tu=s_=!0;var p=i.pending;p===null?u.next=u:(u.next=p.next,p.next=u),i.pending=u}function n5(i,u,p){if((p&4194048)!==0){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,Ln(i,p)}}var $d={readContext:es,use:o_,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useLayoutEffect:dr,useInsertionEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useSyncExternalStore:dr,useId:dr,useHostTransitionStatus:dr,useFormState:dr,useActionState:dr,useOptimistic:dr,useMemoCache:dr,useCacheRefresh:dr};$d.useEffectEvent=dr;var r5={readContext:es,use:o_,useCallback:function(i,u){return Ss().memoizedState=[i,u===void 0?null:u],i},useContext:es,useEffect:Hw,useImperativeHandle:function(i,u,p){p=p!=null?p.concat([i]):null,c_(4194308,4,qw.bind(null,u,i),p)},useLayoutEffect:function(i,u){return c_(4194308,4,i,u)},useInsertionEffect:function(i,u){c_(4,2,i,u)},useMemo:function(i,u){var p=Ss();u=u===void 0?null:u;var w=i();if(Kl){pn(!0);try{i()}finally{pn(!1)}}return p.memoizedState=[w,u],w},useReducer:function(i,u,p){var w=Ss();if(p!==void 0){var z=p(u);if(Kl){pn(!0);try{p(u)}finally{pn(!1)}}}else z=u;return w.memoizedState=w.baseState=z,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:z},w.queue=i,i=i.dispatch=zD.bind(null,qt,i),[w.memoizedState,i]},useRef:function(i){var u=Ss();return i={current:i},u.memoizedState=i},useState:function(i){i=Eg(i);var u=i.queue,p=e5.bind(null,qt,u);return u.dispatch=p,[i.memoizedState,p]},useDebugValue:Ag,useDeferredValue:function(i,u){var p=Ss();return Tg(p,i,u)},useTransition:function(){var i=Eg(!1);return i=Yw.bind(null,qt,i.queue,!0,!1),Ss().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,p){var w=qt,z=Ss();if(fn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),On===null)throw Error(r(349));(cn&127)!==0||kw(w,u,p)}z.memoizedState=p;var R={value:p,getSnapshot:u};return z.queue=R,Hw(Ew.bind(null,w,R,i),[i]),w.flags|=2048,ru(9,{destroy:void 0},Cw.bind(null,w,R,p,u),null),p},useId:function(){var i=Ss(),u=On.identifierPrefix;if(fn){var p=fa,w=da;p=(w&~(1<<32-Lt(w)-1)).toString(32)+p,u="_"+u+"R_"+p,p=i_++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof w.is=="string"?Y.createElement("select",{is:w.is}):Y.createElement("select"),w.multiple?R.multiple=!0:w.size&&(R.size=w.size);break;default:R=typeof w.is=="string"?Y.createElement(z,{is:w.is}):Y.createElement(z)}}R[rn]=u,R[Fn]=w;e:for(Y=u.child;Y!==null;){if(Y.tag===5||Y.tag===6)R.appendChild(Y.stateNode);else if(Y.tag!==4&&Y.tag!==27&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===u)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===u)break e;Y=Y.return}Y.sibling.return=Y.return,Y=Y.sibling}u.stateNode=R;e:switch(ns(R,z,w),z){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}w&&no(u)}}return Gn(u),Wg(u,u.type,i===null?null:i.memoizedProps,u.pendingProps,p),null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==w&&no(u);else{if(typeof w!="string"&&u.stateNode===null)throw Error(r(166));if(i=he.current,Kc(u)){if(i=u.stateNode,p=u.memoizedProps,w=null,z=Jr,z!==null)switch(z.tag){case 27:case 5:w=z.memoizedProps}i[rn]=u,i=!!(i.nodeValue===p||w!==null&&w.suppressHydrationWarning===!0||w3(i.nodeValue,p)),i||Ho(u,!0)}else i=j_(i).createTextNode(w),i[rn]=u,u.stateNode=i}return Gn(u),null;case 31:if(p=u.memoizedState,i===null||i.memoizedState!==null){if(w=Kc(u),p!==null){if(i===null){if(!w)throw Error(r(318));if(i=u.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[rn]=u}else Pl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Gn(u),i=!1}else p=rg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),i=!0;if(!i)return u.flags&256?(ii(u),u):(ii(u),null);if((u.flags&128)!==0)throw Error(r(558))}return Gn(u),null;case 13:if(w=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(z=Kc(u),w!==null&&w.dehydrated!==null){if(i===null){if(!z)throw Error(r(318));if(z=u.memoizedState,z=z!==null?z.dehydrated:null,!z)throw Error(r(317));z[rn]=u}else Pl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Gn(u),z=!1}else z=rg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=z),z=!0;if(!z)return u.flags&256?(ii(u),u):(ii(u),null)}return ii(u),(u.flags&128)!==0?(u.lanes=p,u):(p=w!==null,i=i!==null&&i.memoizedState!==null,p&&(w=u.child,z=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(z=w.alternate.memoizedState.cachePool.pool),R=null,w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(R=w.memoizedState.cachePool.pool),R!==z&&(w.flags|=2048)),p!==i&&p&&(u.child.flags|=8192),m_(u,u.updateQueue),Gn(u),null);case 4:return te(),i===null&&p1(u.stateNode.containerInfo),Gn(u),null;case 10:return Qa(u.type),Gn(u),null;case 19:if(K(pr),w=u.memoizedState,w===null)return Gn(u),null;if(z=(u.flags&128)!==0,R=w.rendering,R===null)if(z)Pd(w,!1);else{if(fr!==0||i!==null&&(i.flags&128)!==0)for(i=u.child;i!==null;){if(R=r_(i),R!==null){for(u.flags|=128,Pd(w,!1),i=R.updateQueue,u.updateQueue=i,m_(u,i),u.subtreeFlags=0,i=p,p=u.child;p!==null;)ew(p,i),p=p.sibling;return G(pr,pr.current&1|2),fn&&Xa(u,w.treeForkCount),u.child}i=i.sibling}w.tail!==null&&St()>y_&&(u.flags|=128,z=!0,Pd(w,!1),u.lanes=4194304)}else{if(!z)if(i=r_(R),i!==null){if(u.flags|=128,z=!0,i=i.updateQueue,u.updateQueue=i,m_(u,i),Pd(w,!0),w.tail===null&&w.tailMode==="hidden"&&!R.alternate&&!fn)return Gn(u),null}else 2*St()-w.renderingStartTime>y_&&p!==536870912&&(u.flags|=128,z=!0,Pd(w,!1),u.lanes=4194304);w.isBackwards?(R.sibling=u.child,u.child=R):(i=w.last,i!==null?i.sibling=R:u.child=R,w.last=R)}return w.tail!==null?(i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=St(),i.sibling=null,p=pr.current,G(pr,z?p&1|2:p&1),fn&&Xa(u,w.treeForkCount),i):(Gn(u),null);case 22:case 23:return ii(u),mg(),w=u.memoizedState!==null,i!==null?i.memoizedState!==null!==w&&(u.flags|=8192):w&&(u.flags|=8192),w?(p&536870912)!==0&&(u.flags&128)===0&&(Gn(u),u.subtreeFlags&6&&(u.flags|=8192)):Gn(u),p=u.updateQueue,p!==null&&m_(u,p.retryQueue),p=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),w=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(w=u.memoizedState.cachePool.pool),w!==p&&(u.flags|=2048),i!==null&&K(ql),null;case 24:return p=null,i!==null&&(p=i.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Qa(Cr),Gn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function RD(i,u){switch(tg(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return Qa(Cr),te(),i=u.flags,(i&65536)!==0&&(i&128)===0?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return ge(u),null;case 31:if(u.memoizedState!==null){if(ii(u),u.alternate===null)throw Error(r(340));Pl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 13:if(ii(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Pl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return K(pr),null;case 4:return te(),null;case 10:return Qa(u.type),null;case 22:case 23:return ii(u),mg(),i!==null&&K(ql),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return Qa(Cr),null;case 25:return null;default:return null}}function N5(i,u){switch(tg(u),u.tag){case 3:Qa(Cr),te();break;case 26:case 27:case 5:ge(u);break;case 4:te();break;case 31:u.memoizedState!==null&&ii(u);break;case 13:ii(u);break;case 19:K(pr);break;case 10:Qa(u.type);break;case 22:case 23:ii(u),mg(),i!==null&&K(ql);break;case 24:Qa(Cr)}}function Fd(i,u){try{var p=u.updateQueue,w=p!==null?p.lastEffect:null;if(w!==null){var z=w.next;p=z;do{if((p.tag&i)===i){w=void 0;var R=p.create,Y=p.inst;w=R(),Y.destroy=w}p=p.next}while(p!==z)}}catch(ee){jn(u,u.return,ee)}}function Wo(i,u,p){try{var w=u.updateQueue,z=w!==null?w.lastEffect:null;if(z!==null){var R=z.next;w=R;do{if((w.tag&i)===i){var Y=w.inst,ee=Y.destroy;if(ee!==void 0){Y.destroy=void 0,z=u;var fe=p,we=ee;try{we()}catch(Me){jn(z,fe,Me)}}}w=w.next}while(w!==R)}}catch(Me){jn(u,u.return,Me)}}function z5(i){var u=i.updateQueue;if(u!==null){var p=i.stateNode;try{vw(u,p)}catch(w){jn(i,i.return,w)}}}function A5(i,u,p){p.props=Yl(i.type,i.memoizedProps),p.state=i.memoizedState;try{p.componentWillUnmount()}catch(w){jn(i,u,w)}}function Ud(i,u){try{var p=i.ref;if(p!==null){switch(i.tag){case 26:case 27:case 5:var w=i.stateNode;break;case 30:w=i.stateNode;break;default:w=i.stateNode}typeof p=="function"?i.refCleanup=p(w):p.current=w}}catch(z){jn(i,u,z)}}function ha(i,u){var p=i.ref,w=i.refCleanup;if(p!==null)if(typeof w=="function")try{w()}catch(z){jn(i,u,z)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(z){jn(i,u,z)}else p.current=null}function T5(i){var u=i.type,p=i.memoizedProps,w=i.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&w.focus();break e;case"img":p.src?w.src=p.src:p.srcSet&&(w.srcset=p.srcSet)}}catch(z){jn(i,i.return,z)}}function Kg(i,u,p){try{var w=i.stateNode;tL(w,i.type,p,u),w[Fn]=u}catch(z){jn(i,i.return,z)}}function j5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&el(i.type)||i.tag===4}function Yg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||j5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&el(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Xg(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(i,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(i),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=xs));else if(w!==4&&(w===27&&el(i.type)&&(p=i.stateNode,u=null),i=i.child,i!==null))for(Xg(i,u,p),i=i.sibling;i!==null;)Xg(i,u,p),i=i.sibling}function g_(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?p.insertBefore(i,u):p.appendChild(i);else if(w!==4&&(w===27&&el(i.type)&&(p=i.stateNode),i=i.child,i!==null))for(g_(i,u,p),i=i.sibling;i!==null;)g_(i,u,p),i=i.sibling}function M5(i){var u=i.stateNode,p=i.memoizedProps;try{for(var w=i.type,z=u.attributes;z.length;)u.removeAttributeNode(z[0]);ns(u,w,p),u[rn]=i,u[Fn]=p}catch(R){jn(i,i.return,R)}}var ro=!1,zr=!1,Zg=!1,R5=typeof WeakSet=="function"?WeakSet:Set,Wr=null;function DD(i,u){if(i=i.containerInfo,v1=B_,i=G4(i),qm(i)){if("selectionStart"in i)var p={start:i.selectionStart,end:i.selectionEnd};else e:{p=(p=i.ownerDocument)&&p.defaultView||window;var w=p.getSelection&&p.getSelection();if(w&&w.rangeCount!==0){p=w.anchorNode;var z=w.anchorOffset,R=w.focusNode;w=w.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var Y=0,ee=-1,fe=-1,we=0,Me=0,Oe=i,Se=null;t:for(;;){for(var Ne;Oe!==p||z!==0&&Oe.nodeType!==3||(ee=Y+z),Oe!==R||w!==0&&Oe.nodeType!==3||(fe=Y+w),Oe.nodeType===3&&(Y+=Oe.nodeValue.length),(Ne=Oe.firstChild)!==null;)Se=Oe,Oe=Ne;for(;;){if(Oe===i)break t;if(Se===p&&++we===z&&(ee=Y),Se===R&&++Me===w&&(fe=Y),(Ne=Oe.nextSibling)!==null)break;Oe=Se,Se=Oe.parentNode}Oe=Ne}p=ee===-1||fe===-1?null:{start:ee,end:fe}}else p=null}p=p||{start:0,end:0}}else p=null;for(b1={focusedElem:i,selectionRange:p},B_=!1,Wr=u;Wr!==null;)if(u=Wr,i=u.child,(u.subtreeFlags&1028)!==0&&i!==null)i.return=u,Wr=i;else for(;Wr!==null;){switch(u=Wr,R=u.alternate,i=u.flags,u.tag){case 0:if((i&4)!==0&&(i=u.updateQueue,i=i!==null?i.events:null,i!==null))for(p=0;p title"))),ns(R,w,p),R[rn]=i,Un(R),w=R;break e;case"link":var Y=$3("link","href",z).get(w+(p.href||""));if(Y){for(var ee=0;eeDn&&(Y=Dn,Dn=zt,zt=Y);var ve=U4(ee,zt),_e=U4(ee,Dn);if(ve&&_e&&(Ne.rangeCount!==1||Ne.anchorNode!==ve.node||Ne.anchorOffset!==ve.offset||Ne.focusNode!==_e.node||Ne.focusOffset!==_e.offset)){var ye=Oe.createRange();ye.setStart(ve.node,ve.offset),Ne.removeAllRanges(),zt>Dn?(Ne.addRange(ye),Ne.extend(_e.node,_e.offset)):(ye.setEnd(_e.node,_e.offset),Ne.addRange(ye))}}}}for(Oe=[],Ne=ee;Ne=Ne.parentNode;)Ne.nodeType===1&&Oe.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof ee.focus=="function"&&ee.focus(),ee=0;eep?32:p,W.T=null,p=s1,s1=null;var R=Zo,Y=lo;if(Hr=0,lu=Zo=null,lo=0,(bn&6)!==0)throw Error(r(331));var ee=bn;if(bn|=4,q5(R.current),P5(R,R.current,Y,p),bn=ee,Yd(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(nn,R)}catch{}return!0}finally{Z.p=z,W.T=w,l3(i,u)}}function u3(i,u,p){u=ki(p,u),u=Ig(i.stateNode,u,2),i=qo(i,u,2),i!==null&&(Ut(i,2),_a(i))}function jn(i,u,p){if(i.tag===3)u3(i,i,p);else for(;u!==null;){if(u.tag===3){u3(u,i,p);break}else if(u.tag===1){var w=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Xo===null||!Xo.has(w))){i=ki(p,i),p=d5(2),w=qo(u,p,2),w!==null&&(f5(p,w,u,i),Ut(w,2),_a(w));break}}u=u.return}}function l1(i,u,p){var w=i.pingCache;if(w===null){w=i.pingCache=new ID;var z=new Set;w.set(u,z)}else z=w.get(u),z===void 0&&(z=new Set,w.set(u,z));z.has(p)||(e1=!0,z.add(p),i=FD.bind(null,i,u,p),u.then(i,i))}function FD(i,u,p){var w=i.pingCache;w!==null&&w.delete(u),i.pingedLanes|=i.suspendedLanes&p,i.warmLanes&=~p,On===i&&(cn&p)===p&&(fr===4||fr===3&&(cn&62914560)===cn&&300>St()-x_?(bn&2)===0&&cu(i,0):t1|=p,ou===cn&&(ou=0)),_a(i)}function d3(i,u){u===0&&(u=Ie()),i=$l(i,u),i!==null&&(Ut(i,u),_a(i))}function UD(i){var u=i.memoizedState,p=0;u!==null&&(p=u.retryLane),d3(i,p)}function qD(i,u){var p=0;switch(i.tag){case 31:case 13:var w=i.stateNode,z=i.memoizedState;z!==null&&(p=z.retryLane);break;case 19:w=i.stateNode;break;case 22:w=i.stateNode._retryCache;break;default:throw Error(r(314))}w!==null&&w.delete(u),d3(i,p)}function GD(i,u){return wt(i,u)}var N_=null,du=null,c1=!1,z_=!1,u1=!1,Jo=0;function _a(i){i!==du&&i.next===null&&(du===null?N_=du=i:du=du.next=i),z_=!0,c1||(c1=!0,WD())}function Yd(i,u){if(!u1&&z_){u1=!0;do for(var p=!1,w=N_;w!==null;){if(i!==0){var z=w.pendingLanes;if(z===0)var R=0;else{var Y=w.suspendedLanes,ee=w.pingedLanes;R=(1<<31-Lt(42|i)+1)-1,R&=z&~(Y&~ee),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,p3(w,R))}else R=cn,R=Kn(w,w===On?R:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(R&3)===0||Nt(w,R)||(p=!0,p3(w,R));w=w.next}while(p);u1=!1}}function VD(){f3()}function f3(){z_=c1=!1;var i=0;Jo!==0&&rL()&&(i=Jo);for(var u=St(),p=null,w=N_;w!==null;){var z=w.next,R=h3(w,u);R===0?(w.next=null,p===null?N_=z:p.next=z,z===null&&(du=p)):(p=w,(i!==0||(R&3)!==0)&&(z_=!0)),w=z}Hr!==0&&Hr!==5||Yd(i),Jo!==0&&(Jo=0)}function h3(i,u){for(var p=i.suspendedLanes,w=i.pingedLanes,z=i.expirationTimes,R=i.pendingLanes&-62914561;0ee)break;var Me=fe.transferSize,Oe=fe.initiatorType;Me&&S3(Oe)&&(fe=fe.responseEnd,Y+=Me*(fe"u"?null:document;function L3(i,u,p){var w=fu;if(w&&typeof u=="string"&&u){var z=Yn(u);z='link[rel="'+i+'"][href="'+z+'"]',typeof p=="string"&&(z+='[crossorigin="'+p+'"]'),D3.has(z)||(D3.add(z),i={rel:i,crossOrigin:p,href:u},w.querySelector(z)===null&&(u=w.createElement("link"),ns(u,"link",i),Un(u),w.head.appendChild(u)))}}function fL(i){co.D(i),L3("dns-prefetch",i,null)}function hL(i,u){co.C(i,u),L3("preconnect",i,u)}function _L(i,u,p){co.L(i,u,p);var w=fu;if(w&&i&&u){var z='link[rel="preload"][as="'+Yn(u)+'"]';u==="image"&&p&&p.imageSrcSet?(z+='[imagesrcset="'+Yn(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(z+='[imagesizes="'+Yn(p.imageSizes)+'"]')):z+='[href="'+Yn(i)+'"]';var R=z;switch(u){case"style":R=hu(i);break;case"script":R=_u(i)}Ti.has(R)||(i=f({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:i,as:u},p),Ti.set(R,i),w.querySelector(z)!==null||u==="style"&&w.querySelector(Jd(R))||u==="script"&&w.querySelector(ef(R))||(u=w.createElement("link"),ns(u,"link",i),Un(u),w.head.appendChild(u)))}}function pL(i,u){co.m(i,u);var p=fu;if(p&&i){var w=u&&typeof u.as=="string"?u.as:"script",z='link[rel="modulepreload"][as="'+Yn(w)+'"][href="'+Yn(i)+'"]',R=z;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=_u(i)}if(!Ti.has(R)&&(i=f({rel:"modulepreload",href:i},u),Ti.set(R,i),p.querySelector(z)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(ef(R)))return}w=p.createElement("link"),ns(w,"link",i),Un(w),p.head.appendChild(w)}}}function mL(i,u,p){co.S(i,u,p);var w=fu;if(w&&i){var z=Gr(w).hoistableStyles,R=hu(i);u=u||"default";var Y=z.get(R);if(!Y){var ee={loading:0,preload:null};if(Y=w.querySelector(Jd(R)))ee.loading=5;else{i=f({rel:"stylesheet",href:i,"data-precedence":u},p),(p=Ti.get(R))&&E1(i,p);var fe=Y=w.createElement("link");Un(fe),ns(fe,"link",i),fe._p=new Promise(function(we,Me){fe.onload=we,fe.onerror=Me}),fe.addEventListener("load",function(){ee.loading|=1}),fe.addEventListener("error",function(){ee.loading|=2}),ee.loading|=4,R_(Y,u,w)}Y={type:"stylesheet",instance:Y,count:1,state:ee},z.set(R,Y)}}}function gL(i,u){co.X(i,u);var p=fu;if(p&&i){var w=Gr(p).hoistableScripts,z=_u(i),R=w.get(z);R||(R=p.querySelector(ef(z)),R||(i=f({src:i,async:!0},u),(u=Ti.get(z))&&N1(i,u),R=p.createElement("script"),Un(R),ns(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(z,R))}}function vL(i,u){co.M(i,u);var p=fu;if(p&&i){var w=Gr(p).hoistableScripts,z=_u(i),R=w.get(z);R||(R=p.querySelector(ef(z)),R||(i=f({src:i,async:!0,type:"module"},u),(u=Ti.get(z))&&N1(i,u),R=p.createElement("script"),Un(R),ns(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(z,R))}}function O3(i,u,p,w){var z=(z=he.current)?M_(z):null;if(!z)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=hu(p.href),p=Gr(z).hoistableStyles,w=p.get(u),w||(w={type:"style",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){i=hu(p.href);var R=Gr(z).hoistableStyles,Y=R.get(i);if(Y||(z=z.ownerDocument||z,Y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,Y),(R=z.querySelector(Jd(i)))&&!R._p&&(Y.instance=R,Y.state.loading=5),Ti.has(i)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Ti.set(i,p),R||bL(z,i,p,Y.state))),u&&w===null)throw Error(r(528,""));return Y}if(u&&w!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=_u(p),p=Gr(z).hoistableScripts,w=p.get(u),w||(w={type:"script",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function hu(i){return'href="'+Yn(i)+'"'}function Jd(i){return'link[rel="stylesheet"]['+i+"]"}function I3(i){return f({},i,{"data-precedence":i.precedence,precedence:null})}function bL(i,u,p,w){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?w.loading=1:(u=i.createElement("link"),w.preload=u,u.addEventListener("load",function(){return w.loading|=1}),u.addEventListener("error",function(){return w.loading|=2}),ns(u,"link",p),Un(u),i.head.appendChild(u))}function _u(i){return'[src="'+Yn(i)+'"]'}function ef(i){return"script[async]"+i}function B3(i,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var w=i.querySelector('style[data-href~="'+Yn(p.href)+'"]');if(w)return u.instance=w,Un(w),w;var z=f({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return w=(i.ownerDocument||i).createElement("style"),Un(w),ns(w,"style",z),R_(w,p.precedence,i),u.instance=w;case"stylesheet":z=hu(p.href);var R=i.querySelector(Jd(z));if(R)return u.state.loading|=4,u.instance=R,Un(R),R;w=I3(p),(z=Ti.get(z))&&E1(w,z),R=(i.ownerDocument||i).createElement("link"),Un(R);var Y=R;return Y._p=new Promise(function(ee,fe){Y.onload=ee,Y.onerror=fe}),ns(R,"link",w),u.state.loading|=4,R_(R,p.precedence,i),u.instance=R;case"script":return R=_u(p.src),(z=i.querySelector(ef(R)))?(u.instance=z,Un(z),z):(w=p,(z=Ti.get(R))&&(w=f({},p),N1(w,z)),i=i.ownerDocument||i,z=i.createElement("script"),Un(z),ns(z,"link",w),i.head.appendChild(z),u.instance=z);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(w=u.instance,u.state.loading|=4,R_(w,p.precedence,i));return u.instance}function R_(i,u,p){for(var w=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),z=w.length?w[w.length-1]:null,R=z,Y=0;Y title"):null)}function xL(i,u,p){if(p===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function P3(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function yL(i,u,p,w){if(p.type==="stylesheet"&&(typeof w.media!="string"||matchMedia(w.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var z=hu(w.href),R=u.querySelector(Jd(z));if(R){u=R._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(i.count++,i=L_.bind(i),u.then(i,i)),p.state.loading|=4,p.instance=R,Un(R);return}R=u.ownerDocument||u,w=I3(w),(z=Ti.get(z))&&E1(w,z),R=R.createElement("link"),Un(R);var Y=R;Y._p=new Promise(function(ee,fe){Y.onload=ee,Y.onerror=fe}),ns(R,"link",w),p.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(i.count++,p=L_.bind(i),u.addEventListener("load",p),u.addEventListener("error",p))}}var z1=0;function wL(i,u){return i.stylesheets&&i.count===0&&I_(i,i.stylesheets),0z1?50:800)+u);return i.unsuspend=p,function(){i.unsuspend=null,clearTimeout(w),clearTimeout(z)}}:null}function L_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)I_(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var O_=null;function I_(i,u){i.stylesheets=null,i.unsuspend!==null&&(i.count++,O_=new Map,u.forEach(SL,i),O_=null,L_.call(i))}function SL(i,u){if(!(u.state.loading&4)){var p=O_.get(i);if(p)var w=p.get(null);else{p=new Map,O_.set(i,p);for(var z=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),I1.exports=BL(),I1.exports}var HL=$L();const PL={},FL="en",ox=["en","zh-CN","fa"],G9="orx:locale",lx=["localStorage","preferredLanguage","baseLocale"],_6=[],Of=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let p6=!1,N=()=>{var t;let e=lx;!Of&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=W9(window.location.href));const n=UL(e);if(n)return p6||(p6=!0,V9(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function UL(e,n){let t;for(const r of e){if(r==="baseLocale")t=FL;else if(r==="preferredLanguage"&&!Of)t=YL();else if(r==="localStorage"&&!Of)t=localStorage.getItem(G9)??void 0;else if(K9(r)&&W0.has(r)){const a=W0.get(r);if(a){const o=a.getLocale();if(o instanceof Promise)continue;if(o!==void 0)return WL(o)}}const s=If(t);if(s)return s}}const qL=e=>{window.location.reload()};let V9=(e,n)=>{var l;const t={reload:!0,...n};let r;try{r=N()}catch{}const s=[];let a=lx;!Of&&typeof window<"u"&&((l=window.location)!=null&&l.href)&&(a=W9(window.location.href));for(const c of a)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(G9,e);else if(K9(c)&&W0.has(c)){const d=W0.get(c);if(d){let _=d.setLocale(e);_ instanceof Promise&&(_=_.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(_))}}}const o=()=>{!Of&&t.reload&&window.location&&e!==r&&qL()};if(s.length)return Promise.all(s).then(()=>{o()});o()},GL=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function If(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of ox)if(t.toLowerCase()===n)return t}function VL(e){return!!e&&ox.some(n=>n===e)}function WL(e){const n=If(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${ox.join(", ")}`)}function KL(e,n){return e.exec(n.href)}function YL(){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=If(t.fullTag);if(r)return r;const s=If(t.baseTag);if(s)return s}}function XL(e){return ZL(e)}function ZL(e){const n=typeof e=="string"?new URL(e,GL()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&If(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let m6,g6;function QL(e){if(_6.length===0)return;const n=typeof e=="string"?e:e.href;if(m6===n)return g6;const t=new URL(n,"http://example.com"),r=XL(t),s=r.href===t.href?[t]:[t,r];let a;for(const o of s){for(const l of _6){const c=new PL(l.match,o.href);if(KL(c,o)){a=l;break}}if(a)break}return m6=n,g6=a,a}function W9(e){const n=QL(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:lx}const W0=new Map;function K9(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const JL=e=>`Actions for ${e==null?void 0:e.name}`,eO=e=>`${e==null?void 0:e.name} 的操作`,tO=e=>`عملیات ${e==null?void 0:e.name}`,nO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eO(e):t==="fa"?tO(e):JL(e)}),rO=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,sO=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,iO=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,aO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?sO(e):t==="fa"?iO(e):rO(e)}),oO=e=>`Branch: ${e==null?void 0:e.branch}`,lO=e=>`分支:${e==null?void 0:e.branch}`,cO=e=>`شاخه: ${e==null?void 0:e.branch}`,uO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?lO(e):t==="fa"?cO(e):oO(e)}),dO=e=>`Browse code on ${e==null?void 0:e.branch}`,fO=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,hO=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,Y9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fO(e):t==="fa"?hO(e):dO(e)}),_O=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,pO=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,mO=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,gO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pO(e):t==="fa"?mO(e):_O(e)}),vO=e=>`Collapse ${e==null?void 0:e.name}`,bO=e=>`折叠 ${e==null?void 0:e.name}`,xO=e=>`بستن ${e==null?void 0:e.name}`,yO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bO(e):t==="fa"?xO(e):vO(e)}),wO=e=>`Committed changes versus ${e==null?void 0:e.parent}`,SO=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,kO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,CO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SO(e):t==="fa"?kO(e):wO(e)}),EO=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,NO=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,zO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,AO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NO(e):t==="fa"?zO(e):EO(e)}),TO=e=>`Copy ${e==null?void 0:e.value}`,jO=e=>`复制 ${e==null?void 0:e.value}`,MO=e=>`کپی ${e==null?void 0:e.value}`,RO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jO(e):t==="fa"?MO(e):TO(e)}),DO=e=>`Delete ${e==null?void 0:e.name}`,LO=e=>`删除 ${e==null?void 0:e.name}`,OO=e=>`حذف ${e==null?void 0:e.name}`,bb=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?LO(e):t==="fa"?OO(e):DO(e)}),IO=e=>`Download ${e==null?void 0:e.name}`,BO=e=>`下载 ${e==null?void 0:e.name}`,$O=e=>`بارگیری ${e==null?void 0:e.name}`,v6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?BO(e):t==="fa"?$O(e):IO(e)}),HO=e=>`Expand ${e==null?void 0:e.name}`,PO=e=>`展开 ${e==null?void 0:e.name}`,FO=e=>`باز کردن ${e==null?void 0:e.name}`,UO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PO(e):t==="fa"?FO(e):HO(e)}),qO=e=>`Hide additional ${e==null?void 0:e.target}`,GO=e=>`隐藏其余${e==null?void 0:e.target}`,VO=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,WO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GO(e):t==="fa"?VO(e):qO(e)}),KO=e=>`Hide error details for ${e==null?void 0:e.activity}`,YO=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,XO=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,ZO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YO(e):t==="fa"?XO(e):KO(e)}),QO=e=>`${e==null?void 0:e.count} consecutive identical calls`,JO=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,eI=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,tI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JO(e):t==="fa"?eI(e):QO(e)}),nI=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,rI=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,sI=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,iI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rI(e):t==="fa"?sI(e):nI(e)}),aI=e=>`Open ${e==null?void 0:e.branch} on GitHub`,oI=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,lI=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,X9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oI(e):t==="fa"?lI(e):aI(e)}),cI=e=>`Open experiment ${e==null?void 0:e.name}`,uI=e=>`打开实验 ${e==null?void 0:e.name}`,dI=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,fI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?uI(e):t==="fa"?dI(e):cI(e)}),hI=e=>`Open ${e==null?void 0:e.path} in the right pane`,_I=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,pI=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,mI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_I(e):t==="fa"?pI(e):hI(e)}),gI=e=>`Open ${e==null?void 0:e.name}`,vI=e=>`打开 ${e==null?void 0:e.name}`,bI=e=>`باز کردن ${e==null?void 0:e.name}`,xI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vI(e):t==="fa"?bI(e):gI(e)}),yI=e=>`Open logs for run ${e==null?void 0:e.run}`,wI=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,SI=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,kI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wI(e):t==="fa"?SI(e):yI(e)}),CI=e=>`Open ${e==null?void 0:e.name} on GitHub`,EI=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,NI=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,K0=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EI(e):t==="fa"?NI(e):CI(e)}),zI=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,AI=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,TI=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,jI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AI(e):t==="fa"?TI(e):zI(e)}),MI=e=>`Overleaf — ${e==null?void 0:e.status}`,RI=e=>`Overleaf — ${e==null?void 0:e.status}`,DI=e=>`Overleaf — ${e==null?void 0:e.status}`,LI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RI(e):t==="fa"?DI(e):MI(e)}),OI=e=>`Preview /${e==null?void 0:e.name} skill`,II=e=>`预览 /${e==null?void 0:e.name} 技能`,BI=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,$I=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?II(e):t==="fa"?BI(e):OI(e)}),HI=e=>`Remove annotation ${e==null?void 0:e.number}`,PI=e=>`移除批注 ${e==null?void 0:e.number}`,FI=e=>`حذف یادداشت ${e==null?void 0:e.number}`,UI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PI(e):t==="fa"?FI(e):HI(e)}),qI=e=>`Remove ${e==null?void 0:e.name}`,GI=e=>`移除 ${e==null?void 0:e.name}`,VI=e=>`حذف ${e==null?void 0:e.name}`,WI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GI(e):t==="fa"?VI(e):qI(e)}),KI=e=>`Remove queued message: ${e==null?void 0:e.text}`,YI=e=>`移除排队消息:${e==null?void 0:e.text}`,XI=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,ZI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YI(e):t==="fa"?XI(e):KI(e)}),QI=e=>`Retry queued message: ${e==null?void 0:e.text}`,JI=e=>`重试排队消息:${e==null?void 0:e.text}`,eB=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,tB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JI(e):t==="fa"?eB(e):QI(e)}),nB=e=>`Run ${e==null?void 0:e.id}`,rB=e=>`运行 ${e==null?void 0:e.id}`,sB=e=>`اجرای ${e==null?void 0:e.id}`,iB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rB(e):t==="fa"?sB(e):nB(e)}),aB=e=>`Show error details for ${e==null?void 0:e.activity}`,oB=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,lB=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,cB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oB(e):t==="fa"?lB(e):aB(e)}),uB=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,dB=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,fB=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,hB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dB(e):t==="fa"?fB(e):uB(e)}),_B=e=>`${e==null?void 0:e.name} skill`,pB=e=>`${e==null?void 0:e.name} 技能`,mB=e=>`مهارت ${e==null?void 0:e.name}`,gB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pB(e):t==="fa"?mB(e):_B(e)}),vB=e=>`Value for ${e==null?void 0:e.name}`,bB=e=>`${e==null?void 0:e.name} 的值`,xB=e=>`مقدار ${e==null?void 0:e.name}`,yB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bB(e):t==="fa"?xB(e):vB(e)}),wB=()=>"Agent reported back",SB=()=>"智能体已返回结果",kB=()=>"عامل نتیجه را گزارش کرد",CB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SB():t==="fa"?kB():wB()}),EB=()=>"Browse",NB=()=>"浏览",zB=()=>"مرور",AB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NB():t==="fa"?zB():EB()}),TB=()=>"Browsing…",jB=()=>"正在浏览…",MB=()=>"در حال مرور…",RB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jB():t==="fa"?MB():TB()}),DB=()=>"Checked experiment status and updated notes",LB=()=>"已检查实验状态并更新笔记",OB=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",IB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LB():t==="fa"?OB():DB()}),BB=()=>"Closed an agent",$B=()=>"已关闭智能体",HB=()=>"عامل بسته شد",PB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$B():t==="fa"?HB():BB()}),FB=()=>"Compacted context",UB=()=>"上下文已压缩",qB=()=>"زمینه فشرده شد",GB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UB():t==="fa"?qB():FB()}),VB=()=>"Compacting context…",WB=()=>"正在压缩上下文…",KB=()=>"در حال فشرده‌سازی زمینه…",YB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WB():t==="fa"?KB():VB()}),XB=e=>`Created ${e==null?void 0:e.target}`,ZB=e=>`已创建 ${e==null?void 0:e.target}`,QB=e=>`${e==null?void 0:e.target} ایجاد شد`,JB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ZB(e):t==="fa"?QB(e):XB(e)}),e$=()=>"Delegate",t$=()=>"委派",n$=()=>"واگذاری",r$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t$():t==="fa"?n$():e$()}),s$=()=>"Delegating…",i$=()=>"正在委派…",a$=()=>"در حال واگذاری…",o$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i$():t==="fa"?a$():s$()}),l$=e=>`Deleted ${e==null?void 0:e.target}`,c$=e=>`已删除 ${e==null?void 0:e.target}`,u$=e=>`${e==null?void 0:e.target} حذف شد`,d$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?c$(e):t==="fa"?u$(e):l$(e)}),f$=()=>"Edit",h$=()=>"编辑",_$=()=>"ویرایش",p$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h$():t==="fa"?_$():f$()}),m$=e=>`Edited ${e==null?void 0:e.target}`,g$=e=>`已编辑 ${e==null?void 0:e.target}`,v$=e=>`${e==null?void 0:e.target} ویرایش شد`,b$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?g$(e):t==="fa"?v$(e):m$(e)}),x$=()=>"Editing…",y$=()=>"正在编辑…",w$=()=>"در حال ویرایش…",S$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y$():t==="fa"?w$():x$()}),k$=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,C$=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,E$=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,N$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?C$(e):t==="fa"?E$(e):k$(e)}),z$=e=>`Listed files matching ${e==null?void 0:e.pattern}`,A$=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,T$=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,j$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A$(e):t==="fa"?T$(e):z$(e)}),M$=()=>"Load",R$=()=>"加载",D$=()=>"بارگیری",L$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R$():t==="fa"?D$():M$()}),O$=()=>"Loaded a skill",I$=()=>"已加载技能",B$=()=>"یک مهارت بارگیری شد",$$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I$():t==="fa"?B$():O$()}),H$=e=>`Loaded ${e==null?void 0:e.name} skill`,P$=e=>`已加载技能 ${e==null?void 0:e.name}`,F$=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,U$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?P$(e):t==="fa"?F$(e):H$(e)}),q$=()=>"Loading…",G$=()=>"正在加载…",V$=()=>"در حال بارگیری…",W$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G$():t==="fa"?V$():q$()}),K$=e=>`Opened ${e==null?void 0:e.target}`,Y$=e=>`已打开 ${e==null?void 0:e.target}`,X$=e=>`${e==null?void 0:e.target} باز شد`,Z$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Y$(e):t==="fa"?X$(e):K$(e)}),Q$=e=>`Ran ${e==null?void 0:e.command}`,J$=e=>`已运行 ${e==null?void 0:e.command}`,eH=e=>`${e==null?void 0:e.command} اجرا شد`,tH=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?J$(e):t==="fa"?eH(e):Q$(e)}),nH=()=>"Ran a sub-agent",rH=()=>"已运行子智能体",sH=()=>"یک عامل فرعی اجرا شد",iH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rH():t==="fa"?sH():nH()}),aH=()=>"Read",oH=()=>"读取",lH=()=>"خواندن",cH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oH():t==="fa"?lH():aH()}),uH=()=>"Read experiment notes",dH=()=>"已读取实验笔记",fH=()=>"یادداشت‌های آزمایش خوانده شد",hH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dH():t==="fa"?fH():uH()}),_H=()=>"Read a paper",pH=()=>"已读取论文",mH=()=>"یک مقاله خوانده شد",gH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pH():t==="fa"?mH():_H()}),vH=e=>`Read ${e==null?void 0:e.name} skill`,bH=e=>`已读取技能 ${e==null?void 0:e.name}`,xH=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,P1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bH(e):t==="fa"?xH(e):vH(e)}),yH=e=>`Read ${e==null?void 0:e.target}`,wH=e=>`已读取 ${e==null?void 0:e.target}`,SH=e=>`${e==null?void 0:e.target} خوانده شد`,lf=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wH(e):t==="fa"?SH(e):yH(e)}),kH=()=>"Read a web page",CH=()=>"已读取网页",EH=()=>"یک صفحهٔ وب خوانده شد",NH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CH():t==="fa"?EH():kH()}),zH=()=>"Reading…",AH=()=>"正在读取…",TH=()=>"در حال خواندن…",jH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AH():t==="fa"?TH():zH()}),MH=()=>"Resumed an agent",RH=()=>"已恢复智能体",DH=()=>"عامل از سر گرفته شد",LH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RH():t==="fa"?DH():MH()}),OH=()=>"Review",IH=()=>"查看",BH=()=>"بازبینی",$H=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IH():t==="fa"?BH():OH()}),HH=()=>"Reviewed run log",PH=()=>"已查看运行日志",FH=()=>"گزارش اجرا بازبینی شد",UH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PH():t==="fa"?FH():HH()}),qH=()=>"Reviewed run logs",GH=()=>"已查看运行日志",VH=()=>"گزارش‌های اجرا بازبینی شد",WH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GH():t==="fa"?VH():qH()}),KH=()=>"Reviewed experiment status and notes",YH=()=>"已查看实验状态和笔记",XH=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",ZH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YH():t==="fa"?XH():KH()}),QH=()=>"Reviewing…",JH=()=>"正在查看…",eP=()=>"در حال بازبینی…",tP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JH():t==="fa"?eP():QH()}),nP=()=>"Run",rP=()=>"运行",sP=()=>"اجرا",iP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rP():t==="fa"?sP():nP()}),aP=()=>"Running…",oP=()=>"正在运行…",lP=()=>"در حال اجرا…",cP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oP():t==="fa"?lP():aP()}),uP=()=>"Search",dP=()=>"搜索",fP=()=>"جست‌وجو",hP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dP():t==="fa"?fP():uP()}),_P=()=>"Searched alphaXiv full text",pP=()=>"已搜索 alphaXiv 全文",mP=()=>"متن کامل alphaXiv جست‌وجو شد",gP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pP():t==="fa"?mP():_P()}),vP=()=>"Searched alphaXiv semantically",bP=()=>"已对 alphaXiv 进行语义搜索",xP=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",yP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bP():t==="fa"?xP():vP()}),wP=()=>"Searched bioRxiv",SP=()=>"已搜索 bioRxiv",kP=()=>"bioRxiv جست‌وجو شد",CP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SP():t==="fa"?kP():wP()}),EP=()=>"Searched code",NP=()=>"已搜索代码",zP=()=>"کد جست‌وجو شد",F1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NP():t==="fa"?zP():EP()}),AP=e=>`Searched code for “${e==null?void 0:e.pattern}”`,TP=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,jP=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,U1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TP(e):t==="fa"?jP(e):AP(e)}),MP=e=>`Searched images for “${e==null?void 0:e.query}”`,RP=e=>`已搜索图片“${e==null?void 0:e.query}”`,DP=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,LP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RP(e):t==="fa"?DP(e):MP(e)}),OP=()=>"Searched the literature",IP=()=>"已搜索文献",BP=()=>"منابع علمی جست‌وجو شد",b6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IP():t==="fa"?BP():OP()}),$P=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,HP=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,PP=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,FP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?HP(e):t==="fa"?PP(e):$P(e)}),UP=()=>"Searched OpenAlex",qP=()=>"已搜索 OpenAlex",GP=()=>"OpenAlex جست‌وجو شد",VP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qP():t==="fa"?GP():UP()}),WP=e=>`Searched the web for “${e==null?void 0:e.query}”`,KP=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,YP=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,x6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?KP(e):t==="fa"?YP(e):WP(e)}),XP=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,ZP=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,QP=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,JP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ZP(e):t==="fa"?QP(e):XP(e)}),eF=()=>"Searching…",tF=()=>"正在搜索…",nF=()=>"در حال جست‌وجو…",rF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tF():t==="fa"?nF():eF()}),sF=()=>"Sent input to an agent",iF=()=>"已向智能体发送输入",aF=()=>"ورودی به عامل فرستاده شد",oF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iF():t==="fa"?aF():sF()}),lF=()=>"Spawned an agent",cF=()=>"已创建智能体",uF=()=>"یک عامل ساخته شد",dF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cF():t==="fa"?uF():lF()}),fF=()=>"Sub-agent",hF=()=>"子智能体",_F=()=>"عامل فرعی",pF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hF():t==="fa"?_F():fF()}),mF=()=>"Sub-agent interrupted",gF=()=>"子智能体已中断",vF=()=>"عامل فرعی متوقف شد",bF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gF():t==="fa"?vF():mF()}),xF=()=>"Sub-agent started",yF=()=>"子智能体已启动",wF=()=>"عامل فرعی آغاز شد",SF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yF():t==="fa"?wF():xF()}),kF=()=>"Update tasks",CF=()=>"更新任务",EF=()=>"به‌روزرسانی کارها",NF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CF():t==="fa"?EF():kF()}),zF=()=>"Updated experiment notes",AF=()=>"已更新实验笔记",TF=()=>"یادداشت‌های آزمایش به‌روز شد",jF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AF():t==="fa"?TF():zF()}),MF=e=>`Updated tasks (${e==null?void 0:e.done} of ${e==null?void 0:e.total} done)`,RF=e=>`已更新任务(已完成 ${e==null?void 0:e.done}/${e==null?void 0:e.total})`,DF=e=>`کارها به‌روز شد (${e==null?void 0:e.done} از ${e==null?void 0:e.total} انجام شد)`,LF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RF(e):t==="fa"?DF(e):MF(e)}),OF=()=>"Updating tasks",IF=()=>"正在更新任务",BF=()=>"در حال به‌روزرسانی کارها",Z9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IF():t==="fa"?BF():OF()}),$F=()=>"Waiting on an agent",HF=()=>"正在等待智能体",PF=()=>"در انتظار عامل",FF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HF():t==="fa"?PF():$F()}),UF=e=>`Approval required: ${e==null?void 0:e.label}`,qF=e=>`需要批准:${e==null?void 0:e.label}`,GF=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,y6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qF(e):t==="fa"?GF(e):UF(e)}),VF=()=>"The CLI is retrying the turn.",WF=()=>"CLI 正在重试本轮。",KF=()=>"CLI در حال تلاش دوباره برای این نوبت است.",YF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WF():t==="fa"?KF():VF()}),XF=()=>"Continue is available.",ZF=()=>"可以继续。",QF=()=>"ادامه در دسترس است.",JF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZF():t==="fa"?QF():XF()}),eU=()=>"Retry is available.",tU=()=>"可以重试。",nU=()=>"تلاش دوباره در دسترس است.",rU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tU():t==="fa"?nU():eU()}),sU=()=>"Running a tool",iU=()=>"正在运行工具",aU=()=>"در حال اجرای ابزار",oU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iU():t==="fa"?aU():sU()}),lU=()=>"Tool activity completed",cU=()=>"工具活动已完成",uU=()=>"فعالیت ابزار کامل شد",dU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cU():t==="fa"?uU():lU()}),fU=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,hU=e=>`工具活动失败:${e==null?void 0:e.labels}`,_U=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,pU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hU(e):t==="fa"?_U(e):fU(e)}),mU=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,gU=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,vU=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,bU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?gU(e):t==="fa"?vU(e):mU(e)}),xU=()=>"Turn did not finish.",yU=()=>"本轮未完成。",wU=()=>"این نوبت کامل نشد.",SU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yU():t==="fa"?wU():xU()}),kU=()=>"Artifacts",CU=()=>"产物",EU=()=>"خروجی‌ها",NU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CU():t==="fa"?EU():kU()}),zU=()=>"Close panel",AU=()=>"关闭面板",TU=()=>"بستن پنل",w6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AU():t==="fa"?TU():zU()}),jU=()=>"Current task",MU=()=>"当前任务",RU=()=>"وظیفهٔ فعلی",S6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MU():t==="fa"?RU():jU()}),DU=()=>"Drag to resize panel",LU=()=>"拖动以调整面板大小",OU=()=>"برای تغییر اندازهٔ پنل بکشید",IU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LU():t==="fa"?OU():DU()}),BU=()=>"Drag toward the center to restore panel",$U=()=>"向中央拖动以恢复面板",HU=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",PU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$U():t==="fa"?HU():BU()}),FU=()=>"Entire project",UU=()=>"整个项目",qU=()=>"کل پروژه",k6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UU():t==="fa"?qU():FU()}),GU=()=>"Expand panel",VU=()=>"展开面板",WU=()=>"گسترش پنل",C6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VU():t==="fa"?WU():GU()}),KU=e=>`Experiment filter: ${e==null?void 0:e.scope}`,YU=e=>`实验筛选:${e==null?void 0:e.scope}`,XU=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,ZU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YU(e):t==="fa"?XU(e):KU(e)}),QU=()=>"Experiment view",JU=()=>"实验视图",eq=()=>"نمای آزمایش",tq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JU():t==="fa"?eq():QU()}),nq=()=>"Experiments",rq=()=>"实验",sq=()=>"آزمایش‌ها",iq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rq():t==="fa"?sq():nq()}),aq=()=>"Files",oq=()=>"文件",lq=()=>"فایل‌ها",cq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oq():t==="fa"?lq():aq()}),uq=()=>"Filter experiments",dq=()=>"筛选实验",fq=()=>"فیلتر آزمایش‌ها",hq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dq():t==="fa"?fq():uq()}),_q=()=>"Current task filtering is unavailable for unattributed experiments",pq=()=>"存在无法归属的实验时,不能按当前任务筛选",mq=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",gq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pq():t==="fa"?mq():_q()}),vq=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",bq=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",xq=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",yq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bq():t==="fa"?xq():vq()}),wq=()=>"Open a task to filter to its experiments",Sq=()=>"请打开一个任务以筛选其实验",kq=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Cq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sq():t==="fa"?kq():wq()}),Eq=()=>"projects",Nq=()=>"项目",zq=()=>"پروژه‌ها",Aq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nq():t==="fa"?zq():Eq()}),Tq=()=>"Restore panel",jq=()=>"还原面板",Mq=()=>"بازگرداندن اندازهٔ پنل",E6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jq():t==="fa"?Mq():Tq()}),Rq=()=>"Retry",Dq=()=>"重试",Lq=()=>"تلاش دوباره",Gu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dq():t==="fa"?Lq():Rq()}),Oq=()=>"Select a project to browse its files.",Iq=()=>"选择一个项目以浏览其文件。",Bq=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",$q=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iq():t==="fa"?Bq():Oq()}),Hq=()=>"settings",Pq=()=>"设置",Fq=()=>"تنظیمات",Uq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pq():t==="fa"?Fq():Hq()}),qq=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,Gq=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,Vq=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,Wq=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Gq(e):t==="fa"?Vq(e):qq(e)}),Kq=()=>"Sub-agent",Yq=()=>"子智能体",Xq=()=>"عامل فرعی",Zq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yq():t==="fa"?Xq():Kq()}),Qq=()=>"Table",Jq=()=>"表格",eG=()=>"جدول",tG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jq():t==="fa"?eG():Qq()}),nG=()=>"Tree",rG=()=>"树状图",sG=()=>"درخت",iG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rG():t==="fa"?sG():nG()}),aG=e=>`Collapse ${e==null?void 0:e.name}`,oG=e=>`折叠 ${e==null?void 0:e.name}`,lG=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,cG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oG(e):t==="fa"?lG(e):aG(e)}),uG=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,dG=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,fG=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Q9=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dG(e):t==="fa"?fG(e):uG(e)}),hG=e=>`Delete folder ${e==null?void 0:e.name}`,_G=e=>`删除文件夹 ${e==null?void 0:e.name}`,pG=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,mG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_G(e):t==="fa"?pG(e):hG(e)}),gG=e=>`Expand ${e==null?void 0:e.name}`,vG=e=>`展开 ${e==null?void 0:e.name}`,bG=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,xG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vG(e):t==="fa"?bG(e):gG(e)}),yG=()=>"Binary or unsupported file — no inline preview.",wG=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",SG=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",kG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wG():t==="fa"?SG():yG()}),CG=()=>"Copy path",EG=()=>"复制路径",NG=()=>"کپی مسیر",zG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EG():t==="fa"?NG():CG()}),AG=()=>"Artifact not found",TG=()=>"找不到产物",jG=()=>"خروجی پیدا نشد",MG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TG():t==="fa"?jG():AG()}),RG=()=>"Open raw",DG=()=>"打开原始文件",LG=()=>"باز کردن فایل خام",OG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DG():t==="fa"?LG():RG()}),IG=()=>"Click an artifact to view it",BG=()=>"点击产物即可查看",$G=()=>"برای مشاهده، یک خروجی را انتخاب کنید",HG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BG():t==="fa"?$G():IG()}),PG=()=>"Copy artifacts directory path",FG=()=>"复制产物目录路径",UG=()=>"کپی مسیر پوشهٔ خروجی‌ها",qG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FG():t==="fa"?UG():PG()}),GG=()=>"Delete artifact",VG=()=>"删除产物",WG=()=>"حذف خروجی",N6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VG():t==="fa"?WG():GG()}),KG=()=>"Delete folder",YG=()=>"删除文件夹",XG=()=>"حذف پوشه",ZG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YG():t==="fa"?XG():KG()}),QG=()=>"Failed to load:",JG=()=>"加载失败:",eV=()=>"بارگیری ناموفق بود:",tV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JG():t==="fa"?eV():QG()}),nV=()=>"File truncated — showing the first 512 KB.",rV=()=>"文件已截断——仅显示前 512 KB。",sV=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",iV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rV():t==="fa"?sV():nV()}),aV=()=>"Listing truncated — the folder has more artifacts.",oV=()=>"列表已截断——文件夹中还有更多产物。",lV=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",cV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oV():t==="fa"?lV():aV()}),uV=()=>"Loading…",dV=()=>"正在加载…",fV=()=>"در حال بارگیری…",hV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dV():t==="fa"?fV():uV()}),_V=()=>"Loading artifacts…",pV=()=>"正在加载产物…",mV=()=>"در حال بارگیری خروجی‌ها…",gV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pV():t==="fa"?mV():_V()}),vV=()=>"Modified",bV=()=>"修改时间",xV=()=>"ویرایش‌شده",yV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bV():t==="fa"?xV():vV()}),wV=()=>"No artifacts yet",SV=()=>"尚无产物",kV=()=>"هنوز خروجی‌ای وجود ندارد",CV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SV():t==="fa"?kV():wV()}),EV=()=>"Open raw in new tab",NV=()=>"在新标签页中打开原始文件",zV=()=>"باز کردن فایل خام در زبانهٔ جدید",z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NV():t==="fa"?zV():EV()}),AV=()=>"Storage settings",TV=()=>"存储设置",jV=()=>"تنظیمات ذخیره‌سازی",A6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TV():t==="fa"?jV():AV()}),MV=()=>"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:",RV=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",DV=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",LV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RV():t==="fa"?DV():MV()}),OV=()=>"File too large to preview inline.",IV=()=>"文件太大,无法内嵌预览。",BV=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",$V=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IV():t==="fa"?BV():OV()}),HV=()=>"This is the baseline branch, so there is no parent comparison.",PV=()=>"这是基线分支,因此没有父分支可供比较。",FV=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",UV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PV():t==="fa"?FV():HV()}),qV=()=>"Failed to load changes:",GV=()=>"加载更改失败:",VV=()=>"بارگیری تغییرات ناموفق بود:",WV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GV():t==="fa"?VV():qV()}),KV=()=>"Loading changes…",YV=()=>"正在加载更改…",XV=()=>"در حال بارگیری تغییرات…",ZV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YV():t==="fa"?XV():KV()}),QV=()=>"No committed changes from the parent branch.",JV=()=>"与父分支相比没有已提交的更改。",eW=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",tW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JV():t==="fa"?eW():QV()}),nW=e=>`agent ${e==null?void 0:e.number}`,rW=e=>`智能体 ${e==null?void 0:e.number}`,sW=e=>`عامل ${e==null?void 0:e.number}`,T6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rW(e):t==="fa"?sW(e):nW(e)}),iW=()=>"agent sessions",aW=()=>"智能体会话",oW=()=>"نشست‌های عامل‌ها",lW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aW():t==="fa"?oW():iW()}),cW=()=>"All sessions",uW=()=>"所有会话",dW=()=>"همهٔ نشست‌ها",fW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uW():t==="fa"?dW():cW()}),hW=e=>`${e==null?void 0:e.count} annotations`,_W=e=>`${e==null?void 0:e.count} 条批注`,pW=e=>`${e==null?void 0:e.count} یادداشت`,mW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_W(e):t==="fa"?pW(e):hW(e)}),gW=()=>"Archive",vW=()=>"归档",bW=()=>"بایگانی",xW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vW():t==="fa"?bW():gW()}),yW=()=>"Ask the research agent… (/ for commands and skills)",wW=()=>"询问研究智能体…(输入 / 使用命令和技能)",SW=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها)",kW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wW():t==="fa"?SW():yW()}),CW=()=>"Asked about selected text",EW=()=>"已询问所选文本",NW=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",zW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EW():t==="fa"?NW():CW()}),AW=()=>"Attachment",TW=()=>"附件",jW=()=>"پیوست",MW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TW():t==="fa"?jW():AW()}),RW=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,DW=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,LW=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,OW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?DW(e):t==="fa"?LW(e):RW(e)}),IW=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",BW=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",$W=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",HW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BW():t==="fa"?$W():IW()}),PW=()=>"Collapse tool activity",FW=()=>"折叠工具活动",UW=()=>"بستن فعالیت ابزارها",qW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FW():t==="fa"?UW():PW()}),GW=()=>"Continue",VW=()=>"继续",WW=()=>"ادامه",KW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VW():t==="fa"?WW():GW()}),YW=e=>`Delete “${e==null?void 0:e.title}”? +`+w.stack}}var Be=Object.prototype.hasOwnProperty,wt=e.unstable_scheduleCallback,zt=e.unstable_cancelCallback,vt=e.unstable_shouldYield,Lt=e.unstable_requestPaint,St=e.unstable_now,kt=e.unstable_getCurrentPriorityLevel,xe=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,We=e.unstable_NormalPriority,st=e.unstable_LowPriority,nt=e.unstable_IdlePriority,Ht=e.log,bt=e.unstable_setDisableYieldValue,nn=null,Wt=null;function pn(i){if(typeof Ht=="function"&&bt(i),Wt&&typeof Wt.setStrictMode=="function")try{Wt.setStrictMode(nn,i)}catch{}}var Dt=Math.clz32?Math.clz32:br,Nn=Math.log,Ut=Math.LN2;function br(i){return i>>>=0,i===0?32:31-(Nn(i)/Ut|0)|0}var mn=256,Xe=262144,xt=4194304;function Vn(i){var u=i&42;if(u!==0)return u;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Wn(i,u,p){var w=i.pendingLanes;if(w===0)return 0;var z=0,R=i.suspendedLanes,K=i.pingedLanes;i=i.warmLanes;var te=w&134217727;return te!==0?(w=te&~R,w!==0?z=Vn(w):(K&=te,K!==0?z=Vn(K):p||(p=te&~i,p!==0&&(z=Vn(p))))):(te=w&~R,te!==0?z=Vn(te):K!==0?z=Vn(K):p||(p=w&~i,p!==0&&(z=Vn(p)))),z===0?0:u!==0&&u!==z&&(u&R)===0&&(R=z&-z,p=u&-u,R>=p||R===32&&(p&4194048)!==0)?u:z}function Et(i,u){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&u)===0}function rt(i,u){switch(i){case 1:case 2:case 4:case 8:case 64:return u+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 u+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 Ie(){var i=xt;return xt<<=1,(xt&62914560)===0&&(xt=4194304),i}function it(i){for(var u=[],p=0;31>p;p++)u.push(i);return u}function qt(i,u){i.pendingLanes|=u,u!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function en(i,u,p,w,z,R){var K=i.pendingLanes;i.pendingLanes=p,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=p,i.entangledLanes&=p,i.errorRecoveryDisabledLanes&=p,i.shellSuspendCounter=0;var te=i.entanglements,fe=i.expirationTimes,we=i.hiddenUpdates;for(p=K&~p;0"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Js=/[\n"\\]/g;function Kn(i){return i.replace(Js,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function $i(i,u,p,w,z,R,K,te){i.name="",K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"?i.type=K:i.removeAttribute("type"),u!=null?K==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+lr(u)):i.value!==""+lr(u)&&(i.value=""+lr(u)):K!=="submit"&&K!=="reset"||i.removeAttribute("value"),u!=null?bn(i,K,lr(u)):p!=null?bn(i,K,lr(p)):w!=null&&i.removeAttribute("value"),z==null&&R!=null&&(i.defaultChecked=!!R),z!=null&&(i.checked=z&&typeof z!="function"&&typeof z!="symbol"),te!=null&&typeof te!="function"&&typeof te!="symbol"&&typeof te!="boolean"?i.name=""+lr(te):i.removeAttribute("name")}function jn(i,u,p,w,z,R,K,te){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(i.type=R),u!=null||p!=null){if(!(R!=="submit"&&R!=="reset"||u!=null)){Ba(i);return}p=p!=null?""+lr(p):"",u=u!=null?""+lr(u):p,te||u===i.value||(i.value=u),i.defaultValue=u}w=w??z,w=typeof w!="function"&&typeof w!="symbol"&&!!w,i.checked=te?i.checked:!!w,i.defaultChecked=!!w,K!=null&&typeof K!="function"&&typeof K!="symbol"&&typeof K!="boolean"&&(i.name=K),Ba(i)}function bn(i,u,p){u==="number"&&ls(i.ownerDocument)===i||i.defaultValue===""+p||(i.defaultValue=""+p)}function ei(i,u,p,w){if(i=i.options,u){u={};for(var z=0;z"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ia=!1;if(kr)try{var aa={};Object.defineProperty(aa,"passive",{get:function(){ia=!0}}),window.addEventListener("test",aa,aa),window.removeEventListener("test",aa,aa)}catch{ia=!1}var Os=null,Ga=null,Cr=null;function ur(){if(Cr)return Cr;var i,u=Ga,p=u.length,w,z="value"in Os?Os.value:Os.textContent,R=z.length;for(i=0;i=Ke),Bs=" ",wi=!1;function la(i,u){switch(i){case"keyup":return ze.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Il(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Io=!1;function Vh(i,u){switch(i){case"compositionend":return Il(u);case"keypress":return u.which!==32?null:(wi=!0,Bs);case"textInput":return i=u.data,i===Bs&&wi?null:i;default:return null}}function Wh(i,u){if(Io)return i==="compositionend"||!Ae&&la(i,u)?(i=ur(),Cr=Ga=Os=null,Io=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:p,offset:u-i};i=w}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=W4(p)}}function Y4(i,u){return i&&u?i===u?!0:i&&i.nodeType===3?!1:u&&u.nodeType===3?Y4(i,u.parentNode):"contains"in i?i.contains(u):i.compareDocumentPosition?!!(i.compareDocumentPosition(u)&16):!1:!1}function X4(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var u=ls(i.document);u instanceof i.HTMLIFrameElement;){try{var p=typeof u.contentWindow.location.href=="string"}catch{p=!1}if(p)i=u.contentWindow;else break;u=ls(i.document)}return u}function Km(i){var u=i&&i.nodeName&&i.nodeName.toLowerCase();return u&&(u==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||u==="textarea"||i.contentEditable==="true")}var SD=kr&&"documentMode"in document&&11>=document.documentMode,qc=null,Ym=null,Ed=null,Xm=!1;function Z4(i,u,p){var w=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Xm||qc==null||qc!==ls(w)||(w=qc,"selectionStart"in w&&Km(w)?w={start:w.selectionStart,end:w.selectionEnd}:(w=(w.ownerDocument&&w.ownerDocument.defaultView||window).getSelection(),w={anchorNode:w.anchorNode,anchorOffset:w.anchorOffset,focusNode:w.focusNode,focusOffset:w.focusOffset}),Ed&&Cd(Ed,w)||(Ed=w,w=O_(Ym,"onSelect"),0>=K,z-=K,ua=1<<32-Dt(u)+z|p<Kt?(un=dt,dt=null):un=dt.sibling;var vn=Se(ve,dt,ye[Kt],Re);if(vn===null){dt===null&&(dt=un);break}i&&dt&&vn.alternate===null&&u(ve,dt),_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn,dt=un}if(Kt===ye.length)return p(ve,dt),fn&&Ya(ve,Kt),yt;if(dt===null){for(;KtKt?(un=dt,dt=null):un=dt.sibling;var al=Se(ve,dt,vn.value,Re);if(al===null){dt===null&&(dt=un);break}i&&dt&&al.alternate===null&&u(ve,dt),_e=R(al,_e,Kt),gn===null?yt=al:gn.sibling=al,gn=al,dt=un}if(vn.done)return p(ve,dt),fn&&Ya(ve,Kt),yt;if(dt===null){for(;!vn.done;Kt++,vn=ye.next())vn=Oe(ve,vn.value,Re),vn!==null&&(_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn);return fn&&Ya(ve,Kt),yt}for(dt=w(dt);!vn.done;Kt++,vn=ye.next())vn=Ne(dt,ve,Kt,vn.value,Re),vn!==null&&(i&&vn.alternate!==null&&dt.delete(vn.key===null?Kt:vn.key),_e=R(vn,_e,Kt),gn===null?yt=vn:gn.sibling=vn,gn=vn);return i&&dt.forEach(function(UL){return u(ve,UL)}),fn&&Ya(ve,Kt),yt}function Ln(ve,_e,ye,Re){if(typeof ye=="object"&&ye!==null&&ye.type===k&&ye.key===null&&(ye=ye.props.children),typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case g:e:{for(var yt=ye.key;_e!==null;){if(_e.key===yt){if(yt=ye.type,yt===k){if(_e.tag===7){p(ve,_e.sibling),Re=z(_e,ye.props.children),Re.return=ve,ve=Re;break e}}else if(_e.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===T&&Vl(yt)===_e.type){p(ve,_e.sibling),Re=z(_e,ye.props),Md(Re,ye),Re.return=ve,ve=Re;break e}p(ve,_e);break}else u(ve,_e);_e=_e.sibling}ye.type===k?(Re=Pl(ye.props.children,ve.mode,Re,ye.key),Re.return=ve,ve=Re):(Re=Jh(ye.type,ye.key,ye.props,null,ve.mode,Re),Md(Re,ye),Re.return=ve,ve=Re)}return K(ve);case S:e:{for(yt=ye.key;_e!==null;){if(_e.key===yt)if(_e.tag===4&&_e.stateNode.containerInfo===ye.containerInfo&&_e.stateNode.implementation===ye.implementation){p(ve,_e.sibling),Re=z(_e,ye.children||[]),Re.return=ve,ve=Re;break e}else{p(ve,_e);break}else u(ve,_e);_e=_e.sibling}Re=rg(ye,ve.mode,Re),Re.return=ve,ve=Re}return K(ve);case T:return ye=Vl(ye),Ln(ve,_e,ye,Re)}if(X(ye))return ut(ve,_e,ye,Re);if(B(ye)){if(yt=B(ye),typeof yt!="function")throw Error(r(150));return ye=yt.call(ye),Nt(ve,_e,ye,Re)}if(typeof ye.then=="function")return Ln(ve,_e,a_(ye),Re);if(ye.$$typeof===y)return Ln(ve,_e,n_(ve,ye),Re);o_(ve,ye)}return typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint"?(ye=""+ye,_e!==null&&_e.tag===6?(p(ve,_e.sibling),Re=z(_e,ye),Re.return=ve,ve=Re):(p(ve,_e),Re=ng(ye,ve.mode,Re),Re.return=ve,ve=Re),K(ve)):p(ve,_e)}return function(ve,_e,ye,Re){try{jd=0;var yt=Ln(ve,_e,ye,Re);return tu=null,yt}catch(dt){if(dt===eu||dt===s_)throw dt;var gn=ti(29,dt,null,ve.mode);return gn.lanes=Re,gn.return=ve,gn}finally{}}}var Kl=xw(!0),yw=xw(!1),Uo=!1;function pg(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mg(i,u){i=i.updateQueue,u.updateQueue===i&&(u.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qo(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Go(i,u,p){var w=i.updateQueue;if(w===null)return null;if(w=w.shared,(yn&2)!==0){var z=w.pending;return z===null?u.next=u:(u.next=z.next,z.next=u),w.pending=u,u=Qh(i),sw(i,null,p),u}return Zh(i,w,u,p),Qh(i)}function Rd(i,u,p){if(u=u.updateQueue,u!==null&&(u=u.shared,(p&4194048)!==0)){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,On(i,p)}}function gg(i,u){var p=i.updateQueue,w=i.alternate;if(w!==null&&(w=w.updateQueue,p===w)){var z=null,R=null;if(p=p.firstBaseUpdate,p!==null){do{var K={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};R===null?z=R=K:R=R.next=K,p=p.next}while(p!==null);R===null?z=R=u:R=R.next=u}else z=R=u;p={baseState:w.baseState,firstBaseUpdate:z,lastBaseUpdate:R,shared:w.shared,callbacks:w.callbacks},i.updateQueue=p;return}i=p.lastBaseUpdate,i===null?p.firstBaseUpdate=u:i.next=u,p.lastBaseUpdate=u}var vg=!1;function Dd(){if(vg){var i=Jc;if(i!==null)throw i}}function Ld(i,u,p,w){vg=!1;var z=i.updateQueue;Uo=!1;var R=z.firstBaseUpdate,K=z.lastBaseUpdate,te=z.shared.pending;if(te!==null){z.shared.pending=null;var fe=te,we=fe.next;fe.next=null,K===null?R=we:K.next=we,K=fe;var Me=i.alternate;Me!==null&&(Me=Me.updateQueue,te=Me.lastBaseUpdate,te!==K&&(te===null?Me.firstBaseUpdate=we:te.next=we,Me.lastBaseUpdate=fe))}if(R!==null){var Oe=z.baseState;K=0,Me=we=fe=null,te=R;do{var Se=te.lane&-536870913,Ne=Se!==te.lane;if(Ne?(cn&Se)===Se:(w&Se)===Se){Se!==0&&Se===Qc&&(vg=!0),Me!==null&&(Me=Me.next={lane:0,tag:te.tag,payload:te.payload,callback:null,next:null});e:{var ut=i,Nt=te;Se=u;var Ln=p;switch(Nt.tag){case 1:if(ut=Nt.payload,typeof ut=="function"){Oe=ut.call(Ln,Oe,Se);break e}Oe=ut;break e;case 3:ut.flags=ut.flags&-65537|128;case 0:if(ut=Nt.payload,Se=typeof ut=="function"?ut.call(Ln,Oe,Se):ut,Se==null)break e;Oe=f({},Oe,Se);break e;case 2:Uo=!0}}Se=te.callback,Se!==null&&(i.flags|=64,Ne&&(i.flags|=8192),Ne=z.callbacks,Ne===null?z.callbacks=[Se]:Ne.push(Se))}else Ne={lane:Se,tag:te.tag,payload:te.payload,callback:te.callback,next:null},Me===null?(we=Me=Ne,fe=Oe):Me=Me.next=Ne,K|=Se;if(te=te.next,te===null){if(te=z.shared.pending,te===null)break;Ne=te,te=Ne.next,Ne.next=null,z.lastBaseUpdate=Ne,z.shared.pending=null}}while(!0);Me===null&&(fe=Oe),z.baseState=fe,z.firstBaseUpdate=we,z.lastBaseUpdate=Me,R===null&&(z.shared.lanes=0),Xo|=K,i.lanes=K,i.memoizedState=Oe}}function ww(i,u){if(typeof i!="function")throw Error(r(191,i));i.call(u)}function Sw(i,u){var p=i.callbacks;if(p!==null)for(i.callbacks=null,i=0;iR?R:8;var K=W.T,te={};W.T=te,Ig(i,!1,u,p);try{var fe=z(),we=W.S;if(we!==null&&we(te,fe),fe!==null&&typeof fe=="object"&&typeof fe.then=="function"){var Me=MD(fe,w);Bd(i,u,Me,ai(i))}else Bd(i,u,w,ai(i))}catch(Oe){Bd(i,u,{then:function(){},status:"rejected",reason:Oe},ai())}finally{Z.p=R,K!==null&&te.types!==null&&(K.types=te.types),W.T=K}}function BD(){}function Lg(i,u,p,w){if(i.tag!==5)throw Error(r(476));var z=t5(i).queue;e5(i,z,u,J,p===null?BD:function(){return n5(i),p(w)})}function t5(i){var u=i.memoizedState;if(u!==null)return u;u={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:J},next:null};var p={};return u.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ja,lastRenderedState:p},next:null},i.memoizedState=u,i=i.alternate,i!==null&&(i.memoizedState=u),u}function n5(i){var u=t5(i);u.next===null&&(u=i.alternate.memoizedState),Bd(i,u.next.queue,{},ai())}function Og(){return es(tf)}function r5(){return mr().memoizedState}function s5(){return mr().memoizedState}function $D(i){for(var u=i.return;u!==null;){switch(u.tag){case 24:case 3:var p=ai();i=qo(p);var w=Go(u,i,p);w!==null&&(Us(w,u,p),Rd(w,u,p)),u={cache:dg()},i.payload=u;return}u=u.return}}function HD(i,u,p){var w=ai();p={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},g_(i)?a5(u,p):(p=eg(i,u,p,w),p!==null&&(Us(p,i,w),o5(p,u,w)))}function i5(i,u,p){var w=ai();Bd(i,u,p,w)}function Bd(i,u,p,w){var z={lane:w,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(g_(i))a5(u,z);else{var R=i.alternate;if(i.lanes===0&&(R===null||R.lanes===0)&&(R=u.lastRenderedReducer,R!==null))try{var K=u.lastRenderedState,te=R(K,p);if(z.hasEagerState=!0,z.eagerState=te,Ss(te,K))return Zh(i,u,z,0),In===null&&Xh(),!1}catch{}finally{}if(p=eg(i,u,z,w),p!==null)return Us(p,i,w),o5(p,u,w),!0}return!1}function Ig(i,u,p,w){if(w={lane:2,revertLane:p1(),gesture:null,action:w,hasEagerState:!1,eagerState:null,next:null},g_(i)){if(u)throw Error(r(479))}else u=eg(i,p,w,2),u!==null&&Us(u,i,2)}function g_(i){var u=i.alternate;return i===Gt||u!==null&&u===Gt}function a5(i,u){ru=u_=!0;var p=i.pending;p===null?u.next=u:(u.next=p.next,p.next=u),i.pending=u}function o5(i,u,p){if((p&4194048)!==0){var w=u.lanes;w&=i.pendingLanes,p|=w,u.lanes=p,On(i,p)}}var $d={readContext:es,use:h_,useCallback:dr,useContext:dr,useEffect:dr,useImperativeHandle:dr,useLayoutEffect:dr,useInsertionEffect:dr,useMemo:dr,useReducer:dr,useRef:dr,useState:dr,useDebugValue:dr,useDeferredValue:dr,useTransition:dr,useSyncExternalStore:dr,useId:dr,useHostTransitionStatus:dr,useFormState:dr,useActionState:dr,useOptimistic:dr,useMemoCache:dr,useCacheRefresh:dr};$d.useEffectEvent=dr;var l5={readContext:es,use:h_,useCallback:function(i,u){return ks().memoizedState=[i,u===void 0?null:u],i},useContext:es,useEffect:Gw,useImperativeHandle:function(i,u,p){p=p!=null?p.concat([i]):null,p_(4194308,4,Yw.bind(null,u,i),p)},useLayoutEffect:function(i,u){return p_(4194308,4,i,u)},useInsertionEffect:function(i,u){p_(4,2,i,u)},useMemo:function(i,u){var p=ks();u=u===void 0?null:u;var w=i();if(Yl){pn(!0);try{i()}finally{pn(!1)}}return p.memoizedState=[w,u],w},useReducer:function(i,u,p){var w=ks();if(p!==void 0){var z=p(u);if(Yl){pn(!0);try{p(u)}finally{pn(!1)}}}else z=u;return w.memoizedState=w.baseState=z,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:z},w.queue=i,i=i.dispatch=HD.bind(null,Gt,i),[w.memoizedState,i]},useRef:function(i){var u=ks();return i={current:i},u.memoizedState=i},useState:function(i){i=Tg(i);var u=i.queue,p=i5.bind(null,Gt,u);return u.dispatch=p,[i.memoizedState,p]},useDebugValue:Rg,useDeferredValue:function(i,u){var p=ks();return Dg(p,i,u)},useTransition:function(){var i=Tg(!1);return i=e5.bind(null,Gt,i.queue,!0,!1),ks().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,u,p){var w=Gt,z=ks();if(fn){if(p===void 0)throw Error(r(407));p=p()}else{if(p=u(),In===null)throw Error(r(349));(cn&127)!==0||Aw(w,u,p)}z.memoizedState=p;var R={value:p,getSnapshot:u};return z.queue=R,Gw(jw.bind(null,w,R,i),[i]),w.flags|=2048,iu(9,{destroy:void 0},Tw.bind(null,w,R,p,u),null),p},useId:function(){var i=ks(),u=In.identifierPrefix;if(fn){var p=da,w=ua;p=(w&~(1<<32-Dt(w)-1)).toString(32)+p,u="_"+u+"R_"+p,p=d_++,0<\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof w.is=="string"?K.createElement("select",{is:w.is}):K.createElement("select"),w.multiple?R.multiple=!0:w.size&&(R.size=w.size);break;default:R=typeof w.is=="string"?K.createElement(z,{is:w.is}):K.createElement(z)}}R[rn]=u,R[Pn]=w;e:for(K=u.child;K!==null;){if(K.tag===5||K.tag===6)R.appendChild(K.stateNode);else if(K.tag!==4&&K.tag!==27&&K.child!==null){K.child.return=K,K=K.child;continue}if(K===u)break e;for(;K.sibling===null;){if(K.return===null||K.return===u)break e;K=K.return}K.sibling.return=K.return,K=K.sibling}u.stateNode=R;e:switch(ns(R,z,w),z){case"button":case"input":case"select":case"textarea":w=!!w.autoFocus;break e;case"img":w=!0;break e;default:w=!1}w&&to(u)}}return qn(u),Zg(u,u.type,i===null?null:i.memoizedProps,u.pendingProps,p),null;case 6:if(i&&u.stateNode!=null)i.memoizedProps!==w&&to(u);else{if(typeof w!="string"&&u.stateNode===null)throw Error(r(166));if(i=he.current,Xc(u)){if(i=u.stateNode,p=u.memoizedProps,w=null,z=Jr,z!==null)switch(z.tag){case 27:case 5:w=z.memoizedProps}i[rn]=u,i=!!(i.nodeValue===p||w!==null&&w.suppressHydrationWarning===!0||N3(i.nodeValue,p)),i||Po(u,!0)}else i=I_(i).createTextNode(w),i[rn]=u,u.stateNode=i}return qn(u),null;case 31:if(p=u.memoizedState,i===null||i.memoizedState!==null){if(w=Xc(u),p!==null){if(i===null){if(!w)throw Error(r(318));if(i=u.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[rn]=u}else Fl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qn(u),i=!1}else p=og(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),i=!0;if(!i)return u.flags&256?(ri(u),u):(ri(u),null);if((u.flags&128)!==0)throw Error(r(558))}return qn(u),null;case 13:if(w=u.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(z=Xc(u),w!==null&&w.dehydrated!==null){if(i===null){if(!z)throw Error(r(318));if(z=u.memoizedState,z=z!==null?z.dehydrated:null,!z)throw Error(r(317));z[rn]=u}else Fl(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;qn(u),z=!1}else z=og(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=z),z=!0;if(!z)return u.flags&256?(ri(u),u):(ri(u),null)}return ri(u),(u.flags&128)!==0?(u.lanes=p,u):(p=w!==null,i=i!==null&&i.memoizedState!==null,p&&(w=u.child,z=null,w.alternate!==null&&w.alternate.memoizedState!==null&&w.alternate.memoizedState.cachePool!==null&&(z=w.alternate.memoizedState.cachePool.pool),R=null,w.memoizedState!==null&&w.memoizedState.cachePool!==null&&(R=w.memoizedState.cachePool.pool),R!==z&&(w.flags|=2048)),p!==i&&p&&(u.child.flags|=8192),w_(u,u.updateQueue),qn(u),null);case 4:return ne(),i===null&&b1(u.stateNode.containerInfo),qn(u),null;case 10:return Za(u.type),qn(u),null;case 19:if(Y(pr),w=u.memoizedState,w===null)return qn(u),null;if(z=(u.flags&128)!==0,R=w.rendering,R===null)if(z)Pd(w,!1);else{if(fr!==0||i!==null&&(i.flags&128)!==0)for(i=u.child;i!==null;){if(R=c_(i),R!==null){for(u.flags|=128,Pd(w,!1),i=R.updateQueue,u.updateQueue=i,w_(u,i),u.subtreeFlags=0,i=p,p=u.child;p!==null;)iw(p,i),p=p.sibling;return G(pr,pr.current&1|2),fn&&Ya(u,w.treeForkCount),u.child}i=i.sibling}w.tail!==null&&St()>N_&&(u.flags|=128,z=!0,Pd(w,!1),u.lanes=4194304)}else{if(!z)if(i=c_(R),i!==null){if(u.flags|=128,z=!0,i=i.updateQueue,u.updateQueue=i,w_(u,i),Pd(w,!0),w.tail===null&&w.tailMode==="hidden"&&!R.alternate&&!fn)return qn(u),null}else 2*St()-w.renderingStartTime>N_&&p!==536870912&&(u.flags|=128,z=!0,Pd(w,!1),u.lanes=4194304);w.isBackwards?(R.sibling=u.child,u.child=R):(i=w.last,i!==null?i.sibling=R:u.child=R,w.last=R)}return w.tail!==null?(i=w.tail,w.rendering=i,w.tail=i.sibling,w.renderingStartTime=St(),i.sibling=null,p=pr.current,G(pr,z?p&1|2:p&1),fn&&Ya(u,w.treeForkCount),i):(qn(u),null);case 22:case 23:return ri(u),xg(),w=u.memoizedState!==null,i!==null?i.memoizedState!==null!==w&&(u.flags|=8192):w&&(u.flags|=8192),w?(p&536870912)!==0&&(u.flags&128)===0&&(qn(u),u.subtreeFlags&6&&(u.flags|=8192)):qn(u),p=u.updateQueue,p!==null&&w_(u,p.retryQueue),p=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(p=i.memoizedState.cachePool.pool),w=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(w=u.memoizedState.cachePool.pool),w!==p&&(u.flags|=2048),i!==null&&Y(Gl),null;case 24:return p=null,i!==null&&(p=i.memoizedState.cache),u.memoizedState.cache!==p&&(u.flags|=2048),Za(Nr),qn(u),null;case 25:return null;case 30:return null}throw Error(r(156,u.tag))}function GD(i,u){switch(ig(u),u.tag){case 1:return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 3:return Za(Nr),ne(),i=u.flags,(i&65536)!==0&&(i&128)===0?(u.flags=i&-65537|128,u):null;case 26:case 27:case 5:return ge(u),null;case 31:if(u.memoizedState!==null){if(ri(u),u.alternate===null)throw Error(r(340));Fl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 13:if(ri(u),i=u.memoizedState,i!==null&&i.dehydrated!==null){if(u.alternate===null)throw Error(r(340));Fl()}return i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 19:return Y(pr),null;case 4:return ne(),null;case 10:return Za(u.type),null;case 22:case 23:return ri(u),xg(),i!==null&&Y(Gl),i=u.flags,i&65536?(u.flags=i&-65537|128,u):null;case 24:return Za(Nr),null;case 25:return null;default:return null}}function M5(i,u){switch(ig(u),u.tag){case 3:Za(Nr),ne();break;case 26:case 27:case 5:ge(u);break;case 4:ne();break;case 31:u.memoizedState!==null&&ri(u);break;case 13:ri(u);break;case 19:Y(pr);break;case 10:Za(u.type);break;case 22:case 23:ri(u),xg(),i!==null&&Y(Gl);break;case 24:Za(Nr)}}function Fd(i,u){try{var p=u.updateQueue,w=p!==null?p.lastEffect:null;if(w!==null){var z=w.next;p=z;do{if((p.tag&i)===i){w=void 0;var R=p.create,K=p.inst;w=R(),K.destroy=w}p=p.next}while(p!==z)}}catch(te){Tn(u,u.return,te)}}function Ko(i,u,p){try{var w=u.updateQueue,z=w!==null?w.lastEffect:null;if(z!==null){var R=z.next;w=R;do{if((w.tag&i)===i){var K=w.inst,te=K.destroy;if(te!==void 0){K.destroy=void 0,z=u;var fe=p,we=te;try{we()}catch(Me){Tn(z,fe,Me)}}}w=w.next}while(w!==R)}}catch(Me){Tn(u,u.return,Me)}}function R5(i){var u=i.updateQueue;if(u!==null){var p=i.stateNode;try{Sw(u,p)}catch(w){Tn(i,i.return,w)}}}function D5(i,u,p){p.props=Xl(i.type,i.memoizedProps),p.state=i.memoizedState;try{p.componentWillUnmount()}catch(w){Tn(i,u,w)}}function Ud(i,u){try{var p=i.ref;if(p!==null){switch(i.tag){case 26:case 27:case 5:var w=i.stateNode;break;case 30:w=i.stateNode;break;default:w=i.stateNode}typeof p=="function"?i.refCleanup=p(w):p.current=w}}catch(z){Tn(i,u,z)}}function fa(i,u){var p=i.ref,w=i.refCleanup;if(p!==null)if(typeof w=="function")try{w()}catch(z){Tn(i,u,z)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(z){Tn(i,u,z)}else p.current=null}function L5(i){var u=i.type,p=i.memoizedProps,w=i.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":p.autoFocus&&w.focus();break e;case"img":p.src?w.src=p.src:p.srcSet&&(w.srcset=p.srcSet)}}catch(z){Tn(i,i.return,z)}}function Qg(i,u,p){try{var w=i.stateNode;hL(w,i.type,p,u),w[Pn]=u}catch(z){Tn(i,i.return,z)}}function O5(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&tl(i.type)||i.tag===4}function Jg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||O5(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&tl(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function e1(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(i,u):(u=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,u.appendChild(i),p=p._reactRootContainer,p!=null||u.onclick!==null||(u.onclick=xs));else if(w!==4&&(w===27&&tl(i.type)&&(p=i.stateNode,u=null),i=i.child,i!==null))for(e1(i,u,p),i=i.sibling;i!==null;)e1(i,u,p),i=i.sibling}function S_(i,u,p){var w=i.tag;if(w===5||w===6)i=i.stateNode,u?p.insertBefore(i,u):p.appendChild(i);else if(w!==4&&(w===27&&tl(i.type)&&(p=i.stateNode),i=i.child,i!==null))for(S_(i,u,p),i=i.sibling;i!==null;)S_(i,u,p),i=i.sibling}function I5(i){var u=i.stateNode,p=i.memoizedProps;try{for(var w=i.type,z=u.attributes;z.length;)u.removeAttributeNode(z[0]);ns(u,w,p),u[rn]=i,u[Pn]=p}catch(R){Tn(i,i.return,R)}}var no=!1,Tr=!1,t1=!1,B5=typeof WeakSet=="function"?WeakSet:Set,Yr=null;function VD(i,u){if(i=i.containerInfo,w1=q_,i=X4(i),Km(i)){if("selectionStart"in i)var p={start:i.selectionStart,end:i.selectionEnd};else e:{p=(p=i.ownerDocument)&&p.defaultView||window;var w=p.getSelection&&p.getSelection();if(w&&w.rangeCount!==0){p=w.anchorNode;var z=w.anchorOffset,R=w.focusNode;w=w.focusOffset;try{p.nodeType,R.nodeType}catch{p=null;break e}var K=0,te=-1,fe=-1,we=0,Me=0,Oe=i,Se=null;t:for(;;){for(var Ne;Oe!==p||z!==0&&Oe.nodeType!==3||(te=K+z),Oe!==R||w!==0&&Oe.nodeType!==3||(fe=K+w),Oe.nodeType===3&&(K+=Oe.nodeValue.length),(Ne=Oe.firstChild)!==null;)Se=Oe,Oe=Ne;for(;;){if(Oe===i)break t;if(Se===p&&++we===z&&(te=K),Se===R&&++Me===w&&(fe=K),(Ne=Oe.nextSibling)!==null)break;Oe=Se,Se=Oe.parentNode}Oe=Ne}p=te===-1||fe===-1?null:{start:te,end:fe}}else p=null}p=p||{start:0,end:0}}else p=null;for(S1={focusedElem:i,selectionRange:p},q_=!1,Yr=u;Yr!==null;)if(u=Yr,i=u.child,(u.subtreeFlags&1028)!==0&&i!==null)i.return=u,Yr=i;else for(;Yr!==null;){switch(u=Yr,R=u.alternate,i=u.flags,u.tag){case 0:if((i&4)!==0&&(i=u.updateQueue,i=i!==null?i.events:null,i!==null))for(p=0;p title"))),ns(R,w,p),R[rn]=i,Fn(R),w=R;break e;case"link":var K=q3("link","href",z).get(w+(p.href||""));if(K){for(var te=0;teLn&&(K=Ln,Ln=Nt,Nt=K);var ve=K4(te,Nt),_e=K4(te,Ln);if(ve&&_e&&(Ne.rangeCount!==1||Ne.anchorNode!==ve.node||Ne.anchorOffset!==ve.offset||Ne.focusNode!==_e.node||Ne.focusOffset!==_e.offset)){var ye=Oe.createRange();ye.setStart(ve.node,ve.offset),Ne.removeAllRanges(),Nt>Ln?(Ne.addRange(ye),Ne.extend(_e.node,_e.offset)):(ye.setEnd(_e.node,_e.offset),Ne.addRange(ye))}}}}for(Oe=[],Ne=te;Ne=Ne.parentNode;)Ne.nodeType===1&&Oe.push({element:Ne,left:Ne.scrollLeft,top:Ne.scrollTop});for(typeof te.focus=="function"&&te.focus(),te=0;tep?32:p,W.T=null,p=l1,l1=null;var R=Qo,K=oo;if(Fr=0,uu=Qo=null,oo=0,(yn&6)!==0)throw Error(r(331));var te=yn;if(yn|=4,Y5(R.current),V5(R,R.current,K,p),yn=te,Yd(0,!1),Wt&&typeof Wt.onPostCommitFiberRoot=="function")try{Wt.onPostCommitFiberRoot(nn,R)}catch{}return!0}finally{Z.p=z,W.T=w,h3(i,u)}}function p3(i,u,p){u=Ci(p,u),u=Pg(i.stateNode,u,2),i=Go(i,u,2),i!==null&&(qt(i,2),ha(i))}function Tn(i,u,p){if(i.tag===3)p3(i,i,p);else for(;u!==null;){if(u.tag===3){p3(u,i,p);break}else if(u.tag===1){var w=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof w.componentDidCatch=="function"&&(Zo===null||!Zo.has(w))){i=Ci(p,i),p=m5(2),w=Go(u,p,2),w!==null&&(g5(p,w,u,i),qt(w,2),ha(w));break}}u=u.return}}function f1(i,u,p){var w=i.pingCache;if(w===null){w=i.pingCache=new YD;var z=new Set;w.set(u,z)}else z=w.get(u),z===void 0&&(z=new Set,w.set(u,z));z.has(p)||(s1=!0,z.add(p),i=eL.bind(null,i,u,p),u.then(i,i))}function eL(i,u,p){var w=i.pingCache;w!==null&&w.delete(u),i.pingedLanes|=i.suspendedLanes&p,i.warmLanes&=~p,In===i&&(cn&p)===p&&(fr===4||fr===3&&(cn&62914560)===cn&&300>St()-E_?(yn&2)===0&&du(i,0):i1|=p,cu===cn&&(cu=0)),ha(i)}function m3(i,u){u===0&&(u=Ie()),i=Hl(i,u),i!==null&&(qt(i,u),ha(i))}function tL(i){var u=i.memoizedState,p=0;u!==null&&(p=u.retryLane),m3(i,p)}function nL(i,u){var p=0;switch(i.tag){case 31:case 13:var w=i.stateNode,z=i.memoizedState;z!==null&&(p=z.retryLane);break;case 19:w=i.stateNode;break;case 22:w=i.stateNode._retryCache;break;default:throw Error(r(314))}w!==null&&w.delete(u),m3(i,p)}function rL(i,u){return wt(i,u)}var R_=null,hu=null,h1=!1,D_=!1,_1=!1,el=0;function ha(i){i!==hu&&i.next===null&&(hu===null?R_=hu=i:hu=hu.next=i),D_=!0,h1||(h1=!0,iL())}function Yd(i,u){if(!_1&&D_){_1=!0;do for(var p=!1,w=R_;w!==null;){if(i!==0){var z=w.pendingLanes;if(z===0)var R=0;else{var K=w.suspendedLanes,te=w.pingedLanes;R=(1<<31-Dt(42|i)+1)-1,R&=z&~(K&~te),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(p=!0,x3(w,R))}else R=cn,R=Wn(w,w===In?R:0,w.cancelPendingCommit!==null||w.timeoutHandle!==-1),(R&3)===0||Et(w,R)||(p=!0,x3(w,R));w=w.next}while(p);_1=!1}}function sL(){g3()}function g3(){D_=h1=!1;var i=0;el!==0&&pL()&&(i=el);for(var u=St(),p=null,w=R_;w!==null;){var z=w.next,R=v3(w,u);R===0?(w.next=null,p===null?R_=z:p.next=z,z===null&&(hu=p)):(p=w,(i!==0||(R&3)!==0)&&(D_=!0)),w=z}Fr!==0&&Fr!==5||Yd(i),el!==0&&(el=0)}function v3(i,u){for(var p=i.suspendedLanes,w=i.pingedLanes,z=i.expirationTimes,R=i.pendingLanes&-62914561;0te)break;var Me=fe.transferSize,Oe=fe.initiatorType;Me&&z3(Oe)&&(fe=fe.responseEnd,K+=Me*(fe"u"?null:document;function H3(i,u,p){var w=_u;if(w&&typeof u=="string"&&u){var z=Kn(u);z='link[rel="'+i+'"][href="'+z+'"]',typeof p=="string"&&(z+='[crossorigin="'+p+'"]'),$3.has(z)||($3.add(z),i={rel:i,crossOrigin:p,href:u},w.querySelector(z)===null&&(u=w.createElement("link"),ns(u,"link",i),Fn(u),w.head.appendChild(u)))}}function kL(i){lo.D(i),H3("dns-prefetch",i,null)}function CL(i,u){lo.C(i,u),H3("preconnect",i,u)}function EL(i,u,p){lo.L(i,u,p);var w=_u;if(w&&i&&u){var z='link[rel="preload"][as="'+Kn(u)+'"]';u==="image"&&p&&p.imageSrcSet?(z+='[imagesrcset="'+Kn(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(z+='[imagesizes="'+Kn(p.imageSizes)+'"]')):z+='[href="'+Kn(i)+'"]';var R=z;switch(u){case"style":R=pu(i);break;case"script":R=mu(i)}ji.has(R)||(i=f({rel:"preload",href:u==="image"&&p&&p.imageSrcSet?void 0:i,as:u},p),ji.set(R,i),w.querySelector(z)!==null||u==="style"&&w.querySelector(Jd(R))||u==="script"&&w.querySelector(ef(R))||(u=w.createElement("link"),ns(u,"link",i),Fn(u),w.head.appendChild(u)))}}function NL(i,u){lo.m(i,u);var p=_u;if(p&&i){var w=u&&typeof u.as=="string"?u.as:"script",z='link[rel="modulepreload"][as="'+Kn(w)+'"][href="'+Kn(i)+'"]',R=z;switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=mu(i)}if(!ji.has(R)&&(i=f({rel:"modulepreload",href:i},u),ji.set(R,i),p.querySelector(z)===null)){switch(w){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(ef(R)))return}w=p.createElement("link"),ns(w,"link",i),Fn(w),p.head.appendChild(w)}}}function zL(i,u,p){lo.S(i,u,p);var w=_u;if(w&&i){var z=Wr(w).hoistableStyles,R=pu(i);u=u||"default";var K=z.get(R);if(!K){var te={loading:0,preload:null};if(K=w.querySelector(Jd(R)))te.loading=5;else{i=f({rel:"stylesheet",href:i,"data-precedence":u},p),(p=ji.get(R))&&T1(i,p);var fe=K=w.createElement("link");Fn(fe),ns(fe,"link",i),fe._p=new Promise(function(we,Me){fe.onload=we,fe.onerror=Me}),fe.addEventListener("load",function(){te.loading|=1}),fe.addEventListener("error",function(){te.loading|=2}),te.loading|=4,$_(K,u,w)}K={type:"stylesheet",instance:K,count:1,state:te},z.set(R,K)}}}function AL(i,u){lo.X(i,u);var p=_u;if(p&&i){var w=Wr(p).hoistableScripts,z=mu(i),R=w.get(z);R||(R=p.querySelector(ef(z)),R||(i=f({src:i,async:!0},u),(u=ji.get(z))&&j1(i,u),R=p.createElement("script"),Fn(R),ns(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(z,R))}}function TL(i,u){lo.M(i,u);var p=_u;if(p&&i){var w=Wr(p).hoistableScripts,z=mu(i),R=w.get(z);R||(R=p.querySelector(ef(z)),R||(i=f({src:i,async:!0,type:"module"},u),(u=ji.get(z))&&j1(i,u),R=p.createElement("script"),Fn(R),ns(R,"link",i),p.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},w.set(z,R))}}function P3(i,u,p,w){var z=(z=he.current)?B_(z):null;if(!z)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(u=pu(p.href),p=Wr(z).hoistableStyles,w=p.get(u),w||(w={type:"style",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){i=pu(p.href);var R=Wr(z).hoistableStyles,K=R.get(i);if(K||(z=z.ownerDocument||z,K={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(i,K),(R=z.querySelector(Jd(i)))&&!R._p&&(K.instance=R,K.state.loading=5),ji.has(i)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},ji.set(i,p),R||jL(z,i,p,K.state))),u&&w===null)throw Error(r(528,""));return K}if(u&&w!==null)throw Error(r(529,""));return null;case"script":return u=p.async,p=p.src,typeof p=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=mu(p),p=Wr(z).hoistableScripts,w=p.get(u),w||(w={type:"script",instance:null,count:0,state:null},p.set(u,w)),w):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function pu(i){return'href="'+Kn(i)+'"'}function Jd(i){return'link[rel="stylesheet"]['+i+"]"}function F3(i){return f({},i,{"data-precedence":i.precedence,precedence:null})}function jL(i,u,p,w){i.querySelector('link[rel="preload"][as="style"]['+u+"]")?w.loading=1:(u=i.createElement("link"),w.preload=u,u.addEventListener("load",function(){return w.loading|=1}),u.addEventListener("error",function(){return w.loading|=2}),ns(u,"link",p),Fn(u),i.head.appendChild(u))}function mu(i){return'[src="'+Kn(i)+'"]'}function ef(i){return"script[async]"+i}function U3(i,u,p){if(u.count++,u.instance===null)switch(u.type){case"style":var w=i.querySelector('style[data-href~="'+Kn(p.href)+'"]');if(w)return u.instance=w,Fn(w),w;var z=f({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return w=(i.ownerDocument||i).createElement("style"),Fn(w),ns(w,"style",z),$_(w,p.precedence,i),u.instance=w;case"stylesheet":z=pu(p.href);var R=i.querySelector(Jd(z));if(R)return u.state.loading|=4,u.instance=R,Fn(R),R;w=F3(p),(z=ji.get(z))&&T1(w,z),R=(i.ownerDocument||i).createElement("link"),Fn(R);var K=R;return K._p=new Promise(function(te,fe){K.onload=te,K.onerror=fe}),ns(R,"link",w),u.state.loading|=4,$_(R,p.precedence,i),u.instance=R;case"script":return R=mu(p.src),(z=i.querySelector(ef(R)))?(u.instance=z,Fn(z),z):(w=p,(z=ji.get(R))&&(w=f({},p),j1(w,z)),i=i.ownerDocument||i,z=i.createElement("script"),Fn(z),ns(z,"link",w),i.head.appendChild(z),u.instance=z);case"void":return null;default:throw Error(r(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(w=u.instance,u.state.loading|=4,$_(w,p.precedence,i));return u.instance}function $_(i,u,p){for(var w=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),z=w.length?w[w.length-1]:null,R=z,K=0;K title"):null)}function ML(i,u,p){if(p===1||u.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return i=u.disabled,typeof u.precedence=="string"&&i==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function V3(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function RL(i,u,p,w){if(p.type==="stylesheet"&&(typeof w.media!="string"||matchMedia(w.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var z=pu(w.href),R=u.querySelector(Jd(z));if(R){u=R._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(i.count++,i=P_.bind(i),u.then(i,i)),p.state.loading|=4,p.instance=R,Fn(R);return}R=u.ownerDocument||u,w=F3(w),(z=ji.get(z))&&T1(w,z),R=R.createElement("link"),Fn(R);var K=R;K._p=new Promise(function(te,fe){K.onload=te,K.onerror=fe}),ns(R,"link",w),p.instance=R}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(p,u),(u=p.state.preload)&&(p.state.loading&3)===0&&(i.count++,p=P_.bind(i),u.addEventListener("load",p),u.addEventListener("error",p))}}var M1=0;function DL(i,u){return i.stylesheets&&i.count===0&&U_(i,i.stylesheets),0M1?50:800)+u);return i.unsuspend=p,function(){i.unsuspend=null,clearTimeout(w),clearTimeout(z)}}:null}function P_(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)U_(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var F_=null;function U_(i,u){i.stylesheets=null,i.unsuspend!==null&&(i.count++,F_=new Map,u.forEach(LL,i),F_=null,P_.call(i))}function LL(i,u){if(!(u.state.loading&4)){var p=F_.get(i);if(p)var w=p.get(null);else{p=new Map,F_.set(i,p);for(var z=i.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),P1.exports=XL(),P1.exports}var QL=ZL();const JL={},eO="en",fx=["en","zh-CN","fa"],Z9="orx:locale",hx=["localStorage","preferredLanguage","baseLocale"],b6=[],Of=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let x6=!1,N=()=>{var t;let e=hx;!Of&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=J9(window.location.href));const n=tO(e);if(n)return x6||(x6=!0,Q9(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function tO(e,n){let t;for(const r of e){if(r==="baseLocale")t=eO;else if(r==="preferredLanguage"&&!Of)t=oO();else if(r==="localStorage"&&!Of)t=localStorage.getItem(Z9)??void 0;else if(eE(r)&&J0.has(r)){const a=J0.get(r);if(a){const o=a.getLocale();if(o instanceof Promise)continue;if(o!==void 0)return iO(o)}}const s=If(t);if(s)return s}}const nO=e=>{window.location.reload()};let Q9=(e,n)=>{var l;const t={reload:!0,...n};let r;try{r=N()}catch{}const s=[];let a=hx;!Of&&typeof window<"u"&&((l=window.location)!=null&&l.href)&&(a=J9(window.location.href));for(const c of a)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(Z9,e);else if(eE(c)&&J0.has(c)){const d=J0.get(c);if(d){let _=d.setLocale(e);_ instanceof Promise&&(_=_.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(_))}}}const o=()=>{!Of&&t.reload&&window.location&&e!==r&&nO()};if(s.length)return Promise.all(s).then(()=>{o()});o()},rO=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function If(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of fx)if(t.toLowerCase()===n)return t}function sO(e){return!!e&&fx.some(n=>n===e)}function iO(e){const n=If(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${fx.join(", ")}`)}function aO(e,n){return e.exec(n.href)}function oO(){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=If(t.fullTag);if(r)return r;const s=If(t.baseTag);if(s)return s}}function lO(e){return cO(e)}function cO(e){const n=typeof e=="string"?new URL(e,rO()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&If(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let y6,w6;function uO(e){if(b6.length===0)return;const n=typeof e=="string"?e:e.href;if(y6===n)return w6;const t=new URL(n,"http://example.com"),r=lO(t),s=r.href===t.href?[t]:[t,r];let a;for(const o of s){for(const l of b6){const c=new JL(l.match,o.href);if(aO(c,o)){a=l;break}}if(a)break}return y6=n,w6=a,a}function J9(e){const n=uO(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:hx}const J0=new Map;function eE(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const dO=e=>`Actions for ${e==null?void 0:e.name}`,fO=e=>`${e==null?void 0:e.name} 的操作`,hO=e=>`عملیات ${e==null?void 0:e.name}`,_O=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fO(e):t==="fa"?hO(e):dO(e)}),pO=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,mO=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,gO=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,vO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mO(e):t==="fa"?gO(e):pO(e)}),bO=e=>`Branch: ${e==null?void 0:e.branch}`,xO=e=>`分支:${e==null?void 0:e.branch}`,yO=e=>`شاخه: ${e==null?void 0:e.branch}`,wO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xO(e):t==="fa"?yO(e):bO(e)}),SO=e=>`Browse code on ${e==null?void 0:e.branch}`,kO=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,CO=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,tE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kO(e):t==="fa"?CO(e):SO(e)}),EO=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,NO=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,zO=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,AO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NO(e):t==="fa"?zO(e):EO(e)}),TO=e=>`Collapse ${e==null?void 0:e.name}`,jO=e=>`折叠 ${e==null?void 0:e.name}`,MO=e=>`بستن ${e==null?void 0:e.name}`,RO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jO(e):t==="fa"?MO(e):TO(e)}),DO=e=>`Committed changes versus ${e==null?void 0:e.parent}`,LO=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,OO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,IO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?LO(e):t==="fa"?OO(e):DO(e)}),BO=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,$O=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,HO=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,PO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$O(e):t==="fa"?HO(e):BO(e)}),FO=e=>`Copy ${e==null?void 0:e.value}`,UO=e=>`复制 ${e==null?void 0:e.value}`,qO=e=>`کپی ${e==null?void 0:e.value}`,GO=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?UO(e):t==="fa"?qO(e):FO(e)}),VO=e=>`Delete ${e==null?void 0:e.name}`,WO=e=>`删除 ${e==null?void 0:e.name}`,KO=e=>`حذف ${e==null?void 0:e.name}`,Sb=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?WO(e):t==="fa"?KO(e):VO(e)}),YO=e=>`Download ${e==null?void 0:e.name}`,XO=e=>`下载 ${e==null?void 0:e.name}`,ZO=e=>`بارگیری ${e==null?void 0:e.name}`,S6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XO(e):t==="fa"?ZO(e):YO(e)}),QO=e=>`Expand ${e==null?void 0:e.name}`,JO=e=>`展开 ${e==null?void 0:e.name}`,eI=e=>`باز کردن ${e==null?void 0:e.name}`,tI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JO(e):t==="fa"?eI(e):QO(e)}),nI=e=>`Hide additional ${e==null?void 0:e.target}`,rI=e=>`隐藏其余${e==null?void 0:e.target}`,sI=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,iI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rI(e):t==="fa"?sI(e):nI(e)}),aI=e=>`Hide error details for ${e==null?void 0:e.activity}`,oI=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,lI=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,cI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oI(e):t==="fa"?lI(e):aI(e)}),uI=e=>`${e==null?void 0:e.count} consecutive identical calls`,dI=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,fI=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,hI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dI(e):t==="fa"?fI(e):uI(e)}),_I=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,pI=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,mI=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,gI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pI(e):t==="fa"?mI(e):_I(e)}),vI=e=>`Open ${e==null?void 0:e.branch} on GitHub`,bI=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,xI=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,nE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bI(e):t==="fa"?xI(e):vI(e)}),yI=e=>`Open experiment ${e==null?void 0:e.name}`,wI=e=>`打开实验 ${e==null?void 0:e.name}`,SI=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,kI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wI(e):t==="fa"?SI(e):yI(e)}),CI=e=>`Open ${e==null?void 0:e.path} in the right pane`,EI=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,NI=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,zI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EI(e):t==="fa"?NI(e):CI(e)}),AI=e=>`Open ${e==null?void 0:e.name}`,TI=e=>`打开 ${e==null?void 0:e.name}`,jI=e=>`باز کردن ${e==null?void 0:e.name}`,MI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TI(e):t==="fa"?jI(e):AI(e)}),RI=e=>`Open logs for run ${e==null?void 0:e.run}`,DI=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,LI=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,OI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?DI(e):t==="fa"?LI(e):RI(e)}),II=e=>`Open ${e==null?void 0:e.name} on GitHub`,BI=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,$I=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,ep=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?BI(e):t==="fa"?$I(e):II(e)}),HI=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,PI=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,FI=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,UI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PI(e):t==="fa"?FI(e):HI(e)}),qI=e=>`Overleaf — ${e==null?void 0:e.status}`,GI=e=>`Overleaf — ${e==null?void 0:e.status}`,VI=e=>`Overleaf — ${e==null?void 0:e.status}`,WI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GI(e):t==="fa"?VI(e):qI(e)}),KI=e=>`Preview /${e==null?void 0:e.name} skill`,YI=e=>`预览 /${e==null?void 0:e.name} 技能`,XI=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,ZI=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YI(e):t==="fa"?XI(e):KI(e)}),QI=e=>`Remove annotation ${e==null?void 0:e.number}`,JI=e=>`移除批注 ${e==null?void 0:e.number}`,eB=e=>`حذف یادداشت ${e==null?void 0:e.number}`,tB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JI(e):t==="fa"?eB(e):QI(e)}),nB=e=>`Remove ${e==null?void 0:e.name}`,rB=e=>`移除 ${e==null?void 0:e.name}`,sB=e=>`حذف ${e==null?void 0:e.name}`,iB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rB(e):t==="fa"?sB(e):nB(e)}),aB=e=>`Remove queued message: ${e==null?void 0:e.text}`,oB=e=>`移除排队消息:${e==null?void 0:e.text}`,lB=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,cB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oB(e):t==="fa"?lB(e):aB(e)}),uB=e=>`Retry queued message: ${e==null?void 0:e.text}`,dB=e=>`重试排队消息:${e==null?void 0:e.text}`,fB=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,hB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dB(e):t==="fa"?fB(e):uB(e)}),_B=e=>`Run ${e==null?void 0:e.id}`,pB=e=>`运行 ${e==null?void 0:e.id}`,mB=e=>`اجرای ${e==null?void 0:e.id}`,gB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pB(e):t==="fa"?mB(e):_B(e)}),vB=e=>`Show error details for ${e==null?void 0:e.activity}`,bB=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,xB=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,yB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bB(e):t==="fa"?xB(e):vB(e)}),wB=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,SB=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,kB=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,CB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SB(e):t==="fa"?kB(e):wB(e)}),EB=e=>`${e==null?void 0:e.name} skill`,NB=e=>`${e==null?void 0:e.name} 技能`,zB=e=>`مهارت ${e==null?void 0:e.name}`,AB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NB(e):t==="fa"?zB(e):EB(e)}),TB=e=>`Value for ${e==null?void 0:e.name}`,jB=e=>`${e==null?void 0:e.name} 的值`,MB=e=>`مقدار ${e==null?void 0:e.name}`,RB=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jB(e):t==="fa"?MB(e):TB(e)}),DB=()=>"Agent reported back",LB=()=>"智能体已返回结果",OB=()=>"عامل نتیجه را گزارش کرد",IB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LB():t==="fa"?OB():DB()}),BB=()=>"Browse",$B=()=>"浏览",HB=()=>"مرور",PB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$B():t==="fa"?HB():BB()}),FB=()=>"Browsing…",UB=()=>"正在浏览…",qB=()=>"در حال مرور…",GB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UB():t==="fa"?qB():FB()}),VB=()=>"Checked experiment status and updated notes",WB=()=>"已检查实验状态并更新笔记",KB=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",YB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WB():t==="fa"?KB():VB()}),XB=()=>"Closed an agent",ZB=()=>"已关闭智能体",QB=()=>"عامل بسته شد",JB=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZB():t==="fa"?QB():XB()}),e$=()=>"Compacted context",t$=()=>"上下文已压缩",n$=()=>"زمینه فشرده شد",r$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t$():t==="fa"?n$():e$()}),s$=()=>"Compacting context…",i$=()=>"正在压缩上下文…",a$=()=>"در حال فشرده‌سازی زمینه…",o$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i$():t==="fa"?a$():s$()}),l$=e=>`Created ${e==null?void 0:e.target}`,c$=e=>`已创建 ${e==null?void 0:e.target}`,u$=e=>`${e==null?void 0:e.target} ایجاد شد`,d$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?c$(e):t==="fa"?u$(e):l$(e)}),f$=()=>"Delegate",h$=()=>"委派",_$=()=>"واگذاری",p$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h$():t==="fa"?_$():f$()}),m$=()=>"Delegating…",g$=()=>"正在委派…",v$=()=>"در حال واگذاری…",b$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g$():t==="fa"?v$():m$()}),x$=e=>`Deleted ${e==null?void 0:e.target}`,y$=e=>`已删除 ${e==null?void 0:e.target}`,w$=e=>`${e==null?void 0:e.target} حذف شد`,S$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?y$(e):t==="fa"?w$(e):x$(e)}),k$=()=>"Edit",C$=()=>"编辑",E$=()=>"ویرایش",N$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C$():t==="fa"?E$():k$()}),z$=e=>`Edited ${e==null?void 0:e.target}`,A$=e=>`已编辑 ${e==null?void 0:e.target}`,T$=e=>`${e==null?void 0:e.target} ویرایش شد`,j$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A$(e):t==="fa"?T$(e):z$(e)}),M$=()=>"Editing…",R$=()=>"正在编辑…",D$=()=>"در حال ویرایش…",L$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R$():t==="fa"?D$():M$()}),O$=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,I$=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,B$=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,$$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?I$(e):t==="fa"?B$(e):O$(e)}),H$=e=>`Listed files matching ${e==null?void 0:e.pattern}`,P$=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,F$=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,U$=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?P$(e):t==="fa"?F$(e):H$(e)}),q$=()=>"Load",G$=()=>"加载",V$=()=>"بارگیری",W$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G$():t==="fa"?V$():q$()}),K$=()=>"Loaded a skill",Y$=()=>"已加载技能",X$=()=>"یک مهارت بارگیری شد",Z$=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y$():t==="fa"?X$():K$()}),Q$=e=>`Loaded ${e==null?void 0:e.name} skill`,J$=e=>`已加载技能 ${e==null?void 0:e.name}`,eH=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,tH=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?J$(e):t==="fa"?eH(e):Q$(e)}),nH=()=>"Loading…",rH=()=>"正在加载…",sH=()=>"در حال بارگیری…",iH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rH():t==="fa"?sH():nH()}),aH=e=>`Opened ${e==null?void 0:e.target}`,oH=e=>`已打开 ${e==null?void 0:e.target}`,lH=e=>`${e==null?void 0:e.target} باز شد`,cH=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oH(e):t==="fa"?lH(e):aH(e)}),uH=e=>`Ran ${e==null?void 0:e.command}`,dH=e=>`已运行 ${e==null?void 0:e.command}`,fH=e=>`${e==null?void 0:e.command} اجرا شد`,hH=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dH(e):t==="fa"?fH(e):uH(e)}),_H=()=>"Ran a sub-agent",pH=()=>"已运行子智能体",mH=()=>"یک عامل فرعی اجرا شد",gH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pH():t==="fa"?mH():_H()}),vH=()=>"Read",bH=()=>"读取",xH=()=>"خواندن",yH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bH():t==="fa"?xH():vH()}),wH=()=>"Read experiment notes",SH=()=>"已读取实验笔记",kH=()=>"یادداشت‌های آزمایش خوانده شد",CH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SH():t==="fa"?kH():wH()}),EH=()=>"Read a paper",NH=()=>"已读取论文",zH=()=>"یک مقاله خوانده شد",AH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NH():t==="fa"?zH():EH()}),TH=e=>`Read ${e==null?void 0:e.name} skill`,jH=e=>`已读取技能 ${e==null?void 0:e.name}`,MH=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,G1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jH(e):t==="fa"?MH(e):TH(e)}),RH=e=>`Read ${e==null?void 0:e.target}`,DH=e=>`已读取 ${e==null?void 0:e.target}`,LH=e=>`${e==null?void 0:e.target} خوانده شد`,lf=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?DH(e):t==="fa"?LH(e):RH(e)}),OH=()=>"Read a web page",IH=()=>"已读取网页",BH=()=>"یک صفحهٔ وب خوانده شد",$H=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IH():t==="fa"?BH():OH()}),HH=()=>"Reading…",PH=()=>"正在读取…",FH=()=>"در حال خواندن…",UH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PH():t==="fa"?FH():HH()}),qH=()=>"Resumed an agent",GH=()=>"已恢复智能体",VH=()=>"عامل از سر گرفته شد",WH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GH():t==="fa"?VH():qH()}),KH=()=>"Review",YH=()=>"查看",XH=()=>"بازبینی",ZH=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YH():t==="fa"?XH():KH()}),QH=()=>"Reviewed run log",JH=()=>"已查看运行日志",eP=()=>"گزارش اجرا بازبینی شد",tP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JH():t==="fa"?eP():QH()}),nP=()=>"Reviewed run logs",rP=()=>"已查看运行日志",sP=()=>"گزارش‌های اجرا بازبینی شد",iP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rP():t==="fa"?sP():nP()}),aP=()=>"Reviewed experiment status and notes",oP=()=>"已查看实验状态和笔记",lP=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",cP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oP():t==="fa"?lP():aP()}),uP=()=>"Reviewing…",dP=()=>"正在查看…",fP=()=>"در حال بازبینی…",hP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dP():t==="fa"?fP():uP()}),_P=()=>"Run",pP=()=>"运行",mP=()=>"اجرا",gP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pP():t==="fa"?mP():_P()}),vP=()=>"Running…",bP=()=>"正在运行…",xP=()=>"در حال اجرا…",yP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bP():t==="fa"?xP():vP()}),wP=()=>"Search",SP=()=>"搜索",kP=()=>"جست‌وجو",CP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SP():t==="fa"?kP():wP()}),EP=()=>"Searched alphaXiv full text",NP=()=>"已搜索 alphaXiv 全文",zP=()=>"متن کامل alphaXiv جست‌وجو شد",AP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NP():t==="fa"?zP():EP()}),TP=()=>"Searched alphaXiv semantically",jP=()=>"已对 alphaXiv 进行语义搜索",MP=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",RP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jP():t==="fa"?MP():TP()}),DP=()=>"Searched bioRxiv",LP=()=>"已搜索 bioRxiv",OP=()=>"bioRxiv جست‌وجو شد",IP=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LP():t==="fa"?OP():DP()}),BP=()=>"Searched code",$P=()=>"已搜索代码",HP=()=>"کد جست‌وجو شد",V1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$P():t==="fa"?HP():BP()}),PP=e=>`Searched code for “${e==null?void 0:e.pattern}”`,FP=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,UP=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,W1=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?FP(e):t==="fa"?UP(e):PP(e)}),qP=e=>`Searched images for “${e==null?void 0:e.query}”`,GP=e=>`已搜索图片“${e==null?void 0:e.query}”`,VP=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,WP=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GP(e):t==="fa"?VP(e):qP(e)}),KP=()=>"Searched the literature",YP=()=>"已搜索文献",XP=()=>"منابع علمی جست‌وجو شد",k6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YP():t==="fa"?XP():KP()}),ZP=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,QP=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,JP=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,eF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?QP(e):t==="fa"?JP(e):ZP(e)}),tF=()=>"Searched OpenAlex",nF=()=>"已搜索 OpenAlex",rF=()=>"OpenAlex جست‌وجو شد",sF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nF():t==="fa"?rF():tF()}),iF=e=>`Searched the web for “${e==null?void 0:e.query}”`,aF=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,oF=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,C6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?aF(e):t==="fa"?oF(e):iF(e)}),lF=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,cF=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,uF=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,dF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?cF(e):t==="fa"?uF(e):lF(e)}),fF=()=>"Searching…",hF=()=>"正在搜索…",_F=()=>"در حال جست‌وجو…",pF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hF():t==="fa"?_F():fF()}),mF=()=>"Sent input to an agent",gF=()=>"已向智能体发送输入",vF=()=>"ورودی به عامل فرستاده شد",bF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gF():t==="fa"?vF():mF()}),xF=()=>"Spawned an agent",yF=()=>"已创建智能体",wF=()=>"یک عامل ساخته شد",SF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yF():t==="fa"?wF():xF()}),kF=()=>"Sub-agent",CF=()=>"子智能体",EF=()=>"عامل فرعی",NF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CF():t==="fa"?EF():kF()}),zF=()=>"Sub-agent interrupted",AF=()=>"子智能体已中断",TF=()=>"عامل فرعی متوقف شد",jF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AF():t==="fa"?TF():zF()}),MF=()=>"Sub-agent started",RF=()=>"子智能体已启动",DF=()=>"عامل فرعی آغاز شد",LF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RF():t==="fa"?DF():MF()}),OF=()=>"Update tasks",IF=()=>"更新任务",BF=()=>"به‌روزرسانی کارها",$F=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IF():t==="fa"?BF():OF()}),HF=()=>"Updated experiment notes",PF=()=>"已更新实验笔记",FF=()=>"یادداشت‌های آزمایش به‌روز شد",UF=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PF():t==="fa"?FF():HF()}),qF=e=>`Updated tasks (${e==null?void 0:e.done} of ${e==null?void 0:e.total} done)`,GF=e=>`已更新任务(已完成 ${e==null?void 0:e.done}/${e==null?void 0:e.total})`,VF=e=>`کارها به‌روز شد (${e==null?void 0:e.done} از ${e==null?void 0:e.total} انجام شد)`,WF=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GF(e):t==="fa"?VF(e):qF(e)}),KF=()=>"Updating tasks",YF=()=>"正在更新任务",XF=()=>"در حال به‌روزرسانی کارها",rE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YF():t==="fa"?XF():KF()}),ZF=()=>"Waiting on an agent",QF=()=>"正在等待智能体",JF=()=>"در انتظار عامل",eU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QF():t==="fa"?JF():ZF()}),tU=e=>`Approval required: ${e==null?void 0:e.label}`,nU=e=>`需要批准:${e==null?void 0:e.label}`,rU=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,E6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?nU(e):t==="fa"?rU(e):tU(e)}),sU=()=>"The CLI is retrying the turn.",iU=()=>"CLI 正在重试本轮。",aU=()=>"CLI در حال تلاش دوباره برای این نوبت است.",oU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iU():t==="fa"?aU():sU()}),lU=()=>"Continue is available.",cU=()=>"可以继续。",uU=()=>"ادامه در دسترس است.",dU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cU():t==="fa"?uU():lU()}),fU=()=>"Retry is available.",hU=()=>"可以重试。",_U=()=>"تلاش دوباره در دسترس است.",pU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hU():t==="fa"?_U():fU()}),mU=()=>"Running a tool",gU=()=>"正在运行工具",vU=()=>"در حال اجرای ابزار",bU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gU():t==="fa"?vU():mU()}),xU=()=>"Tool activity completed",yU=()=>"工具活动已完成",wU=()=>"فعالیت ابزار کامل شد",SU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yU():t==="fa"?wU():xU()}),kU=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,CU=e=>`工具活动失败:${e==null?void 0:e.labels}`,EU=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,NU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?CU(e):t==="fa"?EU(e):kU(e)}),zU=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,AU=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,TU=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,jU=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AU(e):t==="fa"?TU(e):zU(e)}),MU=()=>"Turn did not finish.",RU=()=>"本轮未完成。",DU=()=>"این نوبت کامل نشد.",LU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RU():t==="fa"?DU():MU()}),OU=()=>"Artifacts",IU=()=>"产物",BU=()=>"خروجی‌ها",$U=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IU():t==="fa"?BU():OU()}),HU=()=>"Close panel",PU=()=>"关闭面板",FU=()=>"بستن پنل",N6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PU():t==="fa"?FU():HU()}),UU=()=>"Current task",qU=()=>"当前任务",GU=()=>"وظیفهٔ فعلی",z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qU():t==="fa"?GU():UU()}),VU=()=>"Drag to resize panel",WU=()=>"拖动以调整面板大小",KU=()=>"برای تغییر اندازهٔ پنل بکشید",YU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WU():t==="fa"?KU():VU()}),XU=()=>"Drag toward the center to restore panel",ZU=()=>"向中央拖动以恢复面板",QU=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",JU=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZU():t==="fa"?QU():XU()}),eq=()=>"Entire project",tq=()=>"整个项目",nq=()=>"کل پروژه",A6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tq():t==="fa"?nq():eq()}),rq=()=>"Expand panel",sq=()=>"展开面板",iq=()=>"گسترش پنل",T6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sq():t==="fa"?iq():rq()}),aq=e=>`Experiment filter: ${e==null?void 0:e.scope}`,oq=e=>`实验筛选:${e==null?void 0:e.scope}`,lq=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,cq=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oq(e):t==="fa"?lq(e):aq(e)}),uq=()=>"Experiment view",dq=()=>"实验视图",fq=()=>"نمای آزمایش",hq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dq():t==="fa"?fq():uq()}),_q=()=>"Experiments",pq=()=>"实验",mq=()=>"آزمایش‌ها",gq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pq():t==="fa"?mq():_q()}),vq=()=>"Files",bq=()=>"文件",xq=()=>"فایل‌ها",yq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bq():t==="fa"?xq():vq()}),wq=()=>"Filter experiments",Sq=()=>"筛选实验",kq=()=>"فیلتر آزمایش‌ها",Cq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sq():t==="fa"?kq():wq()}),Eq=()=>"Current task filtering is unavailable for unattributed experiments",Nq=()=>"存在无法归属的实验时,不能按当前任务筛选",zq=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Aq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nq():t==="fa"?zq():Eq()}),Tq=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",jq=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",Mq=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Rq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jq():t==="fa"?Mq():Tq()}),Dq=()=>"Open a task to filter to its experiments",Lq=()=>"请打开一个任务以筛选其实验",Oq=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",Iq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lq():t==="fa"?Oq():Dq()}),Bq=()=>"projects",$q=()=>"项目",Hq=()=>"پروژه‌ها",Pq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$q():t==="fa"?Hq():Bq()}),Fq=()=>"Restore panel",Uq=()=>"还原面板",qq=()=>"بازگرداندن اندازهٔ پنل",j6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uq():t==="fa"?qq():Fq()}),Gq=()=>"Retry",Vq=()=>"重试",Wq=()=>"تلاش دوباره",Wu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vq():t==="fa"?Wq():Gq()}),Kq=()=>"Select a project to browse its files.",Yq=()=>"选择一个项目以浏览其文件。",Xq=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Zq=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yq():t==="fa"?Xq():Kq()}),Qq=()=>"settings",Jq=()=>"设置",eG=()=>"تنظیمات",tG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jq():t==="fa"?eG():Qq()}),nG=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,rG=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,sG=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,iG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rG(e):t==="fa"?sG(e):nG(e)}),aG=()=>"Sub-agent",oG=()=>"子智能体",lG=()=>"عامل فرعی",cG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oG():t==="fa"?lG():aG()}),uG=()=>"Table",dG=()=>"表格",fG=()=>"جدول",hG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dG():t==="fa"?fG():uG()}),_G=()=>"Tree",pG=()=>"树状图",mG=()=>"درخت",gG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pG():t==="fa"?mG():_G()}),vG=e=>`Collapse ${e==null?void 0:e.name}`,bG=e=>`折叠 ${e==null?void 0:e.name}`,xG=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,yG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bG(e):t==="fa"?xG(e):vG(e)}),wG=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,SG=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,kG=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,sE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SG(e):t==="fa"?kG(e):wG(e)}),CG=e=>`Delete folder ${e==null?void 0:e.name}`,EG=e=>`删除文件夹 ${e==null?void 0:e.name}`,NG=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,zG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EG(e):t==="fa"?NG(e):CG(e)}),AG=e=>`Expand ${e==null?void 0:e.name}`,TG=e=>`展开 ${e==null?void 0:e.name}`,jG=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,MG=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TG(e):t==="fa"?jG(e):AG(e)}),RG=()=>"Binary or unsupported file — no inline preview.",DG=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",LG=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",OG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DG():t==="fa"?LG():RG()}),IG=()=>"Copy path",BG=()=>"复制路径",$G=()=>"کپی مسیر",HG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BG():t==="fa"?$G():IG()}),PG=()=>"Artifact not found",FG=()=>"找不到产物",UG=()=>"خروجی پیدا نشد",qG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FG():t==="fa"?UG():PG()}),GG=()=>"Open raw",VG=()=>"打开原始文件",WG=()=>"باز کردن فایل خام",KG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VG():t==="fa"?WG():GG()}),YG=()=>"Click an artifact to view it",XG=()=>"点击产物即可查看",ZG=()=>"برای مشاهده، یک خروجی را انتخاب کنید",QG=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XG():t==="fa"?ZG():YG()}),JG=()=>"Copy artifacts directory path",eV=()=>"复制产物目录路径",tV=()=>"کپی مسیر پوشهٔ خروجی‌ها",nV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eV():t==="fa"?tV():JG()}),rV=()=>"Delete artifact",sV=()=>"删除产物",iV=()=>"حذف خروجی",M6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sV():t==="fa"?iV():rV()}),aV=()=>"Delete folder",oV=()=>"删除文件夹",lV=()=>"حذف پوشه",cV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oV():t==="fa"?lV():aV()}),uV=()=>"Failed to load:",dV=()=>"加载失败:",fV=()=>"بارگیری ناموفق بود:",hV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dV():t==="fa"?fV():uV()}),_V=()=>"File truncated — showing the first 512 KB.",pV=()=>"文件已截断——仅显示前 512 KB。",mV=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",gV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pV():t==="fa"?mV():_V()}),vV=()=>"Listing truncated — the folder has more artifacts.",bV=()=>"列表已截断——文件夹中还有更多产物。",xV=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",yV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bV():t==="fa"?xV():vV()}),wV=()=>"Loading…",SV=()=>"正在加载…",kV=()=>"در حال بارگیری…",CV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SV():t==="fa"?kV():wV()}),EV=()=>"Loading artifacts…",NV=()=>"正在加载产物…",zV=()=>"در حال بارگیری خروجی‌ها…",AV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NV():t==="fa"?zV():EV()}),TV=()=>"Modified",jV=()=>"修改时间",MV=()=>"ویرایش‌شده",RV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jV():t==="fa"?MV():TV()}),DV=()=>"No artifacts yet",LV=()=>"尚无产物",OV=()=>"هنوز خروجی‌ای وجود ندارد",IV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LV():t==="fa"?OV():DV()}),BV=()=>"Open raw in new tab",$V=()=>"在新标签页中打开原始文件",HV=()=>"باز کردن فایل خام در زبانهٔ جدید",R6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$V():t==="fa"?HV():BV()}),PV=()=>"Storage settings",FV=()=>"存储设置",UV=()=>"تنظیمات ذخیره‌سازی",D6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FV():t==="fa"?UV():PV()}),qV=()=>"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:",GV=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件:",VV=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید:",WV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GV():t==="fa"?VV():qV()}),KV=()=>"File too large to preview inline.",YV=()=>"文件太大,无法内嵌预览。",XV=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",ZV=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YV():t==="fa"?XV():KV()}),QV=()=>"This is the baseline branch, so there is no parent comparison.",JV=()=>"这是基线分支,因此没有父分支可供比较。",eW=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",tW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JV():t==="fa"?eW():QV()}),nW=()=>"Failed to load changes:",rW=()=>"加载更改失败:",sW=()=>"بارگیری تغییرات ناموفق بود:",iW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rW():t==="fa"?sW():nW()}),aW=()=>"Loading changes…",oW=()=>"正在加载更改…",lW=()=>"در حال بارگیری تغییرات…",cW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oW():t==="fa"?lW():aW()}),uW=()=>"No committed changes from the parent branch.",dW=()=>"与父分支相比没有已提交的更改。",fW=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",hW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dW():t==="fa"?fW():uW()}),_W=e=>`agent ${e==null?void 0:e.number}`,pW=e=>`智能体 ${e==null?void 0:e.number}`,mW=e=>`عامل ${e==null?void 0:e.number}`,L6=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pW(e):t==="fa"?mW(e):_W(e)}),gW=()=>"agent sessions",vW=()=>"智能体会话",bW=()=>"نشست‌های عامل‌ها",xW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vW():t==="fa"?bW():gW()}),yW=()=>"All sessions",wW=()=>"所有会话",SW=()=>"همهٔ نشست‌ها",kW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wW():t==="fa"?SW():yW()}),CW=e=>`${e==null?void 0:e.count} annotations`,EW=e=>`${e==null?void 0:e.count} 条批注`,NW=e=>`${e==null?void 0:e.count} یادداشت`,zW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?EW(e):t==="fa"?NW(e):CW(e)}),AW=()=>"Archive",TW=()=>"归档",jW=()=>"بایگانی",MW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TW():t==="fa"?jW():AW()}),RW=()=>"Ask the research agent… (/ for commands and skills)",DW=()=>"询问研究智能体…(输入 / 使用命令和技能)",LW=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها)",OW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DW():t==="fa"?LW():RW()}),IW=()=>"Asked about selected text",BW=()=>"已询问所选文本",$W=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",HW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BW():t==="fa"?$W():IW()}),PW=()=>"Attachment",FW=()=>"附件",UW=()=>"پیوست",qW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FW():t==="fa"?UW():PW()}),GW=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,VW=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,WW=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,KW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?VW(e):t==="fa"?WW(e):GW(e)}),YW=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",XW=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",ZW=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",QW=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XW():t==="fa"?ZW():YW()}),JW=()=>"Collapse tool activity",eK=()=>"折叠工具活动",tK=()=>"بستن فعالیت ابزارها",nK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eK():t==="fa"?tK():JW()}),rK=()=>"Continue",sK=()=>"继续",iK=()=>"ادامه",aK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sK():t==="fa"?iK():rK()}),oK=e=>`Delete “${e==null?void 0:e.title}”? -Its transcript will be permanently removed.`,XW=e=>`删除“${e==null?void 0:e.title}”? +Its transcript will be permanently removed.`,lK=e=>`删除“${e==null?void 0:e.title}”? -其对话记录将被永久移除。`,ZW=e=>`«${e==null?void 0:e.title}» حذف شود؟ +其对话记录将被永久移除。`,cK=e=>`«${e==null?void 0:e.title}» حذف شود؟ -رونوشت آن برای همیشه حذف خواهد شد.`,QW=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XW(e):t==="fa"?ZW(e):YW(e)}),JW=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,eK=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,tK=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,nK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eK(e):t==="fa"?tK(e):JW(e)}),rK=()=>"Could not exit Plan mode. Try again.",sK=()=>"无法退出计划模式。请重试。",iK=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",aK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sK():t==="fa"?iK():rK()}),oK=()=>"Expand tool activity",lK=()=>"展开工具活动",cK=()=>"باز کردن فعالیت ابزارها",uK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lK():t==="fa"?cK():oK()}),dK=()=>"experiments",fK=()=>"实验",hK=()=>"آزمایش‌ها",_K=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fK():t==="fa"?hK():dK()}),pK=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,mK=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,gK=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,vK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mK(e):t==="fa"?gK(e):pK(e)}),bK=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills)`,xK=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能)`,yK=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها)`,wK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xK(e):t==="fa"?yK(e):bK(e)}),SK=e=>`Message not sent: ${e==null?void 0:e.error}`,kK=e=>`消息未发送:${e==null?void 0:e.error}`,CK=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,EK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kK(e):t==="fa"?CK(e):SK(e)}),NK=()=>"New session",zK=()=>"新会话",AK=()=>"نشست جدید",j6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zK():t==="fa"?AK():NK()}),TK=()=>"No active sessions",jK=()=>"没有活跃会话",MK=()=>"نشست فعالی وجود ندارد",RK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jK():t==="fa"?MK():TK()}),DK=()=>"No activity",LK=()=>"无活动",OK=()=>"بدون فعالیت",IK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LK():t==="fa"?OK():DK()}),BK=()=>"No archived sessions",$K=()=>"没有已归档的会话",HK=()=>"نشست بایگانی‌شده‌ای وجود ندارد",PK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$K():t==="fa"?HK():BK()}),FK=()=>"No sessions yet",UK=()=>"还没有会话",qK=()=>"هنوز نشستی وجود ندارد",GK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UK():t==="fa"?qK():FK()}),VK=()=>"1 annotation",WK=()=>"1 条批注",KK=()=>"۱ یادداشت",YK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WK():t==="fa"?KK():VK()}),XK=()=>"Open sub-agent transcript",ZK=()=>"打开子智能体记录",QK=()=>"باز کردن متن گفت‌وگوی عامل فرعی",JK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZK():t==="fa"?QK():XK()}),eY=()=>"About this demo",tY=()=>"关于此演示",nY=()=>"دربارهٔ این نسخهٔ نمایشی",M6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tY():t==="fa"?nY():eY()}),rY=()=>"Accept and auto mode",sY=()=>"接受并使用自动模式",iY=()=>"پذیرش و حالت خودکار",aY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sY():t==="fa"?iY():rY()}),oY=()=>"Accept and bypass all",lY=()=>"接受并跳过所有审批",cY=()=>"پذیرش و عبور از همهٔ تأییدها",uY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lY():t==="fa"?cY():oY()}),dY=()=>"Active",fY=()=>"活跃",hY=()=>"فعال",_Y=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fY():t==="fa"?hY():dY()}),pY=()=>"All",mY=()=>"全部",gY=()=>"همه",vY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mY():t==="fa"?gY():pY()}),bY=()=>"Allow",xY=()=>"允许",yY=()=>"اجازه دادن",wY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xY():t==="fa"?yY():bY()}),SY=()=>"Approval required",kY=()=>"需要批准",CY=()=>"نیازمند تأیید",EY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kY():t==="fa"?CY():SY()}),NY=()=>"Archived",zY=()=>"已归档",AY=()=>"بایگانی‌شده",R6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zY():t==="fa"?AY():NY()}),TY=()=>"Artifacts",jY=()=>"产物",MY=()=>"خروجی‌ها",RY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jY():t==="fa"?MY():TY()}),DY=()=>"Ask about this",LY=()=>"询问此内容",OY=()=>"دربارهٔ این بپرسید",IY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LY():t==="fa"?OY():DY()}),BY=()=>"Attach a PDF or image",$Y=()=>"附加 PDF 或图片",HY=()=>"پیوست PDF یا تصویر",D6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Y():t==="fa"?HY():BY()}),PY=()=>"Browsed the web",FY=()=>"已浏览网页",UY=()=>"وب مرور شد",L6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FY():t==="fa"?UY():PY()}),qY=()=>"Built the project",GY=()=>"已构建项目",VY=()=>"پروژه ساخته شد",WY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GY():t==="fa"?VY():qY()}),KY=()=>"Cancel",YY=()=>"取消",XY=()=>"لغو",ZY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YY():t==="fa"?XY():KY()}),QY=()=>"Cancelled an experiment run",JY=()=>"已取消实验运行",eX=()=>"اجرای آزمایش لغو شد",tX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JY():t==="fa"?eX():QY()}),nX=()=>"Checked code style",rX=()=>"已检查代码风格",sX=()=>"سبک کد بررسی شد",iX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rX():t==="fa"?sX():nX()}),aX=()=>"Checked compute options",oX=()=>"已检查算力选项",lX=()=>"گزینه‌های رایانشی بررسی شد",cX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oX():t==="fa"?lX():aX()}),uX=()=>"Checked experiment status",dX=()=>"已检查实验状态",fX=()=>"وضعیت آزمایش بررسی شد",O6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dX():t==="fa"?fX():uX()}),hX=()=>"Checked Git status",_X=()=>"已检查 Git 状态",pX=()=>"وضعیت Git بررسی شد",mX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_X():t==="fa"?pX():hX()}),gX=()=>"Checked local times",vX=()=>"已查询当地时间",bX=()=>"زمان‌های محلی بررسی شد",xX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vX():t==="fa"?bX():gX()}),yX=()=>"Checked market data",wX=()=>"已查询市场数据",SX=()=>"داده‌های بازار بررسی شد",kX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wX():t==="fa"?SX():yX()}),CX=()=>"Checked sports data",EX=()=>"已查询体育数据",NX=()=>"داده‌های ورزشی بررسی شد",zX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EX():t==="fa"?NX():CX()}),AX=()=>"Checked the weather",TX=()=>"已查询天气",jX=()=>"آب‌وهوا بررسی شد",MX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TX():t==="fa"?jX():AX()}),RX=()=>"Checked types",DX=()=>"已检查类型",LX=()=>"نوع‌ها بررسی شد",OX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DX():t==="fa"?LX():RX()}),IX=()=>"Clear annotations",BX=()=>"清除批注",$X=()=>"پاک کردن یادداشت‌ها",I6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BX():t==="fa"?$X():IX()}),HX=()=>"Customize",PX=()=>"自定义",FX=()=>"سفارشی‌سازی",UX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PX():t==="fa"?FX():HX()}),qX=()=>"Data sources",GX=()=>"数据源",VX=()=>"منابع داده",q1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GX():t==="fa"?VX():qX()}),WX=()=>"Delegated a task to a new agent",KX=()=>"已将任务委派给新智能体",YX=()=>"وظیفه به عامل جدید واگذار شد",XX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KX():t==="fa"?YX():WX()}),ZX=()=>"Delete",QX=()=>"删除",JX=()=>"حذف",eZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QX():t==="fa"?JX():ZX()}),tZ=()=>"Deny",nZ=()=>"拒绝",rZ=()=>"رد کردن",sZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nZ():t==="fa"?rZ():tZ()}),iZ=()=>"Edit and re-send",aZ=()=>"编辑并重新发送",oZ=()=>"ویرایش و ارسال دوباره",B6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aZ():t==="fa"?oZ():iZ()}),lZ=()=>"Edit message",cZ=()=>"编辑消息",uZ=()=>"ویرایش پیام",dZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cZ():t==="fa"?uZ():lZ()}),fZ=()=>"Edited a file",hZ=()=>"已编辑文件",_Z=()=>"فایل ویرایش شد",$6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hZ():t==="fa"?_Z():fZ()}),pZ=()=>"Exit Plan mode",mZ=()=>"退出计划模式",gZ=()=>"خروج از حالت طرح",H6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mZ():t==="fa"?gZ():pZ()}),vZ=()=>"Experiments",bZ=()=>"实验",xZ=()=>"آزمایش‌ها",yZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bZ():t==="fa"?xZ():vZ()}),wZ=()=>"Failed:",SZ=()=>"失败:",kZ=()=>"ناموفق:",cx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SZ():t==="fa"?kZ():wZ()}),CZ=()=>"Files",EZ=()=>"文件",NZ=()=>"فایل‌ها",zZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EZ():t==="fa"?NZ():CZ()}),AZ=()=>"Filter sessions",TZ=()=>"筛选会话",jZ=()=>"فیلتر نشست‌ها",P6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TZ():t==="fa"?jZ():AZ()}),MZ=()=>"is unavailable.",RZ=()=>"不可用。",DZ=()=>"در دسترس نیست.",LZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RZ():t==="fa"?DZ():MZ()}),OZ=()=>"Later queued messages will wait until this is retried or removed.",IZ=()=>"后续排队的消息会等待此消息重试或移除。",BZ=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",$Z=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IZ():t==="fa"?BZ():OZ()}),HZ=()=>"Listed files",PZ=()=>"已列出文件",FZ=()=>"فایل‌ها فهرست شد",F6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PZ():t==="fa"?FZ():HZ()}),UZ=()=>"Listed project runs",qZ=()=>"已列出项目运行",GZ=()=>"اجراهای پروژه فهرست شد",VZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qZ():t==="fa"?GZ():UZ()}),WZ=()=>"Listed projects",KZ=()=>"已列出项目",YZ=()=>"پروژه‌ها فهرست شد",XZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KZ():t==="fa"?YZ():WZ()}),ZZ=()=>"Loading conversation…",QZ=()=>"正在加载对话…",JZ=()=>"در حال بارگیری گفتگو…",eQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QZ():t==="fa"?JZ():ZZ()}),tQ=()=>"Next version",nQ=()=>"下一版本",rQ=()=>"نسخهٔ بعدی",U6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nQ():t==="fa"?rQ():tQ()}),sQ=()=>"Open the session this agent spawned",iQ=()=>"打开此智能体创建的会话",aQ=()=>"باز کردن نشست ساخته‌شده توسط این عامل",oQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iQ():t==="fa"?aQ():sQ()}),lQ=()=>"Opened web pages",cQ=()=>"已打开网页",uQ=()=>"صفحه‌های وب باز شد",dQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cQ():t==="fa"?uQ():lQ()}),fQ=()=>"Plan",hQ=()=>"计划",_Q=()=>"طرح",pQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hQ():t==="fa"?_Q():fQ()}),mQ=()=>"Plan approved",gQ=()=>"计划已批准",vQ=()=>"طرح تأیید شد",bQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gQ():t==="fa"?vQ():mQ()}),xQ=()=>"Plan rejected",yQ=()=>"计划已拒绝",wQ=()=>"طرح رد شد",SQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yQ():t==="fa"?wQ():xQ()}),kQ=()=>"Plan resolved",CQ=()=>"计划已处理",EQ=()=>"طرح تعیین تکلیف شد",NQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CQ():t==="fa"?EQ():kQ()}),zQ=()=>"Plan revision requested",AQ=()=>"已请求修改计划",TQ=()=>"درخواست بازنگری طرح ثبت شد",jQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AQ():t==="fa"?TQ():zQ()}),MQ=()=>"Previous version",RQ=()=>"上一版本",DQ=()=>"نسخهٔ قبلی",q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RQ():t==="fa"?DQ():MQ()}),LQ=()=>"Ran a command",OQ=()=>"已运行命令",IQ=()=>"فرمان اجرا شد",BQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OQ():t==="fa"?IQ():LQ()}),$Q=()=>"Ran tests",HQ=()=>"已运行测试",PQ=()=>"آزمون‌ها اجرا شد",FQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HQ():t==="fa"?PQ():$Q()}),UQ=()=>"Read a file",qQ=()=>"已读取文件",GQ=()=>"فایل خوانده شد",VQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qQ():t==="fa"?GQ():UQ()}),WQ=()=>"Read Git history",KQ=()=>"已读取 Git 历史",YQ=()=>"تاریخچهٔ Git خوانده شد",XQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KQ():t==="fa"?YQ():WQ()}),ZQ=()=>"Read project details",QQ=()=>"已读取项目详情",JQ=()=>"جزئیات پروژه خوانده شد",eJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QQ():t==="fa"?JQ():ZQ()}),tJ=()=>"Reject",nJ=()=>"拒绝",rJ=()=>"رد کردن",sJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nJ():t==="fa"?rJ():tJ()}),iJ=()=>"Remove",aJ=()=>"移除",oJ=()=>"حذف",lJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aJ():t==="fa"?oJ():iJ()}),cJ=()=>"Remove annotation",uJ=()=>"移除批注",dJ=()=>"حذف یادداشت",fJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uJ():t==="fa"?dJ():cJ()}),hJ=()=>"Remove file",_J=()=>"移除文件",pJ=()=>"حذف فایل",G6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_J():t==="fa"?pJ():hJ()}),mJ=()=>"Remove image",gJ=()=>"移除图片",vJ=()=>"حذف تصویر",V6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gJ():t==="fa"?vJ():mJ()}),bJ=()=>"Remove queued message",xJ=()=>"移除排队消息",yJ=()=>"حذف پیام صف",W6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xJ():t==="fa"?yJ():bJ()}),wJ=()=>"Rename",SJ=()=>"重命名",kJ=()=>"تغییر نام",CJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SJ():t==="fa"?kJ():wJ()}),EJ=()=>"Reviewed code changes",NJ=()=>"已审查代码更改",zJ=()=>"تغییرات کد بازبینی شد",AJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NJ():t==="fa"?zJ():EJ()}),TJ=()=>"Selected chat text",jJ=()=>"已选聊天文本",MJ=()=>"متن انتخاب‌شدهٔ گفتگو",RJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jJ():t==="fa"?MJ():TJ()}),DJ=()=>"Selected text:",LJ=()=>"已选文本:",OJ=()=>"متن انتخاب‌شده:",IJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LJ():t==="fa"?OJ():DJ()}),BJ=()=>"Send",$J=()=>"发送",HJ=()=>"ارسال",xb=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$J():t==="fa"?HJ():BJ()}),PJ=()=>"Session options",FJ=()=>"会话选项",UJ=()=>"گزینه‌های نشست",K6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FJ():t==="fa"?UJ():PJ()}),qJ=()=>"Session title",GJ=()=>"会话标题",VJ=()=>"عنوان نشست",WJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GJ():t==="fa"?VJ():qJ()}),KJ=()=>"Show sidebar",YJ=()=>"显示侧边栏",XJ=()=>"نمایش نوار کناری",Y6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YJ():t==="fa"?XJ():KJ()}),ZJ=()=>"Started an experiment run",QJ=()=>"已启动实验运行",JJ=()=>"اجرای آزمایش آغاز شد",eee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QJ():t==="fa"?JJ():ZJ()}),tee=()=>"Reading the project to suggest where to start…",nee=()=>"正在阅读项目以建议从哪里开始…",ree=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",see=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nee():t==="fa"?ree():tee()}),iee=()=>"Starter prompts",aee=()=>"入门提示",oee=()=>"پیشنهادهای شروع",lee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aee():t==="fa"?oee():iee()}),cee=()=>"Stop",uee=()=>"停止",dee=()=>"توقف",X6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uee():t==="fa"?dee():cee()}),fee=()=>"Submit",hee=()=>"提交",_ee=()=>"ارسال",pee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hee():t==="fa"?_ee():fee()}),mee=()=>"Task",gee=()=>"任务",vee=()=>"وظیفه",bee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gee():t==="fa"?vee():mee()}),xee=()=>"Tool failed",yee=()=>"工具失败",wee=()=>"ابزار ناموفق بود",See=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yee():t==="fa"?wee():xee()}),kee=()=>"Used tools",Cee=()=>"已使用工具",Eee=()=>"ابزارها استفاده شد",J9=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cee():t==="fa"?Eee():kee()}),Nee=()=>"View full plan",zee=()=>"查看完整计划",Aee=()=>"مشاهدهٔ طرح کامل",Tee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zee():t==="fa"?Aee():Nee()}),jee=()=>"Waited for an experiment run",Mee=()=>"已等待实验运行",Ree=()=>"برای اجرای آزمایش صبر شد",Dee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mee():t==="fa"?Ree():jee()}),Lee=()=>"Waiting for your input…",Oee=()=>"正在等待你的输入…",Iee=()=>"منتظر ورودی شما…",Bee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oee():t==="fa"?Iee():Lee()}),$ee=()=>"What should we research?",Hee=()=>"我们应该研究什么?",Pee=()=>"چه چیزی را پژوهش کنیم؟",Fee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hee():t==="fa"?Pee():$ee()}),Uee=()=>"You, mid-task",qee=()=>"你(任务进行中)",Gee=()=>"شما، هنگام انجام وظیفه",Vee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qee():t==="fa"?Gee():Uee()}),Wee=()=>"Pasted image",Kee=()=>"粘贴的图片",Yee=()=>"تصویر جای‌گذاری‌شده",Xee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kee():t==="fa"?Yee():Wee()}),Zee=()=>"Plan",Qee=()=>"计划",Jee=()=>"طرح",eE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qee():t==="fa"?Jee():Zee()}),ete=()=>"Plan mode — ready to proceed?",tte=()=>"计划模式 — 准备好继续了吗?",nte=()=>"حالت طرح — آماده‌اید ادامه دهید؟",rte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tte():t==="fa"?nte():ete()}),ste=()=>"Proposed plan",ite=()=>"提议的计划",ate=()=>"طرح پیشنهادی",Z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ite():t==="fa"?ate():ste()}),ote=()=>"Question",lte=()=>"问题",cte=()=>"پرسش",ute=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lte():t==="fa"?cte():ote()}),dte=()=>"Queued",fte=()=>"已排队",hte=()=>"در صف",_te=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fte():t==="fa"?hte():dte()}),pte=()=>"Recents",mte=()=>"最近",gte=()=>"اخیر",tE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mte():t==="fa"?gte():pte()}),vte=()=>"Re-check its setup.",bte=()=>"请重新检查其设置。",xte=()=>"راه‌اندازی آن را دوباره بررسی کنید.",yte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bte():t==="fa"?xte():vte()}),wte=()=>"Could not recover this turn. Try again.",Ste=()=>"无法恢复本轮。请重试。",kte=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",Cte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ste():t==="fa"?kte():wte()}),Ete=()=>"Could not remove the queued message. Try again.",Nte=()=>"无法移除排队消息。请重试。",zte=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",Ate=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nte():t==="fa"?zte():Ete()}),Tte=e=>`Could not re-send: ${e==null?void 0:e.error}`,jte=e=>`无法重新发送:${e==null?void 0:e.error}`,Mte=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,Rte=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jte(e):t==="fa"?Mte(e):Tte(e)}),Dte=()=>"Resolved",Lte=()=>"已处理",Ote=()=>"رسیدگی شد",Ite=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lte():t==="fa"?Ote():Dte()}),Bte=()=>"Could not retry the queued message. Try again.",$te=()=>"无法重试排队消息。请重试。",Hte=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Pte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$te():t==="fa"?Hte():Bte()}),Fte=()=>"run logs",Ute=()=>"运行日志",qte=()=>"گزارش‌های اجرا",Gte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ute():t==="fa"?qte():Fte()}),Vte=()=>"Scroll to bottom",Wte=()=>"滚动到底部",Kte=()=>"رفتن به پایین گفتگو",Q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wte():t==="fa"?Kte():Vte()}),Yte=()=>"The selected harness is unavailable",Xte=()=>"所选智能体工具不可用",Zte=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",J6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xte():t==="fa"?Zte():Yte()}),Qte=()=>"The chat session was not created",Jte=()=>"未能创建聊天会话",ene=()=>"نشست گفت‌وگو ایجاد نشد",tne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jte():t==="fa"?ene():Qte()}),nne=()=>" · Spawned by another agent",rne=()=>" · 由另一个智能体创建",sne=()=>" · ساخته‌شده به‌دست عامل دیگر",ine=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rne():t==="fa"?sne():nne()}),ane=()=>"Starting…",one=()=>"正在启动…",lne=()=>"در حال شروع…",cne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?one():t==="fa"?lne():ane()}),une=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,dne=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,fne=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,hne=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?dne(e):t==="fa"?fne(e):une(e)}),_ne=()=>"Could not stop the turn. Try again.",pne=()=>"无法停止本轮。请重试。",mne=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",gne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pne():t==="fa"?mne():_ne()}),vne=e=>`Could not switch fork: ${e==null?void 0:e.error}`,bne=e=>`无法切换分支:${e==null?void 0:e.error}`,xne=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,yne=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bne(e):t==="fa"?xne(e):vne(e)}),wne=()=>"The agent",Sne=()=>"智能体",kne=()=>"عامل",Cne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sne():t==="fa"?kne():wne()}),Ene=()=>"Thinking",Nne=()=>"正在思考",zne=()=>"در حال فکر کردن",Ane=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nne():t==="fa"?zne():Ene()}),Tne=()=>"Could not toggle Plan mode. Try again.",jne=()=>"无法切换计划模式。请重试。",Mne=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",e7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jne():t==="fa"?Mne():Tne()}),Rne=()=>"This turn did not finish.",Dne=()=>"本轮未完成。",Lne=()=>"این نوبت کامل نشد.",One=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dne():t==="fa"?Lne():Rne()}),Ine=()=>"Type a custom answer…",Bne=()=>"输入自定义回答…",$ne=()=>"پاسخ دلخواه را بنویسید…",Hne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bne():t==="fa"?$ne():Ine()}),Pne=()=>"Unarchive",Fne=()=>"取消归档",Une=()=>"خارج کردن از بایگانی",qne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fne():t==="fa"?Une():Pne()}),Gne=()=>"Untitled",Vne=()=>"未命名",Wne=()=>"بدون عنوان",G1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vne():t==="fa"?Wne():Gne()}),Kne=()=>"Could not update permissions. Try again.",Yne=()=>"无法更新权限。请重试。",Xne=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Zne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yne():t==="fa"?Xne():Kne()}),Qne=()=>"Working…",Jne=()=>"正在工作…",ere=()=>"در حال کار…",ux=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jne():t==="fa"?ere():Qne()}),tre=()=>"Close tab",nre=()=>"关闭标签页",rre=()=>"بستن زبانه",sre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nre():t==="fa"?rre():tre()}),ire=()=>"Changes",are=()=>"更改",ore=()=>"تغییرات",lre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?are():t==="fa"?ore():ire()}),cre=()=>"Code browser view",ure=()=>"代码浏览器视图",dre=()=>"نمای مرورگر کد",fre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ure():t==="fa"?dre():cre()}),hre=()=>"Files",_re=()=>"文件",pre=()=>"فایل‌ها",mre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_re():t==="fa"?pre():hre()}),gre=()=>"Refresh",vre=()=>"刷新",bre=()=>"تازه‌سازی",t7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vre():t==="fa"?bre():gre()}),xre=()=>"listing truncated",yre=()=>"列表已截断",wre=()=>"فهرست کوتاه شده است",Sre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yre():t==="fa"?wre():xre()}),kre=()=>"No files.",Cre=()=>"没有文件。",Ere=()=>"فایلی وجود ندارد.",Nre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cre():t==="fa"?Ere():kre()}),zre=()=>"Refresh failed:",Are=()=>"刷新失败:",Tre=()=>"تازه‌سازی ناموفق بود:",jre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Are():t==="fa"?Tre():zre()}),Mre=()=>"Cancelling…",Rre=()=>"正在取消…",Dre=()=>"در حال لغو…",Lre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rre():t==="fa"?Dre():Mre()}),Ore=()=>"Checking…",Ire=()=>"正在检查…",Bre=()=>"در حال بررسی…",jp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ire():t==="fa"?Bre():Ore()}),$re=()=>"Copied",Hre=()=>"已复制",Pre=()=>"کپی شد",Y0=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hre():t==="fa"?Pre():$re()}),Fre=e=>`Failed to load: ${e==null?void 0:e.error}`,Ure=e=>`加载失败:${e==null?void 0:e.error}`,qre=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,nE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ure(e):t==="fa"?qre(e):Fre(e)}),Gre=()=>"Loading…",Vre=()=>"正在加载…",Wre=()=>"در حال بارگیری…",rE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vre():t==="fa"?Wre():Gre()}),Kre=e=>`+ ${e==null?void 0:e.count} more`,Yre=e=>`另有 ${e==null?void 0:e.count} 项`,Xre=e=>`${e==null?void 0:e.count}+ مورد دیگر`,Zre=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yre(e):t==="fa"?Xre(e):Kre(e)}),Qre=()=>"Rendered view",Jre=()=>"渲染视图",ese=()=>"نمای رندرشده",X0=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jre():t==="fa"?ese():Qre()}),tse=()=>"Save",nse=()=>"保存",rse=()=>"ذخیره",kc=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nse():t==="fa"?rse():tse()}),sse=()=>"Saving…",ise=()=>"正在保存…",ase=()=>"در حال ذخیره…",ja=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ise():t==="fa"?ase():sse()}),ose=()=>"Show less",lse=()=>"收起",cse=()=>"نمایش کمتر",sE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lse():t==="fa"?cse():ose()}),use=()=>"Show more",dse=()=>"展开",fse=()=>"نمایش بیشتر",hse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dse():t==="fa"?fse():use()}),_se=()=>"Stop",pse=()=>"停止",mse=()=>"توقف",iE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pse():t==="fa"?mse():_se()}),gse=()=>"Stopping…",vse=()=>"正在停止…",bse=()=>"در حال توقف…",xse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vse():t==="fa"?bse():gse()}),yse=()=>"View source",wse=()=>"查看源代码",Sse=()=>"نمایش متن منبع",zu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wse():t==="fa"?Sse():yse()}),kse=e=>`Hugging Face token — ${e==null?void 0:e.summary}`,Cse=e=>`Hugging Face 令牌 — ${e==null?void 0:e.summary}`,Ese=e=>`توکن Hugging Face — ${e==null?void 0:e.summary}`,Nse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cse(e):t==="fa"?Ese(e):kse(e)}),zse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Ase=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Tse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,jse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ase(e):t==="fa"?Tse(e):zse(e)}),Mse=()=>"No credentials required; this computer is always available.",Rse=()=>"无需凭据;此计算机始终可用。",Dse=()=>"نیازی به اطلاعات ورود نیست؛ این رایانه همیشه در دسترس است.",Lse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rse():t==="fa"?Dse():Mse()}),Ose=e=>`Modal token — ${e==null?void 0:e.summary}`,Ise=e=>`Modal 令牌 — ${e==null?void 0:e.summary}`,Bse=e=>`توکن Modal — ${e==null?void 0:e.summary}`,$se=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ise(e):t==="fa"?Bse(e):Ose(e)}),Hse=e=>`OpenResearch login and SSH key — ${e==null?void 0:e.summary}`,Pse=e=>`OpenResearch 登录信息和 SSH 密钥 — ${e==null?void 0:e.summary}`,Fse=e=>`ورود OpenResearch و کلید SSH — ${e==null?void 0:e.summary}`,Use=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pse(e):t==="fa"?Fse(e):Hse(e)}),qse=e=>`Ray Jobs endpoint — ${e==null?void 0:e.summary}`,Gse=e=>`Ray Jobs 端点 — ${e==null?void 0:e.summary}`,Vse=e=>`endpoint مربوط به Ray Jobs — ${e==null?void 0:e.summary}`,Wse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Gse(e):t==="fa"?Vse(e):qse(e)}),Kse=e=>`SSH config — ${e==null?void 0:e.summary}`,Yse=e=>`SSH 配置 — ${e==null?void 0:e.summary}`,Xse=e=>`پیکربندی SSH — ${e==null?void 0:e.summary}`,Zse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yse(e):t==="fa"?Xse(e):Kse(e)}),Qse=e=>`SSH config and keys — ${e==null?void 0:e.summary}`,Jse=e=>`SSH 配置和密钥 — ${e==null?void 0:e.summary}`,eie=e=>`پیکربندی و کلیدهای SSH — ${e==null?void 0:e.summary}`,tie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jse(e):t==="fa"?eie(e):Qse(e)}),nie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,rie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,sie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,iie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rie(e):t==="fa"?sie(e):nie(e)}),aie=()=>"Runs as a remote Hugging Face Job",oie=()=>"作为远程 Hugging Face Job 运行",lie=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oie():t==="fa"?lie():aie()}),uie=()=>"Runs as a Job on your Kubernetes cluster",die=()=>"作为 Kubernetes 集群上的 Job 运行",fie=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",hie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?die():t==="fa"?fie():uie()}),_ie=()=>"Runs directly on this computer",pie=()=>"直接在此计算机上运行",mie=()=>"مستقیماً روی این رایانه اجرا می‌شود",gie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pie():t==="fa"?mie():_ie()}),vie=()=>"Runs in a remote Modal sandbox",bie=()=>"在远程 Modal 沙箱中运行",xie=()=>"در sandbox دوردست Modal اجرا می‌شود",yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bie():t==="fa"?xie():vie()}),wie=()=>"Runs on an ephemeral OpenResearch box",Sie=()=>"在临时 OpenResearch 主机上运行",kie=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",Cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sie():t==="fa"?kie():wie()}),Eie=()=>"Runs on the connected Ray cluster",Nie=()=>"在已连接的 Ray 集群上运行",zie=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",Aie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nie():t==="fa"?zie():Eie()}),Tie=()=>"Runs as a scheduled job on your Slurm cluster",jie=()=>"作为 Slurm 集群上的调度作业运行",Mie=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",Rie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jie():t==="fa"?Mie():Tie()}),Die=()=>"Runs on a host from your SSH config",Lie=()=>"在 SSH 配置中的主机上运行",Oie=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",Iie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lie():t==="fa"?Oie():Die()}),Bie=()=>"Runs through Tinker’s remote compute",$ie=()=>"通过 Tinker 远程算力运行",Hie=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Pie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ie():t==="fa"?Hie():Bie()}),Fie=()=>"HF Jobs",Uie=()=>"HF Jobs",qie=()=>"HF Jobs",Gie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uie():t==="fa"?qie():Fie()}),Vie=()=>"Kubernetes",Wie=()=>"Kubernetes",Kie=()=>"Kubernetes",Yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wie():t==="fa"?Kie():Vie()}),Xie=()=>"This machine",Zie=()=>"此计算机",Qie=()=>"این رایانه",aE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zie():t==="fa"?Qie():Xie()}),Jie=()=>"Modal",eae=()=>"Modal",tae=()=>"Modal",nae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eae():t==="fa"?tae():Jie()}),rae=()=>"OpenResearch",sae=()=>"OpenResearch",iae=()=>"OpenResearch",aae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sae():t==="fa"?iae():rae()}),oae=()=>"Ray",lae=()=>"Ray",cae=()=>"Ray",uae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lae():t==="fa"?cae():oae()}),dae=()=>"Slurm",fae=()=>"Slurm",hae=()=>"Slurm",_ae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fae():t==="fa"?hae():dae()}),pae=()=>"SSH",mae=()=>"SSH",gae=()=>"SSH",vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mae():t==="fa"?gae():pae()}),bae=()=>"Tinker",xae=()=>"Tinker",yae=()=>"Tinker",wae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xae():t==="fa"?yae():bae()}),Sae=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",kae=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",Cae=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",Eae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kae():t==="fa"?Cae():Sae()}),Nae=()=>"A Kubernetes Job is created in the selected context and namespace from the project’s .orx/k8s.yaml manifest.",zae=()=>"系统根据项目的 .orx/k8s.yaml 清单,在所选上下文和命名空间中创建 Kubernetes Job。",Aae=()=>"بر پایهٔ مانیفست .orx/k8s.yaml پروژه، یک Kubernetes Job در زمینه و فضای نام انتخاب‌شده ساخته می‌شود.",Tae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zae():t==="fa"?Aae():Nae()}),jae=()=>"The experiment runs as a supervised process on this computer and uses its CPU, memory, and GPUs.",Mae=()=>"实验作为受监管进程在此计算机上运行,并使用其 CPU、内存和 GPU。",Rae=()=>"آزمایش به‌صورت فرایندی تحت نظارت روی این رایانه اجرا می‌شود و از CPU، حافظه و GPUهای آن استفاده می‌کند.",Dae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mae():t==="fa"?Rae():jae()}),Lae=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",Oae=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Iae=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",Bae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oae():t==="fa"?Iae():Lae()}),$ae=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",Hae=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Pae=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",Fae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hae():t==="fa"?Pae():$ae()}),Uae=()=>"The run is submitted to the Ray Jobs endpoint, and the connected Ray cluster executes it.",qae=()=>"运行会提交到 Ray Jobs 端点,并由已连接的 Ray 集群执行。",Gae=()=>"اجرا به endpoint مربوط به Ray Jobs فرستاده و توسط خوشهٔ متصل Ray اجرا می‌شود.",Vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qae():t==="fa"?Gae():Uae()}),Wae=()=>"The login node receives an sbatch job using the saved partition, account, and time limit; the cluster schedules the work.",Kae=()=>"登录节点使用已保存的分区、账户和时间限制接收 sbatch 作业;集群负责调度。",Yae=()=>"گرهٔ ورود یک کار sbatch با پارتیشن، حساب و محدودیت زمانی ذخیره‌شده دریافت می‌کند و خوشه آن را زمان‌بندی می‌کند.",Xae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kae():t==="fa"?Yae():Wae()}),Zae=()=>"The project is copied to the selected SSH host and runs there. Logs and status return to this dashboard.",Qae=()=>"项目会复制到所选 SSH 主机并在那里运行。日志和状态会返回此控制台。",Jae=()=>"پروژه به میزبان SSH انتخاب‌شده کپی و همان‌جا اجرا می‌شود. گزارش‌ها و وضعیت به این داشبورد برمی‌گردند.",eoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qae():t==="fa"?Jae():Zae()}),toe=()=>"A controller runs here while the Tinker SDK sends model operations to remote compute. This computer must stay awake and online.",noe=()=>"控制器在此计算机上运行,Tinker SDK 将模型操作发送到远程算力。此计算机必须保持唤醒和联网。",roe=()=>"کنترل‌گر روی این رایانه اجرا می‌شود و Tinker SDK عملیات مدل را به رایانش دوردست می‌فرستد. این رایانه باید روشن و آنلاین بماند.",soe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?noe():t==="fa"?roe():toe()}),ioe=()=>"Context window",aoe=()=>"上下文窗口",ooe=()=>"پنجرهٔ زمینه",loe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aoe():t==="fa"?ooe():ioe()}),coe=()=>"Context window used",uoe=()=>"已使用的上下文窗口",doe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",foe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uoe():t==="fa"?doe():coe()}),hoe=e=>`${e==null?void 0:e.value} tokens`,_oe=e=>`${e==null?void 0:e.value} 个 token`,poe=e=>`${e==null?void 0:e.value} توکن`,moe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_oe(e):t==="fa"?poe(e):hoe(e)}),goe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,voe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,boe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,xoe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?voe(e):t==="fa"?boe(e):goe(e)}),yoe=()=>"No runs yet — ask the agent to launch one.",woe=()=>"尚无运行——让智能体启动一个。",Soe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",koe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?woe():t==="fa"?Soe():yoe()}),Coe=()=>"Run",Eoe=()=>"运行",Noe=()=>"اجرا",n7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eoe():t==="fa"?Noe():Coe()}),zoe=()=>"Switch run",Aoe=()=>"切换运行",Toe=()=>"تغییر اجرا",joe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aoe():t==="fa"?Toe():zoe()}),Moe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,Roe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,Doe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,Loe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Roe(e):t==="fa"?Doe(e):Moe(e)}),Ooe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,Ioe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,Boe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,$oe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ioe(e):t==="fa"?Boe(e):Ooe(e)}),Hoe=e=>`${e==null?void 0:e.value}m`,Poe=e=>`${e==null?void 0:e.value} 分钟`,Foe=e=>`${e==null?void 0:e.value} دقیقه`,Uoe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Poe(e):t==="fa"?Foe(e):Hoe(e)}),qoe=e=>`${e==null?void 0:e.value}s`,Goe=e=>`${e==null?void 0:e.value} 秒`,Voe=e=>`${e==null?void 0:e.value} ثانیه`,Woe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Goe(e):t==="fa"?Voe(e):qoe(e)}),Koe=()=>"Code",Yoe=()=>"代码",Xoe=()=>"کد",Zoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yoe():t==="fa"?Xoe():Koe()}),Qoe=()=>"created",Joe=()=>"创建于",ele=()=>"ایجادشده",tle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Joe():t==="fa"?ele():Qoe()}),nle=()=>"from",rle=()=>"来自",sle=()=>"از",ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rle():t==="fa"?sle():nle()}),ale=()=>"Logs",ole=()=>"日志",lle=()=>"گزارش‌ها",cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ole():t==="fa"?lle():ale()}),ule=()=>"Latest run",dle=()=>"最新运行",fle=()=>"آخرین اجرا",hle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dle():t==="fa"?fle():ule()}),_le=()=>"Code",ple=()=>"代码",mle=()=>"کد",gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ple():t==="fa"?mle():_le()}),vle=()=>"Commit",ble=()=>"提交",xle=()=>"کامیت",yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ble():t==="fa"?xle():vle()}),wle=()=>"created",Sle=()=>"创建于",kle=()=>"ایجادشده",Cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sle():t==="fa"?kle():wle()}),Ele=()=>"Description",Nle=()=>"说明",zle=()=>"توضیحات",Ale=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nle():t==="fa"?zle():Ele()}),Tle=()=>"Duration",jle=()=>"时长",Mle=()=>"مدت",Rle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jle():t==="fa"?Mle():Tle()}),Dle=()=>"exit",Lle=()=>"退出码",Ole=()=>"خروج",Ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lle():t==="fa"?Ole():Dle()}),Ble=()=>"from",$le=()=>"来自",Hle=()=>"از",Ple=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$le():t==="fa"?Hle():Ble()}),Fle=()=>"Logs",Ule=()=>"日志",qle=()=>"گزارش‌ها",Gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ule():t==="fa"?qle():Fle()}),Vle=()=>"Run",Wle=()=>"运行",Kle=()=>"اجرا",Yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wle():t==="fa"?Kle():Vle()}),Xle=()=>"Run history",Zle=()=>"运行历史",Qle=()=>"تاریخچهٔ اجرا",Jle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zle():t==="fa"?Qle():Xle()}),ece=()=>"Started",tce=()=>"开始时间",nce=()=>"آغاز",rce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tce():t==="fa"?nce():ece()}),sce=()=>"Runs",ice=()=>"运行",ace=()=>"اجراها",oce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ice():t==="fa"?ace():sce()}),lce=()=>"No runs yet",cce=()=>"还没有运行",uce=()=>"هنوز اجرایی وجود ندارد",dce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cce():t==="fa"?uce():lce()}),fce=()=>"No experiments yet.",hce=()=>"还没有实验。",_ce=()=>"هنوز آزمایشی وجود ندارد.",pce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hce():t==="fa"?_ce():fce()}),mce=()=>"Not run yet",gce=()=>"尚未运行",vce=()=>"هنوز اجرا نشده",bce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gce():t==="fa"?vce():mce()}),xce=()=>"1 run",yce=()=>"1 次运行",wce=()=>"۱ اجرا",Sce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yce():t==="fa"?wce():xce()}),kce=()=>"Open logs",Cce=()=>"打开日志",Ece=()=>"باز کردن گزارش‌ها",Nce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cce():t==="fa"?Ece():kce()}),zce=e=>`${e==null?void 0:e.count} runs`,Ace=e=>`${e==null?void 0:e.count} 次运行`,Tce=e=>`${e==null?void 0:e.count} اجرا`,jce=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ace(e):t==="fa"?Tce(e):zce(e)}),Mce=()=>"Stop requested",Rce=()=>"已请求停止",Dce=()=>"درخواست توقف ثبت شد",Lce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rce():t==="fa"?Dce():Mce()}),Oce=()=>"Stop run",Ice=()=>"停止运行",Bce=()=>"توقف اجرا",$ce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ice():t==="fa"?Bce():Oce()}),Hce=()=>"Code",Pce=()=>"代码",Fce=()=>"کد",Uce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pce():t==="fa"?Fce():Hce()}),qce=()=>"Experiments",Gce=()=>"实验",Vce=()=>"آزمایش‌ها",Wce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gce():t==="fa"?Vce():qce()}),Kce=()=>"Logs",Yce=()=>"日志",Xce=()=>"گزارش‌ها",Zce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yce():t==="fa"?Xce():Kce()}),Qce=()=>"Stop failed:",Jce=()=>"停止失败:",eue=()=>"توقف ناموفق بود:",tue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jce():t==="fa"?eue():Qce()}),nue=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,rue=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,sue=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,iue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rue(e):t==="fa"?sue(e):nue(e)}),aue=()=>"Binary file — no inline preview.",oue=()=>"二进制文件——无法内嵌预览。",lue=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",cue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oue():t==="fa"?lue():aue()}),uue=()=>"Compile failed",due=()=>"编译失败",fue=()=>"کامپایل ناموفق بود",hue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?due():t==="fa"?fue():uue()}),_ue=()=>"Compile PDF",pue=()=>"编译 PDF",mue=()=>"کامپایل PDF",r7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pue():t==="fa"?mue():_ue()}),gue=()=>"Compiled, but the engine reported errors — check the output below.",vue=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",bue=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",xue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vue():t==="fa"?bue():gue()}),yue=()=>"Copy command",wue=()=>"复制命令",Sue=()=>"کپی فرمان",kue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wue():t==="fa"?Sue():yue()}),Cue=()=>"Copy install command",Eue=()=>"复制安装命令",Nue=()=>"کپی فرمان نصب",zue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eue():t==="fa"?Nue():Cue()}),Aue=()=>"Discard my edits and reload",Tue=()=>"放弃我的编辑并重新加载",jue=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",Mue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tue():t==="fa"?jue():Aue()}),Rue=()=>"Dismiss",Due=()=>"关闭",Lue=()=>"بستن",s7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Due():t==="fa"?Lue():Rue()}),Oue=()=>"Dismiss compile message",Iue=()=>"关闭编译消息",Bue=()=>"بستن پیام کامپایل",$ue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iue():t==="fa"?Bue():Oue()}),Hue=()=>"Dismiss Overleaf message",Pue=()=>"关闭 Overleaf 消息",Fue=()=>"بستن پیام Overleaf",Uue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pue():t==="fa"?Fue():Hue()}),que=()=>"Download",Gue=()=>"下载",Vue=()=>"بارگیری",oE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gue():t==="fa"?Vue():que()}),Wue=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Kue=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,Yue=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,Xue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Kue(e):t==="fa"?Yue(e):Wue(e)}),Zue=()=>"Failed to load file:",Que=()=>"加载文件失败:",Jue=()=>"بارگیری فایل ناموفق بود:",ede=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Que():t==="fa"?Jue():Zue()}),tde=()=>"File truncated — showing the first 512 KB.",nde=()=>"文件已截断——仅显示前 512 KB。",rde=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",sde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nde():t==="fa"?rde():tde()}),ide=()=>"The page below stops partway — the full file could not be loaded.",ade=()=>"下方页面在中途结束——无法加载完整文件。",ode=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",lde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ade():t==="fa"?ode():ide()}),cde=e=>`Rendered HTML: ${e==null?void 0:e.name}`,ude=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,dde=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,fde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ude(e):t==="fa"?dde(e):cde(e)}),hde=()=>"Loading…",_de=()=>"正在加载…",pde=()=>"در حال بارگیری…",lE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_de():t==="fa"?pde():hde()}),mde=()=>"File not found.",gde=()=>"找不到文件。",vde=()=>"فایل پیدا نشد.",bde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gde():t==="fa"?vde():mde()}),xde=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,yde=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,wde=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,Sde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yde(e):t==="fa"?wde(e):xde(e)}),kde=e=>`File not found on branch ${e==null?void 0:e.branch}.`,Cde=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Ede=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,Nde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cde(e):t==="fa"?Ede(e):kde(e)}),zde=()=>"File not found on disk.",Ade=()=>"磁盘上找不到此文件。",Tde=()=>"فایل روی دیسک پیدا نشد.",jde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ade():t==="fa"?Tde():zde()}),Mde=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Rde=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,Dde=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Lde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rde(e):t==="fa"?Dde(e):Mde(e)}),Ode=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Ide=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Bde=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,$de=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ide(e):t==="fa"?Bde(e):Ode(e)}),Hde=()=>"Open in default editor",Pde=()=>"在默认编辑器中打开",Fde=()=>"باز کردن در ویرایشگر پیش‌فرض",i7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pde():t==="fa"?Fde():Hde()}),Ude=()=>"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.",qde=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",Gde=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",Vde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qde():t==="fa"?Gde():Ude()}),Wde=()=>"Compiled PDF is out of date",Kde=()=>"已编译的 PDF 不是最新版本",Yde=()=>"PDF کامپایل‌شده به‌روز نیست",Xde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kde():t==="fa"?Yde():Wde()}),Zde=()=>"project clone",Qde=()=>"项目克隆",Jde=()=>"کلون پروژه",G_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qde():t==="fa"?Jde():Zde()}),efe=()=>"Recompile PDF",tfe=()=>"重新编译 PDF",nfe=()=>"کامپایل دوبارهٔ PDF",a7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tfe():t==="fa"?nfe():efe()}),rfe=()=>"Reload file",sfe=()=>"重新加载文件",ife=()=>"بارگیری دوبارهٔ فایل",o7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sfe():t==="fa"?ife():rfe()}),afe=()=>"Save failed",ofe=()=>"保存失败",lfe=()=>"ذخیره ناموفق بود",cfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ofe():t==="fa"?lfe():afe()}),ufe=()=>"Saving…",dfe=()=>"正在保存…",ffe=()=>"در حال ذخیره…",hfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dfe():t==="fa"?ffe():ufe()}),_fe=()=>"Selected — press ⌘C",pfe=()=>"已选中 — 按 ⌘C 复制",mfe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",gfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pfe():t==="fa"?mfe():_fe()}),vfe=()=>"session’s worktree",bfe=()=>"会话工作树",xfe=()=>"درخت کاری نشست",V_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bfe():t==="fa"?xfe():vfe()}),yfe=()=>"Show compiled PDF",wfe=()=>"显示已编译的 PDF",Sfe=()=>"نمایش PDF کامپایل‌شده",l7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wfe():t==="fa"?Sfe():yfe()}),kfe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",Cfe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",Efe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",Nfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cfe():t==="fa"?Efe():kfe()}),zfe=()=>"This session's worktree isn't available — showing the project clone's copy.",Afe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",Tfe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",jfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Afe():t==="fa"?Tfe():zfe()}),Mfe=()=>"Unsaved",Rfe=()=>"未保存",Dfe=()=>"ذخیره نشده",Lfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rfe():t==="fa"?Dfe():Mfe()}),Ofe=()=>"Unsaved — ⌘S or click away to save",Ife=()=>"未保存 — 按 ⌘S 或点击其他位置保存",Bfe=()=>"ذخیره نشده — ⌘S را بزنید یا برای ذخیره بیرون کلیک کنید",$fe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ife():t==="fa"?Bfe():Ofe()}),Hfe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",Pfe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",Ffe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",Ufe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pfe():t==="fa"?Ffe():Hfe()}),qfe=()=>"Back to preview",Gfe=()=>"返回预览",Vfe=()=>"بازگشت به پیش‌نمایش",Wfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gfe():t==="fa"?Vfe():qfe()}),Kfe=e=>`${e==null?void 0:e.count} changed files`,Yfe=e=>`${e==null?void 0:e.count} 个已更改文件`,Xfe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,Zfe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yfe(e):t==="fa"?Xfe(e):Kfe(e)}),Qfe=()=>"Changed files",Jfe=()=>"已更改文件",ehe=()=>"فایل‌های تغییرکرده",the=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jfe():t==="fa"?ehe():Qfe()}),nhe=()=>"Diff preview truncated",rhe=()=>"差异预览已截断",she=()=>"پیش‌نمایش تفاوت کوتاه شده است",ihe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rhe():t==="fa"?she():nhe()}),ahe=e=>`${e==null?void 0:e.count} files shown (partial)`,ohe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,lhe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,che=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ohe(e):t==="fa"?lhe(e):ahe(e)}),uhe=()=>"No changes.",dhe=()=>"没有更改。",fhe=()=>"تغییری وجود ندارد.",hhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dhe():t==="fa"?fhe():uhe()}),_he=()=>"No complete file preview was available before the cutoff.",phe=()=>"在截断位置之前没有完整的文件预览。",mhe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?phe():t==="fa"?mhe():_he()}),vhe=()=>"No textual diff for this file.",bhe=()=>"此文件没有文本差异。",xhe=()=>"برای این فایل تفاوت متنی وجود ندارد.",yhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bhe():t==="fa"?xhe():vhe()}),whe=()=>"1 changed file",She=()=>"1 个已更改文件",khe=()=>"۱ فایل تغییرکرده",Che=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?She():t==="fa"?khe():whe()}),Ehe=()=>"1 file shown (partial)",Nhe=()=>"显示 1 个文件(部分)",zhe=()=>"۱ فایل نمایش داده شده (ناقص)",Ahe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nhe():t==="fa"?zhe():Ehe()}),The=()=>"Unable to parse this diff.",jhe=()=>"无法解析此差异。",Mhe=()=>"خواندن این تفاوت ممکن نبود.",Rhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jhe():t==="fa"?Mhe():The()}),Dhe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,Lhe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,Ohe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,Ihe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Lhe(e):t==="fa"?Ohe(e):Dhe(e)}),Bhe=()=>"View full diff",$he=()=>"查看完整差异",Hhe=()=>"نمایش تفاوت کامل",Phe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$he():t==="fa"?Hhe():Bhe()}),Fhe=()=>"Create a token ↗",Uhe=()=>"创建令牌 ↗",qhe=()=>"ساخت توکن ↗",Ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uhe():t==="fa"?qhe():Fhe()}),Vhe=()=>"All projects",Whe=()=>"所有项目",Khe=()=>"همهٔ پروژه‌ها",c7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Whe():t==="fa"?Khe():Vhe()}),Yhe=()=>"Configure Repository",Xhe=()=>"配置仓库",Zhe=()=>"پیکربندی مخزن",Qhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xhe():t==="fa"?Zhe():Yhe()}),Jhe=()=>"Create a new project",e_e=()=>"新建项目",t_e=()=>"ایجاد پروژهٔ جدید",n_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e_e():t==="fa"?t_e():Jhe()}),r_e=()=>"Hide sidebar",s_e=()=>"隐藏侧边栏",i_e=()=>"پنهان کردن نوار کناری",u7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s_e():t==="fa"?i_e():r_e()}),a_e=()=>"Project",o_e=()=>"项目",l_e=()=>"پروژه",c_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o_e():t==="fa"?l_e():a_e()}),u_e=e=>`${e==null?void 0:e.count} cancelled`,d_e=e=>`${e==null?void 0:e.count} 次取消`,f_e=e=>`${e==null?void 0:e.count} لغوشده`,h_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?d_e(e):t==="fa"?f_e(e):u_e(e)}),__e=e=>`${e==null?void 0:e.count} done`,p_e=e=>`${e==null?void 0:e.count} 次完成`,m_e=e=>`${e==null?void 0:e.count} تمام‌شده`,g_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?p_e(e):t==="fa"?m_e(e):__e(e)}),v_e=e=>`${e==null?void 0:e.count} failed`,b_e=e=>`${e==null?void 0:e.count} 次失败`,x_e=e=>`${e==null?void 0:e.count} ناموفق`,y_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?b_e(e):t==="fa"?x_e(e):v_e(e)}),w_e=e=>`${e==null?void 0:e.count} files`,S_e=e=>`${e==null?void 0:e.count} 个文件`,k_e=e=>`${e==null?void 0:e.count} فایل`,C_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?S_e(e):t==="fa"?k_e(e):w_e(e)}),E_e=e=>`${e==null?void 0:e.count}+ files`,N_e=e=>`至少 ${e==null?void 0:e.count} 个文件`,z_e=e=>`بیش از ${e==null?void 0:e.count} فایل`,A_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?N_e(e):t==="fa"?z_e(e):E_e(e)}),T_e=e=>`${e==null?void 0:e.count} live`,j_e=e=>`${e==null?void 0:e.count} 次进行中`,M_e=e=>`${e==null?void 0:e.count} فعال`,R_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j_e(e):t==="fa"?M_e(e):T_e(e)}),D_e=()=>"1 file",L_e=()=>"1 个文件",O_e=()=>"۱ فایل",I_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L_e():t==="fa"?O_e():D_e()}),B_e=()=>"1 run",$_e=()=>"1 次运行",H_e=()=>"۱ اجرا",P_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$_e():t==="fa"?H_e():B_e()}),F_e=e=>`${e==null?void 0:e.count} runs`,U_e=e=>`${e==null?void 0:e.count} 次运行`,q_e=e=>`${e==null?void 0:e.count} اجرا`,G_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U_e(e):t==="fa"?q_e(e):F_e(e)}),V_e=()=>"No instances yet.",W_e=()=>"还没有实例。",K_e=()=>"هنوز نمونه‌ای وجود ندارد.",Y_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W_e():t==="fa"?K_e():V_e()}),X_e=()=>"Nothing running right now.",Z_e=()=>"当前没有运行中的实例。",Q_e=()=>"اکنون چیزی در حال اجرا نیست.",J_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z_e():t==="fa"?Q_e():X_e()}),e0e=()=>"Select a project to see its history.",t0e=()=>"请选择一个项目以查看其历史记录。",n0e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",r0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t0e():t==="fa"?n0e():e0e()}),s0e=()=>"Select a project to see its runs.",i0e=()=>"请选择一个项目以查看其运行。",a0e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",o0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i0e():t==="fa"?a0e():s0e()}),l0e=()=>"View history",c0e=()=>"查看历史记录",u0e=()=>"مشاهدهٔ تاریخچه",d0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c0e():t==="fa"?u0e():l0e()}),f0e=e=>`View history (${e==null?void 0:e.count})`,h0e=e=>`查看历史记录(${e==null?void 0:e.count})`,_0e=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,p0e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h0e(e):t==="fa"?_0e(e):f0e(e)}),m0e=()=>"The engine exited without producing a PDF or a log.",g0e=()=>"引擎已退出,但没有生成 PDF 或日志。",v0e=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",b0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g0e():t==="fa"?v0e():m0e()}),x0e=()=>"Loading…",y0e=()=>"正在加载…",w0e=()=>"در حال بارگیری…",S0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y0e():t==="fa"?w0e():x0e()}),k0e=()=>"Copy",C0e=()=>"复制",E0e=()=>"کپی",cE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C0e():t==="fa"?E0e():k0e()}),N0e=()=>"Copy code",z0e=()=>"复制代码",A0e=()=>"کپی کد",T0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z0e():t==="fa"?A0e():N0e()}),j0e=()=>"Download",M0e=()=>"下载",R0e=()=>"بارگیری",uE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M0e():t==="fa"?R0e():j0e()}),D0e=()=>"This browser can’t preview this media format.",L0e=()=>"此浏览器无法预览该媒体格式。",O0e=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",I0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L0e():t==="fa"?O0e():D0e()}),B0e=()=>" · CLI configuration",$0e=()=>" · CLI 配置",H0e=()=>" · پیکربندی CLI",dE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$0e():t==="fa"?H0e():B0e()}),P0e=()=>"· Default",F0e=()=>"· 默认",U0e=()=>"· پیش‌فرض",fE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F0e():t==="fa"?U0e():P0e()}),q0e=()=>"Default model",G0e=()=>"默认模型",V0e=()=>"مدل پیش‌فرض",d7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G0e():t==="fa"?V0e():q0e()}),W0e=()=>"Detecting harnesses…",K0e=()=>"正在检测智能体工具…",Y0e=()=>"در حال شناسایی ابزارهای عامل…",X0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K0e():t==="fa"?Y0e():W0e()}),Z0e=()=>"Effort",Q0e=()=>"推理强度",J0e=()=>"میزان استدلال",epe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Q0e():t==="fa"?J0e():Z0e()}),tpe=()=>"Fast speed ·",npe=()=>"快速 ·",rpe=()=>"سرعت بالا ·",spe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?npe():t==="fa"?rpe():tpe()}),ipe=()=>"Mode",ape=()=>"模式",ope=()=>"حالت",f7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ape():t==="fa"?ope():ipe()}),lpe=()=>"Model",cpe=()=>"模型",upe=()=>"مدل",V1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cpe():t==="fa"?upe():lpe()}),dpe=e=>`${e==null?void 0:e.count} more — search to find`,fpe=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,hpe=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,_pe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fpe(e):t==="fa"?hpe(e):dpe(e)}),ppe=()=>"Not available",mpe=()=>"不可用",gpe=()=>"در دسترس نیست",vpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mpe():t==="fa"?gpe():ppe()}),bpe=()=>"Search models…",xpe=()=>"搜索模型…",ype=()=>"جست‌وجوی مدل‌ها…",wpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xpe():t==="fa"?ype():bpe()}),Spe=()=>"Sessions keep their harness. Start a new chat to switch.",kpe=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Cpe=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Epe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kpe():t==="fa"?Cpe():Spe()}),Npe=()=>"Speed",zpe=()=>"速度",Ape=()=>"سرعت",h7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zpe():t==="fa"?Ape():Npe()}),Tpe=()=>"Unavailable",jpe=()=>"不可用",Mpe=()=>"در دسترس نیست",hE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jpe():t==="fa"?Mpe():Tpe()}),Rpe=e=>`Use “${e==null?void 0:e.id}” as the model ID`,Dpe=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,Lpe=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,Ope=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Dpe(e):t==="fa"?Lpe(e):Rpe(e)}),Ipe=()=>"Variant",Bpe=()=>"变体",$pe=()=>"گونه",Hpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bpe():t==="fa"?$pe():Ipe()}),Ppe=()=>"Advanced",Fpe=()=>"高级",Upe=()=>"پیشرفته",qpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fpe():t==="fa"?Upe():Ppe()}),Gpe=()=>"Advanced · Connect GitHub",Vpe=()=>"高级 · 连接 GitHub",Wpe=()=>"پیشرفته · اتصال GitHub",Kpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vpe():t==="fa"?Wpe():Gpe()}),Ype=()=>"Advanced · GitHub sync on",Xpe=()=>"高级 · GitHub 同步已开启",Zpe=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Qpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xpe():t==="fa"?Zpe():Ype()}),Jpe=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",eme=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",tme=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",nme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eme():t==="fa"?tme():Jpe()}),rme=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,sme=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,ime=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,ame=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?sme(e):t==="fa"?ime(e):rme(e)}),ome=()=>"Choose an existing project folder",lme=()=>"选择现有项目文件夹",cme=()=>"انتخاب پوشهٔ موجود پروژه",_7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lme():t==="fa"?cme():ome()}),ume=()=>"Choosing…",dme=()=>"正在选择…",fme=()=>"در حال انتخاب…",hme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dme():t==="fa"?fme():ume()}),_me=()=>"Clone destination",pme=()=>"克隆位置",mme=()=>"مقصد کلون",gme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pme():t==="fa"?mme():_me()}),vme=()=>"Clone paper project",bme=()=>"克隆论文项目",xme=()=>"کلون پروژهٔ مقاله",yme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bme():t==="fa"?xme():vme()}),wme=()=>"Create project",Sme=()=>"创建项目",kme=()=>"ایجاد پروژه",p7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sme():t==="fa"?kme():wme()}),Cme=()=>"Creating…",Eme=()=>"正在创建…",Nme=()=>"در حال ایجاد…",zme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eme():t==="fa"?Nme():Cme()}),Ame=()=>"Choose a different destination. This path is a file, not a folder.",Tme=()=>"请选择其他位置。此路径是文件,不是文件夹。",jme=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",m7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tme():t==="fa"?jme():Ame()}),Mme=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Rme=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Dme=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Lme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rme():t==="fa"?Dme():Mme()}),Ome=()=>"Blank project",Ime=()=>"空白项目",Bme=()=>"پروژهٔ خالی",$me=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ime():t==="fa"?Bme():Ome()}),Hme=()=>"Cancel",Pme=()=>"取消",Fme=()=>"لغو",Ume=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pme():t==="fa"?Fme():Hme()}),qme=()=>"Change",Gme=()=>"更改",Vme=()=>"تغییر",Wme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gme():t==="fa"?Vme():qme()}),Kme=()=>"Change selected paper",Yme=()=>"更改所选论文",Xme=()=>"تغییر مقالهٔ انتخاب‌شده",Zme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yme():t==="fa"?Xme():Kme()}),Qme=()=>"Check out a Git branch before using this folder.",Jme=()=>"使用此文件夹前,请先检出一个 Git 分支。",ege=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",tge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jme():t==="fa"?ege():Qme()}),nge=()=>"Checking project location.",rge=()=>"正在检查项目位置。",sge=()=>"در حال بررسی محل پروژه.",g7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rge():t==="fa"?sge():nge()}),ige=()=>"Existing folder",age=()=>"现有文件夹",oge=()=>"پوشهٔ موجود",lge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?age():t==="fa"?oge():ige()}),cge=()=>"Experiment branches will be pushed to the remote GitHub repository.",uge=()=>"实验分支将推送到远程 GitHub 仓库。",dge=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",fge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uge():t==="fa"?dge():cge()}),hge=()=>"From a paper",_ge=()=>"从论文创建",pge=()=>"از یک مقاله",mge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_ge():t==="fa"?pge():hge()}),gge=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",vge=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",bge=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",xge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vge():t==="fa"?bge():gge()}),yge=()=>"my-research",wge=()=>"my-research",Sge=()=>"my-research",v7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wge():t==="fa"?Sge():yge()}),kge=()=>"No papers found. Try an arXiv ID, URL, or a different title.",Cge=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Ege=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",Nge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cge():t==="fa"?Ege():kge()}),zge=()=>"No public repository found on alphaXiv",Age=()=>"在 alphaXiv 上未找到公开仓库",Tge=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",jge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Age():t==="fa"?Tge():zge()}),Mge=()=>"OpenResearch will start a blank project with this paper's PDF.",Rge=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Dge=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Lge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rge():t==="fa"?Dge():Mge()}),Oge=()=>"Paper",Ige=()=>"论文",Bge=()=>"مقاله",$ge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ige():t==="fa"?Bge():Oge()}),Hge=()=>"Project location",Pge=()=>"项目位置",Fge=()=>"محل پروژه",b7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pge():t==="fa"?Fge():Hge()}),Uge=()=>"Project name",qge=()=>"项目名称",Gge=()=>"نام پروژه",x7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qge():t==="fa"?Gge():Uge()}),Vge=()=>"Search for a paper by arXiv ID, URL, or title",Wge=()=>"按 arXiv ID、网址或标题搜索论文",Kge=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",Yge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wge():t==="fa"?Kge():Vge()}),Xge=()=>"Sync experiments to GitHub",Zge=()=>"将实验同步到 GitHub",Qge=()=>"همگام‌سازی آزمایش‌ها با GitHub",Jge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zge():t==="fa"?Qge():Xge()}),e1e=()=>"That folder no longer exists. Choose it again.",t1e=()=>"该文件夹已不存在。请重新选择。",n1e=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",r1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t1e():t==="fa"?n1e():e1e()}),s1e=()=>"The selected folder contains an invalid Git repository.",i1e=()=>"所选文件夹包含无效的 Git 仓库。",a1e=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",o1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i1e():t==="fa"?a1e():s1e()}),l1e=()=>"The selected path is not a folder.",c1e=()=>"所选路径不是文件夹。",u1e=()=>"مسیر انتخاب‌شده پوشه نیست.",d1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c1e():t==="fa"?u1e():l1e()}),f1e=e=>`Checking ${e==null?void 0:e.repository}.`,h1e=e=>`正在检查 ${e==null?void 0:e.repository}。`,_1e=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,p1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h1e(e):t==="fa"?_1e(e):f1e(e)}),m1e=e=>`Creates ${e==null?void 0:e.repository}.`,g1e=e=>`将创建 ${e==null?void 0:e.repository}。`,v1e=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,b1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?g1e(e):t==="fa"?v1e(e):m1e(e)}),x1e=e=>`Pushes to ${e==null?void 0:e.repository}.`,y1e=e=>`将推送到 ${e==null?void 0:e.repository}。`,w1e=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,S1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?y1e(e):t==="fa"?w1e(e):x1e(e)}),k1e=()=>"Project location is required.",C1e=()=>"必须填写项目位置。",E1e=()=>"محل پروژه الزامی است.",y7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C1e():t==="fa"?E1e():k1e()}),N1e=()=>"Choose a different destination. The paper repository needs a new or empty folder.",z1e=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",A1e=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",T1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z1e():t==="fa"?A1e():N1e()}),j1e=()=>"A linked public code repository is cloned without credentials.",M1e=()=>"关联的公开代码仓库无需凭据即可克隆。",R1e=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",D1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M1e():t==="fa"?R1e():j1e()}),L1e=e=>`Run ${e==null?void 0:e.command} before creating the project.`,O1e=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,I1e=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,B1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?O1e(e):t==="fa"?I1e(e):L1e(e)}),$1e=()=>"Searching alphaXiv…",H1e=()=>"正在搜索 alphaXiv…",P1e=()=>"در حال جست‌وجوی alphaXiv…",F1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H1e():t==="fa"?P1e():$1e()}),U1e=()=>"Use folder",q1e=()=>"使用文件夹",G1e=()=>"استفاده از پوشه",V1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q1e():t==="fa"?G1e():U1e()}),W1e=()=>"Can’t reach OpenResearch. This page is no longer live.",K1e=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Y1e=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",w7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K1e():t==="fa"?Y1e():W1e()}),X1e=()=>"A workspace for your research agents",Z1e=()=>"面向研究智能体的工作空间",Q1e=()=>"فضای کاری برای عامل‌های پژوهشی شما",J1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z1e():t==="fa"?Q1e():X1e()}),eve=()=>"Add papers that represent your research interests, including papers by other authors.",tve=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",nve=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",rve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tve():t==="fa"?nve():eve()}),sve=()=>"API key",ive=()=>"API 密钥",ave=()=>"کلید API",_E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ive():t==="fa"?ave():sve()}),ove=()=>"AI/ML",lve=()=>"人工智能与机器学习",cve=()=>"هوش مصنوعی و یادگیری ماشین",uve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lve():t==="fa"?cve():ove()}),dve=()=>"Biology",fve=()=>"生物学",hve=()=>"زیست‌شناسی",_ve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fve():t==="fa"?hve():dve()}),pve=()=>"Other",mve=()=>"其他",gve=()=>"سایر",vve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mve():t==="fa"?gve():pve()}),bve=()=>"Physics",xve=()=>"物理学",yve=()=>"فیزیک",wve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xve():t==="fa"?yve():bve()}),Sve=()=>"Back",kve=()=>"返回",Cve=()=>"بازگشت",S7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kve():t==="fa"?Cve():Sve()}),Eve=()=>"Check failed",Nve=()=>"检查失败",zve=()=>"بررسی ناموفق بود",Ave=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nve():t==="fa"?zve():Eve()}),Tve=()=>"Checking",jve=()=>"正在检查",Mve=()=>"در حال بررسی",Rve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jve():t==="fa"?Mve():Tve()}),Dve=()=>"Checking Git…",Lve=()=>"正在检查 Git…",Ove=()=>"در حال بررسی Git…",Ive=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lve():t==="fa"?Ove():Dve()}),Bve=()=>"Choose a coding agent",$ve=()=>"选择编程智能体",Hve=()=>"یک عامل کدنویسی انتخاب کنید",Pve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ve():t==="fa"?Hve():Bve()}),Fve=()=>"Choose a coding agent to continue.",Uve=()=>"选择一个编程智能体以继续。",qve=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Gve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uve():t==="fa"?qve():Fve()}),Vve=()=>"Choose at least one research area to continue.",Wve=()=>"请至少选择一个研究领域后再继续。",Kve=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Yve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wve():t==="fa"?Kve():Vve()}),Xve=()=>"Choose one or more.",Zve=()=>"请选择一项或多项。",Qve=()=>"یک یا چند مورد را انتخاب کنید.",Jve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zve():t==="fa"?Qve():Xve()}),ebe=()=>"Choose your preferred coding agent",tbe=()=>"请选择首选编程智能体",nbe=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",rbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tbe():t==="fa"?nbe():ebe()}),sbe=()=>"Consolidate your research",ibe=()=>"集中管理研究",abe=()=>"پژوهش خود را یکپارچه کنید",obe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ibe():t==="fa"?abe():sbe()}),lbe=()=>"Continue",cbe=()=>"继续",ube=()=>"ادامه",k7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cbe():t==="fa"?ube():lbe()}),dbe=()=>"Describe your research area to continue.",fbe=()=>"请描述你的研究领域后再继续。",hbe=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",_be=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fbe():t==="fa"?hbe():dbe()}),pbe=()=>"Detecting Claude Code, Codex, OpenCode…",mbe=()=>"正在检测 Claude Code、Codex、OpenCode…",gbe=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",vbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mbe():t==="fa"?gbe():pbe()}),bbe=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",xbe=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",ybe=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",wbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xbe():t==="fa"?ybe():bbe()}),Sbe=()=>"Everything stays local",kbe=()=>"一切都保留在本地",Cbe=()=>"همه‌چیز محلی می‌ماند",Ebe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kbe():t==="fa"?Cbe():Sbe()}),Nbe=()=>"Get started",zbe=()=>"开始使用",Abe=()=>"شروع",Tbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zbe():t==="fa"?Abe():Nbe()}),jbe=()=>"Git is required for local experiments. Install Git, then re-check.",Mbe=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",Rbe=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",Dbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mbe():t==="fa"?Rbe():jbe()}),Lbe=()=>"Ground your agents",Obe=()=>"为智能体提供可靠依据",Ibe=()=>"عامل‌هایتان را به منابع متصل کنید",Bbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Obe():t==="fa"?Ibe():Lbe()}),$be=()=>"Install broken",Hbe=()=>"安装损坏",Pbe=()=>"نصب خراب است",Fbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hbe():t==="fa"?Pbe():$be()}),Ube=()=>"Install Git to continue",qbe=()=>"请安装 Git 后再继续",Gbe=()=>"برای ادامه Git را نصب کنید",Vbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qbe():t==="fa"?Gbe():Ube()}),Wbe=()=>"Local Git",Kbe=()=>"本地 Git",Ybe=()=>"Git محلی",Xbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kbe():t==="fa"?Ybe():Wbe()}),Zbe=()=>"Not detected",Qbe=()=>"未检测到",Jbe=()=>"شناسایی نشد",C7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qbe():t==="fa"?Jbe():Zbe()}),e2e=()=>"Not found",t2e=()=>"未找到",n2e=()=>"پیدا نشد",pE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t2e():t==="fa"?n2e():e2e()}),r2e=()=>"Not signed in",s2e=()=>"未登录",i2e=()=>"وارد نشده",a2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s2e():t==="fa"?i2e():r2e()}),o2e=()=>"OpenResearch uses a coding agent already installed on this machine.",l2e=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",c2e=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",u2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l2e():t==="fa"?c2e():o2e()}),d2e=()=>"Other research area",f2e=()=>"其他研究领域",h2e=()=>"حوزهٔ پژوهشی دیگر",_2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f2e():t==="fa"?h2e():d2e()}),p2e=()=>"Re-check",m2e=()=>"重新检查",g2e=()=>"بررسی دوباره",v2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m2e():t==="fa"?g2e():p2e()}),b2e=()=>"Ready",x2e=()=>"已就绪",y2e=()=>"آماده",w2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?x2e():t==="fa"?y2e():b2e()}),S2e=()=>"Re-check Git before continuing",k2e=()=>"请重新检查 Git 后再继续",C2e=()=>"پیش از ادامه Git را دوباره بررسی کنید",E2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k2e():t==="fa"?C2e():S2e()}),N2e=()=>"Representative papers",z2e=()=>"代表性论文",A2e=()=>"مقاله‌های شاخص",T2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z2e():t==="fa"?A2e():N2e()}),j2e=()=>"Research background",M2e=()=>"研究背景",R2e=()=>"پیشینهٔ پژوهشی",D2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M2e():t==="fa"?R2e():j2e()}),L2e=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",O2e=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",I2e=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",E7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O2e():t==="fa"?I2e():L2e()}),B2e=()=>"Search alphaXiv by title to link a paper…",$2e=()=>"按标题搜索 alphaXiv 以关联论文…",H2e=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",P2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$2e():t==="fa"?H2e():B2e()}),F2e=()=>"Searching alphaXiv…",U2e=()=>"正在搜索 alphaXiv…",q2e=()=>"در حال جست‌وجوی alphaXiv…",G2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U2e():t==="fa"?q2e():F2e()}),V2e=()=>"Selected",W2e=()=>"已选择",K2e=()=>"انتخاب‌شده",Y2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W2e():t==="fa"?K2e():V2e()}),X2e=()=>"Setting things up…",Z2e=()=>"正在设置…",Q2e=()=>"در حال راه‌اندازی…",J2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z2e():t==="fa"?Q2e():X2e()}),exe=()=>"Sign in to at least one coding agent to continue",txe=()=>"请至少登录一个编程智能体后再继续",nxe=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",rxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?txe():t==="fa"?nxe():exe()}),sxe=()=>"Sign in to at least one agent to continue.",ixe=()=>"请登录至少一个智能体以继续。",axe=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",oxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ixe():t==="fa"?axe():sxe()}),lxe=()=>"Signed in",cxe=()=>"已登录",uxe=()=>"وارد شده",dxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cxe():t==="fa"?uxe():lxe()}),fxe=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",hxe=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",_xe=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",pxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hxe():t==="fa"?_xe():fxe()}),mxe=()=>"· Step 1 of 2",gxe=()=>"· 第 1 步,共 2 步",vxe=()=>"· مرحلهٔ ۱ از ۲",bxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gxe():t==="fa"?vxe():mxe()}),xxe=()=>"· Step 2 of 2",yxe=()=>"· 第 2 步,共 2 步",wxe=()=>"· مرحلهٔ ۲ از ۲",Sxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yxe():t==="fa"?wxe():xxe()}),kxe=()=>"Tell us about your research",Cxe=()=>"介绍一下你的研究",Exe=()=>"از پژوهش خود بگویید",Nxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cxe():t==="fa"?Exe():kxe()}),zxe=()=>"Tell us your other research area",Axe=()=>"告诉我们你的其他研究领域",Txe=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",jxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Axe():t==="fa"?Txe():zxe()}),Mxe=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",Rxe=()=>"在一处跟踪实验、产物、算力、技能和代码。",Dxe=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Lxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rxe():t==="fa"?Dxe():Mxe()}),Oxe=()=>"Unable to verify",Ixe=()=>"无法验证",Bxe=()=>"تأیید ممکن نیست",$xe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ixe():t==="fa"?Bxe():Oxe()}),Hxe=()=>"Update required",Pxe=()=>"需要更新",Fxe=()=>"نیازمند به‌روزرسانی",Uxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pxe():t==="fa"?Fxe():Hxe()}),qxe=()=>"Waiting for the Git check",Gxe=()=>"正在等待 Git 检查",Vxe=()=>"در انتظار بررسی Git",Wxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gxe():t==="fa"?Vxe():qxe()}),Kxe=()=>"Waiting for the local tool checks",Yxe=()=>"正在等待本地工具检查",Xxe=()=>"در انتظار بررسی ابزارهای محلی",Zxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yxe():t==="fa"?Xxe():Kxe()}),Qxe=()=>"What areas are you interested in?",Jxe=()=>"你对哪些领域感兴趣?",eye=()=>"به چه حوزه‌هایی علاقه دارید؟",tye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jxe():t==="fa"?eye():Qxe()}),nye=()=>"Your code, data, and experiment history stay on your machine.",rye=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",sye=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",iye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rye():t==="fa"?sye():nye()}),aye=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",oye=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",lye=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",cye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oye():t==="fa"?lye():aye()}),uye=()=>"Changed here and on Overleaf — choose which copy to keep",dye=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",fye=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",hye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dye():t==="fa"?fye():uye()}),_ye=()=>"Create a token ↗",pye=()=>"创建令牌 ↗",mye=()=>"ساخت توکن ↗",gye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pye():t==="fa"?mye():_ye()}),vye=()=>"Overleaf Git token",bye=()=>"Overleaf Git 令牌",xye=()=>"توکن Git در Overleaf",yye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bye():t==="fa"?xye():vye()}),wye=()=>"In step with Overleaf",Sye=()=>"已与 Overleaf 同步",kye=()=>"با Overleaf همگام است",mE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sye():t==="fa"?kye():wye()}),Cye=()=>"The last sync did not finish.",Eye=()=>"上次同步未完成。",Nye=()=>"آخرین همگام‌سازی کامل نشد.",zye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eye():t==="fa"?Nye():Cye()}),Aye=()=>"Link and sync",Tye=()=>"关联并同步",jye=()=>"پیوند و همگام‌سازی",Mye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tye():t==="fa"?jye():Aye()}),Rye=()=>"My projects ↗",Dye=()=>"我的项目 ↗",Lye=()=>"پروژه‌های من ↗",Oye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dye():t==="fa"?Lye():Rye()}),Iye=()=>"Nothing could be synced.",Bye=()=>"没有内容可以同步。",$ye=()=>"هیچ موردی قابل همگام‌سازی نبود.",Hye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bye():t==="fa"?$ye():Iye()}),Pye=()=>"Cancel",Fye=()=>"取消",Uye=()=>"لغو",qye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fye():t==="fa"?Uye():Pye()}),Gye=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",Vye=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Wye=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Kye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vye():t==="fa"?Wye():Gye()}),Yye=()=>"Keep this copy",Xye=()=>"保留此副本",Zye=()=>"نگه داشتن این نسخه",Qye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xye():t==="fa"?Zye():Yye()}),Jye=()=>"Open in Overleaf",e4e=()=>"在 Overleaf 中打开",t4e=()=>"باز کردن در Overleaf",n4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e4e():t==="fa"?t4e():Jye()}),r4e=()=>"Replace the Overleaf token",s4e=()=>"替换 Overleaf 令牌",i4e=()=>"جایگزینی توکن Overleaf",N7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s4e():t==="fa"?i4e():r4e()}),a4e=()=>"Sync now",o4e=()=>"立即同步",l4e=()=>"همگام‌سازی اکنون",c4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o4e():t==="fa"?l4e():a4e()}),u4e=()=>"Unlink",d4e=()=>"取消关联",f4e=()=>"قطع پیوند",h4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d4e():t==="fa"?f4e():u4e()}),_4e=()=>"Upload a copy as a new project ↗",p4e=()=>"上传副本作为新项目 ↗",m4e=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",g4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p4e():t==="fa"?m4e():_4e()}),v4e=()=>"Use Overleaf's",b4e=()=>"使用 Overleaf 的副本",x4e=()=>"استفاده از نسخهٔ Overleaf",y4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b4e():t==="fa"?x4e():v4e()}),w4e=()=>"This paper stays in step with Overleaf.",S4e=()=>"此论文将与 Overleaf 保持同步。",k4e=()=>"این مقاله با Overleaf همگام می‌ماند.",C4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S4e():t==="fa"?k4e():w4e()}),E4e=e=>`Pulled ${e==null?void 0:e.paths}.`,N4e=e=>`已拉取 ${e==null?void 0:e.paths}。`,z4e=e=>`${e==null?void 0:e.paths} دریافت شد.`,A4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?N4e(e):t==="fa"?z4e(e):E4e(e)}),T4e=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,j4e=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,M4e=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,R4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j4e(e):t==="fa"?M4e(e):T4e(e)}),D4e=e=>`Pushed ${e==null?void 0:e.paths}.`,L4e=e=>`已推送 ${e==null?void 0:e.paths}。`,O4e=e=>`${e==null?void 0:e.paths} ارسال شد.`,I4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?L4e(e):t==="fa"?O4e(e):D4e(e)}),B4e=()=>"Save the file first",$4e=()=>"请先保存文件",H4e=()=>"ابتدا فایل را ذخیره کنید",P4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$4e():t==="fa"?H4e():B4e()}),F4e=()=>"Save this file to sync it with Overleaf",U4e=()=>"保存此文件以与 Overleaf 同步",q4e=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",gE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U4e():t==="fa"?q4e():F4e()}),G4e=()=>"Save token",V4e=()=>"保存令牌",W4e=()=>"ذخیرهٔ توکن",K4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V4e():t==="fa"?W4e():G4e()}),Y4e=()=>"Send this paper to Overleaf",X4e=()=>"将此论文发送到 Overleaf",Z4e=()=>"ارسال مقاله به Overleaf",Q4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X4e():t==="fa"?Z4e():Y4e()}),J4e=()=>"Overleaf sync failed",ewe=()=>"Overleaf 同步失败",twe=()=>"همگام‌سازی با Overleaf ناموفق بود",nwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ewe():t==="fa"?twe():J4e()}),rwe=()=>"Syncing with Overleaf…",swe=()=>"正在与 Overleaf 同步…",iwe=()=>"در حال همگام‌سازی با Overleaf…",awe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?swe():t==="fa"?iwe():rwe()}),owe=()=>"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.",lwe=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",cwe=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",uwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lwe():t==="fa"?cwe():owe()}),dwe=()=>"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.",fwe=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",hwe=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",_we=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fwe():t==="fa"?hwe():dwe()}),pwe=()=>"Toggle Plan mode for this chat",mwe=()=>"切换此聊天的计划模式",gwe=()=>"تغییر حالت طرح این گفت‌وگو",vwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mwe():t==="fa"?gwe():pwe()}),bwe=()=>"Accept and auto mode",xwe=()=>"接受并使用自动模式",ywe=()=>"پذیرش و حالت خودکار",wwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xwe():t==="fa"?ywe():bwe()}),Swe=()=>"Accept and bypass all",kwe=()=>"接受并跳过所有审批",Cwe=()=>"پذیرش و عبور از همهٔ تأییدها",Ewe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kwe():t==="fa"?Cwe():Swe()}),Nwe=()=>"Accept plan",zwe=()=>"接受计划",Awe=()=>"پذیرش طرح",Twe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zwe():t==="fa"?Awe():Nwe()}),jwe=e=>`${e==null?void 0:e.agent} proposed a plan`,Mwe=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Rwe=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Dwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Mwe(e):t==="fa"?Rwe(e):jwe(e)}),Lwe=e=>`${e==null?void 0:e.agent} is ready to proceed`,Owe=e=>`${e==null?void 0:e.agent} 已准备好继续`,Iwe=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,Bwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Owe(e):t==="fa"?Iwe(e):Lwe(e)}),$we=()=>"Back",Hwe=()=>"返回",Pwe=()=>"بازگشت",Fwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hwe():t==="fa"?Pwe():$we()}),Uwe=()=>"More approval options",qwe=()=>"更多批准选项",Gwe=()=>"گزینه‌های تأیید بیشتر",Vwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qwe():t==="fa"?Gwe():Uwe()}),Wwe=()=>"Open plan",Kwe=()=>"打开计划",Ywe=()=>"باز کردن طرح",Xwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kwe():t==="fa"?Ywe():Wwe()}),Zwe=()=>"Reject",Qwe=()=>"拒绝",Jwe=()=>"رد کردن",e5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qwe():t==="fa"?Jwe():Zwe()}),t5e=()=>"Revise",n5e=()=>"修改",r5e=()=>"بازنگری",s5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),i5e=()=>"Revise…",a5e=()=>"修改…",o5e=()=>"بازنگری…",l5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a5e():t==="fa"?o5e():i5e()}),c5e=()=>"What should change? (optional)",u5e=()=>"需要更改什么?(可选)",d5e=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",f5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u5e():t==="fa"?d5e():c5e()}),h5e=e=>`${e==null?void 0:e.count} active`,_5e=e=>`${e==null?void 0:e.count} 个活跃`,p5e=e=>`${e==null?void 0:e.count} فعال`,m5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_5e(e):t==="fa"?p5e(e):h5e(e)}),g5e=e=>`${e==null?void 0:e.count} total agents`,v5e=e=>`共 ${e==null?void 0:e.count} 个智能体`,b5e=e=>`در مجموع ${e==null?void 0:e.count} عامل`,x5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?v5e(e):t==="fa"?b5e(e):g5e(e)}),y5e=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,w5e=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,S5e=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,k5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?w5e(e):t==="fa"?S5e(e):y5e(e)}),C5e=()=>"Agents",E5e=()=>"智能体",N5e=()=>"عامل‌ها",z7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E5e():t==="fa"?N5e():C5e()}),z5e=()=>"arXiv paper ID:",A5e=()=>"arXiv 论文 ID:",T5e=()=>"شناسهٔ مقالهٔ arXiv:",j5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A5e():t==="fa"?T5e():z5e()}),M5e=()=>"Cancel",R5e=()=>"取消",D5e=()=>"لغو",L5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R5e():t==="fa"?D5e():M5e()}),O5e=()=>"Created",I5e=()=>"创建时间",B5e=()=>"ایجادشده",$5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I5e():t==="fa"?B5e():O5e()}),H5e=()=>"Delete project?",P5e=()=>"删除项目?",F5e=()=>"پروژه حذف شود؟",U5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P5e():t==="fa"?F5e():H5e()}),q5e=()=>"Delete project",G5e=()=>"删除项目",V5e=()=>"حذف پروژه",W5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G5e():t==="fa"?V5e():q5e()}),K5e=()=>"Deleting…",Y5e=()=>"正在删除…",X5e=()=>"در حال حذف…",Z5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y5e():t==="fa"?X5e():K5e()}),Q5e=()=>"Experiments",J5e=()=>"实验",e3e=()=>"آزمایش‌ها",A7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J5e():t==="fa"?e3e():Q5e()}),t3e=()=>"The local folder and linked GitHub repository are kept.",n3e=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",r3e=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",s3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n3e():t==="fa"?r3e():t3e()}),i3e=()=>"The local folder is kept.",a3e=()=>"本地文件夹会保留。",o3e=()=>"پوشهٔ محلی نگه داشته می‌شود.",l3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a3e():t==="fa"?o3e():i3e()}),c3e=()=>"New project",u3e=()=>"新建项目",d3e=()=>"پروژهٔ جدید",vE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u3e():t==="fa"?d3e():c3e()}),f3e=()=>"No projects yet — create one to get started.",h3e=()=>"尚无项目——新建一个即可开始。",_3e=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",p3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h3e():t==="fa"?_3e():f3e()}),m3e=()=>"Project",g3e=()=>"项目",v3e=()=>"پروژه",b3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g3e():t==="fa"?v3e():m3e()}),x3e=()=>"Projects",y3e=()=>"项目",w3e=()=>"پروژه‌ها",S3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y3e():t==="fa"?w3e():x3e()}),k3e=()=>"Repository",C3e=()=>"仓库",E3e=()=>"مخزن",T7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C3e():t==="fa"?E3e():k3e()}),N3e=()=>"Idle",z3e=()=>"空闲",A3e=()=>"بیکار",T3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z3e():t==="fa"?A3e():N3e()}),j3e=()=>"Local",M3e=()=>"本地",R3e=()=>"محلی",D3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M3e():t==="fa"?R3e():j3e()}),L3e=()=>"1 total agent",O3e=()=>"共 1 个智能体",I3e=()=>"در مجموع ۱ عامل",B3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O3e():t==="fa"?I3e():L3e()}),$3e=e=>`${e==null?void 0:e.count} running`,H3e=e=>`${e==null?void 0:e.count} 个运行中`,P3e=e=>`${e==null?void 0:e.count} در حال اجرا`,F3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?H3e(e):t==="fa"?P3e(e):$3e(e)}),U3e=e=>`${e==null?void 0:e.count} total`,q3e=e=>`共 ${e==null?void 0:e.count} 个`,G3e=e=>`در مجموع ${e==null?void 0:e.count}`,j7=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?q3e(e):t==="fa"?G3e(e):U3e(e)}),V3e=e=>`${e==null?void 0:e.value}d`,W3e=e=>`${e==null?void 0:e.value} 天`,K3e=e=>`${e==null?void 0:e.value}ر`,Y3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?W3e(e):t==="fa"?K3e(e):V3e(e)}),X3e=e=>`${e==null?void 0:e.value}h`,Z3e=e=>`${e==null?void 0:e.value} 小时`,Q3e=e=>`${e==null?void 0:e.value}س`,J3e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Z3e(e):t==="fa"?Q3e(e):X3e(e)}),e6e=e=>`${e==null?void 0:e.value}m`,t6e=e=>`${e==null?void 0:e.value} 分钟`,n6e=e=>`${e==null?void 0:e.value}د`,r6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?t6e(e):t==="fa"?n6e(e):e6e(e)}),s6e=()=>"now",i6e=()=>"现在",a6e=()=>"اکنون",o6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i6e():t==="fa"?a6e():s6e()}),l6e=()=>"Disable syncing",c6e=()=>"关闭同步",u6e=()=>"غیرفعال کردن همگام‌سازی",d6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c6e():t==="fa"?u6e():l6e()}),f6e=()=>"Enable GitHub syncing",h6e=()=>"启用 GitHub 同步",_6e=()=>"فعال‌سازی همگام‌سازی GitHub",p6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h6e():t==="fa"?_6e():f6e()}),m6e=()=>"Enabling…",g6e=()=>"正在启用…",v6e=()=>"در حال فعال‌سازی…",b6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g6e():t==="fa"?v6e():m6e()}),x6e=()=>"Updating…",y6e=()=>"正在更新…",w6e=()=>"در حال به‌روزرسانی…",S6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y6e():t==="fa"?w6e():x6e()}),k6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,C6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,E6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,N6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?C6e(e):t==="fa"?E6e(e):k6e(e)}),z6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,A6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,T6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,j6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A6e(e):t==="fa"?T6e(e):z6e(e)}),M6e=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`,R6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,D6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,L6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?R6e(e):t==="fa"?D6e(e):M6e(e)}),O6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,I6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,B6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,$6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?I6e(e):t==="fa"?B6e(e):O6e(e)}),H6e=()=>"CLI is retrying…",P6e=()=>"CLI 正在重试…",F6e=()=>"CLI در حال تلاش دوباره است…",U6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P6e():t==="fa"?F6e():H6e()}),q6e=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,G6e=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,V6e=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,W6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?G6e(e):t==="fa"?V6e(e):q6e(e)}),K6e=()=>"Sending again…",Y6e=()=>"正在重新发送…",X6e=()=>"در حال ارسال دوباره…",Z6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y6e():t==="fa"?X6e():K6e()}),Q6e=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,J6e=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,e7e=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,t7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?J6e(e):t==="fa"?e7e(e):Q6e(e)}),n7e=()=>"Retrying…",r7e=()=>"正在重试…",s7e=()=>"در حال تلاش دوباره…",bE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r7e():t==="fa"?s7e():n7e()}),i7e=()=>"Default speed",a7e=()=>"默认速度",o7e=()=>"سرعت پیش‌فرض",l7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a7e():t==="fa"?o7e():i7e()}),c7e=()=>"Standard",u7e=()=>"标准",d7e=()=>"استاندارد",f7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u7e():t==="fa"?d7e():c7e()}),h7e=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,_7e=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,p7e=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,m7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_7e(e):t==="fa"?p7e(e):h7e(e)}),g7e=()=>"Appearance",v7e=()=>"外观",b7e=()=>"ظاهر",x7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v7e():t==="fa"?b7e():g7e()}),y7e=()=>"Check",w7e=()=>"检查",S7e=()=>"بررسی",k7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w7e():t==="fa"?S7e():y7e()}),C7e=()=>"Check again",E7e=()=>"再次检查",N7e=()=>"بررسی دوباره",z7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E7e():t==="fa"?N7e():C7e()}),A7e=()=>"Check for updates",T7e=()=>"检查更新",j7e=()=>"بررسی به‌روزرسانی",M7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T7e():t==="fa"?j7e():A7e()}),R7e=()=>"Check now",D7e=()=>"立即检查",L7e=()=>"اکنون بررسی کن",O7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D7e():t==="fa"?L7e():R7e()}),I7e=()=>"Check setup",B7e=()=>"检查设置",$7e=()=>"بررسی راه‌اندازی",H7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B7e():t==="fa"?$7e():I7e()}),P7e=()=>"orx checks a few times a day on its own.",F7e=()=>"orx 每天会自动检查几次。",U7e=()=>"orx روزی چند بار خودکار بررسی می‌کند.",q7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F7e():t==="fa"?U7e():P7e()}),G7e=()=>"Choose a flavor",V7e=()=>"选择配置",W7e=()=>"انتخاب پیکربندی",K7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V7e():t==="fa"?W7e():G7e()}),Y7e=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,X7e=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,Z7e=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,Q7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?X7e(e):t==="fa"?Z7e(e):Y7e(e)}),J7e=()=>"clean",eSe=()=>"无更改",tSe=()=>"بدون تغییر",nSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eSe():t==="fa"?tSe():J7e()}),rSe=e=>`Already linked at ${e==null?void 0:e.link}.`,sSe=e=>`已链接到 ${e==null?void 0:e.link}。`,iSe=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,aSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?sSe(e):t==="fa"?iSe(e):rSe(e)}),oSe=e=>`Linked ${e==null?void 0:e.link}.`,lSe=e=>`已链接 ${e==null?void 0:e.link}。`,cSe=e=>`${e==null?void 0:e.link} پیوند شد.`,uSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?lSe(e):t==="fa"?cSe(e):oSe(e)}),dSe=()=>"Connect",fSe=()=>"连接",hSe=()=>"اتصال",dx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fSe():t==="fa"?hSe():dSe()}),_Se=()=>"Connected via GitHub CLI",pSe=()=>"已通过 GitHub CLI 连接",mSe=()=>"از طریق GitHub CLI متصل است",xE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pSe():t==="fa"?mSe():_Se()}),gSe=()=>"Connecting…",vSe=()=>"正在连接…",bSe=()=>"در حال اتصال…",yE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vSe():t==="fa"?bSe():gSe()}),xSe=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",ySe=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",wSe=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",SSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ySe():t==="fa"?wSe():xSe()}),kSe=()=>"the current project",CSe=()=>"当前项目",ESe=()=>"پروژهٔ فعلی",NSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CSe():t==="fa"?ESe():kSe()}),zSe=e=>`${e==null?void 0:e.value} (custom)`,ASe=e=>`${e==null?void 0:e.value}(自定义)`,TSe=e=>`${e==null?void 0:e.value} (سفارشی)`,jSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ASe(e):t==="fa"?TSe(e):zSe(e)}),MSe=()=>"detached",RSe=()=>"分离头指针",DSe=()=>"جدا از شاخه",wE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RSe():t==="fa"?DSe():MSe()}),LSe=()=>"Disconnected",OSe=()=>"已断开连接",ISe=()=>"قطع اتصال",SE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OSe():t==="fa"?ISe():LSe()}),BSe=()=>"Environment broken",$Se=()=>"环境损坏",HSe=()=>"محیط خراب است",PSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Se():t==="fa"?HSe():BSe()}),FSe=()=>"Environment not built",USe=()=>"环境尚未构建",qSe=()=>"محیط ساخته نشده است",GSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?USe():t==="fa"?qSe():FSe()}),VSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,WSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,KSe=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,YSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?WSe(e):t==="fa"?KSe(e):VSe(e)}),XSe=()=>"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.",ZSe=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",QSe=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",JSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZSe():t==="fa"?QSe():XSe()}),eke=()=>"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.",tke=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",nke=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",rke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tke():t==="fa"?nke():eke()}),ske=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",ike=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",ake=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",oke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ike():t==="fa"?ake():ske()}),lke=()=>"has changes",cke=()=>"有更改",uke=()=>"دارای تغییر",dke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cke():t==="fa"?uke():lke()}),fke=()=>"~/.cache/huggingface/token (hf auth login)",hke=()=>"~/.cache/huggingface/token(hf auth login)",_ke=()=>"~/.cache/huggingface/token (hf auth login)",pke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hke():t==="fa"?_ke():fke()}),mke=()=>"HF_TOKEN environment variable",gke=()=>"HF_TOKEN 环境变量",vke=()=>"متغیر محیطی HF_TOKEN",bke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gke():t==="fa"?vke():mke()}),xke=()=>"~/.openresearch/env",yke=()=>"~/.openresearch/env",wke=()=>"~/.openresearch/env",Ske=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yke():t==="fa"?wke():xke()}),kke=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}.`,Cke=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,Eke=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,Nke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Cke(e):t==="fa"?Eke(e):kke(e)}),zke=()=>"Install",Ake=()=>"安装",Tke=()=>"نصب",jke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ake():t==="fa"?Tke():zke()}),Mke=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.`,Rke=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,Dke=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,Lke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rke(e):t==="fa"?Dke(e):Mke(e)}),Oke=e=>`Install the ${e==null?void 0:e.command} command`,Ike=e=>`安装 ${e==null?void 0:e.command} 命令`,Bke=e=>`نصب فرمان ${e==null?void 0:e.command}`,$ke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ike(e):t==="fa"?Bke(e):Oke(e)}),Hke=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",Pke=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",Fke=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",Uke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pke():t==="fa"?Fke():Hke()}),qke=()=>"Install the new release now instead of waiting for the background update.",Gke=()=>"立即安装新版本,无需等待后台更新。",Vke=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",Wke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gke():t==="fa"?Vke():qke()}),Kke=()=>"kubectl default",Yke=()=>"kubectl 默认值",Xke=()=>"پیش‌فرض kubectl",Zke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yke():t==="fa"?Xke():Kke()}),Qke=e=>`kubectl default (${e==null?void 0:e.context})`,Jke=e=>`kubectl 默认值(${e==null?void 0:e.context})`,e8e=e=>`پیش‌فرض kubectl (${e==null?void 0:e.context})`,t8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jke(e):t==="fa"?e8e(e):Qke(e)}),n8e=()=>"Language",r8e=()=>"语言",s8e=()=>"زبان",i8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r8e():t==="fa"?s8e():n8e()}),a8e=e=>`Not signed in. Run ${e==null?void 0:e.command} in a terminal to connect your OpenResearch account.`,o8e=e=>`尚未登录。请在终端中运行 ${e==null?void 0:e.command} 以连接你的 OpenResearch 账户。`,l8e=e=>`وارد نشده‌اید. برای اتصال حساب OpenResearch خود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,c8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?o8e(e):t==="fa"?l8e(e):a8e(e)}),u8e=()=>"Make default",d8e=()=>"设为默认值",f8e=()=>"پیش‌فرض شود",h8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d8e():t==="fa"?f8e():u8e()}),_8e=e=>`The manifest must define one Job. orx injects the run script, environment, labels, and timeout. Use ${e==null?void 0:e.placeholder} in resource names, or override the default path with ${e==null?void 0:e.command}.`,p8e=e=>`清单必须定义一个 Job。orx 会注入运行脚本、环境、标签和超时设置。请在资源名称中使用 ${e==null?void 0:e.placeholder},或通过 ${e==null?void 0:e.command} 覆盖默认路径。`,m8e=e=>`مانیفست باید یک Job تعریف کند. orx اسکریپت اجرا، محیط، برچسب‌ها و مهلت زمانی را تزریق می‌کند. از ${e==null?void 0:e.placeholder} در نام منابع استفاده کنید، یا مسیر پیش‌فرض را با ${e==null?void 0:e.command} تغییر دهید.`,g8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?p8e(e):t==="fa"?m8e(e):_8e(e)}),v8e=()=>"Provisioned (Modal import failing)",b8e=()=>"已预配(Modal 导入失败)",x8e=()=>"آماده شده (درون‌ریزی Modal ناموفق است)",y8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b8e():t==="fa"?x8e():v8e()}),w8e=()=>"MODAL_TOKEN_ID environment variable",S8e=()=>"MODAL_TOKEN_ID 环境变量",k8e=()=>"متغیر محیطی MODAL_TOKEN_ID",C8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S8e():t==="fa"?k8e():w8e()}),E8e=()=>"~/.modal.toml (modal token new)",N8e=()=>"~/.modal.toml(modal token new)",z8e=()=>"~/.modal.toml (modal token new)",A8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N8e():t==="fa"?z8e():E8e()}),T8e=e=>`No Modal token found. Run ${e==null?void 0:e.command}, or add ${e==null?void 0:e.id} and ${e==null?void 0:e.secret} in the Environment tab.`,j8e=e=>`未找到 Modal 令牌。请运行 ${e==null?void 0:e.command},或在“环境”标签页中添加 ${e==null?void 0:e.id} 和 ${e==null?void 0:e.secret}。`,M8e=e=>`توکن Modal پیدا نشد. ${e==null?void 0:e.command} را اجرا کنید، یا ${e==null?void 0:e.id} و ${e==null?void 0:e.secret} را در زبانهٔ محیط اضافه کنید.`,R8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j8e(e):t==="fa"?M8e(e):T8e(e)}),D8e=()=>"~/.openresearch/env",L8e=()=>"~/.openresearch/env",O8e=()=>"~/.openresearch/env",I8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L8e():t==="fa"?O8e():D8e()}),B8e=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,$8e=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,H8e=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,P8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$8e(e):t==="fa"?H8e(e):B8e(e)}),F8e=e=>`Needs ${e==null?void 0:e.tool}`,U8e=e=>`需要 ${e==null?void 0:e.tool}`,q8e=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,G8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U8e(e):t==="fa"?q8e(e):F8e(e)}),V8e=()=>"Needs tools",W8e=()=>"缺少工具",K8e=()=>"به ابزارها نیاز دارد",Y8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W8e():t==="fa"?K8e():V8e()}),X8e=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,Z8e=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,Q8e=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,J8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Z8e(e):t==="fa"?Q8e(e):X8e(e)}),eCe=()=>"New runs use SSH; choose a host when launching.",tCe=()=>"新运行将使用 SSH;启动时请选择主机。",nCe=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",rCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tCe():t==="fa"?nCe():eCe()}),sCe=()=>"New token",iCe=()=>"新令牌",aCe=()=>"توکن جدید",oCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iCe():t==="fa"?aCe():sCe()}),lCe=()=>"No default flavor",cCe=()=>"不设默认配置",uCe=()=>"بدون پیکربندی پیش‌فرض",dCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cCe():t==="fa"?uCe():lCe()}),fCe=()=>"none",hCe=()=>"无",_Ce=()=>"هیچ‌کدام",fx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hCe():t==="fa"?_Ce():fCe()}),pCe=()=>"Not built yet",mCe=()=>"尚未构建",gCe=()=>"هنوز ساخته نشده",vCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mCe():t==="fa"?gCe():pCe()}),bCe=()=>"Not connected",xCe=()=>"未连接",yCe=()=>"متصل نیست",kE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xCe():t==="fa"?yCe():bCe()}),wCe=()=>"not found on PATH",SCe=()=>"在 PATH 中未找到",kCe=()=>"در PATH پیدا نشد",CCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SCe():t==="fa"?kCe():wCe()}),ECe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,NCe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,zCe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,ACe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NCe(e):t==="fa"?zCe(e):ECe(e)}),TCe=()=>"not initialized",jCe=()=>"尚未初始化",MCe=()=>"راه‌اندازی نشده",RCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jCe():t==="fa"?MCe():TCe()}),DCe=()=>"Not set",LCe=()=>"未设置",OCe=()=>"تنظیم نشده",ICe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LCe():t==="fa"?OCe():DCe()}),BCe=()=>"OAuth (subscription login)",$Ce=()=>"OAuth(订阅登录)",HCe=()=>"OAuth (ورود با اشتراک)",PCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ce():t==="fa"?HCe():BCe()}),FCe=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.`,UCe=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,qCe=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,GCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?UCe(e):t==="fa"?qCe(e):FCe(e)}),VCe=()=>"Account",WCe=()=>"账户",KCe=()=>"حساب",hx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WCe():t==="fa"?KCe():VCe()}),YCe=()=>"Add one with",XCe=()=>"使用以下命令添加:",ZCe=()=>"یکی با این فرمان اضافه کنید:",QCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XCe():t==="fa"?ZCe():YCe()}),JCe=()=>"Add variable",e9e=()=>"添加变量",t9e=()=>"افزودن متغیر",n9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e9e():t==="fa"?t9e():JCe()}),r9e=()=>"Agent models",s9e=()=>"智能体模型",i9e=()=>"مدل‌های عامل",a9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s9e():t==="fa"?i9e():r9e()}),o9e=()=>"Anonymous usage analytics",l9e=()=>"匿名使用情况分析",c9e=()=>"تحلیل ناشناس استفاده",M7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l9e():t==="fa"?c9e():o9e()}),u9e=()=>"Auth",d9e=()=>"身份验证",f9e=()=>"احراز هویت",h9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d9e():t==="fa"?f9e():u9e()}),_9e=()=>"Authentication",p9e=()=>"身份验证",m9e=()=>"احراز هویت",g9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p9e():t==="fa"?m9e():_9e()}),v9e=()=>"Back to Compute",b9e=()=>"返回算力设置",x9e=()=>"بازگشت به رایانش",CE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b9e():t==="fa"?x9e():v9e()}),y9e=()=>"Backend",w9e=()=>"后端",S9e=()=>"بک‌اند",k9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w9e():t==="fa"?S9e():y9e()}),C9e=()=>"Baseline",E9e=()=>"基线",N9e=()=>"خط مبنا",z9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E9e():t==="fa"?N9e():C9e()}),A9e=()=>"Binary",T9e=()=>"可执行文件",j9e=()=>"فایل اجرایی",M9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T9e():t==="fa"?j9e():A9e()}),R9e=()=>"Cancel",D9e=()=>"取消",L9e=()=>"لغو",_x=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D9e():t==="fa"?L9e():R9e()}),O9e=()=>"Cancel new variable",I9e=()=>"取消新变量",B9e=()=>"لغو متغیر جدید",$9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I9e():t==="fa"?B9e():O9e()}),H9e=()=>"Checking compute targets…",P9e=()=>"正在检查算力目标…",F9e=()=>"در حال بررسی مقصدهای رایانشی…",U9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P9e():t==="fa"?F9e():H9e()}),q9e=()=>"Checking credentials…",G9e=()=>"正在检查凭据…",V9e=()=>"در حال بررسی اطلاعات ورود…",W9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G9e():t==="fa"?V9e():q9e()}),K9e=()=>"Checking kubectl…",Y9e=()=>"正在检查 kubectl…",X9e=()=>"در حال بررسی kubectl…",Z9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y9e():t==="fa"?X9e():K9e()}),Q9e=()=>"Checking Modal…",J9e=()=>"正在检查 Modal…",eEe=()=>"در حال بررسی Modal…",tEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J9e():t==="fa"?eEe():Q9e()}),nEe=()=>"Choose a preset flavor",rEe=()=>"选择预设规格",sEe=()=>"یک پیکربندی آماده انتخاب کنید",R7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rEe():t==="fa"?sEe():nEe()}),iEe=()=>"Cluster",aEe=()=>"集群",oEe=()=>"خوشه",lEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aEe():t==="fa"?oEe():iEe()}),cEe=()=>"cluster default",uEe=()=>"集群默认值",dEe=()=>"پیش‌فرض خوشه",D7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uEe():t==="fa"?dEe():cEe()}),fEe=()=>"cluster default (e.g. 4h, 30m)",hEe=()=>"集群默认值(例如 4h、30m)",_Ee=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",pEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hEe():t==="fa"?_Ee():fEe()}),mEe=()=>"Cluster unreachable",gEe=()=>"无法连接集群",vEe=()=>"خوشه در دسترس نیست",bEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gEe():t==="fa"?vEe():mEe()}),xEe=()=>"Compute",yEe=()=>"算力",wEe=()=>"رایانش",EE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yEe():t==="fa"?wEe():xEe()}),SEe=()=>"Connect compute backends and choose where new runs execute.",kEe=()=>"连接算力后端,并选择新运行的执行位置。",CEe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",EEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kEe():t==="fa"?CEe():SEe()}),NEe=()=>"Connected",zEe=()=>"已连接",AEe=()=>"متصل",px=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zEe():t==="fa"?AEe():NEe()}),TEe=()=>"Context",jEe=()=>"上下文",MEe=()=>"زمینه",REe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jEe():t==="fa"?MEe():TEe()}),DEe=()=>"Current",LEe=()=>"当前",OEe=()=>"فعلی",IEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LEe():t==="fa"?OEe():DEe()}),BEe=()=>"Currently off:",$Ee=()=>"当前已关闭:",HEe=()=>"اکنون خاموش است:",PEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ee():t==="fa"?HEe():BEe()}),FEe=()=>"Custom flavor",UEe=()=>"自定义规格",qEe=()=>"پیکربندی سفارشی",GEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UEe():t==="fa"?qEe():FEe()}),VEe=()=>"Custom flavor…",WEe=()=>"自定义规格…",KEe=()=>"پیکربندی سفارشی…",YEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WEe():t==="fa"?KEe():VEe()}),XEe=()=>"Data directory",ZEe=()=>"数据目录",QEe=()=>"پوشهٔ داده",JEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZEe():t==="fa"?QEe():XEe()}),eNe=()=>"default",tNe=()=>"默认",nNe=()=>"پیش‌فرض",rNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tNe():t==="fa"?nNe():eNe()}),sNe=()=>"Default",iNe=()=>"默认",aNe=()=>"پیش‌فرض",NE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iNe():t==="fa"?aNe():sNe()}),oNe=()=>"Default destination",lNe=()=>"默认目标",cNe=()=>"مقصد پیش‌فرض",uNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lNe():t==="fa"?cNe():oNe()}),dNe=()=>"Detecting hardware…",fNe=()=>"正在检测硬件…",hNe=()=>"در حال شناسایی سخت‌افزار…",_Ne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fNe():t==="fa"?hNe():dNe()}),pNe=()=>"Detecting harnesses…",mNe=()=>"正在检测智能体工具…",gNe=()=>"در حال شناسایی ابزارهای عامل…",vNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mNe():t==="fa"?gNe():pNe()}),bNe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",xNe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",yNe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",wNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xNe():t==="fa"?yNe():bNe()}),SNe=()=>"Effective URL",kNe=()=>"实际使用的网址",CNe=()=>"نشانی مؤثر",ENe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kNe():t==="fa"?CNe():SNe()}),NNe=()=>"Enable GitHub syncing for new projects",zNe=()=>"为新项目启用 GitHub 同步",ANe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",L7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zNe():t==="fa"?ANe():NNe()}),TNe=()=>"Environment",jNe=()=>"环境",MNe=()=>"محیط",mx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jNe():t==="fa"?MNe():TNe()}),RNe=()=>"Failed",DNe=()=>"失败",LNe=()=>"ناموفق",gx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DNe():t==="fa"?LNe():RNe()}),ONe=()=>"General",INe=()=>"常规",BNe=()=>"عمومی",$Ne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?INe():t==="fa"?BNe():ONe()}),HNe=()=>"GitHub publishing",PNe=()=>"GitHub 发布",FNe=()=>"انتشار در GitHub",UNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PNe():t==="fa"?FNe():HNe()}),qNe=()=>"Git token",GNe=()=>"Git 令牌",VNe=()=>"توکن Git",WNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GNe():t==="fa"?VNe():qNe()}),KNe=()=>"Harnesses",YNe=()=>"智能体工具",XNe=()=>"ابزارهای عامل",ZNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YNe():t==="fa"?XNe():KNe()}),QNe=()=>"hf_…",JNe=()=>"hf_…",eze=()=>"hf_…",tze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JNe():t==="fa"?eze():QNe()}),nze=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",rze=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",sze=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",ize=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rze():t==="fa"?sze():nze()}),aze=()=>"Hostname",oze=()=>"主机名",lze=()=>"نام میزبان",cze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oze():t==="fa"?lze():aze()}),uze=()=>"How it connects",dze=()=>"连接方式",fze=()=>"نحوهٔ اتصال",hze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dze():t==="fa"?fze():uze()}),_ze=()=>"Initialize Git",pze=()=>"初始化 Git",mze=()=>"راه‌اندازی Git",gze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pze():t==="fa"?mze():_ze()}),vze=()=>"Install",bze=()=>"安装",xze=()=>"نصب",yze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bze():t==="fa"?xze():vze()}),wze=()=>"Install broken",Sze=()=>"安装损坏",kze=()=>"نصب خراب است",Cze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sze():t==="fa"?kze():wze()}),Eze=()=>"Install GitHub CLI",Nze=()=>"安装 GitHub CLI",zze=()=>"نصب GitHub CLI",Aze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nze():t==="fa"?zze():Eze()}),Tze=()=>"Install updates automatically",jze=()=>"自动安装更新",Mze=()=>"نصب خودکار به‌روزرسانی‌ها",O7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jze():t==="fa"?Mze():Tze()}),Rze=()=>"Instance history",Dze=()=>"实例历史",Lze=()=>"تاریخچهٔ نمونه‌ها",Oze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dze():t==="fa"?Lze():Rze()}),Ize=()=>"Invalid token",Bze=()=>"令牌无效",$ze=()=>"توکن نامعتبر",Hze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bze():t==="fa"?$ze():Ize()}),Pze=()=>"Jobs",Fze=()=>"Jobs",Uze=()=>"Jobs",qze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fze():t==="fa"?Uze():Pze()}),Gze=()=>"Jobs / Dashboard URL",Vze=()=>"Jobs / 控制台网址",Wze=()=>"نشانی Jobs / داشبورد",Kze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vze():t==="fa"?Wze():Gze()}),Yze=()=>"Jobs permission unknown",Xze=()=>"Jobs 权限未知",Zze=()=>"مجوز Jobs نامشخص است",Qze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xze():t==="fa"?Zze():Yze()}),Jze=()=>"Jobs: write OK",eAe=()=>"Jobs:写入正常",tAe=()=>"Jobs: نوشتن مجاز است",nAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eAe():t==="fa"?tAe():Jze()}),rAe=()=>"kubectl not found",sAe=()=>"未找到 kubectl",iAe=()=>"kubectl پیدا نشد",aAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sAe():t==="fa"?iAe():rAe()}),oAe=()=>"Latest",lAe=()=>"最新版本",cAe=()=>"جدیدترین",uAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lAe():t==="fa"?cAe():oAe()}),dAe=()=>"Loading…",fAe=()=>"正在加载…",hAe=()=>"در حال بارگیری…",Nl=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fAe():t==="fa"?hAe():dAe()}),_Ae=()=>"Loading Ray settings…",pAe=()=>"正在加载 Ray 设置…",mAe=()=>"در حال بارگیری تنظیمات Ray…",gAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pAe():t==="fa"?mAe():_Ae()}),vAe=()=>"Loading slurm settings…",bAe=()=>"正在加载 Slurm 设置…",xAe=()=>"در حال بارگیری تنظیمات Slurm…",yAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bAe():t==="fa"?xAe():vAe()}),wAe=()=>"Loading status…",SAe=()=>"正在加载状态…",kAe=()=>"در حال بارگیری وضعیت…",CAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SAe():t==="fa"?kAe():wAe()}),EAe=()=>"Local only",NAe=()=>"仅本地",zAe=()=>"فقط محلی",AAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NAe():t==="fa"?zAe():EAe()}),TAe=()=>"Local repository",jAe=()=>"本地仓库",MAe=()=>"مخزن محلی",RAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jAe():t==="fa"?MAe():TAe()}),DAe=()=>"Login node",LAe=()=>"登录节点",OAe=()=>"گرهٔ ورود",IAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LAe():t==="fa"?OAe():DAe()}),BAe=()=>"Make GitHub syncing the default?",$Ae=()=>"将 GitHub 同步设为默认值?",HAe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",PAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ae():t==="fa"?HAe():BAe()}),FAe=()=>"Missing bash/tar",UAe=()=>"缺少 bash/tar",qAe=()=>"bash/tar موجود نیست",GAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UAe():t==="fa"?qAe():FAe()}),VAe=()=>"More compute options",WAe=()=>"更多算力选项",KAe=()=>"گزینه‌های رایانشی بیشتر",YAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WAe():t==="fa"?KAe():VAe()}),XAe=()=>"Move failed:",ZAe=()=>"移动失败:",QAe=()=>"انتقال ناموفق بود:",JAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZAe():t==="fa"?QAe():XAe()}),eTe=()=>"Moved. orx is now using the new location.",tTe=()=>"已移动。orx 现在使用新位置。",nTe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",rTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tTe():t==="fa"?nTe():eTe()}),sTe=()=>"Namespace",iTe=()=>"命名空间",aTe=()=>"فضای نام",oTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iTe():t==="fa"?aTe():sTe()}),lTe=()=>"New location",cTe=()=>"新位置",uTe=()=>"محل جدید",dTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cTe():t==="fa"?uTe():lTe()}),fTe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",hTe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",_Te=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",pTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hTe():t==="fa"?_Te():fTe()}),mTe=()=>"New variable key",gTe=()=>"新变量键名",vTe=()=>"کلید متغیر جدید",bTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gTe():t==="fa"?vTe():mTe()}),xTe=()=>"New variable value",yTe=()=>"新变量值",wTe=()=>"مقدار متغیر جدید",STe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yTe():t==="fa"?wTe():xTe()}),kTe=()=>"No code, prompts, file contents, or account identifiers are sent.",CTe=()=>"不会发送代码、提示词、文件内容或账户标识符。",ETe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",NTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CTe():t==="fa"?ETe():kTe()}),zTe=()=>"No hosts found in ~/.ssh/config.",ATe=()=>"在 ~/.ssh/config 中未找到主机。",TTe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",jTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ATe():t==="fa"?TTe():zTe()}),MTe=()=>"No job-create permission",RTe=()=>"没有创建 Job 的权限",DTe=()=>"مجوز ساخت Job وجود ندارد",LTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RTe():t==="fa"?DTe():MTe()}),OTe=()=>"No job.write permission",ITe=()=>"没有 job.write 权限",BTe=()=>"مجوز job.write وجود ندارد",$Te=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ITe():t==="fa"?BTe():OTe()}),HTe=()=>"No key on this computer to register — load a registered key with",PTe=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",FTe=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",UTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PTe():t==="fa"?FTe():HTe()}),qTe=()=>"No key on this computer yet — create one with",GTe=()=>"此计算机上还没有密钥——使用以下命令创建:",VTe=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",WTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GTe():t==="fa"?VTe():qTe()}),KTe=()=>"No Slurm CLI",YTe=()=>"无 Slurm CLI",XTe=()=>"بدون CLI اسلورم",ZTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YTe():t==="fa"?XTe():KTe()}),QTe=()=>"No token",JTe=()=>"无令牌",eje=()=>"بدون توکن",tje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JTe():t==="fa"?eje():QTe()}),nje=()=>"None registered",rje=()=>"未注册任何密钥",sje=()=>"هیچ‌کدام ثبت نشده",ije=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rje():t==="fa"?sje():nje()}),aje=()=>"Not checked",oje=()=>"未检查",lje=()=>"بررسی نشده",zE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oje():t==="fa"?lje():aje()}),cje=()=>"Not configured",uje=()=>"未配置",dje=()=>"پیکربندی نشده",Mp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uje():t==="fa"?dje():cje()}),fje=()=>"Not installed",hje=()=>"未安装",_je=()=>"نصب نیست",pje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hje():t==="fa"?_je():fje()}),mje=()=>"Not now",gje=()=>"暂不",vje=()=>"اکنون نه",bje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gje():t==="fa"?vje():mje()}),xje=()=>"Not on this computer",yje=()=>"不在此计算机上",wje=()=>"روی این رایانه نیست",Sje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yje():t==="fa"?wje():xje()}),kje=()=>"Not set (pass --host per launch)",Cje=()=>"未设置(每次启动时传入 --host)",Eje=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",Nje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cje():t==="fa"?Eje():kje()}),zje=()=>"Not set up",Aje=()=>"未设置",Tje=()=>"راه‌اندازی نشده",jje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aje():t==="fa"?Tje():zje()}),Mje=()=>"Not signed in",Rje=()=>"未登录",Dje=()=>"وارد نشده",Lje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rje():t==="fa"?Dje():Mje()}),Oje=()=>"On this computer",Ije=()=>"在此计算机上",Bje=()=>"روی این رایانه",$je=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ije():t==="fa"?Bje():Oje()}),Hje=()=>"Open a project to inspect its repository and GitHub publication state.",Pje=()=>"打开项目以查看其仓库和 GitHub 发布状态。",Fje=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",Uje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pje():t==="fa"?Fje():Hje()}),qje=()=>"Open job page",Gje=()=>"打开作业页面",Vje=()=>"باز کردن صفحهٔ کار",I7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gje():t==="fa"?Vje():qje()}),Wje=()=>"Open on GitHub",Kje=()=>"在 GitHub 上打开",Yje=()=>"باز کردن در GitHub",B7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kje():t==="fa"?Yje():Wje()}),Xje=()=>", or create one with",Zje=()=>",或使用以下命令创建:",Qje=()=>"، یا با این فرمان یکی بسازید:",Jje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zje():t==="fa"?Qje():Xje()}),eMe=()=>"Org",tMe=()=>"组织",nMe=()=>"سازمان",rMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tMe():t==="fa"?nMe():eMe()}),sMe=()=>"Orgs",iMe=()=>"组织",aMe=()=>"سازمان‌ها",oMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iMe():t==="fa"?aMe():sMe()}),lMe=()=>"orx can't update this install",cMe=()=>"orx 无法更新此安装",uMe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",dMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cMe():t==="fa"?uMe():lMe()}),fMe=()=>"Overleaf",hMe=()=>"Overleaf",_Me=()=>"Overleaf",pMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hMe():t==="fa"?_Me():fMe()}),mMe=()=>"Overleaf Git authentication token",gMe=()=>"Overleaf Git 身份验证令牌",vMe=()=>"توکن احراز هویت Git در Overleaf",bMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gMe():t==="fa"?vMe():mMe()}),xMe=()=>"Overridden by env",yMe=()=>"已被环境变量覆盖",wMe=()=>"بازنویسی‌شده توسط محیط",SMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yMe():t==="fa"?wMe():xMe()}),kMe=()=>"Partition",CMe=()=>"分区",EMe=()=>"پارتیشن",NMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CMe():t==="fa"?EMe():kMe()}),zMe=()=>"Partitions",AMe=()=>"分区",TMe=()=>"پارتیشن‌ها",jMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AMe():t==="fa"?TMe():zMe()}),MMe=()=>"Path",RMe=()=>"路径",DMe=()=>"مسیر",LMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RMe():t==="fa"?DMe():MMe()}),OMe=()=>"Plan",IMe=()=>"方案",BMe=()=>"سطح اشتراک",$Me=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IMe():t==="fa"?BMe():OMe()}),HMe=()=>"Project",PMe=()=>"项目",FMe=()=>"پروژه",UMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PMe():t==="fa"?FMe():HMe()}),qMe=()=>"Ray version",GMe=()=>"Ray 版本",VMe=()=>"نسخهٔ Ray",WMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GMe():t==="fa"?VMe():qMe()}),KMe=()=>"Reachable",YMe=()=>"可访问",XMe=()=>"در دسترس",ZMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YMe():t==="fa"?XMe():KMe()}),QMe=()=>"Reading ~/.ssh/config…",JMe=()=>"正在读取 ~/.ssh/config…",eRe=()=>"در حال خواندن ‎~/.ssh/config…",tRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JMe():t==="fa"?eRe():QMe()}),nRe=()=>"Ready",rRe=()=>"就绪",sRe=()=>"آماده",vx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rRe():t==="fa"?sRe():nRe()}),iRe=()=>"Ready to move",aRe=()=>"可以移动",oRe=()=>"آمادهٔ انتقال",lRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aRe():t==="fa"?oRe():iRe()}),cRe=()=>"Ready to use",uRe=()=>"可用",dRe=()=>"آمادهٔ استفاده",fRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uRe():t==="fa"?dRe():cRe()}),hRe=()=>"Refresh",_Re=()=>"刷新",pRe=()=>"تازه‌سازی",Rp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Re():t==="fa"?pRe():hRe()}),mRe=()=>"Remotes",gRe=()=>"远程仓库",vRe=()=>"مخزن‌های دوردست",bRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gRe():t==="fa"?vRe():mRe()}),xRe=()=>"Repository",yRe=()=>"仓库",wRe=()=>"مخزن",SRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yRe():t==="fa"?wRe():xRe()}),kRe=()=>"Restart to finish updating",CRe=()=>"重新启动以完成更新",ERe=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",NRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CRe():t==="fa"?ERe():kRe()}),zRe=()=>"Run manifest",ARe=()=>"运行清单",TRe=()=>"مانیفست اجرا",jRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ARe():t==="fa"?TRe():zRe()}),MRe=()=>"Running instances",RRe=()=>"正在运行的实例",DRe=()=>"نمونه‌های در حال اجرا",LRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RRe():t==="fa"?DRe():MRe()}),ORe=()=>"Runtime",IRe=()=>"运行时间",BRe=()=>"زمان اجرا",$Re=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IRe():t==="fa"?BRe():ORe()}),HRe=()=>". Save it under that key if it's meant for HF Jobs.",PRe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",FRe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",URe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PRe():t==="fa"?FRe():HRe()}),qRe=()=>"Settings",GRe=()=>"设置",VRe=()=>"تنظیمات",AE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GRe():t==="fa"?VRe():qRe()}),WRe=()=>"Signed in",KRe=()=>"已登录",YRe=()=>"وارد شده",TE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KRe():t==="fa"?YRe():WRe()}),XRe=()=>"Source",ZRe=()=>"来源",QRe=()=>"منبع",bx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZRe():t==="fa"?QRe():XRe()}),JRe=()=>"SSH key",eDe=()=>"SSH 密钥",tDe=()=>"کلید SSH",nDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eDe():t==="fa"?tDe():JRe()}),rDe=()=>"Started",sDe=()=>"开始时间",iDe=()=>"آغاز",aDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sDe():t==="fa"?iDe():rDe()}),oDe=()=>"State",lDe=()=>"状态",cDe=()=>"وضعیت",uDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lDe():t==="fa"?cDe():oDe()}),dDe=()=>"Status",fDe=()=>"状态",hDe=()=>"وضعیت",Dp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fDe():t==="fa"?hDe():dDe()}),_De=()=>"Storage",pDe=()=>"存储",mDe=()=>"ذخیره‌سازی",gDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pDe():t==="fa"?mDe():_De()}),vDe=()=>"Sync",bDe=()=>"同步",xDe=()=>"همگام‌سازی",yDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bDe():t==="fa"?xDe():vDe()}),wDe=()=>"Syncing off",SDe=()=>"同步已关闭",kDe=()=>"همگام‌سازی خاموش",CDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SDe():t==="fa"?kDe():wDe()}),EDe=()=>"System",NDe=()=>"系统",zDe=()=>"سامانه",ADe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NDe():t==="fa"?zDe():EDe()}),TDe=()=>"Test connection",jDe=()=>"测试连接",MDe=()=>"آزمایش اتصال",RDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jDe():t==="fa"?MDe():TDe()}),DDe=()=>"Testing…",LDe=()=>"正在测试…",ODe=()=>"در حال آزمایش…",IDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LDe():t==="fa"?ODe():DDe()}),BDe=()=>", then add it with",$De=()=>",然后使用以下命令添加:",HDe=()=>"، سپس با این فرمان اضافه‌اش کنید:",PDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$De():t==="fa"?HDe():BDe()}),FDe=()=>"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.",UDe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",qDe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",GDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UDe():t==="fa"?qDe():FDe()}),VDe=()=>"This saved destination is not configured. Set it up below or choose another backend.",WDe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",KDe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",YDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WDe():t==="fa"?KDe():VDe()}),XDe=()=>"This value looks like a Hugging Face token — compute runs only read it from",ZDe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",QDe=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",JDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZDe():t==="fa"?QDe():XDe()}),eLe=()=>"Time limit",tLe=()=>"时间限制",nLe=()=>"محدودیت زمانی",rLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tLe():t==="fa"?nLe():eLe()}),sLe=()=>"Token",iLe=()=>"令牌",aLe=()=>"توکن",jE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iLe():t==="fa"?aLe():sLe()}),oLe=()=>"Unable to verify",lLe=()=>"无法验证",cLe=()=>"تأیید ممکن نیست",uLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lLe():t==="fa"?cLe():oLe()}),dLe=()=>"Unknown",fLe=()=>"未知",hLe=()=>"نامشخص",ME=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fLe():t==="fa"?hLe():dLe()}),_Le=()=>"Update required",pLe=()=>"需要更新",mLe=()=>"نیازمند به‌روزرسانی",gLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pLe():t==="fa"?mLe():_Le()}),vLe=()=>"Updates",bLe=()=>"更新",xLe=()=>"به‌روزرسانی‌ها",$7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bLe():t==="fa"?xLe():vLe()}),yLe=()=>"Usage analytics",wLe=()=>"使用情况分析",SLe=()=>"تحلیل استفاده",kLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wLe():t==="fa"?SLe():yLe()}),CLe=()=>"value",ELe=()=>"值",NLe=()=>"مقدار",RE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ELe():t==="fa"?NLe():CLe()}),zLe=()=>"Variables available to runs and the research agent (API keys, tokens).",ALe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",TLe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",jLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ALe():t==="fa"?TLe():zLe()}),MLe=()=>"Version",RLe=()=>"版本",DLe=()=>"نسخه",DE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RLe():t==="fa"?DLe():MLe()}),LLe=()=>"What happens",OLe=()=>"执行内容",ILe=()=>"چه اتفاقی می‌افتد",BLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OLe():t==="fa"?ILe():LLe()}),$Le=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",HLe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",PLe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",FLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HLe():t==="fa"?PLe():$Le()}),ULe=()=>"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.",qLe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",GLe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",VLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qLe():t==="fa"?GLe():ULe()}),WLe=()=>"Pick a login node first",KLe=()=>"请先选择登录节点",YLe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",XLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KLe():t==="fa"?YLe():WLe()}),ZLe=()=>"Providers",QLe=()=>"提供商",JLe=()=>"ارائه‌دهندگان",eOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QLe():t==="fa"?JLe():ZLe()}),tOe=()=>"Reconnect",nOe=()=>"重新连接",rOe=()=>"اتصال دوباره",LE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nOe():t==="fa"?rOe():tOe()}),sOe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,iOe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,aOe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,oOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?iOe(e):t==="fa"?aOe(e):sOe(e)}),lOe=()=>"Reinstall with the orx installer to get automatic updates.",cOe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",uOe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",dOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cOe():t==="fa"?uOe():lOe()}),fOe=()=>"Re-link",hOe=()=>"重新链接",_Oe=()=>"پیوند دوباره",pOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hOe():t==="fa"?_Oe():fOe()}),mOe=()=>"Remove token",gOe=()=>"移除令牌",vOe=()=>"حذف توکن",bOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gOe():t==="fa"?vOe():mOe()}),xOe=()=>"Removing…",yOe=()=>"正在移除…",wOe=()=>"در حال حذف…",SOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yOe():t==="fa"?wOe():xOe()}),kOe=()=>"Replace anyway",COe=()=>"仍要替换",EOe=()=>"به‌هرحال جایگزین کن",NOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?COe():t==="fa"?EOe():kOe()}),zOe=()=>"Replace token",AOe=()=>"替换令牌",TOe=()=>"جایگزینی توکن",jOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AOe():t==="fa"?TOe():zOe()}),MOe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,ROe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,DOe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,LOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ROe(e):t==="fa"?DOe(e):MOe(e)}),OOe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,IOe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,BOe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,$Oe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?IOe(e):t==="fa"?BOe(e):OOe(e)}),HOe=()=>"Run `gh auth login` in your terminal.",POe=()=>"请在终端中运行 `gh auth login`。",FOe=()=>"در پایانه `gh auth login` را اجرا کنید.",UOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?POe():t==="fa"?FOe():HOe()}),qOe=()=>"Saved",GOe=()=>"已保存",VOe=()=>"ذخیره شده",WOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GOe():t==="fa"?VOe():qOe()}),KOe=()=>"Set up",YOe=()=>"设置",XOe=()=>"راه‌اندازی",ZOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YOe():t==="fa"?XOe():KOe()}),QOe=()=>"Set up environment",JOe=()=>"设置环境",eIe=()=>"راه‌اندازی محیط",tIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JOe():t==="fa"?eIe():QOe()}),nIe=()=>"Setting up… (~30–60s)",rIe=()=>"正在设置…(约 30–60 秒)",sIe=()=>"در حال راه‌اندازی… (حدود ۳۰ تا ۶۰ ثانیه)",iIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rIe():t==="fa"?sIe():nIe()}),aIe=()=>"Sign in",oIe=()=>"登录",lIe=()=>"ورود",cIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oIe():t==="fa"?lIe():aIe()}),uIe=()=>"The SSH connection closed before setup completed.",dIe=()=>"SSH 连接在设置完成前已关闭。",fIe=()=>"اتصال SSH پیش از تکمیل راه‌اندازی بسته شد.",H7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dIe():t==="fa"?fIe():uIe()}),hIe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,_Ie=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,pIe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,OE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_Ie(e):t==="fa"?pIe(e):hIe(e)}),mIe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",gIe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",vIe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",bIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gIe():t==="fa"?vIe():mIe()}),xIe=()=>"Dark",yIe=()=>"深色",wIe=()=>"تیره",SIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yIe():t==="fa"?wIe():xIe()}),kIe=()=>"Theme",CIe=()=>"主题",EIe=()=>"پوسته",P7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CIe():t==="fa"?EIe():kIe()}),NIe=()=>"Light",zIe=()=>"浅色",AIe=()=>"روشن",TIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zIe():t==="fa"?AIe():NIe()}),jIe=()=>"System",MIe=()=>"系统",RIe=()=>"سیستم",DIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MIe():t==="fa"?RIe():jIe()}),LIe=()=>"Update now",OIe=()=>"立即更新",IIe=()=>"اکنون به‌روزرسانی کن",BIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OIe():t==="fa"?IIe():LIe()}),$Ie=e=>`Update to ${e==null?void 0:e.version}`,HIe=e=>`更新到 ${e==null?void 0:e.version}`,PIe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,FIe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?HIe(e):t==="fa"?PIe(e):$Ie(e)}),UIe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",qIe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",GIe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",VIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qIe():t==="fa"?GIe():UIe()}),WIe=()=>"Updating default destination…",KIe=()=>"正在更新默认运行位置…",YIe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",XIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KIe():t==="fa"?YIe():WIe()}),ZIe=()=>"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.",QIe=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",JIe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",eBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QIe():t==="fa"?JIe():ZIe()}),tBe=()=>"Validating…",nBe=()=>"正在验证…",rBe=()=>"در حال اعتبارسنجی…",sBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nBe():t==="fa"?rBe():tBe()}),iBe=()=>"View settings",aBe=()=>"查看设置",oBe=()=>"مشاهدهٔ تنظیمات",lBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aBe():t==="fa"?oBe():iBe()}),cBe=()=>"Skill",uBe=()=>"技能",dBe=()=>"مهارت",IE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uBe():t==="fa"?dBe():cBe()}),fBe=()=>"Loading skill…",hBe=()=>"正在加载技能…",_Be=()=>"در حال بارگیری مهارت…",pBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hBe():t==="fa"?_Be():fBe()}),mBe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,gBe=e=>`删除技能“${e==null?void 0:e.name}”?`,vBe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,bBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?gBe(e):t==="fa"?vBe(e):mBe(e)}),xBe=e=>`Delete skill ${e==null?void 0:e.name}`,yBe=e=>`删除技能 ${e==null?void 0:e.name}`,wBe=e=>`حذف مهارت ${e==null?void 0:e.name}`,SBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yBe(e):t==="fa"?wBe(e):xBe(e)}),kBe=e=>`Delete the “${e==null?void 0:e.name}” template?`,CBe=e=>`删除模板“${e==null?void 0:e.name}”?`,EBe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,NBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?CBe(e):t==="fa"?EBe(e):kBe(e)}),zBe=e=>`Delete template ${e==null?void 0:e.name}`,ABe=e=>`删除模板 ${e==null?void 0:e.name}`,TBe=e=>`حذف قالب ${e==null?void 0:e.name}`,jBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ABe(e):t==="fa"?TBe(e):zBe(e)}),MBe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",RBe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",DBe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",LBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RBe():t==="fa"?DBe():MBe()}),OBe=()=>"Drop a SKILL.md or .zip here, or click to choose",IBe=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",BBe=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",$Be=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IBe():t==="fa"?BBe():OBe()}),HBe=()=>"Drop a .tex or .zip here, or click to choose",PBe=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",FBe=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",UBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PBe():t==="fa"?FBe():HBe()}),qBe=()=>"File too large (max 20 MB).",GBe=()=>"文件过大(最大 20 MB)。",VBe=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",BE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GBe():t==="fa"?VBe():qBe()}),WBe=()=>" + 1 file",KBe=()=>" + 1 个文件",YBe=()=>" + ۱ فایل",XBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KBe():t==="fa"?YBe():WBe()}),ZBe=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",QBe=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",JBe=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",e$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QBe():t==="fa"?JBe():ZBe()}),t$e=e=>` + ${e==null?void 0:e.count} files`,n$e=e=>` + ${e==null?void 0:e.count} 个文件`,r$e=e=>` + ${e==null?void 0:e.count} فایل`,s$e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?n$e(e):t==="fa"?r$e(e):t$e(e)}),i$e=()=>"Could not load skills:",a$e=()=>"无法加载技能:",o$e=()=>"بارگیری مهارت‌ها ممکن نشد:",l$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a$e():t==="fa"?o$e():i$e()}),c$e=()=>"Could not load templates:",u$e=()=>"无法加载模板:",d$e=()=>"بارگیری قالب‌ها ممکن نشد:",f$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u$e():t==="fa"?d$e():c$e()}),h$e=()=>"Customize",_$e=()=>"自定义",p$e=()=>"سفارشی‌سازی",m$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_$e():t==="fa"?p$e():h$e()}),g$e=()=>"Delete skill",v$e=()=>"删除技能",b$e=()=>"حذف مهارت",x$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v$e():t==="fa"?b$e():g$e()}),y$e=()=>"Delete template",w$e=()=>"删除模板",S$e=()=>"حذف قالب",k$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w$e():t==="fa"?S$e():y$e()}),C$e=()=>"LaTeX templates",E$e=()=>"LaTeX 模板",N$e=()=>"قالب‌های LaTeX",z$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E$e():t==="fa"?N$e():C$e()}),A$e=()=>"Loading skills…",T$e=()=>"正在加载技能…",j$e=()=>"در حال بارگیری مهارت‌ها…",M$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T$e():t==="fa"?j$e():A$e()}),R$e=()=>"Loading templates…",D$e=()=>"正在加载模板…",L$e=()=>"در حال بارگیری قالب‌ها…",O$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D$e():t==="fa"?L$e():R$e()}),I$e=()=>"No skills yet.",B$e=()=>"尚无技能。",$$e=()=>"هنوز مهارتی وجود ندارد.",H$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B$e():t==="fa"?$$e():I$e()}),P$e=()=>"No templates yet.",F$e=()=>"尚无模板。",U$e=()=>"هنوز قالبی وجود ندارد.",q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F$e():t==="fa"?U$e():P$e()}),G$e=()=>"Skills",V$e=()=>"技能",W$e=()=>"مهارت‌ها",K$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V$e():t==="fa"?W$e():G$e()}),Y$e=()=>"Uploading…",X$e=()=>"正在上传…",Z$e=()=>"در حال بارگذاری…",Q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X$e():t==="fa"?Z$e():Y$e()}),J$e=()=>"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. With exactly one template available, the agent uses it without asking.",eHe=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",tHe=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",nHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eHe():t==="fa"?tHe():J$e()}),rHe=()=>"Upload a SKILL.md file or a .zip of a skill folder.",sHe=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",iHe=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",aHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sHe():t==="fa"?iHe():rHe()}),oHe=()=>"Upload a .tex file or a .zip of a template folder.",lHe=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",cHe=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",uHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lHe():t==="fa"?cHe():oHe()}),dHe=()=>"Cancelled",fHe=()=>"已取消",hHe=()=>"لغوشده",_He=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fHe():t==="fa"?hHe():dHe()}),pHe=()=>"Cancelling",mHe=()=>"正在取消",gHe=()=>"در حال لغو",vHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mHe():t==="fa"?gHe():pHe()}),bHe=()=>"Done",xHe=()=>"已完成",yHe=()=>"انجام‌شده",wHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xHe():t==="fa"?yHe():bHe()}),SHe=()=>"Editing",kHe=()=>"正在编辑",CHe=()=>"در حال ویرایش",EHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kHe():t==="fa"?CHe():SHe()}),NHe=()=>"Failed",zHe=()=>"失败",AHe=()=>"ناموفق",THe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zHe():t==="fa"?AHe():NHe()}),jHe=()=>"Idle",MHe=()=>"空闲",RHe=()=>"بی‌کار",DHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MHe():t==="fa"?RHe():jHe()}),LHe=()=>"Running",OHe=()=>"运行中",IHe=()=>"در حال اجرا",BHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OHe():t==="fa"?IHe():LHe()}),$He=()=>"Starting",HHe=()=>"正在启动",PHe=()=>"در حال آغاز",FHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HHe():t==="fa"?PHe():$He()}),UHe=()=>"Copying…",qHe=()=>"正在复制…",GHe=()=>"در حال کپی…",VHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qHe():t==="fa"?GHe():UHe()}),WHe=()=>"Finalizing…",KHe=()=>"正在完成…",YHe=()=>"در حال نهایی‌سازی…",XHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KHe():t==="fa"?YHe():WHe()}),ZHe=e=>`${e==null?void 0:e.size} free at target`,QHe=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,JHe=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,ePe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?QHe(e):t==="fa"?JHe(e):ZHe(e)}),tPe=e=>`Move all orx data to: +رونوشت آن برای همیشه حذف خواهد شد.`,uK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?lK(e):t==="fa"?cK(e):oK(e)}),dK=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,fK=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,hK=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,_K=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fK(e):t==="fa"?hK(e):dK(e)}),pK=()=>"Could not exit Plan mode. Try again.",mK=()=>"无法退出计划模式。请重试。",gK=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",vK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mK():t==="fa"?gK():pK()}),bK=()=>"Expand tool activity",xK=()=>"展开工具活动",yK=()=>"باز کردن فعالیت ابزارها",wK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xK():t==="fa"?yK():bK()}),SK=()=>"experiments",kK=()=>"实验",CK=()=>"آزمایش‌ها",EK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kK():t==="fa"?CK():SK()}),NK=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,zK=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,AK=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,TK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zK(e):t==="fa"?AK(e):NK(e)}),jK=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills)`,MK=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能)`,RK=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها)`,DK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?MK(e):t==="fa"?RK(e):jK(e)}),LK=e=>`Message not sent: ${e==null?void 0:e.error}`,OK=e=>`消息未发送:${e==null?void 0:e.error}`,IK=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,BK=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?OK(e):t==="fa"?IK(e):LK(e)}),$K=()=>"New session",HK=()=>"新会话",PK=()=>"نشست جدید",O6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HK():t==="fa"?PK():$K()}),FK=()=>"No active sessions",UK=()=>"没有活跃会话",qK=()=>"نشست فعالی وجود ندارد",GK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UK():t==="fa"?qK():FK()}),VK=()=>"No activity",WK=()=>"无活动",KK=()=>"بدون فعالیت",YK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WK():t==="fa"?KK():VK()}),XK=()=>"No archived sessions",ZK=()=>"没有已归档的会话",QK=()=>"نشست بایگانی‌شده‌ای وجود ندارد",JK=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZK():t==="fa"?QK():XK()}),eY=()=>"No sessions yet",tY=()=>"还没有会话",nY=()=>"هنوز نشستی وجود ندارد",rY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tY():t==="fa"?nY():eY()}),sY=()=>"1 annotation",iY=()=>"1 条批注",aY=()=>"۱ یادداشت",oY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iY():t==="fa"?aY():sY()}),lY=()=>"Open sub-agent transcript",cY=()=>"打开子智能体记录",uY=()=>"باز کردن متن گفت‌وگوی عامل فرعی",dY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cY():t==="fa"?uY():lY()}),fY=()=>"About this demo",hY=()=>"关于此演示",_Y=()=>"دربارهٔ این نسخهٔ نمایشی",I6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hY():t==="fa"?_Y():fY()}),pY=()=>"Accept and auto mode",mY=()=>"接受并使用自动模式",gY=()=>"پذیرش و حالت خودکار",vY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mY():t==="fa"?gY():pY()}),bY=()=>"Accept and bypass all",xY=()=>"接受并跳过所有审批",yY=()=>"پذیرش و عبور از همهٔ تأییدها",wY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xY():t==="fa"?yY():bY()}),SY=()=>"Active",kY=()=>"活跃",CY=()=>"فعال",EY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kY():t==="fa"?CY():SY()}),NY=()=>"All",zY=()=>"全部",AY=()=>"همه",TY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zY():t==="fa"?AY():NY()}),jY=()=>"Allow",MY=()=>"允许",RY=()=>"اجازه دادن",DY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MY():t==="fa"?RY():jY()}),LY=()=>"Approval required",OY=()=>"需要批准",IY=()=>"نیازمند تأیید",BY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OY():t==="fa"?IY():LY()}),$Y=()=>"Archived",HY=()=>"已归档",PY=()=>"بایگانی‌شده",B6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HY():t==="fa"?PY():$Y()}),FY=()=>"Artifacts",UY=()=>"产物",qY=()=>"خروجی‌ها",GY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UY():t==="fa"?qY():FY()}),VY=()=>"Ask about this",WY=()=>"询问此内容",KY=()=>"دربارهٔ این بپرسید",YY=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WY():t==="fa"?KY():VY()}),XY=()=>"Attach a PDF or image",ZY=()=>"附加 PDF 或图片",QY=()=>"پیوست PDF یا تصویر",$6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZY():t==="fa"?QY():XY()}),JY=()=>"Browsed the web",eX=()=>"已浏览网页",tX=()=>"وب مرور شد",H6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eX():t==="fa"?tX():JY()}),nX=()=>"Built the project",rX=()=>"已构建项目",sX=()=>"پروژه ساخته شد",iX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rX():t==="fa"?sX():nX()}),aX=()=>"Cancel",oX=()=>"取消",lX=()=>"لغو",cX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oX():t==="fa"?lX():aX()}),uX=()=>"Cancelled an experiment run",dX=()=>"已取消实验运行",fX=()=>"اجرای آزمایش لغو شد",hX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dX():t==="fa"?fX():uX()}),_X=()=>"Checked code style",pX=()=>"已检查代码风格",mX=()=>"سبک کد بررسی شد",gX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pX():t==="fa"?mX():_X()}),vX=()=>"Checked compute options",bX=()=>"已检查算力选项",xX=()=>"گزینه‌های رایانشی بررسی شد",yX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bX():t==="fa"?xX():vX()}),wX=()=>"Checked experiment status",SX=()=>"已检查实验状态",kX=()=>"وضعیت آزمایش بررسی شد",P6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SX():t==="fa"?kX():wX()}),CX=()=>"Checked Git status",EX=()=>"已检查 Git 状态",NX=()=>"وضعیت Git بررسی شد",zX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EX():t==="fa"?NX():CX()}),AX=()=>"Checked local times",TX=()=>"已查询当地时间",jX=()=>"زمان‌های محلی بررسی شد",MX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TX():t==="fa"?jX():AX()}),RX=()=>"Checked market data",DX=()=>"已查询市场数据",LX=()=>"داده‌های بازار بررسی شد",OX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DX():t==="fa"?LX():RX()}),IX=()=>"Checked sports data",BX=()=>"已查询体育数据",$X=()=>"داده‌های ورزشی بررسی شد",HX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BX():t==="fa"?$X():IX()}),PX=()=>"Checked the weather",FX=()=>"已查询天气",UX=()=>"آب‌وهوا بررسی شد",qX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FX():t==="fa"?UX():PX()}),GX=()=>"Checked types",VX=()=>"已检查类型",WX=()=>"نوع‌ها بررسی شد",KX=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VX():t==="fa"?WX():GX()}),YX=()=>"Clear annotations",XX=()=>"清除批注",ZX=()=>"پاک کردن یادداشت‌ها",F6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XX():t==="fa"?ZX():YX()}),QX=()=>"Customize",JX=()=>"自定义",eZ=()=>"سفارشی‌سازی",tZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JX():t==="fa"?eZ():QX()}),nZ=()=>"Data sources",rZ=()=>"数据源",sZ=()=>"منابع داده",K1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rZ():t==="fa"?sZ():nZ()}),iZ=()=>"Delegated a task to a new agent",aZ=()=>"已将任务委派给新智能体",oZ=()=>"وظیفه به عامل جدید واگذار شد",lZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aZ():t==="fa"?oZ():iZ()}),cZ=()=>"Delete",uZ=()=>"删除",dZ=()=>"حذف",fZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uZ():t==="fa"?dZ():cZ()}),hZ=()=>"Deny",_Z=()=>"拒绝",pZ=()=>"رد کردن",mZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Z():t==="fa"?pZ():hZ()}),gZ=()=>"Edit and re-send",vZ=()=>"编辑并重新发送",bZ=()=>"ویرایش و ارسال دوباره",U6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vZ():t==="fa"?bZ():gZ()}),xZ=()=>"Edit message",yZ=()=>"编辑消息",wZ=()=>"ویرایش پیام",SZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yZ():t==="fa"?wZ():xZ()}),kZ=()=>"Edited a file",CZ=()=>"已编辑文件",EZ=()=>"فایل ویرایش شد",q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CZ():t==="fa"?EZ():kZ()}),NZ=()=>"Exit Plan mode",zZ=()=>"退出计划模式",AZ=()=>"خروج از حالت طرح",G6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zZ():t==="fa"?AZ():NZ()}),TZ=()=>"Experiments",jZ=()=>"实验",MZ=()=>"آزمایش‌ها",RZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jZ():t==="fa"?MZ():TZ()}),DZ=()=>"Failed:",LZ=()=>"失败:",OZ=()=>"ناموفق:",_x=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LZ():t==="fa"?OZ():DZ()}),IZ=()=>"Files",BZ=()=>"文件",$Z=()=>"فایل‌ها",HZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BZ():t==="fa"?$Z():IZ()}),PZ=()=>"Filter sessions",FZ=()=>"筛选会话",UZ=()=>"فیلتر نشست‌ها",V6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FZ():t==="fa"?UZ():PZ()}),qZ=()=>"is unavailable.",GZ=()=>"不可用。",VZ=()=>"در دسترس نیست.",WZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GZ():t==="fa"?VZ():qZ()}),KZ=()=>"Later queued messages will wait until this is retried or removed.",YZ=()=>"后续排队的消息会等待此消息重试或移除。",XZ=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",ZZ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YZ():t==="fa"?XZ():KZ()}),QZ=()=>"Listed files",JZ=()=>"已列出文件",eQ=()=>"فایل‌ها فهرست شد",W6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JZ():t==="fa"?eQ():QZ()}),tQ=()=>"Listed project runs",nQ=()=>"已列出项目运行",rQ=()=>"اجراهای پروژه فهرست شد",sQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nQ():t==="fa"?rQ():tQ()}),iQ=()=>"Listed projects",aQ=()=>"已列出项目",oQ=()=>"پروژه‌ها فهرست شد",lQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aQ():t==="fa"?oQ():iQ()}),cQ=()=>"Loading conversation…",uQ=()=>"正在加载对话…",dQ=()=>"در حال بارگیری گفتگو…",fQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uQ():t==="fa"?dQ():cQ()}),hQ=()=>"Next version",_Q=()=>"下一版本",pQ=()=>"نسخهٔ بعدی",K6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Q():t==="fa"?pQ():hQ()}),mQ=()=>"Open the session this agent spawned",gQ=()=>"打开此智能体创建的会话",vQ=()=>"باز کردن نشست ساخته‌شده توسط این عامل",bQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gQ():t==="fa"?vQ():mQ()}),xQ=()=>"Opened web pages",yQ=()=>"已打开网页",wQ=()=>"صفحه‌های وب باز شد",SQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yQ():t==="fa"?wQ():xQ()}),kQ=()=>"Plan",CQ=()=>"计划",EQ=()=>"طرح",NQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CQ():t==="fa"?EQ():kQ()}),zQ=()=>"Plan approved",AQ=()=>"计划已批准",TQ=()=>"طرح تأیید شد",jQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AQ():t==="fa"?TQ():zQ()}),MQ=()=>"Plan rejected",RQ=()=>"计划已拒绝",DQ=()=>"طرح رد شد",LQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RQ():t==="fa"?DQ():MQ()}),OQ=()=>"Plan resolved",IQ=()=>"计划已处理",BQ=()=>"طرح تعیین تکلیف شد",$Q=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IQ():t==="fa"?BQ():OQ()}),HQ=()=>"Plan revision requested",PQ=()=>"已请求修改计划",FQ=()=>"درخواست بازنگری طرح ثبت شد",UQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PQ():t==="fa"?FQ():HQ()}),qQ=()=>"Previous version",GQ=()=>"上一版本",VQ=()=>"نسخهٔ قبلی",Y6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GQ():t==="fa"?VQ():qQ()}),WQ=()=>"Ran a command",KQ=()=>"已运行命令",YQ=()=>"فرمان اجرا شد",XQ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KQ():t==="fa"?YQ():WQ()}),ZQ=()=>"Ran tests",QQ=()=>"已运行测试",JQ=()=>"آزمون‌ها اجرا شد",eJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QQ():t==="fa"?JQ():ZQ()}),tJ=()=>"Read a file",nJ=()=>"已读取文件",rJ=()=>"فایل خوانده شد",sJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nJ():t==="fa"?rJ():tJ()}),iJ=()=>"Read Git history",aJ=()=>"已读取 Git 历史",oJ=()=>"تاریخچهٔ Git خوانده شد",lJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aJ():t==="fa"?oJ():iJ()}),cJ=()=>"Read project details",uJ=()=>"已读取项目详情",dJ=()=>"جزئیات پروژه خوانده شد",fJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uJ():t==="fa"?dJ():cJ()}),hJ=()=>"Reject",_J=()=>"拒绝",pJ=()=>"رد کردن",mJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_J():t==="fa"?pJ():hJ()}),gJ=()=>"Remove",vJ=()=>"移除",bJ=()=>"حذف",xJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vJ():t==="fa"?bJ():gJ()}),yJ=()=>"Remove annotation",wJ=()=>"移除批注",SJ=()=>"حذف یادداشت",kJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wJ():t==="fa"?SJ():yJ()}),CJ=()=>"Remove file",EJ=()=>"移除文件",NJ=()=>"حذف فایل",X6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EJ():t==="fa"?NJ():CJ()}),zJ=()=>"Remove image",AJ=()=>"移除图片",TJ=()=>"حذف تصویر",Z6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AJ():t==="fa"?TJ():zJ()}),jJ=()=>"Remove queued message",MJ=()=>"移除排队消息",RJ=()=>"حذف پیام صف",Q6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MJ():t==="fa"?RJ():jJ()}),DJ=()=>"Rename",LJ=()=>"重命名",OJ=()=>"تغییر نام",IJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LJ():t==="fa"?OJ():DJ()}),BJ=()=>"Reviewed code changes",$J=()=>"已审查代码更改",HJ=()=>"تغییرات کد بازبینی شد",PJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$J():t==="fa"?HJ():BJ()}),FJ=()=>"Selected chat text",UJ=()=>"已选聊天文本",qJ=()=>"متن انتخاب‌شدهٔ گفتگو",GJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UJ():t==="fa"?qJ():FJ()}),VJ=()=>"Selected text:",WJ=()=>"已选文本:",KJ=()=>"متن انتخاب‌شده:",YJ=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WJ():t==="fa"?KJ():VJ()}),XJ=()=>"Send",ZJ=()=>"发送",QJ=()=>"ارسال",kb=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZJ():t==="fa"?QJ():XJ()}),JJ=()=>"Session options",eee=()=>"会话选项",tee=()=>"گزینه‌های نشست",J6=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eee():t==="fa"?tee():JJ()}),nee=()=>"Session title",ree=()=>"会话标题",see=()=>"عنوان نشست",iee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ree():t==="fa"?see():nee()}),aee=()=>"Show sidebar",oee=()=>"显示侧边栏",lee=()=>"نمایش نوار کناری",e7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oee():t==="fa"?lee():aee()}),cee=()=>"Started an experiment run",uee=()=>"已启动实验运行",dee=()=>"اجرای آزمایش آغاز شد",fee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uee():t==="fa"?dee():cee()}),hee=()=>"Reading the project to suggest where to start…",_ee=()=>"正在阅读项目以建议从哪里开始…",pee=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",mee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_ee():t==="fa"?pee():hee()}),gee=()=>"Starter prompts",vee=()=>"入门提示",bee=()=>"پیشنهادهای شروع",xee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vee():t==="fa"?bee():gee()}),yee=()=>"Stop",wee=()=>"停止",See=()=>"توقف",t7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wee():t==="fa"?See():yee()}),kee=()=>"Submit",Cee=()=>"提交",Eee=()=>"ارسال",Nee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cee():t==="fa"?Eee():kee()}),zee=()=>"Task",Aee=()=>"任务",Tee=()=>"وظیفه",jee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aee():t==="fa"?Tee():zee()}),Mee=()=>"Tool failed",Ree=()=>"工具失败",Dee=()=>"ابزار ناموفق بود",Lee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ree():t==="fa"?Dee():Mee()}),Oee=()=>"Used tools",Iee=()=>"已使用工具",Bee=()=>"ابزارها استفاده شد",iE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iee():t==="fa"?Bee():Oee()}),$ee=()=>"View full plan",Hee=()=>"查看完整计划",Pee=()=>"مشاهدهٔ طرح کامل",Fee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hee():t==="fa"?Pee():$ee()}),Uee=()=>"Waited for an experiment run",qee=()=>"已等待实验运行",Gee=()=>"برای اجرای آزمایش صبر شد",Vee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qee():t==="fa"?Gee():Uee()}),Wee=()=>"Waiting for your input…",Kee=()=>"正在等待你的输入…",Yee=()=>"منتظر ورودی شما…",Xee=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kee():t==="fa"?Yee():Wee()}),Zee=()=>"What should we research?",Qee=()=>"我们应该研究什么?",Jee=()=>"چه چیزی را پژوهش کنیم؟",ete=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qee():t==="fa"?Jee():Zee()}),tte=()=>"You, mid-task",nte=()=>"你(任务进行中)",rte=()=>"شما، هنگام انجام وظیفه",ste=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nte():t==="fa"?rte():tte()}),ite=()=>"Pasted image",ate=()=>"粘贴的图片",ote=()=>"تصویر جای‌گذاری‌شده",lte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ate():t==="fa"?ote():ite()}),cte=()=>"Plan",ute=()=>"计划",dte=()=>"طرح",aE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ute():t==="fa"?dte():cte()}),fte=()=>"Plan mode — ready to proceed?",hte=()=>"计划模式 — 准备好继续了吗?",_te=()=>"حالت طرح — آماده‌اید ادامه دهید؟",pte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hte():t==="fa"?_te():fte()}),mte=()=>"Proposed plan",gte=()=>"提议的计划",vte=()=>"طرح پیشنهادی",n7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gte():t==="fa"?vte():mte()}),bte=()=>"Question",xte=()=>"问题",yte=()=>"پرسش",wte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xte():t==="fa"?yte():bte()}),Ste=()=>"Queued",kte=()=>"已排队",Cte=()=>"در صف",Ete=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kte():t==="fa"?Cte():Ste()}),Nte=()=>"Recents",zte=()=>"最近",Ate=()=>"اخیر",oE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zte():t==="fa"?Ate():Nte()}),Tte=()=>"Re-check its setup.",jte=()=>"请重新检查其设置。",Mte=()=>"راه‌اندازی آن را دوباره بررسی کنید.",Rte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jte():t==="fa"?Mte():Tte()}),Dte=()=>"Could not recover this turn. Try again.",Lte=()=>"无法恢复本轮。请重试。",Ote=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",Ite=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lte():t==="fa"?Ote():Dte()}),Bte=()=>"Could not remove the queued message. Try again.",$te=()=>"无法移除排队消息。请重试。",Hte=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",Pte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$te():t==="fa"?Hte():Bte()}),Fte=e=>`Could not re-send: ${e==null?void 0:e.error}`,Ute=e=>`无法重新发送:${e==null?void 0:e.error}`,qte=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,Gte=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ute(e):t==="fa"?qte(e):Fte(e)}),Vte=()=>"Resolved",Wte=()=>"已处理",Kte=()=>"رسیدگی شد",Yte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wte():t==="fa"?Kte():Vte()}),Xte=()=>"Could not retry the queued message. Try again.",Zte=()=>"无法重试排队消息。请重试。",Qte=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Jte=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zte():t==="fa"?Qte():Xte()}),ene=()=>"run logs",tne=()=>"运行日志",nne=()=>"گزارش‌های اجرا",rne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tne():t==="fa"?nne():ene()}),sne=()=>"Scroll to bottom",ine=()=>"滚动到底部",ane=()=>"رفتن به پایین گفتگو",r7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ine():t==="fa"?ane():sne()}),one=()=>"The selected harness is unavailable",lne=()=>"所选智能体工具不可用",cne=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",s7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lne():t==="fa"?cne():one()}),une=()=>"The chat session was not created",dne=()=>"未能创建聊天会话",fne=()=>"نشست گفت‌وگو ایجاد نشد",hne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dne():t==="fa"?fne():une()}),_ne=()=>" · Spawned by another agent",pne=()=>" · 由另一个智能体创建",mne=()=>" · ساخته‌شده به‌دست عامل دیگر",gne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pne():t==="fa"?mne():_ne()}),vne=()=>"Starting…",bne=()=>"正在启动…",xne=()=>"در حال شروع…",yne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bne():t==="fa"?xne():vne()}),wne=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,Sne=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,kne=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,Cne=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Sne(e):t==="fa"?kne(e):wne(e)}),Ene=()=>"Could not stop the turn. Try again.",Nne=()=>"无法停止本轮。请重试。",zne=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",Ane=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nne():t==="fa"?zne():Ene()}),Tne=e=>`Could not switch fork: ${e==null?void 0:e.error}`,jne=e=>`无法切换分支:${e==null?void 0:e.error}`,Mne=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,Rne=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jne(e):t==="fa"?Mne(e):Tne(e)}),Dne=()=>"The agent",Lne=()=>"智能体",One=()=>"عامل",Ine=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lne():t==="fa"?One():Dne()}),Bne=()=>"Thinking",$ne=()=>"正在思考",Hne=()=>"در حال فکر کردن",Pne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ne():t==="fa"?Hne():Bne()}),Fne=()=>"Could not toggle Plan mode. Try again.",Une=()=>"无法切换计划模式。请重试。",qne=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",i7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Une():t==="fa"?qne():Fne()}),Gne=()=>"This turn did not finish.",Vne=()=>"本轮未完成。",Wne=()=>"این نوبت کامل نشد.",Kne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vne():t==="fa"?Wne():Gne()}),Yne=()=>"Type a custom answer…",Xne=()=>"输入自定义回答…",Zne=()=>"پاسخ دلخواه را بنویسید…",Qne=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xne():t==="fa"?Zne():Yne()}),Jne=()=>"Unarchive",ere=()=>"取消归档",tre=()=>"خارج کردن از بایگانی",nre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ere():t==="fa"?tre():Jne()}),rre=()=>"Untitled",sre=()=>"未命名",ire=()=>"بدون عنوان",Y1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sre():t==="fa"?ire():rre()}),are=()=>"Could not update permissions. Try again.",ore=()=>"无法更新权限。请重试。",lre=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",cre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ore():t==="fa"?lre():are()}),ure=()=>"Working…",dre=()=>"正在工作…",fre=()=>"در حال کار…",Bf=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dre():t==="fa"?fre():ure()}),hre=()=>"Close tab",_re=()=>"关闭标签页",pre=()=>"بستن زبانه",mre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_re():t==="fa"?pre():hre()}),gre=()=>"Changes",vre=()=>"更改",bre=()=>"تغییرات",xre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vre():t==="fa"?bre():gre()}),yre=()=>"Code browser view",wre=()=>"代码浏览器视图",Sre=()=>"نمای مرورگر کد",kre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wre():t==="fa"?Sre():yre()}),Cre=()=>"Files",Ere=()=>"文件",Nre=()=>"فایل‌ها",zre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ere():t==="fa"?Nre():Cre()}),Are=()=>"Refresh",Tre=()=>"刷新",jre=()=>"تازه‌سازی",a7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tre():t==="fa"?jre():Are()}),Mre=()=>"listing truncated",Rre=()=>"列表已截断",Dre=()=>"فهرست کوتاه شده است",Lre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rre():t==="fa"?Dre():Mre()}),Ore=()=>"No files.",Ire=()=>"没有文件。",Bre=()=>"فایلی وجود ندارد.",$re=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ire():t==="fa"?Bre():Ore()}),Hre=()=>"Refresh failed:",Pre=()=>"刷新失败:",Fre=()=>"تازه‌سازی ناموفق بود:",Ure=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pre():t==="fa"?Fre():Hre()}),qre=()=>"Cancelling…",Gre=()=>"正在取消…",Vre=()=>"در حال لغو…",Wre=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gre():t==="fa"?Vre():qre()}),Kre=()=>"Checking…",Yre=()=>"正在检查…",Xre=()=>"در حال بررسی…",Op=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yre():t==="fa"?Xre():Kre()}),Zre=()=>"Copied",Qre=()=>"已复制",Jre=()=>"کپی شد",tp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qre():t==="fa"?Jre():Zre()}),ese=e=>`Failed to load: ${e==null?void 0:e.error}`,tse=e=>`加载失败:${e==null?void 0:e.error}`,nse=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,lE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?tse(e):t==="fa"?nse(e):ese(e)}),rse=()=>"Loading…",sse=()=>"正在加载…",ise=()=>"در حال بارگیری…",cE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sse():t==="fa"?ise():rse()}),ase=e=>`+ ${e==null?void 0:e.count} more`,ose=e=>`另有 ${e==null?void 0:e.count} 项`,lse=e=>`${e==null?void 0:e.count}+ مورد دیگر`,cse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ose(e):t==="fa"?lse(e):ase(e)}),use=()=>"Rendered view",dse=()=>"渲染视图",fse=()=>"نمای رندرشده",np=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dse():t==="fa"?fse():use()}),hse=()=>"Save",_se=()=>"保存",pse=()=>"ذخیره",Cc=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_se():t==="fa"?pse():hse()}),mse=()=>"Saving…",gse=()=>"正在保存…",vse=()=>"در حال ذخیره…",Ta=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gse():t==="fa"?vse():mse()}),bse=()=>"Show less",xse=()=>"收起",yse=()=>"نمایش کمتر",uE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xse():t==="fa"?yse():bse()}),wse=()=>"Show more",Sse=()=>"展开",kse=()=>"نمایش بیشتر",Cse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sse():t==="fa"?kse():wse()}),Ese=()=>"Stop",Nse=()=>"停止",zse=()=>"توقف",dE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nse():t==="fa"?zse():Ese()}),Ase=()=>"Stopping…",Tse=()=>"正在停止…",jse=()=>"در حال توقف…",Mse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tse():t==="fa"?jse():Ase()}),Rse=()=>"View source",Dse=()=>"查看源代码",Lse=()=>"نمایش متن منبع",Tu=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dse():t==="fa"?Lse():Rse()}),Ose=e=>`Hugging Face token — ${e==null?void 0:e.summary}`,Ise=e=>`Hugging Face 令牌 — ${e==null?void 0:e.summary}`,Bse=e=>`توکن Hugging Face — ${e==null?void 0:e.summary}`,$se=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ise(e):t==="fa"?Bse(e):Ose(e)}),Hse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Pse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Fse=e=>`Kubeconfig — ${e==null?void 0:e.summary}`,Use=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pse(e):t==="fa"?Fse(e):Hse(e)}),qse=()=>"No credentials required; this computer is always available.",Gse=()=>"无需凭据;此计算机始终可用。",Vse=()=>"نیازی به اطلاعات ورود نیست؛ این رایانه همیشه در دسترس است.",Wse=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gse():t==="fa"?Vse():qse()}),Kse=e=>`Modal token — ${e==null?void 0:e.summary}`,Yse=e=>`Modal 令牌 — ${e==null?void 0:e.summary}`,Xse=e=>`توکن Modal — ${e==null?void 0:e.summary}`,Zse=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yse(e):t==="fa"?Xse(e):Kse(e)}),Qse=e=>`OpenResearch login and SSH key — ${e==null?void 0:e.summary}`,Jse=e=>`OpenResearch 登录信息和 SSH 密钥 — ${e==null?void 0:e.summary}`,eie=e=>`ورود OpenResearch و کلید SSH — ${e==null?void 0:e.summary}`,tie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jse(e):t==="fa"?eie(e):Qse(e)}),nie=e=>`Ray Jobs endpoint — ${e==null?void 0:e.summary}`,rie=e=>`Ray Jobs 端点 — ${e==null?void 0:e.summary}`,sie=e=>`endpoint مربوط به Ray Jobs — ${e==null?void 0:e.summary}`,iie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?rie(e):t==="fa"?sie(e):nie(e)}),aie=e=>`SSH config — ${e==null?void 0:e.summary}`,oie=e=>`SSH 配置 — ${e==null?void 0:e.summary}`,lie=e=>`پیکربندی SSH — ${e==null?void 0:e.summary}`,cie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oie(e):t==="fa"?lie(e):aie(e)}),uie=e=>`SSH config and keys — ${e==null?void 0:e.summary}`,die=e=>`SSH 配置和密钥 — ${e==null?void 0:e.summary}`,fie=e=>`پیکربندی و کلیدهای SSH — ${e==null?void 0:e.summary}`,hie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?die(e):t==="fa"?fie(e):uie(e)}),_ie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,pie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,mie=e=>`TINKER_API_KEY — ${e==null?void 0:e.summary}`,gie=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pie(e):t==="fa"?mie(e):_ie(e)}),vie=()=>"Runs as a remote Hugging Face Job",bie=()=>"作为远程 Hugging Face Job 运行",xie=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bie():t==="fa"?xie():vie()}),wie=()=>"Runs as a Job on your Kubernetes cluster",Sie=()=>"作为 Kubernetes 集群上的 Job 运行",kie=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",Cie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sie():t==="fa"?kie():wie()}),Eie=()=>"Runs directly on this computer",Nie=()=>"直接在此计算机上运行",zie=()=>"مستقیماً روی این رایانه اجرا می‌شود",Aie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nie():t==="fa"?zie():Eie()}),Tie=()=>"Runs in a remote Modal sandbox",jie=()=>"在远程 Modal 沙箱中运行",Mie=()=>"در sandbox دوردست Modal اجرا می‌شود",Rie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jie():t==="fa"?Mie():Tie()}),Die=()=>"Runs on an ephemeral OpenResearch box",Lie=()=>"在临时 OpenResearch 主机上运行",Oie=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",Iie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lie():t==="fa"?Oie():Die()}),Bie=()=>"Runs on the connected Ray cluster",$ie=()=>"在已连接的 Ray 集群上运行",Hie=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",Pie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ie():t==="fa"?Hie():Bie()}),Fie=()=>"Runs as a scheduled job on your Slurm cluster",Uie=()=>"作为 Slurm 集群上的调度作业运行",qie=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",Gie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uie():t==="fa"?qie():Fie()}),Vie=()=>"Runs on a host from your SSH config",Wie=()=>"在 SSH 配置中的主机上运行",Kie=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",Yie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wie():t==="fa"?Kie():Vie()}),Xie=()=>"Runs through Tinker’s remote compute",Zie=()=>"通过 Tinker 远程算力运行",Qie=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",Jie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zie():t==="fa"?Qie():Xie()}),eae=()=>"HF Jobs",tae=()=>"HF Jobs",nae=()=>"HF Jobs",rae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tae():t==="fa"?nae():eae()}),sae=()=>"Kubernetes",iae=()=>"Kubernetes",aae=()=>"Kubernetes",oae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iae():t==="fa"?aae():sae()}),lae=()=>"This machine",cae=()=>"此计算机",uae=()=>"این رایانه",fE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cae():t==="fa"?uae():lae()}),dae=()=>"Modal",fae=()=>"Modal",hae=()=>"Modal",_ae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fae():t==="fa"?hae():dae()}),pae=()=>"OpenResearch",mae=()=>"OpenResearch",gae=()=>"OpenResearch",vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mae():t==="fa"?gae():pae()}),bae=()=>"Ray",xae=()=>"Ray",yae=()=>"Ray",wae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xae():t==="fa"?yae():bae()}),Sae=()=>"Slurm",kae=()=>"Slurm",Cae=()=>"Slurm",Eae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kae():t==="fa"?Cae():Sae()}),Nae=()=>"SSH",zae=()=>"SSH",Aae=()=>"SSH",Tae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zae():t==="fa"?Aae():Nae()}),jae=()=>"Tinker",Mae=()=>"Tinker",Rae=()=>"Tinker",Dae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mae():t==="fa"?Rae():jae()}),Lae=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",Oae=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",Iae=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",Bae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oae():t==="fa"?Iae():Lae()}),$ae=()=>"A Kubernetes Job is created in the selected context and namespace from the project’s .orx/k8s.yaml manifest.",Hae=()=>"系统根据项目的 .orx/k8s.yaml 清单,在所选上下文和命名空间中创建 Kubernetes Job。",Pae=()=>"بر پایهٔ مانیفست .orx/k8s.yaml پروژه، یک Kubernetes Job در زمینه و فضای نام انتخاب‌شده ساخته می‌شود.",Fae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hae():t==="fa"?Pae():$ae()}),Uae=()=>"The experiment runs as a supervised process on this computer and uses its CPU, memory, and GPUs.",qae=()=>"实验作为受监管进程在此计算机上运行,并使用其 CPU、内存和 GPU。",Gae=()=>"آزمایش به‌صورت فرایندی تحت نظارت روی این رایانه اجرا می‌شود و از CPU، حافظه و GPUهای آن استفاده می‌کند.",Vae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qae():t==="fa"?Gae():Uae()}),Wae=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",Kae=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",Yae=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",Xae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kae():t==="fa"?Yae():Wae()}),Zae=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",Qae=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",Jae=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",eoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qae():t==="fa"?Jae():Zae()}),toe=()=>"The run is submitted to the Ray Jobs endpoint, and the connected Ray cluster executes it.",noe=()=>"运行会提交到 Ray Jobs 端点,并由已连接的 Ray 集群执行。",roe=()=>"اجرا به endpoint مربوط به Ray Jobs فرستاده و توسط خوشهٔ متصل Ray اجرا می‌شود.",soe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?noe():t==="fa"?roe():toe()}),ioe=()=>"The login node receives an sbatch job using the saved partition, account, and time limit; the cluster schedules the work.",aoe=()=>"登录节点使用已保存的分区、账户和时间限制接收 sbatch 作业;集群负责调度。",ooe=()=>"گرهٔ ورود یک کار sbatch با پارتیشن، حساب و محدودیت زمانی ذخیره‌شده دریافت می‌کند و خوشه آن را زمان‌بندی می‌کند.",loe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aoe():t==="fa"?ooe():ioe()}),coe=()=>"The project is copied to the selected SSH host and runs there. Logs and status return to this dashboard.",uoe=()=>"项目会复制到所选 SSH 主机并在那里运行。日志和状态会返回此控制台。",doe=()=>"پروژه به میزبان SSH انتخاب‌شده کپی و همان‌جا اجرا می‌شود. گزارش‌ها و وضعیت به این داشبورد برمی‌گردند.",foe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uoe():t==="fa"?doe():coe()}),hoe=()=>"A controller runs here while the Tinker SDK sends model operations to remote compute. This computer must stay awake and online.",_oe=()=>"控制器在此计算机上运行,Tinker SDK 将模型操作发送到远程算力。此计算机必须保持唤醒和联网。",poe=()=>"کنترل‌گر روی این رایانه اجرا می‌شود و Tinker SDK عملیات مدل را به رایانش دوردست می‌فرستد. این رایانه باید روشن و آنلاین بماند.",moe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_oe():t==="fa"?poe():hoe()}),goe=()=>"Context window",voe=()=>"上下文窗口",boe=()=>"پنجرهٔ زمینه",xoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?voe():t==="fa"?boe():goe()}),yoe=()=>"Context window used",woe=()=>"已使用的上下文窗口",Soe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",koe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?woe():t==="fa"?Soe():yoe()}),Coe=e=>`${e==null?void 0:e.value} tokens`,Eoe=e=>`${e==null?void 0:e.value} 个 token`,Noe=e=>`${e==null?void 0:e.value} توکن`,zoe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Eoe(e):t==="fa"?Noe(e):Coe(e)}),Aoe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Toe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,joe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,Moe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Toe(e):t==="fa"?joe(e):Aoe(e)}),Roe=()=>"No runs yet — ask the agent to launch one.",Doe=()=>"尚无运行——让智能体启动一个。",Loe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",Ooe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Doe():t==="fa"?Loe():Roe()}),Ioe=()=>"Run",Boe=()=>"运行",$oe=()=>"اجرا",o7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Boe():t==="fa"?$oe():Ioe()}),Hoe=()=>"Switch run",Poe=()=>"切换运行",Foe=()=>"تغییر اجرا",Uoe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Poe():t==="fa"?Foe():Hoe()}),qoe=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=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,Woe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Goe(e):t==="fa"?Voe(e):qoe(e)}),Koe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,Yoe=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} دقیقه`,Zoe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yoe(e):t==="fa"?Xoe(e):Koe(e)}),Qoe=e=>`${e==null?void 0:e.value}m`,Joe=e=>`${e==null?void 0:e.value} 分钟`,ele=e=>`${e==null?void 0:e.value} دقیقه`,tle=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Joe(e):t==="fa"?ele(e):Qoe(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,n={})=>{const t=n.locale??N();return t==="zh-CN"?rle(e):t==="fa"?sle(e):nle(e)}),ale=()=>"Code",ole=()=>"代码",lle=()=>"کد",cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ole():t==="fa"?lle():ale()}),ule=()=>"created",dle=()=>"创建于",fle=()=>"ایجادشده",hle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dle():t==="fa"?fle():ule()}),_le=()=>"from",ple=()=>"来自",mle=()=>"از",gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ple():t==="fa"?mle():_le()}),vle=()=>"Logs",ble=()=>"日志",xle=()=>"گزارش‌ها",yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ble():t==="fa"?xle():vle()}),wle=()=>"Latest run",Sle=()=>"最新运行",kle=()=>"آخرین اجرا",Cle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sle():t==="fa"?kle():wle()}),Ele=()=>"Code",Nle=()=>"代码",zle=()=>"کد",Ale=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nle():t==="fa"?zle():Ele()}),Tle=()=>"Commit",jle=()=>"提交",Mle=()=>"کامیت",Rle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jle():t==="fa"?Mle():Tle()}),Dle=()=>"created",Lle=()=>"创建于",Ole=()=>"ایجادشده",Ile=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lle():t==="fa"?Ole():Dle()}),Ble=()=>"Description",$le=()=>"说明",Hle=()=>"توضیحات",Ple=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$le():t==="fa"?Hle():Ble()}),Fle=()=>"Duration",Ule=()=>"时长",qle=()=>"مدت",Gle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ule():t==="fa"?qle():Fle()}),Vle=()=>"exit",Wle=()=>"退出码",Kle=()=>"خروج",Yle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wle():t==="fa"?Kle():Vle()}),Xle=()=>"from",Zle=()=>"来自",Qle=()=>"از",Jle=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zle():t==="fa"?Qle():Xle()}),ece=()=>"Logs",tce=()=>"日志",nce=()=>"گزارش‌ها",rce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tce():t==="fa"?nce():ece()}),sce=()=>"Run",ice=()=>"运行",ace=()=>"اجرا",oce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ice():t==="fa"?ace():sce()}),lce=()=>"Run history",cce=()=>"运行历史",uce=()=>"تاریخچهٔ اجرا",dce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cce():t==="fa"?uce():lce()}),fce=()=>"Started",hce=()=>"开始时间",_ce=()=>"آغاز",pce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hce():t==="fa"?_ce():fce()}),mce=()=>"Runs",gce=()=>"运行",vce=()=>"اجراها",bce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gce():t==="fa"?vce():mce()}),xce=()=>"No runs yet",yce=()=>"还没有运行",wce=()=>"هنوز اجرایی وجود ندارد",Sce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yce():t==="fa"?wce():xce()}),kce=()=>"No experiments yet.",Cce=()=>"还没有实验。",Ece=()=>"هنوز آزمایشی وجود ندارد.",Nce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cce():t==="fa"?Ece():kce()}),zce=()=>"Not run yet",Ace=()=>"尚未运行",Tce=()=>"هنوز اجرا نشده",jce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ace():t==="fa"?Tce():zce()}),Mce=()=>"1 run",Rce=()=>"1 次运行",Dce=()=>"۱ اجرا",Lce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rce():t==="fa"?Dce():Mce()}),Oce=()=>"Open logs",Ice=()=>"打开日志",Bce=()=>"باز کردن گزارش‌ها",$ce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ice():t==="fa"?Bce():Oce()}),Hce=e=>`${e==null?void 0:e.count} runs`,Pce=e=>`${e==null?void 0:e.count} 次运行`,Fce=e=>`${e==null?void 0:e.count} اجرا`,Uce=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pce(e):t==="fa"?Fce(e):Hce(e)}),qce=()=>"Stop requested",Gce=()=>"已请求停止",Vce=()=>"درخواست توقف ثبت شد",Wce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gce():t==="fa"?Vce():qce()}),Kce=()=>"Stop run",Yce=()=>"停止运行",Xce=()=>"توقف اجرا",Zce=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yce():t==="fa"?Xce():Kce()}),Qce=()=>"Code",Jce=()=>"代码",eue=()=>"کد",tue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jce():t==="fa"?eue():Qce()}),nue=()=>"Experiments",rue=()=>"实验",sue=()=>"آزمایش‌ها",iue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rue():t==="fa"?sue():nue()}),aue=()=>"Logs",oue=()=>"日志",lue=()=>"گزارش‌ها",cue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oue():t==="fa"?lue():aue()}),uue=()=>"Stop failed:",due=()=>"停止失败:",fue=()=>"توقف ناموفق بود:",hue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?due():t==="fa"?fue():uue()}),_ue=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,pue=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,mue=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,gue=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pue(e):t==="fa"?mue(e):_ue(e)}),vue=()=>"Binary file — no inline preview.",bue=()=>"二进制文件——无法内嵌预览。",xue=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",yue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bue():t==="fa"?xue():vue()}),wue=()=>"Compile failed",Sue=()=>"编译失败",kue=()=>"کامپایل ناموفق بود",Cue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sue():t==="fa"?kue():wue()}),Eue=()=>"Compile PDF",Nue=()=>"编译 PDF",zue=()=>"کامپایل PDF",l7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nue():t==="fa"?zue():Eue()}),Aue=()=>"Compiled, but the engine reported errors — check the output below.",Tue=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",jue=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",Mue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tue():t==="fa"?jue():Aue()}),Rue=()=>"Copy command",Due=()=>"复制命令",Lue=()=>"کپی فرمان",Oue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Due():t==="fa"?Lue():Rue()}),Iue=()=>"Copy install command",Bue=()=>"复制安装命令",$ue=()=>"کپی فرمان نصب",Hue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bue():t==="fa"?$ue():Iue()}),Pue=()=>"Discard my edits and reload",Fue=()=>"放弃我的编辑并重新加载",Uue=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",que=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fue():t==="fa"?Uue():Pue()}),Gue=()=>"Dismiss",Vue=()=>"关闭",Wue=()=>"بستن",c7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vue():t==="fa"?Wue():Gue()}),Kue=()=>"Dismiss compile message",Yue=()=>"关闭编译消息",Xue=()=>"بستن پیام کامپایل",Zue=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yue():t==="fa"?Xue():Kue()}),Que=()=>"Dismiss Overleaf message",Jue=()=>"关闭 Overleaf 消息",ede=()=>"بستن پیام Overleaf",tde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jue():t==="fa"?ede():Que()}),nde=()=>"Download",rde=()=>"下载",sde=()=>"بارگیری",hE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rde():t==="fa"?sde():nde()}),ide=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,ade=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,ode=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,lde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ade(e):t==="fa"?ode(e):ide(e)}),cde=()=>"Failed to load file:",ude=()=>"加载文件失败:",dde=()=>"بارگیری فایل ناموفق بود:",fde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ude():t==="fa"?dde():cde()}),hde=()=>"File truncated — showing the first 512 KB.",_de=()=>"文件已截断——仅显示前 512 KB。",pde=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",mde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_de():t==="fa"?pde():hde()}),gde=()=>"The page below stops partway — the full file could not be loaded.",vde=()=>"下方页面在中途结束——无法加载完整文件。",bde=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",xde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vde():t==="fa"?bde():gde()}),yde=e=>`Rendered HTML: ${e==null?void 0:e.name}`,wde=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,Sde=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,kde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?wde(e):t==="fa"?Sde(e):yde(e)}),Cde=()=>"Loading…",Ede=()=>"正在加载…",Nde=()=>"در حال بارگیری…",_E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ede():t==="fa"?Nde():Cde()}),zde=()=>"File not found.",Ade=()=>"找不到文件。",Tde=()=>"فایل پیدا نشد.",jde=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ade():t==="fa"?Tde():zde()}),Mde=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,Rde=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,Dde=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,Lde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Rde(e):t==="fa"?Dde(e):Mde(e)}),Ode=e=>`File not found on branch ${e==null?void 0:e.branch}.`,Ide=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,Bde=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,$de=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Ide(e):t==="fa"?Bde(e):Ode(e)}),Hde=()=>"File not found on disk.",Pde=()=>"磁盘上找不到此文件。",Fde=()=>"فایل روی دیسک پیدا نشد.",Ude=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pde():t==="fa"?Fde():Hde()}),qde=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,Gde=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,Vde=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,Wde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Gde(e):t==="fa"?Vde(e):qde(e)}),Kde=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Yde=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,Xde=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,Zde=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yde(e):t==="fa"?Xde(e):Kde(e)}),Qde=()=>"Open in default editor",Jde=()=>"在默认编辑器中打开",efe=()=>"باز کردن در ویرایشگر پیش‌فرض",u7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jde():t==="fa"?efe():Qde()}),tfe=()=>"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.",nfe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",rfe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",sfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nfe():t==="fa"?rfe():tfe()}),ife=()=>"Compiled PDF is out of date",afe=()=>"已编译的 PDF 不是最新版本",ofe=()=>"PDF کامپایل‌شده به‌روز نیست",lfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?afe():t==="fa"?ofe():ife()}),cfe=()=>"project clone",ufe=()=>"项目克隆",dfe=()=>"کلون پروژه",Z_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ufe():t==="fa"?dfe():cfe()}),ffe=()=>"Recompile PDF",hfe=()=>"重新编译 PDF",_fe=()=>"کامپایل دوبارهٔ PDF",d7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hfe():t==="fa"?_fe():ffe()}),pfe=()=>"Reload file",mfe=()=>"重新加载文件",gfe=()=>"بارگیری دوبارهٔ فایل",f7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mfe():t==="fa"?gfe():pfe()}),vfe=()=>"Save failed",bfe=()=>"保存失败",xfe=()=>"ذخیره ناموفق بود",yfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bfe():t==="fa"?xfe():vfe()}),wfe=()=>"Saving…",Sfe=()=>"正在保存…",kfe=()=>"در حال ذخیره…",Cfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sfe():t==="fa"?kfe():wfe()}),Efe=()=>"Selected — press ⌘C",Nfe=()=>"已选中 — 按 ⌘C 复制",zfe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",Afe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nfe():t==="fa"?zfe():Efe()}),Tfe=()=>"session’s worktree",jfe=()=>"会话工作树",Mfe=()=>"درخت کاری نشست",Q_=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jfe():t==="fa"?Mfe():Tfe()}),Rfe=()=>"Show compiled PDF",Dfe=()=>"显示已编译的 PDF",Lfe=()=>"نمایش PDF کامپایل‌شده",h7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dfe():t==="fa"?Lfe():Rfe()}),Ofe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",Ife=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",Bfe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",$fe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ife():t==="fa"?Bfe():Ofe()}),Hfe=()=>"This session's worktree isn't available — showing the project clone's copy.",Pfe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",Ffe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",Ufe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pfe():t==="fa"?Ffe():Hfe()}),qfe=()=>"Unsaved",Gfe=()=>"未保存",Vfe=()=>"ذخیره نشده",Wfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gfe():t==="fa"?Vfe():qfe()}),Kfe=()=>"Unsaved — ⌘S or click away to save",Yfe=()=>"未保存 — 按 ⌘S 或点击其他位置保存",Xfe=()=>"ذخیره نشده — ⌘S را بزنید یا برای ذخیره بیرون کلیک کنید",Zfe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yfe():t==="fa"?Xfe():Kfe()}),Qfe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",Jfe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",ehe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",the=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jfe():t==="fa"?ehe():Qfe()}),nhe=()=>"Back to preview",rhe=()=>"返回预览",she=()=>"بازگشت به پیش‌نمایش",ihe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rhe():t==="fa"?she():nhe()}),ahe=e=>`${e==null?void 0:e.count} changed files`,ohe=e=>`${e==null?void 0:e.count} 个已更改文件`,lhe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,che=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?ohe(e):t==="fa"?lhe(e):ahe(e)}),uhe=()=>"Changed files",dhe=()=>"已更改文件",fhe=()=>"فایل‌های تغییرکرده",hhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dhe():t==="fa"?fhe():uhe()}),_he=()=>"Diff preview truncated",phe=()=>"差异预览已截断",mhe=()=>"پیش‌نمایش تفاوت کوتاه شده است",ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?phe():t==="fa"?mhe():_he()}),vhe=e=>`${e==null?void 0:e.count} files shown (partial)`,bhe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,xhe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,yhe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bhe(e):t==="fa"?xhe(e):vhe(e)}),whe=()=>"No changes.",She=()=>"没有更改。",khe=()=>"تغییری وجود ندارد.",Che=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?She():t==="fa"?khe():whe()}),Ehe=()=>"No complete file preview was available before the cutoff.",Nhe=()=>"在截断位置之前没有完整的文件预览。",zhe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",Ahe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nhe():t==="fa"?zhe():Ehe()}),The=()=>"No textual diff for this file.",jhe=()=>"此文件没有文本差异。",Mhe=()=>"برای این فایل تفاوت متنی وجود ندارد.",Rhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jhe():t==="fa"?Mhe():The()}),Dhe=()=>"1 changed file",Lhe=()=>"1 个已更改文件",Ohe=()=>"۱ فایل تغییرکرده",Ihe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lhe():t==="fa"?Ohe():Dhe()}),Bhe=()=>"1 file shown (partial)",$he=()=>"显示 1 个文件(部分)",Hhe=()=>"۱ فایل نمایش داده شده (ناقص)",Phe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$he():t==="fa"?Hhe():Bhe()}),Fhe=()=>"Unable to parse this diff.",Uhe=()=>"无法解析此差异。",qhe=()=>"خواندن این تفاوت ممکن نبود.",Ghe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uhe():t==="fa"?qhe():Fhe()}),Vhe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,Whe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,Khe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,Yhe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Whe(e):t==="fa"?Khe(e):Vhe(e)}),Xhe=()=>"View full diff",Zhe=()=>"查看完整差异",Qhe=()=>"نمایش تفاوت کامل",Jhe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zhe():t==="fa"?Qhe():Xhe()}),e_e=()=>"Create a token ↗",t_e=()=>"创建令牌 ↗",n_e=()=>"ساخت توکن ↗",r_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t_e():t==="fa"?n_e():e_e()}),s_e=()=>"All projects",i_e=()=>"所有项目",a_e=()=>"همهٔ پروژه‌ها",_7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i_e():t==="fa"?a_e():s_e()}),o_e=()=>"Configure Repository",l_e=()=>"配置仓库",c_e=()=>"پیکربندی مخزن",u_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l_e():t==="fa"?c_e():o_e()}),d_e=()=>"Create a new project",f_e=()=>"新建项目",h_e=()=>"ایجاد پروژهٔ جدید",__e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f_e():t==="fa"?h_e():d_e()}),p_e=()=>"Hide sidebar",m_e=()=>"隐藏侧边栏",g_e=()=>"پنهان کردن نوار کناری",p7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m_e():t==="fa"?g_e():p_e()}),v_e=()=>"Project",b_e=()=>"项目",x_e=()=>"پروژه",y_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b_e():t==="fa"?x_e():v_e()}),w_e=e=>`${e==null?void 0:e.count} cancelled`,S_e=e=>`${e==null?void 0:e.count} 次取消`,k_e=e=>`${e==null?void 0:e.count} لغوشده`,C_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?S_e(e):t==="fa"?k_e(e):w_e(e)}),E_e=e=>`${e==null?void 0:e.count} done`,N_e=e=>`${e==null?void 0:e.count} 次完成`,z_e=e=>`${e==null?void 0:e.count} تمام‌شده`,A_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?N_e(e):t==="fa"?z_e(e):E_e(e)}),T_e=e=>`${e==null?void 0:e.count} failed`,j_e=e=>`${e==null?void 0:e.count} 次失败`,M_e=e=>`${e==null?void 0:e.count} ناموفق`,R_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j_e(e):t==="fa"?M_e(e):T_e(e)}),D_e=e=>`${e==null?void 0:e.count} files`,L_e=e=>`${e==null?void 0:e.count} 个文件`,O_e=e=>`${e==null?void 0:e.count} فایل`,I_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?L_e(e):t==="fa"?O_e(e):D_e(e)}),B_e=e=>`${e==null?void 0:e.count}+ files`,$_e=e=>`至少 ${e==null?void 0:e.count} 个文件`,H_e=e=>`بیش از ${e==null?void 0:e.count} فایل`,P_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$_e(e):t==="fa"?H_e(e):B_e(e)}),F_e=e=>`${e==null?void 0:e.count} live`,U_e=e=>`${e==null?void 0:e.count} 次进行中`,q_e=e=>`${e==null?void 0:e.count} فعال`,G_e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U_e(e):t==="fa"?q_e(e):F_e(e)}),V_e=()=>"1 file",W_e=()=>"1 个文件",K_e=()=>"۱ فایل",Y_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W_e():t==="fa"?K_e():V_e()}),X_e=()=>"1 run",Z_e=()=>"1 次运行",Q_e=()=>"۱ اجرا",J_e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z_e():t==="fa"?Q_e():X_e()}),e0e=e=>`${e==null?void 0:e.count} runs`,t0e=e=>`${e==null?void 0:e.count} 次运行`,n0e=e=>`${e==null?void 0:e.count} اجرا`,r0e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?t0e(e):t==="fa"?n0e(e):e0e(e)}),s0e=()=>"No instances yet.",i0e=()=>"还没有实例。",a0e=()=>"هنوز نمونه‌ای وجود ندارد.",o0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i0e():t==="fa"?a0e():s0e()}),l0e=()=>"Nothing running right now.",c0e=()=>"当前没有运行中的实例。",u0e=()=>"اکنون چیزی در حال اجرا نیست.",d0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c0e():t==="fa"?u0e():l0e()}),f0e=()=>"Select a project to see its history.",h0e=()=>"请选择一个项目以查看其历史记录。",_0e=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",p0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h0e():t==="fa"?_0e():f0e()}),m0e=()=>"Select a project to see its runs.",g0e=()=>"请选择一个项目以查看其运行。",v0e=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",b0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g0e():t==="fa"?v0e():m0e()}),x0e=()=>"View history",y0e=()=>"查看历史记录",w0e=()=>"مشاهدهٔ تاریخچه",S0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y0e():t==="fa"?w0e():x0e()}),k0e=e=>`View history (${e==null?void 0:e.count})`,C0e=e=>`查看历史记录(${e==null?void 0:e.count})`,E0e=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,N0e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?C0e(e):t==="fa"?E0e(e):k0e(e)}),z0e=()=>"The engine exited without producing a PDF or a log.",A0e=()=>"引擎已退出,但没有生成 PDF 或日志。",T0e=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",j0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A0e():t==="fa"?T0e():z0e()}),M0e=()=>"Loading…",R0e=()=>"正在加载…",D0e=()=>"در حال بارگیری…",L0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R0e():t==="fa"?D0e():M0e()}),O0e=()=>"Copy",I0e=()=>"复制",B0e=()=>"کپی",pE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I0e():t==="fa"?B0e():O0e()}),$0e=()=>"Copy code",H0e=()=>"复制代码",P0e=()=>"کپی کد",F0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H0e():t==="fa"?P0e():$0e()}),U0e=()=>"Download",q0e=()=>"下载",G0e=()=>"بارگیری",mE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q0e():t==="fa"?G0e():U0e()}),V0e=()=>"This browser can’t preview this media format.",W0e=()=>"此浏览器无法预览该媒体格式。",K0e=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",Y0e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?W0e():t==="fa"?K0e():V0e()}),X0e=()=>" · CLI configuration",Z0e=()=>" · CLI 配置",Q0e=()=>" · پیکربندی CLI",gE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z0e():t==="fa"?Q0e():X0e()}),J0e=()=>"· Default",epe=()=>"· 默认",tpe=()=>"· پیش‌فرض",vE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?epe():t==="fa"?tpe():J0e()}),npe=()=>"Default model",rpe=()=>"默认模型",spe=()=>"مدل پیش‌فرض",m7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rpe():t==="fa"?spe():npe()}),ipe=()=>"Detecting harnesses…",ape=()=>"正在检测智能体工具…",ope=()=>"در حال شناسایی ابزارهای عامل…",lpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ape():t==="fa"?ope():ipe()}),cpe=()=>"Effort",upe=()=>"推理强度",dpe=()=>"میزان استدلال",fpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?upe():t==="fa"?dpe():cpe()}),hpe=()=>"Fast speed ·",_pe=()=>"快速 ·",ppe=()=>"سرعت بالا ·",mpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_pe():t==="fa"?ppe():hpe()}),gpe=()=>"Mode",vpe=()=>"模式",bpe=()=>"حالت",g7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vpe():t==="fa"?bpe():gpe()}),xpe=()=>"Model",ype=()=>"模型",wpe=()=>"مدل",X1=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ype():t==="fa"?wpe():xpe()}),Spe=e=>`${e==null?void 0:e.count} more — search to find`,kpe=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,Cpe=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,Epe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kpe(e):t==="fa"?Cpe(e):Spe(e)}),Npe=()=>"Not available",zpe=()=>"不可用",Ape=()=>"در دسترس نیست",Tpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zpe():t==="fa"?Ape():Npe()}),jpe=()=>"Search models…",Mpe=()=>"搜索模型…",Rpe=()=>"جست‌وجوی مدل‌ها…",Dpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mpe():t==="fa"?Rpe():jpe()}),Lpe=()=>"Sessions keep their harness. Start a new chat to switch.",Ope=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Ipe=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Bpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ope():t==="fa"?Ipe():Lpe()}),$pe=()=>"Speed",Hpe=()=>"速度",Ppe=()=>"سرعت",v7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hpe():t==="fa"?Ppe():$pe()}),Fpe=()=>"Unavailable",Upe=()=>"不可用",qpe=()=>"در دسترس نیست",bE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Upe():t==="fa"?qpe():Fpe()}),Gpe=e=>`Use “${e==null?void 0:e.id}” as the model ID`,Vpe=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,Wpe=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,Kpe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Vpe(e):t==="fa"?Wpe(e):Gpe(e)}),Ype=()=>"Variant",Xpe=()=>"变体",Zpe=()=>"گونه",Qpe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xpe():t==="fa"?Zpe():Ype()}),Jpe=()=>"Advanced",eme=()=>"高级",tme=()=>"پیشرفته",nme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eme():t==="fa"?tme():Jpe()}),rme=()=>"Advanced · Connect GitHub",sme=()=>"高级 · 连接 GitHub",ime=()=>"پیشرفته · اتصال GitHub",ame=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sme():t==="fa"?ime():rme()}),ome=()=>"Advanced · GitHub sync on",lme=()=>"高级 · GitHub 同步已开启",cme=()=>"پیشرفته · همگام‌سازی GitHub روشن است",ume=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lme():t==="fa"?cme():ome()}),dme=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",fme=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",hme=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",_me=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fme():t==="fa"?hme():dme()}),pme=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,mme=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,gme=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,vme=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mme(e):t==="fa"?gme(e):pme(e)}),bme=()=>"Choose an existing project folder",xme=()=>"选择现有项目文件夹",yme=()=>"انتخاب پوشهٔ موجود پروژه",b7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xme():t==="fa"?yme():bme()}),wme=()=>"Choosing…",Sme=()=>"正在选择…",kme=()=>"در حال انتخاب…",Cme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sme():t==="fa"?kme():wme()}),Eme=()=>"Clone destination",Nme=()=>"克隆位置",zme=()=>"مقصد کلون",Ame=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nme():t==="fa"?zme():Eme()}),Tme=()=>"Clone paper project",jme=()=>"克隆论文项目",Mme=()=>"کلون پروژهٔ مقاله",Rme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jme():t==="fa"?Mme():Tme()}),Dme=()=>"Create project",Lme=()=>"创建项目",Ome=()=>"ایجاد پروژه",x7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lme():t==="fa"?Ome():Dme()}),Ime=()=>"Creating…",Bme=()=>"正在创建…",$me=()=>"در حال ایجاد…",Hme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bme():t==="fa"?$me():Ime()}),Pme=()=>"Choose a different destination. This path is a file, not a folder.",Fme=()=>"请选择其他位置。此路径是文件,不是文件夹。",Ume=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",y7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fme():t==="fa"?Ume():Pme()}),qme=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Gme=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Vme=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Wme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gme():t==="fa"?Vme():qme()}),Kme=()=>"Blank project",Yme=()=>"空白项目",Xme=()=>"پروژهٔ خالی",Zme=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yme():t==="fa"?Xme():Kme()}),Qme=()=>"Cancel",Jme=()=>"取消",ege=()=>"لغو",tge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jme():t==="fa"?ege():Qme()}),nge=()=>"Change",rge=()=>"更改",sge=()=>"تغییر",ige=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rge():t==="fa"?sge():nge()}),age=()=>"Change selected paper",oge=()=>"更改所选论文",lge=()=>"تغییر مقالهٔ انتخاب‌شده",cge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oge():t==="fa"?lge():age()}),uge=()=>"Check out a Git branch before using this folder.",dge=()=>"使用此文件夹前,请先检出一个 Git 分支。",fge=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",hge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dge():t==="fa"?fge():uge()}),_ge=()=>"Checking project location.",pge=()=>"正在检查项目位置。",mge=()=>"در حال بررسی محل پروژه.",w7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pge():t==="fa"?mge():_ge()}),gge=()=>"Existing folder",vge=()=>"现有文件夹",bge=()=>"پوشهٔ موجود",xge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vge():t==="fa"?bge():gge()}),yge=()=>"Experiment branches will be pushed to the remote GitHub repository.",wge=()=>"实验分支将推送到远程 GitHub 仓库。",Sge=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",kge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wge():t==="fa"?Sge():yge()}),Cge=()=>"From a paper",Ege=()=>"从论文创建",Nge=()=>"از یک مقاله",zge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ege():t==="fa"?Nge():Cge()}),Age=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",Tge=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",jge=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",Mge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Tge():t==="fa"?jge():Age()}),Rge=()=>"my-research",Dge=()=>"my-research",Lge=()=>"my-research",S7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Dge():t==="fa"?Lge():Rge()}),Oge=()=>"No papers found. Try an arXiv ID, URL, or a different title.",Ige=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Bge=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",$ge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ige():t==="fa"?Bge():Oge()}),Hge=()=>"No public repository found on alphaXiv",Pge=()=>"在 alphaXiv 上未找到公开仓库",Fge=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Uge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pge():t==="fa"?Fge():Hge()}),qge=()=>"OpenResearch will start a blank project with this paper's PDF.",Gge=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Vge=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Wge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gge():t==="fa"?Vge():qge()}),Kge=()=>"Paper",Yge=()=>"论文",Xge=()=>"مقاله",Zge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yge():t==="fa"?Xge():Kge()}),Qge=()=>"Project location",Jge=()=>"项目位置",e1e=()=>"محل پروژه",k7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jge():t==="fa"?e1e():Qge()}),t1e=()=>"Project name",n1e=()=>"项目名称",r1e=()=>"نام پروژه",C7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n1e():t==="fa"?r1e():t1e()}),s1e=()=>"Search for a paper by arXiv ID, URL, or title",i1e=()=>"按 arXiv ID、网址或标题搜索论文",a1e=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",o1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?i1e():t==="fa"?a1e():s1e()}),l1e=()=>"Sync experiments to GitHub",c1e=()=>"将实验同步到 GitHub",u1e=()=>"همگام‌سازی آزمایش‌ها با GitHub",d1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c1e():t==="fa"?u1e():l1e()}),f1e=()=>"That folder no longer exists. Choose it again.",h1e=()=>"该文件夹已不存在。请重新选择。",_1e=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",p1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h1e():t==="fa"?_1e():f1e()}),m1e=()=>"The selected folder contains an invalid Git repository.",g1e=()=>"所选文件夹包含无效的 Git 仓库。",v1e=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",b1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?g1e():t==="fa"?v1e():m1e()}),x1e=()=>"The selected path is not a folder.",y1e=()=>"所选路径不是文件夹。",w1e=()=>"مسیر انتخاب‌شده پوشه نیست.",S1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y1e():t==="fa"?w1e():x1e()}),k1e=e=>`Checking ${e==null?void 0:e.repository}.`,C1e=e=>`正在检查 ${e==null?void 0:e.repository}。`,E1e=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,N1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?C1e(e):t==="fa"?E1e(e):k1e(e)}),z1e=e=>`Creates ${e==null?void 0:e.repository}.`,A1e=e=>`将创建 ${e==null?void 0:e.repository}。`,T1e=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,j1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?A1e(e):t==="fa"?T1e(e):z1e(e)}),M1e=e=>`Pushes to ${e==null?void 0:e.repository}.`,R1e=e=>`将推送到 ${e==null?void 0:e.repository}。`,D1e=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,L1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?R1e(e):t==="fa"?D1e(e):M1e(e)}),O1e=()=>"Project location is required.",I1e=()=>"必须填写项目位置。",B1e=()=>"محل پروژه الزامی است.",E7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I1e():t==="fa"?B1e():O1e()}),$1e=()=>"Choose a different destination. The paper repository needs a new or empty folder.",H1e=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",P1e=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",F1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H1e():t==="fa"?P1e():$1e()}),U1e=()=>"A linked public code repository is cloned without credentials.",q1e=()=>"关联的公开代码仓库无需凭据即可克隆。",G1e=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",V1e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q1e():t==="fa"?G1e():U1e()}),W1e=e=>`Run ${e==null?void 0:e.command} before creating the project.`,K1e=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,Y1e=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,X1e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?K1e(e):t==="fa"?Y1e(e):W1e(e)}),Z1e=()=>"Searching alphaXiv…",Q1e=()=>"正在搜索 alphaXiv…",J1e=()=>"در حال جست‌وجوی alphaXiv…",eve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Q1e():t==="fa"?J1e():Z1e()}),tve=()=>"Use folder",nve=()=>"使用文件夹",rve=()=>"استفاده از پوشه",sve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nve():t==="fa"?rve():tve()}),ive=()=>"Can’t reach OpenResearch. This page is no longer live.",ave=()=>"无法连接 OpenResearch。此页面已不再实时同步。",ove=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",N7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ave():t==="fa"?ove():ive()}),lve=()=>"A workspace for your research agents",cve=()=>"面向研究智能体的工作空间",uve=()=>"فضای کاری برای عامل‌های پژوهشی شما",dve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cve():t==="fa"?uve():lve()}),fve=()=>"Add papers that represent your research interests, including papers by other authors.",hve=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",_ve=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",pve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hve():t==="fa"?_ve():fve()}),mve=()=>"API key",gve=()=>"API 密钥",vve=()=>"کلید API",xE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gve():t==="fa"?vve():mve()}),bve=()=>"AI/ML",xve=()=>"人工智能与机器学习",yve=()=>"هوش مصنوعی و یادگیری ماشین",wve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xve():t==="fa"?yve():bve()}),Sve=()=>"Biology",kve=()=>"生物学",Cve=()=>"زیست‌شناسی",Eve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kve():t==="fa"?Cve():Sve()}),Nve=()=>"Other",zve=()=>"其他",Ave=()=>"سایر",Tve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zve():t==="fa"?Ave():Nve()}),jve=()=>"Physics",Mve=()=>"物理学",Rve=()=>"فیزیک",Dve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mve():t==="fa"?Rve():jve()}),Lve=()=>"Back",Ove=()=>"返回",Ive=()=>"بازگشت",z7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ove():t==="fa"?Ive():Lve()}),Bve=()=>"Check failed",$ve=()=>"检查失败",Hve=()=>"بررسی ناموفق بود",Pve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ve():t==="fa"?Hve():Bve()}),Fve=()=>"Checking",Uve=()=>"正在检查",qve=()=>"در حال بررسی",Gve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uve():t==="fa"?qve():Fve()}),Vve=()=>"Checking Git…",Wve=()=>"正在检查 Git…",Kve=()=>"در حال بررسی Git…",Yve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wve():t==="fa"?Kve():Vve()}),Xve=()=>"Choose a coding agent",Zve=()=>"选择编程智能体",Qve=()=>"یک عامل کدنویسی انتخاب کنید",Jve=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Zve():t==="fa"?Qve():Xve()}),ebe=()=>"Choose a coding agent to continue.",tbe=()=>"选择一个编程智能体以继续。",nbe=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",rbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tbe():t==="fa"?nbe():ebe()}),sbe=()=>"Choose at least one research area to continue.",ibe=()=>"请至少选择一个研究领域后再继续。",abe=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",obe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ibe():t==="fa"?abe():sbe()}),lbe=()=>"Choose one or more.",cbe=()=>"请选择一项或多项。",ube=()=>"یک یا چند مورد را انتخاب کنید.",dbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cbe():t==="fa"?ube():lbe()}),fbe=()=>"Choose your preferred coding agent",hbe=()=>"请选择首选编程智能体",_be=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",pbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hbe():t==="fa"?_be():fbe()}),mbe=()=>"Consolidate your research",gbe=()=>"集中管理研究",vbe=()=>"پژوهش خود را یکپارچه کنید",bbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gbe():t==="fa"?vbe():mbe()}),xbe=()=>"Continue",ybe=()=>"继续",wbe=()=>"ادامه",A7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ybe():t==="fa"?wbe():xbe()}),Sbe=()=>"Describe your research area to continue.",kbe=()=>"请描述你的研究领域后再继续。",Cbe=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",Ebe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kbe():t==="fa"?Cbe():Sbe()}),Nbe=()=>"Detecting Claude Code, Codex, OpenCode…",zbe=()=>"正在检测 Claude Code、Codex、OpenCode…",Abe=()=>"در حال شناسایی Claude Code، Codex و OpenCode…",Tbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zbe():t==="fa"?Abe():Nbe()}),jbe=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Mbe=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Rbe=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Dbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mbe():t==="fa"?Rbe():jbe()}),Lbe=()=>"Everything stays local",Obe=()=>"一切都保留在本地",Ibe=()=>"همه‌چیز محلی می‌ماند",Bbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Obe():t==="fa"?Ibe():Lbe()}),$be=()=>"Get started",Hbe=()=>"开始使用",Pbe=()=>"شروع",Fbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hbe():t==="fa"?Pbe():$be()}),Ube=()=>"Git is required for local experiments. Install Git, then re-check.",qbe=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",Gbe=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",Vbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qbe():t==="fa"?Gbe():Ube()}),Wbe=()=>"Ground your agents",Kbe=()=>"为智能体提供可靠依据",Ybe=()=>"عامل‌هایتان را به منابع متصل کنید",Xbe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kbe():t==="fa"?Ybe():Wbe()}),Zbe=()=>"Install broken",Qbe=()=>"安装损坏",Jbe=()=>"نصب خراب است",e2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qbe():t==="fa"?Jbe():Zbe()}),t2e=()=>"Install Git to continue",n2e=()=>"请安装 Git 后再继续",r2e=()=>"برای ادامه Git را نصب کنید",s2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n2e():t==="fa"?r2e():t2e()}),i2e=()=>"Local Git",a2e=()=>"本地 Git",o2e=()=>"Git محلی",l2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a2e():t==="fa"?o2e():i2e()}),c2e=()=>"Not detected",u2e=()=>"未检测到",d2e=()=>"شناسایی نشد",T7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u2e():t==="fa"?d2e():c2e()}),f2e=()=>"Not found",h2e=()=>"未找到",_2e=()=>"پیدا نشد",yE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?h2e():t==="fa"?_2e():f2e()}),p2e=()=>"Not signed in",m2e=()=>"未登录",g2e=()=>"وارد نشده",v2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m2e():t==="fa"?g2e():p2e()}),b2e=()=>"OpenResearch uses a coding agent already installed on this machine.",x2e=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",y2e=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",w2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?x2e():t==="fa"?y2e():b2e()}),S2e=()=>"Other research area",k2e=()=>"其他研究领域",C2e=()=>"حوزهٔ پژوهشی دیگر",E2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k2e():t==="fa"?C2e():S2e()}),N2e=()=>"Re-check",z2e=()=>"重新检查",A2e=()=>"بررسی دوباره",T2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?z2e():t==="fa"?A2e():N2e()}),j2e=()=>"Ready",M2e=()=>"已就绪",R2e=()=>"آماده",D2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?M2e():t==="fa"?R2e():j2e()}),L2e=()=>"Re-check Git before continuing",O2e=()=>"请重新检查 Git 后再继续",I2e=()=>"پیش از ادامه Git را دوباره بررسی کنید",B2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?O2e():t==="fa"?I2e():L2e()}),$2e=()=>"Representative papers",H2e=()=>"代表性论文",P2e=()=>"مقاله‌های شاخص",F2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?H2e():t==="fa"?P2e():$2e()}),U2e=()=>"Research background",q2e=()=>"研究背景",G2e=()=>"پیشینهٔ پژوهشی",V2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q2e():t==="fa"?G2e():U2e()}),W2e=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",K2e=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",Y2e=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",j7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K2e():t==="fa"?Y2e():W2e()}),X2e=()=>"Search alphaXiv by title to link a paper…",Z2e=()=>"按标题搜索 alphaXiv 以关联论文…",Q2e=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",J2e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z2e():t==="fa"?Q2e():X2e()}),exe=()=>"Searching alphaXiv…",txe=()=>"正在搜索 alphaXiv…",nxe=()=>"در حال جست‌وجوی alphaXiv…",rxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?txe():t==="fa"?nxe():exe()}),sxe=()=>"Selected",ixe=()=>"已选择",axe=()=>"انتخاب‌شده",oxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ixe():t==="fa"?axe():sxe()}),lxe=()=>"Setting things up…",cxe=()=>"正在设置…",uxe=()=>"در حال راه‌اندازی…",dxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cxe():t==="fa"?uxe():lxe()}),fxe=()=>"Sign in to at least one coding agent to continue",hxe=()=>"请至少登录一个编程智能体后再继续",_xe=()=>"برای ادامه، وارد دست‌کم یک عامل برنامه‌نویسی شوید",pxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hxe():t==="fa"?_xe():fxe()}),mxe=()=>"Sign in to at least one agent to continue.",gxe=()=>"请登录至少一个智能体以继续。",vxe=()=>"برای ادامه دست‌کم به یک عامل وارد شوید.",bxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gxe():t==="fa"?vxe():mxe()}),xxe=()=>"Signed in",yxe=()=>"已登录",wxe=()=>"وارد شده",Sxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yxe():t==="fa"?wxe():xxe()}),kxe=()=>"Connected to alphaXiv, bioRxiv, and OpenAlex to ground your agents in the latest research.",Cxe=()=>"已连接 alphaXiv、bioRxiv 和 OpenAlex,让智能体以最新研究为依据。",Exe=()=>"به alphaXiv، bioRxiv و OpenAlex متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",Nxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cxe():t==="fa"?Exe():kxe()}),zxe=()=>"· Step 1 of 2",Axe=()=>"· 第 1 步,共 2 步",Txe=()=>"· مرحلهٔ ۱ از ۲",jxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Axe():t==="fa"?Txe():zxe()}),Mxe=()=>"· Step 2 of 2",Rxe=()=>"· 第 2 步,共 2 步",Dxe=()=>"· مرحلهٔ ۲ از ۲",Lxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rxe():t==="fa"?Dxe():Mxe()}),Oxe=()=>"Tell us about your research",Ixe=()=>"介绍一下你的研究",Bxe=()=>"از پژوهش خود بگویید",$xe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ixe():t==="fa"?Bxe():Oxe()}),Hxe=()=>"Tell us your other research area",Pxe=()=>"告诉我们你的其他研究领域",Fxe=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",Uxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pxe():t==="fa"?Fxe():Hxe()}),qxe=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",Gxe=()=>"在一处跟踪实验、产物、算力、技能和代码。",Vxe=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",Wxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gxe():t==="fa"?Vxe():qxe()}),Kxe=()=>"Unable to verify",Yxe=()=>"无法验证",Xxe=()=>"تأیید ممکن نیست",Zxe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yxe():t==="fa"?Xxe():Kxe()}),Qxe=()=>"Update required",Jxe=()=>"需要更新",eye=()=>"نیازمند به‌روزرسانی",tye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jxe():t==="fa"?eye():Qxe()}),nye=()=>"Waiting for the Git check",rye=()=>"正在等待 Git 检查",sye=()=>"در انتظار بررسی Git",iye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rye():t==="fa"?sye():nye()}),aye=()=>"Waiting for the local tool checks",oye=()=>"正在等待本地工具检查",lye=()=>"در انتظار بررسی ابزارهای محلی",cye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oye():t==="fa"?lye():aye()}),uye=()=>"What areas are you interested in?",dye=()=>"你对哪些领域感兴趣?",fye=()=>"به چه حوزه‌هایی علاقه دارید؟",hye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dye():t==="fa"?fye():uye()}),_ye=()=>"Your code, data, and experiment history stay on your machine.",pye=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",mye=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",gye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pye():t==="fa"?mye():_ye()}),vye=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",bye=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",xye=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",yye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bye():t==="fa"?xye():vye()}),wye=()=>"Changed here and on Overleaf — choose which copy to keep",Sye=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",kye=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",Cye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sye():t==="fa"?kye():wye()}),Eye=()=>"Create a token ↗",Nye=()=>"创建令牌 ↗",zye=()=>"ساخت توکن ↗",Aye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nye():t==="fa"?zye():Eye()}),Tye=()=>"Overleaf Git token",jye=()=>"Overleaf Git 令牌",Mye=()=>"توکن Git در Overleaf",Rye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jye():t==="fa"?Mye():Tye()}),Dye=()=>"In step with Overleaf",Lye=()=>"已与 Overleaf 同步",Oye=()=>"با Overleaf همگام است",wE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lye():t==="fa"?Oye():Dye()}),Iye=()=>"The last sync did not finish.",Bye=()=>"上次同步未完成。",$ye=()=>"آخرین همگام‌سازی کامل نشد.",Hye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Bye():t==="fa"?$ye():Iye()}),Pye=()=>"Link and sync",Fye=()=>"关联并同步",Uye=()=>"پیوند و همگام‌سازی",qye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Fye():t==="fa"?Uye():Pye()}),Gye=()=>"My projects ↗",Vye=()=>"我的项目 ↗",Wye=()=>"پروژه‌های من ↗",Kye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Vye():t==="fa"?Wye():Gye()}),Yye=()=>"Nothing could be synced.",Xye=()=>"没有内容可以同步。",Zye=()=>"هیچ موردی قابل همگام‌سازی نبود.",Qye=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xye():t==="fa"?Zye():Yye()}),Jye=()=>"Cancel",e4e=()=>"取消",t4e=()=>"لغو",n4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?e4e():t==="fa"?t4e():Jye()}),r4e=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",s4e=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",i4e=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",a4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?s4e():t==="fa"?i4e():r4e()}),o4e=()=>"Keep this copy",l4e=()=>"保留此副本",c4e=()=>"نگه داشتن این نسخه",u4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?l4e():t==="fa"?c4e():o4e()}),d4e=()=>"Open in Overleaf",f4e=()=>"在 Overleaf 中打开",h4e=()=>"باز کردن در Overleaf",_4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f4e():t==="fa"?h4e():d4e()}),p4e=()=>"Replace the Overleaf token",m4e=()=>"替换 Overleaf 令牌",g4e=()=>"جایگزینی توکن Overleaf",M7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m4e():t==="fa"?g4e():p4e()}),v4e=()=>"Sync now",b4e=()=>"立即同步",x4e=()=>"همگام‌سازی اکنون",y4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b4e():t==="fa"?x4e():v4e()}),w4e=()=>"Unlink",S4e=()=>"取消关联",k4e=()=>"قطع پیوند",C4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?S4e():t==="fa"?k4e():w4e()}),E4e=()=>"Upload a copy as a new project ↗",N4e=()=>"上传副本作为新项目 ↗",z4e=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",A4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N4e():t==="fa"?z4e():E4e()}),T4e=()=>"Use Overleaf's",j4e=()=>"使用 Overleaf 的副本",M4e=()=>"استفاده از نسخهٔ Overleaf",R4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?j4e():t==="fa"?M4e():T4e()}),D4e=()=>"This paper stays in step with Overleaf.",L4e=()=>"此论文将与 Overleaf 保持同步。",O4e=()=>"این مقاله با Overleaf همگام می‌ماند.",I4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L4e():t==="fa"?O4e():D4e()}),B4e=e=>`Pulled ${e==null?void 0:e.paths}.`,$4e=e=>`已拉取 ${e==null?void 0:e.paths}。`,H4e=e=>`${e==null?void 0:e.paths} دریافت شد.`,P4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$4e(e):t==="fa"?H4e(e):B4e(e)}),F4e=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,U4e=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,q4e=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,G4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?U4e(e):t==="fa"?q4e(e):F4e(e)}),V4e=e=>`Pushed ${e==null?void 0:e.paths}.`,W4e=e=>`已推送 ${e==null?void 0:e.paths}。`,K4e=e=>`${e==null?void 0:e.paths} ارسال شد.`,Y4e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?W4e(e):t==="fa"?K4e(e):V4e(e)}),X4e=()=>"Save the file first",Z4e=()=>"请先保存文件",Q4e=()=>"ابتدا فایل را ذخیره کنید",J4e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z4e():t==="fa"?Q4e():X4e()}),ewe=()=>"Save this file to sync it with Overleaf",twe=()=>"保存此文件以与 Overleaf 同步",nwe=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",SE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?twe():t==="fa"?nwe():ewe()}),rwe=()=>"Save token",swe=()=>"保存令牌",iwe=()=>"ذخیرهٔ توکن",awe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?swe():t==="fa"?iwe():rwe()}),owe=()=>"Send this paper to Overleaf",lwe=()=>"将此论文发送到 Overleaf",cwe=()=>"ارسال مقاله به Overleaf",uwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lwe():t==="fa"?cwe():owe()}),dwe=()=>"Overleaf sync failed",fwe=()=>"Overleaf 同步失败",hwe=()=>"همگام‌سازی با Overleaf ناموفق بود",_we=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fwe():t==="fa"?hwe():dwe()}),pwe=()=>"Syncing with Overleaf…",mwe=()=>"正在与 Overleaf 同步…",gwe=()=>"در حال همگام‌سازی با Overleaf…",vwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mwe():t==="fa"?gwe():pwe()}),bwe=()=>"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.",xwe=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",ywe=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",wwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xwe():t==="fa"?ywe():bwe()}),Swe=()=>"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.",kwe=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",Cwe=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",Ewe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kwe():t==="fa"?Cwe():Swe()}),Nwe=()=>"Toggle Plan mode for this chat",zwe=()=>"切换此聊天的计划模式",Awe=()=>"تغییر حالت طرح این گفت‌وگو",Twe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zwe():t==="fa"?Awe():Nwe()}),jwe=()=>"Accept and auto mode",Mwe=()=>"接受并使用自动模式",Rwe=()=>"پذیرش و حالت خودکار",Dwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mwe():t==="fa"?Rwe():jwe()}),Lwe=()=>"Accept and bypass all",Owe=()=>"接受并跳过所有审批",Iwe=()=>"پذیرش و عبور از همهٔ تأییدها",Bwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Owe():t==="fa"?Iwe():Lwe()}),$we=()=>"Accept plan",Hwe=()=>"接受计划",Pwe=()=>"پذیرش طرح",Fwe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hwe():t==="fa"?Pwe():$we()}),Uwe=e=>`${e==null?void 0:e.agent} proposed a plan`,qwe=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Gwe=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,Vwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qwe(e):t==="fa"?Gwe(e):Uwe(e)}),Wwe=e=>`${e==null?void 0:e.agent} is ready to proceed`,Kwe=e=>`${e==null?void 0:e.agent} 已准备好继续`,Ywe=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,Xwe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Kwe(e):t==="fa"?Ywe(e):Wwe(e)}),Zwe=()=>"Back",Qwe=()=>"返回",Jwe=()=>"بازگشت",e5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qwe():t==="fa"?Jwe():Zwe()}),t5e=()=>"More approval options",n5e=()=>"更多批准选项",r5e=()=>"گزینه‌های تأیید بیشتر",s5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?n5e():t==="fa"?r5e():t5e()}),i5e=()=>"Open plan",a5e=()=>"打开计划",o5e=()=>"باز کردن طرح",l5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?a5e():t==="fa"?o5e():i5e()}),c5e=()=>"Reject",u5e=()=>"拒绝",d5e=()=>"رد کردن",f5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u5e():t==="fa"?d5e():c5e()}),h5e=()=>"Revise",_5e=()=>"修改",p5e=()=>"بازنگری",m5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_5e():t==="fa"?p5e():h5e()}),g5e=()=>"Revise…",v5e=()=>"修改…",b5e=()=>"بازنگری…",x5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v5e():t==="fa"?b5e():g5e()}),y5e=()=>"What should change? (optional)",w5e=()=>"需要更改什么?(可选)",S5e=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",k5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w5e():t==="fa"?S5e():y5e()}),C5e=e=>`Step ${e==null?void 0:e.count}`,E5e=e=>`第 ${e==null?void 0:e.count} 步`,N5e=e=>`گام ${e==null?void 0:e.count}`,z5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?E5e(e):t==="fa"?N5e(e):C5e(e)}),A5e=e=>`${e==null?void 0:e.count} active`,T5e=e=>`${e==null?void 0:e.count} 个活跃`,j5e=e=>`${e==null?void 0:e.count} فعال`,M5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?T5e(e):t==="fa"?j5e(e):A5e(e)}),R5e=e=>`${e==null?void 0:e.count} total agents`,D5e=e=>`共 ${e==null?void 0:e.count} 个智能体`,L5e=e=>`در مجموع ${e==null?void 0:e.count} عامل`,O5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?D5e(e):t==="fa"?L5e(e):R5e(e)}),I5e=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,B5e=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,$5e=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,H5e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?B5e(e):t==="fa"?$5e(e):I5e(e)}),P5e=()=>"Agents",F5e=()=>"智能体",U5e=()=>"عامل‌ها",R7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F5e():t==="fa"?U5e():P5e()}),q5e=()=>"arXiv paper ID:",G5e=()=>"arXiv 论文 ID:",V5e=()=>"شناسهٔ مقالهٔ arXiv:",W5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?G5e():t==="fa"?V5e():q5e()}),K5e=()=>"Cancel",Y5e=()=>"取消",X5e=()=>"لغو",Z5e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Y5e():t==="fa"?X5e():K5e()}),Q5e=()=>"Created",J5e=()=>"创建时间",e3e=()=>"ایجادشده",t3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J5e():t==="fa"?e3e():Q5e()}),n3e=()=>"Delete project?",r3e=()=>"删除项目?",s3e=()=>"پروژه حذف شود؟",i3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r3e():t==="fa"?s3e():n3e()}),a3e=()=>"Delete project",o3e=()=>"删除项目",l3e=()=>"حذف پروژه",c3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o3e():t==="fa"?l3e():a3e()}),u3e=()=>"Deleting…",d3e=()=>"正在删除…",f3e=()=>"در حال حذف…",h3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d3e():t==="fa"?f3e():u3e()}),_3e=()=>"Experiments",p3e=()=>"实验",m3e=()=>"آزمایش‌ها",D7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?p3e():t==="fa"?m3e():_3e()}),g3e=()=>"The local folder and linked GitHub repository are kept.",v3e=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",b3e=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",x3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?v3e():t==="fa"?b3e():g3e()}),y3e=()=>"The local folder is kept.",w3e=()=>"本地文件夹会保留。",S3e=()=>"پوشهٔ محلی نگه داشته می‌شود.",k3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w3e():t==="fa"?S3e():y3e()}),C3e=()=>"New project",E3e=()=>"新建项目",N3e=()=>"پروژهٔ جدید",kE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E3e():t==="fa"?N3e():C3e()}),z3e=()=>"No projects yet — create one to get started.",A3e=()=>"尚无项目——新建一个即可开始。",T3e=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",j3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A3e():t==="fa"?T3e():z3e()}),M3e=()=>"Project",R3e=()=>"项目",D3e=()=>"پروژه",L3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R3e():t==="fa"?D3e():M3e()}),O3e=()=>"Projects",I3e=()=>"项目",B3e=()=>"پروژه‌ها",$3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I3e():t==="fa"?B3e():O3e()}),H3e=()=>"Repository",P3e=()=>"仓库",F3e=()=>"مخزن",L7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?P3e():t==="fa"?F3e():H3e()}),U3e=()=>"Idle",q3e=()=>"空闲",G3e=()=>"بیکار",V3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?q3e():t==="fa"?G3e():U3e()}),W3e=()=>"Local",K3e=()=>"本地",Y3e=()=>"محلی",X3e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?K3e():t==="fa"?Y3e():W3e()}),Z3e=()=>"1 total agent",Q3e=()=>"共 1 个智能体",J3e=()=>"در مجموع ۱ عامل",e6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Q3e():t==="fa"?J3e():Z3e()}),t6e=e=>`${e==null?void 0:e.count} running`,n6e=e=>`${e==null?void 0:e.count} 个运行中`,r6e=e=>`${e==null?void 0:e.count} در حال اجرا`,s6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?n6e(e):t==="fa"?r6e(e):t6e(e)}),i6e=e=>`${e==null?void 0:e.count} total`,a6e=e=>`共 ${e==null?void 0:e.count} 个`,o6e=e=>`در مجموع ${e==null?void 0:e.count}`,O7=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?a6e(e):t==="fa"?o6e(e):i6e(e)}),l6e=e=>`${e==null?void 0:e.value}d`,c6e=e=>`${e==null?void 0:e.value} 天`,u6e=e=>`${e==null?void 0:e.value}ر`,d6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?c6e(e):t==="fa"?u6e(e):l6e(e)}),f6e=e=>`${e==null?void 0:e.value}h`,h6e=e=>`${e==null?void 0:e.value} 小时`,_6e=e=>`${e==null?void 0:e.value}س`,p6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?h6e(e):t==="fa"?_6e(e):f6e(e)}),m6e=e=>`${e==null?void 0:e.value}m`,g6e=e=>`${e==null?void 0:e.value} 分钟`,v6e=e=>`${e==null?void 0:e.value}د`,b6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?g6e(e):t==="fa"?v6e(e):m6e(e)}),x6e=()=>"now",y6e=()=>"现在",w6e=()=>"اکنون",S6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?y6e():t==="fa"?w6e():x6e()}),k6e=()=>"Disable syncing",C6e=()=>"关闭同步",E6e=()=>"غیرفعال کردن همگام‌سازی",N6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?C6e():t==="fa"?E6e():k6e()}),z6e=()=>"Enable GitHub syncing",A6e=()=>"启用 GitHub 同步",T6e=()=>"فعال‌سازی همگام‌سازی GitHub",j6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?A6e():t==="fa"?T6e():z6e()}),M6e=()=>"Enabling…",R6e=()=>"正在启用…",D6e=()=>"در حال فعال‌سازی…",L6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?R6e():t==="fa"?D6e():M6e()}),O6e=()=>"Updating…",I6e=()=>"正在更新…",B6e=()=>"در حال به‌روزرسانی…",$6e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?I6e():t==="fa"?B6e():O6e()}),H6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,P6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,F6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,U6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?P6e(e):t==="fa"?F6e(e):H6e(e)}),q6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,G6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,V6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,W6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?G6e(e):t==="fa"?V6e(e):q6e(e)}),K6e=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`,Y6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,X6e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Z6e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Y6e(e):t==="fa"?X6e(e):K6e(e)}),Q6e=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,J6e=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,e7e=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,t7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?J6e(e):t==="fa"?e7e(e):Q6e(e)}),n7e=()=>"CLI is retrying…",r7e=()=>"CLI 正在重试…",s7e=()=>"CLI در حال تلاش دوباره است…",i7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r7e():t==="fa"?s7e():n7e()}),a7e=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,o7e=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,l7e=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,c7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?o7e(e):t==="fa"?l7e(e):a7e(e)}),u7e=()=>"Sending again…",d7e=()=>"正在重新发送…",f7e=()=>"در حال ارسال دوباره…",h7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d7e():t==="fa"?f7e():u7e()}),_7e=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,p7e=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,m7e=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,g7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?p7e(e):t==="fa"?m7e(e):_7e(e)}),v7e=()=>"Retrying…",b7e=()=>"正在重试…",x7e=()=>"در حال تلاش دوباره…",CE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b7e():t==="fa"?x7e():v7e()}),y7e=()=>"Default speed",w7e=()=>"默认速度",S7e=()=>"سرعت پیش‌فرض",k7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w7e():t==="fa"?S7e():y7e()}),C7e=()=>"Standard",E7e=()=>"标准",N7e=()=>"استاندارد",z7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E7e():t==="fa"?N7e():C7e()}),A7e=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,T7e=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,j7e=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,M7e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?T7e(e):t==="fa"?j7e(e):A7e(e)}),R7e=()=>"Appearance",D7e=()=>"外观",L7e=()=>"ظاهر",O7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D7e():t==="fa"?L7e():R7e()}),I7e=()=>"Check",B7e=()=>"检查",$7e=()=>"بررسی",H7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B7e():t==="fa"?$7e():I7e()}),P7e=()=>"Check again",F7e=()=>"再次检查",U7e=()=>"بررسی دوباره",q7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F7e():t==="fa"?U7e():P7e()}),G7e=()=>"Check for updates",V7e=()=>"检查更新",W7e=()=>"بررسی به‌روزرسانی",K7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V7e():t==="fa"?W7e():G7e()}),Y7e=()=>"Check now",X7e=()=>"立即检查",Z7e=()=>"اکنون بررسی کن",Q7e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X7e():t==="fa"?Z7e():Y7e()}),J7e=()=>"Check setup",eSe=()=>"检查设置",tSe=()=>"بررسی راه‌اندازی",nSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eSe():t==="fa"?tSe():J7e()}),rSe=()=>"orx checks a few times a day on its own.",sSe=()=>"orx 每天会自动检查几次。",iSe=()=>"orx روزی چند بار خودکار بررسی می‌کند.",aSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sSe():t==="fa"?iSe():rSe()}),oSe=()=>"Choose a flavor",lSe=()=>"选择配置",cSe=()=>"انتخاب پیکربندی",uSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lSe():t==="fa"?cSe():oSe()}),dSe=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,fSe=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,hSe=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,_Se=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fSe(e):t==="fa"?hSe(e):dSe(e)}),pSe=()=>"clean",mSe=()=>"无更改",gSe=()=>"بدون تغییر",vSe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mSe():t==="fa"?gSe():pSe()}),bSe=e=>`Already linked at ${e==null?void 0:e.link}.`,xSe=e=>`已链接到 ${e==null?void 0:e.link}。`,ySe=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,wSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?xSe(e):t==="fa"?ySe(e):bSe(e)}),SSe=e=>`Linked ${e==null?void 0:e.link}.`,kSe=e=>`已链接 ${e==null?void 0:e.link}。`,CSe=e=>`${e==null?void 0:e.link} پیوند شد.`,ESe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?kSe(e):t==="fa"?CSe(e):SSe(e)}),NSe=()=>"Connect",zSe=()=>"连接",ASe=()=>"اتصال",px=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zSe():t==="fa"?ASe():NSe()}),TSe=()=>"Connected via GitHub CLI",jSe=()=>"已通过 GitHub CLI 连接",MSe=()=>"از طریق GitHub CLI متصل است",EE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jSe():t==="fa"?MSe():TSe()}),RSe=()=>"Connecting…",DSe=()=>"正在连接…",LSe=()=>"در حال اتصال…",NE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DSe():t==="fa"?LSe():RSe()}),OSe=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",ISe=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",BSe=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",$Se=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ISe():t==="fa"?BSe():OSe()}),HSe=()=>"the current project",PSe=()=>"当前项目",FSe=()=>"پروژهٔ فعلی",USe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PSe():t==="fa"?FSe():HSe()}),qSe=e=>`${e==null?void 0:e.value} (custom)`,GSe=e=>`${e==null?void 0:e.value}(自定义)`,VSe=e=>`${e==null?void 0:e.value} (سفارشی)`,WSe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GSe(e):t==="fa"?VSe(e):qSe(e)}),KSe=()=>"detached",YSe=()=>"分离头指针",XSe=()=>"جدا از شاخه",zE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YSe():t==="fa"?XSe():KSe()}),ZSe=()=>"Disconnected",QSe=()=>"已断开连接",JSe=()=>"قطع اتصال",AE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QSe():t==="fa"?JSe():ZSe()}),eke=()=>"Environment broken",tke=()=>"环境损坏",nke=()=>"محیط خراب است",rke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tke():t==="fa"?nke():eke()}),ske=()=>"Environment not built",ike=()=>"环境尚未构建",ake=()=>"محیط ساخته نشده است",oke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ike():t==="fa"?ake():ske()}),lke=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,cke=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,uke=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,dke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?cke(e):t==="fa"?uke(e):lke(e)}),fke=()=>"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.",hke=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",_ke=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",pke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hke():t==="fa"?_ke():fke()}),mke=()=>"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.",gke=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",vke=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",bke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gke():t==="fa"?vke():mke()}),xke=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",yke=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",wke=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",Ske=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yke():t==="fa"?wke():xke()}),kke=()=>"has changes",Cke=()=>"有更改",Eke=()=>"دارای تغییر",Nke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cke():t==="fa"?Eke():kke()}),zke=()=>"~/.cache/huggingface/token (hf auth login)",Ake=()=>"~/.cache/huggingface/token(hf auth login)",Tke=()=>"~/.cache/huggingface/token (hf auth login)",jke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ake():t==="fa"?Tke():zke()}),Mke=()=>"HF_TOKEN environment variable",Rke=()=>"HF_TOKEN 环境变量",Dke=()=>"متغیر محیطی HF_TOKEN",Lke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rke():t==="fa"?Dke():Mke()}),Oke=()=>"~/.openresearch/env",Ike=()=>"~/.openresearch/env",Bke=()=>"~/.openresearch/env",$ke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ike():t==="fa"?Bke():Oke()}),Hke=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}.`,Pke=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,Fke=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,Uke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Pke(e):t==="fa"?Fke(e):Hke(e)}),qke=()=>"Install",Gke=()=>"安装",Vke=()=>"نصب",Wke=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gke():t==="fa"?Vke():qke()}),Kke=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.`,Yke=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,Xke=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,Zke=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Yke(e):t==="fa"?Xke(e):Kke(e)}),Qke=e=>`Install the ${e==null?void 0:e.command} command`,Jke=e=>`安装 ${e==null?void 0:e.command} 命令`,e8e=e=>`نصب فرمان ${e==null?void 0:e.command}`,t8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?Jke(e):t==="fa"?e8e(e):Qke(e)}),n8e=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",r8e=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",s8e=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",i8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r8e():t==="fa"?s8e():n8e()}),a8e=()=>"Install the new release now instead of waiting for the background update.",o8e=()=>"立即安装新版本,无需等待后台更新。",l8e=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",c8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o8e():t==="fa"?l8e():a8e()}),u8e=()=>"kubectl default",d8e=()=>"kubectl 默认值",f8e=()=>"پیش‌فرض kubectl",h8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?d8e():t==="fa"?f8e():u8e()}),_8e=e=>`kubectl default (${e==null?void 0:e.context})`,p8e=e=>`kubectl 默认值(${e==null?void 0:e.context})`,m8e=e=>`پیش‌فرض kubectl (${e==null?void 0:e.context})`,g8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?p8e(e):t==="fa"?m8e(e):_8e(e)}),v8e=()=>"Language",b8e=()=>"语言",x8e=()=>"زبان",y8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?b8e():t==="fa"?x8e():v8e()}),w8e=e=>`Not signed in. Run ${e==null?void 0:e.command} in a terminal to connect your OpenResearch account.`,S8e=e=>`尚未登录。请在终端中运行 ${e==null?void 0:e.command} 以连接你的 OpenResearch 账户。`,k8e=e=>`وارد نشده‌اید. برای اتصال حساب OpenResearch خود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,C8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?S8e(e):t==="fa"?k8e(e):w8e(e)}),E8e=()=>"Make default",N8e=()=>"设为默认值",z8e=()=>"پیش‌فرض شود",A8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N8e():t==="fa"?z8e():E8e()}),T8e=e=>`The manifest must define one Job. orx injects the run script, environment, labels, and timeout. Use ${e==null?void 0:e.placeholder} in resource names, or override the default path with ${e==null?void 0:e.command}.`,j8e=e=>`清单必须定义一个 Job。orx 会注入运行脚本、环境、标签和超时设置。请在资源名称中使用 ${e==null?void 0:e.placeholder},或通过 ${e==null?void 0:e.command} 覆盖默认路径。`,M8e=e=>`مانیفست باید یک Job تعریف کند. orx اسکریپت اجرا، محیط، برچسب‌ها و مهلت زمانی را تزریق می‌کند. از ${e==null?void 0:e.placeholder} در نام منابع استفاده کنید، یا مسیر پیش‌فرض را با ${e==null?void 0:e.command} تغییر دهید.`,R8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?j8e(e):t==="fa"?M8e(e):T8e(e)}),D8e=()=>"Provisioned (Modal import failing)",L8e=()=>"已预配(Modal 导入失败)",O8e=()=>"آماده شده (درون‌ریزی Modal ناموفق است)",I8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L8e():t==="fa"?O8e():D8e()}),B8e=()=>"MODAL_TOKEN_ID environment variable",$8e=()=>"MODAL_TOKEN_ID 环境变量",H8e=()=>"متغیر محیطی MODAL_TOKEN_ID",P8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$8e():t==="fa"?H8e():B8e()}),F8e=()=>"~/.modal.toml (modal token new)",U8e=()=>"~/.modal.toml(modal token new)",q8e=()=>"~/.modal.toml (modal token new)",G8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?U8e():t==="fa"?q8e():F8e()}),V8e=e=>`No Modal token found. Run ${e==null?void 0:e.command}, or add ${e==null?void 0:e.id} and ${e==null?void 0:e.secret} in the Environment tab.`,W8e=e=>`未找到 Modal 令牌。请运行 ${e==null?void 0:e.command},或在“环境”标签页中添加 ${e==null?void 0:e.id} 和 ${e==null?void 0:e.secret}。`,K8e=e=>`توکن Modal پیدا نشد. ${e==null?void 0:e.command} را اجرا کنید، یا ${e==null?void 0:e.id} و ${e==null?void 0:e.secret} را در زبانهٔ محیط اضافه کنید.`,Y8e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?W8e(e):t==="fa"?K8e(e):V8e(e)}),X8e=()=>"~/.openresearch/env",Z8e=()=>"~/.openresearch/env",Q8e=()=>"~/.openresearch/env",J8e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Z8e():t==="fa"?Q8e():X8e()}),eCe=e=>`${e==null?void 0:e.count} available — ${e==null?void 0:e.models}`,tCe=e=>`${e==null?void 0:e.count} 个可用 — ${e==null?void 0:e.models}`,nCe=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,rCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?tCe(e):t==="fa"?nCe(e):eCe(e)}),sCe=e=>`Needs ${e==null?void 0:e.tool}`,iCe=e=>`需要 ${e==null?void 0:e.tool}`,aCe=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,oCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?iCe(e):t==="fa"?aCe(e):sCe(e)}),lCe=()=>"Needs tools",cCe=()=>"缺少工具",uCe=()=>"به ابزارها نیاز دارد",dCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cCe():t==="fa"?uCe():lCe()}),fCe=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,hCe=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,_Ce=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,pCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?hCe(e):t==="fa"?_Ce(e):fCe(e)}),mCe=()=>"New runs use SSH; choose a host when launching.",gCe=()=>"新运行将使用 SSH;启动时请选择主机。",vCe=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",bCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gCe():t==="fa"?vCe():mCe()}),xCe=()=>"New token",yCe=()=>"新令牌",wCe=()=>"توکن جدید",SCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yCe():t==="fa"?wCe():xCe()}),kCe=()=>"No default flavor",CCe=()=>"不设默认配置",ECe=()=>"بدون پیکربندی پیش‌فرض",NCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CCe():t==="fa"?ECe():kCe()}),zCe=()=>"none",ACe=()=>"无",TCe=()=>"هیچ‌کدام",mx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ACe():t==="fa"?TCe():zCe()}),jCe=()=>"Not built yet",MCe=()=>"尚未构建",RCe=()=>"هنوز ساخته نشده",DCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MCe():t==="fa"?RCe():jCe()}),LCe=()=>"Not connected",OCe=()=>"未连接",ICe=()=>"متصل نیست",TE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OCe():t==="fa"?ICe():LCe()}),BCe=()=>"not found on PATH",$Ce=()=>"在 PATH 中未找到",HCe=()=>"در PATH پیدا نشد",PCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ce():t==="fa"?HCe():BCe()}),FCe=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,UCe=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,qCe=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,GCe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?UCe(e):t==="fa"?qCe(e):FCe(e)}),VCe=()=>"not initialized",WCe=()=>"尚未初始化",KCe=()=>"راه‌اندازی نشده",YCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WCe():t==="fa"?KCe():VCe()}),XCe=()=>"Not set",ZCe=()=>"未设置",QCe=()=>"تنظیم نشده",JCe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZCe():t==="fa"?QCe():XCe()}),e9e=()=>"OAuth (subscription login)",t9e=()=>"OAuth(订阅登录)",n9e=()=>"OAuth (ورود با اشتراک)",r9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?t9e():t==="fa"?n9e():e9e()}),s9e=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.`,i9e=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,a9e=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,o9e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?i9e(e):t==="fa"?a9e(e):s9e(e)}),l9e=()=>"Account",c9e=()=>"账户",u9e=()=>"حساب",gx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?c9e():t==="fa"?u9e():l9e()}),d9e=()=>"Add one with",f9e=()=>"使用以下命令添加:",h9e=()=>"یکی با این فرمان اضافه کنید:",_9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?f9e():t==="fa"?h9e():d9e()}),p9e=()=>"Add variable",m9e=()=>"添加变量",g9e=()=>"افزودن متغیر",v9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?m9e():t==="fa"?g9e():p9e()}),b9e=()=>"Agent models",x9e=()=>"智能体模型",y9e=()=>"مدل‌های عامل",w9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?x9e():t==="fa"?y9e():b9e()}),S9e=()=>"Anonymous usage analytics",k9e=()=>"匿名使用情况分析",C9e=()=>"تحلیل ناشناس استفاده",I7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?k9e():t==="fa"?C9e():S9e()}),E9e=()=>"Auth",N9e=()=>"身份验证",z9e=()=>"احراز هویت",A9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?N9e():t==="fa"?z9e():E9e()}),T9e=()=>"Authentication",j9e=()=>"身份验证",M9e=()=>"احراز هویت",R9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?j9e():t==="fa"?M9e():T9e()}),D9e=()=>"Back to Compute",L9e=()=>"返回算力设置",O9e=()=>"بازگشت به رایانش",jE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?L9e():t==="fa"?O9e():D9e()}),I9e=()=>"Backend",B9e=()=>"后端",$9e=()=>"بک‌اند",H9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B9e():t==="fa"?$9e():I9e()}),P9e=()=>"Baseline",F9e=()=>"基线",U9e=()=>"خط مبنا",q9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F9e():t==="fa"?U9e():P9e()}),G9e=()=>"Binary",V9e=()=>"可执行文件",W9e=()=>"فایل اجرایی",K9e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V9e():t==="fa"?W9e():G9e()}),Y9e=()=>"Cancel",X9e=()=>"取消",Z9e=()=>"لغو",vx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X9e():t==="fa"?Z9e():Y9e()}),Q9e=()=>"Cancel new variable",J9e=()=>"取消新变量",eEe=()=>"لغو متغیر جدید",tEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?J9e():t==="fa"?eEe():Q9e()}),nEe=()=>"Checking compute targets…",rEe=()=>"正在检查算力目标…",sEe=()=>"در حال بررسی مقصدهای رایانشی…",iEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rEe():t==="fa"?sEe():nEe()}),aEe=()=>"Checking credentials…",oEe=()=>"正在检查凭据…",lEe=()=>"در حال بررسی اطلاعات ورود…",cEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oEe():t==="fa"?lEe():aEe()}),uEe=()=>"Checking kubectl…",dEe=()=>"正在检查 kubectl…",fEe=()=>"در حال بررسی kubectl…",hEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dEe():t==="fa"?fEe():uEe()}),_Ee=()=>"Checking Modal…",pEe=()=>"正在检查 Modal…",mEe=()=>"در حال بررسی Modal…",gEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pEe():t==="fa"?mEe():_Ee()}),vEe=()=>"Choose a preset flavor",bEe=()=>"选择预设规格",xEe=()=>"یک پیکربندی آماده انتخاب کنید",B7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bEe():t==="fa"?xEe():vEe()}),yEe=()=>"Cluster",wEe=()=>"集群",SEe=()=>"خوشه",kEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wEe():t==="fa"?SEe():yEe()}),CEe=()=>"cluster default",EEe=()=>"集群默认值",NEe=()=>"پیش‌فرض خوشه",$7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EEe():t==="fa"?NEe():CEe()}),zEe=()=>"cluster default (e.g. 4h, 30m)",AEe=()=>"集群默认值(例如 4h、30m)",TEe=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",jEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AEe():t==="fa"?TEe():zEe()}),MEe=()=>"Cluster unreachable",REe=()=>"无法连接集群",DEe=()=>"خوشه در دسترس نیست",LEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?REe():t==="fa"?DEe():MEe()}),OEe=()=>"Compute",IEe=()=>"算力",BEe=()=>"رایانش",ME=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IEe():t==="fa"?BEe():OEe()}),$Ee=()=>"Connect compute backends and choose where new runs execute.",HEe=()=>"连接算力后端,并选择新运行的执行位置。",PEe=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",FEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HEe():t==="fa"?PEe():$Ee()}),UEe=()=>"Connected",qEe=()=>"已连接",GEe=()=>"متصل",bx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qEe():t==="fa"?GEe():UEe()}),VEe=()=>"Context",WEe=()=>"上下文",KEe=()=>"زمینه",YEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WEe():t==="fa"?KEe():VEe()}),XEe=()=>"Current",ZEe=()=>"当前",QEe=()=>"فعلی",JEe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZEe():t==="fa"?QEe():XEe()}),eNe=()=>"Currently off:",tNe=()=>"当前已关闭:",nNe=()=>"اکنون خاموش است:",rNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tNe():t==="fa"?nNe():eNe()}),sNe=()=>"Custom flavor",iNe=()=>"自定义规格",aNe=()=>"پیکربندی سفارشی",oNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iNe():t==="fa"?aNe():sNe()}),lNe=()=>"Custom flavor…",cNe=()=>"自定义规格…",uNe=()=>"پیکربندی سفارشی…",dNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cNe():t==="fa"?uNe():lNe()}),fNe=()=>"Data directory",hNe=()=>"数据目录",_Ne=()=>"پوشهٔ داده",pNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hNe():t==="fa"?_Ne():fNe()}),mNe=()=>"default",gNe=()=>"默认",vNe=()=>"پیش‌فرض",bNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gNe():t==="fa"?vNe():mNe()}),xNe=()=>"Default",yNe=()=>"默认",wNe=()=>"پیش‌فرض",RE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yNe():t==="fa"?wNe():xNe()}),SNe=()=>"Default destination",kNe=()=>"默认目标",CNe=()=>"مقصد پیش‌فرض",ENe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kNe():t==="fa"?CNe():SNe()}),NNe=()=>"Detecting hardware…",zNe=()=>"正在检测硬件…",ANe=()=>"در حال شناسایی سخت‌افزار…",TNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zNe():t==="fa"?ANe():NNe()}),jNe=()=>"Detecting harnesses…",MNe=()=>"正在检测智能体工具…",RNe=()=>"در حال شناسایی ابزارهای عامل…",DNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MNe():t==="fa"?RNe():jNe()}),LNe=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",ONe=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",INe=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",BNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ONe():t==="fa"?INe():LNe()}),$Ne=()=>"Effective URL",HNe=()=>"实际使用的网址",PNe=()=>"نشانی مؤثر",FNe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HNe():t==="fa"?PNe():$Ne()}),UNe=()=>"Enable GitHub syncing for new projects",qNe=()=>"为新项目启用 GitHub 同步",GNe=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",H7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qNe():t==="fa"?GNe():UNe()}),VNe=()=>"Environment",WNe=()=>"环境",KNe=()=>"محیط",xx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WNe():t==="fa"?KNe():VNe()}),YNe=()=>"Failed",XNe=()=>"失败",ZNe=()=>"ناموفق",yx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XNe():t==="fa"?ZNe():YNe()}),QNe=()=>"General",JNe=()=>"常规",eze=()=>"عمومی",tze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JNe():t==="fa"?eze():QNe()}),nze=()=>"GitHub publishing",rze=()=>"GitHub 发布",sze=()=>"انتشار در GitHub",ize=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rze():t==="fa"?sze():nze()}),aze=()=>"Git token",oze=()=>"Git 令牌",lze=()=>"توکن Git",cze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oze():t==="fa"?lze():aze()}),uze=()=>"Harnesses",dze=()=>"智能体工具",fze=()=>"ابزارهای عامل",hze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dze():t==="fa"?fze():uze()}),_ze=()=>"hf_…",pze=()=>"hf_…",mze=()=>"hf_…",gze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pze():t==="fa"?mze():_ze()}),vze=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",bze=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",xze=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",yze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bze():t==="fa"?xze():vze()}),wze=()=>"Hostname",Sze=()=>"主机名",kze=()=>"نام میزبان",Cze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sze():t==="fa"?kze():wze()}),Eze=()=>"How it connects",Nze=()=>"连接方式",zze=()=>"نحوهٔ اتصال",Aze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Nze():t==="fa"?zze():Eze()}),Tze=()=>"Initialize Git",jze=()=>"初始化 Git",Mze=()=>"راه‌اندازی Git",Rze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jze():t==="fa"?Mze():Tze()}),Dze=()=>"Install",Lze=()=>"安装",Oze=()=>"نصب",Ize=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Lze():t==="fa"?Oze():Dze()}),Bze=()=>"Install broken",$ze=()=>"安装损坏",Hze=()=>"نصب خراب است",Pze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$ze():t==="fa"?Hze():Bze()}),Fze=()=>"Install GitHub CLI",Uze=()=>"安装 GitHub CLI",qze=()=>"نصب GitHub CLI",Gze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Uze():t==="fa"?qze():Fze()}),Vze=()=>"Install updates automatically",Wze=()=>"自动安装更新",Kze=()=>"نصب خودکار به‌روزرسانی‌ها",P7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Wze():t==="fa"?Kze():Vze()}),Yze=()=>"Instance history",Xze=()=>"实例历史",Zze=()=>"تاریخچهٔ نمونه‌ها",Qze=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Xze():t==="fa"?Zze():Yze()}),Jze=()=>"Invalid token",eAe=()=>"令牌无效",tAe=()=>"توکن نامعتبر",nAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eAe():t==="fa"?tAe():Jze()}),rAe=()=>"Jobs",sAe=()=>"Jobs",iAe=()=>"Jobs",aAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sAe():t==="fa"?iAe():rAe()}),oAe=()=>"Jobs / Dashboard URL",lAe=()=>"Jobs / 控制台网址",cAe=()=>"نشانی Jobs / داشبورد",uAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lAe():t==="fa"?cAe():oAe()}),dAe=()=>"Jobs permission unknown",fAe=()=>"Jobs 权限未知",hAe=()=>"مجوز Jobs نامشخص است",_Ae=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fAe():t==="fa"?hAe():dAe()}),pAe=()=>"Jobs: write OK",mAe=()=>"Jobs:写入正常",gAe=()=>"Jobs: نوشتن مجاز است",vAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mAe():t==="fa"?gAe():pAe()}),bAe=()=>"kubectl not found",xAe=()=>"未找到 kubectl",yAe=()=>"kubectl پیدا نشد",wAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xAe():t==="fa"?yAe():bAe()}),SAe=()=>"Latest",kAe=()=>"最新版本",CAe=()=>"جدیدترین",EAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kAe():t==="fa"?CAe():SAe()}),NAe=()=>"Loading…",zAe=()=>"正在加载…",AAe=()=>"در حال بارگیری…",Al=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zAe():t==="fa"?AAe():NAe()}),TAe=()=>"Loading Ray settings…",jAe=()=>"正在加载 Ray 设置…",MAe=()=>"در حال بارگیری تنظیمات Ray…",RAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jAe():t==="fa"?MAe():TAe()}),DAe=()=>"Loading slurm settings…",LAe=()=>"正在加载 Slurm 设置…",OAe=()=>"در حال بارگیری تنظیمات Slurm…",IAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LAe():t==="fa"?OAe():DAe()}),BAe=()=>"Loading status…",$Ae=()=>"正在加载状态…",HAe=()=>"در حال بارگیری وضعیت…",PAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ae():t==="fa"?HAe():BAe()}),FAe=()=>"Local only",UAe=()=>"仅本地",qAe=()=>"فقط محلی",GAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UAe():t==="fa"?qAe():FAe()}),VAe=()=>"Local repository",WAe=()=>"本地仓库",KAe=()=>"مخزن محلی",YAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WAe():t==="fa"?KAe():VAe()}),XAe=()=>"Login node",ZAe=()=>"登录节点",QAe=()=>"گرهٔ ورود",JAe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZAe():t==="fa"?QAe():XAe()}),eTe=()=>"Make GitHub syncing the default?",tTe=()=>"将 GitHub 同步设为默认值?",nTe=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",rTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tTe():t==="fa"?nTe():eTe()}),sTe=()=>"Missing bash/tar",iTe=()=>"缺少 bash/tar",aTe=()=>"bash/tar موجود نیست",oTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iTe():t==="fa"?aTe():sTe()}),lTe=()=>"More compute options",cTe=()=>"更多算力选项",uTe=()=>"گزینه‌های رایانشی بیشتر",dTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cTe():t==="fa"?uTe():lTe()}),fTe=()=>"Move failed:",hTe=()=>"移动失败:",_Te=()=>"انتقال ناموفق بود:",pTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hTe():t==="fa"?_Te():fTe()}),mTe=()=>"Moved. orx is now using the new location.",gTe=()=>"已移动。orx 现在使用新位置。",vTe=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",bTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gTe():t==="fa"?vTe():mTe()}),xTe=()=>"Namespace",yTe=()=>"命名空间",wTe=()=>"فضای نام",STe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yTe():t==="fa"?wTe():xTe()}),kTe=()=>"New location",CTe=()=>"新位置",ETe=()=>"محل جدید",NTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CTe():t==="fa"?ETe():kTe()}),zTe=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",ATe=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",TTe=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",jTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ATe():t==="fa"?TTe():zTe()}),MTe=()=>"New variable key",RTe=()=>"新变量键名",DTe=()=>"کلید متغیر جدید",LTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RTe():t==="fa"?DTe():MTe()}),OTe=()=>"New variable value",ITe=()=>"新变量值",BTe=()=>"مقدار متغیر جدید",$Te=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ITe():t==="fa"?BTe():OTe()}),HTe=()=>"No code, prompts, file contents, or account identifiers are sent.",PTe=()=>"不会发送代码、提示词、文件内容或账户标识符。",FTe=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",UTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PTe():t==="fa"?FTe():HTe()}),qTe=()=>"No hosts found in ~/.ssh/config.",GTe=()=>"在 ~/.ssh/config 中未找到主机。",VTe=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",WTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GTe():t==="fa"?VTe():qTe()}),KTe=()=>"No job-create permission",YTe=()=>"没有创建 Job 的权限",XTe=()=>"مجوز ساخت Job وجود ندارد",ZTe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YTe():t==="fa"?XTe():KTe()}),QTe=()=>"No job.write permission",JTe=()=>"没有 job.write 权限",eje=()=>"مجوز job.write وجود ندارد",tje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JTe():t==="fa"?eje():QTe()}),nje=()=>"No key on this computer to register — load a registered key with",rje=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",sje=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",ije=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rje():t==="fa"?sje():nje()}),aje=()=>"No key on this computer yet — create one with",oje=()=>"此计算机上还没有密钥——使用以下命令创建:",lje=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",cje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oje():t==="fa"?lje():aje()}),uje=()=>"No Slurm CLI",dje=()=>"无 Slurm CLI",fje=()=>"بدون CLI اسلورم",hje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dje():t==="fa"?fje():uje()}),_je=()=>"No token",pje=()=>"无令牌",mje=()=>"بدون توکن",gje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pje():t==="fa"?mje():_je()}),vje=()=>"None registered",bje=()=>"未注册任何密钥",xje=()=>"هیچ‌کدام ثبت نشده",yje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bje():t==="fa"?xje():vje()}),wje=()=>"Not checked",Sje=()=>"未检查",kje=()=>"بررسی نشده",DE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Sje():t==="fa"?kje():wje()}),Cje=()=>"Not configured",Eje=()=>"未配置",Nje=()=>"پیکربندی نشده",Ip=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Eje():t==="fa"?Nje():Cje()}),zje=()=>"Not installed",Aje=()=>"未安装",Tje=()=>"نصب نیست",jje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aje():t==="fa"?Tje():zje()}),Mje=()=>"Not now",Rje=()=>"暂不",Dje=()=>"اکنون نه",Lje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rje():t==="fa"?Dje():Mje()}),Oje=()=>"Not on this computer",Ije=()=>"不在此计算机上",Bje=()=>"روی این رایانه نیست",$je=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Ije():t==="fa"?Bje():Oje()}),Hje=()=>"Not set (pass --host per launch)",Pje=()=>"未设置(每次启动时传入 --host)",Fje=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",Uje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pje():t==="fa"?Fje():Hje()}),qje=()=>"Not set up",Gje=()=>"未设置",Vje=()=>"راه‌اندازی نشده",Wje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Gje():t==="fa"?Vje():qje()}),Kje=()=>"Not signed in",Yje=()=>"未登录",Xje=()=>"وارد نشده",Zje=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Yje():t==="fa"?Xje():Kje()}),Qje=()=>"On this computer",Jje=()=>"在此计算机上",eMe=()=>"روی این رایانه",tMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Jje():t==="fa"?eMe():Qje()}),nMe=()=>"Open a project to inspect its repository and GitHub publication state.",rMe=()=>"打开项目以查看其仓库和 GitHub 发布状态。",sMe=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",iMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rMe():t==="fa"?sMe():nMe()}),aMe=()=>"Open job page",oMe=()=>"打开作业页面",lMe=()=>"باز کردن صفحهٔ کار",F7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oMe():t==="fa"?lMe():aMe()}),cMe=()=>"Open on GitHub",uMe=()=>"在 GitHub 上打开",dMe=()=>"باز کردن در GitHub",U7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uMe():t==="fa"?dMe():cMe()}),fMe=()=>", or create one with",hMe=()=>",或使用以下命令创建:",_Me=()=>"، یا با این فرمان یکی بسازید:",pMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hMe():t==="fa"?_Me():fMe()}),mMe=()=>"Org",gMe=()=>"组织",vMe=()=>"سازمان",bMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gMe():t==="fa"?vMe():mMe()}),xMe=()=>"Orgs",yMe=()=>"组织",wMe=()=>"سازمان‌ها",SMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yMe():t==="fa"?wMe():xMe()}),kMe=()=>"orx can't update this install",CMe=()=>"orx 无法更新此安装",EMe=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",NMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CMe():t==="fa"?EMe():kMe()}),zMe=()=>"Overleaf",AMe=()=>"Overleaf",TMe=()=>"Overleaf",jMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AMe():t==="fa"?TMe():zMe()}),MMe=()=>"Overleaf Git authentication token",RMe=()=>"Overleaf Git 身份验证令牌",DMe=()=>"توکن احراز هویت Git در Overleaf",LMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RMe():t==="fa"?DMe():MMe()}),OMe=()=>"Overridden by env",IMe=()=>"已被环境变量覆盖",BMe=()=>"بازنویسی‌شده توسط محیط",$Me=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IMe():t==="fa"?BMe():OMe()}),HMe=()=>"Partition",PMe=()=>"分区",FMe=()=>"پارتیشن",UMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PMe():t==="fa"?FMe():HMe()}),qMe=()=>"Partitions",GMe=()=>"分区",VMe=()=>"پارتیشن‌ها",WMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GMe():t==="fa"?VMe():qMe()}),KMe=()=>"Path",YMe=()=>"路径",XMe=()=>"مسیر",ZMe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YMe():t==="fa"?XMe():KMe()}),QMe=()=>"Plan",JMe=()=>"方案",eRe=()=>"سطح اشتراک",tRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JMe():t==="fa"?eRe():QMe()}),nRe=()=>"Project",rRe=()=>"项目",sRe=()=>"پروژه",iRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rRe():t==="fa"?sRe():nRe()}),aRe=()=>"Ray version",oRe=()=>"Ray 版本",lRe=()=>"نسخهٔ Ray",cRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oRe():t==="fa"?lRe():aRe()}),uRe=()=>"Reachable",dRe=()=>"可访问",fRe=()=>"در دسترس",hRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dRe():t==="fa"?fRe():uRe()}),_Re=()=>"Reading ~/.ssh/config…",pRe=()=>"正在读取 ~/.ssh/config…",mRe=()=>"در حال خواندن ‎~/.ssh/config…",gRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pRe():t==="fa"?mRe():_Re()}),vRe=()=>"Ready",bRe=()=>"就绪",xRe=()=>"آماده",wx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bRe():t==="fa"?xRe():vRe()}),yRe=()=>"Ready to move",wRe=()=>"可以移动",SRe=()=>"آمادهٔ انتقال",kRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wRe():t==="fa"?SRe():yRe()}),CRe=()=>"Ready to use",ERe=()=>"可用",NRe=()=>"آمادهٔ استفاده",zRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ERe():t==="fa"?NRe():CRe()}),ARe=()=>"Refresh",TRe=()=>"刷新",jRe=()=>"تازه‌سازی",Bp=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TRe():t==="fa"?jRe():ARe()}),MRe=()=>"Remotes",RRe=()=>"远程仓库",DRe=()=>"مخزن‌های دوردست",LRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RRe():t==="fa"?DRe():MRe()}),ORe=()=>"Repository",IRe=()=>"仓库",BRe=()=>"مخزن",$Re=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IRe():t==="fa"?BRe():ORe()}),HRe=()=>"Restart to finish updating",PRe=()=>"重新启动以完成更新",FRe=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",URe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PRe():t==="fa"?FRe():HRe()}),qRe=()=>"Run manifest",GRe=()=>"运行清单",VRe=()=>"مانیفست اجرا",WRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GRe():t==="fa"?VRe():qRe()}),KRe=()=>"Running instances",YRe=()=>"正在运行的实例",XRe=()=>"نمونه‌های در حال اجرا",ZRe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YRe():t==="fa"?XRe():KRe()}),QRe=()=>"Runtime",JRe=()=>"运行时间",eDe=()=>"زمان اجرا",tDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JRe():t==="fa"?eDe():QRe()}),nDe=()=>". Save it under that key if it's meant for HF Jobs.",rDe=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",sDe=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",iDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rDe():t==="fa"?sDe():nDe()}),aDe=()=>"Settings",oDe=()=>"设置",lDe=()=>"تنظیمات",LE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oDe():t==="fa"?lDe():aDe()}),cDe=()=>"Signed in",uDe=()=>"已登录",dDe=()=>"وارد شده",OE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uDe():t==="fa"?dDe():cDe()}),fDe=()=>"Source",hDe=()=>"来源",_De=()=>"منبع",Sx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hDe():t==="fa"?_De():fDe()}),pDe=()=>"SSH key",mDe=()=>"SSH 密钥",gDe=()=>"کلید SSH",vDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mDe():t==="fa"?gDe():pDe()}),bDe=()=>"Started",xDe=()=>"开始时间",yDe=()=>"آغاز",wDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xDe():t==="fa"?yDe():bDe()}),SDe=()=>"State",kDe=()=>"状态",CDe=()=>"وضعیت",EDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kDe():t==="fa"?CDe():SDe()}),NDe=()=>"Status",zDe=()=>"状态",ADe=()=>"وضعیت",$p=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zDe():t==="fa"?ADe():NDe()}),TDe=()=>"Storage",jDe=()=>"存储",MDe=()=>"ذخیره‌سازی",RDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jDe():t==="fa"?MDe():TDe()}),DDe=()=>"Sync",LDe=()=>"同步",ODe=()=>"همگام‌سازی",IDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LDe():t==="fa"?ODe():DDe()}),BDe=()=>"Syncing off",$De=()=>"同步已关闭",HDe=()=>"همگام‌سازی خاموش",PDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$De():t==="fa"?HDe():BDe()}),FDe=()=>"System",UDe=()=>"系统",qDe=()=>"سامانه",GDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UDe():t==="fa"?qDe():FDe()}),VDe=()=>"Test connection",WDe=()=>"测试连接",KDe=()=>"آزمایش اتصال",YDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WDe():t==="fa"?KDe():VDe()}),XDe=()=>"Testing…",ZDe=()=>"正在测试…",QDe=()=>"در حال آزمایش…",JDe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZDe():t==="fa"?QDe():XDe()}),eLe=()=>", then add it with",tLe=()=>",然后使用以下命令添加:",nLe=()=>"، سپس با این فرمان اضافه‌اش کنید:",rLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tLe():t==="fa"?nLe():eLe()}),sLe=()=>"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.",iLe=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",aLe=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",oLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iLe():t==="fa"?aLe():sLe()}),lLe=()=>"This saved destination is not configured. Set it up below or choose another backend.",cLe=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",uLe=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",dLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cLe():t==="fa"?uLe():lLe()}),fLe=()=>"This value looks like a Hugging Face token — compute runs only read it from",hLe=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",_Le=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",pLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hLe():t==="fa"?_Le():fLe()}),mLe=()=>"Time limit",gLe=()=>"时间限制",vLe=()=>"محدودیت زمانی",bLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gLe():t==="fa"?vLe():mLe()}),xLe=()=>"Token",yLe=()=>"令牌",wLe=()=>"توکن",IE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yLe():t==="fa"?wLe():xLe()}),SLe=()=>"Unable to verify",kLe=()=>"无法验证",CLe=()=>"تأیید ممکن نیست",ELe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kLe():t==="fa"?CLe():SLe()}),NLe=()=>"Unknown",zLe=()=>"未知",ALe=()=>"نامشخص",BE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zLe():t==="fa"?ALe():NLe()}),TLe=()=>"Update required",jLe=()=>"需要更新",MLe=()=>"نیازمند به‌روزرسانی",RLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jLe():t==="fa"?MLe():TLe()}),DLe=()=>"Updates",LLe=()=>"更新",OLe=()=>"به‌روزرسانی‌ها",q7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LLe():t==="fa"?OLe():DLe()}),ILe=()=>"Usage analytics",BLe=()=>"使用情况分析",$Le=()=>"تحلیل استفاده",HLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BLe():t==="fa"?$Le():ILe()}),PLe=()=>"value",FLe=()=>"值",ULe=()=>"مقدار",$E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FLe():t==="fa"?ULe():PLe()}),qLe=()=>"Variables available to runs and the research agent (API keys, tokens).",GLe=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",VLe=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",WLe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GLe():t==="fa"?VLe():qLe()}),KLe=()=>"Version",YLe=()=>"版本",XLe=()=>"نسخه",HE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YLe():t==="fa"?XLe():KLe()}),ZLe=()=>"What happens",QLe=()=>"执行内容",JLe=()=>"چه اتفاقی می‌افتد",eOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QLe():t==="fa"?JLe():ZLe()}),tOe=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",nOe=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",rOe=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",sOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nOe():t==="fa"?rOe():tOe()}),iOe=()=>"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.",aOe=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",oOe=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",lOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aOe():t==="fa"?oOe():iOe()}),cOe=()=>"Pick a login node first",uOe=()=>"请先选择登录节点",dOe=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",fOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uOe():t==="fa"?dOe():cOe()}),hOe=()=>"Providers",_Oe=()=>"提供商",pOe=()=>"ارائه‌دهندگان",mOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Oe():t==="fa"?pOe():hOe()}),gOe=()=>"Reconnect",vOe=()=>"重新连接",bOe=()=>"اتصال دوباره",PE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vOe():t==="fa"?bOe():gOe()}),xOe=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,yOe=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,wOe=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,SOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?yOe(e):t==="fa"?wOe(e):xOe(e)}),kOe=()=>"Reinstall with the orx installer to get automatic updates.",COe=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",EOe=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",NOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?COe():t==="fa"?EOe():kOe()}),zOe=()=>"Re-link",AOe=()=>"重新链接",TOe=()=>"پیوند دوباره",jOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AOe():t==="fa"?TOe():zOe()}),MOe=()=>"Remove token",ROe=()=>"移除令牌",DOe=()=>"حذف توکن",LOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ROe():t==="fa"?DOe():MOe()}),OOe=()=>"Removing…",IOe=()=>"正在移除…",BOe=()=>"در حال حذف…",$Oe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IOe():t==="fa"?BOe():OOe()}),HOe=()=>"Replace anyway",POe=()=>"仍要替换",FOe=()=>"به‌هرحال جایگزین کن",UOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?POe():t==="fa"?FOe():HOe()}),qOe=()=>"Replace token",GOe=()=>"替换令牌",VOe=()=>"جایگزینی توکن",WOe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GOe():t==="fa"?VOe():qOe()}),KOe=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,YOe=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,XOe=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,ZOe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?YOe(e):t==="fa"?XOe(e):KOe(e)}),QOe=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,JOe=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,eIe=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,tIe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JOe(e):t==="fa"?eIe(e):QOe(e)}),nIe=()=>"Run `gh auth login` in your terminal.",rIe=()=>"请在终端中运行 `gh auth login`。",sIe=()=>"در پایانه `gh auth login` را اجرا کنید.",iIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rIe():t==="fa"?sIe():nIe()}),aIe=()=>"Saved",oIe=()=>"已保存",lIe=()=>"ذخیره شده",cIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oIe():t==="fa"?lIe():aIe()}),uIe=()=>"Set up",dIe=()=>"设置",fIe=()=>"راه‌اندازی",hIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dIe():t==="fa"?fIe():uIe()}),_Ie=()=>"Set up environment",pIe=()=>"设置环境",mIe=()=>"راه‌اندازی محیط",gIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pIe():t==="fa"?mIe():_Ie()}),vIe=()=>"Setting up… (~30–60s)",bIe=()=>"正在设置…(约 30–60 秒)",xIe=()=>"در حال راه‌اندازی… (حدود ۳۰ تا ۶۰ ثانیه)",yIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bIe():t==="fa"?xIe():vIe()}),wIe=()=>"Sign in",SIe=()=>"登录",kIe=()=>"ورود",CIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SIe():t==="fa"?kIe():wIe()}),EIe=()=>"The SSH connection closed before setup completed.",NIe=()=>"SSH 连接在设置完成前已关闭。",zIe=()=>"اتصال SSH پیش از تکمیل راه‌اندازی بسته شد.",G7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NIe():t==="fa"?zIe():EIe()}),AIe=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,TIe=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,jIe=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,FE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?TIe(e):t==="fa"?jIe(e):AIe(e)}),MIe=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",RIe=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",DIe=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",LIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RIe():t==="fa"?DIe():MIe()}),OIe=()=>"Dark",IIe=()=>"深色",BIe=()=>"تیره",$Ie=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IIe():t==="fa"?BIe():OIe()}),HIe=()=>"Theme",PIe=()=>"主题",FIe=()=>"پوسته",V7=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PIe():t==="fa"?FIe():HIe()}),UIe=()=>"Light",qIe=()=>"浅色",GIe=()=>"روشن",VIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qIe():t==="fa"?GIe():UIe()}),WIe=()=>"System",KIe=()=>"系统",YIe=()=>"سیستم",XIe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KIe():t==="fa"?YIe():WIe()}),ZIe=()=>"Update now",QIe=()=>"立即更新",JIe=()=>"اکنون به‌روزرسانی کن",eBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QIe():t==="fa"?JIe():ZIe()}),tBe=e=>`Update to ${e==null?void 0:e.version}`,nBe=e=>`更新到 ${e==null?void 0:e.version}`,rBe=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,sBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?nBe(e):t==="fa"?rBe(e):tBe(e)}),iBe=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",aBe=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",oBe=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",lBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aBe():t==="fa"?oBe():iBe()}),cBe=()=>"Updating default destination…",uBe=()=>"正在更新默认运行位置…",dBe=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",fBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uBe():t==="fa"?dBe():cBe()}),hBe=()=>"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.",_Be=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",pBe=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",mBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Be():t==="fa"?pBe():hBe()}),gBe=()=>"Validating…",vBe=()=>"正在验证…",bBe=()=>"در حال اعتبارسنجی…",xBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vBe():t==="fa"?bBe():gBe()}),yBe=()=>"View settings",wBe=()=>"查看设置",SBe=()=>"مشاهدهٔ تنظیمات",kBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wBe():t==="fa"?SBe():yBe()}),CBe=()=>"Skill",EBe=()=>"技能",NBe=()=>"مهارت",UE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EBe():t==="fa"?NBe():CBe()}),zBe=()=>"Loading skill…",ABe=()=>"正在加载技能…",TBe=()=>"در حال بارگیری مهارت…",jBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ABe():t==="fa"?TBe():zBe()}),MBe=e=>`Delete the “${e==null?void 0:e.name}” skill?`,RBe=e=>`删除技能“${e==null?void 0:e.name}”?`,DBe=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,LBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?RBe(e):t==="fa"?DBe(e):MBe(e)}),OBe=e=>`Delete skill ${e==null?void 0:e.name}`,IBe=e=>`删除技能 ${e==null?void 0:e.name}`,BBe=e=>`حذف مهارت ${e==null?void 0:e.name}`,$Be=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?IBe(e):t==="fa"?BBe(e):OBe(e)}),HBe=e=>`Delete the “${e==null?void 0:e.name}” template?`,PBe=e=>`删除模板“${e==null?void 0:e.name}”?`,FBe=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,UBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?PBe(e):t==="fa"?FBe(e):HBe(e)}),qBe=e=>`Delete template ${e==null?void 0:e.name}`,GBe=e=>`删除模板 ${e==null?void 0:e.name}`,VBe=e=>`حذف قالب ${e==null?void 0:e.name}`,WBe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GBe(e):t==="fa"?VBe(e):qBe(e)}),KBe=()=>"SKILL.md folders the agent discovers on its own and you invoke with /name in chat. Skills installed in your coding agents are picked up automatically.",YBe=()=>"智能体会自动发现的 SKILL.md 技能文件夹,你可以在聊天中通过 /name 调用。你的编码智能体中已安装的技能会自动纳入。",XBe=()=>"پوشه‌های SKILL.md که عامل خودش پیدا می‌کند و شما با ‎/name در گفتگو فراخوانی می‌کنید. مهارت‌های نصب‌شده در عامل‌های کدنویسی شما به‌طور خودکار در نظر گرفته می‌شوند.",ZBe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YBe():t==="fa"?XBe():KBe()}),QBe=()=>"Drop a SKILL.md or .zip here, or click to choose",JBe=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",e$e=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",t$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JBe():t==="fa"?e$e():QBe()}),n$e=()=>"Drop a .tex or .zip here, or click to choose",r$e=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",s$e=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",i$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?r$e():t==="fa"?s$e():n$e()}),a$e=()=>"File too large (max 20 MB).",o$e=()=>"文件过大(最大 20 MB)。",l$e=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",qE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?o$e():t==="fa"?l$e():a$e()}),c$e=()=>" + 1 file",u$e=()=>" + 1 个文件",d$e=()=>" + ۱ فایل",f$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?u$e():t==="fa"?d$e():c$e()}),h$e=()=>"What the agent brings to every session, in every project: the skills it can use, and the LaTeX templates it writes papers into.",_$e=()=>"智能体在每个项目的每个会话中都会携带的内容:可用的技能,以及撰写论文所用的 LaTeX 模板。",p$e=()=>"آنچه عامل در هر نشست و در همهٔ پروژه‌ها همراه دارد: مهارت‌هایی که می‌تواند استفاده کند و قالب‌های LaTeX که مقاله‌ها را با آن‌ها می‌نویسد.",m$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_$e():t==="fa"?p$e():h$e()}),g$e=e=>` + ${e==null?void 0:e.count} files`,v$e=e=>` + ${e==null?void 0:e.count} 个文件`,b$e=e=>` + ${e==null?void 0:e.count} فایل`,x$e=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?v$e(e):t==="fa"?b$e(e):g$e(e)}),y$e=()=>"Could not load skills:",w$e=()=>"无法加载技能:",S$e=()=>"بارگیری مهارت‌ها ممکن نشد:",k$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?w$e():t==="fa"?S$e():y$e()}),C$e=()=>"Could not load templates:",E$e=()=>"无法加载模板:",N$e=()=>"بارگیری قالب‌ها ممکن نشد:",z$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?E$e():t==="fa"?N$e():C$e()}),A$e=()=>"Customize",T$e=()=>"自定义",j$e=()=>"سفارشی‌سازی",M$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?T$e():t==="fa"?j$e():A$e()}),R$e=()=>"Delete skill",D$e=()=>"删除技能",L$e=()=>"حذف مهارت",O$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?D$e():t==="fa"?L$e():R$e()}),I$e=()=>"Delete template",B$e=()=>"删除模板",$$e=()=>"حذف قالب",H$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?B$e():t==="fa"?$$e():I$e()}),P$e=()=>"LaTeX templates",F$e=()=>"LaTeX 模板",U$e=()=>"قالب‌های LaTeX",q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?F$e():t==="fa"?U$e():P$e()}),G$e=()=>"Loading skills…",V$e=()=>"正在加载技能…",W$e=()=>"در حال بارگیری مهارت‌ها…",K$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?V$e():t==="fa"?W$e():G$e()}),Y$e=()=>"Loading templates…",X$e=()=>"正在加载模板…",Z$e=()=>"در حال بارگیری قالب‌ها…",Q$e=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?X$e():t==="fa"?Z$e():Y$e()}),J$e=()=>"No skills yet.",eHe=()=>"尚无技能。",tHe=()=>"هنوز مهارتی وجود ندارد.",nHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eHe():t==="fa"?tHe():J$e()}),rHe=()=>"No templates yet.",sHe=()=>"尚无模板。",iHe=()=>"هنوز قالبی وجود ندارد.",aHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sHe():t==="fa"?iHe():rHe()}),oHe=()=>"Skills",lHe=()=>"技能",cHe=()=>"مهارت‌ها",uHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lHe():t==="fa"?cHe():oHe()}),dHe=()=>"Uploading…",fHe=()=>"正在上传…",hHe=()=>"در حال بارگذاری…",_He=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?fHe():t==="fa"?hHe():dHe()}),pHe=()=>"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. With exactly one template available, the agent uses it without asking.",mHe=()=>"智能体会使用会议文档类或内部样式来撰写论文,而不是使用默认导言。请上传 .tex 文件,或包含 .cls 和 .sty 文件的 .zip 压缩包。当恰好只有一个模板可用时,智能体会直接使用,无需询问。",gHe=()=>"عامل به‌جای مقدمهٔ پیش‌فرض، مقاله‌ها را با کلاس همایش یا سبک سازمانی می‌نویسد. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید. وقتی دقیقاً یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",vHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?mHe():t==="fa"?gHe():pHe()}),bHe=()=>"Upload a SKILL.md file or a .zip of a skill folder.",xHe=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",yHe=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",wHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xHe():t==="fa"?yHe():bHe()}),SHe=()=>"Upload a .tex file or a .zip of a template folder.",kHe=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",CHe=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",EHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?kHe():t==="fa"?CHe():SHe()}),NHe=()=>"Cancelled",zHe=()=>"已取消",AHe=()=>"لغوشده",THe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?zHe():t==="fa"?AHe():NHe()}),jHe=()=>"Cancelling",MHe=()=>"正在取消",RHe=()=>"در حال لغو",DHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?MHe():t==="fa"?RHe():jHe()}),LHe=()=>"Done",OHe=()=>"已完成",IHe=()=>"انجام‌شده",BHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?OHe():t==="fa"?IHe():LHe()}),$He=()=>"Editing",HHe=()=>"正在编辑",PHe=()=>"در حال ویرایش",FHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?HHe():t==="fa"?PHe():$He()}),UHe=()=>"Failed",qHe=()=>"失败",GHe=()=>"ناموفق",VHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qHe():t==="fa"?GHe():UHe()}),WHe=()=>"Idle",KHe=()=>"空闲",YHe=()=>"بی‌کار",XHe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?KHe():t==="fa"?YHe():WHe()}),ZHe=()=>"Running",QHe=()=>"运行中",JHe=()=>"در حال اجرا",ePe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?QHe():t==="fa"?JHe():ZHe()}),tPe=()=>"Starting",nPe=()=>"正在启动",rPe=()=>"در حال آغاز",sPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nPe():t==="fa"?rPe():tPe()}),iPe=()=>"Copying…",aPe=()=>"正在复制…",oPe=()=>"در حال کپی…",lPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aPe():t==="fa"?oPe():iPe()}),cPe=()=>"Finalizing…",uPe=()=>"正在完成…",dPe=()=>"در حال نهایی‌سازی…",fPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uPe():t==="fa"?dPe():cPe()}),hPe=e=>`${e==null?void 0:e.size} free at target`,_Pe=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,pPe=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,mPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?_Pe(e):t==="fa"?pPe(e):hPe(e)}),gPe=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.`,nPe=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,vPe=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,rPe=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,bPe=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,sPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?nPe(e):t==="fa"?rPe(e):tPe(e)}),iPe=()=>"Move data here",aPe=()=>"将数据移动到此处",oPe=()=>"انتقال داده به اینجا",lPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aPe():t==="fa"?oPe():iPe()}),cPe=()=>"Moving…",uPe=()=>"正在移动…",dPe=()=>"در حال جابه‌جایی…",fPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uPe():t==="fa"?dPe():cPe()}),hPe=()=>"Preparing…",_Pe=()=>"正在准备…",pPe=()=>"در حال آماده‌سازی…",mPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Pe():t==="fa"?pPe():hPe()}),gPe=()=>" (same disk, instant)",vPe=()=>"(同一磁盘,可立即完成)",bPe=()=>" (روی همان دیسک، فوری)",xPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vPe():t==="fa"?bPe():gPe()}),yPe=()=>"default location",wPe=()=>"默认位置",SPe=()=>"محل پیش‌فرض",kPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wPe():t==="fa"?SPe():yPe()}),CPe=()=>"ORX_DATA_DIR environment variable",EPe=()=>"ORX_DATA_DIR 环境变量",NPe=()=>"متغیر محیطی ORX_DATA_DIR",zPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EPe():t==="fa"?NPe():CPe()}),APe=()=>"your saved setting",TPe=()=>"已保存的设置",jPe=()=>"تنظیم ذخیره‌شدهٔ شما",MPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TPe():t==="fa"?jPe():APe()}),RPe=()=>"XDG_DATA_HOME",DPe=()=>"XDG_DATA_HOME",LPe=()=>"XDG_DATA_HOME",OPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DPe():t==="fa"?LPe():RPe()}),IPe=()=>"Verifying…",BPe=()=>"正在验证…",$Pe=()=>"در حال بررسی…",HPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BPe():t==="fa"?$Pe():IPe()}),PPe=()=>"Loading…",FPe=()=>"正在加载…",UPe=()=>"در حال بارگیری…",qPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FPe():t==="fa"?UPe():PPe()}),GPe=()=>"This sub-agent is no longer available.",VPe=()=>"此子智能体已不可用。",WPe=()=>"این عامل فرعی دیگر در دسترس نیست.",KPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VPe():t==="fa"?WPe():GPe()}),YPe=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,XPe=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,ZPe=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,QPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?XPe(e):t==="fa"?ZPe(e):YPe(e)}),JPe=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,eFe=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,tFe=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,nFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?eFe(e):t==="fa"?tFe(e):JPe(e)}),rFe=()=>"All tasks done",sFe=()=>"所有任务已完成",iFe=()=>"همهٔ کارها انجام شد",$E=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sFe():t==="fa"?iFe():rFe()}),aFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,oFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,lFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,cFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oFe(e):t==="fa"?lFe(e):aFe(e)}),uFe=()=>"Hide task list",dFe=()=>"隐藏任务列表",fFe=()=>"پنهان کردن فهرست کارها",hFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dFe():t==="fa"?fFe():uFe()}),_Fe=e=>`${e==null?void 0:e.done} of ${e==null?void 0:e.total} done`,pFe=e=>`已完成 ${e==null?void 0:e.done}/${e==null?void 0:e.total}`,mFe=e=>`${e==null?void 0:e.done} از ${e==null?void 0:e.total} انجام شد`,HE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pFe(e):t==="fa"?mFe(e):_Fe(e)}),gFe=()=>"Show task list",vFe=()=>"显示任务列表",bFe=()=>"نمایش فهرست کارها",xFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?vFe():t==="fa"?bFe():gFe()}),yFe=()=>"Tasks",wFe=()=>"任务",SFe=()=>"کارها",xx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wFe():t==="fa"?SFe():yFe()}),kFe=()=>"Delegated 1 task",CFe=()=>"委派了 1 个任务",EFe=()=>"۱ کار واگذار شد",NFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CFe():t==="fa"?EFe():kFe()}),zFe=e=>`Delegated ${e==null?void 0:e.count} tasks`,AFe=e=>`委派了 ${e==null?void 0:e.count} 个任务`,TFe=e=>`${e==null?void 0:e.count} کار واگذار شد`,jFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AFe(e):t==="fa"?TFe(e):zFe(e)}),MFe=()=>"Ran 1 command",RFe=()=>"运行了 1 条命令",DFe=()=>"۱ فرمان اجرا شد",LFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RFe():t==="fa"?DFe():MFe()}),OFe=e=>`Ran ${e==null?void 0:e.count} commands`,IFe=e=>`运行了 ${e==null?void 0:e.count} 条命令`,BFe=e=>`${e==null?void 0:e.count} فرمان اجرا شد`,$Fe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?IFe(e):t==="fa"?BFe(e):OFe(e)}),HFe=()=>"Edited 1 file",PFe=()=>"编辑了 1 个文件",FFe=()=>"۱ فایل ویرایش شد",UFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PFe():t==="fa"?FFe():HFe()}),qFe=e=>`Edited ${e==null?void 0:e.count} files`,GFe=e=>`编辑了 ${e==null?void 0:e.count} 个文件`,VFe=e=>`${e==null?void 0:e.count} فایل ویرایش شد`,WFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GFe(e):t==="fa"?VFe(e):qFe(e)}),KFe=()=>"Ran 1 project command",YFe=()=>"运行了 1 条项目命令",XFe=()=>"۱ فرمان پروژه اجرا شد",ZFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YFe():t==="fa"?XFe():KFe()}),QFe=e=>`Ran ${e==null?void 0:e.count} project commands`,JFe=e=>`运行了 ${e==null?void 0:e.count} 条项目命令`,eUe=e=>`${e==null?void 0:e.count} فرمان پروژه اجرا شد`,tUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JFe(e):t==="fa"?eUe(e):QFe(e)}),nUe=()=>"Read 1 file",rUe=()=>"读取了 1 个文件",sUe=()=>"۱ فایل خوانده شد",iUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rUe():t==="fa"?sUe():nUe()}),aUe=e=>`Read ${e==null?void 0:e.count} files`,oUe=e=>`读取了 ${e==null?void 0:e.count} 个文件`,lUe=e=>`${e==null?void 0:e.count} فایل خوانده شد`,cUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oUe(e):t==="fa"?lUe(e):aUe(e)}),uUe=()=>"Ran 1 search",dUe=()=>"执行了 1 次搜索",fUe=()=>"۱ جستجو انجام شد",hUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dUe():t==="fa"?fUe():uUe()}),_Ue=e=>`Ran ${e==null?void 0:e.count} searches`,pUe=e=>`执行了 ${e==null?void 0:e.count} 次搜索`,mUe=e=>`${e==null?void 0:e.count} جستجو انجام شد`,gUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pUe(e):t==="fa"?mUe(e):_Ue(e)}),vUe=()=>"Loaded 1 skill",bUe=()=>"加载了 1 个技能",xUe=()=>"۱ مهارت بارگذاری شد",yUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bUe():t==="fa"?xUe():vUe()}),wUe=e=>`Loaded ${e==null?void 0:e.count} skills`,SUe=e=>`加载了 ${e==null?void 0:e.count} 个技能`,kUe=e=>`${e==null?void 0:e.count} مهارت بارگذاری شد`,CUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SUe(e):t==="fa"?kUe(e):wUe(e)}),EUe=()=>"Browsed 1 page",NUe=()=>"浏览了 1 个网页",zUe=()=>"۱ صفحه مرور شد",AUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NUe():t==="fa"?zUe():EUe()}),TUe=e=>`Browsed ${e==null?void 0:e.count} pages`,jUe=e=>`浏览了 ${e==null?void 0:e.count} 个网页`,MUe=e=>`${e==null?void 0:e.count} صفحه مرور شد`,RUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jUe(e):t==="fa"?MUe(e):TUe(e)}),DUe=()=>", a repo for training a mini-GPT from scratch.",LUe=()=>",一个从零训练迷你 GPT 的仓库。",OUe=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",IUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LUe():t==="fa"?OUe():DUe()}),BUe=()=>"Close",$Ue=()=>"关闭",HUe=()=>"بستن",PUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ue():t==="fa"?HUe():BUe()}),FUe=()=>"Create a new project",UUe=()=>"新建项目",qUe=()=>"ایجاد پروژهٔ جدید",GUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UUe():t==="fa"?qUe():FUe()}),VUe=()=>"Demo project",WUe=()=>"演示项目",KUe=()=>"پروژهٔ نمایشی",YUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WUe():t==="fa"?KUe():VUe()}),XUe=()=>"Explore the demo",ZUe=()=>"探索演示项目",QUe=()=>"دیدن پروژهٔ نمایشی",JUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZUe():t==="fa"?QUe():XUe()}),eqe=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",tqe=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",nqe=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",rqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tqe():t==="fa"?nqe():eqe()}),sqe=()=>"nanochat",iqe=()=>"nanochat",aqe=()=>"nanochat",oqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iqe():t==="fa"?aqe():sqe()}),lqe=()=>"Couldn’t save your progress. Try again.",cqe=()=>"无法保存进度。请重试。",uqe=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",dqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cqe():t==="fa"?uqe():lqe()}),fqe=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",hqe=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",_qe=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",pqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hqe():t==="fa"?_qe():fqe()}),mqe=()=>"Welcome to OpenResearch",gqe=()=>"欢迎使用 OpenResearch",vqe=()=>"به OpenResearch خوش آمدید",bqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gqe():t==="fa"?vqe():mqe()}),xqe=()=>"Baseline",yqe=()=>"基线",wqe=()=>"مبنا",Sqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yqe():t==="fa"?wqe():xqe()}),kqe=()=>"Experiment",Cqe=()=>"实验",Eqe=()=>"آزمایش",po=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cqe():t==="fa"?Eqe():kqe()}),Nqe=e=>`${e==null?void 0:e.count} experiments`,zqe=e=>`${e==null?void 0:e.count} 个实验`,Aqe=e=>`${e==null?void 0:e.count} آزمایش`,Tqe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?zqe(e):t==="fa"?Aqe(e):Nqe(e)}),jqe=()=>"1 experiment",Mqe=()=>"1 个实验",Rqe=()=>"۱ آزمایش",Dqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Mqe():t==="fa"?Rqe():jqe()}),Lqe=()=>"Running",Oqe=()=>"运行中",Iqe=()=>"در حال اجرا",Bqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Oqe():t==="fa"?Iqe():Lqe()}),$qe=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Hqe=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Pqe=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Fqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Hqe():t==="fa"?Pqe():$qe()}),Uqe=()=>"Ask the agent in chat to create and run your first experiment.",qqe=()=>"在聊天中让智能体创建并运行你的第一个实验。",Gqe=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",Vqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?qqe():t==="fa"?Gqe():Uqe()}),Wqe=()=>"Code",Kqe=()=>"代码",Yqe=()=>"کد",Xqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kqe():t==="fa"?Yqe():Wqe()}),Zqe=()=>"Logs",Qqe=()=>"日志",Jqe=()=>"گزارش‌ها",PE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qqe():t==="fa"?Jqe():Zqe()}),eGe=()=>"No experiments from the current task yet",tGe=()=>"当前任务尚无实验",nGe=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",rGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tGe():t==="fa"?nGe():eGe()}),sGe=()=>"No experiments yet",iGe=()=>"尚无实验",aGe=()=>"هنوز آزمایشی وجود ندارد",oGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iGe():t==="fa"?aGe():sGe()}),lGe=()=>"no runs",cGe=()=>"无运行",uGe=()=>"بدون اجرا",dGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cGe():t==="fa"?uGe():lGe()}),fGe=()=>"Open logs",hGe=()=>"打开日志",_Ge=()=>"باز کردن گزارش‌ها",pGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hGe():t==="fa"?_Ge():fGe()}),mGe=()=>"other tasks",gGe=()=>"其他任务",vGe=()=>"وظایف دیگر",bGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gGe():t==="fa"?vGe():mGe()}),xGe=()=>"Runs",yGe=()=>"运行",wGe=()=>"اجراها",SGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yGe():t==="fa"?wGe():xGe()}),kGe=()=>"Switch to Entire project to see all experiments",CGe=()=>"切换到“整个项目”以查看所有实验",EGe=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",NGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,AGe=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,TGe=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,jGe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?AGe(e):t==="fa"?TGe(e):zGe(e)}),MGe=()=>"Dismiss",RGe=()=>"关闭",DGe=()=>"بستن",LGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RGe():t==="fa"?DGe():MGe()}),OGe=()=>"macOS app",IGe=()=>"macOS 应用",BGe=()=>"برنامهٔ macOS",$Ge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),HGe=()=>"Installed with cargo",PGe=()=>"通过 cargo 安装",FGe=()=>"نصب‌شده با cargo",UGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PGe():t==="fa"?FGe():HGe()}),qGe=()=>"Installed with Homebrew",GGe=()=>"通过 Homebrew 安装",VGe=()=>"نصب‌شده با Homebrew",WGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?GGe():t==="fa"?VGe():qGe()}),KGe=()=>"Installed with the orx installer",YGe=()=>"通过 orx 安装程序安装",XGe=()=>"نصب‌شده با نصب‌کنندهٔ orx",ZGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YGe():t==="fa"?XGe():KGe()}),QGe=()=>"Managed by Nix",JGe=()=>"由 Nix 管理",eVe=()=>"مدیریت‌شده با Nix",tVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JGe():t==="fa"?eVe():QGe()}),nVe=()=>"Unknown install",rVe=()=>"未知安装方式",sVe=()=>"روش نصب نامشخص",iVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rVe():t==="fa"?sVe():nVe()}),aVe=()=>"Re-run your cargo install to update.",oVe=()=>"重新运行 cargo 安装命令以更新。",lVe=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",cVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oVe():t==="fa"?lVe():aVe()}),uVe=()=>"Run brew upgrade to update.",dVe=()=>"运行 brew upgrade 以更新。",fVe=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",hVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dVe():t==="fa"?fVe():uVe()}),_Ve=()=>"Update it through your Nix configuration.",pVe=()=>"通过 Nix 配置进行更新。",mVe=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",gVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pVe():t==="fa"?mVe():_Ve()}),vVe=e=>`Current worktree · ${e==null?void 0:e.branch}`,bVe=e=>`当前工作树 · ${e==null?void 0:e.branch}`,xVe=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,yVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?bVe(e):t==="fa"?xVe(e):vVe(e)}),wVe=e=>`Default branch · ${e==null?void 0:e.branch}`,SVe=e=>`默认分支 · ${e==null?void 0:e.branch}`,kVe=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,CVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SVe(e):t==="fa"?kVe(e):wVe(e)}),EVe=e=>`detached at ${e==null?void 0:e.branch}`,NVe=e=>`分离于 ${e==null?void 0:e.branch}`,zVe=e=>`جدا در ${e==null?void 0:e.branch}`,AVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?NVe(e):t==="fa"?zVe(e):EVe(e)}),TVe=()=>"Listing truncated.",jVe=()=>"列表已截断。",MVe=()=>"فهرست کوتاه شده است.",RVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jVe():t==="fa"?MVe():TVe()}),DVe=()=>"Loading…",LVe=()=>"正在加载…",OVe=()=>"در حال بارگیری…",IVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LVe():t==="fa"?OVe():DVe()}),BVe=()=>"No changes yet.",$Ve=()=>"尚无更改。",HVe=()=>"هنوز تغییری وجود ندارد.",PVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ve():t==="fa"?HVe():BVe()}),FVe=()=>"No files.",UVe=()=>"没有文件。",qVe=()=>"فایلی وجود ندارد.",GVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UVe():t==="fa"?qVe():FVe()}),VVe=()=>"Refresh failed:",WVe=()=>"刷新失败:",KVe=()=>"تازه‌سازی ناموفق بود:",YVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WVe():t==="fa"?KVe():VVe()}),yb=new Set;function XVe(e){if(e!==N()){V9(e,{reload:!1}),document.documentElement.lang=e;for(const n of yb)n()}}function ZVe(e){return yb.add(e),()=>yb.delete(e)}function Cc(){return M.useSyncExternalStore(ZVe,N,N)}const Ae=e=>`⁦${e}⁩`,Ca=e=>`⁨${e}⁩`,Vt=e=>new Intl.NumberFormat(N()).format(e);/** +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,xPe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?vPe(e):t==="fa"?bPe(e):gPe(e)}),yPe=()=>"Move data here",wPe=()=>"将数据移动到此处",SPe=()=>"انتقال داده به اینجا",kPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?wPe():t==="fa"?SPe():yPe()}),CPe=()=>"Moving…",EPe=()=>"正在移动…",NPe=()=>"در حال جابه‌جایی…",zPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?EPe():t==="fa"?NPe():CPe()}),APe=()=>"Preparing…",TPe=()=>"正在准备…",jPe=()=>"در حال آماده‌سازی…",MPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?TPe():t==="fa"?jPe():APe()}),RPe=()=>" (same disk, instant)",DPe=()=>"(同一磁盘,可立即完成)",LPe=()=>" (روی همان دیسک، فوری)",OPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DPe():t==="fa"?LPe():RPe()}),IPe=()=>"default location",BPe=()=>"默认位置",$Pe=()=>"محل پیش‌فرض",HPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BPe():t==="fa"?$Pe():IPe()}),PPe=()=>"ORX_DATA_DIR environment variable",FPe=()=>"ORX_DATA_DIR 环境变量",UPe=()=>"متغیر محیطی ORX_DATA_DIR",qPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?FPe():t==="fa"?UPe():PPe()}),GPe=()=>"your saved setting",VPe=()=>"已保存的设置",WPe=()=>"تنظیم ذخیره‌شدهٔ شما",KPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?VPe():t==="fa"?WPe():GPe()}),YPe=()=>"XDG_DATA_HOME",XPe=()=>"XDG_DATA_HOME",ZPe=()=>"XDG_DATA_HOME",QPe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?XPe():t==="fa"?ZPe():YPe()}),JPe=()=>"Verifying…",eFe=()=>"正在验证…",tFe=()=>"در حال بررسی…",nFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?eFe():t==="fa"?tFe():JPe()}),rFe=()=>"Loading…",sFe=()=>"正在加载…",iFe=()=>"در حال بارگیری…",aFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?sFe():t==="fa"?iFe():rFe()}),oFe=()=>"This sub-agent is no longer available.",lFe=()=>"此子智能体已不可用。",cFe=()=>"این عامل فرعی دیگر در دسترس نیست.",uFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?lFe():t==="fa"?cFe():oFe()}),dFe=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,fFe=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,hFe=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,_Fe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?fFe(e):t==="fa"?hFe(e):dFe(e)}),pFe=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,mFe=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,gFe=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,vFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?mFe(e):t==="fa"?gFe(e):pFe(e)}),bFe=()=>"All tasks done",xFe=()=>"所有任务已完成",yFe=()=>"همهٔ کارها انجام شد",GE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?xFe():t==="fa"?yFe():bFe()}),wFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,SFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,kFe=e=>`${e==null?void 0:e.done}/${e==null?void 0:e.total}`,CFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SFe(e):t==="fa"?kFe(e):wFe(e)}),EFe=()=>"Hide task list",NFe=()=>"隐藏任务列表",zFe=()=>"پنهان کردن فهرست کارها",AFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NFe():t==="fa"?zFe():EFe()}),TFe=e=>`${e==null?void 0:e.done} of ${e==null?void 0:e.total} done`,jFe=e=>`已完成 ${e==null?void 0:e.done}/${e==null?void 0:e.total}`,MFe=e=>`${e==null?void 0:e.done} از ${e==null?void 0:e.total} انجام شد`,VE=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jFe(e):t==="fa"?MFe(e):TFe(e)}),RFe=()=>"Show task list",DFe=()=>"显示任务列表",LFe=()=>"نمایش فهرست کارها",OFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?DFe():t==="fa"?LFe():RFe()}),IFe=()=>"Tasks",BFe=()=>"任务",$Fe=()=>"کارها",kx=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?BFe():t==="fa"?$Fe():IFe()}),HFe=()=>"Delegated 1 task",PFe=()=>"委派了 1 个任务",FFe=()=>"۱ کار واگذار شد",UFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PFe():t==="fa"?FFe():HFe()}),qFe=e=>`Delegated ${e==null?void 0:e.count} tasks`,GFe=e=>`委派了 ${e==null?void 0:e.count} 个任务`,VFe=e=>`${e==null?void 0:e.count} کار واگذار شد`,WFe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GFe(e):t==="fa"?VFe(e):qFe(e)}),KFe=()=>"Ran 1 command",YFe=()=>"运行了 1 条命令",XFe=()=>"۱ فرمان اجرا شد",ZFe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YFe():t==="fa"?XFe():KFe()}),QFe=e=>`Ran ${e==null?void 0:e.count} commands`,JFe=e=>`运行了 ${e==null?void 0:e.count} 条命令`,eUe=e=>`${e==null?void 0:e.count} فرمان اجرا شد`,tUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?JFe(e):t==="fa"?eUe(e):QFe(e)}),nUe=()=>"Edited 1 file",rUe=()=>"编辑了 1 个文件",sUe=()=>"۱ فایل ویرایش شد",iUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rUe():t==="fa"?sUe():nUe()}),aUe=e=>`Edited ${e==null?void 0:e.count} files`,oUe=e=>`编辑了 ${e==null?void 0:e.count} 个文件`,lUe=e=>`${e==null?void 0:e.count} فایل ویرایش شد`,cUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?oUe(e):t==="fa"?lUe(e):aUe(e)}),uUe=()=>"Ran 1 project command",dUe=()=>"运行了 1 条项目命令",fUe=()=>"۱ فرمان پروژه اجرا شد",hUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dUe():t==="fa"?fUe():uUe()}),_Ue=e=>`Ran ${e==null?void 0:e.count} project commands`,pUe=e=>`运行了 ${e==null?void 0:e.count} 条项目命令`,mUe=e=>`${e==null?void 0:e.count} فرمان پروژه اجرا شد`,gUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?pUe(e):t==="fa"?mUe(e):_Ue(e)}),vUe=()=>"Read 1 file",bUe=()=>"读取了 1 个文件",xUe=()=>"۱ فایل خوانده شد",yUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bUe():t==="fa"?xUe():vUe()}),wUe=e=>`Read ${e==null?void 0:e.count} files`,SUe=e=>`读取了 ${e==null?void 0:e.count} 个文件`,kUe=e=>`${e==null?void 0:e.count} فایل خوانده شد`,CUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?SUe(e):t==="fa"?kUe(e):wUe(e)}),EUe=()=>"Ran 1 search",NUe=()=>"执行了 1 次搜索",zUe=()=>"۱ جستجو انجام شد",AUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NUe():t==="fa"?zUe():EUe()}),TUe=e=>`Ran ${e==null?void 0:e.count} searches`,jUe=e=>`执行了 ${e==null?void 0:e.count} 次搜索`,MUe=e=>`${e==null?void 0:e.count} جستجو انجام شد`,RUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?jUe(e):t==="fa"?MUe(e):TUe(e)}),DUe=()=>"Loaded 1 skill",LUe=()=>"加载了 1 个技能",OUe=()=>"۱ مهارت بارگذاری شد",IUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?LUe():t==="fa"?OUe():DUe()}),BUe=e=>`Loaded ${e==null?void 0:e.count} skills`,$Ue=e=>`加载了 ${e==null?void 0:e.count} 个技能`,HUe=e=>`${e==null?void 0:e.count} مهارت بارگذاری شد`,PUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ue(e):t==="fa"?HUe(e):BUe(e)}),FUe=()=>"Browsed 1 page",UUe=()=>"浏览了 1 个网页",qUe=()=>"۱ صفحه مرور شد",GUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?UUe():t==="fa"?qUe():FUe()}),VUe=e=>`Browsed ${e==null?void 0:e.count} pages`,WUe=e=>`浏览了 ${e==null?void 0:e.count} 个网页`,KUe=e=>`${e==null?void 0:e.count} صفحه مرور شد`,YUe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?WUe(e):t==="fa"?KUe(e):VUe(e)}),XUe=()=>", a repo for training a mini-GPT from scratch.",ZUe=()=>",一个从零训练迷你 GPT 的仓库。",QUe=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",JUe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZUe():t==="fa"?QUe():XUe()}),eqe=()=>"Close",tqe=()=>"关闭",nqe=()=>"بستن",rqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tqe():t==="fa"?nqe():eqe()}),sqe=()=>"Create a new project",iqe=()=>"新建项目",aqe=()=>"ایجاد پروژهٔ جدید",oqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iqe():t==="fa"?aqe():sqe()}),lqe=()=>"Demo project",cqe=()=>"演示项目",uqe=()=>"پروژهٔ نمایشی",dqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cqe():t==="fa"?uqe():lqe()}),fqe=()=>"Explore the demo",hqe=()=>"探索演示项目",_qe=()=>"دیدن پروژهٔ نمایشی",pqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?hqe():t==="fa"?_qe():fqe()}),mqe=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",gqe=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",vqe=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",bqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gqe():t==="fa"?vqe():mqe()}),xqe=()=>"nanochat",yqe=()=>"nanochat",wqe=()=>"nanochat",Sqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yqe():t==="fa"?wqe():xqe()}),kqe=()=>"Couldn’t save your progress. Try again.",Cqe=()=>"无法保存进度。请重试。",Eqe=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",Nqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Cqe():t==="fa"?Eqe():kqe()}),zqe=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",Aqe=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",Tqe=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",jqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Aqe():t==="fa"?Tqe():zqe()}),Mqe=()=>"Welcome to OpenResearch",Rqe=()=>"欢迎使用 OpenResearch",Dqe=()=>"به OpenResearch خوش آمدید",Lqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Rqe():t==="fa"?Dqe():Mqe()}),Oqe=()=>"Baseline",Iqe=()=>"基线",Bqe=()=>"مبنا",$qe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Iqe():t==="fa"?Bqe():Oqe()}),Hqe=()=>"Experiment",Pqe=()=>"实验",Fqe=()=>"آزمایش",_o=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Pqe():t==="fa"?Fqe():Hqe()}),Uqe=e=>`${e==null?void 0:e.count} experiments`,qqe=e=>`${e==null?void 0:e.count} 个实验`,Gqe=e=>`${e==null?void 0:e.count} آزمایش`,Vqe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?qqe(e):t==="fa"?Gqe(e):Uqe(e)}),Wqe=()=>"1 experiment",Kqe=()=>"1 个实验",Yqe=()=>"۱ آزمایش",Xqe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Kqe():t==="fa"?Yqe():Wqe()}),Zqe=()=>"Running",Qqe=()=>"运行中",Jqe=()=>"در حال اجرا",eGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?Qqe():t==="fa"?Jqe():Zqe()}),tGe=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",nGe=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",rGe=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",sGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?nGe():t==="fa"?rGe():tGe()}),iGe=()=>"Ask the agent in chat to create and run your first experiment.",aGe=()=>"在聊天中让智能体创建并运行你的第一个实验。",oGe=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",lGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?aGe():t==="fa"?oGe():iGe()}),cGe=()=>"Code",uGe=()=>"代码",dGe=()=>"کد",fGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?uGe():t==="fa"?dGe():cGe()}),hGe=()=>"Logs",_Ge=()=>"日志",pGe=()=>"گزارش‌ها",WE=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?_Ge():t==="fa"?pGe():hGe()}),mGe=()=>"No experiments from the current task yet",gGe=()=>"当前任务尚无实验",vGe=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",bGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?gGe():t==="fa"?vGe():mGe()}),xGe=()=>"No experiments yet",yGe=()=>"尚无实验",wGe=()=>"هنوز آزمایشی وجود ندارد",SGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?yGe():t==="fa"?wGe():xGe()}),kGe=()=>"no runs",CGe=()=>"无运行",EGe=()=>"بدون اجرا",NGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?CGe():t==="fa"?EGe():kGe()}),zGe=()=>"Open logs",AGe=()=>"打开日志",TGe=()=>"باز کردن گزارش‌ها",jGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?AGe():t==="fa"?TGe():zGe()}),MGe=()=>"other tasks",RGe=()=>"其他任务",DGe=()=>"وظایف دیگر",LGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?RGe():t==="fa"?DGe():MGe()}),OGe=()=>"Runs",IGe=()=>"运行",BGe=()=>"اجراها",$Ge=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?IGe():t==="fa"?BGe():OGe()}),HGe=()=>"Switch to Entire project to see all experiments",PGe=()=>"切换到“整个项目”以查看所有实验",FGe=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",UGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?PGe():t==="fa"?FGe():HGe()}),qGe=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,GGe=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,VGe=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,WGe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?GGe(e):t==="fa"?VGe(e):qGe(e)}),KGe=()=>"Dismiss",YGe=()=>"关闭",XGe=()=>"بستن",ZGe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?YGe():t==="fa"?XGe():KGe()}),QGe=()=>"macOS app",JGe=()=>"macOS 应用",eVe=()=>"برنامهٔ macOS",tVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?JGe():t==="fa"?eVe():QGe()}),nVe=()=>"Installed with cargo",rVe=()=>"通过 cargo 安装",sVe=()=>"نصب‌شده با cargo",iVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?rVe():t==="fa"?sVe():nVe()}),aVe=()=>"Installed with Homebrew",oVe=()=>"通过 Homebrew 安装",lVe=()=>"نصب‌شده با Homebrew",cVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?oVe():t==="fa"?lVe():aVe()}),uVe=()=>"Installed with the orx installer",dVe=()=>"通过 orx 安装程序安装",fVe=()=>"نصب‌شده با نصب‌کنندهٔ orx",hVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?dVe():t==="fa"?fVe():uVe()}),_Ve=()=>"Managed by Nix",pVe=()=>"由 Nix 管理",mVe=()=>"مدیریت‌شده با Nix",gVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?pVe():t==="fa"?mVe():_Ve()}),vVe=()=>"Unknown install",bVe=()=>"未知安装方式",xVe=()=>"روش نصب نامشخص",yVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?bVe():t==="fa"?xVe():vVe()}),wVe=()=>"Re-run your cargo install to update.",SVe=()=>"重新运行 cargo 安装命令以更新。",kVe=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",CVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?SVe():t==="fa"?kVe():wVe()}),EVe=()=>"Run brew upgrade to update.",NVe=()=>"运行 brew upgrade 以更新。",zVe=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",AVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?NVe():t==="fa"?zVe():EVe()}),TVe=()=>"Update it through your Nix configuration.",jVe=()=>"通过 Nix 配置进行更新。",MVe=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",RVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?jVe():t==="fa"?MVe():TVe()}),DVe=e=>`Current worktree · ${e==null?void 0:e.branch}`,LVe=e=>`当前工作树 · ${e==null?void 0:e.branch}`,OVe=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,IVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?LVe(e):t==="fa"?OVe(e):DVe(e)}),BVe=e=>`Default branch · ${e==null?void 0:e.branch}`,$Ve=e=>`默认分支 · ${e==null?void 0:e.branch}`,HVe=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,PVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?$Ve(e):t==="fa"?HVe(e):BVe(e)}),FVe=e=>`detached at ${e==null?void 0:e.branch}`,UVe=e=>`分离于 ${e==null?void 0:e.branch}`,qVe=e=>`جدا در ${e==null?void 0:e.branch}`,GVe=((e,n={})=>{const t=n.locale??N();return t==="zh-CN"?UVe(e):t==="fa"?qVe(e):FVe(e)}),VVe=()=>"Listing truncated.",WVe=()=>"列表已截断。",KVe=()=>"فهرست کوتاه شده است.",YVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?WVe():t==="fa"?KVe():VVe()}),XVe=()=>"Loading…",ZVe=()=>"正在加载…",QVe=()=>"در حال بارگیری…",JVe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?ZVe():t==="fa"?QVe():XVe()}),eWe=()=>"No changes yet.",tWe=()=>"尚无更改。",nWe=()=>"هنوز تغییری وجود ندارد.",rWe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?tWe():t==="fa"?nWe():eWe()}),sWe=()=>"No files.",iWe=()=>"没有文件。",aWe=()=>"فایلی وجود ندارد.",oWe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?iWe():t==="fa"?aWe():sWe()}),lWe=()=>"Refresh failed:",cWe=()=>"刷新失败:",uWe=()=>"تازه‌سازی ناموفق بود:",dWe=((e={},n={})=>{const t=n.locale??N();return t==="zh-CN"?cWe():t==="fa"?uWe():lWe()}),Cb=new Set;function fWe(e){if(e!==N()){Q9(e,{reload:!1}),document.documentElement.lang=e;for(const n of Cb)n()}}function hWe(e){return Cb.add(e),()=>Cb.delete(e)}function Ec(){return M.useSyncExternalStore(hWe,N,N)}const Te=e=>`⁦${e}⁩`,ka=e=>`⁨${e}⁩`,Ft=e=>new Intl.NumberFormat(N()).format(e);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FE=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** + */const KE=(...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 QVe=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const _We=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 JVe=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const pWe=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 F7=e=>{const n=JVe(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const W7=e=>{const n=pWe(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 W1={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 Z1={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 eWe=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},tWe=M.createContext({}),nWe=()=>M.useContext(tWe),rWe=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:a,iconNode:o,...l},c)=>{const{size:d=24,strokeWidth:_=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:g=""}=nWe()??{},S=r??f?Number(t??_)*24/Number(n??d):t??_;return M.createElement("svg",{ref:c,...W1,width:n??d??W1.width,height:n??d??W1.height,stroke:e??m,strokeWidth:S,className:FE("lucide",g,s),...!a&&!eWe(l)&&{"aria-hidden":"true"},...l},[...o.map(([k,b])=>M.createElement(k,b)),...Array.isArray(a)?a:[a]])});/** + */const mWe=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},gWe=M.createContext({}),vWe=()=>M.useContext(gWe),bWe=M.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:a,iconNode:o,...l},c)=>{const{size:d=24,strokeWidth:_=2,absoluteStrokeWidth:f=!1,color:m="currentColor",className:g=""}=vWe()??{},S=r??f?Number(t??_)*24/Number(n??d):t??_;return M.createElement("svg",{ref:c,...Z1,width:n??d??Z1.width,height:n??d??Z1.height,stroke:e??m,strokeWidth:S,className:KE("lucide",g,s),...!a&&!mWe(l)&&{"aria-hidden":"true"},...l},[...o.map(([k,b])=>M.createElement(k,b)),...Array.isArray(a)?a:[a]])});/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Je=(e,n)=>{const t=M.forwardRef(({className:r,...s},a)=>M.createElement(rWe,{ref:a,iconNode:n,className:FE(`lucide-${QVe(F7(e))}`,`lucide-${e}`,r),...s}));return t.displayName=F7(e),t};/** + */const Je=(e,n)=>{const t=M.forwardRef(({className:r,...s},a)=>M.createElement(bWe,{ref:a,iconNode:n,className:KE(`lucide-${_We(W7(e))}`,`lucide-${e}`,r),...s}));return t.displayName=W7(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 sWe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],iWe=Je("arrow-down",sWe);/** + */const xWe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],yWe=Je("arrow-down",xWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aWe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Bf=Je("arrow-left",aWe);/** + */const wWe=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$f=Je("arrow-left",wWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oWe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],A0=Je("arrow-right",oWe);/** + */const SWe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],L0=Je("arrow-right",SWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lWe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],cWe=Je("arrow-up-right",lWe);/** + */const kWe=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],CWe=Je("arrow-up-right",kWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uWe=[["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"}]],UE=Je("blocks",uWe);/** + */const EWe=[["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"}]],YE=Je("blocks",EWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dWe=[["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"}]],qE=Je("book-open",dWe);/** + */const NWe=[["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"}]],XE=Je("book-open",NWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fWe=[["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"}]],hWe=Je("calendar-days",fWe);/** + */const zWe=[["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"}]],AWe=Je("calendar-days",zWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _We=[["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"}]],pWe=Je("chart-spline",_We);/** + */const TWe=[["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"}]],jWe=Je("chart-spline",TWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mWe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ws=Je("check",mWe);/** + */const MWe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ys=Je("check",MWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gWe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ta=Je("chevron-down",gWe);/** + */const RWe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ta=Je("chevron-down",RWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vWe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],GE=Je("chevron-left",vWe);/** + */const DWe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ZE=Je("chevron-left",DWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bWe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ma=Je("chevron-right",bWe);/** + */const LWe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ja=Je("chevron-right",LWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xWe=[["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"}]],VE=Je("circle-alert",xWe);/** + */const OWe=[["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"}]],QE=Je("circle-alert",OWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yWe=[["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"}]],wWe=Je("circle-question-mark",yWe);/** + */const IWe=[["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"}]],BWe=Je("circle-question-mark",IWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const SWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],kWe=Je("circle-slash",SWe);/** + */const $We=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],HWe=Je("circle-slash",$We);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const CWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],WE=Je("circle-stop",CWe);/** + */const PWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],JE=Je("circle-stop",PWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EWe=[["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"}]],KE=Je("circle-x",EWe);/** + */const FWe=[["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"}]],eN=Je("circle-x",FWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zWe=Je("circle",NWe);/** + */const UWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qWe=Je("circle",UWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const AWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],TWe=Je("clock-3",AWe);/** + */const GWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],VWe=Je("clock-3",GWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],MWe=Je("clock",jWe);/** + */const WWe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],KWe=Je("clock",WWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RWe=[["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"}]],DWe=Je("cloud-upload",RWe);/** + */const YWe=[["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"}]],XWe=Je("cloud-upload",YWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LWe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],wb=Je("code",LWe);/** + */const ZWe=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Eb=Je("code",ZWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OWe=[["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"}]],Lp=Je("copy",OWe);/** + */const QWe=[["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"}]],Hp=Je("copy",QWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IWe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],YE=Je("corner-down-left",IWe);/** + */const JWe=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],tN=Je("corner-down-left",JWe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BWe=[["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"}]],$We=Je("cpu",BWe);/** + */const eKe=[["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"}]],tKe=Je("cpu",eKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HWe=[["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"}]],PWe=Je("download",HWe);/** + */const nKe=[["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"}]],rKe=Je("download",nKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FWe=[["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"}]],yx=Je("ellipsis",FWe);/** + */const sKe=[["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"}]],Cx=Je("ellipsis",sKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UWe=[["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"}]],gc=Je("external-link",UWe);/** + */const iKe=[["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"}]],vc=Je("external-link",iKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qWe=[["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"}]],XE=Je("file-code",qWe);/** + */const aKe=[["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"}]],nN=Je("file-code",aKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GWe=[["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"}]],VWe=Je("file-output",GWe);/** + */const oKe=[["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"}]],lKe=Je("file-output",oKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WWe=[["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"}]],Vu=Je("file-text",WWe);/** + */const cKe=[["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"}]],Ku=Je("file-text",cKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KWe=[["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"}]],wx=Je("flask-conical",KWe);/** + */const uKe=[["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"}]],Ex=Je("flask-conical",uKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YWe=[["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"}]],ZE=Je("folder-git-2",YWe);/** + */const dKe=[["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"}]],rN=Je("folder-git-2",dKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XWe=[["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"}]],$f=Je("folder-open",XWe);/** + */const fKe=[["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"}]],Hf=Je("folder-open",fKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZWe=[["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"}]],QWe=Je("folder-plus",ZWe);/** + */const hKe=[["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"}]],_Ke=Je("folder-plus",hKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JWe=[["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"}]],Op=Je("folder-tree",JWe);/** + */const pKe=[["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"}]],Pp=Je("folder-tree",pKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eKe=[["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"}]],tKe=Je("funnel",eKe);/** + */const mKe=[["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"}]],gKe=Je("funnel",mKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nKe=[["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"}]],Ip=Je("git-branch",nKe);/** + */const vKe=[["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"}]],Fp=Je("git-branch",vKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rKe=[["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"}]],sKe=Je("git-commit-horizontal",rKe);/** + */const bKe=[["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"}]],xKe=Je("git-commit-horizontal",bKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iKe=[["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"}]],aKe=Je("globe",iKe);/** + */const yKe=[["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"}]],wKe=Je("globe",yKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oKe=[["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"}]],lKe=Je("history",oKe);/** + */const SKe=[["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"}]],kKe=Je("history",SKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uKe=Je("info",cKe);/** + */const CKe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],EKe=Je("info",CKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dKe=[["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"}]],fKe=Je("laptop",dKe);/** + */const NKe=[["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"}]],zKe=Je("laptop",NKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hKe=[["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"}]],_Ke=Je("lightbulb",hKe);/** + */const AKe=[["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"}]],TKe=Je("lightbulb",AKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pKe=[["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"}]],Sx=Je("list-checks",pKe);/** + */const jKe=[["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"}]],Nx=Je("list-checks",jKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mKe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gKe=Je("loader-circle",mKe);/** + */const MKe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],RKe=Je("loader-circle",MKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vKe=[["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"}]],U7=Je("lock",vKe);/** + */const DKe=[["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"}]],K7=Je("lock",DKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bKe=[["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"}]],xKe=Je("maximize-2",bKe);/** + */const LKe=[["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"}]],OKe=Je("maximize-2",LKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yKe=[["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"}]],QE=Je("message-square-quote",yKe);/** + */const IKe=[["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"}]],sN=Je("message-square-quote",IKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wKe=[["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"}]],SKe=Je("minimize-2",wKe);/** + */const BKe=[["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"}]],$Ke=Je("minimize-2",BKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kKe=[["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"}]],CKe=Je("monitor",kKe);/** + */const HKe=[["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"}]],PKe=Je("monitor",HKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const EKe=[["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"}]],NKe=Je("moon",EKe);/** + */const FKe=[["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"}]],UKe=Je("moon",FKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zKe=[["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"}]],AKe=Je("mouse-pointer-click",zKe);/** + */const qKe=[["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"}]],GKe=Je("mouse-pointer-click",qKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const TKe=[["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"}]],kx=Je("package",TKe);/** + */const VKe=[["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"}]],zx=Je("package",VKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jKe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],JE=Je("panel-left",jKe);/** + */const WKe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],iN=Je("panel-left",WKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const MKe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],eN=Je("panel-right",MKe);/** + */const KKe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],aN=Je("panel-right",KKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const RKe=[["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"}]],DKe=Je("paperclip",RKe);/** + */const YKe=[["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"}]],XKe=Je("paperclip",YKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LKe=[["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"}]],Cx=Je("pencil",LKe);/** + */const ZKe=[["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"}]],Ax=Je("pencil",ZKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const OKe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Ex=Je("plus",OKe);/** + */const QKe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Tx=Je("plus",QKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const IKe=[["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"}]],ld=Je("refresh-cw",IKe);/** + */const JKe=[["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"}]],ud=Je("refresh-cw",JKe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BKe=[["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"}]],tN=Je("rotate-cw",BKe);/** + */const eYe=[["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"}]],oN=Je("rotate-cw",eYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $Ke=[["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"}]],Nx=Je("scroll-text",$Ke);/** + */const tYe=[["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"}]],jx=Je("scroll-text",tYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HKe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],nN=Je("search",HKe);/** + */const nYe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lN=Je("search",nYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const PKe=[["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"}]],q7=Je("server",PKe);/** + */const rYe=[["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"}]],Y7=Je("server",rYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FKe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],UKe=Je("settings-2",FKe);/** + */const sYe=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],iYe=Je("settings-2",sYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qKe=[["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"}]],GKe=Je("settings",qKe);/** + */const aYe=[["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"}]],oYe=Je("settings",aYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VKe=[["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"}]],WKe=Je("sliders-horizontal",VKe);/** + */const lYe=[["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"}]],cYe=Je("sliders-horizontal",lYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KKe=[["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"}]],zx=Je("square-terminal",KKe);/** + */const uYe=[["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"}]],Mx=Je("square-terminal",uYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YKe=[["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"}]],XKe=Je("sun",YKe);/** + */const dYe=[["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"}]],fYe=Je("sun",dYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZKe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Wu=Je("terminal",ZKe);/** + */const hYe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Yu=Je("terminal",hYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QKe=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],JKe=Je("toggle-right",QKe);/** + */const _Ye=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],pYe=Je("toggle-right",_Ye);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eYe=[["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"}]],cd=Je("trash-2",eYe);/** + */const mYe=[["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"}]],dd=Je("trash-2",mYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tYe=[["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"}]],rN=Je("triangle-alert",tYe);/** + */const gYe=[["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"}]],cN=Je("triangle-alert",gYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nYe=[["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"}]],rYe=Je("upload",nYe);/** + */const vYe=[["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"}]],bYe=Je("upload",vYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sYe=[["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"}]],Ax=Je("users",sYe);/** + */const xYe=[["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"}]],Rx=Je("users",xYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iYe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_s=Je("x",iYe);/** + */const yYe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_s=Je("x",yYe);/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aYe=[["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"}]],oYe=Je("zap",aYe),K1="demo_nanochat_v1",W_=e=>e.startsWith("demo_"),Nf="chat_demo_nanochat_v1",sN="chat_demo_nanochat_figures_v1",iN="chat_demo_nanochat_literature_v1",Sb="cpu-apple-silicon-pipeline-results.md",lYe="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.";function Di(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}async function Oi(e){if(!e.ok){const n=await e.text().catch(()=>"");let t=n;try{const r=JSON.parse(n);r.error&&(t=r.error)}catch{}throw new Error(t||`HTTP ${e.status}`)}return await e.json()}const jt=e=>fetch(e).then(n=>Oi(n)),Xt=(e,n)=>fetch(e,{method:"POST",headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(t=>Oi(t)),Bp=(e,n)=>fetch(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Oi(t)),cYe=(e,n)=>fetch(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Oi(t)),uYe=()=>jt("/api/projects").then(e=>e.projects),dYe=()=>jt("/api/projects/activity").then(e=>e.activity),fYe=()=>jt("/api/settings/ui-state"),G7=e=>Xt("/api/settings/ui-state",e),hYe=(e,n)=>Xt("/api/onboarding/complete",{...e,...n}),aN=(e="")=>{const n=e?`?path=${encodeURIComponent(e)}`:"";return jt(`/api/project-path/status${n}`)},_Ye=()=>Xt("/api/project-path/pick").then(e=>e.path),pYe=e=>Xt("/api/projects",e),oN=e=>jt(`/api/papers/search?q=${encodeURIComponent(e)}`).then(n=>n.papers),mYe=()=>jt("/api/github/account"),gYe=e=>jt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`),vYe=(e,n)=>jt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`),kb=e=>jt(`/api/papers/resolve?id=${encodeURIComponent(e)}`).then(n=>n.paper),bYe=e=>Xt("/api/projects/starter-prompts/prewarm",e),xYe=(e,n,t,r)=>jt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`),yYe=e=>Xt(`/api/projects/${e}/open`).then(n=>n.project),wYe=e=>fetch(`/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})`)}}),SYe=e=>jt(`/api/projects/${e}/experiments`).then(n=>n.experiments),Tx=e=>jt(`/api/projects/${e}/runs`).then(n=>n.runs),lN=e=>Xt(`/api/runs/${e}/cancel`).then(()=>{}),kYe=(e,n)=>jt(`/api/runs/${e}/log?offset=${n}`),CYe=e=>jt(`/api/runs/${e}/diff`),EYe=e=>jt(`/api/experiments/${e}/diff`),Ec=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),V7=(e,n,t={})=>jt(`/api/projects/${e}/file?${Ec(t,new URLSearchParams({path:n}))}`),W7=(e,n,t={})=>`/api/projects/${e}/file/raw?${Ec(t,new URLSearchParams({path:n}))}`,NYe=e=>jt(`/api/files/abs?path=${encodeURIComponent(e)}`),zYe=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,AYe=(e,n,t,r={})=>cYe(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId}),TYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),jYe=()=>jt("/api/latex/engine"),MYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),RYe=()=>jt("/api/overleaf/settings"),cN=e=>Xt("/api/overleaf/token",{token:e}),DYe=()=>fetch("/api/overleaf/token",{method:"DELETE"}).then(e=>Oi(e)),LYe=(e,n,t={})=>jt(`/api/projects/${e}/file/overleaf?${Ec(t,new URLSearchParams({path:n}))}`),OYe=(e,n,t)=>Xt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),IYe=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf?${Ec(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Oi(r)),BYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),$Ye=(e,n,t={})=>jt(`/api/projects/${e}/file/overleaf/status?${Ec(t,new URLSearchParams({path:n}))}`),HYe=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Ec(t,new URLSearchParams({path:n}))}`,Cb=(e,n={})=>{const t=Ec(n).toString();return jt(`/api/projects/${e}/code-tree${t?`?${t}`:""}`)},uN=e=>jt(`/api/chat/sessions/${e}/worktree`),$p=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,PYe=()=>jt("/api/settings/hf"),FYe=e=>Xt("/api/settings/hf",{token:e}),UYe=()=>jt("/api/update"),qYe=()=>Xt("/api/update/apply"),GYe=e=>Xt("/api/update/auto",{enabled:e}),VYe=(e=!1)=>Xt("/api/update/install-cli",{force:e}),WYe=()=>jt("/api/settings/k8s"),KYe=e=>Xt("/api/settings/k8s",e),YYe=()=>jt("/api/settings/modal"),XYe=()=>Xt("/api/settings/modal/provision"),ZYe=()=>jt("/api/settings/env").then(e=>e.vars),dN=(e,n)=>Xt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),QYe=e=>fetch(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n)).then(n=>n.vars),JYe=()=>jt("/api/settings/data-dir"),eXe=e=>Xt("/api/settings/data-dir/validate",{path:e}),tXe=e=>Xt("/api/settings/data-dir/move",{path:e}),nXe=()=>jt("/api/settings/ssh").then(e=>e.hosts),rXe=e=>jt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`),sXe=()=>jt("/api/settings/slurm"),iXe=e=>Xt("/api/settings/slurm",e),aXe=()=>jt("/api/settings/ray"),oXe=e=>Xt("/api/settings/ray",e),lXe=e=>Xt("/api/settings/ray/preflight",{address:e??null}),cXe=e=>jt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`),uXe=e=>Xt("/api/settings/compute/default",e),dXe=()=>jt("/api/settings/local"),fXe=()=>jt("/api/settings/openresearch"),K7=e=>jt(`/api/projects/${e}/files`),hXe=(e,n)=>fetch(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Oi(t)),xh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,fN=512e3,_Xe=(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}}},hN=(e,n)=>fetch(xh(e,n),{headers:{Range:`bytes=0-${fN-1}`}}).then(t=>{var s;if(t.status===404)return null;if(t.status===416&&t.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=Number((s=t.headers.get("content-range"))==null?void 0:s.split("/").pop());return t.arrayBuffer().then(a=>_Xe(a,Number.isFinite(r)&&r>a.byteLength))}),pXe=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",mXe=(e,n)=>fetch(xh(e,n),{method:"HEAD"}).then(t=>{if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=t.headers.get("x-openresearch-presentation");return{size:Number(t.headers.get("content-length"))||0,presentation:pXe(r)?r:"download"}}),gXe=()=>jt("/api/settings/profile"),vXe=()=>jt("/api/settings/lit-sources"),bXe=e=>Xt("/api/settings/lit-sources",e),jx=()=>jt("/api/settings/projects"),_N=(e,n)=>Xt("/api/settings/projects",{githubForNewProjects:e,githubDefaultPromptSeen:n}),xXe=e=>jt(`/api/projects/${e}/git`),yXe=e=>Xt(`/api/projects/${e}/git/init`),wXe=e=>Xt(`/api/projects/${e}/github`),SXe=e=>Xt(`/api/projects/${e}/github/disable`),kXe=()=>jt("/api/settings/telemetry"),CXe=e=>Xt("/api/settings/telemetry",{enabled:e}),Z0=e=>e.displayName??gN(e.id),Q0="default";function Hp(e,n){var o,l,c;const t=e==null?void 0:e.models.find(d=>d.id===n),r=(t==null?void 0:t.reasoningLevels)??((o=e==null?void 0:e.options)==null?void 0:o.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,a=s&&r.some(d=>d.id===s)?s:r.some(d=>d.id===Q0)?Q0:((l=e==null?void 0:e.options)==null?void 0:l.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:a}}const Eb="default";function pN(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:Eb,label:f7e(),description:l7e()},...t]:[]}function J0(e,n,t){var a;if(!e)return t??null;if(e.id!=="codex"||((a=e.models.find(o=>o.id===n))==null?void 0:a.serviceTiers)===void 0)return null;const s=pN(e,n);return s.length===0?Eb:t!=null&&s.some(o=>o.id===t)?t:Eb}function mN(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Hp(e,n);return r.length===0?Q0:t&&r.some(a=>a.id===t)?t:s}const ep=(e=!1,n=!1)=>{const t=new URLSearchParams;e&&t.set("refresh","1"),n&&t.set("retry","1");const r=t.size>0?`?${t.toString()}`:"";return jt(`/api/harnesses${r}`).then(s=>s.harnesses)},EXe=()=>jt("/api/skills").then(e=>e.skills),NXe=(e,n)=>jt(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`).then(t=>t.content),zXe=()=>jt("/api/latex-templates").then(e=>e.templates),AXe=e=>Xt("/api/latex-templates",e).then(n=>n.template),TXe=e=>fetch(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n)),jXe=()=>jt("/api/user-skills").then(e=>e.skills),MXe=e=>Xt("/api/user-skills",e).then(n=>n.skill),RXe=e=>fetch(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Oi(n));function gN(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 T0=e=>jt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`).then(n=>n.sessions),DXe=(e,n,t={})=>Xt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),LXe=e=>fetch(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Oi(n)),OXe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),IXe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),BXe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),$Xe=(e,n)=>Bp(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Au=e=>jt(`/api/chat/sessions/${e}/messages`).then(n=>({messages:n.messages,queued:n.queued??[],activeLeafId:n.activeLeafId??null})),HXe=(e,n)=>fetch(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Oi(t)),PXe=(e,n)=>Xt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),FXe=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,Y7=(e,n,t={},r,s,a,o)=>Xt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:a,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:o}),UXe=(e,n,t,r={})=>Xt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),qXe=(e,n,t)=>Xt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),GXe=(e,n)=>Xt(`/api/chat/sessions/${e}/branch`,{leafId:n}),VXe=e=>Xt(`/api/chat/sessions/${e}/interrupt`),WXe=(e,n)=>Xt(`/api/chat/sessions/${e}/respond`,n);function Na(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(N(),{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 tp(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return Woe({value:Vt(n)});const t=Math.floor(n/60);if(t<60)return Uoe({value:Vt(t)});const r=Math.floor(t/60);return r<24?$oe({hours:Vt(r),minutes:Vt(t%60)}):Loe({days:Vt(Math.floor(r/24)),hours:Vt(r%24)})}function Sa(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r[a.id,a]));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 XXe(e,n,t){var o;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,a=(o=t.get(s))==null?void 0:o.filter(l=>l.role===e.role);return a!=null&&a.length?a:[e]}function ZXe(e,n,t,r){const s=e.filter(d=>!r(d.id)),a=new Map(s.map(d=>[d.id,d])),o=new Map;for(const d of s){const _=d.parentId??null,f=o.get(_);f?f.push(d):o.set(_,[d])}const l=new Set(n.map(d=>d.id)),c=new Map;for(const d of t){const _=XXe(d,a,o),f=_.findIndex(m=>l.has(m.id));c.set(d.id,{count:_.length,index:f,prevId:f>0?_[f-1].id:void 0,nextId:f<_.length-1?_[f+1].id:void 0})}return c}function vN(e){return e.toLowerCase().split(/(?::|\.|__)+/)}function bN(e){return vN(e).at(-1)??e.toLowerCase()}function Pp(e){if(!e)return!1;const n=bN(e);return n==="todowrite"||n==="update_plan"}function QXe(e){const n=typeof e=="string"?e.toLowerCase():"";return n==="in_progress"||n==="inprogress"?"in_progress":n==="completed"?"completed":n==="cancelled"?"cancelled":"pending"}function JXe(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const n=Object.fromEntries(Object.entries(e)),t=[n.content,n.step].find(s=>typeof s=="string"&&s.trim()!=="");if(!t)return null;const r=typeof n.activeForm=="string"&&n.activeForm.trim()!==""?n.activeForm.trim():void 0;return{text:t.trim(),status:QXe(n.status),activeText:r}}function xN(e){var s,a;if(e.type!=="tool"||!Pp(e.tool)||((s=e.state)==null?void 0:s.status)==="error")return null;const n=((a=e.state)==null?void 0:a.input)??{},t=[n.todos,n.plan].find(Array.isArray);if(!t)return null;const r=t.map(JXe).filter(o=>o!==null);return r.length===0?null:{items:r,done:r.filter(o=>o.status==="completed").length,total:r.filter(o=>o.status!=="cancelled").length,current:r.find(o=>o.status==="in_progress")??null}}function yN(e){for(let n=e.length-1;n>=0;n--){const t=xN(e[n]);if(t)return{id:e[n].id,list:t}}return null}function wN(e){return e.total>0&&e.done===e.total}function eZe(e){var t;const n=e.at(-1);return(n==null?void 0:n.role)==="assistant"?((t=yN(n.parts))==null?void 0:t.list)??null:null}function np(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 yh(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function SN(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||yh(r)||!np(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"||Pp(r.tool)?null:r.id}return null}function kN(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=SN(n.parts);return t?{messageId:n.id,toolId:t}:null}function tZe(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"||yh(r)))return r.type==="text"&&!!r.text}return!1}const j0=new Map;function nZe(e,n){let t=j0.get(e);return t||(t=new Set,j0.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&j0.delete(e)}}function rZe(e){var n;(n=j0.get(e.runId))==null||n.forEach(t=>t(e))}const Nb=new Set;function Hf(e){return Nb.add(e),()=>{Nb.delete(e)}}function al(e){Nb.forEach(n=>n(e))}const zb=new Set;function sZe(e){return zb.add(e),()=>{zb.delete(e)}}function ol(){zb.forEach(e=>e())}const Ab=new Set;function Dx(e){return Ab.add(e),()=>{Ab.delete(e)}}function X7(e){Ab.forEach(n=>n(e))}const Tb=new Set;function iZe(e){return Tb.add(e),()=>{Tb.delete(e)}}function X1(e){Tb.forEach(n=>n(e))}const jb=new Set;function aZe(e){return jb.add(e),()=>{jb.delete(e)}}function oZe(e){jb.forEach(n=>n(e))}let Mb=!0;const Rb=new Set;function lZe(e){return Rb.add(e),()=>{Rb.delete(e)}}function Z7(){return Mb}function Q7(e){e!==Mb&&(Mb=e,Rb.forEach(n=>n()))}const cZe=8e3,uZe=3e3;function dZe(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,a,o=!1;const l=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(o=!0,s??(s=window.setTimeout(()=>Q7(!1),cZe)),c.readyState===EventSource.CLOSED&&a===void 0&&(a=window.setTimeout(()=>{a=void 0,l()},uZe)))},c.onopen=()=>{var _,f;r||(window.clearTimeout(s),s=void 0,Q7(!0),o&&(al({type:"reconnected"}),ol(),X7({harness:"*",authState:"unknown"}),(f=(_=n.current).onReconnect)==null||f.call(_)),o=!0)};const d=_=>{try{return JSON.parse(_.data)}catch{return null}};c.addEventListener("run.updated",_=>{const f=d(_);f!=null&&f.run&&(ol(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",_=>{const f=d(_);f!=null&&f.experiment&&(ol(),n.current.onExperiment(f.experiment))}),c.addEventListener("project.updated",_=>{const f=d(_);f!=null&&f.project&&(ol(),n.current.onProject(f.project))}),c.addEventListener("files.updated",_=>{var m,g;const f=d(_);f!=null&&f.projectId&&((g=(m=n.current).onArtifacts)==null||g.call(m,f.projectId))}),c.addEventListener("run.log",_=>{const f=d(_);f!=null&&f.runId&&rZe(f)}),c.addEventListener("chat.session",_=>{const f=d(_);f!=null&&f.session&&(ol(),al({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",_=>{const f=d(_);f!=null&&f.sessionId&&(ol(),al({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",_=>{const f=d(_);f!=null&&f.message&&(ol(),al({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",_=>{const f=d(_);f!=null&&f.sessionId&&(ol(),al({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",_=>{const f=d(_);f!=null&&f.sessionId&&f.usage&&al({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",_=>{const f=d(_);f!=null&&f.sessionId&&al({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",_=>{const f=d(_);f!=null&&f.sessionId&&al({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",_=>{const f=d(_);f!=null&&f.harness&&f.authState&&X7(f)}),c.addEventListener("datadir.move.progress",_=>{const f=d(_);f&&X1({type:"progress",...f})}),c.addEventListener("datadir.move.done",_=>{const f=d(_);f&&X1({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",_=>{const f=d(_);f&&X1({type:"error",error:f.error})}),c.addEventListener("update.status",_=>{const f=d(_);f&&oZe(f)})};return l(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(a),t==null||t.close()}},[])}const va=e=>new Intl.NumberFormat(N()).format(e);function fZe(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?U6e():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?L6e({attempt:va(e.attempt),maximum:va(e.maximum),seconds:va(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?j6e({attempt:va(e.attempt),maximum:va(e.maximum)}):typeof e.attempt=="number"&&t!=null?$6e({attempt:va(e.attempt),seconds:va(t)}):typeof e.attempt=="number"?N6e({attempt:va(e.attempt)}):t!=null?W6e({seconds:va(t)}):bE()}function hZe(e,n){if(typeof e!="number")return Z6e();const t=Math.max(0,Math.ceil((e-n)/1e3));return t7e({seconds:va(t)})}function CN(e){return e==="retry"||e==="continue"?e:null}function _Ze(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}function pZe(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function J7(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function mZe(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";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":"alphaxiv"}function Lx(e){const n=[];let t="",r=!1,s=null;const a=()=>{r&&n.push(t),t="",r=!1};for(let o=0;oe.startsWith("demo_"),Nf="chat_demo_nanochat_v1",uN="chat_demo_nanochat_figures_v1",dN="chat_demo_nanochat_literature_v1",Nb="cpu-apple-silicon-pipeline-results.md",kYe="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.";function Li(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}async function Ii(e){if(!e.ok){const n=await e.text().catch(()=>"");let t=n;try{const r=JSON.parse(n);r.error&&(t=r.error)}catch{}throw new Error(t||`HTTP ${e.status}`)}return await e.json()}const Tt=e=>fetch(e).then(n=>Ii(n)),Xt=(e,n)=>fetch(e,{method:"POST",headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(t=>Ii(t)),Up=(e,n)=>fetch(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Ii(t)),CYe=(e,n)=>fetch(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Ii(t)),EYe=()=>Tt("/api/projects").then(e=>e.projects),NYe=()=>Tt("/api/projects/activity").then(e=>e.activity),zYe=()=>Tt("/api/settings/ui-state"),X7=e=>Xt("/api/settings/ui-state",e),AYe=(e,n)=>Xt("/api/onboarding/complete",{...e,...n}),fN=(e="")=>{const n=e?`?path=${encodeURIComponent(e)}`:"";return Tt(`/api/project-path/status${n}`)},TYe=()=>Xt("/api/project-path/pick").then(e=>e.path),jYe=e=>Xt("/api/projects",e),hN=e=>Tt(`/api/papers/search?q=${encodeURIComponent(e)}`).then(n=>n.papers),MYe=()=>Tt("/api/github/account"),RYe=e=>Tt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`),DYe=(e,n)=>Tt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`),zb=e=>Tt(`/api/papers/resolve?id=${encodeURIComponent(e)}`).then(n=>n.paper),LYe=e=>Xt("/api/projects/starter-prompts/prewarm",e),OYe=(e,n,t,r)=>Tt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`),IYe=e=>Xt(`/api/projects/${e}/open`).then(n=>n.project),BYe=e=>fetch(`/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})`)}}),$Ye=e=>Tt(`/api/projects/${e}/experiments`).then(n=>n.experiments),Dx=e=>Tt(`/api/projects/${e}/runs`).then(n=>n.runs),_N=e=>Xt(`/api/runs/${e}/cancel`).then(()=>{}),HYe=(e,n)=>Tt(`/api/runs/${e}/log?offset=${n}`),PYe=e=>Tt(`/api/runs/${e}/diff`),FYe=e=>Tt(`/api/experiments/${e}/diff`),Nc=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),Z7=(e,n,t={})=>Tt(`/api/projects/${e}/file?${Nc(t,new URLSearchParams({path:n}))}`),Q7=(e,n,t={})=>`/api/projects/${e}/file/raw?${Nc(t,new URLSearchParams({path:n}))}`,UYe=e=>Tt(`/api/files/abs?path=${encodeURIComponent(e)}`),qYe=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,GYe=(e,n,t,r={})=>CYe(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId}),VYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),WYe=()=>Tt("/api/latex/engine"),KYe=(e,n,t={})=>Xt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),YYe=()=>Tt("/api/overleaf/settings"),pN=e=>Xt("/api/overleaf/token",{token:e}),XYe=()=>fetch("/api/overleaf/token",{method:"DELETE"}).then(e=>Ii(e)),ZYe=(e,n,t={})=>Tt(`/api/projects/${e}/file/overleaf?${Nc(t,new URLSearchParams({path:n}))}`),QYe=(e,n,t)=>Xt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),JYe=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf?${Nc(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Ii(r)),eXe=(e,n,t={})=>Xt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),tXe=(e,n,t={})=>Tt(`/api/projects/${e}/file/overleaf/status?${Nc(t,new URLSearchParams({path:n}))}`),nXe=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Nc(t,new URLSearchParams({path:n}))}`,Ab=(e,n={})=>{const t=Nc(n).toString();return Tt(`/api/projects/${e}/code-tree${t?`?${t}`:""}`)},mN=e=>Tt(`/api/chat/sessions/${e}/worktree`),qp=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,rXe=()=>Tt("/api/settings/hf"),sXe=e=>Xt("/api/settings/hf",{token:e}),iXe=()=>Tt("/api/update"),aXe=()=>Xt("/api/update/apply"),oXe=e=>Xt("/api/update/auto",{enabled:e}),lXe=(e=!1)=>Xt("/api/update/install-cli",{force:e}),cXe=()=>Tt("/api/settings/k8s"),uXe=e=>Xt("/api/settings/k8s",e),dXe=()=>Tt("/api/settings/modal"),fXe=()=>Xt("/api/settings/modal/provision"),hXe=()=>Tt("/api/settings/env").then(e=>e.vars),gN=(e,n)=>Xt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),_Xe=e=>fetch(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ii(n)).then(n=>n.vars),pXe=()=>Tt("/api/settings/data-dir"),mXe=e=>Xt("/api/settings/data-dir/validate",{path:e}),gXe=e=>Xt("/api/settings/data-dir/move",{path:e}),vXe=()=>Tt("/api/settings/ssh").then(e=>e.hosts),bXe=e=>Tt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`),xXe=()=>Tt("/api/settings/slurm"),yXe=e=>Xt("/api/settings/slurm",e),wXe=()=>Tt("/api/settings/ray"),SXe=e=>Xt("/api/settings/ray",e),kXe=e=>Xt("/api/settings/ray/preflight",{address:e??null}),CXe=e=>Tt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`),EXe=e=>Xt("/api/settings/compute/default",e),NXe=()=>Tt("/api/settings/local"),zXe=()=>Tt("/api/settings/openresearch"),J7=e=>Tt(`/api/projects/${e}/files`),AXe=(e,n)=>fetch(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Ii(t)),wh=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,vN=512e3,TXe=(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}}},bN=(e,n)=>fetch(wh(e,n),{headers:{Range:`bytes=0-${vN-1}`}}).then(t=>{var s;if(t.status===404)return null;if(t.status===416&&t.headers.get("content-range")==="bytes */0")return{content:"",binary:!1,truncated:!1};if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=Number((s=t.headers.get("content-range"))==null?void 0:s.split("/").pop());return t.arrayBuffer().then(a=>TXe(a,Number.isFinite(r)&&r>a.byteLength))}),jXe=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",MXe=(e,n)=>fetch(wh(e,n),{method:"HEAD"}).then(t=>{if(t.status===404)return null;if(!t.ok)throw new Error(`HTTP ${t.status}`);const r=t.headers.get("x-openresearch-presentation");return{size:Number(t.headers.get("content-length"))||0,presentation:jXe(r)?r:"download"}}),RXe=()=>Tt("/api/settings/profile"),DXe=()=>Tt("/api/settings/lit-sources"),LXe=e=>Xt("/api/settings/lit-sources",e),Lx=()=>Tt("/api/settings/projects"),xN=(e,n)=>Xt("/api/settings/projects",{githubForNewProjects:e,githubDefaultPromptSeen:n}),OXe=e=>Tt(`/api/projects/${e}/git`),IXe=e=>Xt(`/api/projects/${e}/git/init`),BXe=e=>Xt(`/api/projects/${e}/github`),$Xe=e=>Xt(`/api/projects/${e}/github/disable`),HXe=()=>Tt("/api/settings/telemetry"),PXe=e=>Xt("/api/settings/telemetry",{enabled:e}),rp=e=>e.displayName??SN(e.id),sp="default";function Gp(e,n){var o,l,c;const t=e==null?void 0:e.models.find(d=>d.id===n),r=(t==null?void 0:t.reasoningLevels)??((o=e==null?void 0:e.options)==null?void 0:o.reasoningLevels)??[],s=t==null?void 0:t.defaultReasoningLevel,a=s&&r.some(d=>d.id===s)?s:r.some(d=>d.id===sp)?sp:((l=e==null?void 0:e.options)==null?void 0:l.defaultReasoningLevel)??((c=r[0])==null?void 0:c.id)??null;return{choices:r,defaultId:a}}const Tb="default";function yN(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:Tb,label:z7e(),description:k7e()},...t]:[]}function ip(e,n,t){var a;if(!e)return t??null;if(e.id!=="codex"||((a=e.models.find(o=>o.id===n))==null?void 0:a.serviceTiers)===void 0)return null;const s=yN(e,n);return s.length===0?Tb:t!=null&&s.some(o=>o.id===t)?t:Tb}function wN(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Gp(e,n);return r.length===0?sp:t&&r.some(a=>a.id===t)?t:s}const ap=(e=!1,n=!1)=>{const t=new URLSearchParams;e&&t.set("refresh","1"),n&&t.set("retry","1");const r=t.size>0?`?${t.toString()}`:"";return Tt(`/api/harnesses${r}`).then(s=>s.harnesses)},FXe=()=>Tt("/api/skills").then(e=>e.skills),UXe=(e,n)=>Tt(`/api/skills/${encodeURIComponent(e)}${n?`?project=${encodeURIComponent(n)}`:""}`).then(t=>t.content),qXe=()=>Tt("/api/latex-templates").then(e=>e.templates),GXe=e=>Xt("/api/latex-templates",e).then(n=>n.template),VXe=e=>fetch(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ii(n)),WXe=()=>Tt("/api/user-skills").then(e=>e.skills),KXe=e=>Xt("/api/user-skills",e).then(n=>n.skill),YXe=e=>fetch(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ii(n));function SN(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 O0=e=>Tt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`).then(n=>n.sessions),XXe=(e,n,t={})=>Xt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),ZXe=e=>fetch(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Ii(n)),QXe=(e,n)=>Up(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),JXe=(e,n)=>Up(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),eZe=(e,n)=>Up(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),tZe=(e,n)=>Up(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),ju=e=>Tt(`/api/chat/sessions/${e}/messages`).then(n=>({messages:n.messages,queued:n.queued??[],activeLeafId:n.activeLeafId??null})),nZe=(e,n)=>fetch(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Ii(t)),rZe=(e,n)=>Xt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),sZe=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,eS=(e,n,t={},r,s,a,o)=>Xt(`/api/chat/sessions/${e}/message`,{text:n,clientTurnId:a,model:t.model,serviceTier:t.serviceTier,permissionMode:t.permissionMode,planMode:t.planMode,reasoningLevel:t.reasoningLevel,images:r,annotations:s,mode:o}),iZe=(e,n,t,r={})=>Xt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),aZe=(e,n,t)=>Xt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),oZe=(e,n)=>Xt(`/api/chat/sessions/${e}/branch`,{leafId:n}),lZe=e=>Xt(`/api/chat/sessions/${e}/interrupt`),cZe=(e,n)=>Xt(`/api/chat/sessions/${e}/respond`,n);function Ea(e){const n=Math.max(0,Math.floor((Date.now()-e)/1e3)),t=new Intl.RelativeTimeFormat(N(),{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 op(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return ile({value:Ft(n)});const t=Math.floor(n/60);if(t<60)return tle({value:Ft(t)});const r=Math.floor(t/60);return r<24?Zoe({hours:Ft(r),minutes:Ft(t%60)}):Woe({days:Ft(Math.floor(r/24)),hours:Ft(r%24)})}function wa(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&r[a.id,a]));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 fZe(e,n,t){var o;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,a=(o=t.get(s))==null?void 0:o.filter(l=>l.role===e.role);return a!=null&&a.length?a:[e]}function hZe(e,n,t,r){const s=e.filter(d=>!r(d.id)),a=new Map(s.map(d=>[d.id,d])),o=new Map;for(const d of s){const _=d.parentId??null,f=o.get(_);f?f.push(d):o.set(_,[d])}const l=new Set(n.map(d=>d.id)),c=new Map;for(const d of t){const _=fZe(d,a,o),f=_.findIndex(m=>l.has(m.id));c.set(d.id,{count:_.length,index:f,prevId:f>0?_[f-1].id:void 0,nextId:f<_.length-1?_[f+1].id:void 0})}return c}function kN(e){return e.toLowerCase().split(/(?::|\.|__)+/)}function Vp(e){return kN(e).at(-1)??e.toLowerCase()}const Bx=new Set(["todowrite","update_plan"]),CN=new Set(["taskcreate","taskupdate","tasklist","taskget"]);function Sh(e){if(!e)return!1;const n=Vp(e);return Bx.has(n)||CN.has(n)}function jb(e){const n=typeof e=="string"?e.toLowerCase():"";return n==="in_progress"||n==="inprogress"?"in_progress":n==="completed"?"completed":n==="cancelled"?"cancelled":n==="pending"?"pending":null}function ml(e){return typeof e=="string"&&e.trim()!==""?e.trim():void 0}function _Ze(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const n=Object.fromEntries(Object.entries(e)),t=ml(n.content)??ml(n.step);return t?{text:t,status:jb(n.status)??"pending",activeText:ml(n.activeForm)}:null}function EN(e){return e.length===0?null:{items:e,done:e.filter(n=>n.status==="completed").length,total:e.filter(n=>n.status!=="cancelled").length,current:e.find(n=>n.status==="in_progress")??null}}function NN(e){var r,s;if(e.type!=="tool"||!e.tool||!Bx.has(Vp(e.tool))||((r=e.state)==null?void 0:r.status)==="error")return null;const n=((s=e.state)==null?void 0:s.input)??{},t=[n.todos,n.plan].find(Array.isArray);return t?EN(t.map(_Ze).filter(a=>a!==null)):null}const pZe=/#(\d+)/,mZe=/^#(\d+)\s+\[([^\]]+)\]\s+(.+?)(?:\s+\([^)]*\))?(?:\s+\[blocked by[^\]]*\])?$/;function gZe(e){return String(e.reduce((n,t)=>Math.max(n,Number(t.id)||0),0)+1)}function vZe(e,n,t){var a,o,l;const r=((a=t.state)==null?void 0:a.input)??{},s=((o=t.state)==null?void 0:o.output)??"";switch(n){case"taskcreate":{const c=ml(r.subject)??ml(r.description);if(!c)return e;const d=((l=pZe.exec(s))==null?void 0:l[1])??gZe(e),_={id:d,text:c,status:"pending",activeText:ml(r.activeForm)};return[...e.filter(f=>f.id!==d),_]}case"taskupdate":{const c=typeof r.taskId=="string"||typeof r.taskId=="number"?String(r.taskId):null;return c?typeof r.status=="string"&&r.status.toLowerCase()==="deleted"?e.filter(d=>d.id!==c):e.map(d=>d.id===c?{...d,status:jb(r.status)??d.status,text:ml(r.subject)??d.text,activeText:ml(r.activeForm)??d.activeText}:d):e}case"tasklist":{if(/^No tasks found/i.test(s.trim()))return[];const c=s.split(` +`).flatMap(d=>{const _=mZe.exec(d.trim()),f=_?jb(_[2]):null;if(!_||!f)return[];const m=e.find(g=>g.id===_[1]);return[{id:_[1],text:_[3],status:f,activeText:m==null?void 0:m.activeText}]});return c.length>0?c:e}default:return e}}function zN(e,n){var s;let t=(n==null?void 0:n.items)??[],r=!1;for(const a of e){if(a.type!=="tool"||!a.tool||((s=a.state)==null?void 0:s.status)==="error")continue;const o=Vp(a.tool);if(Bx.has(o)){const l=NN(a);l&&(t=l.items),r=r||l!==null}else CN.has(o)&&(t=vZe(t,o,a),r=!0)}return r?EN(t):n}function AN(e,n){var t;for(let r=e.length-1;r>=0;r--){const s=e[r];if(s.type!=="tool"||!Sh(s.tool)||((t=s.state)==null?void 0:t.status)==="error")continue;const a=zN(e,n);return a?{id:s.id,list:a}:null}return null}function TN(e){return e.total>0&&e.done===e.total}function jN(e){const n=new Map;let t=null;for(const r of e){if(r.role!=="assistant")continue;const s=zN(r.parts,t);s!==t&&n.set(r.id,t),t=s}return n}function bZe(e){var t;const n=e.at(-1);return(n==null?void 0:n.role)!=="assistant"?null:((t=AN(n.parts,jN(e).get(n.id)??null))==null?void 0:t.list)??null}function Pf(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 fd(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function MN(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||fd(r)||!Pf(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"||Sh(r.tool)?null:r.id}return null}function RN(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=MN(n.parts);return t?{messageId:n.id,toolId:t}:null}function xZe(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"||fd(r)))return r.type==="text"&&!!r.text}return!1}const I0=new Map;function yZe(e,n){let t=I0.get(e);return t||(t=new Set,I0.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&I0.delete(e)}}function wZe(e){var n;(n=I0.get(e.runId))==null||n.forEach(t=>t(e))}const Mb=new Set;function Ff(e){return Mb.add(e),()=>{Mb.delete(e)}}function ol(e){Mb.forEach(n=>n(e))}const Rb=new Set;function SZe(e){return Rb.add(e),()=>{Rb.delete(e)}}function ll(){Rb.forEach(e=>e())}const Db=new Set;function $x(e){return Db.add(e),()=>{Db.delete(e)}}function tS(e){Db.forEach(n=>n(e))}const Lb=new Set;function kZe(e){return Lb.add(e),()=>{Lb.delete(e)}}function ev(e){Lb.forEach(n=>n(e))}const Ob=new Set;function CZe(e){return Ob.add(e),()=>{Ob.delete(e)}}function EZe(e){Ob.forEach(n=>n(e))}let Ib=!0;const Bb=new Set;function NZe(e){return Bb.add(e),()=>{Bb.delete(e)}}function nS(){return Ib}function rS(e){e!==Ib&&(Ib=e,Bb.forEach(n=>n()))}const zZe=8e3,AZe=3e3;function TZe(e){const n=M.useRef(e);n.current=e,M.useEffect(()=>{let t=null,r=!1,s,a,o=!1;const l=()=>{t==null||t.close();const c=new EventSource("/api/events");t=c,c.onerror=()=>{r||(o=!0,s??(s=window.setTimeout(()=>rS(!1),zZe)),c.readyState===EventSource.CLOSED&&a===void 0&&(a=window.setTimeout(()=>{a=void 0,l()},AZe)))},c.onopen=()=>{var _,f;r||(window.clearTimeout(s),s=void 0,rS(!0),o&&(ol({type:"reconnected"}),ll(),tS({harness:"*",authState:"unknown"}),(f=(_=n.current).onReconnect)==null||f.call(_)),o=!0)};const d=_=>{try{return JSON.parse(_.data)}catch{return null}};c.addEventListener("run.updated",_=>{const f=d(_);f!=null&&f.run&&(ll(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",_=>{const f=d(_);f!=null&&f.experiment&&(ll(),n.current.onExperiment(f.experiment))}),c.addEventListener("project.updated",_=>{const f=d(_);f!=null&&f.project&&(ll(),n.current.onProject(f.project))}),c.addEventListener("files.updated",_=>{var m,g;const f=d(_);f!=null&&f.projectId&&((g=(m=n.current).onArtifacts)==null||g.call(m,f.projectId))}),c.addEventListener("run.log",_=>{const f=d(_);f!=null&&f.runId&&wZe(f)}),c.addEventListener("chat.session",_=>{const f=d(_);f!=null&&f.session&&(ll(),ol({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",_=>{const f=d(_);f!=null&&f.sessionId&&(ll(),ol({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",_=>{const f=d(_);f!=null&&f.message&&(ll(),ol({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",_=>{const f=d(_);f!=null&&f.sessionId&&(ll(),ol({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",_=>{const f=d(_);f!=null&&f.sessionId&&f.usage&&ol({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",_=>{const f=d(_);f!=null&&f.sessionId&&ol({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",_=>{const f=d(_);f!=null&&f.sessionId&&ol({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",_=>{const f=d(_);f!=null&&f.harness&&f.authState&&tS(f)}),c.addEventListener("datadir.move.progress",_=>{const f=d(_);f&&ev({type:"progress",...f})}),c.addEventListener("datadir.move.done",_=>{const f=d(_);f&&ev({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",_=>{const f=d(_);f&&ev({type:"error",error:f.error})}),c.addEventListener("update.status",_=>{const f=d(_);f&&EZe(f)})};return l(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(a),t==null||t.close()}},[])}const ga=e=>new Intl.NumberFormat(N()).format(e);function jZe(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?i7e():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?Z6e({attempt:ga(e.attempt),maximum:ga(e.maximum),seconds:ga(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?W6e({attempt:ga(e.attempt),maximum:ga(e.maximum)}):typeof e.attempt=="number"&&t!=null?t7e({attempt:ga(e.attempt),seconds:ga(t)}):typeof e.attempt=="number"?U6e({attempt:ga(e.attempt)}):t!=null?c7e({seconds:ga(t)}):CE()}function MZe(e,n){if(typeof e!="number")return h7e();const t=Math.max(0,Math.ceil((e-n)/1e3));return g7e({seconds:ga(t)})}function DN(e){return e==="retry"||e==="continue"?e:null}function RZe(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}function DZe(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function sS(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"?e:void 0}function LZe(e){const n=e.trim(),t=n.toLowerCase();if(t.includes("biorxiv.org"))return"biorxiv";if(t.includes("openalex.org"))return"openalex";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":"alphaxiv"}function Hx(e){const n=[];let t="",r=!1,s=null;const a=()=>{r&&n.push(t),t="",r=!1};for(let o=0;o"||l==="&")break;/\s/.test(l)?a():(t+=l,r=!0)}return a(),n}function gZe(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=Lx(e);if(t.length===1)return t[0]}return e}function vZe(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 Ku(e){return vZe(typeof e=="string"?Lx(e):e)}function bZe(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 xZe(e,n){const t=Ku(e);return t===null?!1:n.split("\\s+").every((s,a)=>t[a]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[a]))}function yZe(e){var c;const n=Ku(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],a=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let d=1;d +`&&(t+=c,r=!0);continue}if(s){l===s?s=null:t+=l,r=!0;continue}if(l==='"'||l==="'"){s=l,r=!0;continue}if(l==="|"||l===";"||l===">"||l==="&")break;/\s/.test(l)?a():(t+=l,r=!0)}return a(),n}function OZe(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=Hx(e);if(t.length===1)return t[0]}return e}function IZe(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 Xu(e){return IZe(typeof e=="string"?Hx(e):e)}function BZe(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 $Ze(e,n){const t=Xu(e);return t===null?!1:n.split("\\s+").every((s,a)=>t[a]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[a]))}function HZe(e){var c;const n=Xu(e);if(!n)return null;const t=n[0];if(t!=="paper"&&t!=="discover")return null;let r;const s=[],a=new Set(["--limit","--published-after","--published-before","--prioritize"]);for(let d=1;d]*\bpath="([^"]*)"[^>]*\/?>/g,"$2").replace(/<(file|run)\b[^>]*\/?>/g,"").replace(/^\s*(?:#+|[-*]|\d+[.)])\s+/,"").replace(/\*\*|__|[`#]+/g,"").replace(/\s+/g," ").trim().split(new RegExp("(?<=[a-z]{3}[.!?])\\s+(?=\\S)","i"));let r=t[0]??"";return r.lengthiS?`${r.slice(0,iS-1).trimEnd()}…`:r}function UZe(e){const n=[];for(const r of e){if(fd(r)||!Pf(r))continue;if(r.type==="text"){const a=FZe(r.text??"");a&&n.push({id:r.id,label:a,toolParts:[],done:!0});continue}if(r.type!=="tool"||Sh(r.tool))continue;const s=n.at(-1);s?s.toolParts.push(r):n.push({id:r.id,label:"",toolParts:[r],done:!0})}const t=n.at(-1);return t&&(t.done=!1),n}const qZe=` -`,SZe='',kZe=` +`,GZe='',VZe=` -`,EN={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv"},CZe={alphaxiv:wZe,openalex:kZe,biorxiv:SZe};function NN({source:e,size:n=16,decorative:t=!1,className:r=""}){return h.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":EN[e]},dangerouslySetInnerHTML:{__html:CZe[e]}})}function EZe(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 NZe(e,n){const t=n.trim();if(e==="alphaxiv"){const a=(t.split(/[?#]/)[0].split("/").pop()||t).replace(/\.(pdf|md)$/i,"");return`https://www.alphaxiv.org/abs/${encodeURIComponent(a)}`}const r=EZe(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 zZe=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),zN=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),rp="-",eS=[],TZe="arbitrary..",jZe=e=>{const n=RZe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return MZe(o);const l=o.split(rp),c=l[0]===""&&l.length>1?1:0;return AN(l,c,n)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=r[o],d=t[o];return c?d?zZe(d,c):c:d||eS}return t[o]||eS}}},AN=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=AN(e,n+1,a);if(d)return d}const o=t.validators;if(o===null)return;const l=n===0?e.join(rp):e.slice(n).join(rp),c=o.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?TZe+r:void 0})(),RZe=e=>{const{theme:n,classGroups:t}=e;return DZe(t,n)},DZe=(e,n)=>{const t=zN();for(const r in e){const s=e[r];Ox(s,t,r,n)}return t},Ox=(e,n,t,r)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){OZe(e,n,t);return}if(typeof e=="function"){IZe(e,n,t,r);return}BZe(e,n,t,r)},OZe=(e,n,t)=>{const r=e===""?n:TN(n,e);r.classGroupId=t},IZe=(e,n,t,r)=>{if($Ze(e)){Ox(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(AZe(t,e))},BZe=(e,n,t,r)=>{const s=Object.entries(e),a=s.length;for(let o=0;o{let t=e;const r=n.split(rp),s=r.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,HZe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(a,o)=>{t[a]=o,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let o=t[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return s(a,o),o},set(a,o){a in t?t[a]=o:s(a,o)}}},Db="!",tS=":",PZe=[],nS=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),FZe=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const a=[];let o=0,l=0,c=0,d;const _=s.length;for(let k=0;k<_;k++){const b=s[k];if(o===0&&l===0){if(b===tS){a.push(s.slice(c,k)),c=k+1;continue}if(b==="/"){d=k;continue}}b==="["?o++:b==="]"?o--:b==="("?l++:b===")"&&l--}const f=a.length===0?s:s.slice(c);let m=f,g=!1;f.endsWith(Db)?(m=f.slice(0,-1),g=!0):f.startsWith(Db)&&(m=f.slice(1),g=!0);const S=d&&d>c?d-c:void 0;return nS(a,g,m,S)};if(n){const s=n+tS,a=r;r=o=>o.startsWith(s)?a(o.slice(s.length)):nS(PZe,!1,o,void 0,!0)}if(t){const s=r;r=a=>t({className:a,parseClassName:s})}return r},UZe=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let a=0;a0&&(s.sort(),r.push(...s),s=[]),r.push(o)):s.push(o)}return s.length>0&&(s.sort(),r.push(...s)),r}},qZe=e=>({cache:HZe(e.cacheSize),parseClassName:FZe(e),sortModifiers:UZe(e),postfixLookupClassGroupIds:GZe(e),...jZe(e)}),GZe=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:o}=n,l=[],c=e.trim().split(VZe);let d="";for(let _=c.length-1;_>=0;_-=1){const f=c[_],{isExternal:m,modifiers:g,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:b}=t(f);if(m){d=f+(d.length>0?" "+d:d);continue}let v=!!b,x;if(v){const j=k.substring(0,b);x=r(j);const T=x&&o[x]?r(k):void 0;T&&T!==x&&(x=T,v=!1)}else x=r(k);if(!x){if(!v){d=f+(d.length>0?" "+d:d);continue}if(x=r(k),!x){d=f+(d.length>0?" "+d:d);continue}v=!1}const y=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=S?y+Db:y,A=C+x;if(l.indexOf(A)>-1)continue;l.push(A);const E=s(x,v);for(let j=0;j0?" "+d:d)}return d},KZe=(...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,a;const o=c=>{const d=n.reduce((_,f)=>f(_),e());return t=qZe(d),r=t.cache.get,s=t.cache.set,a=l,l(c)},l=c=>{const d=r(c);if(d)return d;const _=WZe(c,t);return s(c,_),_};return a=o,(...c)=>a(KZe(...c))},XZe=[],Pr=e=>{const n=t=>t[e]||XZe;return n.isThemeGetter=!0,n},MN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,RN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ZZe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,QZe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JZe=/\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$/,eQe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tQe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nQe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ll=e=>ZZe.test(e),Qt=e=>!!e&&!Number.isNaN(Number(e)),pa=e=>!!e&&Number.isInteger(Number(e)),Z1=e=>e.endsWith("%")&&Qt(e.slice(0,-1)),uo=e=>QZe.test(e),DN=()=>!0,rQe=e=>JZe.test(e)&&!eQe.test(e),Ix=()=>!1,sQe=e=>tQe.test(e),iQe=e=>nQe.test(e),aQe=e=>!ot(e)&&!lt(e),oQe=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)),lQe=e=>zl(e,IN,Ix),ot=e=>MN.test(e),Ql=e=>zl(e,BN,rQe),rS=e=>zl(e,mQe,Qt),cQe=e=>zl(e,HN,DN),uQe=e=>zl(e,$N,Ix),sS=e=>zl(e,LN,Ix),dQe=e=>zl(e,ON,iQe),Y_=e=>zl(e,PN,sQe),lt=e=>RN.test(e),cf=e=>Nc(e,BN),fQe=e=>Nc(e,$N),iS=e=>Nc(e,LN),hQe=e=>Nc(e,IN),_Qe=e=>Nc(e,ON),X_=e=>Nc(e,PN,!0),pQe=e=>Nc(e,HN,!0),zl=(e,n,t)=>{const r=MN.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Nc=(e,n,t=!1)=>{const r=RN.exec(e);return r?r[1]?n(r[1]):t:!1},LN=e=>e==="position"||e==="percentage",ON=e=>e==="image"||e==="url",IN=e=>e==="length"||e==="size"||e==="bg-size",BN=e=>e==="length",mQe=e=>e==="number",$N=e=>e==="family-name",HN=e=>e==="number"||e==="weight",PN=e=>e==="shadow",gQe=()=>{const e=Pr("color"),n=Pr("font"),t=Pr("text"),r=Pr("font-weight"),s=Pr("tracking"),a=Pr("leading"),o=Pr("breakpoint"),l=Pr("container"),c=Pr("spacing"),d=Pr("radius"),_=Pr("shadow"),f=Pr("inset-shadow"),m=Pr("text-shadow"),g=Pr("drop-shadow"),S=Pr("blur"),k=Pr("perspective"),b=Pr("aspect"),v=Pr("ease"),x=Pr("animate"),y=()=>["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"],A=()=>[...C(),lt,ot],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],T=()=>[lt,ot,c],D=()=>[ll,"full","auto",...T()],I=()=>[pa,"none","subgrid",lt,ot],P=()=>["auto",{span:["full",pa,lt,ot]},pa,lt,ot],H=()=>[pa,"auto",lt,ot],F=()=>["auto","min","max","fr",lt,ot],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...T()],Z=()=>[ll,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],J=()=>[ll,"screen","full","dvw","lvw","svw","min","max","fit",...T()],B=()=>[ll,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],L=()=>[e,lt,ot],$=()=>[...C(),iS,sS,{position:[lt,ot]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",hQe,lQe,{size:[lt,ot]}],re=()=>[Z1,cf,Ql],oe=()=>["","none","full",d,lt,ot],he=()=>["",Qt,cf,Ql],ie=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],te=()=>[Qt,Z1,iS,sS],le=()=>["","none",S,lt,ot],ge=()=>["none",Qt,lt,ot],ue=()=>["none",Qt,lt,ot],Ce=()=>[Qt,lt,ot],Ee=()=>[ll,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[uo],breakpoint:[uo],color:[DN],container:[uo],"drop-shadow":[uo],ease:["in","out","in-out"],font:[aQe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[uo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[uo],shadow:[uo],spacing:["px",Qt],text:[uo],"text-shadow":[uo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ll,ot,lt,b]}],container:["container"],"container-type":[{"@container":["","normal","size",lt,ot]}],"container-named":[oQe],columns:[{columns:[Qt,ot,lt,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:A()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[pa,"auto",lt,ot]}],basis:[{basis:[ll,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qt,ll,"auto","initial","none",ot]}],grow:[{grow:["",Qt,lt,ot]}],shrink:[{shrink:["",Qt,lt,ot]}],order:[{order:[pa,"first","last","none",lt,ot]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"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",...B()]}],"min-block-size":[{"min-block":["auto",...B()]}],"max-block-size":[{"max-block":["none",...B()]}],w:[{w:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...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,cf,Ql]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,pQe,cQe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Z1,ot]}],"font-family":[{font:[fQe,uQe,n]}],"font-features":[{"font-features":[ot]}],"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,lt,ot]}],"line-clamp":[{"line-clamp":[Qt,"none",lt,rS]}],leading:[{leading:[a,...T()]}],"list-image":[{"list-image":["none",lt,ot]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",lt,ot]}],"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:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qt,"from-font","auto",lt,Ql]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Qt,"auto",lt,ot]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[pa,lt,ot]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",lt,ot]}],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",lt,ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:$()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pa,lt,ot],radial:["",lt,ot],conic:[pa,lt,ot]},_Qe,dQe]}],"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:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"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:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qt,lt,ot]}],"outline-w":[{outline:["",Qt,cf,Ql]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,X_,Y_]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,X_,Y_]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Qt,Ql]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,X_,Y_]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Qt,lt,ot]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[Qt]}],"mask-image-linear-from-pos":[{"mask-linear-from":te()}],"mask-image-linear-to-pos":[{"mask-linear-to":te()}],"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":te()}],"mask-image-t-to-pos":[{"mask-t-to":te()}],"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":te()}],"mask-image-r-to-pos":[{"mask-r-to":te()}],"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":te()}],"mask-image-b-to-pos":[{"mask-b-to":te()}],"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":te()}],"mask-image-l-to-pos":[{"mask-l-to":te()}],"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":te()}],"mask-image-x-to-pos":[{"mask-x-to":te()}],"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":te()}],"mask-image-y-to-pos":[{"mask-y-to":te()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[lt,ot]}],"mask-image-radial-from-pos":[{"mask-radial-from":te()}],"mask-image-radial-to-pos":[{"mask-radial-to":te()}],"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":[Qt]}],"mask-image-conic-from-pos":[{"mask-conic-from":te()}],"mask-image-conic-to-pos":[{"mask-conic-to":te()}],"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:$()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",lt,ot]}],filter:[{filter:["","none",lt,ot]}],blur:[{blur:le()}],brightness:[{brightness:[Qt,lt,ot]}],contrast:[{contrast:[Qt,lt,ot]}],"drop-shadow":[{"drop-shadow":["","none",g,X_,Y_]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Qt,lt,ot]}],"hue-rotate":[{"hue-rotate":[Qt,lt,ot]}],invert:[{invert:["",Qt,lt,ot]}],saturate:[{saturate:[Qt,lt,ot]}],sepia:[{sepia:["",Qt,lt,ot]}],"backdrop-filter":[{"backdrop-filter":["","none",lt,ot]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Qt,lt,ot]}],"backdrop-contrast":[{"backdrop-contrast":[Qt,lt,ot]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qt,lt,ot]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qt,lt,ot]}],"backdrop-invert":[{"backdrop-invert":["",Qt,lt,ot]}],"backdrop-opacity":[{"backdrop-opacity":[Qt,lt,ot]}],"backdrop-saturate":[{"backdrop-saturate":[Qt,lt,ot]}],"backdrop-sepia":[{"backdrop-sepia":["",Qt,lt,ot]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",lt,ot]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qt,"initial",lt,ot]}],ease:[{ease:["linear","initial",v,lt,ot]}],delay:[{delay:[Qt,lt,ot]}],animate:[{animate:["none",x,lt,ot]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,lt,ot]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[lt,ot,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],zoom:[{zoom:[pa,lt,ot]}],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",lt,ot]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",lt,ot]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Qt,cf,Ql,rS]}],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"]}},vQe=YZe(gQe);function ss(...e){return vQe(...e)}const bQe={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 Dt({variant:e="default",className:n,...t}){return h.jsx("span",{className:ss("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",bQe[e],n),...t})}const xQe=["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(" "),yQe={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"},wQe={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 FN(e,n,t,r){return ss(xQe,yQe[e],wQe[n],t&&"active",r)}function Qe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("button",{className:FN(n,t,e,r),...s})}function Lb({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("a",{className:FN(n,t,e,r),...s})}const SQe=["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","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),kQe={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"},CQe={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function UN(e,n,t,r){return ss(SQe,kQe[e],CQe[n],t&&"active",r)}const Jt=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...a},o){return h.jsx("button",{ref:o,className:UN(r,t,n,s),...a})});function Fp({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return h.jsx("a",{className:UN(t,n,e,r),...s})}const EQe={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 Ob({variant:e="default",className:n,...t}){return h.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",EQe[e],n),...t})}function Yr({active:e=!1,danger:n=!1,className:t,...r}){return h.jsx("button",{className:ss("model-item flex min-h-8 w-full items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-start text-sm 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",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",t),...r})}function dn({className:e,...n}){return h.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 vr({className:e,...n}){return h.jsx("div",{className:ss("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const NQe={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 Bx({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return h.jsxs("span",{className:ss("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[h.jsx("span",{className:ss("h-[7px] w-[7px] shrink-0 rounded-full bg-current",NQe[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const zQe=["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 qN(e,n){return ss(zQe,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function $x({checked:e=!1,className:n,children:t,...r}){return h.jsx("button",{role:"switch","aria-checked":e,className:qN(e,n),...r,children:t??h.jsx("span",{})})}function AQe({checked:e=!1,className:n,...t}){return h.jsx("span",{className:qN(e,n),...t,children:h.jsx("span",{})})}var Up=q9();const TQe=vh(Up);function jQe(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 MQe=e=>{switch(e){case"success":return LQe;case"info":return IQe;case"warning":return OQe;case"error":return BQe;default:return null}},RQe=Array(12).fill(0),DQe=({visible:e,className:n})=>Ze.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ze.createElement("div",{className:"sonner-spinner"},RQe.map((t,r)=>Ze.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),LQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),OQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),IQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),BQe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),$Qe=Ze.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"},Ze.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ze.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),HQe=()=>{const[e,n]=Ze.useState(document.hidden);return Ze.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let PQe=1;const FQe=100,aS=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:PQe++};class UQe{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-FQe;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=aS(n),a=this.pendingDismissals.get(s);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const o=this.dismissedToasts.has(s),l=n.dismissible===void 0?!0:n.dismissible;return o&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(o?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...n,id:s,title:t}),{...d,...n,id:s,dismissible:l,title:t}):d):this.addToast({title:t,...r,dismissible:l,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 a=r!==void 0,o;const l=s.then(async d=>{if(o=["resolve",d],Ze.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(GQe(d)&&!d.ok){a=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(d instanceof Error){a=!1;const f=typeof t.error=="function"?await t.error(d):t.error,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(t.success!==void 0){a=!1;const f=typeof t.success=="function"?await t.success(d):t.success,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:m,...S})}}).catch(async d=>{if(o=["reject",d],t.error!==void 0){a=!1;const _=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description,g=typeof _=="object"&&!Ze.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:f,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,_)=>l.then(()=>o[0]==="reject"?_(o[1]):d(o[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=aS(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 qs=new UQe,qQe=(e,n)=>qs.message(e,n),GQe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",VQe=qQe,WQe=()=>qs.toasts,KQe=()=>qs.getActiveToasts(),YQe=Object.assign(VQe,{success:qs.success,info:qs.info,warning:qs.warning,error:qs.error,custom:qs.custom,message:qs.message,promise:qs.promise,dismiss:qs.dismiss,loading:qs.loading},{getHistory:WQe,getToasts:KQe});jQe("[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 Z_(e){return e.label!==void 0}const XQe=3,ZQe="24px",QQe="16px",oS=4e3,JQe=356,eJe=14,tJe=45,nJe=200;function ma(...e){return e.filter(Boolean).join(" ")}function rJe(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const sJe=e=>{var n,t,r,s,a,o,l,c,d;const{invert:_,toast:f,unstyled:m,interacting:g,setHeights:S,visibleToasts:k,heights:b,index:v,toasts:x,expanded:y,removeToast:C,defaultRichColors:A,closeButton:E,style:j,cancelButtonStyle:T,actionButtonStyle:D,className:I="",descriptionClassName:P="",duration:H,position:F,gap:V,expandByDefault:X,classNames:W,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[B,L]=Ze.useState(null),[$,K]=Ze.useState(null),[G,re]=Ze.useState(!1),[oe,he]=Ze.useState(!1),[ie,q]=Ze.useState(!1),[te,le]=Ze.useState(!1),[ge,ue]=Ze.useState(!1),[Ce,Ee]=Ze.useState(0),[Le,Pe]=Ze.useState(0),Ve=Ze.useRef(f.duration||H||oS),ft=Ze.useRef(null),Be=Ze.useRef(null),wt=v===0,At=v+1<=k,vt=f.type,Ot=vt??"default",St=f.dismissible!==!1,kt=f.className||"",xe=f.descriptionClassName||"",je=Ze.useMemo(()=>b.findIndex(rt=>rt.toastId===f.id)||0,[b,f.id]),We=Ze.useMemo(()=>{var rt;return(rt=f.closeButton)!=null?rt:E},[f.closeButton,E]),st=Ze.useMemo(()=>f.duration||H||oS,[f.duration,H]),nt=Ze.useRef(0),Ht=Ze.useRef(0),bt=Ze.useRef(0),nn=Ze.useRef(null),[Wt,pn]=F.split("-"),Lt=Ze.useMemo(()=>b.reduce((rt,Ie,it)=>it>=je?rt:rt+Ie.height,0),[b,je]),En=HQe(),Ft=Ze.useMemo(()=>{var rt;return(rt=e.swipeDirections)!=null?rt:rJe(F)},[e.swipeDirections,F]),br=f.invert||_,mn=vt==="loading";Ht.current=Ze.useMemo(()=>je*V+Lt,[je,Lt]),Ze.useEffect(()=>{Ve.current=st},[st]),Ze.useEffect(()=>{re(!0)},[]),Ze.useEffect(()=>{const rt=Be.current;if(rt){const Ie=rt.getBoundingClientRect().height;return Pe(Ie),S(it=>[{toastId:f.id,height:Ie,position:f.position},...it]),()=>S(it=>it.filter(Ut=>Ut.toastId!==f.id))}},[S,f.id]),Ze.useLayoutEffect(()=>{if(!G)return;const rt=Be.current,Ie=rt.style.height;rt.style.height="auto";const it=rt.getBoundingClientRect().height;rt.style.height=Ie,Pe(it),S(Ut=>Ut.find(Mt=>Mt.toastId===f.id)?Ut.map(Mt=>Mt.toastId===f.id?{...Mt,height:it}:Mt):[{toastId:f.id,height:it,position:f.position},...Ut])},[G,f.title,f.description,S,f.id,f.jsx,f.action,f.cancel]);const Ye=Ze.useCallback(()=>{he(!0),Ee(Ht.current),S(rt=>rt.filter(Ie=>Ie.toastId!==f.id)),setTimeout(()=>{C(f)},nJe)},[f,C,S,Ht]);Ze.useEffect(()=>{if(f.promise&&vt==="loading"||f.duration===1/0||f.type==="loading")return;let rt;return y||g||En?(()=>{if(bt.current{Ve.current!==1/0&&(nt.current=new Date().getTime(),rt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Ye()},Ve.current))})(),()=>clearTimeout(rt)},[y,g,f,vt,En,Ye]),Ze.useEffect(()=>{f.delete&&(Ye(),f.onDismiss==null||f.onDismiss.call(f,f))},[Ye,f.delete]);function xt(){var rt;if(Z!=null&&Z.loading){var Ie;return Ze.createElement("div",{className:ma(W==null?void 0:W.loader,f==null||(Ie=f.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":vt==="loading"},Z.loading)}return Ze.createElement(DQe,{className:ma(W==null?void 0:W.loader,f==null||(rt=f.classNames)==null?void 0:rt.loader),visible:vt==="loading"})}const Wn=f.icon||(Z==null?void 0:Z[vt])||MQe(vt);var Kn,Nt;return Ze.createElement("li",{tabIndex:0,ref:Be,className:ma(I,kt,W==null?void 0:W.toast,f==null||(n=f.classNames)==null?void 0:n.toast,W==null?void 0:W[Ot],f==null||(t=f.classNames)==null?void 0:t[Ot]),"data-sonner-toast":"","data-rich-colors":(Kn=f.richColors)!=null?Kn:A,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":G,"data-promise":!!f.promise,"data-swiped":ge,"data-removed":oe,"data-visible":At,"data-y-position":Wt,"data-x-position":pn,"data-index":v,"data-front":wt,"data-swiping":ie,"data-dismissible":St,"data-type":vt,"data-invert":br,"data-swipe-out":te,"data-swipe-direction":$,"data-expanded":!!(y||X&&G),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${oe?Ce:Ht.current}px`,"--initial-height":X?"auto":`${Le}px`,...j,...f.style},onDragEnd:()=>{q(!1),L(null),nn.current=null},onPointerDown:rt=>{rt.button!==2&&(mn||!St||(ft.current=new Date,Ee(Ht.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(q(!0),nn.current={x:rt.clientX,y:rt.clientY})))},onPointerUp:()=>{var rt,Ie,it;if(te||!St)return;nn.current=null;const Ut=Number(((rt=Be.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((Ie=Be.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mt=new Date().getTime()-((it=ft.current)==null?void 0:it.getTime()),Ln=B==="x"?Ut:en,_r=Math.abs(Ln)/Mt;if((B==="x"?Ft.includes(Ut>0?"right":"left"):Ft.includes(en>0?"bottom":"top"))&&(Math.abs(Ln)>=tJe||_r>.11)){Ee(Ht.current),f.onDismiss==null||f.onDismiss.call(f,f),K(B==="x"?Ut>0?"right":"left":en>0?"down":"up"),Ye(),le(!0);return}else{var or,xr;(or=Be.current)==null||or.style.setProperty("--swipe-amount-x","0px"),(xr=Be.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}ue(!1),q(!1),L(null)},onPointerMove:rt=>{var Ie,it,Ut;if(!nn.current||!St||((Ie=window.getSelection())==null?void 0:Ie.toString().length)>0)return;const Mt=rt.clientY-nn.current.y,Ln=rt.clientX-nn.current.x;!B&&(Math.abs(Ln)>1||Math.abs(Mt)>1)&&L(Math.abs(Ln)>Math.abs(Mt)?"x":"y");let _r={x:0,y:0};const is=or=>1/(1.5+Math.abs(or)/20);if(B==="y"){if(Ft.includes("top")||Ft.includes("bottom"))if(Ft.includes("top")&&Mt<0||Ft.includes("bottom")&&Mt>0)_r.y=Mt;else{const or=Mt*is(Mt);_r.y=Math.abs(or)0)_r.x=Ln;else{const or=Ln*is(Ln);_r.x=Math.abs(or)0||Math.abs(_r.y)>0)&&ue(!0),(it=Be.current)==null||it.style.setProperty("--swipe-amount-x",`${_r.x}px`),(Ut=Be.current)==null||Ut.style.setProperty("--swipe-amount-y",`${_r.y}px`)}},We&&!f.jsx&&vt!=="loading"?Ze.createElement("button",{"aria-label":J,"data-disabled":mn,"data-close-button":!0,onClick:mn||!St?()=>{}:()=>{Ye(),f.onDismiss==null||f.onDismiss.call(f,f)},className:ma(W==null?void 0:W.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Nt=Z==null?void 0:Z.close)!=null?Nt:$Qe):null,(vt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[vt])!==null||f.icon)?Ze.createElement("div",{"data-icon":"",className:ma(W==null?void 0:W.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},vt==="loading"?f.icon||xt():f.promise?xt():null,vt!=="loading"?Wn:null):null,Ze.createElement("div",{"data-content":"",className:ma(W==null?void 0:W.content,f==null||(a=f.classNames)==null?void 0:a.content)},Ze.createElement("div",{"data-title":"",className:ma(W==null?void 0:W.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?Ze.createElement("div",{"data-description":"",className:ma(P,xe,W==null?void 0:W.description,f==null||(l=f.classNames)==null?void 0:l.description)},typeof f.description=="function"?f.description():f.description):null),Ze.isValidElement(f.cancel)?f.cancel:f.cancel&&Z_(f.cancel)?Ze.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:rt=>{Z_(f.cancel)&&St&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,rt),Ye())},className:ma(W==null?void 0:W.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,Ze.isValidElement(f.action)?f.action:f.action&&Z_(f.action)?Ze.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:rt=>{Z_(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,rt),!rt.defaultPrevented&&Ye())},className:ma(W==null?void 0:W.actionButton,f==null||(d=f.classNames)==null?void 0:d.actionButton)},f.action.label):null)};function lS(){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 iJe(e,n){const t={};return[e,n].forEach((r,s)=>{const a=s===1,o=a?"--mobile-offset":"--offset",l=a?QQe:ZQe;function c(d){["top","right","bottom","left"].forEach(_=>{t[`${o}-${_}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${o}-${d}`]=l:t[`${o}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),t}const aJe=Ze.forwardRef(function(n,t){const{id:r,invert:s,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:_,mobileOffset:f,theme:m="light",richColors:g,duration:S,style:k,visibleToasts:b=XQe,toastOptions:v,dir:x=lS(),gap:y=eJe,icons:C,customAriaLabel:A,containerAriaLabel:E="Notifications"}=n,[j,T]=Ze.useState([]),D=Ze.useMemo(()=>r?j.filter(re=>re.toasterId===r):j.filter(re=>!re.toasterId),[j,r]),I=Ze.useMemo(()=>Array.from(new Set([a].concat(D.filter(re=>re.position).map(re=>re.position)))),[D,a]),[P,H]=Ze.useState([]),[F,V]=Ze.useState(!1),[X,W]=Ze.useState(!1),[Z,J]=Ze.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=Ze.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=Ze.useRef(null),K=Ze.useRef(!1),G=Ze.useCallback(re=>{T(oe=>{var he;return(he=oe.find(ie=>ie.id===re.id))!=null&&he.delete||qs.dismiss(re.id),oe.filter(({id:ie})=>ie!==re.id)})},[]);return Ze.useEffect(()=>qs.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{T(oe=>oe.map(he=>he.id===re.id?{...he,delete:!0}:he))});return}setTimeout(()=>{TQe.flushSync(()=>{T(oe=>{const he=oe.findIndex(ie=>ie.id===re.id);return he!==-1?[...oe.slice(0,he),{...oe[he],...re},...oe.slice(he+1)]:[re,...oe]})})})}),[]),Ze.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="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:oe})=>{J(oe?"dark":"light")})}catch{re.addListener(({matches:he})=>{try{J(he?"dark":"light")}catch(ie){console.error(ie)}})}},[m]),Ze.useEffect(()=>{j.length<=1&&V(!1)},[j]),Ze.useEffect(()=>{const re=oe=>{var he;if(o.length>0&&o.every(te=>oe[te]||oe.code===te)){var q;V(!0),(q=B.current)==null||q.focus()}oe.code==="Escape"&&(document.activeElement===B.current||(he=B.current)!=null&&he.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[o]),Ze.useEffect(()=>{if(B.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,K.current=!1)}},[B.current]),Ze.createElement("section",{ref:t,"aria-label":A??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},I.map((re,oe)=>{var he;const[ie,q]=re.split("-");return D.length?Ze.createElement("ol",{key:re,dir:x==="auto"?lS():x,tabIndex:-1,ref:B,className:d,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":ie,"data-x-position":q,style:{"--front-toast-height":`${((he=P[0])==null?void 0:he.height)||0}px`,"--width":`${JQe}px`,"--gap":`${y}px`,...k,...iJe(_,f)},onBlur:te=>{K.current&&!te.currentTarget.contains(te.relatedTarget)&&(K.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||K.current||(K.current=!0,$.current=te.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{X||V(!1)},onDragEnd:()=>V(!1),onPointerDown:te=>{te.target instanceof HTMLElement&&te.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},D.filter(te=>!te.position&&oe===0||te.position===re).map((te,le)=>{var ge,ue;return Ze.createElement(sJe,{key:te.id,icons:C,index:le,toast:te,defaultRichColors:g,duration:(ge=v==null?void 0:v.duration)!=null?ge:S,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(ue=v==null?void 0:v.closeButton)!=null?ue:c,interacting:X,position:re,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:G,toasts:D.filter(Ce=>Ce.position==te.position),heights:P.filter(Ce=>Ce.position==te.position),setHeights:H,expandByDefault:l,gap:y,expanded:F,swipeDirections:n.swipeDirections})})):null}))}),GN="orx:theme";function oJe(){try{const e=localStorage.getItem(GN);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Pf=oJe();const Ib=new Set;function lJe(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Hx(){document.documentElement.dataset.theme=lJe(Pf)}function cJe(e){Pf=e;try{localStorage.setItem(GN,e)}catch{}Hx();for(const n of Ib)n()}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Pf==="system"&&Hx()});Hx();function uJe(e){return Ib.add(e),()=>Ib.delete(e)}function VN(){return[M.useSyncExternalStore(uJe,()=>Pf,()=>Pf),cJe]}function dJe(e){const[n]=VN();return h.jsx(aJe,{theme:n,...e})}function WN(e,n,t){YQe[n](e,{duration:1/0,position:"top-center",closeButton:!0,...t})}function fJe({content:e,children:n,className:t}){return h.jsxs("span",{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,children:[n,h.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full start-1/2 z-20 mb-1.5 w-max max-w-64 -translate-x-1/2 rounded-sm bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background opacity-0 shadow-control-subtle transition-opacity group-hover:opacity-100 group-focus:opacity-100",children:e})]})}const hJe=["alphaxiv","openalex","biorxiv"];let cS=null;function _Je(){const[e,n]=M.useState(cS),[t,r]=M.useState(!1),s=o=>{cS=o,n(o)};M.useEffect(()=>{vXe().then(s).catch(()=>{})},[]);const a=o=>{!e||t||(r(!0),bXe({...e,[o]:!e[o]}).then(s).catch(()=>{}).finally(()=>r(!1)))};return e?h.jsx("div",{className:"flex flex-col",children:hJe.map(o=>{const l=e[o];return h.jsxs(Yr,{type:"button",role:"switch","aria-checked":l,disabled:t,onClick:()=>a(o),children:[h.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[h.jsx(NN,{source:o,size:16,decorative:!0}),EN[o]]}),h.jsx(AQe,{checked:l,"aria-hidden":"true"})]},o)})}):h.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:S0e()})}function Q1(e,n){if(!e)throw new Error("Assertion Error")}function Jl(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function pJe(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function mJe(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` -`}]}function gJe(e,n){const t=n.value?n.value+` -`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function vJe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function bJe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Ns=Al(/[A-Za-z]/),ps=Al(/[\dA-Za-z]/),xJe=Al(/[#-'*+\--9=?A-Z^-~]/);function sp(e){return e!==null&&(e<32||e===127)}const Bb=Al(/\d/),yJe=Al(/[\dA-Fa-f]/),wJe=Al(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function Bn(e){return e!==null&&(e<0||e===32)}function on(e){return e===-2||e===-1||e===32}const qp=Al(new RegExp("\\p{P}|\\p{S}","u")),vc=Al(/\s/);function Al(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ud(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),s=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+s+1,o=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function SJe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=ud(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function kJe(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 CJe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function KN(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),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function EJe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return KN(e,n);const s={src:ud(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,a),e.applyData(n,a)}function NJe(e,n){const t={src:ud(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 zJe(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 AJe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return KN(e,n);const s={href:ud(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function TJe(e,n){const t={href:ud(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 jJe(e,n,t){const r=e.all(n),s=t?MJe(t):YN(n),a={},o=[];if(typeof n.checked=="boolean"){const _=r[0];let f;_&&_.type==="element"&&_.tagName==="p"?f=_:(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:[]}),a.className=["task-list-item"]}let l=-1;for(;++l{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),IN=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),lp="-",aS=[],QZe="arbitrary..",JZe=e=>{const n=tQe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return eQe(o);const l=o.split(lp),c=l[0]===""&&l.length>1?1:0;return BN(l,c,n)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=r[o],d=t[o];return c?d?XZe(d,c):c:d||aS}return t[o]||aS}}},BN=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],a=t.nextPart.get(s);if(a){const d=BN(e,n+1,a);if(d)return d}const o=t.validators;if(o===null)return;const l=n===0?e.join(lp):e.slice(n).join(lp),c=o.length;for(let d=0;de.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),t=n.indexOf(":"),r=n.slice(0,t);return r?QZe+r:void 0})(),tQe=e=>{const{theme:n,classGroups:t}=e;return nQe(t,n)},nQe=(e,n)=>{const t=IN();for(const r in e){const s=e[r];Px(s,t,r,n)}return t},Px=(e,n,t,r)=>{const s=e.length;for(let a=0;a{if(typeof e=="string"){sQe(e,n,t);return}if(typeof e=="function"){iQe(e,n,t,r);return}aQe(e,n,t,r)},sQe=(e,n,t)=>{const r=e===""?n:$N(n,e);r.classGroupId=t},iQe=(e,n,t,r)=>{if(oQe(e)){Px(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ZZe(t,e))},aQe=(e,n,t,r)=>{const s=Object.entries(e),a=s.length;for(let o=0;o{let t=e;const r=n.split(lp),s=r.length;for(let a=0;a"isThemeGetter"in e&&e.isThemeGetter===!0,lQe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,t=Object.create(null),r=Object.create(null);const s=(a,o)=>{t[a]=o,n++,n>e&&(n=0,r=t,t=Object.create(null))};return{get(a){let o=t[a];if(o!==void 0)return o;if((o=r[a])!==void 0)return s(a,o),o},set(a,o){a in t?t[a]=o:s(a,o)}}},$b="!",oS=":",cQe=[],lS=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),uQe=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const a=[];let o=0,l=0,c=0,d;const _=s.length;for(let k=0;k<_;k++){const b=s[k];if(o===0&&l===0){if(b===oS){a.push(s.slice(c,k)),c=k+1;continue}if(b==="/"){d=k;continue}}b==="["?o++:b==="]"?o--:b==="("?l++:b===")"&&l--}const f=a.length===0?s:s.slice(c);let m=f,g=!1;f.endsWith($b)?(m=f.slice(0,-1),g=!0):f.startsWith($b)&&(m=f.slice(1),g=!0);const S=d&&d>c?d-c:void 0;return lS(a,g,m,S)};if(n){const s=n+oS,a=r;r=o=>o.startsWith(s)?a(o.slice(s.length)):lS(cQe,!1,o,void 0,!0)}if(t){const s=r;r=a=>t({className:a,parseClassName:s})}return r},dQe=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((t,r)=>{n.set(t,1e6+r)}),t=>{const r=[];let s=[];for(let a=0;a0&&(s.sort(),r.push(...s),s=[]),r.push(o)):s.push(o)}return s.length>0&&(s.sort(),r.push(...s)),r}},fQe=e=>({cache:lQe(e.cacheSize),parseClassName:uQe(e),sortModifiers:dQe(e),postfixLookupClassGroupIds:hQe(e),...JZe(e)}),hQe=e=>{const n=Object.create(null),t=e.postfixLookupClassGroups;if(t)for(let r=0;r{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:a,postfixLookupClassGroupIds:o}=n,l=[],c=e.trim().split(_Qe);let d="";for(let _=c.length-1;_>=0;_-=1){const f=c[_],{isExternal:m,modifiers:g,hasImportantModifier:S,baseClassName:k,maybePostfixModifierPosition:b}=t(f);if(m){d=f+(d.length>0?" "+d:d);continue}let v=!!b,x;if(v){const j=k.substring(0,b);x=r(j);const T=x&&o[x]?r(k):void 0;T&&T!==x&&(x=T,v=!1)}else x=r(k);if(!x){if(!v){d=f+(d.length>0?" "+d:d);continue}if(x=r(k),!x){d=f+(d.length>0?" "+d:d);continue}v=!1}const y=g.length===0?"":g.length===1?g[0]:a(g).join(":"),C=S?y+$b:y,A=C+x;if(l.indexOf(A)>-1)continue;l.push(A);const E=s(x,v);for(let j=0;j0?" "+d:d)}return d},mQe=(...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,a;const o=c=>{const d=n.reduce((_,f)=>f(_),e());return t=fQe(d),r=t.cache.get,s=t.cache.set,a=l,l(c)},l=c=>{const d=r(c);if(d)return d;const _=pQe(c,t);return s(c,_),_};return a=o,(...c)=>a(mQe(...c))},vQe=[],Ur=e=>{const n=t=>t[e]||vQe;return n.isThemeGetter=!0,n},PN=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,FN=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bQe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,xQe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yQe=/\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$/,wQe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SQe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kQe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cl=e=>bQe.test(e),Qt=e=>!!e&&!Number.isNaN(Number(e)),_a=e=>!!e&&Number.isInteger(Number(e)),tv=e=>e.endsWith("%")&&Qt(e.slice(0,-1)),co=e=>xQe.test(e),UN=()=>!0,CQe=e=>yQe.test(e)&&!wQe.test(e),Fx=()=>!1,EQe=e=>SQe.test(e),NQe=e=>kQe.test(e),zQe=e=>!ot(e)&&!lt(e),AQe=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)),TQe=e=>Tl(e,VN,Fx),ot=e=>PN.test(e),Jl=e=>Tl(e,WN,CQe),cS=e=>Tl(e,BQe,Qt),jQe=e=>Tl(e,YN,UN),MQe=e=>Tl(e,KN,Fx),uS=e=>Tl(e,qN,Fx),RQe=e=>Tl(e,GN,NQe),t0=e=>Tl(e,XN,EQe),lt=e=>FN.test(e),cf=e=>zc(e,WN),DQe=e=>zc(e,KN),dS=e=>zc(e,qN),LQe=e=>zc(e,VN),OQe=e=>zc(e,GN),n0=e=>zc(e,XN,!0),IQe=e=>zc(e,YN,!0),Tl=(e,n,t)=>{const r=PN.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},zc=(e,n,t=!1)=>{const r=FN.exec(e);return r?r[1]?n(r[1]):t:!1},qN=e=>e==="position"||e==="percentage",GN=e=>e==="image"||e==="url",VN=e=>e==="length"||e==="size"||e==="bg-size",WN=e=>e==="length",BQe=e=>e==="number",KN=e=>e==="family-name",YN=e=>e==="number"||e==="weight",XN=e=>e==="shadow",$Qe=()=>{const e=Ur("color"),n=Ur("font"),t=Ur("text"),r=Ur("font-weight"),s=Ur("tracking"),a=Ur("leading"),o=Ur("breakpoint"),l=Ur("container"),c=Ur("spacing"),d=Ur("radius"),_=Ur("shadow"),f=Ur("inset-shadow"),m=Ur("text-shadow"),g=Ur("drop-shadow"),S=Ur("blur"),k=Ur("perspective"),b=Ur("aspect"),v=Ur("ease"),x=Ur("animate"),y=()=>["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"],A=()=>[...C(),lt,ot],E=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],T=()=>[lt,ot,c],D=()=>[cl,"full","auto",...T()],I=()=>[_a,"none","subgrid",lt,ot],P=()=>["auto",{span:["full",_a,lt,ot]},_a,lt,ot],B=()=>[_a,"auto",lt,ot],F=()=>["auto","min","max","fr",lt,ot],V=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],X=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...T()],Z=()=>[cl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],J=()=>[cl,"screen","full","dvw","lvw","svw","min","max","fit",...T()],$=()=>[cl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],L=()=>[e,lt,ot],H=()=>[...C(),dS,uS,{position:[lt,ot]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",LQe,TQe,{size:[lt,ot]}],ee=()=>[tv,cf,Jl],oe=()=>["","none","full",d,lt,ot],he=()=>["",Qt,cf,Jl],ie=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Qt,tv,dS,uS],le=()=>["","none",S,lt,ot],ge=()=>["none",Qt,lt,ot],ue=()=>["none",Qt,lt,ot],Ce=()=>[Qt,lt,ot],Ee=()=>[cl,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[co],breakpoint:[co],color:[UN],container:[co],"drop-shadow":[co],ease:["in","out","in-out"],font:[zQe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[co],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[co],shadow:[co],spacing:["px",Qt],text:[co],"text-shadow":[co],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",cl,ot,lt,b]}],container:["container"],"container-type":[{"@container":["","normal","size",lt,ot]}],"container-named":[AQe],columns:[{columns:[Qt,ot,lt,l]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:A()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[_a,"auto",lt,ot]}],basis:[{basis:[cl,"full","auto",l,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Qt,cl,"auto","initial","none",ot]}],grow:[{grow:["",Qt,lt,ot]}],shrink:[{shrink:["",Qt,lt,ot]}],order:[{order:[_a,"first","last","none",lt,ot]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:P()}],"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":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...V(),"normal"]}],"justify-items":[{"justify-items":[...X(),"normal"]}],"justify-self":[{"justify-self":["auto",...X()]}],"align-content":[{content:["normal",...V()]}],"align-items":[{items:[...X(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...X(),{baseline:["","last"]}]}],"place-content":[{"place-content":V()}],"place-items":[{"place-items":[...X(),"baseline"]}],"place-self":[{"place-self":["auto",...X()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mbs:[{mbs:W()}],mbe:[{mbe:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"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:[l,"screen",...Z()]}],"min-w":[{"min-w":[l,"screen","none",...Z()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...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,cf,Jl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,IQe,jQe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tv,ot]}],"font-family":[{font:[DQe,MQe,n]}],"font-features":[{"font-features":[ot]}],"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,lt,ot]}],"line-clamp":[{"line-clamp":[Qt,"none",lt,cS]}],leading:[{leading:[a,...T()]}],"list-image":[{"list-image":["none",lt,ot]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",lt,ot]}],"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:[...ie(),"wavy"]}],"text-decoration-thickness":[{decoration:[Qt,"from-font","auto",lt,Jl]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[Qt,"auto",lt,ot]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[_a,lt,ot]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",lt,ot]}],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",lt,ot]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},_a,lt,ot],radial:["",lt,ot],conic:[_a,lt,ot]},OQe,RQe]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:oe()}],"rounded-s":[{"rounded-s":oe()}],"rounded-e":[{"rounded-e":oe()}],"rounded-t":[{"rounded-t":oe()}],"rounded-r":[{"rounded-r":oe()}],"rounded-b":[{"rounded-b":oe()}],"rounded-l":[{"rounded-l":oe()}],"rounded-ss":[{"rounded-ss":oe()}],"rounded-se":[{"rounded-se":oe()}],"rounded-ee":[{"rounded-ee":oe()}],"rounded-es":[{"rounded-es":oe()}],"rounded-tl":[{"rounded-tl":oe()}],"rounded-tr":[{"rounded-tr":oe()}],"rounded-br":[{"rounded-br":oe()}],"rounded-bl":[{"rounded-bl":oe()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ie(),"hidden","none"]}],"divide-style":[{divide:[...ie(),"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:[...ie(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Qt,lt,ot]}],"outline-w":[{outline:["",Qt,cf,Jl]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",_,n0,t0]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,n0,t0]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[Qt,Jl]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",m,n0,t0]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[Qt,lt,ot]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[Qt]}],"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":[lt,ot]}],"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":[Qt]}],"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:H()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",lt,ot]}],filter:[{filter:["","none",lt,ot]}],blur:[{blur:le()}],brightness:[{brightness:[Qt,lt,ot]}],contrast:[{contrast:[Qt,lt,ot]}],"drop-shadow":[{"drop-shadow":["","none",g,n0,t0]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",Qt,lt,ot]}],"hue-rotate":[{"hue-rotate":[Qt,lt,ot]}],invert:[{invert:["",Qt,lt,ot]}],saturate:[{saturate:[Qt,lt,ot]}],sepia:[{sepia:["",Qt,lt,ot]}],"backdrop-filter":[{"backdrop-filter":["","none",lt,ot]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[Qt,lt,ot]}],"backdrop-contrast":[{"backdrop-contrast":[Qt,lt,ot]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Qt,lt,ot]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Qt,lt,ot]}],"backdrop-invert":[{"backdrop-invert":["",Qt,lt,ot]}],"backdrop-opacity":[{"backdrop-opacity":[Qt,lt,ot]}],"backdrop-saturate":[{"backdrop-saturate":[Qt,lt,ot]}],"backdrop-sepia":[{"backdrop-sepia":["",Qt,lt,ot]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",lt,ot]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Qt,"initial",lt,ot]}],ease:[{ease:["linear","initial",v,lt,ot]}],delay:[{delay:[Qt,lt,ot]}],animate:[{animate:["none",x,lt,ot]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,lt,ot]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:Ce()}],"skew-x":[{"skew-x":Ce()}],"skew-y":[{"skew-y":Ce()}],transform:[{transform:[lt,ot,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ee()}],"translate-x":[{"translate-x":Ee()}],"translate-y":[{"translate-y":Ee()}],"translate-z":[{"translate-z":Ee()}],"translate-none":["translate-none"],zoom:[{zoom:[_a,lt,ot]}],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",lt,ot]}],"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":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",lt,ot]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[Qt,cf,Jl,cS]}],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"]}},HQe=gQe($Qe);function ss(...e){return HQe(...e)}const PQe={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 Rt({variant:e="default",className:n,...t}){return h.jsx("span",{className:ss("badge inline-flex items-center rounded-full border px-2 py-px font-sans text-sm font-medium",PQe[e],n),...t})}const FQe=["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(" "),UQe={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"},qQe={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 ZN(e,n,t,r){return ss(FQe,UQe[e],qQe[n],t&&"active",r)}function Qe({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("button",{className:ZN(n,t,e,r),...s})}function Hb({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return h.jsx("a",{className:ZN(n,t,e,r),...s})}const GQe=["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","[.chat-header.rail-hidden_>_&:first-child]:me-3"].join(" "),VQe={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"},WQe={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function QN(e,n,t,r){return ss(GQe,VQe[e],WQe[n],t&&"active",r)}const Jt=M.forwardRef(function({active:n=!1,size:t="default",variant:r="default",className:s,...a},o){return h.jsx("button",{ref:o,className:QN(r,t,n,s),...a})});function Wp({active:e=!1,size:n="default",variant:t="default",className:r,...s}){return h.jsx("a",{className:QN(t,n,e,r),...s})}const KQe={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 Pb({variant:e="default",className:n,...t}){return h.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",KQe[e],n),...t})}function Zr({active:e=!1,danger:n=!1,className:t,...r}){return h.jsx("button",{className:ss("model-item flex min-h-8 w-full items-center justify-between gap-2 rounded-sm px-2 py-1.5 text-start text-sm 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",e&&"bg-surface",n&&"text-accent-red hover:text-accent-red",t),...r})}function dn({className:e,...n}){return h.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 vr({className:e,...n}){return h.jsx("div",{className:ss("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const YQe={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 Ux({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return h.jsxs("span",{className:ss("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[h.jsx("span",{className:ss("h-[7px] w-[7px] shrink-0 rounded-full bg-current",YQe[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const XQe=["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 JN(e,n){return ss(XQe,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function qx({checked:e=!1,className:n,children:t,...r}){return h.jsx("button",{role:"switch","aria-checked":e,className:JN(e,n),...r,children:t??h.jsx("span",{})})}function ZQe({checked:e=!1,className:n,...t}){return h.jsx("span",{className:JN(e,n),...t,children:h.jsx("span",{})})}var Kp=X9();const QQe=xh(Kp);function JQe(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 eJe=e=>{switch(e){case"success":return rJe;case"info":return iJe;case"warning":return sJe;case"error":return aJe;default:return null}},tJe=Array(12).fill(0),nJe=({visible:e,className:n})=>Ze.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},Ze.createElement("div",{className:"sonner-spinner"},tJe.map((t,r)=>Ze.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),rJe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),sJe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),iJe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),aJe=Ze.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},Ze.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"})),oJe=Ze.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"},Ze.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),Ze.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),lJe=()=>{const[e,n]=Ze.useState(document.hidden);return Ze.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let cJe=1;const uJe=100,fS=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:cJe++};class dJe{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-uJe;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=fS(n),a=this.pendingDismissals.get(s);a!==void 0&&(cancelAnimationFrame(a),this.pendingDismissals.delete(s),this.dismissedToasts.delete(s));const o=this.dismissedToasts.has(s),l=n.dismissible===void 0?!0:n.dismissible;return o&&(this.dismissedToasts.delete(s),this.toasts=this.toasts.filter(d=>d.id!==s)),(o?void 0:this.toasts.find(d=>d.id===s))?this.toasts=this.toasts.map(d=>d.id===s?(this.publish({...d,...n,id:s,title:t}),{...d,...n,id:s,dismissible:l,title:t}):d):this.addToast({title:t,...r,dismissible:l,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 a=r!==void 0,o;const l=s.then(async d=>{if(o=["resolve",d],Ze.isValidElement(d))a=!1,this.create({id:r,type:"default",message:d});else if(hJe(d)&&!d.ok){a=!1;const f=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,m=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(d instanceof Error){a=!1;const f=typeof t.error=="function"?await t.error(d):t.error,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:m,...S})}else if(t.success!==void 0){a=!1;const f=typeof t.success=="function"?await t.success(d):t.success,m=typeof t.description=="function"?await t.description(d):t.description,S=typeof f=="object"&&!Ze.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:m,...S})}}).catch(async d=>{if(o=["reject",d],t.error!==void 0){a=!1;const _=typeof t.error=="function"?await t.error(d):t.error,f=typeof t.description=="function"?await t.description(d):t.description,g=typeof _=="object"&&!Ze.isValidElement(_)?_:{message:_};this.create({id:r,type:"error",description:f,...g})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),t.finally==null||t.finally.call(t)}),c=()=>new Promise((d,_)=>l.then(()=>o[0]==="reject"?_(o[1]):d(o[1])).catch(_));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=fS(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 Vs=new dJe,fJe=(e,n)=>Vs.message(e,n),hJe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_Je=fJe,pJe=()=>Vs.toasts,mJe=()=>Vs.getActiveToasts(),gJe=Object.assign(_Je,{success:Vs.success,info:Vs.info,warning:Vs.warning,error:Vs.error,custom:Vs.custom,message:Vs.message,promise:Vs.promise,dismiss:Vs.dismiss,loading:Vs.loading},{getHistory:pJe,getToasts:mJe});JQe("[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 r0(e){return e.label!==void 0}const vJe=3,bJe="24px",xJe="16px",hS=4e3,yJe=356,wJe=14,SJe=45,kJe=200;function pa(...e){return e.filter(Boolean).join(" ")}function CJe(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const EJe=e=>{var n,t,r,s,a,o,l,c,d;const{invert:_,toast:f,unstyled:m,interacting:g,setHeights:S,visibleToasts:k,heights:b,index:v,toasts:x,expanded:y,removeToast:C,defaultRichColors:A,closeButton:E,style:j,cancelButtonStyle:T,actionButtonStyle:D,className:I="",descriptionClassName:P="",duration:B,position:F,gap:V,expandByDefault:X,classNames:W,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=Ze.useState(null),[H,Y]=Ze.useState(null),[G,ee]=Ze.useState(!1),[oe,he]=Ze.useState(!1),[ie,q]=Ze.useState(!1),[ne,le]=Ze.useState(!1),[ge,ue]=Ze.useState(!1),[Ce,Ee]=Ze.useState(0),[Le,Pe]=Ze.useState(0),Ve=Ze.useRef(f.duration||B||hS),ht=Ze.useRef(null),Be=Ze.useRef(null),wt=v===0,zt=v+1<=k,vt=f.type,Lt=vt??"default",St=f.dismissible!==!1,kt=f.className||"",xe=f.descriptionClassName||"",je=Ze.useMemo(()=>b.findIndex(rt=>rt.toastId===f.id)||0,[b,f.id]),We=Ze.useMemo(()=>{var rt;return(rt=f.closeButton)!=null?rt:E},[f.closeButton,E]),st=Ze.useMemo(()=>f.duration||B||hS,[f.duration,B]),nt=Ze.useRef(0),Ht=Ze.useRef(0),bt=Ze.useRef(0),nn=Ze.useRef(null),[Wt,pn]=F.split("-"),Dt=Ze.useMemo(()=>b.reduce((rt,Ie,it)=>it>=je?rt:rt+Ie.height,0),[b,je]),Nn=lJe(),Ut=Ze.useMemo(()=>{var rt;return(rt=e.swipeDirections)!=null?rt:CJe(F)},[e.swipeDirections,F]),br=f.invert||_,mn=vt==="loading";Ht.current=Ze.useMemo(()=>je*V+Dt,[je,Dt]),Ze.useEffect(()=>{Ve.current=st},[st]),Ze.useEffect(()=>{ee(!0)},[]),Ze.useEffect(()=>{const rt=Be.current;if(rt){const Ie=rt.getBoundingClientRect().height;return Pe(Ie),S(it=>[{toastId:f.id,height:Ie,position:f.position},...it]),()=>S(it=>it.filter(qt=>qt.toastId!==f.id))}},[S,f.id]),Ze.useLayoutEffect(()=>{if(!G)return;const rt=Be.current,Ie=rt.style.height;rt.style.height="auto";const it=rt.getBoundingClientRect().height;rt.style.height=Ie,Pe(it),S(qt=>qt.find(jt=>jt.toastId===f.id)?qt.map(jt=>jt.toastId===f.id?{...jt,height:it}:jt):[{toastId:f.id,height:it,position:f.position},...qt])},[G,f.title,f.description,S,f.id,f.jsx,f.action,f.cancel]);const Xe=Ze.useCallback(()=>{he(!0),Ee(Ht.current),S(rt=>rt.filter(Ie=>Ie.toastId!==f.id)),setTimeout(()=>{C(f)},kJe)},[f,C,S,Ht]);Ze.useEffect(()=>{if(f.promise&&vt==="loading"||f.duration===1/0||f.type==="loading")return;let rt;return y||g||Nn?(()=>{if(bt.current{Ve.current!==1/0&&(nt.current=new Date().getTime(),rt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Xe()},Ve.current))})(),()=>clearTimeout(rt)},[y,g,f,vt,Nn,Xe]),Ze.useEffect(()=>{f.delete&&(Xe(),f.onDismiss==null||f.onDismiss.call(f,f))},[Xe,f.delete]);function xt(){var rt;if(Z!=null&&Z.loading){var Ie;return Ze.createElement("div",{className:pa(W==null?void 0:W.loader,f==null||(Ie=f.classNames)==null?void 0:Ie.loader,"sonner-loader"),"data-visible":vt==="loading"},Z.loading)}return Ze.createElement(nJe,{className:pa(W==null?void 0:W.loader,f==null||(rt=f.classNames)==null?void 0:rt.loader),visible:vt==="loading"})}const Vn=f.icon||(Z==null?void 0:Z[vt])||eJe(vt);var Wn,Et;return Ze.createElement("li",{tabIndex:0,ref:Be,className:pa(I,kt,W==null?void 0:W.toast,f==null||(n=f.classNames)==null?void 0:n.toast,W==null?void 0:W[Lt],f==null||(t=f.classNames)==null?void 0:t[Lt]),"data-sonner-toast":"","data-rich-colors":(Wn=f.richColors)!=null?Wn:A,"data-styled":!(f.jsx||f.unstyled||m),"data-mounted":G,"data-promise":!!f.promise,"data-swiped":ge,"data-removed":oe,"data-visible":zt,"data-y-position":Wt,"data-x-position":pn,"data-index":v,"data-front":wt,"data-swiping":ie,"data-dismissible":St,"data-type":vt,"data-invert":br,"data-swipe-out":ne,"data-swipe-direction":H,"data-expanded":!!(y||X&&G),"data-testid":f.testId,style:{"--index":v,"--toasts-before":v,"--z-index":x.length-v,"--offset":`${oe?Ce:Ht.current}px`,"--initial-height":X?"auto":`${Le}px`,...j,...f.style},onDragEnd:()=>{q(!1),L(null),nn.current=null},onPointerDown:rt=>{rt.button!==2&&(mn||!St||(ht.current=new Date,Ee(Ht.current),rt.target.setPointerCapture(rt.pointerId),rt.target.tagName!=="BUTTON"&&(q(!0),nn.current={x:rt.clientX,y:rt.clientY})))},onPointerUp:()=>{var rt,Ie,it;if(ne||!St)return;nn.current=null;const qt=Number(((rt=Be.current)==null?void 0:rt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),en=Number(((Ie=Be.current)==null?void 0:Ie.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),jt=new Date().getTime()-((it=ht.current)==null?void 0:it.getTime()),On=$==="x"?qt:en,_r=Math.abs(On)/jt;if(($==="x"?Ut.includes(qt>0?"right":"left"):Ut.includes(en>0?"bottom":"top"))&&(Math.abs(On)>=SJe||_r>.11)){Ee(Ht.current),f.onDismiss==null||f.onDismiss.call(f,f),Y($==="x"?qt>0?"right":"left":en>0?"down":"up"),Xe(),le(!0);return}else{var ar,xr;(ar=Be.current)==null||ar.style.setProperty("--swipe-amount-x","0px"),(xr=Be.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}ue(!1),q(!1),L(null)},onPointerMove:rt=>{var Ie,it,qt;if(!nn.current||!St||((Ie=window.getSelection())==null?void 0:Ie.toString().length)>0)return;const jt=rt.clientY-nn.current.y,On=rt.clientX-nn.current.x;!$&&(Math.abs(On)>1||Math.abs(jt)>1)&&L(Math.abs(On)>Math.abs(jt)?"x":"y");let _r={x:0,y:0};const is=ar=>1/(1.5+Math.abs(ar)/20);if($==="y"){if(Ut.includes("top")||Ut.includes("bottom"))if(Ut.includes("top")&&jt<0||Ut.includes("bottom")&&jt>0)_r.y=jt;else{const ar=jt*is(jt);_r.y=Math.abs(ar)0)_r.x=On;else{const ar=On*is(On);_r.x=Math.abs(ar)0||Math.abs(_r.y)>0)&&ue(!0),(it=Be.current)==null||it.style.setProperty("--swipe-amount-x",`${_r.x}px`),(qt=Be.current)==null||qt.style.setProperty("--swipe-amount-y",`${_r.y}px`)}},We&&!f.jsx&&vt!=="loading"?Ze.createElement("button",{"aria-label":J,"data-disabled":mn,"data-close-button":!0,onClick:mn||!St?()=>{}:()=>{Xe(),f.onDismiss==null||f.onDismiss.call(f,f)},className:pa(W==null?void 0:W.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Et=Z==null?void 0:Z.close)!=null?Et:oJe):null,(vt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[vt])!==null||f.icon)?Ze.createElement("div",{"data-icon":"",className:pa(W==null?void 0:W.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},vt==="loading"?f.icon||xt():f.promise?xt():null,vt!=="loading"?Vn:null):null,Ze.createElement("div",{"data-content":"",className:pa(W==null?void 0:W.content,f==null||(a=f.classNames)==null?void 0:a.content)},Ze.createElement("div",{"data-title":"",className:pa(W==null?void 0:W.title,f==null||(o=f.classNames)==null?void 0:o.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?Ze.createElement("div",{"data-description":"",className:pa(P,xe,W==null?void 0:W.description,f==null||(l=f.classNames)==null?void 0:l.description)},typeof f.description=="function"?f.description():f.description):null),Ze.isValidElement(f.cancel)?f.cancel:f.cancel&&r0(f.cancel)?Ze.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:rt=>{r0(f.cancel)&&St&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,rt),Xe())},className:pa(W==null?void 0:W.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,Ze.isValidElement(f.action)?f.action:f.action&&r0(f.action)?Ze.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||D,onClick:rt=>{r0(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,rt),!rt.defaultPrevented&&Xe())},className:pa(W==null?void 0:W.actionButton,f==null||(d=f.classNames)==null?void 0:d.actionButton)},f.action.label):null)};function _S(){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 NJe(e,n){const t={};return[e,n].forEach((r,s)=>{const a=s===1,o=a?"--mobile-offset":"--offset",l=a?xJe:bJe;function c(d){["top","right","bottom","left"].forEach(_=>{t[`${o}-${_}`]=typeof d=="number"?`${d}px`:d})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(d=>{r[d]===void 0?t[`${o}-${d}`]=l:t[`${o}-${d}`]=typeof r[d]=="number"?`${r[d]}px`:r[d]}):c(l)}),t}const zJe=Ze.forwardRef(function(n,t){const{id:r,invert:s,position:a="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:d,offset:_,mobileOffset:f,theme:m="light",richColors:g,duration:S,style:k,visibleToasts:b=vJe,toastOptions:v,dir:x=_S(),gap:y=wJe,icons:C,customAriaLabel:A,containerAriaLabel:E="Notifications"}=n,[j,T]=Ze.useState([]),D=Ze.useMemo(()=>r?j.filter(ee=>ee.toasterId===r):j.filter(ee=>!ee.toasterId),[j,r]),I=Ze.useMemo(()=>Array.from(new Set([a].concat(D.filter(ee=>ee.position).map(ee=>ee.position)))),[D,a]),[P,B]=Ze.useState([]),[F,V]=Ze.useState(!1),[X,W]=Ze.useState(!1),[Z,J]=Ze.useState(m!=="system"?m:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=Ze.useRef(null),L=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=Ze.useRef(null),Y=Ze.useRef(!1),G=Ze.useCallback(ee=>{T(oe=>{var he;return(he=oe.find(ie=>ie.id===ee.id))!=null&&he.delete||Vs.dismiss(ee.id),oe.filter(({id:ie})=>ie!==ee.id)})},[]);return Ze.useEffect(()=>Vs.subscribe(ee=>{if(ee.dismiss){requestAnimationFrame(()=>{T(oe=>oe.map(he=>he.id===ee.id?{...he,delete:!0}:he))});return}setTimeout(()=>{QQe.flushSync(()=>{T(oe=>{const he=oe.findIndex(ie=>ie.id===ee.id);return he!==-1?[...oe.slice(0,he),{...oe[he],...ee},...oe.slice(he+1)]:[ee,...oe]})})})}),[]),Ze.useEffect(()=>{if(m!=="system"){J(m);return}if(m==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const ee=window.matchMedia("(prefers-color-scheme: dark)");try{ee.addEventListener("change",({matches:oe})=>{J(oe?"dark":"light")})}catch{ee.addListener(({matches:he})=>{try{J(he?"dark":"light")}catch(ie){console.error(ie)}})}},[m]),Ze.useEffect(()=>{j.length<=1&&V(!1)},[j]),Ze.useEffect(()=>{const ee=oe=>{var he;if(o.length>0&&o.every(ne=>oe[ne]||oe.code===ne)){var q;V(!0),(q=$.current)==null||q.focus()}oe.code==="Escape"&&(document.activeElement===$.current||(he=$.current)!=null&&he.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",ee),()=>document.removeEventListener("keydown",ee)},[o]),Ze.useEffect(()=>{if($.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,Y.current=!1)}},[$.current]),Ze.createElement("section",{ref:t,"aria-label":A??`${E} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},I.map((ee,oe)=>{var he;const[ie,q]=ee.split("-");return D.length?Ze.createElement("ol",{key:ee,dir:x==="auto"?_S():x,tabIndex:-1,ref:$,className:d,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":ie,"data-x-position":q,style:{"--front-toast-height":`${((he=P[0])==null?void 0:he.height)||0}px`,"--width":`${yJe}px`,"--gap":`${y}px`,...k,...NJe(_,f)},onBlur:ne=>{Y.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(Y.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,H.current=ne.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{X||V(!1)},onDragEnd:()=>V(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},D.filter(ne=>!ne.position&&oe===0||ne.position===ee).map((ne,le)=>{var ge,ue;return Ze.createElement(EJe,{key:ne.id,icons:C,index:le,toast:ne,defaultRichColors:g,duration:(ge=v==null?void 0:v.duration)!=null?ge:S,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:s,visibleToasts:b,closeButton:(ue=v==null?void 0:v.closeButton)!=null?ue:c,interacting:X,position:ee,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:G,toasts:D.filter(Ce=>Ce.position==ne.position),heights:P.filter(Ce=>Ce.position==ne.position),setHeights:B,expandByDefault:l,gap:y,expanded:F,swipeDirections:n.swipeDirections})})):null}))}),ez="orx:theme";function AJe(){try{const e=localStorage.getItem(ez);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let Uf=AJe();const Fb=new Set;function TJe(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Gx(){document.documentElement.dataset.theme=TJe(Uf)}function jJe(e){Uf=e;try{localStorage.setItem(ez,e)}catch{}Gx();for(const n of Fb)n()}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{Uf==="system"&&Gx()});Gx();function MJe(e){return Fb.add(e),()=>Fb.delete(e)}function tz(){return[M.useSyncExternalStore(MJe,()=>Uf,()=>Uf),jJe]}function RJe(e){const[n]=tz();return h.jsx(zJe,{theme:n,...e})}function nz(e,n,t){gJe[n](e,{duration:1/0,position:"top-center",closeButton:!0,...t})}function DJe({content:e,children:n,className:t}){return h.jsxs("span",{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,children:[n,h.jsx("span",{role:"tooltip",className:"pointer-events-none absolute bottom-full start-1/2 z-20 mb-1.5 w-max max-w-64 -translate-x-1/2 rounded-sm bg-text px-2 py-1.5 font-sans text-sm font-normal leading-snug text-background opacity-0 shadow-control-subtle transition-opacity group-hover:opacity-100 group-focus:opacity-100",children:e})]})}const LJe=["alphaxiv","openalex","biorxiv"];let pS=null;function OJe(){const[e,n]=M.useState(pS),[t,r]=M.useState(!1),s=o=>{pS=o,n(o)};M.useEffect(()=>{DXe().then(s).catch(()=>{})},[]);const a=o=>{!e||t||(r(!0),LXe({...e,[o]:!e[o]}).then(s).catch(()=>{}).finally(()=>r(!1)))};return e?h.jsx("div",{className:"flex flex-col",children:LJe.map(o=>{const l=e[o];return h.jsxs(Zr,{type:"button",role:"switch","aria-checked":l,disabled:t,onClick:()=>a(o),children:[h.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[h.jsx(ON,{source:o,size:16,decorative:!0}),LN[o]]}),h.jsx(ZQe,{checked:l,"aria-hidden":"true"})]},o)})}):h.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:L0e()})}function nv(e,n){if(!e)throw new Error("Assertion Error")}function ec(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}function IJe(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function BJe(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:` +`}]}function $Je(e,n){const t=n.value?n.value+` +`:"",r={},s=n.lang?n.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(a.data={meta:n.meta}),e.patch(n,a),a=e.applyData(n,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(n,a),a}function HJe(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function PJe(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const zs=jl(/[A-Za-z]/),ps=jl(/[\dA-Za-z]/),FJe=jl(/[#-'*+\--9=?A-Z^-~]/);function cp(e){return e!==null&&(e<32||e===127)}const Ub=jl(/\d/),UJe=jl(/[\dA-Fa-f]/),qJe=jl(/[!-/:-@[-`{-~]/);function _t(e){return e!==null&&e<-2}function $n(e){return e!==null&&(e<0||e===32)}function on(e){return e===-2||e===-1||e===32}const Yp=jl(new RegExp("\\p{P}|\\p{S}","u")),bc=jl(/\s/);function jl(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function hd(e){const n=[];let t=-1,r=0,s=0;for(;++t55295&&a<57344){const l=e.charCodeAt(t+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),s=1):o="�"}else o=String.fromCharCode(a);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+s+1,o=""),s&&(t+=s,s=0)}return n.join("")+e.slice(r)}function GJe(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=hd(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+s,id:t+"fnref-"+s+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(n,c);const d={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(n,d),e.applyData(n,d)}function VJe(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 WJe(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function rz(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),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=r:s.push({type:"text",value:r}),s}function KJe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return rz(e,n);const s={src:hd(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(n,a),e.applyData(n,a)}function YJe(e,n){const t={src:hd(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 XJe(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 ZJe(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return rz(e,n);const s={href:hd(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(n)};return e.patch(n,a),e.applyData(n,a)}function QJe(e,n){const t={href:hd(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 JJe(e,n,t){const r=e.all(n),s=t?eet(t):sz(n),a={},o=[];if(typeof n.checked=="boolean"){const _=r[0];let f;_&&_.type==="element"&&_.tagName==="p"?f=_:(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:[]}),a.className=["task-list-item"]}let l=-1;for(;++l1}function RJe(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&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 IJe(e){const n=Px(e),t=XN(e);if(n&&t)return{start:n,end:t}}function BJe(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),s.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=Px(n.children[1]),c=XN(n.children[n.children.length-1]);l&&c&&(o.position={start:l,end:c}),s.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,a),e.applyData(n,a)}function $Je(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let c=-1;const d=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return a.push(fS(n.slice(s),s>0,!1)),a.join("")}function fS(e,n,t){let r=0,s=e.length;if(n){let a=e.codePointAt(r);for(;a===uS||a===dS;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(s-1);for(;a===uS||a===dS;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function FJe(e,n){const t={type:"text",value:PJe(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function UJe(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const qJe={blockquote:pJe,break:mJe,code:gJe,delete:vJe,emphasis:bJe,footnoteReference:SJe,heading:kJe,html:CJe,imageReference:EJe,image:NJe,inlineCode:zJe,linkReference:AJe,link:TJe,listItem:jJe,list:RJe,paragraph:DJe,root:LJe,strong:OJe,table:BJe,tableCell:HJe,tableRow:$Je,text:FJe,thematicBreak:UJe,toml:Q_,yaml:Q_,definition:Q_,footnoteDefinition:Q_};function Q_(){}const QN=-1,Gp=0,zf=1,ip=2,Fx=3,Ux=4,qx=5,Gx=6,JN=7,ez=8,GJe=typeof self=="object"?self:globalThis,hS=(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 GJe[e](n)},VJe=(e,n)=>{const t=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,o]=n[s];switch(a){case Gp:case QN:return t(o,s);case zf:{const l=t([],s);for(const c of o)l.push(r(c));return l}case ip:{const l=t({},s);for(const[c,d]of o)l[r(c)]=r(d);return l}case Fx:return t(new Date(o),s);case Ux:{const{source:l,flags:c}=o;return t(new RegExp(l,c),s)}case qx:{const l=t(new Map,s);for(const[c,d]of o)l.set(r(c),r(d));return l}case Gx:{const l=t(new Set,s);for(const c of o)l.add(r(c));return l}case JN:{const{name:l,message:c}=o;return t(hS(l,c),s)}case ez:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(hS(a,o),s)};return r},_S=e=>VJe(new Map,e)(0),rc="",{toString:WJe}={},{keys:KJe}=Object,uf=e=>{const n=typeof e;if(n!=="object"||!e)return[Gp,n];const t=WJe.call(e).slice(8,-1);switch(t){case"Array":return[zf,rc];case"Object":return[ip,rc];case"Date":return[Fx,rc];case"RegExp":return[Ux,rc];case"Map":return[qx,rc];case"Set":return[Gx,rc];case"DataView":return[zf,t]}return t.includes("Array")?[zf,t]:t.includes("Error")?[JN,t]:[ip,t]},J_=([e,n])=>e===Gp&&(n==="function"||n==="symbol"),YJe=(e,n,t,r)=>{const s=(o,l)=>{const c=r.push(o)-1;return t.set(l,c),c},a=o=>{if(t.has(o))return t.get(o);let[l,c]=uf(o);switch(l){case Gp:{let _=o;switch(c){case"bigint":l=ez,_=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);_=null;break;case"undefined":return s([QN],o)}return s([l,_],o)}case zf:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),s([c,[...m]],o)}const _=[],f=s([l,_],o);for(const m of o)_.push(a(m));return f}case ip:{if(c)switch(c){case"BigInt":return s([c,o.toString()],o);case"Boolean":case"Number":case"String":return s([c,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const _=[],f=s([l,_],o);for(const m of KJe(o))(e||!J_(uf(o[m])))&&_.push([a(m),a(o[m])]);return f}case Fx:return s([l,isNaN(o.getTime())?rc:o.toISOString()],o);case Ux:{const{source:_,flags:f}=o;return s([l,{source:_,flags:f}],o)}case qx:{const _=[],f=s([l,_],o);for(const[m,g]of o)(e||!(J_(uf(m))||J_(uf(g))))&&_.push([a(m),a(g)]);return f}case Gx:{const _=[],f=s([l,_],o);for(const m of o)(e||!J_(uf(m)))&&_.push(a(m));return f}}const{message:d}=o;return s([l,{name:c,message:d}],o)};return a},pS=(e,{json:n,lossy:t}={})=>{const r=[];return YJe(!(n||t),!!n,new Map,r)(e),r},ap=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?_S(pS(e,n)):structuredClone(e):(e,n)=>_S(pS(e,n));function XJe(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 ZJe(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function QJe(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||XJe,r=e.options.footnoteBackLabel||ZJe,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&S.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,g);typeof x=="string"&&(x={type:"text",value:x}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const x=b.children[b.children.length-1];x&&x.type==="text"?x.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...S)}else _.push(...S);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(_,!0)};e.patch(d,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ap(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` +`});const d={type:"element",tagName:"li",properties:a,children:o};return e.patch(n,d),e.applyData(n,d)}function eet(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function tet(e,n){const t={},r=e.all(n);let s=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++s0&&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 iet(e){const n=Vx(e),t=iz(e);if(n&&t)return{start:n,end:t}}function aet(e,n){const t=e.all(n),r=t.shift(),s=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),s.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},l=Vx(n.children[1]),c=iz(n.children[n.children.length-1]);l&&c&&(o.position={start:l,end:c}),s.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(n,a),e.applyData(n,a)}function oet(e,n,t){const r=t?t.children:void 0,a=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:n.children.length;let c=-1;const d=[];for(;++c0,!0),r[0]),s=r.index+r[0].length,r=t.exec(n);return a.push(vS(n.slice(s),s>0,!1)),a.join("")}function vS(e,n,t){let r=0,s=e.length;if(n){let a=e.codePointAt(r);for(;a===mS||a===gS;)r++,a=e.codePointAt(r)}if(t){let a=e.codePointAt(s-1);for(;a===mS||a===gS;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function det(e,n){const t={type:"text",value:uet(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function fet(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const het={blockquote:IJe,break:BJe,code:$Je,delete:HJe,emphasis:PJe,footnoteReference:GJe,heading:VJe,html:WJe,imageReference:KJe,image:YJe,inlineCode:XJe,linkReference:ZJe,link:QJe,listItem:JJe,list:tet,paragraph:net,root:ret,strong:set,table:aet,tableCell:cet,tableRow:oet,text:det,thematicBreak:fet,toml:s0,yaml:s0,definition:s0,footnoteDefinition:s0};function s0(){}const oz=-1,Xp=0,zf=1,up=2,Wx=3,Kx=4,Yx=5,Xx=6,lz=7,cz=8,_et=typeof self=="object"?self:globalThis,bS=(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 _et[e](n)},pet=(e,n)=>{const t=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,o]=n[s];switch(a){case Xp:case oz:return t(o,s);case zf:{const l=t([],s);for(const c of o)l.push(r(c));return l}case up:{const l=t({},s);for(const[c,d]of o)l[r(c)]=r(d);return l}case Wx:return t(new Date(o),s);case Kx:{const{source:l,flags:c}=o;return t(new RegExp(l,c),s)}case Yx:{const l=t(new Map,s);for(const[c,d]of o)l.set(r(c),r(d));return l}case Xx:{const l=t(new Set,s);for(const c of o)l.add(r(c));return l}case lz:{const{name:l,message:c}=o;return t(bS(l,c),s)}case cz:return t(BigInt(o),s);case"BigInt":return t(Object(BigInt(o)),s);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(bS(a,o),s)};return r},xS=e=>pet(new Map,e)(0),sc="",{toString:met}={},{keys:get}=Object,uf=e=>{const n=typeof e;if(n!=="object"||!e)return[Xp,n];const t=met.call(e).slice(8,-1);switch(t){case"Array":return[zf,sc];case"Object":return[up,sc];case"Date":return[Wx,sc];case"RegExp":return[Kx,sc];case"Map":return[Yx,sc];case"Set":return[Xx,sc];case"DataView":return[zf,t]}return t.includes("Array")?[zf,t]:t.includes("Error")?[lz,t]:[up,t]},i0=([e,n])=>e===Xp&&(n==="function"||n==="symbol"),vet=(e,n,t,r)=>{const s=(o,l)=>{const c=r.push(o)-1;return t.set(l,c),c},a=o=>{if(t.has(o))return t.get(o);let[l,c]=uf(o);switch(l){case Xp:{let _=o;switch(c){case"bigint":l=cz,_=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);_=null;break;case"undefined":return s([oz],o)}return s([l,_],o)}case zf:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),s([c,[...m]],o)}const _=[],f=s([l,_],o);for(const m of o)_.push(a(m));return f}case up:{if(c)switch(c){case"BigInt":return s([c,o.toString()],o);case"Boolean":case"Number":case"String":return s([c,o.valueOf()],o)}if(n&&"toJSON"in o)return a(o.toJSON());const _=[],f=s([l,_],o);for(const m of get(o))(e||!i0(uf(o[m])))&&_.push([a(m),a(o[m])]);return f}case Wx:return s([l,isNaN(o.getTime())?sc:o.toISOString()],o);case Kx:{const{source:_,flags:f}=o;return s([l,{source:_,flags:f}],o)}case Yx:{const _=[],f=s([l,_],o);for(const[m,g]of o)(e||!(i0(uf(m))||i0(uf(g))))&&_.push([a(m),a(g)]);return f}case Xx:{const _=[],f=s([l,_],o);for(const m of o)(e||!i0(uf(m)))&&_.push(a(m));return f}}const{message:d}=o;return s([l,{name:c,message:d}],o)};return a},yS=(e,{json:n,lossy:t}={})=>{const r=[];return vet(!(n||t),!!n,new Map,r)(e),r},dp=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?xS(yS(e,n)):structuredClone(e):(e,n)=>xS(yS(e,n));function bet(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 xet(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function yet(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||bet,r=e.options.footnoteBackLabel||xet,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c0&&S.push({type:"text",value:" "});let x=typeof t=="string"?t:t(c,g);typeof x=="string"&&(x={type:"text",value:x}),S.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray(x)?x:[x]})}const b=_[_.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const x=b.children[b.children.length-1];x&&x.type==="text"?x.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...S)}else _.push(...S);const v={type:"element",tagName:"li",properties:{id:n+"fn-"+m},children:e.wrap(_,!0)};e.patch(d,v),l.push(v)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...dp(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:` `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` -`}]}}const wh=(function(e){if(e==null)return net;if(typeof e=="function")return Vp(e);if(typeof e=="object")return Array.isArray(e)?JJe(e):eet(e);if(typeof e=="string")return tet(e);throw new Error("Expected function, string, or object as test")});function JJe(e){const n=[];let t=-1;for(;++t":""))+")"})}return m;function m(){let g=tz,S,k,b;if((!n||a(c,d,_[_.length-1]||void 0))&&(g=iet(t(c,_)),g[0]===$b))return g;if("children"in c&&c.children){const v=c;if(v.children&&g[0]!==nz)for(k=(r?v.children.length:-1)+o,b=_.concat(v);k>-1&&k":""))+")"})}return m;function m(){let g=uz,S,k,b;if((!n||a(c,d,_[_.length-1]||void 0))&&(g=Aet(t(c,_)),g[0]===qb))return g;if("children"in c&&c.children){const v=c;if(v.children&&g[0]!==dz)for(k=(r?v.children.length:-1)+o,b=_.concat(v);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function mS(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function gS(e,n){const t=oet(e,n),r=t.one(e,void 0),s=QJe(t),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:` -`},s),a}function op(e,n){return e&&"run"in e?async function(t,r){const s=gS(t,{file:r,...n});await e.run(s,r)}:function(t,r){return gS(t,{file:r,...e||n})}}function vS(e){if(e)throw e}var J1,bS;function het(){if(bS)return J1;bS=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},a=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var _=e.call(d,"constructor"),f=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!_&&!f)return!1;var m;for(m in d);return typeof m>"u"||e.call(d,m)},o=function(d,_){t&&_.name==="__proto__"?t(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},l=function(d,_){if(_==="__proto__")if(e.call(d,_)){if(r)return r(d,_).value}else return;return d[_]};return J1=function c(){var d,_,f,m,g,S,k=arguments[0],b=1,v=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},b=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});bo.length;let c;l&&o.push(s);try{c=e.apply(this,o)}catch(d){const _=d;if(l&&t)throw _;return s(_)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(o,...l){t||(t=!0,n(o,...l))}function a(o){s(null,o)}}function Af(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?xS(e.position):"start"in e||"end"in e?xS(e):"line"in e||"column"in e?Fb(e):""}function Fb(e){return yS(e&&e.line)+":"+yS(e&&e.column)}function xS(e){return Fb(e&&e.start)+"-"+Fb(e&&e.end)}function yS(e){return e&&typeof e=="number"?e:1}class gs extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?s=n:!a.cause&&n&&(o=!0,s=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Af(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gs.prototype.file="";gs.prototype.name="";gs.prototype.reason="";gs.prototype.message="";gs.prototype.stack="";gs.prototype.column=void 0;gs.prototype.line=void 0;gs.prototype.ancestors=void 0;gs.prototype.cause=void 0;gs.prototype.fatal=void 0;gs.prototype.place=void 0;gs.prototype.ruleId=void 0;gs.prototype.source=void 0;const ba={basename:get,dirname:vet,extname:bet,join:xet,sep:"/"};function get(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Sh(e);let t=0,r=-1,s=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,l=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else o<0&&(a=!0,o=s+1),l>-1&&(e.codePointAt(s)===n.codePointAt(l--)?l<0&&(r=s):(l=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function vet(e){if(Sh(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 bet(e){Sh(e);let n=e.length,t=-1,r=0,s=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?s<0?s=n:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||t<0||a===0||a===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function xet(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function wet(e,n){let t="",r=0,s=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o2){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=o,a=0;continue}}else if(t.length>0){t="",r=0,s=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,o):t=e.slice(s+1,o),r=o-s-1;s=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Sh(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ket={cwd:Cet};function Cet(){return"/"}function Ub(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Eet(e){if(typeof e=="string")e=new URL(e);else if(!Ub(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 Net(e)}function Net(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[g,...S]=_;const k=r[m][1];Pb(k)&&Pb(g)&&(g=ev(!0,k,g)),r[m]=[d,g,...S]}}}}const Yx=new Kx().freeze();function sv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function iv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function av(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 SS(e){if(!Pb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kS(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function e0(e){return jet(e)?e:new rz(e)}function jet(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Met(e){return typeof e=="string"||Ret(e)}function Ret(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var CS=Object.prototype.hasOwnProperty;function ES(e,n,t){for(t of e.keys())if(Tf(t,n))return t}function Tf(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--&&Tf(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=ES(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=ES(n,s),!s)||!Tf(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(CS.call(e,t)&&++r&&!CS.call(n,t)||!(t in n)||!Tf(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function NS(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=t.length,a=!0);const o=t.slice(s,r).trim();(o||!a)&&n.push(o),s=r+1,r=t.indexOf(",",s)}return n}function Det(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Let=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Oet=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Iet={};function zS(e,n){return(Iet.jsx?Oet:Let).test(e)}const Bet=/[ \t\n\f\r]/g;function $et(e){return typeof e=="object"?e.type==="text"?AS(e.value):!1:AS(e)}function AS(e){return e.replace(Bet,"")===""}class kh{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}kh.prototype.normal={};kh.prototype.property={};kh.prototype.space=void 0;function sz(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new kh(t,r,n)}function Ff(e){return e.toLowerCase()}class Ks{constructor(n,t){this.attribute=t,this.property=n}}Ks.prototype.attribute="";Ks.prototype.booleanish=!1;Ks.prototype.boolean=!1;Ks.prototype.commaOrSpaceSeparated=!1;Ks.prototype.commaSeparated=!1;Ks.prototype.defined=!1;Ks.prototype.mustUseProperty=!1;Ks.prototype.number=!1;Ks.prototype.overloadedBoolean=!1;Ks.prototype.property="";Ks.prototype.spaceSeparated=!1;Ks.prototype.space=void 0;let Het=0;const Bt=zc(),Ar=zc(),qb=zc(),Ue=zc(),In=zc(),hc=zc(),ui=zc();function zc(){return 2**++Het}const Gb=Object.freeze(Object.defineProperty({__proto__:null,boolean:Bt,booleanish:Ar,commaOrSpaceSeparated:ui,commaSeparated:hc,number:Ue,overloadedBoolean:qb,spaceSeparated:In},Symbol.toStringTag,{value:"Module"})),ov=Object.keys(Gb);class Xx extends Ks{constructor(n,t,r,s){let a=-1;if(super(n,t),TS(this,"space",s),typeof r=="number")for(;++a4&&t.slice(0,4)==="data"&&Get.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(jS,Wet);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!jS.test(a)){let o=a.replace(qet,Vet);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}s=Xx}return new s(r,n)}function Vet(e){return"-"+e.toLowerCase()}function Wet(e){return e.charAt(1).toUpperCase()}const fz=sz([iz,Pet,lz,cz,uz],"html"),Wp=sz([iz,Fet,lz,cz,uz],"svg");function MS(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Ket(e){return e.join(" ").trim()}var mu={},lv,RS;function Yet(){if(RS)return lv;RS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` -`,d="/",_="*",f="",m="comment",g="declaration";function S(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var x=1,y=1;function C(V){var X=V.match(n);X&&(x+=X.length);var W=V.lastIndexOf(c);y=~W?V.length-W:y+V.length}function A(){var V={line:x,column:y};return function(X){return X.position=new E(V),D(),X}}function E(V){this.start=V,this.end={line:x,column:y},this.source=v.source}E.prototype.content=b;function j(V){var X=new Error(v.source+":"+x+":"+y+": "+V);if(X.reason=V,X.filename=v.source,X.line=x,X.column=y,X.source=b,!v.silent)throw X}function T(V){var X=V.exec(b);if(X){var W=X[0];return C(W),b=b.slice(W.length),X}}function D(){T(t)}function I(V){var X;for(V=V||[];X=P();)X!==!1&&V.push(X);return V}function P(){var V=A();if(!(d!=b.charAt(0)||_!=b.charAt(1))){for(var X=2;f!=b.charAt(X)&&(_!=b.charAt(X)||d!=b.charAt(X+1));)++X;if(X+=2,f===b.charAt(X-1))return j("End of comment missing");var W=b.slice(2,X-2);return y+=2,C(W),b=b.slice(X),y+=2,V({type:m,comment:W})}}function H(){var V=A(),X=T(r);if(X){if(P(),!T(s))return j("property missing ':'");var W=T(a),Z=V({type:g,property:k(X[0].replace(e,f)),value:W?k(W[0].replace(e,f)):f});return T(o),Z}}function F(){var V=[];I(V);for(var X;X=H();)X!==!1&&(V.push(X),I(V));return V}return D(),F()}function k(b){return b?b.replace(l,f):f}return lv=S,lv}var DS;function Xet(){if(DS)return mu;DS=1;var e=mu&&mu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(mu,"__esModule",{value:!0}),mu.default=t;const n=e(Yet());function t(r,s){let a=null;if(!r||typeof r!="string")return a;const o=(0,n.default)(r),l=typeof s=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:_}=c;l?s(d,_,c):_&&(a=a||{},a[d]=_)}),a}return mu}var df={},LS;function Zet(){if(LS)return df;LS=1,Object.defineProperty(df,"__esModule",{value:!0}),df.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||t.test(d)||e.test(d)},o=function(d,_){return _.toUpperCase()},l=function(d,_){return"".concat(_,"-")},c=function(d,_){return _===void 0&&(_={}),a(d)?d:(d=d.toLowerCase(),_.reactCompat?d=d.replace(s,l):d=d.replace(r,l),d.replace(n,o))};return df.camelCase=c,df}var ff,OS;function Qet(){if(OS)return ff;OS=1;var e=ff&&ff.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(Xet()),t=Zet();function r(s,a){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(l,c){l&&c&&(o[(0,t.camelCase)(l,a)]=c)}),o}return r.default=r,ff=r,ff}var Jet=Qet();const ett=vh(Jet),Zx={}.hasOwnProperty,ttt=new Map,ntt=/[A-Z]/g,rtt=new Set(["table","tbody","thead","tfoot","tr"]),stt=new Set(["td","th"]),hz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _z(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=ftt(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=dtt(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"?Wp:fz,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=pz(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function pz(e,n,t){if(n.type==="element")return itt(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return att(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return ltt(e,n,t);if(n.type==="mdxjsEsm")return ott(e,n);if(n.type==="root")return ctt(e,n,t);if(n.type==="text")return utt(e,n)}function itt(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Wp,e.schema=s),e.ancestors.push(n);const a=gz(e,n.tagName,!1),o=htt(e,n);let l=Jx(e,n);return rtt.has(n.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!$et(c):!0})),mz(e,o,a,n),Qx(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function att(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)}Uf(e,n.position)}function ott(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Uf(e,n.position)}function ltt(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Wp,e.schema=s),e.ancestors.push(n);const a=n.name===null?e.Fragment:gz(e,n.name,!0),o=_tt(e,n),l=Jx(e,n);return mz(e,o,a,n),Qx(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function ctt(e,n,t){const r={};return Qx(r,Jx(e,n)),e.create(n,e.Fragment,r,t)}function utt(e,n){return n.value}function mz(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Qx(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function dtt(e,n,t){return r;function r(s,a,o,l){const d=Array.isArray(o.children)?t:n;return l?d(a,o,l):d(a,o)}}function ftt(e,n){return t;function t(r,s,a,o){const l=Array.isArray(a.children),c=Px(r);return n(s,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function htt(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&Zx.call(n.properties,s)){const a=ptt(e,s,n.properties[s]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&stt.has(n.tagName)?r=l:t[o]=l}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function _tt(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else Uf(e,n.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Uf(e,n.position);else a=r.value===null?!0:r.value;t[s]=a}return t}function Jx(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:ttt;for(;++ry.key).filter(y=>y!==void 0));let d=0;for(;d=e.children.length-_&&(E=s.length-(e.children.length-y)),E>=0&&(A=((v=s[E])==null?void 0:v.key)??A);A&&c.has(A)&&((x=s[E])==null?void 0:x.key)!==A;)A=`${A}+`;A&&c.add(A);const j=vz(C,s[E]??null,t,A);a.push(j),j.react!==void 0&&o.push(j.react)}const f=n!==null&&Stt(e,n.node);if(n&&n.key===r&&f&&s.length===a.length&&a.every((y,C)=>y===s[C]))return n;const m=e.type==="element"&&xtt.has(e.tagName)?o.filter(y=>typeof y!="string"||!ytt.test(y)):o,g=m.length>0?m.length===1?m[0]:m:null;let S=f?n==null?void 0:n.shell:null;if(!S){const y=_z({...e,children:[]},t);S={props:y.props,type:y.type}}return{children:a,key:r,node:e,react:h.jsx(S.type,{...S.props,children:g},r),shell:S}}function Stt(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:a,position:o,...l}=n;return Tf(s,l)}function Du(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 o=0;os?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(hi(e,e.length,0,n),e):n}const $S={}.hasOwnProperty;function xz(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 Zi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function tn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return on(c)?(e.enter(t),l(c)):n(c)}function l(c){return on(c)&&a++o))return;const j=n.events.length;let T=j,D,I;for(;T--;)if(n.events[T][0]==="exit"&&n.events[T][1].type==="chunkFlow"){if(D){I=n.events[T][1].end;break}D=!0}for(v(r),E=j;Ey;){const A=t[C];n.containerState=A[1],A[0].exit.call(n,e)}t.length=y}function x(){s.write([null]),a=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Mtt(e,n,t){return tn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Yu(e){if(e===null||Bn(e)||vc(e))return 1;if(qp(e))return 2}function Kp(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},m={...e[t][1].start};PS(f,-c),PS(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[t][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Mi(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Mi(d,[["enter",s,n],["enter",o,n],["exit",o,n],["enter",a,n]]),d=Mi(d,Kp(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Mi(d,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,d=Mi(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,hi(e,r-1,t-r+3,d),t=r+d.length-_-2;break}}for(t=-1;++t0&&on(E)?tn(e,x,"linePrefix",a+1)(E):x(E)}function x(E){return E===null||ht(E)?e.check(FS,k,C)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||ht(E)?(e.exit("codeFlowValue"),x(E)):(e.consume(E),y)}function C(E){return e.exit("codeFenced"),n(E)}function A(E,j,T){let D=0;return I;function I(X){return E.enter("lineEnding"),E.consume(X),E.exit("lineEnding"),P}function P(X){return E.enter("codeFencedFence"),on(X)?tn(E,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):H(X)}function H(X){return X===l?(E.enter("codeFencedFenceSequence"),F(X)):T(X)}function F(X){return X===l?(D++,E.consume(X),F):D>=o?(E.exit("codeFencedFenceSequence"),on(X)?tn(E,V,"whitespace")(X):V(X)):T(X)}function V(X){return X===null||ht(X)?(E.exit("codeFencedFence"),j(X)):T(X)}}}function qtt(e,n,t){const r=this;return s;function s(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const cv={name:"codeIndented",tokenize:Vtt},Gtt={partial:!0,tokenize:Wtt};function Vtt(e,n,t){const r=this;return s;function s(d){return e.enter("codeIndented"),tn(e,a,"linePrefix",5)(d)}function a(d){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?o(d):t(d)}function o(d){return d===null?c(d):ht(d)?e.attempt(Gtt,o,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||ht(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),n(d)}}function Wtt(e,n,t){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?t(o):ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):tn(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):ht(o)?s(o):t(o)}}const Ktt={name:"codeText",previous:Xtt,resolve:Ytt,tokenize:Ztt};function Ytt(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 a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&hf(this.left,r),a.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),hf(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),hf(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(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Ez(e,n,t,r,s,a,o,l,c){const d=c||Number.POSITIVE_INFINITY;let _=0;return f;function f(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),m):v===null||v===32||v===41||sp(v)?t(v):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),k(v))}function m(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===62?(e.exit("chunkString"),e.exit(l),m(v)):v===null||v===60||ht(v)?t(v):(e.consume(v),v===92?S:g)}function S(v){return v===60||v===62||v===92?(e.consume(v),g):g(v)}function k(v){return!_&&(v===null||v===41||Bn(v))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),n(v)):_999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(e.exit(a),e.enter(s),e.consume(g),e.exit(s),e.exit(r),n):ht(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||ht(g)||l++>999?(e.exit("chunkString"),_(g)):(e.consume(g),c||(c=!on(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}}function zz(e,n,t,r,s,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),o=m===40?41:m,c):t(m)}function c(m){return m===o?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):(e.enter(a),d(m))}function d(m){return m===o?(e.exit(a),c(o)):m===null?t(m):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),tn(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===o||m===null||ht(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:_)}function f(m){return m===o||m===92?(e.consume(m),_):_(m)}}function jf(e,n){let t;return r;function r(s){return ht(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):on(s)?tn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const int={name:"definition",tokenize:ont},ant={partial:!0,tokenize:lnt};function ont(e,n,t){const r=this;let s;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return Nz.call(r,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return s=Zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):t(g)}function c(g){return Bn(g)?jf(e,d)(g):d(g)}function d(g){return Ez(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function _(g){return e.attempt(ant,f,f)(g)}function f(g){return on(g)?tn(e,m,"whitespace")(g):m(g)}function m(g){return g===null||ht(g)?(e.exit("definition"),r.parser.defined.push(s),n(g)):t(g)}}function lnt(e,n,t){return r;function r(l){return Bn(l)?jf(e,s)(l):t(l)}function s(l){return zz(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return on(l)?tn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||ht(l)?n(l):t(l)}}const cnt={name:"hardBreakEscape",tokenize:unt};function unt(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return ht(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const dnt={name:"headingAtx",resolve:fnt,tokenize:hnt};function fnt(e,n){let t=e.length-2,r=3,s,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},hi(e,r,t-r+1,[["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n]])),e}function hnt(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),a(_)}function a(_){return e.enter("atxHeadingSequence"),o(_)}function o(_){return _===35&&r++<6?(e.consume(_),o):_===null||Bn(_)?(e.exit("atxHeadingSequence"),l(_)):t(_)}function l(_){return _===35?(e.enter("atxHeadingSequence"),c(_)):_===null||ht(_)?(e.exit("atxHeading"),n(_)):on(_)?tn(e,l,"whitespace")(_):(e.enter("atxHeadingText"),d(_))}function c(_){return _===35?(e.consume(_),c):(e.exit("atxHeadingSequence"),l(_))}function d(_){return _===null||_===35||Bn(_)?(e.exit("atxHeadingText"),l(_)):(e.consume(_),d)}}const _nt=["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"],qS=["pre","script","style","textarea"],pnt={concrete:!0,name:"htmlFlow",resolveTo:vnt,tokenize:bnt},mnt={partial:!0,tokenize:ynt},gnt={partial:!0,tokenize:xnt};function vnt(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 bnt(e,n,t){const r=this;let s,a,o,l,c;return d;function d(G){return _(G)}function _(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),f}function f(G){return G===33?(e.consume(G),m):G===47?(e.consume(G),a=!0,k):G===63?(e.consume(G),s=3,r.interrupt?n:L):Ns(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function m(G){return G===45?(e.consume(G),s=2,g):G===91?(e.consume(G),s=5,l=0,S):Ns(G)?(e.consume(G),s=4,r.interrupt?n:L):t(G)}function g(G){return G===45?(e.consume(G),r.interrupt?n:L):t(G)}function S(G){const re="CDATA[";return G===re.charCodeAt(l++)?(e.consume(G),l===re.length?r.interrupt?n:H:S):t(G)}function k(G){return Ns(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function b(G){if(G===null||G===47||G===62||Bn(G)){const re=G===47,oe=o.toLowerCase();return!re&&!a&&qS.includes(oe)?(s=1,r.interrupt?n(G):H(G)):_nt.includes(o.toLowerCase())?(s=6,re?(e.consume(G),v):r.interrupt?n(G):H(G)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):a?x(G):y(G))}return G===45||ps(G)?(e.consume(G),o+=String.fromCharCode(G),b):t(G)}function v(G){return G===62?(e.consume(G),r.interrupt?n:H):t(G)}function x(G){return on(G)?(e.consume(G),x):I(G)}function y(G){return G===47?(e.consume(G),I):G===58||G===95||Ns(G)?(e.consume(G),C):on(G)?(e.consume(G),y):I(G)}function C(G){return G===45||G===46||G===58||G===95||ps(G)?(e.consume(G),C):A(G)}function A(G){return G===61?(e.consume(G),E):on(G)?(e.consume(G),A):y(G)}function E(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(e.consume(G),c=G,j):on(G)?(e.consume(G),E):T(G)}function j(G){return G===c?(e.consume(G),c=null,D):G===null||ht(G)?t(G):(e.consume(G),j)}function T(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||Bn(G)?A(G):(e.consume(G),T)}function D(G){return G===47||G===62||on(G)?y(G):t(G)}function I(G){return G===62?(e.consume(G),P):t(G)}function P(G){return G===null||ht(G)?H(G):on(G)?(e.consume(G),P):t(G)}function H(G){return G===45&&s===2?(e.consume(G),W):G===60&&s===1?(e.consume(G),Z):G===62&&s===4?(e.consume(G),$):G===63&&s===3?(e.consume(G),L):G===93&&s===5?(e.consume(G),B):ht(G)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(mnt,K,F)(G)):G===null||ht(G)?(e.exit("htmlFlowData"),F(G)):(e.consume(G),H)}function F(G){return e.check(gnt,V,K)(G)}function V(G){return e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),X}function X(G){return G===null||ht(G)?F(G):(e.enter("htmlFlowData"),H(G))}function W(G){return G===45?(e.consume(G),L):H(G)}function Z(G){return G===47?(e.consume(G),o="",J):H(G)}function J(G){if(G===62){const re=o.toLowerCase();return qS.includes(re)?(e.consume(G),$):H(G)}return Ns(G)&&o.length<8?(e.consume(G),o+=String.fromCharCode(G),J):H(G)}function B(G){return G===93?(e.consume(G),L):H(G)}function L(G){return G===62?(e.consume(G),$):G===45&&s===2?(e.consume(G),L):H(G)}function $(G){return G===null||ht(G)?(e.exit("htmlFlowData"),K(G)):(e.consume(G),$)}function K(G){return e.exit("htmlFlow"),n(G)}}function xnt(e,n,t){const r=this;return s;function s(o){return ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function ynt(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ch,n,t)}}const wnt={name:"htmlText",tokenize:Snt};function Snt(e,n,t){const r=this;let s,a,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),d):L===47?(e.consume(L),A):L===63?(e.consume(L),y):Ns(L)?(e.consume(L),T):t(L)}function d(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),a=0,S):Ns(L)?(e.consume(L),x):t(L)}function _(L){return L===45?(e.consume(L),g):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),m):ht(L)?(o=f,Z(L)):(e.consume(L),f)}function m(L){return L===45?(e.consume(L),g):f(L)}function g(L){return L===62?W(L):L===45?m(L):f(L)}function S(L){const $="CDATA[";return L===$.charCodeAt(a++)?(e.consume(L),a===$.length?k:S):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),b):ht(L)?(o=k,Z(L)):(e.consume(L),k)}function b(L){return L===93?(e.consume(L),v):k(L)}function v(L){return L===62?W(L):L===93?(e.consume(L),v):k(L)}function x(L){return L===null||L===62?W(L):ht(L)?(o=x,Z(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):ht(L)?(o=y,Z(L)):(e.consume(L),y)}function C(L){return L===62?W(L):y(L)}function A(L){return Ns(L)?(e.consume(L),E):t(L)}function E(L){return L===45||ps(L)?(e.consume(L),E):j(L)}function j(L){return ht(L)?(o=j,Z(L)):on(L)?(e.consume(L),j):W(L)}function T(L){return L===45||ps(L)?(e.consume(L),T):L===47||L===62||Bn(L)?D(L):t(L)}function D(L){return L===47?(e.consume(L),W):L===58||L===95||Ns(L)?(e.consume(L),I):ht(L)?(o=D,Z(L)):on(L)?(e.consume(L),D):W(L)}function I(L){return L===45||L===46||L===58||L===95||ps(L)?(e.consume(L),I):P(L)}function P(L){return L===61?(e.consume(L),H):ht(L)?(o=P,Z(L)):on(L)?(e.consume(L),P):D(L)}function H(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,F):ht(L)?(o=H,Z(L)):on(L)?(e.consume(L),H):(e.consume(L),V)}function F(L){return L===s?(e.consume(L),s=void 0,X):L===null?t(L):ht(L)?(o=F,Z(L)):(e.consume(L),F)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||Bn(L)?D(L):(e.consume(L),V)}function X(L){return L===47||L===62||Bn(L)?D(L):t(L)}function W(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 on(L)?tn(e,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):B(L)}function B(L){return e.enter("htmlTextData"),o(L)}}const ty={name:"labelEnd",resolveAll:Nnt,resolveTo:znt,tokenize:Ant},knt={tokenize:Tnt},Cnt={tokenize:jnt},Ent={tokenize:Mnt};function Nnt(e){let n=-1;const t=[];for(;++n=3&&(d===null||ht(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===s?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),on(d)?tn(e,l,"whitespace")(d):l(d))}}const Fs={continuation:{tokenize:Fnt},exit:qnt,name:"list",tokenize:Pnt},$nt={partial:!0,tokenize:Gnt},Hnt={partial:!0,tokenize:Unt};function Pnt(e,n,t){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Bb(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(M0,t,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return t(g)}function c(g){return Bb(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):t(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Ch,r.interrupt?t:_,e.attempt($nt,m,f))}function _(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function f(g){return on(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function Fnt(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ch,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tn(e,n,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!on(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Hnt,n,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,tn(e,e.attempt(Fs,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Unt(e,n,t){const r=this;return tn(e,s,"listItemIndent",r.containerState.size+1);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(a):t(a)}}function qnt(e){e.exit(this.containerState.type)}function Gnt(e,n,t){const r=this;return tn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const o=r.events[r.events.length-1];return!on(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const GS={name:"setextUnderline",resolveTo:Vnt,tokenize:Wnt};function Vnt(e,n){let t=e.length,r,s,a;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),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",o,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function Wnt(e,n,t){const r=this;let s;return a;function a(d){let _=r.events.length,f;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){f=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=d,o(d)):t(d)}function o(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===s?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),on(d)?tn(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||ht(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const Knt={tokenize:Ynt};function Ynt(e){const n=this,t=e.attempt(Ch,r,e.attempt(this.parser.constructs.flowInitial,s,tn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(ent,s)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const Xnt={resolveAll:Tz()},Znt=Az("string"),Qnt=Az("text");function Az(e){return{resolveAll:Tz(e==="text"?Jnt:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],a=t.attempt(s,o,l);return o;function o(_){return d(_)?a(_):l(_)}function l(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),c}function c(_){return d(_)?(t.exit("data"),a(_)):(t.consume(_),c)}function d(_){if(_===null)return!0;const f=s[_];let m=-1;if(f)for(;++m-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[s].slice(0,a))}return o}function frt(e,n){let t=-1;const r=[];let s;for(;++t"u"||e.call(d,m)},o=function(d,_){t&&_.name==="__proto__"?t(d,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):d[_.name]=_.newValue},l=function(d,_){if(_==="__proto__")if(e.call(d,_)){if(r)return r(d,_).value}else return;return d[_]};return rv=function c(){var d,_,f,m,g,S,k=arguments[0],b=1,v=arguments.length,x=!1;for(typeof k=="boolean"&&(x=k,k=arguments[1]||{},b=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});bo.length;let c;l&&o.push(s);try{c=e.apply(this,o)}catch(d){const _=d;if(l&&t)throw _;return s(_)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,s):c instanceof Error?s(c):a(c))}function s(o,...l){t||(t=!0,n(o,...l))}function a(o){s(null,o)}}function Af(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ES(e.position):"start"in e||"end"in e?ES(e):"line"in e||"column"in e?Wb(e):""}function Wb(e){return NS(e&&e.line)+":"+NS(e&&e.column)}function ES(e){return Wb(e&&e.start)+"-"+Wb(e&&e.end)}function NS(e){return e&&typeof e=="number"?e:1}class gs extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let s="",a={},o=!1;if(t&&("line"in t&&"column"in t?a={place:t}:"start"in t&&"end"in t?a={place:t}:"type"in t?a={ancestors:[t],place:t.position}:a={...t}),typeof n=="string"?s=n:!a.cause&&n&&(o=!0,s=n.message,a.cause=n),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=l?l.line:void 0,this.name=Af(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gs.prototype.file="";gs.prototype.name="";gs.prototype.reason="";gs.prototype.message="";gs.prototype.stack="";gs.prototype.column=void 0;gs.prototype.line=void 0;gs.prototype.ancestors=void 0;gs.prototype.cause=void 0;gs.prototype.fatal=void 0;gs.prototype.place=void 0;gs.prototype.ruleId=void 0;gs.prototype.source=void 0;const va={basename:Het,dirname:Pet,extname:Fet,join:Uet,sep:"/"};function Het(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Ch(e);let t=0,r=-1,s=e.length,a;if(n===void 0||n.length===0||n.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,l=n.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){t=s+1;break}}else o<0&&(a=!0,o=s+1),l>-1&&(e.codePointAt(s)===n.codePointAt(l--)?l<0&&(r=s):(l=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Pet(e){if(Ch(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 Fet(e){Ch(e);let n=e.length,t=-1,r=0,s=-1,a=0,o;for(;n--;){const l=e.codePointAt(n);if(l===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),l===46?s<0?s=n:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||t<0||a===0||a===1&&s===t-1&&s===r+1?"":e.slice(s,t)}function Uet(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function Get(e,n){let t="",r=0,s=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o2){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=o,a=0;continue}}else if(t.length>0){t="",r=0,s=o,a=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(s+1,o):t=e.slice(s+1,o),r=o-s-1;s=o,a=0}else l===46&&a>-1?a++:a=-1}return t}function Ch(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Vet={cwd:Wet};function Wet(){return"/"}function Kb(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Ket(e){if(typeof e=="string")e=new URL(e);else if(!Kb(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 Yet(e)}function Yet(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[g,...S]=_;const k=r[m][1];Vb(k)&&Vb(g)&&(g=sv(!0,k,g)),r[m]=[d,g,...S]}}}}const ey=new Jx().freeze();function lv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cv(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function uv(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 AS(e){if(!Vb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function TS(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function a0(e){return Jet(e)?e:new fz(e)}function Jet(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ett(e){return typeof e=="string"||ttt(e)}function ttt(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var jS=Object.prototype.hasOwnProperty;function MS(e,n,t){for(t of e.keys())if(Tf(t,n))return t}function Tf(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--&&Tf(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=MS(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=MS(n,s),!s)||!Tf(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(jS.call(e,t)&&++r&&!jS.call(n,t)||!(t in n)||!Tf(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}function RS(e){const n=[],t=String(e||"");let r=t.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=t.length,a=!0);const o=t.slice(s,r).trim();(o||!a)&&n.push(o),s=r+1,r=t.indexOf(",",s)}return n}function ntt(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const rtt=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,stt=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,itt={};function DS(e,n){return(itt.jsx?stt:rtt).test(e)}const att=/[ \t\n\f\r]/g;function ott(e){return typeof e=="object"?e.type==="text"?LS(e.value):!1:LS(e)}function LS(e){return e.replace(att,"")===""}class Eh{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Eh.prototype.normal={};Eh.prototype.property={};Eh.prototype.space=void 0;function hz(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Eh(t,r,n)}function qf(e){return e.toLowerCase()}class Xs{constructor(n,t){this.attribute=t,this.property=n}}Xs.prototype.attribute="";Xs.prototype.booleanish=!1;Xs.prototype.boolean=!1;Xs.prototype.commaOrSpaceSeparated=!1;Xs.prototype.commaSeparated=!1;Xs.prototype.defined=!1;Xs.prototype.mustUseProperty=!1;Xs.prototype.number=!1;Xs.prototype.overloadedBoolean=!1;Xs.prototype.property="";Xs.prototype.spaceSeparated=!1;Xs.prototype.space=void 0;let ltt=0;const Bt=Ac(),jr=Ac(),Yb=Ac(),Ue=Ac(),Bn=Ac(),_c=Ac(),li=Ac();function Ac(){return 2**++ltt}const Xb=Object.freeze(Object.defineProperty({__proto__:null,boolean:Bt,booleanish:jr,commaOrSpaceSeparated:li,commaSeparated:_c,number:Ue,overloadedBoolean:Yb,spaceSeparated:Bn},Symbol.toStringTag,{value:"Module"})),dv=Object.keys(Xb);class ty extends Xs{constructor(n,t,r,s){let a=-1;if(super(n,t),OS(this,"space",s),typeof r=="number")for(;++a4&&t.slice(0,4)==="data"&&htt.test(n)){if(n.charAt(4)==="-"){const a=n.slice(5).replace(IS,ptt);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=n.slice(4);if(!IS.test(a)){let o=a.replace(ftt,_tt);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}s=ty}return new s(r,n)}function _tt(e){return"-"+e.toLowerCase()}function ptt(e){return e.charAt(1).toUpperCase()}const yz=hz([_z,ctt,gz,vz,bz],"html"),Qp=hz([_z,utt,gz,vz,bz],"svg");function BS(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function mtt(e){return e.join(" ").trim()}var vu={},fv,$S;function gtt(){if($S)return fv;$S=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` +`,d="/",_="*",f="",m="comment",g="declaration";function S(b,v){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];v=v||{};var x=1,y=1;function C(V){var X=V.match(n);X&&(x+=X.length);var W=V.lastIndexOf(c);y=~W?V.length-W:y+V.length}function A(){var V={line:x,column:y};return function(X){return X.position=new E(V),D(),X}}function E(V){this.start=V,this.end={line:x,column:y},this.source=v.source}E.prototype.content=b;function j(V){var X=new Error(v.source+":"+x+":"+y+": "+V);if(X.reason=V,X.filename=v.source,X.line=x,X.column=y,X.source=b,!v.silent)throw X}function T(V){var X=V.exec(b);if(X){var W=X[0];return C(W),b=b.slice(W.length),X}}function D(){T(t)}function I(V){var X;for(V=V||[];X=P();)X!==!1&&V.push(X);return V}function P(){var V=A();if(!(d!=b.charAt(0)||_!=b.charAt(1))){for(var X=2;f!=b.charAt(X)&&(_!=b.charAt(X)||d!=b.charAt(X+1));)++X;if(X+=2,f===b.charAt(X-1))return j("End of comment missing");var W=b.slice(2,X-2);return y+=2,C(W),b=b.slice(X),y+=2,V({type:m,comment:W})}}function B(){var V=A(),X=T(r);if(X){if(P(),!T(s))return j("property missing ':'");var W=T(a),Z=V({type:g,property:k(X[0].replace(e,f)),value:W?k(W[0].replace(e,f)):f});return T(o),Z}}function F(){var V=[];I(V);for(var X;X=B();)X!==!1&&(V.push(X),I(V));return V}return D(),F()}function k(b){return b?b.replace(l,f):f}return fv=S,fv}var HS;function vtt(){if(HS)return vu;HS=1;var e=vu&&vu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(vu,"__esModule",{value:!0}),vu.default=t;const n=e(gtt());function t(r,s){let a=null;if(!r||typeof r!="string")return a;const o=(0,n.default)(r),l=typeof s=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:d,value:_}=c;l?s(d,_,c):_&&(a=a||{},a[d]=_)}),a}return vu}var df={},PS;function btt(){if(PS)return df;PS=1,Object.defineProperty(df,"__esModule",{value:!0}),df.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||t.test(d)||e.test(d)},o=function(d,_){return _.toUpperCase()},l=function(d,_){return"".concat(_,"-")},c=function(d,_){return _===void 0&&(_={}),a(d)?d:(d=d.toLowerCase(),_.reactCompat?d=d.replace(s,l):d=d.replace(r,l),d.replace(n,o))};return df.camelCase=c,df}var ff,FS;function xtt(){if(FS)return ff;FS=1;var e=ff&&ff.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(vtt()),t=btt();function r(s,a){var o={};return!s||typeof s!="string"||(0,n.default)(s,function(l,c){l&&c&&(o[(0,t.camelCase)(l,a)]=c)}),o}return r.default=r,ff=r,ff}var ytt=xtt();const wtt=xh(ytt),ny={}.hasOwnProperty,Stt=new Map,ktt=/[A-Z]/g,Ctt=new Set(["table","tbody","thead","tfoot","tr"]),Ett=new Set(["td","th"]),wz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Sz(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=Dtt(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=Rtt(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"?Qp:yz,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},a=kz(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function kz(e,n,t){if(n.type==="element")return Ntt(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return ztt(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ttt(e,n,t);if(n.type==="mdxjsEsm")return Att(e,n);if(n.type==="root")return jtt(e,n,t);if(n.type==="text")return Mtt(e,n)}function Ntt(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Qp,e.schema=s),e.ancestors.push(n);const a=Ez(e,n.tagName,!1),o=Ltt(e,n);let l=sy(e,n);return Ctt.has(n.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!ott(c):!0})),Cz(e,o,a,n),ry(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function ztt(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)}Gf(e,n.position)}function Att(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Gf(e,n.position)}function Ttt(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=Qp,e.schema=s),e.ancestors.push(n);const a=n.name===null?e.Fragment:Ez(e,n.name,!0),o=Ott(e,n),l=sy(e,n);return Cz(e,o,a,n),ry(o,l),e.ancestors.pop(),e.schema=r,e.create(n,a,o,t)}function jtt(e,n,t){const r={};return ry(r,sy(e,n)),e.create(n,e.Fragment,r,t)}function Mtt(e,n){return n.value}function Cz(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function ry(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Rtt(e,n,t){return r;function r(s,a,o,l){const d=Array.isArray(o.children)?t:n;return l?d(a,o,l):d(a,o)}}function Dtt(e,n){return t;function t(r,s,a,o){const l=Array.isArray(a.children),c=Vx(r);return n(s,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Ltt(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&ny.call(n.properties,s)){const a=Itt(e,s,n.properties[s]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Ett.has(n.tagName)?r=l:t[o]=l}}if(r){const a=t.style||(t.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function Ott(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,e.evaluater.evaluateExpression(l.argument))}else Gf(e,n.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Gf(e,n.position);else a=r.value===null?!0:r.value;t[s]=a}return t}function sy(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:Stt;for(;++ry.key).filter(y=>y!==void 0));let d=0;for(;d=e.children.length-_&&(E=s.length-(e.children.length-y)),E>=0&&(A=((v=s[E])==null?void 0:v.key)??A);A&&c.has(A)&&((x=s[E])==null?void 0:x.key)!==A;)A=`${A}+`;A&&c.add(A);const j=Nz(C,s[E]??null,t,A);a.push(j),j.react!==void 0&&o.push(j.react)}const f=n!==null&&Gtt(e,n.node);if(n&&n.key===r&&f&&s.length===a.length&&a.every((y,C)=>y===s[C]))return n;const m=e.type==="element"&&Ftt.has(e.tagName)?o.filter(y=>typeof y!="string"||!Utt.test(y)):o,g=m.length>0?m.length===1?m[0]:m:null;let S=f?n==null?void 0:n.shell:null;if(!S){const y=Sz({...e,children:[]},t);S={props:y.props,type:y.type}}return{children:a,key:r,node:e,react:h.jsx(S.type,{...S.props,children:g},r),shell:S}}function Gtt(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:a,position:o,...l}=n;return Tf(s,l)}function Ou(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 o=0;os?0:s+n:n=n>s?s:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);a0?(di(e,e.length,0,n),e):n}const GS={}.hasOwnProperty;function Az(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 Zi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}function tn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return on(c)?(e.enter(t),l(c)):n(c)}function l(c){return on(c)&&a++o))return;const j=n.events.length;let T=j,D,I;for(;T--;)if(n.events[T][0]==="exit"&&n.events[T][1].type==="chunkFlow"){if(D){I=n.events[T][1].end;break}D=!0}for(v(r),E=j;Ey;){const A=t[C];n.containerState=A[1],A[0].exit.call(n,e)}t.length=y}function x(){s.write([null]),a=void 0,s=void 0,n.containerState._closeFlow=void 0}}function ent(e,n,t){return tn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zu(e){if(e===null||$n(e)||bc(e))return 1;if(Yp(e))return 2}function Jp(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},m={...e[t][1].start};WS(f,-c),WS(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:m},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},s={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[t][1].start={...l.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=Ri(d,[["enter",e[r][1],n],["exit",e[r][1],n]])),d=Ri(d,[["enter",s,n],["enter",o,n],["exit",o,n],["enter",a,n]]),d=Ri(d,Jp(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),d=Ri(d,[["exit",a,n],["enter",l,n],["exit",l,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(_=2,d=Ri(d,[["enter",e[t][1],n],["exit",e[t][1],n]])):_=0,di(e,r-1,t-r+3,d),t=r+d.length-_-2;break}}for(t=-1;++t0&&on(E)?tn(e,x,"linePrefix",a+1)(E):x(E)}function x(E){return E===null||_t(E)?e.check(KS,k,C)(E):(e.enter("codeFlowValue"),y(E))}function y(E){return E===null||_t(E)?(e.exit("codeFlowValue"),x(E)):(e.consume(E),y)}function C(E){return e.exit("codeFenced"),n(E)}function A(E,j,T){let D=0;return I;function I(X){return E.enter("lineEnding"),E.consume(X),E.exit("lineEnding"),P}function P(X){return E.enter("codeFencedFence"),on(X)?tn(E,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(X):B(X)}function B(X){return X===l?(E.enter("codeFencedFenceSequence"),F(X)):T(X)}function F(X){return X===l?(D++,E.consume(X),F):D>=o?(E.exit("codeFencedFenceSequence"),on(X)?tn(E,V,"whitespace")(X):V(X)):T(X)}function V(X){return X===null||_t(X)?(E.exit("codeFencedFence"),j(X)):T(X)}}}function fnt(e,n,t){const r=this;return s;function s(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const hv={name:"codeIndented",tokenize:_nt},hnt={partial:!0,tokenize:pnt};function _nt(e,n,t){const r=this;return s;function s(d){return e.enter("codeIndented"),tn(e,a,"linePrefix",5)(d)}function a(d){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?o(d):t(d)}function o(d){return d===null?c(d):_t(d)?e.attempt(hnt,o,c)(d):(e.enter("codeFlowValue"),l(d))}function l(d){return d===null||_t(d)?(e.exit("codeFlowValue"),o(d)):(e.consume(d),l)}function c(d){return e.exit("codeIndented"),n(d)}}function pnt(e,n,t){const r=this;return s;function s(o){return r.parser.lazy[r.now().line]?t(o):_t(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):tn(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?n(o):_t(o)?s(o):t(o)}}const mnt={name:"codeText",previous:vnt,resolve:gnt,tokenize:bnt};function gnt(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 a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&hf(this.left,r),a.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),hf(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),hf(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(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Lz(e,n,t,r,s,a,o,l,c){const d=c||Number.POSITIVE_INFINITY;let _=0;return f;function f(v){return v===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(v),e.exit(a),m):v===null||v===32||v===41||cp(v)?t(v):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),k(v))}function m(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(s),e.exit(r),n):(e.enter(l),e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===62?(e.exit("chunkString"),e.exit(l),m(v)):v===null||v===60||_t(v)?t(v):(e.consume(v),v===92?S:g)}function S(v){return v===60||v===62||v===92?(e.consume(v),g):g(v)}function k(v){return!_&&(v===null||v===41||$n(v))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),n(v)):_999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(e.exit(a),e.enter(s),e.consume(g),e.exit(s),e.exit(r),n):_t(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),_):(e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===null||g===91||g===93||_t(g)||l++>999?(e.exit("chunkString"),_(g)):(e.consume(g),c||(c=!on(g)),g===92?m:f)}function m(g){return g===91||g===92||g===93?(e.consume(g),l++,f):f(g)}}function Iz(e,n,t,r,s,a){let o;return l;function l(m){return m===34||m===39||m===40?(e.enter(r),e.enter(s),e.consume(m),e.exit(s),o=m===40?41:m,c):t(m)}function c(m){return m===o?(e.enter(s),e.consume(m),e.exit(s),e.exit(r),n):(e.enter(a),d(m))}function d(m){return m===o?(e.exit(a),c(o)):m===null?t(m):_t(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),tn(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),_(m))}function _(m){return m===o||m===null||_t(m)?(e.exit("chunkString"),d(m)):(e.consume(m),m===92?f:_)}function f(m){return m===o||m===92?(e.consume(m),_):_(m)}}function jf(e,n){let t;return r;function r(s){return _t(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):on(s)?tn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const Nnt={name:"definition",tokenize:Ant},znt={partial:!0,tokenize:Tnt};function Ant(e,n,t){const r=this;let s;return a;function a(g){return e.enter("definition"),o(g)}function o(g){return Oz.call(r,e,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return s=Zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),c):t(g)}function c(g){return $n(g)?jf(e,d)(g):d(g)}function d(g){return Lz(e,_,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function _(g){return e.attempt(znt,f,f)(g)}function f(g){return on(g)?tn(e,m,"whitespace")(g):m(g)}function m(g){return g===null||_t(g)?(e.exit("definition"),r.parser.defined.push(s),n(g)):t(g)}}function Tnt(e,n,t){return r;function r(l){return $n(l)?jf(e,s)(l):t(l)}function s(l){return Iz(e,a,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return on(l)?tn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||_t(l)?n(l):t(l)}}const jnt={name:"hardBreakEscape",tokenize:Mnt};function Mnt(e,n,t){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return _t(a)?(e.exit("hardBreakEscape"),n(a)):t(a)}}const Rnt={name:"headingAtx",resolve:Dnt,tokenize:Lnt};function Dnt(e,n){let t=e.length-2,r=3,s,a;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},a={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},di(e,r,t-r+1,[["enter",s,n],["enter",a,n],["exit",a,n],["exit",s,n]])),e}function Lnt(e,n,t){let r=0;return s;function s(_){return e.enter("atxHeading"),a(_)}function a(_){return e.enter("atxHeadingSequence"),o(_)}function o(_){return _===35&&r++<6?(e.consume(_),o):_===null||$n(_)?(e.exit("atxHeadingSequence"),l(_)):t(_)}function l(_){return _===35?(e.enter("atxHeadingSequence"),c(_)):_===null||_t(_)?(e.exit("atxHeading"),n(_)):on(_)?tn(e,l,"whitespace")(_):(e.enter("atxHeadingText"),d(_))}function c(_){return _===35?(e.consume(_),c):(e.exit("atxHeadingSequence"),l(_))}function d(_){return _===null||_===35||$n(_)?(e.exit("atxHeadingText"),l(_)):(e.consume(_),d)}}const Ont=["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"],XS=["pre","script","style","textarea"],Int={concrete:!0,name:"htmlFlow",resolveTo:Hnt,tokenize:Pnt},Bnt={partial:!0,tokenize:Unt},$nt={partial:!0,tokenize:Fnt};function Hnt(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 Pnt(e,n,t){const r=this;let s,a,o,l,c;return d;function d(G){return _(G)}function _(G){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(G),f}function f(G){return G===33?(e.consume(G),m):G===47?(e.consume(G),a=!0,k):G===63?(e.consume(G),s=3,r.interrupt?n:L):zs(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function m(G){return G===45?(e.consume(G),s=2,g):G===91?(e.consume(G),s=5,l=0,S):zs(G)?(e.consume(G),s=4,r.interrupt?n:L):t(G)}function g(G){return G===45?(e.consume(G),r.interrupt?n:L):t(G)}function S(G){const ee="CDATA[";return G===ee.charCodeAt(l++)?(e.consume(G),l===ee.length?r.interrupt?n:B:S):t(G)}function k(G){return zs(G)?(e.consume(G),o=String.fromCharCode(G),b):t(G)}function b(G){if(G===null||G===47||G===62||$n(G)){const ee=G===47,oe=o.toLowerCase();return!ee&&!a&&XS.includes(oe)?(s=1,r.interrupt?n(G):B(G)):Ont.includes(o.toLowerCase())?(s=6,ee?(e.consume(G),v):r.interrupt?n(G):B(G)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(G):a?x(G):y(G))}return G===45||ps(G)?(e.consume(G),o+=String.fromCharCode(G),b):t(G)}function v(G){return G===62?(e.consume(G),r.interrupt?n:B):t(G)}function x(G){return on(G)?(e.consume(G),x):I(G)}function y(G){return G===47?(e.consume(G),I):G===58||G===95||zs(G)?(e.consume(G),C):on(G)?(e.consume(G),y):I(G)}function C(G){return G===45||G===46||G===58||G===95||ps(G)?(e.consume(G),C):A(G)}function A(G){return G===61?(e.consume(G),E):on(G)?(e.consume(G),A):y(G)}function E(G){return G===null||G===60||G===61||G===62||G===96?t(G):G===34||G===39?(e.consume(G),c=G,j):on(G)?(e.consume(G),E):T(G)}function j(G){return G===c?(e.consume(G),c=null,D):G===null||_t(G)?t(G):(e.consume(G),j)}function T(G){return G===null||G===34||G===39||G===47||G===60||G===61||G===62||G===96||$n(G)?A(G):(e.consume(G),T)}function D(G){return G===47||G===62||on(G)?y(G):t(G)}function I(G){return G===62?(e.consume(G),P):t(G)}function P(G){return G===null||_t(G)?B(G):on(G)?(e.consume(G),P):t(G)}function B(G){return G===45&&s===2?(e.consume(G),W):G===60&&s===1?(e.consume(G),Z):G===62&&s===4?(e.consume(G),H):G===63&&s===3?(e.consume(G),L):G===93&&s===5?(e.consume(G),$):_t(G)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Bnt,Y,F)(G)):G===null||_t(G)?(e.exit("htmlFlowData"),F(G)):(e.consume(G),B)}function F(G){return e.check($nt,V,Y)(G)}function V(G){return e.enter("lineEnding"),e.consume(G),e.exit("lineEnding"),X}function X(G){return G===null||_t(G)?F(G):(e.enter("htmlFlowData"),B(G))}function W(G){return G===45?(e.consume(G),L):B(G)}function Z(G){return G===47?(e.consume(G),o="",J):B(G)}function J(G){if(G===62){const ee=o.toLowerCase();return XS.includes(ee)?(e.consume(G),H):B(G)}return zs(G)&&o.length<8?(e.consume(G),o+=String.fromCharCode(G),J):B(G)}function $(G){return G===93?(e.consume(G),L):B(G)}function L(G){return G===62?(e.consume(G),H):G===45&&s===2?(e.consume(G),L):B(G)}function H(G){return G===null||_t(G)?(e.exit("htmlFlowData"),Y(G)):(e.consume(G),H)}function Y(G){return e.exit("htmlFlow"),n(G)}}function Fnt(e,n,t){const r=this;return s;function s(o){return _t(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):t(o)}function a(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Unt(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Nh,n,t)}}const qnt={name:"htmlText",tokenize:Gnt};function Gnt(e,n,t){const r=this;let s,a,o;return l;function l(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),d):L===47?(e.consume(L),A):L===63?(e.consume(L),y):zs(L)?(e.consume(L),T):t(L)}function d(L){return L===45?(e.consume(L),_):L===91?(e.consume(L),a=0,S):zs(L)?(e.consume(L),x):t(L)}function _(L){return L===45?(e.consume(L),g):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),m):_t(L)?(o=f,Z(L)):(e.consume(L),f)}function m(L){return L===45?(e.consume(L),g):f(L)}function g(L){return L===62?W(L):L===45?m(L):f(L)}function S(L){const H="CDATA[";return L===H.charCodeAt(a++)?(e.consume(L),a===H.length?k:S):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),b):_t(L)?(o=k,Z(L)):(e.consume(L),k)}function b(L){return L===93?(e.consume(L),v):k(L)}function v(L){return L===62?W(L):L===93?(e.consume(L),v):k(L)}function x(L){return L===null||L===62?W(L):_t(L)?(o=x,Z(L)):(e.consume(L),x)}function y(L){return L===null?t(L):L===63?(e.consume(L),C):_t(L)?(o=y,Z(L)):(e.consume(L),y)}function C(L){return L===62?W(L):y(L)}function A(L){return zs(L)?(e.consume(L),E):t(L)}function E(L){return L===45||ps(L)?(e.consume(L),E):j(L)}function j(L){return _t(L)?(o=j,Z(L)):on(L)?(e.consume(L),j):W(L)}function T(L){return L===45||ps(L)?(e.consume(L),T):L===47||L===62||$n(L)?D(L):t(L)}function D(L){return L===47?(e.consume(L),W):L===58||L===95||zs(L)?(e.consume(L),I):_t(L)?(o=D,Z(L)):on(L)?(e.consume(L),D):W(L)}function I(L){return L===45||L===46||L===58||L===95||ps(L)?(e.consume(L),I):P(L)}function P(L){return L===61?(e.consume(L),B):_t(L)?(o=P,Z(L)):on(L)?(e.consume(L),P):D(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,F):_t(L)?(o=B,Z(L)):on(L)?(e.consume(L),B):(e.consume(L),V)}function F(L){return L===s?(e.consume(L),s=void 0,X):L===null?t(L):_t(L)?(o=F,Z(L)):(e.consume(L),F)}function V(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||$n(L)?D(L):(e.consume(L),V)}function X(L){return L===47||L===62||$n(L)?D(L):t(L)}function W(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 on(L)?tn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),o(L)}}const ay={name:"labelEnd",resolveAll:Ynt,resolveTo:Xnt,tokenize:Znt},Vnt={tokenize:Qnt},Wnt={tokenize:Jnt},Knt={tokenize:ert};function Ynt(e){let n=-1;const t=[];for(;++n=3&&(d===null||_t(d))?(e.exit("thematicBreak"),n(d)):t(d)}function c(d){return d===s?(e.consume(d),r++,c):(e.exit("thematicBreakSequence"),on(d)?tn(e,l,"whitespace")(d):l(d))}}const qs={continuation:{tokenize:urt},exit:frt,name:"list",tokenize:crt},ort={partial:!0,tokenize:hrt},lrt={partial:!0,tokenize:drt};function crt(e,n,t){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return l;function l(g){const S=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Ub(g)){if(r.containerState.type||(r.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(B0,t,d)(g):d(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(g)}return t(g)}function c(g){return Ub(g)&&++o<10?(e.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),d(g)):t(g)}function d(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Nh,r.interrupt?t:_,e.attempt(ort,m,f))}function _(g){return r.containerState.initialBlankLine=!0,a++,m(g)}function f(g){return on(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(g)}}function urt(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Nh,s,a);function s(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,tn(e,n,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!on(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lrt,n,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,tn(e,e.attempt(qs,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function drt(e,n,t){const r=this;return tn(e,s,"listItemIndent",r.containerState.size+1);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(a):t(a)}}function frt(e){e.exit(this.containerState.type)}function hrt(e,n,t){const r=this;return tn(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const o=r.events[r.events.length-1];return!on(a)&&o&&o[1].type==="listItemPrefixWhitespace"?n(a):t(a)}}const ZS={name:"setextUnderline",resolveTo:_rt,tokenize:prt};function _rt(e,n){let t=e.length,r,s,a;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),!a&&e[t][1].type==="definition"&&(a=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",o,n]),e.splice(a+1,0,["exit",e[r][1],n]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function prt(e,n,t){const r=this;let s;return a;function a(d){let _=r.events.length,f;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){f=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),s=d,o(d)):t(d)}function o(d){return e.enter("setextHeadingLineSequence"),l(d)}function l(d){return d===s?(e.consume(d),l):(e.exit("setextHeadingLineSequence"),on(d)?tn(e,c,"lineSuffix")(d):c(d))}function c(d){return d===null||_t(d)?(e.exit("setextHeadingLine"),n(d)):t(d)}}const mrt={tokenize:grt};function grt(e){const n=this,t=e.attempt(Nh,r,e.attempt(this.parser.constructs.flowInitial,s,tn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(wnt,s)),"linePrefix")));return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const vrt={resolveAll:$z()},brt=Bz("string"),xrt=Bz("text");function Bz(e){return{resolveAll:$z(e==="text"?yrt:void 0),tokenize:n};function n(t){const r=this,s=this.parser.constructs[e],a=t.attempt(s,o,l);return o;function o(_){return d(_)?a(_):l(_)}function l(_){if(_===null){t.consume(_);return}return t.enter("data"),t.consume(_),c}function c(_){return d(_)?(t.exit("data"),a(_)):(t.consume(_),c)}function d(_){if(_===null)return!0;const f=s[_];let m=-1;if(f)for(;++m-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[s].slice(0,a))}return o}function Drt(e,n){let t=-1;const r=[];let s;for(;++t0){const Ht=We.tokenStack[We.tokenStack.length-1];(Ht[1]||WS).call(We,void 0,Ht[0])}for(je.position={start:cl(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:cl(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt0&&(rs(this,ml,Zn(this,ml)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=KS(t)),Zn(this,ml)+Drt(t,r)}}ml=new WeakMap;const Srt=new Set(["*","**","_","__"]);function KS(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;t0){const Ht=We.tokenStack[We.tokenStack.length-1];(Ht[1]||JS).call(We,void 0,Ht[0])}for(je.position={start:ul(xe.length>0?xe[0][1].start:{line:1,column:1,offset:0}),end:ul(xe.length>0?xe[xe.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt0&&(rs(this,vl,Qn(this,vl)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=ek(t)),Qn(this,vl)+nst(t,r)}}vl=new WeakMap;const Grt=new Set(["*","**","_","__"]);function ek(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(Rrt(n)){YS(n,t,r);continue}const a=zrt(n,e,t);if(a>t){t=a-1;continue}const o=Art(n,e,t);if(o>t){t=o-1;continue}Qi(e,t)||YS(n,t,r)}return n}function krt(e,n,t){const r=n[t];return r==="`"?Crt(e,n,t):r==="$"?Ert(e,n,t):r==="~"?Nrt(e,n,t):t}function Crt(e,n,t){const r=ry(n,t),s="`".repeat(r),a=e.exclusive;return(a==null?void 0:a.kind)==="fence"?(a.token[0]==="`"&&lp(n,t)&&!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):(a==null?void 0:a.kind)==="code"?(!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):a||Qi(n,t)?t+r:r>=3&&lp(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Ert(e,n,t){const r=ry(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Qi(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function Nrt(e,n,t){const r=ry(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(lp(n,t)&&!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!lp(n,t)||Qi(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function zrt(e,n,t){if(n[t]!=="<"||Qi(n,t))return t;const r=n[t+1];if(r!==void 0&&!Lz(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function Art(e,n,t){const r=Trt(n,t);if(!r)return t;if(Qi(n,t))return t+r.length;const s=e.delims.findLastIndex(a=>a.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):(jrt(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Trt(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 jrt(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!QS(s)||!QS(r)}function YS(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 Mrt(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 Rrt(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function Drt(e,n){n.pendingHtml!==null&&(e=e.slice(0,Irt(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return ga(Lrt(e,t));const r=Ort(n);if(r)return ga(Tu(e,r));const s=Hrt(n);return s?s.kind==="delim"?ga(Wb(e,s.start,s.token.length)?Rz(e,s.token):e.slice(0,s.start)):Wb(e,s.start,s.token.length)?s.kind==="fence"?ga(e):s.kind==="code"?ga(Tu(e,s.token)):s.token==="$$"?ga(Tu(e,(e.endsWith(` +`){est(n),n.exclusive||(n.commitIndex=t+1);continue}const s=Vrt(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(tst(n)){tk(n,t,r);continue}const a=Xrt(n,e,t);if(a>t){t=a-1;continue}const o=Zrt(n,e,t);if(o>t){t=o-1;continue}Qi(e,t)||tk(n,t,r)}return n}function Vrt(e,n,t){const r=n[t];return r==="`"?Wrt(e,n,t):r==="$"?Krt(e,n,t):r==="~"?Yrt(e,n,t):t}function Wrt(e,n,t){const r=ly(n,t),s="`".repeat(r),a=e.exclusive;return(a==null?void 0:a.kind)==="fence"?(a.token[0]==="`"&&hp(n,t)&&!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):(a==null?void 0:a.kind)==="code"?(!Qi(n,t)&&r>=a.token.length&&(e.exclusive=null),t+r):a||Qi(n,t)?t+r:r>=3&&hp(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function Krt(e,n,t){const r=ly(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||Qi(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function Yrt(e,n,t){const r=ly(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(hp(n,t)&&!Qi(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!hp(n,t)||Qi(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function Xrt(e,n,t){if(n[t]!=="<"||Qi(n,t))return t;const r=n[t+1];if(r!==void 0&&!qz(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function Zrt(e,n,t){const r=Qrt(n,t);if(!r)return t;if(Qi(n,t))return t+r.length;const s=e.delims.findLastIndex(a=>a.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):(Jrt(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function Qrt(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 Jrt(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!sk(s)||!sk(r)}function tk(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 est(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 tst(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function nst(e,n){n.pendingHtml!==null&&(e=e.slice(0,ist(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return ma(rst(e,t));const r=sst(n);if(r)return ma(Mu(e,r));const s=lst(n);return s?s.kind==="delim"?ma(Qb(e,s.start,s.token.length)?Fz(e,s.token):e.slice(0,s.start)):Qb(e,s.start,s.token.length)?s.kind==="fence"?ma(e):s.kind==="code"?ma(Mu(e,s.token)):s.token==="$$"?ma(Mu(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?ga(e):ga(Tu(e,"$")):ga(s.kind==="fence"?e:e.slice(0,s.start)):ga(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function Lrt(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return Wb(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 Ort(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(!Srt.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function Irt(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!Brt(e,s,r))break;t=s,r=s}return t}function Brt(e,n,t){if(e[t-1]!==">"||Qi(e,n))return!1;const r=e[n+1];if(r!==void 0&&!Lz(r))return!1;for(let s=n+1;s"||a===` -`)return!1}return!0}function ga(e){var b;const n=e.lastIndexOf(` +`)+"$$")):/\s/.test(e[e.length-1]??"")?ma(e):ma(Mu(e,"$")):ma(s.kind==="fence"?e:e.slice(0,s.start)):ma(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function rst(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return Qb(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 sst(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(!Grt.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function ist(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!ast(e,s,r))break;t=s,r=s}return t}function ast(e,n,t){if(e[t-1]!==">"||Qi(e,n))return!1;const r=e[n+1];if(r!==void 0&&!qz(r))return!1;for(let s=n+1;s"||a===` +`)return!1}return!0}function ma(e){var b;const n=e.lastIndexOf(` `),t=n===-1?0:n+2,r=e.slice(0,t),s=e.slice(t),a=s.indexOf(` -`),o=a===-1?s:s.slice(0,a),l=(b=o.match(/^( *)\|/))==null?void 0:b[1];if(l===void 0)return e;if(XS(o)<2&&!Prt(o,l))return r;const c=o.trimEnd().endsWith("|")?o:Rz(o," |"),d=XS(c),_=d<2?0:c.trimEnd().endsWith("|")?d-1:d;if(_===0)return e;const f=a===-1?"":s.slice(a+1),m=ZS(l,Array.from({length:_},()=>"-"));if(f.length===0)return r+c+` +`),o=a===-1?s:s.slice(0,a),l=(b=o.match(/^( *)\|/))==null?void 0:b[1];if(l===void 0)return e;if(nk(o)<2&&!cst(o,l))return r;const c=o.trimEnd().endsWith("|")?o:Fz(o," |"),d=nk(c),_=d<2?0:c.trimEnd().endsWith("|")?d-1:d;if(_===0)return e;const f=a===-1?"":s.slice(a+1),m=rk(l,Array.from({length:_},()=>"-"));if(f.length===0)return r+c+` `+m;const g=f.indexOf(` -`),S=g===-1?f:f.slice(0,g),k=g===-1?"":f.slice(g);if(Frt(S,l,_))return e;if(S.startsWith(l+"|")&&/^[ |:\-\t]*$/.test(S.slice(l.length))){const v=Dz(S,l).map(x=>{const y=x.trim();if(y.length===0)return"-";let C=0;for(let A=0;A1&&y.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+c+` -`+ZS(l,v)+k}return r+c+` +`),S=g===-1?f:f.slice(0,g),k=g===-1?"":f.slice(g);if(ust(S,l,_))return e;if(S.startsWith(l+"|")&&/^[ |:\-\t]*$/.test(S.slice(l.length))){const v=Uz(S,l).map(x=>{const y=x.trim();if(y.length===0)return"-";let C=0;for(let A=0;A1&&y.endsWith(":")?":":"")});for(;v.length<_;)v.push("-");return r+c+` +`+rk(l,v)+k}return r+c+` `+m+` -`+f}function Tu(e,n){return e+n.slice($rt(e,n))}function Rz(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Tu(e,n);const r=e.slice(0,-t.length);return Tu(r,n)+t}function $rt(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 Hrt(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 XS(e){let n=0;for(let t=0;t0}function ZS(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function Dz(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function Frt(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=Dz(r,"").map(a=>a.trim());return s.length===t&&s.every(a=>/^:?-+:?$/.test(a))}function ry(e,n){let t=n+1;for(;tn+t}function lp(e,n){return n===0||e[n-1]===` -`}function Qi(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function QS(e){return!!e&&/[A-Za-z0-9]/.test(e)}function Lz(e){return!!e&&/[A-Za-z]/.test(e)}const Oz=Yx().use(ny);var hh,Fu,Uu,uc,qu,_h,ph,mh,dc,gh,fc;class Urt{constructor(){ci(this,hh,Oz);ci(this,Fu,null);ci(this,Uu,{});ci(this,uc,null);ci(this,qu,"");ci(this,_h,[]);ci(this,ph,[]);ci(this,mh,[]);ci(this,dc,0);ci(this,gh,[]);ci(this,fc,[])}reconfigure(n,t,r){Zn(this,Fu)!==null&&Zn(this,hh)===n&&Iz(Zn(this,Uu),r)&&!!Zn(this,uc)===t||(rs(this,hh,n),n.attachers.some(s=>s[0]===op)||(n=n(),n.use(op),n.freeze()),rs(this,Fu,n),rs(this,Uu,r),rs(this,qu,""),rs(this,_h,[]),rs(this,ph,[]),rs(this,mh,[]),rs(this,dc,0),rs(this,gh,[]),rs(this,uc,t?new wrt:null))}update(n){Zn(this,uc)&&(n=Zn(this,uc).update(n));let t=Zn(this,qu);if(n===t)return Zn(this,fc);const r=Zn(this,_h),s=qrt(n,t);let a=r.length-1;for(;a>=0&&!(s>=r[a]);a-=1);let o=r[a]??0;a===-1&&(a=0);const l=Jl(Zn(this,Fu)),c=Zn(this,ph),d=c.slice(a).some(E=>E.some(Kb));let _=l.parse(n.slice(o)),f=_.children.map(E=>Jl(Jl(E.position).start.offset)+o);rs(this,qu,n),Q1(r.length===c.length),r.splice(a,r.length-a,...f);{const E=dv(_,f,o);Q1(E.length===f.length),c.splice(a,c.length-a,...E)}if(d||Kb(_)){a=0,o=0,_=l.parse(n),f=_.children.map(j=>Jl(Jl(j.position).start.offset)+o),r.splice(0,r.length,...f);const E=dv(_,f,o);Q1(E.length===f.length),c.splice(0,c.length,...E)}const m=dv(l.runSync(_),f,o),g=Zn(this,mh),S=Zn(this,gh),k=Zn(this,fc),b=S.length;let v=null,x=0;for(;xb&&(g.length=S.length=r.length);for(let E=r.length=C?D=b-(r.length-j):j=b){g[j]=String(Zn(this,dc)),rs(this,dc,Zn(this,dc)+1),S[j]=null,v&&(v[j]=void 0);continue}g[j]=g[D]??String(r6(this,dc)._++),S[j]=S[D]??null,v&&(v[j]=k[D])}r.length[]);let s=0;for(const o of e.children){const l=(a=o.position)==null?void 0:a.start.offset;if(l!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||Zrt.test(e.slice(0,n))?e:""}const nk=/[#.]/g;function rst(e,n){const t=e||"",r={};let s=0,a,o;for(;sd&&(d=_):_&&(d!==void 0&&d>-1&&c.push(` -`.repeat(d)||" "),d=-1,c.push(_))}return c.join("")}function qz(e,n,t){return e.type==="element"?Cst(e,n,t):e.type==="text"?t.whitespace==="normal"?Gz(e,t):Est(e):[]}function Cst(e,n,t){const r=Vz(e,t),s=e.children||[];let a=-1,o=[];if(Sst(e))return o;let l,c;for(Xb(e)||ck(e)&&ik(n,e,ck)?c=` -`:wst(e)?(l=2,c=2):Uz(e)&&(l=1,c=1);++a15?d="…"+l.slice(s-15,s):d=l.slice(0,s);var _;a+15e.replace(jst,"-$1").toLowerCase(),Rst={"&":"&",">":">","<":"<",'"':""","'":"'"},Dst=/[&><"']/g,ms=e=>String(e).replace(Dst,n=>Rst[n]),R0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?R0(e.body[0]):e:e.type==="font"?R0(e.body):e,Lst=new Set(["mathord","textord","atom"]),Co=e=>Lst.has(R0(e).type),Ost=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"},Zb={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 Ist(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 Bst(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return Ist(n)}function $st(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:Bst(r)}class iy{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(Zb)){var r=Zb[t];r&&$st(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 qe("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=Ost(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class ul{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 ya[Hst[this.id]]}sub(){return ya[Pst[this.id]]}fracNum(){return ya[Fst[this.id]]}fracDen(){return ya[Ust[this.id]]}cramp(){return ya[qst[this.id]]}text(){return ya[Gst[this.id]]}isTight(){return this.size>=2}}var ay=0,cp=1,Lu=2,bo=3,Gf=4,Ri=5,Xu=6,zs=7,ya=[new ul(ay,0,!1),new ul(cp,0,!0),new ul(Lu,1,!1),new ul(bo,1,!0),new ul(Gf,2,!1),new ul(Ri,2,!0),new ul(Xu,3,!1),new ul(zs,3,!0)],Hst=[Gf,Ri,Gf,Ri,Xu,zs,Xu,zs],Pst=[Ri,Ri,Ri,Ri,zs,zs,zs,zs],Fst=[Lu,bo,Gf,Ri,Xu,zs,Xu,zs],Ust=[bo,bo,Ri,Ri,zs,zs,zs,zs],qst=[cp,cp,bo,bo,Ri,Ri,zs,zs],Gst=[ay,cp,Lu,bo,Lu,bo,Lu,bo],$t={DISPLAY:ya[ay],TEXT:ya[Lu],SCRIPT:ya[Gf],SCRIPTSCRIPT:ya[Xu]},Qb=[{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 Vst(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var D0=[];Qb.forEach(e=>e.blocks.forEach(n=>D0.push(...n)));function Wz(e){for(var n=0;n=D0[n]&&e<=D0[n+1])return!0;return!1}var Fr=e=>e+" "+e,gu=80,Wst=function(n,t){return"M95,"+(622+n+t)+` +`+f}function Mu(e,n){return e+n.slice(ost(e,n))}function Fz(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return Mu(e,n);const r=e.slice(0,-t.length);return Mu(r,n)+t}function ost(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 lst(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 nk(e){let n=0;for(let t=0;t0}function rk(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function Uz(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function ust(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=Uz(r,"").map(a=>a.trim());return s.length===t&&s.every(a=>/^:?-+:?$/.test(a))}function ly(e,n){let t=n+1;for(;tn+t}function hp(e,n){return n===0||e[n-1]===` +`}function Qi(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function sk(e){return!!e&&/[A-Za-z0-9]/.test(e)}function qz(e){return!!e&&/[A-Za-z]/.test(e)}const Gz=ey().use(oy);var ph,qu,Gu,dc,Vu,mh,gh,vh,fc,bh,hc;class dst{constructor(){oi(this,ph,Gz);oi(this,qu,null);oi(this,Gu,{});oi(this,dc,null);oi(this,Vu,"");oi(this,mh,[]);oi(this,gh,[]);oi(this,vh,[]);oi(this,fc,0);oi(this,bh,[]);oi(this,hc,[])}reconfigure(n,t,r){Qn(this,qu)!==null&&Qn(this,ph)===n&&Vz(Qn(this,Gu),r)&&!!Qn(this,dc)===t||(rs(this,ph,n),n.attachers.some(s=>s[0]===fp)||(n=n(),n.use(fp),n.freeze()),rs(this,qu,n),rs(this,Gu,r),rs(this,Vu,""),rs(this,mh,[]),rs(this,gh,[]),rs(this,vh,[]),rs(this,fc,0),rs(this,bh,[]),rs(this,dc,t?new qrt:null))}update(n){Qn(this,dc)&&(n=Qn(this,dc).update(n));let t=Qn(this,Vu);if(n===t)return Qn(this,hc);const r=Qn(this,mh),s=fst(n,t);let a=r.length-1;for(;a>=0&&!(s>=r[a]);a-=1);let o=r[a]??0;a===-1&&(a=0);const l=ec(Qn(this,qu)),c=Qn(this,gh),d=c.slice(a).some(E=>E.some(Jb));let _=l.parse(n.slice(o)),f=_.children.map(E=>ec(ec(E.position).start.offset)+o);rs(this,Vu,n),nv(r.length===c.length),r.splice(a,r.length-a,...f);{const E=pv(_,f,o);nv(E.length===f.length),c.splice(a,c.length-a,...E)}if(d||Jb(_)){a=0,o=0,_=l.parse(n),f=_.children.map(j=>ec(ec(j.position).start.offset)+o),r.splice(0,r.length,...f);const E=pv(_,f,o);nv(E.length===f.length),c.splice(0,c.length,...E)}const m=pv(l.runSync(_),f,o),g=Qn(this,vh),S=Qn(this,bh),k=Qn(this,hc),b=S.length;let v=null,x=0;for(;xb&&(g.length=S.length=r.length);for(let E=r.length=C?D=b-(r.length-j):j=b){g[j]=String(Qn(this,fc)),rs(this,fc,Qn(this,fc)+1),S[j]=null,v&&(v[j]=void 0);continue}g[j]=g[D]??String(l6(this,fc)._++),S[j]=S[D]??null,v&&(v[j]=k[D])}r.length[]);let s=0;for(const o of e.children){const l=(a=o.position)==null?void 0:a.start.offset;if(l!==void 0){for(;s+1s||t!==-1&&n>t||r!==-1&&n>r||bst.test(e.slice(0,n))?e:""}const lk=/[#.]/g;function Cst(e,n){const t=e||"",r={};let s=0,a,o;for(;sd&&(d=_):_&&(d!==void 0&&d>-1&&c.push(` +`.repeat(d)||" "),d=-1,c.push(_))}return c.join("")}function Jz(e,n,t){return e.type==="element"?Wst(e,n,t):e.type==="text"?t.whitespace==="normal"?eA(e,t):Kst(e):[]}function Wst(e,n,t){const r=tA(e,t),s=e.children||[];let a=-1,o=[];if(Gst(e))return o;let l,c;for(t2(e)||pk(e)&&dk(n,e,pk)?c=` +`:qst(e)?(l=2,c=2):Qz(e)&&(l=1,c=1);++a15?d="…"+l.slice(s-15,s):d=l.slice(0,s);var _;a+15e.replace(Jst,"-$1").toLowerCase(),tit={"&":"&",">":">","<":"<",'"':""","'":"'"},nit=/[&><"']/g,ms=e=>String(e).replace(nit,n=>tit[n]),$0=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?$0(e.body[0]):e:e.type==="font"?$0(e.body):e,rit=new Set(["mathord","textord","atom"]),ko=e=>rit.has($0(e).type),sit=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"},n2={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 iit(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 ait(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return iit(n)}function oit(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:ait(r)}class uy{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(n2)){var r=n2[t];r&&oit(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 qe("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=sit(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class dl{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 xa[lit[this.id]]}sub(){return xa[cit[this.id]]}fracNum(){return xa[uit[this.id]]}fracDen(){return xa[dit[this.id]]}cramp(){return xa[fit[this.id]]}text(){return xa[hit[this.id]]}isTight(){return this.size>=2}}var dy=0,_p=1,Iu=2,vo=3,Wf=4,Di=5,Qu=6,As=7,xa=[new dl(dy,0,!1),new dl(_p,0,!0),new dl(Iu,1,!1),new dl(vo,1,!0),new dl(Wf,2,!1),new dl(Di,2,!0),new dl(Qu,3,!1),new dl(As,3,!0)],lit=[Wf,Di,Wf,Di,Qu,As,Qu,As],cit=[Di,Di,Di,Di,As,As,As,As],uit=[Iu,vo,Wf,Di,Qu,As,Qu,As],dit=[vo,vo,Di,Di,As,As,As,As],fit=[_p,_p,vo,vo,Di,Di,As,As],hit=[dy,_p,Iu,vo,Iu,vo,Iu,vo],$t={DISPLAY:xa[dy],TEXT:xa[Iu],SCRIPT:xa[Wf],SCRIPTSCRIPT:xa[Qu]},r2=[{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 _it(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var H0=[];r2.forEach(e=>e.blocks.forEach(n=>H0.push(...n)));function nA(e){for(var n=0;n=H0[n]&&e<=H0[n+1])return!0;return!1}var qr=e=>e+" "+e,bu=80,pit=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 @@ -671,7 +672,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"},Kst=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"},mit=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+` @@ -681,7 +682,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"},Yst=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},git=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 @@ -690,7 +691,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"},Xst=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},vit=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 @@ -700,18 +701,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"},Zst=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},bit=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"},Qst=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},Jst=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"},xit=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},yit=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"},eit=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=Wst(t,gu);break;case"sqrtSize1":s=Kst(t,gu);break;case"sqrtSize2":s=Yst(t,gu);break;case"sqrtSize3":s=Xst(t,gu);break;case"sqrtSize4":s=Zst(t,gu);break;case"sqrtTall":s=Jst(t,gu,r)}return s},tit=function(n,t){switch(n){case"⎜":return Fr("M291 0 H417 V"+t+" H291z");case"∣":return Fr("M145 0 H188 V"+t+" H145z");case"∥":return Fr("M145 0 H188 V"+t+" H145z")+Fr("M367 0 H410 V"+t+" H367z");case"⎟":return Fr("M457 0 H583 V"+t+" H457z");case"⎢":return Fr("M319 0 H403 V"+t+" H319z");case"⎥":return Fr("M263 0 H347 V"+t+" H263z");case"⎪":return Fr("M384 0 H504 V"+t+" H384z");case"⏐":return Fr("M312 0 H355 V"+t+" H312z");case"‖":return Fr("M257 0 H300 V"+t+" H257z")+Fr("M478 0 H521 V"+t+" H478z");default:return""}},uk={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},wit=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=pit(t,bu);break;case"sqrtSize1":s=mit(t,bu);break;case"sqrtSize2":s=git(t,bu);break;case"sqrtSize3":s=vit(t,bu);break;case"sqrtSize4":s=bit(t,bu);break;case"sqrtTall":s=yit(t,bu,r)}return s},Sit=function(n,t){switch(n){case"⎜":return qr("M291 0 H417 V"+t+" H291z");case"∣":return qr("M145 0 H188 V"+t+" H145z");case"∥":return qr("M145 0 H188 V"+t+" H145z")+qr("M367 0 H410 V"+t+" H367z");case"⎟":return qr("M457 0 H583 V"+t+" H457z");case"⎢":return qr("M319 0 H403 V"+t+" H319z");case"⎥":return qr("M263 0 H347 V"+t+" H263z");case"⎪":return qr("M384 0 H504 V"+t+" H384z");case"⏐":return qr("M312 0 H355 V"+t+" H312z");case"‖":return qr("M257 0 H300 V"+t+" H257z")+qr("M478 0 H521 V"+t+" H478z");default:return""}},mk={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 @@ -757,10 +758,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:Fr("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Fr("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Fr("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Fr("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:qr("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:qr("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:qr("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:qr("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:Fr("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:qr("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 @@ -809,7 +810,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:Fr("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Fr("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Fr("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:qr("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:qr("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:qr("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 @@ -882,7 +883,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`},nit=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`},kit=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 @@ -910,82 +911,82 @@ 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 rit(e){return"toText"in e}class fd{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(rit(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var Jb={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},sit={ex:!0,em:!0,mu:!0},Kz=function(n){return typeof n!="string"&&(n=n.unit),n in Jb||n in sit||n==="ex"},ar=function(n,t){var r;if(n.unit in Jb)r=Jb[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 qe("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Ke=function(n){return+n.toFixed(4)+"em"},bl=function(n){return n.filter(t=>t).join(" ")},oy=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=Mst(r)+":"+s+";")}return t},Yz=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)}},Xz=function(n){var t=document.createElement(n);t.className=bl(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]/,Zz=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ms(bl(this.classes))+'"');var r=oy(this.style);r&&(t+=' style="'+ms(r)+'"');for(var s of Object.keys(this.attributes)){if(iit.test(s))throw new qe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ms(this.attributes[s])+'"'}t+=">";for(var a=0;a",t};class hd{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,Yz.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return Xz.call(this,"span")}toMarkup(){return Zz.call(this,"span")}}class Yp{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,Yz.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 Xz.call(this,"a")}toMarkup(){return Zz.call(this,"a")}}class ait{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=''+ms(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Ke(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=bl(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:"+Ke(this.italic)+";"),r+=oy(this.style),r&&(n=!0,t+=' style="'+ms(r)+'"');var s=ms(this.text);return n?(t+=">",t+=s,t+="",t):s}}class wo{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 e2{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 uit=e=>e instanceof hd||e instanceof Yp||e instanceof fd,ka={"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]}},t0={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]},dk={Å:"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 dit(e,n){ka[e]=n}function ly(e,n,t){if(!ka[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=ka[n][r];if(!s&&e[0]in dk&&(r=dk[e[0]].charCodeAt(0),s=ka[n][r]),!s&&t==="text"&&Wz(r)&&(s=ka[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var _v={};function fit(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!_v[n]){var t=_v[n]={cssEmPerMu:t0.quad[n]/18};for(var r in t0)t0.hasOwnProperty(r)&&(t[r]=t0[r][n])}return _v[n]}var Qn={math:{},text:{}};function O(e,n,t,r,s,a){Qn[e][s]={font:n,group:t,replace:r},a&&r&&(Qn[e][r]=Qn[e][s])}var U="math",He="text",Q="main",ce="ams",er="accent-token",at="bin",As="close",_d="inner",Et="mathord",Mr="op-token",bi="open",Eh="punct",de="rel",Eo="spacing",pe="textord";O(U,Q,de,"≡","\\equiv",!0);O(U,Q,de,"≺","\\prec",!0);O(U,Q,de,"≻","\\succ",!0);O(U,Q,de,"∼","\\sim",!0);O(U,Q,de,"⊥","\\perp");O(U,Q,de,"⪯","\\preceq",!0);O(U,Q,de,"⪰","\\succeq",!0);O(U,Q,de,"≃","\\simeq",!0);O(U,Q,de,"∣","\\mid",!0);O(U,Q,de,"≪","\\ll",!0);O(U,Q,de,"≫","\\gg",!0);O(U,Q,de,"≍","\\asymp",!0);O(U,Q,de,"∥","\\parallel");O(U,Q,de,"⋈","\\bowtie",!0);O(U,Q,de,"⌣","\\smile",!0);O(U,Q,de,"⊑","\\sqsubseteq",!0);O(U,Q,de,"⊒","\\sqsupseteq",!0);O(U,Q,de,"≐","\\doteq",!0);O(U,Q,de,"⌢","\\frown",!0);O(U,Q,de,"∋","\\ni",!0);O(U,Q,de,"∝","\\propto",!0);O(U,Q,de,"⊢","\\vdash",!0);O(U,Q,de,"⊣","\\dashv",!0);O(U,Q,de,"∋","\\owns");O(U,Q,Eh,".","\\ldotp");O(U,Q,Eh,"⋅","\\cdotp");O(U,Q,Eh,"⋅","·");O(He,Q,pe,"⋅","·");O(U,Q,pe,"#","\\#");O(He,Q,pe,"#","\\#");O(U,Q,pe,"&","\\&");O(He,Q,pe,"&","\\&");O(U,Q,pe,"ℵ","\\aleph",!0);O(U,Q,pe,"∀","\\forall",!0);O(U,Q,pe,"ℏ","\\hbar",!0);O(U,Q,pe,"∃","\\exists",!0);O(U,Q,pe,"∇","\\nabla",!0);O(U,Q,pe,"♭","\\flat",!0);O(U,Q,pe,"ℓ","\\ell",!0);O(U,Q,pe,"♮","\\natural",!0);O(U,Q,pe,"♣","\\clubsuit",!0);O(U,Q,pe,"℘","\\wp",!0);O(U,Q,pe,"♯","\\sharp",!0);O(U,Q,pe,"♢","\\diamondsuit",!0);O(U,Q,pe,"ℜ","\\Re",!0);O(U,Q,pe,"♡","\\heartsuit",!0);O(U,Q,pe,"ℑ","\\Im",!0);O(U,Q,pe,"♠","\\spadesuit",!0);O(U,Q,pe,"§","\\S",!0);O(He,Q,pe,"§","\\S");O(U,Q,pe,"¶","\\P",!0);O(He,Q,pe,"¶","\\P");O(U,Q,pe,"†","\\dag");O(He,Q,pe,"†","\\dag");O(He,Q,pe,"†","\\textdagger");O(U,Q,pe,"‡","\\ddag");O(He,Q,pe,"‡","\\ddag");O(He,Q,pe,"‡","\\textdaggerdbl");O(U,Q,As,"⎱","\\rmoustache",!0);O(U,Q,bi,"⎰","\\lmoustache",!0);O(U,Q,As,"⟯","\\rgroup",!0);O(U,Q,bi,"⟮","\\lgroup",!0);O(U,Q,at,"∓","\\mp",!0);O(U,Q,at,"⊖","\\ominus",!0);O(U,Q,at,"⊎","\\uplus",!0);O(U,Q,at,"⊓","\\sqcap",!0);O(U,Q,at,"∗","\\ast");O(U,Q,at,"⊔","\\sqcup",!0);O(U,Q,at,"◯","\\bigcirc",!0);O(U,Q,at,"∙","\\bullet",!0);O(U,Q,at,"‡","\\ddagger");O(U,Q,at,"≀","\\wr",!0);O(U,Q,at,"⨿","\\amalg");O(U,Q,at,"&","\\And");O(U,Q,de,"⟵","\\longleftarrow",!0);O(U,Q,de,"⇐","\\Leftarrow",!0);O(U,Q,de,"⟸","\\Longleftarrow",!0);O(U,Q,de,"⟶","\\longrightarrow",!0);O(U,Q,de,"⇒","\\Rightarrow",!0);O(U,Q,de,"⟹","\\Longrightarrow",!0);O(U,Q,de,"↔","\\leftrightarrow",!0);O(U,Q,de,"⟷","\\longleftrightarrow",!0);O(U,Q,de,"⇔","\\Leftrightarrow",!0);O(U,Q,de,"⟺","\\Longleftrightarrow",!0);O(U,Q,de,"↦","\\mapsto",!0);O(U,Q,de,"⟼","\\longmapsto",!0);O(U,Q,de,"↗","\\nearrow",!0);O(U,Q,de,"↩","\\hookleftarrow",!0);O(U,Q,de,"↪","\\hookrightarrow",!0);O(U,Q,de,"↘","\\searrow",!0);O(U,Q,de,"↼","\\leftharpoonup",!0);O(U,Q,de,"⇀","\\rightharpoonup",!0);O(U,Q,de,"↙","\\swarrow",!0);O(U,Q,de,"↽","\\leftharpoondown",!0);O(U,Q,de,"⇁","\\rightharpoondown",!0);O(U,Q,de,"↖","\\nwarrow",!0);O(U,Q,de,"⇌","\\rightleftharpoons",!0);O(U,ce,de,"≮","\\nless",!0);O(U,ce,de,"","\\@nleqslant");O(U,ce,de,"","\\@nleqq");O(U,ce,de,"⪇","\\lneq",!0);O(U,ce,de,"≨","\\lneqq",!0);O(U,ce,de,"","\\@lvertneqq");O(U,ce,de,"⋦","\\lnsim",!0);O(U,ce,de,"⪉","\\lnapprox",!0);O(U,ce,de,"⊀","\\nprec",!0);O(U,ce,de,"⋠","\\npreceq",!0);O(U,ce,de,"⋨","\\precnsim",!0);O(U,ce,de,"⪹","\\precnapprox",!0);O(U,ce,de,"≁","\\nsim",!0);O(U,ce,de,"","\\@nshortmid");O(U,ce,de,"∤","\\nmid",!0);O(U,ce,de,"⊬","\\nvdash",!0);O(U,ce,de,"⊭","\\nvDash",!0);O(U,ce,de,"⋪","\\ntriangleleft");O(U,ce,de,"⋬","\\ntrianglelefteq",!0);O(U,ce,de,"⊊","\\subsetneq",!0);O(U,ce,de,"","\\@varsubsetneq");O(U,ce,de,"⫋","\\subsetneqq",!0);O(U,ce,de,"","\\@varsubsetneqq");O(U,ce,de,"≯","\\ngtr",!0);O(U,ce,de,"","\\@ngeqslant");O(U,ce,de,"","\\@ngeqq");O(U,ce,de,"⪈","\\gneq",!0);O(U,ce,de,"≩","\\gneqq",!0);O(U,ce,de,"","\\@gvertneqq");O(U,ce,de,"⋧","\\gnsim",!0);O(U,ce,de,"⪊","\\gnapprox",!0);O(U,ce,de,"⊁","\\nsucc",!0);O(U,ce,de,"⋡","\\nsucceq",!0);O(U,ce,de,"⋩","\\succnsim",!0);O(U,ce,de,"⪺","\\succnapprox",!0);O(U,ce,de,"≆","\\ncong",!0);O(U,ce,de,"","\\@nshortparallel");O(U,ce,de,"∦","\\nparallel",!0);O(U,ce,de,"⊯","\\nVDash",!0);O(U,ce,de,"⋫","\\ntriangleright");O(U,ce,de,"⋭","\\ntrianglerighteq",!0);O(U,ce,de,"","\\@nsupseteqq");O(U,ce,de,"⊋","\\supsetneq",!0);O(U,ce,de,"","\\@varsupsetneq");O(U,ce,de,"⫌","\\supsetneqq",!0);O(U,ce,de,"","\\@varsupsetneqq");O(U,ce,de,"⊮","\\nVdash",!0);O(U,ce,de,"⪵","\\precneqq",!0);O(U,ce,de,"⪶","\\succneqq",!0);O(U,ce,de,"","\\@nsubseteqq");O(U,ce,at,"⊴","\\unlhd");O(U,ce,at,"⊵","\\unrhd");O(U,ce,de,"↚","\\nleftarrow",!0);O(U,ce,de,"↛","\\nrightarrow",!0);O(U,ce,de,"⇍","\\nLeftarrow",!0);O(U,ce,de,"⇏","\\nRightarrow",!0);O(U,ce,de,"↮","\\nleftrightarrow",!0);O(U,ce,de,"⇎","\\nLeftrightarrow",!0);O(U,ce,de,"△","\\vartriangle");O(U,ce,pe,"ℏ","\\hslash");O(U,ce,pe,"▽","\\triangledown");O(U,ce,pe,"◊","\\lozenge");O(U,ce,pe,"Ⓢ","\\circledS");O(U,ce,pe,"®","\\circledR");O(He,ce,pe,"®","\\circledR");O(U,ce,pe,"∡","\\measuredangle",!0);O(U,ce,pe,"∄","\\nexists");O(U,ce,pe,"℧","\\mho");O(U,ce,pe,"Ⅎ","\\Finv",!0);O(U,ce,pe,"⅁","\\Game",!0);O(U,ce,pe,"‵","\\backprime");O(U,ce,pe,"▲","\\blacktriangle");O(U,ce,pe,"▼","\\blacktriangledown");O(U,ce,pe,"■","\\blacksquare");O(U,ce,pe,"⧫","\\blacklozenge");O(U,ce,pe,"★","\\bigstar");O(U,ce,pe,"∢","\\sphericalangle",!0);O(U,ce,pe,"∁","\\complement",!0);O(U,ce,pe,"ð","\\eth",!0);O(He,Q,pe,"ð","ð");O(U,ce,pe,"╱","\\diagup");O(U,ce,pe,"╲","\\diagdown");O(U,ce,pe,"□","\\square");O(U,ce,pe,"□","\\Box");O(U,ce,pe,"◊","\\Diamond");O(U,ce,pe,"¥","\\yen",!0);O(He,ce,pe,"¥","\\yen",!0);O(U,ce,pe,"✓","\\checkmark",!0);O(He,ce,pe,"✓","\\checkmark");O(U,ce,pe,"ℶ","\\beth",!0);O(U,ce,pe,"ℸ","\\daleth",!0);O(U,ce,pe,"ℷ","\\gimel",!0);O(U,ce,pe,"ϝ","\\digamma",!0);O(U,ce,pe,"ϰ","\\varkappa");O(U,ce,bi,"┌","\\@ulcorner",!0);O(U,ce,As,"┐","\\@urcorner",!0);O(U,ce,bi,"└","\\@llcorner",!0);O(U,ce,As,"┘","\\@lrcorner",!0);O(U,ce,de,"≦","\\leqq",!0);O(U,ce,de,"⩽","\\leqslant",!0);O(U,ce,de,"⪕","\\eqslantless",!0);O(U,ce,de,"≲","\\lesssim",!0);O(U,ce,de,"⪅","\\lessapprox",!0);O(U,ce,de,"≊","\\approxeq",!0);O(U,ce,at,"⋖","\\lessdot");O(U,ce,de,"⋘","\\lll",!0);O(U,ce,de,"≶","\\lessgtr",!0);O(U,ce,de,"⋚","\\lesseqgtr",!0);O(U,ce,de,"⪋","\\lesseqqgtr",!0);O(U,ce,de,"≑","\\doteqdot");O(U,ce,de,"≓","\\risingdotseq",!0);O(U,ce,de,"≒","\\fallingdotseq",!0);O(U,ce,de,"∽","\\backsim",!0);O(U,ce,de,"⋍","\\backsimeq",!0);O(U,ce,de,"⫅","\\subseteqq",!0);O(U,ce,de,"⋐","\\Subset",!0);O(U,ce,de,"⊏","\\sqsubset",!0);O(U,ce,de,"≼","\\preccurlyeq",!0);O(U,ce,de,"⋞","\\curlyeqprec",!0);O(U,ce,de,"≾","\\precsim",!0);O(U,ce,de,"⪷","\\precapprox",!0);O(U,ce,de,"⊲","\\vartriangleleft");O(U,ce,de,"⊴","\\trianglelefteq");O(U,ce,de,"⊨","\\vDash",!0);O(U,ce,de,"⊪","\\Vvdash",!0);O(U,ce,de,"⌣","\\smallsmile");O(U,ce,de,"⌢","\\smallfrown");O(U,ce,de,"≏","\\bumpeq",!0);O(U,ce,de,"≎","\\Bumpeq",!0);O(U,ce,de,"≧","\\geqq",!0);O(U,ce,de,"⩾","\\geqslant",!0);O(U,ce,de,"⪖","\\eqslantgtr",!0);O(U,ce,de,"≳","\\gtrsim",!0);O(U,ce,de,"⪆","\\gtrapprox",!0);O(U,ce,at,"⋗","\\gtrdot");O(U,ce,de,"⋙","\\ggg",!0);O(U,ce,de,"≷","\\gtrless",!0);O(U,ce,de,"⋛","\\gtreqless",!0);O(U,ce,de,"⪌","\\gtreqqless",!0);O(U,ce,de,"≖","\\eqcirc",!0);O(U,ce,de,"≗","\\circeq",!0);O(U,ce,de,"≜","\\triangleq",!0);O(U,ce,de,"∼","\\thicksim");O(U,ce,de,"≈","\\thickapprox");O(U,ce,de,"⫆","\\supseteqq",!0);O(U,ce,de,"⋑","\\Supset",!0);O(U,ce,de,"⊐","\\sqsupset",!0);O(U,ce,de,"≽","\\succcurlyeq",!0);O(U,ce,de,"⋟","\\curlyeqsucc",!0);O(U,ce,de,"≿","\\succsim",!0);O(U,ce,de,"⪸","\\succapprox",!0);O(U,ce,de,"⊳","\\vartriangleright");O(U,ce,de,"⊵","\\trianglerighteq");O(U,ce,de,"⊩","\\Vdash",!0);O(U,ce,de,"∣","\\shortmid");O(U,ce,de,"∥","\\shortparallel");O(U,ce,de,"≬","\\between",!0);O(U,ce,de,"⋔","\\pitchfork",!0);O(U,ce,de,"∝","\\varpropto");O(U,ce,de,"◀","\\blacktriangleleft");O(U,ce,de,"∴","\\therefore",!0);O(U,ce,de,"∍","\\backepsilon");O(U,ce,de,"▶","\\blacktriangleright");O(U,ce,de,"∵","\\because",!0);O(U,ce,de,"⋘","\\llless");O(U,ce,de,"⋙","\\gggtr");O(U,ce,at,"⊲","\\lhd");O(U,ce,at,"⊳","\\rhd");O(U,ce,de,"≂","\\eqsim",!0);O(U,Q,de,"⋈","\\Join");O(U,ce,de,"≑","\\Doteq",!0);O(U,ce,at,"∔","\\dotplus",!0);O(U,ce,at,"∖","\\smallsetminus");O(U,ce,at,"⋒","\\Cap",!0);O(U,ce,at,"⋓","\\Cup",!0);O(U,ce,at,"⩞","\\doublebarwedge",!0);O(U,ce,at,"⊟","\\boxminus",!0);O(U,ce,at,"⊞","\\boxplus",!0);O(U,ce,at,"⋇","\\divideontimes",!0);O(U,ce,at,"⋉","\\ltimes",!0);O(U,ce,at,"⋊","\\rtimes",!0);O(U,ce,at,"⋋","\\leftthreetimes",!0);O(U,ce,at,"⋌","\\rightthreetimes",!0);O(U,ce,at,"⋏","\\curlywedge",!0);O(U,ce,at,"⋎","\\curlyvee",!0);O(U,ce,at,"⊝","\\circleddash",!0);O(U,ce,at,"⊛","\\circledast",!0);O(U,ce,at,"⋅","\\centerdot");O(U,ce,at,"⊺","\\intercal",!0);O(U,ce,at,"⋒","\\doublecap");O(U,ce,at,"⋓","\\doublecup");O(U,ce,at,"⊠","\\boxtimes",!0);O(U,ce,de,"⇢","\\dashrightarrow",!0);O(U,ce,de,"⇠","\\dashleftarrow",!0);O(U,ce,de,"⇇","\\leftleftarrows",!0);O(U,ce,de,"⇆","\\leftrightarrows",!0);O(U,ce,de,"⇚","\\Lleftarrow",!0);O(U,ce,de,"↞","\\twoheadleftarrow",!0);O(U,ce,de,"↢","\\leftarrowtail",!0);O(U,ce,de,"↫","\\looparrowleft",!0);O(U,ce,de,"⇋","\\leftrightharpoons",!0);O(U,ce,de,"↶","\\curvearrowleft",!0);O(U,ce,de,"↺","\\circlearrowleft",!0);O(U,ce,de,"↰","\\Lsh",!0);O(U,ce,de,"⇈","\\upuparrows",!0);O(U,ce,de,"↿","\\upharpoonleft",!0);O(U,ce,de,"⇃","\\downharpoonleft",!0);O(U,Q,de,"⊶","\\origof",!0);O(U,Q,de,"⊷","\\imageof",!0);O(U,ce,de,"⊸","\\multimap",!0);O(U,ce,de,"↭","\\leftrightsquigarrow",!0);O(U,ce,de,"⇉","\\rightrightarrows",!0);O(U,ce,de,"⇄","\\rightleftarrows",!0);O(U,ce,de,"↠","\\twoheadrightarrow",!0);O(U,ce,de,"↣","\\rightarrowtail",!0);O(U,ce,de,"↬","\\looparrowright",!0);O(U,ce,de,"↷","\\curvearrowright",!0);O(U,ce,de,"↻","\\circlearrowright",!0);O(U,ce,de,"↱","\\Rsh",!0);O(U,ce,de,"⇊","\\downdownarrows",!0);O(U,ce,de,"↾","\\upharpoonright",!0);O(U,ce,de,"⇂","\\downharpoonright",!0);O(U,ce,de,"⇝","\\rightsquigarrow",!0);O(U,ce,de,"⇝","\\leadsto");O(U,ce,de,"⇛","\\Rrightarrow",!0);O(U,ce,de,"↾","\\restriction");O(U,Q,pe,"‘","`");O(U,Q,pe,"$","\\$");O(He,Q,pe,"$","\\$");O(He,Q,pe,"$","\\textdollar");O(U,Q,pe,"%","\\%");O(He,Q,pe,"%","\\%");O(U,Q,pe,"_","\\_");O(He,Q,pe,"_","\\_");O(He,Q,pe,"_","\\textunderscore");O(U,Q,pe,"∠","\\angle",!0);O(U,Q,pe,"∞","\\infty",!0);O(U,Q,pe,"′","\\prime");O(U,Q,pe,"△","\\triangle");O(U,Q,pe,"Γ","\\Gamma",!0);O(U,Q,pe,"Δ","\\Delta",!0);O(U,Q,pe,"Θ","\\Theta",!0);O(U,Q,pe,"Λ","\\Lambda",!0);O(U,Q,pe,"Ξ","\\Xi",!0);O(U,Q,pe,"Π","\\Pi",!0);O(U,Q,pe,"Σ","\\Sigma",!0);O(U,Q,pe,"Υ","\\Upsilon",!0);O(U,Q,pe,"Φ","\\Phi",!0);O(U,Q,pe,"Ψ","\\Psi",!0);O(U,Q,pe,"Ω","\\Omega",!0);O(U,Q,pe,"A","Α");O(U,Q,pe,"B","Β");O(U,Q,pe,"E","Ε");O(U,Q,pe,"Z","Ζ");O(U,Q,pe,"H","Η");O(U,Q,pe,"I","Ι");O(U,Q,pe,"K","Κ");O(U,Q,pe,"M","Μ");O(U,Q,pe,"N","Ν");O(U,Q,pe,"O","Ο");O(U,Q,pe,"P","Ρ");O(U,Q,pe,"T","Τ");O(U,Q,pe,"X","Χ");O(U,Q,pe,"¬","\\neg",!0);O(U,Q,pe,"¬","\\lnot");O(U,Q,pe,"⊤","\\top");O(U,Q,pe,"⊥","\\bot");O(U,Q,pe,"∅","\\emptyset");O(U,ce,pe,"∅","\\varnothing");O(U,Q,Et,"α","\\alpha",!0);O(U,Q,Et,"β","\\beta",!0);O(U,Q,Et,"γ","\\gamma",!0);O(U,Q,Et,"δ","\\delta",!0);O(U,Q,Et,"ϵ","\\epsilon",!0);O(U,Q,Et,"ζ","\\zeta",!0);O(U,Q,Et,"η","\\eta",!0);O(U,Q,Et,"θ","\\theta",!0);O(U,Q,Et,"ι","\\iota",!0);O(U,Q,Et,"κ","\\kappa",!0);O(U,Q,Et,"λ","\\lambda",!0);O(U,Q,Et,"μ","\\mu",!0);O(U,Q,Et,"ν","\\nu",!0);O(U,Q,Et,"ξ","\\xi",!0);O(U,Q,Et,"ο","\\omicron",!0);O(U,Q,Et,"π","\\pi",!0);O(U,Q,Et,"ρ","\\rho",!0);O(U,Q,Et,"σ","\\sigma",!0);O(U,Q,Et,"τ","\\tau",!0);O(U,Q,Et,"υ","\\upsilon",!0);O(U,Q,Et,"ϕ","\\phi",!0);O(U,Q,Et,"χ","\\chi",!0);O(U,Q,Et,"ψ","\\psi",!0);O(U,Q,Et,"ω","\\omega",!0);O(U,Q,Et,"ε","\\varepsilon",!0);O(U,Q,Et,"ϑ","\\vartheta",!0);O(U,Q,Et,"ϖ","\\varpi",!0);O(U,Q,Et,"ϱ","\\varrho",!0);O(U,Q,Et,"ς","\\varsigma",!0);O(U,Q,Et,"φ","\\varphi",!0);O(U,Q,at,"∗","*",!0);O(U,Q,at,"+","+");O(U,Q,at,"−","-",!0);O(U,Q,at,"⋅","\\cdot",!0);O(U,Q,at,"∘","\\circ",!0);O(U,Q,at,"÷","\\div",!0);O(U,Q,at,"±","\\pm",!0);O(U,Q,at,"×","\\times",!0);O(U,Q,at,"∩","\\cap",!0);O(U,Q,at,"∪","\\cup",!0);O(U,Q,at,"∖","\\setminus",!0);O(U,Q,at,"∧","\\land");O(U,Q,at,"∨","\\lor");O(U,Q,at,"∧","\\wedge",!0);O(U,Q,at,"∨","\\vee",!0);O(U,Q,pe,"√","\\surd");O(U,Q,bi,"⟨","\\langle",!0);O(U,Q,bi,"∣","\\lvert");O(U,Q,bi,"∥","\\lVert");O(U,Q,As,"?","?");O(U,Q,As,"!","!");O(U,Q,As,"⟩","\\rangle",!0);O(U,Q,As,"∣","\\rvert");O(U,Q,As,"∥","\\rVert");O(U,Q,de,"=","=");O(U,Q,de,":",":");O(U,Q,de,"≈","\\approx",!0);O(U,Q,de,"≅","\\cong",!0);O(U,Q,de,"≥","\\ge");O(U,Q,de,"≥","\\geq",!0);O(U,Q,de,"←","\\gets");O(U,Q,de,">","\\gt",!0);O(U,Q,de,"∈","\\in",!0);O(U,Q,de,"","\\@not");O(U,Q,de,"⊂","\\subset",!0);O(U,Q,de,"⊃","\\supset",!0);O(U,Q,de,"⊆","\\subseteq",!0);O(U,Q,de,"⊇","\\supseteq",!0);O(U,ce,de,"⊈","\\nsubseteq",!0);O(U,ce,de,"⊉","\\nsupseteq",!0);O(U,Q,de,"⊨","\\models");O(U,Q,de,"←","\\leftarrow",!0);O(U,Q,de,"≤","\\le");O(U,Q,de,"≤","\\leq",!0);O(U,Q,de,"<","\\lt",!0);O(U,Q,de,"→","\\rightarrow",!0);O(U,Q,de,"→","\\to");O(U,ce,de,"≱","\\ngeq",!0);O(U,ce,de,"≰","\\nleq",!0);O(U,Q,Eo," ","\\ ");O(U,Q,Eo," ","\\space");O(U,Q,Eo," ","\\nobreakspace");O(He,Q,Eo," ","\\ ");O(He,Q,Eo," "," ");O(He,Q,Eo," ","\\space");O(He,Q,Eo," ","\\nobreakspace");O(U,Q,Eo,"","\\nobreak");O(U,Q,Eo,"","\\allowbreak");O(U,Q,Eh,",",",");O(U,Q,Eh,";",";");O(U,ce,at,"⊼","\\barwedge",!0);O(U,ce,at,"⊻","\\veebar",!0);O(U,Q,at,"⊙","\\odot",!0);O(U,Q,at,"⊕","\\oplus",!0);O(U,Q,at,"⊗","\\otimes",!0);O(U,Q,pe,"∂","\\partial",!0);O(U,Q,at,"⊘","\\oslash",!0);O(U,ce,at,"⊚","\\circledcirc",!0);O(U,ce,at,"⊡","\\boxdot",!0);O(U,Q,at,"△","\\bigtriangleup");O(U,Q,at,"▽","\\bigtriangledown");O(U,Q,at,"†","\\dagger");O(U,Q,at,"⋄","\\diamond");O(U,Q,at,"⋆","\\star");O(U,Q,at,"◃","\\triangleleft");O(U,Q,at,"▹","\\triangleright");O(U,Q,bi,"{","\\{");O(He,Q,pe,"{","\\{");O(He,Q,pe,"{","\\textbraceleft");O(U,Q,As,"}","\\}");O(He,Q,pe,"}","\\}");O(He,Q,pe,"}","\\textbraceright");O(U,Q,bi,"{","\\lbrace");O(U,Q,As,"}","\\rbrace");O(U,Q,bi,"[","\\lbrack",!0);O(He,Q,pe,"[","\\lbrack",!0);O(U,Q,As,"]","\\rbrack",!0);O(He,Q,pe,"]","\\rbrack",!0);O(U,Q,bi,"(","\\lparen",!0);O(U,Q,As,")","\\rparen",!0);O(He,Q,pe,"<","\\textless",!0);O(He,Q,pe,">","\\textgreater",!0);O(U,Q,bi,"⌊","\\lfloor",!0);O(U,Q,As,"⌋","\\rfloor",!0);O(U,Q,bi,"⌈","\\lceil",!0);O(U,Q,As,"⌉","\\rceil",!0);O(U,Q,pe,"\\","\\backslash");O(U,Q,pe,"∣","|");O(U,Q,pe,"∣","\\vert");O(He,Q,pe,"|","\\textbar",!0);O(U,Q,pe,"∥","\\|");O(U,Q,pe,"∥","\\Vert");O(He,Q,pe,"∥","\\textbardbl");O(He,Q,pe,"~","\\textasciitilde");O(He,Q,pe,"\\","\\textbackslash");O(He,Q,pe,"^","\\textasciicircum");O(U,Q,de,"↑","\\uparrow",!0);O(U,Q,de,"⇑","\\Uparrow",!0);O(U,Q,de,"↓","\\downarrow",!0);O(U,Q,de,"⇓","\\Downarrow",!0);O(U,Q,de,"↕","\\updownarrow",!0);O(U,Q,de,"⇕","\\Updownarrow",!0);O(U,Q,Mr,"∐","\\coprod");O(U,Q,Mr,"⋁","\\bigvee");O(U,Q,Mr,"⋀","\\bigwedge");O(U,Q,Mr,"⨄","\\biguplus");O(U,Q,Mr,"⋂","\\bigcap");O(U,Q,Mr,"⋃","\\bigcup");O(U,Q,Mr,"∫","\\int");O(U,Q,Mr,"∫","\\intop");O(U,Q,Mr,"∬","\\iint");O(U,Q,Mr,"∭","\\iiint");O(U,Q,Mr,"∏","\\prod");O(U,Q,Mr,"∑","\\sum");O(U,Q,Mr,"⨂","\\bigotimes");O(U,Q,Mr,"⨁","\\bigoplus");O(U,Q,Mr,"⨀","\\bigodot");O(U,Q,Mr,"∮","\\oint");O(U,Q,Mr,"∯","\\oiint");O(U,Q,Mr,"∰","\\oiiint");O(U,Q,Mr,"⨆","\\bigsqcup");O(U,Q,Mr,"∫","\\smallint");O(He,Q,_d,"…","\\textellipsis");O(U,Q,_d,"…","\\mathellipsis");O(He,Q,_d,"…","\\ldots",!0);O(U,Q,_d,"…","\\ldots",!0);O(U,Q,_d,"⋯","\\@cdots",!0);O(U,Q,_d,"⋱","\\ddots",!0);O(U,Q,pe,"⋮","\\varvdots");O(He,Q,pe,"⋮","\\varvdots");O(U,Q,er,"ˊ","\\acute");O(U,Q,er,"ˋ","\\grave");O(U,Q,er,"¨","\\ddot");O(U,Q,er,"~","\\tilde");O(U,Q,er,"ˉ","\\bar");O(U,Q,er,"˘","\\breve");O(U,Q,er,"ˇ","\\check");O(U,Q,er,"^","\\hat");O(U,Q,er,"⃗","\\vec");O(U,Q,er,"˙","\\dot");O(U,Q,er,"˚","\\mathring");O(U,Q,Et,"","\\@imath");O(U,Q,Et,"","\\@jmath");O(U,Q,pe,"ı","ı");O(U,Q,pe,"ȷ","ȷ");O(He,Q,pe,"ı","\\i",!0);O(He,Q,pe,"ȷ","\\j",!0);O(He,Q,pe,"ß","\\ss",!0);O(He,Q,pe,"æ","\\ae",!0);O(He,Q,pe,"œ","\\oe",!0);O(He,Q,pe,"ø","\\o",!0);O(He,Q,pe,"Æ","\\AE",!0);O(He,Q,pe,"Œ","\\OE",!0);O(He,Q,pe,"Ø","\\O",!0);O(He,Q,er,"ˊ","\\'");O(He,Q,er,"ˋ","\\`");O(He,Q,er,"ˆ","\\^");O(He,Q,er,"˜","\\~");O(He,Q,er,"ˉ","\\=");O(He,Q,er,"˘","\\u");O(He,Q,er,"˙","\\.");O(He,Q,er,"¸","\\c");O(He,Q,er,"˚","\\r");O(He,Q,er,"ˇ","\\v");O(He,Q,er,"¨",'\\"');O(He,Q,er,"˝","\\H");O(He,Q,er,"◯","\\textcircled");var Qz={"--":!0,"---":!0,"``":!0,"''":!0};O(He,Q,pe,"–","--",!0);O(He,Q,pe,"–","\\textendash");O(He,Q,pe,"—","---",!0);O(He,Q,pe,"—","\\textemdash");O(He,Q,pe,"‘","`",!0);O(He,Q,pe,"‘","\\textquoteleft");O(He,Q,pe,"’","'",!0);O(He,Q,pe,"’","\\textquoteright");O(He,Q,pe,"“","``",!0);O(He,Q,pe,"“","\\textquotedblleft");O(He,Q,pe,"”","''",!0);O(He,Q,pe,"”","\\textquotedblright");O(U,Q,pe,"°","\\degree",!0);O(He,Q,pe,"°","\\degree");O(He,Q,pe,"°","\\textdegree",!0);O(U,Q,pe,"£","\\pounds");O(U,Q,pe,"£","\\mathsterling",!0);O(He,Q,pe,"£","\\pounds");O(He,Q,pe,"£","\\textsterling",!0);O(U,ce,pe,"✠","\\maltese");O(He,ce,pe,"✠","\\maltese");var fk='0123456789/@."';for(var pv=0;pv{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 wk[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return _it[a]}else{if(r===120485||r===120486)return wk[0];if(120486{if(bl(e.classes)!==bl(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},Jz=e=>{for(var n=0;nt&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>s&&(s=o.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Fe=function(n,t,r,s){var a=new hd(n,t,r,s);return uy(a),a},yl=(e,n,t,r)=>new hd(e,n,t,r),Zu=function(n,t,r){var s=Fe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Ke(s.height),s.maxFontSize=1,s},vit=function(n,t,r,s){var a=new Yp(n,t,r,s);return uy(a),a},No=function(n){var t=new fd(n);return uy(t),t},Qu=function(n,t){return n instanceof fd?Fe([],[n],t):n},bit=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,a=s,o=1;o{var t=Fe(["mspace"],[],n),r=ar(e,n);return t.style.marginRight=Ke(r),t},s0=(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},a2={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"}},tA={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},nA=function(n,t){var[r,s,a]=tA[n],o=new xl(r),l=new wo([o],{width:Ke(s),height:Ke(a),style:"width:"+Ke(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=yl(["overlay"],[l],t);return c.height=a,c.style.height=Ke(a),c.style.width=Ke(s),c},ir={number:3,unit:"mu"},tc={number:4,unit:"mu"},fo={number:5,unit:"mu"},xit={mord:{mop:ir,mbin:tc,mrel:fo,minner:ir},mop:{mord:ir,mop:ir,mrel:fo,minner:ir},mbin:{mord:tc,mop:tc,mopen:tc,minner:tc},mrel:{mord:fo,mop:fo,mopen:fo,minner:fo},mopen:{},mclose:{mop:ir,mbin:tc,mrel:fo,minner:ir},mpunct:{mord:ir,mop:ir,mrel:fo,mopen:ir,mclose:ir,mpunct:ir,minner:ir},minner:{mord:ir,mop:ir,mbin:tc,mrel:fo,mopen:ir,mpunct:ir,minner:ir}},yit={mord:{mop:ir},mop:{mord:ir,mop:ir},mbin:{},mrel:{},mopen:{},mclose:{mop:ir},mpunct:{},minner:{mop:ir}},rA={},dp={},fp={};function tt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 b=k.classes[0],v=S.classes[0];b==="mbin"&&Sit.has(v)?k.classes[0]="mord":v==="mbin"&&wit.has(b)&&(S.classes[0]="mord")},{node:f},m,g),o2(a,(S,k)=>{var b,v,x=c2(k),y=c2(S),C=x&&y?S.hasClass("mtight")?(b=yit[x])==null?void 0:b[y]:(v=xit[x])==null?void 0:v[y]:null;if(C)return eA(C,d)},{node:f},m,g),a},o2=function(n,t,r,s,a){s&&n.push(s);for(var o=0;om=>{n.splice(f+1,0,m),o++})(o)}s&&n.pop()},sA=function(n){return n instanceof fd||n instanceof Yp||n instanceof hd&&n.hasClass("enclosing")?n:null},l2=function(n,t){var r=sA(n);if(r){var s=r.children;if(s.length){if(t==="right")return l2(s[s.length-1],"right");if(t==="left")return l2(s[0],"left")}}return n},c2=function(n,t){if(!n)return null;t&&(n=l2(n,t));var r=n.classes[0];return Cit[r]||null},Vf=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Fe(t.concat(r))},wn=function(n,t,r){if(!n)return Fe();if(dp[n.type]){var s=dp[n.type](n,t);if(r&&t.size!==r.size){s=Fe(t.sizingClasses(r),[s],t);var a=t.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new qe("Got group of unknown type: '"+n.type+"'")};function i0(e,n){var t=Fe(["base"],e,n),r=Fe(["strut"]);return r.style.height=Ke(t.height+t.depth),t.depth&&(r.style.verticalAlign=Ke(-t.depth)),t.children.unshift(r),t}function u2(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Ur(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],o=[],l=0;l0&&(a.push(i0(o,n)),o=[]),a.push(r[l]));o.length>0&&a.push(i0(o,n));var d;t?(d=i0(Ur(t,n,!0),n),d.classes=["tag"],a.push(d)):s&&a.push(s);var _=Fe(["katex-html"],a);if(_.setAttribute("aria-hidden","true"),d){var f=d.children[0];f.style.height=Ke(_.height+_.depth),_.depth&&(f.style.verticalAlign=Ke(-_.depth))}return _}function iA(e){return new fd(e)}class Ge{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=bl(this.classes));for(var r=0;r0&&(n+=' class ="'+ms(bl(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class jr{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ms(this.toText())}toText(){return this.text}}class aA{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",Ke(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Eit=new Set(["\\imath","\\jmath"]),Nit=new Set(["mrow","mtable"]),Li=function(n,t,r){return Qn[t][n]&&Qn[t][n].replace&&n.charCodeAt(0)!==55349&&!(Qz.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Qn[t][n].replace),new jr(n)},dy=function(n){return n.length===1?n[0]:new Ge("mrow",n)},zit={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"},fy=(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=zit[t];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(Eit.has(a))return null;if(Qn[r][a]){var o=Qn[r][a].replace;o&&(a=o)}var l=a2[t].fontName;return ly(a,l,r)?a2[t].variant:null};function bv(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof jr&&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 jr&&t.text===","}else return!1}var xi=function(n,t,r){if(n.length===1){var s=$n(n[0],t);return r&&s instanceof Ge&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],o,l=0;l=1&&(o.type==="mn"||bv(o))){var d=c.children[0];d instanceof Ge&&d.type==="mn"&&(d.children=[...o.children,...d.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var _=o.children[0];if(_ instanceof jr&&_.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof jr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),a.pop())}}}a.push(c),o=c}return a},wl=function(n,t,r){return dy(xi(n,t,r))},$n=function(n,t){if(!n)return new Ge("mrow");if(fp[n.type])return fp[n.type](n,t);throw new qe("Got group of unknown type: '"+n.type+"'")};function Sk(e,n,t,r,s){var a=xi(e,t),o;a.length===1&&a[0]instanceof Ge&&Nit.has(a[0].type)?o=a[0]:o=new Ge("mrow",a);var l=new Ge("annotation",[new jr(n)]);l.setAttribute("encoding","application/x-tex");var c=new Ge("semantics",[o,l]),d=new Ge("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Fe([_],[d])}var Ait=[[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]],kk=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ck=function(n,t){return t.size<2?n:Ait[n-1][t.size-1]};class mo{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||mo.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=kk[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 mo(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:Ck(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:kk[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=Ck(mo.BASESIZE,n);return this.size===t&&this.textSize===mo.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!==mo.BASESIZE?["sizing","reset-size"+this.size,"size"+mo.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=fit(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}mo.BASESIZE=6;var oA=function(n){return new mo({style:n.displayMode?$t.DISPLAY:$t.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},lA=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Fe(r,[n])}return n},Tit=function(n,t,r){var s=oA(r),a;if(r.output==="mathml")return Sk(n,t,s,r.displayMode,!0);if(r.output==="html"){var o=u2(n,s);a=Fe(["katex"],[o])}else{var l=Sk(n,t,s,r.displayMode,!1),c=u2(n,s);a=Fe(["katex"],[l,c])}return lA(a,r)},jit=function(n,t,r){var s=oA(r),a=u2(n,s),o=Fe(["katex"],[a]);return lA(o,r)},Mit={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":"="},Qp=function(n){var t=new Ge("mo",[new jr(Mit[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Rit={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]},Dit=new Set(["widehat","widecheck","widetilde","utilde"]),Jp=function(n,t){function r(){var l=4e5,c=n.label.slice(1);if(Dit.has(c)&&"base"in n){var d=n.base.type==="ordgroup"?n.base.body.length:1,_,f,m;if(d>5)c==="widehat"||c==="widecheck"?(_=420,l=2364,m=.42,f=c+"4"):(_=312,l=2340,m=.34,f="tilde4");else{var g=[1,1,2,2,3,3][d];c==="widehat"||c==="widecheck"?(l=[0,1062,2364,2364,2364][g],_=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],f=c+g):(l=[0,600,1033,2339,2340][g],_=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],f="tilde"+g)}var S=new xl(f),k=new wo([S],{width:"100%",height:Ke(m),viewBox:"0 0 "+l+" "+_,preserveAspectRatio:"none"});return{span:yl([],[k],t),minWidth:0,height:m}}else{var b=[],v=Rit[c];if(!v)throw new Error('No SVG data for "'+c+'".');var[x,y,C]=v,A=C/1e3,E=x.length,j,T;if(E===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');j=["hide-tail"],T=[v[3]]}else if(E===2)j=["halfarrow-left","halfarrow-right"],T=["xMinYMin","xMaxYMin"];else if(E===3)j=["brace-left","brace-center","brace-right"],T=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+E+" children.");for(var D=0;D0&&(s.style.minWidth=Ke(a)),s},Lit=function(n,t,r,s,a){var o,l=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(o=Fe(["stretchy",t],[],a),t==="fbox"){var c=a.color&&a.getColor();c&&(o.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(t)&&d.push(new e2({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&d.push(new e2({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new wo(d,{width:"100%",height:Ke(l)});o=yl([],[_],a)}return o.height=l,o.style.height=Ke(l),o},Oit={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Iit={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Bit(e){return e in Oit}function Yt(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 em(e){var n=tm(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 tm(e){return e&&(e.type==="atom"||Iit.hasOwnProperty(e.type))?e:null}var cA=e=>{if(e instanceof mi)return e;if(uit(e)&&e.children.length===1)return cA(e.children[0])},hy=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=Yt(e.base,"accent"),t=r.base,e.base=t,s=cit(wn(e,n)),e.base=r):(r=Yt(e,"accent"),t=r.base);var a=wn(t,n.havingCrampedStyle()),o=r.isShifty&&Co(t),l=0;if(o){var c,d;l=(c=(d=cA(a))==null?void 0:d.skew)!=null?c:0}var _=r.label==="\\c",f=_?a.height+a.depth:Math.min(a.height,n.fontMetrics().xHeight),m;if(r.isStretchy)m=Jp(r,n),m=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ke(2*l)+")",marginLeft:Ke(2*l)}:void 0}]});else{var g,S;r.label==="\\vec"?(g=nA("vec",n),S=tA.vec[1]):(g=Zp({mode:r.mode,text:r.label},n,"textord"),g=lit(g),g.italic=0,S=g.width,_&&(f+=g.depth)),m=Fe(["accent-body"],[g]);var k=r.label==="\\textcircled";k&&(m.classes.push("accent-full"),f=a.height);var b=l;k||(b-=S/2),m.style.left=Ke(b),r.label==="\\textcircled"&&(m.style.top=".2em"),m=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:m}]})}var v=Fe(["mord","accent"],[m],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},uA=(e,n)=>{var t=e.isStretchy?Qp(e.label):new Ge("mo",[Li(e.label,e.mode)]),r=new Ge("mover",[$n(e.base,n),t]);return r.setAttribute("accent","true"),r},$it=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));tt({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=hp(n[0]),r=!$it.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:hy,mathmlBuilder:uA});tt({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:hy,mathmlBuilder:uA});tt({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=wn(e.base,n),r=Jp(e,n),s=e.label==="\\utilde"?.12:0,a=xn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Fe(["mord","accentunder"],[a],n)},mathmlBuilder:(e,n)=>{var t=Qp(e.label),r=new Ge("munder",[$n(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var a0=e=>{var n=new Ge("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};tt({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=Qu(wn(e.body,r,n),n),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var o;e.below&&(r=n.havingStyle(t.sub()),o=Qu(wn(e.below,r,n),n),o.classes.push(a+"-arrow-pad"));var l=Jp(e,n),c=-n.fontMetrics().axisHeight+.5*l.height,d=-n.fontMetrics().axisHeight-.5*l.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(d-=s.depth);var _;if(o){var f=-n.fontMetrics().axisHeight+o.height+.5*l.height+.111;_=xn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:f}]})}else _=xn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return Fe(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=Qp(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=a0($n(e.body,n));if(e.below){var a=a0($n(e.below,n));r=new Ge("munderover",[t,a,s])}else r=new Ge("mover",[t,s])}else if(e.below){var o=a0($n(e.below,n));r=new Ge("munder",[t,o])}else r=a0(),r=new Ge("mover",[t,r]);return r}});function dA(e,n){var t=Ur(e.body,n,!0);return Fe([e.mclass],t,n)}function fA(e,n){var t,r=xi(e.body,n);return e.mclass==="minner"?t=new Ge("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ge("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ge("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}tt({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:Tr(s),isCharacterBox:Co(s)}},htmlBuilder:dA,mathmlBuilder:fA});var nm=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"};tt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:nm(n[0]),body:Tr(n[1]),isCharacterBox:Co(n[1])}}});tt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],a=n[0],o;r!=="\\stackrel"?o=nm(s):o="mrel";var l={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Tr(s)},c={type:"supsub",mode:a.mode,base:l,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:Co(c)}},htmlBuilder:dA,mathmlBuilder:fA});tt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:nm(n[0]),body:Tr(n[0])}},htmlBuilder(e,n){var t=Ur(e.body,n,!0),r=Fe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=xi(e.body,n),r=new Ge("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var Hit={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Ek=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Nk=e=>e.type==="textord"&&e.text==="@",Pit=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function Fit(e,n,t){var r=Hit[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]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},o=t.callFunction("\\Big",[a],[]),l=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,o,l]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Uit(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 qe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;aAV".includes(d))for(var f=0;f<2;f++){for(var m=!0,g=c+1;gAV=|." after @',o[c]);var S=Fit(d,_,e),k={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};r.push(k),l=Ek()}a%2===0?r.push(l):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}tt({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=Qu(wn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ke(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ge("mrow",[$n(e.label,n)]);return t=new Ge("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ge("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});tt({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=Qu(wn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ge("mrow",[$n(e.fragment,n)])}});tt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=Yt(n[0],"ordgroup"),s=r.body,a="",o=0;o=1114111)throw new qe("\\@char with invalid code point "+a);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:d}}});var hA=(e,n)=>{var t=Ur(e.body,n.withColor(e.color),!1);return No(t)},_A=(e,n)=>{var t=xi(e.body,n.withColor(e.color)),r=new Ge("mstyle",t);return r.setAttribute("mathcolor",e.color),r};tt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=Yt(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:Tr(s)}},htmlBuilder:hA,mathmlBuilder:_A});tt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=Yt(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var a=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:a}},htmlBuilder:hA,mathmlBuilder:_A});tt({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,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&Yt(s,"size").value}},htmlBuilder(e,n){var t=Fe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Ke(ar(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ge("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Ke(ar(e.size,n)))),t}});var d2={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},pA=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new qe("Expected a control sequence",e);return n},qit=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},mA=(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)};tt({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(d2[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=d2[r.text]),Yt(n.parseFunction(),"internal");throw new qe("Invalid token after macro prefix",r)}});tt({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 qe("Expected a control sequence",r);for(var a=0,o,l=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){o=n.gullet.future(),l[a].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new qe('Argument number "'+r.text+'" out of order');a++,l.push([])}else{if(r.text==="EOF")throw new qe("Expected a macro definition");l[a].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:a,delimiters:l},t===d2[t]),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=pA(n.gullet.popToken());n.gullet.consumeSpaces();var s=qit(n);return mA(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=pA(n.gullet.popToken()),s=n.gullet.popToken(),a=n.gullet.popToken();return mA(n,r,a,t==="\\\\globalfuture"),n.gullet.pushToken(a),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var Sf=function(n,t,r){var s=Qn.math[n]&&Qn.math[n].replace,a=ly(s||n,t,r);if(!a)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return a},_y=function(n,t,r,s){var a=r.havingBaseStyle(t),o=Fe(s.concat(a.sizingClasses(r)),[n],r),l=a.sizeMultiplier/r.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},gA=function(n,t,r){var s=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Ke(a),n.height-=a,n.depth+=a},Git=function(n,t,r,s,a,o){var l=Es(n,"Main-Regular",a,s),c=_y(l,t,s,o);return gA(c,s,t),c},Vit=function(n,t,r,s){return Es(n,"Size"+t+"-Regular",r,s)},vA=function(n,t,r,s,a,o){var l=Vit(n,t,a,s),c=_y(Fe(["delimsizing","size"+t],[l],s),$t.TEXT,s,o);return r&&gA(c,s,$t.TEXT),c},xv=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Fe(["delimsizinginner",s],[Fe([],[Es(n,t,r)])]);return{type:"elem",elem:a}},yv=function(n,t,r){var s=ka["Size4-Regular"][n.charCodeAt(0)]?ka["Size4-Regular"][n.charCodeAt(0)][4]:ka["Size1-Regular"][n.charCodeAt(0)][4],a=new xl("inner",tit(n,Math.round(1e3*t))),o=new wo([a],{width:Ke(s),height:Ke(t),style:"width:"+Ke(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),l=yl([],[o],r);return l.height=t,l.style.height=Ke(t),l.style.width=Ke(s),{type:"elem",elem:l}},f2=.008,o0={type:"kern",size:-1*f2},Wit=new Set(["|","\\lvert","\\rvert","\\vert"]),Kit=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),bA=function(n,t,r,s,a,o){var l,c,d,_,f="",m=0;l=d=_=n,c=null;var g="Size1-Regular";n==="\\uparrow"?d=_="⏐":n==="\\Uparrow"?d=_="‖":n==="\\downarrow"?l=d="⏐":n==="\\Downarrow"?l=d="‖":n==="\\updownarrow"?(l="\\uparrow",d="⏐",_="\\downarrow"):n==="\\Updownarrow"?(l="\\Uparrow",d="‖",_="\\Downarrow"):Wit.has(n)?(d="∣",f="vert",m=333):Kit.has(n)?(d="∥",f="doublevert",m=556):n==="["||n==="\\lbrack"?(l="⎡",d="⎢",_="⎣",g="Size4-Regular",f="lbrack",m=667):n==="]"||n==="\\rbrack"?(l="⎤",d="⎥",_="⎦",g="Size4-Regular",f="rbrack",m=667):n==="\\lfloor"||n==="⌊"?(d=l="⎢",_="⎣",g="Size4-Regular",f="lfloor",m=667):n==="\\lceil"||n==="⌈"?(l="⎡",d=_="⎢",g="Size4-Regular",f="lceil",m=667):n==="\\rfloor"||n==="⌋"?(d=l="⎥",_="⎦",g="Size4-Regular",f="rfloor",m=667):n==="\\rceil"||n==="⌉"?(l="⎤",d=_="⎥",g="Size4-Regular",f="rceil",m=667):n==="("||n==="\\lparen"?(l="⎛",d="⎜",_="⎝",g="Size4-Regular",f="lparen",m=875):n===")"||n==="\\rparen"?(l="⎞",d="⎟",_="⎠",g="Size4-Regular",f="rparen",m=875):n==="\\{"||n==="\\lbrace"?(l="⎧",c="⎨",_="⎩",d="⎪",g="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(l="⎫",c="⎬",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(l="⎧",_="⎩",d="⎪",g="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(l="⎫",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(l="⎧",_="⎭",d="⎪",g="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(l="⎫",_="⎩",d="⎪",g="Size4-Regular");var S=Sf(l,g,a),k=S.height+S.depth,b=Sf(d,g,a),v=b.height+b.depth,x=Sf(_,g,a),y=x.height+x.depth,C=0,A=1;if(c!==null){var E=Sf(c,g,a);C=E.height+E.depth,A=2}var j=k+y+C,T=Math.max(0,Math.ceil((t-j)/(A*v))),D=j+T*A*v,I=s.fontMetrics().axisHeight;r&&(I*=s.sizeMultiplier);var P=D/2-I,H=[];if(f.length>0){var F=D-k-y,V=Math.round(D*1e3),X=nit(f,Math.round(F*1e3)),W=new xl(f,X),Z=Ke(m/1e3),J=Ke(V/1e3),B=new wo([W],{width:Z,height:J,viewBox:"0 0 "+m+" "+V}),L=yl([],[B],s);L.height=V/1e3,L.style.width=Z,L.style.height=J,H.push({type:"elem",elem:L})}else{if(H.push(xv(_,g,a)),H.push(o0),c===null){var $=D-k-y+2*f2;H.push(yv(d,$,s))}else{var K=(D-k-y-C)/2+2*f2;H.push(yv(d,K,s)),H.push(o0),H.push(xv(c,g,a)),H.push(o0),H.push(yv(d,K,s))}H.push(o0),H.push(xv(l,g,a))}var G=s.havingBaseStyle($t.TEXT),re=xn({positionType:"bottom",positionData:P,children:H});return _y(Fe(["delimsizing","mult"],[re],G),$t.TEXT,s,o)},wv=80,Sv=.08,kv=function(n,t,r,s,a){var o=eit(n,s,r),l=new xl(n,o),c=new wo([l],{width:"400em",height:Ke(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return yl(["hide-tail"],[c],a)},Yit=function(n,t){var r=t.havingBaseSizing(),s=kA("\\surd",n*r.sizeMultiplier,SA,r),a=r.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l,c,d,_,f;return s.type==="small"?(_=1e3+1e3*o+wv,n<1?a=1:n<1.4&&(a=.7),c=(1+o+Sv)/a,d=(1+o)/a,l=kv("sqrtMain",c,_,o,t),l.style.minWidth="0.853em",f=.833/a):s.type==="large"?(_=(1e3+wv)*Mf[s.size],d=(Mf[s.size]+o)/a,c=(Mf[s.size]+o+Sv)/a,l=kv("sqrtSize"+s.size,c,_,o,t),l.style.minWidth="1.02em",f=1/a):(c=n+o+Sv,d=n+o,_=Math.floor(1e3*n+o)+wv,l=kv("sqrtTall",c,_,o,t),l.style.minWidth="0.742em",f=1.056),l.height=d,l.style.height=Ke(c),{span:l,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},xA=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),Xit=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),yA=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Mf=[0,1.2,1.8,2.4,3],wA=function(n,t,r,s,a){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),xA.has(n)||yA.has(n))return vA(n,t,!1,r,s,a);if(Xit.has(n))return bA(n,Mf[t],!1,r,s,a);throw new qe("Illegal delimiter: '"+n+"'")},Zit=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Qit=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"stack"}],SA=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Jit=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.")},kA=function(n,t,r,s){for(var a=Math.min(2,3-s.style.size),o=a;ot)return l}return r[r.length-1]},h2=function(n,t,r,s,a,o){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var l;yA.has(n)?l=Zit:xA.has(n)?l=SA:l=Qit;var c=kA(n,t,l,s);return c.type==="small"?Git(n,c.style,r,s,a,o):c.type==="large"?vA(n,c.size,r,s,a,o):bA(n,t,r,s,a,o)},Cv=function(n,t,r,s,a,o){var l=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,d=5/s.fontMetrics().ptPerEm,_=Math.max(t-l,r+l),f=Math.max(_/500*c,2*_-d);return h2(n,f,!0,s,a,o)},zk={"\\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}},eat=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 Ak(e){return"isMiddle"in e}function rm(e,n){var t=tm(e);if(t&&eat.has(t.text))return t;throw t?new qe("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new qe("Invalid delimiter type '"+e.type+"'",e)}tt({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=rm(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:zk[e.funcName].size,mclass:zk[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Fe([e.mclass]):wA(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Li(e.delim,e.mode));var t=new Ge("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Ke(Mf[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function Tk(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}tt({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 qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:rm(n[0],e).text,color:t}}});tt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=rm(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Yt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,n)=>{Tk(e);for(var t=Ur(e.body,n,!0,["mopen","mclose"]),r=0,s=0,a=!1,o=0;o{Tk(e);var t=xi(e.body,n);if(e.left!=="."){var r=new Ge("mo",[Li(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ge("mo",[Li(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return dy(t)}});tt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=rm(n[0],e);if(!e.parser.leftrightDepth)throw new qe("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Vf(n,[]):(t=wA(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Li("|","text"):Li(e.delim,e.mode),r=new Ge("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var sm=(e,n)=>{var t=Qu(wn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,a,o,l=Co(e.body);if(r==="sout")a=Fe(["stretchy","sout"]),a.height=n.fontMetrics().defaultRuleThickness/s,o=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=ar({number:.6,unit:"pt"},n),d=ar({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var f=t.height+t.depth+c+d;t.style.paddingLeft=Ke(f/2+c);var m=Math.floor(1e3*f*s),g=Qst(m),S=new wo([new xl("phase",g)],{width:"400em",height:Ke(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=yl(["hide-tail"],[S],n),a.style.height=Ke(f),o=t.depth+c+d}else{/cancel/.test(r)?l||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=k):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*v,b=Math.max(0,.25-t.depth)):(k=l?.2:0,b=k),a=Lit(t,r,k,b,n),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=Ke(v)):r==="angl"&&v!==.049&&(a.style.borderTopWidth=Ke(v),a.style.borderRightWidth=Ke(v)),o=t.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=xn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];x=xn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:y}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!l?Fe(["mord","cancel-lap"],[x],n):Fe(["mord"],[x],n)},im=(e,n)=>{var t,r=new Ge(e.label.includes("colorbox")?"mpadded":"menclose",[$n(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: "+Ke(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};tt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Yt(n[0],"color-token").color,o=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:o}},htmlBuilder:sm,mathmlBuilder:im});tt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Yt(n[0],"color-token").color,o=Yt(n[1],"color-token").color,l=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:sm,mathmlBuilder:im});tt({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]}}});tt({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:sm,mathmlBuilder:im});tt({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:sm,mathmlBuilder:im});tt({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 CA={};function Ra(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 qe("{"+e.envName+"} can be used only in display mode.")},tat=new Set(["gather","gather*"]);function py(e){if(!e.includes("ed"))return!e.includes("*")}function Tl(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:o,colSeparationType:l,autoTag:c,singleRow:d,emptySingleRow:_,maxNumCols:f,leqno:m}=n;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new qe("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var S=[],k=[S],b=[],v=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ji("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),v.push(jk(e));;){var A=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:A};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),S.push(E);var j=e.fetch().text;if(j==="&"){if(f&&S.length===f){if(d||l)throw new qe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){C(),S.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(k.length>1||!_)&&k.pop(),v.length0&&(y+=.25),d.push({pos:y,isDashed:We[st]})}for(C(o[0]),r=0;r0&&(P+=x,jWe))for(r=0;r=l)){var te=void 0;if(s>0||n.hskipBeforeAndAfter){var le,ge;te=(le=(ge=G)==null?void 0:ge.pregap)!=null?le:m,te!==0&&(X=Fe(["arraycolsep"],[]),X.style.width=Ke(te),V.push(X))}var ue=[];for(r=0;r0){for(var At=Zu("hline",t,_),vt=Zu("hdashline",t,_),Ot=[{type:"elem",elem:wt,shift:0}];d.length>0;){var St=d.pop(),kt=St.pos-H;St.isDashed?Ot.push({type:"elem",elem:vt,shift:kt}):Ot.push({type:"elem",elem:At,shift:kt})}wt=xn({positionType:"individualShift",children:Ot})}if(Z.length===0)return Fe(["mord"],[wt],t);var xe=xn({positionType:"individualShift",children:Z}),je=Fe(["tag"],[xe],t);return No([wt,je])},nat={c:"center ",l:"left ",r:"right "},La=function(n,t){for(var r=[],s=new Ge("mtd",[],["mtr-glue"]),a=new Ge("mtd",[],["mml-eqn-num"]),o=0;o0){var S=n.cols,k="",b=!1,v=0,x=S.length;S[0].type==="separator"&&(m+="top ",v=1),S[S.length-1].type==="separator"&&(m+="bottom ",x-=1);for(var y=v;y0?"left ":"",m+=D[D.length-1].length>0?"right ":"";for(var I=1;I0&&g&&(b=1),r[S]={type:"align",align:k,pregap:b,postgap:0}}return o.colSeparationType=g?"align":"alignat",o};Ra({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=tm(n[0]),r=t?[n[0]]:Yt(n[0],"ordgroup").body,s=r.map(function(o){var l=em(o),c=l.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new qe("Unknown column alignment: "+c,o)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Tl(e.parser,a,my(e.envName))},htmlBuilder:Da,mathmlBuilder:La});Ra({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 qe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var a=Tl(e.parser,r,my(e.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[a],left:n[0],right:n[1],rightColor:void 0}:a},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Tl(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=tm(n[0]),r=t?[n[0]]:Yt(n[0],"ordgroup").body,s=r.map(function(l){var c=em(l),d=c.text;if("lc".includes(d))return{type:"align",align:d};throw new qe("Unknown column alignment: "+d,l)});if(s.length>1)throw new qe("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},o=Tl(e.parser,a,"script");if(o.body.length>0&&o.body[0].length>1)throw new qe("{subarray} can contain only one column");return o},htmlBuilder:Da,mathmlBuilder:La});Ra({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=Tl(e.parser,n,my(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:zA,htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){tat.has(e.envName)&&am(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:py(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Tl(e.parser,n,"display")},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:zA,htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){am(e);var n={autoTag:py(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Tl(e.parser,n,"display")},htmlBuilder:Da,mathmlBuilder:La});Ra({type:"array",names:["CD"],props:{numArgs:0},handler(e){return am(e),Uit(e.parser)},htmlBuilder:Da,mathmlBuilder:La});ne("\\nonumber","\\gdef\\@eqnsw{0}");ne("\\notag","\\nonumber");tt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new qe(e.funcName+" valid only within array environment")}});var Mk=CA;tt({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 qe("Invalid environment name",s);for(var a="",o=0;o{var t=e.font,r=n.withFont(t);return wn(e.body,r)},TA=(e,n)=>{var t=e.font,r=n.withFont(t);return $n(e.body,r)},Rk={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};tt({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=hp(n[0]),a=r;return a in Rk&&(a=Rk[a]),{type:"font",mode:t.mode,font:a.slice(1),body:s}},htmlBuilder:AA,mathmlBuilder:TA});tt({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:nm(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:Co(r)}}});tt({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:a}=t,o=t.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:AA,mathmlBuilder:TA});var rat=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),a;a=n.havingStyle(r);var o=wn(e.numer,a,n);if(e.continued){var l=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;o.height=o.height0?S=3*m:S=7*m,k=n.fontMetrics().denom1):(f>0?(g=n.fontMetrics().num2,S=m):(g=n.fontMetrics().num3,S=3*m),k=n.fontMetrics().denom2);var b;if(_){var x=n.fontMetrics().axisHeight;g-o.depth-(x+.5*f){var t=new Ge("mfrac",[$n(e.numer,n),$n(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=ar(e.barSize,n);t.setAttribute("linethickness",Ke(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new Ge("mo",[new jr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),e.rightDelim!=null){var o=new Ge("mo",[new jr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return dy(s)}return t},jA=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};tt({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],a=n[1],o,l=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",c=")";break;case"\\\\bracefrac":o=!1,l="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,l="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var d=r==="\\cfrac",_=null;return d||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),jA({type:"genfrac",mode:t.mode,numer:s,denom:a,continued:d,hasBarLine:o,leftDelim:l,rightDelim:c,barSize:null},_)},htmlBuilder:rat,mathmlBuilder:sat});tt({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 Dk=["display","text","script","scriptscript"],Lk=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};tt({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],a=hp(n[0]),o=a.type==="atom"&&a.family==="open"?Lk(a.text):null,l=hp(n[1]),c=l.type==="atom"&&l.family==="close"?Lk(l.text):null,d=Yt(n[2],"size"),_,f=null;d.isBlank?_=!0:(f=d.value,_=f.number>0);var m=null,g=n[3];if(g.type==="ordgroup"){if(g.body.length>0){var S=Yt(g.body[0],"textord");m=Dk[Number(S.text)]}}else g=Yt(g,"textord"),m=Dk[Number(g.text)];return jA({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:f,leftDelim:o,rightDelim:c},m)}});tt({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:Yt(n[0],"size").value,token:s}}});tt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=Yt(n[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=n[2],l=a.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}}});var MA=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?wn(e.sup,n.havingStyle(t.sup()),n):wn(e.sub,n.havingStyle(t.sub()),n),s=Yt(e.base,"horizBrace")):s=Yt(e,"horizBrace");var a=wn(s.base,n.havingBaseStyle($t.DISPLAY)),o=Jp(s,n),l;if(s.isOver?l=xn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]}):l=xn({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var c=Fe(["minner",s.isOver?"mover":"munder"],[l],n);s.isOver?l=xn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):l=xn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Fe(["minner",s.isOver?"mover":"munder"],[l],n)},iat=(e,n)=>{var t=Qp(e.label);return new Ge(e.isOver?"mover":"munder",[$n(e.base,n),t])};tt({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:MA,mathmlBuilder:iat});tt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=Yt(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Tr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Ur(e.body,n,!1);return vit(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=wl(e.body,n);return t instanceof Ge||(t=new Ge("mrow",[t])),t.setAttribute("href",e.href),t}});tt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=Yt(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],a=0;a{var{parser:t,funcName:r,token:s}=e,a=Yt(n[0],"raw").string,o=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,c={};switch(r){case"\\htmlClass":c.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":c.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":c.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var d=a.split(","),_=0;_{var t=Ur(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Fe(r,t,n);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,n)=>wl(e.body,n)});tt({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:Tr(n[0]),mathml:Tr(n[1])}},htmlBuilder:(e,n)=>{var t=Ur(e.html,n,!1);return No(t)},mathmlBuilder:(e,n)=>wl(e.mathml,n)});var Ev=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 qe("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Kz(r))throw new qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};tt({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"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(t[0])for(var c=Yt(t[0],"raw").string,d=c.split(","),_=0;_{var t=ar(e.height,n),r=0;e.totalheight.number>0&&(r=ar(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=ar(e.width,n));var a={height:Ke(t+r)};s>0&&(a.width=Ke(s)),r>0&&(a.verticalAlign=Ke(-r));var o=new ait(e.src,e.alt,a);return o.height=t,o.depth=r,o},mathmlBuilder:(e,n)=>{var t=new Ge("mglyph",[]);t.setAttribute("alt",e.alt);var r=ar(e.height,n),s=0;if(e.totalheight.number>0&&(s=ar(e.totalheight,n)-r,t.setAttribute("valign",Ke(-s))),t.setAttribute("height",Ke(r+s)),e.width.number>0){var a=ar(e.width,n);t.setAttribute("width",Ke(a))}return t.setAttribute("src",e.src),t}});tt({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=Yt(n[0],"size");if(t.settings.strict){var a=r[1]==="m",o=s.value.unit==="mu";a?(o||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")):o&&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 eA(e.dimension,n)},mathmlBuilder(e,n){var t=ar(e.dimension,n);return new aA(t)}});tt({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=Fe([],[wn(e.body,n)]),t=Fe(["inner"],[t],n)):t=Fe(["inner"],[wn(e.body,n)]);var r=Fe(["fix"],[]),s=Fe([e.alignment],[t,r],n),a=Fe(["strut"]);return a.style.height=Ke(s.height+s.depth),s.depth&&(a.style.verticalAlign=Ke(-s.depth)),s.children.unshift(a),s=Fe(["thinbox"],[s],n),Fe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ge("mpadded",[$n(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}});tt({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 a=t==="\\("?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});tt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new qe("Mismatched "+e.funcName)}});var Ok=(e,n)=>{switch(n.style.size){case $t.DISPLAY.size:return e.display;case $t.TEXT.size:return e.text;case $t.SCRIPT.size:return e.script;case $t.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};tt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Tr(n[0]),text:Tr(n[1]),script:Tr(n[2]),scriptscript:Tr(n[3])}},htmlBuilder:(e,n)=>{var t=Ok(e,n),r=Ur(t,n,!1);return No(r)},mathmlBuilder:(e,n)=>{var t=Ok(e,n);return wl(t,n)}});var RA=(e,n,t,r,s,a,o)=>{e=Fe([],[e]);var l=t&&Co(t),c,d;if(n){var _=wn(n,r.havingStyle(s.sup()),r);d={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var f=wn(t,r.havingStyle(s.sub()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var m;if(d&&c){var g=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;m=xn({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ke(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ke(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var S=e.height-o;m=xn({positionType:"top",positionData:S,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ke(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(d){var k=e.depth+o;m=xn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ke(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[m];if(c&&a!==0&&!l){var v=Fe(["mspace"],[],r);v.style.marginRight=Ke(a),b.unshift(v)}return Fe(["mop","op-limits"],b,r)},DA=new Set(["\\smallint"]),pd=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Yt(e.base,"op"),s=!0):a=Yt(e,"op");var o=n.style,l=!1;o.size===$t.DISPLAY.size&&a.symbol&&!DA.has(a.name)&&(l=!0);var c,d;if(a.symbol){var _=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),c=Es(a.name,_,"math",n,["mop","op-symbol",l?"large-op":"small-op"]),d=c.italic,f.length>0){var m=nA(f+"Size"+(l?"2":"1"),n);c=xn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:m,shift:l?.08:0}]}),a.name="\\"+f,c.classes.unshift("mop"),c.italic=d}}else if(a.body){var g=Ur(a.body,n,!0);g.length===1&&g[0]instanceof mi?(c=g[0],c.classes[0]="mop"):c=Fe(["mop"],g,n)}else{for(var S=[],k=1;k{var t;if(e.symbol)t=new Ge("mo",[Li(e.name,e.mode)]),DA.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ge("mo",xi(e.body,n));else{t=new Ge("mi",[new jr(e.name.slice(1))]);var r=new Ge("mo",[Li("⁡","text")]);e.parentIsSupSub?t=new Ge("mrow",[t,r]):t=iA([t,r])}return t},aat={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};tt({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=aat[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:pd,mathmlBuilder:Nh});tt({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:Tr(r)}},htmlBuilder:pd,mathmlBuilder:Nh});var oat={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};tt({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:pd,mathmlBuilder:Nh});tt({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:pd,mathmlBuilder:Nh});tt({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=oat[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:pd,mathmlBuilder:Nh});var LA=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Yt(e.base,"operatorname"),s=!0):a=Yt(e,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(f=>{var m="text"in f?f.text:void 0;return typeof m=="string"?{type:"textord",mode:f.mode,text:m}:f}),c=Ur(l,n.withFont("mathrm"),!0),d=0;d{for(var t=xi(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new jr(l)]}var c=new Ge("mi",t);c.setAttribute("mathvariant","normal");var d=new Ge("mo",[Li("⁡","text")]);return e.parentIsSupSub?new Ge("mrow",[c,d]):iA([c,d])};tt({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:Tr(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:LA,mathmlBuilder:lat});ne("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Tc({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?No(Ur(e.body,n,!1)):Fe(["mord"],Ur(e.body,n,!0),n)},mathmlBuilder(e,n){return wl(e.body,n,!0)}});tt({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=wn(e.body,n.havingCrampedStyle()),r=Zu("overline-line",n),s=n.fontMetrics().defaultRuleThickness,a=xn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Fe(["mord","overline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new jr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("mover",[$n(e.body,n),t]);return r.setAttribute("accent","true"),r}});tt({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:Tr(r)}},htmlBuilder:(e,n)=>{var t=Ur(e.body,n.withPhantom(),!1);return No(t)},mathmlBuilder:(e,n)=>{var t=xi(e.body,n);return new Ge("mphantom",t)}});ne("\\hphantom","\\smash{\\phantom{#1}}");tt({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=Fe(["inner"],[wn(e.body,n.withPhantom())]),r=Fe(["fix"],[]);return Fe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=xi(Tr(e.body),n),r=new Ge("mphantom",t),s=new Ge("mpadded",[r]);return s.setAttribute("width","0px"),s}});tt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=Yt(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=wn(e.body,n),r=ar(e.dy,n);return xn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[$n(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});tt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});tt({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],a=Yt(n[0],"size"),o=Yt(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&Yt(s,"size").value,width:a.value,height:o.value}},htmlBuilder(e,n){var t=Fe(["mord","rule"],[],n),r=ar(e.width,n),s=ar(e.height,n),a=e.shift?ar(e.shift,n):0;return t.style.borderRightWidth=Ke(r),t.style.borderTopWidth=Ke(s),t.style.bottom=Ke(a),t.width=r,t.height=s+a,t.depth=-a,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=ar(e.width,n),r=ar(e.height,n),s=e.shift?ar(e.shift,n):0,a=n.color&&n.getColor()||"black",o=new Ge("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",Ke(t)),o.setAttribute("height",Ke(r));var l=new Ge("mpadded",[o]);return s>=0?l.setAttribute("height",Ke(s)):(l.setAttribute("height",Ke(s)),l.setAttribute("depth",Ke(-s))),l.setAttribute("voffset",Ke(s)),l}});function OA(e,n,t){for(var r=Ur(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,a=0;a{var t=n.havingSize(e.size);return OA(e.body,t,n)};tt({type:"sizing",names:Ik,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:Ik.indexOf(r)+1,body:a}},htmlBuilder:cat,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=xi(e.body,t),s=new Ge("mstyle",r);return s.setAttribute("mathsize",Ke(t.sizeMultiplier)),s}});tt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,a=!1,o=t[0]&&Yt(t[0],"ordgroup");if(o)for(var l,c=0;c{var t=Fe([],[wn(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 Fe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ge("mpadded",[$n(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});tt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],a=n[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,n){var t=wn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=Qu(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,a=s;n.style.id<$t.TEXT.id&&(a=n.fontMetrics().xHeight);var o=s+a/4,l=t.height+t.depth+o+s,{span:c,ruleWidth:d,advanceWidth:_}=Yit(l,n),f=c.height-d;f>t.height+t.depth+o&&(o=(o+f-t.height-t.depth)/2);var m=c.height-t.height-o-d;t.style.paddingLeft=Ke(_);var g=xn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+m)},{type:"elem",elem:c},{type:"kern",size:d}]});if(e.index){var S=n.havingStyle($t.SCRIPTSCRIPT),k=wn(e.index,S,n),b=.6*(g.height-g.depth),v=xn({positionType:"shift",positionData:-b,children:[{type:"elem",elem:k}]}),x=Fe(["root"],[v]);return Fe(["mord","sqrt"],[x,g],n)}else return Fe(["mord","sqrt"],[g],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ge("mroot",[$n(t,n),$n(r,n)]):new Ge("msqrt",[$n(t,n)])}});var _2={display:$t.DISPLAY,text:$t.TEXT,script:$t.SCRIPT,scriptscript:$t.SCRIPTSCRIPT};function uat(e){return e in _2}tt({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,a=s.parseExpression(!0,t),o=r.slice(1,r.length-5);if(!uat(o))throw new Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:a}},htmlBuilder(e,n){var t=_2[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),OA(e.body,r,n)},mathmlBuilder(e,n){var t=_2[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=xi(e.body,r),a=new Ge("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});var dat=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===$t.DISPLAY.size||r.alwaysHandleSupSub);return s?pd:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(t.style.size===$t.DISPLAY.size||r.limits);return a?LA:null}else{if(r.type==="accent")return Co(r.base)?hy:null;if(r.type==="horizBrace"){var o=!n.sub;return o===r.isOver?MA:null}else return null}else return null};Tc({type:"supsub",htmlBuilder(e,n){var t=dat(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:a}=e,o=wn(r,n),l,c,d=n.fontMetrics(),_=0,f=0,m=r&&Co(r);if(s){var g=n.havingStyle(n.style.sup());l=wn(s,g,n),m||(_=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/n.sizeMultiplier)}if(a){var S=n.havingStyle(n.style.sub());c=wn(a,S,n),m||(f=o.depth+S.fontMetrics().subDrop*S.sizeMultiplier/n.sizeMultiplier)}var k;n.style===$t.DISPLAY?k=d.sup1:n.style.cramped?k=d.sup3:k=d.sup2;var b=n.sizeMultiplier,v=Ke(.5/d.ptPerEm/b),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof mi||y){var C;x=Ke(-((C=o.italic)!=null?C:0))}}var A;if(l&&c){_=Math.max(_,k,l.depth+.25*d.xHeight),f=Math.max(f,d.sub2);var E=d.defaultRuleThickness,j=4*E;if(_-l.depth-(c.height-f)0&&(_+=T,f-=T)}var D=[{type:"elem",elem:c,shift:f,marginRight:v,marginLeft:x},{type:"elem",elem:l,shift:-_,marginRight:v}];A=xn({positionType:"individualShift",children:D})}else if(c){f=Math.max(f,d.sub1,c.height-.8*d.xHeight);var I=[{type:"elem",elem:c,marginLeft:x,marginRight:v}];A=xn({positionType:"shift",positionData:f,children:I})}else if(l)_=Math.max(_,k,l.depth+.25*d.xHeight),A=xn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:l,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var P=c2(o,"right")||"mord";return Fe([P],[o,Fe(["msupsub"],[A])],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 a=[$n(e.base,n)];e.sub&&a.push($n(e.sub,n)),e.sup&&a.push($n(e.sup,n));var o;if(t)o=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&n.style===$t.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(n.style===$t.DISPLAY||d.limits)?o="munderover":o="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===$t.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===$t.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===$t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===$t.DISPLAY)?o="mover":o="msup"}return new Ge(o,a)}});Tc({type:"atom",htmlBuilder(e,n){return cy(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ge("mo",[Li(e.text,e.mode)]);if(e.family==="bin"){var r=fy(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 IA={mi:"italic",mn:"normal",mtext:"normal"};Tc({type:"mathord",htmlBuilder(e,n){return Zp(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ge("mi",[Li(e.text,e.mode,n)]),r=fy(e,n)||"italic";return r!==IA[t.type]&&t.setAttribute("mathvariant",r),t}});Tc({type:"textord",htmlBuilder(e,n){return Zp(e,n,"textord")},mathmlBuilder(e,n){var t=Li(e.text,e.mode,n),r=fy(e,n)||"normal",s;return e.mode==="text"?s=new Ge("mtext",[t]):/[0-9]/.test(e.text)?s=new Ge("mn",[t]):e.text==="\\prime"?s=new Ge("mo",[t]):s=new Ge("mi",[t]),r!==IA[s.type]&&s.setAttribute("mathvariant",r),s}});var Nv={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},zv={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Tc({type:"spacing",htmlBuilder(e,n){if(zv.hasOwnProperty(e.text)){var t=zv[e.text].className||"";if(e.mode==="text"){var r=Zp(e,n,"textord");return r.classes.push(t),r}else return Fe(["mspace",t],[cy(e.text,e.mode,n)],n)}else{if(Nv.hasOwnProperty(e.text))return Fe(["mspace",Nv[e.text]],[],n);throw new qe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(zv.hasOwnProperty(e.text))t=new Ge("mtext",[new jr(" ")]);else{if(Nv.hasOwnProperty(e.text))return new Ge("mspace");throw new qe('Unknown type of space "'+e.text+'"')}return t}});var Bk=()=>{var e=new Ge("mtd",[]);return e.setAttribute("width","50%"),e};Tc({type:"tag",mathmlBuilder(e,n){var t=new Ge("mtable",[new Ge("mtr",[Bk(),new Ge("mtd",[wl(e.body,n)]),Bk(),new Ge("mtd",[wl(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var $k={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Hk={"\\textbf":"textbf","\\textmd":"textmd"},fat={"\\textit":"textit","\\textup":"textup"},Pk=(e,n)=>{var t=e.font;if(t){if($k[t])return n.withTextFontFamily($k[t]);if(Hk[t])return n.withTextFontWeight(Hk[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(fat[t])};tt({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:Tr(s),font:r}},htmlBuilder(e,n){var t=Pk(e,n),r=Ur(e.body,t,!0);return Fe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=Pk(e,n);return wl(e.body,t)}});tt({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=wn(e.body,n),r=Zu("underline-line",n),s=n.fontMetrics().defaultRuleThickness,a=xn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Fe(["mord","underline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new jr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("munder",[$n(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});tt({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=wn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return xn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[$n(e.body,n)],["vcenter"]);return new Ge("mrow",[t])}});tt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=Fk(e),r=[],s=n.havingStyle(n.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),gl=rA,BA=`[ \r - ]`,hat="\\\\[a-zA-Z@]+",_at="\\\\[^\uD800-\uDFFF]",pat="("+hat+")"+BA+"*",mat=`\\\\( +-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 Cit(e){return"toText"in e}class pd{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(Cit(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var s2={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},Eit={ex:!0,em:!0,mu:!0},rA=function(n){return typeof n!="string"&&(n=n.unit),n in s2||n in Eit||n==="ex"},ir=function(n,t){var r;if(n.unit in s2)r=s2[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 qe("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},Ye=function(n){return+n.toFixed(4)+"em"},yl=function(n){return n.filter(t=>t).join(" ")},fy=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=eit(r)+":"+s+";")}return t},sA=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)}},iA=function(n){var t=document.createElement(n);t.className=yl(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]/,aA=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ms(yl(this.classes))+'"');var r=fy(this.style);r&&(t+=' style="'+ms(r)+'"');for(var s of Object.keys(this.attributes)){if(Nit.test(s))throw new qe("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ms(this.attributes[s])+'"'}t+=">";for(var a=0;a",t};class md{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,sA.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return iA.call(this,"span")}toMarkup(){return aA.call(this,"span")}}class em{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,sA.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 iA.call(this,"a")}toMarkup(){return aA.call(this,"a")}}class zit{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=''+ms(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Ye(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=yl(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:"+Ye(this.italic)+";"),r+=fy(this.style),r&&(n=!0,t+=' style="'+ms(r)+'"');var s=ms(this.text);return n?(t+=">",t+=s,t+="",t):s}}class yo{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 i2{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 Mit=e=>e instanceof md||e instanceof em||e instanceof pd,Sa={"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]}},o0={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]},gk={Å:"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 Rit(e,n){Sa[e]=n}function hy(e,n,t){if(!Sa[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=Sa[n][r];if(!s&&e[0]in gk&&(r=gk[e[0]].charCodeAt(0),s=Sa[n][r]),!s&&t==="text"&&nA(r)&&(s=Sa[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var vv={};function Dit(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!vv[n]){var t=vv[n]={cssEmPerMu:o0.quad[n]/18};for(var r in o0)o0.hasOwnProperty(r)&&(t[r]=o0[r][n])}return vv[n]}var Jn={math:{},text:{}};function O(e,n,t,r,s,a){Jn[e][s]={font:n,group:t,replace:r},a&&r&&(Jn[e][r]=Jn[e][s])}var U="math",He="text",Q="main",ce="ams",tr="accent-token",at="bin",Ts="close",gd="inner",Ct="mathord",Dr="op-token",gi="open",zh="punct",de="rel",Co="spacing",pe="textord";O(U,Q,de,"≡","\\equiv",!0);O(U,Q,de,"≺","\\prec",!0);O(U,Q,de,"≻","\\succ",!0);O(U,Q,de,"∼","\\sim",!0);O(U,Q,de,"⊥","\\perp");O(U,Q,de,"⪯","\\preceq",!0);O(U,Q,de,"⪰","\\succeq",!0);O(U,Q,de,"≃","\\simeq",!0);O(U,Q,de,"∣","\\mid",!0);O(U,Q,de,"≪","\\ll",!0);O(U,Q,de,"≫","\\gg",!0);O(U,Q,de,"≍","\\asymp",!0);O(U,Q,de,"∥","\\parallel");O(U,Q,de,"⋈","\\bowtie",!0);O(U,Q,de,"⌣","\\smile",!0);O(U,Q,de,"⊑","\\sqsubseteq",!0);O(U,Q,de,"⊒","\\sqsupseteq",!0);O(U,Q,de,"≐","\\doteq",!0);O(U,Q,de,"⌢","\\frown",!0);O(U,Q,de,"∋","\\ni",!0);O(U,Q,de,"∝","\\propto",!0);O(U,Q,de,"⊢","\\vdash",!0);O(U,Q,de,"⊣","\\dashv",!0);O(U,Q,de,"∋","\\owns");O(U,Q,zh,".","\\ldotp");O(U,Q,zh,"⋅","\\cdotp");O(U,Q,zh,"⋅","·");O(He,Q,pe,"⋅","·");O(U,Q,pe,"#","\\#");O(He,Q,pe,"#","\\#");O(U,Q,pe,"&","\\&");O(He,Q,pe,"&","\\&");O(U,Q,pe,"ℵ","\\aleph",!0);O(U,Q,pe,"∀","\\forall",!0);O(U,Q,pe,"ℏ","\\hbar",!0);O(U,Q,pe,"∃","\\exists",!0);O(U,Q,pe,"∇","\\nabla",!0);O(U,Q,pe,"♭","\\flat",!0);O(U,Q,pe,"ℓ","\\ell",!0);O(U,Q,pe,"♮","\\natural",!0);O(U,Q,pe,"♣","\\clubsuit",!0);O(U,Q,pe,"℘","\\wp",!0);O(U,Q,pe,"♯","\\sharp",!0);O(U,Q,pe,"♢","\\diamondsuit",!0);O(U,Q,pe,"ℜ","\\Re",!0);O(U,Q,pe,"♡","\\heartsuit",!0);O(U,Q,pe,"ℑ","\\Im",!0);O(U,Q,pe,"♠","\\spadesuit",!0);O(U,Q,pe,"§","\\S",!0);O(He,Q,pe,"§","\\S");O(U,Q,pe,"¶","\\P",!0);O(He,Q,pe,"¶","\\P");O(U,Q,pe,"†","\\dag");O(He,Q,pe,"†","\\dag");O(He,Q,pe,"†","\\textdagger");O(U,Q,pe,"‡","\\ddag");O(He,Q,pe,"‡","\\ddag");O(He,Q,pe,"‡","\\textdaggerdbl");O(U,Q,Ts,"⎱","\\rmoustache",!0);O(U,Q,gi,"⎰","\\lmoustache",!0);O(U,Q,Ts,"⟯","\\rgroup",!0);O(U,Q,gi,"⟮","\\lgroup",!0);O(U,Q,at,"∓","\\mp",!0);O(U,Q,at,"⊖","\\ominus",!0);O(U,Q,at,"⊎","\\uplus",!0);O(U,Q,at,"⊓","\\sqcap",!0);O(U,Q,at,"∗","\\ast");O(U,Q,at,"⊔","\\sqcup",!0);O(U,Q,at,"◯","\\bigcirc",!0);O(U,Q,at,"∙","\\bullet",!0);O(U,Q,at,"‡","\\ddagger");O(U,Q,at,"≀","\\wr",!0);O(U,Q,at,"⨿","\\amalg");O(U,Q,at,"&","\\And");O(U,Q,de,"⟵","\\longleftarrow",!0);O(U,Q,de,"⇐","\\Leftarrow",!0);O(U,Q,de,"⟸","\\Longleftarrow",!0);O(U,Q,de,"⟶","\\longrightarrow",!0);O(U,Q,de,"⇒","\\Rightarrow",!0);O(U,Q,de,"⟹","\\Longrightarrow",!0);O(U,Q,de,"↔","\\leftrightarrow",!0);O(U,Q,de,"⟷","\\longleftrightarrow",!0);O(U,Q,de,"⇔","\\Leftrightarrow",!0);O(U,Q,de,"⟺","\\Longleftrightarrow",!0);O(U,Q,de,"↦","\\mapsto",!0);O(U,Q,de,"⟼","\\longmapsto",!0);O(U,Q,de,"↗","\\nearrow",!0);O(U,Q,de,"↩","\\hookleftarrow",!0);O(U,Q,de,"↪","\\hookrightarrow",!0);O(U,Q,de,"↘","\\searrow",!0);O(U,Q,de,"↼","\\leftharpoonup",!0);O(U,Q,de,"⇀","\\rightharpoonup",!0);O(U,Q,de,"↙","\\swarrow",!0);O(U,Q,de,"↽","\\leftharpoondown",!0);O(U,Q,de,"⇁","\\rightharpoondown",!0);O(U,Q,de,"↖","\\nwarrow",!0);O(U,Q,de,"⇌","\\rightleftharpoons",!0);O(U,ce,de,"≮","\\nless",!0);O(U,ce,de,"","\\@nleqslant");O(U,ce,de,"","\\@nleqq");O(U,ce,de,"⪇","\\lneq",!0);O(U,ce,de,"≨","\\lneqq",!0);O(U,ce,de,"","\\@lvertneqq");O(U,ce,de,"⋦","\\lnsim",!0);O(U,ce,de,"⪉","\\lnapprox",!0);O(U,ce,de,"⊀","\\nprec",!0);O(U,ce,de,"⋠","\\npreceq",!0);O(U,ce,de,"⋨","\\precnsim",!0);O(U,ce,de,"⪹","\\precnapprox",!0);O(U,ce,de,"≁","\\nsim",!0);O(U,ce,de,"","\\@nshortmid");O(U,ce,de,"∤","\\nmid",!0);O(U,ce,de,"⊬","\\nvdash",!0);O(U,ce,de,"⊭","\\nvDash",!0);O(U,ce,de,"⋪","\\ntriangleleft");O(U,ce,de,"⋬","\\ntrianglelefteq",!0);O(U,ce,de,"⊊","\\subsetneq",!0);O(U,ce,de,"","\\@varsubsetneq");O(U,ce,de,"⫋","\\subsetneqq",!0);O(U,ce,de,"","\\@varsubsetneqq");O(U,ce,de,"≯","\\ngtr",!0);O(U,ce,de,"","\\@ngeqslant");O(U,ce,de,"","\\@ngeqq");O(U,ce,de,"⪈","\\gneq",!0);O(U,ce,de,"≩","\\gneqq",!0);O(U,ce,de,"","\\@gvertneqq");O(U,ce,de,"⋧","\\gnsim",!0);O(U,ce,de,"⪊","\\gnapprox",!0);O(U,ce,de,"⊁","\\nsucc",!0);O(U,ce,de,"⋡","\\nsucceq",!0);O(U,ce,de,"⋩","\\succnsim",!0);O(U,ce,de,"⪺","\\succnapprox",!0);O(U,ce,de,"≆","\\ncong",!0);O(U,ce,de,"","\\@nshortparallel");O(U,ce,de,"∦","\\nparallel",!0);O(U,ce,de,"⊯","\\nVDash",!0);O(U,ce,de,"⋫","\\ntriangleright");O(U,ce,de,"⋭","\\ntrianglerighteq",!0);O(U,ce,de,"","\\@nsupseteqq");O(U,ce,de,"⊋","\\supsetneq",!0);O(U,ce,de,"","\\@varsupsetneq");O(U,ce,de,"⫌","\\supsetneqq",!0);O(U,ce,de,"","\\@varsupsetneqq");O(U,ce,de,"⊮","\\nVdash",!0);O(U,ce,de,"⪵","\\precneqq",!0);O(U,ce,de,"⪶","\\succneqq",!0);O(U,ce,de,"","\\@nsubseteqq");O(U,ce,at,"⊴","\\unlhd");O(U,ce,at,"⊵","\\unrhd");O(U,ce,de,"↚","\\nleftarrow",!0);O(U,ce,de,"↛","\\nrightarrow",!0);O(U,ce,de,"⇍","\\nLeftarrow",!0);O(U,ce,de,"⇏","\\nRightarrow",!0);O(U,ce,de,"↮","\\nleftrightarrow",!0);O(U,ce,de,"⇎","\\nLeftrightarrow",!0);O(U,ce,de,"△","\\vartriangle");O(U,ce,pe,"ℏ","\\hslash");O(U,ce,pe,"▽","\\triangledown");O(U,ce,pe,"◊","\\lozenge");O(U,ce,pe,"Ⓢ","\\circledS");O(U,ce,pe,"®","\\circledR");O(He,ce,pe,"®","\\circledR");O(U,ce,pe,"∡","\\measuredangle",!0);O(U,ce,pe,"∄","\\nexists");O(U,ce,pe,"℧","\\mho");O(U,ce,pe,"Ⅎ","\\Finv",!0);O(U,ce,pe,"⅁","\\Game",!0);O(U,ce,pe,"‵","\\backprime");O(U,ce,pe,"▲","\\blacktriangle");O(U,ce,pe,"▼","\\blacktriangledown");O(U,ce,pe,"■","\\blacksquare");O(U,ce,pe,"⧫","\\blacklozenge");O(U,ce,pe,"★","\\bigstar");O(U,ce,pe,"∢","\\sphericalangle",!0);O(U,ce,pe,"∁","\\complement",!0);O(U,ce,pe,"ð","\\eth",!0);O(He,Q,pe,"ð","ð");O(U,ce,pe,"╱","\\diagup");O(U,ce,pe,"╲","\\diagdown");O(U,ce,pe,"□","\\square");O(U,ce,pe,"□","\\Box");O(U,ce,pe,"◊","\\Diamond");O(U,ce,pe,"¥","\\yen",!0);O(He,ce,pe,"¥","\\yen",!0);O(U,ce,pe,"✓","\\checkmark",!0);O(He,ce,pe,"✓","\\checkmark");O(U,ce,pe,"ℶ","\\beth",!0);O(U,ce,pe,"ℸ","\\daleth",!0);O(U,ce,pe,"ℷ","\\gimel",!0);O(U,ce,pe,"ϝ","\\digamma",!0);O(U,ce,pe,"ϰ","\\varkappa");O(U,ce,gi,"┌","\\@ulcorner",!0);O(U,ce,Ts,"┐","\\@urcorner",!0);O(U,ce,gi,"└","\\@llcorner",!0);O(U,ce,Ts,"┘","\\@lrcorner",!0);O(U,ce,de,"≦","\\leqq",!0);O(U,ce,de,"⩽","\\leqslant",!0);O(U,ce,de,"⪕","\\eqslantless",!0);O(U,ce,de,"≲","\\lesssim",!0);O(U,ce,de,"⪅","\\lessapprox",!0);O(U,ce,de,"≊","\\approxeq",!0);O(U,ce,at,"⋖","\\lessdot");O(U,ce,de,"⋘","\\lll",!0);O(U,ce,de,"≶","\\lessgtr",!0);O(U,ce,de,"⋚","\\lesseqgtr",!0);O(U,ce,de,"⪋","\\lesseqqgtr",!0);O(U,ce,de,"≑","\\doteqdot");O(U,ce,de,"≓","\\risingdotseq",!0);O(U,ce,de,"≒","\\fallingdotseq",!0);O(U,ce,de,"∽","\\backsim",!0);O(U,ce,de,"⋍","\\backsimeq",!0);O(U,ce,de,"⫅","\\subseteqq",!0);O(U,ce,de,"⋐","\\Subset",!0);O(U,ce,de,"⊏","\\sqsubset",!0);O(U,ce,de,"≼","\\preccurlyeq",!0);O(U,ce,de,"⋞","\\curlyeqprec",!0);O(U,ce,de,"≾","\\precsim",!0);O(U,ce,de,"⪷","\\precapprox",!0);O(U,ce,de,"⊲","\\vartriangleleft");O(U,ce,de,"⊴","\\trianglelefteq");O(U,ce,de,"⊨","\\vDash",!0);O(U,ce,de,"⊪","\\Vvdash",!0);O(U,ce,de,"⌣","\\smallsmile");O(U,ce,de,"⌢","\\smallfrown");O(U,ce,de,"≏","\\bumpeq",!0);O(U,ce,de,"≎","\\Bumpeq",!0);O(U,ce,de,"≧","\\geqq",!0);O(U,ce,de,"⩾","\\geqslant",!0);O(U,ce,de,"⪖","\\eqslantgtr",!0);O(U,ce,de,"≳","\\gtrsim",!0);O(U,ce,de,"⪆","\\gtrapprox",!0);O(U,ce,at,"⋗","\\gtrdot");O(U,ce,de,"⋙","\\ggg",!0);O(U,ce,de,"≷","\\gtrless",!0);O(U,ce,de,"⋛","\\gtreqless",!0);O(U,ce,de,"⪌","\\gtreqqless",!0);O(U,ce,de,"≖","\\eqcirc",!0);O(U,ce,de,"≗","\\circeq",!0);O(U,ce,de,"≜","\\triangleq",!0);O(U,ce,de,"∼","\\thicksim");O(U,ce,de,"≈","\\thickapprox");O(U,ce,de,"⫆","\\supseteqq",!0);O(U,ce,de,"⋑","\\Supset",!0);O(U,ce,de,"⊐","\\sqsupset",!0);O(U,ce,de,"≽","\\succcurlyeq",!0);O(U,ce,de,"⋟","\\curlyeqsucc",!0);O(U,ce,de,"≿","\\succsim",!0);O(U,ce,de,"⪸","\\succapprox",!0);O(U,ce,de,"⊳","\\vartriangleright");O(U,ce,de,"⊵","\\trianglerighteq");O(U,ce,de,"⊩","\\Vdash",!0);O(U,ce,de,"∣","\\shortmid");O(U,ce,de,"∥","\\shortparallel");O(U,ce,de,"≬","\\between",!0);O(U,ce,de,"⋔","\\pitchfork",!0);O(U,ce,de,"∝","\\varpropto");O(U,ce,de,"◀","\\blacktriangleleft");O(U,ce,de,"∴","\\therefore",!0);O(U,ce,de,"∍","\\backepsilon");O(U,ce,de,"▶","\\blacktriangleright");O(U,ce,de,"∵","\\because",!0);O(U,ce,de,"⋘","\\llless");O(U,ce,de,"⋙","\\gggtr");O(U,ce,at,"⊲","\\lhd");O(U,ce,at,"⊳","\\rhd");O(U,ce,de,"≂","\\eqsim",!0);O(U,Q,de,"⋈","\\Join");O(U,ce,de,"≑","\\Doteq",!0);O(U,ce,at,"∔","\\dotplus",!0);O(U,ce,at,"∖","\\smallsetminus");O(U,ce,at,"⋒","\\Cap",!0);O(U,ce,at,"⋓","\\Cup",!0);O(U,ce,at,"⩞","\\doublebarwedge",!0);O(U,ce,at,"⊟","\\boxminus",!0);O(U,ce,at,"⊞","\\boxplus",!0);O(U,ce,at,"⋇","\\divideontimes",!0);O(U,ce,at,"⋉","\\ltimes",!0);O(U,ce,at,"⋊","\\rtimes",!0);O(U,ce,at,"⋋","\\leftthreetimes",!0);O(U,ce,at,"⋌","\\rightthreetimes",!0);O(U,ce,at,"⋏","\\curlywedge",!0);O(U,ce,at,"⋎","\\curlyvee",!0);O(U,ce,at,"⊝","\\circleddash",!0);O(U,ce,at,"⊛","\\circledast",!0);O(U,ce,at,"⋅","\\centerdot");O(U,ce,at,"⊺","\\intercal",!0);O(U,ce,at,"⋒","\\doublecap");O(U,ce,at,"⋓","\\doublecup");O(U,ce,at,"⊠","\\boxtimes",!0);O(U,ce,de,"⇢","\\dashrightarrow",!0);O(U,ce,de,"⇠","\\dashleftarrow",!0);O(U,ce,de,"⇇","\\leftleftarrows",!0);O(U,ce,de,"⇆","\\leftrightarrows",!0);O(U,ce,de,"⇚","\\Lleftarrow",!0);O(U,ce,de,"↞","\\twoheadleftarrow",!0);O(U,ce,de,"↢","\\leftarrowtail",!0);O(U,ce,de,"↫","\\looparrowleft",!0);O(U,ce,de,"⇋","\\leftrightharpoons",!0);O(U,ce,de,"↶","\\curvearrowleft",!0);O(U,ce,de,"↺","\\circlearrowleft",!0);O(U,ce,de,"↰","\\Lsh",!0);O(U,ce,de,"⇈","\\upuparrows",!0);O(U,ce,de,"↿","\\upharpoonleft",!0);O(U,ce,de,"⇃","\\downharpoonleft",!0);O(U,Q,de,"⊶","\\origof",!0);O(U,Q,de,"⊷","\\imageof",!0);O(U,ce,de,"⊸","\\multimap",!0);O(U,ce,de,"↭","\\leftrightsquigarrow",!0);O(U,ce,de,"⇉","\\rightrightarrows",!0);O(U,ce,de,"⇄","\\rightleftarrows",!0);O(U,ce,de,"↠","\\twoheadrightarrow",!0);O(U,ce,de,"↣","\\rightarrowtail",!0);O(U,ce,de,"↬","\\looparrowright",!0);O(U,ce,de,"↷","\\curvearrowright",!0);O(U,ce,de,"↻","\\circlearrowright",!0);O(U,ce,de,"↱","\\Rsh",!0);O(U,ce,de,"⇊","\\downdownarrows",!0);O(U,ce,de,"↾","\\upharpoonright",!0);O(U,ce,de,"⇂","\\downharpoonright",!0);O(U,ce,de,"⇝","\\rightsquigarrow",!0);O(U,ce,de,"⇝","\\leadsto");O(U,ce,de,"⇛","\\Rrightarrow",!0);O(U,ce,de,"↾","\\restriction");O(U,Q,pe,"‘","`");O(U,Q,pe,"$","\\$");O(He,Q,pe,"$","\\$");O(He,Q,pe,"$","\\textdollar");O(U,Q,pe,"%","\\%");O(He,Q,pe,"%","\\%");O(U,Q,pe,"_","\\_");O(He,Q,pe,"_","\\_");O(He,Q,pe,"_","\\textunderscore");O(U,Q,pe,"∠","\\angle",!0);O(U,Q,pe,"∞","\\infty",!0);O(U,Q,pe,"′","\\prime");O(U,Q,pe,"△","\\triangle");O(U,Q,pe,"Γ","\\Gamma",!0);O(U,Q,pe,"Δ","\\Delta",!0);O(U,Q,pe,"Θ","\\Theta",!0);O(U,Q,pe,"Λ","\\Lambda",!0);O(U,Q,pe,"Ξ","\\Xi",!0);O(U,Q,pe,"Π","\\Pi",!0);O(U,Q,pe,"Σ","\\Sigma",!0);O(U,Q,pe,"Υ","\\Upsilon",!0);O(U,Q,pe,"Φ","\\Phi",!0);O(U,Q,pe,"Ψ","\\Psi",!0);O(U,Q,pe,"Ω","\\Omega",!0);O(U,Q,pe,"A","Α");O(U,Q,pe,"B","Β");O(U,Q,pe,"E","Ε");O(U,Q,pe,"Z","Ζ");O(U,Q,pe,"H","Η");O(U,Q,pe,"I","Ι");O(U,Q,pe,"K","Κ");O(U,Q,pe,"M","Μ");O(U,Q,pe,"N","Ν");O(U,Q,pe,"O","Ο");O(U,Q,pe,"P","Ρ");O(U,Q,pe,"T","Τ");O(U,Q,pe,"X","Χ");O(U,Q,pe,"¬","\\neg",!0);O(U,Q,pe,"¬","\\lnot");O(U,Q,pe,"⊤","\\top");O(U,Q,pe,"⊥","\\bot");O(U,Q,pe,"∅","\\emptyset");O(U,ce,pe,"∅","\\varnothing");O(U,Q,Ct,"α","\\alpha",!0);O(U,Q,Ct,"β","\\beta",!0);O(U,Q,Ct,"γ","\\gamma",!0);O(U,Q,Ct,"δ","\\delta",!0);O(U,Q,Ct,"ϵ","\\epsilon",!0);O(U,Q,Ct,"ζ","\\zeta",!0);O(U,Q,Ct,"η","\\eta",!0);O(U,Q,Ct,"θ","\\theta",!0);O(U,Q,Ct,"ι","\\iota",!0);O(U,Q,Ct,"κ","\\kappa",!0);O(U,Q,Ct,"λ","\\lambda",!0);O(U,Q,Ct,"μ","\\mu",!0);O(U,Q,Ct,"ν","\\nu",!0);O(U,Q,Ct,"ξ","\\xi",!0);O(U,Q,Ct,"ο","\\omicron",!0);O(U,Q,Ct,"π","\\pi",!0);O(U,Q,Ct,"ρ","\\rho",!0);O(U,Q,Ct,"σ","\\sigma",!0);O(U,Q,Ct,"τ","\\tau",!0);O(U,Q,Ct,"υ","\\upsilon",!0);O(U,Q,Ct,"ϕ","\\phi",!0);O(U,Q,Ct,"χ","\\chi",!0);O(U,Q,Ct,"ψ","\\psi",!0);O(U,Q,Ct,"ω","\\omega",!0);O(U,Q,Ct,"ε","\\varepsilon",!0);O(U,Q,Ct,"ϑ","\\vartheta",!0);O(U,Q,Ct,"ϖ","\\varpi",!0);O(U,Q,Ct,"ϱ","\\varrho",!0);O(U,Q,Ct,"ς","\\varsigma",!0);O(U,Q,Ct,"φ","\\varphi",!0);O(U,Q,at,"∗","*",!0);O(U,Q,at,"+","+");O(U,Q,at,"−","-",!0);O(U,Q,at,"⋅","\\cdot",!0);O(U,Q,at,"∘","\\circ",!0);O(U,Q,at,"÷","\\div",!0);O(U,Q,at,"±","\\pm",!0);O(U,Q,at,"×","\\times",!0);O(U,Q,at,"∩","\\cap",!0);O(U,Q,at,"∪","\\cup",!0);O(U,Q,at,"∖","\\setminus",!0);O(U,Q,at,"∧","\\land");O(U,Q,at,"∨","\\lor");O(U,Q,at,"∧","\\wedge",!0);O(U,Q,at,"∨","\\vee",!0);O(U,Q,pe,"√","\\surd");O(U,Q,gi,"⟨","\\langle",!0);O(U,Q,gi,"∣","\\lvert");O(U,Q,gi,"∥","\\lVert");O(U,Q,Ts,"?","?");O(U,Q,Ts,"!","!");O(U,Q,Ts,"⟩","\\rangle",!0);O(U,Q,Ts,"∣","\\rvert");O(U,Q,Ts,"∥","\\rVert");O(U,Q,de,"=","=");O(U,Q,de,":",":");O(U,Q,de,"≈","\\approx",!0);O(U,Q,de,"≅","\\cong",!0);O(U,Q,de,"≥","\\ge");O(U,Q,de,"≥","\\geq",!0);O(U,Q,de,"←","\\gets");O(U,Q,de,">","\\gt",!0);O(U,Q,de,"∈","\\in",!0);O(U,Q,de,"","\\@not");O(U,Q,de,"⊂","\\subset",!0);O(U,Q,de,"⊃","\\supset",!0);O(U,Q,de,"⊆","\\subseteq",!0);O(U,Q,de,"⊇","\\supseteq",!0);O(U,ce,de,"⊈","\\nsubseteq",!0);O(U,ce,de,"⊉","\\nsupseteq",!0);O(U,Q,de,"⊨","\\models");O(U,Q,de,"←","\\leftarrow",!0);O(U,Q,de,"≤","\\le");O(U,Q,de,"≤","\\leq",!0);O(U,Q,de,"<","\\lt",!0);O(U,Q,de,"→","\\rightarrow",!0);O(U,Q,de,"→","\\to");O(U,ce,de,"≱","\\ngeq",!0);O(U,ce,de,"≰","\\nleq",!0);O(U,Q,Co," ","\\ ");O(U,Q,Co," ","\\space");O(U,Q,Co," ","\\nobreakspace");O(He,Q,Co," ","\\ ");O(He,Q,Co," "," ");O(He,Q,Co," ","\\space");O(He,Q,Co," ","\\nobreakspace");O(U,Q,Co,"","\\nobreak");O(U,Q,Co,"","\\allowbreak");O(U,Q,zh,",",",");O(U,Q,zh,";",";");O(U,ce,at,"⊼","\\barwedge",!0);O(U,ce,at,"⊻","\\veebar",!0);O(U,Q,at,"⊙","\\odot",!0);O(U,Q,at,"⊕","\\oplus",!0);O(U,Q,at,"⊗","\\otimes",!0);O(U,Q,pe,"∂","\\partial",!0);O(U,Q,at,"⊘","\\oslash",!0);O(U,ce,at,"⊚","\\circledcirc",!0);O(U,ce,at,"⊡","\\boxdot",!0);O(U,Q,at,"△","\\bigtriangleup");O(U,Q,at,"▽","\\bigtriangledown");O(U,Q,at,"†","\\dagger");O(U,Q,at,"⋄","\\diamond");O(U,Q,at,"⋆","\\star");O(U,Q,at,"◃","\\triangleleft");O(U,Q,at,"▹","\\triangleright");O(U,Q,gi,"{","\\{");O(He,Q,pe,"{","\\{");O(He,Q,pe,"{","\\textbraceleft");O(U,Q,Ts,"}","\\}");O(He,Q,pe,"}","\\}");O(He,Q,pe,"}","\\textbraceright");O(U,Q,gi,"{","\\lbrace");O(U,Q,Ts,"}","\\rbrace");O(U,Q,gi,"[","\\lbrack",!0);O(He,Q,pe,"[","\\lbrack",!0);O(U,Q,Ts,"]","\\rbrack",!0);O(He,Q,pe,"]","\\rbrack",!0);O(U,Q,gi,"(","\\lparen",!0);O(U,Q,Ts,")","\\rparen",!0);O(He,Q,pe,"<","\\textless",!0);O(He,Q,pe,">","\\textgreater",!0);O(U,Q,gi,"⌊","\\lfloor",!0);O(U,Q,Ts,"⌋","\\rfloor",!0);O(U,Q,gi,"⌈","\\lceil",!0);O(U,Q,Ts,"⌉","\\rceil",!0);O(U,Q,pe,"\\","\\backslash");O(U,Q,pe,"∣","|");O(U,Q,pe,"∣","\\vert");O(He,Q,pe,"|","\\textbar",!0);O(U,Q,pe,"∥","\\|");O(U,Q,pe,"∥","\\Vert");O(He,Q,pe,"∥","\\textbardbl");O(He,Q,pe,"~","\\textasciitilde");O(He,Q,pe,"\\","\\textbackslash");O(He,Q,pe,"^","\\textasciicircum");O(U,Q,de,"↑","\\uparrow",!0);O(U,Q,de,"⇑","\\Uparrow",!0);O(U,Q,de,"↓","\\downarrow",!0);O(U,Q,de,"⇓","\\Downarrow",!0);O(U,Q,de,"↕","\\updownarrow",!0);O(U,Q,de,"⇕","\\Updownarrow",!0);O(U,Q,Dr,"∐","\\coprod");O(U,Q,Dr,"⋁","\\bigvee");O(U,Q,Dr,"⋀","\\bigwedge");O(U,Q,Dr,"⨄","\\biguplus");O(U,Q,Dr,"⋂","\\bigcap");O(U,Q,Dr,"⋃","\\bigcup");O(U,Q,Dr,"∫","\\int");O(U,Q,Dr,"∫","\\intop");O(U,Q,Dr,"∬","\\iint");O(U,Q,Dr,"∭","\\iiint");O(U,Q,Dr,"∏","\\prod");O(U,Q,Dr,"∑","\\sum");O(U,Q,Dr,"⨂","\\bigotimes");O(U,Q,Dr,"⨁","\\bigoplus");O(U,Q,Dr,"⨀","\\bigodot");O(U,Q,Dr,"∮","\\oint");O(U,Q,Dr,"∯","\\oiint");O(U,Q,Dr,"∰","\\oiiint");O(U,Q,Dr,"⨆","\\bigsqcup");O(U,Q,Dr,"∫","\\smallint");O(He,Q,gd,"…","\\textellipsis");O(U,Q,gd,"…","\\mathellipsis");O(He,Q,gd,"…","\\ldots",!0);O(U,Q,gd,"…","\\ldots",!0);O(U,Q,gd,"⋯","\\@cdots",!0);O(U,Q,gd,"⋱","\\ddots",!0);O(U,Q,pe,"⋮","\\varvdots");O(He,Q,pe,"⋮","\\varvdots");O(U,Q,tr,"ˊ","\\acute");O(U,Q,tr,"ˋ","\\grave");O(U,Q,tr,"¨","\\ddot");O(U,Q,tr,"~","\\tilde");O(U,Q,tr,"ˉ","\\bar");O(U,Q,tr,"˘","\\breve");O(U,Q,tr,"ˇ","\\check");O(U,Q,tr,"^","\\hat");O(U,Q,tr,"⃗","\\vec");O(U,Q,tr,"˙","\\dot");O(U,Q,tr,"˚","\\mathring");O(U,Q,Ct,"","\\@imath");O(U,Q,Ct,"","\\@jmath");O(U,Q,pe,"ı","ı");O(U,Q,pe,"ȷ","ȷ");O(He,Q,pe,"ı","\\i",!0);O(He,Q,pe,"ȷ","\\j",!0);O(He,Q,pe,"ß","\\ss",!0);O(He,Q,pe,"æ","\\ae",!0);O(He,Q,pe,"œ","\\oe",!0);O(He,Q,pe,"ø","\\o",!0);O(He,Q,pe,"Æ","\\AE",!0);O(He,Q,pe,"Œ","\\OE",!0);O(He,Q,pe,"Ø","\\O",!0);O(He,Q,tr,"ˊ","\\'");O(He,Q,tr,"ˋ","\\`");O(He,Q,tr,"ˆ","\\^");O(He,Q,tr,"˜","\\~");O(He,Q,tr,"ˉ","\\=");O(He,Q,tr,"˘","\\u");O(He,Q,tr,"˙","\\.");O(He,Q,tr,"¸","\\c");O(He,Q,tr,"˚","\\r");O(He,Q,tr,"ˇ","\\v");O(He,Q,tr,"¨",'\\"');O(He,Q,tr,"˝","\\H");O(He,Q,tr,"◯","\\textcircled");var oA={"--":!0,"---":!0,"``":!0,"''":!0};O(He,Q,pe,"–","--",!0);O(He,Q,pe,"–","\\textendash");O(He,Q,pe,"—","---",!0);O(He,Q,pe,"—","\\textemdash");O(He,Q,pe,"‘","`",!0);O(He,Q,pe,"‘","\\textquoteleft");O(He,Q,pe,"’","'",!0);O(He,Q,pe,"’","\\textquoteright");O(He,Q,pe,"“","``",!0);O(He,Q,pe,"“","\\textquotedblleft");O(He,Q,pe,"”","''",!0);O(He,Q,pe,"”","\\textquotedblright");O(U,Q,pe,"°","\\degree",!0);O(He,Q,pe,"°","\\degree");O(He,Q,pe,"°","\\textdegree",!0);O(U,Q,pe,"£","\\pounds");O(U,Q,pe,"£","\\mathsterling",!0);O(He,Q,pe,"£","\\pounds");O(He,Q,pe,"£","\\textsterling",!0);O(U,ce,pe,"✠","\\maltese");O(He,ce,pe,"✠","\\maltese");var vk='0123456789/@."';for(var bv=0;bv{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 zk[s]}else if(120782<=r&&r<=120831){var a=Math.floor((r-120782)/10);return Oit[a]}else{if(r===120485||r===120486)return zk[0];if(120486{if(yl(e.classes)!==yl(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},lA=e=>{for(var n=0;nt&&(t=o.height),o.depth>r&&(r=o.depth),o.maxFontSize>s&&(s=o.maxFontSize)}n.height=t,n.depth=r,n.maxFontSize=s},Fe=function(n,t,r,s){var a=new md(n,t,r,s);return py(a),a},Sl=(e,n,t,r)=>new md(e,n,t,r),Ju=function(n,t,r){var s=Fe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=Ye(s.height),s.maxFontSize=1,s},Hit=function(n,t,r,s){var a=new em(n,t,r,s);return py(a),a},Eo=function(n){var t=new pd(n);return py(t),t},ed=function(n,t){return n instanceof pd?Fe([],[n],t):n},Pit=function(n){if(n.positionType==="individualShift"){for(var t=n.children,r=[t[0]],s=-t[0].shift-t[0].elem.depth,a=s,o=1;o{var t=Fe(["mspace"],[],n),r=ir(e,n);return t.style.marginRight=Ye(r),t},u0=(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},d2={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"}},uA={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},dA=function(n,t){var[r,s,a]=uA[n],o=new wl(r),l=new yo([o],{width:Ye(s),height:Ye(a),style:"width:"+Ye(s),viewBox:"0 0 "+1e3*s+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),c=Sl(["overlay"],[l],t);return c.height=a,c.style.height=Ye(a),c.style.width=Ye(s),c},sr={number:3,unit:"mu"},nc={number:4,unit:"mu"},uo={number:5,unit:"mu"},Fit={mord:{mop:sr,mbin:nc,mrel:uo,minner:sr},mop:{mord:sr,mop:sr,mrel:uo,minner:sr},mbin:{mord:nc,mop:nc,mopen:nc,minner:nc},mrel:{mord:uo,mop:uo,mopen:uo,minner:uo},mopen:{},mclose:{mop:sr,mbin:nc,mrel:uo,minner:sr},mpunct:{mord:sr,mop:sr,mrel:uo,mopen:sr,mclose:sr,mpunct:sr,minner:sr},minner:{mord:sr,mop:sr,mbin:nc,mrel:uo,mopen:sr,mpunct:sr,minner:sr}},Uit={mord:{mop:sr},mop:{mord:sr,mop:sr},mbin:{},mrel:{},mopen:{},mclose:{mop:sr},mpunct:{},minner:{mop:sr}},fA={},mp={},gp={};function tt(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 b=k.classes[0],v=S.classes[0];b==="mbin"&&Git.has(v)?k.classes[0]="mord":v==="mbin"&&qit.has(b)&&(S.classes[0]="mord")},{node:f},m,g),f2(a,(S,k)=>{var b,v,x=_2(k),y=_2(S),C=x&&y?S.hasClass("mtight")?(b=Uit[x])==null?void 0:b[y]:(v=Fit[x])==null?void 0:v[y]:null;if(C)return cA(C,d)},{node:f},m,g),a},f2=function(n,t,r,s,a){s&&n.push(s);for(var o=0;om=>{n.splice(f+1,0,m),o++})(o)}s&&n.pop()},hA=function(n){return n instanceof pd||n instanceof em||n instanceof md&&n.hasClass("enclosing")?n:null},h2=function(n,t){var r=hA(n);if(r){var s=r.children;if(s.length){if(t==="right")return h2(s[s.length-1],"right");if(t==="left")return h2(s[0],"left")}}return n},_2=function(n,t){if(!n)return null;t&&(n=h2(n,t));var r=n.classes[0];return Wit[r]||null},Kf=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Fe(t.concat(r))},kn=function(n,t,r){if(!n)return Fe();if(mp[n.type]){var s=mp[n.type](n,t);if(r&&t.size!==r.size){s=Fe(t.sizingClasses(r),[s],t);var a=t.sizeMultiplier/r.sizeMultiplier;s.height*=a,s.depth*=a}return s}else throw new qe("Got group of unknown type: '"+n.type+"'")};function d0(e,n){var t=Fe(["base"],e,n),r=Fe(["strut"]);return r.style.height=Ye(t.height+t.depth),t.depth&&(r.style.verticalAlign=Ye(-t.depth)),t.children.unshift(r),t}function p2(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Gr(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var a=[],o=[],l=0;l0&&(a.push(d0(o,n)),o=[]),a.push(r[l]));o.length>0&&a.push(d0(o,n));var d;t?(d=d0(Gr(t,n,!0),n),d.classes=["tag"],a.push(d)):s&&a.push(s);var _=Fe(["katex-html"],a);if(_.setAttribute("aria-hidden","true"),d){var f=d.children[0];f.style.height=Ye(_.height+_.depth),_.depth&&(f.style.verticalAlign=Ye(-_.depth))}return _}function _A(e){return new pd(e)}class Ge{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=yl(this.classes));for(var r=0;r0&&(n+=' class ="'+ms(yl(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class Rr{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ms(this.toText())}toText(){return this.text}}class pA{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",Ye(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Kit=new Set(["\\imath","\\jmath"]),Yit=new Set(["mrow","mtable"]),Oi=function(n,t,r){return Jn[t][n]&&Jn[t][n].replace&&n.charCodeAt(0)!==55349&&!(oA.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Jn[t][n].replace),new Rr(n)},my=function(n){return n.length===1?n[0]:new Ge("mrow",n)},Xit={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"},gy=(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=Xit[t];if(s)return typeof s=="function"?s(e):s;var a=e.text;if(Kit.has(a))return null;if(Jn[r][a]){var o=Jn[r][a].replace;o&&(a=o)}var l=d2[t].fontName;return hy(a,l,r)?d2[t].variant:null};function Sv(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof Rr&&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 Rr&&t.text===","}else return!1}var vi=function(n,t,r){if(n.length===1){var s=Hn(n[0],t);return r&&s instanceof Ge&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var a=[],o,l=0;l=1&&(o.type==="mn"||Sv(o))){var d=c.children[0];d instanceof Ge&&d.type==="mn"&&(d.children=[...o.children,...d.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var _=o.children[0];if(_ instanceof Rr&&_.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof Rr&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),a.pop())}}}a.push(c),o=c}return a},kl=function(n,t,r){return my(vi(n,t,r))},Hn=function(n,t){if(!n)return new Ge("mrow");if(gp[n.type])return gp[n.type](n,t);throw new qe("Got group of unknown type: '"+n.type+"'")};function Ak(e,n,t,r,s){var a=vi(e,t),o;a.length===1&&a[0]instanceof Ge&&Yit.has(a[0].type)?o=a[0]:o=new Ge("mrow",a);var l=new Ge("annotation",[new Rr(n)]);l.setAttribute("encoding","application/x-tex");var c=new Ge("semantics",[o,l]),d=new Ge("math",[c]);d.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&d.setAttribute("display","block");var _=s?"katex":"katex-mathml";return Fe([_],[d])}var Zit=[[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]],Tk=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],jk=function(n,t){return t.size<2?n:Zit[n-1][t.size-1]};class po{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||po.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=Tk[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 po(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:jk(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:Tk[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=jk(po.BASESIZE,n);return this.size===t&&this.textSize===po.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!==po.BASESIZE?["sizing","reset-size"+this.size,"size"+po.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Dit(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}po.BASESIZE=6;var mA=function(n){return new po({style:n.displayMode?$t.DISPLAY:$t.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},gA=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Fe(r,[n])}return n},Qit=function(n,t,r){var s=mA(r),a;if(r.output==="mathml")return Ak(n,t,s,r.displayMode,!0);if(r.output==="html"){var o=p2(n,s);a=Fe(["katex"],[o])}else{var l=Ak(n,t,s,r.displayMode,!1),c=p2(n,s);a=Fe(["katex"],[l,c])}return gA(a,r)},Jit=function(n,t,r){var s=mA(r),a=p2(n,s),o=Fe(["katex"],[a]);return gA(o,r)},eat={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":"="},rm=function(n){var t=new Ge("mo",[new Rr(eat[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},tat={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]},nat=new Set(["widehat","widecheck","widetilde","utilde"]),sm=function(n,t){function r(){var l=4e5,c=n.label.slice(1);if(nat.has(c)&&"base"in n){var d=n.base.type==="ordgroup"?n.base.body.length:1,_,f,m;if(d>5)c==="widehat"||c==="widecheck"?(_=420,l=2364,m=.42,f=c+"4"):(_=312,l=2340,m=.34,f="tilde4");else{var g=[1,1,2,2,3,3][d];c==="widehat"||c==="widecheck"?(l=[0,1062,2364,2364,2364][g],_=[0,239,300,360,420][g],m=[0,.24,.3,.3,.36,.42][g],f=c+g):(l=[0,600,1033,2339,2340][g],_=[0,260,286,306,312][g],m=[0,.26,.286,.3,.306,.34][g],f="tilde"+g)}var S=new wl(f),k=new yo([S],{width:"100%",height:Ye(m),viewBox:"0 0 "+l+" "+_,preserveAspectRatio:"none"});return{span:Sl([],[k],t),minWidth:0,height:m}}else{var b=[],v=tat[c];if(!v)throw new Error('No SVG data for "'+c+'".');var[x,y,C]=v,A=C/1e3,E=x.length,j,T;if(E===1){if(v.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');j=["hide-tail"],T=[v[3]]}else if(E===2)j=["halfarrow-left","halfarrow-right"],T=["xMinYMin","xMaxYMin"];else if(E===3)j=["brace-left","brace-center","brace-right"],T=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+E+" children.");for(var D=0;D0&&(s.style.minWidth=Ye(a)),s},rat=function(n,t,r,s,a){var o,l=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(o=Fe(["stretchy",t],[],a),t==="fbox"){var c=a.color&&a.getColor();c&&(o.style.borderColor=c)}}else{var d=[];/^[bx]cancel$/.test(t)&&d.push(new i2({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&d.push(new i2({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _=new yo(d,{width:"100%",height:Ye(l)});o=Sl([],[_],a)}return o.height=l,o.style.height=Ye(l),o},sat={bin:1,close:1,inner:1,open:1,punct:1,rel:1},iat={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function aat(e){return e in sat}function Yt(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 im(e){var n=am(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 am(e){return e&&(e.type==="atom"||iat.hasOwnProperty(e.type))?e:null}var vA=e=>{if(e instanceof _i)return e;if(Mit(e)&&e.children.length===1)return vA(e.children[0])},vy=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=Yt(e.base,"accent"),t=r.base,e.base=t,s=jit(kn(e,n)),e.base=r):(r=Yt(e,"accent"),t=r.base);var a=kn(t,n.havingCrampedStyle()),o=r.isShifty&&ko(t),l=0;if(o){var c,d;l=(c=(d=vA(a))==null?void 0:d.skew)!=null?c:0}var _=r.label==="\\c",f=_?a.height+a.depth:Math.min(a.height,n.fontMetrics().xHeight),m;if(r.isStretchy)m=sm(r,n),m=wn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:m,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Ye(2*l)+")",marginLeft:Ye(2*l)}:void 0}]});else{var g,S;r.label==="\\vec"?(g=dA("vec",n),S=uA.vec[1]):(g=nm({mode:r.mode,text:r.label},n,"textord"),g=Tit(g),g.italic=0,S=g.width,_&&(f+=g.depth)),m=Fe(["accent-body"],[g]);var k=r.label==="\\textcircled";k&&(m.classes.push("accent-full"),f=a.height);var b=l;k||(b-=S/2),m.style.left=Ye(b),r.label==="\\textcircled"&&(m.style.top=".2em"),m=wn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:m}]})}var v=Fe(["mord","accent"],[m],n);return s?(s.children[0]=v,s.height=Math.max(v.height,s.height),s.classes[0]="mord",s):v},bA=(e,n)=>{var t=e.isStretchy?rm(e.label):new Ge("mo",[Oi(e.label,e.mode)]),r=new Ge("mover",[Hn(e.base,n),t]);return r.setAttribute("accent","true"),r},oat=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));tt({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=vp(n[0]),r=!oat.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:vy,mathmlBuilder:bA});tt({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:vy,mathmlBuilder:bA});tt({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=kn(e.base,n),r=sm(e,n),s=e.label==="\\utilde"?.12:0,a=wn({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Fe(["mord","accentunder"],[a],n)},mathmlBuilder:(e,n)=>{var t=rm(e.label),r=new Ge("munder",[Hn(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var f0=e=>{var n=new Ge("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};tt({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=ed(kn(e.body,r,n),n),a=e.label.slice(0,2)==="\\x"?"x":"cd";s.classes.push(a+"-arrow-pad");var o;e.below&&(r=n.havingStyle(t.sub()),o=ed(kn(e.below,r,n),n),o.classes.push(a+"-arrow-pad"));var l=sm(e,n),c=-n.fontMetrics().axisHeight+.5*l.height,d=-n.fontMetrics().axisHeight-.5*l.height-.111;(s.depth>.25||e.label==="\\xleftequilibrium")&&(d-=s.depth);var _;if(o){var f=-n.fontMetrics().axisHeight+o.height+.5*l.height+.111;_=wn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:f}]})}else _=wn({positionType:"individualShift",children:[{type:"elem",elem:s,shift:d},{type:"elem",elem:l,shift:c,wrapperClasses:["svg-align"]}]});return Fe(["mrel","x-arrow"],[_],n)},mathmlBuilder(e,n){var t=rm(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=f0(Hn(e.body,n));if(e.below){var a=f0(Hn(e.below,n));r=new Ge("munderover",[t,a,s])}else r=new Ge("mover",[t,s])}else if(e.below){var o=f0(Hn(e.below,n));r=new Ge("munder",[t,o])}else r=f0(),r=new Ge("mover",[t,r]);return r}});function xA(e,n){var t=Gr(e.body,n,!0);return Fe([e.mclass],t,n)}function yA(e,n){var t,r=vi(e.body,n);return e.mclass==="minner"?t=new Ge("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Ge("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Ge("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}tt({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:Mr(s),isCharacterBox:ko(s)}},htmlBuilder:xA,mathmlBuilder:yA});var om=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"};tt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:om(n[0]),body:Mr(n[1]),isCharacterBox:ko(n[1])}}});tt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,n){var{parser:t,funcName:r}=e,s=n[1],a=n[0],o;r!=="\\stackrel"?o=om(s):o="mrel";var l={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:Mr(s)},c={type:"supsub",mode:a.mode,base:l,sup:r==="\\underset"?null:a,sub:r==="\\underset"?a:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:ko(c)}},htmlBuilder:xA,mathmlBuilder:yA});tt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:om(n[0]),body:Mr(n[0])}},htmlBuilder(e,n){var t=Gr(e.body,n,!0),r=Fe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=vi(e.body,n),r=new Ge("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var lat={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Mk=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),Rk=e=>e.type==="textord"&&e.text==="@",cat=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function uat(e,n,t){var r=lat[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]],[]),a={type:"atom",text:r,mode:"math",family:"rel"},o=t.callFunction("\\Big",[a],[]),l=t.callFunction("\\\\cdright",[n[1]],[]),c={type:"ordgroup",mode:"math",body:[s,o,l]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var d={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[d],[])}default:return{type:"textord",text:" ",mode:"math"}}}function dat(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 qe("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var r=[],s=[r],a=0;aAV".includes(d))for(var f=0;f<2;f++){for(var m=!0,g=c+1;gAV=|." after @',o[c]);var S=uat(d,_,e),k={type:"styling",body:[S],mode:"math",style:"display",resetFont:!0};r.push(k),l=Mk()}a%2===0?r.push(l):r.shift(),r=[],s.push(r)}e.gullet.endGroup(),e.gullet.endGroup();var b=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:b,colSeparationType:"CD",hLinesBeforeRow:new Array(s.length+1).fill([])}}tt({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=ed(kn(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=Ye(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Ge("mrow",[Hn(e.label,n)]);return t=new Ge("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Ge("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});tt({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=ed(kn(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Ge("mrow",[Hn(e.fragment,n)])}});tt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=Yt(n[0],"ordgroup"),s=r.body,a="",o=0;o=1114111)throw new qe("\\@char with invalid code point "+a);return c<=65535?d=String.fromCharCode(c):(c-=65536,d=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:d}}});var wA=(e,n)=>{var t=Gr(e.body,n.withColor(e.color),!1);return Eo(t)},SA=(e,n)=>{var t=vi(e.body,n.withColor(e.color)),r=new Ge("mstyle",t);return r.setAttribute("mathcolor",e.color),r};tt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=Yt(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:Mr(s)}},htmlBuilder:wA,mathmlBuilder:SA});tt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=Yt(n[0],"color-token").color;t.gullet.macros.set("\\current@color",s);var a=t.parseExpression(!0,r);return{type:"color",mode:t.mode,color:s,body:a}},htmlBuilder:wA,mathmlBuilder:SA});tt({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,a=!r.settings.displayMode||!r.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:r.mode,newLine:a,size:s&&Yt(s,"size").value}},htmlBuilder(e,n){var t=Fe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=Ye(ir(e.size,n)))),t},mathmlBuilder(e,n){var t=new Ge("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",Ye(ir(e.size,n)))),t}});var m2={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},kA=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new qe("Expected a control sequence",e);return n},fat=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},CA=(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)};tt({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(m2[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=m2[r.text]),Yt(n.parseFunction(),"internal");throw new qe("Invalid token after macro prefix",r)}});tt({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 qe("Expected a control sequence",r);for(var a=0,o,l=[[]];n.gullet.future().text!=="{";)if(r=n.gullet.popToken(),r.text==="#"){if(n.gullet.future().text==="{"){o=n.gullet.future(),l[a].push("{");break}if(r=n.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new qe('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new qe('Argument number "'+r.text+'" out of order');a++,l.push([])}else{if(r.text==="EOF")throw new qe("Expected a macro definition");l[a].push(r.text)}var{tokens:c}=n.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=n.gullet.expandTokens(c),c.reverse()),n.gullet.macros.set(s,{tokens:c,numArgs:a,delimiters:l},t===m2[t]),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=kA(n.gullet.popToken());n.gullet.consumeSpaces();var s=fat(n);return CA(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});tt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=kA(n.gullet.popToken()),s=n.gullet.popToken(),a=n.gullet.popToken();return CA(n,r,a,t==="\\\\globalfuture"),n.gullet.pushToken(a),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var Sf=function(n,t,r){var s=Jn.math[n]&&Jn.math[n].replace,a=hy(s||n,t,r);if(!a)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return a},by=function(n,t,r,s){var a=r.havingBaseStyle(t),o=Fe(s.concat(a.sizingClasses(r)),[n],r),l=a.sizeMultiplier/r.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},EA=function(n,t,r){var s=t.havingBaseStyle(r),a=(1-t.sizeMultiplier/s.sizeMultiplier)*t.fontMetrics().axisHeight;n.classes.push("delimcenter"),n.style.top=Ye(a),n.height-=a,n.depth+=a},hat=function(n,t,r,s,a,o){var l=Ns(n,"Main-Regular",a,s),c=by(l,t,s,o);return EA(c,s,t),c},_at=function(n,t,r,s){return Ns(n,"Size"+t+"-Regular",r,s)},NA=function(n,t,r,s,a,o){var l=_at(n,t,a,s),c=by(Fe(["delimsizing","size"+t],[l],s),$t.TEXT,s,o);return r&&EA(c,s,$t.TEXT),c},kv=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var a=Fe(["delimsizinginner",s],[Fe([],[Ns(n,t,r)])]);return{type:"elem",elem:a}},Cv=function(n,t,r){var s=Sa["Size4-Regular"][n.charCodeAt(0)]?Sa["Size4-Regular"][n.charCodeAt(0)][4]:Sa["Size1-Regular"][n.charCodeAt(0)][4],a=new wl("inner",Sit(n,Math.round(1e3*t))),o=new yo([a],{width:Ye(s),height:Ye(t),style:"width:"+Ye(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),l=Sl([],[o],r);return l.height=t,l.style.height=Ye(t),l.style.width=Ye(s),{type:"elem",elem:l}},g2=.008,h0={type:"kern",size:-1*g2},pat=new Set(["|","\\lvert","\\rvert","\\vert"]),mat=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),zA=function(n,t,r,s,a,o){var l,c,d,_,f="",m=0;l=d=_=n,c=null;var g="Size1-Regular";n==="\\uparrow"?d=_="⏐":n==="\\Uparrow"?d=_="‖":n==="\\downarrow"?l=d="⏐":n==="\\Downarrow"?l=d="‖":n==="\\updownarrow"?(l="\\uparrow",d="⏐",_="\\downarrow"):n==="\\Updownarrow"?(l="\\Uparrow",d="‖",_="\\Downarrow"):pat.has(n)?(d="∣",f="vert",m=333):mat.has(n)?(d="∥",f="doublevert",m=556):n==="["||n==="\\lbrack"?(l="⎡",d="⎢",_="⎣",g="Size4-Regular",f="lbrack",m=667):n==="]"||n==="\\rbrack"?(l="⎤",d="⎥",_="⎦",g="Size4-Regular",f="rbrack",m=667):n==="\\lfloor"||n==="⌊"?(d=l="⎢",_="⎣",g="Size4-Regular",f="lfloor",m=667):n==="\\lceil"||n==="⌈"?(l="⎡",d=_="⎢",g="Size4-Regular",f="lceil",m=667):n==="\\rfloor"||n==="⌋"?(d=l="⎥",_="⎦",g="Size4-Regular",f="rfloor",m=667):n==="\\rceil"||n==="⌉"?(l="⎤",d=_="⎥",g="Size4-Regular",f="rceil",m=667):n==="("||n==="\\lparen"?(l="⎛",d="⎜",_="⎝",g="Size4-Regular",f="lparen",m=875):n===")"||n==="\\rparen"?(l="⎞",d="⎟",_="⎠",g="Size4-Regular",f="rparen",m=875):n==="\\{"||n==="\\lbrace"?(l="⎧",c="⎨",_="⎩",d="⎪",g="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(l="⎫",c="⎬",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(l="⎧",_="⎩",d="⎪",g="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(l="⎫",_="⎭",d="⎪",g="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(l="⎧",_="⎭",d="⎪",g="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(l="⎫",_="⎩",d="⎪",g="Size4-Regular");var S=Sf(l,g,a),k=S.height+S.depth,b=Sf(d,g,a),v=b.height+b.depth,x=Sf(_,g,a),y=x.height+x.depth,C=0,A=1;if(c!==null){var E=Sf(c,g,a);C=E.height+E.depth,A=2}var j=k+y+C,T=Math.max(0,Math.ceil((t-j)/(A*v))),D=j+T*A*v,I=s.fontMetrics().axisHeight;r&&(I*=s.sizeMultiplier);var P=D/2-I,B=[];if(f.length>0){var F=D-k-y,V=Math.round(D*1e3),X=kit(f,Math.round(F*1e3)),W=new wl(f,X),Z=Ye(m/1e3),J=Ye(V/1e3),$=new yo([W],{width:Z,height:J,viewBox:"0 0 "+m+" "+V}),L=Sl([],[$],s);L.height=V/1e3,L.style.width=Z,L.style.height=J,B.push({type:"elem",elem:L})}else{if(B.push(kv(_,g,a)),B.push(h0),c===null){var H=D-k-y+2*g2;B.push(Cv(d,H,s))}else{var Y=(D-k-y-C)/2+2*g2;B.push(Cv(d,Y,s)),B.push(h0),B.push(kv(c,g,a)),B.push(h0),B.push(Cv(d,Y,s))}B.push(h0),B.push(kv(l,g,a))}var G=s.havingBaseStyle($t.TEXT),ee=wn({positionType:"bottom",positionData:P,children:B});return by(Fe(["delimsizing","mult"],[ee],G),$t.TEXT,s,o)},Ev=80,Nv=.08,zv=function(n,t,r,s,a){var o=wit(n,s,r),l=new wl(n,o),c=new yo([l],{width:"400em",height:Ye(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Sl(["hide-tail"],[c],a)},gat=function(n,t){var r=t.havingBaseSizing(),s=RA("\\surd",n*r.sizeMultiplier,MA,r),a=r.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),l,c,d,_,f;return s.type==="small"?(_=1e3+1e3*o+Ev,n<1?a=1:n<1.4&&(a=.7),c=(1+o+Nv)/a,d=(1+o)/a,l=zv("sqrtMain",c,_,o,t),l.style.minWidth="0.853em",f=.833/a):s.type==="large"?(_=(1e3+Ev)*Mf[s.size],d=(Mf[s.size]+o)/a,c=(Mf[s.size]+o+Nv)/a,l=zv("sqrtSize"+s.size,c,_,o,t),l.style.minWidth="1.02em",f=1/a):(c=n+o+Nv,d=n+o,_=Math.floor(1e3*n+o)+Ev,l=zv("sqrtTall",c,_,o,t),l.style.minWidth="0.742em",f=1.056),l.height=d,l.style.height=Ye(c),{span:l,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*a}},AA=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),vat=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),TA=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Mf=[0,1.2,1.8,2.4,3],jA=function(n,t,r,s,a){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),AA.has(n)||TA.has(n))return NA(n,t,!1,r,s,a);if(vat.has(n))return zA(n,Mf[t],!1,r,s,a);throw new qe("Illegal delimiter: '"+n+"'")},bat=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],xat=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"stack"}],MA=[{type:"small",style:$t.SCRIPTSCRIPT},{type:"small",style:$t.SCRIPT},{type:"small",style:$t.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],yat=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.")},RA=function(n,t,r,s){for(var a=Math.min(2,3-s.style.size),o=a;ot)return l}return r[r.length-1]},v2=function(n,t,r,s,a,o){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var l;TA.has(n)?l=bat:AA.has(n)?l=MA:l=xat;var c=RA(n,t,l,s);return c.type==="small"?hat(n,c.style,r,s,a,o):c.type==="large"?NA(n,c.size,r,s,a,o):zA(n,t,r,s,a,o)},Av=function(n,t,r,s,a,o){var l=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,d=5/s.fontMetrics().ptPerEm,_=Math.max(t-l,r+l),f=Math.max(_/500*c,2*_-d);return v2(n,f,!0,s,a,o)},Dk={"\\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}},wat=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 Lk(e){return"isMiddle"in e}function lm(e,n){var t=am(e);if(t&&wat.has(t.text))return t;throw t?new qe("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new qe("Invalid delimiter type '"+e.type+"'",e)}tt({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=lm(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Dk[e.funcName].size,mclass:Dk[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Fe([e.mclass]):jA(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Oi(e.delim,e.mode));var t=new Ge("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=Ye(Mf[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function Ok(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}tt({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 qe("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:lm(n[0],e).text,color:t}}});tt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=lm(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var a=Yt(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,n)=>{Ok(e);for(var t=Gr(e.body,n,!0,["mopen","mclose"]),r=0,s=0,a=!1,o=0;o{Ok(e);var t=vi(e.body,n);if(e.left!=="."){var r=new Ge("mo",[Oi(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Ge("mo",[Oi(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return my(t)}});tt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=lm(n[0],e);if(!e.parser.leftrightDepth)throw new qe("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Kf(n,[]):(t=jA(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Oi("|","text"):Oi(e.delim,e.mode),r=new Ge("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var cm=(e,n)=>{var t=ed(kn(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,a,o,l=ko(e.body);if(r==="sout")a=Fe(["stretchy","sout"]),a.height=n.fontMetrics().defaultRuleThickness/s,o=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=ir({number:.6,unit:"pt"},n),d=ir({number:.35,unit:"ex"},n),_=n.havingBaseSizing();s=s/_.sizeMultiplier;var f=t.height+t.depth+c+d;t.style.paddingLeft=Ye(f/2+c);var m=Math.floor(1e3*f*s),g=xit(m),S=new yo([new wl("phase",g)],{width:"400em",height:Ye(m/1e3),viewBox:"0 0 400000 "+m,preserveAspectRatio:"xMinYMin slice"});a=Sl(["hide-tail"],[S],n),a.style.height=Ye(f),o=t.depth+c+d}else{/cancel/.test(r)?l||t.classes.push("cancel-pad"):r==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var k,b,v=0;/box/.test(r)?(v=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:v),b=k):r==="angl"?(v=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*v,b=Math.max(0,.25-t.depth)):(k=l?.2:0,b=k),a=rat(t,r,k,b,n),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle="solid",a.style.borderWidth=Ye(v)):r==="angl"&&v!==.049&&(a.style.borderTopWidth=Ye(v),a.style.borderRightWidth=Ye(v)),o=t.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var x;if(e.backgroundColor)x=wn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:t,shift:0}]});else{var y=/cancel|phase/.test(r)?["svg-align"]:[];x=wn({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:y}]})}return/cancel/.test(r)&&(x.height=t.height,x.depth=t.depth),/cancel/.test(r)&&!l?Fe(["mord","cancel-lap"],[x],n):Fe(["mord"],[x],n)},um=(e,n)=>{var t,r=new Ge(e.label.includes("colorbox")?"mpadded":"menclose",[Hn(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: "+Ye(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};tt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Yt(n[0],"color-token").color,o=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,body:o}},htmlBuilder:cm,mathmlBuilder:um});tt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,a=Yt(n[0],"color-token").color,o=Yt(n[1],"color-token").color,l=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:cm,mathmlBuilder:um});tt({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]}}});tt({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:cm,mathmlBuilder:um});tt({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:cm,mathmlBuilder:um});tt({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 DA={};function Ma(e){for(var{type:n,names:t,props:r,handler:s,htmlBuilder:a,mathmlBuilder:o}=e,l={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 qe("{"+e.envName+"} can be used only in display mode.")},Sat=new Set(["gather","gather*"]);function xy(e){if(!e.includes("ed"))return!e.includes("*")}function Ml(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:a,arraystretch:o,colSeparationType:l,autoTag:c,singleRow:d,emptySingleRow:_,maxNumCols:f,leqno:m}=n;if(e.gullet.beginGroup(),d||e.gullet.macros.set("\\cr","\\\\\\relax"),!o){var g=e.gullet.expandMacroAsText("\\arraystretch");if(g==null)o=1;else if(o=parseFloat(g),!o||o<0)throw new qe("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var S=[],k=[S],b=[],v=[],x=c!=null?[]:void 0;function y(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new Ji("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(y(),v.push(Ik(e));;){var A=e.parseExpression(!1,d?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var E={type:"ordgroup",mode:e.mode,body:A};t&&(E={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[E]}),S.push(E);var j=e.fetch().text;if(j==="&"){if(f&&S.length===f){if(d||l)throw new qe("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(j==="\\end"){C(),S.length===1&&E.type==="styling"&&E.body.length===1&&E.body[0].type==="ordgroup"&&E.body[0].body.length===0&&(k.length>1||!_)&&k.pop(),v.length0&&(y+=.25),d.push({pos:y,isDashed:We[st]})}for(C(o[0]),r=0;r0&&(P+=x,jWe))for(r=0;r=l)){var ne=void 0;if(s>0||n.hskipBeforeAndAfter){var le,ge;ne=(le=(ge=G)==null?void 0:ge.pregap)!=null?le:m,ne!==0&&(X=Fe(["arraycolsep"],[]),X.style.width=Ye(ne),V.push(X))}var ue=[];for(r=0;r0){for(var zt=Ju("hline",t,_),vt=Ju("hdashline",t,_),Lt=[{type:"elem",elem:wt,shift:0}];d.length>0;){var St=d.pop(),kt=St.pos-B;St.isDashed?Lt.push({type:"elem",elem:vt,shift:kt}):Lt.push({type:"elem",elem:zt,shift:kt})}wt=wn({positionType:"individualShift",children:Lt})}if(Z.length===0)return Fe(["mord"],[wt],t);var xe=wn({positionType:"individualShift",children:Z}),je=Fe(["tag"],[xe],t);return Eo([wt,je])},kat={c:"center ",l:"left ",r:"right "},Da=function(n,t){for(var r=[],s=new Ge("mtd",[],["mtr-glue"]),a=new Ge("mtd",[],["mml-eqn-num"]),o=0;o0){var S=n.cols,k="",b=!1,v=0,x=S.length;S[0].type==="separator"&&(m+="top ",v=1),S[S.length-1].type==="separator"&&(m+="bottom ",x-=1);for(var y=v;y0?"left ":"",m+=D[D.length-1].length>0?"right ":"";for(var I=1;I0&&g&&(b=1),r[S]={type:"align",align:k,pregap:b,postgap:0}}return o.colSeparationType=g?"align":"alignat",o};Ma({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=am(n[0]),r=t?[n[0]]:Yt(n[0],"ordgroup").body,s=r.map(function(o){var l=im(o),c=l.text;if("lcr".includes(c))return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new qe("Unknown column alignment: "+c,o)}),a={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return Ml(e.parser,a,yy(e.envName))},htmlBuilder:Ra,mathmlBuilder:Da});Ma({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 qe("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var a=Ml(e.parser,r,yy(e.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:t}),n?{type:"leftright",mode:e.mode,body:[a],left:n[0],right:n[1],rightColor:void 0}:a},htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=Ml(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=am(n[0]),r=t?[n[0]]:Yt(n[0],"ordgroup").body,s=r.map(function(l){var c=im(l),d=c.text;if("lc".includes(d))return{type:"align",align:d};throw new qe("Unknown column alignment: "+d,l)});if(s.length>1)throw new qe("{subarray} can contain only one column");var a={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},o=Ml(e.parser,a,"script");if(o.body.length>0&&o.body[0].length>1)throw new qe("{subarray} can contain only one column");return o},htmlBuilder:Ra,mathmlBuilder:Da});Ma({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=Ml(e.parser,n,yy(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:IA,htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){Sat.has(e.envName)&&dm(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:xy(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Ml(e.parser,n,"display")},htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:IA,htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){dm(e);var n={autoTag:xy(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Ml(e.parser,n,"display")},htmlBuilder:Ra,mathmlBuilder:Da});Ma({type:"array",names:["CD"],props:{numArgs:0},handler(e){return dm(e),dat(e.parser)},htmlBuilder:Ra,mathmlBuilder:Da});re("\\nonumber","\\gdef\\@eqnsw{0}");re("\\notag","\\nonumber");tt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new qe(e.funcName+" valid only within array environment")}});var Bk=DA;tt({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 qe("Invalid environment name",s);for(var a="",o=0;o{var t=e.font,r=n.withFont(t);return kn(e.body,r)},$A=(e,n)=>{var t=e.font,r=n.withFont(t);return Hn(e.body,r)},$k={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};tt({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=vp(n[0]),a=r;return a in $k&&(a=$k[a]),{type:"font",mode:t.mode,font:a.slice(1),body:s}},htmlBuilder:BA,mathmlBuilder:$A});tt({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:om(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:ko(r)}}});tt({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:a}=t,o=t.parseExpression(!0,s);return{type:"font",mode:a,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:BA,mathmlBuilder:$A});var Cat=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),a;a=n.havingStyle(r);var o=kn(e.numer,a,n);if(e.continued){var l=8.5/n.fontMetrics().ptPerEm,c=3.5/n.fontMetrics().ptPerEm;o.height=o.height0?S=3*m:S=7*m,k=n.fontMetrics().denom1):(f>0?(g=n.fontMetrics().num2,S=m):(g=n.fontMetrics().num3,S=3*m),k=n.fontMetrics().denom2);var b;if(_){var x=n.fontMetrics().axisHeight;g-o.depth-(x+.5*f){var t=new Ge("mfrac",[Hn(e.numer,n),Hn(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=ir(e.barSize,n);t.setAttribute("linethickness",Ye(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var a=new Ge("mo",[new Rr(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}if(s.push(t),e.rightDelim!=null){var o=new Ge("mo",[new Rr(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}return my(s)}return t},HA=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};tt({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],a=n[1],o,l=null,c=null;switch(r){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",c=")";break;case"\\\\bracefrac":o=!1,l="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,l="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}var d=r==="\\cfrac",_=null;return d||r.startsWith("\\d")?_="display":r.startsWith("\\t")&&(_="text"),HA({type:"genfrac",mode:t.mode,numer:s,denom:a,continued:d,hasBarLine:o,leftDelim:l,rightDelim:c,barSize:null},_)},htmlBuilder:Cat,mathmlBuilder:Eat});tt({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 Hk=["display","text","script","scriptscript"],Pk=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};tt({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],a=vp(n[0]),o=a.type==="atom"&&a.family==="open"?Pk(a.text):null,l=vp(n[1]),c=l.type==="atom"&&l.family==="close"?Pk(l.text):null,d=Yt(n[2],"size"),_,f=null;d.isBlank?_=!0:(f=d.value,_=f.number>0);var m=null,g=n[3];if(g.type==="ordgroup"){if(g.body.length>0){var S=Yt(g.body[0],"textord");m=Hk[Number(S.text)]}}else g=Yt(g,"textord"),m=Hk[Number(g.text)];return HA({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:_,barSize:f,leftDelim:o,rightDelim:c},m)}});tt({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:Yt(n[0],"size").value,token:s}}});tt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],a=Yt(n[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=n[2],l=a.number>0;return{type:"genfrac",mode:t.mode,numer:s,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}}});var PA=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?kn(e.sup,n.havingStyle(t.sup()),n):kn(e.sub,n.havingStyle(t.sub()),n),s=Yt(e.base,"horizBrace")):s=Yt(e,"horizBrace");var a=kn(s.base,n.havingBaseStyle($t.DISPLAY)),o=sm(s,n),l;if(s.isOver?l=wn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]}):l=wn({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),r){var c=Fe(["minner",s.isOver?"mover":"munder"],[l],n);s.isOver?l=wn({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):l=wn({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Fe(["minner",s.isOver?"mover":"munder"],[l],n)},Nat=(e,n)=>{var t=rm(e.label);return new Ge(e.isOver?"mover":"munder",[Hn(e.base,n),t])};tt({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:PA,mathmlBuilder:Nat});tt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=Yt(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:Mr(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Gr(e.body,n,!1);return Hit(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=kl(e.body,n);return t instanceof Ge||(t=new Ge("mrow",[t])),t.setAttribute("href",e.href),t}});tt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=Yt(n[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var s=[],a=0;a{var{parser:t,funcName:r,token:s}=e,a=Yt(n[0],"raw").string,o=n[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,c={};switch(r){case"\\htmlClass":c.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":c.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":c.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var d=a.split(","),_=0;_{var t=Gr(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Fe(r,t,n);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&s.setAttribute(a,e.attributes[a]);return s},mathmlBuilder:(e,n)=>kl(e.body,n)});tt({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:Mr(n[0]),mathml:Mr(n[1])}},htmlBuilder:(e,n)=>{var t=Gr(e.html,n,!1);return Eo(t)},mathmlBuilder:(e,n)=>kl(e.mathml,n)});var Tv=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 qe("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!rA(r))throw new qe("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};tt({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"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(t[0])for(var c=Yt(t[0],"raw").string,d=c.split(","),_=0;_{var t=ir(e.height,n),r=0;e.totalheight.number>0&&(r=ir(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=ir(e.width,n));var a={height:Ye(t+r)};s>0&&(a.width=Ye(s)),r>0&&(a.verticalAlign=Ye(-r));var o=new zit(e.src,e.alt,a);return o.height=t,o.depth=r,o},mathmlBuilder:(e,n)=>{var t=new Ge("mglyph",[]);t.setAttribute("alt",e.alt);var r=ir(e.height,n),s=0;if(e.totalheight.number>0&&(s=ir(e.totalheight,n)-r,t.setAttribute("valign",Ye(-s))),t.setAttribute("height",Ye(r+s)),e.width.number>0){var a=ir(e.width,n);t.setAttribute("width",Ye(a))}return t.setAttribute("src",e.src),t}});tt({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=Yt(n[0],"size");if(t.settings.strict){var a=r[1]==="m",o=s.value.unit==="mu";a?(o||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")):o&&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 cA(e.dimension,n)},mathmlBuilder(e,n){var t=ir(e.dimension,n);return new pA(t)}});tt({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=Fe([],[kn(e.body,n)]),t=Fe(["inner"],[t],n)):t=Fe(["inner"],[kn(e.body,n)]);var r=Fe(["fix"],[]),s=Fe([e.alignment],[t,r],n),a=Fe(["strut"]);return a.style.height=Ye(s.height+s.depth),s.depth&&(a.style.verticalAlign=Ye(-s.depth)),s.children.unshift(a),s=Fe(["thinbox"],[s],n),Fe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Ge("mpadded",[Hn(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}});tt({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 a=t==="\\("?"\\)":"$",o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(s),{type:"styling",mode:r.mode,style:"text",resetFont:!0,body:o}}});tt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new qe("Mismatched "+e.funcName)}});var Fk=(e,n)=>{switch(n.style.size){case $t.DISPLAY.size:return e.display;case $t.TEXT.size:return e.text;case $t.SCRIPT.size:return e.script;case $t.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};tt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:Mr(n[0]),text:Mr(n[1]),script:Mr(n[2]),scriptscript:Mr(n[3])}},htmlBuilder:(e,n)=>{var t=Fk(e,n),r=Gr(t,n,!1);return Eo(r)},mathmlBuilder:(e,n)=>{var t=Fk(e,n);return kl(t,n)}});var FA=(e,n,t,r,s,a,o)=>{e=Fe([],[e]);var l=t&&ko(t),c,d;if(n){var _=kn(n,r.havingStyle(s.sup()),r);d={elem:_,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-_.depth)}}if(t){var f=kn(t,r.havingStyle(s.sub()),r);c={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var m;if(d&&c){var g=r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o;m=wn({positionType:"bottom",positionData:g,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ye(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ye(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var S=e.height-o;m=wn({positionType:"top",positionData:S,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:Ye(-a)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(d){var k=e.depth+o;m=wn({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:d.kern},{type:"elem",elem:d.elem,marginLeft:Ye(a)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var b=[m];if(c&&a!==0&&!l){var v=Fe(["mspace"],[],r);v.style.marginRight=Ye(a),b.unshift(v)}return Fe(["mop","op-limits"],b,r)},UA=new Set(["\\smallint"]),vd=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Yt(e.base,"op"),s=!0):a=Yt(e,"op");var o=n.style,l=!1;o.size===$t.DISPLAY.size&&a.symbol&&!UA.has(a.name)&&(l=!0);var c,d;if(a.symbol){var _=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),c=Ns(a.name,_,"math",n,["mop","op-symbol",l?"large-op":"small-op"]),d=c.italic,f.length>0){var m=dA(f+"Size"+(l?"2":"1"),n);c=wn({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:m,shift:l?.08:0}]}),a.name="\\"+f,c.classes.unshift("mop"),c.italic=d}}else if(a.body){var g=Gr(a.body,n,!0);g.length===1&&g[0]instanceof _i?(c=g[0],c.classes[0]="mop"):c=Fe(["mop"],g,n)}else{for(var S=[],k=1;k{var t;if(e.symbol)t=new Ge("mo",[Oi(e.name,e.mode)]),UA.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Ge("mo",vi(e.body,n));else{t=new Ge("mi",[new Rr(e.name.slice(1))]);var r=new Ge("mo",[Oi("⁡","text")]);e.parentIsSupSub?t=new Ge("mrow",[t,r]):t=_A([t,r])}return t},zat={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};tt({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=zat[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:vd,mathmlBuilder:Ah});tt({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:Mr(r)}},htmlBuilder:vd,mathmlBuilder:Ah});var Aat={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};tt({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:vd,mathmlBuilder:Ah});tt({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:vd,mathmlBuilder:Ah});tt({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=Aat[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:vd,mathmlBuilder:Ah});var qA=(e,n)=>{var t,r,s=!1,a;e.type==="supsub"?(t=e.sup,r=e.sub,a=Yt(e.base,"operatorname"),s=!0):a=Yt(e,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(f=>{var m="text"in f?f.text:void 0;return typeof m=="string"?{type:"textord",mode:f.mode,text:m}:f}),c=Gr(l,n.withFont("mathrm"),!0),d=0;d{for(var t=vi(e.body,n.withFont("mathrm")),r=!0,s=0;s_.toText()).join("");t=[new Rr(l)]}var c=new Ge("mi",t);c.setAttribute("mathvariant","normal");var d=new Ge("mo",[Oi("⁡","text")]);return e.parentIsSupSub?new Ge("mrow",[c,d]):_A([c,d])};tt({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:Mr(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:qA,mathmlBuilder:Tat});re("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");jc({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?Eo(Gr(e.body,n,!1)):Fe(["mord"],Gr(e.body,n,!0),n)},mathmlBuilder(e,n){return kl(e.body,n,!0)}});tt({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=kn(e.body,n.havingCrampedStyle()),r=Ju("overline-line",n),s=n.fontMetrics().defaultRuleThickness,a=wn({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Fe(["mord","overline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new Rr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("mover",[Hn(e.body,n),t]);return r.setAttribute("accent","true"),r}});tt({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:Mr(r)}},htmlBuilder:(e,n)=>{var t=Gr(e.body,n.withPhantom(),!1);return Eo(t)},mathmlBuilder:(e,n)=>{var t=vi(e.body,n);return new Ge("mphantom",t)}});re("\\hphantom","\\smash{\\phantom{#1}}");tt({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=Fe(["inner"],[kn(e.body,n.withPhantom())]),r=Fe(["fix"],[]);return Fe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=vi(Mr(e.body),n),r=new Ge("mphantom",t),s=new Ge("mpadded",[r]);return s.setAttribute("width","0px"),s}});tt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=Yt(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=kn(e.body,n),r=ir(e.dy,n);return wn({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[Hn(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});tt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});tt({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],a=Yt(n[0],"size"),o=Yt(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&Yt(s,"size").value,width:a.value,height:o.value}},htmlBuilder(e,n){var t=Fe(["mord","rule"],[],n),r=ir(e.width,n),s=ir(e.height,n),a=e.shift?ir(e.shift,n):0;return t.style.borderRightWidth=Ye(r),t.style.borderTopWidth=Ye(s),t.style.bottom=Ye(a),t.width=r,t.height=s+a,t.depth=-a,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=ir(e.width,n),r=ir(e.height,n),s=e.shift?ir(e.shift,n):0,a=n.color&&n.getColor()||"black",o=new Ge("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",Ye(t)),o.setAttribute("height",Ye(r));var l=new Ge("mpadded",[o]);return s>=0?l.setAttribute("height",Ye(s)):(l.setAttribute("height",Ye(s)),l.setAttribute("depth",Ye(-s))),l.setAttribute("voffset",Ye(s)),l}});function GA(e,n,t){for(var r=Gr(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,a=0;a{var t=n.havingSize(e.size);return GA(e.body,t,n)};tt({type:"sizing",names:Uk,props:{numArgs:0,allowedInText:!0},handler:(e,n)=>{var{breakOnTokenText:t,funcName:r,parser:s}=e,a=s.parseExpression(!1,t);return{type:"sizing",mode:s.mode,size:Uk.indexOf(r)+1,body:a}},htmlBuilder:jat,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=vi(e.body,t),s=new Ge("mstyle",r);return s.setAttribute("mathsize",Ye(t.sizeMultiplier)),s}});tt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,n,t)=>{var{parser:r}=e,s=!1,a=!1,o=t[0]&&Yt(t[0],"ordgroup");if(o)for(var l,c=0;c{var t=Fe([],[kn(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 Fe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Ge("mpadded",[Hn(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});tt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,n,t){var{parser:r}=e,s=t[0],a=n[0];return{type:"sqrt",mode:r.mode,body:a,index:s}},htmlBuilder(e,n){var t=kn(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=ed(t,n);var r=n.fontMetrics(),s=r.defaultRuleThickness,a=s;n.style.id<$t.TEXT.id&&(a=n.fontMetrics().xHeight);var o=s+a/4,l=t.height+t.depth+o+s,{span:c,ruleWidth:d,advanceWidth:_}=gat(l,n),f=c.height-d;f>t.height+t.depth+o&&(o=(o+f-t.height-t.depth)/2);var m=c.height-t.height-o-d;t.style.paddingLeft=Ye(_);var g=wn({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+m)},{type:"elem",elem:c},{type:"kern",size:d}]});if(e.index){var S=n.havingStyle($t.SCRIPTSCRIPT),k=kn(e.index,S,n),b=.6*(g.height-g.depth),v=wn({positionType:"shift",positionData:-b,children:[{type:"elem",elem:k}]}),x=Fe(["root"],[v]);return Fe(["mord","sqrt"],[x,g],n)}else return Fe(["mord","sqrt"],[g],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Ge("mroot",[Hn(t,n),Hn(r,n)]):new Ge("msqrt",[Hn(t,n)])}});var b2={display:$t.DISPLAY,text:$t.TEXT,script:$t.SCRIPT,scriptscript:$t.SCRIPTSCRIPT};function Mat(e){return e in b2}tt({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,a=s.parseExpression(!0,t),o=r.slice(1,r.length-5);if(!Mat(o))throw new Error("Unknown style: "+o);return{type:"styling",mode:s.mode,style:o,body:a}},htmlBuilder(e,n){var t=b2[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),GA(e.body,r,n)},mathmlBuilder(e,n){var t=b2[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=vi(e.body,r),a=new Ge("mstyle",s),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});var Rat=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===$t.DISPLAY.size||r.alwaysHandleSupSub);return s?vd:null}else if(r.type==="operatorname"){var a=r.alwaysHandleSupSub&&(t.style.size===$t.DISPLAY.size||r.limits);return a?qA:null}else{if(r.type==="accent")return ko(r.base)?vy:null;if(r.type==="horizBrace"){var o=!n.sub;return o===r.isOver?PA:null}else return null}else return null};jc({type:"supsub",htmlBuilder(e,n){var t=Rat(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:a}=e,o=kn(r,n),l,c,d=n.fontMetrics(),_=0,f=0,m=r&&ko(r);if(s){var g=n.havingStyle(n.style.sup());l=kn(s,g,n),m||(_=o.height-g.fontMetrics().supDrop*g.sizeMultiplier/n.sizeMultiplier)}if(a){var S=n.havingStyle(n.style.sub());c=kn(a,S,n),m||(f=o.depth+S.fontMetrics().subDrop*S.sizeMultiplier/n.sizeMultiplier)}var k;n.style===$t.DISPLAY?k=d.sup1:n.style.cramped?k=d.sup3:k=d.sup2;var b=n.sizeMultiplier,v=Ye(.5/d.ptPerEm/b),x=null;if(c){var y=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof _i||y){var C;x=Ye(-((C=o.italic)!=null?C:0))}}var A;if(l&&c){_=Math.max(_,k,l.depth+.25*d.xHeight),f=Math.max(f,d.sub2);var E=d.defaultRuleThickness,j=4*E;if(_-l.depth-(c.height-f)0&&(_+=T,f-=T)}var D=[{type:"elem",elem:c,shift:f,marginRight:v,marginLeft:x},{type:"elem",elem:l,shift:-_,marginRight:v}];A=wn({positionType:"individualShift",children:D})}else if(c){f=Math.max(f,d.sub1,c.height-.8*d.xHeight);var I=[{type:"elem",elem:c,marginLeft:x,marginRight:v}];A=wn({positionType:"shift",positionData:f,children:I})}else if(l)_=Math.max(_,k,l.depth+.25*d.xHeight),A=wn({positionType:"shift",positionData:-_,children:[{type:"elem",elem:l,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var P=_2(o,"right")||"mord";return Fe([P],[o,Fe(["msupsub"],[A])],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 a=[Hn(e.base,n)];e.sub&&a.push(Hn(e.sub,n)),e.sup&&a.push(Hn(e.sup,n));var o;if(t)o=r?"mover":"munder";else if(e.sub)if(e.sup){var d=e.base;d&&d.type==="op"&&d.limits&&n.style===$t.DISPLAY||d&&d.type==="operatorname"&&d.alwaysHandleSupSub&&(n.style===$t.DISPLAY||d.limits)?o="munderover":o="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===$t.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===$t.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(n.style===$t.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||n.style===$t.DISPLAY)?o="mover":o="msup"}return new Ge(o,a)}});jc({type:"atom",htmlBuilder(e,n){return _y(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Ge("mo",[Oi(e.text,e.mode)]);if(e.family==="bin"){var r=gy(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 VA={mi:"italic",mn:"normal",mtext:"normal"};jc({type:"mathord",htmlBuilder(e,n){return nm(e,n,"mathord")},mathmlBuilder(e,n){var t=new Ge("mi",[Oi(e.text,e.mode,n)]),r=gy(e,n)||"italic";return r!==VA[t.type]&&t.setAttribute("mathvariant",r),t}});jc({type:"textord",htmlBuilder(e,n){return nm(e,n,"textord")},mathmlBuilder(e,n){var t=Oi(e.text,e.mode,n),r=gy(e,n)||"normal",s;return e.mode==="text"?s=new Ge("mtext",[t]):/[0-9]/.test(e.text)?s=new Ge("mn",[t]):e.text==="\\prime"?s=new Ge("mo",[t]):s=new Ge("mi",[t]),r!==VA[s.type]&&s.setAttribute("mathvariant",r),s}});var jv={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Mv={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};jc({type:"spacing",htmlBuilder(e,n){if(Mv.hasOwnProperty(e.text)){var t=Mv[e.text].className||"";if(e.mode==="text"){var r=nm(e,n,"textord");return r.classes.push(t),r}else return Fe(["mspace",t],[_y(e.text,e.mode,n)],n)}else{if(jv.hasOwnProperty(e.text))return Fe(["mspace",jv[e.text]],[],n);throw new qe('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(Mv.hasOwnProperty(e.text))t=new Ge("mtext",[new Rr(" ")]);else{if(jv.hasOwnProperty(e.text))return new Ge("mspace");throw new qe('Unknown type of space "'+e.text+'"')}return t}});var qk=()=>{var e=new Ge("mtd",[]);return e.setAttribute("width","50%"),e};jc({type:"tag",mathmlBuilder(e,n){var t=new Ge("mtable",[new Ge("mtr",[qk(),new Ge("mtd",[kl(e.body,n)]),qk(),new Ge("mtd",[kl(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var Gk={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Vk={"\\textbf":"textbf","\\textmd":"textmd"},Dat={"\\textit":"textit","\\textup":"textup"},Wk=(e,n)=>{var t=e.font;if(t){if(Gk[t])return n.withTextFontFamily(Gk[t]);if(Vk[t])return n.withTextFontWeight(Vk[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(Dat[t])};tt({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:Mr(s),font:r}},htmlBuilder(e,n){var t=Wk(e,n),r=Gr(e.body,t,!0);return Fe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=Wk(e,n);return kl(e.body,t)}});tt({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=kn(e.body,n),r=Ju("underline-line",n),s=n.fontMetrics().defaultRuleThickness,a=wn({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Fe(["mord","underline"],[a],n)},mathmlBuilder(e,n){var t=new Ge("mo",[new Rr("‾")]);t.setAttribute("stretchy","true");var r=new Ge("munder",[Hn(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});tt({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=kn(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return wn({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Ge("mpadded",[Hn(e.body,n)],["vcenter"]);return new Ge("mrow",[t])}});tt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new qe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=Kk(e),r=[],s=n.havingStyle(n.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),bl=fA,WA=`[ \r + ]`,Lat="\\\\[a-zA-Z@]+",Oat="\\\\[^\uD800-\uDFFF]",Iat="("+Lat+")"+WA+"*",Bat=`\\\\( |[ \r ]+ -?)[ \r ]*`,p2="[̀-ͯ]",gat=new RegExp(p2+"+$"),vat="("+BA+"+)|"+(mat+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(p2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(p2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+pat)+("|"+_at+")");class Uk{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(vat,"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 Ji("EOF",new Gs(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new qe("Unexpected character: '"+n[t]+"'",new Ji(n[t],new Gs(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=n.indexOf(` -`,this.tokenRegex.lastIndex);return a===-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=a+1,this.lex()}return new Ji(s,new Gs(this,t,this.tokenRegex.lastIndex))}}class bat{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 qe("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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(n)&&(a[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var xat=EA;ne("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ne("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ne("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ne("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ne("\\@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}});ne("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ne("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var qk={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};ne("\\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 qe("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=qk[n.text],r==null||r>=t)throw new qe("Invalid base-"+t+" digit "+n.text);for(var s;(s=qk[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new qe("\\newcommand's first argument must be a macro name");var a=s[0].text,o=e.isDefined(a);if(o&&!n)throw new qe("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!t)throw new qe("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new qe("Invalid number of arguments: "+c);l=parseInt(c),s=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:s,numArgs:l}),""};ne("\\newcommand",e=>gy(e,!1,!0,!1));ne("\\renewcommand",e=>gy(e,!0,!1,!1));ne("\\providecommand",e=>gy(e,!0,!0,!0));ne("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ne("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ne("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),gl[t],Qn.math[t],Qn.text[t]),""});ne("\\bgroup","{");ne("\\egroup","}");ne("~","\\nobreakspace");ne("\\lq","`");ne("\\rq","'");ne("\\aa","\\r a");ne("\\AA","\\r A");ne("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ne("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ne("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ne("ℬ","\\mathscr{B}");ne("ℰ","\\mathscr{E}");ne("ℱ","\\mathscr{F}");ne("ℋ","\\mathscr{H}");ne("ℐ","\\mathscr{I}");ne("ℒ","\\mathscr{L}");ne("ℳ","\\mathscr{M}");ne("ℛ","\\mathscr{R}");ne("ℭ","\\mathfrak{C}");ne("ℌ","\\mathfrak{H}");ne("ℨ","\\mathfrak{Z}");ne("\\Bbbk","\\Bbb{k}");ne("\\llap","\\mathllap{\\textrm{#1}}");ne("\\rlap","\\mathrlap{\\textrm{#1}}");ne("\\clap","\\mathclap{\\textrm{#1}}");ne("\\mathstrut","\\vphantom{(}");ne("\\underbar","\\underline{\\text{#1}}");ne("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ne("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ne("\\ne","\\neq");ne("≠","\\neq");ne("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ne("∉","\\notin");ne("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ne("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ne("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ne("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ne("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ne("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ne("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ne("⟂","\\perp");ne("‼","\\mathclose{!\\mkern-0.8mu!}");ne("∌","\\notni");ne("⌜","\\ulcorner");ne("⌝","\\urcorner");ne("⌞","\\llcorner");ne("⌟","\\lrcorner");ne("©","\\copyright");ne("®","\\textregistered");ne("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ne("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ne("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ne("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ne("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ne("⋮","\\vdots");ne("\\varGamma","\\mathit{\\Gamma}");ne("\\varDelta","\\mathit{\\Delta}");ne("\\varTheta","\\mathit{\\Theta}");ne("\\varLambda","\\mathit{\\Lambda}");ne("\\varXi","\\mathit{\\Xi}");ne("\\varPi","\\mathit{\\Pi}");ne("\\varSigma","\\mathit{\\Sigma}");ne("\\varUpsilon","\\mathit{\\Upsilon}");ne("\\varPhi","\\mathit{\\Phi}");ne("\\varPsi","\\mathit{\\Psi}");ne("\\varOmega","\\mathit{\\Omega}");ne("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ne("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ne("\\boxed","\\fbox{$\\displaystyle{#1}$}");ne("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ne("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ne("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ne("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ne("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Gk={",":"\\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"},yat=new Set(["bin","rel"]);ne("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in Gk?n=Gk[t]:(t.slice(0,4)==="\\not"||t in Qn.math&&yat.has(Qn.math[t].group))&&(n="\\dotsb"),n});var vy={")":!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};ne("\\dotso",function(e){var n=e.future().text;return n in vy?"\\ldots\\,":"\\ldots"});ne("\\dotsc",function(e){var n=e.future().text;return n in vy&&n!==","?"\\ldots\\,":"\\ldots"});ne("\\cdots",function(e){var n=e.future().text;return n in vy?"\\@cdots\\,":"\\@cdots"});ne("\\dotsb","\\cdots");ne("\\dotsm","\\cdots");ne("\\dotsi","\\!\\cdots");ne("\\dotsx","\\ldots\\,");ne("\\DOTSI","\\relax");ne("\\DOTSB","\\relax");ne("\\DOTSX","\\relax");ne("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ne("\\,","\\tmspace+{3mu}{.1667em}");ne("\\thinspace","\\,");ne("\\>","\\mskip{4mu}");ne("\\:","\\tmspace+{4mu}{.2222em}");ne("\\medspace","\\:");ne("\\;","\\tmspace+{5mu}{.2777em}");ne("\\thickspace","\\;");ne("\\!","\\tmspace-{3mu}{.1667em}");ne("\\negthinspace","\\!");ne("\\negmedspace","\\tmspace-{4mu}{.2222em}");ne("\\negthickspace","\\tmspace-{5mu}{.277em}");ne("\\enspace","\\kern.5em ");ne("\\enskip","\\hskip.5em\\relax");ne("\\quad","\\hskip1em\\relax");ne("\\qquad","\\hskip2em\\relax");ne("\\tag","\\@ifstar\\tag@literal\\tag@paren");ne("\\tag@paren","\\tag@literal{({#1})}");ne("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ne("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ne("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ne("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ne("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ne("\\newline","\\\\\\relax");ne("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var $A=Ke(ka["Main-Regular"][84][1]-.7*ka["Main-Regular"][65][1]);ne("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+$A+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ne("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+$A+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ne("\\hspace","\\@ifstar\\@hspacer\\@hspace");ne("\\@hspace","\\hskip #1\\relax");ne("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ne("\\ordinarycolon",":");ne("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ne("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ne("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ne("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ne("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ne("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ne("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ne("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ne("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ne("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ne("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ne("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ne("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ne("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ne("∷","\\dblcolon");ne("∹","\\eqcolon");ne("≔","\\coloneqq");ne("≕","\\eqqcolon");ne("⩴","\\Coloneqq");ne("\\ratio","\\vcentcolon");ne("\\coloncolon","\\dblcolon");ne("\\colonequals","\\coloneqq");ne("\\coloncolonequals","\\Coloneqq");ne("\\equalscolon","\\eqqcolon");ne("\\equalscoloncolon","\\Eqqcolon");ne("\\colonminus","\\coloneq");ne("\\coloncolonminus","\\Coloneq");ne("\\minuscolon","\\eqcolon");ne("\\minuscoloncolon","\\Eqcolon");ne("\\coloncolonapprox","\\Colonapprox");ne("\\coloncolonsim","\\Colonsim");ne("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ne("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ne("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ne("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ne("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ne("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ne("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ne("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ne("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ne("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ne("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ne("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ne("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ne("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ne("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ne("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ne("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ne("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ne("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ne("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ne("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ne("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ne("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ne("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ne("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ne("\\imath","\\html@mathml{\\@imath}{ı}");ne("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ne("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ne("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ne("⟦","\\llbracket");ne("⟧","\\rrbracket");ne("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ne("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ne("⦃","\\lBrace");ne("⦄","\\rBrace");ne("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ne("⦵","\\minuso");ne("\\darr","\\downarrow");ne("\\dArr","\\Downarrow");ne("\\Darr","\\Downarrow");ne("\\lang","\\langle");ne("\\rang","\\rangle");ne("\\uarr","\\uparrow");ne("\\uArr","\\Uparrow");ne("\\Uarr","\\Uparrow");ne("\\N","\\mathbb{N}");ne("\\R","\\mathbb{R}");ne("\\Z","\\mathbb{Z}");ne("\\alef","\\aleph");ne("\\alefsym","\\aleph");ne("\\Alpha","\\mathrm{A}");ne("\\Beta","\\mathrm{B}");ne("\\bull","\\bullet");ne("\\Chi","\\mathrm{X}");ne("\\clubs","\\clubsuit");ne("\\cnums","\\mathbb{C}");ne("\\Complex","\\mathbb{C}");ne("\\Dagger","\\ddagger");ne("\\diamonds","\\diamondsuit");ne("\\empty","\\emptyset");ne("\\Epsilon","\\mathrm{E}");ne("\\Eta","\\mathrm{H}");ne("\\exist","\\exists");ne("\\harr","\\leftrightarrow");ne("\\hArr","\\Leftrightarrow");ne("\\Harr","\\Leftrightarrow");ne("\\hearts","\\heartsuit");ne("\\image","\\Im");ne("\\infin","\\infty");ne("\\Iota","\\mathrm{I}");ne("\\isin","\\in");ne("\\Kappa","\\mathrm{K}");ne("\\larr","\\leftarrow");ne("\\lArr","\\Leftarrow");ne("\\Larr","\\Leftarrow");ne("\\lrarr","\\leftrightarrow");ne("\\lrArr","\\Leftrightarrow");ne("\\Lrarr","\\Leftrightarrow");ne("\\Mu","\\mathrm{M}");ne("\\natnums","\\mathbb{N}");ne("\\Nu","\\mathrm{N}");ne("\\Omicron","\\mathrm{O}");ne("\\plusmn","\\pm");ne("\\rarr","\\rightarrow");ne("\\rArr","\\Rightarrow");ne("\\Rarr","\\Rightarrow");ne("\\real","\\Re");ne("\\reals","\\mathbb{R}");ne("\\Reals","\\mathbb{R}");ne("\\Rho","\\mathrm{P}");ne("\\sdot","\\cdot");ne("\\sect","\\S");ne("\\spades","\\spadesuit");ne("\\sub","\\subset");ne("\\sube","\\subseteq");ne("\\supe","\\supseteq");ne("\\Tau","\\mathrm{T}");ne("\\thetasym","\\vartheta");ne("\\weierp","\\wp");ne("\\Zeta","\\mathrm{Z}");ne("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ne("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ne("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ne("\\bra","\\mathinner{\\langle{#1}|}");ne("\\ket","\\mathinner{|{#1}\\rangle}");ne("\\braket","\\mathinner{\\langle{#1}\\rangle}");ne("\\Bra","\\left\\langle#1\\right|");ne("\\Ket","\\left|#1\\right\\rangle");var HA=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,a=n.consumeArg().tokens,o=n.macros.get("|"),l=n.macros.get("\\|");n.macros.beginGroup();var c=f=>m=>{e&&(m.macros.set("|",o),s.length&&m.macros.set("\\|",l));var g=f;if(!f&&s.length){var S=m.future();S.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var d=n.consumeArg().tokens,_=n.expandTokens([...a,...d,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};ne("\\bra@ket",HA(!1));ne("\\bra@set",HA(!0));ne("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ne("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ne("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ne("\\angln","{\\angl n}");ne("\\blue","\\textcolor{##6495ed}{#1}");ne("\\orange","\\textcolor{##ffa500}{#1}");ne("\\pink","\\textcolor{##ff00af}{#1}");ne("\\red","\\textcolor{##df0030}{#1}");ne("\\green","\\textcolor{##28ae7b}{#1}");ne("\\gray","\\textcolor{gray}{#1}");ne("\\purple","\\textcolor{##9d38bd}{#1}");ne("\\blueA","\\textcolor{##ccfaff}{#1}");ne("\\blueB","\\textcolor{##80f6ff}{#1}");ne("\\blueC","\\textcolor{##63d9ea}{#1}");ne("\\blueD","\\textcolor{##11accd}{#1}");ne("\\blueE","\\textcolor{##0c7f99}{#1}");ne("\\tealA","\\textcolor{##94fff5}{#1}");ne("\\tealB","\\textcolor{##26edd5}{#1}");ne("\\tealC","\\textcolor{##01d1c1}{#1}");ne("\\tealD","\\textcolor{##01a995}{#1}");ne("\\tealE","\\textcolor{##208170}{#1}");ne("\\greenA","\\textcolor{##b6ffb0}{#1}");ne("\\greenB","\\textcolor{##8af281}{#1}");ne("\\greenC","\\textcolor{##74cf70}{#1}");ne("\\greenD","\\textcolor{##1fab54}{#1}");ne("\\greenE","\\textcolor{##0d923f}{#1}");ne("\\goldA","\\textcolor{##ffd0a9}{#1}");ne("\\goldB","\\textcolor{##ffbb71}{#1}");ne("\\goldC","\\textcolor{##ff9c39}{#1}");ne("\\goldD","\\textcolor{##e07d10}{#1}");ne("\\goldE","\\textcolor{##a75a05}{#1}");ne("\\redA","\\textcolor{##fca9a9}{#1}");ne("\\redB","\\textcolor{##ff8482}{#1}");ne("\\redC","\\textcolor{##f9685d}{#1}");ne("\\redD","\\textcolor{##e84d39}{#1}");ne("\\redE","\\textcolor{##bc2612}{#1}");ne("\\maroonA","\\textcolor{##ffbde0}{#1}");ne("\\maroonB","\\textcolor{##ff92c6}{#1}");ne("\\maroonC","\\textcolor{##ed5fa6}{#1}");ne("\\maroonD","\\textcolor{##ca337c}{#1}");ne("\\maroonE","\\textcolor{##9e034e}{#1}");ne("\\purpleA","\\textcolor{##ddd7ff}{#1}");ne("\\purpleB","\\textcolor{##c6b9fc}{#1}");ne("\\purpleC","\\textcolor{##aa87ff}{#1}");ne("\\purpleD","\\textcolor{##7854ab}{#1}");ne("\\purpleE","\\textcolor{##543b78}{#1}");ne("\\mintA","\\textcolor{##f5f9e8}{#1}");ne("\\mintB","\\textcolor{##edf2df}{#1}");ne("\\mintC","\\textcolor{##e0e5cc}{#1}");ne("\\grayA","\\textcolor{##f6f7f7}{#1}");ne("\\grayB","\\textcolor{##f0f1f2}{#1}");ne("\\grayC","\\textcolor{##e3e5e6}{#1}");ne("\\grayD","\\textcolor{##d6d8da}{#1}");ne("\\grayE","\\textcolor{##babec2}{#1}");ne("\\grayF","\\textcolor{##888d93}{#1}");ne("\\grayG","\\textcolor{##626569}{#1}");ne("\\grayH","\\textcolor{##3b3e40}{#1}");ne("\\grayI","\\textcolor{##21242c}{#1}");ne("\\kaBlue","\\textcolor{##314453}{#1}");ne("\\kaGreen","\\textcolor{##71B307}{#1}");var PA={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class wat{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 bat(xat,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new Uk(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 Ji("EOF",r.loc)),this.pushTokens(s),new Ji("",Gs.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(),a,o=0,l=0;do{if(a=this.popToken(),t.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new qe("Extra }",a)}else if(a.text==="EOF")throw new qe("Unexpected end of input in a macro argument, expected '"+(n&&r?n[l]:"}")+"'",a);if(n&&r)if((o===0||o===1&&n[l]==="{")&&a.text===n[l]){if(++l,l===n.length){t.splice(-l,l);break}}else l=0}while(o!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:a}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new qe("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new qe("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 qe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=s.tokens,o=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var c=a[l];if(c.text==="#"){if(l===0)throw new qe("Incomplete placeholder at end of macro body",c);if(c=a[--l],c.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(c.text))a.splice(l,2,...o[+c.text-1]);else throw new qe("Not a valid argument number",c)}}}return this.pushTokens(a),a.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 Ji(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 a=0;if(s.includes("#"))for(var o=s.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new Uk(s,this.settings),c=[],d=l.lex();d.text!=="EOF";)c.push(d),d=l.lex();c.reverse();var _={tokens:c,numArgs:a};return _}return s}isDefined(n){return this.macros.has(n)||gl.hasOwnProperty(n)||Qn.math.hasOwnProperty(n)||Qn.text.hasOwnProperty(n)||PA.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:gl.hasOwnProperty(n)&&!gl[n].primitive}}var Vk=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,l0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Av={"́":{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"}},Wk={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class om{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 wat(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 qe("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 Ji("}")),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(om.endOfExpression.has(s.text)||t&&s.text===t||n&&gl[s.text]&&gl[s.text].infix)break;var a=this.parseAtom(t);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(Wz(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)),o={type:"textord",mode:"text",loc:Gs.range(n),text:t};else return null;if(this.consume(),a)for(var _=0;_0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=C+1:(S!==C&&x.push({type:"text",value:d.value.slice(S,C)}),Array.isArray(E)?x.push(...E):E&&x.push(E),S=C+y[0].length,v=!0),!m.global)break;y=m.exec(d.value)}return v?(S?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=Yk(e,"(");let a=Yk(e,")");for(;r!==-1&&s>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function GA(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||vc(t)||qp(t))&&(!n||t!==47)}VA.peek=tot;function Wat(){this.buffer()}function Kat(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Yat(){this.buffer()}function Xat(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Zat(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function Qat(e){this.exit(e)}function Jat(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function eot(e){this.exit(e)}function tot(){return"["}function VA(e,n,t,r){const s=t.createTracker(r);let a=s.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=s.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=s.move("]"),a}function not(){return{enter:{gfmFootnoteCallString:Wat,gfmFootnoteCall:Kat,gfmFootnoteDefinitionLabelString:Yat,gfmFootnoteDefinition:Xat},exit:{gfmFootnoteCallString:Zat,gfmFootnoteCall:Qat,gfmFootnoteDefinitionLabelString:Jat,gfmFootnoteDefinition:eot}}}function rot(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:VA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,a,o){const l=a.createTracker(o);let c=l.move("[^");const d=a.enter("footnoteDefinition"),_=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),_(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((n?` -`:" ")+a.indentLines(a.containerFlow(r,l.current()),n?WA:sot))),d(),c}}function sot(e,n,t){return n===0?e:WA(e,n,t)}function WA(e,n,t){return(t?"":" ")+e}const iot=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];KA.peek=uot;function aot(){return{canContainEols:["delete"],enter:{strikethrough:lot},exit:{strikethrough:cot}}}function oot(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:iot}],handlers:{delete:KA}}}function lot(e){this.enter({type:"delete",children:[]},e)}function cot(e){this.exit(e)}function KA(e,n,t,r){const s=t.createTracker(r),a=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),a(),o}function uot(){return"~"}function dot(e){return e.length}function fot(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||dot,a=[],o=[],l=[],c=[];let d=0,_=-1;for(;++_d&&(d=e[_].length);++vc[v])&&(c[v]=y)}k.push(x)}o[_]=k,l[_]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=x),g[f]=x),m[f]=y}o.splice(1,0,m),l.splice(1,0,g),_=-1;const S=[];for(;++_ "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),pot);return s(),o}function pot(e,n,t){return">"+(t?"":" ")+e}function mot(e,n){return Zk(e,n.inConstruct,!0)&&!Zk(e,n.notInConstruct,!1)}function Zk(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ro&&(o=a):a=1,s=r+n.length,r=t.indexOf(n,s);return o}function got(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 vot(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 bot(e,n,t,r){const s=vot(t),a=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(got(e,t)){const f=t.enter("codeIndented"),m=t.indentLines(a,xot);return f(),m}const l=t.createTracker(r),c=s.repeat(Math.max(YA(a,s)+1,3)),d=t.enter("codeFenced");let _=l.move(c);if(e.lang){const f=t.enter(`codeFencedLang${o}`);_+=l.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${o}`);_+=l.move(" "),_+=l.move(t.safe(e.meta,{before:_,after:` +?)[ \r ]*`,x2="[̀-ͯ]",$at=new RegExp(x2+"+$"),Hat="("+WA+"+)|"+(Bat+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(x2+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(x2+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+Iat)+("|"+Oat+")");class Yk{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(Hat,"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 Ji("EOF",new Ws(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new qe("Unexpected character: '"+n[t]+"'",new Ji(n[t],new Ws(this,t,t+1)));var s=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[s]===14){var a=n.indexOf(` +`,this.tokenRegex.lastIndex);return a===-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=a+1,this.lex()}return new Ji(s,new Ws(this,t,this.tokenRegex.lastIndex))}}class Pat{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 qe("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 a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(n)&&(a[n]=this.current[n])}t==null?delete this.current[n]:this.current[n]=t}}var Fat=LA;re("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});re("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});re("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});re("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});re("\\@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}});re("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");re("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var Xk={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};re("\\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 qe("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=Xk[n.text],r==null||r>=t)throw new qe("Invalid base-"+t+" digit "+n.text);for(var s;(s=Xk[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new qe("\\newcommand's first argument must be a macro name");var a=s[0].text,o=e.isDefined(a);if(o&&!n)throw new qe("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!t)throw new qe("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(s=e.consumeArg().tokens,s.length===1&&s[0].text==="["){for(var c="",d=e.expandNextToken();d.text!=="]"&&d.text!=="EOF";)c+=d.text,d=e.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new qe("Invalid number of arguments: "+c);l=parseInt(c),s=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:s,numArgs:l}),""};re("\\newcommand",e=>wy(e,!1,!0,!1));re("\\renewcommand",e=>wy(e,!0,!1,!1));re("\\providecommand",e=>wy(e,!0,!0,!0));re("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});re("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});re("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),bl[t],Jn.math[t],Jn.text[t]),""});re("\\bgroup","{");re("\\egroup","}");re("~","\\nobreakspace");re("\\lq","`");re("\\rq","'");re("\\aa","\\r a");re("\\AA","\\r A");re("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");re("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");re("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");re("ℬ","\\mathscr{B}");re("ℰ","\\mathscr{E}");re("ℱ","\\mathscr{F}");re("ℋ","\\mathscr{H}");re("ℐ","\\mathscr{I}");re("ℒ","\\mathscr{L}");re("ℳ","\\mathscr{M}");re("ℛ","\\mathscr{R}");re("ℭ","\\mathfrak{C}");re("ℌ","\\mathfrak{H}");re("ℨ","\\mathfrak{Z}");re("\\Bbbk","\\Bbb{k}");re("\\llap","\\mathllap{\\textrm{#1}}");re("\\rlap","\\mathrlap{\\textrm{#1}}");re("\\clap","\\mathclap{\\textrm{#1}}");re("\\mathstrut","\\vphantom{(}");re("\\underbar","\\underline{\\text{#1}}");re("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');re("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");re("\\ne","\\neq");re("≠","\\neq");re("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");re("∉","\\notin");re("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");re("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");re("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");re("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");re("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");re("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");re("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");re("⟂","\\perp");re("‼","\\mathclose{!\\mkern-0.8mu!}");re("∌","\\notni");re("⌜","\\ulcorner");re("⌝","\\urcorner");re("⌞","\\llcorner");re("⌟","\\lrcorner");re("©","\\copyright");re("®","\\textregistered");re("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');re("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');re("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');re("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');re("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");re("⋮","\\vdots");re("\\varGamma","\\mathit{\\Gamma}");re("\\varDelta","\\mathit{\\Delta}");re("\\varTheta","\\mathit{\\Theta}");re("\\varLambda","\\mathit{\\Lambda}");re("\\varXi","\\mathit{\\Xi}");re("\\varPi","\\mathit{\\Pi}");re("\\varSigma","\\mathit{\\Sigma}");re("\\varUpsilon","\\mathit{\\Upsilon}");re("\\varPhi","\\mathit{\\Phi}");re("\\varPsi","\\mathit{\\Psi}");re("\\varOmega","\\mathit{\\Omega}");re("\\substack","\\begin{subarray}{c}#1\\end{subarray}");re("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");re("\\boxed","\\fbox{$\\displaystyle{#1}$}");re("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");re("\\implies","\\DOTSB\\;\\Longrightarrow\\;");re("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");re("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");re("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Zk={",":"\\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"},Uat=new Set(["bin","rel"]);re("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in Zk?n=Zk[t]:(t.slice(0,4)==="\\not"||t in Jn.math&&Uat.has(Jn.math[t].group))&&(n="\\dotsb"),n});var Sy={")":!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};re("\\dotso",function(e){var n=e.future().text;return n in Sy?"\\ldots\\,":"\\ldots"});re("\\dotsc",function(e){var n=e.future().text;return n in Sy&&n!==","?"\\ldots\\,":"\\ldots"});re("\\cdots",function(e){var n=e.future().text;return n in Sy?"\\@cdots\\,":"\\@cdots"});re("\\dotsb","\\cdots");re("\\dotsm","\\cdots");re("\\dotsi","\\!\\cdots");re("\\dotsx","\\ldots\\,");re("\\DOTSI","\\relax");re("\\DOTSB","\\relax");re("\\DOTSX","\\relax");re("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");re("\\,","\\tmspace+{3mu}{.1667em}");re("\\thinspace","\\,");re("\\>","\\mskip{4mu}");re("\\:","\\tmspace+{4mu}{.2222em}");re("\\medspace","\\:");re("\\;","\\tmspace+{5mu}{.2777em}");re("\\thickspace","\\;");re("\\!","\\tmspace-{3mu}{.1667em}");re("\\negthinspace","\\!");re("\\negmedspace","\\tmspace-{4mu}{.2222em}");re("\\negthickspace","\\tmspace-{5mu}{.277em}");re("\\enspace","\\kern.5em ");re("\\enskip","\\hskip.5em\\relax");re("\\quad","\\hskip1em\\relax");re("\\qquad","\\hskip2em\\relax");re("\\tag","\\@ifstar\\tag@literal\\tag@paren");re("\\tag@paren","\\tag@literal{({#1})}");re("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new qe("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});re("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");re("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");re("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");re("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");re("\\newline","\\\\\\relax");re("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var KA=Ye(Sa["Main-Regular"][84][1]-.7*Sa["Main-Regular"][65][1]);re("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+KA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");re("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+KA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");re("\\hspace","\\@ifstar\\@hspacer\\@hspace");re("\\@hspace","\\hskip #1\\relax");re("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");re("\\ordinarycolon",":");re("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");re("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');re("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');re("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');re("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');re("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');re("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');re("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');re("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');re("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');re("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');re("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');re("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');re("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');re("∷","\\dblcolon");re("∹","\\eqcolon");re("≔","\\coloneqq");re("≕","\\eqqcolon");re("⩴","\\Coloneqq");re("\\ratio","\\vcentcolon");re("\\coloncolon","\\dblcolon");re("\\colonequals","\\coloneqq");re("\\coloncolonequals","\\Coloneqq");re("\\equalscolon","\\eqqcolon");re("\\equalscoloncolon","\\Eqqcolon");re("\\colonminus","\\coloneq");re("\\coloncolonminus","\\Coloneq");re("\\minuscolon","\\eqcolon");re("\\minuscoloncolon","\\Eqcolon");re("\\coloncolonapprox","\\Colonapprox");re("\\coloncolonsim","\\Colonsim");re("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");re("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");re("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");re("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");re("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");re("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");re("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");re("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");re("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");re("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");re("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");re("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");re("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");re("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");re("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");re("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");re("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");re("\\nleqq","\\html@mathml{\\@nleqq}{≰}");re("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");re("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");re("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");re("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");re("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");re("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");re("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");re("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");re("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");re("\\imath","\\html@mathml{\\@imath}{ı}");re("\\jmath","\\html@mathml{\\@jmath}{ȷ}");re("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");re("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");re("⟦","\\llbracket");re("⟧","\\rrbracket");re("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");re("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");re("⦃","\\lBrace");re("⦄","\\rBrace");re("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");re("⦵","\\minuso");re("\\darr","\\downarrow");re("\\dArr","\\Downarrow");re("\\Darr","\\Downarrow");re("\\lang","\\langle");re("\\rang","\\rangle");re("\\uarr","\\uparrow");re("\\uArr","\\Uparrow");re("\\Uarr","\\Uparrow");re("\\N","\\mathbb{N}");re("\\R","\\mathbb{R}");re("\\Z","\\mathbb{Z}");re("\\alef","\\aleph");re("\\alefsym","\\aleph");re("\\Alpha","\\mathrm{A}");re("\\Beta","\\mathrm{B}");re("\\bull","\\bullet");re("\\Chi","\\mathrm{X}");re("\\clubs","\\clubsuit");re("\\cnums","\\mathbb{C}");re("\\Complex","\\mathbb{C}");re("\\Dagger","\\ddagger");re("\\diamonds","\\diamondsuit");re("\\empty","\\emptyset");re("\\Epsilon","\\mathrm{E}");re("\\Eta","\\mathrm{H}");re("\\exist","\\exists");re("\\harr","\\leftrightarrow");re("\\hArr","\\Leftrightarrow");re("\\Harr","\\Leftrightarrow");re("\\hearts","\\heartsuit");re("\\image","\\Im");re("\\infin","\\infty");re("\\Iota","\\mathrm{I}");re("\\isin","\\in");re("\\Kappa","\\mathrm{K}");re("\\larr","\\leftarrow");re("\\lArr","\\Leftarrow");re("\\Larr","\\Leftarrow");re("\\lrarr","\\leftrightarrow");re("\\lrArr","\\Leftrightarrow");re("\\Lrarr","\\Leftrightarrow");re("\\Mu","\\mathrm{M}");re("\\natnums","\\mathbb{N}");re("\\Nu","\\mathrm{N}");re("\\Omicron","\\mathrm{O}");re("\\plusmn","\\pm");re("\\rarr","\\rightarrow");re("\\rArr","\\Rightarrow");re("\\Rarr","\\Rightarrow");re("\\real","\\Re");re("\\reals","\\mathbb{R}");re("\\Reals","\\mathbb{R}");re("\\Rho","\\mathrm{P}");re("\\sdot","\\cdot");re("\\sect","\\S");re("\\spades","\\spadesuit");re("\\sub","\\subset");re("\\sube","\\subseteq");re("\\supe","\\supseteq");re("\\Tau","\\mathrm{T}");re("\\thetasym","\\vartheta");re("\\weierp","\\wp");re("\\Zeta","\\mathrm{Z}");re("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");re("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");re("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");re("\\bra","\\mathinner{\\langle{#1}|}");re("\\ket","\\mathinner{|{#1}\\rangle}");re("\\braket","\\mathinner{\\langle{#1}\\rangle}");re("\\Bra","\\left\\langle#1\\right|");re("\\Ket","\\left|#1\\right\\rangle");var YA=e=>n=>{var t=n.consumeArg().tokens,r=n.consumeArg().tokens,s=n.consumeArg().tokens,a=n.consumeArg().tokens,o=n.macros.get("|"),l=n.macros.get("\\|");n.macros.beginGroup();var c=f=>m=>{e&&(m.macros.set("|",o),s.length&&m.macros.set("\\|",l));var g=f;if(!f&&s.length){var S=m.future();S.text==="|"&&(m.popToken(),g=!0)}return{tokens:g?s:r,numArgs:0}};n.macros.set("|",c(!1)),s.length&&n.macros.set("\\|",c(!0));var d=n.consumeArg().tokens,_=n.expandTokens([...a,...d,...t]);return n.macros.endGroup(),{tokens:_.reverse(),numArgs:0}};re("\\bra@ket",YA(!1));re("\\bra@set",YA(!0));re("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");re("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");re("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");re("\\angln","{\\angl n}");re("\\blue","\\textcolor{##6495ed}{#1}");re("\\orange","\\textcolor{##ffa500}{#1}");re("\\pink","\\textcolor{##ff00af}{#1}");re("\\red","\\textcolor{##df0030}{#1}");re("\\green","\\textcolor{##28ae7b}{#1}");re("\\gray","\\textcolor{gray}{#1}");re("\\purple","\\textcolor{##9d38bd}{#1}");re("\\blueA","\\textcolor{##ccfaff}{#1}");re("\\blueB","\\textcolor{##80f6ff}{#1}");re("\\blueC","\\textcolor{##63d9ea}{#1}");re("\\blueD","\\textcolor{##11accd}{#1}");re("\\blueE","\\textcolor{##0c7f99}{#1}");re("\\tealA","\\textcolor{##94fff5}{#1}");re("\\tealB","\\textcolor{##26edd5}{#1}");re("\\tealC","\\textcolor{##01d1c1}{#1}");re("\\tealD","\\textcolor{##01a995}{#1}");re("\\tealE","\\textcolor{##208170}{#1}");re("\\greenA","\\textcolor{##b6ffb0}{#1}");re("\\greenB","\\textcolor{##8af281}{#1}");re("\\greenC","\\textcolor{##74cf70}{#1}");re("\\greenD","\\textcolor{##1fab54}{#1}");re("\\greenE","\\textcolor{##0d923f}{#1}");re("\\goldA","\\textcolor{##ffd0a9}{#1}");re("\\goldB","\\textcolor{##ffbb71}{#1}");re("\\goldC","\\textcolor{##ff9c39}{#1}");re("\\goldD","\\textcolor{##e07d10}{#1}");re("\\goldE","\\textcolor{##a75a05}{#1}");re("\\redA","\\textcolor{##fca9a9}{#1}");re("\\redB","\\textcolor{##ff8482}{#1}");re("\\redC","\\textcolor{##f9685d}{#1}");re("\\redD","\\textcolor{##e84d39}{#1}");re("\\redE","\\textcolor{##bc2612}{#1}");re("\\maroonA","\\textcolor{##ffbde0}{#1}");re("\\maroonB","\\textcolor{##ff92c6}{#1}");re("\\maroonC","\\textcolor{##ed5fa6}{#1}");re("\\maroonD","\\textcolor{##ca337c}{#1}");re("\\maroonE","\\textcolor{##9e034e}{#1}");re("\\purpleA","\\textcolor{##ddd7ff}{#1}");re("\\purpleB","\\textcolor{##c6b9fc}{#1}");re("\\purpleC","\\textcolor{##aa87ff}{#1}");re("\\purpleD","\\textcolor{##7854ab}{#1}");re("\\purpleE","\\textcolor{##543b78}{#1}");re("\\mintA","\\textcolor{##f5f9e8}{#1}");re("\\mintB","\\textcolor{##edf2df}{#1}");re("\\mintC","\\textcolor{##e0e5cc}{#1}");re("\\grayA","\\textcolor{##f6f7f7}{#1}");re("\\grayB","\\textcolor{##f0f1f2}{#1}");re("\\grayC","\\textcolor{##e3e5e6}{#1}");re("\\grayD","\\textcolor{##d6d8da}{#1}");re("\\grayE","\\textcolor{##babec2}{#1}");re("\\grayF","\\textcolor{##888d93}{#1}");re("\\grayG","\\textcolor{##626569}{#1}");re("\\grayH","\\textcolor{##3b3e40}{#1}");re("\\grayI","\\textcolor{##21242c}{#1}");re("\\kaBlue","\\textcolor{##314453}{#1}");re("\\kaGreen","\\textcolor{##71B307}{#1}");var XA={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class qat{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 Pat(Fat,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new Yk(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 Ji("EOF",r.loc)),this.pushTokens(s),new Ji("",Ws.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(),a,o=0,l=0;do{if(a=this.popToken(),t.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new qe("Extra }",a)}else if(a.text==="EOF")throw new qe("Unexpected end of input in a macro argument, expected '"+(n&&r?n[l]:"}")+"'",a);if(n&&r)if((o===0||o===1&&n[l]==="{")&&a.text===n[l]){if(++l,l===n.length){t.splice(-l,l);break}}else l=0}while(o!==0||r);return s.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:s,end:a}}consumeArgs(n,t){if(t){if(t.length!==n+1)throw new qe("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new qe("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 qe("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var a=s.tokens,o=this.consumeArgs(s.numArgs,s.delimiters);if(s.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var c=a[l];if(c.text==="#"){if(l===0)throw new qe("Incomplete placeholder at end of macro body",c);if(c=a[--l],c.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(c.text))a.splice(l,2,...o[+c.text-1]);else throw new qe("Not a valid argument number",c)}}}return this.pushTokens(a),a.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 Ji(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 a=0;if(s.includes("#"))for(var o=s.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new Yk(s,this.settings),c=[],d=l.lex();d.text!=="EOF";)c.push(d),d=l.lex();c.reverse();var _={tokens:c,numArgs:a};return _}return s}isDefined(n){return this.macros.has(n)||bl.hasOwnProperty(n)||Jn.math.hasOwnProperty(n)||Jn.text.hasOwnProperty(n)||XA.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:bl.hasOwnProperty(n)&&!bl[n].primitive}}var Qk=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,_0=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Rv={"́":{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"}},Jk={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class fm{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 qat(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 qe("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 Ji("}")),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(fm.endOfExpression.has(s.text)||t&&s.text===t||n&&bl[s.text]&&bl[s.text].infix)break;var a=this.parseAtom(t);if(a){if(a.type==="internal")continue}else break;r.push(a)}return this.mode==="text"&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(n){for(var t=-1,r,s=0;s=128)this.settings.strict&&(nA(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)),o={type:"textord",mode:"text",loc:Ws.range(n),text:t};else return null;if(this.consume(),a)for(var _=0;_0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=C+1:(S!==C&&x.push({type:"text",value:d.value.slice(S,C)}),Array.isArray(E)?x.push(...E):E&&x.push(E),S=C+y[0].length,v=!0),!m.global)break;y=m.exec(d.value)}return v?(S?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=t8(e,"(");let a=t8(e,")");for(;r!==-1&&s>a;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),a++;return[e,t]}function eT(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||bc(t)||Yp(t))&&(!n||t!==47)}tT.peek=Sot;function pot(){this.buffer()}function mot(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function got(){this.buffer()}function vot(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function bot(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function xot(e){this.exit(e)}function yot(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=Zi(this.sliceSerialize(e)).toLowerCase(),t.label=n}function wot(e){this.exit(e)}function Sot(){return"["}function tT(e,n,t,r){const s=t.createTracker(r);let a=s.move("[^");const o=t.enter("footnoteReference"),l=t.enter("reference");return a+=s.move(t.safe(t.associationId(e),{after:"]",before:a})),l(),o(),a+=s.move("]"),a}function kot(){return{enter:{gfmFootnoteCallString:pot,gfmFootnoteCall:mot,gfmFootnoteDefinitionLabelString:got,gfmFootnoteDefinition:vot},exit:{gfmFootnoteCallString:bot,gfmFootnoteCall:xot,gfmFootnoteDefinitionLabelString:yot,gfmFootnoteDefinition:wot}}}function Cot(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:tT},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,s,a,o){const l=a.createTracker(o);let c=l.move("[^");const d=a.enter("footnoteDefinition"),_=a.enter("label");return c+=l.move(a.safe(a.associationId(r),{before:c,after:"]"})),_(),c+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),c+=l.move((n?` +`:" ")+a.indentLines(a.containerFlow(r,l.current()),n?nT:Eot))),d(),c}}function Eot(e,n,t){return n===0?e:nT(e,n,t)}function nT(e,n,t){return(t?"":" ")+e}const Not=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rT.peek=Mot;function zot(){return{canContainEols:["delete"],enter:{strikethrough:Tot},exit:{strikethrough:jot}}}function Aot(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Not}],handlers:{delete:rT}}}function Tot(e){this.enter({type:"delete",children:[]},e)}function jot(e){this.exit(e)}function rT(e,n,t,r){const s=t.createTracker(r),a=t.enter("strikethrough");let o=s.move("~~");return o+=t.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),a(),o}function Mot(){return"~"}function Rot(e){return e.length}function Dot(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||Rot,a=[],o=[],l=[],c=[];let d=0,_=-1;for(;++_d&&(d=e[_].length);++vc[v])&&(c[v]=y)}k.push(x)}o[_]=k,l[_]=b}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=x),g[f]=x),m[f]=y}o.splice(1,0,m),l.splice(1,0,g),_=-1;const S=[];for(;++_ "),a.shift(2);const o=t.indentLines(t.containerFlow(e,a.current()),Iot);return s(),o}function Iot(e,n,t){return">"+(t?"":" ")+e}function Bot(e,n){return r8(e,n.inConstruct,!0)&&!r8(e,n.notInConstruct,!1)}function r8(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++ro&&(o=a):a=1,s=r+n.length,r=t.indexOf(n,s);return o}function $ot(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 Hot(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 Pot(e,n,t,r){const s=Hot(t),a=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if($ot(e,t)){const f=t.enter("codeIndented"),m=t.indentLines(a,Fot);return f(),m}const l=t.createTracker(r),c=s.repeat(Math.max(sT(a,s)+1,3)),d=t.enter("codeFenced");let _=l.move(c);if(e.lang){const f=t.enter(`codeFencedLang${o}`);_+=l.move(t.safe(e.lang,{before:_,after:" ",encode:["`"],...l.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${o}`);_+=l.move(" "),_+=l.move(t.safe(e.meta,{before:_,after:` `,encode:["`"],...l.current()})),f()}return _+=l.move(` `),a&&(_+=l.move(a+` -`)),_+=l.move(c),d(),_}function xot(e,n,t){return(t?"":" ")+e}function yy(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 yot(e,n,t,r){const s=yy(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` -`,...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),o(),d}function wot(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 Wf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _p(e,n,t){const r=Yu(e),s=Yu(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}}XA.peek=Sot;function XA(e,n,t,r){const s=wot(t),a=t.enter("emphasis"),o=t.createTracker(r),l=o.move(s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=_p(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Wf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=_p(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Wf(f));const g=o.move(s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function Sot(e,n,t){return t.options.emphasis||"*"}function kot(e,n){let t=!1;return Wx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,$b}),!!((!e.depth||e.depth<3)&&ey(e)&&(n.options.setext||t))}function Cot(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(kot(e,t)){const _=t.enter("headingSetext"),f=t.enter("phrasing"),m=t.containerPhrasing(e,{...a.current(),before:` +`)),_+=l.move(c),d(),_}function Fot(e,n,t){return(t?"":" ")+e}function Ey(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 Uot(e,n,t,r){const s=Ey(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("definition");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("[");return d+=c.move(t.safe(t.associationId(e),{before:d,after:"]",...c.current()})),d+=c.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":` +`,...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),o(),d}function qot(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 Yf(e){return"&#x"+e.toString(16).toUpperCase()+";"}function bp(e,n,t){const r=Zu(e),s=Zu(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}}iT.peek=Got;function iT(e,n,t,r){const s=qot(t),a=t.enter("emphasis"),o=t.createTracker(r),l=o.move(s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=bp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Yf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=bp(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Yf(f));const g=o.move(s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function Got(e,n,t){return t.options.emphasis||"*"}function Vot(e,n){let t=!1;return Qx(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,qb}),!!((!e.depth||e.depth<3)&&iy(e)&&(n.options.setext||t))}function Wot(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),a=t.createTracker(r);if(Vot(e,t)){const _=t.enter("headingSetext"),f=t.enter("phrasing"),m=t.containerPhrasing(e,{...a.current(),before:` `,after:` `});return f(),_(),m+` `+(s===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(` `))+1))}const o="#".repeat(s),l=t.enter("headingAtx"),c=t.enter("phrasing");a.move(o+" ");let d=t.containerPhrasing(e,{before:"# ",after:` -`,...a.current()});return/^[\t ]/.test(d)&&(d=Wf(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,t.options.closeAtx&&(d+=" "+o),c(),l(),d}ZA.peek=Eot;function ZA(e){return e.value||""}function Eot(){return"<"}QA.peek=Not;function QA(e,n,t,r){const s=yy(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("![");return d+=c.move(t.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),d+=c.move(")"),o(),d}function Not(){return"!"}JA.peek=zot;function JA(e,n,t,r){const s=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("![");const d=t.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function zot(){return"!"}eT.peek=Aot;function eT(e,n,t){let r=e.value||"",s="`",a=-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+" ");++a\u007F]/.test(e.url))}nT.peek=Tot;function nT(e,n,t,r){const s=yy(t),a=s==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let l,c;if(tT(e,t)){const _=t.stack;t.stack=[],l=t.enter("autolink");let f=o.move("<");return f+=o.move(t.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),l(),t.stack=_,f}l=t.enter("link"),c=t.enter("label");let d=o.move("[");return d+=o.move(t.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(t.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(c=t.enter("destinationRaw"),d+=o.move(t.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=t.enter(`title${a}`),d+=o.move(" "+s),d+=o.move(t.safe(e.title,{before:d,after:s,...o.current()})),d+=o.move(s),c()),d+=o.move(")"),l(),d}function Tot(e,n,t){return tT(e,t)?"<":"["}rT.peek=jot;function rT(e,n,t,r){const s=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function jot(){return"["}function wy(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 Mot(e){const n=wy(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 Rot(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 sT(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 Dot(e,n,t,r){const s=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?Rot(t):wy(t);const l=e.ordered?o==="."?")":".":Mot(t);let c=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&_&&(!_.children||!_.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),sT(t)===o&&_){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,l.current()),_);return c(),d;function _(f,m,g){return m?(g?"":" ".repeat(o))+f:(g?a:a+" ".repeat(o-a.length))+f}}function Iot(e,n,t,r){const s=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,r);return a(),s(),o}const Bot=wh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $ot(e,n,t,r){return(e.children.some(function(o){return Bot(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function Hot(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}iT.peek=Pot;function iT(e,n,t,r){const s=Hot(t),a=t.enter("strong"),o=t.createTracker(r),l=o.move(s+s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=_p(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Wf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=_p(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Wf(f));const g=o.move(s+s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function Pot(e,n,t){return t.options.strong||"*"}function Fot(e,n,t,r){return t.safe(e.value,r)}function Uot(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 qot(e,n,t){const r=(sT(t)+(t.options.ruleSpaces?" ":"")).repeat(Uot(t));return t.options.ruleSpaces?r.slice(0,-1):r}const aT={blockquote:_ot,break:Qk,code:bot,definition:yot,emphasis:XA,hardBreak:Qk,heading:Cot,html:ZA,image:QA,imageReference:JA,inlineCode:eT,link:nT,linkReference:rT,list:Dot,listItem:Oot,paragraph:Iot,root:$ot,strong:iT,text:Fot,thematicBreak:qot};function Got(){return{enter:{table:Vot,tableData:Jk,tableHeader:Jk,tableRow:Kot},exit:{codeText:Yot,table:Wot,tableData:Rv,tableHeader:Rv,tableRow:Rv}}}function Vot(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 Wot(e){this.exit(e),this.data.inTable=void 0}function Kot(e){this.enter({type:"tableRow",children:[]},e)}function Rv(e){this.exit(e)}function Jk(e){this.enter({type:"tableCell",children:[]},e)}function Yot(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,Xot));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function Xot(e,n){return n==="|"?n:e}function Zot(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...a.current()});return/^[\t ]/.test(d)&&(d=Yf(d.charCodeAt(0))+d.slice(1)),d=d?o+" "+d:o,t.options.closeAtx&&(d+=" "+o),c(),l(),d}aT.peek=Kot;function aT(e){return e.value||""}function Kot(){return"<"}oT.peek=Yot;function oT(e,n,t,r){const s=Ey(t),a=s==='"'?"Quote":"Apostrophe",o=t.enter("image");let l=t.enter("label");const c=t.createTracker(r);let d=c.move("![");return d+=c.move(t.safe(e.alt,{before:d,after:"]",...c.current()})),d+=c.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),d+=c.move("<"),d+=c.move(t.safe(e.url,{before:d,after:">",...c.current()})),d+=c.move(">")):(l=t.enter("destinationRaw"),d+=c.move(t.safe(e.url,{before:d,after:e.title?" ":")",...c.current()}))),l(),e.title&&(l=t.enter(`title${a}`),d+=c.move(" "+s),d+=c.move(t.safe(e.title,{before:d,after:s,...c.current()})),d+=c.move(s),l()),d+=c.move(")"),o(),d}function Yot(){return"!"}lT.peek=Xot;function lT(e,n,t,r){const s=e.referenceType,a=t.enter("imageReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("![");const d=t.safe(e.alt,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Xot(){return"!"}cT.peek=Zot;function cT(e,n,t){let r=e.value||"",s="`",a=-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+" ");++a\u007F]/.test(e.url))}dT.peek=Qot;function dT(e,n,t,r){const s=Ey(t),a=s==='"'?"Quote":"Apostrophe",o=t.createTracker(r);let l,c;if(uT(e,t)){const _=t.stack;t.stack=[],l=t.enter("autolink");let f=o.move("<");return f+=o.move(t.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),l(),t.stack=_,f}l=t.enter("link"),c=t.enter("label");let d=o.move("[");return d+=o.move(t.containerPhrasing(e,{before:d,after:"](",...o.current()})),d+=o.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=t.enter("destinationLiteral"),d+=o.move("<"),d+=o.move(t.safe(e.url,{before:d,after:">",...o.current()})),d+=o.move(">")):(c=t.enter("destinationRaw"),d+=o.move(t.safe(e.url,{before:d,after:e.title?" ":")",...o.current()}))),c(),e.title&&(c=t.enter(`title${a}`),d+=o.move(" "+s),d+=o.move(t.safe(e.title,{before:d,after:s,...o.current()})),d+=o.move(s),c()),d+=o.move(")"),l(),d}function Qot(e,n,t){return uT(e,t)?"<":"["}fT.peek=Jot;function fT(e,n,t,r){const s=e.referenceType,a=t.enter("linkReference");let o=t.enter("label");const l=t.createTracker(r);let c=l.move("[");const d=t.containerPhrasing(e,{before:c,after:"]",...l.current()});c+=l.move(d+"]["),o();const _=t.stack;t.stack=[],o=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...l.current()});return o(),t.stack=_,a(),s==="full"||!d||d!==f?c+=l.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Jot(){return"["}function Ny(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 elt(e){const n=Ny(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 tlt(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 hT(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 nlt(e,n,t,r){const s=t.enter("list"),a=t.bulletCurrent;let o=e.ordered?tlt(t):Ny(t);const l=e.ordered?o==="."?")":".":elt(t);let c=n&&t.bulletLastUsed?o===t.bulletLastUsed:!1;if(!e.ordered){const _=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&_&&(!_.children||!_.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),hT(t)===o&&_){let f=-1;for(;++f-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(s==="tab"||s==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const l=t.createTracker(r);l.move(a+" ".repeat(o-a.length)),l.shift(o);const c=t.enter("listItem"),d=t.indentLines(t.containerFlow(e,l.current()),_);return c(),d;function _(f,m,g){return m?(g?"":" ".repeat(o))+f:(g?a:a+" ".repeat(o-a.length))+f}}function ilt(e,n,t,r){const s=t.enter("paragraph"),a=t.enter("phrasing"),o=t.containerPhrasing(e,r);return a(),s(),o}const alt=kh(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function olt(e,n,t,r){return(e.children.some(function(o){return alt(o)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function llt(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}_T.peek=clt;function _T(e,n,t,r){const s=llt(t),a=t.enter("strong"),o=t.createTracker(r),l=o.move(s+s);let c=o.move(t.containerPhrasing(e,{after:s,before:l,...o.current()}));const d=c.charCodeAt(0),_=bp(r.before.charCodeAt(r.before.length-1),d,s);_.inside&&(c=Yf(d)+c.slice(1));const f=c.charCodeAt(c.length-1),m=bp(r.after.charCodeAt(0),f,s);m.inside&&(c=c.slice(0,-1)+Yf(f));const g=o.move(s+s);return a(),t.attentionEncodeSurroundingInfo={after:m.outside,before:_.outside},l+c+g}function clt(e,n,t){return t.options.strong||"*"}function ult(e,n,t,r){return t.safe(e.value,r)}function dlt(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 flt(e,n,t){const r=(hT(t)+(t.options.ruleSpaces?" ":"")).repeat(dlt(t));return t.options.ruleSpaces?r.slice(0,-1):r}const pT={blockquote:Oot,break:s8,code:Pot,definition:Uot,emphasis:iT,hardBreak:s8,heading:Wot,html:aT,image:oT,imageReference:lT,inlineCode:cT,link:dT,linkReference:fT,list:nlt,listItem:slt,paragraph:ilt,root:olt,strong:_T,text:ult,thematicBreak:flt};function hlt(){return{enter:{table:_lt,tableData:i8,tableHeader:i8,tableRow:mlt},exit:{codeText:glt,table:plt,tableData:Iv,tableHeader:Iv,tableRow:Iv}}}function _lt(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 plt(e){this.exit(e),this.data.inTable=void 0}function mlt(e){this.enter({type:"tableRow",children:[]},e)}function Iv(e){this.exit(e)}function i8(e){this.enter({type:"tableCell",children:[]},e)}function glt(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,vlt));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function vlt(e,n){return n==="|"?n:e}function blt(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,a=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:m,table:o,tableCell:c,tableRow:l}};function o(g,S,k,b){return d(_(g,k,b),g.align)}function l(g,S,k,b){const v=f(g,k,b),x=d([v]);return x.slice(0,x.indexOf(` -`))}function c(g,S,k,b){const v=k.enter("tableCell"),x=k.enter("phrasing"),y=k.containerPhrasing(g,{...b,before:a,after:a});return x(),v(),y}function d(g,S){return fot(g,{align:S,alignDelimiters:r,padding:t,stringLength:s})}function _(g,S,k){const b=g.children;let v=-1;const x=[],y=S.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const plt={tokenize:Slt,partial:!0};function mlt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:xlt,continuation:{tokenize:ylt},exit:wlt}},text:{91:{name:"gfmFootnoteCall",tokenize:blt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:glt,resolveTo:vlt}}}}function glt(e,n,t){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return t(c);const d=Zi(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function vlt(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 a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...l),e}function blt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(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",d)}function d(f){if(a>999||f===93&&!o||f===null||f===91||Bn(f))return t(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(Zi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return Bn(f)||(o=!0),a++,e.consume(f),f===92?_:d}function _(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function xlt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(S)}function _(S){if(o>999||S===93&&!l||S===null||S===91||Bn(S))return t(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Zi(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Bn(S)||(l=!0),o++,e.consume(S),S===92?f:_}function f(S){return S===91||S===92||S===93?(e.consume(S),o++,_):_(S)}function m(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),tn(e,g,"gfmFootnoteDefinitionWhitespace")):t(S)}function g(S){return n(S)}}function ylt(e,n,t){return e.check(Ch,n,e.attempt(plt,n,t))}function wlt(e){e.exit("gfmFootnoteDefinition")}function Slt(e,n,t){const r=this;return tn(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function klt(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,l){let c=-1;for(;++c1?c(S):(o.consume(S),f++,g);if(f<2&&!t)return c(S);const b=o.exit("strikethroughSequenceTemporary"),v=Yu(S);return b._open=!v||v===2&&!!k,b._close=!k||k===2&&!!v,l(S)}}}class Clt{constructor(){this.map=[]}add(n,t,r){Elt(this,n,t,r)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[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 a of s)n.push(a);s=r.pop()}this.map.length=0}}function Elt(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const V=r.events[P][1].type;if(V==="lineEnding"||V==="linePrefix")P--;else break}const H=P>-1?r.events[P][1].type:null,F=H==="tableHead"||H==="tableRow"?E:c;return F===E&&r.parser.lazy[r.now().line]?t(I):F(I)}function c(I){return e.enter("tableHead"),e.enter("tableRow"),d(I)}function d(I){return I===124||(o=!0,a+=1),_(I)}function _(I){return I===null?t(I):ht(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g):t(I):on(I)?tn(e,_,"whitespace")(I):(a+=1,o&&(o=!1,s+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,_):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||Bn(I)?(e.exit("data"),_(I)):(e.consume(I),I===92?m:f)}function m(I){return I===92||I===124?(e.consume(I),f):f(I)}function g(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(I):(e.enter("tableDelimiterRow"),o=!1,on(I)?tn(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):S(I))}function S(I){return I===45||I===58?b(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),k):A(I)}function k(I){return on(I)?tn(e,b,"whitespace")(I):b(I)}function b(I){return I===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),v):I===45?(a+=1,v(I)):I===null||ht(I)?C(I):A(I)}function v(I){return I===45?(e.enter("tableDelimiterFiller"),x(I)):A(I)}function x(I){return I===45?(e.consume(I),x):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(I))}function y(I){return on(I)?tn(e,C,"whitespace")(I):C(I)}function C(I){return I===124?S(I):I===null||ht(I)?!o||s!==a?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(I)):A(I)}function A(I){return t(I)}function E(I){return e.enter("tableRow"),j(I)}function j(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),j):I===null||ht(I)?(e.exit("tableRow"),n(I)):on(I)?tn(e,j,"whitespace")(I):(e.enter("data"),T(I))}function T(I){return I===null||I===124||Bn(I)?(e.exit("data"),j(I)):(e.consume(I),I===92?D:T)}function D(I){return I===92||I===124?(e.consume(I),T):T(I)}}function Tlt(e,n){let t=-1,r=!0,s=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,d,_,f;const m=new Clt;for(;++tt[2]+1){const S=t[2]+1,k=t[3]-t[2]-1;e.add(S,k,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(a.end=Object.assign({},Su(n.events,s)),e.add(s,0,[["exit",a,n]]),a=void 0),a}function t8(e,n,t,r,s){const a=[],o=Su(n.events,t);s&&(s.end=Object.assign({},o),a.push(["exit",s,n])),r.end=Object.assign({},o),a.push(["exit",r,n]),e.add(t+1,0,a)}function Su(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const jlt={name:"tasklistCheck",tokenize:Rlt};function Mlt(){return{text:{91:jlt}}}function Rlt(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"),a)}function a(c){return Bn(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):t(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(c)}function l(c){return ht(c)?n(c):on(c)?e.check({tokenize:Dlt},n,t)(c):t(c)}}function Dlt(e,n,t){return tn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function Llt(e){return xz([alt(),mlt(),klt(e),zlt(),Mlt()])}const Olt={};function pT(e){const n=this,t=e||Olt,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(Llt(t)),a.push(nlt()),o.push(rlt(t))}function Ilt(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:a},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:l,mathText:o,mathTextData:l}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d;const f=_.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function a(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function o(c){const d=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d,_.data.hChildren.push({type:"text",value:d})}function l(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function Blt(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(a,o,l,c){const d=a.value||"",_=l.createTracker(c),f="$".repeat(Math.max(YA(d,"$")+1,2)),m=l.enter("mathFlow");let g=_.move(f);if(a.meta){const S=l.enter("mathFlowMeta");g+=_.move(l.safe(a.meta,{after:` +`))}function c(g,S,k,b){const v=k.enter("tableCell"),x=k.enter("phrasing"),y=k.containerPhrasing(g,{...b,before:a,after:a});return x(),v(),y}function d(g,S){return Dot(g,{align:S,alignDelimiters:r,padding:t,stringLength:s})}function _(g,S,k){const b=g.children;let v=-1;const x=[],y=S.enter("table");for(;++v0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const Ilt={tokenize:Glt,partial:!0};function Blt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Flt,continuation:{tokenize:Ult},exit:qlt}},text:{91:{name:"gfmFootnoteCall",tokenize:Plt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:$lt,resolveTo:Hlt}}}}function $lt(e,n,t){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return t(c);const d=Zi(r.sliceSerialize({start:o.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?t(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),n(c))}}function Hlt(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 a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[t+1],e[t+2],["enter",r,n],e[t+3],e[t+4],["enter",s,n],["exit",s,n],["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n],e[e.length-2],e[e.length-1],["exit",r,n]];return e.splice(t,e.length-t+1,...l),e}function Plt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return l;function l(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",d)}function d(f){if(a>999||f===93&&!o||f===null||f===91||$n(f))return t(f);if(f===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return s.includes(Zi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return $n(f)||(o=!0),a++,e.consume(f),f===92?_:d}function _(f){return f===91||f===92||f===93?(e.consume(f),a++,d):d(f)}}function Flt(e,n,t){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,l;return c;function c(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",_):t(S)}function _(S){if(o>999||S===93&&!l||S===null||S===91||$n(S))return t(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=Zi(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return $n(S)||(l=!0),o++,e.consume(S),S===92?f:_}function f(S){return S===91||S===92||S===93?(e.consume(S),o++,_):_(S)}function m(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(a)||s.push(a),tn(e,g,"gfmFootnoteDefinitionWhitespace")):t(S)}function g(S){return n(S)}}function Ult(e,n,t){return e.check(Nh,n,e.attempt(Ilt,n,t))}function qlt(e){e.exit("gfmFootnoteDefinition")}function Glt(e,n,t){const r=this;return tn(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?n(a):t(a)}}function Vlt(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return t==null&&(t=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(o,l){let c=-1;for(;++c1?c(S):(o.consume(S),f++,g);if(f<2&&!t)return c(S);const b=o.exit("strikethroughSequenceTemporary"),v=Zu(S);return b._open=!v||v===2&&!!k,b._close=!k||k===2&&!!v,l(S)}}}class Wlt{constructor(){this.map=[]}add(n,t,r){Klt(this,n,t,r)}consume(n){if(this.map.sort(function(a,o){return a[0]-o[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 a of s)n.push(a);s=r.pop()}this.map.length=0}}function Klt(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const V=r.events[P][1].type;if(V==="lineEnding"||V==="linePrefix")P--;else break}const B=P>-1?r.events[P][1].type:null,F=B==="tableHead"||B==="tableRow"?E:c;return F===E&&r.parser.lazy[r.now().line]?t(I):F(I)}function c(I){return e.enter("tableHead"),e.enter("tableRow"),d(I)}function d(I){return I===124||(o=!0,a+=1),_(I)}function _(I){return I===null?t(I):_t(I)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),g):t(I):on(I)?tn(e,_,"whitespace")(I):(a+=1,o&&(o=!1,s+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),o=!0,_):(e.enter("data"),f(I)))}function f(I){return I===null||I===124||$n(I)?(e.exit("data"),_(I)):(e.consume(I),I===92?m:f)}function m(I){return I===92||I===124?(e.consume(I),f):f(I)}function g(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(I):(e.enter("tableDelimiterRow"),o=!1,on(I)?tn(e,S,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):S(I))}function S(I){return I===45||I===58?b(I):I===124?(o=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),k):A(I)}function k(I){return on(I)?tn(e,b,"whitespace")(I):b(I)}function b(I){return I===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),v):I===45?(a+=1,v(I)):I===null||_t(I)?C(I):A(I)}function v(I){return I===45?(e.enter("tableDelimiterFiller"),x(I)):A(I)}function x(I){return I===45?(e.consume(I),x):I===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(I))}function y(I){return on(I)?tn(e,C,"whitespace")(I):C(I)}function C(I){return I===124?S(I):I===null||_t(I)?!o||s!==a?A(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(I)):A(I)}function A(I){return t(I)}function E(I){return e.enter("tableRow"),j(I)}function j(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),j):I===null||_t(I)?(e.exit("tableRow"),n(I)):on(I)?tn(e,j,"whitespace")(I):(e.enter("data"),T(I))}function T(I){return I===null||I===124||$n(I)?(e.exit("data"),j(I)):(e.consume(I),I===92?D:T)}function D(I){return I===92||I===124?(e.consume(I),T):T(I)}}function Qlt(e,n){let t=-1,r=!0,s=0,a=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,d,_,f;const m=new Wlt;for(;++tt[2]+1){const S=t[2]+1,k=t[3]-t[2]-1;e.add(S,k,[])}}e.add(t[3]+1,0,[["exit",f,n]])}return s!==void 0&&(a.end=Object.assign({},Cu(n.events,s)),e.add(s,0,[["exit",a,n]]),a=void 0),a}function o8(e,n,t,r,s){const a=[],o=Cu(n.events,t);s&&(s.end=Object.assign({},o),a.push(["exit",s,n])),r.end=Object.assign({},o),a.push(["exit",r,n]),e.add(t+1,0,a)}function Cu(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const Jlt={name:"tasklistCheck",tokenize:tct};function ect(){return{text:{91:Jlt}}}function tct(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"),a)}function a(c){return $n(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),o):t(c)}function o(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):t(c)}function l(c){return _t(c)?n(c):on(c)?e.check({tokenize:nct},n,t)(c):t(c)}}function nct(e,n,t){return tn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function rct(e){return Az([zlt(),Blt(),Vlt(e),Xlt(),ect()])}const sct={};function kT(e){const n=this,t=e||sct,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(rct(t)),a.push(klt()),o.push(Clt(t))}function ict(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:a},exit:{mathFlow:s,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:l,mathText:o,mathTextData:l}};function e(c){const d={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[d]}},c)}function n(){this.buffer()}function t(){const c=this.resume(),d=this.stack[this.stack.length-1];d.type,d.meta=c}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function s(c){const d=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d;const f=_.data.hChildren[0];f.type,f.tagName,f.children.push({type:"text",value:d}),this.data.mathFlowInside=void 0}function a(c){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},c),this.buffer()}function o(c){const d=this.resume(),_=this.stack[this.stack.length-1];_.type,this.exit(c),_.value=d,_.data.hChildren.push({type:"text",value:d})}function l(c){this.config.enter.data.call(this,c),this.config.exit.data.call(this,c)}}function act(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(a,o,l,c){const d=a.value||"",_=l.createTracker(c),f="$".repeat(Math.max(sT(d,"$")+1,2)),m=l.enter("mathFlow");let g=_.move(f);if(a.meta){const S=l.enter("mathFlowMeta");g+=_.move(l.safe(a.meta,{after:` `,before:g,encode:["$"],..._.current()})),S()}return g+=_.move(` `),d&&(g+=_.move(d+` -`)),g+=_.move(f),m(),g}function r(a,o,l){let c=a.value||"",d=1;for(n||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const _="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let f=-1;for(;++f]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}zh.displayName="c";zh.aliases=[];function zh(e){e.register(Ia),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}lm.displayName="cpp";lm.aliases=[];function lm(e){e.register(zh),(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)}Cy.displayName="arduino";Cy.aliases=["ino"];function Cy(e){e.register(lm),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}Ey.displayName="bash";Ey.aliases=["sh","shell"];function Ey(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 a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l>/g,function(K,G){return"(?:"+$[+G]+")"})}function r(L,$,K){return RegExp(t(L,$),"")}function s(L,$){for(var K=0;K<$;K++)L=L.replace(/<>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var a={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 o(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var l=o(a.typeDeclaration),c=RegExp(o(a.type+" "+a.typeDeclaration+" "+a.contextual+" "+a.other)),d=o(a.typeDeclaration+" "+a.contextual+" "+a.other),_=o(a.type+" "+a.typeDeclaration+" "+a.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=s(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,S=t(/<<0>>(?:\s*<<1>>)?/.source,[g,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,S]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,m,b]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,b]),A={keyword:c,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:A},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:A},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,S]),lookbehind:!0,inside:A},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:A},{pattern:r(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:A},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,g]),inside:A}],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,[g]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:A},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:A,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:A,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,f]),inside:{function:r(/^<<0>>/.source,[g]),generic:{pattern:RegExp(f),alias:"class-name",inside:A}}},"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,[l,S,g,C,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[S,m]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:A},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 D=j+"|"+E,I=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),P=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),H=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,F=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,P]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[H,F]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[H]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[P]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var V=/:[^}\r\n]+/.source,X=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),W=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,V]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[D]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,V]);function B(L,$){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[$,V]),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,[W]),lookbehind:!0,greedy:!0,inside:B(W,X)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:B(J,Z)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Ah.displayName="markup";Ah.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Ah(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 a={"included-cdata":{pattern://i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",o)}}),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}md.displayName="css";md.aliases=[];function md(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)}zy.displayName="diff";zy.aliases=[];function zy(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],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r +`)),g+=_.move(f),m(),g}function r(a,o,l){let c=a.value||"",d=1;for(n||d++;new RegExp("(^|[^$])"+"\\$".repeat(d)+"([^$]|$)").test(c);)d++;const _="$".repeat(d);/[^ \r\n]/.test(c)&&(/^[ \r\n]/.test(c)&&/[ \r\n]$/.test(c)||/^\$|\$$/.test(c))&&(c=" "+c+" ");let f=-1;for(;++f]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}Th.displayName="c";Th.aliases=[];function Th(e){e.register(Oa),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}hm.displayName="cpp";hm.aliases=[];function hm(e){e.register(Th),(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)}Ty.displayName="arduino";Ty.aliases=["ino"];function Ty(e){e.register(hm),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}jy.displayName="bash";jy.aliases=["sh","shell"];function jy(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 a=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=s.variable[1].inside,l=0;l>/g,function(Y,G){return"(?:"+H[+G]+")"})}function r(L,H,Y){return RegExp(t(L,H),"")}function s(L,H){for(var Y=0;Y>/g,function(){return"(?:"+L+")"});return L.replace(/<>/g,"[^\\s\\S]")}var a={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 o(L){return"\\b(?:"+L.trim().replace(/ /g,"|")+")\\b"}var l=o(a.typeDeclaration),c=RegExp(o(a.type+" "+a.typeDeclaration+" "+a.contextual+" "+a.other)),d=o(a.typeDeclaration+" "+a.contextual+" "+a.other),_=o(a.type+" "+a.typeDeclaration+" "+a.other),f=s(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source,2),m=s(/\((?:[^()]|<>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,S=t(/<<0>>(?:\s*<<1>>)?/.source,[g,f]),k=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,S]),b=/\[\s*(?:,\s*)*\]/.source,v=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,b]),x=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,m,b]),y=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[x]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[y,k,b]),A={keyword:c,punctuation:/[<>()?,.:[\]]/},E=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,j=/"(?:\\.|[^\\"\r\n])*"/.source,T=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;n.languages.csharp=n.languages.extend("clike",{string:[{pattern:r(/(^|[^$\\])<<0>>/.source,[T]),lookbehind:!0,greedy:!0},{pattern:r(/(^|[^@$\\])<<0>>/.source,[j]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:r(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[k]),lookbehind:!0,inside:A},{pattern:r(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:A},{pattern:r(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:r(/(\b<<0>>\s+)<<1>>/.source,[l,S]),lookbehind:!0,inside:A},{pattern:r(/(\bcatch\s*\(\s*)<<0>>/.source,[k]),lookbehind:!0,inside:A},{pattern:r(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:r(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[v]),lookbehind:!0,inside:A},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,_,g]),inside:A}],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,[g]),lookbehind:!0,alias:"punctuation"}}),n.languages.insertBefore("csharp","class-name",{namespace:{pattern:r(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:r(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[m]),lookbehind:!0,alias:"class-name",inside:A},"return-type":{pattern:r(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,k]),inside:A,alias:"class-name"},"constructor-invocation":{pattern:r(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:A,alias:"class-name"},"generic-method":{pattern:r(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,f]),inside:{function:r(/^<<0>>/.source,[g]),generic:{pattern:RegExp(f),alias:"class-name",inside:A}}},"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,[l,S,g,C,c.source,m,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:r(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[S,m]),lookbehind:!0,greedy:!0,inside:n.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:A},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 D=j+"|"+E,I=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[D]),P=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,F=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,P]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,F]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[P]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var V=/:[^}\r\n]+/.source,X=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[I]),2),W=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,V]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[D]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,V]);function $(L,H){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[H,V]),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,[W]),lookbehind:!0,greedy:!0,inside:$(W,X)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:$(J,Z)}],char:{pattern:RegExp(E),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}jh.displayName="markup";jh.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function jh(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 a={"included-cdata":{pattern://i,inside:s}};a["language-"+r]={pattern:/[\s\S]+/,inside:e.languages[r]};var o={};o[t]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:a},e.languages.insertBefore("markup","cdata",o)}}),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}bd.displayName="css";bd.aliases=[];function bd(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)}Ry.displayName="diff";Ry.aliases=[];function Ry(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],a=[];/^\w+$/.test(r)||a.push(/\w+/.exec(r)[0]),r==="diff"&&a.push("bold"),n.languages.diff[r]={pattern:RegExp("^(?:["+s+`].*(?:\r ?| -|(?![\\s\\S])))+`,"m"),alias:a,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)}Ay.displayName="go";Ay.aliases=[];function Ay(e){e.register(Ia),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"]}Ty.displayName="ini";Ty.aliases=[];function Ty(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:/=/}}jy.displayName="java";jy.aliases=[];function jy(e){e.register(Ia),(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)}My.displayName="regex";My.aliases=[];function My(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"},a={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o="(?:[^\\\\-]|"+r.source+")",l=RegExp(o+"-"+o),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:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":a,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}Ry.displayName="json";Ry.aliases=["webmanifest"];function Ry(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}Dy.displayName="kotlin";Dy.aliases=["kt","kts"];function Dy(e){e.register(Ia),(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)}Ly.displayName="less";Ly.aliases=[];function Ly(e){e.register(md),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"}})}Oy.displayName="lua";Oy.aliases=[];function Oy(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:/[\[\](){},;]|\.+|:+/}}Iy.displayName="makefile";Iy.aliases=[];function Iy(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:/[:;(){}]/}}By.displayName="yaml";By.aliases=["yml"];function By(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(c,d){d=(d||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(_,d)}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"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\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:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(o),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?: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)}$y.displayName="markdown";$y.aliases=["md"];function $y(e){e.register(Ah),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),o=/\|?[ \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("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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(l){["url","bold","italic","strike","code-snippet"].forEach(function(c){l!==c&&(n.languages.markdown[l].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function c(d){if(!(!d||typeof d=="string"))for(var _=0,f=d.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}Py.displayName="perl";Py.aliases=[];function Py(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)}um.displayName="markup-templating";um.aliases=[];function um(e){e.register(Ah),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,a,o){if(r.language===s){var l=r.tokenStack=[];r.code=r.code.replace(a,function(c){if(typeof o=="function"&&!o(c))return c;for(var d=l.length,_;r.code.indexOf(_=t(s,d))!==-1;)++d;return l[d]=c,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var a=0,o=Object.keys(r.tokenStack);function l(c){for(var d=0;d=o.length);d++){var _=c[d];if(typeof _=="string"||_.content&&typeof _.content=="string"){var f=o[a],m=r.tokenStack[f],g=typeof _=="string"?_:_.content,S=t(s,f),k=g.indexOf(S);if(k>-1){++a;var b=g.substring(0,k),v=new n.Token(s,n.tokenize(m,r.grammar),"language-"+s,m),x=g.substring(k+S.length),y=[];b&&y.push.apply(y,l([b])),y.push(v),x&&y.push.apply(y,l([x])),typeof _=="string"?c.splice.apply(c,[d,1].concat(y)):_.content=y}}else _.content&&l(_.content)}return c}l(r.tokens)}}})})(e)}Fy.displayName="php";Fy.aliases=[];function Fy(e){e.register(um),(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,a=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;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:a,punctuation:o};var l={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:l}},{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:l}}];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:a,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(d){if(/<\?/.test(d.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(d,"php",_)}}),n.hooks.add("after-tokenize",function(d){n.languages["markup-templating"].tokenizePlaceholders(d,"php")})})(e)}Uy.displayName="python";Uy.aliases=["py"];function Uy(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}qy.displayName="r";qy.aliases=[];function qy(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:/[(){}\[\],;]/}}Gy.displayName="ruby";Gy.aliases=["rb"];function Gy(e){e.register(Ia),(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)}Vy.displayName="rust";Vy.aliases=[];function Vy(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)}Wy.displayName="sass";Wy.aliases=[];function Wy(e){e.register(md),(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)}Ky.displayName="scss";Ky.aliases=[];function Ky(e){e.register(md),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}Yy.displayName="sql";Yy.aliases=[];function Yy(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:/[;[\]()`,.]/}}Xy.displayName="swift";Xy.aliases=[];function Xy(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})}Zy.displayName="typescript";Zy.aliases=["ts"];function Zy(e){e.register(cm),(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)}dm.displayName="basic";dm.aliases=[];function dm(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:/[,;:()]/}}Qy.displayName="vbnet";Qy.aliases=[];function Qy(e){e.register(dm),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:/[,;:(){}]/})}const Ylt=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],r8={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function gT(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function Xlt(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function Zlt(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function s8(e){return Zlt(e)||gT(e)}const Qlt=["","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 Jlt(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let a=0,o=-1,l="",c,d;t.position&&("start"in t.position||"indent"in t.position?(d=t.position.indent,c=t.position.start):c=t.position);let _=(c?c.line:0)||1,f=(c?c.column:0)||1,m=S(),g;for(a--;++a<=e.length;)if(g===10&&(f=(d?d[o]:0)||1),g=e.charCodeAt(a),g===38){const v=e.charCodeAt(a+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){l+=String.fromCharCode(g),f++;continue}const x=a+1;let y=x,C=x,A;if(v===35){C=++y;const F=e.charCodeAt(C);F===88||F===120?(A="hexadecimal",C=++y):A="decimal"}else A="named";let E="",j="",T="";const D=A==="named"?s8:A==="decimal"?gT:Xlt;for(C--;++C<=e.length;){const F=e.charCodeAt(C);if(!D(F))break;T+=String.fromCharCode(F),A==="named"&&Ylt.includes(T)&&(E=T,j=qf(T))}let I=e.charCodeAt(C)===59;if(I){C++;const F=A==="named"?qf(T):!1;F&&(E=T,j=F)}let P=1+C-x,H="";if(!(!I&&t.nonTerminated===!1))if(!T)A!=="named"&&k(4,P);else if(A==="named"){if(I&&!j)k(5,1);else if(E!==T&&(C=y+E.length,P=1+C-y,I=!1),!I){const F=E?1:3;if(t.attribute){const V=e.charCodeAt(C);V===61?(k(F,P),j=""):s8(V)?j="":k(F,P)}else k(F,P)}H=j}else{I||k(2,P);let F=Number.parseInt(T,A==="hexadecimal"?16:10);if(ect(F))k(7,P),H="�";else if(F in r8)k(6,P),H=r8[F];else{let V="";tct(F)&&k(6,P),F>65535&&(F-=65536,V+=String.fromCharCode(F>>>10|55296),F=56320|F&1023),H=V+String.fromCharCode(F)}}if(H){b(),m=S(),a=C-1,f+=C-x+1,s.push(H);const F=S();F.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,H,{start:m,end:F},e.slice(x-1,C)),m=F}else T=e.slice(x-1,C),l+=T,f+=T.length,a=C-1}else g===10&&(_++,o++,f=0),Number.isNaN(g)?b():(l+=String.fromCharCode(g),f++);return s.join("");function S(){return{line:_,column:f,offset:a+((c?c.offset:0)||0)}}function k(v,x){let y;t.warning&&(y=S(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,Qlt[v],y,v))}function b(){l&&(s.push(l),t.text&&t.text.call(t.textContext||void 0,l,{start:m,end:S()}),l="")}}function ect(e){return e>=55296&&e<=57343||e>1114111}function tct(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 nct=0,u0={},Kr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++nct}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Kr.util.type(n)){case"Object":if(s=Kr.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var a in n)n.hasOwnProperty(a)&&(r[a]=e(n[a],t));return r;case"Array":return s=Kr.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(o,l){r[l]=e(o,t)}),r);default:return n}}},languages:{plain:u0,plaintext:u0,text:u0,txt:u0,extend:function(e,n){var t=Kr.util.clone(Kr.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Kr.languages;var s=r[e],a={};for(var o in s)if(s.hasOwnProperty(o)){if(o==n)for(var l in t)t.hasOwnProperty(l)&&(a[l]=t[l]);t.hasOwnProperty(o)||(a[o]=s[o])}var c=r[e];return r[e]=a,Kr.languages.DFS(Kr.languages,function(d,_){_===c&&d!=e&&(this[d]=a)}),a},DFS:function e(n,t,r,s){s=s||{};var a=Kr.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var l=n[o],c=Kr.util.type(l);c==="Object"&&!s[a(l)]?(s[a(l)]=!0,e(l,t,null,s)):c==="Array"&&!s[a(l)]&&(s[a(l)]=!0,e(l,t,o,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Kr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Kr.tokenize(r.code,r.grammar),Kr.hooks.run("after-tokenize",r),Rf.stringify(Kr.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 rct;return L0(s,s.head,e),vT(e,s,n,s.head,0),ict(s)},hooks:{all:{},add:function(e,n){var t=Kr.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Kr.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Rf};function Rf(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function i8(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var a=s[1].length;s.index+=a,s[0]=s[0].slice(a)}return s}function vT(e,n,t,r,s,a){for(var o in t)if(!(!t.hasOwnProperty(o)||!t[o])){var l=t[o];l=Array.isArray(l)?l:[l];for(var c=0;c=a.reach);v+=b.value.length,b=b.next){var x=b.value;if(n.length>e.length)return;if(!(x instanceof Rf)){var y=1,C;if(m){if(C=i8(k,v,e,f),!C||C.index>=e.length)break;var T=C.index,A=C.index+C[0].length,E=v;for(E+=b.value.length;T>=E;)b=b.next,E+=b.value.length;if(E-=b.value.length,v=E,b.value instanceof Rf)continue;for(var j=b;j!==n.tail&&(Ea.reach&&(a.reach=H);var F=b.prev;I&&(F=L0(n,F,I),v+=I.length),sct(n,F,y);var V=new Rf(o,_?Kr.tokenize(D,_):D,g,D);if(b=L0(n,F,V),P&&L0(n,b,P),y>1){var X={cause:o+","+c,reach:H};vT(e,n,t,b.prev,v,X),a&&X.reach>a.reach&&(a.reach=X.reach)}}}}}}function rct(){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 L0(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 sct(e,n,t){for(var r=n.next,s=0;st)return null;try{return gt.highlight(e,n).children}catch{return null}}function wT(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:h.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(wT)},n)}function hct(e,n,t=3e5){var r;return((r=yT(e,n,t))==null?void 0:r.map(wT))??e}function ST(e,n,t=3e5){const r=yT(e,n,t);if(!r)return e.split(` +|(?![\\s\\S])))+`,"m"),alias:a,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)}Dy.displayName="go";Dy.aliases=[];function Dy(e){e.register(Oa),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"]}Ly.displayName="ini";Ly.aliases=[];function Ly(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:/=/}}Oy.displayName="java";Oy.aliases=[];function Oy(e){e.register(Oa),(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)}Iy.displayName="regex";Iy.aliases=[];function Iy(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"},a={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o="(?:[^\\\\-]|"+r.source+")",l=RegExp(o+"-"+o),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:l,inside:{escape:r,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":a,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}By.displayName="json";By.aliases=["webmanifest"];function By(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}$y.displayName="kotlin";$y.aliases=["kt","kts"];function $y(e){e.register(Oa),(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)}Hy.displayName="less";Hy.aliases=[];function Hy(e){e.register(bd),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"}})}Py.displayName="lua";Py.aliases=[];function Py(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:/[\[\](){},;]|\.+|:+/}}Fy.displayName="makefile";Fy.aliases=[];function Fy(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:/[:;(){}]/}}Uy.displayName="yaml";Uy.aliases=["yml"];function Uy(e){(function(n){var t=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,s="(?:"+r.source+"(?:[ ]+"+t.source+")?|"+t.source+"(?:[ ]+"+r.source+")?)",a=/(?:[^\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}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function l(c,d){d=(d||"").replace(/m/g,"")+"m";var _=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(_,d)}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"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:l(/\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:l(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:l(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:l(o),lookbehind:!0,greedy:!0},number:{pattern:l(/[+-]?(?: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)}qy.displayName="markdown";qy.aliases=["md"];function qy(e){e.register(jh),(function(n){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function r(l){return l=l.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+l+")")}var s=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return s}),o=/\|?[ \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("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(s),inside:n.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),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(l){["url","bold","italic","strike","code-snippet"].forEach(function(c){l!==c&&(n.languages.markdown[l].inside.content.inside[c]=n.languages.markdown[c])})}),n.hooks.add("after-tokenize",function(l){if(l.language!=="markdown"&&l.language!=="md")return;function c(d){if(!(!d||typeof d=="string"))for(var _=0,f=d.length;_]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}Vy.displayName="perl";Vy.aliases=[];function Vy(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)}pm.displayName="markup-templating";pm.aliases=[];function pm(e){e.register(jh),(function(n){function t(r,s){return"___"+r.toUpperCase()+s+"___"}Object.defineProperties(n.languages["markup-templating"]={},{buildPlaceholders:{value:function(r,s,a,o){if(r.language===s){var l=r.tokenStack=[];r.code=r.code.replace(a,function(c){if(typeof o=="function"&&!o(c))return c;for(var d=l.length,_;r.code.indexOf(_=t(s,d))!==-1;)++d;return l[d]=c,_}),r.grammar=n.languages.markup}}},tokenizePlaceholders:{value:function(r,s){if(r.language!==s||!r.tokenStack)return;r.grammar=n.languages[s];var a=0,o=Object.keys(r.tokenStack);function l(c){for(var d=0;d=o.length);d++){var _=c[d];if(typeof _=="string"||_.content&&typeof _.content=="string"){var f=o[a],m=r.tokenStack[f],g=typeof _=="string"?_:_.content,S=t(s,f),k=g.indexOf(S);if(k>-1){++a;var b=g.substring(0,k),v=new n.Token(s,n.tokenize(m,r.grammar),"language-"+s,m),x=g.substring(k+S.length),y=[];b&&y.push.apply(y,l([b])),y.push(v),x&&y.push.apply(y,l([x])),typeof _=="string"?c.splice.apply(c,[d,1].concat(y)):_.content=y}}else _.content&&l(_.content)}return c}l(r.tokens)}}})})(e)}Wy.displayName="php";Wy.aliases=[];function Wy(e){e.register(pm),(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,a=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,o=/[{}\[\](),:;]/;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:a,punctuation:o};var l={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:l}},{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:l}}];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:a,punctuation:o}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),n.hooks.add("before-tokenize",function(d){if(/<\?/.test(d.code)){var _=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(d,"php",_)}}),n.hooks.add("after-tokenize",function(d){n.languages["markup-templating"].tokenizePlaceholders(d,"php")})})(e)}Ky.displayName="python";Ky.aliases=["py"];function Ky(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}Yy.displayName="r";Yy.aliases=[];function Yy(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:/[(){}\[\],;]/}}Xy.displayName="ruby";Xy.aliases=["rb"];function Xy(e){e.register(Oa),(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)}Zy.displayName="rust";Zy.aliases=[];function Zy(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)}Qy.displayName="sass";Qy.aliases=[];function Qy(e){e.register(bd),(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)}Jy.displayName="scss";Jy.aliases=[];function Jy(e){e.register(bd),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}e4.displayName="sql";e4.aliases=[];function e4(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:/[;[\]()`,.]/}}t4.displayName="swift";t4.aliases=[];function t4(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})}n4.displayName="typescript";n4.aliases=["ts"];function n4(e){e.register(_m),(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)}mm.displayName="basic";mm.aliases=[];function mm(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:/[,;:()]/}}r4.displayName="vbnet";r4.aliases=[];function r4(e){e.register(mm),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:/[,;:(){}]/})}const gct=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],c8={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function ET(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=48&&n<=57}function vct(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function bct(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function u8(e){return bct(e)||ET(e)}const xct=["","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 yct(e,n){const t={},r=typeof t.additional=="string"?t.additional.charCodeAt(0):t.additional,s=[];let a=0,o=-1,l="",c,d;t.position&&("start"in t.position||"indent"in t.position?(d=t.position.indent,c=t.position.start):c=t.position);let _=(c?c.line:0)||1,f=(c?c.column:0)||1,m=S(),g;for(a--;++a<=e.length;)if(g===10&&(f=(d?d[o]:0)||1),g=e.charCodeAt(a),g===38){const v=e.charCodeAt(a+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||r&&v===r){l+=String.fromCharCode(g),f++;continue}const x=a+1;let y=x,C=x,A;if(v===35){C=++y;const F=e.charCodeAt(C);F===88||F===120?(A="hexadecimal",C=++y):A="decimal"}else A="named";let E="",j="",T="";const D=A==="named"?u8:A==="decimal"?ET:vct;for(C--;++C<=e.length;){const F=e.charCodeAt(C);if(!D(F))break;T+=String.fromCharCode(F),A==="named"&&gct.includes(T)&&(E=T,j=Vf(T))}let I=e.charCodeAt(C)===59;if(I){C++;const F=A==="named"?Vf(T):!1;F&&(E=T,j=F)}let P=1+C-x,B="";if(!(!I&&t.nonTerminated===!1))if(!T)A!=="named"&&k(4,P);else if(A==="named"){if(I&&!j)k(5,1);else if(E!==T&&(C=y+E.length,P=1+C-y,I=!1),!I){const F=E?1:3;if(t.attribute){const V=e.charCodeAt(C);V===61?(k(F,P),j=""):u8(V)?j="":k(F,P)}else k(F,P)}B=j}else{I||k(2,P);let F=Number.parseInt(T,A==="hexadecimal"?16:10);if(wct(F))k(7,P),B="�";else if(F in c8)k(6,P),B=c8[F];else{let V="";Sct(F)&&k(6,P),F>65535&&(F-=65536,V+=String.fromCharCode(F>>>10|55296),F=56320|F&1023),B=V+String.fromCharCode(F)}}if(B){b(),m=S(),a=C-1,f+=C-x+1,s.push(B);const F=S();F.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:m,end:F},e.slice(x-1,C)),m=F}else T=e.slice(x-1,C),l+=T,f+=T.length,a=C-1}else g===10&&(_++,o++,f=0),Number.isNaN(g)?b():(l+=String.fromCharCode(g),f++);return s.join("");function S(){return{line:_,column:f,offset:a+((c?c.offset:0)||0)}}function k(v,x){let y;t.warning&&(y=S(),y.column+=x,y.offset+=x,t.warning.call(t.warningContext||void 0,xct[v],y,v))}function b(){l&&(s.push(l),t.text&&t.text.call(t.textContext||void 0,l,{start:m,end:S()}),l="")}}function wct(e){return e>=55296&&e<=57343||e>1114111}function Sct(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 kct=0,m0={},Xr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++kct}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Xr.util.type(n)){case"Object":if(s=Xr.util.objId(n),t[s])return t[s];r={},t[s]=r;for(var a in n)n.hasOwnProperty(a)&&(r[a]=e(n[a],t));return r;case"Array":return s=Xr.util.objId(n),t[s]?t[s]:(r=[],t[s]=r,n.forEach(function(o,l){r[l]=e(o,t)}),r);default:return n}}},languages:{plain:m0,plaintext:m0,text:m0,txt:m0,extend:function(e,n){var t=Xr.util.clone(Xr.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Xr.languages;var s=r[e],a={};for(var o in s)if(s.hasOwnProperty(o)){if(o==n)for(var l in t)t.hasOwnProperty(l)&&(a[l]=t[l]);t.hasOwnProperty(o)||(a[o]=s[o])}var c=r[e];return r[e]=a,Xr.languages.DFS(Xr.languages,function(d,_){_===c&&d!=e&&(this[d]=a)}),a},DFS:function e(n,t,r,s){s=s||{};var a=Xr.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var l=n[o],c=Xr.util.type(l);c==="Object"&&!s[a(l)]?(s[a(l)]=!0,e(l,t,null,s)):c==="Array"&&!s[a(l)]&&(s[a(l)]=!0,e(l,t,o,s))}}},plugins:{},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(Xr.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Xr.tokenize(r.code,r.grammar),Xr.hooks.run("after-tokenize",r),Rf.stringify(Xr.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 Cct;return P0(s,s.head,e),NT(e,s,n,s.head,0),Nct(s)},hooks:{all:{},add:function(e,n){var t=Xr.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Xr.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:Rf};function Rf(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function d8(e,n,t,r){e.lastIndex=n;var s=e.exec(t);if(s&&r&&s[1]){var a=s[1].length;s.index+=a,s[0]=s[0].slice(a)}return s}function NT(e,n,t,r,s,a){for(var o in t)if(!(!t.hasOwnProperty(o)||!t[o])){var l=t[o];l=Array.isArray(l)?l:[l];for(var c=0;c=a.reach);v+=b.value.length,b=b.next){var x=b.value;if(n.length>e.length)return;if(!(x instanceof Rf)){var y=1,C;if(m){if(C=d8(k,v,e,f),!C||C.index>=e.length)break;var T=C.index,A=C.index+C[0].length,E=v;for(E+=b.value.length;T>=E;)b=b.next,E+=b.value.length;if(E-=b.value.length,v=E,b.value instanceof Rf)continue;for(var j=b;j!==n.tail&&(Ea.reach&&(a.reach=B);var F=b.prev;I&&(F=P0(n,F,I),v+=I.length),Ect(n,F,y);var V=new Rf(o,_?Xr.tokenize(D,_):D,g,D);if(b=P0(n,F,V),P&&P0(n,b,P),y>1){var X={cause:o+","+c,reach:B};NT(e,n,t,b.prev,v,X),a&&X.reach>a.reach&&(a.reach=X.reach)}}}}}}function Cct(){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 P0(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 Ect(e,n,t){for(var r=n.next,s=0;st)return null;try{return gt.highlight(e,n).children}catch{return null}}function jT(e,n){var t;return e.type==="text"?e.value??"":e.type!=="element"?null:h.jsx("span",{className:(((t=e.properties)==null?void 0:t.className)??[]).join(" "),children:(e.children??[]).map(jT)},n)}function Lct(e,n,t=3e5){var r;return((r=TT(e,n,t))==null?void 0:r.map(jT))??e}function MT(e,n,t=3e5){const r=TT(e,n,t);if(!r)return e.split(` `);const s=[];let a=[];const o=[];let l=0;const c=_=>{let f=_;for(let m=o.length-1;m>=0;m--)f=h.jsx("span",{className:o[m],children:f},l++);a.push(f)},d=_=>{var f;if(_.type==="text"){(_.value??"").split(` -`).forEach((m,g)=>{g>0&&(s.push(a),a=[]),m&&c(m)});return}_.type==="element"&&(o.push((((f=_.properties)==null?void 0:f.className)??[]).join(" ")),(_.children??[]).forEach(d),o.pop())};return r.forEach(d),s.push(a),s}function kT(e){return Array.isArray(e)?e.length===0:e===""}const a8=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function Ju(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function Kf(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function b2(e){var o;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(l){r+=l[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 a=((o=/^[ \t]*/.exec(e.slice(r)))==null?void 0:o[0].length)??0;return{hasListMarker:n,indentation:a,listIndent:t,offset:r+a,quoteDepth:s}}function _ct(e,n){const t=e[n];if(t!=="`"&&t!=="~"||Kf(e,n)||Ju(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`).forEach((m,g)=>{g>0&&(s.push(a),a=[]),m&&c(m)});return}_.type==="element"&&(o.push((((f=_.properties)==null?void 0:f.className)??[]).join(" ")),(_.children??[]).forEach(d),o.pop())};return r.forEach(d),s.push(a),s}function RT(e){return Array.isArray(e)?e.length===0:e===""}const f8=/^\d+(?:,\d{3})*(?:\.\d+)?(?:\s*[–—-]\s*\$?\d+(?:,\d{3})*(?:\.\d+)?)?(?:\/[A-Za-z][A-Za-z0-9-]*)?/;function td(e,n,t){let r=n;for(;e[r]===t;)r+=1;return r-n}function Xf(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r-=1)t+=1;return t%2===1}function k2(e){var o;let n=!1,t=0,r=0,s=0;for(;r[ \t]?/.exec(e.slice(r));if(l){r+=l[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 a=((o=/^[ \t]*/.exec(e.slice(r)))==null?void 0:o[0].length)??0;return{hasListMarker:n,indentation:a,listIndent:t,offset:r+a,quoteDepth:s}}function Oct(e,n){const t=e[n];if(t!=="`"&&t!=="~"||Xf(e,n)||td(e,n,t)<3)return!1;const r=e.lastIndexOf(` `,n-1)+1,s=e.indexOf(` -`,n),a=e.slice(r,s===-1?e.length:s),o=b2(a);return o.indentation<=3&&r+o.offset===n}function pct(e,n){const t=e[n],r=Ju(e,n,t),s=e.lastIndexOf(` +`,n),a=e.slice(r,s===-1?e.length:s),o=k2(a);return o.indentation<=3&&r+o.offset===n}function Ict(e,n){const t=e[n],r=td(e,n,t),s=e.lastIndexOf(` `,n-1)+1,a=e.indexOf(` -`,n),o=b2(e.slice(s,a===-1?e.length:a));let l=e.indexOf(` +`,n),o=k2(e.slice(s,a===-1?e.length:a));let l=e.indexOf(` `,n+r);if(l===-1)return e.length;for(l+=1;l=o.listIndent&&f.indentation<=o.listIndent+3&&g>=r&&/^[ \t\r]*$/.test(e.slice(m+g,d)))return c===-1?e.length:c+1;if(c===-1)return e.length;l=c+1}return e.length}function mct(e,n,t){const r=Ju(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function vct(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 xct(e,{predictMath:n=!1}={}){const t=vct(e),r=new Set,s=new Set;for(let d=0;d=o.listIndent&&f.indentation<=o.listIndent+3&&g>=r&&/^[ \t\r]*$/.test(e.slice(m+g,d)))return c===-1?e.length:c+1;if(c===-1)return e.length;l=c+1}return e.length}function Bct(e,n,t){const r=td(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function Hct(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 Fct(e,{predictMath:n=!1}={}){const t=Hct(e),r=new Set,s=new Set;for(let d=0;d`$$${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}`)),xct(t,n)}function CT(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 Sct(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function gr(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=Sct(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const kct=1e5;function Cct({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var a;(a=navigator.clipboard)==null||a.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return h.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[h.jsx(Jt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:cE(),"aria-label":T0e(),onClick:s,children:t?h.jsx(Ws,{size:13}):h.jsx(Lp,{size:13})}),h.jsx("pre",{children:h.jsx("code",{children:hct(e,n,kct)})})]})}function Ect(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 l8(e,n,t){let r=n.line,s=n.column;for(let a=0;a]*?)\/?>/gi,r=[];let s=0,a=!1;for(const o of n.matchAll(t)){const l=(o[1]??"").toLowerCase(),c=Ect(o[2]??"");if(!c[l==="run"?"id":"path"])continue;a=!0,o.index>s&&r.push({type:"text",value:n.slice(s,o.index),position:Dv(e,s,o.index)});const _=o.index+o[0].length;r.push({children:[],data:{hName:l==="run"?"run-mention":"file-mention",hProperties:c},position:Dv(e,o.index,_),type:l==="run"?"runMention":"fileMention"}),s=_}return a?(sET(e)}function zct(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=Bz(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function u8({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,a=n&&Number.parseInt(n,10)||void 0,o=a!=null?`${s}:${a}`:s;return h.jsxs("button",{className:"file-chip",title:r?mI({path:Ae(e)}):e,...gr(l=>r==null?void 0:r(e,a,t,void 0,l)),disabled:!r,children:[h.jsx(XE,{size:12}),h.jsx("span",{className:"file-chip-label",children:o}),h.jsx(eN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function Act({id:e,label:n,onOpenRun:t}){return h.jsxs("button",{className:"file-chip run-chip",title:t?jI({id:Ae(e)}):iB({id:Ae(e)}),...gr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[h.jsx(Nx,{size:12}),h.jsx("span",{className:"file-chip-label",children:n||PE()}),h.jsx(eN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const NT={singleDollarTextMath:!0},Tct=Yx().use(ny).use(pT).use(mT,NT).use(Nct).use(op).use(zct).use(qA);function jct(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const zT={code:({node:e,className:n,children:t,...r})=>{const s=n??"",a=/language-(\w+)/.exec(s),o=String(t??"").replace(/\n$/,"");if(!(a!=null||o.includes(` -`)))return h.jsx("code",{className:s,...r,children:t});const c=a?g2(a[1]):null;return h.jsx(Cct,{code:o,lang:c})},pre:({children:e})=>h.jsx(h.Fragment,{children:e})},za=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:a,predict:o=!1}){Cc();const l=M.useMemo(()=>({"file-mention":c=>h.jsx(u8,{path:c.path,lines:c.lines,exp:c.exp,onOpenFile:t}),"run-mention":c=>h.jsx(Act,{id:c.id,label:c.label,onOpenRun:r}),a:({node:c,href:d,children:_,...f})=>{if(d&&jct(d)&&t){let m;try{m=decodeURI(d)}catch{return h.jsx("span",{children:_})}const g=s?s(m):m;return g?h.jsx(u8,{path:g,onOpenFile:t}):h.jsx("span",{children:_})}return h.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",...f,children:_})},th:({node:c,...d})=>h.jsx("th",{dir:"auto",...d}),td:({node:c,...d})=>h.jsx("td",{dir:"auto",...d}),img:({node:c,src:d,alt:_,className:f,...m})=>{if(!d||typeof d!="string")return null;const g=a?a(d):d;return g?h.jsx("img",{...m,src:g,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${f??""}`}):null},...zT}),[t,r,s,a]);return h.jsx("div",{dir:"auto","data-streaming":o||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:h.jsx(Vrt,{content:CT(n,{predictMath:o}),processor:Tct,components:l,predict:o})})}),d8="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function Mct({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:a,onRevise:o}){const[l,c]=M.useState(!1),d=M.useRef(null),[_,f]=M.useState(!1),[m,g]=M.useState(""),S=M.useRef(null);M.useEffect(()=>{if(!l)return;const b=v=>{d.current&&!d.current.contains(v.target)&&c(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[l]),M.useEffect(()=>{var b;_&&((b=S.current)==null||b.focus())},[_]);const k=()=>{o(m.trim()||"no specific feedback — use your judgment"),g(""),f(!1)};return h.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:[h.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[h.jsx(Nx,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),h.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?Bwe({agent:Ae(n)}):Dwe({agent:Ae(n)})}),h.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",...gr(t),children:Xwe()})]}),_?h.jsxs(h.Fragment,{children:[h.jsx("textarea",{dir:"auto",ref:S,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:f5e(),rows:2,value:m,onChange:b=>g(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),g(""),f(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),k())}}),h.jsxs("div",{className:d8,children:[h.jsx(Qe,{size:"small",onClick:()=>{g(""),f(!1)},children:Fwe()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),h.jsxs(Qe,{size:"small",variant:"primary",onClick:k,children:[s5e(),h.jsx(YE,{size:13})]})]})]}):h.jsxs("div",{className:d8,children:[h.jsx(Qe,{size:"small",onClick:a,children:e5e()}),h.jsx(Qe,{size:"small",onClick:()=>f(!0),children:l5e()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),s?h.jsxs("div",{className:"plan-strip-approve relative flex",ref:d,children:[h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:wwe()}),h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":Vwe(),onClick:()=>c(b=>!b),children:h.jsx(ta,{size:13})}),l&&h.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:h.jsx(Yr,{onClick:()=>{c(!1),r("bypassPermissions")},children:Ewe()})})]}):h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>r(),children:Twe()})]})]})}function Rct({status:e,live:n}){const t={size:15,strokeWidth:1.75,"aria-hidden":!0},[r,s]=e==="completed"?[h.jsx(Ws,{...t,strokeWidth:2.25}),"text-accent-green"]:e==="in_progress"?[h.jsx(gKe,{...t,className:n?"animate-spin":""}),"text-primary"]:e==="cancelled"?[h.jsx(kWe,{...t}),"text-muted"]:[h.jsx(zWe,{...t}),"text-muted"];return h.jsx("span",{className:`flex h-5 w-4 shrink-0 items-center justify-center ${s}`,children:r})}function AT({items:e,live:n}){return h.jsx("ol",{className:"task-items m-0 flex list-none flex-col gap-0.5 p-0",children:e.map((t,r)=>{const s=t.status==="in_progress",a=s?t.activeText??t.text:t.text;return h.jsxs("li",{className:"flex items-start gap-2 text-sm leading-5","aria-current":s?"step":void 0,children:[h.jsx(Rct,{status:t.status,live:n}),h.jsx("span",{className:`min-w-0 break-words ${t.status==="completed"?"text-subtext":t.status==="cancelled"?"text-muted line-through":s?`text-text ${n?"tool-running-shimmer":"font-medium"}`:"text-text"}`,children:a})]},r)})})}function x2(e){return{done:Vt(e.done),total:Vt(e.total)}}function Dct(e){return wN(e)?$E():HE(x2(e))}function Lct({list:e,live:n}){return h.jsxs("div",{className:"task-list-card my-3.5 flex flex-col gap-2 rounded-md border border-border bg-surface py-2.5 px-3.5",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(Sx,{size:16,strokeWidth:1.75,className:"shrink-0 text-muted","aria-hidden":"true"}),h.jsx("span",{className:"font-semibold text-text",children:xx()}),h.jsx("span",{className:"text-muted",children:Dct(e)})]}),h.jsx(AT,{items:e.items,live:n})]})}function Oct({list:e}){const[n,t]=M.useState(!1),r=e.current?e.current.activeText??e.current.text:wN(e)?$E():xx(),s=e.total>0?Math.round(e.done/e.total*100):0;return h.jsxs("div",{className:"task-strip mb-2 overflow-hidden rounded-md border border-border bg-surface",children:[h.jsxs("button",{type:"button",className:"flex w-full cursor-pointer items-center gap-2 py-2 px-3 text-start text-sm",onClick:()=>t(a=>!a),"aria-expanded":n,children:[h.jsx(Sx,{size:16,strokeWidth:1.75,className:"shrink-0 text-muted","aria-hidden":"true"}),h.jsx("span",{className:`min-w-0 flex-1 truncate text-text ${e.current?"tool-running-shimmer":""}`,title:r,children:r}),h.jsx("span",{className:"shrink-0 tabular-nums text-muted",children:cFe(x2(e))}),h.jsx("span",{className:"sr-only",children:n?hFe():xFe()}),h.jsx(ta,{size:16,className:`shrink-0 text-muted transition-transform duration-120 ease-standard ${n?"rotate-180":""}`,"aria-hidden":"true"})]}),h.jsx("div",{className:"h-0.5 w-full bg-border",role:"progressbar","aria-valuenow":e.done,"aria-valuemin":0,"aria-valuemax":e.total,"aria-label":HE(x2(e)),children:h.jsx("div",{className:"h-full bg-accent-green transition-[width] duration-200 ease-standard",style:{width:`${s}%`}})}),n&&h.jsx("div",{className:"px-3 pt-2 pb-2.5",children:h.jsx(AT,{items:e.items,live:!0})})]})}function TT(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{let s=!1;const a=aZe(o=>{s=!0,n(o)});return UYe().then(o=>!s&&n(o)).catch(o=>r(o instanceof Error?o.message:String(o))),a},[]),{status:e,error:t,apply:n}}function Ict(){const{status:e}=TT(),[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null;return!r||n===r?null:h.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[h.jsx(ld,{size:13,className:"shrink-0 text-subtext"}),h.jsx("span",{className:"min-w-0",children:jGe({version:Ae(r)})}),h.jsx(Jt,{type:"button",size:"small",className:"ms-auto","aria-label":LGe(),onClick:()=>t(r),children:h.jsx(_s,{size:13})})]})}function Bct({save:e,onSaved:n,placeholder:t,createHref:r}){const[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null);async function _(f){if(f.preventDefault(),!(o||!s.trim())){l(!0),d(null);try{n(await e(s.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return h.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[h.jsx("input",{type:"password",value:s,onChange:f=>a(f.target.value),placeholder:t,autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:o||!s.trim(),children:o?ja():kc()}),h.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:Ghe()}),c&&h.jsx("div",{className:"error",children:c})]})}function $ct({cmd:e}){const[n,t]=M.useState(!1);return h.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[h.jsx("code",{className:"font-mono text-sm",children:e}),h.jsx("button",{type:"button",className:"cmd-inline-copy 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",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?Y0():RO({value:Ae(e)}),title:n?Y0():cE(),children:n?h.jsx(Ws,{size:11,strokeWidth:3}):h.jsx(Lp,{size:11})})]})}function Th(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?h.jsx($ct,{cmd:n},t):n):null}const Hct="/assets/slurm-logo-aGSXVZcE.svg",Pct="/assets/thinking-machines-BOdslTfm.png";function Fct(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 aE();case"tinker_job":return"Tinker";default:return e||"—"}}function Uct({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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 qct({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[h.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"}),h.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)"}),h.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)"}),h.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"}),h.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"}),h.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)"}),h.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)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),h.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function Gct({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:h.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 Vct({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:h.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 Wct({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.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 Kct({size:e=16}){return h.jsx("img",{className:"tinker-logo block flex-none object-contain",src:Pct,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 Yct({size:e=16}){return h.jsx("img",{className:"block flex-none object-contain",src:Hct,width:e,height:e,alt:"","aria-hidden":"true"})}function fm({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.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 hm({kind:e,size:n=16}){switch(e){case"modal_job":return h.jsx(qct,{size:n});case"hf_job":return h.jsx(Uct,{size:n});case"k8s_job":return h.jsx(Gct,{size:n});case"ssh_job":return h.jsx(q7,{size:n,strokeWidth:1.5});case"slurm_job":return h.jsx(Yct,{size:n});case"ray_job":return h.jsx(Vct,{size:n});case"openresearch_job":return h.jsx(Wct,{size:n});case"tinker_job":return h.jsx(Kct,{size:n});case"local_job":return h.jsx(fKe,{size:n,strokeWidth:1.5});default:return h.jsx(q7,{size:n})}}function e4({backend:e}){const n=Mx(e),t=KXe(e);return n?h.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:[h.jsx(hm,{kind:n}),h.jsx("span",{className:"backend-name",children:Fct(n)}),t&&h.jsx("span",{className:"backend-detail text-sm",children:t})]}):h.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 jT({value:e,max:n,label:t,caption:r,fillColor:s}){const a=n>0?Math.min(100,Math.round(e/n*100)):0;return h.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:[h.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:h.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${a}%`,background:s}})}),(t!==void 0||r!==void 0)&&h.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[h.jsx("span",{children:t??`${a}%`}),r]})]})}function y2({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:h.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"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):h.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:h.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"})})}const MT=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),f8=["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(" "),kf={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function Xct(e){var r,s;const n=e.find(a=>a.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:J0(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Hp(n,t).defaultId}}function Ao(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=o=>{var l;(l=r.current)!=null&&l.contains(o.target)||t(!1)},a=o=>{var l;o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),t(!1),(l=e==null?void 0:e.current)==null||l.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",a,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function Zct({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:l,onHarnesses:c,lockHarness:d=!1,className:_}){var he,ie,q,te,le,ge;const[f,m]=M.useState([]),g=M.useRef(null),S=M.useRef(null),{open:k,setOpen:b,ref:v}=Ao(g),[x,y]=M.useState(""),[C,A]=M.useState("root"),E=()=>{b(!1),A("root"),y("")};M.useEffect(()=>{var ue;k&&(C==="reasoning"||C==="speed"||C==="permissions")&&((ue=S.current)==null||ue.focus())},[k,C]),M.useEffect(()=>{let ue=!0;const Ce=(Le=!1)=>ep(Le).then(Pe=>{ue&&(m(Pe),c==null||c(Pe))}).catch(()=>{});Ce();const Ee=Dx(()=>void Ce(!0));return()=>{ue=!1,Ee()}},[]);const j=M.useMemo(()=>{const ue=x.trim().toLowerCase();return(d&&e?f.filter(Ee=>Ee.id===e.harness):f).map(Ee=>{let Le=Ee.models;return ue?Le=Le.filter(Pe=>Pe.id.toLowerCase().includes(ue)):Ee.id==="opencode"&&(Le=Le.slice(0,6)),{harness:Ee,models:Le,hidden:ue?0:Ee.models.length-Le.length}})},[f,x,d,e]),T=(ue,Ce)=>{var Le;const Ee=(e==null?void 0:e.harness)===ue.id;n({harness:ue.id,model:Ce,serviceTier:J0(ue,Ce,Ee?e==null?void 0:e.serviceTier:null),permissionMode:Ee?e.permissionMode:((Le=ue.options)==null?void 0:Le.defaultPermissionMode)??null,reasoningLevel:mN(ue,Ce,Ee?e.reasoningLevel:null)}),E()},D=(e==null?void 0:e.model)!=null?(he=f.find(ue=>ue.id===e.harness))==null?void 0:he.models.find(ue=>ue.id===e.model):void 0,I=e?e.model?D?Z0(D):gN(e.model):d7():V1(),P=(e==null?void 0:e.reasoningLevel)??o??((ie=a[0])==null?void 0:ie.id),H=(q=a.find(ue=>ue.id===P))==null?void 0:q.label,F=(e==null?void 0:e.permissionMode)??r??((te=t[0])==null?void 0:te.id),V=(le=t.find(ue=>ue.id===F))==null?void 0:le.label,X=(e==null?void 0:e.harness)==="opencode"?Hpe():epe(),W=f.find(ue=>ue.id===(e==null?void 0:e.harness)),Z=pN(W,e==null?void 0:e.model),J=J0(W,e==null?void 0:e.model,e==null?void 0:e.serviceTier),B=(ge=Z.find(ue=>ue.id===J))==null?void 0:ge.label,L=ue=>{l==null||l(ue),E()},$=ue=>{s==null||s(ue),E()},K=ue=>{e&&n({...e,serviceTier:ue}),E()},G=(ue,Ce,Ee)=>h.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:()=>A(Ee),children:[h.jsx("span",{className:"flex-1",children:ue}),Ce&&h.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:Ce}),h.jsx(Ma,{size:14,className:"shrink-0 text-muted"})]}),re=ue=>h.jsxs("button",{ref:S,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{A("root"),y("")},children:[h.jsx(GE,{size:15}),ue]}),oe=(ue,Ce,Ee,Le)=>h.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ue.map(Pe=>h.jsxs(Yr,{onClick:()=>Le(Pe.id),children:[h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[Pe.label,Pe.id===Ee&&h.jsxs("span",{className:"font-normal text-muted",children:[" ",fE()]})]}),Pe.description&&h.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Pe.description})]}),Pe.id===Ce&&h.jsx(Ws,{size:13})]},Pe.id))});return h.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:v,children:[h.jsxs("button",{ref:g,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",_),title:gO({label:`${I}${H?` · ${H}`:""}${B?` · ${B}`:""}`}),"aria-haspopup":"menu","aria-expanded":k,onClick:()=>{k?E():(A("root"),b(!0))},children:[J==="priority"?h.jsx(oYe,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?h.jsx(y2,{harness:e.harness,size:14}):null,J==="priority"&&h.jsxs("span",{className:"sr-only",children:[spe()," "]}),h.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[I,H&&h.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:H})]}),h.jsx(ta,{size:14,className:"shrink-0 text-muted"})]}),k&&h.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:[C==="root"&&h.jsxs("div",{className:"model-root-menu p-1",children:[G(V1(),I,"models"),a.length>0&&G(X,H,"reasoning"),Z.length>0&&G(h7(),B,"speed"),t.length>0&&G(f7(),V,"permissions")]}),C==="models"&&h.jsxs(h.Fragment,{children:[re(V1()),h.jsx("input",{autoFocus:!0,type:"text",placeholder:wpe(),value:x,onChange:ue=>y(ue.target.value)}),h.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[j.map(({harness:ue,models:Ce,hidden:Ee})=>h.jsxs("div",{className:"[&_.model-item]:ps-6",children:[h.jsxs("div",{className:MT,children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(y2,{harness:ue.id,size:14}),ue.name]}),!ue.agentReady&&h.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[h.jsx(U7,{size:10})," ",hE()]})]}),ue.agentReady?h.jsxs(h.Fragment,{children:[ue.models.length===0&&h.jsxs(Yr,{onClick:()=>T(ue,null),children:[h.jsxs("span",{children:[d7(),h.jsx("span",{className:"model-id",children:dE()})]}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===null&&h.jsx(Ws,{size:13})]}),Ce.map(Le=>h.jsxs(Yr,{title:Le.id,onClick:()=>T(ue,Le.id),children:[h.jsx("span",{children:Z0(Le)}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===Le.id&&h.jsx(Ws,{size:13})]},Le.id)),Ee>0&&h.jsx("div",{className:f8,children:_pe({count:Vt(Ee)})}),x.trim().length>0&&!ue.models.some(Le=>Le.id===x.trim())&&h.jsx(Yr,{onClick:()=>T(ue,x.trim()),children:h.jsx("span",{children:Ope({id:Ae(x.trim())})})})]}):h.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:ue.agentNote?Th(ue.agentNote):vpe()})]},ue.id)),f.length===0&&h.jsx("div",{className:f8,children:X0e()})]}),d&&e&&f.length>1&&h.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[h.jsx(U7,{size:11}),Epe()]})]}),C==="reasoning"&&h.jsxs(h.Fragment,{children:[re(X),oe(a,P,o,L)]}),C==="permissions"&&h.jsxs(h.Fragment,{children:[re(f7()),oe(t,F,r,$)]}),C==="speed"&&h.jsxs(h.Fragment,{children:[re(h7()),oe(Z,J??void 0,"default",K)]})]})]})}function Yf({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:a=!1,disabled:o=!1,variant:l="pill",title:c,numbered:d=!1,renderIcon:_,onSelect:f,className:m}){var j,T;const{open:g,setOpen:S,ref:k}=Ao();if(e.length===0)return null;const b=n??t??((j=e[0])==null?void 0:j.id)??null,v=e.find(D=>D.id===b),x=e.find(D=>D.id===t),y=l==="bare"&&(x==null?void 0:x.id)===Q0?x:void 0,C=y?e.filter(D=>D.id!==y.id):e,A=(v==null?void 0:v.label)??((T=e[0])==null?void 0:T.label)??"",E=D=>{f(D),S(!1)};return h.jsxs("div",{className:`option-picker relative inline-flex${l==="field"?" w-full":""}`,ref:k,children:[h.jsxs("button",{type:"button",className:ss(l==="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 ${l==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,m),title:c,"aria-haspopup":"menu","aria-expanded":g,disabled:o,onClick:()=>S(D=>!D),children:[h.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),h.jsx("span",{className:"truncate",children:A})]}),h.jsx(ta,{size:12})]}),g&&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 ${e.some(D=>D.description)?"min-w-80":""} ${l==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${a?"drop-down":""}`,children:[r&&h.jsx("div",{className:MT,children:r}),y&&h.jsxs(h.Fragment,{children:[h.jsxs(Yr,{type:"button",onClick:()=>E(y.id),children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(y),h.jsxs("span",{children:[y.label,h.jsx("span",{className:"option-default text-muted font-normal",children:dE()})]})]}),b===y.id&&h.jsx(Ws,{size:13})]}),h.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((D,I)=>h.jsxs(Yr,{type:"button",onClick:()=>E(D.id),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(D),h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[D.label,!y&&D.id===t&&h.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",fE()]})]}),D.description&&h.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:D.description})]})]}),b===D.id?h.jsx(Ws,{size:13}):d&&h.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:I+1})]},D.id))]})]})}const h8={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 Qct(e){return h8[e]??h8.idle}const Jct={done:wHe,failed:THe,running:BHe,starting:FHe,cancelling:vHe,cancelled:_He,editing:EHe,idle:DHe};function RT(e){const n=Jct[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function xo({status:e,label:n,className:t}){const r=Qct(e);return h.jsx(Bx,{tone:r.tone,live:r.live,className:t,children:n??RT(e)})}var Lv={exports:{}},_8;function eut(){return _8||(_8=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 a=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(a._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,a=s._renderService.dimensions;if(a.css.cell.width===0||a.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,l=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(l.getPropertyValue("height")),d=Math.max(0,parseInt(l.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),f=c-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),m=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(m/a.css.cell.width)),rows:Math.max(1,Math.floor(f/a.css.cell.height))}}}})(),t})()))})(Lv)),Lv.exports}var tut=eut(),Ov={exports:{}},p8;function nut(){return p8||(p8=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(o,l)=>{function c(_){try{const f=new URL(_),m=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 _.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(l,"__esModule",{value:!0}),l.LinkComputer=l.WebLinkProvider=void 0,l.WebLinkProvider=class{constructor(_,f,m,g={}){this._terminal=_,this._regex=f,this._handler=m,this._options=g}provideLinks(_,f){const m=d.computeLink(_,this._regex,this._terminal,this._handler);f(this._addCallbacks(m))}_addCallbacks(_){return _.map((f=>(f.leave=this._options.leave,f.hover=(m,g)=>{if(this._options.hover){const{range:S}=f;this._options.hover(m,g,S)}},f)))}};class d{static computeLink(f,m,g,S){const k=new RegExp(m.source,(m.flags||"")+"g"),[b,v]=d._getWindowedLineStrings(f-1,g),x=b.join("");let y;const C=[];for(;y=k.exec(x);){const A=y[0];if(!c(A))continue;const[E,j]=d._mapStrIdx(g,v,0,y.index),[T,D]=d._mapStrIdx(g,E,j,A.length);if(E===-1||j===-1||T===-1||D===-1)continue;const I={start:{x:j+1,y:E+1},end:{x:D,y:T+1}};C.push({range:I,text:A,activate:S})}return C}static _getWindowedLineStrings(f,m){let g,S=f,k=f,b=0,v="";const x=[];if(g=m.buffer.active.getLine(f)){const y=g.translateToString(!0);if(g.isWrapped&&y[0]!==" "){for(b=0;(g=m.buffer.active.getLine(--S))&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),g.isWrapped&&v.indexOf(" ")===-1););x.reverse()}for(x.push(y),b=0;(g=m.buffer.active.getLine(++k))&&g.isWrapped&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),v.indexOf(" ")===-1););}return[x,S]}static _mapStrIdx(f,m,g,S){const k=f.buffer.active,b=k.getNullCell();let v=g;for(;S;){const x=k.getLine(m);if(!x)return[-1,-1];for(let y=v;y{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.WebLinksAddon=void 0;const l=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(_,f){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}o.WebLinksAddon=class{constructor(_=d,f={}){this._handler=_,this._options=f}activate(_){this._terminal=_;const f=this._options,m=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new l.WebLinkProvider(this._terminal,m,this._handler,f))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),a})()))})(Ov)),Ov.exports}var rut=nut(),Iv={exports:{}},m8;function sut(){return m8||(m8=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=c(9042),m=c(9924),g=c(844),S=c(4725),k=c(2585),b=c(3656);let v=l.AccessibilityManager=class extends g.Disposable{constructor(x,y,C,A){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=A,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 E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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 m.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((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` +`,d+3),m=f===-1?e.length:f;/^[ \t]*$/.test(e.slice(_,d))&&/^[ \t\r]*$/.test(e.slice(d+3,m))&&o.push(d)}for(let d=0;d+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}`)),Fct(t,n)}function DT(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 Gct(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function gr(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=Gct(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const Vct=1e5;function Wct({code:e,lang:n}){const[t,r]=M.useState(!1),s=()=>{var a;(a=navigator.clipboard)==null||a.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)})};return h.jsxs("div",{className:"md-code relative my-2.5 mx-0 [&_pre]:m-0 [&:hover_.md-code-copy]:opacity-100",children:[h.jsx(Jt,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:pE(),"aria-label":F0e(),onClick:s,children:t?h.jsx(Ys,{size:13}):h.jsx(Hp,{size:13})}),h.jsx("pre",{children:h.jsx("code",{children:Lct(e,n,Vct)})})]})}function Kct(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 _8(e,n,t){let r=n.line,s=n.column;for(let a=0;a]*?)\/?>/gi,r=[];let s=0,a=!1;for(const o of n.matchAll(t)){const l=(o[1]??"").toLowerCase(),c=Kct(o[2]??"");if(!c[l==="run"?"id":"path"])continue;a=!0,o.index>s&&r.push({type:"text",value:n.slice(s,o.index),position:Bv(e,s,o.index)});const _=o.index+o[0].length;r.push({children:[],data:{hName:l==="run"?"run-mention":"file-mention",hProperties:c},position:Bv(e,o.index,_),type:l==="run"?"runMention":"fileMention"}),s=_}return a?(sLT(e)}function Xct(){return e=>{const n=t=>{var r;for(const s of["href","src"])t.properties&&Object.hasOwn(t.properties,s)&&(t.properties[s]=Wz(String(t.properties[s]||"")));(r=t.children)==null||r.forEach(n)};n(e)}}function m8({path:e,lines:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,a=n&&Number.parseInt(n,10)||void 0,o=a!=null?`${s}:${a}`:s;return h.jsxs("button",{className:"file-chip",title:r?zI({path:Te(e)}):e,...gr(l=>r==null?void 0:r(e,a,t,void 0,l)),disabled:!r,children:[h.jsx(nN,{size:12}),h.jsx("span",{className:"file-chip-label",children:o}),h.jsx(aN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function Zct({id:e,label:n,onOpenRun:t}){return h.jsxs("button",{className:"file-chip run-chip",title:t?UI({id:Te(e)}):gB({id:Te(e)}),...gr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[h.jsx(jx,{size:12}),h.jsx("span",{className:"file-chip-label",children:n||WE()}),h.jsx(aN,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const OT={singleDollarTextMath:!0},Qct=ey().use(oy).use(kT).use(CT,OT).use(Yct).use(fp).use(Xct).use(JA);function Jct(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const IT={code:({node:e,className:n,children:t,...r})=>{const s=n??"",a=/language-(\w+)/.exec(s),o=String(t??"").replace(/\n$/,"");if(!(a!=null||o.includes(` +`)))return h.jsx("code",{className:s,...r,children:t});const c=a?w2(a[1]):null;return h.jsx(Wct,{code:o,lang:c})},pre:({children:e})=>h.jsx(h.Fragment,{children:e})},Na=M.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:a,predict:o=!1}){Ec();const l=M.useMemo(()=>({"file-mention":c=>h.jsx(m8,{path:c.path,lines:c.lines,exp:c.exp,onOpenFile:t}),"run-mention":c=>h.jsx(Zct,{id:c.id,label:c.label,onOpenRun:r}),a:({node:c,href:d,children:_,...f})=>{if(d&&Jct(d)&&t){let m;try{m=decodeURI(d)}catch{return h.jsx("span",{children:_})}const g=s?s(m):m;return g?h.jsx(m8,{path:g,onOpenFile:t}):h.jsx("span",{children:_})}return h.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",...f,children:_})},th:({node:c,...d})=>h.jsx("th",{dir:"auto",...d}),td:({node:c,...d})=>h.jsx("td",{dir:"auto",...d}),img:({node:c,src:d,alt:_,className:f,...m})=>{if(!d||typeof d!="string")return null;const g=a?a(d):d;return g?h.jsx("img",{...m,src:g,alt:_??"",loading:"lazy",className:`block max-w-full h-auto my-3 rounded-sm border border-border ${f??""}`}):null},...IT}),[t,r,s,a]);return h.jsx("div",{dir:"auto","data-streaming":o||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:h.jsx(_st,{content:DT(n,{predictMath:o}),processor:Qct,components:l,predict:o})})}),g8="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function eut({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:a,onRevise:o}){const[l,c]=M.useState(!1),d=M.useRef(null),[_,f]=M.useState(!1),[m,g]=M.useState(""),S=M.useRef(null);M.useEffect(()=>{if(!l)return;const b=v=>{d.current&&!d.current.contains(v.target)&&c(!1)};return window.addEventListener("pointerdown",b),()=>window.removeEventListener("pointerdown",b)},[l]),M.useEffect(()=>{var b;_&&((b=S.current)==null||b.focus())},[_]);const k=()=>{o(m.trim()||"no specific feedback — use your judgment"),g(""),f(!1)};return h.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:[h.jsxs("div",{className:"plan-strip-info flex items-baseline gap-2 min-w-0",children:[h.jsx(jx,{size:14,className:"plan-strip-icon text-accent-blue shrink-0 self-center"}),h.jsx("span",{dir:"auto",className:"plan-strip-title text-sm font-semibold whitespace-nowrap",children:e?Xwe({agent:Te(n)}):Vwe({agent:Te(n)})}),h.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",...gr(t),children:l5e()})]}),_?h.jsxs(h.Fragment,{children:[h.jsx("textarea",{dir:"auto",ref:S,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:k5e(),rows:2,value:m,onChange:b=>g(b.target.value),onKeyDown:b=>{b.key==="Escape"?(b.preventDefault(),g(""),f(!1)):b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),k())}}),h.jsxs("div",{className:g8,children:[h.jsx(Qe,{size:"small",onClick:()=>{g(""),f(!1)},children:e5e()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),h.jsxs(Qe,{size:"small",variant:"primary",onClick:k,children:[m5e(),h.jsx(tN,{size:13})]})]})]}):h.jsxs("div",{className:g8,children:[h.jsx(Qe,{size:"small",onClick:a,children:f5e()}),h.jsx(Qe,{size:"small",onClick:()=>f(!0),children:x5e()}),h.jsx("span",{className:"plan-strip-spacer flex-1"}),s?h.jsxs("div",{className:"plan-strip-approve relative flex",ref:d,children:[h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:Dwe()}),h.jsx(Qe,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":s5e(),onClick:()=>c(b=>!b),children:h.jsx(ta,{size:13})}),l&&h.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:h.jsx(Zr,{onClick:()=>{c(!1),r("bypassPermissions")},children:Bwe()})})]}):h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>r(),children:Fwe()})]})]})}function BT({status:e,live:n}){const t={size:15,strokeWidth:1.75,"aria-hidden":!0},[r,s]=e==="completed"?[h.jsx(Ys,{...t,strokeWidth:2.25}),"text-accent-green"]:e==="in_progress"?[h.jsx(RKe,{...t,className:n?"animate-spin":""}),"text-primary"]:e==="cancelled"?[h.jsx(HWe,{...t}),"text-muted"]:[h.jsx(qWe,{...t}),"text-muted"];return h.jsx("span",{className:`flex h-5 w-4 shrink-0 items-center justify-center ${s}`,children:r})}function $T({items:e,live:n}){return h.jsx("ol",{className:"task-items m-0 flex list-none flex-col gap-0.5 p-0",children:e.map((t,r)=>{const s=t.status==="in_progress",a=s?t.activeText??t.text:t.text;return h.jsxs("li",{className:"flex items-start gap-2 text-sm leading-5","aria-current":s?"step":void 0,children:[h.jsx(BT,{status:t.status,live:n}),h.jsx("span",{className:`min-w-0 break-words ${t.status==="completed"?"text-subtext":t.status==="cancelled"?"text-muted line-through":s?`text-text ${n?"tool-running-shimmer":"font-medium"}`:"text-text"}`,children:a})]},r)})})}function C2(e){return{done:Ft(e.done),total:Ft(e.total)}}function tut(e){return TN(e)?GE():VE(C2(e))}function nut({list:e,live:n}){return h.jsxs("div",{className:"task-list-card my-3.5 flex flex-col gap-2 rounded-md border border-border bg-surface py-2.5 px-3.5",children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(Nx,{size:16,strokeWidth:1.75,className:"shrink-0 text-muted","aria-hidden":"true"}),h.jsx("span",{className:"font-semibold text-text",children:kx()}),h.jsx("span",{className:"text-muted",children:tut(e)})]}),h.jsx($T,{items:e.items,live:n})]})}function HT({marker:e,headline:n,shimmer:t,count:r,bar:s,children:a}){const[o,l]=M.useState(!1);return h.jsxs("div",{className:`${e} mb-2 overflow-hidden rounded-md border border-border bg-surface`,children:[h.jsxs("button",{type:"button",className:"flex w-full cursor-pointer items-center gap-2 py-2 px-3 text-start text-sm",onClick:()=>l(c=>!c),"aria-expanded":o,children:[h.jsx(Nx,{size:16,strokeWidth:1.75,className:"shrink-0 text-muted","aria-hidden":"true"}),h.jsx("span",{className:`min-w-0 flex-1 truncate text-text ${t?"tool-running-shimmer":""}`,title:n,children:n}),h.jsx("span",{className:"shrink-0 tabular-nums text-muted",children:r}),h.jsx("span",{className:"sr-only",children:o?AFe():OFe()}),h.jsx(ta,{size:16,className:`shrink-0 text-muted transition-transform duration-120 ease-standard ${o?"rotate-180":""}`,"aria-hidden":"true"})]}),s,o&&h.jsx("div",{className:"px-3 pt-2 pb-2.5",children:a})]})}function rut({list:e}){const n=e.current?e.current.activeText??e.current.text:TN(e)?GE():kx(),t=e.total>0?Math.round(e.done/e.total*100):0;return h.jsx(HT,{marker:"task-strip",headline:n,shimmer:e.current!==null,count:CFe(C2(e)),bar:h.jsx("div",{className:"h-0.5 w-full bg-border",role:"progressbar","aria-valuenow":e.done,"aria-valuemin":0,"aria-valuemax":e.total,"aria-label":VE(C2(e)),children:h.jsx("div",{className:"h-full bg-accent-green transition-[width] duration-200 ease-standard",style:{width:`${t}%`}})}),children:h.jsx($T,{items:e.items,live:!0})})}function sut({steps:e,describe:n}){const t=e.at(-1);return t?h.jsx(HT,{marker:"progress-strip",headline:t.label||n(t)||Bf(),shimmer:!0,count:z5e({count:Ft(e.length)}),children:h.jsx("ol",{className:"m-0 flex list-none flex-col gap-1 p-0",children:e.map(r=>{const s=n(r);return h.jsxs("li",{className:"flex items-start gap-2 text-sm leading-5","aria-current":r.done?void 0:"step",children:[h.jsx(BT,{status:r.done?"completed":"in_progress",live:!0}),h.jsxs("span",{className:"min-w-0 break-words",children:[h.jsx("span",{className:r.done?"text-subtext":"text-text",children:r.label||s||Bf()}),r.label&&s&&h.jsxs("span",{className:"text-muted",children:[" · ",s]})]})]},r.id)})})}):null}function PT(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{let s=!1;const a=CZe(o=>{s=!0,n(o)});return iXe().then(o=>!s&&n(o)).catch(o=>r(o instanceof Error?o.message:String(o))),a},[]),{status:e,error:t,apply:n}}function iut(){const{status:e}=PT(),[n,t]=M.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null;return!r||n===r?null:h.jsxs("div",{className:"update-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-surface border-b border-b-border",role:"status",children:[h.jsx(ud,{size:13,className:"shrink-0 text-subtext"}),h.jsx("span",{className:"min-w-0",children:WGe({version:Te(r)})}),h.jsx(Jt,{type:"button",size:"small",className:"ms-auto","aria-label":ZGe(),onClick:()=>t(r),children:h.jsx(_s,{size:13})})]})}function aut({save:e,onSaved:n,placeholder:t,createHref:r}){const[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null);async function _(f){if(f.preventDefault(),!(o||!s.trim())){l(!0),d(null);try{n(await e(s.trim())),a("")}catch(m){d(m instanceof Error?m.message:String(m))}finally{l(!1)}}}return h.jsxs("form",{className:"onb-token-form flex items-center flex-wrap gap-2 mt-2 [&_input]:flex-1 [&_input]:min-w-55 [&_input]:text-sm [&_a]:text-sm [&_a]:text-subtext [&_a]:whitespace-nowrap [&_.error]:basis-full [&_.error]:text-accent-red [&_.error]:text-sm [&_.error]:whitespace-pre-wrap",onSubmit:_,children:[h.jsx("input",{type:"password",value:s,onChange:f=>a(f.target.value),placeholder:t,autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:o||!s.trim(),children:o?Ta():Cc()}),h.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:r_e()}),c&&h.jsx("div",{className:"error",children:c})]})}function out({cmd:e}){const[n,t]=M.useState(!1);return h.jsxs("span",{className:"cmd-inline inline-flex items-center gap-1 align-baseline",children:[h.jsx("code",{className:"font-mono text-sm",children:e}),h.jsx("button",{type:"button",className:"cmd-inline-copy 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",onClick:()=>{navigator.clipboard.writeText(e).then(()=>{t(!0),setTimeout(()=>t(!1),1500)}).catch(()=>{})},"aria-label":n?tp():GO({value:Te(e)}),title:n?tp():pE(),children:n?h.jsx(Ys,{size:11,strokeWidth:3}):h.jsx(Hp,{size:11})})]})}function Mh(e){return e?e.split(/`([^`]+)`/).map((n,t)=>t%2===1?h.jsx(out,{cmd:n},t):n):null}const lut="/assets/slurm-logo-aGSXVZcE.svg",cut="/assets/thinking-machines-BOdslTfm.png";function uut(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 fE();case"tinker_job":return"Tinker";default:return e||"—"}}function dut({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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"}),h.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 fut({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 300 300",fill:"none","aria-hidden":"true",children:[h.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"}),h.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)"}),h.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)"}),h.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"}),h.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"}),h.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)"}),h.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)"}),h.jsxs("defs",{children:[h.jsxs("linearGradient",{id:"orxModalA",x1:"127.348",y1:"137",x2:"82.9561",y2:"59.6398",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalB",x1:"7.04774",y1:"214.131",x2:"81.1284",y2:"85.0556",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]}),h.jsxs("linearGradient",{id:"orxModalC",x1:"278.103",y1:"188.561",x2:"204.022",y2:"59.4863",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#BFF9B4"}),h.jsx("stop",{offset:"1",stopColor:"#80EE64"})]}),h.jsxs("linearGradient",{id:"orxModalD",x1:"232.804",y1:"214.569",x2:"158.724",y2:"85.4864",gradientUnits:"userSpaceOnUse",children:[h.jsx("stop",{stopColor:"#80EE64"}),h.jsx("stop",{offset:"0.18",stopColor:"#7BEB63"}),h.jsx("stop",{offset:"0.36",stopColor:"#6FE562"}),h.jsx("stop",{offset:"0.55",stopColor:"#5ADA60"}),h.jsx("stop",{offset:"0.74",stopColor:"#3DCA5D"}),h.jsx("stop",{offset:"0.93",stopColor:"#18B759"}),h.jsx("stop",{offset:"1",stopColor:"#09AF58"})]})]})]})}function hut({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#326CE5","aria-hidden":"true",children:h.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 _ut({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"#028CF0","aria-hidden":"true",children:h.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 put({size:e=16}){return h.jsxs("svg",{width:e,height:e,viewBox:"0 0 100 100","aria-hidden":"true",children:[h.jsx("rect",{width:"100",height:"100",rx:"8",fill:"#9a2036"}),h.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 mut({size:e=16}){return h.jsx("img",{className:"tinker-logo block flex-none object-contain",src:cut,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 gut({size:e=16}){return h.jsx("img",{className:"block flex-none object-contain",src:lut,width:e,height:e,alt:"","aria-hidden":"true"})}function gm({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.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 vm({kind:e,size:n=16}){switch(e){case"modal_job":return h.jsx(fut,{size:n});case"hf_job":return h.jsx(dut,{size:n});case"k8s_job":return h.jsx(hut,{size:n});case"ssh_job":return h.jsx(Y7,{size:n,strokeWidth:1.5});case"slurm_job":return h.jsx(gut,{size:n});case"ray_job":return h.jsx(_ut,{size:n});case"openresearch_job":return h.jsx(put,{size:n});case"tinker_job":return h.jsx(mut,{size:n});case"local_job":return h.jsx(zKe,{size:n,strokeWidth:1.5});default:return h.jsx(Y7,{size:n})}}function i4({backend:e}){const n=Ox(e),t=uZe(e);return n?h.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:[h.jsx(vm,{kind:n}),h.jsx("span",{className:"backend-name",children:uut(n)}),t&&h.jsx("span",{className:"backend-detail text-sm",children:t})]}):h.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 FT({value:e,max:n,label:t,caption:r,fillColor:s}){const a=n>0?Math.min(100,Math.round(e/n*100)):0;return h.jsxs("div",{className:"progress mt-3 mx-0 mb-1",role:"progressbar","aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:[h.jsx("div",{className:"progress-track h-2 rounded-full bg-surface border border-border overflow-hidden",children:h.jsx("div",{className:"progress-fill h-full bg-accent rounded-full transition-[width] duration-200 ease-standard",style:{width:`${a}%`,background:s}})}),(t!==void 0||r!==void 0)&&h.jsxs("div",{className:"progress-caption flex justify-between mt-1.5 text-sm text-muted",children:[h.jsx("span",{children:t??`${a}%`}),r]})]})}function E2({harness:e,size:n=16}){const t="block shrink-0";return e==="claude-code"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"#d97757","aria-hidden":"true",children:h.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"?h.jsx("svg",{className:t,width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:h.jsx("path",{d:"M22 24H2V0h20zM17 4.8H7v14.4h10z"})}):h.jsx("svg",{className:t,width:n,height:n,viewBox:"146 227 268 265",fill:"currentColor","aria-hidden":"true",children:h.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"})})}const UT=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),v8=["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(" "),kf={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode"};function vut(e){var r,s;const n=e.find(a=>a.agentReady);if(!n)return null;const t=((r=n.models[0])==null?void 0:r.id)??null;return{harness:n.id,model:t,serviceTier:ip(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Gp(n,t).defaultId}}function zo(e){const[n,t]=M.useState(!1),r=M.useRef(null);return M.useEffect(()=>{if(!n)return;const s=o=>{var l;(l=r.current)!=null&&l.contains(o.target)||t(!1)},a=o=>{var l;o.key==="Escape"&&(o.preventDefault(),o.stopPropagation(),t(!1),(l=e==null?void 0:e.current)==null||l.focus())};return document.addEventListener("mousedown",s,!0),document.addEventListener("keydown",a,!0),()=>{document.removeEventListener("mousedown",s,!0),document.removeEventListener("keydown",a,!0)}},[n,e]),{open:n,setOpen:t,ref:r}}function but({value:e,onSelect:n,permissionChoices:t=[],defaultPermissionId:r,onSelectPermission:s,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:l,onHarnesses:c,lockHarness:d=!1,className:_}){var he,ie,q,ne,le,ge;const[f,m]=M.useState([]),g=M.useRef(null),S=M.useRef(null),{open:k,setOpen:b,ref:v}=zo(g),[x,y]=M.useState(""),[C,A]=M.useState("root"),E=()=>{b(!1),A("root"),y("")};M.useEffect(()=>{var ue;k&&(C==="reasoning"||C==="speed"||C==="permissions")&&((ue=S.current)==null||ue.focus())},[k,C]),M.useEffect(()=>{let ue=!0;const Ce=(Le=!1)=>ap(Le).then(Pe=>{ue&&(m(Pe),c==null||c(Pe))}).catch(()=>{});Ce();const Ee=$x(()=>void Ce(!0));return()=>{ue=!1,Ee()}},[]);const j=M.useMemo(()=>{const ue=x.trim().toLowerCase();return(d&&e?f.filter(Ee=>Ee.id===e.harness):f).map(Ee=>{let Le=Ee.models;return ue?Le=Le.filter(Pe=>Pe.id.toLowerCase().includes(ue)):Ee.id==="opencode"&&(Le=Le.slice(0,6)),{harness:Ee,models:Le,hidden:ue?0:Ee.models.length-Le.length}})},[f,x,d,e]),T=(ue,Ce)=>{var Le;const Ee=(e==null?void 0:e.harness)===ue.id;n({harness:ue.id,model:Ce,serviceTier:ip(ue,Ce,Ee?e==null?void 0:e.serviceTier:null),permissionMode:Ee?e.permissionMode:((Le=ue.options)==null?void 0:Le.defaultPermissionMode)??null,reasoningLevel:wN(ue,Ce,Ee?e.reasoningLevel:null)}),E()},D=(e==null?void 0:e.model)!=null?(he=f.find(ue=>ue.id===e.harness))==null?void 0:he.models.find(ue=>ue.id===e.model):void 0,I=e?e.model?D?rp(D):SN(e.model):m7():X1(),P=(e==null?void 0:e.reasoningLevel)??o??((ie=a[0])==null?void 0:ie.id),B=(q=a.find(ue=>ue.id===P))==null?void 0:q.label,F=(e==null?void 0:e.permissionMode)??r??((ne=t[0])==null?void 0:ne.id),V=(le=t.find(ue=>ue.id===F))==null?void 0:le.label,X=(e==null?void 0:e.harness)==="opencode"?Qpe():fpe(),W=f.find(ue=>ue.id===(e==null?void 0:e.harness)),Z=yN(W,e==null?void 0:e.model),J=ip(W,e==null?void 0:e.model,e==null?void 0:e.serviceTier),$=(ge=Z.find(ue=>ue.id===J))==null?void 0:ge.label,L=ue=>{l==null||l(ue),E()},H=ue=>{s==null||s(ue),E()},Y=ue=>{e&&n({...e,serviceTier:ue}),E()},G=(ue,Ce,Ee)=>h.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:()=>A(Ee),children:[h.jsx("span",{className:"flex-1",children:ue}),Ce&&h.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:Ce}),h.jsx(ja,{size:14,className:"shrink-0 text-muted"})]}),ee=ue=>h.jsxs("button",{ref:S,type:"button",className:"model-submenu-header flex w-full items-center gap-2 border-0 border-b border-solid border-b-border-variant bg-transparent px-2 py-2 text-start text-sm font-medium text-text hover:bg-surface",onClick:()=>{A("root"),y("")},children:[h.jsx(ZE,{size:15}),ue]}),oe=(ue,Ce,Ee,Le)=>h.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:ue.map(Pe=>h.jsxs(Zr,{onClick:()=>Le(Pe.id),children:[h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[Pe.label,Pe.id===Ee&&h.jsxs("span",{className:"font-normal text-muted",children:[" ",vE()]})]}),Pe.description&&h.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Pe.description})]}),Pe.id===Ce&&h.jsx(Ys,{size:13})]},Pe.id))});return h.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:v,children:[h.jsxs("button",{ref:g,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",_),title:AO({label:`${I}${B?` · ${B}`:""}${$?` · ${$}`:""}`}),"aria-haspopup":"menu","aria-expanded":k,onClick:()=>{k?E():(A("root"),b(!0))},children:[J==="priority"?h.jsx(SYe,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?h.jsx(E2,{harness:e.harness,size:14}):null,J==="priority"&&h.jsxs("span",{className:"sr-only",children:[mpe()," "]}),h.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[I,B&&h.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:B})]}),h.jsx(ta,{size:14,className:"shrink-0 text-muted"})]}),k&&h.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:[C==="root"&&h.jsxs("div",{className:"model-root-menu p-1",children:[G(X1(),I,"models"),a.length>0&&G(X,B,"reasoning"),Z.length>0&&G(v7(),$,"speed"),t.length>0&&G(g7(),V,"permissions")]}),C==="models"&&h.jsxs(h.Fragment,{children:[ee(X1()),h.jsx("input",{autoFocus:!0,type:"text",placeholder:Dpe(),value:x,onChange:ue=>y(ue.target.value)}),h.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[j.map(({harness:ue,models:Ce,hidden:Ee})=>h.jsxs("div",{className:"[&_.model-item]:ps-6",children:[h.jsxs("div",{className:UT,children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[h.jsx(E2,{harness:ue.id,size:14}),ue.name]}),!ue.agentReady&&h.jsxs("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:[h.jsx(K7,{size:10})," ",bE()]})]}),ue.agentReady?h.jsxs(h.Fragment,{children:[ue.models.length===0&&h.jsxs(Zr,{onClick:()=>T(ue,null),children:[h.jsxs("span",{children:[m7(),h.jsx("span",{className:"model-id",children:gE()})]}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===null&&h.jsx(Ys,{size:13})]}),Ce.map(Le=>h.jsxs(Zr,{title:Le.id,onClick:()=>T(ue,Le.id),children:[h.jsx("span",{children:rp(Le)}),(e==null?void 0:e.harness)===ue.id&&(e==null?void 0:e.model)===Le.id&&h.jsx(Ys,{size:13})]},Le.id)),Ee>0&&h.jsx("div",{className:v8,children:Epe({count:Ft(Ee)})}),x.trim().length>0&&!ue.models.some(Le=>Le.id===x.trim())&&h.jsx(Zr,{onClick:()=>T(ue,x.trim()),children:h.jsx("span",{children:Kpe({id:Te(x.trim())})})})]}):h.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:ue.agentNote?Mh(ue.agentNote):Tpe()})]},ue.id)),f.length===0&&h.jsx("div",{className:v8,children:lpe()})]}),d&&e&&f.length>1&&h.jsxs("div",{className:"model-locked-note flex items-center gap-1.5 py-[7px] px-3 text-sm text-muted border-t border-t-border-variant [&_svg]:shrink-0",children:[h.jsx(K7,{size:11}),Bpe()]})]}),C==="reasoning"&&h.jsxs(h.Fragment,{children:[ee(X),oe(a,P,o,L)]}),C==="permissions"&&h.jsxs(h.Fragment,{children:[ee(g7()),oe(t,F,r,H)]}),C==="speed"&&h.jsxs(h.Fragment,{children:[ee(v7()),oe(Z,J??void 0,"default",Y)]})]})]})}function Zf({choices:e,value:n,defaultId:t,header:r,align:s="left",dropDown:a=!1,disabled:o=!1,variant:l="pill",title:c,numbered:d=!1,renderIcon:_,onSelect:f,className:m}){var j,T;const{open:g,setOpen:S,ref:k}=zo();if(e.length===0)return null;const b=n??t??((j=e[0])==null?void 0:j.id)??null,v=e.find(D=>D.id===b),x=e.find(D=>D.id===t),y=l==="bare"&&(x==null?void 0:x.id)===sp?x:void 0,C=y?e.filter(D=>D.id!==y.id):e,A=(v==null?void 0:v.label)??((T=e[0])==null?void 0:T.label)??"",E=D=>{f(D),S(!1)};return h.jsxs("div",{className:`option-picker relative inline-flex${l==="field"?" w-full":""}`,ref:k,children:[h.jsxs("button",{type:"button",className:ss(l==="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 ${l==="pill"?"composer-pill gap-[5px] px-2 text-sm text-text whitespace-nowrap":"composer-bare gap-[3px] px-1 text-sm text-text"}`,m),title:c,"aria-haspopup":"menu","aria-expanded":g,disabled:o,onClick:()=>S(D=>!D),children:[h.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[v&&(_==null?void 0:_(v)),h.jsx("span",{className:"truncate",children:A})]}),h.jsx(ta,{size:12})]}),g&&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 ${e.some(D=>D.description)?"min-w-80":""} ${l==="field"?"min-w-full":""} ${s==="right"?"align-right":""} ${a?"drop-down":""}`,children:[r&&h.jsx("div",{className:UT,children:r}),y&&h.jsxs(h.Fragment,{children:[h.jsxs(Zr,{type:"button",onClick:()=>E(y.id),children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[_==null?void 0:_(y),h.jsxs("span",{children:[y.label,h.jsx("span",{className:"option-default text-muted font-normal",children:gE()})]})]}),b===y.id&&h.jsx(Ys,{size:13})]}),h.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),C.map((D,I)=>h.jsxs(Zr,{type:"button",onClick:()=>E(D.id),children:[h.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[_==null?void 0:_(D),h.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[h.jsxs("span",{children:[D.label,!y&&D.id===t&&h.jsxs("span",{className:"option-default text-muted font-normal",children:[" ",vE()]})]}),D.description&&h.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:D.description})]})]}),b===D.id?h.jsx(Ys,{size:13}):d&&h.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:I+1})]},D.id))]})]})}const b8={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 xut(e){return b8[e]??b8.idle}const yut={done:BHe,failed:VHe,running:ePe,starting:sPe,cancelling:DHe,cancelled:THe,editing:FHe,idle:XHe};function qT(e){const n=yut[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function bo({status:e,label:n,className:t}){const r=xut(e);return h.jsx(Ux,{tone:r.tone,live:r.live,className:t,children:n??qT(e)})}var $v={exports:{}},x8;function wut(){return x8||(x8=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 a=this._terminal._core;this._terminal.rows===s.rows&&this._terminal.cols===s.cols||(a._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,a=s._renderService.dimensions;if(a.css.cell.width===0||a.css.cell.height===0)return;const o=this._terminal.options.scrollback===0?0:s.viewport.scrollBarWidth,l=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(l.getPropertyValue("height")),d=Math.max(0,parseInt(l.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),f=c-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),m=d-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-o;return{cols:Math.max(2,Math.floor(m/a.css.cell.width)),rows:Math.max(1,Math.floor(f/a.css.cell.height))}}}})(),t})()))})($v)),$v.exports}var Sut=wut(),Hv={exports:{}},y8;function kut(){return y8||(y8=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(o,l)=>{function c(_){try{const f=new URL(_),m=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 _.toLocaleLowerCase().startsWith(m.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(l,"__esModule",{value:!0}),l.LinkComputer=l.WebLinkProvider=void 0,l.WebLinkProvider=class{constructor(_,f,m,g={}){this._terminal=_,this._regex=f,this._handler=m,this._options=g}provideLinks(_,f){const m=d.computeLink(_,this._regex,this._terminal,this._handler);f(this._addCallbacks(m))}_addCallbacks(_){return _.map((f=>(f.leave=this._options.leave,f.hover=(m,g)=>{if(this._options.hover){const{range:S}=f;this._options.hover(m,g,S)}},f)))}};class d{static computeLink(f,m,g,S){const k=new RegExp(m.source,(m.flags||"")+"g"),[b,v]=d._getWindowedLineStrings(f-1,g),x=b.join("");let y;const C=[];for(;y=k.exec(x);){const A=y[0];if(!c(A))continue;const[E,j]=d._mapStrIdx(g,v,0,y.index),[T,D]=d._mapStrIdx(g,E,j,A.length);if(E===-1||j===-1||T===-1||D===-1)continue;const I={start:{x:j+1,y:E+1},end:{x:D,y:T+1}};C.push({range:I,text:A,activate:S})}return C}static _getWindowedLineStrings(f,m){let g,S=f,k=f,b=0,v="";const x=[];if(g=m.buffer.active.getLine(f)){const y=g.translateToString(!0);if(g.isWrapped&&y[0]!==" "){for(b=0;(g=m.buffer.active.getLine(--S))&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),g.isWrapped&&v.indexOf(" ")===-1););x.reverse()}for(x.push(y),b=0;(g=m.buffer.active.getLine(++k))&&g.isWrapped&&b<2048&&(v=g.translateToString(!0),b+=v.length,x.push(v),v.indexOf(" ")===-1););}return[x,S]}static _mapStrIdx(f,m,g,S){const k=f.buffer.active,b=k.getNullCell();let v=g;for(;S;){const x=k.getLine(m);if(!x)return[-1,-1];for(let y=v;y{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.WebLinksAddon=void 0;const l=s(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function d(_,f){const m=window.open();if(m){try{m.opener=null}catch{}m.location.href=f}else console.warn("Opening link blocked as opener could not be cleared")}o.WebLinksAddon=class{constructor(_=d,f={}){this._handler=_,this._options=f}activate(_){this._terminal=_;const f=this._options,m=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new l.WebLinkProvider(this._terminal,m,this._handler,f))}dispose(){var _;(_=this._linkProvider)==null||_.dispose()}}})(),a})()))})(Hv)),Hv.exports}var Cut=kut(),Pv={exports:{}},w8;function Eut(){return w8||(w8=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=c(9042),m=c(9924),g=c(844),S=c(4725),k=c(2585),b=c(3656);let v=l.AccessibilityManager=class extends g.Disposable{constructor(x,y,C,A){super(),this._terminal=x,this._coreBrowserService=C,this._renderService=A,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 E=0;Ethis._handleBoundaryFocus(E,0),this._bottomBoundaryFocusListener=E=>this._handleBoundaryFocus(E,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 m.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((E=>this._handleResize(E.rows)))),this.register(this._terminal.onRender((E=>this._refreshRows(E.start,E.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((E=>this._handleChar(E)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` `)))),this.register(this._terminal.onA11yTab((E=>this._handleTab(E)))),this.register(this._terminal.onKey((E=>this._handleKey(E.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,b.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,g.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(x){for(let y=0;y0?this._charsToConsume.shift()!==x&&(this._charsToAnnounce+=x):this._charsToAnnounce+=x,x===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const C=this._terminal.buffer,A=C.lines.length.toString();for(let E=x;E<=y;E++){const j=C.lines.get(C.ydisp+E),T=[],D=(j==null?void 0:j.translateToString(!0,void 0,void 0,T))||"",I=(C.ydisp+E+1).toString(),P=this._rowElements[E];P&&(D.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=D,this._rowColumns.set(P,T)),P.setAttribute("aria-posinset",I),P.setAttribute("aria-setsize",A))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const C=x.target,A=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==A)return;let E,j;if(y===0?(E=C,j=this._rowElements.pop(),this._rowContainer.removeChild(j)):(E=this._rowElements.shift(),j=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),j.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const A=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(A)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:A,offset:((D=A.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:I,offset:P})=>{const H=I instanceof Text?I.parentNode:I;let F=parseInt(H==null?void 0:H.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const V=this._rowColumns.get(H);if(!V)return console.warn("columns is null. Race condition?"),null;let X=P=this._terminal.cols&&(++F,X=0),{row:F,column:X}},j=E(y),T=E(C);if(j&&T){if(j.row>T.row||j.row===T.row&&j.column>=T.column)throw new Error("invalid range");this._terminal.select(j.column,j.row,(T.row-j.row)*this._terminal.cols-j.column+T.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(m){return m.replace(/\r?\n/g,"\r")}function d(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function _(m,g,S,k){m=d(m=c(m),S.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(m,!0),g.value=""}function f(m,g,S){const k=S.getBoundingClientRect(),b=m.clientX-k.left-10,v=m.clientY-k.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${b}px`,g.style.top=`${v}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=c,l.bracketTextForPaste=d,l.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},l.handlePasteEvent=function(m,g,S,k){m.stopPropagation(),m.clipboardData&&_(m.clipboardData.getData("text/plain"),g,S,k)},l.paste=_,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(m,g,S,k,b){f(m,g,S),b&&k.rightClickSelect(m),g.value=k.selectionText,g.select()}},7239:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const d=c(1505);l.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,f,m){this._css.set(_,f,m)}getCss(_,f){return this._css.get(_,f)}setColor(_,f,m){this._color.set(_,f,m)}getColor(_,f){return this._color.get(_,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(c,d,_,f){c.addEventListener(d,_,f);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(d,_,f))}}}},3551:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=c(3656),m=c(8460),g=c(844),S=c(2585),k=c(4725);let b=l.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(v,x,y,C,A){super(),this._element=v,this._mouseService=x,this._renderService=y,this._bufferService=C,this._linkProviderService=A,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.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(v){this._lastMouseEvent=v;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=v.composedPath();for(let C=0;C{E==null||E.forEach((j=>{j.link.dispose&&j.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[E,j]of this._linkProviderService.linkProviders.entries())x?(A=this._activeProviderReplies)!=null&&A.get(E)&&(y=this._checkLinkProviderResult(E,v,y)):j.provideLinks(v.y,(T=>{var I,P;if(this._isMouseOut)return;const D=T==null?void 0:T.map((H=>({link:H})));(I=this._activeProviderReplies)==null||I.set(E,D),y=this._checkLinkProviderResult(E,v,y),((P=this._activeProviderReplies)==null?void 0:P.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,x){const y=new Set;for(let C=0;Cv?this._bufferService.cols:j.link.range.end.x;for(let I=T;I<=D;I++){if(y.has(I)){A.splice(E--,1);break}y.add(I)}}}}_checkLinkProviderResult(v,x,y){var E;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(v);let A=!1;for(let j=0;jthis._linkAtPosition(T.link,x)));j&&(y=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let j=0;jthis._linkAtPosition(D.link,x)));if(T){y=!0,this._handleNewLink(T);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,x){this._currentLink&&this._lastMouseEvent&&(!v||!x||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(v.link,x)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,A,E;(C=this._currentLink)!=null&&C.state&&((E=(A=this._currentLink)==null?void 0:A.state)==null?void 0:E.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=A&&(this._clearCurrentLink(C,A),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(v,x){const y=v.range,C=this._bufferService.buffer.ydisp,A=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(A)}_linkLeave(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(v,x){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,A=x.y*this._bufferService.cols+x.x;return y<=A&&A<=C}_positionFromMouseEvent(v,x,y){const C=y.getCoords(v,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,x,y,C,A){return{x1:v,y1:x,x2:y,y2:C,cols:this._bufferService.cols,fg:A}}};l.Linkifier=b=d([_(1,k.IMouseService),_(2,k.IRenderService),_(3,S.IBufferService),_(4,k.ILinkProviderService)],b)},9042:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=c(511),m=c(2585);let g=l.OscLinkProvider=class{constructor(k,b,v){this._bufferService=k,this._optionsService=b,this._oscLinkService=v}provideLinks(k,b){var D;const v=this._bufferService.buffer.lines.get(k-1);if(!v)return void b(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,C=new f.CellData,A=v.getTrimmedLength();let E=-1,j=-1,T=!1;for(let I=0;Iy?y.activate(V,X,H):S(0,X),hover:(V,X)=>{var W;return(W=y==null?void 0:y.hover)==null?void 0:W.call(y,V,X,H)},leave:(V,X)=>{var W;return(W=y==null?void 0:y.leave)==null?void 0:W.call(y,V,X,H)}})}T=!1,C.hasExtendedAttrs()&&C.extended.urlId?(j=I,E=C.extended.urlId):(j=-1,E=-1)}}b(x)}};function S(k,b){if(confirm(`Do you want to navigate to ${b}? +`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(x){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(x)||this._charsToConsume.push(x)}_refreshRows(x,y){this._liveRegionDebouncer.refresh(x,y,this._terminal.rows)}_renderRows(x,y){const C=this._terminal.buffer,A=C.lines.length.toString();for(let E=x;E<=y;E++){const j=C.lines.get(C.ydisp+E),T=[],D=(j==null?void 0:j.translateToString(!0,void 0,void 0,T))||"",I=(C.ydisp+E+1).toString(),P=this._rowElements[E];P&&(D.length===0?(P.innerText=" ",this._rowColumns.set(P,[0,1])):(P.textContent=D,this._rowColumns.set(P,T)),P.setAttribute("aria-posinset",I),P.setAttribute("aria-setsize",A))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(x,y){const C=x.target,A=this._rowElements[y===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||x.relatedTarget!==A)return;let E,j;if(y===0?(E=C,j=this._rowElements.pop(),this._rowContainer.removeChild(j)):(E=this._rowElements.shift(),j=C,this._rowContainer.removeChild(E)),E.removeEventListener("focus",this._topBoundaryFocusListener),j.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const T=this._createAccessibilityTreeNode();this._rowElements.unshift(T),this._rowContainer.insertAdjacentElement("afterbegin",T)}else{const T=this._createAccessibilityTreeNode();this._rowElements.push(T),this._rowContainer.appendChild(T)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),x.preventDefault(),x.stopImmediatePropagation()}_handleSelectionChange(){var D;if(this._rowElements.length===0)return;const x=document.getSelection();if(!x)return;if(x.isCollapsed)return void(this._rowContainer.contains(x.anchorNode)&&this._terminal.clearSelection());if(!x.anchorNode||!x.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:x.anchorNode,offset:x.anchorOffset},C={node:x.focusNode,offset:x.focusOffset};if((y.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===C.node&&y.offset>C.offset)&&([y,C]=[C,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const A=this._rowElements.slice(-1)[0];if(C.node.compareDocumentPosition(A)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(C={node:A,offset:((D=A.textContent)==null?void 0:D.length)??0}),!this._rowContainer.contains(C.node))return;const E=({node:I,offset:P})=>{const B=I instanceof Text?I.parentNode:I;let F=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const V=this._rowColumns.get(B);if(!V)return console.warn("columns is null. Race condition?"),null;let X=P=this._terminal.cols&&(++F,X=0),{row:F,column:X}},j=E(y),T=E(C);if(j&&T){if(j.row>T.row||j.row===T.row&&j.column>=T.column)throw new Error("invalid range");this._terminal.select(j.column,j.row,(T.row-j.row)*this._terminal.cols-j.column+T.column)}}_handleResize(x){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;yx;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const x=this._coreBrowserService.mainDocument.createElement("div");return x.setAttribute("role","listitem"),x.tabIndex=-1,this._refreshRowDimensions(x),x}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let x=0;x{function c(m){return m.replace(/\r?\n/g,"\r")}function d(m,g){return g?"\x1B[200~"+m+"\x1B[201~":m}function _(m,g,S,k){m=d(m=c(m),S.decPrivateModes.bracketedPasteMode&&k.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(m,!0),g.value=""}function f(m,g,S){const k=S.getBoundingClientRect(),b=m.clientX-k.left-10,v=m.clientY-k.top-10;g.style.width="20px",g.style.height="20px",g.style.left=`${b}px`,g.style.top=`${v}px`,g.style.zIndex="1000",g.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=c,l.bracketTextForPaste=d,l.copyHandler=function(m,g){m.clipboardData&&m.clipboardData.setData("text/plain",g.selectionText),m.preventDefault()},l.handlePasteEvent=function(m,g,S,k){m.stopPropagation(),m.clipboardData&&_(m.clipboardData.getData("text/plain"),g,S,k)},l.paste=_,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(m,g,S,k,b){f(m,g,S),b&&k.rightClickSelect(m),g.value=k.selectionText,g.select()}},7239:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const d=c(1505);l.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(_,f,m){this._css.set(_,f,m)}getCss(_,f){return this._css.get(_,f)}setColor(_,f,m){this._color.set(_,f,m)}getColor(_,f){return this._color.get(_,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(c,d,_,f){c.addEventListener(d,_,f);let m=!1;return{dispose:()=>{m||(m=!0,c.removeEventListener(d,_,f))}}}},3551:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=c(3656),m=c(8460),g=c(844),S=c(2585),k=c(4725);let b=l.Linkifier=class extends g.Disposable{get currentLink(){return this._currentLink}constructor(v,x,y,C,A){super(),this._element=v,this._mouseService=x,this._renderService=y,this._bufferService=C,this._linkProviderService=A,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new m.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new m.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,g.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,g.toDisposable)((()=>{var E;this._lastMouseEvent=void 0,(E=this._activeProviderReplies)==null||E.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(v){this._lastMouseEvent=v;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!x)return;this._isMouseOut=!1;const y=v.composedPath();for(let C=0;C{E==null||E.forEach((j=>{j.link.dispose&&j.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[E,j]of this._linkProviderService.linkProviders.entries())x?(A=this._activeProviderReplies)!=null&&A.get(E)&&(y=this._checkLinkProviderResult(E,v,y)):j.provideLinks(v.y,(T=>{var I,P;if(this._isMouseOut)return;const D=T==null?void 0:T.map((B=>({link:B})));(I=this._activeProviderReplies)==null||I.set(E,D),y=this._checkLinkProviderResult(E,v,y),((P=this._activeProviderReplies)==null?void 0:P.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,x){const y=new Set;for(let C=0;Cv?this._bufferService.cols:j.link.range.end.x;for(let I=T;I<=D;I++){if(y.has(I)){A.splice(E--,1);break}y.add(I)}}}}_checkLinkProviderResult(v,x,y){var E;if(!this._activeProviderReplies)return y;const C=this._activeProviderReplies.get(v);let A=!1;for(let j=0;jthis._linkAtPosition(T.link,x)));j&&(y=!0,this._handleNewLink(j))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let j=0;jthis._linkAtPosition(D.link,x)));if(T){y=!0,this._handleNewLink(T);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const x=this._positionFromMouseEvent(v,this._element,this._mouseService);x&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,x)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,x){this._currentLink&&this._lastMouseEvent&&(!v||!x||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=x)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,g.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._linkAtPosition(v.link,x)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.pointerCursor},set:y=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,C;return(C=(y=this._currentLink)==null?void 0:y.state)==null?void 0:C.decorations.underline},set:y=>{var C,A,E;(C=this._currentLink)!=null&&C.state&&((E=(A=this._currentLink)==null?void 0:A.state)==null?void 0:E.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const C=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,A=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=A&&(this._clearCurrentLink(C,A),this._lastMouseEvent)){const E=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);E&&this._askForLink(E,!1)}}))))}_linkHover(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),x.hover&&x.hover(y,x.text)}_fireUnderlineEvent(v,x){const y=v.range,C=this._bufferService.buffer.ydisp,A=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-C-1,y.end.x,y.end.y-C-1,void 0);(x?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(A)}_linkLeave(v,x,y){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(x,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),x.leave&&x.leave(y,x.text)}_linkAtPosition(v,x){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,C=v.range.end.y*this._bufferService.cols+v.range.end.x,A=x.y*this._bufferService.cols+x.x;return y<=A&&A<=C}_positionFromMouseEvent(v,x,y){const C=y.getCoords(v,x,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,x,y,C,A){return{x1:v,y1:x,x2:y,y2:C,cols:this._bufferService.cols,fg:A}}};l.Linkifier=b=d([_(1,k.IMouseService),_(2,k.IRenderService),_(3,S.IBufferService),_(4,k.ILinkProviderService)],b)},9042:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=c(511),m=c(2585);let g=l.OscLinkProvider=class{constructor(k,b,v){this._bufferService=k,this._optionsService=b,this._oscLinkService=v}provideLinks(k,b){var D;const v=this._bufferService.buffer.lines.get(k-1);if(!v)return void b(void 0);const x=[],y=this._optionsService.rawOptions.linkHandler,C=new f.CellData,A=v.getTrimmedLength();let E=-1,j=-1,T=!1;for(let I=0;Iy?y.activate(V,X,B):S(0,X),hover:(V,X)=>{var W;return(W=y==null?void 0:y.hover)==null?void 0:W.call(y,V,X,B)},leave:(V,X)=>{var W;return(W=y==null?void 0:y.leave)==null?void 0:W.call(y,V,X,B)}})}T=!1,C.hasExtendedAttrs()&&C.extended.urlId?(j=I,E=C.extended.urlId):(j=-1,E=-1)}}b(x)}};function S(k,b){if(confirm(`Do you want to navigate to ${b}? -WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}l.OscLinkProvider=g=d([_(0,m.IBufferService),_(1,m.IOptionsService),_(2,m.IOscLinkService)],g)},6193:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.RenderDebouncer=void 0,l.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const d=c(3614),_=c(3656),f=c(3551),m=c(9042),g=c(3730),S=c(1680),k=c(3107),b=c(5744),v=c(2950),x=c(1296),y=c(428),C=c(4269),A=c(5114),E=c(8934),j=c(3230),T=c(9312),D=c(4725),I=c(6731),P=c(8055),H=c(8969),F=c(8460),V=c(844),X=c(6114),W=c(8437),Z=c(2584),J=c(7399),B=c(5941),L=c(9074),$=c(2585),K=c(5435),G=c(4567),re=c(779);class oe extends H.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(ie={}){super(ie),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService($.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,te)=>this.refresh(q,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,V.toDisposable)((()=>{var q,te;this._customKeyEventHandler=void 0,(te=(q=this.element)==null?void 0:q.parentNode)==null||te.removeChild(this.element)})))}_handleColorEvent(ie){if(this._themeService)for(const q of ie){let te,le="";switch(q.index){case 256:te="foreground",le="10";break;case 257:te="background",le="11";break;case 258:te="cursor",le="12";break;default:te="ansi",le="4;"+q.index}switch(q.type){case 0:const ge=P.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${le};${(0,B.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((ue=>ue.ansi[q.index]=P.channels.toColor(...q.color)));else{const ue=te;this._themeService.modifyColors((Ce=>Ce[ue]=P.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ie){ie?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ie;return(ie=this.textarea)==null?void 0:ie.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 ie=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(ie);if(!q)return;const te=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ge=q.getWidth(te),ue=this._renderService.dimensions.css.cell.width*ge,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,Ee=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ee+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,d.copyHandler)(q,this._selectionService)})));const ie=q=>(0,d.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,_.addDisposableDomListener)(this.element,"paste",ie)),X.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(ie=>this._keyUp(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(ie=>this._keyDown(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(ie=>this._keyPress(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(ie=>this._compositionHelper.compositionupdate(ie)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(ie=>this._inputEvent(ie)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ie){var te;if(!ie)throw new Error("Terminal requires a parent element.");if(ie.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((te=this.element)==null?void 0:te.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=ie.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"),ie.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),X.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(A.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(I.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(j.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ie=this,q=this.element;function te(ue){const Ce=ie._mouseService.getMouseReportCoords(ue,ie.screenElement);if(!Ce)return!1;let Ee,Le;switch(ue.overrideType||ue.type){case"mousemove":Le=32,ue.buttons===void 0?(Ee=3,ue.button!==void 0&&(Ee=ue.button<3?ue.button:3)):Ee=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":Le=0,Ee=ue.button<3?ue.button:3;break;case"mousedown":Le=1,Ee=ue.button<3?ue.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(ue)===!1||ie.viewport.getLinesScrolled(ue)===0)return!1;Le=ue.deltaY<0?0:1,Ee=4;break;default:return!1}return!(Le===void 0||Ee===void 0||Ee>4)&&ie.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:Ee,action:Le,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:ue=>(te(ue),ue.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ue)),wheel:ue=>(te(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&te(ue)},mousemove:ue=>{ue.buttons||te(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),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&ue?le.mousemove||(q.addEventListener("mousemove",ge.mousemove),le.mousemove=ge.mousemove):(q.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ue?le.wheel||(q.addEventListener("wheel",ge.wheel,{passive:!1}),le.wheel=ge.wheel):(q.removeEventListener("wheel",le.wheel),le.wheel=null),2&ue?le.mouseup||(le.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ue?le.mousedrag||(le.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(q,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return te(ue),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ue)}))),this.register((0,_.addDisposableDomListener)(q,"wheel",(ue=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ue)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(ue);if(Ce===0)return;const Ee=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let Le="";for(let Pe=0;Pe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(q,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(ie,q){var te;(te=this._renderService)==null||te.refreshRows(ie,q)}updateCursorStyle(ie){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(ie)?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(ie,q,te=0){var le;te===1?(super.scrollLines(ie,q,te),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ie)}paste(ie){(0,d.paste)(ie,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ie){this._customKeyEventHandler=ie}attachCustomWheelEventHandler(ie){this._customWheelEventHandler=ie}registerLinkProvider(ie){return this._linkProviderService.registerLinkProvider(ie)}registerCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ie)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ie){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ie)}registerDecoration(ie){return this._decorationService.registerDecoration(ie)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ie,q,te){this._selectionService.setSelection(ie,q,te)}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 ie;(ie=this._selectionService)==null||ie.clearSelection()}selectAll(){var ie;(ie=this._selectionService)==null||ie.selectAll()}selectLines(ie,q){var te;(te=this._selectionService)==null||te.selectLines(ie,q)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!q&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,J.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),te.type===3||te.type===2){const le=this.rows-1;return this.scrollLines(te.type===2?-le:le),this.cancel(ie,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(te.cancel&&this.cancel(ie,!0),!te.key||!!(ie.key&&!ie.ctrlKey&&!ie.altKey&&!ie.metaKey&&ie.key.length===1&&ie.key.charCodeAt(0)>=65&&ie.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==Z.C0.ETX&&te.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,q){const te=ie.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||ie.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||ie.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?te:te&&(!q.keyCode||q.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)q=ie.charCode;else if(ie.which===null||ie.which===void 0)q=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;q=ie.which}return!(!q||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ie){if(ie.data&&ie.inputType==="insertText"&&(!ie.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=ie.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(ie),!0}return!1}resize(ie,q){ie!==this.cols||q!==this.rows?super.resize(ie,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,q){var te,le;(te=this._charSizeService)==null||te.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ie;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 q=1;q{Object.defineProperty(l,"__esModule",{value:!0}),l.TimeBasedDebouncer=void 0,l.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=f-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Viewport=void 0;const f=c(3656),m=c(4725),g=c(8460),S=c(844),k=c(2585);let b=l.Viewport=class extends S.Disposable{constructor(v,x,y,C,A,E,j,T){super(),this._viewportElement=v,this._scrollArea=x,this._bufferService=y,this._optionsService=C,this._charSizeService=A,this._renderService=E,this._coreBrowserService=j,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 g.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((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.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(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<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(v,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=H),C=""}}return{bufferElements:A,cursorElement:y}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let x=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(v,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const x=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(v,x))}};l.Viewport=b=d([_(2,k.IBufferService),_(3,k.IOptionsService),_(4,m.ICharSizeService),_(5,m.IRenderService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],b)},3107:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferDecorationRenderer=void 0;const f=c(4725),m=c(844),g=c(2585);let S=l.BufferDecorationRenderer=class extends m.Disposable{constructor(k,b,v,x,y){super(),this._screenElement=k,this._bufferService=b,this._coreBrowserService=v,this._decorationService=x,this._renderService=y,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,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var x;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),b.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=k.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(k,b),b}_refreshStyle(k){const b=k.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let v=this._decorationElements.get(k);v||(v=this._createElement(k),k.element=v,this._decorationElements.set(k,v),this._container.appendChild(v),k.onDispose((()=>{this._decorationElements.delete(k),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(v)}}_refreshXPosition(k,b=k.element){if(!b)return;const v=k.options.x??0;(k.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var b;(b=this._decorationElements.get(k))==null||b.remove(),this._decorationElements.delete(k),k.dispose()}};l.BufferDecorationRenderer=S=d([_(1,g.IBufferService),_(2,f.ICoreBrowserService),_(3,g.IDecorationService),_(4,f.IRenderService)],S)},5871:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorZoneStore=void 0,l.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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,_){return d>=c.startBufferLine-this._linePadding[_||"full"]&&d<=c.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(o,l,c){var d=this&&this.__decorate||function(y,C,A,E){var j,T=arguments.length,D=T<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,A):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,A,E);else for(var I=y.length-1;I>=0;I--)(j=y[I])&&(D=(T<3?j(D):T>3?j(C,A,D):j(C,A))||D);return T>3&&D&&Object.defineProperty(C,A,D),D},_=this&&this.__param||function(y,C){return function(A,E){C(A,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OverviewRulerRenderer=void 0;const f=c(5871),m=c(4725),g=c(844),S=c(2585),k={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let x=l.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,A,E,j,T,D){var P;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=A,this._decorationService=E,this._renderService=j,this._optionsService=T,this._coreBrowserService=D,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(),(P=this._viewportElement.parentElement)==null||P.insertBefore(this._canvas,this._viewportElement);const I=this._canvas.getContext("2d");if(!I)throw new Error("Ctx cannot be null");this._ctx=I,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.toDisposable)((()=>{var H;(H=this._canvas)==null||H.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=C,b.right=y,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(v[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};l.OverviewRulerRenderer=x=d([_(2,S.IBufferService),_(3,S.IDecorationService),_(4,m.IRenderService),_(5,S.IOptionsService),_(6,m.ICoreBrowserService)],x)},2950:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CompositionHelper=void 0;const f=c(4725),m=c(2585),g=c(2584);let S=l.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,b,v,x,y,C){this._textarea=k,this._compositionView=b,this._bufferService=v,this._optionsService=x,this._coreService=y,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 b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(k,"");this._dataAlreadySent=v,b.length>k.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};l.CompositionHelper=S=d([_(2,m.IBufferService),_(3,m.IOptionsService),_(4,m.ICoreService),_(5,f.IRenderService)],S)},9806:(o,l)=>{function c(d,_,f){const m=f.getBoundingClientRect(),g=d.getComputedStyle(f),S=parseInt(g.getPropertyValue("padding-left")),k=parseInt(g.getPropertyValue("padding-top"));return[_.clientX-m.left-S,_.clientY-m.top-k]}Object.defineProperty(l,"__esModule",{value:!0}),l.getCoords=l.getCoordsRelativeToElement=void 0,l.getCoordsRelativeToElement=c,l.getCoords=function(d,_,f,m,g,S,k,b,v){if(!S)return;const x=c(d,_,f);return x?(x[0]=Math.ceil((x[0]+(v?k/2:0))/k),x[1]=Math.ceil(x[1]/b),x[0]=Math.min(Math.max(x[0],1),m+(v?1:0)),x[1]=Math.min(Math.max(x[1],1),g),x):void 0}},9504:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.moveToCellSequence=void 0;const d=c(2584);function _(b,v,x,y){const C=b-f(b,x),A=v-f(v,x),E=Math.abs(C-A)-(function(j,T,D){let I=0;const P=j-f(j,D),H=T-f(T,D);for(let F=0;F=0&&bv?"A":"B"}function g(b,v,x,y,C,A){let E=b,j=v,T="";for(;E!==x||j!==y;)E+=C?1:-1,C&&E>A.cols-1?(T+=A.buffer.translateBufferLineToString(j,!1,b,E),E=0,b=0,j++):!C&&E<0&&(T+=A.buffer.translateBufferLineToString(j,!1,0,b+1),E=A.cols-1,b=E,j--);return T+A.buffer.translateBufferLineToString(j,!1,b,E)}function S(b,v){const x=v?"O":"[";return d.C0.ESC+x+b}function k(b,v){b=Math.floor(b);let x="";for(let y=0;y0?P-f(P,H):D;const X=P,W=(function(Z,J,B,L,$,K){let G;return G=_(B,L,$,K).length>0?L-f(L,$):J,Z=B&&Gb?"D":"C",k(Math.abs(C-b),S(E,y));E=A>v?"D":"C";const j=Math.abs(A-v);return k((function(T,D){return D.cols-T})(A>v?b:C,x)+(j-1)*x.cols+1+((A>v?C:b)-1),S(E,y))}},1296:function(o,l,c){var d=this&&this.__decorate||function(F,V,X,W){var Z,J=arguments.length,B=J<3?V:W===null?W=Object.getOwnPropertyDescriptor(V,X):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(F,V,X,W);else for(var L=F.length-1;L>=0;L--)(Z=F[L])&&(B=(J<3?Z(B):J>3?Z(V,X,B):Z(V,X))||B);return J>3&&B&&Object.defineProperty(V,X,B),B},_=this&&this.__param||function(F,V){return function(X,W){V(X,W,F)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRenderer=void 0;const f=c(3787),m=c(2550),g=c(2223),S=c(6171),k=c(6052),b=c(4725),v=c(8055),x=c(8460),y=c(844),C=c(2585),A="xterm-dom-renderer-owner-",E="xterm-rows",j="xterm-fg-",T="xterm-bg-",D="xterm-focus",I="xterm-selection";let P=1,H=l.DomRenderer=class extends y.Disposable{constructor(F,V,X,W,Z,J,B,L,$,K,G,re,oe){super(),this._terminal=F,this._document=V,this._element=X,this._screenElement=W,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=B,this._charSizeService=$,this._optionsService=K,this._bufferService=G,this._coreBrowserService=re,this._themeService=oe,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),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(I),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(A+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(A+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${E} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${E} .xterm-dim { color: ${v.color.multiplyOpacity(F.foreground,.5).css};}`,V+=`${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 X=`blink_underline_${this._terminalClass}`,W=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;V+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${W} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Z} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,V+=`${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${I} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${I} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${I} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,B]of F.ansi.entries())V+=`${this._terminalSelector} .${j}${J} { color: ${B.css}; }${this._terminalSelector} .${j}${J}.xterm-dim { color: ${v.color.multiplyOpacity(B,.5).css}; }${this._terminalSelector} .${T}${J} { background-color: ${B.css}; }`;V+=`${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(F.background).css}; }${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,V){for(let X=this._rowElements.length;X<=V;X++){const W=this._document.createElement("div");this._rowContainer.appendChild(W),this._rowElements.push(W)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,V){this._refreshRowElements(F,V),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,V,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,V,X),this.renderRows(0,this._bufferService.rows-1),!F||!V)return;this._selectionRenderModel.update(this._terminal,F,V,X);const W=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,B=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||B<0)return;const L=this._document.createDocumentFragment();if(X){const $=F[0]>V[0];L.appendChild(this._createSelectionElement(J,$?V[0]:F[0],$?F[0]:V[0],B-J+1))}else{const $=W===J?F[0]:0,K=J===Z?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,$,K));const G=B-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,G)),J!==B){const re=Z===B?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(B,0,re))}}this._selectionContainer.appendChild(L)}_createSelectionElement(F,V,X,W=1){const Z=this._document.createElement("div"),J=V*this.dimensions.css.cell.width;let B=this.dimensions.css.cell.width*(X-V);return J+B>this.dimensions.css.canvas.width&&(B=this.dimensions.css.canvas.width-J),Z.style.height=W*this.dimensions.css.cell.height+"px",Z.style.top=F*this.dimensions.css.cell.height+"px",Z.style.left=`${J}px`,Z.style.width=`${B}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 F of this._rowElements)F.replaceChildren()}renderRows(F,V){const X=this._bufferService.buffer,W=X.ybase+X.y,Z=Math.min(X.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,B=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let $=F;$<=V;$++){const K=$+X.ydisp,G=this._rowElements[$],re=X.lines.get(K);if(!G||!re)break;G.replaceChildren(...this._rowFactory.createRow(re,K,K===W,B,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${A}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,V,X,W,Z,J){X<0&&(F=0),W<0&&(V=0);const B=this._bufferService.rows-1;X=Math.max(Math.min(X,B),0),W=Math.max(Math.min(W,B),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,$=L.ybase+L.y,K=Math.min(L.x,Z-1),G=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=X;he<=W;++he){const ie=he+L.ydisp,q=this._rowElements[he],te=L.lines.get(ie);if(!q||!te)break;q.replaceChildren(...this._rowFactory.createRow(te,ie,ie===$,re,oe,K,G,this.dimensions.css.cell.width,this._widthCache,J?he===X?F:0:-1,J?(he===W?V:Z)-1:-1))}}};l.DomRenderer=H=d([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],H)},3787:function(o,l,c){var d=this&&this.__decorate||function(E,j,T,D){var I,P=arguments.length,H=P<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(E,j,T,D);else for(var F=E.length-1;F>=0;F--)(I=E[F])&&(H=(P<3?I(H):P>3?I(j,T,H):I(j,T))||H);return P>3&&H&&Object.defineProperty(j,T,H),H},_=this&&this.__param||function(E,j){return function(T,D){j(T,D,E)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRendererRowFactory=void 0;const f=c(2223),m=c(643),g=c(511),S=c(2585),k=c(8055),b=c(4725),v=c(4269),x=c(6171),y=c(3734);let C=l.DomRendererRowFactory=class{constructor(E,j,T,D,I,P,H){this._document=E,this._characterJoinerService=j,this._optionsService=T,this._coreBrowserService=D,this._coreService=I,this._decorationService=P,this._themeService=H,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,j,T){this._selectionStart=E,this._selectionEnd=j,this._columnSelectMode=T}createRow(E,j,T,D,I,P,H,F,V,X,W){const Z=[],J=this._characterJoinerService.getJoinedCharacters(j),B=this._themeService.colors;let L,$=E.getNoBgTrimmedLength();T&&$0&&Ce===J[0][0]){Le=!0;const bt=J.shift();Ve=new v.JoinedCellData(this._workCell,E.translateToString(!0,bt[0],bt[1]),bt[1]-bt[0]),Pe=bt[1]-1,Ee=Ve.getWidth()}const ft=this._isCellInSelection(Ce,j),Be=T&&Ce===P,wt=ue&&Ce>=X&&Ce<=W;let At=!1;this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{At=!0}));let vt=Ve.getChars()||m.WHITESPACE_CELL_CHAR;if(vt===" "&&(Ve.isUnderline()||Ve.isOverline())&&(vt=" "),le=Ee*F-V.get(vt,Ve.isBold(),Ve.isItalic()),L){if(K&&(ft&&te||!ft&&!te&&Ve.bg===re)&&(ft&&te&&B.selectionForeground||Ve.fg===oe)&&Ve.extended.ext===he&&wt===ie&&le===q&&!Be&&!Le&&!At){Ve.isInvisible()?G+=m.WHITESPACE_CELL_CHAR:G+=vt,K++;continue}K&&(L.textContent=G),L=this._document.createElement("span"),K=0,G=""}else L=this._document.createElement("span");if(re=Ve.bg,oe=Ve.fg,he=Ve.extended.ext,ie=wt,q=le,te=ft,Le&&P>=Ce&&P<=Pe&&(P=Ce),!this._coreService.isCursorHidden&&Be&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)H&&ge.push("xterm-cursor-blink"),ge.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(I)switch(I){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(Ve.isBold()&&ge.push("xterm-bold"),Ve.isItalic()&&ge.push("xterm-italic"),Ve.isDim()&&ge.push("xterm-dim"),G=Ve.isInvisible()?m.WHITESPACE_CELL_CHAR:Ve.getChars()||m.WHITESPACE_CELL_CHAR,Ve.isUnderline()&&(ge.push(`xterm-underline-${Ve.extended.underlineStyle}`),G===" "&&(G=" "),!Ve.isUnderlineColorDefault()))if(Ve.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Ve.getUnderlineColor()).join(",")})`;else{let bt=Ve.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ve.isBold()&&bt<8&&(bt+=8),L.style.textDecorationColor=B.ansi[bt].css}Ve.isOverline()&&(ge.push("xterm-overline"),G===" "&&(G=" ")),Ve.isStrikethrough()&&ge.push("xterm-strikethrough"),wt&&(L.style.textDecoration="underline");let Ot=Ve.getFgColor(),St=Ve.getFgColorMode(),kt=Ve.getBgColor(),xe=Ve.getBgColorMode();const je=!!Ve.isInverse();if(je){const bt=Ot;Ot=kt,kt=bt;const nn=St;St=xe,xe=nn}let We,st,nt,Ht=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{bt.options.layer!=="top"&&Ht||(bt.backgroundColorRGB&&(xe=50331648,kt=bt.backgroundColorRGB.rgba>>8&16777215,We=bt.backgroundColorRGB),bt.foregroundColorRGB&&(St=50331648,Ot=bt.foregroundColorRGB.rgba>>8&16777215,st=bt.foregroundColorRGB),Ht=bt.options.layer==="top")})),!Ht&&ft&&(We=this._coreBrowserService.isFocused?B.selectionBackgroundOpaque:B.selectionInactiveBackgroundOpaque,kt=We.rgba>>8&16777215,xe=50331648,Ht=!0,B.selectionForeground&&(St=50331648,Ot=B.selectionForeground.rgba>>8&16777215,st=B.selectionForeground)),Ht&&ge.push("xterm-decoration-top"),xe){case 16777216:case 33554432:nt=B.ansi[kt],ge.push(`xterm-bg-${kt}`);break;case 50331648:nt=k.channels.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(L,`background-color:#${A((kt>>>0).toString(16),"0",6)}`);break;default:je?(nt=B.foreground,ge.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):nt=B.background}switch(We||Ve.isDim()&&(We=k.color.multiplyOpacity(nt,.5)),St){case 16777216:case 33554432:Ve.isBold()&&Ot<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ot+=8),this._applyMinimumContrast(L,nt,B.ansi[Ot],Ve,We,void 0)||ge.push(`xterm-fg-${Ot}`);break;case 50331648:const bt=k.channels.toColor(Ot>>16&255,Ot>>8&255,255&Ot);this._applyMinimumContrast(L,nt,bt,Ve,We,st)||this._addStyle(L,`color:#${A(Ot.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,nt,B.foreground,Ve,We,st)||je&&ge.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ge.length&&(L.className=ge.join(" "),ge.length=0),Be||Le||At?L.textContent=G:K++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),Z.push(L),Ce=Pe}return L&&K&&(L.textContent=G),Z}_applyMinimumContrast(E,j,T,D,I,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const H=this._getContrastCache(D);let F;if(I||P||(F=H.getColor(j.rgba,T.rgba)),F===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);F=k.color.ensureContrastRatio(I||j,P||T,V),H.setColor((I||j).rgba,(P||T).rgba,F??null)}return!!F&&(this._addStyle(E,`color:${F.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,j){E.setAttribute("style",`${E.getAttribute("style")||""}${j};`)}_isCellInSelection(E,j){const T=this._selectionStart,D=this._selectionEnd;return!(!T||!D)&&(this._columnSelectMode?T[0]<=D[0]?E>=T[0]&&j>=T[1]&&E=T[1]&&E>=D[0]&&j<=D[1]:j>T[1]&&j=T[0]&&E=T[0])}};function A(E,j,T){for(;E.length{Object.defineProperty(l,"__esModule",{value:!0}),l.WidthCache=void 0,l.WidthCache=class{constructor(c,d){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 _=c.createElement("span");_.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=c.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[_,f,m,g],this._container.appendChild(_),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(g),d.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,d,_,f){c===this._font&&d===this._fontSize&&_===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=d,this._weight=_,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,d,_){let f=0;if(!d&&!_&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const S=this._measure(c,0);return S>0&&(this._flat[f]=S),S}let m=c;d&&(m+="B"),_&&(m+="I");let g=this._holey.get(m);if(g===void 0){let S=0;d&&(S|=1),_&&(S|=2),g=this._measure(c,S),g>0&&this._holey.set(m,g)}return g}_measure(c,d){const _=this._measureElements[d];return _.textContent=c.repeat(32),_.offsetWidth/32}}},2223:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.TEXT_BASELINE=l.DIM_OPACITY=l.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);l.INVERTED_DEFAULT_COLOR=257,l.DIM_OPACITY=.5,l.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(o,l)=>{function c(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(l,"__esModule",{value:!0}),l.computeNextVariantOffset=l.createRenderDimensions=l.treatGlyphAsBackgroundColor=l.allowRescaling=l.isEmoji=l.isRestrictedPowerlineGlyph=l.isPowerlineGlyph=l.throwIfFalsy=void 0,l.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},l.isPowerlineGlyph=c,l.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},l.isEmoji=d,l.allowRescaling=function(_,f,m,g){return f===1&&m>Math.ceil(1.5*g)&&_!==void 0&&_>255&&!d(_)&&!c(_)&&!(function(S){return 57344<=S&&S<=63743})(_)},l.treatGlyphAsBackgroundColor=function(_){return c(_)||(function(f){return 9472<=f&&f<=9631})(_)},l.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}}}},l.computeNextVariantOffset=function(_,f,m=0){return(_-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.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(_,f,m,g=!1){if(this.selectionStart=f,this.selectionEnd=m,!f||!m||f[0]===m[0]&&f[1]===m[1])return void this.clear();const S=_.buffers.active.ydisp,k=f[1]-S,b=m[1]-S,v=Math.max(k,0),x=Math.min(b,_.rows-1);v>=_.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=k,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=m[0])}isCellSelected(_,f,m){return!!this.hasSelection&&(m-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&m>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m=this.startCol&&f=this.startCol)}}l.createSelectionRenderModel=function(){return new c}},456:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionModel=void 0,l.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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharSizeService=void 0;const f=c(2585),m=c(8460),g=c(844);let S=l.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};l.CharSizeService=S=d([_(2,f.IOptionsService)],S);class k extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class b extends k{constructor(y,C,A){super(),this._document=y,this._parentElement=C,this._optionsService=A,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 v extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharacterJoinerService=l.JoinedCellData=void 0;const f=c(3734),m=c(643),g=c(511),S=c(2585);class k extends f.AttributeData{constructor(x,y,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.JoinedCellData=k;let b=l.CharacterJoinerService=class DT{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const H=this._getJoinedRanges(A,T,j,y,E);for(let F=0;F1){const P=this._getJoinedRanges(A,T,j,y,E);for(let H=0;H{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreBrowserService=void 0;const d=c(844),_=c(8460),f=c(3656);class m extends d.Disposable{constructor(k,b,v){super(),this._textarea=k,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,_.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}}l.CoreBrowserService=m;class g extends d.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.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:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.LinkProviderService=void 0;const d=c(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}l.LinkProviderService=_},8934:function(o,l,c){var d=this&&this.__decorate||function(S,k,b,v){var x,y=arguments.length,C=y<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(S,k,b,v);else for(var A=S.length-1;A>=0;A--)(x=S[A])&&(C=(y<3?x(C):y>3?x(k,b,C):x(k,b))||C);return y>3&&C&&Object.defineProperty(k,b,C),C},_=this&&this.__param||function(S,k){return function(b,v){k(b,v,S)}};Object.defineProperty(l,"__esModule",{value:!0}),l.MouseService=void 0;const f=c(4725),m=c(9806);let g=l.MouseService=class{constructor(S,k){this._renderService=S,this._charSizeService=k}getCoords(S,k,b,v,x){return(0,m.getCoords)(window,S,k,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(S,k){const b=(0,m.getCoordsRelativeToElement)(window,S,k);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};l.MouseService=g=d([_(0,f.IRenderService),_(1,f.ICharSizeService)],g)},3230:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.RenderService=void 0;const f=c(6193),m=c(4725),g=c(8460),S=c(844),k=c(7226),b=c(2585);let v=l.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,C,A,E,j,T,D){super(),this._rowCount=x,this._charSizeService=A,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new S.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((I,P)=>this._renderRows(I,P)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(j.onResize((()=>this._fullRefresh()))),this.register(j.buffers.onBufferActivate((()=>{var I;return(I=this._renderer.value)==null?void 0:I.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(j.cols,j.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(j.buffer.y,j.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,y),this.register(T.onWindowChange((I=>this._registerIntersectionObserver(I,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((A=>this._handleIntersectionChange(A[A.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,S.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,C){var A;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(A=this._renderer.value)==null||A.handleSelectionChanged(x,y,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};l.RenderService=v=d([_(2,b.IOptionsService),_(3,m.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],v)},9312:function(o,l,c){var d=this&&this.__decorate||function(T,D,I,P){var H,F=arguments.length,V=F<3?D:P===null?P=Object.getOwnPropertyDescriptor(D,I):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,D,I,P);else for(var X=T.length-1;X>=0;X--)(H=T[X])&&(V=(F<3?H(V):F>3?H(D,I,V):H(D,I))||V);return F>3&&V&&Object.defineProperty(D,I,V),V},_=this&&this.__param||function(T,D){return function(I,P){D(I,P,T)}};Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionService=void 0;const f=c(9806),m=c(9504),g=c(456),S=c(4725),k=c(8460),b=c(844),v=c(6114),x=c(4841),y=c(511),C=c(2585),A=" ",E=new RegExp(A,"g");let j=l.SelectionService=class extends b.Disposable{constructor(T,D,I,P,H,F,V,X,W){super(),this._element=T,this._screenElement=D,this._linkifier=I,this._bufferService=P,this._coreService=H,this._mouseService=F,this._optionsService=V,this._renderService=X,this._coreBrowserService=W,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.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 g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.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 T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!T||!D||T[0]===D[0]&&T[1]===D[1])}get selectionText(){const T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!T||!D)return"";const I=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(T[0]===D[0])return"";const H=T[0]H.replace(E," "))).join(v.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const v=window.open();if(v){try{v.opener=null}catch{}v.location.href=b}else console.warn("Opening link blocked as opener could not be cleared")}}l.OscLinkProvider=g=d([_(0,m.IBufferService),_(1,m.IOptionsService),_(2,m.IOscLinkService)],g)},6193:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.RenderDebouncer=void 0,l.RenderDebouncer=class{constructor(c,d){this._renderCallback=c,this._coreBrowserService=d,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,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d,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),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Terminal=void 0;const d=c(3614),_=c(3656),f=c(3551),m=c(9042),g=c(3730),S=c(1680),k=c(3107),b=c(5744),v=c(2950),x=c(1296),y=c(428),C=c(4269),A=c(5114),E=c(8934),j=c(3230),T=c(9312),D=c(4725),I=c(6731),P=c(8055),B=c(8969),F=c(8460),V=c(844),X=c(6114),W=c(8437),Z=c(2584),J=c(7399),$=c(5941),L=c(9074),H=c(2585),Y=c(5435),G=c(4567),ee=c(779);class oe extends B.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(ie={}){super(ie),this.browser=X,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new V.MutableDisposable),this._onCursorMove=this.register(new F.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new F.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new F.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new F.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new F.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new F.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new F.EventEmitter),this._onBlur=this.register(new F.EventEmitter),this._onA11yCharEmitter=this.register(new F.EventEmitter),this._onA11yTabEmitter=this.register(new F.EventEmitter),this._onWillOpen=this.register(new F.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(H.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ee.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(g.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((q,ne)=>this.refresh(q,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((q=>this._reportWindowsOptions(q)))),this.register(this._inputHandler.onColor((q=>this._handleColorEvent(q)))),this.register((0,F.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,F.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,F.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((q=>this._afterResize(q.cols,q.rows)))),this.register((0,V.toDisposable)((()=>{var q,ne;this._customKeyEventHandler=void 0,(ne=(q=this.element)==null?void 0:q.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent(ie){if(this._themeService)for(const q of ie){let ne,le="";switch(q.index){case 256:ne="foreground",le="10";break;case 257:ne="background",le="11";break;case 258:ne="cursor",le="12";break;default:ne="ansi",le="4;"+q.index}switch(q.type){case 0:const ge=P.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[q.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${le};${(0,$.toRgbString)(ge)}${Z.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((ue=>ue.ansi[q.index]=P.channels.toColor(...q.color)));else{const ue=ne;this._themeService.modifyColors((Ce=>Ce[ue]=P.channels.toColor(...q.color)))}break;case 2:this._themeService.restoreColor(q.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(ie){ie?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(ie){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var ie;return(ie=this.textarea)==null?void 0:ie.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 ie=this.buffer.ybase+this.buffer.y,q=this.buffer.lines.get(ie);if(!q)return;const ne=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,ge=q.getWidth(ne),ue=this._renderService.dimensions.css.cell.width*ge,Ce=this.buffer.y*this._renderService.dimensions.css.cell.height,Ee=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ee+"px",this.textarea.style.top=Ce+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,_.addDisposableDomListener)(this.element,"copy",(q=>{this.hasSelection()&&(0,d.copyHandler)(q,this._selectionService)})));const ie=q=>(0,d.handlePasteEvent)(q,this.textarea,this.coreService,this.optionsService);this.register((0,_.addDisposableDomListener)(this.textarea,"paste",ie)),this.register((0,_.addDisposableDomListener)(this.element,"paste",ie)),X.isFirefox?this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(q=>{q.button===2&&(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,_.addDisposableDomListener)(this.element,"contextmenu",(q=>{(0,d.rightClickHandler)(q,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),X.isLinux&&this.register((0,_.addDisposableDomListener)(this.element,"auxclick",(q=>{q.button===1&&(0,d.moveTextAreaUnderMouseCursor)(q,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,_.addDisposableDomListener)(this.textarea,"keyup",(ie=>this._keyUp(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keydown",(ie=>this._keyDown(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"keypress",(ie=>this._keyPress(ie)),!0)),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionupdate",(ie=>this._compositionHelper.compositionupdate(ie)))),this.register((0,_.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,_.addDisposableDomListener)(this.textarea,"input",(ie=>this._inputEvent(ie)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(ie){var ne;if(!ie)throw new Error("Terminal requires a parent element.");if(ie.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=ie.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"),ie.appendChild(this.element);const q=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),q.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,_.addDisposableDomListener)(this.screenElement,"mousemove",(le=>this.updateCursorStyle(le)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),q.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",m.promptLabel),X.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(A.CoreBrowserService,this.textarea,ie.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,_.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,_.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(y.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(I.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(C.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(j.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(v.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(E.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(q);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(T.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,_.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,_.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(b.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(x.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const ie=this,q=this.element;function ne(ue){const Ce=ie._mouseService.getMouseReportCoords(ue,ie.screenElement);if(!Ce)return!1;let Ee,Le;switch(ue.overrideType||ue.type){case"mousemove":Le=32,ue.buttons===void 0?(Ee=3,ue.button!==void 0&&(Ee=ue.button<3?ue.button:3)):Ee=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":Le=0,Ee=ue.button<3?ue.button:3;break;case"mousedown":Le=1,Ee=ue.button<3?ue.button:3;break;case"wheel":if(ie._customWheelEventHandler&&ie._customWheelEventHandler(ue)===!1||ie.viewport.getLinesScrolled(ue)===0)return!1;Le=ue.deltaY<0?0:1,Ee=4;break;default:return!1}return!(Le===void 0||Ee===void 0||Ee>4)&&ie.coreMouseService.triggerMouseEvent({col:Ce.col,row:Ce.row,x:Ce.x,y:Ce.y,button:Ee,action:Le,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},ge={mouseup:ue=>(ne(ue),ue.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ue)),wheel:ue=>(ne(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&ne(ue)},mousemove:ue=>{ue.buttons||ne(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),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&ue?le.mousemove||(q.addEventListener("mousemove",ge.mousemove),le.mousemove=ge.mousemove):(q.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ue?le.wheel||(q.addEventListener("wheel",ge.wheel,{passive:!1}),le.wheel=ge.wheel):(q.removeEventListener("wheel",le.wheel),le.wheel=null),2&ue?le.mouseup||(le.mouseup=ge.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ue?le.mousedrag||(le.mousedrag=ge.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,_.addDisposableDomListener)(q,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return ne(ue),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ue)}))),this.register((0,_.addDisposableDomListener)(q,"wheel",(ue=>{if(!le.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ue)===!1)return!1;if(!this.buffer.hasScrollback){const Ce=this.viewport.getLinesScrolled(ue);if(Ce===0)return;const Ee=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let Le="";for(let Pe=0;Pe{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,_.addDisposableDomListener)(q,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(ie,q){var ne;(ne=this._renderService)==null||ne.refreshRows(ie,q)}updateCursorStyle(ie){var q;(q=this._selectionService)!=null&&q.shouldColumnSelect(ie)?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(ie,q,ne=0){var le;ne===1?(super.scrollLines(ie,q,ne),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(ie)}paste(ie){(0,d.paste)(ie,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(ie){this._customKeyEventHandler=ie}attachCustomWheelEventHandler(ie){this._customWheelEventHandler=ie}registerLinkProvider(ie){return this._linkProviderService.registerLinkProvider(ie)}registerCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const q=this._characterJoinerService.register(ie);return this.refresh(0,this.rows-1),q}deregisterCharacterJoiner(ie){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(ie)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(ie){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+ie)}registerDecoration(ie){return this._decorationService.registerDecoration(ie)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(ie,q,ne){this._selectionService.setSelection(ie,q,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 ie;(ie=this._selectionService)==null||ie.clearSelection()}selectAll(){var ie;(ie=this._selectionService)==null||ie.selectAll()}selectLines(ie,q){var ne;(ne=this._selectionService)==null||ne.selectLines(ie,q)}_keyDown(ie){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;const q=this.browser.isMac&&this.options.macOptionIsMeta&&ie.altKey;if(!q&&!this._compositionHelper.keydown(ie))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;q||ie.key!=="Dead"&&ie.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,J.evaluateKeyboardEvent)(ie,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(ie),ne.type===3||ne.type===2){const le=this.rows-1;return this.scrollLines(ne.type===2?-le:le),this.cancel(ie,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,ie)||(ne.cancel&&this.cancel(ie,!0),!ne.key||!!(ie.key&&!ie.ctrlKey&&!ie.altKey&&!ie.metaKey&&ie.key.length===1&&ie.key.charCodeAt(0)>=65&&ie.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:ie}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||ie.altKey||ie.ctrlKey?this.cancel(ie,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(ie,q){const ne=ie.isMac&&!this.options.macOptionIsMeta&&q.altKey&&!q.ctrlKey&&!q.metaKey||ie.isWindows&&q.altKey&&q.ctrlKey&&!q.metaKey||ie.isWindows&&q.getModifierState("AltGraph");return q.type==="keypress"?ne:ne&&(!q.keyCode||q.keyCode>47)}_keyUp(ie){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1||((function(q){return q.keyCode===16||q.keyCode===17||q.keyCode===18})(ie)||this.focus(),this.updateCursorStyle(ie),this._keyPressHandled=!1)}_keyPress(ie){let q;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(ie)===!1)return!1;if(this.cancel(ie),ie.charCode)q=ie.charCode;else if(ie.which===null||ie.which===void 0)q=ie.keyCode;else{if(ie.which===0||ie.charCode===0)return!1;q=ie.which}return!(!q||(ie.altKey||ie.ctrlKey||ie.metaKey)&&!this._isThirdLevelShift(this.browser,ie)||(q=String.fromCharCode(q),this._onKey.fire({key:q,domEvent:ie}),this._showCursor(),this.coreService.triggerDataEvent(q,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(ie){if(ie.data&&ie.inputType==="insertText"&&(!ie.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const q=ie.data;return this.coreService.triggerDataEvent(q,!0),this.cancel(ie),!0}return!1}resize(ie,q){ie!==this.cols||q!==this.rows?super.resize(ie,q):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(ie,q){var ne,le;(ne=this._charSizeService)==null||ne.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var ie;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 q=1;q{Object.defineProperty(l,"__esModule",{value:!0}),l.TimeBasedDebouncer=void 0,l.TimeBasedDebouncer=class{constructor(c,d=1e3){this._renderCallback=c,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,d,_){this._rowCount=_,c=c!==void 0?c:0,d=d!==void 0?d: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,d):d;const f=Date.now();if(f-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=f,this._innerRefresh();else if(!this._additionalRefreshRequested){const m=f-this._lastRefreshMs,g=this._debounceThresholdMS-m;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),g)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,d)}}},1680:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Viewport=void 0;const f=c(3656),m=c(4725),g=c(8460),S=c(844),k=c(2585);let b=l.Viewport=class extends S.Disposable{constructor(v,x,y,C,A,E,j,T){super(),this._viewportElement=v,this._scrollArea=x,this._bufferService=y,this._optionsService=C,this._charSizeService=A,this._renderService=E,this._coreBrowserService=j,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 g.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((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(T.colors),this.register(T.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(v){this._viewportElement.style.backgroundColor=v.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(v){if(v)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const v=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==v&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=v),this._refreshAnimationFrame=null}syncScrollArea(v=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(v);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(v)}_handleScroll(v){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const x=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:x,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const v=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(v*(this._smoothScrollState.target-this._smoothScrollState.origin)),v<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(v,x){const y=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(x<0&&this._viewportElement.scrollTop!==0||x>0&&y0&&(y=B),C=""}}return{bufferElements:A,cursorElement:y}}getLinesScrolled(v){if(v.deltaY===0||v.shiftKey)return 0;let x=this._applyScrollModifier(v.deltaY,v);return v.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(x/=this._currentRowHeight+0,this._wheelPartialScroll+=x,x=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):v.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(x*=this._bufferService.rows),x}_applyScrollModifier(v,x){const y=this._optionsService.rawOptions.fastScrollModifier;return y==="alt"&&x.altKey||y==="ctrl"&&x.ctrlKey||y==="shift"&&x.shiftKey?v*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:v*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(v){this._lastTouchY=v.touches[0].pageY}handleTouchMove(v){const x=this._lastTouchY-v.touches[0].pageY;return this._lastTouchY=v.touches[0].pageY,x!==0&&(this._viewportElement.scrollTop+=x,this._bubbleScroll(v,x))}};l.Viewport=b=d([_(2,k.IBufferService),_(3,k.IOptionsService),_(4,m.ICharSizeService),_(5,m.IRenderService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],b)},3107:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferDecorationRenderer=void 0;const f=c(4725),m=c(844),g=c(2585);let S=l.BufferDecorationRenderer=class extends m.Disposable{constructor(k,b,v,x,y){super(),this._screenElement=k,this._bufferService=b,this._coreBrowserService=v,this._decorationService=x,this._renderService=y,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,m.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const k of this._decorationService.decorations)this._renderDecoration(k);this._dimensionsChanged=!1}_renderDecoration(k){this._refreshStyle(k),this._dimensionsChanged&&this._refreshXPosition(k)}_createElement(k){var x;const b=this._coreBrowserService.mainDocument.createElement("div");b.classList.add("xterm-decoration"),b.classList.toggle("xterm-decoration-top-layer",((x=k==null?void 0:k.options)==null?void 0:x.layer)==="top"),b.style.width=`${Math.round((k.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,b.style.height=(k.options.height||1)*this._renderService.dimensions.css.cell.height+"px",b.style.top=(k.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",b.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const v=k.options.x??0;return v&&v>this._bufferService.cols&&(b.style.display="none"),this._refreshXPosition(k,b),b}_refreshStyle(k){const b=k.marker.line-this._bufferService.buffers.active.ydisp;if(b<0||b>=this._bufferService.rows)k.element&&(k.element.style.display="none",k.onRenderEmitter.fire(k.element));else{let v=this._decorationElements.get(k);v||(v=this._createElement(k),k.element=v,this._decorationElements.set(k,v),this._container.appendChild(v),k.onDispose((()=>{this._decorationElements.delete(k),v.remove()}))),v.style.top=b*this._renderService.dimensions.css.cell.height+"px",v.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(v)}}_refreshXPosition(k,b=k.element){if(!b)return;const v=k.options.x??0;(k.options.anchor||"left")==="right"?b.style.right=v?v*this._renderService.dimensions.css.cell.width+"px":"":b.style.left=v?v*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(k){var b;(b=this._decorationElements.get(k))==null||b.remove(),this._decorationElements.delete(k),k.dispose()}};l.BufferDecorationRenderer=S=d([_(1,g.IBufferService),_(2,f.ICoreBrowserService),_(3,g.IDecorationService),_(4,f.IRenderService)],S)},5871:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorZoneStore=void 0,l.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 d of this._zones)if(d.color===c.options.overviewRulerOptions.color&&d.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,c.marker.line))return;if(this._lineAdjacentToZone(d,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(d,c.marker.line)}if(this._zonePoolIndex=c.startBufferLine&&d<=c.endBufferLine}_lineAdjacentToZone(c,d,_){return d>=c.startBufferLine-this._linePadding[_||"full"]&&d<=c.endBufferLine+this._linePadding[_||"full"]}_addLineToZone(c,d){c.startBufferLine=Math.min(c.startBufferLine,d),c.endBufferLine=Math.max(c.endBufferLine,d)}}},5744:function(o,l,c){var d=this&&this.__decorate||function(y,C,A,E){var j,T=arguments.length,D=T<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,A):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,A,E);else for(var I=y.length-1;I>=0;I--)(j=y[I])&&(D=(T<3?j(D):T>3?j(C,A,D):j(C,A))||D);return T>3&&D&&Object.defineProperty(C,A,D),D},_=this&&this.__param||function(y,C){return function(A,E){C(A,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OverviewRulerRenderer=void 0;const f=c(5871),m=c(4725),g=c(844),S=c(2585),k={full:0,left:0,center:0,right:0},b={full:0,left:0,center:0,right:0},v={full:0,left:0,center:0,right:0};let x=l.OverviewRulerRenderer=class extends g.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(y,C,A,E,j,T,D){var P;super(),this._viewportElement=y,this._screenElement=C,this._bufferService=A,this._decorationService=E,this._renderService=j,this._optionsService=T,this._coreBrowserService=D,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(),(P=this._viewportElement.parentElement)==null||P.insertBefore(this._canvas,this._viewportElement);const I=this._canvas.getContext("2d");if(!I)throw new Error("Ctx cannot be null");this._ctx=I,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,g.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 y=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);b.full=this._canvas.width,b.left=y,b.center=C,b.right=y,this._refreshDrawHeightConstants(),v.full=0,v.left=0,v.center=b.left,v.right=b.left+b.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const y=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(y,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 y=this._colorZoneStore.zones;for(const C of y)C.position!=="full"&&this._renderColorZone(C);for(const C of y)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(y){this._ctx.fillStyle=y.color,this._ctx.fillRect(v[y.position||"full"],Math.round((this._canvas.height-1)*(y.startBufferLine/this._bufferService.buffers.active.lines.length)-k[y.position||"full"]/2),b[y.position||"full"],Math.round((this._canvas.height-1)*((y.endBufferLine-y.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[y.position||"full"]))}_queueRefresh(y,C){this._shouldUpdateDimensions=y||this._shouldUpdateDimensions,this._shouldUpdateAnchor=C||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};l.OverviewRulerRenderer=x=d([_(2,S.IBufferService),_(3,S.IDecorationService),_(4,m.IRenderService),_(5,S.IOptionsService),_(6,m.ICoreBrowserService)],x)},2950:function(o,l,c){var d=this&&this.__decorate||function(k,b,v,x){var y,C=arguments.length,A=C<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(k,b,v,x);else for(var E=k.length-1;E>=0;E--)(y=k[E])&&(A=(C<3?y(A):C>3?y(b,v,A):y(b,v))||A);return C>3&&A&&Object.defineProperty(b,v,A),A},_=this&&this.__param||function(k,b){return function(v,x){b(v,x,k)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CompositionHelper=void 0;const f=c(4725),m=c(2585),g=c(2584);let S=l.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(k,b,v,x,y,C){this._textarea=k,this._compositionView=b,this._bufferService=v,this._optionsService=x,this._coreService=y,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 b={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let v;this._isSendingComposition=!1,b.start+=this._dataAlreadySent.length,v=this._isComposing?this._textarea.value.substring(b.start,b.end):this._textarea.value.substring(b.start),v.length>0&&this._coreService.triggerDataEvent(v,!0)}}),0)}else{this._isSendingComposition=!1;const b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}}_handleAnyTextareaChanges(){const k=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const b=this._textarea.value,v=b.replace(k,"");this._dataAlreadySent=v,b.length>k.length?this._coreService.triggerDataEvent(v,!0):b.lengththis.updateCompositionElements(!0)),0)}}};l.CompositionHelper=S=d([_(2,m.IBufferService),_(3,m.IOptionsService),_(4,m.ICoreService),_(5,f.IRenderService)],S)},9806:(o,l)=>{function c(d,_,f){const m=f.getBoundingClientRect(),g=d.getComputedStyle(f),S=parseInt(g.getPropertyValue("padding-left")),k=parseInt(g.getPropertyValue("padding-top"));return[_.clientX-m.left-S,_.clientY-m.top-k]}Object.defineProperty(l,"__esModule",{value:!0}),l.getCoords=l.getCoordsRelativeToElement=void 0,l.getCoordsRelativeToElement=c,l.getCoords=function(d,_,f,m,g,S,k,b,v){if(!S)return;const x=c(d,_,f);return x?(x[0]=Math.ceil((x[0]+(v?k/2:0))/k),x[1]=Math.ceil(x[1]/b),x[0]=Math.min(Math.max(x[0],1),m+(v?1:0)),x[1]=Math.min(Math.max(x[1],1),g),x):void 0}},9504:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.moveToCellSequence=void 0;const d=c(2584);function _(b,v,x,y){const C=b-f(b,x),A=v-f(v,x),E=Math.abs(C-A)-(function(j,T,D){let I=0;const P=j-f(j,D),B=T-f(T,D);for(let F=0;F=0&&bv?"A":"B"}function g(b,v,x,y,C,A){let E=b,j=v,T="";for(;E!==x||j!==y;)E+=C?1:-1,C&&E>A.cols-1?(T+=A.buffer.translateBufferLineToString(j,!1,b,E),E=0,b=0,j++):!C&&E<0&&(T+=A.buffer.translateBufferLineToString(j,!1,0,b+1),E=A.cols-1,b=E,j--);return T+A.buffer.translateBufferLineToString(j,!1,b,E)}function S(b,v){const x=v?"O":"[";return d.C0.ESC+x+b}function k(b,v){b=Math.floor(b);let x="";for(let y=0;y0?P-f(P,B):D;const X=P,W=(function(Z,J,$,L,H,Y){let G;return G=_($,L,H,Y).length>0?L-f(L,H):J,Z<$&&G<=L||Z>=$&&Gb?"D":"C",k(Math.abs(C-b),S(E,y));E=A>v?"D":"C";const j=Math.abs(A-v);return k((function(T,D){return D.cols-T})(A>v?b:C,x)+(j-1)*x.cols+1+((A>v?C:b)-1),S(E,y))}},1296:function(o,l,c){var d=this&&this.__decorate||function(F,V,X,W){var Z,J=arguments.length,$=J<3?V:W===null?W=Object.getOwnPropertyDescriptor(V,X):W;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(F,V,X,W);else for(var L=F.length-1;L>=0;L--)(Z=F[L])&&($=(J<3?Z($):J>3?Z(V,X,$):Z(V,X))||$);return J>3&&$&&Object.defineProperty(V,X,$),$},_=this&&this.__param||function(F,V){return function(X,W){V(X,W,F)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRenderer=void 0;const f=c(3787),m=c(2550),g=c(2223),S=c(6171),k=c(6052),b=c(4725),v=c(8055),x=c(8460),y=c(844),C=c(2585),A="xterm-dom-renderer-owner-",E="xterm-rows",j="xterm-fg-",T="xterm-bg-",D="xterm-focus",I="xterm-selection";let P=1,B=l.DomRenderer=class extends y.Disposable{constructor(F,V,X,W,Z,J,$,L,H,Y,G,ee,oe){super(),this._terminal=F,this._document=V,this._element=X,this._screenElement=W,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=$,this._charSizeService=H,this._optionsService=Y,this._bufferService=G,this._coreBrowserService=ee,this._themeService=oe,this._terminalClass=P++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new x.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(E),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(I),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((he=>this._injectCss(he)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(f.DomRendererRowFactory,document),this._element.classList.add(A+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((he=>this._handleLinkHover(he)))),this.register(this._linkifier2.onHideLinkUnderline((he=>this._handleLinkLeave(he)))),this.register((0,y.toDisposable)((()=>{this._element.classList.remove(A+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new m.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 F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),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/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),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 X of this._rowElements)X.style.width=`${this.dimensions.css.canvas.width}px`,X.style.height=`${this.dimensions.css.cell.height}px`,X.style.lineHeight=`${this.dimensions.css.cell.height}px`,X.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const V=`${this._terminalSelector} .${E} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=V,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(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let V=`${this._terminalSelector} .${E} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;V+=`${this._terminalSelector} .${E} .xterm-dim { color: ${v.color.multiplyOpacity(F.foreground,.5).css};}`,V+=`${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 X=`blink_underline_${this._terminalClass}`,W=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;V+=`@keyframes ${X} { 50% { border-bottom-style: hidden; }}`,V+=`@keyframes ${W} { 50% { box-shadow: none; }}`,V+=`@keyframes ${Z} { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,V+=`${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${X} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${E}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css};}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${E} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,V+=`${this._terminalSelector} .${I} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${I} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${I} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of F.ansi.entries())V+=`${this._terminalSelector} .${j}${J} { color: ${$.css}; }${this._terminalSelector} .${j}${J}.xterm-dim { color: ${v.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${T}${J} { background-color: ${$.css}; }`;V+=`${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR} { color: ${v.color.opaque(F.background).css}; }${this._terminalSelector} .${j}${g.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${v.color.multiplyOpacity(v.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${T}${g.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=V}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,V){for(let X=this._rowElements.length;X<=V;X++){const W=this._document.createElement("div");this._rowContainer.appendChild(W),this._rowElements.push(W)}for(;this._rowElements.length>V;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,V){this._refreshRowElements(F,V),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(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,V,X){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,V,X),this.renderRows(0,this._bufferService.rows-1),!F||!V)return;this._selectionRenderModel.update(this._terminal,F,V,X);const W=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(X){const H=F[0]>V[0];L.appendChild(this._createSelectionElement(J,H?V[0]:F[0],H?F[0]:V[0],$-J+1))}else{const H=W===J?F[0]:0,Y=J===Z?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,H,Y));const G=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,G)),J!==$){const ee=Z===$?V[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,ee))}}this._selectionContainer.appendChild(L)}_createSelectionElement(F,V,X,W=1){const Z=this._document.createElement("div"),J=V*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(X-V);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),Z.style.height=W*this.dimensions.css.cell.height+"px",Z.style.top=F*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 F of this._rowElements)F.replaceChildren()}renderRows(F,V){const X=this._bufferService.buffer,W=X.ybase+X.y,Z=Math.min(X.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let H=F;H<=V;H++){const Y=H+X.ydisp,G=this._rowElements[H],ee=X.lines.get(Y);if(!G||!ee)break;G.replaceChildren(...this._rowFactory.createRow(ee,Y,Y===W,$,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${A}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,V,X,W,Z,J){X<0&&(F=0),W<0&&(V=0);const $=this._bufferService.rows-1;X=Math.max(Math.min(X,$),0),W=Math.max(Math.min(W,$),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,H=L.ybase+L.y,Y=Math.min(L.x,Z-1),G=this._optionsService.rawOptions.cursorBlink,ee=this._optionsService.rawOptions.cursorStyle,oe=this._optionsService.rawOptions.cursorInactiveStyle;for(let he=X;he<=W;++he){const ie=he+L.ydisp,q=this._rowElements[he],ne=L.lines.get(ie);if(!q||!ne)break;q.replaceChildren(...this._rowFactory.createRow(ne,ie,ie===H,ee,oe,Y,G,this.dimensions.css.cell.width,this._widthCache,J?he===X?F:0:-1,J?(he===W?V:Z)-1:-1))}}};l.DomRenderer=B=d([_(7,C.IInstantiationService),_(8,b.ICharSizeService),_(9,C.IOptionsService),_(10,C.IBufferService),_(11,b.ICoreBrowserService),_(12,b.IThemeService)],B)},3787:function(o,l,c){var d=this&&this.__decorate||function(E,j,T,D){var I,P=arguments.length,B=P<3?j:D===null?D=Object.getOwnPropertyDescriptor(j,T):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(E,j,T,D);else for(var F=E.length-1;F>=0;F--)(I=E[F])&&(B=(P<3?I(B):P>3?I(j,T,B):I(j,T))||B);return P>3&&B&&Object.defineProperty(j,T,B),B},_=this&&this.__param||function(E,j){return function(T,D){j(T,D,E)}};Object.defineProperty(l,"__esModule",{value:!0}),l.DomRendererRowFactory=void 0;const f=c(2223),m=c(643),g=c(511),S=c(2585),k=c(8055),b=c(4725),v=c(4269),x=c(6171),y=c(3734);let C=l.DomRendererRowFactory=class{constructor(E,j,T,D,I,P,B){this._document=E,this._characterJoinerService=j,this._optionsService=T,this._coreBrowserService=D,this._coreService=I,this._decorationService=P,this._themeService=B,this._workCell=new g.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(E,j,T){this._selectionStart=E,this._selectionEnd=j,this._columnSelectMode=T}createRow(E,j,T,D,I,P,B,F,V,X,W){const Z=[],J=this._characterJoinerService.getJoinedCharacters(j),$=this._themeService.colors;let L,H=E.getNoBgTrimmedLength();T&&H0&&Ce===J[0][0]){Le=!0;const bt=J.shift();Ve=new v.JoinedCellData(this._workCell,E.translateToString(!0,bt[0],bt[1]),bt[1]-bt[0]),Pe=bt[1]-1,Ee=Ve.getWidth()}const ht=this._isCellInSelection(Ce,j),Be=T&&Ce===P,wt=ue&&Ce>=X&&Ce<=W;let zt=!1;this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{zt=!0}));let vt=Ve.getChars()||m.WHITESPACE_CELL_CHAR;if(vt===" "&&(Ve.isUnderline()||Ve.isOverline())&&(vt=" "),le=Ee*F-V.get(vt,Ve.isBold(),Ve.isItalic()),L){if(Y&&(ht&&ne||!ht&&!ne&&Ve.bg===ee)&&(ht&&ne&&$.selectionForeground||Ve.fg===oe)&&Ve.extended.ext===he&&wt===ie&&le===q&&!Be&&!Le&&!zt){Ve.isInvisible()?G+=m.WHITESPACE_CELL_CHAR:G+=vt,Y++;continue}Y&&(L.textContent=G),L=this._document.createElement("span"),Y=0,G=""}else L=this._document.createElement("span");if(ee=Ve.bg,oe=Ve.fg,he=Ve.extended.ext,ie=wt,q=le,ne=ht,Le&&P>=Ce&&P<=Pe&&(P=Ce),!this._coreService.isCursorHidden&&Be&&this._coreService.isCursorInitialized){if(ge.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&ge.push("xterm-cursor-blink"),ge.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(I)switch(I){case"outline":ge.push("xterm-cursor-outline");break;case"block":ge.push("xterm-cursor-block");break;case"bar":ge.push("xterm-cursor-bar");break;case"underline":ge.push("xterm-cursor-underline")}}if(Ve.isBold()&&ge.push("xterm-bold"),Ve.isItalic()&&ge.push("xterm-italic"),Ve.isDim()&&ge.push("xterm-dim"),G=Ve.isInvisible()?m.WHITESPACE_CELL_CHAR:Ve.getChars()||m.WHITESPACE_CELL_CHAR,Ve.isUnderline()&&(ge.push(`xterm-underline-${Ve.extended.underlineStyle}`),G===" "&&(G=" "),!Ve.isUnderlineColorDefault()))if(Ve.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${y.AttributeData.toColorRGB(Ve.getUnderlineColor()).join(",")})`;else{let bt=Ve.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ve.isBold()&&bt<8&&(bt+=8),L.style.textDecorationColor=$.ansi[bt].css}Ve.isOverline()&&(ge.push("xterm-overline"),G===" "&&(G=" ")),Ve.isStrikethrough()&&ge.push("xterm-strikethrough"),wt&&(L.style.textDecoration="underline");let Lt=Ve.getFgColor(),St=Ve.getFgColorMode(),kt=Ve.getBgColor(),xe=Ve.getBgColorMode();const je=!!Ve.isInverse();if(je){const bt=Lt;Lt=kt,kt=bt;const nn=St;St=xe,xe=nn}let We,st,nt,Ht=!1;switch(this._decorationService.forEachDecorationAtCell(Ce,j,void 0,(bt=>{bt.options.layer!=="top"&&Ht||(bt.backgroundColorRGB&&(xe=50331648,kt=bt.backgroundColorRGB.rgba>>8&16777215,We=bt.backgroundColorRGB),bt.foregroundColorRGB&&(St=50331648,Lt=bt.foregroundColorRGB.rgba>>8&16777215,st=bt.foregroundColorRGB),Ht=bt.options.layer==="top")})),!Ht&&ht&&(We=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,kt=We.rgba>>8&16777215,xe=50331648,Ht=!0,$.selectionForeground&&(St=50331648,Lt=$.selectionForeground.rgba>>8&16777215,st=$.selectionForeground)),Ht&&ge.push("xterm-decoration-top"),xe){case 16777216:case 33554432:nt=$.ansi[kt],ge.push(`xterm-bg-${kt}`);break;case 50331648:nt=k.channels.toColor(kt>>16,kt>>8&255,255&kt),this._addStyle(L,`background-color:#${A((kt>>>0).toString(16),"0",6)}`);break;default:je?(nt=$.foreground,ge.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):nt=$.background}switch(We||Ve.isDim()&&(We=k.color.multiplyOpacity(nt,.5)),St){case 16777216:case 33554432:Ve.isBold()&&Lt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Lt+=8),this._applyMinimumContrast(L,nt,$.ansi[Lt],Ve,We,void 0)||ge.push(`xterm-fg-${Lt}`);break;case 50331648:const bt=k.channels.toColor(Lt>>16&255,Lt>>8&255,255&Lt);this._applyMinimumContrast(L,nt,bt,Ve,We,st)||this._addStyle(L,`color:#${A(Lt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,nt,$.foreground,Ve,We,st)||je&&ge.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}ge.length&&(L.className=ge.join(" "),ge.length=0),Be||Le||zt?L.textContent=G:Y++,le!==this.defaultSpacing&&(L.style.letterSpacing=`${le}px`),Z.push(L),Ce=Pe}return L&&Y&&(L.textContent=G),Z}_applyMinimumContrast(E,j,T,D,I,P){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,x.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const B=this._getContrastCache(D);let F;if(I||P||(F=B.getColor(j.rgba,T.rgba)),F===void 0){const V=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);F=k.color.ensureContrastRatio(I||j,P||T,V),B.setColor((I||j).rgba,(P||T).rgba,F??null)}return!!F&&(this._addStyle(E,`color:${F.css}`),!0)}_getContrastCache(E){return E.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(E,j){E.setAttribute("style",`${E.getAttribute("style")||""}${j};`)}_isCellInSelection(E,j){const T=this._selectionStart,D=this._selectionEnd;return!(!T||!D)&&(this._columnSelectMode?T[0]<=D[0]?E>=T[0]&&j>=T[1]&&E=T[1]&&E>=D[0]&&j<=D[1]:j>T[1]&&j=T[0]&&E=T[0])}};function A(E,j,T){for(;E.length{Object.defineProperty(l,"__esModule",{value:!0}),l.WidthCache=void 0,l.WidthCache=class{constructor(c,d){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 _=c.createElement("span");_.classList.add("xterm-char-measure-element");const f=c.createElement("span");f.classList.add("xterm-char-measure-element"),f.style.fontWeight="bold";const m=c.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontStyle="italic";const g=c.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontWeight="bold",g.style.fontStyle="italic",this._measureElements=[_,f,m,g],this._container.appendChild(_),this._container.appendChild(f),this._container.appendChild(m),this._container.appendChild(g),d.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,d,_,f){c===this._font&&d===this._fontSize&&_===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=d,this._weight=_,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${_}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${_}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,d,_){let f=0;if(!d&&!_&&c.length===1&&(f=c.charCodeAt(0))<256){if(this._flat[f]!==-9999)return this._flat[f];const S=this._measure(c,0);return S>0&&(this._flat[f]=S),S}let m=c;d&&(m+="B"),_&&(m+="I");let g=this._holey.get(m);if(g===void 0){let S=0;d&&(S|=1),_&&(S|=2),g=this._measure(c,S),g>0&&this._holey.set(m,g)}return g}_measure(c,d){const _=this._measureElements[d];return _.textContent=c.repeat(32),_.offsetWidth/32}}},2223:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.TEXT_BASELINE=l.DIM_OPACITY=l.INVERTED_DEFAULT_COLOR=void 0;const d=c(6114);l.INVERTED_DEFAULT_COLOR=257,l.DIM_OPACITY=.5,l.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(o,l)=>{function c(_){return 57508<=_&&_<=57558}function d(_){return _>=128512&&_<=128591||_>=127744&&_<=128511||_>=128640&&_<=128767||_>=9728&&_<=9983||_>=9984&&_<=10175||_>=65024&&_<=65039||_>=129280&&_<=129535||_>=127462&&_<=127487}Object.defineProperty(l,"__esModule",{value:!0}),l.computeNextVariantOffset=l.createRenderDimensions=l.treatGlyphAsBackgroundColor=l.allowRescaling=l.isEmoji=l.isRestrictedPowerlineGlyph=l.isPowerlineGlyph=l.throwIfFalsy=void 0,l.throwIfFalsy=function(_){if(!_)throw new Error("value must not be falsy");return _},l.isPowerlineGlyph=c,l.isRestrictedPowerlineGlyph=function(_){return 57520<=_&&_<=57527},l.isEmoji=d,l.allowRescaling=function(_,f,m,g){return f===1&&m>Math.ceil(1.5*g)&&_!==void 0&&_>255&&!d(_)&&!c(_)&&!(function(S){return 57344<=S&&S<=63743})(_)},l.treatGlyphAsBackgroundColor=function(_){return c(_)||(function(f){return 9472<=f&&f<=9631})(_)},l.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}}}},l.computeNextVariantOffset=function(_,f,m=0){return(_-(2*Math.round(f)-m))%(2*Math.round(f))}},6052:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.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(_,f,m,g=!1){if(this.selectionStart=f,this.selectionEnd=m,!f||!m||f[0]===m[0]&&f[1]===m[1])return void this.clear();const S=_.buffers.active.ydisp,k=f[1]-S,b=m[1]-S,v=Math.max(k,0),x=Math.min(b,_.rows-1);v>=_.rows||x<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=g,this.viewportStartRow=k,this.viewportEndRow=b,this.viewportCappedStartRow=v,this.viewportCappedEndRow=x,this.startCol=f[0],this.endCol=m[0])}isCellSelected(_,f,m){return!!this.hasSelection&&(m-=_.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?f>=this.startCol&&m>=this.viewportCappedStartRow&&f=this.viewportCappedStartRow&&f>=this.endCol&&m<=this.viewportCappedEndRow:m>this.viewportStartRow&&m=this.startCol&&f=this.startCol)}}l.createSelectionRenderModel=function(){return new c}},456:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionModel=void 0,l.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,d=this.selectionEnd;return!(!c||!d)&&(c[1]>d[1]||c[1]===d[1]&&c[0]>d[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(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharSizeService=void 0;const f=c(2585),m=c(8460),g=c(844);let S=l.CharSizeService=class extends g.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(x,y,C){super(),this._optionsService=C,this.width=0,this.height=0,this._onCharSizeChange=this.register(new m.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new v(this._optionsService))}catch{this._measureStrategy=this.register(new b(x,y,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const x=this._measureStrategy.measure();x.width===this.width&&x.height===this.height||(this.width=x.width,this.height=x.height,this._onCharSizeChange.fire())}};l.CharSizeService=S=d([_(2,f.IOptionsService)],S);class k extends g.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(y,C){y!==void 0&&y>0&&C!==void 0&&C>0&&(this._result.width=y,this._result.height=C)}}class b extends k{constructor(y,C,A){super(),this._document=y,this._parentElement=C,this._optionsService=A,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 v extends k{constructor(y){super(),this._optionsService=y,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 y=this._ctx.measureText("W");return this._validateAndSet(y.width,y.fontBoundingBoxAscent+y.fontBoundingBoxDescent),this._result}}},4269:function(o,l,c){var d=this&&this.__decorate||function(v,x,y,C){var A,E=arguments.length,j=E<3?x:C===null?C=Object.getOwnPropertyDescriptor(x,y):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,x,y,C);else for(var T=v.length-1;T>=0;T--)(A=v[T])&&(j=(E<3?A(j):E>3?A(x,y,j):A(x,y))||j);return E>3&&j&&Object.defineProperty(x,y,j),j},_=this&&this.__param||function(v,x){return function(y,C){x(y,C,v)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CharacterJoinerService=l.JoinedCellData=void 0;const f=c(3734),m=c(643),g=c(511),S=c(2585);class k extends f.AttributeData{constructor(x,y,C){super(),this.content=0,this.combinedData="",this.fg=x.fg,this.bg=x.bg,this.combinedData=y,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(x){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.JoinedCellData=k;let b=l.CharacterJoinerService=class GT{constructor(x){this._bufferService=x,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new g.CellData}register(x){const y={id:this._nextCharacterJoinerId++,handler:x};return this._characterJoiners.push(y),y.id}deregister(x){for(let y=0;y1){const B=this._getJoinedRanges(A,T,j,y,E);for(let F=0;F1){const P=this._getJoinedRanges(A,T,j,y,E);for(let B=0;B{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreBrowserService=void 0;const d=c(844),_=c(8460),f=c(3656);class m extends d.Disposable{constructor(k,b,v){super(),this._textarea=k,this._window=b,this.mainDocument=v,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new g(this._window),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new _.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((x=>this._screenDprMonitor.setWindow(x)))),this.register((0,_.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}}l.CoreBrowserService=m;class g extends d.Disposable{constructor(k){super(),this._parentWindow=k,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new _.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.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:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.LinkProviderService=void 0;const d=c(844);class _ extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(m){return this.linkProviders.push(m),{dispose:()=>{const g=this.linkProviders.indexOf(m);g!==-1&&this.linkProviders.splice(g,1)}}}}l.LinkProviderService=_},8934:function(o,l,c){var d=this&&this.__decorate||function(S,k,b,v){var x,y=arguments.length,C=y<3?k:v===null?v=Object.getOwnPropertyDescriptor(k,b):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(S,k,b,v);else for(var A=S.length-1;A>=0;A--)(x=S[A])&&(C=(y<3?x(C):y>3?x(k,b,C):x(k,b))||C);return y>3&&C&&Object.defineProperty(k,b,C),C},_=this&&this.__param||function(S,k){return function(b,v){k(b,v,S)}};Object.defineProperty(l,"__esModule",{value:!0}),l.MouseService=void 0;const f=c(4725),m=c(9806);let g=l.MouseService=class{constructor(S,k){this._renderService=S,this._charSizeService=k}getCoords(S,k,b,v,x){return(0,m.getCoords)(window,S,k,b,v,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,x)}getMouseReportCoords(S,k){const b=(0,m.getCoordsRelativeToElement)(window,S,k);if(this._charSizeService.hasValidSize)return b[0]=Math.min(Math.max(b[0],0),this._renderService.dimensions.css.canvas.width-1),b[1]=Math.min(Math.max(b[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(b[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(b[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(b[0]),y:Math.floor(b[1])}}};l.MouseService=g=d([_(0,f.IRenderService),_(1,f.ICharSizeService)],g)},3230:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.RenderService=void 0;const f=c(6193),m=c(4725),g=c(8460),S=c(844),k=c(7226),b=c(2585);let v=l.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(x,y,C,A,E,j,T,D){super(),this._rowCount=x,this._charSizeService=A,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new k.DebouncedIdleTask,this._observerDisposable=this.register(new S.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 g.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new g.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new g.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new g.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new f.RenderDebouncer(((I,P)=>this._renderRows(I,P)),T),this.register(this._renderDebouncer),this.register(T.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(j.onResize((()=>this._fullRefresh()))),this.register(j.buffers.onBufferActivate((()=>{var I;return(I=this._renderer.value)==null?void 0:I.clear()}))),this.register(C.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(E.onDecorationRegistered((()=>this._fullRefresh()))),this.register(E.onDecorationRemoved((()=>this._fullRefresh()))),this.register(C.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(j.cols,j.rows),this._fullRefresh()}))),this.register(C.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(j.buffer.y,j.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(T.window,y),this.register(T.onWindowChange((I=>this._registerIntersectionObserver(I,y))))}_registerIntersectionObserver(x,y){if("IntersectionObserver"in x){const C=new x.IntersectionObserver((A=>this._handleIntersectionChange(A[A.length-1])),{threshold:0});C.observe(y),this._observerDisposable.value=(0,S.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(x){this._isPaused=x.isIntersecting===void 0?x.intersectionRatio===0:!x.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(x,y,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(x,y,this._rowCount))}_renderRows(x,y){this._renderer.value&&(x=Math.min(x,this._rowCount-1),y=Math.min(y,this._rowCount-1),this._renderer.value.renderRows(x,y),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:x,end:y}),this._onRender.fire({start:x,end:y}),this._isNextRenderRedrawOnly=!0)}resize(x,y){this._rowCount=y,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(x){this._renderer.value=x,this._renderer.value&&(this._renderer.value.onRequestRedraw((y=>this.refreshRows(y.start,y.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(x){return this._renderDebouncer.addRefreshCallback(x)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var x,y;this._renderer.value&&((y=(x=this._renderer.value).clearTextureAtlas)==null||y.call(x),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(x,y){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(x,y)})):this._renderer.value.handleResize(x,y),this._fullRefresh())}handleCharSizeChanged(){var x;(x=this._renderer.value)==null||x.handleCharSizeChanged()}handleBlur(){var x;(x=this._renderer.value)==null||x.handleBlur()}handleFocus(){var x;(x=this._renderer.value)==null||x.handleFocus()}handleSelectionChanged(x,y,C){var A;this._selectionState.start=x,this._selectionState.end=y,this._selectionState.columnSelectMode=C,(A=this._renderer.value)==null||A.handleSelectionChanged(x,y,C)}handleCursorMove(){var x;(x=this._renderer.value)==null||x.handleCursorMove()}clear(){var x;(x=this._renderer.value)==null||x.clear()}};l.RenderService=v=d([_(2,b.IOptionsService),_(3,m.ICharSizeService),_(4,b.IDecorationService),_(5,b.IBufferService),_(6,m.ICoreBrowserService),_(7,m.IThemeService)],v)},9312:function(o,l,c){var d=this&&this.__decorate||function(T,D,I,P){var B,F=arguments.length,V=F<3?D:P===null?P=Object.getOwnPropertyDescriptor(D,I):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(T,D,I,P);else for(var X=T.length-1;X>=0;X--)(B=T[X])&&(V=(F<3?B(V):F>3?B(D,I,V):B(D,I))||V);return F>3&&V&&Object.defineProperty(D,I,V),V},_=this&&this.__param||function(T,D){return function(I,P){D(I,P,T)}};Object.defineProperty(l,"__esModule",{value:!0}),l.SelectionService=void 0;const f=c(9806),m=c(9504),g=c(456),S=c(4725),k=c(8460),b=c(844),v=c(6114),x=c(4841),y=c(511),C=c(2585),A=" ",E=new RegExp(A,"g");let j=l.SelectionService=class extends b.Disposable{constructor(T,D,I,P,B,F,V,X,W){super(),this._element=T,this._screenElement=D,this._linkifier=I,this._bufferService=P,this._coreService=B,this._mouseService=F,this._optionsService=V,this._renderService=X,this._coreBrowserService=W,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new y.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 g.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,b.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 T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!T||!D||T[0]===D[0]&&T[1]===D[1])}get selectionText(){const T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!T||!D)return"";const I=this._bufferService.buffer,P=[];if(this._activeSelectionMode===3){if(T[0]===D[0])return"";const B=T[0]B.replace(E," "))).join(v.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&T&&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(T){const D=this._getMouseBufferCoords(T),I=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(I&&P&&D)&&this._areCoordsInSelection(D,I,P)}isCellInSelection(T,D){const I=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!I||!P)&&this._areCoordsInSelection([T,D],I,P)}_areCoordsInSelection(T,D,I){return T[1]>D[1]&&T[1]=D[0]&&T[0]=D[0]}_selectWordAtCursor(T,D){var H,F;const I=(F=(H=this._linkifier.currentLink)==null?void 0:H.link)==null?void 0:F.range;if(I)return this._model.selectionStart=[I.start.x-1,I.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(I,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(T);return!!P&&(this._selectWordAt(P,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,D){this._model.clearSelection(),T=Math.max(T,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const D=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(T){let D=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const I=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=I?0:(D>I&&(D-=I),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(T){return v.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const D=this._getMouseBufferCoords(T);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(T){return T.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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 I=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(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const D=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const I=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(I&&I[0]!==void 0&&I[1]!==void 0){const P=(0,m.moveToCellSequence)(I[0]-1,I[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,I=!(!T||!D||T[0]===D[0]&&T[1]===D[1]);I?T&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,D,I)):this._oldHasSelection&&this._fireOnSelectionChange(T,D,I)}_fireOnSelectionChange(T,D,I){this._oldSelectionStart=T,this._oldSelectionEnd=D,this._oldHasSelection=I,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(T,D){let I=D;for(let P=0;D>=P;P++){const H=T.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?I--:H>1&&D!==P&&(I+=H-1)}return I}setSelection(T,D,I){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,D],this._model.selectionStartLength=I,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,D,I=!0,P=!0){if(T[0]>=this._bufferService.cols)return;const H=this._bufferService.buffer,F=H.lines.get(T[1]);if(!F)return;const V=H.translateBufferLineToString(T[1],!1);let X=this._convertViewportColToCharacterIndex(F,T[0]),W=X;const Z=T[0]-X;let J=0,B=0,L=0,$=0;if(V.charAt(X)===" "){for(;X>0&&V.charAt(X-1)===" ";)X--;for(;W1&&($+=he-1,W+=he-1);re>0&&X>0&&!this._isCharWordSeparator(F.loadCell(re-1,this._workCell));){F.loadCell(re-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,re--):ie>1&&(L+=ie-1,X-=ie-1),X--,re--}for(;oe1&&($+=ie-1,W+=ie-1),W++,oe++}}W++;let K=X+Z-J+L,G=Math.min(this._bufferService.cols,W-X+J+B-L-$);if(D||V.slice(X,W).trim()!==""){if(I&&K===0&&F.getCodePoint(0)!==32){const re=H.lines.get(T[1]-1);if(re&&F.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(oe){const he=this._bufferService.cols-oe.start;K-=he,G+=he}}}if(P&&K+G===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const re=H.lines.get(T[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const oe=this._getWordAt([0,T[1]+1],!1,!1,!0);oe&&(G+=oe.length)}}return{start:K,length:G}}}_selectWordAt(T,D){const I=this._getWordAt(T,D);if(I){for(;I.start<0;)I.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[I.start,T[1]],this._model.selectionStartLength=I.length}}_selectToWordAt(T){const D=this._getWordAt(T,!0);if(D){let I=T[1];for(;D.start<0;)D.start+=this._bufferService.cols,I--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,I++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,I]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const D=this._bufferService.buffer.getWrappedRangeForLine(T),I={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(I,this._bufferService.cols)}};l.SelectionService=j=d([_(3,C.IBufferService),_(4,C.ICoreService),_(5,S.IMouseService),_(6,C.IOptionsService),_(7,S.IRenderService),_(8,S.ICoreBrowserService)],j)},4725:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ILinkProviderService=l.IThemeService=l.ICharacterJoinerService=l.ISelectionService=l.IRenderService=l.IMouseService=l.ICoreBrowserService=l.ICharSizeService=void 0;const d=c(8343);l.ICharSizeService=(0,d.createDecorator)("CharSizeService"),l.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),l.IMouseService=(0,d.createDecorator)("MouseService"),l.IRenderService=(0,d.createDecorator)("RenderService"),l.ISelectionService=(0,d.createDecorator)("SelectionService"),l.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),l.IThemeService=(0,d.createDecorator)("ThemeService"),l.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(o,l,c){var d=this&&this.__decorate||function(j,T,D,I){var P,H=arguments.length,F=H<3?T:I===null?I=Object.getOwnPropertyDescriptor(T,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(j,T,D,I);else for(var V=j.length-1;V>=0;V--)(P=j[V])&&(F=(H<3?P(F):H>3?P(T,D,F):P(T,D))||F);return H>3&&F&&Object.defineProperty(T,D,F),F},_=this&&this.__param||function(j,T){return function(D,I){T(D,I,j)}};Object.defineProperty(l,"__esModule",{value:!0}),l.ThemeService=l.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),m=c(8055),g=c(8460),S=c(844),k=c(2585),b=m.css.toColor("#ffffff"),v=m.css.toColor("#000000"),x=m.css.toColor("#ffffff"),y=m.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};l.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const j=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let D=0;D<216;D++){const I=T[D/36%6|0],P=T[D/6%6|0],H=T[D%6];j.push({css:m.channels.toCss(I,P,H),rgba:m.channels.toRgba(I,P,H)})}for(let D=0;D<24;D++){const I=8+10*D;j.push({css:m.channels.toCss(I,I,I),rgba:m.channels.toRgba(I,I,I)})}return j})());let A=l.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(j){super(),this._optionsService=j,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:m.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:m.color.blend(v,C),ansi:l.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(j={}){const T=this._colors;if(T.foreground=E(j.foreground,b),T.background=E(j.background,v),T.cursor=E(j.cursor,x),T.cursorAccent=E(j.cursorAccent,y),T.selectionBackgroundTransparent=E(j.selectionBackground,C),T.selectionBackgroundOpaque=m.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=E(j.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=m.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=j.selectionForeground?E(j.selectionForeground,m.NULL_COLOR):void 0,T.selectionForeground===m.NULL_COLOR&&(T.selectionForeground=void 0),m.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=m.color.opacity(T.selectionBackgroundTransparent,.3)),m.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=m.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=l.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=E(j.black,l.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=E(j.red,l.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=E(j.green,l.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=E(j.yellow,l.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=E(j.blue,l.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=E(j.magenta,l.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=E(j.cyan,l.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=E(j.white,l.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=E(j.brightBlack,l.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=E(j.brightRed,l.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=E(j.brightGreen,l.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=E(j.brightYellow,l.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=E(j.brightBlue,l.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=E(j.brightMagenta,l.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=E(j.brightCyan,l.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=E(j.brightWhite,l.DEFAULT_ANSI_COLORS[15]),j.extendedAnsi){const D=Math.min(T.ansi.length-16,j.extendedAnsi.length);for(let I=0;I{Object.defineProperty(l,"__esModule",{value:!0}),l.CircularList=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(g){if(this._maxLength===g)return;const S=new Array(g);for(let k=0;kthis._length)for(let S=this._length;S=g;b--)this._array[this._getCyclicIndex(b+k.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+k.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=k.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,k){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let v=S-1;v>=0;v--)this.set(g+v+k,this.get(g+v));const b=g+S+k-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(l,"__esModule",{value:!0}),l.clone=void 0,l.clone=function c(d,_=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const m in d)f[m]=_<=1?d[m]:d[m]&&c(d[m],_-1);return f}},8055:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.contrastRatio=l.toPaddedHex=l.rgba=l.rgb=l.css=l.color=l.channels=l.NULL_COLOR=void 0;let c=0,d=0,_=0,f=0;var m,g,S,k,b;function v(y){const C=y.toString(16);return C.length<2?"0"+C:C}function x(y,C){return y>>0},y.toColor=function(C,A,E,j){return{css:y.toCss(C,A,E,j),rgba:y.toRgba(C,A,E,j)}}})(m||(l.channels=m={})),(function(y){function C(A,E){return f=Math.round(255*E),[c,d,_]=b.toChannels(A.rgba),{css:m.toCss(c,d,_,f),rgba:m.toRgba(c,d,_,f)}}y.blend=function(A,E){if(f=(255&E.rgba)/255,f===1)return{css:E.css,rgba:E.rgba};const j=E.rgba>>24&255,T=E.rgba>>16&255,D=E.rgba>>8&255,I=A.rgba>>24&255,P=A.rgba>>16&255,H=A.rgba>>8&255;return c=I+Math.round((j-I)*f),d=P+Math.round((T-P)*f),_=H+Math.round((D-H)*f),{css:m.toCss(c,d,_),rgba:m.toRgba(c,d,_)}},y.isOpaque=function(A){return(255&A.rgba)==255},y.ensureContrastRatio=function(A,E,j){const T=b.ensureContrastRatio(A.rgba,E.rgba,j);if(T)return m.toColor(T>>24&255,T>>16&255,T>>8&255)},y.opaque=function(A){const E=(255|A.rgba)>>>0;return[c,d,_]=b.toChannels(E),{css:m.toCss(c,d,_),rgba:E}},y.opacity=C,y.multiplyOpacity=function(A,E){return f=255&A.rgba,C(A,f*E/255)},y.toColorRGB=function(A){return[A.rgba>>24&255,A.rgba>>16&255,A.rgba>>8&255]}})(g||(l.color=g={})),(function(y){let C,A;try{const E=document.createElement("canvas");E.width=1,E.height=1;const j=E.getContext("2d",{willReadFrequently:!0});j&&(C=j,C.globalCompositeOperation="copy",A=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),m.toColor(c,d,_);case 5:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),f=parseInt(E.slice(4,5).repeat(2),16),m.toColor(c,d,_,f);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const j=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(j)return c=parseInt(j[1]),d=parseInt(j[2]),_=parseInt(j[3]),f=Math.round(255*(j[5]===void 0?1:parseFloat(j[5]))),m.toColor(c,d,_,f);if(!C||!A)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=A,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,d,_,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,d,_,f),css:E}}})(S||(l.css=S={})),(function(y){function C(A,E,j){const T=A/255,D=E/255,I=j/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))}y.relativeLuminance=function(A){return C(A>>16&255,A>>8&255,255&A)},y.relativeLuminance2=C})(k||(l.rgb=k={})),(function(y){function C(E,j,T){const D=E>>24&255,I=E>>16&255,P=E>>8&255;let H=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2(H,F,V),k.relativeLuminance2(D,I,P));for(;X0||F>0||V>0);)H-=Math.max(0,Math.ceil(.1*H)),F-=Math.max(0,Math.ceil(.1*F)),V-=Math.max(0,Math.ceil(.1*V)),X=x(k.relativeLuminance2(H,F,V),k.relativeLuminance2(D,I,P));return(H<<24|F<<16|V<<8|255)>>>0}function A(E,j,T){const D=E>>24&255,I=E>>16&255,P=E>>8&255;let H=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2(H,F,V),k.relativeLuminance2(D,I,P));for(;X>>0}y.blend=function(E,j){if(f=(255&j)/255,f===1)return j;const T=j>>24&255,D=j>>16&255,I=j>>8&255,P=E>>24&255,H=E>>16&255,F=E>>8&255;return c=P+Math.round((T-P)*f),d=H+Math.round((D-H)*f),_=F+Math.round((I-F)*f),m.toRgba(c,d,_)},y.ensureContrastRatio=function(E,j,T){const D=k.relativeLuminance(E>>8),I=k.relativeLuminance(j>>8);if(x(D,I)>8));if(Vx(D,k.relativeLuminance(X>>8))?F:X}return F}const P=A(E,j,T),H=x(D,k.relativeLuminance(P>>8));if(Hx(D,k.relativeLuminance(F>>8))?P:F}return P}},y.reduceLuminance=C,y.increaseLuminance=A,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(b||(l.rgba=b={})),l.toPaddedHex=v,l.contrastRatio=x},8969:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreTerminal=void 0;const d=c(844),_=c(2585),f=c(4348),m=c(7866),g=c(744),S=c(7302),k=c(6975),b=c(8460),v=c(1753),x=c(1480),y=c(7994),C=c(9282),A=c(5435),E=c(5981),j=c(2660);let T=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((P=>{var H;(H=this._onScrollApi)==null||H.fire(P.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(P){for(const H in P)this.optionsService.options[H]=P[H]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new S.OptionsService(P)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(j.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new A.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.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((H=>{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((H=>{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 E.WriteBuffer(((H,F)=>this._inputHandler.parse(H,F)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,H){this._writeBuffer.write(P,H)}writeSync(P,H){this._logService.logLevel<=_.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(P,H)}input(P,H=!0){this.coreService.triggerDataEvent(P,H)}resize(P,H){isNaN(P)||isNaN(H)||(P=Math.max(P,g.MINIMUM_COLS),H=Math.max(H,g.MINIMUM_ROWS),this._bufferService.resize(P,H))}scroll(P,H=!1){this._bufferService.scroll(P,H)}scrollLines(P,H,F){this._bufferService.scrollLines(P,H,F)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const H=P-this._bufferService.buffer.ydisp;H!==0&&this.scrollLines(H)}registerEscHandler(P,H){return this._inputHandler.registerEscHandler(P,H)}registerDcsHandler(P,H){return this._inputHandler.registerDcsHandler(P,H)}registerCsiHandler(P,H){return this._inputHandler.registerCsiHandler(P,H)}registerOscHandler(P,H){return this._inputHandler.registerOscHandler(P,H)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const H=this.optionsService.rawOptions.windowsPty;H&&H.buildNumber!==void 0&&H.buildNumber!==void 0?P=H.backend==="conpty"&&H.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const H of P)H.dispose()}))}}}l.CoreTerminal=D},8460:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.runAndSubscribe=l.forwardEvent=l.EventEmitter=void 0,l.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 d=0;dd.fire(_)))},l.runAndSubscribe=function(c,d){return d(void 0),c((_=>d(_)))}},5435:function(o,l,c){var d=this&&this.__decorate||function(J,B,L,$){var K,G=arguments.length,re=G<3?B:$===null?$=Object.getOwnPropertyDescriptor(B,L):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(J,B,L,$);else for(var oe=J.length-1;oe>=0;oe--)(K=J[oe])&&(re=(G<3?K(re):G>3?K(B,L,re):K(B,L))||re);return G>3&&re&&Object.defineProperty(B,L,re),re},_=this&&this.__param||function(J,B){return function(L,$){B(L,$,J)}};Object.defineProperty(l,"__esModule",{value:!0}),l.InputHandler=l.WindowsOptionsReportType=void 0;const f=c(2584),m=c(7116),g=c(2015),S=c(844),k=c(482),b=c(8437),v=c(8460),x=c(643),y=c(511),C=c(3734),A=c(2585),E=c(1480),j=c(6242),T=c(6351),D=c(5941),I={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=131072;function H(J,B){if(J>24)return B.setWinLines||!1;switch(J){case 1:return!!B.restoreWin;case 2:return!!B.minimizeWin;case 3:return!!B.setWinPosition;case 4:return!!B.setWinSizePixels;case 5:return!!B.raiseWin;case 6:return!!B.lowerWin;case 7:return!!B.refreshWin;case 8:return!!B.setWinSizeChars;case 9:return!!B.maximizeWin;case 10:return!!B.fullscreenWin;case 11:return!!B.getWinState;case 13:return!!B.getWinPosition;case 14:return!!B.getWinSizePixels;case 15:return!!B.getScreenSizePixels;case 16:return!!B.getCellSizePixels;case 18:return!!B.getWinSizeChars;case 19:return!!B.getScreenSizeChars;case 20:return!!B.getIconTitle;case 21:return!!B.getWinTitle;case 22:return!!B.pushTitle;case 23:return!!B.popTitle;case 24:return!!B.setWinLines}return!1}var F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(l.WindowsOptionsReportType=F={}));let V=0;class X extends S.Disposable{getAttrData(){return this._curAttrData}constructor(B,L,$,K,G,re,oe,he,ie=new g.EscapeSequenceParser){super(),this._bufferService=B,this._charsetService=L,this._coreService=$,this._logService=K,this._optionsService=G,this._oscLinkService=re,this._coreMouseService=oe,this._unicodeService=he,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.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 W(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:te.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,te,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:te,data:le})})),this._parser.setDcsHandlerFallback(((q,te,le)=>{te==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:te,payload:le})})),this._parser.setPrintHandler(((q,te,le)=>this.print(q,te,le))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!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 j.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new j.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new j.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new j.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new j.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new j.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new j.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new j.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new j.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new j.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new j.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new j.OscHandler((q=>this.restoreCursorColor(q)))),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 q in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((q,te)=>this.requestStatusString(q,te))))}_preserveStack(B,L,$,K){this._parseStack.paused=!0,this._parseStack.cursorStartX=B,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=$,this._parseStack.position=K}_logSlowResolvingAsync(B){this._logService.logLevel<=A.LogLevelEnum.WARN&&Promise.race([B,new Promise(((L,$)=>setTimeout((()=>$("#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(B,L){let $,K=this._activeBuffer.x,G=this._activeBuffer.y,re=0;const oe=this._parseStack.paused;if(oe){if($=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync($),$;K=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,B.length>P&&(re=this._parseStack.position+P)}if(this._logService.logLevel<=A.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof B=="string"?` "${B}"`:` "${Array.prototype.map.call(B,(q=>String.fromCharCode(q))).join("")}"`),typeof B=="string"?B.split("").map((q=>q.charCodeAt(0))):B),this._parseBuffer.lengthP)for(let q=re;q0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let ge=this._parser.precedingJoinState;for(let ue=L;ue<$;++ue){if(K=B[ue],K<127&&re){const Pe=re[String.fromCharCode(K)];Pe&&(K=Pe.charCodeAt(0))}const Ce=this._unicodeService.charProperties(K,ge);G=E.UnicodeService.extractWidth(Ce);const Ee=E.UnicodeService.extractShouldJoin(Ce),Le=Ee?E.UnicodeService.extractWidth(ge):0;if(ge=Ce,oe&&this._onA11yChar.fire((0,k.stringFromCodePoint)(K)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Le>he){if(ie){const Pe=le;let Ve=this._activeBuffer.x-Le;for(this._activeBuffer.x=Le,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Le>0&&le instanceof b.BufferLine&&le.copyCellsFrom(Pe,Ve,0,Le,!1);Ve=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(q&&(le.insertCells(this._activeBuffer.x,G-Le,this._activeBuffer.getNullCell(te)),le.getWidth(he-1)===2&&le.setCellFromCodepoint(he-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,te)),le.setCellFromCodepoint(this._activeBuffer.x++,K,G,te),G>0)for(;--G;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=ge,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(B,L){return B.final!=="t"||B.prefix||B.intermediates?this._parser.registerCsiHandler(B,L):this._parser.registerCsiHandler(B,($=>!H($.params[0],this._optionsService.rawOptions.windowOptions)||L($)))}registerDcsHandler(B,L){return this._parser.registerDcsHandler(B,new T.DcsHandler(L))}registerEscHandler(B,L){return this._parser.registerEscHandler(B,L)}registerOscHandler(B,L){return this._parser.registerOscHandler(B,new j.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 B;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&&((B=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&B.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 B=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-B),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(B=this._bufferService.cols-1){this._activeBuffer.x=Math.min(B,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(B,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=B,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=B,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(B,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+B,this._activeBuffer.y+L)}cursorUp(B){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,B.params[0]||1)):this._moveCursor(0,-(B.params[0]||1)),!0}cursorDown(B){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,B.params[0]||1)):this._moveCursor(0,B.params[0]||1),!0}cursorForward(B){return this._moveCursor(B.params[0]||1,0),!0}cursorBackward(B){return this._moveCursor(-(B.params[0]||1),0),!0}cursorNextLine(B){return this.cursorDown(B),this._activeBuffer.x=0,!0}cursorPrecedingLine(B){return this.cursorUp(B),this._activeBuffer.x=0,!0}cursorCharAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(B){return this._setCursor(B.length>=2?(B.params[1]||1)-1:0,(B.params[0]||1)-1),!0}charPosAbsolute(B){return this._setCursor((B.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(B){return this._moveCursor(B.params[0]||1,0),!0}linePosAbsolute(B){return this._setCursor(this._activeBuffer.x,(B.params[0]||1)-1),!0}vPositionRelative(B){return this._moveCursor(0,B.params[0]||1),!0}hVPosition(B){return this.cursorPosition(B),!0}tabClear(B){const L=B.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(B){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=B.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(B){const L=B.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(B,L,$,K=!1,G=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);re.replaceCells(L,$,this._activeBuffer.getNullCell(this._eraseAttrData()),G),K&&(re.isWrapped=!1)}_resetBufferLine(B,L=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+B);$&&($.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+B),$.isWrapped=!1)}eraseInDisplay(B,L=!1){let $;switch(this._restrictCursor(this._bufferService.cols),B.params[0]){case 0:for($=this._activeBuffer.y,this._dirtyRowTracker.markDirty($),this._eraseInBufferLine($++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);$=this._bufferService.cols&&(this._activeBuffer.lines.get($+1).isWrapped=!1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 2:for($=this._bufferService.rows,this._dirtyRowTracker.markDirty($-1);$--;)this._resetBufferLine($,L);this._dirtyRowTracker.markDirty(0);break;case 3:const K=this._activeBuffer.lines.length-this._bufferService.rows;K>0&&(this._activeBuffer.lines.trimStart(K),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-K,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-K,0),this._onScroll.fire(0))}return!0}eraseInLine(B,L=!1){switch(this._restrictCursor(this._bufferService.cols),B.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(B){this._restrictCursor();let L=B.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 ie=he;for(let q=1;q<$;++q)oe.copyWithin(ie,0,he),ie+=he;return this.print(oe,0,ie),!0}sendDeviceAttributesPrimary(B){return B.params[0]>0||(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(B){return B.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(B.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(f.C0.ESC+"[>83;40003;0c")),!0}_is(B){return(this._optionsService.rawOptions.termName+"").indexOf(B)===0}setMode(B){for(let L=0;LEe?1:2,ge=B.params[0];return ue=ge,Ce=L?ge===2?4:ge===4?le(re.modes.insertMode):ge===12?3:ge===20?le(te.convertEol):0:ge===1?le($.applicationCursorKeys):ge===3?te.windowOptions.setWinLines?he===80?2:he===132?1:0:0:ge===6?le($.origin):ge===7?le($.wraparound):ge===8?3:ge===9?le(K==="X10"):ge===12?le(te.cursorBlink):ge===25?le(!re.isCursorHidden):ge===45?le($.reverseWraparound):ge===66?le($.applicationKeypad):ge===67?4:ge===1e3?le(K==="VT200"):ge===1002?le(K==="DRAG"):ge===1003?le(K==="ANY"):ge===1004?le($.sendFocus):ge===1005?4:ge===1006?le(G==="SGR"):ge===1015?4:ge===1016?le(G==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?le(ie===q):ge===2004?le($.bracketedPasteMode):0,re.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ue};${Ce}$y`),!0;var ue,Ce}_updateAttrColor(B,L,$,K,G){return L===2?(B|=50331648,B&=-16777216,B|=C.AttributeData.fromColorRGB([$,K,G])):L===5&&(B&=-50331904,B|=33554432|255&$),B}_extractColor(B,L,$){const K=[0,0,-1,0,0,0];let G=0,re=0;do{if(K[re+G]=B.params[L+re],B.hasSubParams(L+re)){const oe=B.getSubParams(L+re);let he=0;do K[1]===5&&(G=1),K[re+he+1+G]=oe[he];while(++he=2||K[1]===2&&re+G>=5)break;K[1]&&(G=1)}while(++re+L5)&&(B=1),L.extended.underlineStyle=B,L.fg|=268435456,B===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(B){B.fg=b.DEFAULT_ATTR_DATA.fg,B.bg=b.DEFAULT_ATTR_DATA.bg,B.extended=B.extended.clone(),B.extended.underlineStyle=0,B.extended.underlineColor&=-67108864,B.updateExtended()}charAttributes(B){if(B.length===1&&B.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=B.length;let $;const K=this._curAttrData;for(let G=0;G=30&&$<=37?(K.fg&=-50331904,K.fg|=16777216|$-30):$>=40&&$<=47?(K.bg&=-50331904,K.bg|=16777216|$-40):$>=90&&$<=97?(K.fg&=-50331904,K.fg|=16777224|$-90):$>=100&&$<=107?(K.bg&=-50331904,K.bg|=16777224|$-100):$===0?this._processSGR0(K):$===1?K.fg|=134217728:$===3?K.bg|=67108864:$===4?(K.fg|=268435456,this._processUnderline(B.hasSubParams(G)?B.getSubParams(G)[0]:1,K)):$===5?K.fg|=536870912:$===7?K.fg|=67108864:$===8?K.fg|=1073741824:$===9?K.fg|=2147483648:$===2?K.bg|=134217728:$===21?this._processUnderline(2,K):$===22?(K.fg&=-134217729,K.bg&=-134217729):$===23?K.bg&=-67108865:$===24?(K.fg&=-268435457,this._processUnderline(0,K)):$===25?K.fg&=-536870913:$===27?K.fg&=-67108865:$===28?K.fg&=-1073741825:$===29?K.fg&=2147483647:$===39?(K.fg&=-67108864,K.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):$===49?(K.bg&=-67108864,K.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):$===38||$===48||$===58?G+=this._extractColor(B,G,K):$===53?K.bg|=1073741824:$===55?K.bg&=-1073741825:$===59?(K.extended=K.extended.clone(),K.extended.underlineColor=-1,K.updateExtended()):$===100?(K.fg&=-67108864,K.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,K.bg&=-67108864,K.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",$);return!0}deviceStatus(B){switch(B.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${$}R`)}return!0}deviceStatusPrivate(B){if(B.params[0]===6){const L=this._activeBuffer.y+1,$=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${$}R`)}return!0}softReset(B){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.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(B){const L=B.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 $=L%2==1;return this._optionsService.options.cursorBlink=$,!0}setScrollRegion(B){const L=B.params[0]||1;let $;return(B.length<2||($=B.params[1])>this._bufferService.rows||$===0)&&($=this._bufferService.rows),$>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=$-1,this._setCursor(0,0)),!0}windowOptions(B){if(!H(B.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=B.length>1?B.params[1]:0;switch(B.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.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(B){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(B){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(B){return this._windowTitle=B,this._onTitleChange.fire(B),!0}setIconName(B){return this._iconName=B,!0}setOrReportIndexedColor(B){const L=[],$=B.split(";");for(;$.length>1;){const K=$.shift(),G=$.shift();if(/^\d+$/.exec(K)){const re=parseInt(K);if(Z(re))if(G==="?")L.push({type:0,index:re});else{const oe=(0,D.parseColor)(G);oe&&L.push({type:1,index:re,color:oe})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(B){const L=B.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(B,L){this._getCurrentLinkId()&&this._finishHyperlink();const $=B.split(":");let K;const G=$.findIndex((re=>re.startsWith("id=")));return G!==-1&&(K=$[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:K,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(B,L){const $=B.split(";");for(let K=0;K<$.length&&!(L>=this._specialColors.length);++K,++L)if($[K]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,D.parseColor)($[K]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}return!0}setOrReportFgColor(B){return this._setOrReportSpecialColor(B,0)}setOrReportBgColor(B){return this._setOrReportSpecialColor(B,1)}setOrReportCursorColor(B){return this._setOrReportSpecialColor(B,2)}restoreIndexedColor(B){if(!B)return this._onColor.fire([{type:2}]),!0;const L=[],$=B.split(";");for(let K=0;K<$.length;++K)if(/^\d+$/.exec($[K])){const G=parseInt($[K]);Z(G)&&L.push({type:2,index:G})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(B){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(B){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(B){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,m.DEFAULT_CHARSET),!0}selectCharset(B){return B.length!==2?(this.selectDefaultCharset(),!0):(B[0]==="/"||this._charsetService.setgCharset(I[B[0]],m.CHARSETS[B[1]]||m.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),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._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const B=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,B,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=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(B){return this._charsetService.setgLevel(B),!0}screenAlignmentPattern(){const B=new y.CellData;B.content=4194373,B.fg=this._curAttrData.fg,B.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${G}${f.C0.ESC}\\`),!0))(B==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:B==='"p'?'P1$r61;1"p':B==="r"?`P1$r${$.scrollTop+1};${$.scrollBottom+1}r`:B==="m"?"P1$r0m":B===" q"?`P1$r${{block:2,underline:4,bar:6}[K.cursorStyle]-(K.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(B,L){this._dirtyRowTracker.markRangeDirty(B,L)}}l.InputHandler=X;let W=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,B){J>B&&(V=J,J=B,B=V),Jthis.end&&(this.end=B)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}W=d([_(0,A.IBufferService)],W)},844:(o,l)=>{function c(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(l,"__esModule",{value:!0}),l.getDisposeArrayDisposable=l.disposeArray=l.toDisposable=l.MutableDisposable=l.Disposable=void 0,l.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},l.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},l.toDisposable=function(d){return{dispose:d}},l.disposeArray=c,l.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.FourKeyMap=l.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(_,f,m){this._data[_]||(this._data[_]={}),this._data[_][f]=m}get(_,f){return this._data[_]?this._data[_][f]:void 0}clear(){this._data={}}}l.TwoKeyMap=c,l.FourKeyMap=class{constructor(){this._data=new c}set(d,_,f,m,g){this._data.get(d,_)||this._data.set(d,_,new c),this._data.get(d,_).set(f,m,g)}get(d,_,f,m){var g;return(g=this._data.get(d,_))==null?void 0:g.get(f,m)}clear(){this._data.clear()}}},6114:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.isChromeOS=l.isLinux=l.isWindows=l.isIphone=l.isIpad=l.isMac=l.getSafariVersion=l.isSafari=l.isLegacyEdge=l.isFirefox=l.isNode=void 0,l.isNode=typeof process<"u"&&"title"in process;const c=l.isNode?"node":navigator.userAgent,d=l.isNode?"node":navigator.platform;l.isFirefox=c.includes("Firefox"),l.isLegacyEdge=c.includes("Edge"),l.isSafari=/^((?!chrome|android).)*safari/i.test(c),l.getSafariVersion=function(){if(!l.isSafari)return 0;const _=c.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},l.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),l.isIpad=d==="iPad",l.isIphone=d==="iPhone",l.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),l.isLinux=d.indexOf("Linux")>=0,l.isChromeOS=/\bCrOS\b/.test(c)},6106:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SortedList=void 0;let c=0;l.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(c=this._search(_),c===-1)||this._getKey(this._array[c])!==_)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===d))do _(this._array[c]);while(++c=_;){let m=_+f>>1;const g=this._getKey(this._array[m]);if(g>d)f=m-1;else{if(!(g0&&this._getKey(this._array[m-1])===d;)m--;return m}_=m+1}}return _}}},7226:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DebouncedIdleTask=l.IdleTaskQueue=l.PriorityTaskQueue=void 0;const d=c(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iv)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=v}this.clear()}}class f extends _{_requestCallback(g){return setTimeout((()=>g(this._createDeadline(16))))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}l.PriorityTaskQueue=f,l.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,l.DebouncedIdleTask=class{constructor(){this._queue=new l.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.updateWindowsModeWrappedState=void 0;const d=c(643);l.updateWindowsModeWrappedState=function(_){const f=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),m=f==null?void 0:f.get(_.cols-1),g=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);g&&m&&(g.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ExtendedAttrs=l.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new d}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}}l.AttributeData=c;class d{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,m=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}l.ExtendedAttrs=d},9092:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Buffer=l.MAX_BUFFER_SIZE=void 0;const d=c(6349),_=c(7226),f=c(3734),m=c(8437),g=c(4634),S=c(511),k=c(643),b=c(4863),v=c(7116);l.MAX_BUFFER_SIZE=4294967295,l.Buffer=class{constructor(x,y,C){this._hasScrollback=x,this._optionsService=y,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=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new m.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xl.MAX_BUFFER_SIZE?l.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=m.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let A=0;const E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+j+1?(this.ybase--,j++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(x,C)));else for(let T=this._rows;T>y;T--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=E}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),j&&(this.y+=j),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let j=0;j.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const C=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(C.length>0){const A=(0,g.reflowLargerCreateNewLayout)(this.lines,C);(0,g.reflowLargerApplyNewLayout)(this.lines,A.layout),this._reflowLargerAdjustViewport(x,y,A.countRemoved)}}_reflowLargerAdjustViewport(x,y,C){const A=this.getNullCell(m.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;j--){let T=this.lines.get(j);if(!T||!T.isWrapped&&T.getTrimmedLength()<=x)continue;const D=[T];for(;T.isWrapped&&j>0;)T=this.lines.get(--j),D.unshift(T);const I=this.ybase+this.y;if(I>=j&&I0&&(A.push({start:j+D.length+E,newLines:X}),E+=X.length),D.push(...X);let W=H.length-1,Z=H[W];Z===0&&(W--,Z=H[W]);let J=D.length-F-1,B=P;for(;J>=0;){const $=Math.min(B,Z);if(D[W]===void 0)break;if(D[W].copyCellsFrom(D[J],B-$,Z-$,$,!0),Z-=$,Z===0&&(W--,Z=H[W]),B-=$,B===0){J--;const K=Math.max(J,0);B=(0,g.getWrappedLineTrimmedLength)(D,K,this._cols)}}for(let $=0;$0;)this.ybase===0?this.y0){const j=[],T=[];for(let W=0;W=0;W--)if(H&&H.start>I+F){for(let Z=H.newLines.length-1;Z>=0;Z--)this.lines.set(W--,H.newLines[Z]);W++,j.push({index:I+1,amount:H.newLines.length}),F+=H.newLines.length,H=A[++P]}else this.lines.set(W,T[I--]);let V=0;for(let W=j.length-1;W>=0;W--)j[W].index+=V,this.lines.onInsertEmitter.fire(j[W]),V+=j[W].amount;const X=Math.max(0,D+E-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(x,y,C=0,A){const E=this.lines.get(x);return E?E.translateToString(y,C,A):""}getWrappedRangeForLine(x){let y=x,C=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLine=l.DEFAULT_ATTR_DATA=void 0;const d=c(3734),_=c(511),f=c(643),m=c(482);l.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let g=0;class S{constructor(b,v,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const y=v||_.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):x]}set(b,v){this._data[3*b+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,m.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return g=3*b,v.content=this._data[g+0],v.fg=this._data[g+1],v.bg=this._data[g+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,x,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=v|x<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,v,x){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,m.stringFromCodePoint)(v):2097151&y?(this._combined[b]=(0,m.stringFromCodePoint)(2097151&y)+(0,m.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*b+0]=y}insertCells(b,v,x){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,x),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let A=0;A=b&&delete this._extendedAttrs[E]}}return this.length=b,4*x*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,x,y,C){const A=b._data;if(C)for(let j=y-1;j>=0;j--){for(let T=0;T<3;T++)this._data[3*(x+j)+T]=A[3*(v+j)+T];268435456&A[3*(v+j)+2]&&(this._extendedAttrs[x+j]=b._extendedAttrs[v+j])}else for(let j=0;j=v&&(this._combined[T-v+x]=b._combined[T])}}translateToString(b,v,x,y){v=v??0,x=x??this.length,b&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;v>22||1}return y&&y.push(v),C}}l.BufferLine=S},4841:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.getRangeLength=void 0,l.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(o,l)=>{function c(d,_,f){if(_===d.length-1)return d[_].getTrimmedLength();const m=!d[_].hasContent(f-1)&&d[_].getWidth(f-1)===1,g=d[_+1].getWidth(0)===2;return m&&g?f-1:f}Object.defineProperty(l,"__esModule",{value:!0}),l.getWrappedLineTrimmedLength=l.reflowSmallerGetNewLineLengths=l.reflowLargerApplyNewLayout=l.reflowLargerCreateNewLayout=l.reflowLargerGetLinesToRemove=void 0,l.reflowLargerGetLinesToRemove=function(d,_,f,m,g){const S=[];for(let k=0;k=k&&m0&&(T>y||x[T].getTrimmedLength()===0);T--)j++;j>0&&(S.push(k+x.length-j),S.push(j)),k+=x.length-1}return S},l.reflowLargerCreateNewLayout=function(d,_){const f=[];let m=0,g=_[m],S=0;for(let k=0;kc(d,x,_))).reduce(((v,x)=>v+x));let S=0,k=0,b=0;for(;bv&&(S-=v,k++);const x=d[k].getWidth(S-1)===2;x&&S--;const y=x?f-1:f;m.push(y),b+=y}return m},l.getWrappedLineTrimmedLength=c},5295:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferSet=void 0;const d=c(8460),_=c(844),f=c(9092);class m extends _.Disposable{constructor(S,k){super(),this._optionsService=S,this._bufferService=k,this._onBufferActivate=this.register(new d.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,k){this._normal.resize(S,k),this._alt.resize(S,k),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}l.BufferSet=m},511:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CellData=void 0;const d=c(482),_=c(643),f=c(3734);class m extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const k=new m;return k.setFromCharData(S),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(S[_.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(S[_.CHAR_DATA_CHAR_INDEX].length===2){const b=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|S[_.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[_.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=S[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.CellData=m},643:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WHITESPACE_CELL_CODE=l.WHITESPACE_CELL_WIDTH=l.WHITESPACE_CELL_CHAR=l.NULL_CELL_CODE=l.NULL_CELL_WIDTH=l.NULL_CELL_CHAR=l.CHAR_DATA_CODE_INDEX=l.CHAR_DATA_WIDTH_INDEX=l.CHAR_DATA_CHAR_INDEX=l.CHAR_DATA_ATTR_INDEX=l.DEFAULT_EXT=l.DEFAULT_ATTR=l.DEFAULT_COLOR=void 0,l.DEFAULT_COLOR=0,l.DEFAULT_ATTR=256|l.DEFAULT_COLOR<<9,l.DEFAULT_EXT=0,l.CHAR_DATA_ATTR_INDEX=0,l.CHAR_DATA_CHAR_INDEX=1,l.CHAR_DATA_WIDTH_INDEX=2,l.CHAR_DATA_CODE_INDEX=3,l.NULL_CELL_CHAR="",l.NULL_CELL_WIDTH=1,l.NULL_CELL_CODE=0,l.WHITESPACE_CELL_CHAR=" ",l.WHITESPACE_CELL_WIDTH=1,l.WHITESPACE_CELL_CODE=32},4863:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Marker=void 0;const d=c(8460),_=c(844);class f{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}l.Marker=f,f._nextId=1},7116:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DEFAULT_CHARSET=l.CHARSETS=void 0,l.CHARSETS={},l.DEFAULT_CHARSET=l.CHARSETS.B,l.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:"≥","{":"π","|":"≠","}":"£","~":"·"},l.CHARSETS.A={"#":"£"},l.CHARSETS.B=void 0,l.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},l.CHARSETS.C=l.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},l.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},l.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},l.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},l.CHARSETS.E=l.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},l.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},l.CHARSETS.H=l.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(o,l)=>{var c,d,_;Object.defineProperty(l,"__esModule",{value:!0}),l.C1_ESCAPED=l.C1=l.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||(l.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="Ÿ"})(d||(l.C1=d={})),(function(f){f.ST=`${c.ESC}\\`})(_||(l.C1_ESCAPED=_={}))},7399:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.evaluateKeyboardEvent=void 0;const d=c(2584),_={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:["'",'"']};l.evaluateKeyboardEvent=function(f,m,g,S){const k={type:0,cancel:!1,key:void 0},b=(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=m?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:k.key=f.ctrlKey?"\b":d.C0.DEL,f.altKey&&(k.key=d.C0.ESC+k.key);break;case 9:if(f.shiftKey){k.key=d.C0.ESC+"[Z";break}k.key=d.C0.HT,k.cancel=!0;break;case 13:k.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,k.cancel=!0;break;case 27:k.key=d.C0.ESC,f.altKey&&(k.key=d.C0.ESC+d.C0.ESC),k.cancel=!0;break;case 37:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"D",k.key===d.C0.ESC+"[1;3D"&&(k.key=d.C0.ESC+(g?"b":"[1;5D"))):k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"C",k.key===d.C0.ESC+"[1;3C"&&(k.key=d.C0.ESC+(g?"f":"[1;5C"))):k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"A",g||k.key!==d.C0.ESC+"[1;3A"||(k.key=d.C0.ESC+"[1;5A")):k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"B",g||k.key!==d.C0.ESC+"[1;3B"||(k.key=d.C0.ESC+"[1;5B")):k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(k.key=d.C0.ESC+"[2~");break;case 46:k.key=b?d.C0.ESC+"[3;"+(b+1)+"~":d.C0.ESC+"[3~";break;case 36:k.key=b?d.C0.ESC+"[1;"+(b+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:k.key=b?d.C0.ESC+"[1;"+(b+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?k.type=2:f.ctrlKey?k.key=d.C0.ESC+"[5;"+(b+1)+"~":k.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?k.type=3:f.ctrlKey?k.key=d.C0.ESC+"[6;"+(b+1)+"~":k.key=d.C0.ESC+"[6~";break;case 112:k.key=b?d.C0.ESC+"[1;"+(b+1)+"P":d.C0.ESC+"OP";break;case 113:k.key=b?d.C0.ESC+"[1;"+(b+1)+"Q":d.C0.ESC+"OQ";break;case 114:k.key=b?d.C0.ESC+"[1;"+(b+1)+"R":d.C0.ESC+"OR";break;case 115:k.key=b?d.C0.ESC+"[1;"+(b+1)+"S":d.C0.ESC+"OS";break;case 116:k.key=b?d.C0.ESC+"[15;"+(b+1)+"~":d.C0.ESC+"[15~";break;case 117:k.key=b?d.C0.ESC+"[17;"+(b+1)+"~":d.C0.ESC+"[17~";break;case 118:k.key=b?d.C0.ESC+"[18;"+(b+1)+"~":d.C0.ESC+"[18~";break;case 119:k.key=b?d.C0.ESC+"[19;"+(b+1)+"~":d.C0.ESC+"[19~";break;case 120:k.key=b?d.C0.ESC+"[20;"+(b+1)+"~":d.C0.ESC+"[20~";break;case 121:k.key=b?d.C0.ESC+"[21;"+(b+1)+"~":d.C0.ESC+"[21~";break;case 122:k.key=b?d.C0.ESC+"[23;"+(b+1)+"~":d.C0.ESC+"[23~";break;case 123:k.key=b?d.C0.ESC+"[24;"+(b+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(g&&!S||!f.altKey||f.metaKey)!g||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=d.C0.US),f.key==="@"&&(k.key=d.C0.NUL)):f.keyCode===65&&(k.type=1);else{const v=_[f.keyCode],x=v==null?void 0:v[f.shiftKey?1:0];if(x)k.key=d.C0.ESC+x;else if(f.keyCode>=65&&f.keyCode<=90){const y=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(y);f.shiftKey&&(C=C.toUpperCase()),k.key=d.C0.ESC+C}else if(f.keyCode===32)k.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let y=f.code.slice(3,4);f.shiftKey||(y=y.toLowerCase()),k.key=d.C0.ESC+y,k.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?k.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?k.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?k.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?k.key=d.C0.DEL:f.keyCode===219?k.key=d.C0.ESC:f.keyCode===220?k.key=d.C0.FS:f.keyCode===221&&(k.key=d.C0.GS)}return k}},482:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Utf8ToUtf32=l.StringToUtf32=l.utf32ToString=l.stringFromCodePoint=void 0,l.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},l.utf32ToString=function(c,d=0,_=c.length){let f="";for(let m=d;m<_;++m){let g=c[m];g>65535?(g-=65536,f+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):f+=String.fromCharCode(g)}return f},l.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const _=c.length;if(!_)return 0;let f=0,m=0;if(this._interim){const g=c.charCodeAt(m++);56320<=g&&g<=57343?d[f++]=1024*(this._interim-55296)+g-56320+65536:(d[f++]=this._interim,d[f++]=g),this._interim=0}for(let g=m;g<_;++g){const S=c.charCodeAt(g);if(55296<=S&&S<=56319){if(++g>=_)return this._interim=S,f;const k=c.charCodeAt(g);56320<=k&&k<=57343?d[f++]=1024*(S-55296)+k-56320+65536:(d[f++]=S,d[f++]=k)}else S!==65279&&(d[f++]=S)}return f}},l.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const _=c.length;if(!_)return 0;let f,m,g,S,k=0,b=0,v=0;if(this.interim[0]){let C=!1,A=this.interim[0];A&=(224&A)==192?31:(240&A)==224?15:7;let E,j=0;for(;(E=63&this.interim[++j])&&j<4;)A<<=6,A|=E;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=T-j;for(;v=_)return 0;if(E=c[v++],(192&E)!=128){v--,C=!0;break}this.interim[j++]=E,A<<=6,A|=63&E}C||(T===2?A<128?v--:d[k++]=A:T===3?A<2048||A>=55296&&A<=57343||A===65279||(d[k++]=A):A<65536||A>1114111||(d[k++]=A)),this.interim.fill(0)}const x=_-4;let y=v;for(;y<_;){for(;!(!(y=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(b=(31&f)<<6|63&m,b<128){y--;continue}d[k++]=b}else if((240&f)==224){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(b=(15&f)<<12|(63&m)<<6|63&g,b<2048||b>=55296&&b<=57343||b===65279)continue;d[k++]=b}else if((248&f)==240){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=g,k;if(S=c[y++],(192&S)!=128){y--;continue}if(b=(7&f)<<18|(63&m)<<12|(63&g)<<6|63&S,b<65536||b>1114111)continue;d[k++]=b}}return k}}},225:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeV6=void 0;const d=c(1480),_=[[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 m;l.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<_.length;++g)m.fill(0,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:(function(S,k){let b,v=0,x=k.length-1;if(Sk[x][1])return!1;for(;x>=v;)if(b=v+x>>1,S>k[b][1])v=b+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let k=this.wcwidth(g),b=k===0&&S!==0;if(b){const v=d.UnicodeService.extractWidth(S);v===0?b=!1:v>k&&(k=v)}return d.UnicodeService.createPropertyValue(0,k,b)}}},5981:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WriteBuffer=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,S){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){const k=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,S);if(v){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=b.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()}}l.WriteBuffer=f},5941:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.toRgbString=l.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})$/,d=/^[\da-f]+$/;function _(f,m){const g=f.toString(16),S=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}l.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=c.exec(m);if(g){const S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,S=[0,0,0];for(let k=0;k<3;++k){const b=parseInt(m.slice(g*k,g*k+g),16);S[k]=g===1?b<<4:g===2?b:g===3?b>>4:b>>8}return S}},l.toRgbString=function(f,m=16){const[g,S,k]=f;return`rgb:${_(g,m)}/${_(S,m)}/${_(k,m)}`}},5770:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.PAYLOAD_LIMIT=void 0,l.PAYLOAD_LIMIT=1e7},6351:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DcsHandler=l.DcsParser=void 0;const d=c(482),_=c(8742),f=c(5770),m=[];l.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(S,k){this._handlers[S]===void 0&&(this._handlers[S]=[]);const b=this._handlers[S];return b.push(k),{dispose:()=>{const v=b.indexOf(k);v!==-1&&b.splice(v,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(S,k){if(this.reset(),this._ident=S,this._active=this._handlers[S]||m,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(S,k,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(S,k,b);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,k,b))}unhook(S,k=!0){if(this._active.length){let b=!1,v=this._active.length-1,x=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&b===!1){for(;v>=0&&(b=this._active[v].unhook(S),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=m,this._ident=0}};const g=new _.Params;g.addParam(0),l.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,k,b){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,k,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let k=!1;if(this._hitLimit)k=!1;else if(S&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((b=>(this._params=g,this._data="",this._hitLimit=!1,b)));return this._params=g,this._data="",this._hitLimit=!1,k}}},2015:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.EscapeSequenceParser=l.VT500_TRANSITION_TABLE=l.TransitionTable=void 0;const d=c(844),_=c(8742),f=c(6242),m=c(6351);class g{constructor(v){this.table=new Uint8Array(v)}setDefault(v,x){this.table.fill(v<<4|x)}add(v,x,y,C){this.table[x<<8|v]=y<<4|C}addMany(v,x,y,C){for(let A=0;AT)),x=(j,T)=>v.slice(j,T),y=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const A=x(0,14);let E;for(E in b.setDefault(1,0),b.addMany(y,0,2,0),A)b.addMany([24,26,153,154],E,3,0),b.addMany(x(128,144),E,3,0),b.addMany(x(144,152),E,3,0),b.add(156,E,0,0),b.add(27,E,11,1),b.add(157,E,4,8),b.addMany([152,158,159],E,0,7),b.add(155,E,11,3),b.add(144,E,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class k extends d.Disposable{constructor(v=l.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.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 m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,x=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let A=0;AE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=C,y}identToString(v){const x=[];for(;v;)x.push(String.fromCharCode(255&v)),v>>=8;return x.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,x){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(x),{dispose:()=>{const A=C.indexOf(x);A!==-1&&C.splice(A,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,x){this._executeHandlers[v.charCodeAt(0)]=x}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,x){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(x),{dispose:()=>{const A=C.indexOf(x);A!==-1&&C.splice(A,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,x){return this._dcsParser.registerHandler(this._identifier(v),x)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,x){return this._oscParser.registerHandler(v,x)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}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(v,x,y,C,A){this._parseStack.state=v,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=A}parse(v,x,y){let C,A=0,E=0,j=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,j=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&D>-1){for(;D>=0&&(C=T[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&D>-1){for(;D>=0&&(C=T[D](),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 6:if(A=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(A!==24&&A!==26,y),C)return C;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(A=v[this._parseStack.chunkPos],C=this._oscParser.end(A!==24&&A!==26,y),C)return C;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,j=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=j;T>4){case 2:for(let F=T+1;;++F){if(F>=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=0&&(C=D[I](this._params),C!==!0);I--)if(C instanceof Promise)return this._preserveStack(3,D,I,E,T),C;I<0&&this._csiHandlerFb(this._collect<<8|A,this._params),this.precedingJoinState=0;break;case 8:do switch(A){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(A-48)}while(++T47&&A<60);T--;break;case 9:this._collect<<=8,this._collect|=A;break;case 10:const P=this._escHandlers[this._collect<<8|A];let H=P?P.length-1:-1;for(;H>=0&&(C=P[H](),C!==!0);H--)if(C instanceof Promise)return this._preserveStack(4,P,H,E,T),C;H<0&&this._escHandlerFb(this._collect<<8|A),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|A,this._params);break;case 13:for(let F=T+1;;++F)if(F>=x||(A=v[F])===24||A===26||A===27||A>127&&A=x||(A=v[F])<32||A>127&&A{Object.defineProperty(l,"__esModule",{value:!0}),l.OscHandler=l.OscParser=void 0;const d=c(5770),_=c(482),f=[];l.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(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const S=this._handlers[m];return S.push(g),{dispose:()=>{const k=S.indexOf(g);k!==-1&&S.splice(k,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].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 m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,S){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(m,g,S);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(m,g,S))}start(){this.reset(),this._state=1}put(m,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(m,g,S)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,k=this._active.length-1,b=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,S=g,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;k>=0&&(S=this._active[k].end(m),S!==!0);k--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,S;k--}for(;k>=0;k--)if(S=this._active[k].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},l.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,S){this._hitLimit||(this._data+=(0,_.utf32ToString)(m,g,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,g}}},8742:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Params=void 0;const c=2147483647;class d{static fromArray(f){const m=new d;if(!f.length)return m;for(let g=Array.isArray(f[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(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 m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&f.push(Array.prototype.slice.call(this._subParams,g,S))}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 m=this._subParamsIdx[f]>>8,g=255&this._subParamsIdx[f];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const f={};for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&(f[m]=this._subParams.slice(g,S))}return f}addDigit(f){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,S=g[m-1];g[m-1]=~S?Math.min(10*S+f,c):f}}l.Params=d},5741:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.AddonManager=void 0,l.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let _=0;_{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferApiView=void 0;const d=c(3785),_=c(511);l.BufferApiView=class{constructor(f,m){this._buffer=f,this.type=m}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 m=this._buffer.lines.get(f);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new _.CellData}}},3785:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLineApiView=void 0;const d=c(511);l.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,f){if(!(_<0||_>=this._line.length))return f?(this._line.loadCell(_,f),f):this._line.loadCell(_,new d.CellData)}translateToString(_,f,m){return this._line.translateToString(_,f,m)}}},8285:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferNamespaceApi=void 0;const d=c(8771),_=c(8460),f=c(844);class m extends f.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}l.BufferNamespaceApi=m},7975:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ParserApi=void 0,l.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(_=>d(_.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((_,f)=>d(_,f.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeApi=void 0,l.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(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,A=arguments.length,E=A<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(A<3?C(E):A>3?C(v,x,E):C(v,x))||E);return A>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferService=l.MINIMUM_ROWS=l.MINIMUM_COLS=void 0;const f=c(8460),m=c(844),g=c(5295),S=c(2585);l.MINIMUM_COLS=2,l.MINIMUM_ROWS=1;let k=l.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(b){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(b.rawOptions.cols||0,l.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,l.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=x.getBlankLine(b,v),this._cachedBlankLine=y),y.isWrapped=v;const C=x.ybase+x.scrollTop,A=x.ybase+x.scrollBottom;if(x.scrollTop===0){const E=x.lines.isFull;A===x.lines.length-1?E?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(A+1,0,y.clone()),E?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const E=A-C+1;x.lines.shiftElements(C+1,E-1,-1),x.lines.set(A,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(b,v,x){const y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),C!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};l.BufferService=k=d([_(0,S.IOptionsService)],k)},7994:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CharsetService=void 0,l.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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(o,l,c){var d=this&&this.__decorate||function(y,C,A,E){var j,T=arguments.length,D=T<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,A):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,A,E);else for(var I=y.length-1;I>=0;I--)(j=y[I])&&(D=(T<3?j(D):T>3?j(C,A,D):j(C,A))||D);return T>3&&D&&Object.defineProperty(C,A,D),D},_=this&&this.__param||function(y,C){return function(A,E){C(A,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreMouseService=void 0;const f=c(2585),m=c(8460),g=c(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let A=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(A|=64,A|=y.action):(A|=3&y.button,4&y.button&&(A|=64),8&y.button&&(A|=128),y.action===32?A|=32:y.action!==0||C||(A|=3)),A}const b=String.fromCharCode,v={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${b(C[0])}${b(C[1])}${b(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let x=l.CoreMouseService=class extends g.Disposable{constructor(y,C){super(),this._bufferService=y,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const A of Object.keys(S))this.addProtocol(A,S[A]);for(const A of Object.keys(v))this.addEncoding(A,v[A]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,A){if(A){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};l.CoreMouseService=x=d([_(0,f.IBufferService),_(1,f.ICoreService)],x)},6975:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreService=void 0;const f=c(1439),m=c(8460),g=c(844),S=c(2585),k=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=l.CoreService=class extends g.Disposable{constructor(x,y,C){super(),this._bufferService=x,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}reset(){this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}triggerDataEvent(x,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((A=>A.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};l.CoreService=v=d([_(0,S.IBufferService),_(1,S.ILogService),_(2,S.IOptionsService)],v)},9074:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DecorationService=void 0;const d=c(8055),_=c(8460),f=c(844),m=c(6106);let g=0,S=0;class k extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new b(x);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,C){let A=0,E=0;for(const j of this._decorations.getKeyIterator(y))A=j.options.x??0,E=A+(j.options.width??1),x>=A&&x{g=E.options.x??0,S=g+(E.options.width??1),x>=g&&x{Object.defineProperty(l,"__esModule",{value:!0}),l.InstantiationService=l.ServiceCollection=void 0;const d=c(2585),_=c(8343);class f{constructor(...g){this._entries=new Map;for(const[S,k]of g)this.set(S,k)}set(g,S){const k=this._entries.get(g);return this._entries.set(g,S),k}forEach(g){for(const[S,k]of this._entries.entries())g(S,k)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}l.ServiceCollection=f,l.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const S=(0,_.getServiceDependencies)(m).sort(((v,x)=>v.index-x.index)),k=[];for(const v of S){const x=this._services.get(v.id);if(!x)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${v.id}.`);k.push(x)}const b=S.length>0?S[0].index:g.length;if(g.length!==b)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${b+1} conflicts with ${g.length} static arguments`);return new m(...g,...k)}}},7866:function(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,A=arguments.length,E=A<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(A<3?C(E):A>3?C(v,x,E):C(v,x))||E);return A>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.traceCall=l.setTraceLogger=l.LogService=void 0;const f=c(844),m=c(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let S,k=l.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(E))).join(", ")})`);const A=y.apply(this,C);return S.trace(`GlyphRenderer#${y.name} return`,A),A}}},7302:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.OptionsService=l.DEFAULT_OPTIONS=void 0;const d=c(8460),_=c(844),f=c(6114);l.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 m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends _.Disposable{constructor(k){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...l.DEFAULT_OPTIONS};for(const v in k)if(v in b)try{const x=k[v];b[v]=this._sanitizeAndValidateOption(v,x)}catch(x){console.error(x)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,b){return this.onOptionChange((v=>{v===k&&b(this.rawOptions[k])}))}onMultipleOptionChange(k,b){return this.onOptionChange((v=>{k.indexOf(v)!==-1&&b()}))}_setupOptions(){const k=v=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,x)=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);x=this._sanitizeAndValidateOption(v,x),this.rawOptions[v]!==x&&(this.rawOptions[v]=x,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const x={get:k.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,x)}}_sanitizeAndValidateOption(k,b){switch(k){case"cursorStyle":if(b||(b=l.DEFAULT_OPTIONS[k]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${k}`);break;case"wordSeparator":b||(b=l.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=m.includes(b)?b:l.DEFAULT_OPTIONS[k];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${k} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${k} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}l.OptionsService=g},2660:function(o,l,c){var d=this&&this.__decorate||function(g,S,k,b){var v,x=arguments.length,y=x<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,k):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,S,k,b);else for(var C=g.length-1;C>=0;C--)(v=g[C])&&(y=(x<3?v(y):x>3?v(S,k,y):v(S,k))||y);return x>3&&y&&Object.defineProperty(S,k,y),y},_=this&&this.__param||function(g,S){return function(k,b){S(k,b,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkService=void 0;const f=c(2585);let m=l.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const S=this._bufferService.buffer;if(g.id===void 0){const C=S.addMarker(S.ybase+S.y),A={data:g,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(A,C))),this._dataByLinkId.set(A.id,A),A.id}const k=g,b=this._getEntryIdKey(k),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,S.ybase+S.y),v.id;const x=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,S){const k=this._dataByLinkId.get(g);if(k&&k.lines.every((b=>b.line!==S))){const b=this._bufferService.buffer.addMarker(S);k.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(k,b)))}}getLinkData(g){var S;return(S=this._dataByLinkId.get(g))==null?void 0:S.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){const k=g.lines.indexOf(S);k!==-1&&(g.lines.splice(k,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};l.OscLinkService=m=d([_(0,f.IBufferService)],m)},8343:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.createDecorator=l.getServiceDependencies=l.serviceRegistry=void 0;const c="di$target",d="di$dependencies";l.serviceRegistry=new Map,l.getServiceDependencies=function(_){return _[d]||[]},l.createDecorator=function(_){if(l.serviceRegistry.has(_))return l.serviceRegistry.get(_);const f=function(m,g,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,b,v){b[c]===b?b[d].push({id:k,index:v}):(b[d]=[{id:k,index:v}],b[c]=b)})(f,m,S)};return f.toString=()=>_,l.serviceRegistry.set(_,f),f}},2585:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.IDecorationService=l.IUnicodeService=l.IOscLinkService=l.IOptionsService=l.ILogService=l.LogLevelEnum=l.IInstantiationService=l.ICharsetService=l.ICoreService=l.ICoreMouseService=l.IBufferService=void 0;const d=c(8343);var _;l.IBufferService=(0,d.createDecorator)("BufferService"),l.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),l.ICoreService=(0,d.createDecorator)("CoreService"),l.ICharsetService=(0,d.createDecorator)("CharsetService"),l.IInstantiationService=(0,d.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"})(_||(l.LogLevelEnum=_={})),l.ILogService=(0,d.createDecorator)("LogService"),l.IOptionsService=(0,d.createDecorator)("OptionsService"),l.IOscLinkService=(0,d.createDecorator)("OscLinkService"),l.IUnicodeService=(0,d.createDecorator)("UnicodeService"),l.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeService=void 0;const d=c(8460),_=c(225);class f{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,k=!1){return(16777215&g)<<3|(3&S)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const g=new _.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,k=0;const b=g.length;for(let v=0;v=b)return S+this.wcwidth(x);const A=g.charCodeAt(v);56320<=A&&A<=57343?x=1024*(x-55296)+A-56320+65536:S+=this.wcwidth(A)}const y=this.charProperties(x,k);let C=f.extractWidth(y);f.extractShouldJoin(y)&&(C-=f.extractWidth(k)),S+=C,k=y}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}l.UnicodeService=f}},r={};function s(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return t[o].call(c.exports,c,c.exports,s),c.exports}var a={};return(()=>{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const l=s(9042),c=s(3236),d=s(844),_=s(5741),f=s(8285),m=s(7975),g=s(7090),S=["cols","rows"];class k extends d.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],y=(C,A)=>{this._checkReadonlyOptions(C),this._core.options[C]=A};for(const C in this._core.options){const A={get:x.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,A)}}_checkReadonlyOptions(v){if(S.includes(v))throw new Error(`Option "${v}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.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 v=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const x in v)this._publicOptions[x]=v[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,x=!0){this._core.input(v,x)}resize(v,x){this._verifyIntegers(v,x),this._core.resize(v,x)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,x,y){this._verifyIntegers(v,x,y),this._core.select(v,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,x){this._verifyIntegers(v,x),this._core.selectLines(v,x)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,x){this._core.write(v,x)}writeln(v,x){this._core.write(v),this._core.write(`\r -`,x)}paste(v){this._core.paste(v)}refresh(v,x){this._verifyIntegers(v,x),this._core.refresh(v,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return l}_verifyIntegers(...v){for(const x of v)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const x of v)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}o.Terminal=k})(),a})()))})(Iv)),Iv.exports}var iut=sut();function t4(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new iut.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),a=new tut.FitAddon;s.loadAddon(a),t&&s.loadAddon(new rut.WebLinksAddon((c,d)=>{let _;try{_=new URL(d)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const o=()=>{try{a.fit()}catch{}};o();const l=new ResizeObserver(o);return l.observe(e),{terminal:s,dispose(){l.disconnect(),s.dispose()}}}const LT="h-40 overflow-hidden rounded-md bg-terminal p-2";function _m(e){return typeof e=="object"&&e!==null}function OT(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function aut(e){return _m(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||OT(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function out(e){return _m(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&OT(e.partitions)&&(e.error===null||typeof e.error=="string")}function lut(e){return!_m(e)||e.type!=="complete"?null:e.backend==="ssh"&&aut(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&out(e.result)?{backend:"slurm",result:e.result}:null}function cut(e){return _m(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function IT({host:e,backend:n,active:t=!0,onComplete:r,onError:s}){const a=M.useRef(null),o=M.useRef(null),l=M.useRef(r),c=M.useRef(s),[d,_]=M.useState(null);return l.current=r,c.current=s,M.useEffect(()=>{const f=a.current;if(!f)return;const{terminal:m,dispose:g}=t4(f,!1,!0);o.current=m,m.focus();const S=location.protocol==="https:"?"wss:":"ws:",k=new URL("/api/settings/ssh/connect",`${S}//${location.host}`);k.searchParams.set("host",e),k.searchParams.set("backend",n);const b=new WebSocket(k);b.binaryType="arraybuffer";let v=!1,x=!1,y=!1;const C=j=>{x||(x=!0,y||m.writeln(j),m.options.disableStdin=!0,m.blur(),_(j),c.current(j))},A=m.onData(j=>{b.readyState===WebSocket.OPEN&&b.send(new TextEncoder().encode(j))}),E=m.onResize(({cols:j,rows:T})=>{b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"resize",cols:j,rows:T}))});return b.onopen=()=>{b.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}))},b.onmessage=j=>{if(j.data instanceof ArrayBuffer){y=!0,m.write(new Uint8Array(j.data));return}if(typeof j.data!="string")return;let T;try{T=JSON.parse(j.data)}catch{return}const D=lut(T);if(D){v=!0,l.current(D),b.close();return}const I=cut(T);I&&C(I)},b.onerror=()=>C(H7()),b.onclose=()=>{!v&&!x&&C(H7())},()=>{b.onopen=null,b.onmessage=null,b.onerror=null,b.onclose=null,A.dispose(),E.dispose(),b.close(),o.current=null,g()}},[n,e]),M.useEffect(()=>{const f=o.current;f&&(f.options.disableStdin=!t||d!==null,t&&d===null?f.focus():f.blur())},[t,d]),h.jsxs("div",{className:"mt-3",children:[h.jsx("div",{className:LT,role:"group","aria-label":OE({host:Ae(e)}),children:h.jsx("div",{ref:a,className:"h-full overflow-hidden"})}),d?h.jsx("p",{role:"alert",className:"sr-only",children:d}):null]})}function uut({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:a}=t4(r,!0,!0);return s.write(n),a},[n]),h.jsx("div",{className:`mt-3 ${LT}`,role:"group","aria-label":OE({host:Ae(e)}),children:h.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}const Aa=["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(" "),ed=["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(" "),jc=["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(" "),n4="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",hs=["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(" "),jh=["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(" "),go=["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(" "),w2=["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(" "),O0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),vu=["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(" ");function Bv(e){return e.agentReady?{cls:"ok",variant:"success",label:TE()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:Cze()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:uLe()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:gLe()}:{cls:"warn",variant:"warning",label:Lje()}:{cls:"warn",variant:"warning",label:pje()}}function dut({h:e}){return e.authMethod?h.jsx(h.Fragment,{children:e.authMethod==="oauth"?PCe():_E()}):h.jsx(h.Fragment,{children:"—"})}function fut(){const[e,n]=M.useState(null),[t,r]=M.useState("claude-code"),[s,a]=M.useState(!1),o=(c,d=!1)=>{a(!0),ep(c,d).then(n).catch(()=>{}).finally(()=>a(!1))};M.useEffect(()=>o(!1),[]),M.useEffect(()=>Dx(()=>o(!0)),[]);const l=e==null?void 0:e.find(c=>c.id===t);return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:ZNe()}),h.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(e??[]).map(c=>h.jsxs("button",{className:c.id===t?"active":"",onClick:()=>r(c.id),children:[c.name,h.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${Bv(c).cls}`})]},c.id))}),e?l?h.jsxs("div",{className:Aa,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx(Dt,{variant:Bv(l).variant,children:Bv(l).label}),h.jsx("div",{className:"spacer flex-1"}),h.jsxs(Qe,{size:"small",onClick:()=>o(!0,!0),disabled:s,children:[h.jsx(ld,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]})]}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:M9e()}),h.jsx("span",{className:"v",children:l.binPath??CCe()}),h.jsx("span",{className:"k",children:DE()}),h.jsx("span",{className:"v",children:l.version??"—"}),h.jsx("span",{className:"k",children:h9e()}),h.jsx("span",{className:"v",children:h.jsx(dut,{h:l})}),l.account&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:l.id==="opencode"?eOe():hx()}),h.jsx("span",{className:"v",children:l.account})]}),l.org&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:rMe()}),h.jsx("span",{className:"v",children:l.org})]}),l.plan&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:$Me()}),h.jsx("span",{className:"v",children:l.plan})]}),h.jsx("span",{className:"k",children:a9e()}),h.jsx("span",{className:"v",children:l.models.length>0?P8e({count:Vt(l.models.length),models:new Intl.ListFormat(N()).format(l.models.slice(0,4).map(c=>Ae(Z0(c))))}):fx()})]}),l.agentNote&&h.jsx("p",{className:hs,children:Th(l.agentNote)})]}):null:h.jsxs(vr,{children:[h.jsx(dn,{})," ",vNe()]})]})}function hut({s:e}){if(!e.configured)return h.jsx(Dt,{children:Mp()});const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?h.jsx(Dt,{variant:"success",children:px()}):h.jsx(Dt,{variant:"error",children:LTe()}):h.jsx(Dt,{variant:"error",children:bEe()}):h.jsx(Dt,{variant:"error",children:aAe()})}function _ut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(!1),[_,f]=M.useState(null),m=k=>{n(k),a(k.context??""),l(k.namespace)};M.useEffect(()=>{WYe().then(m).catch(k=>r(k instanceof Error?k.message:String(k)))},[]);const g=e!==null&&s===(e.context??"")&&o.trim()===e.namespace;async function S(k){if(k.preventDefault(),!c){d(!0),f(null);try{m(await KYe({context:s,namespace:o.trim()}))}catch(b){f(b instanceof Error?b.message:String(b))}finally{d(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:lEe()}),h.jsx("span",{className:"v",children:h.jsx(hut,{s:e})})]}),e.preflight.error&&h.jsx("p",{className:n4,children:e.preflight.error}),h.jsxs("form",{className:jh,onSubmit:S,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[REe(),h.jsx(Yf,{choices:[{id:"",label:e.currentContext?t8e({context:Ae(e.currentContext)}):Zke()},...s&&!e.contexts.includes(s)?[{id:s,label:ACe({context:Ae(s)})}]:[],...e.contexts.map(k=>({id:k,label:k}))],value:s,variant:"field",dropDown:!0,disabled:c,onSelect:a})]}),h.jsxs("label",{children:[oTe(),h.jsx("input",{type:"text",value:o,onChange:k=>l(k.target.value),placeholder:rNe(),autoComplete:"off",spellCheck:!1})]})]}),_&&h.jsx("div",{className:"error",children:_}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:c||g,children:c?ja():kc()})})]}),h.jsxs("section",{className:"mt-7",children:[h.jsx("h3",{className:"mt-0 mx-0 mb-1.5 text-base font-semibold text-text",children:jRe()}),h.jsx("p",{className:"m-0 font-sans text-sm leading-relaxed text-text",children:g8e({placeholder:Ae("{{ORX_RUN}}"),command:Ae("--manifest ")})})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Z9e()]})})}const put={env:C8e,syncedEnv:I8e,modalToml:A8e};function mut({s:e}){return e.ready?h.jsx(Dt,{variant:"success",children:px()}):!e.tokenConfigured&&!e.modalImportable?h.jsx(Dt,{children:jje()}):e.modalImportable?e.tokenConfigured?h.jsx(Dt,{children:ME()}):h.jsx(Dt,{variant:"error",children:tje()}):h.jsx(Dt,{variant:"error",children:e.envProvisioned?PSe():GSe()})}function gut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1),[o,l]=M.useState(null);M.useEffect(()=>{YYe().then(n).catch(d=>r(d instanceof Error?d.message:String(d)))},[]);async function c(){if(!s){a(!0),l(null);try{n(await XYe())}catch(d){l(d instanceof Error?d.message:String(d))}finally{a(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:Dp()}),h.jsx("span",{className:"v",children:h.jsx(mut,{s:e})}),h.jsx("span",{className:"k",children:mx()}),h.jsx("span",{className:"v",children:e.modalImportable?vx():e.envProvisioned?y8e():vCe()}),h.jsx("span",{className:"k",children:jE()}),h.jsx("span",{className:"v",children:e.tokenSource?put[e.tokenSource]():Mp()})]}),!e.tokenConfigured&&h.jsx("p",{className:hs,children:R8e({command:Ae("modal token new"),id:Ae("MODAL_TOKEN_ID"),secret:Ae("MODAL_TOKEN_SECRET")})}),e.error&&e.envProvisioned&&!e.modalImportable&&h.jsx("p",{className:hs,children:e.error}),o&&h.jsx("div",{className:"error",children:o}),!e.modalImportable&&h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsx(Qe,{variant:"primary",onClick:()=>void c(),disabled:s,children:s?iIe():tIe()})})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",tEe()]})})}const BT="rounded-sm border-border-strong bg-surface text-subtext",$T="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",vut=5e3;function HT(e){const[n,t]=M.useState({}),r=e.join("\0");return M.useEffect(()=>{const a=r?r.split("\0"):[];if(a.length===0){t({});return}let o=!1;const l=async()=>{const d=await Promise.all(a.map(async _=>{try{return[_,(await rXe(_)).running]}catch{return null}}));o||t(_=>{const f={};for(const m of d)m&&(f[m[0]]=m[1]);for(const m of a)f[m]===void 0&&_[m]!==void 0&&(f[m]=_[m]);return f})};l();const c=window.setInterval(l,vut);return()=>{o=!0,window.clearInterval(c)}},[r]),[n,a=>t(o=>({...o,[a]:!0}))]}function but({test:e,connecting:n,masterRunning:t}){if(n)return h.jsx("span",{role:"status",children:h.jsx(Dt,{className:$T,children:yE()})});if(e===void 0)return h.jsx(Dt,{className:BT,children:zE()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,a=e.reachable?e.toolsFound?s?h.jsx(Dt,{className:"rounded-sm",variant:"warning",children:SE()}):h.jsx(Dt,{className:"rounded-sm",variant:"success",children:vx()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:r.length===1?G8e({tool:Ae(r[0])}):Y8e()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:gx()});return h.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!s&&h.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Na(e.testedAt)})]})}function xut(){const[e,n]=M.useState(null),[t,r]=M.useState({}),[s,a]=M.useState({}),[o,l]=M.useState(null),[c,d]=M.useState(!1),[_,f]=M.useState(0),m=(e==null?void 0:e.filter(x=>{const y=t[x.host]??x.lastTest;return(y==null?void 0:y.reachable)&&y.toolsFound}).map(x=>x.host))??[],[g,S]=HT(m);M.useEffect(()=>{nXe().then(n).catch(()=>n([]))},[]);function k(x){d(!1),f(y=>y+1),l(x),a(y=>({...y,[x]:!0}))}function b(){d(!1),l(null)}function v(x,y){a(C=>({...C,[x]:!y}))}return h.jsx(h.Fragment,{children:e===null?h.jsxs(vr,{children:[h.jsx(dn,{})," ",tRe()]}):e.length===0?h.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:jTe()}):h.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:e.map(x=>{const y=t[x.host]??x.lastTest,C=o===x.host,A=s[x.host]??!1,E=C||(y==null?void 0:y.reachable)===!1,j=`${x.user?`${x.user}@`:""}${x.hostname??x.host}${x.port?`:${x.port}`:""}`;return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[E?h.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":A,"aria-label":A?yO({name:Ae(x.host)}):UO({name:Ae(x.host)}),onClick:T=>{T.stopPropagation(),v(x.host,A)},children:h.jsx(ta,{size:15,className:`text-muted transition-transform duration-120 ease-standard${A?" rotate-180":""}`})}):h.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-base font-medium text-text",title:x.host,children:x.host}),h.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:j,children:j})]})]}),h.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[h.jsx("div",{className:"text-start",children:h.jsx(but,{test:y,connecting:C&&!c,masterRunning:g[x.host]})}),h.jsx(Qe,{size:"small",type:"button",className:"justify-self-end",onClick:T=>{T.stopPropagation(),C&&!c?b():k(x.host)},disabled:!C&&o!==null&&!c,children:C?c?Gu():_x():(y==null?void 0:y.reachable)===!1?Gu():y?LE():dx()})]})]}),E&&(A||C)&&h.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${A?"":" hidden"}`,children:[!C&&(y==null?void 0:y.error)&&h.jsx(uut,{host:x.host,transcript:y.error}),C&&h.jsx(IT,{host:x.host,backend:"ssh",active:A,onComplete:T=>{T.backend==="ssh"&&(r(D=>({...D,[x.host]:T.result})),S(x.host),d(!1),l(null))},onError:T=>{d(!0),r(D=>({...D,[x.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:T,testedAt:Date.now()}}))}},_)]})]},x.host)})})})}function yut({test:e,connecting:n,masterRunning:t}){return n?h.jsx(Dt,{className:$T,children:yE()}):e===null?h.jsx(Dt,{className:BT,children:zE()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?h.jsx(Dt,{className:"rounded-sm",variant:"warning",children:SE()}):h.jsx(Dt,{className:"rounded-sm",variant:"success",children:vx()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:GAe()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:ZTe()}):h.jsx(Dt,{className:"rounded-sm",variant:"error",children:gx()})}function wut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(""),[_,f]=M.useState(""),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,A]=M.useState(!1),[E,j]=M.useState(0),T=s&&(b!=null&&b.reachable)&&b.slurmFound&&b.toolsFound?[s]:[],[D,I]=HT(T);function P(){A(!1),j(X=>X+1),y(!0)}const H=X=>{n(X),a(X.host??""),l(X.partition??""),d(X.account??""),f(X.timeLimit??"")};M.useEffect(()=>{sXe().then(H).catch(X=>r(X instanceof Error?X.message:String(X)))},[]);const F=e!==null&&s===(e.host??"")&&o.trim()===(e.partition??"")&&c.trim()===(e.account??"")&&_.trim()===(e.timeLimit??"");async function V(X){if(X.preventDefault(),!m){g(!0),k(null);try{H(await iXe({host:s,partition:o.trim(),account:c.trim(),timeLimit:_.trim()}))}catch(W){k(W instanceof Error?W.message:String(W))}finally{g(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[!x&&(b==null?void 0:b.error)&&h.jsx("p",{className:n4,children:b.error}),b&&b.partitions.length>0&&h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:jMe()}),h.jsx("span",{className:"v",children:b.partitions.join(", ")})]}),h.jsxs("form",{className:jh,onSubmit:V,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[IAe(),h.jsx(Yf,{choices:[{id:"",label:Nje()},...s&&!e.hosts.some(X=>X.host===s)?[{id:s,label:`${s} (not in ~/.ssh/config)`}]:[],...e.hosts.map(X=>({id:X.host,label:X.host}))],value:s,variant:"field",dropDown:!0,disabled:m||x,onSelect:X=>{a(X),v(null),y(!1),A(!1)}})]}),h.jsxs("label",{children:[NMe(),h.jsx("input",{type:"text",list:"slurm-partitions",value:o,onChange:X=>l(X.target.value),placeholder:D7(),autoComplete:"off",spellCheck:!1}),h.jsx("datalist",{id:"slurm-partitions",children:b==null?void 0:b.partitions.map(X=>h.jsx("option",{value:X},X))})]})]}),h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[hx(),h.jsx("input",{type:"text",value:c,onChange:X=>d(X.target.value),placeholder:D7(),autoComplete:"off",spellCheck:!1})]}),h.jsxs("label",{children:[rLe(),h.jsx("input",{type:"text",value:_,onChange:X=>f(X.target.value),placeholder:pEe(),autoComplete:"off",spellCheck:!1})]})]}),S&&h.jsx("div",{className:"error",children:S}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:m||F||x,children:m?ja():kc()}),h.jsx(Qe,{type:"button",onClick:()=>{x&&!C?(A(!1),y(!1)):P()},disabled:!s,title:s?void 0:XLe(),children:x?C?Gu():_x():b?LE():dx()}),h.jsx("span",{role:"status",children:h.jsx(yut,{test:b,connecting:x&&!C,masterRunning:D[s]})})]})]}),x&&h.jsx(IT,{host:s,backend:"slurm",onComplete:X=>{X.backend==="slurm"&&(v(X.result),I(s),A(!1),y(!1))},onError:X=>{A(!0),v({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:X})}},E)]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",yAe()]})})}function Sut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState(null),m=_!==null&&_!=="testing"?_:null,g=v=>{n(v),a(v.address??"")};M.useEffect(()=>{aXe().then(g).catch(v=>r(v instanceof Error?v.message:String(v)))},[]);const S=e!==null&&s===(e.address??"");async function k(v){if(v.preventDefault(),!o){l(!0),d(null);try{g(await oXe({address:s}))}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(!1)}}}async function b(){f("testing");try{f(await lXe(s.trim()||void 0))}catch(v){f({reachable:!1,address:s.trim()||"(unknown)",rayVersion:null,error:v instanceof Error?v.message:String(v)})}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:ENe()}),h.jsx("span",{className:"v",children:e.resolvedAddress}),h.jsx("span",{className:"k",children:bx()}),h.jsx("span",{className:"v",children:e.source}),(m==null?void 0:m.reachable)&&m.rayVersion&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:WMe()}),h.jsx("span",{className:"v",children:m.rayVersion})]})]}),(m==null?void 0:m.error)&&h.jsx("p",{className:n4,children:m.error}),h.jsxs("form",{className:jh,onSubmit:k,children:[h.jsxs("label",{children:[Kze(),h.jsx("input",{type:"text",value:s,onChange:v=>{a(v.target.value),f(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:o||S,children:o?ja():kc()}),h.jsx(Qe,{type:"button",onClick:()=>void b(),disabled:_==="testing",children:RDe()}),h.jsx(kut,{test:_})]})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",gAe()]})})}function kut({test:e}){return e===null?null:e==="testing"?h.jsx(Dt,{children:IDe()}):e.reachable?h.jsx(Dt,{variant:"success",children:ZMe()}):h.jsx(Dt,{variant:"error",children:gx()})}function Cut(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{dXe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:cze()}),h.jsx("span",{className:"v",children:e.hostname}),h.jsx("span",{className:"k",children:ADe()}),h.jsxs("span",{className:"v",children:[e.os,"/",e.arch,e.chip?` — ${e.chip}`:""]}),h.jsx("span",{className:"k",children:"CPU"}),h.jsx("span",{className:"v",children:e.cpuCount>0?`${e.cpuCount} cores`:"—"}),h.jsx("span",{className:"k",children:"RAM"}),h.jsx("span",{className:"v",children:e.memBytes!==null?Sa(e.memBytes):"—"}),h.jsx("span",{className:"k",children:"GPUs"}),h.jsx("span",{className:"v",children:e.gpus.length===0?"none detected (nvidia-smi)":e.gpus.map(s=>`${s.name}${s.memMib!==null?` — ${Sa(s.memMib*1024*1024)}`:""}`).join(", ")})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",_Ne()]})})}function Eut(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{fXe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?e.loggedIn?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:Dp()}),h.jsx("span",{className:"v",children:h.jsx(Dt,{variant:"success",children:TE()})}),h.jsx("span",{className:"k",children:oMe()}),h.jsx("span",{className:"v",children:e.orgs.length>0?e.orgs.join(", "):"—"}),h.jsx("span",{className:"k",children:nDe()}),h.jsx("span",{className:"v",children:e.sshKeyStatus==="matched"?h.jsx(Dt,{variant:"success",children:$je()}):e.sshKeyStatus==="no_local_match"?h.jsx(Dt,{variant:"warning",children:Sje()}):e.sshKeyStatus==="none_registered"?h.jsx(Dt,{variant:"error",children:ije()}):h.jsx(Dt,{children:ME()})})]}),e.sshKeyStatus==="none_registered"&&(e.sshKeyPath?h.jsxs("p",{dir:"auto",className:hs,children:[QCe()," ",h.jsxs("code",{children:["orx ssh-key add ",e.sshKeyPath]}),"."]}):h.jsxs("p",{dir:"auto",className:hs,children:[WTe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),PDe()," ",h.jsx("code",{children:"orx ssh-key add"}),"."]})),e.sshKeyStatus==="no_local_match"&&(e.sshKeyPath?h.jsx("p",{dir:"auto",className:hs,children:oOe({register:Ae(`orx ssh-key add ${e.sshKeyPath}`),load:Ae("ssh-add")})}):h.jsxs("p",{dir:"auto",className:hs,children:[UTe()," ",h.jsx("code",{children:"ssh-add"}),Jje()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),e.error&&h.jsx("p",{dir:"auto",className:hs,children:e.error})]}):h.jsx("p",{className:hs,children:c8e({command:Ae("orx login")})}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",W9e()]})})}const pp={local:aE,tinker:wae,hf:Gie,modal:nae,k8s:Yie,ssh:vae,slurm:_ae,ray:uae,openresearch:aae},Nut={local:gie,ssh:Iie,tinker:Pie,hf:cie,modal:yie,k8s:hie,slurm:Rie,ray:Aie,openresearch:Cie},r4={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"},zut={local:Dae,ssh:eoe,tinker:soe,hf:Eae,modal:Bae,k8s:Tae,slurm:Xae,ray:Vae,openresearch:Fae};function Aut(e){switch(e.id){case"local":return Lse();case"ssh":return tie({summary:Ae(e.summary)});case"tinker":return iie({summary:Ae(e.summary)});case"hf":return Nse({summary:Ae(e.summary)});case"modal":return $se({summary:Ae(e.summary)});case"k8s":return jse({summary:Ae(e.summary)});case"slurm":return Zse({summary:Ae(e.summary)});case"ray":return Wse({summary:Ae(e.summary)});case"openresearch":return Use({summary:Ae(e.summary)})}}function Tut({target:e}){return h.jsxs("dl",{className:"m-0 mt-8 grid grid-cols-[9rem_minmax(0,1fr)] gap-x-5 gap-y-4 font-sans",children:[h.jsx("dt",{className:"text-sm font-medium text-subtext",children:hze()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Aut(e)}),h.jsx("dt",{className:"text-sm font-medium text-subtext",children:BLe()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:zut[e.id]()})]})}const g8=["hf","modal","slurm","ray","openresearch"],$v=["hf","modal","openresearch"],PT={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"]},v8="__custom__";function _f(e,n){return!!(n&&!(PT[e]??[]).includes(n))}function jut({settings:e,projectId:n,onSaved:t}){const r=e.configuredDefaultBackend??e.defaultBackend??"local",s=e.defaultFlavor??"",[a,o]=M.useState(r),[l,c]=M.useState(s),[d,_]=M.useState(_f(r,s)),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=e.targets.find(I=>I.id===a),b=e.targets.filter(I=>I.configured||I.id===r),v=g8.includes(a),x=$v.includes(a),y=PT[a]??[],C=a===r&&(!v||l.trim()===s),A=pp[a](),E=f?XIe():x&&!l.trim()?Q7e({destination:A}):a==="ssh"?rCe():J8e({destination:A});M.useEffect(()=>{o(r),c(s),_(_f(r,s))},[r,s]);async function j(I,P){const H=g8.includes(I);if(!(f||$v.includes(I)&&!P.trim())){m(!0),S(null);try{t(await uXe({backend:I,flavor:H&&P.trim()||null,projectId:n}))}catch(F){S(F instanceof Error?F.message:String(F)),o(r),c(s),_(_f(r,s))}finally{m(!1)}}}function T(I){const P=e.targets.find(F=>F.id===I);if(!P)return;o(P.id);const H=P.id===r?s:"";c(H),_(_f(P.id,H)),$v.includes(P.id)||j(P.id,H)}function D(I){if(I===v8){_(!0);return}_(!1),c(I),(!x||I)&&j(a,I)}return h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:uNe()}),h.jsxs("div",{children:[h.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:I=>{I.preventDefault(),C||j(a,l)},children:[h.jsx(Yf,{choices:b.map(I=>({id:I.id,label:pp[I.id]()})),value:a,variant:"field",dropDown:!0,disabled:f,renderIcon:I=>{const P=e.targets.find(H=>H.id===I.id);return P?h.jsx(hm,{kind:r4[P.id],size:16}):null},onSelect:T}),v&&h.jsx("div",{children:d?h.jsxs("div",{className:"relative",children:[h.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:l,onChange:I=>c(I.target.value),onBlur:()=>{if(x&&!l.trim()){a===r&&(c(s),_(_f(r,s)));return}C||j(a,l)},placeholder:GEe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:f}),h.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":R7(),title:R7(),onMouseDown:I=>I.preventDefault(),onClick:()=>_(!1),children:h.jsx(ta,{size:12})})]}):h.jsx(Yf,{choices:[{id:"",label:x?K7e():dCe()},...l&&!y.includes(l)?[{id:l,label:jSe({value:Ae(l)})}]:[],...y.map(I=>({id:I,label:I})),{id:v8,label:YEe()}],value:l,variant:"field",dropDown:!0,disabled:f,onSelect:D})})]}),g&&h.jsx("div",{className:"error mt-2.5",children:g}),k&&!k.configured&&h.jsx("p",{className:hs,children:YDe()})]}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:E})]})}function Mut({target:e,isDefault:n,onOpen:t}){const r=e.unverified?H7e():e.id==="openresearch"?cIe():e.id==="ray"?dx():ZOe();return h.jsxs("button",{type:"button",className:"group flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans transition-colors duration-120 ease-standard hover:border-text hover:bg-surface disabled:cursor-default disabled:opacity-52",onClick:t,disabled:!e.enabled,children:[h.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:h.jsx(hm,{kind:r4[e.id],size:48})}),h.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:pp[e.id]()}),h.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:Nut[e.id]()}),h.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[h.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?NE():e.configured?lBe():r}),h.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:h.jsx(A0,{size:16})})]})]})}function Rut({target:e,isDefault:n,onBack:t}){return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back mb-10 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[h.jsx(Bf,{size:16})," ",CE()]}),h.jsxs("div",{className:"flex items-center justify-between gap-6",children:[h.jsxs("div",{className:`flex min-w-0 items-center ${e.id==="tinker"?"gap-8":"gap-5"}`,children:[h.jsx("span",{className:"flex h-20 w-24 flex-none items-center justify-start",children:h.jsx(hm,{kind:r4[e.id],size:72})}),h.jsx("h1",{className:"m-0 min-w-0",children:pp[e.id]()})]}),n&&h.jsx(Dt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:NE()})]}),h.jsx(Tut,{target:e}),e.id!=="tinker"&&h.jsxs("div",{className:"mt-8 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==="local"&&h.jsx(Cut,{}),e.id==="hf"&&h.jsx(But,{}),e.id==="modal"&&h.jsx(gut,{}),e.id==="k8s"&&h.jsx(_ut,{}),e.id==="ssh"&&h.jsx(xut,{}),e.id==="slurm"&&h.jsx(wut,{}),e.id==="ray"&&h.jsx(Sut,{}),e.id==="openresearch"&&h.jsx(Eut,{})]})]})}function Dut({project:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useRef(0);M.useEffect(()=>{_.current++,r(null),l(null),a(null),d(null)},[e==null?void 0:e.id]),M.useEffect(()=>{const y=++_.current;cXe(e==null?void 0:e.id).then(C=>{y===_.current&&(r(C),a(null))}).catch(C=>{if(y!==_.current)return;const A=C instanceof Error?C.message:String(C);r(E=>(E===null?a(A):d(A),E))})},[o,e==null?void 0:e.id]);const f=y=>{_.current++,r(y),d(null)},m=t?t.targets:null,g=(t==null?void 0:t.configuredDefaultBackend)??(t==null?void 0:t.defaultBackend),S=m?[...m].sort((y,C)=>+(C.id===g)-+(y.id===g)):null,k=(S==null?void 0:S.filter(y=>y.configured))??[],b=(S==null?void 0:S.filter(y=>!y.configured))??[],v=y=>h.jsx(Mut,{target:y,isDefault:g===y.id,onOpen:()=>l(y.id)},`${(e==null?void 0:e.id)??"none"}:${y.id}`),x=o?t==null?void 0:t.targets.find(y=>y.id===o):null;return x?h.jsx(Rut,{target:x,isDefault:g===x.id,onBack:()=>l(null)}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:EE()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:EEe()}),h.jsx(tdt,{projectId:e==null?void 0:e.id,onViewHistory:n}),s?h.jsx("div",{className:"error",children:s}):t?h.jsxs(h.Fragment,{children:[c&&h.jsx("div",{className:"error",children:c}),h.jsx(jut,{settings:t,projectId:e==null?void 0:e.id,onSaved:f}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:fRe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:k.map(v)})]}),b.length>0&&h.jsxs("section",{className:"mb-3.5",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:YAe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map(v)})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",U9e()]})]})}const Lut={env:bke,openresearchEnv:Ske,hfCache:pke};function Out({settings:e}){return e.configured?e.valid?h.jsx(Dt,{variant:"success",children:px()}):h.jsx(Dt,{variant:"error",children:Hze()}):h.jsx(Dt,{children:Mp()})}function Iut({settings:e}){return!e.configured||!e.valid?null:e.jobsWrite===!0?h.jsx(Dt,{variant:"success",children:nAe()}):e.jobsWrite===!1?h.jsx(Dt,{variant:"error",children:$Te()}):h.jsx(Dt,{children:Qze()})}function But(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),_=M.useRef(!1);M.useEffect(()=>{PYe().then(m=>{_.current||n(m)}).catch(m=>{_.current||r(m instanceof Error?m.message:String(m))})},[]);async function f(m){if(m.preventDefault(),!(!s.trim()||o)){l(!0),d(null);try{const g=await FYe(s.trim());_.current=!0,n(g),r(null),a("")}catch(g){d(g instanceof Error?g.message:String(g))}finally{l(!1)}}}return h.jsxs(h.Fragment,{children:[t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:jc,children:[h.jsx("span",{className:"k",children:Dp()}),h.jsx("span",{className:"v",children:h.jsx(Out,{settings:e})}),h.jsx("span",{className:"k",children:hx()}),h.jsx("span",{className:"v",children:e.username??"—"}),h.jsx("span",{className:"k",children:jE()}),h.jsx("span",{className:"v",children:e.maskedToken??"—"}),h.jsx("span",{className:"k",children:bx()}),h.jsx("span",{className:"v",children:e.source?Lut[e.source]():Mp()}),h.jsx("span",{className:"k",children:qze()}),h.jsxs("span",{className:"v",children:[h.jsx(Iut,{settings:e}),(!e.configured||!e.valid)&&"—"]})]}),e.source==="env"&&h.jsx("p",{className:hs,children:ize()}),e.valid&&e.jobsWrite===null&&h.jsx("p",{className:hs,children:Nke({login:Ae("hf auth login"),url:Ae("huggingface.co/settings/tokens")})})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",CAe()]}),h.jsxs("form",{className:jh,onSubmit:f,children:[h.jsxs("label",{children:[e!=null&&e.configured?jOe():oCe(),h.jsx("input",{type:"password",value:s,onChange:m=>a(m.target.value),placeholder:tze(),autoComplete:"off"})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:!s.trim()||o,children:o?sBe():kc()})})]})]})}const FT=/^hf_[A-Za-z0-9]{10,}$/;function UT(){return h.jsx("tr",{children:h.jsx("td",{colSpan:3,children:h.jsxs("p",{dir:"auto",className:hs,children:[JDe()," ",h.jsx("code",{children:"HF_TOKEN"}),URe()]})})})}const b8=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function S2(e,n){const t=n instanceof Error?n.message:String(n);WN(t.includes(e)?t:`${e}: ${t}`,"error")}function $ut({name:e,entry:n,onVars:t}){const[r,s]=M.useState(""),[a,o]=M.useState(!1);async function l(){if(!(!r.trim()||a)){o(!0);try{t(await dN(e,r.trim())),s("")}catch(d){S2(e,d)}finally{o(!1)}}}async function c(){if(!a){o(!0);try{t(await QYe(e))}catch(d){S2(e,d)}finally{o(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{className:"font-mono text-sm",children:e}),h.jsx("td",{className:"text-base text-subtext",children:n?h.jsxs(h.Fragment,{children:[n.maskedValue,n.inProcessEnv&&h.jsx(Dt,{children:SMe()})]}):h.jsx(Ob,{variant:"inline",className:"text-base",type:"password",value:r,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),l()),d.key==="Escape"&&!a&&s("")},placeholder:RE(),"aria-label":yB({name:Ae(e)}),autoComplete:"new-password",disabled:a})}),h.jsx("td",{children:n?h.jsx(Jt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:bb({name:Ae(e)}),"aria-label":bb({name:Ae(e)}),onClick:()=>void c(),disabled:a,children:h.jsx(cd,{size:13})}):r.trim()&&h.jsx(Qe,{size:"small",onClick:()=>void l(),disabled:a,children:a?ja():kc()})})]}),!n&&e!=="HF_TOKEN"&&FT.test(r.trim())&&h.jsx(UT,{})]})}function Hut({onVars:e,onDone:n}){const[t,r]=M.useState(""),[s,a]=M.useState(""),[o,l]=M.useState(!1);async function c(){if(!(!t.trim()||!s.trim()||o)){l(!0);try{e(await dN(t.trim(),s.trim())),n()}catch(_){S2(t.trim(),_)}finally{l(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),c()),_.key==="Escape"&&!o&&n()};return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(Ob,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:t,onChange:_=>r(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":bTe(),autoComplete:"off",spellCheck:!1,disabled:o})}),h.jsx("td",{children:h.jsx(Ob,{variant:"inline",className:"text-base",type:"password",value:s,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:RE(),"aria-label":STe(),autoComplete:"new-password",disabled:o})}),h.jsxs("td",{children:[h.jsx(Qe,{size:"small",onClick:()=>void c(),disabled:o||!t.trim()||!s.trim(),children:o?ja():kc()}),h.jsx(Jt,{title:_x(),"aria-label":$9e(),onClick:n,disabled:o,children:h.jsx(_s,{size:13})})]})]}),t.trim()!=="HF_TOKEN"&&FT.test(s.trim())&&h.jsx(UT,{})]})}function Put(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1);M.useEffect(()=>{ZYe().then(n).catch(c=>r(c instanceof Error?c.message:String(c)))},[]);const o=e===null?[]:e.map(c=>c.key).filter(c=>!b8.includes(c)),l=[...b8,...o];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:jLe()}),h.jsxs(Qe,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:s||e===null,children:[h.jsx(Ex,{size:12})," ",n9e()]})]}),h.jsx("div",{className:Aa,children:t?h.jsx("div",{className:"error",children:t}):e===null?h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]}):h.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:h.jsxs("tbody",{children:[l.map(c=>h.jsx($ut,{name:c,entry:e.find(d=>d.key===c),onVars:n},c)),s&&h.jsx(Hut,{onVars:n,onDone:()=>a(!1)})]})})})]})}const pf=[{value:"system",label:DIe,icon:CKe},{value:"light",label:TIe,icon:XKe},{value:"dark",label:SIe,icon:NKe}],Fut=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function Uut(){const e=Cc(),[n,t]=VN(),r=s=>{var _;const a=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!a)return;s.preventDefault();const o=[...s.currentTarget.querySelectorAll('[role="radio"]')],l=o.findIndex(f=>f===document.activeElement),d=((l===-1?pf.findIndex(f=>f.value===n):l)+a+pf.length)%pf.length;t(pf[d].value),(_=o[d])==null||_.focus()};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:x7e()}),h.jsxs("div",{className:`${Aa} mt-3`,children:[h.jsxs("div",{className:`${go} pb-3.5`,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:P7()}),h.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":P7(),onKeyDown:r,children:pf.map(({value:s,label:a,icon:o})=>h.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:[h.jsx(o,{size:14}),a()]},s))})]}),h.jsxs("div",{className:go,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:i8e()}),h.jsx("div",{className:"w-52 flex-none",children:h.jsx(Yf,{choices:Fut,value:e,variant:"field",dropDown:!0,onSelect:s=>{VL(s)&&XVe(s)}})})]})]})]})}const qut={installer:ZGe,"app-bundle":$Ge,cargo:UGe,homebrew:WGe,nix:tVe,unknown:iVe},Hv={cargo:cVe,homebrew:hVe,nix:gVe};function Gut(){var c;const{status:e,error:n,apply:t}=TT(),[r,s]=M.useState(null),[a,o]=M.useState(null);if(!e)return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:$7()}),n?h.jsx("div",{className:Aa,children:h.jsx("div",{className:"error",children:n})}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]});const l=async(d,_)=>{s(d),o(null);try{await _()}catch(f){o(f instanceof Error?f.message:String(f))}finally{s(null)}};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:$7()}),h.jsxs("div",{className:`${Aa} mt-3`,children:[h.jsxs("div",{className:`${ed} pb-3.5`,children:[h.jsx("div",{className:"k",children:DE()}),h.jsx("div",{className:"v",children:e.current}),h.jsx("div",{className:"k",children:uAe()}),h.jsx("div",{className:"v",children:e.latest??"—"}),h.jsx("div",{className:"k",children:yze()}),h.jsx("div",{className:"v",children:qut[e.channel]()})]}),e.restartRequired&&h.jsx("div",{className:go,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:NRe()}),h.jsx("p",{children:$Oe({installed:Ae(e.installedVersion??"—"),current:Ae(e.current??e.installedVersion??"—")})})]})}),e.selfUpdates?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:O7()}),h.jsxs("p",{children:[pTe(),e.envDisabled&&VIe()]})]}),h.jsx($x,{type:"button",checked:e.autoUpdate,"aria-label":O7(),disabled:r!==null,onClick:()=>void l("auto",()=>GYe(!e.autoUpdate).then(t))})]}),h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:e.updateAvailable?FIe({version:Ae(e.latest??"—")}):M7e()}),h.jsx("p",{children:e.updateAvailable?Wke():q7e()})]}),h.jsx(Qe,{size:"small",type:"button",disabled:r!==null,onClick:()=>void l("apply",()=>qYe().then(t)),children:r==="apply"?ux():e.updateAvailable?BIe():O7e()})]})]}):h.jsx("div",{className:go,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:dMe()}),h.jsx("p",{children:((c=Hv[e.channel])==null?void 0:c.call(Hv))??dOe()})]})}),e.channel==="app-bundle"&&h.jsx(Wut,{busy:r,run:l}),a&&h.jsx("div",{className:"error",children:a})]})]})}function Vut(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);M.useEffect(()=>{kXe().then(n).catch(l=>a(l instanceof Error?l.message:String(l)))},[]);const o=()=>{!e||t||(r(!0),a(null),CXe(!e.preferenceEnabled).then(n).catch(l=>a(l instanceof Error?l.message:String(l))).finally(()=>r(!1)))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:kLe()}),e?h.jsxs("div",{className:`${Aa} mt-3`,children:[h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[M7(),e.locked&&e.reason&&h.jsx(fJe,{content:`${PEe()} ${e.reason}.`,className:"text-subtext",children:h.jsx(uKe,{size:15})})]}),h.jsx("p",{children:NTe()})]}),h.jsx($x,{type:"button",checked:e.enabled,"aria-label":M7(),disabled:t||e.locked,onClick:o})]}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}function Wut({busy:e,run:n}){const[t,r]=M.useState(null),[s,a]=M.useState(!1),o=l=>void n("cli",()=>VYe(l).then(c=>{r(c),a(!1)}).catch(c=>{throw a(!l&&String((c==null?void 0:c.message)??c).includes("--force")),c}));return h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:$ke({command:Ae("orx")})}),t?h.jsxs("p",{children:[t.alreadyCurrent?aSe({link:Ae(t.link)}):uSe({link:Ae(t.link)}),!t.onPath&&m7e({directory:Ae(t.dir)})]}):h.jsx("p",{children:Lke({command:Ae("orx")})})]}),h.jsx(Qe,{size:"small",type:"button",disabled:e!==null,onClick:()=>o(s),children:e==="cli"?ux():s?NOe():t?pOe():jke()})]})}function Kut(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),o=()=>(a(null),jx().then(n).catch(c=>a(c instanceof Error?c.message:String(c))));M.useEffect(()=>void o(),[]);const l=()=>{if(!e||t)return;const c=!e.githubForNewProjects;r(!0),a(null),_N(c,!0).then(n).catch(d=>a(d instanceof Error?d.message:String(d))).finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:$Ne()}),e?h.jsxs("div",{className:`${Aa} 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:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx("h3",{children:UNe()}),h.jsx(Dt,{variant:e.githubAuthenticated?"success":e.ghInstalled?"warning":"error",children:e.githubAuthenticated?xE():kE()})]}),h.jsxs("div",{className:go,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:L7()}),h.jsx("p",{children:FLe()})]}),h.jsx($x,{type:"button",checked:e.githubForNewProjects,"aria-label":L7(),disabled:t||!e.githubAuthenticated&&!e.githubForNewProjects,onClick:l})]}),!e.githubAuthenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(qT,{ghInstalled:e.ghInstalled,onCheck:o})}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}function qT({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Th(e?UOe():Uke())}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&h.jsxs(Lb,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[Aze()," ",h.jsx(gc,{size:12})]}),h.jsx(Qe,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?jp():z7e()})]})]})}function Yut(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);return M.useEffect(()=>{RYe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o)))},[]),h.jsxs("div",{className:w2,children:[h.jsx("h3",{children:pMe()}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:WNe()}),h.jsx("span",{className:"v",children:h.jsx(Dt,{variant:e?"success":"default",children:e===null?s?hE():jp():e?WOe():ICe()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:VLe()}),e?h.jsx("div",{className:O0,children:h.jsx(Qe,{disabled:t,onClick:()=>{r(!0),a(null),DYe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o))).finally(()=>r(!1))},children:t?SOe():bOe()})}):h.jsx(Bct,{save:cN,onSaved:o=>n(o.hasToken),placeholder:bMe(),createHref:"https://www.overleaf.com/user/settings"}),s&&h.jsx("div",{className:"error",children:s})]})}function Xut({project:e,publicationError:n,onProjectUpdate:t}){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(null),[d,_]=M.useState(!1),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=M.useRef(0),b=!!(r!=null&&r.github.owner&&r.github.repo),v=(A=!0)=>{const E=++k.current;return A&&s(null),c(null),e?xXe(e.id).then(j=>{E===k.current&&s(j)}).catch(j=>{E===k.current&&c(j instanceof Error?j.message:String(j))}):Promise.resolve()};M.useEffect(()=>void v(),[e==null?void 0:e.id]);const x=A=>{const E=A instanceof Error?A.message:String(A);return E.toLowerCase().includes("archived")?JSe():E.includes("(fetch first)")||E.includes("non-fast-forward")?rke():E.includes("403")||E.toLowerCase().includes("permission denied")?oke():E},y=()=>{e&&(o(!0),c(null),wXe(e.id).then(A=>{s(A.git),t(A.project),jx().then(E=>{!E.githubForNewProjects&&!E.githubDefaultPromptSeen&&_(!0)}).catch(()=>{})}).catch(A=>c(x(A))).finally(()=>o(!1)))},C=A=>{m(!0),S(null),_N(A,!0).then(()=>_(!1)).catch(E=>S(E instanceof Error?E.message:String(E))).finally(()=>m(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:SRe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:LOe({project:(e==null?void 0:e.name)??NSe()})}),e?l&&!r?h.jsx("div",{className:"error",children:l}):r?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:w2,children:[h.jsx("h3",{children:RAe()}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:LMe()}),h.jsx("span",{className:"v",children:r.path}),h.jsx("span",{className:"k",children:"Git"}),h.jsx("span",{className:"v",children:r.gitVersion??pE()}),h.jsx("span",{className:"k",children:uDe()}),h.jsx("span",{className:"v",children:r.initialized?YSe({branch:Ae(r.currentBranch??wE()),state:r.clean?nSe():dke()}):RCe()}),h.jsx("span",{className:"k",children:z9e()}),h.jsx("span",{className:"v",children:r.baselineBranch}),h.jsx("span",{className:"k",children:bRe()}),h.jsx("span",{className:"v",children:r.remotes.length?r.remotes.map(A=>`${A.name}: ${A.url}`).join(" · "):fx()})]}),!r.initialized&&h.jsx("div",{className:O0,children:h.jsx(Qe,{variant:"primary",onClick:()=>void yXe(e.id).then(s).catch(A=>c(String(A))),children:gze()})})]}),h.jsxs("div",{className:w2,children:[h.jsx("h3",{children:"GitHub"}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:g9e()}),h.jsx("span",{className:"v",children:h.jsx(Dt,{variant:r.github.authenticated?"success":r.github.ghInstalled?"warning":"error",children:r.github.authenticated?xE():kE()})}),h.jsx("span",{className:"k",children:UMe()}),h.jsx("span",{className:"v",children:b?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[r.github.owner,"/",r.github.repo]}),!r.github.enabled&&h.jsx(Dt,{children:CDe()})]}):h.jsx(Dt,{children:AAe()})}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:yDe()}),h.jsx("span",{className:"v",children:r.github.syncStatus})]})]}),!r.github.authenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(qT,{ghInstalled:r.github.ghInstalled,onCheck:()=>v(!1)})}),r.github.authenticated&&!r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:b?eBe():SSe()}),h.jsxs("div",{className:O0,children:[b&&r.github.url&&h.jsxs(Lb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[B7()," ",h.jsx(gc,{size:12})]}),h.jsx(Qe,{variant:"primary",disabled:a,onClick:y,children:a?b6e():p6e()})]})]}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:wNe()}),h.jsxs("div",{className:O0,children:[r.github.url&&h.jsxs(Lb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[B7()," ",h.jsx(gc,{size:12})]}),h.jsx(Qe,{disabled:a,onClick:()=>{o(!0),SXe(e.id).then(A=>{s(A.git),t(A.project)}).catch(A=>c(A instanceof Error?A.message:String(A))).finally(()=>o(!1))},children:a?S6e():d6e()})]})]})]}),h.jsx(Yut,{}),n&&h.jsx("div",{className:"error",children:x(n)}),l&&h.jsx("div",{className:"error",children:x(l)})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]}):h.jsx("div",{className:Aa,children:h.jsx("p",{className:hs,children:Uje()})}),d&&h.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:()=>C(!1),children:h.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:A=>A.stopPropagation(),children:[h.jsx("h2",{id:"github-default-title",children:PAe()}),h.jsx("p",{children:GDe()}),g&&h.jsx("div",{className:"error",children:g}),h.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[h.jsx(Qe,{disabled:f,onClick:()=>C(!1),children:bje()}),h.jsx(Qe,{variant:"primary",disabled:f,onClick:()=>C(!0),children:f?ja():h8e()})]})]})})]})}const Zut={env:zPe,config:MPe,xdg:OPe,default:kPe},Pv={preparing:mPe,copying:VHe,verifying:HPe,finalizing:XHe},Qut=e=>{var n;return((n=Pv[e])==null?void 0:n.call(Pv))??e};function Jut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState({kind:"idle"}),[m,g]=M.useState(null),S=()=>JYe().then(C=>{n(C),a(A=>A||C.current)}).catch(C=>r(C instanceof Error?C.message:String(C)));M.useEffect(()=>{S()},[]),M.useEffect(()=>iZe(C=>{C.type==="progress"?f(A=>{const E=A.kind==="moving"?A.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),d(null),a(""),S()):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const k=(e==null?void 0:e.source)==="env",b=s.trim(),v=e!==null&&b===e.current;async function x(){if(!(o||!b)){l(!0),g(null),d(null);try{d(await eXe(b))}catch(C){g(C instanceof Error?C.message:String(C))}finally{l(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!b||v)&&(g(null),!!window.confirm(sPe({path:Ae(b)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await tXe(b)}catch(A){f({kind:"idle"}),g(A instanceof Error?A.message:String(A))}}}return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:gDe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:bIe()}),t?h.jsx("div",{className:Aa,children:h.jsx("div",{className:"error",children:t})}):e?h.jsxs("div",{className:Aa,children:[h.jsx("div",{className:"settings-card-head mb-3",children:h.jsx("h3",{children:JEe()})}),h.jsxs("div",{className:ed,children:[h.jsx("span",{className:"k",children:IEe()}),h.jsx("span",{className:"v",children:e.current}),h.jsx("span",{className:"k",children:bx()}),h.jsx("span",{className:"v",children:Zut[e.source]()})]}),!k&&h.jsxs("form",{className:jh,onSubmit:y,children:[h.jsxs("label",{children:[dTe(),h.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{a(C.target.value),d(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),c&&!c.error&&c.ok&&h.jsxs("p",{className:hs,children:[lRe()," ",Sa(c.treeBytes??0),c.freeBytes!=null&&` — ${ePe({size:Ae(Sa(c.freeBytes))})}`,c.sameFilesystem?xPe():"","."]}),c&&c.ok===!1&&c.error&&h.jsx("div",{className:"error",children:c.error}),m&&h.jsx("div",{className:"error",children:m}),_.kind==="moving"&&h.jsx(jT,{value:_.copied,max:_.total,label:Qut(_.phase),caption:_.total>0?h.jsxs("span",{className:"text-sm",children:[Sa(_.copied)," / ",Sa(_.total)]}):void 0}),_.kind==="done"&&h.jsxs("p",{className:hs,children:[rTe(),_.oldPathLeft&&h.jsxs(h.Fragment,{children:[" ",GCe({path:Ae(_.oldPathLeft)})]})]}),_.kind==="error"&&h.jsxs("div",{className:"error",children:[JAe()," ",_.message]}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{type:"button",onClick:x,disabled:o||!b||v||_.kind==="moving",children:o?jp():k7e()}),h.jsx(Qe,{variant:"primary",type:"submit",disabled:!b||v||_.kind==="moving",children:_.kind==="moving"?fPe():lPe()})]})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}const k2=e=>e==="running"||e==="starting";function edt(e){return k2(e.status)?tp(Date.now()-e.createdAt):e.endedAt?tp(e.endedAt-e.createdAt):"—"}function GT({instances:e,emptyLabel:n}){return e.length===0?h.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}):h.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:h.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:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:k9e()}),h.jsx("th",{children:Dp()}),h.jsx("th",{children:aDe()}),h.jsx("th",{children:$Re()})]})}),h.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 h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[h.jsx(e4,{backend:t.backend}),r&&h.jsx(Fp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:I7(),"aria-label":I7(),onClick:a=>a.stopPropagation(),children:h.jsx(gc,{size:12})})]})}),h.jsx("td",{children:h.jsx(xo,{status:Di(t)})}),h.jsx("td",{children:Na(t.createdAt)}),h.jsx("td",{children:edt(t)})]},t.id)})})]})})}function tdt({projectId:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const g=setInterval(()=>c(S=>S+1),3e4);return()=>clearInterval(g)},[]);const d=()=>{if(!e){r([]);return}l(!0),Tx(e).then(g=>{r(g),a(null)}).catch(g=>{a(g instanceof Error?g.message:String(g)),r(S=>S??[])}).finally(()=>l(!1))};M.useEffect(()=>d(),[e]);const _=(g,S)=>S.createdAt-g.createdAt,f=t==null?void 0:t.filter(g=>k2(g.status)).sort(_),m=t==null?void 0:t.filter(g=>!k2(g.status)).sort(_);return h.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:[h.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:[h.jsx("div",{children:h.jsxs("h2",{children:[LRe(),f&&f.length>0&&h.jsx("span",{className:"count-badge",children:f.length})]})}),h.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(ld,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]}),h.jsx(Qe,{size:"small",onClick:n,children:m!=null&&m.length?p0e({count:Vt(m.length)}):d0e()})]})]}),s&&h.jsx("div",{className:"error",children:s}),!f||!m?h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]}):h.jsx(GT,{instances:f,emptyLabel:e?J_e():o0e()})]})}function ndt({projectId:e,onBack:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const _=setInterval(()=>c(f=>f+1),3e4);return()=>clearInterval(_)},[]);const d=()=>{if(!e){r([]);return}l(!0),Tx(e).then(_=>{r(_.sort((f,m)=>m.createdAt-f.createdAt)),a(null)}).catch(_=>{a(_ instanceof Error?_.message:String(_)),r(f=>f??[])}).finally(()=>l(!1))};return M.useEffect(d,[e]),h.jsxs(h.Fragment,{children:[h.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:[h.jsx(Bf,{size:14})," ",CE()]}),h.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[h.jsx("h1",{children:Oze()}),h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(ld,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]})]}),s&&h.jsx("div",{className:"error",children:s}),t?h.jsx(GT,{instances:t,emptyLabel:e?Y_e():r0e()}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Nl()]})]})}const VT=["projects","harnesses","storage"],rdt=[{id:"compute",label:EE,icon:h.jsx($We,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:mx,icon:h.jsx(zx,{size:15}),activeTabs:["environment"]},{id:"settings",label:AE,icon:h.jsx(GKe,{size:15}),activeTabs:["settings",...VT]}];function sdt(e){return VT.includes(e)}function idt({tab:e,project:n,githubPublicationError:t,onProjectUpdate:r,onSelectTab:s}){const a=e==="settings"||sdt(e);return h.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:[a&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:AE()}),h.jsxs("div",{className:"settings-stack mt-4.5",children:[h.jsx("section",{className:vu,children:h.jsx(Uut,{})}),h.jsx("section",{className:vu,children:h.jsx(Kut,{})}),h.jsx("section",{className:vu,children:h.jsx(fut,{})}),h.jsx("section",{className:vu,children:h.jsx(Jut,{})}),h.jsx("section",{className:vu,children:h.jsx(Vut,{})}),h.jsx("section",{className:vu,children:h.jsx(Gut,{})})]})]}),e==="compute"&&h.jsx(Dut,{project:n,onViewHistory:()=>s("instances")}),e==="instances"&&h.jsx(ndt,{projectId:n==null?void 0:n.id,onBack:()=>s("compute")}),e==="environment"&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:mx()}),h.jsx(Put,{})]}),e==="git"&&h.jsx(Xut,{project:n,publicationError:t,onProjectUpdate:r})]})}function adt({skills:e,activeIndex:n,onPick:t,onHover:r}){return h.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,a)=>h.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(s)},onMouseEnter:()=>r(a),children:[h.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&h.jsx(Dt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:IE()})]}),h.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const x8={name:"plan",get description(){return vwe()},source:"command"};function Fv(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(;r1&&/[ \t]$/.test(a)&&(a=a.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let o=e.slice(n.end);if(!o)o=s;else if(!o.startsWith(` -`)){const _=(c=/^[ \t]+/.exec(o))==null?void 0:c[0];o=_?`${_.length>=r?_:s}${o.slice(_.length)}`:s+o}const l=((d=/^[ \t]+/.exec(o))==null?void 0:d[0].length)??0;return{text:`${a}/${t}${o}`,cursor:a.length+t.length+1+l}}function w8(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 ldt(e,n){const t=e.filter(r=>r.name.toLowerCase()!==x8.name);return n?[x8,...t]:t}function cdt(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function udt(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const ddt=["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"],Uv=new Map;function fdt(e,n){const t=`${n}\0${e}`,r=Uv.get(t);if(r)return r;const s=NXe(e,n).catch(a=>{throw Uv.delete(t),a});return Uv.set(t,s),s}function WT(e,n,t,r,s,a=!1){let o=0;return odt(e,n).map((l,c)=>{const d=o+l.text.length;o=d;const _=l.text.slice(1).toLowerCase();return l.command&&s?s(l.text,_,d,c):l.command?h.jsxs("span",{className:t,onMouseDown:void 0,children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),l.text.slice(1)]},c):a?h.jsx("span",{"aria-hidden":"true",children:l.text},c):h.jsx(M.Fragment,{children:l.text},c)})}function hdt({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:a}){const o=M.useRef(null),l=M.useRef(null),c=M.useRef(null),d=M.useId(),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState({}),x=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const E=o.current;if(!E)return;const j=E.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),D=Math.max(16,Math.min(j.left-4,window.innerWidth-T-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:D,width:T}:{left:D,top:j.bottom+12,width:T})},C=()=>{x(),y(),f(!0),!(m!==null||S)&&(k(!0),fdt(n,s).then(g).catch(()=>g(null)).finally(()=>k(!1)))},A=()=>{x(),c.current=window.setTimeout(()=>f(!1),120)};return M.useEffect(()=>()=>x(),[]),M.useEffect(()=>{if(!_)return;const E=()=>y();return window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[_]),h.jsxs(M.Fragment,{children:[h.jsxs("span",{ref:o,role:"button",tabIndex:0,"aria-controls":d,"aria-expanded":_,"aria-label":$I({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:C,onMouseLeave:A,onFocus:C,onBlur:A,onKeyDown:E=>{var j,T;if(E.key==="Escape"){f(!1);return}if(E.key==="Enter"||E.key===" "){E.preventDefault(),C();return}_&&(E.key==="ArrowDown"||E.key==="PageDown")&&(E.preventDefault(),(j=l.current)==null||j.scrollBy({top:E.key==="PageDown"?240:48,behavior:"smooth"})),_&&(E.key==="ArrowUp"||E.key==="PageUp")&&(E.preventDefault(),(T=l.current)==null||T.scrollBy({top:E.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:E=>{var j,T;E.preventDefault(),(j=a.current)==null||j.focus(),(T=a.current)==null||T.setSelectionRange(t,t),x()},children:[h.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),h.jsxs("span",{className:"relative z-1",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Up.createPortal(h.jsxs("div",{id:d,ref:l,role:"dialog","aria-label":gB({name:n}),style:{...b,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:x,onMouseLeave:A,onFocus:x,onBlur:A,onMouseDown:E=>E.stopPropagation(),children:[h.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:[h.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),h.jsx(Dt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:IE()})]}),h.jsx("div",{className:"p-4 text-sm text-text",children:S&&m===null?h.jsx("span",{className:"text-muted",children:pBe()}):h.jsx(za,{text:m??r.description})})]}),document.body)]})}function _dt({text:e,isCommand:n}){return h.jsx(h.Fragment,{children:WT(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function pdt({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const a=M.useRef(null);return M.useLayoutEffect(()=>{const o=s.current,l=a.current;if(!o||!l)return;const c=()=>{const _=getComputedStyle(o);for(const f of ddt)l.style.setProperty(f,_.getPropertyValue(f));l.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};c();const d=new ResizeObserver(c);return d.observe(o),()=>d.disconnect()},[e,s]),M.useLayoutEffect(()=>{const o=s.current;if(!o)return;const l=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return l(),o.addEventListener("scroll",l),()=>o.removeEventListener("scroll",l)},[s,e]),h.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:[WT(e,n,"",void 0,(o,l,c,d)=>{const _=t.find(f=>f.name===l);return _&&_.source!=="command"?h.jsx(hdt,{label:o,name:l,end:c,skill:_,projectId:r,textareaRef:s},`${d}:${c}`):h.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${d}:${c}`)},!0),"​"]})}function mdt(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const C2=6.5,S8=2*Math.PI*C2;function gdt({usage:e}){return!e||e.usedTokens<=0?null:h.jsx(vdt,{usage:e})}function vdt({usage:e}){const{open:n,setOpen:t,ref:r}=Ao(),{usedTokens:s,contextWindow:a}=e,o=a&&a>0?Math.min(100,Math.round(s/a*100)):null,l=o===null?"var(--accent)":mdt(o),c=o===null?"":new Intl.NumberFormat(N(),{style:"percent"}).format(o/100);return h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[h.jsx("button",{type:"button",className:`${o===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:foe(),onClick:()=>t(d=>!d),children:o===null?K_(s):h.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:C2,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),h.jsx("circle",{cx:"8",cy:"8",r:C2,fill:"none",stroke:l,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${S8*Math.max(o,2)/100} ${S8}`,transform:"rotate(-90 8 8)"})]})}),n&&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 [&.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:[h.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[h.jsx("span",{children:loe()}),h.jsx("span",{className:"context-meter-value text-text tabular-nums",children:o===null?moe({value:Ae(K_(s))}):xoe({used:Ae(K_(s)),total:Ae(K_(a)),percent:Ae(c)})})]}),o!==null&&h.jsx(jT,{value:s,max:a,fillColor:l})]})]})}const s4="orx:demo-read-sessions";function KT(){try{const e=JSON.parse(sessionStorage.getItem(s4)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function bdt(e){try{const n=KT();n.add(e),sessionStorage.setItem(s4,JSON.stringify([...n]))}catch{}}function xdt(){try{sessionStorage.removeItem(s4)}catch{}}function ydt(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 wdt(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 Sdt(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(T){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&T&&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(T){const D=this._getMouseBufferCoords(T),I=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!!(I&&P&&D)&&this._areCoordsInSelection(D,I,P)}isCellInSelection(T,D){const I=this._model.finalSelectionStart,P=this._model.finalSelectionEnd;return!(!I||!P)&&this._areCoordsInSelection([T,D],I,P)}_areCoordsInSelection(T,D,I){return T[1]>D[1]&&T[1]=D[0]&&T[0]=D[0]}_selectWordAtCursor(T,D){var B,F;const I=(F=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:F.range;if(I)return this._model.selectionStart=[I.start.x-1,I.start.y-1],this._model.selectionStartLength=(0,x.getRangeLength)(I,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const P=this._getMouseBufferCoords(T);return!!P&&(this._selectWordAt(P,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(T,D){this._model.clearSelection(),T=Math.max(T,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,T],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(T){this._model.handleTrim(T)&&this.refresh()}_getMouseBufferCoords(T){const D=this._mouseService.getCoords(T,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(T){let D=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,T,this._screenElement)[1];const I=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=I?0:(D>I&&(D-=I),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(T){return v.isMac?T.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:T.shiftKey}handleMouseDown(T){if(this._mouseDownTimeStamp=T.timeStamp,(T.button!==2||!this.hasSelection)&&T.button===0){if(!this._enabled){if(!this.shouldForceSelection(T))return;T.stopPropagation()}T.preventDefault(),this._dragScrollAmount=0,this._enabled&&T.shiftKey?this._handleIncrementalClick(T):T.detail===1?this._handleSingleClick(T):T.detail===2?this._handleDoubleClick(T):T.detail===3&&this._handleTripleClick(T),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(T){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(T))}_handleSingleClick(T){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(T)?3:0,this._model.selectionStart=this._getMouseBufferCoords(T),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(T){this._selectWordAtCursor(T,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(T){const D=this._getMouseBufferCoords(T);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(T){return T.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(T){if(T.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(T),!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 I=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(T.ydisp+this._bufferService.rows,T.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=T.ydisp),this.refresh()}}_handleMouseUp(T){const D=T.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&T.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const I=this._mouseService.getCoords(T,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(I&&I[0]!==void 0&&I[1]!==void 0){const P=(0,m.moveToCellSequence)(I[0]-1,I[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(P,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const T=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,I=!(!T||!D||T[0]===D[0]&&T[1]===D[1]);I?T&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&T[0]===this._oldSelectionStart[0]&&T[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(T,D,I)):this._oldHasSelection&&this._fireOnSelectionChange(T,D,I)}_fireOnSelectionChange(T,D,I){this._oldSelectionStart=T,this._oldSelectionEnd=D,this._oldHasSelection=I,this._onSelectionChange.fire()}_handleBufferActivate(T){this.clearSelection(),this._trimListener.dispose(),this._trimListener=T.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(T,D){let I=D;for(let P=0;D>=P;P++){const B=T.loadCell(P,this._workCell).getChars().length;this._workCell.getWidth()===0?I--:B>1&&D!==P&&(I+=B-1)}return I}setSelection(T,D,I){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[T,D],this._model.selectionStartLength=I,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(T){this._isClickInSelection(T)||(this._selectWordAtCursor(T,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(T,D,I=!0,P=!0){if(T[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,F=B.lines.get(T[1]);if(!F)return;const V=B.translateBufferLineToString(T[1],!1);let X=this._convertViewportColToCharacterIndex(F,T[0]),W=X;const Z=T[0]-X;let J=0,$=0,L=0,H=0;if(V.charAt(X)===" "){for(;X>0&&V.charAt(X-1)===" ";)X--;for(;W1&&(H+=he-1,W+=he-1);ee>0&&X>0&&!this._isCharWordSeparator(F.loadCell(ee-1,this._workCell));){F.loadCell(ee-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,ee--):ie>1&&(L+=ie-1,X-=ie-1),X--,ee--}for(;oe1&&(H+=ie-1,W+=ie-1),W++,oe++}}W++;let Y=X+Z-J+L,G=Math.min(this._bufferService.cols,W-X+J+$-L-H);if(D||V.slice(X,W).trim()!==""){if(I&&Y===0&&F.getCodePoint(0)!==32){const ee=B.lines.get(T[1]-1);if(ee&&F.isWrapped&&ee.getCodePoint(this._bufferService.cols-1)!==32){const oe=this._getWordAt([this._bufferService.cols-1,T[1]-1],!1,!0,!1);if(oe){const he=this._bufferService.cols-oe.start;Y-=he,G+=he}}}if(P&&Y+G===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const ee=B.lines.get(T[1]+1);if(ee!=null&&ee.isWrapped&&ee.getCodePoint(0)!==32){const oe=this._getWordAt([0,T[1]+1],!1,!1,!0);oe&&(G+=oe.length)}}return{start:Y,length:G}}}_selectWordAt(T,D){const I=this._getWordAt(T,D);if(I){for(;I.start<0;)I.start+=this._bufferService.cols,T[1]--;this._model.selectionStart=[I.start,T[1]],this._model.selectionStartLength=I.length}}_selectToWordAt(T){const D=this._getWordAt(T,!0);if(D){let I=T[1];for(;D.start<0;)D.start+=this._bufferService.cols,I--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,I++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,I]}}_isCharWordSeparator(T){return T.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(T.getChars())>=0}_selectLineAt(T){const D=this._bufferService.buffer.getWrappedRangeForLine(T),I={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,x.getRangeLength)(I,this._bufferService.cols)}};l.SelectionService=j=d([_(3,C.IBufferService),_(4,C.ICoreService),_(5,S.IMouseService),_(6,C.IOptionsService),_(7,S.IRenderService),_(8,S.ICoreBrowserService)],j)},4725:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ILinkProviderService=l.IThemeService=l.ICharacterJoinerService=l.ISelectionService=l.IRenderService=l.IMouseService=l.ICoreBrowserService=l.ICharSizeService=void 0;const d=c(8343);l.ICharSizeService=(0,d.createDecorator)("CharSizeService"),l.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),l.IMouseService=(0,d.createDecorator)("MouseService"),l.IRenderService=(0,d.createDecorator)("RenderService"),l.ISelectionService=(0,d.createDecorator)("SelectionService"),l.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),l.IThemeService=(0,d.createDecorator)("ThemeService"),l.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(o,l,c){var d=this&&this.__decorate||function(j,T,D,I){var P,B=arguments.length,F=B<3?T:I===null?I=Object.getOwnPropertyDescriptor(T,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(j,T,D,I);else for(var V=j.length-1;V>=0;V--)(P=j[V])&&(F=(B<3?P(F):B>3?P(T,D,F):P(T,D))||F);return B>3&&F&&Object.defineProperty(T,D,F),F},_=this&&this.__param||function(j,T){return function(D,I){T(D,I,j)}};Object.defineProperty(l,"__esModule",{value:!0}),l.ThemeService=l.DEFAULT_ANSI_COLORS=void 0;const f=c(7239),m=c(8055),g=c(8460),S=c(844),k=c(2585),b=m.css.toColor("#ffffff"),v=m.css.toColor("#000000"),x=m.css.toColor("#ffffff"),y=m.css.toColor("#000000"),C={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};l.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const j=[m.css.toColor("#2e3436"),m.css.toColor("#cc0000"),m.css.toColor("#4e9a06"),m.css.toColor("#c4a000"),m.css.toColor("#3465a4"),m.css.toColor("#75507b"),m.css.toColor("#06989a"),m.css.toColor("#d3d7cf"),m.css.toColor("#555753"),m.css.toColor("#ef2929"),m.css.toColor("#8ae234"),m.css.toColor("#fce94f"),m.css.toColor("#729fcf"),m.css.toColor("#ad7fa8"),m.css.toColor("#34e2e2"),m.css.toColor("#eeeeec")],T=[0,95,135,175,215,255];for(let D=0;D<216;D++){const I=T[D/36%6|0],P=T[D/6%6|0],B=T[D%6];j.push({css:m.channels.toCss(I,P,B),rgba:m.channels.toRgba(I,P,B)})}for(let D=0;D<24;D++){const I=8+10*D;j.push({css:m.channels.toCss(I,I,I),rgba:m.channels.toRgba(I,I,I)})}return j})());let A=l.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(j){super(),this._optionsService=j,this._contrastCache=new f.ColorContrastCache,this._halfContrastCache=new f.ColorContrastCache,this._onChangeColors=this.register(new g.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:b,background:v,cursor:x,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:m.color.blend(v,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:m.color.blend(v,C),ansi:l.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(j={}){const T=this._colors;if(T.foreground=E(j.foreground,b),T.background=E(j.background,v),T.cursor=E(j.cursor,x),T.cursorAccent=E(j.cursorAccent,y),T.selectionBackgroundTransparent=E(j.selectionBackground,C),T.selectionBackgroundOpaque=m.color.blend(T.background,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundTransparent=E(j.selectionInactiveBackground,T.selectionBackgroundTransparent),T.selectionInactiveBackgroundOpaque=m.color.blend(T.background,T.selectionInactiveBackgroundTransparent),T.selectionForeground=j.selectionForeground?E(j.selectionForeground,m.NULL_COLOR):void 0,T.selectionForeground===m.NULL_COLOR&&(T.selectionForeground=void 0),m.color.isOpaque(T.selectionBackgroundTransparent)&&(T.selectionBackgroundTransparent=m.color.opacity(T.selectionBackgroundTransparent,.3)),m.color.isOpaque(T.selectionInactiveBackgroundTransparent)&&(T.selectionInactiveBackgroundTransparent=m.color.opacity(T.selectionInactiveBackgroundTransparent,.3)),T.ansi=l.DEFAULT_ANSI_COLORS.slice(),T.ansi[0]=E(j.black,l.DEFAULT_ANSI_COLORS[0]),T.ansi[1]=E(j.red,l.DEFAULT_ANSI_COLORS[1]),T.ansi[2]=E(j.green,l.DEFAULT_ANSI_COLORS[2]),T.ansi[3]=E(j.yellow,l.DEFAULT_ANSI_COLORS[3]),T.ansi[4]=E(j.blue,l.DEFAULT_ANSI_COLORS[4]),T.ansi[5]=E(j.magenta,l.DEFAULT_ANSI_COLORS[5]),T.ansi[6]=E(j.cyan,l.DEFAULT_ANSI_COLORS[6]),T.ansi[7]=E(j.white,l.DEFAULT_ANSI_COLORS[7]),T.ansi[8]=E(j.brightBlack,l.DEFAULT_ANSI_COLORS[8]),T.ansi[9]=E(j.brightRed,l.DEFAULT_ANSI_COLORS[9]),T.ansi[10]=E(j.brightGreen,l.DEFAULT_ANSI_COLORS[10]),T.ansi[11]=E(j.brightYellow,l.DEFAULT_ANSI_COLORS[11]),T.ansi[12]=E(j.brightBlue,l.DEFAULT_ANSI_COLORS[12]),T.ansi[13]=E(j.brightMagenta,l.DEFAULT_ANSI_COLORS[13]),T.ansi[14]=E(j.brightCyan,l.DEFAULT_ANSI_COLORS[14]),T.ansi[15]=E(j.brightWhite,l.DEFAULT_ANSI_COLORS[15]),j.extendedAnsi){const D=Math.min(T.ansi.length-16,j.extendedAnsi.length);for(let I=0;I{Object.defineProperty(l,"__esModule",{value:!0}),l.CircularList=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._maxLength=g,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.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(g){if(this._maxLength===g)return;const S=new Array(g);for(let k=0;kthis._length)for(let S=this._length;S=g;b--)this._array[this._getCyclicIndex(b+k.length)]=this._array[this._getCyclicIndex(b)];for(let b=0;bthis._maxLength){const b=this._length+k.length-this._maxLength;this._startIndex+=b,this._length=this._maxLength,this.onTrimEmitter.fire(b)}else this._length+=k.length}trimStart(g){g>this._length&&(g=this._length),this._startIndex+=g,this._length-=g,this.onTrimEmitter.fire(g)}shiftElements(g,S,k){if(!(S<=0)){if(g<0||g>=this._length)throw new Error("start argument out of range");if(g+k<0)throw new Error("Cannot shift elements in list beyond index 0");if(k>0){for(let v=S-1;v>=0;v--)this.set(g+v+k,this.get(g+v));const b=g+S+k-this._length;if(b>0)for(this._length+=b;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let b=0;b{Object.defineProperty(l,"__esModule",{value:!0}),l.clone=void 0,l.clone=function c(d,_=5){if(typeof d!="object")return d;const f=Array.isArray(d)?[]:{};for(const m in d)f[m]=_<=1?d[m]:d[m]&&c(d[m],_-1);return f}},8055:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.contrastRatio=l.toPaddedHex=l.rgba=l.rgb=l.css=l.color=l.channels=l.NULL_COLOR=void 0;let c=0,d=0,_=0,f=0;var m,g,S,k,b;function v(y){const C=y.toString(16);return C.length<2?"0"+C:C}function x(y,C){return y>>0},y.toColor=function(C,A,E,j){return{css:y.toCss(C,A,E,j),rgba:y.toRgba(C,A,E,j)}}})(m||(l.channels=m={})),(function(y){function C(A,E){return f=Math.round(255*E),[c,d,_]=b.toChannels(A.rgba),{css:m.toCss(c,d,_,f),rgba:m.toRgba(c,d,_,f)}}y.blend=function(A,E){if(f=(255&E.rgba)/255,f===1)return{css:E.css,rgba:E.rgba};const j=E.rgba>>24&255,T=E.rgba>>16&255,D=E.rgba>>8&255,I=A.rgba>>24&255,P=A.rgba>>16&255,B=A.rgba>>8&255;return c=I+Math.round((j-I)*f),d=P+Math.round((T-P)*f),_=B+Math.round((D-B)*f),{css:m.toCss(c,d,_),rgba:m.toRgba(c,d,_)}},y.isOpaque=function(A){return(255&A.rgba)==255},y.ensureContrastRatio=function(A,E,j){const T=b.ensureContrastRatio(A.rgba,E.rgba,j);if(T)return m.toColor(T>>24&255,T>>16&255,T>>8&255)},y.opaque=function(A){const E=(255|A.rgba)>>>0;return[c,d,_]=b.toChannels(E),{css:m.toCss(c,d,_),rgba:E}},y.opacity=C,y.multiplyOpacity=function(A,E){return f=255&A.rgba,C(A,f*E/255)},y.toColorRGB=function(A){return[A.rgba>>24&255,A.rgba>>16&255,A.rgba>>8&255]}})(g||(l.color=g={})),(function(y){let C,A;try{const E=document.createElement("canvas");E.width=1,E.height=1;const j=E.getContext("2d",{willReadFrequently:!0});j&&(C=j,C.globalCompositeOperation="copy",A=C.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(E){if(E.match(/#[\da-f]{3,8}/i))switch(E.length){case 4:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),m.toColor(c,d,_);case 5:return c=parseInt(E.slice(1,2).repeat(2),16),d=parseInt(E.slice(2,3).repeat(2),16),_=parseInt(E.slice(3,4).repeat(2),16),f=parseInt(E.slice(4,5).repeat(2),16),m.toColor(c,d,_,f);case 7:return{css:E,rgba:(parseInt(E.slice(1),16)<<8|255)>>>0};case 9:return{css:E,rgba:parseInt(E.slice(1),16)>>>0}}const j=E.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(j)return c=parseInt(j[1]),d=parseInt(j[2]),_=parseInt(j[3]),f=Math.round(255*(j[5]===void 0?1:parseFloat(j[5]))),m.toColor(c,d,_,f);if(!C||!A)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=A,C.fillStyle=E,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,d,_,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:m.toRgba(c,d,_,f),css:E}}})(S||(l.css=S={})),(function(y){function C(A,E,j){const T=A/255,D=E/255,I=j/255;return .2126*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))}y.relativeLuminance=function(A){return C(A>>16&255,A>>8&255,255&A)},y.relativeLuminance2=C})(k||(l.rgb=k={})),(function(y){function C(E,j,T){const D=E>>24&255,I=E>>16&255,P=E>>8&255;let B=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2(B,F,V),k.relativeLuminance2(D,I,P));for(;X0||F>0||V>0);)B-=Math.max(0,Math.ceil(.1*B)),F-=Math.max(0,Math.ceil(.1*F)),V-=Math.max(0,Math.ceil(.1*V)),X=x(k.relativeLuminance2(B,F,V),k.relativeLuminance2(D,I,P));return(B<<24|F<<16|V<<8|255)>>>0}function A(E,j,T){const D=E>>24&255,I=E>>16&255,P=E>>8&255;let B=j>>24&255,F=j>>16&255,V=j>>8&255,X=x(k.relativeLuminance2(B,F,V),k.relativeLuminance2(D,I,P));for(;X>>0}y.blend=function(E,j){if(f=(255&j)/255,f===1)return j;const T=j>>24&255,D=j>>16&255,I=j>>8&255,P=E>>24&255,B=E>>16&255,F=E>>8&255;return c=P+Math.round((T-P)*f),d=B+Math.round((D-B)*f),_=F+Math.round((I-F)*f),m.toRgba(c,d,_)},y.ensureContrastRatio=function(E,j,T){const D=k.relativeLuminance(E>>8),I=k.relativeLuminance(j>>8);if(x(D,I)>8));if(Vx(D,k.relativeLuminance(X>>8))?F:X}return F}const P=A(E,j,T),B=x(D,k.relativeLuminance(P>>8));if(Bx(D,k.relativeLuminance(F>>8))?P:F}return P}},y.reduceLuminance=C,y.increaseLuminance=A,y.toChannels=function(E){return[E>>24&255,E>>16&255,E>>8&255,255&E]}})(b||(l.rgba=b={})),l.toPaddedHex=v,l.contrastRatio=x},8969:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CoreTerminal=void 0;const d=c(844),_=c(2585),f=c(4348),m=c(7866),g=c(744),S=c(7302),k=c(6975),b=c(8460),v=c(1753),x=c(1480),y=c(7994),C=c(9282),A=c(5435),E=c(5981),j=c(2660);let T=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new b.EventEmitter),this._onScroll.event((P=>{var B;(B=this._onScrollApi)==null||B.fire(P.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(P){for(const B in P)this.optionsService.options[B]=P[B]}constructor(P){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new b.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new b.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new b.EventEmitter),this._instantiationService=new f.InstantiationService,this.optionsService=this.register(new S.OptionsService(P)),this._instantiationService.setService(_.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(g.BufferService)),this._instantiationService.setService(_.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(m.LogService)),this._instantiationService.setService(_.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(_.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(_.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(x.UnicodeService)),this._instantiationService.setService(_.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(_.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(j.OscLinkService),this._instantiationService.setService(_.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new A.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,b.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,b.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,b.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,b.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 E.WriteBuffer(((B,F)=>this._inputHandler.parse(B,F)))),this.register((0,b.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(P,B){this._writeBuffer.write(P,B)}writeSync(P,B){this._logService.logLevel<=_.LogLevelEnum.WARN&&!T&&(this._logService.warn("writeSync is unreliable and will be removed soon."),T=!0),this._writeBuffer.writeSync(P,B)}input(P,B=!0){this.coreService.triggerDataEvent(P,B)}resize(P,B){isNaN(P)||isNaN(B)||(P=Math.max(P,g.MINIMUM_COLS),B=Math.max(B,g.MINIMUM_ROWS),this._bufferService.resize(P,B))}scroll(P,B=!1){this._bufferService.scroll(P,B)}scrollLines(P,B,F){this._bufferService.scrollLines(P,B,F)}scrollPages(P){this.scrollLines(P*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(P){const B=P-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(P,B){return this._inputHandler.registerEscHandler(P,B)}registerDcsHandler(P,B){return this._inputHandler.registerDcsHandler(P,B)}registerCsiHandler(P,B){return this._inputHandler.registerCsiHandler(P,B)}registerOscHandler(P,B){return this._inputHandler.registerOscHandler(P,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let P=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?P=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(P=!0),P?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const P=[];P.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),P.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const B of P)B.dispose()}))}}}l.CoreTerminal=D},8460:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.runAndSubscribe=l.forwardEvent=l.EventEmitter=void 0,l.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 d=0;dd.fire(_)))},l.runAndSubscribe=function(c,d){return d(void 0),c((_=>d(_)))}},5435:function(o,l,c){var d=this&&this.__decorate||function(J,$,L,H){var Y,G=arguments.length,ee=G<3?$:H===null?H=Object.getOwnPropertyDescriptor($,L):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(J,$,L,H);else for(var oe=J.length-1;oe>=0;oe--)(Y=J[oe])&&(ee=(G<3?Y(ee):G>3?Y($,L,ee):Y($,L))||ee);return G>3&&ee&&Object.defineProperty($,L,ee),ee},_=this&&this.__param||function(J,$){return function(L,H){$(L,H,J)}};Object.defineProperty(l,"__esModule",{value:!0}),l.InputHandler=l.WindowsOptionsReportType=void 0;const f=c(2584),m=c(7116),g=c(2015),S=c(844),k=c(482),b=c(8437),v=c(8460),x=c(643),y=c(511),C=c(3734),A=c(2585),E=c(1480),j=c(6242),T=c(6351),D=c(5941),I={"(":0,")":1,"*":2,"+":3,"-":1,".":2},P=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 F;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(l.WindowsOptionsReportType=F={}));let V=0;class X extends S.Disposable{getAttrData(){return this._curAttrData}constructor($,L,H,Y,G,ee,oe,he,ie=new g.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=H,this._logService=Y,this._optionsService=G,this._oscLinkService=ee,this._coreMouseService=oe,this._unicodeService=he,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.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 W(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:ne.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,ne,le)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:ne,data:le})})),this._parser.setDcsHandlerFallback(((q,ne,le)=>{ne==="HOOK"&&(le=le.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:ne,payload:le})})),this._parser.setPrintHandler(((q,ne,le)=>this.print(q,ne,le))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!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 j.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new j.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new j.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new j.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new j.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new j.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new j.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new j.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new j.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new j.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new j.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new j.OscHandler((q=>this.restoreCursorColor(q)))),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 q in m.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new T.DcsHandler(((q,ne)=>this.requestStatusString(q,ne))))}_preserveStack($,L,H,Y){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=H,this._parseStack.position=Y}_logSlowResolvingAsync($){this._logService.logLevel<=A.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,H)=>setTimeout((()=>H("#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 H,Y=this._activeBuffer.x,G=this._activeBuffer.y,ee=0;const oe=this._parseStack.paused;if(oe){if(H=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(H),H;Y=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>P&&(ee=this._parseStack.position+P)}if(this._logService.logLevel<=A.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(q=>String.fromCharCode(q))).join("")}"`),typeof $=="string"?$.split("").map((q=>q.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthP)for(let q=ee;q<$.length;q+=P){const ne=q+P<$.length?q+P:$.length,le=typeof $=="string"?this._stringDecoder.decode($.substring(q,ne),this._parseBuffer):this._utf8Decoder.decode($.subarray(q,ne),this._parseBuffer);if(H=this._parser.parse(this._parseBuffer,le))return this._preserveStack(Y,G,le,q),this._logSlowResolvingAsync(H),H}else if(!oe){const q=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(H=this._parser.parse(this._parseBuffer,q))return this._preserveStack(Y,G,q,0),this._logSlowResolvingAsync(H),H}this._activeBuffer.x===Y&&this._activeBuffer.y===G||this._onCursorMove.fire();const he=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ie=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ie0&&le.getWidth(this._activeBuffer.x-1)===2&&le.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let ge=this._parser.precedingJoinState;for(let ue=L;uehe){if(ie){const Pe=le;let Ve=this._activeBuffer.x-Le;for(this._activeBuffer.x=Le,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),le=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Le>0&&le instanceof b.BufferLine&&le.copyCellsFrom(Pe,Ve,0,Le,!1);Ve=0;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if(q&&(le.insertCells(this._activeBuffer.x,G-Le,this._activeBuffer.getNullCell(ne)),le.getWidth(he-1)===2&&le.setCellFromCodepoint(he-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,ne)),le.setCellFromCodepoint(this._activeBuffer.x++,Y,G,ne),G>0)for(;--G;)le.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=ge,this._activeBuffer.x0&&le.getWidth(this._activeBuffer.x)===0&&!le.hasContent(this._activeBuffer.x)&&le.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(H=>!B(H.params[0],this._optionsService.rawOptions.windowOptions)||L(H)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new T.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,new j.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,H,Y=!1,G=!1){const ee=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ee.replaceCells(L,H,this._activeBuffer.getNullCell(this._eraseAttrData()),G),Y&&(ee.isWrapped=!1)}_resetBufferLine($,L=!1){const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);H&&(H.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),H.isWrapped=!1)}eraseInDisplay($,L=!1){let H;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(H=this._activeBuffer.y,this._dirtyRowTracker.markDirty(H),this._eraseInBufferLine(H++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);H=this._bufferService.cols&&(this._activeBuffer.lines.get(H+1).isWrapped=!1);H--;)this._resetBufferLine(H,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(H=this._bufferService.rows,this._dirtyRowTracker.markDirty(H-1);H--;)this._resetBufferLine(H,L);this._dirtyRowTracker.markDirty(0);break;case 3:const Y=this._activeBuffer.lines.length-this._bufferService.rows;Y>0&&(this._activeBuffer.lines.trimStart(Y),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-Y,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-Y,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 ie=he;for(let q=1;q0||(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,m.DEFAULT_CHARSET),this._charsetService.setgCharset(1,m.DEFAULT_CHARSET),this._charsetService.setgCharset(2,m.DEFAULT_CHARSET),this._charsetService.setgCharset(3,m.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 H=this._coreService.decPrivateModes,{activeProtocol:Y,activeEncoding:G}=this._coreMouseService,ee=this._coreService,{buffers:oe,cols:he}=this._bufferService,{active:ie,alt:q}=oe,ne=this._optionsService.rawOptions,le=Ee=>Ee?1:2,ge=$.params[0];return ue=ge,Ce=L?ge===2?4:ge===4?le(ee.modes.insertMode):ge===12?3:ge===20?le(ne.convertEol):0:ge===1?le(H.applicationCursorKeys):ge===3?ne.windowOptions.setWinLines?he===80?2:he===132?1:0:0:ge===6?le(H.origin):ge===7?le(H.wraparound):ge===8?3:ge===9?le(Y==="X10"):ge===12?le(ne.cursorBlink):ge===25?le(!ee.isCursorHidden):ge===45?le(H.reverseWraparound):ge===66?le(H.applicationKeypad):ge===67?4:ge===1e3?le(Y==="VT200"):ge===1002?le(Y==="DRAG"):ge===1003?le(Y==="ANY"):ge===1004?le(H.sendFocus):ge===1005?4:ge===1006?le(G==="SGR"):ge===1015?4:ge===1016?le(G==="SGR_PIXELS"):ge===1048?1:ge===47||ge===1047||ge===1049?le(ie===q):ge===2004?le(H.bracketedPasteMode):0,ee.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ue};${Ce}$y`),!0;var ue,Ce}_updateAttrColor($,L,H,Y,G){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([H,Y,G])):L===5&&($&=-50331904,$|=33554432|255&H),$}_extractColor($,L,H){const Y=[0,0,-1,0,0,0];let G=0,ee=0;do{if(Y[ee+G]=$.params[L+ee],$.hasSubParams(L+ee)){const oe=$.getSubParams(L+ee);let he=0;do Y[1]===5&&(G=1),Y[ee+he+1+G]=oe[he];while(++he=2||Y[1]===2&&ee+G>=5)break;Y[1]&&(G=1)}while(++ee+L<$.length&&ee+G5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0($){$.fg=b.DEFAULT_ATTR_DATA.fg,$.bg=b.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 H;const Y=this._curAttrData;for(let G=0;G=30&&H<=37?(Y.fg&=-50331904,Y.fg|=16777216|H-30):H>=40&&H<=47?(Y.bg&=-50331904,Y.bg|=16777216|H-40):H>=90&&H<=97?(Y.fg&=-50331904,Y.fg|=16777224|H-90):H>=100&&H<=107?(Y.bg&=-50331904,Y.bg|=16777224|H-100):H===0?this._processSGR0(Y):H===1?Y.fg|=134217728:H===3?Y.bg|=67108864:H===4?(Y.fg|=268435456,this._processUnderline($.hasSubParams(G)?$.getSubParams(G)[0]:1,Y)):H===5?Y.fg|=536870912:H===7?Y.fg|=67108864:H===8?Y.fg|=1073741824:H===9?Y.fg|=2147483648:H===2?Y.bg|=134217728:H===21?this._processUnderline(2,Y):H===22?(Y.fg&=-134217729,Y.bg&=-134217729):H===23?Y.bg&=-67108865:H===24?(Y.fg&=-268435457,this._processUnderline(0,Y)):H===25?Y.fg&=-536870913:H===27?Y.fg&=-67108865:H===28?Y.fg&=-1073741825:H===29?Y.fg&=2147483647:H===39?(Y.fg&=-67108864,Y.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):H===49?(Y.bg&=-67108864,Y.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):H===38||H===48||H===58?G+=this._extractColor($,G,Y):H===53?Y.bg|=1073741824:H===55?Y.bg&=-1073741825:H===59?(Y.extended=Y.extended.clone(),Y.extended.underlineColor=-1,Y.updateExtended()):H===100?(Y.fg&=-67108864,Y.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,Y.bg&=-67108864,Y.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",H);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${H}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,H=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${H}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=b.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 H=L%2==1;return this._optionsService.options.cursorBlink=H,!0}setScrollRegion($){const L=$.params[0]||1;let H;return($.length<2||(H=$.params[1])>this._bufferService.rows||H===0)&&(H=this._bufferService.rows),H>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=H-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(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.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=[],H=$.split(";");for(;H.length>1;){const Y=H.shift(),G=H.shift();if(/^\d+$/.exec(Y)){const ee=parseInt(Y);if(Z(ee))if(G==="?")L.push({type:0,index:ee});else{const oe=(0,D.parseColor)(G);oe&&L.push({type:1,index:ee,color:oe})}}}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 H=$.split(":");let Y;const G=H.findIndex((ee=>ee.startsWith("id=")));return G!==-1&&(Y=H[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:Y,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 H=$.split(";");for(let Y=0;Y=this._specialColors.length);++Y,++L)if(H[Y]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,D.parseColor)(H[Y]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}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=[],H=$.split(";");for(let Y=0;Y=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=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.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 y.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}${G}${f.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${H.scrollTop+1};${H.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[Y.cursorStyle]-(Y.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}l.InputHandler=X;let W=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>$&&(V=J,J=$,$=V),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}W=d([_(0,A.IBufferService)],W)},844:(o,l)=>{function c(d){for(const _ of d)_.dispose();d.length=0}Object.defineProperty(l,"__esModule",{value:!0}),l.getDisposeArrayDisposable=l.disposeArray=l.toDisposable=l.MutableDisposable=l.Disposable=void 0,l.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const _=this._disposables.indexOf(d);_!==-1&&this._disposables.splice(_,1)}},l.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var _;this._isDisposed||d===this._value||((_=this._value)==null||_.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},l.toDisposable=function(d){return{dispose:d}},l.disposeArray=c,l.getDisposeArrayDisposable=function(d){return{dispose:()=>c(d)}}},1505:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.FourKeyMap=l.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(_,f,m){this._data[_]||(this._data[_]={}),this._data[_][f]=m}get(_,f){return this._data[_]?this._data[_][f]:void 0}clear(){this._data={}}}l.TwoKeyMap=c,l.FourKeyMap=class{constructor(){this._data=new c}set(d,_,f,m,g){this._data.get(d,_)||this._data.set(d,_,new c),this._data.get(d,_).set(f,m,g)}get(d,_,f,m){var g;return(g=this._data.get(d,_))==null?void 0:g.get(f,m)}clear(){this._data.clear()}}},6114:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.isChromeOS=l.isLinux=l.isWindows=l.isIphone=l.isIpad=l.isMac=l.getSafariVersion=l.isSafari=l.isLegacyEdge=l.isFirefox=l.isNode=void 0,l.isNode=typeof process<"u"&&"title"in process;const c=l.isNode?"node":navigator.userAgent,d=l.isNode?"node":navigator.platform;l.isFirefox=c.includes("Firefox"),l.isLegacyEdge=c.includes("Edge"),l.isSafari=/^((?!chrome|android).)*safari/i.test(c),l.getSafariVersion=function(){if(!l.isSafari)return 0;const _=c.match(/Version\/(\d+)/);return _===null||_.length<2?0:parseInt(_[1])},l.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),l.isIpad=d==="iPad",l.isIphone=d==="iPhone",l.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),l.isLinux=d.indexOf("Linux")>=0,l.isChromeOS=/\bCrOS\b/.test(c)},6106:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.SortedList=void 0;let c=0;l.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(c=this._search(this._getKey(d)),this._array.splice(c,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const _=this._getKey(d);if(_===void 0||(c=this._search(_),c===-1)||this._getKey(this._array[c])!==_)return!1;do if(this._array[c]===d)return this._array.splice(c,1),!0;while(++c=this._array.length)&&this._getKey(this._array[c])===d))do yield this._array[c];while(++c=this._array.length)&&this._getKey(this._array[c])===d))do _(this._array[c]);while(++c=_;){let m=_+f>>1;const g=this._getKey(this._array[m]);if(g>d)f=m-1;else{if(!(g0&&this._getKey(this._array[m-1])===d;)m--;return m}_=m+1}}return _}}},7226:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DebouncedIdleTask=l.IdleTaskQueue=l.PriorityTaskQueue=void 0;const d=c(6114);class _{constructor(){this._tasks=[],this._i=0}enqueue(g){this._tasks.push(g),this._start()}flush(){for(;this._iv)return b-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(b-S))}ms`),void this._start();b=v}this.clear()}}class f extends _{_requestCallback(g){return setTimeout((()=>g(this._createDeadline(16))))}_cancelCallback(g){clearTimeout(g)}_createDeadline(g){const S=Date.now()+g;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}l.PriorityTaskQueue=f,l.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends _{_requestCallback(m){return requestIdleCallback(m)}_cancelCallback(m){cancelIdleCallback(m)}}:f,l.DebouncedIdleTask=class{constructor(){this._queue=new l.IdleTaskQueue}set(m){this._queue.clear(),this._queue.enqueue(m)}flush(){this._queue.flush()}}},9282:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.updateWindowsModeWrappedState=void 0;const d=c(643);l.updateWindowsModeWrappedState=function(_){const f=_.buffer.lines.get(_.buffer.ybase+_.buffer.y-1),m=f==null?void 0:f.get(_.cols-1),g=_.buffer.lines.get(_.buffer.ybase+_.buffer.y);g&&m&&(g.isWrapped=m[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&m[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ExtendedAttrs=l.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new d}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}}l.AttributeData=c;class d{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,m=0){this._ext=0,this._urlId=0,this._ext=f,this._urlId=m}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}l.ExtendedAttrs=d},9092:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Buffer=l.MAX_BUFFER_SIZE=void 0;const d=c(6349),_=c(7226),f=c(3734),m=c(8437),g=c(4634),S=c(511),k=c(643),b=c(4863),v=c(7116);l.MAX_BUFFER_SIZE=4294967295,l.Buffer=class{constructor(x,y,C){this._hasScrollback=x,this._optionsService=y,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=m.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,k.NULL_CELL_CHAR,k.NULL_CELL_WIDTH,k.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,k.WHITESPACE_CELL_CHAR,k.WHITESPACE_CELL_WIDTH,k.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new _.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(x,y){return new m.BufferLine(this._bufferService.cols,this.getNullCell(x),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const x=this.ybase+this.y-this.ydisp;return x>=0&&xl.MAX_BUFFER_SIZE?l.MAX_BUFFER_SIZE:y}fillViewportRows(x){if(this.lines.length===0){x===void 0&&(x=m.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(x))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(x,y){const C=this.getNullCell(m.DEFAULT_ATTR_DATA);let A=0;const E=this._getCorrectBufferLength(y);if(E>this.lines.maxLength&&(this.lines.maxLength=E),this.lines.length>0){if(this._cols0&&this.lines.length<=this.ybase+this.y+j+1?(this.ybase--,j++,this.ydisp>0&&this.ydisp--):this.lines.push(new m.BufferLine(x,C)));else for(let T=this._rows;T>y;T--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(E0&&(this.lines.trimStart(T),this.ybase=Math.max(this.ybase-T,0),this.ydisp=Math.max(this.ydisp-T,0),this.savedY=Math.max(this.savedY-T,0)),this.lines.maxLength=E}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,y-1),j&&(this.y+=j),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(x,y),this._cols>x))for(let j=0;j.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let x=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,x=!1);let y=0;for(;this._memoryCleanupPosition100)return!0;return x}get _isReflowEnabled(){const x=this._optionsService.rawOptions.windowsPty;return x&&x.buildNumber?this._hasScrollback&&x.backend==="conpty"&&x.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(x,y){this._cols!==x&&(x>this._cols?this._reflowLarger(x,y):this._reflowSmaller(x,y))}_reflowLarger(x,y){const C=(0,g.reflowLargerGetLinesToRemove)(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(m.DEFAULT_ATTR_DATA));if(C.length>0){const A=(0,g.reflowLargerCreateNewLayout)(this.lines,C);(0,g.reflowLargerApplyNewLayout)(this.lines,A.layout),this._reflowLargerAdjustViewport(x,y,A.countRemoved)}}_reflowLargerAdjustViewport(x,y,C){const A=this.getNullCell(m.DEFAULT_ATTR_DATA);let E=C;for(;E-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;j--){let T=this.lines.get(j);if(!T||!T.isWrapped&&T.getTrimmedLength()<=x)continue;const D=[T];for(;T.isWrapped&&j>0;)T=this.lines.get(--j),D.unshift(T);const I=this.ybase+this.y;if(I>=j&&I0&&(A.push({start:j+D.length+E,newLines:X}),E+=X.length),D.push(...X);let W=B.length-1,Z=B[W];Z===0&&(W--,Z=B[W]);let J=D.length-F-1,$=P;for(;J>=0;){const H=Math.min($,Z);if(D[W]===void 0)break;if(D[W].copyCellsFrom(D[J],$-H,Z-H,H,!0),Z-=H,Z===0&&(W--,Z=B[W]),$-=H,$===0){J--;const Y=Math.max(J,0);$=(0,g.getWrappedLineTrimmedLength)(D,Y,this._cols)}}for(let H=0;H0;)this.ybase===0?this.y0){const j=[],T=[];for(let W=0;W=0;W--)if(B&&B.start>I+F){for(let Z=B.newLines.length-1;Z>=0;Z--)this.lines.set(W--,B.newLines[Z]);W++,j.push({index:I+1,amount:B.newLines.length}),F+=B.newLines.length,B=A[++P]}else this.lines.set(W,T[I--]);let V=0;for(let W=j.length-1;W>=0;W--)j[W].index+=V,this.lines.onInsertEmitter.fire(j[W]),V+=j[W].amount;const X=Math.max(0,D+E-this.lines.maxLength);X>0&&this.lines.onTrimEmitter.fire(X)}}translateBufferLineToString(x,y,C=0,A){const E=this.lines.get(x);return E?E.translateToString(y,C,A):""}getWrappedRangeForLine(x){let y=x,C=x;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;C+10;);return x>=this._cols?this._cols-1:x<0?0:x}nextStop(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x=this._cols?this._cols-1:x<0?0:x}clearMarkers(x){this._isClearing=!0;for(let y=0;y{y.line-=C,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((C=>{y.line>=C.index&&(y.line+=C.amount)}))),y.register(this.lines.onDelete((C=>{y.line>=C.index&&y.lineC.index&&(y.line-=C.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(x){this._isClearing||this.markers.splice(this.markers.indexOf(x),1)}}},8437:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLine=l.DEFAULT_ATTR_DATA=void 0;const d=c(3734),_=c(511),f=c(643),m=c(482);l.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let g=0;class S{constructor(b,v,x=!1){this.isWrapped=x,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*b);const y=v||_.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):x]}set(b,v){this._data[3*b+1]=v[f.CHAR_DATA_ATTR_INDEX],v[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[b]=v[1],this._data[3*b+0]=2097152|b|v[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*b+0]=v[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[f.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(b){return this._data[3*b+0]>>22}hasWidth(b){return 12582912&this._data[3*b+0]}getFg(b){return this._data[3*b+1]}getBg(b){return this._data[3*b+2]}hasContent(b){return 4194303&this._data[3*b+0]}getCodePoint(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b].charCodeAt(this._combined[b].length-1):2097151&v}isCombined(b){return 2097152&this._data[3*b+0]}getString(b){const v=this._data[3*b+0];return 2097152&v?this._combined[b]:2097151&v?(0,m.stringFromCodePoint)(2097151&v):""}isProtected(b){return 536870912&this._data[3*b+2]}loadCell(b,v){return g=3*b,v.content=this._data[g+0],v.fg=this._data[g+1],v.bg=this._data[g+2],2097152&v.content&&(v.combinedData=this._combined[b]),268435456&v.bg&&(v.extended=this._extendedAttrs[b]),v}setCell(b,v){2097152&v.content&&(this._combined[b]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[b]=v.extended),this._data[3*b+0]=v.content,this._data[3*b+1]=v.fg,this._data[3*b+2]=v.bg}setCellFromCodepoint(b,v,x,y){268435456&y.bg&&(this._extendedAttrs[b]=y.extended),this._data[3*b+0]=v|x<<22,this._data[3*b+1]=y.fg,this._data[3*b+2]=y.bg}addCodepointToCell(b,v,x){let y=this._data[3*b+0];2097152&y?this._combined[b]+=(0,m.stringFromCodePoint)(v):2097151&y?(this._combined[b]=(0,m.stringFromCodePoint)(2097151&y)+(0,m.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,x&&(y&=-12582913,y|=x<<22),this._data[3*b+0]=y}insertCells(b,v,x){if((b%=this.length)&&this.getWidth(b-1)===2&&this.setCellFromCodepoint(b-1,0,1,x),v=0;--C)this.setCell(b+v+C,this.loadCell(b+C,y));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*x)this._data=new Uint32Array(this._data.buffer,0,x);else{const y=new Uint32Array(x);y.set(this._data),this._data=y}for(let y=this.length;y=b&&delete this._combined[E]}const C=Object.keys(this._extendedAttrs);for(let A=0;A=b&&delete this._extendedAttrs[E]}}return this.length=b,4*x*2=0;--b)if(4194303&this._data[3*b+0])return b+(this._data[3*b+0]>>22);return 0}getNoBgTrimmedLength(){for(let b=this.length-1;b>=0;--b)if(4194303&this._data[3*b+0]||50331648&this._data[3*b+2])return b+(this._data[3*b+0]>>22);return 0}copyCellsFrom(b,v,x,y,C){const A=b._data;if(C)for(let j=y-1;j>=0;j--){for(let T=0;T<3;T++)this._data[3*(x+j)+T]=A[3*(v+j)+T];268435456&A[3*(v+j)+2]&&(this._extendedAttrs[x+j]=b._extendedAttrs[v+j])}else for(let j=0;j=v&&(this._combined[T-v+x]=b._combined[T])}}translateToString(b,v,x,y){v=v??0,x=x??this.length,b&&(x=Math.min(x,this.getTrimmedLength())),y&&(y.length=0);let C="";for(;v>22||1}return y&&y.push(v),C}}l.BufferLine=S},4841:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.getRangeLength=void 0,l.getRangeLength=function(c,d){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 d*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(o,l)=>{function c(d,_,f){if(_===d.length-1)return d[_].getTrimmedLength();const m=!d[_].hasContent(f-1)&&d[_].getWidth(f-1)===1,g=d[_+1].getWidth(0)===2;return m&&g?f-1:f}Object.defineProperty(l,"__esModule",{value:!0}),l.getWrappedLineTrimmedLength=l.reflowSmallerGetNewLineLengths=l.reflowLargerApplyNewLayout=l.reflowLargerCreateNewLayout=l.reflowLargerGetLinesToRemove=void 0,l.reflowLargerGetLinesToRemove=function(d,_,f,m,g){const S=[];for(let k=0;k=k&&m0&&(T>y||x[T].getTrimmedLength()===0);T--)j++;j>0&&(S.push(k+x.length-j),S.push(j)),k+=x.length-1}return S},l.reflowLargerCreateNewLayout=function(d,_){const f=[];let m=0,g=_[m],S=0;for(let k=0;kc(d,x,_))).reduce(((v,x)=>v+x));let S=0,k=0,b=0;for(;bv&&(S-=v,k++);const x=d[k].getWidth(S-1)===2;x&&S--;const y=x?f-1:f;m.push(y),b+=y}return m},l.getWrappedLineTrimmedLength=c},5295:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferSet=void 0;const d=c(8460),_=c(844),f=c(9092);class m extends _.Disposable{constructor(S,k){super(),this._optionsService=S,this._bufferService=k,this._onBufferActivate=this.register(new d.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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,k){this._normal.resize(S,k),this._alt.resize(S,k),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}l.BufferSet=m},511:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CellData=void 0;const d=c(482),_=c(643),f=c(3734);class m extends f.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new f.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const k=new m;return k.setFromCharData(S),k}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(S){this.fg=S[_.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(S[_.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(S[_.CHAR_DATA_CHAR_INDEX].length===2){const b=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=b&&b<=56319){const v=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(b-55296)+v-56320+65536|S[_.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=S[_.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[_.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=S[_.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[_.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}l.CellData=m},643:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WHITESPACE_CELL_CODE=l.WHITESPACE_CELL_WIDTH=l.WHITESPACE_CELL_CHAR=l.NULL_CELL_CODE=l.NULL_CELL_WIDTH=l.NULL_CELL_CHAR=l.CHAR_DATA_CODE_INDEX=l.CHAR_DATA_WIDTH_INDEX=l.CHAR_DATA_CHAR_INDEX=l.CHAR_DATA_ATTR_INDEX=l.DEFAULT_EXT=l.DEFAULT_ATTR=l.DEFAULT_COLOR=void 0,l.DEFAULT_COLOR=0,l.DEFAULT_ATTR=256|l.DEFAULT_COLOR<<9,l.DEFAULT_EXT=0,l.CHAR_DATA_ATTR_INDEX=0,l.CHAR_DATA_CHAR_INDEX=1,l.CHAR_DATA_WIDTH_INDEX=2,l.CHAR_DATA_CODE_INDEX=3,l.NULL_CELL_CHAR="",l.NULL_CELL_WIDTH=1,l.NULL_CELL_CODE=0,l.WHITESPACE_CELL_CHAR=" ",l.WHITESPACE_CELL_WIDTH=1,l.WHITESPACE_CELL_CODE=32},4863:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Marker=void 0;const d=c(8460),_=c(844);class f{get id(){return this._id}constructor(g){this.line=g,this.isDisposed=!1,this._disposables=[],this._id=f._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,_.disposeArray)(this._disposables),this._disposables.length=0)}register(g){return this._disposables.push(g),g}}l.Marker=f,f._nextId=1},7116:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DEFAULT_CHARSET=l.CHARSETS=void 0,l.CHARSETS={},l.DEFAULT_CHARSET=l.CHARSETS.B,l.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:"≥","{":"π","|":"≠","}":"£","~":"·"},l.CHARSETS.A={"#":"£"},l.CHARSETS.B=void 0,l.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},l.CHARSETS.C=l.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},l.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},l.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},l.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},l.CHARSETS.E=l.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},l.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},l.CHARSETS.H=l.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},l.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(o,l)=>{var c,d,_;Object.defineProperty(l,"__esModule",{value:!0}),l.C1_ESCAPED=l.C1=l.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||(l.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="Ÿ"})(d||(l.C1=d={})),(function(f){f.ST=`${c.ESC}\\`})(_||(l.C1_ESCAPED=_={}))},7399:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.evaluateKeyboardEvent=void 0;const d=c(2584),_={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:["'",'"']};l.evaluateKeyboardEvent=function(f,m,g,S){const k={type:0,cancel:!1,key:void 0},b=(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=m?d.C0.ESC+"OA":d.C0.ESC+"[A":f.key==="UIKeyInputLeftArrow"?k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D":f.key==="UIKeyInputRightArrow"?k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C":f.key==="UIKeyInputDownArrow"&&(k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:k.key=f.ctrlKey?"\b":d.C0.DEL,f.altKey&&(k.key=d.C0.ESC+k.key);break;case 9:if(f.shiftKey){k.key=d.C0.ESC+"[Z";break}k.key=d.C0.HT,k.cancel=!0;break;case 13:k.key=f.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,k.cancel=!0;break;case 27:k.key=d.C0.ESC,f.altKey&&(k.key=d.C0.ESC+d.C0.ESC),k.cancel=!0;break;case 37:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"D",k.key===d.C0.ESC+"[1;3D"&&(k.key=d.C0.ESC+(g?"b":"[1;5D"))):k.key=m?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"C",k.key===d.C0.ESC+"[1;3C"&&(k.key=d.C0.ESC+(g?"f":"[1;5C"))):k.key=m?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"A",g||k.key!==d.C0.ESC+"[1;3A"||(k.key=d.C0.ESC+"[1;5A")):k.key=m?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(f.metaKey)break;b?(k.key=d.C0.ESC+"[1;"+(b+1)+"B",g||k.key!==d.C0.ESC+"[1;3B"||(k.key=d.C0.ESC+"[1;5B")):k.key=m?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:f.shiftKey||f.ctrlKey||(k.key=d.C0.ESC+"[2~");break;case 46:k.key=b?d.C0.ESC+"[3;"+(b+1)+"~":d.C0.ESC+"[3~";break;case 36:k.key=b?d.C0.ESC+"[1;"+(b+1)+"H":m?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:k.key=b?d.C0.ESC+"[1;"+(b+1)+"F":m?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:f.shiftKey?k.type=2:f.ctrlKey?k.key=d.C0.ESC+"[5;"+(b+1)+"~":k.key=d.C0.ESC+"[5~";break;case 34:f.shiftKey?k.type=3:f.ctrlKey?k.key=d.C0.ESC+"[6;"+(b+1)+"~":k.key=d.C0.ESC+"[6~";break;case 112:k.key=b?d.C0.ESC+"[1;"+(b+1)+"P":d.C0.ESC+"OP";break;case 113:k.key=b?d.C0.ESC+"[1;"+(b+1)+"Q":d.C0.ESC+"OQ";break;case 114:k.key=b?d.C0.ESC+"[1;"+(b+1)+"R":d.C0.ESC+"OR";break;case 115:k.key=b?d.C0.ESC+"[1;"+(b+1)+"S":d.C0.ESC+"OS";break;case 116:k.key=b?d.C0.ESC+"[15;"+(b+1)+"~":d.C0.ESC+"[15~";break;case 117:k.key=b?d.C0.ESC+"[17;"+(b+1)+"~":d.C0.ESC+"[17~";break;case 118:k.key=b?d.C0.ESC+"[18;"+(b+1)+"~":d.C0.ESC+"[18~";break;case 119:k.key=b?d.C0.ESC+"[19;"+(b+1)+"~":d.C0.ESC+"[19~";break;case 120:k.key=b?d.C0.ESC+"[20;"+(b+1)+"~":d.C0.ESC+"[20~";break;case 121:k.key=b?d.C0.ESC+"[21;"+(b+1)+"~":d.C0.ESC+"[21~";break;case 122:k.key=b?d.C0.ESC+"[23;"+(b+1)+"~":d.C0.ESC+"[23~";break;case 123:k.key=b?d.C0.ESC+"[24;"+(b+1)+"~":d.C0.ESC+"[24~";break;default:if(!f.ctrlKey||f.shiftKey||f.altKey||f.metaKey)if(g&&!S||!f.altKey||f.metaKey)!g||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=d.C0.US),f.key==="@"&&(k.key=d.C0.NUL)):f.keyCode===65&&(k.type=1);else{const v=_[f.keyCode],x=v==null?void 0:v[f.shiftKey?1:0];if(x)k.key=d.C0.ESC+x;else if(f.keyCode>=65&&f.keyCode<=90){const y=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(y);f.shiftKey&&(C=C.toUpperCase()),k.key=d.C0.ESC+C}else if(f.keyCode===32)k.key=d.C0.ESC+(f.ctrlKey?d.C0.NUL:" ");else if(f.key==="Dead"&&f.code.startsWith("Key")){let y=f.code.slice(3,4);f.shiftKey||(y=y.toLowerCase()),k.key=d.C0.ESC+y,k.cancel=!0}}else f.keyCode>=65&&f.keyCode<=90?k.key=String.fromCharCode(f.keyCode-64):f.keyCode===32?k.key=d.C0.NUL:f.keyCode>=51&&f.keyCode<=55?k.key=String.fromCharCode(f.keyCode-51+27):f.keyCode===56?k.key=d.C0.DEL:f.keyCode===219?k.key=d.C0.ESC:f.keyCode===220?k.key=d.C0.FS:f.keyCode===221&&(k.key=d.C0.GS)}return k}},482:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Utf8ToUtf32=l.StringToUtf32=l.utf32ToString=l.stringFromCodePoint=void 0,l.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},l.utf32ToString=function(c,d=0,_=c.length){let f="";for(let m=d;m<_;++m){let g=c[m];g>65535?(g-=65536,f+=String.fromCharCode(55296+(g>>10))+String.fromCharCode(g%1024+56320)):f+=String.fromCharCode(g)}return f},l.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,d){const _=c.length;if(!_)return 0;let f=0,m=0;if(this._interim){const g=c.charCodeAt(m++);56320<=g&&g<=57343?d[f++]=1024*(this._interim-55296)+g-56320+65536:(d[f++]=this._interim,d[f++]=g),this._interim=0}for(let g=m;g<_;++g){const S=c.charCodeAt(g);if(55296<=S&&S<=56319){if(++g>=_)return this._interim=S,f;const k=c.charCodeAt(g);56320<=k&&k<=57343?d[f++]=1024*(S-55296)+k-56320+65536:(d[f++]=S,d[f++]=k)}else S!==65279&&(d[f++]=S)}return f}},l.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,d){const _=c.length;if(!_)return 0;let f,m,g,S,k=0,b=0,v=0;if(this.interim[0]){let C=!1,A=this.interim[0];A&=(224&A)==192?31:(240&A)==224?15:7;let E,j=0;for(;(E=63&this.interim[++j])&&j<4;)A<<=6,A|=E;const T=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=T-j;for(;v=_)return 0;if(E=c[v++],(192&E)!=128){v--,C=!0;break}this.interim[j++]=E,A<<=6,A|=63&E}C||(T===2?A<128?v--:d[k++]=A:T===3?A<2048||A>=55296&&A<=57343||A===65279||(d[k++]=A):A<65536||A>1114111||(d[k++]=A)),this.interim.fill(0)}const x=_-4;let y=v;for(;y<_;){for(;!(!(y=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(b=(31&f)<<6|63&m,b<128){y--;continue}d[k++]=b}else if((240&f)==224){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(b=(15&f)<<12|(63&m)<<6|63&g,b<2048||b>=55296&&b<=57343||b===65279)continue;d[k++]=b}else if((248&f)==240){if(y>=_)return this.interim[0]=f,k;if(m=c[y++],(192&m)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,k;if(g=c[y++],(192&g)!=128){y--;continue}if(y>=_)return this.interim[0]=f,this.interim[1]=m,this.interim[2]=g,k;if(S=c[y++],(192&S)!=128){y--;continue}if(b=(7&f)<<18|(63&m)<<12|(63&g)<<6|63&S,b<65536||b>1114111)continue;d[k++]=b}}return k}}},225:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeV6=void 0;const d=c(1480),_=[[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 m;l.UnicodeV6=class{constructor(){if(this.version="6",!m){m=new Uint8Array(65536),m.fill(1),m[0]=0,m.fill(0,1,32),m.fill(0,127,160),m.fill(2,4352,4448),m[9001]=2,m[9002]=2,m.fill(2,11904,42192),m[12351]=1,m.fill(2,44032,55204),m.fill(2,63744,64256),m.fill(2,65040,65050),m.fill(2,65072,65136),m.fill(2,65280,65377),m.fill(2,65504,65511);for(let g=0;g<_.length;++g)m.fill(0,_[g][0],_[g][1]+1)}}wcwidth(g){return g<32?0:g<127?1:g<65536?m[g]:(function(S,k){let b,v=0,x=k.length-1;if(Sk[x][1])return!1;for(;x>=v;)if(b=v+x>>1,S>k[b][1])v=b+1;else{if(!(S=131072&&g<=196605||g>=196608&&g<=262141?2:1}charProperties(g,S){let k=this.wcwidth(g),b=k===0&&S!==0;if(b){const v=d.UnicodeService.extractWidth(S);v===0?b=!1:v>k&&(k=v)}return d.UnicodeService.createPropertyValue(0,k,b)}}},5981:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.WriteBuffer=void 0;const d=c(8460),_=c(844);class f extends _.Disposable{constructor(g){super(),this._action=g,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(g,S){if(S!==void 0&&this._syncCalls>S)return void(this._syncCalls=0);if(this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let k;for(this._isSyncWriting=!0;k=this._writeBuffer.shift();){this._action(k);const b=this._callbacks.shift();b&&b()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(g,S){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+=g.length,this._writeBuffer.push(g),this._callbacks.push(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=g.length,this._writeBuffer.push(g),this._callbacks.push(S)}_innerWrite(g=0,S=!0){const k=g||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const b=this._writeBuffer[this._bufferOffset],v=this._action(b,S);if(v){const y=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void v.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(y)}const x=this._callbacks[this._bufferOffset];if(x&&x(),this._bufferOffset++,this._pendingData-=b.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()}}l.WriteBuffer=f},5941:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.toRgbString=l.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})$/,d=/^[\da-f]+$/;function _(f,m){const g=f.toString(16),S=g.length<2?"0"+g:g;switch(m){case 4:return g[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}l.parseColor=function(f){if(!f)return;let m=f.toLowerCase();if(m.indexOf("rgb:")===0){m=m.slice(4);const g=c.exec(m);if(g){const S=g[1]?15:g[4]?255:g[7]?4095:65535;return[Math.round(parseInt(g[1]||g[4]||g[7]||g[10],16)/S*255),Math.round(parseInt(g[2]||g[5]||g[8]||g[11],16)/S*255),Math.round(parseInt(g[3]||g[6]||g[9]||g[12],16)/S*255)]}}else if(m.indexOf("#")===0&&(m=m.slice(1),d.exec(m)&&[3,6,9,12].includes(m.length))){const g=m.length/3,S=[0,0,0];for(let k=0;k<3;++k){const b=parseInt(m.slice(g*k,g*k+g),16);S[k]=g===1?b<<4:g===2?b:g===3?b>>4:b>>8}return S}},l.toRgbString=function(f,m=16){const[g,S,k]=f;return`rgb:${_(g,m)}/${_(S,m)}/${_(k,m)}`}},5770:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.PAYLOAD_LIMIT=void 0,l.PAYLOAD_LIMIT=1e7},6351:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DcsHandler=l.DcsParser=void 0;const d=c(482),_=c(8742),f=c(5770),m=[];l.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=m,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}registerHandler(S,k){this._handlers[S]===void 0&&(this._handlers[S]=[]);const b=this._handlers[S];return b.push(k),{dispose:()=>{const v=b.indexOf(k);v!==-1&&b.splice(v,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=m,this._ident=0}hook(S,k){if(this.reset(),this._ident=S,this._active=this._handlers[S]||m,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].hook(k);else this._handlerFb(this._ident,"HOOK",k)}put(S,k,b){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(S,k,b);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,k,b))}unhook(S,k=!0){if(this._active.length){let b=!1,v=this._active.length-1,x=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,b=k,x=this._stack.fallThrough,this._stack.paused=!1),!x&&b===!1){for(;v>=0&&(b=this._active[v].unhook(S),b!==!0);v--)if(b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,b;v--}for(;v>=0;v--)if(b=this._active[v].unhook(!1),b instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,b}else this._handlerFb(this._ident,"UNHOOK",S);this._active=m,this._ident=0}};const g=new _.Params;g.addParam(0),l.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=g,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():g,this._data="",this._hitLimit=!1}put(S,k,b){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,k,b),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let k=!1;if(this._hitLimit)k=!1;else if(S&&(k=this._handler(this._data,this._params),k instanceof Promise))return k.then((b=>(this._params=g,this._data="",this._hitLimit=!1,b)));return this._params=g,this._data="",this._hitLimit=!1,k}}},2015:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.EscapeSequenceParser=l.VT500_TRANSITION_TABLE=l.TransitionTable=void 0;const d=c(844),_=c(8742),f=c(6242),m=c(6351);class g{constructor(v){this.table=new Uint8Array(v)}setDefault(v,x){this.table.fill(v<<4|x)}add(v,x,y,C){this.table[x<<8|v]=y<<4|C}addMany(v,x,y,C){for(let A=0;AT)),x=(j,T)=>v.slice(j,T),y=x(32,127),C=x(0,24);C.push(25),C.push.apply(C,x(28,32));const A=x(0,14);let E;for(E in b.setDefault(1,0),b.addMany(y,0,2,0),A)b.addMany([24,26,153,154],E,3,0),b.addMany(x(128,144),E,3,0),b.addMany(x(144,152),E,3,0),b.add(156,E,0,0),b.add(27,E,11,1),b.add(157,E,4,8),b.addMany([152,158,159],E,0,7),b.add(155,E,11,3),b.add(144,E,11,9);return b.addMany(C,0,3,0),b.addMany(C,1,3,1),b.add(127,1,0,1),b.addMany(C,8,0,8),b.addMany(C,3,3,3),b.add(127,3,0,3),b.addMany(C,4,3,4),b.add(127,4,0,4),b.addMany(C,6,3,6),b.addMany(C,5,3,5),b.add(127,5,0,5),b.addMany(C,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(y,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(y,7,0,7),b.addMany(C,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(C,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(C,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(C,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(C,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(C,13,13,13),b.addMany(y,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(S,0,2,0),b.add(S,8,5,8),b.add(S,6,0,6),b.add(S,11,0,11),b.add(S,13,13,13),b})();class k extends d.Disposable{constructor(v=l.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new _.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(x,y,C)=>{},this._executeHandlerFb=x=>{},this._csiHandlerFb=(x,y)=>{},this._escHandlerFb=x=>{},this._errorHandlerFb=x=>x,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.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 m.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,x=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let A=0;AE||E>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=E}}if(v.final.length!==1)throw new Error("final must be a single byte");const C=v.final.charCodeAt(0);if(x[0]>C||C>x[1])throw new Error(`final must be in range ${x[0]} .. ${x[1]}`);return y<<=8,y|=C,y}identToString(v){const x=[];for(;v;)x.push(String.fromCharCode(255&v)),v>>=8;return x.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,x){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const C=this._escHandlers[y];return C.push(x),{dispose:()=>{const A=C.indexOf(x);A!==-1&&C.splice(A,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,x){this._executeHandlers[v.charCodeAt(0)]=x}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,x){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const C=this._csiHandlers[y];return C.push(x),{dispose:()=>{const A=C.indexOf(x);A!==-1&&C.splice(A,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,x){return this._dcsParser.registerHandler(this._identifier(v),x)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,x){return this._oscParser.registerHandler(v,x)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}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(v,x,y,C,A){this._parseStack.state=v,this._parseStack.handlers=x,this._parseStack.handlerPos=y,this._parseStack.transition=C,this._parseStack.chunkPos=A}parse(v,x,y){let C,A=0,E=0,j=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,j=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const T=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&D>-1){for(;D>=0&&(C=T[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 4:if(y===!1&&D>-1){for(;D>=0&&(C=T[D](),C!==!0);D--)if(C instanceof Promise)return this._parseStack.handlerPos=D,C}this._parseStack.handlers=[];break;case 6:if(A=v[this._parseStack.chunkPos],C=this._dcsParser.unhook(A!==24&&A!==26,y),C)return C;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(A=v[this._parseStack.chunkPos],C=this._oscParser.end(A!==24&&A!==26,y),C)return C;A===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,j=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let T=j;T>4){case 2:for(let F=T+1;;++F){if(F>=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=x||(A=v[F])<32||A>126&&A=0&&(C=D[I](this._params),C!==!0);I--)if(C instanceof Promise)return this._preserveStack(3,D,I,E,T),C;I<0&&this._csiHandlerFb(this._collect<<8|A,this._params),this.precedingJoinState=0;break;case 8:do switch(A){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(A-48)}while(++T47&&A<60);T--;break;case 9:this._collect<<=8,this._collect|=A;break;case 10:const P=this._escHandlers[this._collect<<8|A];let B=P?P.length-1:-1;for(;B>=0&&(C=P[B](),C!==!0);B--)if(C instanceof Promise)return this._preserveStack(4,P,B,E,T),C;B<0&&this._escHandlerFb(this._collect<<8|A),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|A,this._params);break;case 13:for(let F=T+1;;++F)if(F>=x||(A=v[F])===24||A===26||A===27||A>127&&A=x||(A=v[F])<32||A>127&&A{Object.defineProperty(l,"__esModule",{value:!0}),l.OscHandler=l.OscParser=void 0;const d=c(5770),_=c(482),f=[];l.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(m,g){this._handlers[m]===void 0&&(this._handlers[m]=[]);const S=this._handlers[m];return S.push(g),{dispose:()=>{const k=S.indexOf(g);k!==-1&&S.splice(k,1)}}}clearHandler(m){this._handlers[m]&&delete this._handlers[m]}setHandlerFallback(m){this._handlerFb=m}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=f}reset(){if(this._state===2)for(let m=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;m>=0;--m)this._active[m].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 m=this._active.length-1;m>=0;m--)this._active[m].start();else this._handlerFb(this._id,"START")}_put(m,g,S){if(this._active.length)for(let k=this._active.length-1;k>=0;k--)this._active[k].put(m,g,S);else this._handlerFb(this._id,"PUT",(0,_.utf32ToString)(m,g,S))}start(){this.reset(),this._state=1}put(m,g,S){if(this._state!==3){if(this._state===1)for(;g0&&this._put(m,g,S)}}end(m,g=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,k=this._active.length-1,b=!1;if(this._stack.paused&&(k=this._stack.loopPosition-1,S=g,b=this._stack.fallThrough,this._stack.paused=!1),!b&&S===!1){for(;k>=0&&(S=this._active[k].end(m),S!==!0);k--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!1,S;k--}for(;k>=0;k--)if(S=this._active[k].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=k,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",m);this._active=f,this._id=-1,this._state=0}}},l.OscHandler=class{constructor(m){this._handler=m,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(m,g,S){this._hitLimit||(this._data+=(0,_.utf32ToString)(m,g,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(m){let g=!1;if(this._hitLimit)g=!1;else if(m&&(g=this._handler(this._data),g instanceof Promise))return g.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,g}}},8742:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.Params=void 0;const c=2147483647;class d{static fromArray(f){const m=new d;if(!f.length)return m;for(let g=Array.isArray(f[0])?1:0;g256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(f),this.length=0,this._subParams=new Int32Array(m),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(f),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const f=new d(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 m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&f.push(Array.prototype.slice.call(this._subParams,g,S))}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 m=this._subParamsIdx[f]>>8,g=255&this._subParamsIdx[f];return g-m>0?this._subParams.subarray(m,g):null}getSubParamsAll(){const f={};for(let m=0;m>8,S=255&this._subParamsIdx[m];S-g>0&&(f[m]=this._subParams.slice(g,S))}return f}addDigit(f){let m;if(this._rejectDigits||!(m=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const g=this._digitIsSub?this._subParams:this.params,S=g[m-1];g[m-1]=~S?Math.min(10*S+f,c):f}}l.Params=d},5741:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.AddonManager=void 0,l.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,d){const _={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(_),d.dispose=()=>this._wrappedAddonDispose(_),d.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let d=-1;for(let _=0;_{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferApiView=void 0;const d=c(3785),_=c(511);l.BufferApiView=class{constructor(f,m){this._buffer=f,this.type=m}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 m=this._buffer.lines.get(f);if(m)return new d.BufferLineApiView(m)}getNullCell(){return new _.CellData}}},3785:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferLineApiView=void 0;const d=c(511);l.BufferLineApiView=class{constructor(_){this._line=_}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(_,f){if(!(_<0||_>=this._line.length))return f?(this._line.loadCell(_,f),f):this._line.loadCell(_,new d.CellData)}translateToString(_,f,m){return this._line.translateToString(_,f,m)}}},8285:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.BufferNamespaceApi=void 0;const d=c(8771),_=c(8460),f=c(844);class m extends f.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new _.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.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)}}l.BufferNamespaceApi=m},7975:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ParserApi=void 0,l.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,d){return this._core.registerCsiHandler(c,(_=>d(_.toArray())))}addCsiHandler(c,d){return this.registerCsiHandler(c,d)}registerDcsHandler(c,d){return this._core.registerDcsHandler(c,((_,f)=>d(_,f.toArray())))}addDcsHandler(c,d){return this.registerDcsHandler(c,d)}registerEscHandler(c,d){return this._core.registerEscHandler(c,d)}addEscHandler(c,d){return this.registerEscHandler(c,d)}registerOscHandler(c,d){return this._core.registerOscHandler(c,d)}addOscHandler(c,d){return this.registerOscHandler(c,d)}}},7090:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeApi=void 0,l.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(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,A=arguments.length,E=A<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(A<3?C(E):A>3?C(v,x,E):C(v,x))||E);return A>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.BufferService=l.MINIMUM_ROWS=l.MINIMUM_COLS=void 0;const f=c(8460),m=c(844),g=c(5295),S=c(2585);l.MINIMUM_COLS=2,l.MINIMUM_ROWS=1;let k=l.BufferService=class extends m.Disposable{get buffer(){return this.buffers.active}constructor(b){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(b.rawOptions.cols||0,l.MINIMUM_COLS),this.rows=Math.max(b.rawOptions.rows||0,l.MINIMUM_ROWS),this.buffers=this.register(new g.BufferSet(b,this))}resize(b,v){this.cols=b,this.rows=v,this.buffers.resize(b,v),this._onResize.fire({cols:b,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(b,v=!1){const x=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===b.fg&&y.getBg(0)===b.bg||(y=x.getBlankLine(b,v),this._cachedBlankLine=y),y.isWrapped=v;const C=x.ybase+x.scrollTop,A=x.ybase+x.scrollBottom;if(x.scrollTop===0){const E=x.lines.isFull;A===x.lines.length-1?E?x.lines.recycle().copyFrom(y):x.lines.push(y.clone()):x.lines.splice(A+1,0,y.clone()),E?this.isUserScrolling&&(x.ydisp=Math.max(x.ydisp-1,0)):(x.ybase++,this.isUserScrolling||x.ydisp++)}else{const E=A-C+1;x.lines.shiftElements(C+1,E-1,-1),x.lines.set(A,y.clone())}this.isUserScrolling||(x.ydisp=x.ybase),this._onScroll.fire(x.ydisp)}scrollLines(b,v,x){const y=this.buffer;if(b<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else b+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const C=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+b,y.ybase),0),C!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};l.BufferService=k=d([_(0,S.IOptionsService)],k)},7994:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.CharsetService=void 0,l.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,d){this._charsets[c]=d,this.glevel===c&&(this.charset=d)}}},1753:function(o,l,c){var d=this&&this.__decorate||function(y,C,A,E){var j,T=arguments.length,D=T<3?C:E===null?E=Object.getOwnPropertyDescriptor(C,A):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(y,C,A,E);else for(var I=y.length-1;I>=0;I--)(j=y[I])&&(D=(T<3?j(D):T>3?j(C,A,D):j(C,A))||D);return T>3&&D&&Object.defineProperty(C,A,D),D},_=this&&this.__param||function(y,C){return function(A,E){C(A,E,y)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreMouseService=void 0;const f=c(2585),m=c(8460),g=c(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function k(y,C){let A=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(A|=64,A|=y.action):(A|=3&y.button,4&y.button&&(A|=64),8&y.button&&(A|=128),y.action===32?A|=32:y.action!==0||C||(A|=3)),A}const b=String.fromCharCode,v={DEFAULT:y=>{const C=[k(y,!1)+32,y.col+32,y.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${b(C[0])}${b(C[1])}${b(C[2])}`},SGR:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.col};${y.row}${C}`},SGR_PIXELS:y=>{const C=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${k(y,!0)};${y.x};${y.y}${C}`}};let x=l.CoreMouseService=class extends g.Disposable{constructor(y,C){super(),this._bufferService=y,this._coreService=C,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new m.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const A of Object.keys(S))this.addProtocol(A,S[A]);for(const A of Object.keys(v))this.addEncoding(A,v[A]);this.reset()}addProtocol(y,C){this._protocols[y]=C}addEncoding(y,C){this._encodings[y]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const C=this._encodings[this._activeEncoding](y);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,C,A){if(A){if(y.x!==C.x||y.y!==C.y)return!1}else if(y.col!==C.col||y.row!==C.row)return!1;return y.button===C.button&&y.action===C.action&&y.ctrl===C.ctrl&&y.alt===C.alt&&y.shift===C.shift}};l.CoreMouseService=x=d([_(0,f.IBufferService),_(1,f.ICoreService)],x)},6975:function(o,l,c){var d=this&&this.__decorate||function(x,y,C,A){var E,j=arguments.length,T=j<3?y:A===null?A=Object.getOwnPropertyDescriptor(y,C):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(x,y,C,A);else for(var D=x.length-1;D>=0;D--)(E=x[D])&&(T=(j<3?E(T):j>3?E(y,C,T):E(y,C))||T);return j>3&&T&&Object.defineProperty(y,C,T),T},_=this&&this.__param||function(x,y){return function(C,A){y(C,A,x)}};Object.defineProperty(l,"__esModule",{value:!0}),l.CoreService=void 0;const f=c(1439),m=c(8460),g=c(844),S=c(2585),k=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=l.CoreService=class extends g.Disposable{constructor(x,y,C){super(),this._bufferService=x,this._logService=y,this._optionsService=C,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new m.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new m.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new m.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new m.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}reset(){this.modes=(0,f.clone)(k),this.decPrivateModes=(0,f.clone)(b)}triggerDataEvent(x,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${x}"`,(()=>x.split("").map((A=>A.charCodeAt(0))))),this._onData.fire(x)}triggerBinaryEvent(x){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${x}"`,(()=>x.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(x))}};l.CoreService=v=d([_(0,S.IBufferService),_(1,S.ILogService),_(2,S.IOptionsService)],v)},9074:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.DecorationService=void 0;const d=c(8055),_=c(8460),f=c(844),m=c(6106);let g=0,S=0;class k extends f.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new m.SortedList((x=>x==null?void 0:x.marker.line)),this._onDecorationRegistered=this.register(new _.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new _.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(x){if(x.marker.isDisposed)return;const y=new b(x);if(y){const C=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),C.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const x of this._decorations.values())x.dispose();this._decorations.clear()}*getDecorationsAtCell(x,y,C){let A=0,E=0;for(const j of this._decorations.getKeyIterator(y))A=j.options.x??0,E=A+(j.options.width??1),x>=A&&x{g=E.options.x??0,S=g+(E.options.width??1),x>=g&&x{Object.defineProperty(l,"__esModule",{value:!0}),l.InstantiationService=l.ServiceCollection=void 0;const d=c(2585),_=c(8343);class f{constructor(...g){this._entries=new Map;for(const[S,k]of g)this.set(S,k)}set(g,S){const k=this._entries.get(g);return this._entries.set(g,S),k}forEach(g){for(const[S,k]of this._entries.entries())g(S,k)}has(g){return this._entries.has(g)}get(g){return this._entries.get(g)}}l.ServiceCollection=f,l.InstantiationService=class{constructor(){this._services=new f,this._services.set(d.IInstantiationService,this)}setService(m,g){this._services.set(m,g)}getService(m){return this._services.get(m)}createInstance(m,...g){const S=(0,_.getServiceDependencies)(m).sort(((v,x)=>v.index-x.index)),k=[];for(const v of S){const x=this._services.get(v.id);if(!x)throw new Error(`[createInstance] ${m.name} depends on UNKNOWN service ${v.id}.`);k.push(x)}const b=S.length>0?S[0].index:g.length;if(g.length!==b)throw new Error(`[createInstance] First service dependency of ${m.name} at position ${b+1} conflicts with ${g.length} static arguments`);return new m(...g,...k)}}},7866:function(o,l,c){var d=this&&this.__decorate||function(b,v,x,y){var C,A=arguments.length,E=A<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,x):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(b,v,x,y);else for(var j=b.length-1;j>=0;j--)(C=b[j])&&(E=(A<3?C(E):A>3?C(v,x,E):C(v,x))||E);return A>3&&E&&Object.defineProperty(v,x,E),E},_=this&&this.__param||function(b,v){return function(x,y){v(x,y,b)}};Object.defineProperty(l,"__esModule",{value:!0}),l.traceCall=l.setTraceLogger=l.LogService=void 0;const f=c(844),m=c(2585),g={trace:m.LogLevelEnum.TRACE,debug:m.LogLevelEnum.DEBUG,info:m.LogLevelEnum.INFO,warn:m.LogLevelEnum.WARN,error:m.LogLevelEnum.ERROR,off:m.LogLevelEnum.OFF};let S,k=l.LogService=class extends f.Disposable{get logLevel(){return this._logLevel}constructor(b){super(),this._optionsService=b,this._logLevel=m.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=g[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(b){for(let v=0;vJSON.stringify(E))).join(", ")})`);const A=y.apply(this,C);return S.trace(`GlyphRenderer#${y.name} return`,A),A}}},7302:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.OptionsService=l.DEFAULT_OPTIONS=void 0;const d=c(8460),_=c(844),f=c(6114);l.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 m=["normal","bold","100","200","300","400","500","600","700","800","900"];class g extends _.Disposable{constructor(k){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const b={...l.DEFAULT_OPTIONS};for(const v in k)if(v in b)try{const x=k[v];b[v]=this._sanitizeAndValidateOption(v,x)}catch(x){console.error(x)}this.rawOptions=b,this.options={...b},this._setupOptions(),this.register((0,_.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,b){return this.onOptionChange((v=>{v===k&&b(this.rawOptions[k])}))}onMultipleOptionChange(k,b){return this.onOptionChange((v=>{k.indexOf(v)!==-1&&b()}))}_setupOptions(){const k=v=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},b=(v,x)=>{if(!(v in l.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);x=this._sanitizeAndValidateOption(v,x),this.rawOptions[v]!==x&&(this.rawOptions[v]=x,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const x={get:k.bind(this,v),set:b.bind(this,v)};Object.defineProperty(this.options,v,x)}}_sanitizeAndValidateOption(k,b){switch(k){case"cursorStyle":if(b||(b=l.DEFAULT_OPTIONS[k]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(b))throw new Error(`"${b}" is not a valid value for ${k}`);break;case"wordSeparator":b||(b=l.DEFAULT_OPTIONS[k]);break;case"fontWeight":case"fontWeightBold":if(typeof b=="number"&&1<=b&&b<=1e3)break;b=m.includes(b)?b:l.DEFAULT_OPTIONS[k];break;case"cursorWidth":b=Math.floor(b);case"lineHeight":case"tabStopWidth":if(b<1)throw new Error(`${k} cannot be less than 1, value: ${b}`);break;case"minimumContrastRatio":b=Math.max(1,Math.min(21,Math.round(10*b)/10));break;case"scrollback":if((b=Math.min(b,4294967295))<0)throw new Error(`${k} cannot be less than 0, value: ${b}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(b<=0)throw new Error(`${k} cannot be less than or equal to 0, value: ${b}`);break;case"rows":case"cols":if(!b&&b!==0)throw new Error(`${k} must be numeric, value: ${b}`);break;case"windowsPty":b=b??{}}return b}}l.OptionsService=g},2660:function(o,l,c){var d=this&&this.__decorate||function(g,S,k,b){var v,x=arguments.length,y=x<3?S:b===null?b=Object.getOwnPropertyDescriptor(S,k):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(g,S,k,b);else for(var C=g.length-1;C>=0;C--)(v=g[C])&&(y=(x<3?v(y):x>3?v(S,k,y):v(S,k))||y);return x>3&&y&&Object.defineProperty(S,k,y),y},_=this&&this.__param||function(g,S){return function(k,b){S(k,b,g)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkService=void 0;const f=c(2585);let m=l.OscLinkService=class{constructor(g){this._bufferService=g,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(g){const S=this._bufferService.buffer;if(g.id===void 0){const C=S.addMarker(S.ybase+S.y),A={data:g,id:this._nextId++,lines:[C]};return C.onDispose((()=>this._removeMarkerFromLink(A,C))),this._dataByLinkId.set(A.id,A),A.id}const k=g,b=this._getEntryIdKey(k),v=this._entriesWithId.get(b);if(v)return this.addLineToLink(v.id,S.ybase+S.y),v.id;const x=S.addMarker(S.ybase+S.y),y={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[x]};return x.onDispose((()=>this._removeMarkerFromLink(y,x))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(g,S){const k=this._dataByLinkId.get(g);if(k&&k.lines.every((b=>b.line!==S))){const b=this._bufferService.buffer.addMarker(S);k.lines.push(b),b.onDispose((()=>this._removeMarkerFromLink(k,b)))}}getLinkData(g){var S;return(S=this._dataByLinkId.get(g))==null?void 0:S.data}_getEntryIdKey(g){return`${g.id};;${g.uri}`}_removeMarkerFromLink(g,S){const k=g.lines.indexOf(S);k!==-1&&(g.lines.splice(k,1),g.lines.length===0&&(g.data.id!==void 0&&this._entriesWithId.delete(g.key),this._dataByLinkId.delete(g.id)))}};l.OscLinkService=m=d([_(0,f.IBufferService)],m)},8343:(o,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.createDecorator=l.getServiceDependencies=l.serviceRegistry=void 0;const c="di$target",d="di$dependencies";l.serviceRegistry=new Map,l.getServiceDependencies=function(_){return _[d]||[]},l.createDecorator=function(_){if(l.serviceRegistry.has(_))return l.serviceRegistry.get(_);const f=function(m,g,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(k,b,v){b[c]===b?b[d].push({id:k,index:v}):(b[d]=[{id:k,index:v}],b[c]=b)})(f,m,S)};return f.toString=()=>_,l.serviceRegistry.set(_,f),f}},2585:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.IDecorationService=l.IUnicodeService=l.IOscLinkService=l.IOptionsService=l.ILogService=l.LogLevelEnum=l.IInstantiationService=l.ICharsetService=l.ICoreService=l.ICoreMouseService=l.IBufferService=void 0;const d=c(8343);var _;l.IBufferService=(0,d.createDecorator)("BufferService"),l.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),l.ICoreService=(0,d.createDecorator)("CoreService"),l.ICharsetService=(0,d.createDecorator)("CharsetService"),l.IInstantiationService=(0,d.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"})(_||(l.LogLevelEnum=_={})),l.ILogService=(0,d.createDecorator)("LogService"),l.IOptionsService=(0,d.createDecorator)("OptionsService"),l.IOscLinkService=(0,d.createDecorator)("OscLinkService"),l.IUnicodeService=(0,d.createDecorator)("UnicodeService"),l.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(o,l,c)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.UnicodeService=void 0;const d=c(8460),_=c(225);class f{static extractShouldJoin(g){return(1&g)!=0}static extractWidth(g){return g>>1&3}static extractCharKind(g){return g>>3}static createPropertyValue(g,S,k=!1){return(16777215&g)<<3|(3&S)<<1|(k?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const g=new _.UnicodeV6;this.register(g),this._active=g.version,this._activeProvider=g}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(g){if(!this._providers[g])throw new Error(`unknown Unicode version "${g}"`);this._active=g,this._activeProvider=this._providers[g],this._onChange.fire(g)}register(g){this._providers[g.version]=g}wcwidth(g){return this._activeProvider.wcwidth(g)}getStringCellWidth(g){let S=0,k=0;const b=g.length;for(let v=0;v=b)return S+this.wcwidth(x);const A=g.charCodeAt(v);56320<=A&&A<=57343?x=1024*(x-55296)+A-56320+65536:S+=this.wcwidth(A)}const y=this.charProperties(x,k);let C=f.extractWidth(y);f.extractShouldJoin(y)&&(C-=f.extractWidth(k)),S+=C,k=y}return S}charProperties(g,S){return this._activeProvider.charProperties(g,S)}}l.UnicodeService=f}},r={};function s(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return t[o].call(c.exports,c,c.exports,s),c.exports}var a={};return(()=>{var o=a;Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const l=s(9042),c=s(3236),d=s(844),_=s(5741),f=s(8285),m=s(7975),g=s(7090),S=["cols","rows"];class k extends d.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new _.AddonManager),this._publicOptions={...this._core.options};const x=C=>this._core.options[C],y=(C,A)=>{this._checkReadonlyOptions(C),this._core.options[C]=A};for(const C in this._core.options){const A={get:x.bind(this,C),set:y.bind(this,C)};Object.defineProperty(this._publicOptions,C,A)}}_checkReadonlyOptions(v){if(S.includes(v))throw new Error(`Option "${v}" 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 m.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new g.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 v=this._core.coreService.decPrivateModes;let x="none";switch(this._core.coreMouseService.activeProtocol){case"X10":x="x10";break;case"VT200":x="vt200";break;case"DRAG":x="drag";break;case"ANY":x="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:x,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const x in v)this._publicOptions[x]=v[x]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,x=!0){this._core.input(v,x)}resize(v,x){this._verifyIntegers(v,x),this._core.resize(v,x)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,x,y){this._verifyIntegers(v,x,y),this._core.select(v,x,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,x){this._verifyIntegers(v,x),this._core.selectLines(v,x)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,x){this._core.write(v,x)}writeln(v,x){this._core.write(v),this._core.write(`\r +`,x)}paste(v){this._core.paste(v)}refresh(v,x){this._verifyIntegers(v,x),this._core.refresh(v,x)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return l}_verifyIntegers(...v){for(const x of v)if(x===1/0||isNaN(x)||x%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const x of v)if(x&&(x===1/0||isNaN(x)||x%1!=0||x<0))throw new Error("This API only accepts positive integers")}}o.Terminal=k})(),a})()))})(Pv)),Pv.exports}var Nut=Eut();function a4(e,n,t=!1){const r=getComputedStyle(document.documentElement),s=new Nut.Terminal({convertEol:!0,disableStdin:n,fontSize:12,fontFamily:r.getPropertyValue("--mono").trim()||"ui-monospace, Menlo, Consolas, monospace",scrollback:2e4,theme:{background:r.getPropertyValue("--term-bg").trim(),foreground:r.getPropertyValue("--term-foreground").trim(),cursor:n?r.getPropertyValue("--term-bg").trim():r.getPropertyValue("--term-foreground").trim(),selectionBackground:r.getPropertyValue("--term-selection").trim()}}),a=new Sut.FitAddon;s.loadAddon(a),t&&s.loadAddon(new Cut.WebLinksAddon((c,d)=>{let _;try{_=new URL(d)}catch{return}(_.protocol==="http:"||_.protocol==="https:")&&window.open(_,"_blank","noopener,noreferrer")})),s.open(e);const o=()=>{try{a.fit()}catch{}};o();const l=new ResizeObserver(o);return l.observe(e),{terminal:s,dispose(){l.disconnect(),s.dispose()}}}const VT="h-40 overflow-hidden rounded-md bg-terminal p-2";function bm(e){return typeof e=="object"&&e!==null}function WT(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function zut(e){return bm(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||WT(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function Aut(e){return bm(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&WT(e.partitions)&&(e.error===null||typeof e.error=="string")}function Tut(e){return!bm(e)||e.type!=="complete"?null:e.backend==="ssh"&&zut(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&Aut(e.result)?{backend:"slurm",result:e.result}:null}function jut(e){return bm(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function KT({host:e,backend:n,active:t=!0,onComplete:r,onError:s}){const a=M.useRef(null),o=M.useRef(null),l=M.useRef(r),c=M.useRef(s),[d,_]=M.useState(null);return l.current=r,c.current=s,M.useEffect(()=>{const f=a.current;if(!f)return;const{terminal:m,dispose:g}=a4(f,!1,!0);o.current=m,m.focus();const S=location.protocol==="https:"?"wss:":"ws:",k=new URL("/api/settings/ssh/connect",`${S}//${location.host}`);k.searchParams.set("host",e),k.searchParams.set("backend",n);const b=new WebSocket(k);b.binaryType="arraybuffer";let v=!1,x=!1,y=!1;const C=j=>{x||(x=!0,y||m.writeln(j),m.options.disableStdin=!0,m.blur(),_(j),c.current(j))},A=m.onData(j=>{b.readyState===WebSocket.OPEN&&b.send(new TextEncoder().encode(j))}),E=m.onResize(({cols:j,rows:T})=>{b.readyState===WebSocket.OPEN&&b.send(JSON.stringify({type:"resize",cols:j,rows:T}))});return b.onopen=()=>{b.send(JSON.stringify({type:"resize",cols:m.cols,rows:m.rows}))},b.onmessage=j=>{if(j.data instanceof ArrayBuffer){y=!0,m.write(new Uint8Array(j.data));return}if(typeof j.data!="string")return;let T;try{T=JSON.parse(j.data)}catch{return}const D=Tut(T);if(D){v=!0,l.current(D),b.close();return}const I=jut(T);I&&C(I)},b.onerror=()=>C(G7()),b.onclose=()=>{!v&&!x&&C(G7())},()=>{b.onopen=null,b.onmessage=null,b.onerror=null,b.onclose=null,A.dispose(),E.dispose(),b.close(),o.current=null,g()}},[n,e]),M.useEffect(()=>{const f=o.current;f&&(f.options.disableStdin=!t||d!==null,t&&d===null?f.focus():f.blur())},[t,d]),h.jsxs("div",{className:"mt-3",children:[h.jsx("div",{className:VT,role:"group","aria-label":FE({host:Te(e)}),children:h.jsx("div",{ref:a,className:"h-full overflow-hidden"})}),d?h.jsx("p",{role:"alert",className:"sr-only",children:d}):null]})}function Mut({host:e,transcript:n}){const t=M.useRef(null);return M.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:a}=a4(r,!0,!0);return s.write(n),a},[n]),h.jsx("div",{className:`mt-3 ${VT}`,role:"group","aria-label":FE({host:Te(e)}),children:h.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}const za=["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(" "),nd=["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(" "),Mc=["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(" "),o4="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",hs=["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(" "),Rh=["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(" "),mo=["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(" "),N2=["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(" "),F0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),xu=["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(" ");function Fv(e){return e.agentReady?{cls:"ok",variant:"success",label:OE()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:Pze()}:e.authState==="unknown"?{cls:"warn",variant:"warning",label:ELe()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:RLe()}:{cls:"warn",variant:"warning",label:Zje()}:{cls:"warn",variant:"warning",label:jje()}}function Rut({h:e}){return e.authMethod?h.jsx(h.Fragment,{children:e.authMethod==="oauth"?r9e():xE()}):h.jsx(h.Fragment,{children:"—"})}function Dut(){const[e,n]=M.useState(null),[t,r]=M.useState("claude-code"),[s,a]=M.useState(!1),o=(c,d=!1)=>{a(!0),ap(c,d).then(n).catch(()=>{}).finally(()=>a(!1))};M.useEffect(()=>o(!1),[]),M.useEffect(()=>$x(()=>o(!0)),[]);const l=e==null?void 0:e.find(c=>c.id===t);return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:hze()}),h.jsx("div",{className:"harness-tabs mt-3 flex gap-1 mb-3.5 border-b border-b-border-variant [&_button]:inline-flex [&_button]:items-center [&_button]:gap-[7px] [&_button]:py-[7px] [&_button]:px-3 [&_button]:text-sm [&_button]:font-medium [&_button]:text-text [&_button]:border-b-2 [&_button]:border-b-transparent [&_button]:-mb-px [&_button:hover]:text-text [&_button.active]:border-b-primary",children:(e??[]).map(c=>h.jsxs("button",{className:c.id===t?"active":"",onClick:()=>r(c.id),children:[c.name,h.jsx("span",{className:`w-[7px] h-[7px] rounded-full bg-muted [&.ok]:bg-accent-green [&.err]:bg-accent-red [&.warn]:bg-accent-amber ${Fv(c).cls}`})]},c.id))}),e?l?h.jsxs("div",{className:za,children:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx(Rt,{variant:Fv(l).variant,children:Fv(l).label}),h.jsx("div",{className:"spacer flex-1"}),h.jsxs(Qe,{size:"small",onClick:()=>o(!0,!0),disabled:s,children:[h.jsx(ud,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Bp()]})]}),h.jsxs("div",{className:nd,children:[h.jsx("span",{className:"k",children:K9e()}),h.jsx("span",{className:"v",children:l.binPath??PCe()}),h.jsx("span",{className:"k",children:HE()}),h.jsx("span",{className:"v",children:l.version??"—"}),h.jsx("span",{className:"k",children:A9e()}),h.jsx("span",{className:"v",children:h.jsx(Rut,{h:l})}),l.account&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:l.id==="opencode"?mOe():gx()}),h.jsx("span",{className:"v",children:l.account})]}),l.org&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:bMe()}),h.jsx("span",{className:"v",children:l.org})]}),l.plan&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:tRe()}),h.jsx("span",{className:"v",children:l.plan})]}),h.jsx("span",{className:"k",children:w9e()}),h.jsx("span",{className:"v",children:l.models.length>0?rCe({count:Ft(l.models.length),models:new Intl.ListFormat(N()).format(l.models.slice(0,4).map(c=>Te(rp(c))))}):mx()})]}),l.agentNote&&h.jsx("p",{className:hs,children:Mh(l.agentNote)})]}):null:h.jsxs(vr,{children:[h.jsx(dn,{})," ",DNe()]})]})}function Lut({s:e}){if(!e.configured)return h.jsx(Rt,{children:Ip()});const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?h.jsx(Rt,{variant:"success",children:bx()}):h.jsx(Rt,{variant:"error",children:ZTe()}):h.jsx(Rt,{variant:"error",children:LEe()}):h.jsx(Rt,{variant:"error",children:wAe()})}function Out(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(!1),[_,f]=M.useState(null),m=k=>{n(k),a(k.context??""),l(k.namespace)};M.useEffect(()=>{cXe().then(m).catch(k=>r(k instanceof Error?k.message:String(k)))},[]);const g=e!==null&&s===(e.context??"")&&o.trim()===e.namespace;async function S(k){if(k.preventDefault(),!c){d(!0),f(null);try{m(await uXe({context:s,namespace:o.trim()}))}catch(b){f(b instanceof Error?b.message:String(b))}finally{d(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:kEe()}),h.jsx("span",{className:"v",children:h.jsx(Lut,{s:e})})]}),e.preflight.error&&h.jsx("p",{className:o4,children:e.preflight.error}),h.jsxs("form",{className:Rh,onSubmit:S,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[YEe(),h.jsx(Zf,{choices:[{id:"",label:e.currentContext?g8e({context:Te(e.currentContext)}):h8e()},...s&&!e.contexts.includes(s)?[{id:s,label:GCe({context:Te(s)})}]:[],...e.contexts.map(k=>({id:k,label:k}))],value:s,variant:"field",dropDown:!0,disabled:c,onSelect:a})]}),h.jsxs("label",{children:[STe(),h.jsx("input",{type:"text",value:o,onChange:k=>l(k.target.value),placeholder:bNe(),autoComplete:"off",spellCheck:!1})]})]}),_&&h.jsx("div",{className:"error",children:_}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:c||g,children:c?Ta():Cc()})})]}),h.jsxs("section",{className:"mt-7",children:[h.jsx("h3",{className:"mt-0 mx-0 mb-1.5 text-base font-semibold text-text",children:WRe()}),h.jsx("p",{className:"m-0 font-sans text-sm leading-relaxed text-text",children:R8e({placeholder:Te("{{ORX_RUN}}"),command:Te("--manifest ")})})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",hEe()]})})}const Iut={env:P8e,syncedEnv:J8e,modalToml:G8e};function But({s:e}){return e.ready?h.jsx(Rt,{variant:"success",children:bx()}):!e.tokenConfigured&&!e.modalImportable?h.jsx(Rt,{children:Wje()}):e.modalImportable?e.tokenConfigured?h.jsx(Rt,{children:BE()}):h.jsx(Rt,{variant:"error",children:gje()}):h.jsx(Rt,{variant:"error",children:e.envProvisioned?rke():oke()})}function $ut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1),[o,l]=M.useState(null);M.useEffect(()=>{dXe().then(n).catch(d=>r(d instanceof Error?d.message:String(d)))},[]);async function c(){if(!s){a(!0),l(null);try{n(await fXe())}catch(d){l(d instanceof Error?d.message:String(d))}finally{a(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:$p()}),h.jsx("span",{className:"v",children:h.jsx(But,{s:e})}),h.jsx("span",{className:"k",children:xx()}),h.jsx("span",{className:"v",children:e.modalImportable?wx():e.envProvisioned?I8e():DCe()}),h.jsx("span",{className:"k",children:IE()}),h.jsx("span",{className:"v",children:e.tokenSource?Iut[e.tokenSource]():Ip()})]}),!e.tokenConfigured&&h.jsx("p",{className:hs,children:Y8e({command:Te("modal token new"),id:Te("MODAL_TOKEN_ID"),secret:Te("MODAL_TOKEN_SECRET")})}),e.error&&e.envProvisioned&&!e.modalImportable&&h.jsx("p",{className:hs,children:e.error}),o&&h.jsx("div",{className:"error",children:o}),!e.modalImportable&&h.jsx("div",{className:"mt-6 flex justify-end",children:h.jsx(Qe,{variant:"primary",onClick:()=>void c(),disabled:s,children:s?yIe():gIe()})})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",gEe()]})})}const YT="rounded-sm border-border-strong bg-surface text-subtext",XT="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",Hut=5e3;function ZT(e){const[n,t]=M.useState({}),r=e.join("\0");return M.useEffect(()=>{const a=r?r.split("\0"):[];if(a.length===0){t({});return}let o=!1;const l=async()=>{const d=await Promise.all(a.map(async _=>{try{return[_,(await bXe(_)).running]}catch{return null}}));o||t(_=>{const f={};for(const m of d)m&&(f[m[0]]=m[1]);for(const m of a)f[m]===void 0&&_[m]!==void 0&&(f[m]=_[m]);return f})};l();const c=window.setInterval(l,Hut);return()=>{o=!0,window.clearInterval(c)}},[r]),[n,a=>t(o=>({...o,[a]:!0}))]}function Put({test:e,connecting:n,masterRunning:t}){if(n)return h.jsx("span",{role:"status",children:h.jsx(Rt,{className:XT,children:NE()})});if(e===void 0)return h.jsx(Rt,{className:YT,children:DE()});const r=e.missingTools??[],s=e.reachable&&e.toolsFound&&t===!1,a=e.reachable?e.toolsFound?s?h.jsx(Rt,{className:"rounded-sm",variant:"warning",children:AE()}):h.jsx(Rt,{className:"rounded-sm",variant:"success",children:wx()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:r.length===1?oCe({tool:Te(r[0])}):dCe()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:yx()});return h.jsxs("div",{className:"flex items-center gap-4",role:"status",children:[a,!s&&h.jsx("span",{className:"ssh-tested-at whitespace-nowrap text-xs text-subtext",children:Ea(e.testedAt)})]})}function Fut(){const[e,n]=M.useState(null),[t,r]=M.useState({}),[s,a]=M.useState({}),[o,l]=M.useState(null),[c,d]=M.useState(!1),[_,f]=M.useState(0),m=(e==null?void 0:e.filter(x=>{const y=t[x.host]??x.lastTest;return(y==null?void 0:y.reachable)&&y.toolsFound}).map(x=>x.host))??[],[g,S]=ZT(m);M.useEffect(()=>{vXe().then(n).catch(()=>n([]))},[]);function k(x){d(!1),f(y=>y+1),l(x),a(y=>({...y,[x]:!0}))}function b(){d(!1),l(null)}function v(x,y){a(C=>({...C,[x]:!y}))}return h.jsx(h.Fragment,{children:e===null?h.jsxs(vr,{children:[h.jsx(dn,{})," ",gRe()]}):e.length===0?h.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:WTe()}):h.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:e.map(x=>{const y=t[x.host]??x.lastTest,C=o===x.host,A=s[x.host]??!1,E=C||(y==null?void 0:y.reachable)===!1,j=`${x.user?`${x.user}@`:""}${x.hostname??x.host}${x.port?`:${x.port}`:""}`;return h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-3 py-3 px-2",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2.5",children:[E?h.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":A,"aria-label":A?RO({name:Te(x.host)}):tI({name:Te(x.host)}),onClick:T=>{T.stopPropagation(),v(x.host,A)},children:h.jsx(ta,{size:15,className:`text-muted transition-transform duration-120 ease-standard${A?" rotate-180":""}`})}):h.jsx("span",{className:"w-5 flex-none","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"truncate text-base font-medium text-text",title:x.host,children:x.host}),h.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:j,children:j})]})]}),h.jsxs("div",{className:"grid flex-none grid-cols-[8.5rem_5rem] items-center gap-x-12",children:[h.jsx("div",{className:"text-start",children:h.jsx(Put,{test:y,connecting:C&&!c,masterRunning:g[x.host]})}),h.jsx(Qe,{size:"small",type:"button",className:"justify-self-end",onClick:T=>{T.stopPropagation(),C&&!c?b():k(x.host)},disabled:!C&&o!==null&&!c,children:C?c?Wu():vx():(y==null?void 0:y.reachable)===!1?Wu():y?PE():px()})]})]}),E&&(A||C)&&h.jsxs("div",{className:`border-t border-t-border-variant py-3 pe-2 ps-10${A?"":" hidden"}`,children:[!C&&(y==null?void 0:y.error)&&h.jsx(Mut,{host:x.host,transcript:y.error}),C&&h.jsx(KT,{host:x.host,backend:"ssh",active:A,onComplete:T=>{T.backend==="ssh"&&(r(D=>({...D,[x.host]:T.result})),S(x.host),d(!1),l(null))},onError:T=>{d(!0),r(D=>({...D,[x.host]:{reachable:!1,toolsFound:!1,missingTools:[],error:T,testedAt:Date.now()}}))}},_)]})]},x.host)})})})}function Uut({test:e,connecting:n,masterRunning:t}){return n?h.jsx(Rt,{className:XT,children:NE()}):e===null?h.jsx(Rt,{className:YT,children:DE()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?h.jsx(Rt,{className:"rounded-sm",variant:"warning",children:AE()}):h.jsx(Rt,{className:"rounded-sm",variant:"success",children:wx()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:oTe()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:hje()}):h.jsx(Rt,{className:"rounded-sm",variant:"error",children:yx()})}function qut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(""),[c,d]=M.useState(""),[_,f]=M.useState(""),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,A]=M.useState(!1),[E,j]=M.useState(0),T=s&&(b!=null&&b.reachable)&&b.slurmFound&&b.toolsFound?[s]:[],[D,I]=ZT(T);function P(){A(!1),j(X=>X+1),y(!0)}const B=X=>{n(X),a(X.host??""),l(X.partition??""),d(X.account??""),f(X.timeLimit??"")};M.useEffect(()=>{xXe().then(B).catch(X=>r(X instanceof Error?X.message:String(X)))},[]);const F=e!==null&&s===(e.host??"")&&o.trim()===(e.partition??"")&&c.trim()===(e.account??"")&&_.trim()===(e.timeLimit??"");async function V(X){if(X.preventDefault(),!m){g(!0),k(null);try{B(await yXe({host:s,partition:o.trim(),account:c.trim(),timeLimit:_.trim()}))}catch(W){k(W instanceof Error?W.message:String(W))}finally{g(!1)}}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[!x&&(b==null?void 0:b.error)&&h.jsx("p",{className:o4,children:b.error}),b&&b.partitions.length>0&&h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:WMe()}),h.jsx("span",{className:"v",children:b.partitions.join(", ")})]}),h.jsxs("form",{className:Rh,onSubmit:V,children:[h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[JAe(),h.jsx(Zf,{choices:[{id:"",label:Uje()},...s&&!e.hosts.some(X=>X.host===s)?[{id:s,label:`${s} (not in ~/.ssh/config)`}]:[],...e.hosts.map(X=>({id:X.host,label:X.host}))],value:s,variant:"field",dropDown:!0,disabled:m||x,onSelect:X=>{a(X),v(null),y(!1),A(!1)}})]}),h.jsxs("label",{children:[UMe(),h.jsx("input",{type:"text",list:"slurm-partitions",value:o,onChange:X=>l(X.target.value),placeholder:$7(),autoComplete:"off",spellCheck:!1}),h.jsx("datalist",{id:"slurm-partitions",children:b==null?void 0:b.partitions.map(X=>h.jsx("option",{value:X},X))})]})]}),h.jsxs("div",{className:"row2",children:[h.jsxs("label",{children:[gx(),h.jsx("input",{type:"text",value:c,onChange:X=>d(X.target.value),placeholder:$7(),autoComplete:"off",spellCheck:!1})]}),h.jsxs("label",{children:[bLe(),h.jsx("input",{type:"text",value:_,onChange:X=>f(X.target.value),placeholder:jEe(),autoComplete:"off",spellCheck:!1})]})]}),S&&h.jsx("div",{className:"error",children:S}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:m||F||x,children:m?Ta():Cc()}),h.jsx(Qe,{type:"button",onClick:()=>{x&&!C?(A(!1),y(!1)):P()},disabled:!s,title:s?void 0:fOe(),children:x?C?Wu():vx():b?PE():px()}),h.jsx("span",{role:"status",children:h.jsx(Uut,{test:b,connecting:x&&!C,masterRunning:D[s]})})]})]}),x&&h.jsx(KT,{host:s,backend:"slurm",onComplete:X=>{X.backend==="slurm"&&(v(X.result),I(s),A(!1),y(!1))},onError:X=>{A(!0),v({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:X})}},E)]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",IAe()]})})}function Gut(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState(null),m=_!==null&&_!=="testing"?_:null,g=v=>{n(v),a(v.address??"")};M.useEffect(()=>{wXe().then(g).catch(v=>r(v instanceof Error?v.message:String(v)))},[]);const S=e!==null&&s===(e.address??"");async function k(v){if(v.preventDefault(),!o){l(!0),d(null);try{g(await SXe({address:s}))}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(!1)}}}async function b(){f("testing");try{f(await kXe(s.trim()||void 0))}catch(v){f({reachable:!1,address:s.trim()||"(unknown)",rayVersion:null,error:v instanceof Error?v.message:String(v)})}}return h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:FNe()}),h.jsx("span",{className:"v",children:e.resolvedAddress}),h.jsx("span",{className:"k",children:Sx()}),h.jsx("span",{className:"v",children:e.source}),(m==null?void 0:m.reachable)&&m.rayVersion&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:cRe()}),h.jsx("span",{className:"v",children:m.rayVersion})]})]}),(m==null?void 0:m.error)&&h.jsx("p",{className:o4,children:m.error}),h.jsxs("form",{className:Rh,onSubmit:k,children:[h.jsxs("label",{children:[uAe(),h.jsx("input",{type:"text",value:s,onChange:v=>{a(v.target.value),f(null)},placeholder:"http://127.0.0.1:8265",autoComplete:"off",spellCheck:!1})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{variant:"primary",type:"submit",disabled:o||S,children:o?Ta():Cc()}),h.jsx(Qe,{type:"button",onClick:()=>void b(),disabled:_==="testing",children:YDe()}),h.jsx(Vut,{test:_})]})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",RAe()]})})}function Vut({test:e}){return e===null?null:e==="testing"?h.jsx(Rt,{children:JDe()}):e.reachable?h.jsx(Rt,{variant:"success",children:hRe()}):h.jsx(Rt,{variant:"error",children:yx()})}function Wut(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{NXe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:Cze()}),h.jsx("span",{className:"v",children:e.hostname}),h.jsx("span",{className:"k",children:GDe()}),h.jsxs("span",{className:"v",children:[e.os,"/",e.arch,e.chip?` — ${e.chip}`:""]}),h.jsx("span",{className:"k",children:"CPU"}),h.jsx("span",{className:"v",children:e.cpuCount>0?`${e.cpuCount} cores`:"—"}),h.jsx("span",{className:"k",children:"RAM"}),h.jsx("span",{className:"v",children:e.memBytes!==null?wa(e.memBytes):"—"}),h.jsx("span",{className:"k",children:"GPUs"}),h.jsx("span",{className:"v",children:e.gpus.length===0?"none detected (nvidia-smi)":e.gpus.map(s=>`${s.name}${s.memMib!==null?` — ${wa(s.memMib*1024*1024)}`:""}`).join(", ")})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",TNe()]})})}function Kut(){const[e,n]=M.useState(null),[t,r]=M.useState(null);return M.useEffect(()=>{zXe().then(n).catch(s=>r(s instanceof Error?s.message:String(s)))},[]),h.jsx(h.Fragment,{children:t?h.jsx("div",{className:"error",children:t}):e?e.loggedIn?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:$p()}),h.jsx("span",{className:"v",children:h.jsx(Rt,{variant:"success",children:OE()})}),h.jsx("span",{className:"k",children:SMe()}),h.jsx("span",{className:"v",children:e.orgs.length>0?e.orgs.join(", "):"—"}),h.jsx("span",{className:"k",children:vDe()}),h.jsx("span",{className:"v",children:e.sshKeyStatus==="matched"?h.jsx(Rt,{variant:"success",children:tMe()}):e.sshKeyStatus==="no_local_match"?h.jsx(Rt,{variant:"warning",children:$je()}):e.sshKeyStatus==="none_registered"?h.jsx(Rt,{variant:"error",children:yje()}):h.jsx(Rt,{children:BE()})})]}),e.sshKeyStatus==="none_registered"&&(e.sshKeyPath?h.jsxs("p",{dir:"auto",className:hs,children:[_9e()," ",h.jsxs("code",{children:["orx ssh-key add ",e.sshKeyPath]}),"."]}):h.jsxs("p",{dir:"auto",className:hs,children:[cje()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),rLe()," ",h.jsx("code",{children:"orx ssh-key add"}),"."]})),e.sshKeyStatus==="no_local_match"&&(e.sshKeyPath?h.jsx("p",{dir:"auto",className:hs,children:SOe({register:Te(`orx ssh-key add ${e.sshKeyPath}`),load:Te("ssh-add")})}):h.jsxs("p",{dir:"auto",className:hs,children:[ije()," ",h.jsx("code",{children:"ssh-add"}),pMe()," ",h.jsx("code",{children:"ssh-keygen -t ed25519"}),"."]})),e.error&&h.jsx("p",{dir:"auto",className:hs,children:e.error})]}):h.jsx("p",{className:hs,children:C8e({command:Te("orx login")})}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",cEe()]})})}const xp={local:fE,tinker:Dae,hf:rae,modal:_ae,k8s:oae,ssh:Tae,slurm:Eae,ray:wae,openresearch:vae},Yut={local:Aie,ssh:Yie,tinker:Jie,hf:yie,modal:Rie,k8s:Cie,slurm:Gie,ray:Pie,openresearch:Iie},l4={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"},Xut={local:Vae,ssh:foe,tinker:moe,hf:Bae,modal:Xae,k8s:Fae,slurm:loe,ray:soe,openresearch:eoe};function Zut(e){switch(e.id){case"local":return Wse();case"ssh":return hie({summary:Te(e.summary)});case"tinker":return gie({summary:Te(e.summary)});case"hf":return $se({summary:Te(e.summary)});case"modal":return Zse({summary:Te(e.summary)});case"k8s":return Use({summary:Te(e.summary)});case"slurm":return cie({summary:Te(e.summary)});case"ray":return iie({summary:Te(e.summary)});case"openresearch":return tie({summary:Te(e.summary)})}}function Qut({target:e}){return h.jsxs("dl",{className:"m-0 mt-8 grid grid-cols-[9rem_minmax(0,1fr)] gap-x-5 gap-y-4 font-sans",children:[h.jsx("dt",{className:"text-sm font-medium text-subtext",children:Aze()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Zut(e)}),h.jsx("dt",{className:"text-sm font-medium text-subtext",children:eOe()}),h.jsx("dd",{className:"m-0 text-base leading-relaxed text-text",children:Xut[e.id]()})]})}const S8=["hf","modal","slurm","ray","openresearch"],Uv=["hf","modal","openresearch"],QT={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"]},k8="__custom__";function _f(e,n){return!!(n&&!(QT[e]??[]).includes(n))}function Jut({settings:e,projectId:n,onSaved:t}){const r=e.configuredDefaultBackend??e.defaultBackend??"local",s=e.defaultFlavor??"",[a,o]=M.useState(r),[l,c]=M.useState(s),[d,_]=M.useState(_f(r,s)),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=e.targets.find(I=>I.id===a),b=e.targets.filter(I=>I.configured||I.id===r),v=S8.includes(a),x=Uv.includes(a),y=QT[a]??[],C=a===r&&(!v||l.trim()===s),A=xp[a](),E=f?fBe():x&&!l.trim()?_Se({destination:A}):a==="ssh"?bCe():pCe({destination:A});M.useEffect(()=>{o(r),c(s),_(_f(r,s))},[r,s]);async function j(I,P){const B=S8.includes(I);if(!(f||Uv.includes(I)&&!P.trim())){m(!0),S(null);try{t(await EXe({backend:I,flavor:B&&P.trim()||null,projectId:n}))}catch(F){S(F instanceof Error?F.message:String(F)),o(r),c(s),_(_f(r,s))}finally{m(!1)}}}function T(I){const P=e.targets.find(F=>F.id===I);if(!P)return;o(P.id);const B=P.id===r?s:"";c(B),_(_f(P.id,B)),Uv.includes(P.id)||j(P.id,B)}function D(I){if(I===k8){_(!0);return}_(!1),c(I),(!x||I)&&j(a,I)}return h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:ENe()}),h.jsxs("div",{children:[h.jsxs("form",{className:"grid grid-cols-[minmax(12rem,18rem)_minmax(12rem,18rem)] items-start gap-3",onSubmit:I=>{I.preventDefault(),C||j(a,l)},children:[h.jsx(Zf,{choices:b.map(I=>({id:I.id,label:xp[I.id]()})),value:a,variant:"field",dropDown:!0,disabled:f,renderIcon:I=>{const P=e.targets.find(B=>B.id===I.id);return P?h.jsx(vm,{kind:l4[P.id],size:16}):null},onSelect:T}),v&&h.jsx("div",{children:d?h.jsxs("div",{className:"relative",children:[h.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:l,onChange:I=>c(I.target.value),onBlur:()=>{if(x&&!l.trim()){a===r&&(c(s),_(_f(r,s)));return}C||j(a,l)},placeholder:oNe(),autoFocus:!0,autoComplete:"off",spellCheck:!1,disabled:f}),h.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":B7(),title:B7(),onMouseDown:I=>I.preventDefault(),onClick:()=>_(!1),children:h.jsx(ta,{size:12})})]}):h.jsx(Zf,{choices:[{id:"",label:x?uSe():NCe()},...l&&!y.includes(l)?[{id:l,label:WSe({value:Te(l)})}]:[],...y.map(I=>({id:I,label:I})),{id:k8,label:dNe()}],value:l,variant:"field",dropDown:!0,disabled:f,onSelect:D})})]}),g&&h.jsx("div",{className:"error mt-2.5",children:g}),k&&!k.configured&&h.jsx("p",{className:hs,children:dLe()})]}),h.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:E})]})}function edt({target:e,isDefault:n,onOpen:t}){const r=e.unverified?nSe():e.id==="openresearch"?CIe():e.id==="ray"?px():hIe();return h.jsxs("button",{type:"button",className:"group flex min-h-41 w-full flex-col items-start rounded-lg border border-border bg-background p-5 text-start font-sans transition-colors duration-120 ease-standard hover:border-text hover:bg-surface disabled:cursor-default disabled:opacity-52",onClick:t,disabled:!e.enabled,children:[h.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:h.jsx(vm,{kind:l4[e.id],size:48})}),h.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:xp[e.id]()}),h.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:Yut[e.id]()}),h.jsxs("span",{className:"mt-auto flex w-full items-center justify-between gap-3 pt-3 text-sm",children:[h.jsx("span",{className:n?"font-medium text-primary":"text-subtext",children:n?RE():e.configured?kBe():r}),h.jsx("span",{className:"text-subtext transition-transform duration-120 ease-standard group-hover:translate-x-0.5","aria-hidden":"true",children:h.jsx(L0,{size:16})})]})]})}function tdt({target:e,isDefault:n,onBack:t}){return h.jsxs(h.Fragment,{children:[h.jsxs("button",{type:"button",className:"settings-back mb-10 inline-flex items-center gap-2 text-sm font-medium text-subtext hover:text-text",onClick:t,children:[h.jsx($f,{size:16})," ",jE()]}),h.jsxs("div",{className:"flex items-center justify-between gap-6",children:[h.jsxs("div",{className:`flex min-w-0 items-center ${e.id==="tinker"?"gap-8":"gap-5"}`,children:[h.jsx("span",{className:"flex h-20 w-24 flex-none items-center justify-start",children:h.jsx(vm,{kind:l4[e.id],size:72})}),h.jsx("h1",{className:"m-0 min-w-0",children:xp[e.id]()})]}),n&&h.jsx(Rt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:RE()})]}),h.jsx(Qut,{target:e}),e.id!=="tinker"&&h.jsxs("div",{className:"mt-8 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==="local"&&h.jsx(Wut,{}),e.id==="hf"&&h.jsx(adt,{}),e.id==="modal"&&h.jsx($ut,{}),e.id==="k8s"&&h.jsx(Out,{}),e.id==="ssh"&&h.jsx(Fut,{}),e.id==="slurm"&&h.jsx(qut,{}),e.id==="ray"&&h.jsx(Gut,{}),e.id==="openresearch"&&h.jsx(Kut,{})]})]})}function ndt({project:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useRef(0);M.useEffect(()=>{_.current++,r(null),l(null),a(null),d(null)},[e==null?void 0:e.id]),M.useEffect(()=>{const y=++_.current;CXe(e==null?void 0:e.id).then(C=>{y===_.current&&(r(C),a(null))}).catch(C=>{if(y!==_.current)return;const A=C instanceof Error?C.message:String(C);r(E=>(E===null?a(A):d(A),E))})},[o,e==null?void 0:e.id]);const f=y=>{_.current++,r(y),d(null)},m=t?t.targets:null,g=(t==null?void 0:t.configuredDefaultBackend)??(t==null?void 0:t.defaultBackend),S=m?[...m].sort((y,C)=>+(C.id===g)-+(y.id===g)):null,k=(S==null?void 0:S.filter(y=>y.configured))??[],b=(S==null?void 0:S.filter(y=>!y.configured))??[],v=y=>h.jsx(edt,{target:y,isDefault:g===y.id,onOpen:()=>l(y.id)},`${(e==null?void 0:e.id)??"none"}:${y.id}`),x=o?t==null?void 0:t.targets.find(y=>y.id===o):null;return x?h.jsx(tdt,{target:x,isDefault:g===x.id,onBack:()=>l(null)}):h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:ME()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:FEe()}),h.jsx(Sdt,{projectId:e==null?void 0:e.id,onViewHistory:n}),s?h.jsx("div",{className:"error",children:s}):t?h.jsxs(h.Fragment,{children:[c&&h.jsx("div",{className:"error",children:c}),h.jsx(Jut,{settings:t,projectId:e==null?void 0:e.id,onSaved:f}),h.jsxs("section",{className:"mb-8",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:zRe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:k.map(v)})]}),b.length>0&&h.jsxs("section",{className:"mb-3.5",children:[h.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:dTe()}),h.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:b.map(v)})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",iEe()]})]})}const rdt={env:Lke,openresearchEnv:$ke,hfCache:jke};function sdt({settings:e}){return e.configured?e.valid?h.jsx(Rt,{variant:"success",children:bx()}):h.jsx(Rt,{variant:"error",children:nAe()}):h.jsx(Rt,{children:Ip()})}function idt({settings:e}){return!e.configured||!e.valid?null:e.jobsWrite===!0?h.jsx(Rt,{variant:"success",children:vAe()}):e.jobsWrite===!1?h.jsx(Rt,{variant:"error",children:tje()}):h.jsx(Rt,{children:_Ae()})}function adt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),_=M.useRef(!1);M.useEffect(()=>{rXe().then(m=>{_.current||n(m)}).catch(m=>{_.current||r(m instanceof Error?m.message:String(m))})},[]);async function f(m){if(m.preventDefault(),!(!s.trim()||o)){l(!0),d(null);try{const g=await sXe(s.trim());_.current=!0,n(g),r(null),a("")}catch(g){d(g instanceof Error?g.message:String(g))}finally{l(!1)}}}return h.jsxs(h.Fragment,{children:[t?h.jsx("div",{className:"error",children:t}):e?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:Mc,children:[h.jsx("span",{className:"k",children:$p()}),h.jsx("span",{className:"v",children:h.jsx(sdt,{settings:e})}),h.jsx("span",{className:"k",children:gx()}),h.jsx("span",{className:"v",children:e.username??"—"}),h.jsx("span",{className:"k",children:IE()}),h.jsx("span",{className:"v",children:e.maskedToken??"—"}),h.jsx("span",{className:"k",children:Sx()}),h.jsx("span",{className:"v",children:e.source?rdt[e.source]():Ip()}),h.jsx("span",{className:"k",children:aAe()}),h.jsxs("span",{className:"v",children:[h.jsx(idt,{settings:e}),(!e.configured||!e.valid)&&"—"]})]}),e.source==="env"&&h.jsx("p",{className:hs,children:yze()}),e.valid&&e.jobsWrite===null&&h.jsx("p",{className:hs,children:Uke({login:Te("hf auth login"),url:Te("huggingface.co/settings/tokens")})})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",PAe()]}),h.jsxs("form",{className:Rh,onSubmit:f,children:[h.jsxs("label",{children:[e!=null&&e.configured?WOe():SCe(),h.jsx("input",{type:"password",value:s,onChange:m=>a(m.target.value),placeholder:gze(),autoComplete:"off"})]}),c&&h.jsx("div",{className:"error",children:c}),h.jsx("div",{className:"actions",children:h.jsx(Qe,{variant:"primary",type:"submit",disabled:!s.trim()||o,children:o?xBe():Cc()})})]})]})}const JT=/^hf_[A-Za-z0-9]{10,}$/;function ej(){return h.jsx("tr",{children:h.jsx("td",{colSpan:3,children:h.jsxs("p",{dir:"auto",className:hs,children:[pLe()," ",h.jsx("code",{children:"HF_TOKEN"}),iDe()]})})})}const C8=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function z2(e,n){const t=n instanceof Error?n.message:String(n);nz(t.includes(e)?t:`${e}: ${t}`,"error")}function odt({name:e,entry:n,onVars:t}){const[r,s]=M.useState(""),[a,o]=M.useState(!1);async function l(){if(!(!r.trim()||a)){o(!0);try{t(await gN(e,r.trim())),s("")}catch(d){z2(e,d)}finally{o(!1)}}}async function c(){if(!a){o(!0);try{t(await _Xe(e))}catch(d){z2(e,d)}finally{o(!1)}}}return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{className:"font-mono text-sm",children:e}),h.jsx("td",{className:"text-base text-subtext",children:n?h.jsxs(h.Fragment,{children:[n.maskedValue,n.inProcessEnv&&h.jsx(Rt,{children:$Me()})]}):h.jsx(Pb,{variant:"inline",className:"text-base",type:"password",value:r,onChange:d=>s(d.target.value),onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),l()),d.key==="Escape"&&!a&&s("")},placeholder:$E(),"aria-label":RB({name:Te(e)}),autoComplete:"new-password",disabled:a})}),h.jsx("td",{children:n?h.jsx(Jt,{className:"[&:hover:not(:disabled)]:text-accent-red",title:Sb({name:Te(e)}),"aria-label":Sb({name:Te(e)}),onClick:()=>void c(),disabled:a,children:h.jsx(dd,{size:13})}):r.trim()&&h.jsx(Qe,{size:"small",onClick:()=>void l(),disabled:a,children:a?Ta():Cc()})})]}),!n&&e!=="HF_TOKEN"&&JT.test(r.trim())&&h.jsx(ej,{})]})}function ldt({onVars:e,onDone:n}){const[t,r]=M.useState(""),[s,a]=M.useState(""),[o,l]=M.useState(!1);async function c(){if(!(!t.trim()||!s.trim()||o)){l(!0);try{e(await gN(t.trim(),s.trim())),n()}catch(_){z2(t.trim(),_)}finally{l(!1)}}}const d=_=>{_.key==="Enter"&&(_.preventDefault(),c()),_.key==="Escape"&&!o&&n()};return h.jsxs(h.Fragment,{children:[h.jsxs("tr",{children:[h.jsx("td",{children:h.jsx(Pb,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:t,onChange:_=>r(_.target.value),onKeyDown:d,placeholder:"MY_API_KEY","aria-label":LTe(),autoComplete:"off",spellCheck:!1,disabled:o})}),h.jsx("td",{children:h.jsx(Pb,{variant:"inline",className:"text-base",type:"password",value:s,onChange:_=>a(_.target.value),onKeyDown:d,placeholder:$E(),"aria-label":$Te(),autoComplete:"new-password",disabled:o})}),h.jsxs("td",{children:[h.jsx(Qe,{size:"small",onClick:()=>void c(),disabled:o||!t.trim()||!s.trim(),children:o?Ta():Cc()}),h.jsx(Jt,{title:vx(),"aria-label":tEe(),onClick:n,disabled:o,children:h.jsx(_s,{size:13})})]})]}),t.trim()!=="HF_TOKEN"&&JT.test(s.trim())&&h.jsx(ej,{})]})}function cdt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(!1);M.useEffect(()=>{hXe().then(n).catch(c=>r(c instanceof Error?c.message:String(c)))},[]);const o=e===null?[]:e.map(c=>c.key).filter(c=>!C8.includes(c)),l=[...C8,...o];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"mb-4.5 flex items-center justify-between gap-4",children:[h.jsx("p",{className:"m-0 text-base leading-relaxed text-text",children:WLe()}),h.jsxs(Qe,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:s||e===null,children:[h.jsx(Tx,{size:12})," ",v9e()]})]}),h.jsx("div",{className:za,children:t?h.jsx("div",{className:"error",children:t}):e===null?h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]}):h.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:h.jsxs("tbody",{children:[l.map(c=>h.jsx(odt,{name:c,entry:e.find(d=>d.key===c),onVars:n},c)),s&&h.jsx(ldt,{onVars:n,onDone:()=>a(!1)})]})})})]})}const pf=[{value:"system",label:XIe,icon:PKe},{value:"light",label:VIe,icon:fYe},{value:"dark",label:$Ie,icon:UKe}],udt=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"}];function ddt(){const e=Ec(),[n,t]=tz(),r=s=>{var _;const a=s.key==="ArrowRight"||s.key==="ArrowDown"?1:s.key==="ArrowLeft"||s.key==="ArrowUp"?-1:0;if(!a)return;s.preventDefault();const o=[...s.currentTarget.querySelectorAll('[role="radio"]')],l=o.findIndex(f=>f===document.activeElement),d=((l===-1?pf.findIndex(f=>f.value===n):l)+a+pf.length)%pf.length;t(pf[d].value),(_=o[d])==null||_.focus()};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:O7e()}),h.jsxs("div",{className:`${za} mt-3`,children:[h.jsxs("div",{className:`${mo} pb-3.5`,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:V7()}),h.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":V7(),onKeyDown:r,children:pf.map(({value:s,label:a,icon:o})=>h.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:[h.jsx(o,{size:14}),a()]},s))})]}),h.jsxs("div",{className:mo,children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:y8e()}),h.jsx("div",{className:"w-52 flex-none",children:h.jsx(Zf,{choices:udt,value:e,variant:"field",dropDown:!0,onSelect:s=>{sO(s)&&fWe(s)}})})]})]})]})}const fdt={installer:hVe,"app-bundle":tVe,cargo:iVe,homebrew:cVe,nix:gVe,unknown:yVe},qv={cargo:CVe,homebrew:AVe,nix:RVe};function hdt(){var c;const{status:e,error:n,apply:t}=PT(),[r,s]=M.useState(null),[a,o]=M.useState(null);if(!e)return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:q7()}),n?h.jsx("div",{className:za,children:h.jsx("div",{className:"error",children:n})}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]})]});const l=async(d,_)=>{s(d),o(null);try{await _()}catch(f){o(f instanceof Error?f.message:String(f))}finally{s(null)}};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:q7()}),h.jsxs("div",{className:`${za} mt-3`,children:[h.jsxs("div",{className:`${nd} pb-3.5`,children:[h.jsx("div",{className:"k",children:HE()}),h.jsx("div",{className:"v",children:e.current}),h.jsx("div",{className:"k",children:EAe()}),h.jsx("div",{className:"v",children:e.latest??"—"}),h.jsx("div",{className:"k",children:Ize()}),h.jsx("div",{className:"v",children:fdt[e.channel]()})]}),e.restartRequired&&h.jsx("div",{className:mo,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:URe()}),h.jsx("p",{children:tIe({installed:Te(e.installedVersion??"—"),current:Te(e.current??e.installedVersion??"—")})})]})}),e.selfUpdates?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:P7()}),h.jsxs("p",{children:[jTe(),e.envDisabled&&lBe()]})]}),h.jsx(qx,{type:"button",checked:e.autoUpdate,"aria-label":P7(),disabled:r!==null,onClick:()=>void l("auto",()=>oXe(!e.autoUpdate).then(t))})]}),h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:e.updateAvailable?sBe({version:Te(e.latest??"—")}):K7e()}),h.jsx("p",{children:e.updateAvailable?c8e():aSe()})]}),h.jsx(Qe,{size:"small",type:"button",disabled:r!==null,onClick:()=>void l("apply",()=>aXe().then(t)),children:r==="apply"?Bf():e.updateAvailable?eBe():Q7e()})]})]}):h.jsx("div",{className:mo,children:h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:NMe()}),h.jsx("p",{children:((c=qv[e.channel])==null?void 0:c.call(qv))??NOe()})]})}),e.channel==="app-bundle"&&h.jsx(pdt,{busy:r,run:l}),a&&h.jsx("div",{className:"error",children:a})]})]})}function _dt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);M.useEffect(()=>{HXe().then(n).catch(l=>a(l instanceof Error?l.message:String(l)))},[]);const o=()=>{!e||t||(r(!0),a(null),PXe(!e.preferenceEnabled).then(n).catch(l=>a(l instanceof Error?l.message:String(l))).finally(()=>r(!1)))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:HLe()}),e?h.jsxs("div",{className:`${za} mt-3`,children:[h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[I7(),e.locked&&e.reason&&h.jsx(DJe,{content:`${rNe()} ${e.reason}.`,className:"text-subtext",children:h.jsx(EKe,{size:15})})]}),h.jsx("p",{children:UTe()})]}),h.jsx(qx,{type:"button",checked:e.enabled,"aria-label":I7(),disabled:t||e.locked,onClick:o})]}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]})]})}function pdt({busy:e,run:n}){const[t,r]=M.useState(null),[s,a]=M.useState(!1),o=l=>void n("cli",()=>lXe(l).then(c=>{r(c),a(!1)}).catch(c=>{throw a(!l&&String((c==null?void 0:c.message)??c).includes("--force")),c}));return h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:t8e({command:Te("orx")})}),t?h.jsxs("p",{children:[t.alreadyCurrent?wSe({link:Te(t.link)}):ESe({link:Te(t.link)}),!t.onPath&&M7e({directory:Te(t.dir)})]}):h.jsx("p",{children:Zke({command:Te("orx")})})]}),h.jsx(Qe,{size:"small",type:"button",disabled:e!==null,onClick:()=>o(s),children:e==="cli"?Bf():s?UOe():t?jOe():Wke()})]})}function mdt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),o=()=>(a(null),Lx().then(n).catch(c=>a(c instanceof Error?c.message:String(c))));M.useEffect(()=>void o(),[]);const l=()=>{if(!e||t)return;const c=!e.githubForNewProjects;r(!0),a(null),xN(c,!0).then(n).catch(d=>a(d instanceof Error?d.message:String(d))).finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:tze()}),e?h.jsxs("div",{className:`${za} 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:[h.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[h.jsx("h3",{children:ize()}),h.jsx(Rt,{variant:e.githubAuthenticated?"success":e.ghInstalled?"warning":"error",children:e.githubAuthenticated?EE():TE()})]}),h.jsxs("div",{className:mo,children:[h.jsxs("div",{children:[h.jsx("div",{className:"project-default-title text-base font-medium",children:H7()}),h.jsx("p",{children:sOe()})]}),h.jsx(qx,{type:"button",checked:e.githubForNewProjects,"aria-label":H7(),disabled:t||!e.githubAuthenticated&&!e.githubForNewProjects,onClick:l})]}),!e.githubAuthenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(tj,{ghInstalled:e.ghInstalled,onCheck:o})}),s&&h.jsx("div",{className:"error",children:s})]}):s?h.jsx("div",{className:"error",children:s}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]})]})}function tj({ghInstalled:e,onCheck:n}){const[t,r]=M.useState(!1),s=()=>{r(!0),n().finally(()=>r(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper m-0 text-sm leading-relaxed text-text",children:Mh(e?iIe():i8e())}),h.jsxs("div",{className:"flex flex-wrap gap-2 mt-2.5",children:[!e&&h.jsxs(Hb,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[Gze()," ",h.jsx(vc,{size:12})]}),h.jsx(Qe,{type:"button",variant:e?"warning":"default",disabled:t,onClick:s,children:t?Op():q7e()})]})]})}function gdt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null);return M.useEffect(()=>{YYe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o)))},[]),h.jsxs("div",{className:N2,children:[h.jsx("h3",{children:jMe()}),h.jsxs("div",{className:nd,children:[h.jsx("span",{className:"k",children:cze()}),h.jsx("span",{className:"v",children:h.jsx(Rt,{variant:e?"success":"default",children:e===null?s?bE():Op():e?cIe():JCe()})})]}),h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:lOe()}),e?h.jsx("div",{className:F0,children:h.jsx(Qe,{disabled:t,onClick:()=>{r(!0),a(null),XYe().then(o=>n(o.hasToken)).catch(o=>a(o instanceof Error?o.message:String(o))).finally(()=>r(!1))},children:t?$Oe():LOe()})}):h.jsx(aut,{save:pN,onSaved:o=>n(o.hasToken),placeholder:LMe(),createHref:"https://www.overleaf.com/user/settings"}),s&&h.jsx("div",{className:"error",children:s})]})}function vdt({project:e,publicationError:n,onProjectUpdate:t}){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(null),[d,_]=M.useState(!1),[f,m]=M.useState(!1),[g,S]=M.useState(null),k=M.useRef(0),b=!!(r!=null&&r.github.owner&&r.github.repo),v=(A=!0)=>{const E=++k.current;return A&&s(null),c(null),e?OXe(e.id).then(j=>{E===k.current&&s(j)}).catch(j=>{E===k.current&&c(j instanceof Error?j.message:String(j))}):Promise.resolve()};M.useEffect(()=>void v(),[e==null?void 0:e.id]);const x=A=>{const E=A instanceof Error?A.message:String(A);return E.toLowerCase().includes("archived")?pke():E.includes("(fetch first)")||E.includes("non-fast-forward")?bke():E.includes("403")||E.toLowerCase().includes("permission denied")?Ske():E},y=()=>{e&&(o(!0),c(null),BXe(e.id).then(A=>{s(A.git),t(A.project),Lx().then(E=>{!E.githubForNewProjects&&!E.githubDefaultPromptSeen&&_(!0)}).catch(()=>{})}).catch(A=>c(x(A))).finally(()=>o(!1)))},C=A=>{m(!0),S(null),xN(A,!0).then(()=>_(!1)).catch(E=>S(E instanceof Error?E.message:String(E))).finally(()=>m(!1))};return h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:$Re()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:ZOe({project:(e==null?void 0:e.name)??USe()})}),e?l&&!r?h.jsx("div",{className:"error",children:l}):r?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:N2,children:[h.jsx("h3",{children:YAe()}),h.jsxs("div",{className:nd,children:[h.jsx("span",{className:"k",children:ZMe()}),h.jsx("span",{className:"v",children:r.path}),h.jsx("span",{className:"k",children:"Git"}),h.jsx("span",{className:"v",children:r.gitVersion??yE()}),h.jsx("span",{className:"k",children:EDe()}),h.jsx("span",{className:"v",children:r.initialized?dke({branch:Te(r.currentBranch??zE()),state:r.clean?vSe():Nke()}):YCe()}),h.jsx("span",{className:"k",children:q9e()}),h.jsx("span",{className:"v",children:r.baselineBranch}),h.jsx("span",{className:"k",children:LRe()}),h.jsx("span",{className:"v",children:r.remotes.length?r.remotes.map(A=>`${A.name}: ${A.url}`).join(" · "):mx()})]}),!r.initialized&&h.jsx("div",{className:F0,children:h.jsx(Qe,{variant:"primary",onClick:()=>void IXe(e.id).then(s).catch(A=>c(String(A))),children:Rze()})})]}),h.jsxs("div",{className:N2,children:[h.jsx("h3",{children:"GitHub"}),h.jsxs("div",{className:nd,children:[h.jsx("span",{className:"k",children:R9e()}),h.jsx("span",{className:"v",children:h.jsx(Rt,{variant:r.github.authenticated?"success":r.github.ghInstalled?"warning":"error",children:r.github.authenticated?EE():TE()})}),h.jsx("span",{className:"k",children:iRe()}),h.jsx("span",{className:"v",children:b?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:[r.github.owner,"/",r.github.repo]}),!r.github.enabled&&h.jsx(Rt,{children:PDe()})]}):h.jsx(Rt,{children:GAe()})}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"k",children:IDe()}),h.jsx("span",{className:"v",children:r.github.syncStatus})]})]}),!r.github.authenticated&&h.jsx("div",{className:"mt-3.5 pt-3.5 border-t border-t-border-variant",children:h.jsx(tj,{ghInstalled:r.github.ghInstalled,onCheck:()=>v(!1)})}),r.github.authenticated&&!r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:b?mBe():$Se()}),h.jsxs("div",{className:F0,children:[b&&r.github.url&&h.jsxs(Hb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[U7()," ",h.jsx(vc,{size:12})]}),h.jsx(Qe,{variant:"primary",disabled:a,onClick:y,children:a?L6e():j6e()})]})]}),r.github.enabled&&h.jsxs(h.Fragment,{children:[h.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:BNe()}),h.jsxs("div",{className:F0,children:[r.github.url&&h.jsxs(Hb,{href:r.github.url,target:"_blank",rel:"noreferrer",children:[U7()," ",h.jsx(vc,{size:12})]}),h.jsx(Qe,{disabled:a,onClick:()=>{o(!0),$Xe(e.id).then(A=>{s(A.git),t(A.project)}).catch(A=>c(A instanceof Error?A.message:String(A))).finally(()=>o(!1))},children:a?$6e():N6e()})]})]})]}),h.jsx(gdt,{}),n&&h.jsx("div",{className:"error",children:x(n)}),l&&h.jsx("div",{className:"error",children:x(l)})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]}):h.jsx("div",{className:za,children:h.jsx("p",{className:hs,children:iMe()})}),d&&h.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:()=>C(!1),children:h.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:A=>A.stopPropagation(),children:[h.jsx("h2",{id:"github-default-title",children:rTe()}),h.jsx("p",{children:oLe()}),g&&h.jsx("div",{className:"error",children:g}),h.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[h.jsx(Qe,{disabled:f,onClick:()=>C(!1),children:Lje()}),h.jsx(Qe,{variant:"primary",disabled:f,onClick:()=>C(!0),children:f?Ta():A8e()})]})]})})]})}const bdt={env:qPe,config:KPe,xdg:QPe,default:HPe},Gv={preparing:MPe,copying:lPe,verifying:nFe,finalizing:fPe},xdt=e=>{var n;return((n=Gv[e])==null?void 0:n.call(Gv))??e};function ydt(){const[e,n]=M.useState(null),[t,r]=M.useState(null),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(null),[_,f]=M.useState({kind:"idle"}),[m,g]=M.useState(null),S=()=>pXe().then(C=>{n(C),a(A=>A||C.current)}).catch(C=>r(C instanceof Error?C.message:String(C)));M.useEffect(()=>{S()},[]),M.useEffect(()=>kZe(C=>{C.type==="progress"?f(A=>{const E=A.kind==="moving"?A.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||E}}):C.type==="done"?(f({kind:"done",oldPathLeft:C.oldPathLeft}),d(null),a(""),S()):C.type==="error"&&f({kind:"error",message:C.error})}),[]);const k=(e==null?void 0:e.source)==="env",b=s.trim(),v=e!==null&&b===e.current;async function x(){if(!(o||!b)){l(!0),g(null),d(null);try{d(await mXe(b))}catch(C){g(C instanceof Error?C.message:String(C))}finally{l(!1)}}}async function y(C){if(C.preventDefault(),!(_.kind==="moving"||!b||v)&&(g(null),!!window.confirm(xPe({path:Te(b)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await gXe(b)}catch(A){f({kind:"idle"}),g(A instanceof Error?A.message:String(A))}}}return h.jsxs(h.Fragment,{children:[h.jsx("h2",{children:RDe()}),h.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:LIe()}),t?h.jsx("div",{className:za,children:h.jsx("div",{className:"error",children:t})}):e?h.jsxs("div",{className:za,children:[h.jsx("div",{className:"settings-card-head mb-3",children:h.jsx("h3",{children:pNe()})}),h.jsxs("div",{className:nd,children:[h.jsx("span",{className:"k",children:JEe()}),h.jsx("span",{className:"v",children:e.current}),h.jsx("span",{className:"k",children:Sx()}),h.jsx("span",{className:"v",children:bdt[e.source]()})]}),!k&&h.jsxs("form",{className:Rh,onSubmit:y,children:[h.jsxs("label",{children:[NTe(),h.jsx("input",{className:"text-sm",type:"text",value:s,onChange:C=>{a(C.target.value),d(null)},placeholder:"/absolute/path/to/openresearch",autoComplete:"off",spellCheck:!1,disabled:_.kind==="moving"})]}),c&&!c.error&&c.ok&&h.jsxs("p",{className:hs,children:[kRe()," ",wa(c.treeBytes??0),c.freeBytes!=null&&` — ${mPe({size:Te(wa(c.freeBytes))})}`,c.sameFilesystem?OPe():"","."]}),c&&c.ok===!1&&c.error&&h.jsx("div",{className:"error",children:c.error}),m&&h.jsx("div",{className:"error",children:m}),_.kind==="moving"&&h.jsx(FT,{value:_.copied,max:_.total,label:xdt(_.phase),caption:_.total>0?h.jsxs("span",{className:"text-sm",children:[wa(_.copied)," / ",wa(_.total)]}):void 0}),_.kind==="done"&&h.jsxs("p",{className:hs,children:[bTe(),_.oldPathLeft&&h.jsxs(h.Fragment,{children:[" ",o9e({path:Te(_.oldPathLeft)})]})]}),_.kind==="error"&&h.jsxs("div",{className:"error",children:[pTe()," ",_.message]}),h.jsxs("div",{className:"actions",children:[h.jsx(Qe,{type:"button",onClick:x,disabled:o||!b||v||_.kind==="moving",children:o?Op():H7e()}),h.jsx(Qe,{variant:"primary",type:"submit",disabled:!b||v||_.kind==="moving",children:_.kind==="moving"?zPe():kPe()})]})]})]}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]})]})}const A2=e=>e==="running"||e==="starting";function wdt(e){return A2(e.status)?op(Date.now()-e.createdAt):e.endedAt?op(e.endedAt-e.createdAt):"—"}function nj({instances:e,emptyLabel:n}){return e.length===0?h.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}):h.jsx("div",{className:"instances-table-wrap overflow-x-auto",children:h.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:[h.jsx("thead",{children:h.jsxs("tr",{children:[h.jsx("th",{children:H9e()}),h.jsx("th",{children:$p()}),h.jsx("th",{children:wDe()}),h.jsx("th",{children:tDe()})]})}),h.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 h.jsxs("tr",{children:[h.jsx("td",{children:h.jsxs("span",{className:"backend-cell inline-flex items-center gap-0.5",children:[h.jsx(i4,{backend:t.backend}),r&&h.jsx(Wp,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:F7(),"aria-label":F7(),onClick:a=>a.stopPropagation(),children:h.jsx(vc,{size:12})})]})}),h.jsx("td",{children:h.jsx(bo,{status:Li(t)})}),h.jsx("td",{children:Ea(t.createdAt)}),h.jsx("td",{children:wdt(t)})]},t.id)})})]})})}function Sdt({projectId:e,onViewHistory:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const g=setInterval(()=>c(S=>S+1),3e4);return()=>clearInterval(g)},[]);const d=()=>{if(!e){r([]);return}l(!0),Dx(e).then(g=>{r(g),a(null)}).catch(g=>{a(g instanceof Error?g.message:String(g)),r(S=>S??[])}).finally(()=>l(!1))};M.useEffect(()=>d(),[e]);const _=(g,S)=>S.createdAt-g.createdAt,f=t==null?void 0:t.filter(g=>A2(g.status)).sort(_),m=t==null?void 0:t.filter(g=>!A2(g.status)).sort(_);return h.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:[h.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:[h.jsx("div",{children:h.jsxs("h2",{children:[ZRe(),f&&f.length>0&&h.jsx("span",{className:"count-badge",children:f.length})]})}),h.jsxs("div",{className:"compute-activity-actions flex gap-2 flex-none [@media((max-width:_640px))]:justify-start",children:[h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(ud,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Bp()]}),h.jsx(Qe,{size:"small",onClick:n,children:m!=null&&m.length?N0e({count:Ft(m.length)}):S0e()})]})]}),s&&h.jsx("div",{className:"error",children:s}),!f||!m?h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]}):h.jsx(nj,{instances:f,emptyLabel:e?d0e():b0e()})]})}function kdt({projectId:e,onBack:n}){const[t,r]=M.useState(null),[s,a]=M.useState(null),[o,l]=M.useState(!1),[,c]=M.useState(0);M.useEffect(()=>{const _=setInterval(()=>c(f=>f+1),3e4);return()=>clearInterval(_)},[]);const d=()=>{if(!e){r([]);return}l(!0),Dx(e).then(_=>{r(_.sort((f,m)=>m.createdAt-f.createdAt)),a(null)}).catch(_=>{a(_ instanceof Error?_.message:String(_)),r(f=>f??[])}).finally(()=>l(!1))};return M.useEffect(d,[e]),h.jsxs(h.Fragment,{children:[h.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:[h.jsx($f,{size:14})," ",jE()]}),h.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[h.jsx("h1",{children:Qze()}),h.jsxs(Qe,{size:"small",onClick:d,disabled:o,children:[h.jsx(ud,{size:12,className:o?"animate-[spin_0.9s_linear_infinite]":""})," ",Bp()]})]}),s&&h.jsx("div",{className:"error",children:s}),t?h.jsx(nj,{instances:t,emptyLabel:e?o0e():p0e()}):h.jsxs(vr,{children:[h.jsx(dn,{})," ",Al()]})]})}const rj=["projects","harnesses","storage"],Cdt=[{id:"compute",label:ME,icon:h.jsx(tKe,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:xx,icon:h.jsx(Mx,{size:15}),activeTabs:["environment"]},{id:"settings",label:LE,icon:h.jsx(oYe,{size:15}),activeTabs:["settings",...rj]}];function Edt(e){return rj.includes(e)}function Ndt({tab:e,project:n,githubPublicationError:t,onProjectUpdate:r,onSelectTab:s}){const a=e==="settings"||Edt(e);return h.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:[a&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:LE()}),h.jsxs("div",{className:"settings-stack mt-4.5",children:[h.jsx("section",{className:xu,children:h.jsx(ddt,{})}),h.jsx("section",{className:xu,children:h.jsx(mdt,{})}),h.jsx("section",{className:xu,children:h.jsx(Dut,{})}),h.jsx("section",{className:xu,children:h.jsx(ydt,{})}),h.jsx("section",{className:xu,children:h.jsx(_dt,{})}),h.jsx("section",{className:xu,children:h.jsx(hdt,{})})]})]}),e==="compute"&&h.jsx(ndt,{project:n,onViewHistory:()=>s("instances")}),e==="instances"&&h.jsx(kdt,{projectId:n==null?void 0:n.id,onBack:()=>s("compute")}),e==="environment"&&h.jsxs(h.Fragment,{children:[h.jsx("h1",{children:xx()}),h.jsx(cdt,{})]}),e==="git"&&h.jsx(vdt,{project:n,publicationError:t,onProjectUpdate:r})]})}function zdt({skills:e,activeIndex:n,onPick:t,onHover:r}){return h.jsx("div",{className:"skill-menu absolute bottom-[calc(100%_+_8px)] start-0 min-w-85 max-w-full p-1.5 bg-background border border-border rounded-lg shadow-menu z-50 overflow-hidden",children:e.map((s,a)=>h.jsxs("button",{type:"button",className:`skill-item flex flex-col gap-0.5 w-full text-start py-[7px] px-2 rounded-sm [&.active]:bg-surface [&_.skill-name]:text-sm [&_.skill-desc]:text-sm [&_.skill-desc]:text-subtext ${a===n?"active":""}`,onMouseDown:o=>{o.preventDefault(),t(s)},onMouseEnter:()=>r(a),children:[h.jsxs("span",{className:"skill-name flex items-center gap-1.5",children:["/",s.name,s.source!=="command"&&h.jsx(Rt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:UE()})]}),h.jsx("span",{className:"skill-desc",children:s.description})]},s.name))})}const E8={name:"plan",get description(){return Twe()},source:"command"};function Vv(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(;r1&&/[ \t]$/.test(a)&&(a=a.replace(/[ \t]+$/,_=>_.includes(" ")||_.length>=r?_:s));let o=e.slice(n.end);if(!o)o=s;else if(!o.startsWith(` +`)){const _=(c=/^[ \t]+/.exec(o))==null?void 0:c[0];o=_?`${_.length>=r?_:s}${o.slice(_.length)}`:s+o}const l=((d=/^[ \t]+/.exec(o))==null?void 0:d[0].length)??0;return{text:`${a}/${t}${o}`,cursor:a.length+t.length+1+l}}function z8(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 Tdt(e,n){const t=e.filter(r=>r.name.toLowerCase()!==E8.name);return n?[E8,...t]:t}function jdt(e,n){if(!n)return null;const t=/(^|\s)\/plan(?=\s|$)/gi;return t.test(e)?{prompt:e.replace(t,"").trim()}:null}function Mdt(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const Rdt=["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"],Wv=new Map;function Ddt(e,n){const t=`${n}\0${e}`,r=Wv.get(t);if(r)return r;const s=UXe(e,n).catch(a=>{throw Wv.delete(t),a});return Wv.set(t,s),s}function sj(e,n,t,r,s,a=!1){let o=0;return Adt(e,n).map((l,c)=>{const d=o+l.text.length;o=d;const _=l.text.slice(1).toLowerCase();return l.command&&s?s(l.text,_,d,c):l.command?h.jsxs("span",{className:t,onMouseDown:void 0,children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),l.text.slice(1)]},c):a?h.jsx("span",{"aria-hidden":"true",children:l.text},c):h.jsx(M.Fragment,{children:l.text},c)})}function Ldt({label:e,name:n,end:t,skill:r,projectId:s,textareaRef:a}){const o=M.useRef(null),l=M.useRef(null),c=M.useRef(null),d=M.useId(),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState({}),x=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const E=o.current;if(!E)return;const j=E.getBoundingClientRect(),T=Math.min(420,window.innerWidth-32),D=Math.max(16,Math.min(j.left-4,window.innerWidth-T-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:D,width:T}:{left:D,top:j.bottom+12,width:T})},C=()=>{x(),y(),f(!0),!(m!==null||S)&&(k(!0),Ddt(n,s).then(g).catch(()=>g(null)).finally(()=>k(!1)))},A=()=>{x(),c.current=window.setTimeout(()=>f(!1),120)};return M.useEffect(()=>()=>x(),[]),M.useEffect(()=>{if(!_)return;const E=()=>y();return window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[_]),h.jsxs(M.Fragment,{children:[h.jsxs("span",{ref:o,role:"button",tabIndex:0,"aria-controls":d,"aria-expanded":_,"aria-label":ZI({name:n}),className:"composer-chip group/skill pointer-events-auto relative z-1 cursor-text rounded-md bg-background text-skill-blue",onMouseEnter:C,onMouseLeave:A,onFocus:C,onBlur:A,onKeyDown:E=>{var j,T;if(E.key==="Escape"){f(!1);return}if(E.key==="Enter"||E.key===" "){E.preventDefault(),C();return}_&&(E.key==="ArrowDown"||E.key==="PageDown")&&(E.preventDefault(),(j=l.current)==null||j.scrollBy({top:E.key==="PageDown"?240:48,behavior:"smooth"})),_&&(E.key==="ArrowUp"||E.key==="PageUp")&&(E.preventDefault(),(T=l.current)==null||T.scrollBy({top:E.key==="PageUp"?-240:-48,behavior:"smooth"}))},onMouseDown:E=>{var j,T;E.preventDefault(),(j=a.current)==null||j.focus(),(T=a.current)==null||T.setSelectionRange(t,t),x()},children:[h.jsx("span",{className:"pointer-events-none absolute -inset-[7px] z-0 rounded-md bg-skill-blue-subtle opacity-0 transition-opacity group-hover/skill:opacity-100"}),h.jsxs("span",{className:"relative z-1",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),e.slice(1)]})]}),_&&Kp.createPortal(h.jsxs("div",{id:d,ref:l,role:"dialog","aria-label":AB({name:n}),style:{...b,maxHeight:"min(28rem, calc(100vh - 2rem))"},className:"fixed z-100 overflow-y-auto rounded-lg border border-border bg-background shadow-floating",onMouseEnter:x,onMouseLeave:A,onFocus:x,onBlur:A,onMouseDown:E=>E.stopPropagation(),children:[h.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:[h.jsxs("span",{className:"text-sm font-medium text-muted",children:["/",n]}),h.jsx(Rt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:UE()})]}),h.jsx("div",{className:"p-4 text-sm text-text",children:S&&m===null?h.jsx("span",{className:"text-muted",children:jBe()}):h.jsx(Na,{text:m??r.description})})]}),document.body)]})}function Odt({text:e,isCommand:n}){return h.jsx(h.Fragment,{children:sj(e,n,"skill-chip mx-1 inline-flex items-center rounded-md px-2 py-1 font-medium text-skill-blue transition-colors hover:bg-skill-blue-subtle")})}function Idt({text:e,isCommand:n,skills:t,projectId:r,textareaRef:s}){const a=M.useRef(null);return M.useLayoutEffect(()=>{const o=s.current,l=a.current;if(!o||!l)return;const c=()=>{const _=getComputedStyle(o);for(const f of Rdt)l.style.setProperty(f,_.getPropertyValue(f));l.style.width=`${o.clientWidth+parseFloat(_.borderLeftWidth)+parseFloat(_.borderRightWidth)}px`};c();const d=new ResizeObserver(c);return d.observe(o),()=>d.disconnect()},[e,s]),M.useLayoutEffect(()=>{const o=s.current;if(!o)return;const l=()=>{a.current&&(a.current.scrollTop=o.scrollTop)};return l(),o.addEventListener("scroll",l),()=>o.removeEventListener("scroll",l)},[s,e]),h.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:[sj(e,n,"",void 0,(o,l,c,d)=>{const _=t.find(f=>f.name===l);return _&&_.source!=="command"?h.jsx(Ldt,{label:o,name:l,end:c,skill:_,projectId:r,textareaRef:s},`${d}:${c}`):h.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[h.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${d}:${c}`)},!0),"​"]})}function Bdt(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const T2=6.5,A8=2*Math.PI*T2;function $dt({usage:e}){return!e||e.usedTokens<=0?null:h.jsx(Hdt,{usage:e})}function Hdt({usage:e}){const{open:n,setOpen:t,ref:r}=zo(),{usedTokens:s,contextWindow:a}=e,o=a&&a>0?Math.min(100,Math.round(s/a*100)):null,l=o===null?"var(--accent)":Bdt(o),c=o===null?"":new Intl.NumberFormat(N(),{style:"percent"}).format(o/100);return h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:r,children:[h.jsx("button",{type:"button",className:`${o===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:koe(),onClick:()=>t(d=>!d),children:o===null?e0(s):h.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:T2,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),h.jsx("circle",{cx:"8",cy:"8",r:T2,fill:"none",stroke:l,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${A8*Math.max(o,2)/100} ${A8}`,transform:"rotate(-90 8 8)"})]})}),n&&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 [&.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:[h.jsxs("div",{className:"context-meter-head flex justify-between items-baseline gap-3 text-sm text-muted",children:[h.jsx("span",{children:xoe()}),h.jsx("span",{className:"context-meter-value text-text tabular-nums",children:o===null?zoe({value:Te(e0(s))}):Moe({used:Te(e0(s)),total:Te(e0(a)),percent:Te(c)})})]}),o!==null&&h.jsx(FT,{value:s,max:a,fillColor:l})]})]})}const c4="orx:demo-read-sessions";function ij(){try{const e=JSON.parse(sessionStorage.getItem(c4)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function Pdt(e){try{const n=ij();n.add(e),sessionStorage.setItem(c4,JSON.stringify([...n]))}catch{}}function Fdt(){try{sessionStorage.removeItem(c4)}catch{}}function Udt(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 qdt(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 Gdt(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 E2(e,n){return n?` +`}function j2(e,n){return n?` \\[ ${e} \\] -`:`\\(${e}\\)`}function kdt(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function Vdt(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 Cdt(e,n){if(e.length===0)return"";const t=Math.max(...e.map(o=>o.length)),r=o=>`| ${Array.from({length:t},(l,c)=>o[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),a=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...a.map(r)].join(` -`)}function Edt(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function Ndt(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function zdt(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Adt={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 Xf({variant:e="list",className:n,...t}){return h.jsx("span",{className:ss("title",Adt[e],n),...t})}const YT="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",Sl=256,XT=1024,ZT=2e4,qv=8,d0="chat-annotations";function lc(e){return e instanceof Element?e:e.parentElement}function k8(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function Gv(e,n){return k8(e).compareBoundaryPoints(Range.START_TO_START,k8(n))<0}function C8(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const Tdt=new Set(["A","B","CODE","EM","I","STRONG"]);function jdt(e,n){var s,a;const t=lc(e.endContainer);if(Array.from(n.childNodes).every(o=>o.nodeType===Node.TEXT_NODE)){let o=lc(e.startContainer);for(;o&&o.matches(".md *")&&o.contains(t);){if(Tdt.has(o.tagName)){const l=o.cloneNode(!1);l instanceof HTMLElement&&(l.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(l))}o=o.parentElement}}const r=(s=lc(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const o=(a=r.querySelector("code"))==null?void 0:a.cloneNode(!1),l=r.cloneNode(!1);l instanceof HTMLElement&&o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),l.replaceChildren(o),n.replaceChildren(l))}}function Mdt(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 Rdt(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const a=Array.from(n.querySelectorAll(".katex")).filter(o=>e.intersectsNode(o));for(const o of a){const l=o.closest(".katex-display")??o,c=document.createRange();c.selectNode(l);const d={container:c.startContainer,offset:c.startOffset},_={container:c.endContainer,offset:c.endOffset};if(Gv(s,d)&&t.append(C8(s,d)),t.append(l.cloneNode(!0)),s=_,!Gv(s,r))break}return a.length===0?t.append(e.cloneContents()):Gv(s,r)&&t.append(C8(s,r)),jdt(e,t),Mdt(t),t}function Ddt(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>Zf(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function Wdt(e,n){if(e.length===0)return"";const t=Math.max(...e.map(o=>o.length)),r=o=>`| ${Array.from({length:t},(l,c)=>o[c]??"").join(" | ")} |`,s=n?e[0]:Array.from({length:t},()=>""),a=n?e.slice(1):e;return[r(s),r(Array.from({length:t},()=>"---")),...a.map(r)].join(` +`)}function Kdt(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function Ydt(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function Xdt(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Zdt={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 Qf({variant:e="list",className:n,...t}){return h.jsx("span",{className:ss("title",Zdt[e],n),...t})}const aj="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",Cl=256,oj=1024,lj=2e4,Kv=8,g0="chat-annotations";function cc(e){return e instanceof Element?e:e.parentElement}function T8(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function Yv(e,n){return T8(e).compareBoundaryPoints(Range.START_TO_START,T8(n))<0}function j8(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const Qdt=new Set(["A","B","CODE","EM","I","STRONG"]);function Jdt(e,n){var s,a;const t=cc(e.endContainer);if(Array.from(n.childNodes).every(o=>o.nodeType===Node.TEXT_NODE)){let o=cc(e.startContainer);for(;o&&o.matches(".md *")&&o.contains(t);){if(Qdt.has(o.tagName)){const l=o.cloneNode(!1);l instanceof HTMLElement&&(l.replaceChildren(...Array.from(n.childNodes)),n.replaceChildren(l))}o=o.parentElement}}const r=(s=cc(e.startContainer))==null?void 0:s.closest("pre");if(r!=null&&r.contains(t)){const o=(a=r.querySelector("code"))==null?void 0:a.cloneNode(!1),l=r.cloneNode(!1);l instanceof HTMLElement&&o instanceof HTMLElement&&(o.replaceChildren(...Array.from(n.childNodes)),l.replaceChildren(o),n.replaceChildren(l))}}function eft(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 tft(e,n){const t=document.createElement("div"),r={container:e.endContainer,offset:e.endOffset};let s={container:e.startContainer,offset:e.startOffset};const a=Array.from(n.querySelectorAll(".katex")).filter(o=>e.intersectsNode(o));for(const o of a){const l=o.closest(".katex-display")??o,c=document.createRange();c.selectNode(l);const d={container:c.startContainer,offset:c.startOffset},_={container:c.endContainer,offset:c.endOffset};if(Yv(s,d)&&t.append(j8(s,d)),t.append(l.cloneNode(!0)),s=_,!Yv(s,r))break}return a.length===0?t.append(e.cloneContents()):Yv(s,r)&&t.append(j8(s,r)),Jdt(e,t),eft(t),t}function nft(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>Jf(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${Cdt(n,!!e.querySelector("tr:first-child th"))} +${Wdt(n,!!e.querySelector("tr:first-child th"))} -`:""}function QT(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const a=[];for(const o of Array.from(e.children).filter(l=>l instanceof HTMLElement&&l.tagName==="LI")){const l=o.getAttribute("value"),c=l===null?s:Number(l),d=Number.isFinite(c)?c:s;s=d+1;const _=Array.from(o.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` -${QT(f).trim()} -`:Zf(f)).join("").trim();a.push(kdt(n?`${d}.`:"-",_))}return` +`:""}function cj(e){const n=e.tagName==="OL",t=e.getAttribute("start"),r=t===null?1:Number(t);let s=Number.isFinite(r)?r:1;const a=[];for(const o of Array.from(e.children).filter(l=>l instanceof HTMLElement&&l.tagName==="LI")){const l=o.getAttribute("value"),c=l===null?s:Number(l),d=Number.isFinite(c)?c:s;s=d+1;const _=Array.from(o.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` +${cj(f).trim()} +`:Jf(f)).join("").trim();a.push(Vdt(n?`${d}.`:"-",_))}return` ${a.join(` `)} -`}function Zf(e){var r,s,a,o,l;if(e.nodeType===Node.TEXT_NODE)return ydt(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(Zf).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?E2(c,!0):""}if(e.matches(".katex")){const c=(o=(a=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();return c?E2(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return Ddt(e);if(e.matches("UL, OL"))return QT(e);if(e.tagName==="CODE"&&((l=e.parentElement)==null?void 0:l.tagName)!=="PRE")return wdt(e.textContent??"");if(e.tagName==="PRE")return Sdt(e.textContent??"");const n=Array.from(e.childNodes).map(Zf).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 Jf(e){var r,s,a,o,l;if(e.nodeType===Node.TEXT_NODE)return Udt(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(Jf).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?j2(c,!0):""}if(e.matches(".katex")){const c=(o=(a=e.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:a.textContent)==null?void 0:o.trim();return c?j2(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return nft(e);if(e.matches("UL, OL"))return cj(e);if(e.tagName==="CODE"&&((l=e.parentElement)==null?void 0:l.tagName)!=="PRE")return qdt(e.textContent??"");if(e.tagName==="PRE")return Gdt(e.textContent??"");const n=Array.from(e.childNodes).map(Jf).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` @@ -993,7 +994,7 @@ ${n.trim().split(` `).map(c=>`> ${c}`).join(` `)} -`;const t=Edt(e.tagName,n);return t?` +`;const t=Kdt(e.tagName,n);return t?` ${t} @@ -1001,55 +1002,55 @@ ${t} ${n.trim()} -`:n}function Ldt(e,n){return Zf(e).replace(/\r\n?/g,` +`:n}function rft(e,n){return Jf(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function E8(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function Odt(e,n){var s,a,o,l;if(!Ndt(e))return;const t=E8(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const _=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(a=c.querySelector(".katex-html"))==null?void 0:a.textContent,c.textContent].filter(S=>!!S).map(E8).find(S=>zdt(S,t));if(!_)continue;const f=(l=(o=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:o.textContent)==null?void 0:l.trim();if(!f)continue;const m=!!c.closest(".katex-display"),g={markdown:E2(f,m).trim(),delta:Math.abs(_.length-t.length)};(!r||g.delta .md .katex")){const _=[(s=c.querySelector(".katex-mathml"))==null?void 0:s.textContent,(a=c.querySelector(".katex-html"))==null?void 0:a.textContent,c.textContent].filter(S=>!!S).map(M8).find(S=>Xdt(S,t));if(!_)continue;const f=(l=(o=c.querySelector("annotation[encoding='application/x-tex']"))==null?void 0:o.textContent)==null?void 0:l.trim();if(!f)continue;const m=!!c.closest(".katex-display"),g={markdown:j2(f,m).trim(),delta:Math.abs(_.length-t.length)};(!r||g.deltaT.width>0&&T.height>0),S=g[0]??t.getBoundingClientRect(),k=g.filter(T=>T.topS.top),b=k.length>0?k:[S],v=Math.min(...b.map(T=>T.left)),x=Math.max(...b.map(T=>T.right)),y=Math.min(...b.map(T=>T.top)),C=Math.max(...b.map(T=>T.bottom)),A=34,E=74,j=y>=A+qv?y-A-qv:C+qv;return{text:Ldt(m,f),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,v+(x-v)/2)),top:j}}function Bdt(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),a=M.useCallback(()=>{const c=e.current;r(c?Idt(c):null)},[e]);M.useEffect(()=>{let c=null;const d=()=>{s.current||a()},_=m=>{const g=e.current,S=m.target;!m.isPrimary||m.button!==0||!g||!(S instanceof Node)||!g.contains(S)||(s.current=!0,r(null))},f=m=>{!m.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(a))};return document.addEventListener("selectionchange",d),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",d),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[a]),M.useEffect(()=>{if(!t)return;const c=d=>{const _=d.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",a),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",a)}},[t,a]);const o=M.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),l=M.useCallback(()=>r(null),[]);return{action:t,add:o,dismiss:l}}function $dt(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(d0);return}const t=new Highlight(...n);return CSS.highlights.set(d0,t),()=>{CSS.highlights.get(d0)===t&&CSS.highlights.delete(d0)}},[e])}function Hdt({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var a;const s=(a=n.current)==null?void 0:a.closest(".chat-thread-inner");r(s?Odt(e.text,s):void 0)},[e.id,e.text]),h.jsx("div",{ref:n,children:h.jsx(za,{text:t??e.text})})}function Pdt({annotations:e,onRemove:n}){return e.map((t,r)=>h.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:[h.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-muted mb-1",children:IJ()}),h.jsx(Hdt,{annotation:t})]}),n&&h.jsx(Jt,{type:"button",size:"small","data-annotation-remove":!0,title:fJ(),"aria-label":UI({number:Vt(r+1)}),onClick:()=>n(t.id),children:h.jsx(_s,{size:13})})]},t.id))}function i4({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),a=M.useRef(null),o=M.useId(),l=Ao(s),c=n==="sent",d=M.useRef(null),_=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null,l.setOpen(!0)},f=()=>{d.current=window.setTimeout(()=>{var S;(S=a.current)!=null&&S.contains(document.activeElement)||l.setOpen(!1)},160)},m=()=>{const S=c||!l.open;l.setOpen(S),S&&window.requestAnimationFrame(()=>{var k;return(k=a.current)==null?void 0:k.focus()})},g=S=>{r==null||r(S),window.requestAnimationFrame(()=>{var b,v;(v=((b=a.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??a.current??s.current)==null||v.focus()})};return M.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]),h.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:l.ref,onMouseEnter:c?_:void 0,onMouseLeave:c?f:void 0,children:[h.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[h.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":l.open,"aria-haspopup":"dialog","aria-controls":o,onClick:m,children:[h.jsx(QE,{size:c?13:14,className:"text-muted"}),e.length===1?YK():mW({count:Vt(e.length)})]}),t&&h.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:I6(),"aria-label":I6(),onClick:t,children:h.jsx(_s,{size:13})})]}),l.open&&h.jsx("div",{id:o,ref:a,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":RJ(),children:h.jsx(Pdt,{annotations:e,onRemove:r?g:void 0})})]})}function Fdt(e){return h.jsx(i4,{...e,variant:"composer"})}const Udt=["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(" "),N8=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),qdt=["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(" "),Gdt=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),N2="prompt-actions flex flex-wrap gap-2",Ou="local-",z8=[];function Vdt(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(Ou)),n]}function Wdt(e,n){switch(n.type){case"reset":return{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}};case"seed":return n.onlyIfAbsent&&n.sessionId in e.messagesBySession?e:{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:n.messages},queuedBySession:{...e.queuedBySession,[n.sessionId]:n.queued??[]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.activeLeafId??null}};case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(l=>l.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,a=n.message.role==="user"&&s!==null&&s.startsWith(Ou),o=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Vdt(t,n.message)},activeLeafBySession:r&&!a&&!o?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${Ou}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"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((a,o)=>r.push({id:`img${o}`,type:"image",text:a.url,name:a.name})),n.annotations.forEach((a,o)=>r.push({id:`annotation${o}`,type:"annotation",text:a.text}));const s={id:`${Ou}${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"busy":{const t=new Set(e.busySessions);return n.busy?t.add(n.sessionId):t.delete(n.sessionId),{...e,busySessions:t}}case"seedBusy":{const t=new Set(n.sessions),r=new Set(n.known);for(const s of e.busySessions)r.has(s)||t.add(s);return{...e,busySessions:t}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}};case"forget":{const t={...e.messagesBySession};delete t[n.sessionId];const r=new Set(e.busySessions);r.delete(n.sessionId);const s={...e.queuedBySession};delete s[n.sessionId];const a={...e.activeLeafBySession};return delete a[n.sessionId],{messagesBySession:t,busySessions:r,queuedBySession:s,activeLeafBySession:a}}}}function Kdt(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return o6e();const t=Math.floor(n/60);if(t<60)return r6e({value:Vt(t)});const r=Math.floor(t/60);return r<24?J3e({value:Vt(r)}):Y3e({value:Vt(Math.floor(r/24))})}function sc(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function Vv(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 Ydt(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 Cs(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function Wv(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 a=s[t];if(typeof a=="string"&&a)return a}return null}function Kv(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Sl));s++);return r}function Xdt(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 Iu(...e){const n=new Set,t=new RegExp(`^${_c}$`,"i");let r=0;for(const s of e)for(const a of s){if(n.size>=Sl||r++>=XT)return[...n];t.test(a)&&n.add(a.toLowerCase())}return[...n]}function pm(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!f)return null;const m=tft(t,e),g=Array.from(t.getClientRects()).filter(T=>T.width>0&&T.height>0),S=g[0]??t.getBoundingClientRect(),k=g.filter(T=>T.topS.top),b=k.length>0?k:[S],v=Math.min(...b.map(T=>T.left)),x=Math.max(...b.map(T=>T.right)),y=Math.min(...b.map(T=>T.top)),C=Math.max(...b.map(T=>T.bottom)),A=34,E=74,j=y>=A+Kv?y-A-Kv:C+Kv;return{text:rft(m,f),range:t.cloneRange(),x:Math.min(window.innerWidth-E,Math.max(E,v+(x-v)/2)),top:j}}function aft(e,n){const[t,r]=M.useState(null),s=M.useRef(!1),a=M.useCallback(()=>{const c=e.current;r(c?ift(c):null)},[e]);M.useEffect(()=>{let c=null;const d=()=>{s.current||a()},_=m=>{const g=e.current,S=m.target;!m.isPrimary||m.button!==0||!g||!(S instanceof Node)||!g.contains(S)||(s.current=!0,r(null))},f=m=>{!m.isPrimary||!s.current||(s.current=!1,c=window.requestAnimationFrame(a))};return document.addEventListener("selectionchange",d),document.addEventListener("pointerdown",_,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",d),document.removeEventListener("pointerdown",_,!0),window.removeEventListener("pointerup",f,!0),window.removeEventListener("pointercancel",f,!0),c!==null&&window.cancelAnimationFrame(c),s.current=!1}},[a]),M.useEffect(()=>{if(!t)return;const c=d=>{const _=d.target;_ instanceof Element&&_.closest(".chat-selection-action")||r(null)};return document.addEventListener("mousedown",c,!0),window.addEventListener("resize",a),()=>{document.removeEventListener("mousedown",c,!0),window.removeEventListener("resize",a)}},[t,a]);const o=M.useCallback(()=>{var c;t&&(n({text:t.text,range:t.range}),r(null),(c=window.getSelection())==null||c.removeAllRanges())},[t,n]),l=M.useCallback(()=>r(null),[]);return{action:t,add:o,dismiss:l}}function oft(e){M.useLayoutEffect(()=>{if(!("highlights"in CSS)||typeof Highlight>"u")return;const n=e.flatMap(r=>r.range?[r.range]:[]);if(n.length===0){CSS.highlights.delete(g0);return}const t=new Highlight(...n);return CSS.highlights.set(g0,t),()=>{CSS.highlights.get(g0)===t&&CSS.highlights.delete(g0)}},[e])}function lft({annotation:e}){const n=M.useRef(null),[t,r]=M.useState();return M.useLayoutEffect(()=>{var a;const s=(a=n.current)==null?void 0:a.closest(".chat-thread-inner");r(s?sft(e.text,s):void 0)},[e.id,e.text]),h.jsx("div",{ref:n,children:h.jsx(Na,{text:t??e.text})})}function cft({annotations:e,onRemove:n}){return e.map((t,r)=>h.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:[h.jsxs("span",{className:"text-sm text-muted text-end",children:[r+1,"."]}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-muted mb-1",children:YJ()}),h.jsx(lft,{annotation:t})]}),n&&h.jsx(Jt,{type:"button",size:"small","data-annotation-remove":!0,title:kJ(),"aria-label":tB({number:Ft(r+1)}),onClick:()=>n(t.id),children:h.jsx(_s,{size:13})})]},t.id))}function u4({annotations:e,variant:n,onClear:t,onRemove:r}){const s=M.useRef(null),a=M.useRef(null),o=M.useId(),l=zo(s),c=n==="sent",d=M.useRef(null),_=()=>{d.current!==null&&window.clearTimeout(d.current),d.current=null,l.setOpen(!0)},f=()=>{d.current=window.setTimeout(()=>{var S;(S=a.current)!=null&&S.contains(document.activeElement)||l.setOpen(!1)},160)},m=()=>{const S=c||!l.open;l.setOpen(S),S&&window.requestAnimationFrame(()=>{var k;return(k=a.current)==null?void 0:k.focus()})},g=S=>{r==null||r(S),window.requestAnimationFrame(()=>{var b,v;(v=((b=a.current)==null?void 0:b.querySelector("button[data-annotation-remove]"))??a.current??s.current)==null||v.focus()})};return M.useEffect(()=>()=>{d.current!==null&&window.clearTimeout(d.current)},[]),h.jsxs("div",{className:c?"sent-annotations relative flex w-fit":"composer-annotations relative flex w-fit pt-2 px-3 pb-0",ref:l.ref,onMouseEnter:c?_:void 0,onMouseLeave:c?f:void 0,children:[h.jsxs("div",{className:`inline-flex items-center border border-border bg-background overflow-hidden ${c?"rounded-full":"rounded-sm"}`,children:[h.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":l.open,"aria-haspopup":"dialog","aria-controls":o,onClick:m,children:[h.jsx(sN,{size:c?13:14,className:"text-muted"}),e.length===1?oY():zW({count:Ft(e.length)})]}),t&&h.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:F6(),"aria-label":F6(),onClick:t,children:h.jsx(_s,{size:13})})]}),l.open&&h.jsx("div",{id:o,ref:a,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":GJ(),children:h.jsx(cft,{annotations:e,onRemove:r?g:void 0})})]})}function uft(e){return h.jsx(u4,{...e,variant:"composer"})}const dft=["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(" "),R8=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),fft=["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(" "),hft=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),M2="prompt-actions flex flex-wrap gap-2",Bu="local-",D8=[];function _ft(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(Bu)),n]}function pft(e,n){switch(n.type){case"reset":return{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}};case"seed":return n.onlyIfAbsent&&n.sessionId in e.messagesBySession?e:{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:n.messages},queuedBySession:{...e.queuedBySession,[n.sessionId]:n.queued??[]},activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.activeLeafId??null}};case"upsertMessage":{const t=e.messagesBySession[n.sessionId]??[],r=t.some(l=>l.id===n.message.id),s=e.activeLeafBySession[n.sessionId]??null,a=n.message.role==="user"&&s!==null&&s.startsWith(Bu),o=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:_ft(t,n.message)},activeLeafBySession:r&&!a&&!o?e.activeLeafBySession:{...e.activeLeafBySession,[n.sessionId]:n.message.id}}}case"localError":{const t=e.messagesBySession[n.sessionId]??[],r={id:`${Bu}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"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((a,o)=>r.push({id:`img${o}`,type:"image",text:a.url,name:a.name})),n.annotations.forEach((a,o)=>r.push({id:`annotation${o}`,type:"annotation",text:a.text}));const s={id:`${Bu}${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"busy":{const t=new Set(e.busySessions);return n.busy?t.add(n.sessionId):t.delete(n.sessionId),{...e,busySessions:t}}case"seedBusy":{const t=new Set(n.sessions),r=new Set(n.known);for(const s of e.busySessions)r.has(s)||t.add(s);return{...e,busySessions:t}}case"setQueued":return{...e,queuedBySession:{...e.queuedBySession,[n.sessionId]:n.items}};case"forget":{const t={...e.messagesBySession};delete t[n.sessionId];const r=new Set(e.busySessions);r.delete(n.sessionId);const s={...e.queuedBySession};delete s[n.sessionId];const a={...e.activeLeafBySession};return delete a[n.sessionId],{messagesBySession:t,busySessions:r,queuedBySession:s,activeLeafBySession:a}}}}function mft(e){if(!e)return"";const n=Math.max(0,Math.floor((Date.now()-e)/1e3));if(n<60)return S6e();const t=Math.floor(n/60);if(t<60)return b6e({value:Ft(t)});const r=Math.floor(t/60);return r<24?p6e({value:Ft(r)}):d6e({value:Ft(Math.floor(r/24))})}function ic(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function Xv(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 gft(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 Es(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function Zv(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 a=s[t];if(typeof a=="string"&&a)return a}return null}function Qv(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Cl));s++);return r}function vft(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 $u(...e){const n=new Set,t=new RegExp(`^${pc}$`,"i");let r=0;for(const s of e)for(const a of s){if(n.size>=Cl||r++>=oj)return[...n];t.test(a)&&n.add(a.toLowerCase())}return[...n]}function xm(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function Zdt(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 Qdt(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=gZe(r),JT(r)}function JT(e){return eft(e).replace(/[\t\r ]+/g," ").trim()}function Jdt(e){let n=null,t=!1;for(let r=0;r!a.startsWith("-")&&a.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&tj(s)?{ref:r,path:s}:null}function rft(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 A8(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 a of n.split("/"))if(!(!a||a===".")){if(a===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(a);continue}r.push(a)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function sft(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let a=0;a!d.startsWith("-"));if(!l)return null;const c=A8(s,l);if(!c)return null;s=c}return s?A8(s,e):e}const xa="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",ift=new RegExp(`\\bchat_(${xa})\\b`,"gi"),_c=`(?:${xa}|[0-9a-f]{8})`;function Bu(e){const n=[];let t="",r="",s=null,a=!1;const o=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},l=d=>{let _=1,f=null,m=!1;for(let g=d;g{let _=!1;for(let f=d;fxZe(t.raw,n))}function ji(e,n){return mm(e,n).length>0}function aft(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,ZT).matchAll(ift))if(n.add(t[0].toLowerCase()),n.size>=Sl)break;return[...n]}function z2(e,n){if(!e)return[];const t=new Set,r=e.slice(0,ZT),s=n==="runs"?[new RegExp(`/runs/(${xa})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${xa})`,"gi"),new RegExp(`^\\s*RUN\\s+(${xa})\\b`,"gim"),new RegExp(`={3,}\\s*(${xa})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${xa})`,"gi"),new RegExp(`^\\s*id:\\s*(${xa})`,"gim"),new RegExp(`={3,}\\s*(${xa})\\s*={3,}`,"gi")];for(const o of s)for(const l of r.matchAll(o))if(t.add(l[1]),t.size>=Sl)return[...t];const a=new RegExp(`^\\s*(${xa})(?:\\s|$)`,"gim");for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Sl)break;return[...t]}function rj(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),a=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,a+r.raw.length),{invocation:r,offset:Math.max(0,a)}})}function sj(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let a="";for(const o of e.matchAll(s)){if((o.index??0)>=t)break;a=o[1]??o[2]??o[3]??""}return[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function ij(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let a="";for(const o of e.matchAll(s)){const l=o.index??0;if(l>=t)break;const c=l+o[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(a=o[1])}return/\$\(|`/.test(a)?[]:[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function oft(e,n,t=[],r=[]){const s=mm(e,"logs"),a=new Set;if(s.length===0){if(!ji(e,"logs"))return[];const l=t.length>0?[]:z2(n,"runs");for(const c of t.length>0?t:l.length>0?l:r)if(a.add(c),a.size>=Sl)break;return Iu([...a])}let o=!1;for(const{invocation:l,offset:c}of rj(e,s)){const d=Ku(l.raw);if((d==null?void 0:d[0])!=="logs")continue;const _=d.slice(1);let f=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){f=v;break}}}if(!f){o=!0;continue}if(new RegExp(`^${_c}$`,"i").test(f)){a.add(f);continue}const m=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(f);if(!m){o=!0;continue}const g=m[1],S=sj(e,g,c,_c);for(const b of S)a.add(b);const k=ij(e,g,c,_c);for(const b of k)a.add(b);S.length===0&&k.length===0&&(o=!0)}if(a.size===0||o){const l=t.length>0?[]:z2(n,"runs"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=Sl)break}return Iu([...a])}function bu(e,n,t=[],r=[]){const s=mm(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const a=new Set;let o=!1;for(const{invocation:l,offset:c}of rj(e,s)){const d=Ku(l.raw),_=(d==null?void 0:d[0])==="exp"&&(d[1]==="status"||d[1]==="desc")?d[2]:null;let f=!1;_&&new RegExp(`^${_c}$`,"i").test(_)&&(a.add(_),f=!0);const m=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(m){const g=m[1],S=sj(e,g,c,_c);if(S.length>0){for(const b of S)a.add(b);f=!0}const k=ij(e,g,c,_c);for(const b of k)a.add(b);k.length>0&&(f=!0)}f||(o=!0)}if(a.size===0||o){const l=t.length>0?[]:z2(n,"experiments"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=Sl)break}return Iu([...a])}function kl(e){var b,v,x,y;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)):{},a={...t,...s},o=Cs(a,"command","cmd"),l=Xdt(a,"commandArgv"),c=((v=e.state)==null?void 0:v.output)||((x=e.state)==null?void 0:x.error),d=Iu(Kv(a,"targetIds")),_=Iu(Kv(a,"runTargetIds")),f=Iu(Kv(a,"experimentTargetIds")),m=Cs(a,"filePath","file_path","notebookPath","notebook_path","path"),g=Cs(a,"description"),S=bN(n);if(Pp(n)){const C=xN(e);return{kind:"task",label:C?LF({done:Vt(C.done),total:Vt(C.total)}):Z9()}}if(S==="run"&&vN(n).includes("web")){const C=Wv(a,"search_query","q"),A=Wv(a,"image_query","q"),E=Wv(a,"find","pattern");return C?{kind:"web",label:x6({query:C})}:A?{kind:"web",label:LP({query:A})}:E?{kind:"web",label:JP({pattern:E})}:Array.isArray(a.open)?{kind:"web",label:dQ()}:Array.isArray(a.weather)?{kind:"web",label:MX()}:Array.isArray(a.finance)?{kind:"web",label:kX()}:Array.isArray(a.sports)?{kind:"web",label:zX()}:Array.isArray(a.time)?{kind:"web",label:xX()}:{kind:"web",label:L6()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(S)??S){case"bash":{if(!o&&!(l!=null&&l.length))return{kind:"command",label:BQ()};const C=Qdt(o??(l==null?void 0:l.join(" "))??""),A=Bu(C);let E=A.map(oe=>oe.raw);if(l!=null&&l.length){const oe=bZe(l);E=oe===null?[l]:Bu(JT(oe)).map(he=>he.raw)}let j=null;for(const oe of E)if(j=yZe(oe),j)break;const T=E.some(oe=>{const he=Ku(oe);return he!==null&&he[0]!=="discover"&&he[0]!=="paper"});if(j&&!T){const oe=j.kind==="discover"?{keyword:gP(),embedding:yP(),openalex:VP(),biorxiv:CP()}[j.strategy]:null,he=j.kind==="discover"?j.query?N$({activity:oe??b6(),query:j.query}):oe??b6():j.id?lf({target:Ae(j.id)}):gH();return{kind:j.kind==="paper"?"read":"search",label:he,litCall:j}}if(ji(C,"agent\\s+spawn"))return{kind:"agent",label:XX(),spawnedSessionIds:aft(c),litCall:j??void 0};const D=A.map(oe=>nj(oe.raw)),I=ji(C,"exp\\s+status"),P=ji(C,"exp\\s+desc"),H=mm(C,"exp\\s+desc").some(oe=>(Ku(oe.raw)??[]).some(ie=>ie==="--set"||ie.startsWith("--set=")||ie==="--stdin")),F=H?jF():hH(),V=H?IB():ZH();if(ji(C,"logs")){const oe=oft(C,c,_,d);return{kind:"project",label:oe.length===1?UH():WH(),runIds:oe,litCall:j??void 0}}if(ji(C,"exp\\s+run"))return{kind:"project",label:eee(),litCall:j??void 0};if(ji(C,"exp\\s+wait"))return{kind:"project",label:Dee(),litCall:j??void 0};if(ji(C,"exp\\s+cancel"))return{kind:"project",label:tX(),litCall:j??void 0};const X=ji(C,"project\\s+view");if(X&&I&&P)return{kind:"project",label:V,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(X&&P)return{kind:"project",label:F,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(X&&I)return{kind:"project",label:O6(),experimentIds:bu(C,c,f,d),litCall:j??void 0};if(X)return{kind:"project",label:eJ(),litCall:j??void 0};if(I&&P)return{kind:"project",label:V,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(I)return{kind:"project",label:O6(),experimentIds:bu(C,c,f,d),litCall:j??void 0};if(P)return{kind:"project",label:F,experimentIds:bu(C,c,f,d),litCall:j??void 0};if(ji(C,"runs?"))return{kind:"project",label:VZ(),litCall:j??void 0};if(ji(C,"projects"))return{kind:"project",label:XZ(),litCall:j??void 0};if(ji(C,"compute"))return{kind:"project",label:cX(),litCall:j??void 0};const W=D.map(nft).find(oe=>oe!=null);if(W){const oe=Vv(W.path);return{kind:oe?"skill":"read",label:oe?P1({name:Ae(oe)}):lf({target:Ae(sc(W.path))}),filePath:W.path,fileRef:W.ref,labelTarget:oe?`${oe} skill`:sc(W.path)}}const Z=D.findIndex(oe=>oe!=null&&["sed","cat","head","tail"].includes(oe.name)),J=Z>=0?D[Z]:null,B=J?tft(J):null,L=B?sft(B,A,Z,Cs(a,"cwd","workdir")):null;if(B&&L){const oe=Vv(L);return{kind:oe?"skill":"read",label:oe?P1({name:Ae(oe)}):lf({target:Ae(sc(B))}),filePath:L,labelTarget:oe?`${oe} skill`:sc(B)}}if(D.some(oe=>(oe==null?void 0:oe.name)==="find"||(oe==null?void 0:oe.name)==="ls"||(oe==null?void 0:oe.name)==="rg"&&oe.args.includes("--files")))return{kind:"search",label:F6()};const $=D.findIndex(oe=>(oe==null?void 0:oe.name)==="rg"||(oe==null?void 0:oe.name)==="grep");if($>=0){const oe=rft(A[$].raw);return{kind:"search",label:oe?U1({pattern:Ae(oe)}):F1(),searchPattern:oe??void 0}}const K=D.find(oe=>(oe==null?void 0:oe.name)==="git"),G=K==null?void 0:K.args[0];if(G==="grep"){const oe=K==null?void 0:K.args.slice(1).find(he=>!he.startsWith("-"));return{kind:"search",label:oe?U1({pattern:Ae(oe)}):F1(),searchPattern:oe}}if(G==="status")return{kind:"command",label:mX()};if(G==="diff")return{kind:"command",label:AJ()};if(G==="log")return{kind:"command",label:XQ()};const re=oe=>D.some(he=>!he||!["cargo","pnpm","npm","yarn"].includes(he.name)?!1:he.args[0]===oe||he.args[0]==="run"&&he.args[1]===oe);return re("test")?{kind:"command",label:FQ()}:D.some(oe=>(oe==null?void 0:oe.name)==="tsc")||re("typecheck")?{kind:"command",label:OX()}:re("lint")?{kind:"command",label:iX()}:re("build")?{kind:"command",label:WY()}:{kind:"command",label:tH({command:Ae(C)})}}case"skill":{const C=Cs(a,"skill","name"),A=C?Ydt(n,C):null;return{kind:"skill",label:C?U$({name:Ae(C)}):$$(),filePath:A??void 0,labelTarget:A&&C?`${C} skill`:void 0}}case"read":{const C=m?sc(m):null,A=m?Vv(m):null;return A?{kind:"skill",label:P1({name:Ae(A)}),filePath:m??void 0,labelTarget:`${A} skill`}:C?{kind:"read",label:lf({target:Ae(C)}),filePath:m??void 0,labelTarget:C}:{kind:"read",label:VQ()}}case"edit":case"write":case"notebookedit":{const C=Zdt(a),A=m??(C==null?void 0:C.path)??null,E=A?sc(A):null,j=E?(C==null?void 0:C.type)==="add"?JB({target:Ae(E)}):(C==null?void 0:C.type)==="delete"?d$({target:Ae(E)}):b$({target:Ae(E)}):null;return E?{kind:"edit",label:j??$6(),filePath:A??void 0,labelTarget:E}:{kind:"edit",label:$6()}}case"grep":{const C=Cs(a,"pattern");return{kind:"search",label:C?U1({pattern:Ae(C)}):F1(),searchPattern:C??void 0}}case"glob":{const C=Cs(a,"pattern");return{kind:"search",label:C?j$({pattern:Ae(C)}):F6()}}case"websearch":{const C=Cs(a,"query"),A=Cs(a,"url"),E=Cs(a,"pattern");return C?{kind:"web",label:x6({query:C})}:E&&A?{kind:"web",label:FP({pattern:E})}:A?{kind:"web",label:Z$({target:Ae(A)})}:{kind:"web",label:g??L6()}}case"webfetch":{const C=Cs(a,"url");return{kind:"web",label:C?lf({target:Ae(C)}):g??NH()}}case"task":return{kind:"agent",label:g??iH()};case"subagent":return{kind:"agent",label:lft(a)};case"error":return{kind:"command",label:See()};case"contextcompaction":return{kind:"command",label:GB(),progressLabel:YB()};default:{const C=g??m??o??((y=e.state)==null?void 0:y.title)??"";return{kind:"command",label:C?`${n}: ${C}`:n}}}}function lft(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 dF();case"sendInput":return oF();case"resumeAgent":return LH();case"wait":return FF();case"closeAgent":return PB()}switch(typeof e.kind=="string"?e.kind:""){case"started":return SF();case"interacted":return CB();case"interrupted":return bF()}return pF()}function mp({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=h.jsx(zx,{...t});if(e.litCall)r=h.jsx(NN,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=h.jsx(UE,{...t});break;case"read":case"project":r=h.jsx(qE,{...t});break;case"search":r=h.jsx(nN,{...t});break;case"edit":r=h.jsx(Cx,{...t});break;case"web":r=h.jsx(aKe,{...t});break;case"agent":r=h.jsx(Ax,{...t});break;case"task":r=h.jsx(Sx,{...t});break}return h.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function Yv({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,a]=M.useState(!1),o=M.useRef(null),l=M.useRef(!1);return M.useEffect(()=>{var c,d;!s||!l.current||(l.current=!1,(d=(c=o.current)==null?void 0:c.querySelector("button"))==null||d.focus())},[s]),h.jsxs("span",{className:"tool-target-overflow inline",children:[s&&h.jsx("span",{className:"tool-target-reveal",ref:o,children:e.map((c,d)=>h.jsxs("span",{children:[d>0&&", ",n||t?h.jsx("button",{className:"tool-target",...n?gr(_=>n(c.id,_),{stopPropagation:!0}):{onClick:_=>{_.stopPropagation(),t==null||t(c.id)}},children:c.label}):h.jsx("span",{children:c.label})]},c.id))}),s&&", ",h.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?WO({target:r}):hB({count:Vt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),l.current=!s&&c.detail===0,a(d=>!d)},children:s?sE():Zre({count:Vt(e.length)})})]})}function A2({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:a,experimentName:o}){var l,c,d,_;if(e.searchPattern)return e.label;if(((l=e.litCall)==null?void 0:l.kind)==="paper"&&e.litCall.id)return h.jsxs("a",{className:"tool-target",href:NZe(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,h.jsx(cWe,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return h.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...gr(m=>n(f,void 0,void 0,e.fileRef,m),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const f=e.spawnedSessionIds,m=f.slice(0,3),g=f.slice(m.length).map((S,k)=>({id:S,label:T6({number:Vt(m.length+k+1)})}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",h.jsx("button",{className:"tool-target",title:oQ(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(S)},children:T6({number:Vt(k+1)})})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Yv,{items:g,onSelect:r,targetType:lW()})]})]})}if((d=e.runIds)!=null&&d.length){const f=s?e.runIds.filter(S=>!!s(S)):e.runIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(s==null?void 0:s(S))||po()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",t?h.jsx("button",{className:"tool-target",title:kI({run:Ae(S)}),...gr(b=>t(S,b),{stopPropagation:!0}),children:(s==null?void 0:s(S))||po()}):h.jsx("span",{children:(s==null?void 0:s(S))||po()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Yv,{items:g,onOpen:t,targetType:Gte()})]})]})}if((_=e.experimentIds)!=null&&_.length){const f=o?e.experimentIds.filter(S=>!!o(S)):e.experimentIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(o==null?void 0:o(S))||po()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",a?h.jsx("button",{className:"tool-target",title:fI({name:(o==null?void 0:o(S))||Ae(S)}),...gr(b=>a(S,b),{stopPropagation:!0}),children:(o==null?void 0:o(S))||po()}):h.jsx("span",{children:(o==null?void 0:o(S))||po()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Yv,{items:g,onOpen:a,targetType:_K()})]})]})}return e.label}function a4(e){const n=e.progressLabel??{skill:W$(),read:jH(),search:rF(),edit:S$(),project:tP(),web:RB(),agent:o$(),command:cP(),task:Z9()}[e.kind];return{...e,label:n}}function aj(e,n){const t=kl({type:"tool",tool:e,state:{status:"running",input:n}});return{skill:L$(),read:cH(),search:hP(),edit:p$(),project:$H(),web:AB(),agent:r$(),command:iP(),task:NF()}[t.kind]}function cft(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const uft=250;function dft(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),a=M.useRef(e);return M.useEffect(()=>{if(a.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 o=uft-(Date.now()-s.current);if(o<=0){s.current=Date.now(),r(e);return}const l=window.setTimeout(()=>{s.current=Date.now(),r(a.current)},o);return()=>window.clearTimeout(l)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const fft=160;function oj(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),fft);return()=>window.clearTimeout(r)},[e]),e&&n}function hft(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:J9()}}function _ft(e){const n=new Map,t=new Set;for(const{activity:a,count:o}of e){const c=a.kind==="read"||a.kind==="edit"||a.kind==="web"?`${a.kind}:${a.filePath??a.fileRef??a.label}`:null;if(c){if(t.has(c))continue;t.add(c)}n.set(a.kind,(n.get(a.kind)??0)+(c?1:o))}const s=["read","search","edit","command","web","project","skill","agent"].flatMap(a=>{const o=n.get(a);return o?[pft(a,o)]:[]});return s.length>0?s.join(" · "):J9()}function pft(e,n){const t=n===1,r=Vt(n);switch(e){case"read":return t?iUe():cUe({count:r});case"search":return t?hUe():gUe({count:r});case"edit":return t?UFe():WFe({count:r});case"web":return t?AUe():RUe({count:r});case"project":return t?ZFe():tUe({count:r});case"skill":return t?yUe():CUe({count:r});case"agent":return t?NFe():jFe({count:r});case"command":return t?LFe():$Fe({count:r});case"task":return xx()}}function mft(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 gft(e){const n=[];let t=null;for(const r of e){const s=kl(r),a=mft(r,s),o=n[n.length-1];a&&o&&t===a?o.count++:n.push({part:r,activity:s,count:1}),t=a}return n}function vft({part:e,busy:n,recovering:t,onRecover:r}){var m,g;const s=(m=e.state)==null?void 0:m.input,a=(s==null?void 0:s.nextRetryAt)??null,[o,l]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof a!="number"||(l(Date.now()),a<=Date.now()))return;const S=window.setInterval(()=>{const k=Date.now();l(k),k>=a&&window.clearInterval(S)},1e3);return()=>window.clearInterval(S)},[a]),e.id==="turn-retry"){const S=fZe(s??{},o);return h.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[h.jsx(dn,{}),h.jsx("span",{children:S})]})}const c=CN(s==null?void 0:s.recoveryAction),d=s==null?void 0:s.turnId;if(c!=="retry"&&c!=="continue"||!d)return null;const _=c==="retry"?Gu():KW(),f=pm(((g=e.state)==null?void 0:g.error)||One());return h.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[h.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:f,children:f}),h.jsx(Qe,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(d,c),children:t?cne():_})]})}function T8({part:e,repeatCount:n=1,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const c=e.state,d=kl(e),_=(c==null?void 0:c.status)==="error",f=pm((c==null?void 0:c.error)||(c==null?void 0:c.output)||""),m=_&&!!f,[g,S]=M.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=h.jsxs(h.Fragment,{children:[_&&h.jsxs("span",{className:"sr-only",children:[cx()," "]}),_?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(KE,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):h.jsx(mp,{activity:d,className:"text-muted"}),h.jsxs("span",{className:`${YT} ${_?"text-accent-red":"text-subtext"}`,children:[h.jsx(A2,{activity:d,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}),n>1&&h.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:tI({count:Vt(n)}),children:["×",n]})]})]});return m?h.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[h.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[b,h.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":g,"aria-controls":k,"aria-label":g?ZO({activity:d.label}):cB({activity:d.label}),onClick:()=>S(v=>!v),children:h.jsx(Ma,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${g?"rotate-90":""}`})})]}),g&&h.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:h.jsx("div",{className:"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",children:f.slice(0,2e4)})})]}):h.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function bft({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){var A,E,j,T;const[c,d]=M.useState(!1),_=gft(e),f=_.map(({activity:D})=>D),m=n?_.at(-1):void 0,g=m==null?void 0:m.part,S=m==null?void 0:m.activity,k=((A=g==null?void 0:g.state)==null?void 0:A.status)!=="error"?(S&&a4(S))??null:null,b=!!g&&((E=g.state)==null?void 0:E.status)==="running"&&!(k!=null&&k.progressLabel)&&(cft((j=g.state)==null?void 0:j.input)||(k==null?void 0:k.kind)==="command"&&!Cs(((T=g.state)==null?void 0:T.input)??{},"command","cmd")),v=dft(k,b),x=oj(v!=null),y=v??hft(f),C=v?v.label:_ft(_);return e.length===1?v?h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[h.jsx(mp,{activity:v,className:x?"tool-running-shimmer-icon":"text-muted"}),h.jsx("span",{className:`${x?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:C,children:h.jsx(A2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})})]})}):h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsx(T8,{part:e[0],onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[h.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:[h.jsx(mp,{activity:y,className:x?"tool-running-shimmer-icon":"text-muted"}),v?h.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${x?"tool-running-shimmer":""}`,title:C,children:h.jsx(A2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:()=>d(D=>!D),"aria-expanded":c,children:C}),h.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:()=>d(D=>!D),"aria-expanded":c,"aria-label":c?qW():uK(),children:h.jsx(Ma,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),h.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:h.jsx("div",{className:"tool-group-disclosure-inner",children:h.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:_.map(({part:D,count:I})=>h.jsx(T8,{part:D,repeatCount:I,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l},D.id))})})})]})}function xft({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[a,o]=M.useState([]),l=!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 g=s.approved===!0?{label:bQ(),icon:Ws,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:jQ(),icon:Cx,iconClass:"text-accent-amber"}:s.approved===!1?{label:SQ(),icon:_s,iconClass:"text-accent-red"}:{label:NQ(),icon:Vu,iconClass:"text-muted"},S=g.icon;return h.jsxs("details",{className:qdt,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?eE():Z6()}),h.jsx(S,{size:17,strokeWidth:1.8,className:`shrink-0 ${g.iconClass}`}),h.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:g.label}),h.jsx(Ma,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),h.jsxs("div",{className:`${N8} ms-6`,children:[h.jsx(za,{text:s.plan??"",onOpenFile:t}),s.note&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",m=(s.annotations??[]).map((g,S)=>({id:`${e.id}-annotation-${S}`,text:g.text}));return h.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[m.length>0&&h.jsx(i4,{annotations:m,variant:"sent"}),h.jsxs("details",{className:Udt,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||ute()}),h.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||Ite()})]}),h.jsxs("div",{className:N8,children:[s.header&&s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&h.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(g=>{var S;return h.jsx("li",{className:(S=s.answers)!=null&&S.includes(g.label)?"sel":"",children:g.label},g.label)})}),s.note&&s.note!==f&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return h.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 ${l?"readonly":""}`,children:[h.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?rte():Z6()}),h.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:h.jsx(za,{text:s.plan??"",onOpenFile:t})}),f&&h.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...gr(m=>r(s.plan??"",e.id,m)),children:Tee()}),!l&&!f&&h.jsxs("div",{className:N2,children:[h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:aY()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:uY()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!1}),children:sJ()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},m=Cs(f,"command","cmd","filePath","file_path","path")||"",g=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",S=Cs(f,"description")||"",k=g||S||aj(s.tool,f),b=`permission-heading-${e.id}`;return h.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 ${l?"readonly":""}`,role:"group","aria-labelledby":b,children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[h.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:h.jsx(rN,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),h.jsx("span",{id:b,className:"text-base font-semibold text-text",children:EY()})]}),h.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[h.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),m&&h.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:m}),!l&&h.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[h.jsx(Qe,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:sZ()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:wY()})]})]})]})}const d=f=>o(m=>s.multiSelect?m.includes(f)?m.filter(g=>g!==f):[...m,f]:[f]);return h.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 ${l?"readonly":""}`,children:[s.header&&h.jsx("div",{className:Gdt,children:s.header}),s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),h.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const m=a.includes(f.label);return h.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 ${m?"sel":""}`,disabled:l,onClick:()=>l?void 0:s.multiSelect?d(f.label):c({answers:[f.label]}),children:[h.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&h.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!l&&h.jsx("div",{className:N2,children:h.jsx(Qe,{size:"small",variant:"primary",disabled:a.length===0,onClick:()=>c({answers:a}),children:pee()})})]})}function yft(e,n){return e.role==="user"?!0:e.parts.some(t=>np(t,n))}function wft(e){const n=e.text??"",t=n.startsWith("data:")?n:FXe(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",a=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:a,name:s}}function Sft({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:a,onEdit:o,editDisabled:l}){const c=e>1;return h.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${c?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[c&&h.jsxs(h.Fragment,{children:[h.jsx(Jt,{size:"small",title:q6(),"aria-label":q6(),disabled:a||!t,onClick:()=>t&&s(t),children:h.jsx(GE,{size:14})}),h.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),h.jsx(Jt,{size:"small",title:U6(),"aria-label":U6(),disabled:a||!r,onClick:()=>r&&s(r),children:h.jsx(Ma,{size:14})})]}),h.jsx(Jt,{size:"small",title:B6(),"aria-label":B6(),disabled:l,onClick:o,children:h.jsx(Cx,{size:13})})]})}const kft=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,busy:g=!1,recoveringTurnId:S,onRecover:k,skills:b,predictTextTail:v=!1,forkCount:x,forkIndex:y=0,forkPrevId:C,forkNextId:A,forkDisabled:E,branchDisabled:j,onFork:T,onSelectFork:D}){var V,X;Cc();const[I,P]=M.useState(null);if(n.role==="user"){const W=n.parts.filter(K=>K.type==="text").map(K=>K.text??"").join(` -`),Z=K=>!!(b!=null&&b.some(G=>G.name===K)),J=n.parts.filter(K=>K.type==="image"&&K.text).map(wft),B=J.filter(K=>!K.isPdf),L=J.filter(K=>K.isPdf),$=n.parts.filter(K=>K.type==="annotation"&&K.text).map(K=>({id:K.id,text:K.text??""}));if(I!==null){const K=()=>{const G=I.trim();!G||E||(P(null),T(n.id,G))};return h.jsx("div",{className:"msg-user-group self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:h.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[h.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":dZ(),value:I,autoFocus:!0,onChange:G=>P(G.target.value),onKeyDown:G=>{G.key==="Escape"?(G.preventDefault(),P(null)):G.key==="Enter"&&!G.shiftKey&&!G.nativeEvent.isComposing&&(G.preventDefault(),K())}}),h.jsxs("div",{className:`${N2} justify-end`,children:[h.jsx(Qe,{size:"small",onClick:()=>P(null),children:ZY()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:K,disabled:E||!I.trim(),children:xb()})]})]})})}return h.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[$.length>0&&h.jsx(i4,{annotations:$,variant:"sent"}),h.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]:me-0.5 [&_.skill-chip]:align-baseline",children:[h.jsx(_dt,{text:W,isCommand:Z}),B.length>0&&h.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:B.map((K,G)=>h.jsx("a",{href:K.src,target:"_blank",rel:"noreferrer",children:h.jsx("img",{src:K.src,alt:MW()})},G))}),L.length>0&&h.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:L.map((K,G)=>h.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:K.src,target:"_blank",rel:"noreferrer",children:[h.jsx(Vu,{size:15}),h.jsx("span",{children:K.name})]},G))})]}),x!==void 0&&h.jsx(Sft,{count:x,index:y,prevId:C,nextId:A,onSelect:D,pagerDisabled:j,onEdit:()=>P(W),editDisabled:E})]})}const H=n.parts.find(yh),F=H?n.parts.filter(W=>W!==H):n.parts;return h.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[lj(F,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:v}),H&&h.jsx(vft,{part:H,busy:g,recovering:S===((X=(V=H.state)==null?void 0:V.input)==null?void 0:X.turnId),onRecover:k})]})});function lj(e,n){var y,C,A;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:g=!1}=n,S=e.filter(E=>E.type!=="steer"&&np(E,t)).at(-1),k=[],b=yN(e);let v=[];const x=()=>{v.length!==0&&(k.push(h.jsx(bft,{parts:v,pendingTail:v.some(E=>E.id===r),onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d},`tg-${v[0].id}`)),v=[])};for(const E of e)if(np(E,t)){if(E.type==="tool"&&(Eft(E.tool)||(((y=E.children)==null?void 0:y.length)??0)>0)){x(),k.push(h.jsx(zft,{part:E,pendingTail:g&&((C=E.state)==null?void 0:C.status)==="running"||E.id===r,onOpenSubagent:m},E.id));continue}if(E.type==="tool"&&Pp(E.tool)&&((A=E.state)==null?void 0:A.status)!=="error"){E.id===(b==null?void 0:b.id)&&(x(),k.push(h.jsx(Lct,{list:b.list,live:g},E.id)));continue}if(E.type==="tool"){v.push(E);continue}x(),E.type==="text"?k.push(h.jsx(za,{text:E.text,onOpenFile:s,onOpenRun:a,predict:g&&E.id===(S==null?void 0:S.id)},E.id)):E.type==="steer"?k.push(h.jsx("div",{dir:"auto",role:"note","aria-label":Vee(),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:E.text},E.id)):E.type==="prompt"&&E.prompt&&k.push(h.jsx(xft,{part:E,onRespond:_,onOpenFile:s,onOpenPlan:f},E.id))}return x(),k}function Cft(e){return kl(e).label}function Eft(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function cj(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 o4(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&o4(t.children,n);if(r)return r}return null}function Nft({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o}){var S,k,b,v;const l=e.children??[],c=((S=e.state)==null?void 0:S.status)==="running",d=((k=e.state)==null?void 0:k.status)==="error",_=d?pm(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",f=lj(l,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o,predictTextTail:c,pendingTailToolId:c?SN(l):null}),g=l.some(x=>x.type==="text"&&!!x.text)?"":cj(e);return h.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[d&&h.jsxs("span",{className:"sr-only",children:[cx()," "]}),_&&h.jsx("div",{className:"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",children:_.slice(0,2e4)}),f.length===0&&!g&&!_?h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?ux():IK()}):h.jsxs(h.Fragment,{children:[f,g&&h.jsx(za,{text:g,onOpenFile:n,onOpenRun:t})]})]})}function zft({part:e,pendingTail:n,onOpenSubagent:t}){var d,_,f,m;const r=((d=e.state)==null?void 0:d.status)==="error",s=pm(((_=e.state)==null?void 0:_.error)||((f=e.state)==null?void 0:f.output)||""),a=n&&!r?a4(kl(e)):kl(e),o=oj(!!(n&&!r)),l=(((m=e.children)==null?void 0:m.length)??0)===0&&!r&&!cj(e),c=h.jsxs(h.Fragment,{children:[r&&h.jsxs("span",{className:"sr-only",children:[cx()," "]}),r?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(KE,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):h.jsx(mp,{activity:a,className:`subagent-icon ${o?"tool-running-shimmer-icon":"text-muted"}`}),h.jsx("span",{className:`${YT} ${o?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:a.label})]});return l?h.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}):h.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:JK(),...gr(g=>t==null?void 0:t(e.id,a.label,g)),disabled:!t,children:[c,h.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:h.jsx(Ma,{size:12})})]})}function Aft(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,a)=>{var o,l;for(const c of s){const d=`${a}/${c.id}`;c.type==="tool"&&((o=c.state)!=null&&o.status)&&n.set(d,{status:c.state.status,part:c}),(l=c.children)!=null&&l.length&&r(c.children,d)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function l4(e){const n=(t,r)=>{var s;for(const a of t){const o=a.prompt;if(a.type==="prompt"&&(o==null?void 0:o.kind)==="permission"&&!o.resolved){const l=o.toolInput??{},d=Cs(l,"reason","description")||aj(o.tool,l);return{id:a.id,path:`${r}/${a.id}`,label:d}}if((s=a.children)!=null&&s.length){const l=n(a.children,`${r}/${a.id}`);if(l)return l}}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 Tft(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var S,k,b,v,x;const s=((S=e[0])==null?void 0:S.id)??"",{messageId:a,states:o}=Aft(e),l=l4(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},t(y=>({text:l?y6({label:Ca(l.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===a?r.current.states:new Map,d=r.current.permissionPath,_=[...o].filter(([y,C])=>{var A;return((A=c.get(y))==null?void 0:A.status)!==C.status});if(r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},l&&l.path!==d){t(y=>({text:y6({label:Ca(l.label)}),sequence:y.sequence+1}));return}const f=(k=_.find(([,y])=>yh(y.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const y=CN((v=(b=f.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${SU()}${y?` ${y==="retry"?rU():JF()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(y=>({text:YF(),sequence:y.sequence+1}));return}const m=_.filter(([,y])=>y.status==="error");if(m.length>0){const y=m.slice(0,2).map(([,C])=>kl(C.part).label).join(", ");t(C=>({text:m.length===1?pU({labels:y}):bU({count:Vt(m.length),labels:y}),sequence:C.sequence+1}));return}const g=_.filter(([,y])=>y.status==="running");if(g.length>0){const y=(x=g.at(-1))==null?void 0:x[1].part;t(C=>({text:y?a4(kl(y)).label:oU(),sequence:C.sequence+1}));return}_.some(([,y])=>y.status==="completed")&&t(y=>({text:dU(),sequence:y.sequence+1}))},[e]),n}const jft=M.memo(function({messages:n,allMessages:t,canFork:r,onFork:s,onSelectFork:a,busy:o,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,recoveringTurnId:b,onRecover:v,skills:x}){var D;Cc();const y=((D=l4(n))==null?void 0:D.id)??null,C=M.useMemo(()=>n.filter(I=>yft(I,y)),[n,y]),A=M.useMemo(()=>{const I=C.filter(P=>P.role==="user"&&!P.id.startsWith(Ou));return ZXe(t,n,I,P=>P.startsWith(Ou))},[n,C,t]),E=C.at(-1),j=Tft(n),T=o?kN(n):null;return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:h.jsx("span",{children:j.text},j.sequence)}),C.map(I=>{var V,X,W,Z,J,B;const P=I.parts.find(yh),H=(X=(V=P==null?void 0:P.state)==null?void 0:V.input)==null?void 0:X.turnId,F=P?o||b!==null:!1;return h.jsx(kft,{message:I,forkCount:(W=A.get(I.id))==null?void 0:W.count,forkIndex:(Z=A.get(I.id))==null?void 0:Z.index,forkPrevId:(J=A.get(I.id))==null?void 0:J.prevId,forkNextId:(B=A.get(I.id))==null?void 0:B.nextId,forkDisabled:!r,branchDisabled:o,onFork:s,onSelectFork:a,activePermissionId:y,pendingTailToolId:(T==null?void 0:T.messageId)===I.id?T.toolId:null,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,busy:F,recoveringTurnId:H===b?b:null,onRecover:v,skills:x,predictTextTail:o&&I===E&&I.role==="assistant"},I.id)})]})}),j8=(e,n)=>e==="all"?!0:e==="archived"?n:!n,uj=[{id:"active",label:_Y,railLabel:tE},{id:"archived",label:R6,railLabel:R6},{id:"all",label:vY,railLabel:fW}];function Mft({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Ao();return h.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[h.jsx(Jt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:P6(),"aria-label":P6(),onClick:()=>r(a=>!a),children:h.jsx(WKe,{size:13})}),t&&h.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:uj.map(a=>h.jsxs(Yr,{onClick:()=>{n(a.id),r(!1)},children:[h.jsx("span",{children:a.label()}),e===a.id&&h.jsx(Ws,{size:13})]},a.id))})]})}const Rft=14,Dft=500,Lft=1200;function dj({title:e,animate:n}){return n?h.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?h.jsx("span",{"aria-hidden":!0,children:t},r):h.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*Rft,Dft)}ms`},children:t},r))}):h.jsx(h.Fragment,{children:e})}function Oft({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:a,onOpen:o,onRename:l,onSetArchived:c,onDelete:d}){var A;const{open:_,setOpen:f,ref:m}=Ao(),g=((A=e.title)==null?void 0:A.trim())||"Untitled",[S,k]=M.useState(!1),[b,v]=M.useState(""),x=M.useRef(null);function y(){var E;v(((E=e.title)==null?void 0:E.trim())||""),k(!0)}function C(){var j;const E=b.trim();k(!1),E&&E!==(((j=e.title)==null?void 0:j.trim())||"")&&l(E)}return M.useEffect(()=>{var E,j;S&&((E=x.current)==null||E.focus(),(j=x.current)==null||j.select())},[S]),h.jsxs("div",{ref:m,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]:w-3.5 [&_.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]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.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-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]: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-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${S?"editing":""}`,title:`${kf[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?ine():""}`,onClick:()=>{S||(_?f(!1):o())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?f(!1):o())},children:[h.jsx("span",{className:"session-dot",children:r?h.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&h.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!S&&h.jsx(Ax,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),S?h.jsx("input",{ref:x,className:"session-title-input","aria-label":WJ(),value:b,onChange:E=>v(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),k(!1))}}):h.jsx("span",{className:"session-title",children:h.jsx(dj,{title:g,animate:a!==void 0},a??"static")}),h.jsx("span",{className:"session-time",children:Kdt(e.updatedAt)}),h.jsx("button",{className:"session-menu-btn",title:K6(),"aria-label":K6(),onClick:E=>{E.stopPropagation(),f(j=>!j)},children:h.jsx(yx,{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:[h.jsx(Yr,{onClick:E=>{E.stopPropagation(),f(!1),y()},children:h.jsx("span",{children:CJ()})}),h.jsx(Yr,{onClick:E=>{E.stopPropagation(),f(!1),c(!e.archived)},children:h.jsx("span",{children:e.archived?qne():xW()})}),h.jsx(Yr,{danger:!0,onClick:E=>{E.stopPropagation(),f(!1),d()},children:h.jsx("span",{children:eZ()})})]})]})}const M8=[qE,nN,zx,wx],Xv=[{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"}],R8="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function Ift({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:a,onSelectMainView:o,experimentsActive:l,filesActive:c,artifactsActive:d,onOpenExperiments:_,onOpenArtifacts:f,onOpenFile:m,onOpenRun:g,runExperimentName:S,onOpenExperiment:k,experimentName:b,onOpenPlan:v,onOpenSubagent:x,onOpenWorktree:y,onOpenDemoWelcome:C,composerPrefill:A=null,onActiveSessionChange:E,preferredAgent:j,onPreferredAgentChange:T,children:D}){var $h,Hh,Ph;const[I,P]=M.useState([]),[H,F]=M.useState(null),[V,X]=M.useState(new Set),[W,Z]=M.useState("active"),[J,B]=M.useState(""),[L,$]=M.useState([]),K=M.useRef(0),G=M.useRef({projectId:e,activeId:H});G.current={projectId:e,activeId:H};const[re,oe]=M.useState([]),[he,ie]=M.useState(null),[q,te]=M.useState(null),le=M.useRef(Promise.resolve()),ge=M.useRef(0),ue=M.useRef(0),[Ce,Ee]=M.useState(null),Le=M.useRef(null),Pe=M.useRef(!1),Ve=M.useRef(null),[ft,Be]=M.useReducer(Wdt,{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}}),[wt,At]=M.useState([]),[vt,Ot]=M.useState(j);M.useEffect(()=>Ot(j),[j]);const[St,kt]=M.useState({}),[xe,je]=M.useState({}),[We,st]=M.useState(null),nt=M.useRef(!1),Ht=M.useRef(null),[bt,nn]=M.useState(null),Wt=M.useRef(null),[pn,Lt]=M.useState(new Map),En=M.useRef(new Map),Ft=M.useRef(new Set),br=M.useRef(new Set),mn=M.useRef(0),Ye=M.useRef([]),xt=M.useRef(null),Wn=M.useRef(null),Kn=M.useRef(!0),[Nt,rt]=M.useState(!0),Ie=M.useRef(null),it=Ao(),Ut=M.useCallback(se=>{var me;K.current+=1,$(ze=>[...ze,{id:`annotation-${K.current}`,...se}]),(me=Ie.current)==null||me.focus()},[]),en=Bdt(Wn,Ut);$dt(L),M.useEffect(()=>{$([]),en.dismiss()},[H,e,en.dismiss]);const[Mt,Ln]=M.useState([]),[_r,is]=M.useState(0),[or,xr]=M.useState(!1),[Ts,Nn]=M.useState(0),rn=M.useRef(!1);M.useEffect(()=>{EXe().then(Ln).catch(()=>{})},[a]);function Fn(se){if(!wr)return;if(se.source==="command"&&se.name==="plan"){Or(J,wr);return}const me=y8(J,wr,se.name,2);B(me.text),window.requestAnimationFrame(()=>{var ze,Te;(ze=Ie.current)==null||ze.focus(),(Te=Ie.current)==null||Te.setSelectionRange(me.cursor,me.cursor),Nn(me.cursor)})}function Dr(se){const me=se.selectionStart;if(rn.current||me!==se.selectionEnd)return!1;const ze=Fv(J,me);if(!ze||ze.end!==me||!sa(ze.query))return!1;const Te=w8(J,ze);return B(Te.text),Nn(Te.cursor),window.requestAnimationFrame(()=>se.setSelectionRange(Te.cursor,Te.cursor)),!0}function Lr(se){ie(null);let Te=re.reduce((Xe,Ct)=>Xe+Ct.size,0);for(const Xe of se){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Xe.type))continue;if(Xe.size>31457280){ie(OW({name:Ae(Xe.name)}));continue}if(Te+Xe.size>41943040){ie(HW());continue}Te+=Xe.size;const Ct=new FileReader;Ct.onload=()=>{const Ir=Ct.result;oe(ti=>[...ti,{dataUrl:Ir,mediaType:Xe.type,name:Xe.name,size:Xe.size}])},Ct.readAsDataURL(Xe)}}function qr(se){const me=Array.from(se.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);me.length>0&&(se.preventDefault(),Lr(me))}const ln=I.find(se=>se.id===H),lr=vt??Xct(wt),Sn=ln?{harness:ln.harness,model:St.model??ln.model,serviceTier:St.serviceTier!==void 0?St.serviceTier:ln.serviceTier,permissionMode:St.permissionMode??ln.permissionMode,reasoningLevel:St.reasoningLevel??ln.reasoningLevel}:lr?{...lr,...St}:null,et=Sn?wt.find(se=>se.id===Sn.harness):void 0,_t=et==null?void 0:et.options,yr=M.useMemo(()=>ldt(Mt,_t==null?void 0:_t.planActivation),[Mt,_t==null?void 0:_t.planActivation]),wr=Fv(J,Ts),Gr=(wr==null?void 0:wr.query)??null,Un=Gr===null?[]:yr.filter(se=>se.name.startsWith(Gr)),vs=Gr!==null&&(wr==null?void 0:wr.end)===Ts&&Un.some(se=>se.name!==Gr)&&!or?Un:[],as=vs.length>0,js=Math.min(_r,Math.max(0,vs.length-1));M.useEffect(()=>is(0),[Gr]);const Zt=Sn&&et&&et.models.length>0&&!et.models.some(se=>se.id===Sn.model)?et.models[0].id:(Sn==null?void 0:Sn.model)??null,It=Sn&&{...Sn,model:Zt,serviceTier:J0(et,Zt,Sn.serviceTier),reasoningLevel:mN(et,Zt,Sn.reasoningLevel)},Ys=Hp(et,It==null?void 0:It.model),Ii=se=>{if(!It)return;const me={...It,...se},ze={};se.model!==void 0&&se.model!==It.model&&(ze.model=se.model),se.serviceTier!==void 0&&se.serviceTier!==It.serviceTier&&(ze.serviceTier=se.serviceTier),se.permissionMode!==void 0&&se.permissionMode!==It.permissionMode&&(ze.permissionMode=se.permissionMode),se.reasoningLevel!==void 0&&se.reasoningLevel!==It.reasoningLevel&&(ze.reasoningLevel=se.reasoningLevel),je(Te=>({...Te,...ze})),Ot(me),T(me).catch(()=>{}),ln?kt(Te=>({...Te,...se})):se.harness&&se.harness!==It.harness&&kt({})},Sr=M.useCallback(se=>{const me=le.current.catch(()=>{}).then(se);return le.current=me.then(()=>{},()=>{}),me},[]),os=se=>{if(se==="plan"&&(et==null?void 0:et.id)==="claude-code"?(je(Te=>({...Te,permissionMode:se})),kt(Te=>({...Te,permissionMode:se}))):(kt(Te=>{const Xe={...Te};return delete Xe.permissionMode,Xe}),Ii({permissionMode:se})),!ln)return;const me=ln.id,ze=++ge.current;te(null),Sr(()=>$Xe(me,se)).then(Te=>{P(Xe=>Xe.map(Ct=>Ct.id===Te.id?Te:Ct)),ge.current===ze&&kt(Xe=>{const Ct={...Xe};return delete Ct.permissionMode,Ct})}).catch(()=>{ge.current===ze&&(kt(Te=>{const Xe={...Te};return delete Xe.permissionMode,Xe}),te(Zne()))})},bs=se=>Ii({reasoningLevel:se}),cr=(It==null?void 0:It.harness)==="claude-code"?It.permissionMode==="plan":(_t==null?void 0:_t.planActivation)==="command"?Ce??(ln==null?void 0:ln.planMode)??!1:!1;M.useEffect(()=>{Ce===null||(ln==null?void 0:ln.planMode)!==Ce||(Le.current=null,Ee(null))},[ln==null?void 0:ln.planMode,Ce]);async function Xs(se){if(je(Te=>({...Te,planMode:se})),Le.current=se,Ee(se),!ln)return;const me=ln.id,ze=++ue.current;te(null);try{const Te=await Sr(()=>BXe(me,se));P(Xe=>Xe.map(Ct=>Ct.id===Te.id?Te:Ct)),ue.current===ze&&(Le.current=null,Ee(null),te(null))}catch(Te){throw ue.current===ze&&(Le.current=null,Ee(null)),Te}}async function Ml(){if((It==null?void 0:It.harness)==="claude-code"){os("auto");return}if(ln)try{await Xs(!1)}catch{te(aK())}}async function $a(){const se=!cr;try{if((It==null?void 0:It.harness)==="claude-code")os(se?"plan":"auto");else if((_t==null?void 0:_t.planActivation)==="command")await Xs(se);else throw new Error(J6())}catch{te(e7())}}function Or(se,me){const ze=w8(se,me);B(ze.text),xr(!0),$a(),window.requestAnimationFrame(()=>{var Te,Xe;(Te=Ie.current)==null||Te.focus(),(Xe=Ie.current)==null||Xe.setSelectionRange(ze.cursor,ze.cursor),Nn(ze.cursor)})}Ye.current=I;const ls=M.useCallback(async()=>{const se=Ye.current.map(me=>me.id);try{const me=(await T0(e)).filter(Te=>!br.current.has(Te.id)),ze=new Set(me.map(Te=>Te.id));for(const Te of se)ze.has(Te)||De(Te);return P(Te=>{const Xe=new Map(Te.map(Ct=>[Ct.id,Ct.contextUsage]));return me.map(Ct=>({...Ct,contextUsage:Ct.contextUsage??Xe.get(Ct.id)}))}),En.current=new Map(me.map(Te=>[Te.id,Te.title])),Be({type:"seedBusy",sessions:me.filter(Te=>Te.busy).map(Te=>Te.id),known:me.map(Te=>Te.id)}),me}catch{return null}},[e]),Zs=M.useCallback(async se=>{const me=G.current.activeId===se?Ht.current:void 0,[{messages:ze,queued:Te,activeLeafId:Xe}]=await Promise.all([Au(se),ls()]),Ct=me!==void 0&&G.current.activeId===se&&Ht.current!==me;Be({type:"seed",sessionId:se,messages:ze,queued:Te,activeLeafId:Ct?Ht.current:Xe})},[ls,Be]);M.useEffect(()=>{P([]),Ye.current=[],F(null);const se=KT();X(e===K1?new Set([sN,iN].filter(me=>!se.has(me))):new Set),B(""),oe([]),Be({type:"reset"}),Ft.current=new Set,Lt(new Map),En.current=new Map,ls().then(me=>{me&&F(ze=>{var Te,Xe;return ze??(e===K1?(Te=me.find(Ct=>Ct.id===Nf))==null?void 0:Te.id:void 0)??((Xe=me.find(Ct=>!Ct.archived))==null?void 0:Xe.id)??null})})},[e,ls]),M.useEffect(()=>{je({}),Wt.current=null},[H]),M.useEffect(()=>{!H||Ft.current.has(H)||(Ft.current.add(H),Au(H).then(({messages:se,queued:me,activeLeafId:ze})=>Be({type:"seed",sessionId:H,messages:se,queued:me,activeLeafId:ze})).catch(()=>{Be({type:"seed",sessionId:H,messages:[],onlyIfAbsent:!0}),Ft.current.delete(H)}))},[H]),M.useEffect(()=>Hf(se=>{switch(se.type){case"session":{if(se.session.projectId!==e||br.current.has(se.session.id))return;const me=En.current.has(se.session.id),ze=En.current.get(se.session.id)!==se.session.title;En.current.set(se.session.id,se.session.title),me&&ze&&se.session.titleSource==="generated"&&(Lt(Te=>{const Xe=new Map(Te);return Xe.set(se.session.id,(Te.get(se.session.id)??0)+1),Xe}),window.setTimeout(()=>{Lt(Te=>{if(!Te.has(se.session.id))return Te;const Xe=new Map(Te);return Xe.delete(se.session.id),Xe})},Lft)),P(Te=>{const Xe=Te.findIndex(Ir=>Ir.id===se.session.id);if(Xe<0)return[se.session,...Te];const Ct=Te.slice();return Ct[Xe]={...se.session,contextUsage:se.session.contextUsage??Te[Xe].contextUsage},Ct});break}case"sessionDeleted":De(se.sessionId);break;case"message":mn.current++,Be({type:"upsertMessage",sessionId:se.sessionId,message:se.message});break;case"busy":Be({type:"busy",sessionId:se.sessionId,busy:se.busy});break;case"queued":Be({type:"setQueued",sessionId:se.sessionId,items:se.items});break;case"branch":Be({type:"activeLeaf",sessionId:se.sessionId,leafId:se.activeLeafId});break;case"usage":P(me=>me.map(ze=>ze.id===se.sessionId?{...ze,contextUsage:se.usage}:ze));break}}),[e]),M.useEffect(()=>Hf(se=>{if(se.type!=="reconnected"||(ls(),!H||!Ft.current.has(H)))return;const me=ze=>{const Te=mn.current;Au(H).then(({messages:Xe,queued:Ct,activeLeafId:Ir})=>{Be({type:"seed",sessionId:H,messages:Xe,queued:Ct,activeLeafId:Ir}),ze&&mn.current!==Te&&me(!1)}).catch(()=>{})};me(!0)}),[H,ls]);const Yn=H?ft.messagesBySession[H]??z8:z8,Bi=H?ft.activeLeafBySession[H]??null:null;Ht.current=Bi;const Hn=M.useMemo(()=>YXe(Yn,Bi),[Yn,Bi]),zn=H?ft.busySessions.has(H):!1,Qs=!zn&&!!(et!=null&&et.agentReady),ra=zn&&kN(Hn)!=null,Dc=zn&&tZe(Hn),ur=H?ft.queuedBySession[H]??[]:[],Ha=ur.some(se=>se.dispatchState==="retrying"),Pa=ur.findIndex(se=>se.dispatchState==="blocked"),Fa=ur.reduce((se,me)=>me.dispatchState!=="retrying"||typeof me.nextRetryAt!="number"?se:se===null?me.nextRetryAt:Math.min(se,me.nextRetryAt),null),[Ro,Ms]=M.useState(()=>Date.now());M.useEffect(()=>{if(!Ha||Fa===null||(Ms(Date.now()),Fa<=Date.now()))return;const se=window.setInterval(()=>{const me=Date.now();Ms(me),me>=Fa&&window.clearInterval(se)},1e3);return()=>window.clearInterval(se)},[Ha,Fa]),M.useEffect(()=>{const se=ur.reduce((me,ze)=>ze.planMode??me,void 0);se!==void 0?(Pe.current=!0,Le.current=se,Ee(se)):Pe.current&&(Pe.current=!1,Le.current=null,Ee(null))},[ur]);const Lc=!!H&&!(H in ft.messagesBySession),Ua=M.useMemo(()=>{const se=new Set;for(const me of ft.busySessions)(ft.messagesBySession[me]??[]).some(ze=>ze.parts.some(Te=>Te.type==="prompt"&&Te.prompt&&!Te.prompt.resolved&&Te.prompt.nativeId))&&se.add(me);return se},[ft.busySessions,ft.messagesBySession]),xs=H?Ua.has(H):!1,nr=ln,qa=nr?pn.get(nr.id):void 0,rr=M.useMemo(()=>{var se;for(let me=Hn.length-1;me>=0;me--)for(const ze of Hn[me].parts)if(ze.type==="prompt"&&((se=ze.prompt)==null?void 0:se.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[Hn]),yi=M.useMemo(()=>zn?eZe(Hn):null,[Hn,zn]),Rs=M.useMemo(()=>{const se=nr==null?void 0:nr.harness;if(!H||se!=="claude-code"&&se!=="codex")return null;for(let me=Hn.length-1;me>=0;me--)for(const ze of Hn[me].parts)if(!(ze.type!=="prompt"||!ze.prompt||ze.prompt.resolved)&&ze.prompt.kind==="question")return ze.prompt.nativeId&&!ft.busySessions.has(H)?null:ze.id;return null},[Hn,nr==null?void 0:nr.harness,H,ft.busySessions]),sa=se=>!Rs&&yr.some(me=>me.name===se),[Ds,ia]=M.useState(null),Ls=Ds&&Ds.sessionId===H?Ds:null;M.useEffect(()=>{if(!Ds)return;const se=ft.busySessions.has(Ds.sessionId),me=Ds.sessionId===H&&rr&&rr.promptId!==Ds.promptId;(!se||me)&&ia(null)},[Ds,rr,ft.busySessions,H]);const Ga=M.useMemo(()=>l4(Hn),[Hn]),aa=zn&&!!(et!=null&&et.supportsSteering)&&!!(et!=null&&et.agentReady)&&!rr&&!Rs&&!Ga&&re.length===0&&L.length===0,Xr=M.useMemo(()=>v&&H?(se,me,ze)=>v(se,H,me,ze):void 0,[v,H]),Do=M.useMemo(()=>x&&H?(se,me,ze)=>x(H,se,me,ze):void 0,[x,H]),Zr=M.useMemo(()=>m&&((se,me,ze,Te,Xe)=>m(se,H??void 0,me,ze,Te,Xe)),[m,H]);M.useEffect(()=>{ge.current+=1,ue.current+=1;const se=(H?ft.queuedBySession[H]??[]:[]).reduce((me,ze)=>ze.planMode??me,void 0);Pe.current=se!==void 0,Le.current=se??null,Ee(se??null),kt({}),te(null)},[H]),M.useEffect(()=>{E==null||E(H)},[H,E]);const Pn=a==="chat"&&(Hn.length>0||zn),ys=(It==null?void 0:It.harness)??null,oa=(It==null?void 0:It.model)??null,[Qr,kn]=M.useState(null),cs=`${e}\0${ys??""}\0${oa??""}`,kr=a==="chat"&&!Pn&&!Lc;M.useEffect(()=>{if(!kr||!ys)return;let se=!0;return xYe(e,ys,oa,N()).then(me=>{se&&kn({key:cs,prompts:me.prompts})}).catch(()=>{se&&kn({key:cs,prompts:null})}),()=>{se=!1}},[e,ys,oa,cs,kr]);const $i=(Qr==null?void 0:Qr.key)===cs?Qr.prompts:null,vd=ys!==null&&(Qr==null?void 0:Qr.key)!==cs,Rl=se=>{B(se),xr(!1),window.requestAnimationFrame(()=>{const me=Ie.current;me&&(me.focus(),me.setSelectionRange(se.length,se.length),Nn(se.length))})};M.useEffect(()=>{A&&(B(A),xr(!1),Nn(A.length))},[A]);const Js=M.useCallback(se=>{const me=se.scrollHeight-se.scrollTop-se.clientHeight<60;Kn.current=me,rt(me)},[]),Vr=M.useCallback(()=>{Kn.current=!0,rt(!0);const se=xt.current;se&&(se.scrollTop=se.scrollHeight)},[]);M.useLayoutEffect(()=>{Vr()},[H,Pn,Vr]),M.useLayoutEffect(()=>{Kn.current&&Vr()},[Hn,zn,Vr]),M.useEffect(()=>{const se=xt.current,me=Wn.current;if(!se||!me)return;const ze=new ResizeObserver(()=>{if(Kn.current){se.scrollTop=se.scrollHeight;return}Js(se)});return ze.observe(me),ze.observe(se),()=>ze.disconnect()},[Pn,Js]);const ei=M.useCallback(se=>{se.currentTarget.blur(),Vr()},[Vr]);async function Va({queue:se=!1}={}){var Ol,Sd,kd,$c,Hc;const me=J.trim(),ze=Rs?null:cdt(me,_t==null?void 0:_t.planActivation),Te=!!ze,Xe=!cr,Ct=udt(_t==null?void 0:_t.planActivation,Te?Xe:void 0,Le.current),Ir=Te&&(et==null?void 0:et.id)==="claude-code"?Xe?"plan":"auto":void 0,ti=ze?ze.prompt:me,wi=re,la=L,Ll=la.map(Cn=>({text:Cn.text})),Fh=e;let xd=H;const Ka=()=>{const Cn=G.current;return Cn.projectId===Fh&&Cn.activeId===xd},Bc=()=>{Ka()&&(B(Cn=>Cn||me),oe(Cn=>Cn.length?Cn:wi),$(Cn=>Cn.length?Cn:la))};if(Te&&!ti&&wi.length===0&&la.length===0){B(""),xr(!1);try{if((et==null?void 0:et.id)==="claude-code")os(Xe?"plan":"auto");else if((_t==null?void 0:_t.planActivation)==="command")await Xs(Xe);else throw new Error(J6())}catch{te(e7()),Bc()}return}const sr=It?{...It,...Ir?{permissionMode:Ir}:{}}:null;Ir&&os(Ir);let yd=null;const wd=Le.current;Te&&(_t==null?void 0:_t.planActivation)==="command"&&(yd=++ue.current,Le.current=Xe,Ee(Xe));const Oo=()=>{yd===null||ue.current!==yd||(Le.current=wd,Ee(wd))};if(!ti&&wi.length===0&&la.length===0)return;if((ti||la.length>0)&&Rs&&wi.length===0){B(""),$([]),Tt({promptId:Rs,answers:[],note:ti||void 0,annotations:Ll}).then(Cn=>{Cn||Bc()});return}const Io=JSON.stringify({text:ti,images:wi.map(Cn=>({mediaType:Cn.mediaType,name:Cn.name,dataUrl:Cn.dataUrl})),annotations:Ll,settings:sr?{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:Ct,reasoningLevel:sr.reasoningLevel}:null}),Pi=((Ol=Wt.current)==null?void 0:Ol.signature)===Io?Wt.current.id:`ct_${crypto.randomUUID()}`;if(Wt.current={signature:Io,id:Pi},zn){if(!H||!(et!=null&&et.agentReady)){Oo();return}const Cn=H;B(""),oe([]),$([]),ie(null);const ca=sr?{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:(_t==null?void 0:_t.planActivation)==="command"?Ct??(ln==null?void 0:ln.planMode):Ct,reasoningLevel:sr.reasoningLevel}:{};kt({});const ua=wi.map(Br=>({mediaType:Br.mediaType,dataBase64:Br.dataUrl.slice(Br.dataUrl.indexOf(",")+1),name:Br.name}));try{(Sd=(await Sr(()=>Y7(Cn,ti,ca,ua.length?ua:void 0,Ll,Pi,aa&&!se&&!Te?"steer":void 0))).turn)!=null&&Sd.existing&&await Zs(Cn),je({}),((kd=Wt.current)==null?void 0:kd.id)===Pi&&(Wt.current=null)}catch{Oo(),Bc()}return}if(!(et!=null&&et.agentReady)){Oo();return}if(!sr){Oo();return}B(""),oe([]),$([]),ie(null);let Fi=H;try{if(!Fi){const $r=await DXe(e,sr.harness,{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:Ct,reasoningLevel:sr.reasoningLevel});Ft.current.add($r.id),P(Um=>[$r,...Um]),F($r.id),Fi=$r.id,xd=$r.id,G.current={projectId:e,activeId:$r.id}}Be({type:"optimisticUser",sessionId:Fi,text:ti||zW(),attachments:wi.map($r=>({url:$r.dataUrl,mediaType:$r.mediaType,name:$r.name})),annotations:la}),Be({type:"busy",sessionId:Fi,busy:!0}),Vr(),W==="archived"&&Z("active");const Cn=sr?{model:sr.model,serviceTier:sr.serviceTier,permissionMode:sr.permissionMode,planMode:Ct,reasoningLevel:sr.reasoningLevel}:{};kt({});const ca=wi.map($r=>({mediaType:$r.mediaType,dataBase64:$r.dataUrl.slice($r.dataUrl.indexOf(",")+1),name:$r.name})),ua=Fi;if(!ua)throw new Error(tne());($c=(await Sr(()=>Y7(ua,ti,Cn,ca.length?ca:void 0,Ll,Pi))).turn)!=null&&$c.existing&&await Zs(ua),je({}),((Hc=Wt.current)==null?void 0:Hc.id)===Pi&&(Wt.current=null)}catch(Cn){if(Bc(),Oo(),!Fi)return;const ca=Cn instanceof Error?Cn.message:String(Cn);if(!/session is busy/i.test(ca)&&await T0(e).then(Br=>{var Pc;return!!((Pc=Br.find($r=>$r.id===Fi))!=null&&Pc.busy)}).catch(()=>!1)){Ka()&&(B(Br=>Br===ti?"":Br),oe(Br=>Br===wi?[]:Br),$(Br=>Br===la?[]:Br));return}Be({type:"busy",sessionId:Fi,busy:!1}),Be({type:"localError",sessionId:Fi,text:EK({error:Ae(ca)})})}}function Oc(){H&&VXe(H).catch(()=>{te(gne())})}const bd=M.useCallback(async(se,me)=>{if(!(!H||nt.current)){nt.current=!0,te(null),st(se);try{const ze=_Ze({model:xe.model,serviceTier:xe.serviceTier,permissionMode:xe.permissionMode,planMode:xe.planMode,reasoningLevel:xe.reasoningLevel}),Te=H;(await UXe(Te,se,me,ze)).turn.existing&&await Zs(Te),je({})}catch{te(Cte())}finally{nt.current=!1,st(null)}}},[H,xe,Zs]),Ic=M.useCallback((se,me)=>{if(!H||zn||!(et!=null&&et.agentReady))return;const ze=H;Be({type:"busy",sessionId:ze,busy:!0}),Vr(),Sr(()=>qXe(ze,se,me)).catch(Te=>{Be({type:"busy",sessionId:ze,busy:!1});const Xe=Te instanceof Error?Te.message:String(Te);Be({type:"localError",sessionId:ze,text:Rte({error:Ae(Xe)})})})},[H,zn,et==null?void 0:et.agentReady,Vr,Sr]),ae=M.useCallback(se=>{if(!H||zn)return;const me=H,ze=Ht.current;Be({type:"activeLeaf",sessionId:me,leafId:se}),Sr(()=>GXe(me,se)).catch(Te=>{Be({type:"activeLeaf",sessionId:me,leafId:ze});const Xe=Te instanceof Error?Te.message:String(Te);Be({type:"localError",sessionId:me,text:yne({error:Ae(Xe)})})})},[H,zn,Sr]);function be(se){if(!H)return;const me=H;HXe(me,se).then(({removed:ze})=>{if(ze)return Zs(me)}).catch(()=>te(Ate()))}async function ke(se){if(!H||bt)return;const me=H;te(null),nn(se);try{await PXe(me,se),await Zs(me)}catch{te(Pte())}finally{nn(null)}}M.useEffect(()=>{if(!zn||a!=="chat")return;function se(me){var ze;me.key!=="Escape"||me.defaultPrevented||(me.preventDefault(),Oc(),(ze=Ie.current)==null||ze.focus())}return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[zn,H,a]);function De(se){br.current.add(se),P(me=>me.filter(ze=>ze.id!==se)),F(me=>me===se?null:me),X(me=>{if(!me.has(se))return me;const ze=new Set(me);return ze.delete(se),ze}),Ft.current.delete(se),En.current.delete(se),Be({type:"forget",sessionId:se})}function $e(se,me){const ze=se.archived;P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,archived:me}:Xe)),j8(W,me)||F(Te=>Te===se.id?null:Te),OXe(se.id,me).catch(()=>{P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,archived:ze}:Xe))})}function pt(se,me){const ze=se.title;P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,title:me}:Xe)),IXe(se.id,me).catch(()=>{P(Te=>Te.map(Xe=>Xe.id===se.id?{...Xe,title:ze}:Xe))})}async function ct(se){var ze;const me=((ze=se.title)==null?void 0:ze.trim())||G1();if(window.confirm(QW({title:Ca(me)}))){try{await LXe(se.id)}catch(Te){WN(nK({title:Ca(me),error:Ae(Te instanceof Error?Te.message:String(Te))}),"error");return}De(se.id)}}const Tt=M.useCallback(se=>{if(!H)return Promise.resolve(!1);const me=H;return Be({type:"busy",sessionId:me,busy:!0}),Sr(()=>WXe(me,se)).then(()=>!0).catch(()=>!1).finally(()=>{Au(me).then(({messages:ze,queued:Te,activeLeafId:Xe})=>Be({type:"seed",sessionId:me,messages:ze,queued:Te,activeLeafId:Xe})).catch(()=>{}),T0(e).then(ze=>{var Te;return Be({type:"busy",sessionId:me,busy:!!((Te=ze.find(Xe=>Xe.id===me))!=null&&Te.busy)})}).catch(()=>{})})},[H,e,Sr]),An=I.filter(se=>j8(W,se.archived)),us=/Mac|iPhone|iPad/.test(navigator.platform),ws=us?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",ds=us?"⌘ Enter":"Ctrl + Enter",Os=M.useCallback(()=>{Z("active"),F(null),o("chat")},[o]),Dl=M.useCallback(se=>{Z("all"),F(se),o("chat")},[o]);M.useEffect(()=>{const se=me=>{me.repeat||me.key!=="Enter"||!me.metaKey&&!me.ctrlKey||me.altKey||!me.shiftKey||(me.preventDefault(),Os())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[Os]);const Hi=h.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 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]:py-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,h.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[h.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 ${c?"active":""}`,onClick:y,children:[h.jsx($f,{size:15}),zZ()]}),h.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 ${d?"active":""}`,"data-onboarding":"nav-artifacts",onClick:f,children:[h.jsx(kx,{size:15}),RY()]}),h.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 ${l?"active":""}`,onClick:_,children:[h.jsx(wx,{size:15}),yZ()]}),h.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 ${a==="skills"?"active":""}`,onClick:()=>o("skills"),children:[h.jsx(UE,{size:15}),UX()]}),rdt.map(se=>h.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 ${a!=="chat"&&a!=="skills"&&se.activeTabs.includes(a)?"active":""}`,"data-onboarding":se.id==="compute"?"nav-compute":void 0,onClick:()=>o(se.id),children:[se.icon,se.label()]},se.id))]}),h.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-1.5 ps-4.5",children:[h.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:(($h=uj.find(se=>se.id===W))==null?void 0:$h.railLabel())??tE()}),h.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[h.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":ws,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Os,children:[h.jsx(Ex,{size:13}),bee()]}),h.jsx(Mft,{value:W,onChange:Z})]})]}),h.jsxs("div",{className:"rail-body",children:[An.map(se=>h.jsx(Oft,{session:se,active:se.id===H&&a==="chat",unread:V.has(se.id),busy:ft.busySessions.has(se.id),waiting:Ua.has(se.id),revealTitle:pn.get(se.id),onOpen:()=>{F(se.id),e===K1&&bdt(se.id),X(me=>{if(!me.has(se.id))return me;const ze=new Set(me);return ze.delete(se.id),ze}),o("chat")},onRename:me=>pt(se,me),onSetArchived:me=>$e(se,me),onDelete:()=>void ct(se)},se.id)),An.length===0&&h.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:W==="archived"?PK():I.length>0?RK():GK()})]})]}),Wa=`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 [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::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${r?"":" rail-hidden"}`,Lo=!r&&h.jsx(Jt,{title:Y6(),"aria-label":Y6(),onClick:s,children:h.jsx(JE,{size:15})});return a!=="chat"?h.jsxs(h.Fragment,{children:[r&&Hi,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&h.jsx("div",{className:Wa,children:Lo}),h.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):h.jsxs(h.Fragment,{children:[r&&Hi,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[h.jsxs("div",{className:Wa,children:[Lo,h.jsx(Xf,{variant:"header",title:nr?((Hh=nr.title)==null?void 0:Hh.trim())||G1():j6(),children:nr?h.jsx(dj,{title:((Ph=nr.title)==null?void 0:Ph.trim())||G1(),animate:qa!==void 0},qa??"static"):j6()}),C&&h.jsx(Jt,{"data-tip":M6(),"aria-label":M6(),onClick:C,children:h.jsx(wWe,{size:15})})]}),Lc?h.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:[h.jsx(dn,{}),h.jsx("span",{children:eQ()})]}):Pn?h.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:xt,onScroll:se=>{Js(se.currentTarget),en.dismiss()},children:h.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:Wn,children:[h.jsx(jft,{messages:Hn,allMessages:Yn,canFork:Qs,onFork:Ic,onSelectFork:ae,busy:zn,onOpenFile:Zr,onOpenRun:g,onOpenSpawnedSession:Dl,runExperimentName:S,onOpenExperiment:k,experimentName:b,onRespond:Tt,onOpenPlan:Xr,onOpenSubagent:Do,recoveringTurnId:We,onRecover:bd,skills:yr}),zn&&xs&&h.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Bee()}),zn&&!xs&&!ra&&!Dc&&h.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:h.jsx("span",{className:"tool-running-shimmer",children:Ane()})})]})}):h.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:[h.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:h.jsx(Rx,{})}),h.jsx("h2",{children:Fee()}),h.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:[h.jsx($f,{size:19}),h.jsx("span",{children:n})]}),vd&&h.jsx("div",{className:R8,role:"status","aria-live":"polite","aria-label":see(),"aria-busy":"true",children:M8.map((se,me)=>h.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 ${Xv[me].box}`,children:[h.jsxs("span",{className:`flex w-full items-center gap-2.5 ${Xv[me].icon}`,children:[h.jsx(se,{size:17}),h.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),h.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},me))}),$i&&h.jsx("div",{className:R8,role:"group","aria-label":lee(),children:$i.map((se,me)=>{const ze=M8[me],Te=Xv[me];return h.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 ${Te.box}`,onClick:()=>Rl(se.prompt),children:[h.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[h.jsx(ze,{size:17,className:Te.icon}),se.title]}),h.jsx("span",{className:"w-full truncate text-sm text-subtext",children:se.prompt})]},me)})})]}),en.action&&h.jsxs(Qe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:en.action.x,top:en.action.top,transform:"translateX(-50%)"},onMouseDown:se=>se.preventDefault(),onClick:en.add,children:[h.jsx(QE,{size:14}),IY()]}),h.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:[Pn&&h.jsx(Jt,{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 ${Nt?"opacity-0":"opacity-100"}`,title:Q6(),"aria-label":Q6(),inert:Nt,onClick:ei,children:zn&&!xs?h.jsx(yx,{size:18,className:"tool-running-shimmer-icon"}):h.jsx(iWe,{size:16})}),yi&&!rr&&h.jsx(Oct,{list:yi}),rr&&!(Ls&&rr.promptId===Ls.promptId)&&h.jsx(Mct,{synthesized:rr.synthesized,agentLabel:nr?kf[nr.harness]:Cne(),showResumeModes:(nr==null?void 0:nr.harness)==="claude-code",onView:se=>Xr==null?void 0:Xr(rr.plan,rr.promptId,se),onApprove:se=>Tt({promptId:rr.promptId,approve:!0,...se?{resumeMode:se}:{}}),onReject:()=>Tt({promptId:rr.promptId,approve:!1}),onRevise:se=>{H&&ia({sessionId:H,promptId:rr.promptId}),Tt({promptId:rr.promptId,approve:!1,note:se})}}),ur.length>0&&h.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ur.map((se,me)=>h.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:se.error?`${se.text} +`).trim()}function bft(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 xft(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=OZe(r),uj(r)}function uj(e){return wft(e).replace(/[\t\r ]+/g," ").trim()}function yft(e){let n=null,t=!1;for(let r=0;r!a.startsWith("-")&&a.includes(":"));if(!n)return null;const t=n.indexOf(":"),r=n.slice(0,t),s=n.slice(t+1);return r&&fj(s)?{ref:r,path:s}:null}function Cft(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 L8(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 a of n.split("/"))if(!(!a||a===".")){if(a===".."){r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(a);continue}r.push(a)}return`${t?"/":""}${r.join("/")}`||(t?"/":null)}function Eft(e,n,t,r){if(e.startsWith("/"))return e;let s=r??"";for(let a=0;a!d.startsWith("-"));if(!l)return null;const c=L8(s,l);if(!c)return null;s=c}return s?L8(s,e):e}const ba="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Nft=new RegExp(`\\bchat_(${ba})\\b`,"gi"),pc=`(?:${ba}|[0-9a-f]{8})`;function Hu(e){const n=[];let t="",r="",s=null,a=!1;const o=()=>{(t.trim()||r.trim())&&n.push({raw:t.trim(),code:r.trim()}),t="",r=""},l=d=>{let _=1,f=null,m=!1;for(let g=d;g{let _=!1;for(let f=d;f$Ze(t.raw,n))}function Mi(e,n){return ym(e,n).length>0}function zft(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,lj).matchAll(Nft))if(n.add(t[0].toLowerCase()),n.size>=Cl)break;return[...n]}function R2(e,n){if(!e)return[];const t=new Set,r=e.slice(0,lj),s=n==="runs"?[new RegExp(`/runs/(${ba})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${ba})`,"gi"),new RegExp(`^\\s*RUN\\s+(${ba})\\b`,"gim"),new RegExp(`={3,}\\s*(${ba})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${ba})`,"gi"),new RegExp(`^\\s*id:\\s*(${ba})`,"gim"),new RegExp(`={3,}\\s*(${ba})\\s*={3,}`,"gi")];for(const o of s)for(const l of r.matchAll(o))if(t.add(l[1]),t.size>=Cl)return[...t];const a=new RegExp(`^\\s*(${ba})(?:\\s|$)`,"gim");for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Cl)break;return[...t]}function _j(e,n){let t=0;return n.map(r=>{const s=e.indexOf(r.raw,t),a=s===-1?e.indexOf(r.raw):s;return t=Math.max(t,a+r.raw.length),{invocation:r,offset:Math.max(0,a)}})}function pj(e,n,t,r){const s=new RegExp(`(?:^|[\\s;])(?:export\\s+)?${n}\\s*=\\s*(?:"([^"]*)"|'([^']*)'|([^\\s;]+))`,"gi");let a="";for(const o of e.matchAll(s)){if((o.index??0)>=t)break;a=o[1]??o[2]??o[3]??""}return[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function mj(e,n,t,r){const s=new RegExp(`\\bfor\\s+${n}\\s+in\\s+([\\s\\S]*?)(?:;|\\n)\\s*do\\b`,"gi");let a="";for(const o of e.matchAll(s)){const l=o.index??0;if(l>=t)break;const c=l+o[0].length;c<=t&&/\bdone\b/.test(e.slice(c,t))||(a=o[1])}return/\$\(|`/.test(a)?[]:[...a.matchAll(new RegExp(r,"gi"))].map(o=>o[0])}function Aft(e,n,t=[],r=[]){const s=ym(e,"logs"),a=new Set;if(s.length===0){if(!Mi(e,"logs"))return[];const l=t.length>0?[]:R2(n,"runs");for(const c of t.length>0?t:l.length>0?l:r)if(a.add(c),a.size>=Cl)break;return $u([...a])}let o=!1;for(const{invocation:l,offset:c}of _j(e,s)){const d=Xu(l.raw);if((d==null?void 0:d[0])!=="logs")continue;const _=d.slice(1);let f=null;for(let b=0;b<_.length;b++){const v=_[b];if(v!=="--head"){if(v==="--bytes"||v==="--range"){b++;continue}if(!(v.startsWith("--bytes=")||v.startsWith("--range="))){f=v;break}}}if(!f){o=!0;continue}if(new RegExp(`^${pc}$`,"i").test(f)){a.add(f);continue}const m=/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(f);if(!m){o=!0;continue}const g=m[1],S=pj(e,g,c,pc);for(const b of S)a.add(b);const k=mj(e,g,c,pc);for(const b of k)a.add(b);S.length===0&&k.length===0&&(o=!0)}if(a.size===0||o){const l=t.length>0?[]:R2(n,"runs"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=Cl)break}return $u([...a])}function yu(e,n,t=[],r=[]){const s=ym(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const a=new Set;let o=!1;for(const{invocation:l,offset:c}of _j(e,s)){const d=Xu(l.raw),_=(d==null?void 0:d[0])==="exp"&&(d[1]==="status"||d[1]==="desc")?d[2]:null;let f=!1;_&&new RegExp(`^${pc}$`,"i").test(_)&&(a.add(_),f=!0);const m=_?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(_):null;if(m){const g=m[1],S=pj(e,g,c,pc);if(S.length>0){for(const b of S)a.add(b);f=!0}const k=mj(e,g,c,pc);for(const b of k)a.add(b);k.length>0&&(f=!0)}f||(o=!0)}if(a.size===0||o){const l=t.length>0?[]:R2(n,"experiments"),c=t.length>0?t:l.length>0?l:r;for(const d of c)if(a.add(d),a.size>=Cl)break}return $u([...a])}function El(e){var b,v,x,y;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)):{},a={...t,...s},o=Es(a,"command","cmd"),l=vft(a,"commandArgv"),c=((v=e.state)==null?void 0:v.output)||((x=e.state)==null?void 0:x.error),d=$u(Qv(a,"targetIds")),_=$u(Qv(a,"runTargetIds")),f=$u(Qv(a,"experimentTargetIds")),m=Es(a,"filePath","file_path","notebookPath","notebook_path","path"),g=Es(a,"description"),S=Vp(n);if(Sh(n)){const C=NN(e);return{kind:"task",label:C?WF({done:Ft(C.done),total:Ft(C.total)}):rE()}}if(S==="run"&&kN(n).includes("web")){const C=Zv(a,"search_query","q"),A=Zv(a,"image_query","q"),E=Zv(a,"find","pattern");return C?{kind:"web",label:C6({query:C})}:A?{kind:"web",label:WP({query:A})}:E?{kind:"web",label:dF({pattern:E})}:Array.isArray(a.open)?{kind:"web",label:SQ()}:Array.isArray(a.weather)?{kind:"web",label:qX()}:Array.isArray(a.finance)?{kind:"web",label:OX()}:Array.isArray(a.sports)?{kind:"web",label:HX()}:Array.isArray(a.time)?{kind:"web",label:MX()}:{kind:"web",label:H6()}}switch(new Map([["read_file","read"],["write_file","write"],["edit_file","edit"],["exec","bash"],["exec_command","bash"],["run_command","bash"],["agent","task"],["collabagenttoolcall","subagent"],["subagentactivity","subagent"]]).get(S)??S){case"bash":{if(!o&&!(l!=null&&l.length))return{kind:"command",label:XQ()};const C=xft(o??(l==null?void 0:l.join(" "))??""),A=Hu(C);let E=A.map(oe=>oe.raw);if(l!=null&&l.length){const oe=BZe(l);E=oe===null?[l]:Hu(uj(oe)).map(he=>he.raw)}let j=null;for(const oe of E)if(j=HZe(oe),j)break;const T=E.some(oe=>{const he=Xu(oe);return he!==null&&he[0]!=="discover"&&he[0]!=="paper"});if(j&&!T){const oe=j.kind==="discover"?{keyword:AP(),embedding:RP(),openalex:sF(),biorxiv:IP()}[j.strategy]:null,he=j.kind==="discover"?j.query?$$({activity:oe??k6(),query:j.query}):oe??k6():j.id?lf({target:Te(j.id)}):AH();return{kind:j.kind==="paper"?"read":"search",label:he,litCall:j}}if(Mi(C,"agent\\s+spawn"))return{kind:"agent",label:lZ(),spawnedSessionIds:zft(c),litCall:j??void 0};const D=A.map(oe=>hj(oe.raw)),I=Mi(C,"exp\\s+status"),P=Mi(C,"exp\\s+desc"),B=ym(C,"exp\\s+desc").some(oe=>(Xu(oe.raw)??[]).some(ie=>ie==="--set"||ie.startsWith("--set=")||ie==="--stdin")),F=B?UF():CH(),V=B?YB():cP();if(Mi(C,"logs")){const oe=Aft(C,c,_,d);return{kind:"project",label:oe.length===1?tP():iP(),runIds:oe,litCall:j??void 0}}if(Mi(C,"exp\\s+run"))return{kind:"project",label:fee(),litCall:j??void 0};if(Mi(C,"exp\\s+wait"))return{kind:"project",label:Vee(),litCall:j??void 0};if(Mi(C,"exp\\s+cancel"))return{kind:"project",label:hX(),litCall:j??void 0};const X=Mi(C,"project\\s+view");if(X&&I&&P)return{kind:"project",label:V,experimentIds:yu(C,c,f,d),litCall:j??void 0};if(X&&P)return{kind:"project",label:F,experimentIds:yu(C,c,f,d),litCall:j??void 0};if(X&&I)return{kind:"project",label:P6(),experimentIds:yu(C,c,f,d),litCall:j??void 0};if(X)return{kind:"project",label:fJ(),litCall:j??void 0};if(I&&P)return{kind:"project",label:V,experimentIds:yu(C,c,f,d),litCall:j??void 0};if(I)return{kind:"project",label:P6(),experimentIds:yu(C,c,f,d),litCall:j??void 0};if(P)return{kind:"project",label:F,experimentIds:yu(C,c,f,d),litCall:j??void 0};if(Mi(C,"runs?"))return{kind:"project",label:sQ(),litCall:j??void 0};if(Mi(C,"projects"))return{kind:"project",label:lQ(),litCall:j??void 0};if(Mi(C,"compute"))return{kind:"project",label:yX(),litCall:j??void 0};const W=D.map(kft).find(oe=>oe!=null);if(W){const oe=Xv(W.path);return{kind:oe?"skill":"read",label:oe?G1({name:Te(oe)}):lf({target:Te(ic(W.path))}),filePath:W.path,fileRef:W.ref,labelTarget:oe?`${oe} skill`:ic(W.path)}}const Z=D.findIndex(oe=>oe!=null&&["sed","cat","head","tail"].includes(oe.name)),J=Z>=0?D[Z]:null,$=J?Sft(J):null,L=$?Eft($,A,Z,Es(a,"cwd","workdir")):null;if($&&L){const oe=Xv(L);return{kind:oe?"skill":"read",label:oe?G1({name:Te(oe)}):lf({target:Te(ic($))}),filePath:L,labelTarget:oe?`${oe} skill`:ic($)}}if(D.some(oe=>(oe==null?void 0:oe.name)==="find"||(oe==null?void 0:oe.name)==="ls"||(oe==null?void 0:oe.name)==="rg"&&oe.args.includes("--files")))return{kind:"search",label:W6()};const H=D.findIndex(oe=>(oe==null?void 0:oe.name)==="rg"||(oe==null?void 0:oe.name)==="grep");if(H>=0){const oe=Cft(A[H].raw);return{kind:"search",label:oe?W1({pattern:Te(oe)}):V1(),searchPattern:oe??void 0}}const Y=D.find(oe=>(oe==null?void 0:oe.name)==="git"),G=Y==null?void 0:Y.args[0];if(G==="grep"){const oe=Y==null?void 0:Y.args.slice(1).find(he=>!he.startsWith("-"));return{kind:"search",label:oe?W1({pattern:Te(oe)}):V1(),searchPattern:oe}}if(G==="status")return{kind:"command",label:zX()};if(G==="diff")return{kind:"command",label:PJ()};if(G==="log")return{kind:"command",label:lJ()};const ee=oe=>D.some(he=>!he||!["cargo","pnpm","npm","yarn"].includes(he.name)?!1:he.args[0]===oe||he.args[0]==="run"&&he.args[1]===oe);return ee("test")?{kind:"command",label:eJ()}:D.some(oe=>(oe==null?void 0:oe.name)==="tsc")||ee("typecheck")?{kind:"command",label:KX()}:ee("lint")?{kind:"command",label:gX()}:ee("build")?{kind:"command",label:iX()}:{kind:"command",label:hH({command:Te(C)})}}case"skill":{const C=Es(a,"skill","name"),A=C?gft(n,C):null;return{kind:"skill",label:C?tH({name:Te(C)}):Z$(),filePath:A??void 0,labelTarget:A&&C?`${C} skill`:void 0}}case"read":{const C=m?ic(m):null,A=m?Xv(m):null;return A?{kind:"skill",label:G1({name:Te(A)}),filePath:m??void 0,labelTarget:`${A} skill`}:C?{kind:"read",label:lf({target:Te(C)}),filePath:m??void 0,labelTarget:C}:{kind:"read",label:sJ()}}case"edit":case"write":case"notebookedit":{const C=bft(a),A=m??(C==null?void 0:C.path)??null,E=A?ic(A):null,j=E?(C==null?void 0:C.type)==="add"?d$({target:Te(E)}):(C==null?void 0:C.type)==="delete"?S$({target:Te(E)}):j$({target:Te(E)}):null;return E?{kind:"edit",label:j??q6(),filePath:A??void 0,labelTarget:E}:{kind:"edit",label:q6()}}case"grep":{const C=Es(a,"pattern");return{kind:"search",label:C?W1({pattern:Te(C)}):V1(),searchPattern:C??void 0}}case"glob":{const C=Es(a,"pattern");return{kind:"search",label:C?U$({pattern:Te(C)}):W6()}}case"websearch":{const C=Es(a,"query"),A=Es(a,"url"),E=Es(a,"pattern");return C?{kind:"web",label:C6({query:C})}:E&&A?{kind:"web",label:eF({pattern:E})}:A?{kind:"web",label:cH({target:Te(A)})}:{kind:"web",label:g??H6()}}case"webfetch":{const C=Es(a,"url");return{kind:"web",label:C?lf({target:Te(C)}):g??$H()}}case"task":return{kind:"agent",label:g??gH()};case"subagent":return{kind:"agent",label:Tft(a)};case"error":return{kind:"command",label:Lee()};case"contextcompaction":return{kind:"command",label:r$(),progressLabel:o$()};default:{const C=g??m??o??((y=e.state)==null?void 0:y.title)??"";return{kind:"command",label:C?`${n}: ${C}`:n}}}}function Tft(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 SF();case"sendInput":return bF();case"resumeAgent":return WH();case"wait":return eU();case"closeAgent":return JB()}switch(typeof e.kind=="string"?e.kind:""){case"started":return LF();case"interacted":return IB();case"interrupted":return jF()}return NF()}function yp({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=h.jsx(Mx,{...t});if(e.litCall)r=h.jsx(ON,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=h.jsx(YE,{...t});break;case"read":case"project":r=h.jsx(XE,{...t});break;case"search":r=h.jsx(lN,{...t});break;case"edit":r=h.jsx(Ax,{...t});break;case"web":r=h.jsx(wKe,{...t});break;case"agent":r=h.jsx(Rx,{...t});break;case"task":r=h.jsx(Nx,{...t});break}return h.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function Jv({items:e,onOpen:n,onSelect:t,targetType:r}){const[s,a]=M.useState(!1),o=M.useRef(null),l=M.useRef(!1);return M.useEffect(()=>{var c,d;!s||!l.current||(l.current=!1,(d=(c=o.current)==null?void 0:c.querySelector("button"))==null||d.focus())},[s]),h.jsxs("span",{className:"tool-target-overflow inline",children:[s&&h.jsx("span",{className:"tool-target-reveal",ref:o,children:e.map((c,d)=>h.jsxs("span",{children:[d>0&&", ",n||t?h.jsx("button",{className:"tool-target",...n?gr(_=>n(c.id,_),{stopPropagation:!0}):{onClick:_=>{_.stopPropagation(),t==null||t(c.id)}},children:c.label}):h.jsx("span",{children:c.label})]},c.id))}),s&&", ",h.jsx("button",{className:"tool-target-more","aria-expanded":s,"aria-label":s?iI({target:r}):CB({count:Ft(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),l.current=!s&&c.detail===0,a(d=>!d)},children:s?uE():cse({count:Ft(e.length)})})]})}function D2({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:a,experimentName:o}){var l,c,d,_;if(e.searchPattern)return e.label;if(((l=e.litCall)==null?void 0:l.kind)==="paper"&&e.litCall.id)return h.jsxs("a",{className:"tool-target",href:YZe(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,h.jsx(CWe,{className:"inline ms-1 opacity-50",size:13,"aria-hidden":"true"})]});if(e.filePath&&e.labelTarget&&n){const f=e.filePath;return h.jsx("span",{className:"tool-target",role:"button",tabIndex:0,...gr(m=>n(f,void 0,void 0,e.fileRef,m),{stopPropagation:!0}),children:e.label})}if((c=e.spawnedSessionIds)!=null&&c.length&&r){const f=e.spawnedSessionIds,m=f.slice(0,3),g=f.slice(m.length).map((S,k)=>({id:S,label:L6({number:Ft(m.length+k+1)})}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",h.jsx("button",{className:"tool-target",title:bQ(),onClick:b=>{b.preventDefault(),b.stopPropagation(),r(S)},children:L6({number:Ft(k+1)})})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Jv,{items:g,onSelect:r,targetType:xW()})]})]})}if((d=e.runIds)!=null&&d.length){const f=s?e.runIds.filter(S=>!!s(S)):e.runIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(s==null?void 0:s(S))||_o()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",t?h.jsx("button",{className:"tool-target",title:OI({run:Te(S)}),...gr(b=>t(S,b),{stopPropagation:!0}),children:(s==null?void 0:s(S))||_o()}):h.jsx("span",{children:(s==null?void 0:s(S))||_o()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Jv,{items:g,onOpen:t,targetType:rne()})]})]})}if((_=e.experimentIds)!=null&&_.length){const f=o?e.experimentIds.filter(S=>!!o(S)):e.experimentIds;if(f.length===0)return e.label;const m=f.slice(0,3),g=f.slice(m.length).map(S=>({id:S,label:(o==null?void 0:o(S))||_o()}));return h.jsxs(h.Fragment,{children:[e.label," — ",m.map((S,k)=>h.jsxs("span",{children:[k>0&&", ",a?h.jsx("button",{className:"tool-target",title:kI({name:(o==null?void 0:o(S))||Te(S)}),...gr(b=>a(S,b),{stopPropagation:!0}),children:(o==null?void 0:o(S))||_o()}):h.jsx("span",{children:(o==null?void 0:o(S))||_o()})]},S)),g.length>0&&h.jsxs(h.Fragment,{children:[", ",h.jsx(Jv,{items:g,onOpen:a,targetType:EK()})]})]})}return e.label}function d4(e){const n=e.progressLabel??{skill:iH(),read:UH(),search:pF(),edit:L$(),project:hP(),web:GB(),agent:b$(),command:yP(),task:rE()}[e.kind];return{...e,label:n}}function gj(e,n){const t=El({type:"tool",tool:e,state:{status:"running",input:n}});return{skill:W$(),read:yH(),search:CP(),edit:N$(),project:ZH(),web:PB(),agent:p$(),command:gP(),task:$F()}[t.kind]}function jft(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const Mft=250;function Rft(e,n){const[t,r]=M.useState(e),s=M.useRef(Date.now()),a=M.useRef(e);return M.useEffect(()=>{if(a.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 o=Mft-(Date.now()-s.current);if(o<=0){s.current=Date.now(),r(e);return}const l=window.setTimeout(()=>{s.current=Date.now(),r(a.current)},o);return()=>window.clearTimeout(l)},[e,t,n]),e!=null&&e.label===(t==null?void 0:t.label)?e:t}const Dft=160;function vj(e){const[n,t]=M.useState(!1);return M.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),Dft);return()=>window.clearTimeout(r)},[e]),e&&n}function Lft(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:iE()}}function bj(e){const n=new Map,t=new Set;for(const{activity:a,count:o}of e){const c=a.kind==="read"||a.kind==="edit"||a.kind==="web"?`${a.kind}:${a.filePath??a.fileRef??a.label}`:null;if(c){if(t.has(c))continue;t.add(c)}n.set(a.kind,(n.get(a.kind)??0)+(c?1:o))}const s=["read","search","edit","command","web","project","skill","agent"].flatMap(a=>{const o=n.get(a);return o?[Oft(a,o)]:[]});return s.length>0?s.join(" · "):iE()}function Oft(e,n){const t=n===1,r=Ft(n);switch(e){case"read":return t?yUe():CUe({count:r});case"search":return t?AUe():RUe({count:r});case"edit":return t?iUe():cUe({count:r});case"web":return t?GUe():YUe({count:r});case"project":return t?hUe():gUe({count:r});case"skill":return t?IUe():PUe({count:r});case"agent":return t?UFe():WFe({count:r});case"command":return t?ZFe():tUe({count:r});case"task":return kx()}}function Ift(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 xj(e){const n=[];let t=null;for(const r of e){const s=El(r),a=Ift(r,s),o=n[n.length-1];a&&o&&t===a?o.count++:n.push({part:r,activity:s,count:1}),t=a}return n}function Bft({part:e,busy:n,recovering:t,onRecover:r}){var m,g;const s=(m=e.state)==null?void 0:m.input,a=(s==null?void 0:s.nextRetryAt)??null,[o,l]=M.useState(Date.now());if(M.useEffect(()=>{if(typeof a!="number"||(l(Date.now()),a<=Date.now()))return;const S=window.setInterval(()=>{const k=Date.now();l(k),k>=a&&window.clearInterval(S)},1e3);return()=>window.clearInterval(S)},[a]),e.id==="turn-retry"){const S=jZe(s??{},o);return h.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[h.jsx(dn,{}),h.jsx("span",{children:S})]})}const c=DN(s==null?void 0:s.recoveryAction),d=s==null?void 0:s.turnId;if(c!=="retry"&&c!=="continue"||!d)return null;const _=c==="retry"?Wu():aK(),f=xm(((g=e.state)==null?void 0:g.error)||Kne());return h.jsxs("div",{className:"turn-recovery-row flex items-center justify-between gap-2 py-1.5 px-2.5 border border-border rounded-md bg-background",children:[h.jsx("span",{className:"min-w-0 truncate text-sm text-accent-red",title:f,children:f}),h.jsx(Qe,{type:"button",size:"small",disabled:n||t,onClick:()=>r==null?void 0:r(d,c),children:t?yne():_})]})}function O8({part:e,repeatCount:n=1,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){const c=e.state,d=El(e),_=(c==null?void 0:c.status)==="error",f=xm((c==null?void 0:c.error)||(c==null?void 0:c.output)||""),m=_&&!!f,[g,S]=M.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`,b=h.jsxs(h.Fragment,{children:[_&&h.jsxs("span",{className:"sr-only",children:[_x()," "]}),_?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(eN,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):h.jsx(yp,{activity:d,className:"text-muted"}),h.jsxs("span",{className:`${aj} ${_?"text-accent-red":"text-subtext"}`,children:[h.jsx(D2,{activity:d,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}),n>1&&h.jsxs("span",{className:"tool-repeat-count ms-1 text-muted font-normal",title:hI({count:Ft(n)}),children:["×",n]})]})]});return m?h.jsxs("div",{className:"tool-row tool-row-error flex flex-col min-w-0",children:[h.jsxs("div",{className:"flex items-start gap-2 w-fit max-w-full py-[3px] px-1 min-w-0 rounded-sm",children:[b,h.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":g,"aria-controls":k,"aria-label":g?cI({activity:d.label}):yB({activity:d.label}),onClick:()=>S(v=>!v),children:h.jsx(ja,{size:16,className:`text-accent-red transition-transform duration-120 ease-standard ${g?"rotate-90":""}`})})]}),g&&h.jsx("div",{className:"tool-detail mt-1 me-0 mb-1 ms-6",id:k,children:h.jsx("div",{className:"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",children:f.slice(0,2e4)})})]}):h.jsx("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1",children:b})}function $ft({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l}){var A,E,j,T;const[c,d]=M.useState(!1),_=xj(e),f=_.map(({activity:D})=>D),m=n?_.at(-1):void 0,g=m==null?void 0:m.part,S=m==null?void 0:m.activity,k=((A=g==null?void 0:g.state)==null?void 0:A.status)!=="error"?(S&&d4(S))??null:null,b=!!g&&((E=g.state)==null?void 0:E.status)==="running"&&!(k!=null&&k.progressLabel)&&(jft((j=g.state)==null?void 0:j.input)||(k==null?void 0:k.kind)==="command"&&!Es(((T=g.state)==null?void 0:T.input)??{},"command","cmd")),v=Rft(k,b),x=vj(v!=null),y=v??Lft(f),C=v?v.label:bj(_);return e.length===1?v?h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsxs("div",{className:"tool-row flex items-start gap-2 min-w-0 py-[3px] px-1 text-base leading-6 text-subtext",children:[h.jsx(yp,{activity:v,className:x?"tool-running-shimmer-icon":"text-muted"}),h.jsx("span",{className:`${x?"tool-running-shimmer":""} min-w-0 line-clamp-2 break-words`,title:C,children:h.jsx(D2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})})]})}):h.jsx("div",{className:"tool-group my-3.5 mx-0",children:h.jsx(O8,{part:e[0],onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsxs("div",{className:"tool-group my-3.5 mx-0",children:[h.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:[h.jsx(yp,{activity:y,className:x?"tool-running-shimmer-icon":"text-muted"}),v?h.jsx("span",{className:`tool-group-label min-w-0 line-clamp-2 break-words ${x?"tool-running-shimmer":""}`,title:C,children:h.jsx(D2,{activity:v,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l})}):h.jsx("button",{type:"button",className:"tool-group-label min-w-0 whitespace-normal break-words cursor-pointer text-start",onClick:()=>d(D=>!D),"aria-expanded":c,children:C}),h.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:()=>d(D=>!D),"aria-expanded":c,"aria-label":c?nK():wK(),children:h.jsx(ja,{size:16,className:`tool-chevron text-muted transition-[transform,color] duration-120 ease-standard [&.open]:rotate-90 ${c?"open":""}`})})]}),h.jsx("div",{className:`tool-group-disclosure ${c?"open":""}`,"aria-hidden":!c,inert:!c,children:h.jsx("div",{className:"tool-group-disclosure-inner",children:h.jsx("div",{className:"tool-group-rows flex flex-col gap-px mt-0.5 me-0 mb-1 ms-6",children:_.map(({part:D,count:I})=>h.jsx(O8,{part:D,repeatCount:I,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:a,onOpenExperiment:o,experimentName:l},D.id))})})})]})}function Hft({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var _;const s=e.prompt,[a,o]=M.useState([]),l=!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 g=s.approved===!0?{label:jQ(),icon:Ys,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:UQ(),icon:Ax,iconClass:"text-accent-amber"}:s.approved===!1?{label:LQ(),icon:_s,iconClass:"text-accent-red"}:{label:$Q(),icon:Ku,iconClass:"text-muted"},S=g.icon;return h.jsxs("details",{className:fft,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?aE():n7()}),h.jsx(S,{size:17,strokeWidth:1.8,className:`shrink-0 ${g.iconClass}`}),h.jsx("span",{className:"plan-resolved-label prompt-outcome text-base font-[375] wrap-anywhere",children:g.label}),h.jsx(ja,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),h.jsxs("div",{className:`${R8} ms-6`,children:[h.jsx(Na,{text:s.plan??"",onOpenFile:t}),s.note&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})}const f=(s.answers??[]).join(", ")||s.note||"",m=(s.annotations??[]).map((g,S)=>({id:`${e.id}-annotation-${S}`,text:g.text}));return h.jsxs("div",{className:"flex flex-col items-end gap-1.5",children:[m.length>0&&h.jsx(u4,{annotations:m,variant:"sent"}),h.jsxs("details",{className:dft,children:[h.jsxs("summary",{children:[h.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||wte()}),h.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||Yte()})]}),h.jsxs("div",{className:R8,children:[s.header&&s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),(s.options??[]).length>0&&h.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(g=>{var S;return h.jsx("li",{className:(S=s.answers)!=null&&S.includes(g.label)?"sel":"",children:g.label},g.label)})}),s.note&&s.note!==f&&h.jsx("div",{className:"prompt-collapsed-note mt-1.5 italic",children:s.note})]})]})]})}if(s.kind==="plan"){const f=!!r;return h.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 ${l?"readonly":""}`,children:[h.jsx("div",{className:"prompt-head text-base font-semibold text-text",children:s.synthesized?pte():n7()}),h.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:h.jsx(Na,{text:s.plan??"",onOpenFile:t})}),f&&h.jsx("button",{className:"prompt-plan-open self-start border-0 bg-transparent text-accent-blue text-sm p-0 cursor-pointer [&:hover]:underline",...gr(m=>r(s.plan??"",e.id,m)),children:Fee()}),!l&&!f&&h.jsxs("div",{className:M2,children:[h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:vY()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:wY()}),h.jsx(Qe,{size:"small",onClick:()=>c({approve:!1}),children:mJ()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},m=Es(f,"command","cmd","filePath","file_path","path")||"",g=typeof((_=s.toolInput)==null?void 0:_.reason)=="string"&&s.toolInput.reason||"",S=Es(f,"description")||"",k=g||S||gj(s.tool,f),b=`permission-heading-${e.id}`;return h.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 ${l?"readonly":""}`,role:"group","aria-labelledby":b,children:[h.jsxs("div",{className:"flex items-center gap-2.5 px-3.5 pt-3 pb-0",children:[h.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-md bg-accent-amber-subtle text-accent-amber",children:h.jsx(cN,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),h.jsx("span",{id:b,className:"text-base font-semibold text-text",children:BY()})]}),h.jsxs("div",{className:"flex flex-col gap-3 px-3.5 py-3",children:[h.jsx("div",{className:"prompt-sub text-base font-normal leading-normal text-text wrap-anywhere",children:k}),m&&h.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:m}),!l&&h.jsxs("div",{className:"prompt-actions flex items-center justify-end gap-2 pt-0.5",children:[h.jsx(Qe,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:mZ()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:DY()})]})]})]})}const d=f=>o(m=>s.multiSelect?m.includes(f)?m.filter(g=>g!==f):[...m,f]:[f]);return h.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 ${l?"readonly":""}`,children:[s.header&&h.jsx("div",{className:hft,children:s.header}),s.question&&h.jsx("div",{className:"prompt-q text-base font-semibold leading-normal text-text",children:s.question}),h.jsx("div",{className:"prompt-options flex flex-col gap-1.5",children:(s.options??[]).map(f=>{const m=a.includes(f.label);return h.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 ${m?"sel":""}`,disabled:l,onClick:()=>l?void 0:s.multiSelect?d(f.label):c({answers:[f.label]}),children:[h.jsx("span",{className:"prompt-option-label block text-sm font-medium",children:f.label}),f.description&&h.jsx("span",{className:"prompt-option-desc block text-sm font-normal leading-[1.45] text-subtext",children:f.description})]},f.label)})}),s.multiSelect&&!l&&h.jsx("div",{className:M2,children:h.jsx(Qe,{size:"small",variant:"primary",disabled:a.length===0,onClick:()=>c({answers:a}),children:Nee()})})]})}function Pft(e,n){return e.role==="user"?!0:e.parts.some(t=>Pf(t,n))}function Fft(e){const n=e.text??"",t=n.startsWith("data:")?n:sZe(n),r=n.startsWith("data:")?"":n.includes("__")?n.slice(n.indexOf("__")+2):n,s=e.name||r||"attachment",a=n.startsWith("data:application/pdf")||/\.pdf$/i.test(s)||/\.pdf$/i.test(n);return{src:t,isPdf:a,name:s}}function Uft({count:e,index:n,prevId:t,nextId:r,onSelect:s,pagerDisabled:a,onEdit:o,editDisabled:l}){const c=e>1;return h.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${c?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[c&&h.jsxs(h.Fragment,{children:[h.jsx(Jt,{size:"small",title:Y6(),"aria-label":Y6(),disabled:a||!t,onClick:()=>t&&s(t),children:h.jsx(ZE,{size:14})}),h.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[n+1,"/",e]}),h.jsx(Jt,{size:"small",title:K6(),"aria-label":K6(),disabled:a||!r,onClick:()=>r&&s(r),children:h.jsx(ja,{size:14})})]}),h.jsx(Jt,{size:"small",title:U6(),"aria-label":U6(),disabled:l,onClick:o,children:h.jsx(Ax,{size:13})})]})}const qft=M.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,busy:g=!1,recoveringTurnId:S,onRecover:k,skills:b,predictTextTail:v=!1,priorTasks:x=null,forkCount:y,forkIndex:C=0,forkPrevId:A,forkNextId:E,forkDisabled:j,branchDisabled:T,onFork:D,onSelectFork:I}){var X,W;Ec();const[P,B]=M.useState(null);if(n.role==="user"){const Z=n.parts.filter(G=>G.type==="text").map(G=>G.text??"").join(` +`),J=G=>!!(b!=null&&b.some(ee=>ee.name===G)),$=n.parts.filter(G=>G.type==="image"&&G.text).map(Fft),L=$.filter(G=>!G.isPdf),H=$.filter(G=>G.isPdf),Y=n.parts.filter(G=>G.type==="annotation"&&G.text).map(G=>({id:G.id,text:G.text??""}));if(P!==null){const G=()=>{const ee=P.trim();!ee||j||(B(null),D(n.id,ee))};return h.jsx("div",{className:"msg-user-group self-end flex w-full max-w-[88%] flex-col items-end gap-1.5",children:h.jsxs("div",{className:"msg-user-edit w-full bg-surface rounded-[16px] py-2.5 px-[15px] flex flex-col gap-2",children:[h.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":SZ(),value:P,autoFocus:!0,onChange:ee=>B(ee.target.value),onKeyDown:ee=>{ee.key==="Escape"?(ee.preventDefault(),B(null)):ee.key==="Enter"&&!ee.shiftKey&&!ee.nativeEvent.isComposing&&(ee.preventDefault(),G())}}),h.jsxs("div",{className:`${M2} justify-end`,children:[h.jsx(Qe,{size:"small",onClick:()=>B(null),children:cX()}),h.jsx(Qe,{size:"small",variant:"primary",onClick:G,disabled:j||!P.trim(),children:kb()})]})]})})}return h.jsxs("div",{className:"msg-user-group group/turn self-end flex max-w-[88%] flex-col items-end gap-1.5",children:[Y.length>0&&h.jsx(u4,{annotations:Y,variant:"sent"}),h.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]:me-0.5 [&_.skill-chip]:align-baseline",children:[h.jsx(Odt,{text:Z,isCommand:J}),L.length>0&&h.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:L.map((G,ee)=>h.jsx("a",{href:G.src,target:"_blank",rel:"noreferrer",children:h.jsx("img",{src:G.src,alt:qW()})},ee))}),H.length>0&&h.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:H.map((G,ee)=>h.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:G.src,target:"_blank",rel:"noreferrer",children:[h.jsx(Ku,{size:15}),h.jsx("span",{children:G.name})]},ee))})]}),y!==void 0&&h.jsx(Uft,{count:y,index:C,prevId:A,nextId:E,onSelect:I,pagerDisabled:T,onEdit:()=>B(Z),editDisabled:j})]})}const F=n.parts.find(fd),V=F?n.parts.filter(Z=>Z!==F):n.parts;return h.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[yj(V,{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:v,priorTasks:x}),F&&h.jsx(Bft,{part:F,busy:g,recovering:S===((W=(X=F.state)==null?void 0:X.input)==null?void 0:W.turnId),onRecover:k})]})});function yj(e,n){var C,A,E;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d,onRespond:_,onOpenPlan:f,onOpenSubagent:m,predictTextTail:g=!1,priorTasks:S=null}=n,k=e.filter(j=>j.type!=="steer"&&Pf(j,t)).at(-1),b=[],v=AN(e,S);let x=[];const y=()=>{x.length!==0&&(b.push(h.jsx($ft,{parts:x,pendingTail:x.some(j=>j.id===r),onOpenFile:s,onOpenRun:a,onOpenSpawnedSession:o,runExperimentName:l,onOpenExperiment:c,experimentName:d},`tg-${x[0].id}`)),x=[])};for(const j of e)if(Pf(j,t)){if(j.type==="tool"&&(Vft(j.tool)||(((C=j.children)==null?void 0:C.length)??0)>0)){y(),b.push(h.jsx(Kft,{part:j,pendingTail:g&&((A=j.state)==null?void 0:A.status)==="running"||j.id===r,onOpenSubagent:m},j.id));continue}if(j.type==="tool"&&Sh(j.tool)&&((E=j.state)==null?void 0:E.status)!=="error"){j.id===(v==null?void 0:v.id)&&(y(),b.push(h.jsx(nut,{list:v.list,live:g},j.id)));continue}if(j.type==="tool"){x.push(j);continue}y(),j.type==="text"?b.push(h.jsx(Na,{text:j.text,onOpenFile:s,onOpenRun:a,predict:g&&j.id===(k==null?void 0:k.id)},j.id)):j.type==="steer"?b.push(h.jsx("div",{dir:"auto",role:"note","aria-label":ste(),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:j.text},j.id)):j.type==="prompt"&&j.prompt&&b.push(h.jsx(Hft,{part:j,onRespond:_,onOpenFile:s,onOpenPlan:f},j.id))}return y(),b}function Gft(e){return El(e).label}function Vft(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function wj(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 f4(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&f4(t.children,n);if(r)return r}return null}function Wft({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o}){var S,k,b,v;const l=e.children??[],c=((S=e.state)==null?void 0:S.status)==="running",d=((k=e.state)==null?void 0:k.status)==="error",_=d?xm(((b=e.state)==null?void 0:b.error)||((v=e.state)==null?void 0:v.output)||""):"",f=yj(l,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:a,onOpenSubagent:o,predictTextTail:c,pendingTailToolId:c?MN(l):null}),g=l.some(x=>x.type==="text"&&!!x.text)?"":wj(e);return h.jsxs("div",{className:"msg-assistant text-base leading-[1.62] text-text min-w-0",children:[d&&h.jsxs("span",{className:"sr-only",children:[_x()," "]}),_&&h.jsx("div",{className:"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",children:_.slice(0,2e4)}),f.length===0&&!g&&!_?h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?Bf():YK()}):h.jsxs(h.Fragment,{children:[f,g&&h.jsx(Na,{text:g,onOpenFile:n,onOpenRun:t})]})]})}function Kft({part:e,pendingTail:n,onOpenSubagent:t}){var d,_,f,m;const r=((d=e.state)==null?void 0:d.status)==="error",s=xm(((_=e.state)==null?void 0:_.error)||((f=e.state)==null?void 0:f.output)||""),a=n&&!r?d4(El(e)):El(e),o=vj(!!(n&&!r)),l=(((m=e.children)==null?void 0:m.length)??0)===0&&!r&&!wj(e),c=h.jsxs(h.Fragment,{children:[r&&h.jsxs("span",{className:"sr-only",children:[_x()," "]}),r?h.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:h.jsx(eN,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):h.jsx(yp,{activity:a,className:`subagent-icon ${o?"tool-running-shimmer-icon":"text-muted"}`}),h.jsx("span",{className:`${aj} ${o?"tool-running-shimmer":r?"text-accent-red":"text-subtext"}`,children:a.label})]});return l?h.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}):h.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:dY(),...gr(g=>t==null?void 0:t(e.id,a.label,g)),disabled:!t,children:[c,h.jsx("span",{className:"subagent-row-chevron flex h-6 shrink-0 items-center text-muted",children:h.jsx(ja,{size:12})})]})}function Yft(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,a)=>{var o,l;for(const c of s){const d=`${a}/${c.id}`;c.type==="tool"&&((o=c.state)!=null&&o.status)&&n.set(d,{status:c.state.status,part:c}),(l=c.children)!=null&&l.length&&r(c.children,d)}};return r(t.parts,t.id),{messageId:t.id,states:n}}function h4(e){const n=(t,r)=>{var s;for(const a of t){const o=a.prompt;if(a.type==="prompt"&&(o==null?void 0:o.kind)==="permission"&&!o.resolved){const l=o.toolInput??{},d=Es(l,"reason","description")||gj(o.tool,l);return{id:a.id,path:`${r}/${a.id}`,label:d}}if((s=a.children)!=null&&s.length){const l=n(a.children,`${r}/${a.id}`);if(l)return l}}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 Xft(e){const[n,t]=M.useState({text:"",sequence:0}),r=M.useRef(null);return M.useEffect(()=>{var S,k,b,v,x;const s=((S=e[0])==null?void 0:S.id)??"",{messageId:a,states:o}=Yft(e),l=h4(e);if(!r.current||r.current.transcript!==s){r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},t(y=>({text:l?E6({label:ka(l.label)}):"",sequence:y.sequence+1}));return}const c=r.current.messageId===a?r.current.states:new Map,d=r.current.permissionPath,_=[...o].filter(([y,C])=>{var A;return((A=c.get(y))==null?void 0:A.status)!==C.status});if(r.current={transcript:s,messageId:a,states:o,permissionPath:(l==null?void 0:l.path)??null},l&&l.path!==d){t(y=>({text:E6({label:ka(l.label)}),sequence:y.sequence+1}));return}const f=(k=_.find(([,y])=>fd(y.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const y=DN((v=(b=f.state)==null?void 0:b.input)==null?void 0:v.recoveryAction);t(C=>({text:`${LU()}${y?` ${y==="retry"?pU():dU()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(y=>({text:oU(),sequence:y.sequence+1}));return}const m=_.filter(([,y])=>y.status==="error");if(m.length>0){const y=m.slice(0,2).map(([,C])=>El(C.part).label).join(", ");t(C=>({text:m.length===1?NU({labels:y}):jU({count:Ft(m.length),labels:y}),sequence:C.sequence+1}));return}const g=_.filter(([,y])=>y.status==="running");if(g.length>0){const y=(x=g.at(-1))==null?void 0:x[1].part;t(C=>({text:y?d4(El(y)).label:bU(),sequence:C.sequence+1}));return}_.some(([,y])=>y.status==="completed")&&t(y=>({text:SU(),sequence:y.sequence+1}))},[e]),n}const Zft=M.memo(function({messages:n,allMessages:t,canFork:r,onFork:s,onSelectFork:a,busy:o,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,recoveringTurnId:b,onRecover:v,skills:x}){var I;Ec();const y=((I=h4(n))==null?void 0:I.id)??null,C=M.useMemo(()=>n.filter(P=>Pft(P,y)),[n,y]),A=M.useMemo(()=>{const P=C.filter(B=>B.role==="user"&&!B.id.startsWith(Bu));return hZe(t,n,P,B=>B.startsWith(Bu))},[n,C,t]),E=C.at(-1),j=M.useMemo(()=>jN(n),[n]),T=Xft(n),D=o?RN(n):null;return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:h.jsx("span",{children:T.text},T.sequence)}),C.map(P=>{var X,W,Z,J,$,L;const B=P.parts.find(fd),F=(W=(X=B==null?void 0:B.state)==null?void 0:X.input)==null?void 0:W.turnId,V=B?o||b!==null:!1;return h.jsx(qft,{message:P,forkCount:(Z=A.get(P.id))==null?void 0:Z.count,forkIndex:(J=A.get(P.id))==null?void 0:J.index,forkPrevId:($=A.get(P.id))==null?void 0:$.prevId,forkNextId:(L=A.get(P.id))==null?void 0:L.nextId,forkDisabled:!r,branchDisabled:o,onFork:s,onSelectFork:a,activePermissionId:y,pendingTailToolId:(D==null?void 0:D.messageId)===P.id?D.toolId:null,onOpenFile:l,onOpenRun:c,onOpenSpawnedSession:d,runExperimentName:_,onOpenExperiment:f,experimentName:m,onRespond:g,onOpenPlan:S,onOpenSubagent:k,busy:V,recoveringTurnId:F===b?b:null,onRecover:v,skills:x,predictTextTail:o&&P===E&&P.role==="assistant",priorTasks:j.get(P.id)??null},P.id)})]})}),I8=(e,n)=>e==="all"?!0:e==="archived"?n:!n,Sj=[{id:"active",label:EY,railLabel:oE},{id:"archived",label:B6,railLabel:B6},{id:"all",label:TY,railLabel:kW}];function Qft({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=zo();return h.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[h.jsx(Jt,{size:"small",className:"rail-filter-btn",active:e!=="active",title:V6(),"aria-label":V6(),onClick:()=>r(a=>!a),children:h.jsx(cYe,{size:13})}),t&&h.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:Sj.map(a=>h.jsxs(Zr,{onClick:()=>{n(a.id),r(!1)},children:[h.jsx("span",{children:a.label()}),e===a.id&&h.jsx(Ys,{size:13})]},a.id))})]})}const Jft=14,eht=500,tht=1200;function kj({title:e,animate:n}){return n?h.jsx("span",{className:"title-reveal","aria-label":e,children:Array.from(e).map((t,r)=>t===" "?h.jsx("span",{"aria-hidden":!0,children:t},r):h.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*Jft,eht)}ms`},children:t},r))}):h.jsx(h.Fragment,{children:e})}function nht({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:a,onOpen:o,onRename:l,onSetArchived:c,onDelete:d}){var A;const{open:_,setOpen:f,ref:m}=zo(),g=((A=e.title)==null?void 0:A.trim())||"Untitled",[S,k]=M.useState(!1),[b,v]=M.useState(""),x=M.useRef(null);function y(){var E;v(((E=e.title)==null?void 0:E.trim())||""),k(!0)}function C(){var j;const E=b.trim();k(!1),E&&E!==(((j=e.title)==null?void 0:j.trim())||"")&&l(E)}return M.useEffect(()=>{var E,j;S&&((E=x.current)==null||E.focus(),(j=x.current)==null||j.select())},[S]),h.jsxs("div",{ref:m,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]:w-3.5 [&_.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]:text-ellipsis [&_.session-title]:whitespace-nowrap [&.unread_.session-title]:font-semibold [&_.session-time]:text-xs [&_.session-time]:text-muted [&_.session-time]:shrink-0 [&_.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-within_.session-menu-btn]:inline-flex [&.menu-open_.session-menu-btn]:inline-flex [&:hover_.session-time]:hidden [&:focus-within_.session-time]:hidden [&.menu-open_.session-time]: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-time]:hidden ${n?"active":""} ${t?"unread":""} ${_?"menu-open":""} ${S?"editing":""}`,title:`${kf[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?gne():""}`,onClick:()=>{S||(_?f(!1):o())},onKeyDown:E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_?f(!1):o())},children:[h.jsx("span",{className:"session-dot",children:r?h.jsx("span",{className:`busy-dot ${s?"waiting":""}`}):t&&h.jsx("span",{className:"unread-dot"})}),e.parentSessionId&&!S&&h.jsx(Rx,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),S?h.jsx("input",{ref:x,className:"session-title-input","aria-label":iee(),value:b,onChange:E=>v(E.target.value),onClick:E=>E.stopPropagation(),onBlur:C,onKeyDown:E=>{E.stopPropagation(),E.key==="Enter"?(E.preventDefault(),C()):E.key==="Escape"&&(E.preventDefault(),k(!1))}}):h.jsx("span",{className:"session-title",children:h.jsx(kj,{title:g,animate:a!==void 0},a??"static")}),h.jsx("span",{className:"session-time",children:mft(e.updatedAt)}),h.jsx("button",{className:"session-menu-btn",title:J6(),"aria-label":J6(),onClick:E=>{E.stopPropagation(),f(j=>!j)},children:h.jsx(Cx,{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:[h.jsx(Zr,{onClick:E=>{E.stopPropagation(),f(!1),y()},children:h.jsx("span",{children:IJ()})}),h.jsx(Zr,{onClick:E=>{E.stopPropagation(),f(!1),c(!e.archived)},children:h.jsx("span",{children:e.archived?nre():MW()})}),h.jsx(Zr,{danger:!0,onClick:E=>{E.stopPropagation(),f(!1),d()},children:h.jsx("span",{children:fZ()})})]})]})}const B8=[XE,lN,Mx,Ex],eb=[{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"}],$8="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function rht({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:a,onSelectMainView:o,experimentsActive:l,filesActive:c,artifactsActive:d,onOpenExperiments:_,onOpenArtifacts:f,onOpenFile:m,onOpenRun:g,runExperimentName:S,onOpenExperiment:k,experimentName:b,onOpenPlan:v,onOpenSubagent:x,onOpenWorktree:y,onOpenDemoWelcome:C,composerPrefill:A=null,onActiveSessionChange:E,preferredAgent:j,onPreferredAgentChange:T,children:D}){var Uh,qh,Gh;const[I,P]=M.useState([]),[B,F]=M.useState(null),[V,X]=M.useState(new Set),[W,Z]=M.useState("active"),[J,$]=M.useState(""),[L,H]=M.useState([]),Y=M.useRef(0),G=M.useRef({projectId:e,activeId:B});G.current={projectId:e,activeId:B};const[ee,oe]=M.useState([]),[he,ie]=M.useState(null),[q,ne]=M.useState(null),le=M.useRef(Promise.resolve()),ge=M.useRef(0),ue=M.useRef(0),[Ce,Ee]=M.useState(null),Le=M.useRef(null),Pe=M.useRef(!1),Ve=M.useRef(null),[ht,Be]=M.useReducer(pft,{messagesBySession:{},busySessions:new Set,queuedBySession:{},activeLeafBySession:{}}),[wt,zt]=M.useState([]),[vt,Lt]=M.useState(j);M.useEffect(()=>Lt(j),[j]);const[St,kt]=M.useState({}),[xe,je]=M.useState({}),[We,st]=M.useState(null),nt=M.useRef(!1),Ht=M.useRef(null),[bt,nn]=M.useState(null),Wt=M.useRef(null),[pn,Dt]=M.useState(new Map),Nn=M.useRef(new Map),Ut=M.useRef(new Set),br=M.useRef(new Set),mn=M.useRef(0),Xe=M.useRef([]),xt=M.useRef(null),Vn=M.useRef(null),Wn=M.useRef(!0),[Et,rt]=M.useState(!0),Ie=M.useRef(null),it=zo(),qt=M.useCallback(se=>{var me;Y.current+=1,H(ze=>[...ze,{id:`annotation-${Y.current}`,...se}]),(me=Ie.current)==null||me.focus()},[]),en=aft(Vn,qt);oft(L),M.useEffect(()=>{H([]),en.dismiss()},[B,e,en.dismiss]);const[jt,On]=M.useState([]),[_r,is]=M.useState(0),[ar,xr]=M.useState(!1),[js,zn]=M.useState(0),rn=M.useRef(!1);M.useEffect(()=>{FXe().then(On).catch(()=>{})},[a]);function Pn(se){if(!wr)return;if(se.source==="command"&&se.name==="plan"){Br(J,wr);return}const me=N8(J,wr,se.name,2);$(me.text),window.requestAnimationFrame(()=>{var ze,Ae;(ze=Ie.current)==null||ze.focus(),(Ae=Ie.current)==null||Ae.setSelectionRange(me.cursor,me.cursor),zn(me.cursor)})}function Or(se){const me=se.selectionStart;if(rn.current||me!==se.selectionEnd)return!1;const ze=Vv(J,me);if(!ze||ze.end!==me||!sa(ze.query))return!1;const Ae=z8(J,ze);return $(Ae.text),zn(Ae.cursor),window.requestAnimationFrame(()=>se.setSelectionRange(Ae.cursor,Ae.cursor)),!0}function Ir(se){ie(null);let Ae=ee.reduce((Ke,At)=>Ke+At.size,0);for(const Ke of se){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Ke.type))continue;if(Ke.size>31457280){ie(KW({name:Te(Ke.name)}));continue}if(Ae+Ke.size>41943040){ie(QW());continue}Ae+=Ke.size;const At=new FileReader;At.onload=()=>{const ds=At.result;oe(Bs=>[...Bs,{dataUrl:ds,mediaType:Ke.type,name:Ke.name,size:Ke.size}])},At.readAsDataURL(Ke)}}function Vr(se){const me=Array.from(se.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);me.length>0&&(se.preventDefault(),Ir(me))}const ln=I.find(se=>se.id===B),or=vt??vut(wt),Cn=ln?{harness:ln.harness,model:St.model??ln.model,serviceTier:St.serviceTier!==void 0?St.serviceTier:ln.serviceTier,permissionMode:St.permissionMode??ln.permissionMode,reasoningLevel:St.reasoningLevel??ln.reasoningLevel}:or?{...or,...St}:null,et=Cn?wt.find(se=>se.id===Cn.harness):void 0,pt=et==null?void 0:et.options,yr=M.useMemo(()=>Tdt(jt,pt==null?void 0:pt.planActivation),[jt,pt==null?void 0:pt.planActivation]),wr=Vv(J,js),Wr=(wr==null?void 0:wr.query)??null,Fn=Wr===null?[]:yr.filter(se=>se.name.startsWith(Wr)),vs=Wr!==null&&(wr==null?void 0:wr.end)===js&&Fn.some(se=>se.name!==Wr)&&!ar?Fn:[],as=vs.length>0,Ms=Math.min(_r,Math.max(0,vs.length-1));M.useEffect(()=>is(0),[Wr]);const Zt=Cn&&et&&et.models.length>0&&!et.models.some(se=>se.id===Cn.model)?et.models[0].id:(Cn==null?void 0:Cn.model)??null,Ot=Cn&&{...Cn,model:Zt,serviceTier:ip(et,Zt,Cn.serviceTier),reasoningLevel:wN(et,Zt,Cn.reasoningLevel)},Zs=Gp(et,Ot==null?void 0:Ot.model),Bi=se=>{if(!Ot)return;const me={...Ot,...se},ze={};se.model!==void 0&&se.model!==Ot.model&&(ze.model=se.model),se.serviceTier!==void 0&&se.serviceTier!==Ot.serviceTier&&(ze.serviceTier=se.serviceTier),se.permissionMode!==void 0&&se.permissionMode!==Ot.permissionMode&&(ze.permissionMode=se.permissionMode),se.reasoningLevel!==void 0&&se.reasoningLevel!==Ot.reasoningLevel&&(ze.reasoningLevel=se.reasoningLevel),je(Ae=>({...Ae,...ze})),Lt(me),T(me).catch(()=>{}),ln?kt(Ae=>({...Ae,...se})):se.harness&&se.harness!==Ot.harness&&kt({})},Sr=M.useCallback(se=>{const me=le.current.catch(()=>{}).then(se);return le.current=me.then(()=>{},()=>{}),me},[]),os=se=>{if(se==="plan"&&(et==null?void 0:et.id)==="claude-code"?(je(Ae=>({...Ae,permissionMode:se})),kt(Ae=>({...Ae,permissionMode:se}))):(kt(Ae=>{const Ke={...Ae};return delete Ke.permissionMode,Ke}),Bi({permissionMode:se})),!ln)return;const me=ln.id,ze=++ge.current;ne(null),Sr(()=>tZe(me,se)).then(Ae=>{P(Ke=>Ke.map(At=>At.id===Ae.id?Ae:At)),ge.current===ze&&kt(Ke=>{const At={...Ke};return delete At.permissionMode,At})}).catch(()=>{ge.current===ze&&(kt(Ae=>{const Ke={...Ae};return delete Ke.permissionMode,Ke}),ne(cre()))})},bs=se=>Bi({reasoningLevel:se}),lr=(Ot==null?void 0:Ot.harness)==="claude-code"?Ot.permissionMode==="plan":(pt==null?void 0:pt.planActivation)==="command"?Ce??(ln==null?void 0:ln.planMode)??!1:!1;M.useEffect(()=>{Ce===null||(ln==null?void 0:ln.planMode)!==Ce||(Le.current=null,Ee(null))},[ln==null?void 0:ln.planMode,Ce]);async function Qs(se){if(je(Ae=>({...Ae,planMode:se})),Le.current=se,Ee(se),!ln)return;const me=ln.id,ze=++ue.current;ne(null);try{const Ae=await Sr(()=>eZe(me,se));P(Ke=>Ke.map(At=>At.id===Ae.id?Ae:At)),ue.current===ze&&(Le.current=null,Ee(null),ne(null))}catch(Ae){throw ue.current===ze&&(Le.current=null,Ee(null)),Ae}}async function Dl(){if((Ot==null?void 0:Ot.harness)==="claude-code"){os("auto");return}if(ln)try{await Qs(!1)}catch{ne(vK())}}async function Ba(){const se=!lr;try{if((Ot==null?void 0:Ot.harness)==="claude-code")os(se?"plan":"auto");else if((pt==null?void 0:pt.planActivation)==="command")await Qs(se);else throw new Error(s7())}catch{ne(i7())}}function Br(se,me){const ze=z8(se,me);$(ze.text),xr(!0),Ba(),window.requestAnimationFrame(()=>{var Ae,Ke;(Ae=Ie.current)==null||Ae.focus(),(Ke=Ie.current)==null||Ke.setSelectionRange(ze.cursor,ze.cursor),zn(ze.cursor)})}Xe.current=I;const ls=M.useCallback(async()=>{const se=Xe.current.map(me=>me.id);try{const me=(await O0(e)).filter(Ae=>!br.current.has(Ae.id)),ze=new Set(me.map(Ae=>Ae.id));for(const Ae of se)ze.has(Ae)||ft(Ae);return P(Ae=>{const Ke=new Map(Ae.map(At=>[At.id,At.contextUsage]));return me.map(At=>({...At,contextUsage:At.contextUsage??Ke.get(At.id)}))}),Nn.current=new Map(me.map(Ae=>[Ae.id,Ae.title])),Be({type:"seedBusy",sessions:me.filter(Ae=>Ae.busy).map(Ae=>Ae.id),known:me.map(Ae=>Ae.id)}),me}catch{return null}},[e]),Js=M.useCallback(async se=>{const me=G.current.activeId===se?Ht.current:void 0,[{messages:ze,queued:Ae,activeLeafId:Ke}]=await Promise.all([ju(se),ls()]),At=me!==void 0&&G.current.activeId===se&&Ht.current!==me;Be({type:"seed",sessionId:se,messages:ze,queued:Ae,activeLeafId:At?Ht.current:Ke})},[ls,Be]);M.useEffect(()=>{P([]),Xe.current=[],F(null);const se=ij();X(e===Q1?new Set([uN,dN].filter(me=>!se.has(me))):new Set),$(""),oe([]),Be({type:"reset"}),Ut.current=new Set,Dt(new Map),Nn.current=new Map,ls().then(me=>{me&&F(ze=>{var Ae,Ke;return ze??(e===Q1?(Ae=me.find(At=>At.id===Nf))==null?void 0:Ae.id:void 0)??((Ke=me.find(At=>!At.archived))==null?void 0:Ke.id)??null})})},[e,ls]),M.useEffect(()=>{je({}),Wt.current=null},[B]),M.useEffect(()=>{!B||Ut.current.has(B)||(Ut.current.add(B),ju(B).then(({messages:se,queued:me,activeLeafId:ze})=>Be({type:"seed",sessionId:B,messages:se,queued:me,activeLeafId:ze})).catch(()=>{Be({type:"seed",sessionId:B,messages:[],onlyIfAbsent:!0}),Ut.current.delete(B)}))},[B]),M.useEffect(()=>Ff(se=>{switch(se.type){case"session":{if(se.session.projectId!==e||br.current.has(se.session.id))return;const me=Nn.current.has(se.session.id),ze=Nn.current.get(se.session.id)!==se.session.title;Nn.current.set(se.session.id,se.session.title),me&&ze&&se.session.titleSource==="generated"&&(Dt(Ae=>{const Ke=new Map(Ae);return Ke.set(se.session.id,(Ae.get(se.session.id)??0)+1),Ke}),window.setTimeout(()=>{Dt(Ae=>{if(!Ae.has(se.session.id))return Ae;const Ke=new Map(Ae);return Ke.delete(se.session.id),Ke})},tht)),P(Ae=>{const Ke=Ae.findIndex(ds=>ds.id===se.session.id);if(Ke<0)return[se.session,...Ae];const At=Ae.slice();return At[Ke]={...se.session,contextUsage:se.session.contextUsage??Ae[Ke].contextUsage},At});break}case"sessionDeleted":ft(se.sessionId);break;case"message":mn.current++,Be({type:"upsertMessage",sessionId:se.sessionId,message:se.message});break;case"busy":Be({type:"busy",sessionId:se.sessionId,busy:se.busy});break;case"queued":Be({type:"setQueued",sessionId:se.sessionId,items:se.items});break;case"branch":Be({type:"activeLeaf",sessionId:se.sessionId,leafId:se.activeLeafId});break;case"usage":P(me=>me.map(ze=>ze.id===se.sessionId?{...ze,contextUsage:se.usage}:ze));break}}),[e]),M.useEffect(()=>Ff(se=>{if(se.type!=="reconnected"||(ls(),!B||!Ut.current.has(B)))return;const me=ze=>{const Ae=mn.current;ju(B).then(({messages:Ke,queued:At,activeLeafId:ds})=>{Be({type:"seed",sessionId:B,messages:Ke,queued:At,activeLeafId:ds}),ze&&mn.current!==Ae&&me(!1)}).catch(()=>{})};me(!0)}),[B,ls]);const Kn=B?ht.messagesBySession[B]??D8:D8,$i=B?ht.activeLeafBySession[B]??null:null;Ht.current=$i;const jn=M.useMemo(()=>dZe(Kn,$i),[Kn,$i]),bn=B?ht.busySessions.has(B):!1,ei=!bn&&!!(et!=null&&et.agentReady),ra=bn&&RN(jn)!=null,Lc=bn&&xZe(jn),cr=B?ht.queuedBySession[B]??[]:[],$a=cr.some(se=>se.dispatchState==="retrying"),Ha=cr.findIndex(se=>se.dispatchState==="blocked"),Pa=cr.reduce((se,me)=>me.dispatchState!=="retrying"||typeof me.nextRetryAt!="number"?se:se===null?me.nextRetryAt:Math.min(se,me.nextRetryAt),null),[Mo,Rs]=M.useState(()=>Date.now());M.useEffect(()=>{if(!$a||Pa===null||(Rs(Date.now()),Pa<=Date.now()))return;const se=window.setInterval(()=>{const me=Date.now();Rs(me),me>=Pa&&window.clearInterval(se)},1e3);return()=>window.clearInterval(se)},[$a,Pa]),M.useEffect(()=>{const se=cr.reduce((me,ze)=>ze.planMode??me,void 0);se!==void 0?(Pe.current=!0,Le.current=se,Ee(se)):Pe.current&&(Pe.current=!1,Le.current=null,Ee(null))},[cr]);const Oc=!!B&&!(B in ht.messagesBySession),Fa=M.useMemo(()=>{const se=new Set;for(const me of ht.busySessions)(ht.messagesBySession[me]??[]).some(ze=>ze.parts.some(Ae=>Ae.type==="prompt"&&Ae.prompt&&!Ae.prompt.resolved&&Ae.prompt.nativeId))&&se.add(me);return se},[ht.busySessions,ht.messagesBySession]),xs=B?Fa.has(B):!1,rr=ln,Ua=rr?pn.get(rr.id):void 0,Yn=M.useMemo(()=>{var se;for(let me=jn.length-1;me>=0;me--)for(const ze of jn[me].parts)if(ze.type==="prompt"&&((se=ze.prompt)==null?void 0:se.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[jn]),Ds=M.useMemo(()=>bn?bZe(jn):null,[jn,bn]),Ro=M.useMemo(()=>{const se=jn.at(-1);if(!bn||Ds||(se==null?void 0:se.role)!=="assistant")return null;const me=UZe(se.parts);return me.length>0?me:null},[jn,bn,Ds]),qa=M.useCallback(se=>se.toolParts.length>0?bj(xj(se.toolParts)):"",[]),Ls=M.useMemo(()=>{const se=rr==null?void 0:rr.harness;if(!B||se!=="claude-code"&&se!=="codex")return null;for(let me=jn.length-1;me>=0;me--)for(const ze of jn[me].parts)if(!(ze.type!=="prompt"||!ze.prompt||ze.prompt.resolved)&&ze.prompt.kind==="question")return ze.prompt.nativeId&&!ht.busySessions.has(B)?null:ze.id;return null},[jn,rr==null?void 0:rr.harness,B,ht.busySessions]),sa=se=>!Ls&&yr.some(me=>me.name===se),[kr,ia]=M.useState(null),aa=kr&&kr.sessionId===B?kr:null;M.useEffect(()=>{if(!kr)return;const se=ht.busySessions.has(kr.sessionId),me=kr.sessionId===B&&Yn&&Yn.promptId!==kr.promptId;(!se||me)&&ia(null)},[kr,Yn,ht.busySessions,B]);const Os=M.useMemo(()=>h4(jn),[jn]),Ga=bn&&!!(et!=null&&et.supportsSteering)&&!!(et!=null&&et.agentReady)&&!Yn&&!Ls&&!Os&&ee.length===0&&L.length===0,Cr=M.useMemo(()=>v&&B?(se,me,ze)=>v(se,B,me,ze):void 0,[v,B]),ur=M.useMemo(()=>x&&B?(se,me,ze)=>x(B,se,me,ze):void 0,[x,B]),Hi=M.useMemo(()=>m&&((se,me,ze,Ae,Ke)=>m(se,B??void 0,me,ze,Ae,Ke)),[m,B]);M.useEffect(()=>{ge.current+=1,ue.current+=1;const se=(B?ht.queuedBySession[B]??[]:[]).reduce((me,ze)=>ze.planMode??me,void 0);Pe.current=se!==void 0,Le.current=se??null,Ee(se??null),kt({}),ne(null)},[B]),M.useEffect(()=>{E==null||E(B)},[B,E]);const bi=a==="chat"&&(jn.length>0||bn),ys=(Ot==null?void 0:Ot.harness)??null,xn=(Ot==null?void 0:Ot.model)??null,[Kr,Er]=M.useState(null),Is=`${e}\0${ys??""}\0${xn??""}`,Ic=a==="chat"&&!bi&&!Oc;M.useEffect(()=>{if(!Ic||!ys)return;let se=!0;return OYe(e,ys,xn,N()).then(me=>{se&&Er({key:Is,prompts:me.prompts})}).catch(()=>{se&&Er({key:Is,prompts:null})}),()=>{se=!1}},[e,ys,xn,Is,Ic]);const Do=(Kr==null?void 0:Kr.key)===Is?Kr.prompts:null,Pi=ys!==null&&(Kr==null?void 0:Kr.key)!==Is,oa=se=>{$(se),xr(!1),window.requestAnimationFrame(()=>{const me=Ie.current;me&&(me.focus(),me.setSelectionRange(se.length,se.length),zn(se.length))})};M.useEffect(()=>{A&&($(A),xr(!1),zn(A.length))},[A]);const ws=M.useCallback(se=>{const me=se.scrollHeight-se.scrollTop-se.clientHeight<60;Wn.current=me,rt(me)},[]),cs=M.useCallback(()=>{Wn.current=!0,rt(!0);const se=xt.current;se&&(se.scrollTop=se.scrollHeight)},[]);M.useLayoutEffect(()=>{cs()},[B,bi,cs]),M.useLayoutEffect(()=>{Wn.current&&cs()},[jn,bn,cs]),M.useEffect(()=>{const se=xt.current,me=Vn.current;if(!se||!me)return;const ze=new ResizeObserver(()=>{if(Wn.current){se.scrollTop=se.scrollHeight;return}ws(se)});return ze.observe(me),ze.observe(se),()=>ze.disconnect()},[bi,ws]);const yd=M.useCallback(se=>{se.currentTarget.blur(),cs()},[cs]);async function Bc({queue:se=!1}={}){var wd,Pc,Fc,Sd,kd;const me=J.trim(),ze=Ls?null:jdt(me,pt==null?void 0:pt.planActivation),Ae=!!ze,Ke=!lr,At=Mdt(pt==null?void 0:pt.planActivation,Ae?Ke:void 0,Le.current),ds=Ae&&(et==null?void 0:et.id)==="claude-code"?Ke?"plan":"auto":void 0,Bs=ze?ze.prompt:me,wi=ee,la=L,Il=la.map(En=>({text:En.text})),Io=e;let Vh=B;const Wh=()=>{const En=G.current;return En.projectId===Io&&En.activeId===Vh},$c=()=>{Wh()&&($(En=>En||me),oe(En=>En.length?En:wi),H(En=>En.length?En:la))};if(Ae&&!Bs&&wi.length===0&&la.length===0){$(""),xr(!1);try{if((et==null?void 0:et.id)==="claude-code")os(Ke?"plan":"auto");else if((pt==null?void 0:pt.planActivation)==="command")await Qs(Ke);else throw new Error(s7())}catch{ne(i7()),$c()}return}const Xn=Ot?{...Ot,...ds?{permissionMode:ds}:{}}:null;ds&&os(ds);let Hc=null;const Bo=Le.current;Ae&&(pt==null?void 0:pt.planActivation)==="command"&&(Hc=++ue.current,Le.current=Ke,Ee(Ke));const Fi=()=>{Hc===null||ue.current!==Hc||(Le.current=Bo,Ee(Bo))};if(!Bs&&wi.length===0&&la.length===0)return;if((Bs||la.length>0)&&Ls&&wi.length===0){$(""),H([]),$r({promptId:Ls,answers:[],note:Bs||void 0,annotations:Il}).then(En=>{En||$c()});return}const Kh=JSON.stringify({text:Bs,images:wi.map(En=>({mediaType:En.mediaType,name:En.name,dataUrl:En.dataUrl})),annotations:Il,settings:Xn?{model:Xn.model,serviceTier:Xn.serviceTier,permissionMode:Xn.permissionMode,planMode:At,reasoningLevel:Xn.reasoningLevel}:null}),ca=((wd=Wt.current)==null?void 0:wd.signature)===Kh?Wt.current.id:`ct_${crypto.randomUUID()}`;if(Wt.current={signature:Kh,id:ca},bn){if(!B||!(et!=null&&et.agentReady)){Fi();return}const En=B;$(""),oe([]),H([]),ie(null);const Va=Xn?{model:Xn.model,serviceTier:Xn.serviceTier,permissionMode:Xn.permissionMode,planMode:(pt==null?void 0:pt.planActivation)==="command"?At??(ln==null?void 0:ln.planMode):At,reasoningLevel:Xn.reasoningLevel}:{};kt({});const Wa=wi.map(Hr=>({mediaType:Hr.mediaType,dataBase64:Hr.dataUrl.slice(Hr.dataUrl.indexOf(",")+1),name:Hr.name}));try{(Pc=(await Sr(()=>eS(En,Bs,Va,Wa.length?Wa:void 0,Il,ca,Ga&&!se&&!Ae?"steer":void 0))).turn)!=null&&Pc.existing&&await Js(En),je({}),((Fc=Wt.current)==null?void 0:Fc.id)===ca&&(Wt.current=null)}catch{Fi(),$c()}return}if(!(et!=null&&et.agentReady)){Fi();return}if(!Xn){Fi();return}$(""),oe([]),H([]),ie(null);let Si=B;try{if(!Si){const Pr=await XXe(e,Xn.harness,{model:Xn.model,serviceTier:Xn.serviceTier,permissionMode:Xn.permissionMode,planMode:At,reasoningLevel:Xn.reasoningLevel});Ut.current.add(Pr.id),P(Ss=>[Pr,...Ss]),F(Pr.id),Si=Pr.id,Vh=Pr.id,G.current={projectId:e,activeId:Pr.id}}Be({type:"optimisticUser",sessionId:Si,text:Bs||HW(),attachments:wi.map(Pr=>({url:Pr.dataUrl,mediaType:Pr.mediaType,name:Pr.name})),annotations:la}),Be({type:"busy",sessionId:Si,busy:!0}),cs(),W==="archived"&&Z("active");const En=Xn?{model:Xn.model,serviceTier:Xn.serviceTier,permissionMode:Xn.permissionMode,planMode:At,reasoningLevel:Xn.reasoningLevel}:{};kt({});const Va=wi.map(Pr=>({mediaType:Pr.mediaType,dataBase64:Pr.dataUrl.slice(Pr.dataUrl.indexOf(",")+1),name:Pr.name})),Wa=Si;if(!Wa)throw new Error(hne());(Sd=(await Sr(()=>eS(Wa,Bs,En,Va.length?Va:void 0,Il,ca))).turn)!=null&&Sd.existing&&await Js(Wa),je({}),((kd=Wt.current)==null?void 0:kd.id)===ca&&(Wt.current=null)}catch(En){if($c(),Fi(),!Si)return;const Va=En instanceof Error?En.message:String(En);if(!/session is busy/i.test(Va)&&await O0(e).then(Hr=>{var Uc;return!!((Uc=Hr.find(Pr=>Pr.id===Si))!=null&&Uc.busy)}).catch(()=>!1)){Wh()&&($(Hr=>Hr===Bs?"":Hr),oe(Hr=>Hr===wi?[]:Hr),H(Hr=>Hr===la?[]:Hr));return}Be({type:"busy",sessionId:Si,busy:!1}),Be({type:"localError",sessionId:Si,text:BK({error:Te(Va)})})}}function Ll(){B&&lZe(B).catch(()=>{ne(Ane())})}const ae=M.useCallback(async(se,me)=>{if(!(!B||nt.current)){nt.current=!0,ne(null),st(se);try{const ze=RZe({model:xe.model,serviceTier:xe.serviceTier,permissionMode:xe.permissionMode,planMode:xe.planMode,reasoningLevel:xe.reasoningLevel}),Ae=B;(await iZe(Ae,se,me,ze)).turn.existing&&await Js(Ae),je({})}catch{ne(Ite())}finally{nt.current=!1,st(null)}}},[B,xe,Js]),be=M.useCallback((se,me)=>{if(!B||bn||!(et!=null&&et.agentReady))return;const ze=B;Be({type:"busy",sessionId:ze,busy:!0}),cs(),Sr(()=>aZe(ze,se,me)).catch(Ae=>{Be({type:"busy",sessionId:ze,busy:!1});const Ke=Ae instanceof Error?Ae.message:String(Ae);Be({type:"localError",sessionId:ze,text:Gte({error:Te(Ke)})})})},[B,bn,et==null?void 0:et.agentReady,cs,Sr]),ke=M.useCallback(se=>{if(!B||bn)return;const me=B,ze=Ht.current;Be({type:"activeLeaf",sessionId:me,leafId:se}),Sr(()=>oZe(me,se)).catch(Ae=>{Be({type:"activeLeaf",sessionId:me,leafId:ze});const Ke=Ae instanceof Error?Ae.message:String(Ae);Be({type:"localError",sessionId:me,text:Rne({error:Te(Ke)})})})},[B,bn,Sr]);function De(se){if(!B)return;const me=B;nZe(me,se).then(({removed:ze})=>{if(ze)return Js(me)}).catch(()=>ne(Pte()))}async function $e(se){if(!B||bt)return;const me=B;ne(null),nn(se);try{await rZe(me,se),await Js(me)}catch{ne(Jte())}finally{nn(null)}}M.useEffect(()=>{if(!bn||a!=="chat")return;function se(me){var ze;me.key!=="Escape"||me.defaultPrevented||(me.preventDefault(),Ll(),(ze=Ie.current)==null||ze.focus())}return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[bn,B,a]);function ft(se){br.current.add(se),P(me=>me.filter(ze=>ze.id!==se)),F(me=>me===se?null:me),X(me=>{if(!me.has(se))return me;const ze=new Set(me);return ze.delete(se),ze}),Ut.current.delete(se),Nn.current.delete(se),Be({type:"forget",sessionId:se})}function ct(se,me){const ze=se.archived;P(Ae=>Ae.map(Ke=>Ke.id===se.id?{...Ke,archived:me}:Ke)),I8(W,me)||F(Ae=>Ae===se.id?null:Ae),QXe(se.id,me).catch(()=>{P(Ae=>Ae.map(Ke=>Ke.id===se.id?{...Ke,archived:ze}:Ke))})}function It(se,me){const ze=se.title;P(Ae=>Ae.map(Ke=>Ke.id===se.id?{...Ke,title:me}:Ke)),JXe(se.id,me).catch(()=>{P(Ae=>Ae.map(Ke=>Ke.id===se.id?{...Ke,title:ze}:Ke))})}async function Mn(se){var ze;const me=((ze=se.title)==null?void 0:ze.trim())||Y1();if(window.confirm(uK({title:ka(me)}))){try{await ZXe(se.id)}catch(Ae){nz(_K({title:ka(me),error:Te(Ae instanceof Error?Ae.message:String(Ae))}),"error");return}ft(se.id)}}const $r=M.useCallback(se=>{if(!B)return Promise.resolve(!1);const me=B;return Be({type:"busy",sessionId:me,busy:!0}),Sr(()=>cZe(me,se)).then(()=>!0).catch(()=>!1).finally(()=>{ju(me).then(({messages:ze,queued:Ae,activeLeafId:Ke})=>Be({type:"seed",sessionId:me,messages:ze,queued:Ae,activeLeafId:Ke})).catch(()=>{}),O0(e).then(ze=>{var Ae;return Be({type:"busy",sessionId:me,busy:!!((Ae=ze.find(Ke=>Ke.id===me))!=null&&Ae.busy)})}).catch(()=>{})})},[B,e,Sr]),us=I.filter(se=>I8(W,se.archived)),Qr=/Mac|iPhone|iPad/.test(navigator.platform),xi=Qr?"⌘ ⇧ Enter":"Ctrl + Shift + Enter",Ol=Qr?"⌘ Enter":"Ctrl + Enter",yi=M.useCallback(()=>{Z("active"),F(null),o("chat")},[o]),Lo=M.useCallback(se=>{Z("all"),F(se),o("chat")},[o]);M.useEffect(()=>{const se=me=>{me.repeat||me.key!=="Enter"||!me.metaKey&&!me.ctrlKey||me.altKey||!me.shiftKey||(me.preventDefault(),yi())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[yi]);const Oo=h.jsxs("aside",{className:"session-rail w-68 shrink-0 flex flex-col mt-5 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]:py-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,h.jsxs("nav",{className:"rail-nav flex flex-col gap-0.5 p-2 shrink-0",children:[h.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 ${c?"active":""}`,onClick:y,children:[h.jsx(Hf,{size:15}),HZ()]}),h.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 ${d?"active":""}`,"data-onboarding":"nav-artifacts",onClick:f,children:[h.jsx(zx,{size:15}),GY()]}),h.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 ${l?"active":""}`,onClick:_,children:[h.jsx(Ex,{size:15}),RZ()]}),h.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 ${a==="skills"?"active":""}`,onClick:()=>o("skills"),children:[h.jsx(YE,{size:15}),tZ()]}),Cdt.map(se=>h.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 ${a!=="chat"&&a!=="skills"&&se.activeTabs.includes(a)?"active":""}`,"data-onboarding":se.id==="compute"?"nav-compute":void 0,onClick:()=>o(se.id),children:[se.icon,se.label()]},se.id))]}),h.jsxs("div",{className:"rail-section-head flex items-center justify-between shrink-0 pt-3.5 pe-2.5 pb-1.5 ps-4.5",children:[h.jsx("div",{className:"rail-section-label p-0 text-sm font-medium text-subtext",children:((Uh=Sj.find(se=>se.id===W))==null?void 0:Uh.railLabel())??oE()}),h.jsxs("div",{className:"rail-section-actions flex items-center gap-0.5",children:[h.jsxs("button",{className:"rail-section-new inline-flex items-center gap-1 py-[3px] px-1.5 rounded-sm text-subtext text-sm font-medium [&:hover]:text-text [&:hover]:bg-surface tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]","data-onboarding":"new-session","data-tip":xi,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:yi,children:[h.jsx(Tx,{size:13}),jee()]}),h.jsx(Qft,{value:W,onChange:Z})]})]}),h.jsxs("div",{className:"rail-body",children:[us.map(se=>h.jsx(nht,{session:se,active:se.id===B&&a==="chat",unread:V.has(se.id),busy:ht.busySessions.has(se.id),waiting:Fa.has(se.id),revealTitle:pn.get(se.id),onOpen:()=>{F(se.id),e===Q1&&Pdt(se.id),X(me=>{if(!me.has(se.id))return me;const ze=new Set(me);return ze.delete(se.id),ze}),o("chat")},onRename:me=>It(se,me),onSetArchived:me=>ct(se,me),onDelete:()=>void Mn(se)},se.id)),us.length===0&&h.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:W==="archived"?JK():I.length>0?GK():rY()})]})]}),Ph=`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 [&.rail-hidden]:max-w-none [&.rail-hidden]:py-0 [&.rail-hidden]:px-0.5 [&::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${r?"":" rail-hidden"}`,Fh=!r&&h.jsx(Jt,{title:e7(),"aria-label":e7(),onClick:s,children:h.jsx(iN,{size:15})});return a!=="chat"?h.jsxs(h.Fragment,{children:[r&&Oo,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&h.jsx("div",{className:Ph,children:Fh}),h.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):h.jsxs(h.Fragment,{children:[r&&Oo,h.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[h.jsxs("div",{className:Ph,children:[Fh,h.jsx(Qf,{variant:"header",title:rr?((qh=rr.title)==null?void 0:qh.trim())||Y1():O6(),children:rr?h.jsx(kj,{title:((Gh=rr.title)==null?void 0:Gh.trim())||Y1(),animate:Ua!==void 0},Ua??"static"):O6()}),C&&h.jsx(Jt,{"data-tip":I6(),"aria-label":I6(),onClick:C,children:h.jsx(BWe,{size:15})})]}),Oc?h.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:[h.jsx(dn,{}),h.jsx("span",{children:fQ()})]}):bi?h.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:xt,onScroll:se=>{ws(se.currentTarget),en.dismiss()},children:h.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:Vn,children:[h.jsx(Zft,{messages:jn,allMessages:Kn,canFork:ei,onFork:be,onSelectFork:ke,busy:bn,onOpenFile:Hi,onOpenRun:g,onOpenSpawnedSession:Lo,runExperimentName:S,onOpenExperiment:k,experimentName:b,onRespond:$r,onOpenPlan:Cr,onOpenSubagent:ur,recoveringTurnId:We,onRecover:ae,skills:yr}),bn&&xs&&h.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:Xee()}),bn&&!xs&&!ra&&!Lc&&h.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:h.jsx("span",{className:"tool-running-shimmer",children:Pne()})})]})}):h.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:[h.jsx("div",{className:"chat-empty-mark w-10.5 h-10.5 mb-5.5 [&_svg]:block [&_svg]:w-full [&_svg]:h-full",children:h.jsx(Ix,{})}),h.jsx("h2",{children:ete()}),h.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:[h.jsx(Hf,{size:19}),h.jsx("span",{children:n})]}),Pi&&h.jsx("div",{className:$8,role:"status","aria-live":"polite","aria-label":mee(),"aria-busy":"true",children:B8.map((se,me)=>h.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 ${eb[me].box}`,children:[h.jsxs("span",{className:`flex w-full items-center gap-2.5 ${eb[me].icon}`,children:[h.jsx(se,{size:17}),h.jsx("span",{className:"h-3.5 w-2/5 rounded bg-surface-bright"})]}),h.jsx("span",{className:"h-3 w-4/5 rounded bg-surface"})]},me))}),Do&&h.jsx("div",{className:$8,role:"group","aria-label":xee(),children:Do.map((se,me)=>{const ze=B8[me],Ae=eb[me];return h.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 ${Ae.box}`,onClick:()=>oa(se.prompt),children:[h.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[h.jsx(ze,{size:17,className:Ae.icon}),se.title]}),h.jsx("span",{className:"w-full truncate text-sm text-subtext",children:se.prompt})]},me)})})]}),en.action&&h.jsxs(Qe,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:en.action.x,top:en.action.top,transform:"translateX(-50%)"},onMouseDown:se=>se.preventDefault(),onClick:en.add,children:[h.jsx(sN,{size:14}),YY()]}),h.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:[bi&&h.jsx(Jt,{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 ${Et?"opacity-0":"opacity-100"}`,title:r7(),"aria-label":r7(),inert:Et,onClick:yd,children:bn&&!xs?h.jsx(Cx,{size:18,className:"tool-running-shimmer-icon"}):h.jsx(yWe,{size:16})}),Ds&&!Yn&&h.jsx(rut,{list:Ds}),Ro&&!Yn&&h.jsx(sut,{steps:Ro,describe:qa}),Yn&&!(aa&&Yn.promptId===aa.promptId)&&h.jsx(eut,{synthesized:Yn.synthesized,agentLabel:rr?kf[rr.harness]:Ine(),showResumeModes:(rr==null?void 0:rr.harness)==="claude-code",onView:se=>Cr==null?void 0:Cr(Yn.plan,Yn.promptId,se),onApprove:se=>$r({promptId:Yn.promptId,approve:!0,...se?{resumeMode:se}:{}}),onReject:()=>$r({promptId:Yn.promptId,approve:!1}),onRevise:se=>{B&&ia({sessionId:B,promptId:Yn.promptId}),$r({promptId:Yn.promptId,approve:!1,note:se})}}),cr.length>0&&h.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:cr.map((se,me)=>h.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:se.error?`${se.text} -${se.error}`:se.text,children:[se.dispatchState==="blocked"?h.jsx(rN,{size:13,className:"shrink-0 text-accent-amber"}):h.jsx(MWe,{size:13,className:"shrink-0 text-muted"}),h.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:se.text}),se.dispatchState!=="blocked"&&h.jsx("span",{className:"shrink-0 text-sm text-muted",children:se.dispatchState==="retrying"?hZe(se.nextRetryAt,Ro):_te()}),se.dispatchState==="blocked"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>void ke(se.id),"aria-label":tB({text:se.text}),disabled:bt!==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:bt===se.id?bE():Gu()}),h.jsx("button",{onClick:()=>be(se.id),"aria-label":ZI({text:se.text}),disabled:bt!==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:lJ()}),me===Pa&&mebe(se.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:h.jsx(_s,{size:11})})]},se.id))}),h.jsxs("div",{className:"composer-box relative flex flex-col border border-border rounded-lg bg-background shadow-elevated","data-onboarding":"composer",children:[et&&!et.agentReady&&h.jsxs("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:[h.jsxs("strong",{children:[et.name," ",LZ()]})," ",et.agentNote?Th(et.agentNote):yte()]}),as&&h.jsx(adt,{skills:vs,activeIndex:js,onPick:Fn,onHover:is}),L.length>0&&h.jsx(Fdt,{annotations:L,onClear:()=>{$([]),window.requestAnimationFrame(()=>{var se;return(se=Ie.current)==null?void 0:se.focus()})},onRemove:se=>{const me=L.filter(ze=>ze.id!==se);$(me),me.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=Ie.current)==null?void 0:ze.focus()})}}),re.length>0&&h.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:re.map((se,me)=>{const ze=()=>oe(Te=>Te.filter((Xe,Ct)=>Ct!==me));return se.mediaType==="application/pdf"?h.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:se.name,children:[h.jsx(Vu,{size:22}),h.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:se.name??"document.pdf"}),h.jsx("button",{title:G6(),"aria-label":G6(),onClick:ze,children:h.jsx(_s,{size:11})})]},me):h.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:[h.jsx("img",{src:se.dataUrl,alt:Xee()}),h.jsx("button",{title:V6(),"aria-label":V6(),onClick:ze,children:h.jsx(_s,{size:11})})]},me)})}),he&&h.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:he}),q&&h.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:q}),h.jsxs("div",{className:"composer-input relative flex overflow-hidden [&_textarea]:flex-1",children:[h.jsx("textarea",{dir:"auto",ref:Ie,className:"relative z-1 bg-transparent",value:J,placeholder:Rs?Hne():aa&&et?hne({harness:Ae(kf[et.id]),shortcut:Ae(ds)}):It?et!=null&&et.agentReady?wK({harness:Ae(kf[It.harness])}):vK({harness:Ae(kf[It.harness])}):kW(),rows:2,onPaste:qr,onDragOver:se=>{se.dataTransfer.types.includes("Files")&&se.preventDefault()},onDrop:se=>{se.dataTransfer.files.length!==0&&(se.preventDefault(),Lr(Array.from(se.dataTransfer.files)))},onChange:se=>{const me=se.target.value,ze=se.target.selectionStart;Nn(ze);const Te=ze>0&&/\s/.test(me[ze-1])&&!Rs&&!rn.current?Fv(me,ze-1):null;if((Te==null?void 0:Te.query)==="plan"&&(_t!=null&&_t.planActivation)){Or(me,Te);return}const Xe=Te?yr.find(Ct=>Ct.source!=="command"&&Ct.name===Te.query):void 0;if(Xe&&Te){const Ct=y8(me,Te,Xe.name,2);B(Ct.text),window.requestAnimationFrame(()=>{var Ir;(Ir=Ie.current)==null||Ir.setSelectionRange(Ct.cursor,Ct.cursor),Nn(Ct.cursor)});return}B(me),xr(!1)},onSelect:se=>Nn(se.currentTarget.selectionStart),onCompositionStart:()=>{rn.current=!0},onCompositionEnd:()=>{rn.current=!1},onKeyDown:se=>{if(as){if(se.key==="ArrowDown"||se.key==="ArrowUp"){se.preventDefault();const me=se.key==="ArrowDown"?1:-1;is((js+me+vs.length)%vs.length);return}if(se.key==="Tab"||se.key==="Enter"){se.preventDefault(),Fn(vs[js]);return}if(se.key==="Escape"){se.preventDefault(),xr(!0);return}}if(se.key==="Backspace"&&Dr(se.currentTarget)){se.preventDefault();return}se.key==="Enter"&&!se.shiftKey&&!se.nativeEvent.isComposing&&(se.preventDefault(),Va({queue:se.metaKey||se.ctrlKey}))}}),h.jsx(pdt,{text:J,isCommand:sa,skills:yr,projectId:e,textareaRef:Ie})]}),h.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:it.ref,children:[h.jsx(Jt,{type:"button",className:"composer-bare",title:q1(),"aria-label":q1(),"aria-haspopup":"dialog","aria-expanded":it.open,onClick:()=>it.setOpen(se=>!se),children:h.jsx(JKe,{size:16})}),it.open&&h.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:[h.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:q1()}),h.jsx(_Je,{})]})]}),h.jsx("input",{ref:Ve,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:se=>{Lr(Array.from(se.target.files??[])),se.target.value=""}}),h.jsx(Jt,{type:"button",className:"composer-attach",title:D6(),"aria-label":D6(),onClick:()=>{var se;return(se=Ve.current)==null?void 0:se.click()},children:h.jsx(DKe,{size:16})}),cr&&h.jsxs(Qe,{type:"button",variant:"ghost",active:!0,className:"group",title:H6(),"aria-label":H6(),onClick:()=>void Ml(),children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(_Ke,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(_s,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:pQ()})]}),h.jsx("div",{className:"min-w-0 flex-1"}),h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(Zct,{value:It,onSelect:Ii,permissionChoices:et!=null&&et.agentReady?(_t==null?void 0:_t.permissionModes)??[]:[],defaultPermissionId:(_t==null?void 0:_t.defaultPermissionMode)??null,onSelectPermission:os,reasoningChoices:et!=null&&et.agentReady?Ys.choices:[],defaultReasoningId:Ys.defaultId,onSelectReasoning:bs,onHarnesses:At,lockHarness:!!ln}),h.jsx(gdt,{usage:ln==null?void 0:ln.contextUsage})]}),zn&&!Rs?h.jsx(Jt,{className:"send-btn",variant:"stop",title:X6(),"aria-label":X6(),onClick:Oc,children:h.jsx(_s,{size:16})}):h.jsx(Jt,{className:"send-btn",variant:"primary",title:xb(),"aria-label":xb(),onClick:()=>void Va(),disabled:!(et!=null&&et.agentReady)||!J.trim()&&re.length===0&&L.length===0,children:h.jsx(YE,{size:16})})]})]})]})]})]})}function _o({className:e,...n}){return h.jsx("div",{className:ss("relative flex min-h-0 flex-1 flex-col",e),...n})}function $u({className:e,...n}){return h.jsx("div",{className:ss("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Wi({className:e,...n}){return h.jsx("div",{className:ss("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const D8=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function Bft({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}){const[c,d]=M.useState(null),_=M.useRef(null),f=M.useRef(null),m=M.useRef(!0);if(M.useLayoutEffect(()=>{m.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&m.current&&(S.scrollTop=S.scrollHeight)},[c]),M.useEffect(()=>{const S=_.current,k=f.current;if(!S||!k)return;const b=new ResizeObserver(()=>{m.current&&(S.scrollTop=S.scrollHeight)});return b.observe(k),b.observe(S),()=>b.disconnect()},[c===null]),M.useEffect(()=>{let S=!0;const k=new Set;let b=0;const v=()=>{const y=++b;Au(e).then(({messages:C})=>{!S||y!==b||d(A=>{if(!A)return C;const E=C.map(T=>k.has(T.id)?A.find(D=>D.id===T.id)??T:T),j=new Set(C.map(T=>T.id));return[...E,...A.filter(T=>!j.has(T.id))]})}).catch(()=>S&&d(C=>C??[]))};v();const x=Hf(y=>{if(y.type==="reconnected"){k.clear(),v();return}y.type!=="message"||y.sessionId!==e||(k.add(y.message.id),d(C=>{const A=C?C.slice():[],E=A.findIndex(j=>j.id===y.message.id);return E===-1?A.push(y.message):A[E]=y.message,A}))});return()=>{S=!1,x()}},[e]),c===null)return h.jsx(_o,{children:h.jsx("div",{className:D8,children:h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:qPe()})})});let g=null;for(const S of c)if(g=o4(S.parts,n),g)break;return h.jsx(_o,{children:h.jsx("div",{className:D8,ref:_,onScroll:S=>{const k=S.currentTarget;m.current=k.scrollHeight-k.scrollTop-k.clientHeight<60},children:h.jsx("div",{ref:f,children:g?h.jsx(Nft,{spawn:g,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}):h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:KPe()})})})})}function L8(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 yn(e){for(var n=1;n=0||(_[c]=o[c]);return _})(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function hn(e,n){return hj(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var a,o,l,c,d=[],_=!0,f=!1;try{if(l=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(a=l.call(s)).done)&&(d.push(a.value),d.length!==r);_=!0);}catch(m){f=!0,o=m}finally{try{if(!_&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw o}}return d}})(e,n)||gm(e,n)||pj()}function fj(e){return hj(e)||_j(e)||gm(e)||pj()}function _i(e){return(function(n){if(Array.isArray(n))return j2(n)})(e)||_j(e)||gm(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 hj(e){if(Array.isArray(e))return e}function _j(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gm(e,n){if(e){if(typeof e=="string")return j2(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)?j2(e,n):void 0}}function j2(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 a,o=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){l=!0,a=c},f:function(){try{o||t.return==null||t.return()}finally{if(l)throw a}}}}var f0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mh(e,n){return e(n={exports:{}},n.exports),n.exports}var fi=Mh((function(e){/*! +${se.error}`:se.text,children:[se.dispatchState==="blocked"?h.jsx(cN,{size:13,className:"shrink-0 text-accent-amber"}):h.jsx(KWe,{size:13,className:"shrink-0 text-muted"}),h.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:se.text}),se.dispatchState!=="blocked"&&h.jsx("span",{className:"shrink-0 text-sm text-muted",children:se.dispatchState==="retrying"?MZe(se.nextRetryAt,Mo):Ete()}),se.dispatchState==="blocked"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>void $e(se.id),"aria-label":hB({text:se.text}),disabled:bt!==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:bt===se.id?CE():Wu()}),h.jsx("button",{onClick:()=>De(se.id),"aria-label":cB({text:se.text}),disabled:bt!==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:xJ()}),me===Ha&&meDe(se.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:h.jsx(_s,{size:11})})]},se.id))}),h.jsxs("div",{className:"composer-box relative flex flex-col border border-border rounded-lg bg-background shadow-elevated","data-onboarding":"composer",children:[et&&!et.agentReady&&h.jsxs("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:[h.jsxs("strong",{children:[et.name," ",WZ()]})," ",et.agentNote?Mh(et.agentNote):Rte()]}),as&&h.jsx(zdt,{skills:vs,activeIndex:Ms,onPick:Pn,onHover:is}),L.length>0&&h.jsx(uft,{annotations:L,onClear:()=>{H([]),window.requestAnimationFrame(()=>{var se;return(se=Ie.current)==null?void 0:se.focus()})},onRemove:se=>{const me=L.filter(ze=>ze.id!==se);H(me),me.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=Ie.current)==null?void 0:ze.focus()})}}),ee.length>0&&h.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:ee.map((se,me)=>{const ze=()=>oe(Ae=>Ae.filter((Ke,At)=>At!==me));return se.mediaType==="application/pdf"?h.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:se.name,children:[h.jsx(Ku,{size:22}),h.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:se.name??"document.pdf"}),h.jsx("button",{title:X6(),"aria-label":X6(),onClick:ze,children:h.jsx(_s,{size:11})})]},me):h.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:[h.jsx("img",{src:se.dataUrl,alt:lte()}),h.jsx("button",{title:Z6(),"aria-label":Z6(),onClick:ze,children:h.jsx(_s,{size:11})})]},me)})}),he&&h.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:he}),q&&h.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:q}),h.jsxs("div",{className:"composer-input relative flex overflow-hidden [&_textarea]:flex-1",children:[h.jsx("textarea",{dir:"auto",ref:Ie,className:"relative z-1 bg-transparent",value:J,placeholder:Ls?Qne():Ga&&et?Cne({harness:Te(kf[et.id]),shortcut:Te(Ol)}):Ot?et!=null&&et.agentReady?DK({harness:Te(kf[Ot.harness])}):TK({harness:Te(kf[Ot.harness])}):OW(),rows:2,onPaste:Vr,onDragOver:se=>{se.dataTransfer.types.includes("Files")&&se.preventDefault()},onDrop:se=>{se.dataTransfer.files.length!==0&&(se.preventDefault(),Ir(Array.from(se.dataTransfer.files)))},onChange:se=>{const me=se.target.value,ze=se.target.selectionStart;zn(ze);const Ae=ze>0&&/\s/.test(me[ze-1])&&!Ls&&!rn.current?Vv(me,ze-1):null;if((Ae==null?void 0:Ae.query)==="plan"&&(pt!=null&&pt.planActivation)){Br(me,Ae);return}const Ke=Ae?yr.find(At=>At.source!=="command"&&At.name===Ae.query):void 0;if(Ke&&Ae){const At=N8(me,Ae,Ke.name,2);$(At.text),window.requestAnimationFrame(()=>{var ds;(ds=Ie.current)==null||ds.setSelectionRange(At.cursor,At.cursor),zn(At.cursor)});return}$(me),xr(!1)},onSelect:se=>zn(se.currentTarget.selectionStart),onCompositionStart:()=>{rn.current=!0},onCompositionEnd:()=>{rn.current=!1},onKeyDown:se=>{if(as){if(se.key==="ArrowDown"||se.key==="ArrowUp"){se.preventDefault();const me=se.key==="ArrowDown"?1:-1;is((Ms+me+vs.length)%vs.length);return}if(se.key==="Tab"||se.key==="Enter"){se.preventDefault(),Pn(vs[Ms]);return}if(se.key==="Escape"){se.preventDefault(),xr(!0);return}}if(se.key==="Backspace"&&Or(se.currentTarget)){se.preventDefault();return}se.key==="Enter"&&!se.shiftKey&&!se.nativeEvent.isComposing&&(se.preventDefault(),Bc({queue:se.metaKey||se.ctrlKey}))}}),h.jsx(Idt,{text:J,isCommand:sa,skills:yr,projectId:e,textareaRef:Ie})]}),h.jsxs("div",{className:"composer-actions flex min-w-0 justify-end items-center gap-2 pt-1.5 px-2 pb-2",children:[h.jsxs("div",{className:"option-picker relative inline-flex shrink-0",ref:it.ref,children:[h.jsx(Jt,{type:"button",className:"composer-bare",title:K1(),"aria-label":K1(),"aria-haspopup":"dialog","aria-expanded":it.open,onClick:()=>it.setOpen(se=>!se),children:h.jsx(pYe,{size:16})}),it.open&&h.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:[h.jsx("span",{className:"px-1 text-sm font-medium text-muted",children:K1()}),h.jsx(OJe,{})]})]}),h.jsx("input",{ref:Ve,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:se=>{Ir(Array.from(se.target.files??[])),se.target.value=""}}),h.jsx(Jt,{type:"button",className:"composer-attach",title:$6(),"aria-label":$6(),onClick:()=>{var se;return(se=Ve.current)==null?void 0:se.click()},children:h.jsx(XKe,{size:16})}),lr&&h.jsxs(Qe,{type:"button",variant:"ghost",active:!0,className:"group",title:G6(),"aria-label":G6(),onClick:()=>void Dl(),children:[h.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[h.jsx(TKe,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),h.jsx(_s,{className:"absolute inset-0 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100",size:16,strokeWidth:1.8})]}),h.jsx("span",{children:NQ()})]}),h.jsx("div",{className:"min-w-0 flex-1"}),h.jsxs("div",{className:"flex min-w-0 items-center",children:[h.jsx(but,{value:Ot,onSelect:Bi,permissionChoices:et!=null&&et.agentReady?(pt==null?void 0:pt.permissionModes)??[]:[],defaultPermissionId:(pt==null?void 0:pt.defaultPermissionMode)??null,onSelectPermission:os,reasoningChoices:et!=null&&et.agentReady?Zs.choices:[],defaultReasoningId:Zs.defaultId,onSelectReasoning:bs,onHarnesses:zt,lockHarness:!!ln}),h.jsx($dt,{usage:ln==null?void 0:ln.contextUsage})]}),bn&&!Ls?h.jsx(Jt,{className:"send-btn",variant:"stop",title:t7(),"aria-label":t7(),onClick:Ll,children:h.jsx(_s,{size:16})}):h.jsx(Jt,{className:"send-btn",variant:"primary",title:kb(),"aria-label":kb(),onClick:()=>void Bc(),disabled:!(et!=null&&et.agentReady)||!J.trim()&&ee.length===0&&L.length===0,children:h.jsx(tN,{size:16})})]})]})]})]})]})}function ho({className:e,...n}){return h.jsx("div",{className:ss("relative flex min-h-0 flex-1 flex-col",e),...n})}function Pu({className:e,...n}){return h.jsx("div",{className:ss("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function Wi({className:e,...n}){return h.jsx("div",{className:ss("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const H8=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function sht({sessionId:e,spawnPartId:n,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}){const[c,d]=M.useState(null),_=M.useRef(null),f=M.useRef(null),m=M.useRef(!0);if(M.useLayoutEffect(()=>{m.current=!0;const S=_.current;S&&(S.scrollTop=S.scrollHeight)},[e,n]),M.useLayoutEffect(()=>{const S=_.current;S&&m.current&&(S.scrollTop=S.scrollHeight)},[c]),M.useEffect(()=>{const S=_.current,k=f.current;if(!S||!k)return;const b=new ResizeObserver(()=>{m.current&&(S.scrollTop=S.scrollHeight)});return b.observe(k),b.observe(S),()=>b.disconnect()},[c===null]),M.useEffect(()=>{let S=!0;const k=new Set;let b=0;const v=()=>{const y=++b;ju(e).then(({messages:C})=>{!S||y!==b||d(A=>{if(!A)return C;const E=C.map(T=>k.has(T.id)?A.find(D=>D.id===T.id)??T:T),j=new Set(C.map(T=>T.id));return[...E,...A.filter(T=>!j.has(T.id))]})}).catch(()=>S&&d(C=>C??[]))};v();const x=Ff(y=>{if(y.type==="reconnected"){k.clear(),v();return}y.type!=="message"||y.sessionId!==e||(k.add(y.message.id),d(C=>{const A=C?C.slice():[],E=A.findIndex(j=>j.id===y.message.id);return E===-1?A.push(y.message):A[E]=y.message,A}))});return()=>{S=!1,x()}},[e]),c===null)return h.jsx(ho,{children:h.jsx("div",{className:H8,children:h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:aFe()})})});let g=null;for(const S of c)if(g=f4(S.parts,n),g)break;return h.jsx(ho,{children:h.jsx("div",{className:H8,ref:_,onScroll:S=>{const k=S.currentTarget;m.current=k.scrollHeight-k.scrollTop-k.clientHeight<60},children:h.jsx("div",{ref:f,children:g?h.jsx(Wft,{spawn:g,onOpenFile:t,onOpenRun:r,runExperimentName:s,onOpenExperiment:a,experimentName:o,onOpenSubagent:l}):h.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:uFe()})})})})}function P8(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 Sn(e){for(var n=1;n=0||(_[c]=o[c]);return _})(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(s[t]=e[t])}return s}function hn(e,n){return Ej(e)||(function(t,r){var s=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(s!=null){var a,o,l,c,d=[],_=!0,f=!1;try{if(l=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;_=!1}else for(;!(_=(a=l.call(s)).done)&&(d.push(a.value),d.length!==r);_=!0);}catch(m){f=!0,o=m}finally{try{if(!_&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw o}}return d}})(e,n)||wm(e,n)||zj()}function Cj(e){return Ej(e)||Nj(e)||wm(e)||zj()}function fi(e){return(function(n){if(Array.isArray(n))return O2(n)})(e)||Nj(e)||wm(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 Ej(e){if(Array.isArray(e))return e}function Nj(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function wm(e,n){if(e){if(typeof e=="string")return O2(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)?O2(e,n):void 0}}function O2(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 a,o=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var c=t.next();return o=c.done,c},e:function(c){l=!0,a=c},f:function(){try{o||t.return==null||t.return()}finally{if(l)throw a}}}}var v0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dh(e,n){return e(n={exports:{}},n.exports),n.exports}var ui=Dh((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?v.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var A=v.slice(y+1);A.indexOf("file mode")===0&&(o[C==="new"?"newMode":"oldMode"]=A.slice(10));break;case"similarity":o.similarity=parseInt(v.split(" ")[2],10);break;case"index":var E=v.slice(y+1).split(" "),j=E[0].split("..");o.oldRevision=j[0],o.newRevision=j[1],E[1]&&(o.oldMode=o.newMode=E[1]);break;case"copy":case"rename":var T=v.slice(y+1);T.indexOf("from")===0?o.oldPath=T.slice(5):o.newPath=T.slice(3),x=C;break;case"---":var D=v.slice(y+1),I=g[++k].slice(4);D==="/dev/null"?(I=I.slice(2),x="add"):I==="/dev/null"?(D=D.slice(2),x="delete"):(x="modify",D=D.slice(2),I=I.slice(2)),D&&(o.oldPath=D),I&&(o.newPath=I),m=5;break e}}o.type=x||"modify"}else if(b.indexOf("Binary")===0)o.isBinary=!0,o.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",m=2,o=null;else if(m===5)if(b.indexOf("@@")===0){var P=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);l={content:b,oldStart:P[1]-0,newStart:P[4]-0,oldLines:P[3]-0||1,newLines:P[6]-0||1,changes:[]},o.hunks.push(l),c=l.oldStart,d=l.newStart}else{var H=b.slice(0,1),F={content:b.slice(1)};switch(H){case"+":F.type="insert",F.isInsert=!0,F.lineNumber=d,d++;break;case"-":F.type="delete",F.isDelete=!0,F.lineNumber=c,c++;break;case" ":F.type="normal",F.isNormal=!0,F.oldLineNumber=c,F.newLineNumber=d,c++,d++;break;case"\\":var V=l.changes[l.changes.length-1];V.isDelete||(o.newEndingNewLine=!1),V.isInsert||(o.oldEndingNewLine=!1)}F.type&&l.changes.push(F)}k++}return f}};e.exports=s})()}));function jl(e){return e.type==="insert"}function pi(e){return e.type==="delete"}function So(e){return e.type==="normal"}function Fft(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(a,o,l){var c=hn(a,3),d=c[0],_=c[1],f=c[2];return _?jl(o)&&f>=0?(d.splice(f+1,0,o),[d,o,f+2]):(d.push(o),[d,o,pi(o)&&pi(_)?f:l]):(d.push(o),[d,o,pi(o)?l:-1])}),[[],null,-1]);return hn(s,1)[0]})(e.changes):e.changes;return yn(yn({},e),{},{isPlain:!1,changes:t})}function M2(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?v.slice(0,y):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var A=v.slice(y+1);A.indexOf("file mode")===0&&(o[C==="new"?"newMode":"oldMode"]=A.slice(10));break;case"similarity":o.similarity=parseInt(v.split(" ")[2],10);break;case"index":var E=v.slice(y+1).split(" "),j=E[0].split("..");o.oldRevision=j[0],o.newRevision=j[1],E[1]&&(o.oldMode=o.newMode=E[1]);break;case"copy":case"rename":var T=v.slice(y+1);T.indexOf("from")===0?o.oldPath=T.slice(5):o.newPath=T.slice(3),x=C;break;case"---":var D=v.slice(y+1),I=g[++k].slice(4);D==="/dev/null"?(I=I.slice(2),x="add"):I==="/dev/null"?(D=D.slice(2),x="delete"):(x="modify",D=D.slice(2),I=I.slice(2)),D&&(o.oldPath=D),I&&(o.newPath=I),m=5;break e}}o.type=x||"modify"}else if(b.indexOf("Binary")===0)o.isBinary=!0,o.type=b.indexOf("/dev/null and")>=0?"add":b.indexOf("and /dev/null")>=0?"delete":"modify",m=2,o=null;else if(m===5)if(b.indexOf("@@")===0){var P=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(b);l={content:b,oldStart:P[1]-0,newStart:P[4]-0,oldLines:P[3]-0||1,newLines:P[6]-0||1,changes:[]},o.hunks.push(l),c=l.oldStart,d=l.newStart}else{var B=b.slice(0,1),F={content:b.slice(1)};switch(B){case"+":F.type="insert",F.isInsert=!0,F.lineNumber=d,d++;break;case"-":F.type="delete",F.isDelete=!0,F.lineNumber=c,c++;break;case" ":F.type="normal",F.isNormal=!0,F.oldLineNumber=c,F.newLineNumber=d,c++,d++;break;case"\\":var V=l.changes[l.changes.length-1];V.isDelete||(o.newEndingNewLine=!1),V.isInsert||(o.oldEndingNewLine=!1)}F.type&&l.changes.push(F)}k++}return f}};e.exports=s})()}));function Rl(e){return e.type==="insert"}function hi(e){return e.type==="delete"}function wo(e){return e.type==="normal"}function lht(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(a,o,l){var c=hn(a,3),d=c[0],_=c[1],f=c[2];return _?Rl(o)&&f>=0?(d.splice(f+1,0,o),[d,o,f+2]):(d.push(o),[d,o,hi(o)&&hi(_)?f:l]):(d.push(o),[d,o,hi(o)?l:-1])}),[[],null,-1]);return hn(s,1)[0]})(e.changes):e.changes;return Sn(Sn({},e),{},{isPlain:!1,changes:t})}function I2(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(` `),a=r.indexOf(` `,s+1),o=r.slice(0,s),l=r.slice(s+1,a),c=o.split(" ").slice(1,-3).join(" "),d=l.split(" ").slice(1,-3).join(" ");return["diff --git a/".concat(c," b/").concat(d),"index 1111111..2222222 100644","--- a/".concat(c),"+++ b/".concat(d),r.slice(a+1)].join(` -`)})(e.trimStart());return Pft.parse(t).map((function(r){return(function(s,a){var o=s.hunks.map((function(l){return Fft(l,a)}));return yn(yn({},s),{},{hunks:o})})(r,n)}))}function Uft(e){return e[0]}function qft(e){return e[e.length-1]}function R2(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function Qf(e){return e==="old"?function(n){return jl(n)?-1:So(n)?n.oldLineNumber:n.lineNumber}:function(n){return pi(n)?-1:So(n)?n.newLineNumber:n.lineNumber}}function gj(e,n){return function(t,r){var s=t[e],a=s+t[n];return r>=s&&r=a&&s-1},Qft=function(e,n){var t=this.__data__,r=vm(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function ku(e){var n=-1,t=e==null?0:e.length;for(this.clear();++nl))return!1;var d=a.get(e),_=a.get(n);if(d&&_)return d==n&&_==e;var f=-1,m=!0,g=2&t?new Lht:void 0;for(a.set(e,n),a.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Vn={};Vn["[object Float32Array]"]=Vn["[object Float64Array]"]=Vn["[object Int8Array]"]=Vn["[object Int16Array]"]=Vn["[object Int32Array]"]=Vn["[object Uint8Array]"]=Vn["[object Uint8ClampedArray]"]=Vn["[object Uint16Array]"]=Vn["[object Uint32Array]"]=!0,Vn["[object Arguments]"]=Vn["[object Array]"]=Vn["[object ArrayBuffer]"]=Vn["[object Boolean]"]=Vn["[object DataView]"]=Vn["[object Date]"]=Vn["[object Error]"]=Vn["[object Function]"]=Vn["[object Map]"]=Vn["[object Number]"]=Vn["[object Object]"]=Vn["[object RegExp]"]=Vn["[object Set]"]=Vn["[object String]"]=Vn["[object WeakMap]"]=!1;var Zht=function(e){return td(e)&&d4(e.length)&&!!Vn[gd(e)]},Qht=function(e){return function(n){return e(n)}},U8=Mh((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&xj.process,a=(function(){try{var o=r&&r.require&&r.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})),q8=U8&&U8.isTypedArray,f4=q8?Qht(q8):Zht,Jht=Object.prototype.hasOwnProperty,e_t=function(e,n){var t=gi(e),r=!t&&wm(e),s=!t&&!r&&gp(e),a=!t&&!r&&!s&&f4(e),o=t||r||s||a,l=o?Vht(e.length,String):[],c=l.length;for(var d in e)!Jht.call(e,d)||o&&(d=="length"||s&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Ej(d,c))||l.push(d);return l},t_t=Object.prototype,Nj=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||t_t)},n_t=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),r_t=Object.prototype.hasOwnProperty,zj=function(e){if(!Nj(e))return n_t(e);var n=[];for(var t in Object(e))r_t.call(e,t)&&t!="constructor"&&n.push(t);return n},Sm=function(e){return e!=null&&d4(e.length)&&!wj(e)},h4=function(e){return Sm(e)?e_t(e):zj(e)},G8=function(e){return Pht(e,h4,Ght)},s_t=Object.prototype.hasOwnProperty,i_t=function(e,n,t,r,s,a){var o=1&t,l=G8(e),c=l.length;if(c!=G8(n).length&&!o)return!1;for(var d=c;d--;){var _=l[d];if(!(o?_ in n:s_t.call(n,_)))return!1}var f=a.get(e),m=a.get(n);if(f&&m)return f==n&&m==e;var g=!0;a.set(e,n),a.set(n,e);for(var S=o;++d1)return!1;if(e.length===1){var n=hn(e,1)[0];return n.type==="text"&&!n.value}return!0}function W_t(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,a=Cl(e,G_t),o=s?function(l,c){return s(l,X8,c)}:X8;return h.jsx("td",yn(yn({},a),{},{"data-change-key":n,children:r?V_t(r)?" ":r.map(o):t||" "}))}var Oj=M.memo(W_t);function Ij(e,n){return function(){var t=n==="old"?zm(e):Am(e);return t===-1?void 0:t}}function Bj(e,n){return function(t){return e&&t?h.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function vp(e,n){return n?function(t){e(),n(t)}:e}function Z8(e,n,t,r){return M.useMemo((function(){var s=Lj(e,(function(a){return function(o){return a&&a(n,o)}}));return s.onMouseEnter=vp(t,s.onMouseEnter),s.onMouseLeave=vp(r,s.onMouseLeave),s}),[e,t,r,n])}function Q8(e,n,t,r,s,a,o,l,c){var d={change:n,side:r,inHoverState:l,renderDefault:Ij(n,r),wrapInAnchor:Bj(s,a)};return h.jsx("td",yn(yn({className:e},o),{},{"data-change-key":t,children:c(d)}))}function K_t(e){var n,t,r,s=e.change,a=e.selected,o=e.tokens,l=e.className,c=e.generateLineClassName,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.gutterAnchor,k=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,x=s.type,y=s.content,C=vl(s),A=(n=hn(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),E=hn(A,3),j=E[0],T=E[1],D=E[2],I=M.useMemo((function(){return{change:s}}),[s]),P=Z8(f,I,T,D),H=Z8(m,I,T,D),F=k(s),V=c({changes:[s],defaultGenerate:function(){return l}}),X=fi("diff-gutter","diff-gutter-".concat(x),d,{"diff-gutter-selected":a}),W=fi("diff-code","diff-code-".concat(x),_,{"diff-code-selected":a});return h.jsxs("tr",{id:F,className:fi("diff-line",V),children:[!g&&Q8(X,s,C,"old",S,F,P,j,v),!g&&Q8(X,s,C,"new",S,F,P,j,v),h.jsx(Oj,yn({className:W,changeKey:C,text:y,tokens:o,renderToken:b},H))]})}var Y_t=M.memo(K_t);function X_t(e){var n=e.hideGutter,t=e.element;return h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var Z_t=["hideGutter","selectedChanges","tokens","lineClassName"],Q_t=["hunk","widgets","className"];function J_t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cl(e,Q_t),a=(function(o,l){return o.reduce((function(c,d){var _=vl(d);c.push(["change",_,d]);var f=l[_];return f&&c.push(["widget",_,f]),c}),[])})(n.changes,t);return h.jsx("tbody",{className:fi("diff-hunk",r),children:a.map((function(o){return(function(l,c){var d=hn(l,3),_=d[0],f=d[1],m=d[2],g=c.hideGutter,S=c.selectedChanges,k=c.tokens,b=c.lineClassName,v=Cl(c,Z_t);if(_==="change"){var x=pi(m)?"old":"new",y=pi(m)?zm(m):Am(m),C=k?k[x][y-1]:null;return h.jsx(Y_t,yn({className:b,change:m,hideGutter:g,selected:S.includes(f),tokens:C},v),"change".concat(f))}return _==="widget"?h.jsx(X_t,{hideGutter:g,element:m},"widget".concat(f)):null})(o,s)}))})}var $j=0;function _0(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),a=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var o=Lj(r,(function(l){return function(c){return l&&l({side:e,change:t},c)}}));return o.onMouseEnter=vp(s,o.onMouseEnter),o.onMouseLeave=vp(a,o.onMouseLeave),o}),[t,r,s,e,a])}function Jv(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,a=e.gutterClassName,o=e.codeClassName,l=e.gutterEvents,c=e.codeEvents,d=e.anchorID,_=e.gutterAnchor,f=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,S=e.renderToken,k=e.renderGutter;if(!n){var b=fi("diff-gutter","diff-gutter-omit",a),v=fi("diff-code","diff-code-omit",o);return[!m&&h.jsx("td",{className:b},"gutter"),h.jsx("td",{className:v},"code")]}var x=n.type,y=n.content,C=vl(n),A=t===$j?"old":"new",E=yn({id:d||void 0,className:fi("diff-gutter","diff-gutter-".concat(x),T2({"diff-gutter-selected":r},"diff-line-hover-"+A,g),a),children:k({change:n,side:A,inHoverState:g,renderDefault:Ij(n,A),wrapInAnchor:Bj(_,f)})},l),j=fi("diff-code","diff-code-".concat(x),T2({"diff-code-selected":r},"diff-line-hover-"+A,g),o);return[!m&&h.jsx("td",yn(yn({},E),{},{"data-change-key":C}),"gutter"),h.jsx(Oj,yn({className:j,changeKey:C,text:y,tokens:s,renderToken:S},c),"code")]}function e0t(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,a=e.newSelected,o=e.oldTokens,l=e.newTokens,c=e.monotonous,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.generateAnchorID,k=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,x=e.renderGutter,y=hn(M.useState(""),2),C=y[0],A=y[1],E=_0("old",A,t,f),j=_0("new",A,r,f),T=_0("old",A,t,m),D=_0("new",A,r,m),I=t&&S(t),P=r&&S(r),H=k({changes:[t,r],defaultGenerate:function(){return n}}),F={monotonous:c,hideGutter:g,gutterClassName:d,codeClassName:_,gutterEvents:f,codeEvents:m,renderToken:v,renderGutter:x},V=yn(yn({},F),{},{change:t,side:$j,selected:s,tokens:o,gutterEvents:E,codeEvents:T,anchorID:I,gutterAnchor:b,gutterAnchorTarget:I,hover:C==="old"}),X=yn(yn({},F),{},{change:r,side:1,selected:a,tokens:l,gutterEvents:j,codeEvents:D,anchorID:t===r?null:P,gutterAnchor:b,gutterAnchorTarget:t===r?I:P,hover:C==="new"});if(c)return h.jsx("tr",{className:fi("diff-line",H),children:Jv(t?V:X)});var W=(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 h.jsxs("tr",{className:fi("diff-line",W,H),children:[Jv(V),Jv(X)]})}var t0t=M.memo(e0t);function n0t(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):h.jsxs("tr",{className:"diff-widget",children:[h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var r0t=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],s0t=["hunk","widgets","className"];function p0(e,n){return(e?vl(e):"00")+(n?vl(n):"00")}function i0t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Cl(e,s0t),a=(function(o,l){for(var c=function(v){if(!v)return null;var x=vl(v);return l[x]||null},d=[],_=0;_=s&&r=a&&s-1},vht=function(e,n){var t=this.__data__,r=Sm(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Eu(e){var n=-1,t=e==null?0:e.length;for(this.clear();++nl))return!1;var d=a.get(e),_=a.get(n);if(d&&_)return d==n&&_==e;var f=-1,m=!0,g=2&t?new t_t:void 0;for(a.set(e,n),a.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Gn={};Gn["[object Float32Array]"]=Gn["[object Float64Array]"]=Gn["[object Int8Array]"]=Gn["[object Int16Array]"]=Gn["[object Int32Array]"]=Gn["[object Uint8Array]"]=Gn["[object Uint8ClampedArray]"]=Gn["[object Uint16Array]"]=Gn["[object Uint32Array]"]=!0,Gn["[object Arguments]"]=Gn["[object Array]"]=Gn["[object ArrayBuffer]"]=Gn["[object Boolean]"]=Gn["[object DataView]"]=Gn["[object Date]"]=Gn["[object Error]"]=Gn["[object Function]"]=Gn["[object Map]"]=Gn["[object Number]"]=Gn["[object Object]"]=Gn["[object RegExp]"]=Gn["[object Set]"]=Gn["[object String]"]=Gn["[object WeakMap]"]=!1;var g_t=function(e){return rd(e)&&m4(e.length)&&!!Gn[xd(e)]},v_t=function(e){return function(n){return e(n)}},Y8=Dh((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&Rj.process,a=(function(){try{var o=r&&r.require&&r.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}})();e.exports=a})),X8=Y8&&Y8.isTypedArray,g4=X8?v_t(X8):g_t,b_t=Object.prototype.hasOwnProperty,x_t=function(e,n){var t=pi(e),r=!t&&Nm(e),s=!t&&!r&&wp(e),a=!t&&!r&&!s&&g4(e),o=t||r||s||a,l=o?f_t(e.length,String):[],c=l.length;for(var d in e)!b_t.call(e,d)||o&&(d=="length"||s&&(d=="offset"||d=="parent")||a&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||$j(d,c))||l.push(d);return l},y_t=Object.prototype,Hj=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||y_t)},w_t=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),S_t=Object.prototype.hasOwnProperty,Pj=function(e){if(!Hj(e))return w_t(e);var n=[];for(var t in Object(e))S_t.call(e,t)&&t!="constructor"&&n.push(t);return n},zm=function(e){return e!=null&&m4(e.length)&&!Lj(e)},v4=function(e){return zm(e)?x_t(e):Pj(e)},Z8=function(e){return o_t(e,v4,d_t)},k_t=Object.prototype.hasOwnProperty,C_t=function(e,n,t,r,s,a){var o=1&t,l=Z8(e),c=l.length;if(c!=Z8(n).length&&!o)return!1;for(var d=c;d--;){var _=l[d];if(!(o?_ in n:k_t.call(n,_)))return!1}var f=a.get(e),m=a.get(n);if(f&&m)return f==n&&m==e;var g=!0;a.set(e,n),a.set(n,e);for(var S=o;++d1)return!1;if(e.length===1){var n=hn(e,1)[0];return n.type==="text"&&!n.value}return!0}function h0t(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,a=Nl(e,d0t),o=s?function(l,c){return s(l,nC,c)}:nC;return h.jsx("td",Sn(Sn({},a),{},{"data-change-key":n,children:r?f0t(r)?" ":r.map(o):t||" "}))}var Yj=M.memo(h0t);function Xj(e,n){return function(){var t=n==="old"?Rm(e):Dm(e);return t===-1?void 0:t}}function Zj(e,n){return function(t){return e&&t?h.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function Sp(e,n){return n?function(t){e(),n(t)}:e}function rC(e,n,t,r){return M.useMemo((function(){var s=Kj(e,(function(a){return function(o){return a&&a(n,o)}}));return s.onMouseEnter=Sp(t,s.onMouseEnter),s.onMouseLeave=Sp(r,s.onMouseLeave),s}),[e,t,r,n])}function sC(e,n,t,r,s,a,o,l,c){var d={change:n,side:r,inHoverState:l,renderDefault:Xj(n,r),wrapInAnchor:Zj(s,a)};return h.jsx("td",Sn(Sn({className:e},o),{},{"data-change-key":t,children:c(d)}))}function _0t(e){var n,t,r,s=e.change,a=e.selected,o=e.tokens,l=e.className,c=e.generateLineClassName,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.gutterAnchor,k=e.generateAnchorID,b=e.renderToken,v=e.renderGutter,x=s.type,y=s.content,C=xl(s),A=(n=hn(M.useState(!1),2),t=n[0],r=n[1],[t,M.useCallback((function(){return r(!0)}),[]),M.useCallback((function(){return r(!1)}),[])]),E=hn(A,3),j=E[0],T=E[1],D=E[2],I=M.useMemo((function(){return{change:s}}),[s]),P=rC(f,I,T,D),B=rC(m,I,T,D),F=k(s),V=c({changes:[s],defaultGenerate:function(){return l}}),X=ui("diff-gutter","diff-gutter-".concat(x),d,{"diff-gutter-selected":a}),W=ui("diff-code","diff-code-".concat(x),_,{"diff-code-selected":a});return h.jsxs("tr",{id:F,className:ui("diff-line",V),children:[!g&&sC(X,s,C,"old",S,F,P,j,v),!g&&sC(X,s,C,"new",S,F,P,j,v),h.jsx(Yj,Sn({className:W,changeKey:C,text:y,tokens:o,renderToken:b},B))]})}var p0t=M.memo(_0t);function m0t(e){var n=e.hideGutter,t=e.element;return h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:3,className:"diff-widget-content",children:t})})}var g0t=["hideGutter","selectedChanges","tokens","lineClassName"],v0t=["hunk","widgets","className"];function b0t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Nl(e,v0t),a=(function(o,l){return o.reduce((function(c,d){var _=xl(d);c.push(["change",_,d]);var f=l[_];return f&&c.push(["widget",_,f]),c}),[])})(n.changes,t);return h.jsx("tbody",{className:ui("diff-hunk",r),children:a.map((function(o){return(function(l,c){var d=hn(l,3),_=d[0],f=d[1],m=d[2],g=c.hideGutter,S=c.selectedChanges,k=c.tokens,b=c.lineClassName,v=Nl(c,g0t);if(_==="change"){var x=hi(m)?"old":"new",y=hi(m)?Rm(m):Dm(m),C=k?k[x][y-1]:null;return h.jsx(p0t,Sn({className:b,change:m,hideGutter:g,selected:S.includes(f),tokens:C},v),"change".concat(f))}return _==="widget"?h.jsx(m0t,{hideGutter:g,element:m},"widget".concat(f)):null})(o,s)}))})}var Qj=0;function x0(e,n,t,r){var s=M.useCallback((function(){return n(e)}),[e,n]),a=M.useCallback((function(){return n("")}),[n]);return M.useMemo((function(){var o=Kj(r,(function(l){return function(c){return l&&l({side:e,change:t},c)}}));return o.onMouseEnter=Sp(s,o.onMouseEnter),o.onMouseLeave=Sp(a,o.onMouseLeave),o}),[t,r,s,e,a])}function rb(e){var n=e.change,t=e.side,r=e.selected,s=e.tokens,a=e.gutterClassName,o=e.codeClassName,l=e.gutterEvents,c=e.codeEvents,d=e.anchorID,_=e.gutterAnchor,f=e.gutterAnchorTarget,m=e.hideGutter,g=e.hover,S=e.renderToken,k=e.renderGutter;if(!n){var b=ui("diff-gutter","diff-gutter-omit",a),v=ui("diff-code","diff-code-omit",o);return[!m&&h.jsx("td",{className:b},"gutter"),h.jsx("td",{className:v},"code")]}var x=n.type,y=n.content,C=xl(n),A=t===Qj?"old":"new",E=Sn({id:d||void 0,className:ui("diff-gutter","diff-gutter-".concat(x),L2({"diff-gutter-selected":r},"diff-line-hover-"+A,g),a),children:k({change:n,side:A,inHoverState:g,renderDefault:Xj(n,A),wrapInAnchor:Zj(_,f)})},l),j=ui("diff-code","diff-code-".concat(x),L2({"diff-code-selected":r},"diff-line-hover-"+A,g),o);return[!m&&h.jsx("td",Sn(Sn({},E),{},{"data-change-key":C}),"gutter"),h.jsx(Yj,Sn({className:j,changeKey:C,text:y,tokens:s,renderToken:S},c),"code")]}function x0t(e){var n=e.className,t=e.oldChange,r=e.newChange,s=e.oldSelected,a=e.newSelected,o=e.oldTokens,l=e.newTokens,c=e.monotonous,d=e.gutterClassName,_=e.codeClassName,f=e.gutterEvents,m=e.codeEvents,g=e.hideGutter,S=e.generateAnchorID,k=e.generateLineClassName,b=e.gutterAnchor,v=e.renderToken,x=e.renderGutter,y=hn(M.useState(""),2),C=y[0],A=y[1],E=x0("old",A,t,f),j=x0("new",A,r,f),T=x0("old",A,t,m),D=x0("new",A,r,m),I=t&&S(t),P=r&&S(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),F={monotonous:c,hideGutter:g,gutterClassName:d,codeClassName:_,gutterEvents:f,codeEvents:m,renderToken:v,renderGutter:x},V=Sn(Sn({},F),{},{change:t,side:Qj,selected:s,tokens:o,gutterEvents:E,codeEvents:T,anchorID:I,gutterAnchor:b,gutterAnchorTarget:I,hover:C==="old"}),X=Sn(Sn({},F),{},{change:r,side:1,selected:a,tokens:l,gutterEvents:j,codeEvents:D,anchorID:t===r?null:P,gutterAnchor:b,gutterAnchorTarget:t===r?I:P,hover:C==="new"});if(c)return h.jsx("tr",{className:ui("diff-line",B),children:rb(t?V:X)});var W=(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 h.jsxs("tr",{className:ui("diff-line",W,B),children:[rb(V),rb(X)]})}var y0t=M.memo(x0t);function w0t(e){var n=e.hideGutter,t=e.oldElement,r=e.newElement;return e.monotonous?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t||r})}):t===r?h.jsx("tr",{className:"diff-widget",children:h.jsx("td",{colSpan:n?2:4,className:"diff-widget-content",children:t})}):h.jsxs("tr",{className:"diff-widget",children:[h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:t}),h.jsx("td",{colSpan:n?1:2,className:"diff-widget-content",children:r})]})}var S0t=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],k0t=["hunk","widgets","className"];function y0(e,n){return(e?xl(e):"00")+(n?xl(n):"00")}function C0t(e){var n=e.hunk,t=e.widgets,r=e.className,s=Nl(e,k0t),a=(function(o,l){for(var c=function(v){if(!v)return null;var x=xl(v);return l[x]||null},d=[],_=0;_=(a==null?void 0:a.value.length))return[e];var l=function(f,m){var g=a.value.slice(f,m);return[].concat(_i(s),[yn(yn({},a),{},{value:g})])};if(n>0){var c=l(0,n);o.push(ju(c))}var d=l(Math.max(n,0),t);if(o.push(r?(function(f,m){return[m].concat(_i(ju(f)))})(d,r):ju(d)),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=Cl(e,C0t);t.push(s);var a,o=c4(r);try{for(o.s();!(a=o.n()).done;)Uj(a.value,n,t)}catch(l){o.e(l)}finally{o.f()}t.pop()}else n.push(ju([].concat(_i(t.slice(1)),[e])));return n}function E0t(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var d=v4(c);return d.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[w0(r(n.oldSource)),w0(r(t))]}var s=hn(H0t(e),2),a=s[0],o=s[1],l=n.highlight?function(c){return w0(n.refractor.highlight(c,n.language))}:function(c){return w0([{type:"text",value:c}])};return[l(a),l(o)]}function Ru(e){return e.map((function(n){return Sn({},n)}))}function F0t(e,n){return[].concat(fi(Ru(e.slice(0,-1))),[n])}function U0t(e){return e.type==="text"}function S4(e){var n=e[e.length-1];if(U0t(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function q0t(e,n,t,r){var s=e.slice(0,-1),a=S4(e),o=[];if(t<=0||n>=(a==null?void 0:a.value.length))return[e];var l=function(f,m){var g=a.value.slice(f,m);return[].concat(fi(s),[Sn(Sn({},a),{},{value:g})])};if(n>0){var c=l(0,n);o.push(Ru(c))}var d=l(Math.max(n,0),t);if(o.push(r?(function(f,m){return[m].concat(fi(Ru(f)))})(d,r):Ru(d)),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=Nl(e,G0t);t.push(s);var a,o=_4(r);try{for(o.s();!(a=o.n()).done;)nM(a.value,n,t)}catch(l){o.e(l)}finally{o.f()}t.pop()}else n.push(Ru([].concat(fi(t.slice(1)),[e])));return n}function V0t(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var d=S4(c);return d.value.includes(` `)?d.value.split(` -`).map((function(_){return w0t(c,yn(yn({},d),{},{value:_}))})):[c]})(t),a=fj(s),o=a[0],l=a.slice(1);return[].concat(_i(n.slice(0,-1)),[[].concat(_i(r),[o])],_i(l.map((function(c){return[c]}))))}),[[]])}function nC(e){return E0t(Uj(e))}var N0t=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?km(e,n,void 0,t):!!r},z0t=function(e,n){return km(e,n)},A0t=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function T0t(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=A0t(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&N0t(t,r,(function(a,o,l){return l==="chlidren"||z0t(a,o)}))))?e.children[e.children.length-1]=(function(a,o){return"value"in a&&"value"in o?yn(yn({},a),{},{value:"".concat(a.value).concat(o.value)}):a})(s,n):e.children.push(n),e.children[e.children.length-1]}function rC(e){var n,t={type:"root",children:[]},r=c4(e);try{var s=function(){var a=n.value;a.reduce((function(o,l,c){return T0t(o,c===a.length-1?yn({},l):yn(yn({},l),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(a){r.e(a)}finally{r.f()}return t}var j0t=Object.prototype.hasOwnProperty,M0t=Pj((function(e,n,t){j0t.call(e,t)?e[t].push(n):m4(e,t,[n])})),R0t=Object.prototype.hasOwnProperty,D0t=function(e){if(e==null)return!0;if(Sm(e)&&(gi(e)||typeof e=="string"||typeof e.splice=="function"||gp(e)||f4(e)||wm(e)))return!e.length;var n=B2(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(Nj(e))return!zj(e).length;for(var t in e)if(R0t.call(e,t))return!1;return!0},L0t=function(e,n){var t=n.start,r=n.length,s=t+r,a=e.reduce((function(o,l){var c=hn(o,2),d=c[0],_=c[1],f=_+v4(l).value.length;if(_>s||fr.length?t:r,c=t.length>r.length?r:t,d=l.indexOf(c);if(d!=-1)return o=[new n.Diff(1,l.substring(0,d)),new n.Diff(0,c),new n.Diff(1,l.substring(d+c.length))],t.length>r.length&&(o[0][0]=o[2][0]=-1),o;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var f=_[0],m=_[1],g=_[2],S=_[3],k=_[4],b=this.diff_main(f,g,s,a),v=this.diff_main(m,S,s,a);return b.concat([new n.Diff(0,k)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,a):this.diff_bisect_(t,r,a)},n.prototype.diff_lineMode_=function(t,r,s){var a=this.diff_linesToChars_(t,r);t=a.chars1,r=a.chars2;var o=a.lineArray,l=this.diff_main(t,r,!1,s);this.diff_charsToLines_(l,o),this.diff_cleanupSemantic(l),l.push(new n.Diff(0,""));for(var c=0,d=0,_=0,f="",m="";c=1&&_>=1){l.splice(c-d-_,d+_),c=c-d-_;for(var g=this.diff_main(f,m,!1,s),S=g.length-1;S>=0;S--)l.splice(c,0,g[S]);c+=g.length}_=0,d=0,f="",m=""}c++}return l.pop(),l},n.prototype.diff_bisect_=function(t,r,s){for(var a=t.length,o=r.length,l=Math.ceil((a+o)/2),c=l,d=2*l,_=new Array(d),f=new Array(d),m=0;ms);y++){for(var C=-y+k;C<=y-b;C+=2){for(var A=c+C,E=(P=C==-y||C!=y&&_[A-1]<_[A+1]?_[A+1]:_[A-1]+1)-C;Pa)b+=2;else if(E>o)k+=2;else if(S&&(D=c+g-C)>=0&&D=(T=a-f[D]))return this.diff_bisectSplit_(t,r,P,E,s)}for(var j=-y+v;j<=y-x;j+=2){for(var T,D=c+j,I=(T=j==-y||j!=y&&f[D-1]a)x+=2;else if(I>o)v+=2;else if(!S&&(A=c+g-j)>=0&&A=(T=a-T))return this.diff_bisectSplit_(t,r,P,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,a,o){var l=t.substring(0,s),c=r.substring(0,a),d=t.substring(s),_=r.substring(a),f=this.diff_main(l,c,!1,o),m=this.diff_main(d,_,!1,o);return f.concat(m)},n.prototype.diff_linesToChars_=function(t,r){var s=[],a={};function o(d){for(var _="",f=0,m=-1,g=s.length;ms||fr.length?t:r,c=t.length>r.length?r:t,d=l.indexOf(c);if(d!=-1)return o=[new n.Diff(1,l.substring(0,d)),new n.Diff(0,c),new n.Diff(1,l.substring(d+c.length))],t.length>r.length&&(o[0][0]=o[2][0]=-1),o;if(c.length==1)return[new n.Diff(-1,t),new n.Diff(1,r)];var _=this.diff_halfMatch_(t,r);if(_){var f=_[0],m=_[1],g=_[2],S=_[3],k=_[4],b=this.diff_main(f,g,s,a),v=this.diff_main(m,S,s,a);return b.concat([new n.Diff(0,k)],v)}return s&&t.length>100&&r.length>100?this.diff_lineMode_(t,r,a):this.diff_bisect_(t,r,a)},n.prototype.diff_lineMode_=function(t,r,s){var a=this.diff_linesToChars_(t,r);t=a.chars1,r=a.chars2;var o=a.lineArray,l=this.diff_main(t,r,!1,s);this.diff_charsToLines_(l,o),this.diff_cleanupSemantic(l),l.push(new n.Diff(0,""));for(var c=0,d=0,_=0,f="",m="";c=1&&_>=1){l.splice(c-d-_,d+_),c=c-d-_;for(var g=this.diff_main(f,m,!1,s),S=g.length-1;S>=0;S--)l.splice(c,0,g[S]);c+=g.length}_=0,d=0,f="",m=""}c++}return l.pop(),l},n.prototype.diff_bisect_=function(t,r,s){for(var a=t.length,o=r.length,l=Math.ceil((a+o)/2),c=l,d=2*l,_=new Array(d),f=new Array(d),m=0;ms);y++){for(var C=-y+k;C<=y-b;C+=2){for(var A=c+C,E=(P=C==-y||C!=y&&_[A-1]<_[A+1]?_[A+1]:_[A-1]+1)-C;Pa)b+=2;else if(E>o)k+=2;else if(S&&(D=c+g-C)>=0&&D=(T=a-f[D]))return this.diff_bisectSplit_(t,r,P,E,s)}for(var j=-y+v;j<=y-x;j+=2){for(var T,D=c+j,I=(T=j==-y||j!=y&&f[D-1]a)x+=2;else if(I>o)v+=2;else if(!S&&(A=c+g-j)>=0&&A=(T=a-T))return this.diff_bisectSplit_(t,r,P,E,s)}}}return[new n.Diff(-1,t),new n.Diff(1,r)]},n.prototype.diff_bisectSplit_=function(t,r,s,a,o){var l=t.substring(0,s),c=r.substring(0,a),d=t.substring(s),_=r.substring(a),f=this.diff_main(l,c,!1,o),m=this.diff_main(d,_,!1,o);return f.concat(m)},n.prototype.diff_linesToChars_=function(t,r){var s=[],a={};function o(d){for(var _="",f=0,m=-1,g=s.length;ma?t=t.substring(s-a):sr.length?t:r,a=t.length>r.length?r:t;if(s.length<4||2*a.length=k.length?[x,y,C,A,T]:null}var c,d,_,f,m,g=l(s,a,Math.ceil(s.length/4)),S=l(s,a,Math.ceil(s.length/2));return g||S?(c=S?g&&g[4].length>S[4].length?g:S:g,t.length>r.length?(d=c[0],_=c[1],f=c[2],m=c[3]):(f=c[0],m=c[1],d=c[2],_=c[3]),[d,_,f,m,c[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var r=!1,s=[],a=0,o=null,l=0,c=0,d=0,_=0,f=0;l0?s[a-1]:-1,c=0,d=0,_=0,f=0,o=null,r=!0)),l++;for(r&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),l=1;l=k?(S>=m.length/2||S>=g.length/2)&&(t.splice(l,0,new n.Diff(0,g.substring(0,S))),t[l-1][1]=m.substring(0,m.length-S),t[l+1][1]=g.substring(S),l++):(k>=m.length/2||k>=g.length/2)&&(t.splice(l,0,new n.Diff(0,m.substring(0,k))),t[l-1][0]=1,t[l-1][1]=g.substring(0,g.length-k),t[l+1][0]=-1,t[l+1][1]=m.substring(k),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(t){function r(k,b){if(!k||!b)return 6;var v=k.charAt(k.length-1),x=b.charAt(0),y=v.match(n.nonAlphaNumericRegex_),C=x.match(n.nonAlphaNumericRegex_),A=y&&v.match(n.whitespaceRegex_),E=C&&x.match(n.whitespaceRegex_),j=A&&v.match(n.linebreakRegex_),T=E&&x.match(n.linebreakRegex_),D=j&&k.match(n.blanklineEndRegex_),I=T&&b.match(n.blanklineStartRegex_);return D||I?5:j||T?4:y&&!A&&E?3:A||E?2:y||C?1:0}for(var s=1;s=g&&(g=S,_=a,f=o,m=l)}t[s-1][1]!=_&&(_?t[s-1][1]=_:(t.splice(s-1,1),s--),t[s][1]=f,m?t[s+1][1]=m:(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=[],a=0,o=null,l=0,c=!1,d=!1,_=!1,f=!1;l0?s[a-1]:-1,_=f=!1),r=!0)),l++;r&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push(new n.Diff(0,""));for(var r,s=0,a=0,o=0,l="",c="";s1?(a!==0&&o!==0&&((r=this.diff_commonPrefix(c,l))!==0&&(s-a-o>0&&t[s-a-o-1][0]==0?t[s-a-o-1][1]+=c.substring(0,r):(t.splice(0,0,new n.Diff(0,c.substring(0,r))),s++),c=c.substring(r),l=l.substring(r)),(r=this.diff_commonSuffix(c,l))!==0&&(t[s][1]=c.substring(c.length-r)+t[s][1],c=c.substring(0,c.length-r),l=l.substring(0,l.length-r))),s-=a+o,t.splice(s,a+o),l.length&&(t.splice(s,0,new n.Diff(-1,l)),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++,o=0,a=0,l="",c=""}t[t.length-1][1]===""&&t.pop();var d=!1;for(s=1;sr));s++)l=a,c=o;return t.length!=s&&t[s][0]===-1?c:c+(r-l)},n.prototype.diff_prettyHtml=function(t){for(var r=[],s=/&/g,a=//g,l=/\n/g,c=0;c");switch(d){case 1:r[c]=''+_+"";break;case-1:r[c]=''+_+"";break;case 0:r[c]=""+_+""}}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 a=this.match_alphabet_(r),o=this;function l(E,j){var T=E/r.length,D=Math.abs(s-j);return o.Match_Distance?T+D/o.Match_Distance:D?1:T}var c=this.Match_Threshold,d=t.indexOf(r,s);d!=-1&&(c=Math.min(l(0,d),c),(d=t.lastIndexOf(r,s+r.length))!=-1&&(c=Math.min(l(0,d),c)));var _,f,m=1<=b;y--){var C=a[t.charAt(y-1)];if(x[y]=k===0?(x[y+1]<<1|1)&C:(x[y+1]<<1|1)&C|(g[y+1]|g[y])<<1|1|g[y+1],x[y]&m){var A=l(k,y-1);if(A<=c){if(c=A,!((d=y-1)>s))break;b=Math.max(1,2*s-d)}}}if(l(k+1,s)>c)break;g=x}return d},n.prototype.match_alphabet_=function(t){for(var r={},s=0;s2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&typeof t=="object"&&r===void 0&&s===void 0)o=t,a=this.diff_text1(o);else if(typeof t=="string"&&r&&typeof r=="object"&&s===void 0)a=t,o=r;else{if(typeof t!="string"||typeof r!="string"||!s||typeof s!="object")throw new Error("Unknown call format to patch_make.");a=t,o=s}if(o.length===0)return[];for(var l=[],c=new n.patch_obj,d=0,_=0,f=0,m=a,g=a,S=0;S=2*this.Patch_Margin&&d&&(this.patch_addContext_(c,m),l.push(c),c=new n.patch_obj,d=0,m=g,_=f)}k!==1&&(_+=b.length),k!==-1&&(f+=b.length)}return d&&(this.patch_addContext_(c,m),l.push(c)),l},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),_))!=-1&&((m=this.match_main(r,f.substring(f.length-this.Match_MaxBits),_+f.length-this.Match_MaxBits))==-1||c>=m)&&(c=-1):c=this.match_main(r,f,_),c==-1)o[l]=!1,a-=t[l].length2-t[l].length1;else if(o[l]=!0,a=c-_,f==(d=m==-1?r.substring(c,c+f.length):r.substring(c,m+this.Match_MaxBits)))r=r.substring(0,c)+this.diff_text2(t[l].diffs)+r.substring(c+f.length);else{var g=this.diff_main(f,d,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(g)/f.length>this.Patch_DeleteThreshold)o[l]=!1;else{this.diff_cleanupSemanticLossless(g);for(var S,k=0,b=0;bl[0][1].length){var c=r-l[0][1].length;l[0][1]=s.substring(l[0][1].length)+l[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}return(l=(o=t[t.length-1]).diffs).length==0||l[l.length-1][0]!=0?(l.push(new n.Diff(0,s)),o.length1+=r,o.length2+=r):r>l[l.length-1][1].length&&(c=r-l[l.length-1][1].length,l[l.length-1][1]+=s.substring(0,c),o.length1+=c,o.length2+=c),s},n.prototype.patch_splitMax=function(t){for(var r=this.Match_MaxBits,s=0;s2*r?(d.length1+=m.length,o+=m.length,_=!1,d.diffs.push(new n.Diff(f,m)),a.diffs.shift()):(m=m.substring(0,r-d.length1-this.Patch_Margin),d.length1+=m.length,o+=m.length,f===0?(d.length2+=m.length,l+=m.length):_=!1,d.diffs.push(new n.Diff(f,m)),m==a.diffs[0][1]?a.diffs.shift():a.diffs[0][1]=a.diffs[0][1].substring(m.length))}c=(c=this.diff_text2(d.diffs)).substring(c.length-this.Patch_Margin);var g=this.diff_text1(a.diffs).substring(0,this.Patch_Margin);g!==""&&(d.length1+=g.length,d.length2+=g.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===0?d.diffs[d.diffs.length-1][1]+=g:d.diffs.push(new n.Diff(0,g))),_||t.splice(++s,0,d)}}},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"?P0t:F0t,r=g4(e.map((function(l){return l.changes})),qj).map(t).reduce((function(l,c){var d=hn(l,2),_=d[0],f=d[1],m=hn(c,2),g=m[0],S=m[1];return[_.concat(g),f.concat(S)]}),[[],[]]),s=hn(r,2),a=s[0],o=s[1];return O0t(iC(a),iC(o))}var q0t=["enhancers"],cC=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,a=hn(y0t(e,Cl(t,q0t)),2),o=a[0],l=a[1],c=[nC(o),nC(l)],d=(n=[c[0],c[1]],s.reduce((function(k,b){return b(k)}),n)),_=hn(d,2),f=_[0],m=_[1],g=[f.map(rC),m.map(rC)],S=g[1];return{old:g[0].map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]})),new:S.map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]}))}};const H2=["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]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.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_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.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]:leading-[1.55]","[&_.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]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.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(" "),G0t=2e3,V0t={highlight(e,n){return gt.highlight(e,n).children}};function W0t(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function b4(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 K0t(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function P2(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 Y0t(e){const n=[U0t(e.hunks,{type:"line"})],t=ky(K0t(e));return t&>.registered(t)?cC(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:V0t}):cC(e.hunks,{enhancers:n,highlight:!1})}function X0t(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:M2(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:M2(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const Z0t=({change:e,side:n})=>n==="old"?null:W0t(e);function Vj({bytesRead:e,byteLimit:n}){return h.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:[h.jsx("h4",{children:ihe()}),h.jsx("p",{children:Ihe({limit:Ae(Sa(n)),read:Ae(Sa(e))})})]})}function Wj({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:a}=M.useMemo(()=>b4(e),[e]),o=t&&s+a<=G0t,l=M.useMemo(()=>{if(o)try{return Y0t(e)}catch{return}},[e,o]);return h.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:[h.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-semibold [&_.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:[h.jsx("span",{className:"chev",children:t?h.jsx(ta,{size:14}):h.jsx(Ma,{size:14})}),h.jsx("span",{className:"path",children:h.jsx("code",{children:P2(e)})}),h.jsxs("span",{className:"stats",children:[h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",a]})]})]}),t&&(e.hunks.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:yhe()}):h.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:h.jsx(d0t,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:Z0t,tokens:l,viewType:"unified"})}))]})}function Q0t({files:e,className:n}){return h.jsx("div",{className:n?`${H2} ${n}`:H2,children:e.map((t,r)=>h.jsx(Wj,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function J0t(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 Kj({diff:e,partial:n=!1}){var m;const t=M.useMemo(()=>X0t(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((g,S)=>({file:g,key:`${g.oldPath}→${g.newPath}#${S}`,changes:b4(g)})),[r]),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=l&&!n,_=s.some(g=>g.key===a)?a:((m=s[0])==null?void 0:m.key)??null,f=s.find(g=>g.key===_)??null;return t.failed?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?ghe():Rhe()}):s.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:hhe()}):h.jsxs("div",{className:"diff-explorer @container",children:[h.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:[h.jsx("strong",{children:n?s.length===1?Ahe():che({count:Vt(s.length)}):s.length===1?Che():Zfe({count:Vt(s.length)})}),!n&&h.jsx("button",{type:"button",onClick:()=>c(g=>!g),children:d?Wfe():Phe()})]}),d?h.jsx(Q0t,{files:r}):h.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:[h.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":the(),children:s.map(g=>h.jsxs("button",{type:"button",className:g.key===_?"active":"","aria-pressed":g.key===_,onClick:()=>o(g.key),children:[h.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-${g.file.type}`,children:J0t(g.file)}),h.jsx("code",{title:P2(g.file),children:P2(g.file)}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",g.changes.additions]}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",g.changes.deletions]})]},g.key))}),h.jsx("div",{className:`${H2} diff-explorer-preview min-w-0`,children:f&&h.jsx(Wj,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function ept({experiment:e,refreshKey:n,onLoadingChange:t}){const[r,s]=M.useState(null),[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;return t(!0),o(null),s(null),EYe(e.id).then(c=>{l||s(c)}).catch(c=>{l||o(c.message)}).finally(()=>{l||t(!1)}),()=>{l=!0}},[e.id,n,t]),h.jsx($u,{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:a?h.jsxs(Wi,{children:[WV()," ",Ae(a)]}):r?r.diff.trim()?h.jsxs(h.Fragment,{children:[r.truncated&&h.jsx(Vj,{bytesRead:r.bytesRead,byteLimit:r.byteLimit}),h.jsx(Kj,{diff:r.diff,partial:r.truncated})]}):h.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?tW():UV()}):h.jsx(Wi,{children:ZV()})})}function Yj({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:a,githubTitle:o,refreshing:l,onRefresh:c}){return h.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&&h.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":fre(),children:[h.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:mre()}),h.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:lre()})]}),r&&h.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:[h.jsx(Ip,{size:12}),h.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),a&&h.jsx(Fp,{href:a,target:"_blank",rel:"noopener noreferrer",title:o,"aria-label":o,children:h.jsx(fm,{size:13})}),h.jsx("span",{className:"flex-1"}),h.jsx(Jt,{title:t7(),"aria-label":t7(),onClick:c,children:l?h.jsx(dn,{}):h.jsx(tN,{size:13})})]})}const tpt=/\.(md|mdx|markdown)$/i,npt=/\.tex$/i,rpt=/\.html?$/i,spt=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,ipt=/\.(csv|tsv|xlsx?|ods)$/i,apt=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,opt=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,lpt=/\.pdf$/i,cpt=/\.(docx?|log|rtf|txt)$/i;function upt(e){return spt.test(e)}function x4(e){return tpt.test(e)}function Xj(e){return npt.test(e)}function dpt(e){return rpt.test(e)}function Zj({name:e}){const n=x4(e)?"markdown":upt(e)?"image":ipt.test(e)?"spreadsheet":apt.test(e)?"code":opt.test(e)?"archive":lpt.test(e)?"pdf":cpt.test(e)||Xj(e)?"document":"file";let t;return n==="markdown"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),h.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=h.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=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),h.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),h.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 Qj=["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(" "),uC=["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 dC(){return{dirs:new Map,files:[]}}function Jj(e){const n=dC();for(const t of e){const r=t.split("/");let s=n;for(let a=0;aa(t),title:t,children:[c?h.jsx(ta,{size:13,className:uC}):h.jsx(Ma,{size:13,className:uC}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),c&&h.jsx(y4,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:a,onOpenFile:o})]})}function y4({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:a}){const o=[...e.dirs.keys()].sort((c,d)=>c.localeCompare(d)),l=[...e.files].sort((c,d)=>c.localeCompare(d));return h.jsxs(h.Fragment,{children:[o.map(c=>{const d=n?`${n}/${c}`:c;return h.jsx(fpt,{name:c,node:e.dirs.get(c),path:d,depth:t,toggled:r,onToggle:s,onOpenFile:a},`d:${d}`)}),l.map(c=>{const d=n?`${n}/${c}`:c;return h.jsxs("button",{type:"button",className:Qj,style:{paddingInlineStart:8+t*14},...gr(_=>a(d,_)),title:iI({name:Ae(d)}),children:[h.jsx(Zj,{name:c}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c})]},`f:${d}`)})]})}function hpt({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:a,onToggledChange:o,onOpenFile:l}){const c=t.branchName,d=`${e}:${c}`,[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState(!1),[x,y]=M.useState(0),[C,A]=M.useState(void 0),E=M.useRef(0),j=M.useRef(null),T=M.useCallback(()=>{j.current=d;const H=++E.current;k(!0),Cb(e,{ref:c}).then(F=>{H===E.current&&(f(F),g(null))}).catch(F=>{H===E.current&&g(F.message)}).finally(()=>{H===E.current&&k(!1)})},[e,c,d]);M.useEffect(()=>(E.current++,j.current=null,f(null),g(null),k(!1),()=>{E.current++}),[d]),M.useEffect(()=>{r==="files"&&j.current!==d&&T()},[r,d,T]),M.useEffect(()=>{A(void 0);const H=t.chatSessionId;if(!H)return;let F=!1;return uN(H).then(V=>{!F&&V.exists&&V.branch===c&&A(H)}).catch(()=>{}),()=>{F=!0}},[t.chatSessionId,c]);const D=M.useMemo(()=>_?Jj(_.entries):null,[_]),I=r==="files"?S:b,P=M.useCallback(H=>{const F=new Set(s);F.has(H)?F.delete(H):F.add(H),o(F)},[s,o]);return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[h.jsx(Yj,{view:r,onViewChange:a,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?$p(n.githubOwner,n.githubRepo,c):void 0,githubTitle:X9({branch:Ae(c)}),refreshing:I,onRefresh:()=>r==="files"?T():y(H=>H+1)}),r==="changes"?h.jsx(ept,{experiment:t,refreshKey:x,onLoadingChange:v},t.id):h.jsxs(h.Fragment,{children:[(_==null?void 0:_.truncated)&&h.jsx(Wi,{children:Sre()}),m&&D&&h.jsxs(Wi,{children:[jre()," ",Ae(m)]}),h.jsx($u,{children:D?D.dirs.size===0&&D.files.length===0?h.jsx(Wi,{children:Nre()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(y4,{node:D,parentPath:"",depth:0,toggled:s,onToggle:P,onOpenFile:(H,F)=>C?l(H,C,void 0,F):l(H,void 0,c,F)})}):h.jsx(Wi,{children:m?nE({error:Ae(m)}):rE()})})]})]})}const _pt=5e3;function ppt({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:a,onOpenFile:o}){var D;const l=n.id,[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!0),b=M.useRef(0),v=M.useCallback(()=>{const I=++b.current;k(!0),(async()=>{if(!e)return[null,await Cb(l,{ref:n.baselineBranch})];const H=await uN(e),F=H.exists?{sessionId:e}:{ref:n.baselineBranch};return[H,await Cb(l,F)]})().then(([H,F])=>{I===b.current&&(d(H),f(F),g(null))}).catch(H=>{I===b.current&&g(H.message)}).finally(()=>{I===b.current&&k(!1)})},[e,l,n.baselineBranch]);M.useEffect(()=>(d(null),f(null),g(null),v(),()=>{b.current++}),[v]),M.useEffect(()=>{if(!e)return;let I=!1,P=!1,H=!1,F=null;const V=()=>{F||(F=setInterval(v,_pt))},X=()=>{F&&(clearInterval(F),F=null)},W=Hf(Z=>{Z.type!=="busy"||Z.sessionId!==e||(P=!0,Z.busy&&!I?(I=!0,V()):!Z.busy&&I&&(I=!1,X(),v()))});return T0(l).then(Z=>{var J;H||P||I||(J=Z.find(B=>B.id===e))!=null&&J.busy&&(I=!0,V())}).catch(()=>{}),()=>{H=!0,W(),X()}},[e,l,v]);const x=M.useMemo(()=>_?Jj(_.entries):null,[_]),y=M.useCallback(I=>{const P=new Set(r);P.has(I)?P.delete(I):P.add(I),a(P)},[r,a]),C=e&&(c!=null&&c.exists)?c:null,A=(C==null?void 0:C.branch)??(C!=null&&C.baselineBranch?AVe({branch:Ae(C.baselineBranch)}):wE()),E=((D=C==null?void 0:C.files)==null?void 0:D.length)??0,j=C?yVe({branch:Ae(`${A}${E>0?"*":""}`)}):CVe({branch:Ae(n.baselineBranch)}),T=C?C.branch:n.baselineBranch;return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[h.jsx(Yj,{view:C?t:"files",onViewChange:s,showViewToggle:!!C,branchLabel:j,branchTitle:j,githubHref:n.githubEnabled&&T?$p(n.githubOwner,n.githubRepo,T):void 0,githubTitle:T?X9({branch:Ae(T)}):void 0,refreshing:S,onRefresh:v}),m&&(c||_)&&h.jsxs(Wi,{children:[YVe()," ",Ae(m)]}),!_||e&&!c?h.jsx($u,{children:h.jsx(Wi,{children:m?nE({error:Ae(m)}):rE()})}):C&&t==="changes"?h.jsx($u,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:E===0||!C.diff?h.jsx("div",{className:"changes-note text-sm text-muted",children:PVe()}):h.jsxs(h.Fragment,{children:[C.diff.truncated&&h.jsx(Vj,{bytesRead:C.diff.bytesRead,byteLimit:C.diff.byteLimit}),h.jsx(Kj,{diff:C.diff.diff,partial:C.diff.truncated})]})}):h.jsxs($u,{children:[_.truncated&&h.jsx(Wi,{children:RVe()}),x?x.dirs.size===0&&x.files.length===0?h.jsx(Wi,{children:GVe()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(y4,{node:x,parentPath:"",depth:0,toggled:r,onToggle:y,onOpenFile:(I,P)=>C?o(I,e,void 0,P):o(I,void 0,n.baselineBranch,P)})}):h.jsx(Wi,{children:IVe()})]})]})}const bp="font-mono text-sm leading-[1.55] [tab-size:4]",eM="whitespace-pre-wrap break-words",tM="file-view-gutter text-right text-muted select-none";function nM(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function rM({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const a=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` -`),f=ST(_,ky(n));return _.endsWith(` -`)?f.slice(0,-1):f},[e,n]),o=t&&a.length>0?Math.min(Math.max(Math.trunc(t),1),a.length):void 0,l=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(o?((_=l.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):a.length===0&&(s==null||s()))},[a.length,s,r,o]);const{ruleCh:c}=nM(a.length),d=M.useMemo(()=>a.map((_,f)=>h.jsxs("div",{ref:f+1===o?l:void 0,className:`file-view-line flex items-stretch ${f+1===o?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[h.jsx("span",{"data-line":f+1,className:`${tM} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),h.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${bp} ${eM}`,children:kT(_)?h.jsx("br",{}):_})]},f)),[a,c,o]);return h.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${bp}`,children:[a.length>0&&h.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"}),d]})}function sM(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function fC({url:e,name:n}){return h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[I0e()," ",h.jsxs("a",{href:e,download:n,children:[uE()," ",Ae(n)]})]})}function F2({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,a]=M.useState(!1);if(M.useEffect(()=>a(!1),[e,n]),s)return h.jsx(fC,{url:n,name:t});let o;return e==="image"?o=h.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:h.jsx("img",{src:n,alt:t,onError:()=>a(!0)})}):e==="audio"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):e==="video"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):o=h.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>a(!0),children:h.jsx(fC,{url:n,name:t})}),h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&h.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:h.jsxs("a",{href:n,download:t,children:[uE()," ",t]})})]})}const hC="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function mpt(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function gpt(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),a=r===-1?"":t.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1),d=l.startsWith("/")?[]:n.split("/").filter(g=>g.length>0);for(const g of l.split("/"))if(!(!g||g==="."))if(g===".."){if(d.length===0)return null;d.pop()}else d.push(g);const _=d.join("/");if(!_)return null;const f=new URLSearchParams(c);f.delete("path");const m=f.toString();return`${xh(e,_)}${m?`&${m}`:""}${a}`}function vpt(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const iM="orx:files-tree-width",aM="orx:artifacts-collapsed:",oM=180,lM=560,bpt=8,xpt=280;function ypt(){try{const e=Number(localStorage.getItem(iM));if(Number.isFinite(e)&&e>=oM&&e<=lM)return e}catch{}return xpt}function wpt(e){try{const n=localStorage.getItem(`${aM}${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 U2(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=U2(t.children??[],n);if(r)return r}}return null}function cM({projectId:e,folder:n,markdown:t}){const r=s=>mpt(s)?s:gpt(e,n,s);return h.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:h.jsx(Jrt,{remarkPlugins:[pT,[mT,NT]],rehypePlugins:[qA],components:{a:({href:s,children:a,...o})=>{const l=!s||s.startsWith("#"),c=l?s:r(s);return c?h.jsx("a",{...o,href:c,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):h.jsx("span",{children:a})},img:({src:s,alt:a})=>{if(!s||typeof s!="string")return null;const o=r(s);return o?h.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[h.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&h.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...zT},children:CT(vpt(t))})})}function Spt(e){return e.presentation==="text"&&x4(e.name)?"markdown":sM(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function kpt(e,n,t){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(!1),[d,_]=M.useState(null),f=M.useRef(0),m=M.useRef(!1),g=t==="markdown"||t==="text"&&n.size<=fN;return M.useEffect(()=>{if(o(!1),c(!1),_(null),!g)return;let S=!1;const k=++f.current;return hN(e,n.path).then(v=>{if(!v)throw new Error(MG());return v}).then(v=>{S||k!==f.current||(v.binary?o(!0):(m.current=!0,s(v.content)),c(v.truncated))}).catch(v=>{!S&&k===f.current&&!m.current&&_(v instanceof Error?v.message:String(v))}),()=>{S=!0}},[e,n.path,n.modifiedAt,t,g]),{text:r,binary:a,truncated:l,error:d,wantsText:g}}function Cpt({projectId:e,entry:n,onDelete:t}){const r=Spt(n),{text:s,binary:a,truncated:o,error:l,wantsText:c}=kpt(e,n,r),[d,_]=M.useState(!1),f=r==="markdown",m=n.path.split("/").slice(0,-1).join("/"),g=`${xh(e,n.path)}&v=${n.modifiedAt}`;let S;return r==="image"||r==="audio"||r==="video"||r==="pdf"?S=h.jsx(F2,{kind:r,url:g,name:n.name}):r==="download"||!c||a?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[r==="download"||a?kG():$V()," ",h.jsx("a",{href:g,...r==="download"||a?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:r==="download"||a?oE():OG()})]}):l?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[tV()," ",Ae(l)]}):s===null?S=h.jsxs(vr,{children:[h.jsx(dn,{})," ",hV()]}):f&&!d?S=h.jsx(cM,{projectId:e,folder:m,markdown:s}):S=h.jsx(rM,{text:s,path:n.path}),h.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"fpreview-head h-10 flex items-center gap-2 py-0 px-3.5 border-b border-b-border-variant text-subtext shrink-0",children:[h.jsx(Vu,{size:13,className:"shrink-0"}),h.jsx("code",{className:"fpreview-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Ae(n.path),children:n.path}),h.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[yV()," ",new Date(n.modifiedAt).toLocaleString(N(),{dateStyle:"medium",timeStyle:"short"})]}),(r==="text"||r==="download")&&h.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:Sa(n.size)}),f&&h.jsx(Jt,{active:d,"data-tip":d?X0():zu(),"data-tip-align":"end","aria-label":d?X0():zu(),onClick:()=>_(k=>!k),children:h.jsx(wb,{size:13})}),h.jsx(Fp,{href:g,target:"_blank",rel:"noopener noreferrer","data-tip":z6(),"data-tip-align":"end","aria-label":z6(),children:h.jsx(gc,{size:13})}),h.jsx(Jt,{"data-tip":N6(),"data-tip-align":"end","aria-label":N6(),onClick:()=>{window.confirm(Q9({path:Ae(n.path)}))&&t(n.path)},children:h.jsx(cd,{size:13})})]}),h.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 ${f&&!d?"doc":""}`,children:[S,o&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:iV()})]})]})}function uM({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l}){return h.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(c=>{var _;const d={paddingInlineStart:8+Math.min(n,bpt)*14};if(c.isDir){const f=!t.has(c.path);return h.jsxs("div",{className:"min-w-0 max-w-full",children:[h.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:d,onClick:()=>s(c.path),children:[h.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":f?cG({name:Ae(c.name)}):xG({name:Ae(c.name)}),onClick:m=>{m.stopPropagation(),s(c.path)},children:h.jsx(Ma,{size:13,className:f?"open":""})}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name}),h.jsx(Jt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":ZG(),"data-tip-align":"end","aria-label":mG({name:Ae(c.name)}),onClick:m=>{m.stopPropagation(),window.confirm(Q9({path:Ae(c.path)}))&&l(c.path)},children:h.jsx(cd,{size:12})})]}),f&&(((_=c.children)==null?void 0:_.length)??0)>0&&h.jsx(uM,{entries:c.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l})]},c.path)}return h.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===c.path?"selected":""}`,style:d,title:aO({path:Ae(c.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===c.path,onClick:()=>a(c.path),onDoubleClick:()=>o(c.path),onAuxClick:f=>{f.button===1&&(f.preventDefault(),a(c.path),o(c.path))},onKeyDown:f=>{if(f.key===" "){f.preventDefault(),f.stopPropagation(),a(c.path);return}f.key==="Enter"&&(f.preventDefault(),f.stopPropagation(),a(c.path),o(c.path))},children:[h.jsx(Zj,{name:c.name}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name})]},c.path)})})}function _C({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return h.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:Ae(e),children:[h.jsx("code",{className:"path-front-ellipsis",children:e}),h.jsx(Jt,{size:"small",className:hC,"data-tip":t?Y0():zG(),"aria-label":qG(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?h.jsx(Ws,{size:12}):h.jsx(Lp,{size:12})}),h.jsx(Jt,{size:"small",className:hC,"data-tip":A6(),"data-tip-align":"end","aria-label":A6(),onClick:n,children:h.jsx(UKe,{size:12})})]})}function Ept({project:e,artifacts:n,onChanged:t,onOpenFile:r,onOpenStorage:s}){const[a,o]=M.useState(null),[l,c]=M.useState(()=>wpt(e.id)),[d,_]=M.useState(ypt),f=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${aM}${e.id}`,JSON.stringify([...l]))}catch{}},[e.id,l]);const m=v=>{var E;v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const x=(E=f.current)==null?void 0:E.getBoundingClientRect(),y=document.body.style.userSelect;document.body.style.userSelect="none";const C=j=>{const T=Math.round(j.clientX-((x==null?void 0:x.left)??0)),D=Math.min(Math.max(T,oM),lM);_(D);try{localStorage.setItem(iM,String(D))}catch{}},A=()=>{window.removeEventListener("pointermove",C),window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",A),document.body.style.userSelect=y};window.addEventListener("pointermove",C),window.addEventListener("pointerup",A),window.addEventListener("pointercancel",A)};M.useEffect(()=>{if(!a||!n)return;const v=U2(n.entries,a);(!v||v.isDir)&&o(null)},[a,n]);const g=v=>c(x=>{const y=new Set(x);return y.has(v)?y.delete(v):y.add(v),y}),S=v=>{(a===v||a!=null&&a.startsWith(v+"/"))&&o(null),hXe(e.id,v).catch(()=>{}).finally(t)};if(!n)return h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs(vr,{className:"p-5",children:[h.jsx(dn,{})," ",gV()]})});const k=v=>h.jsx(uM,{entries:v,depth:0,collapsed:l,selected:a,onToggle:g,onSelect:o,onOpenFile:r,onDelete:S}),b=a?U2(n.entries,a):null;return n.entries.length===0?h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[h.jsx(kx,{size:28,strokeWidth:1.5}),h.jsx("h3",{children:CV()}),h.jsx("p",{children:LV()}),h.jsx(_C,{dir:n.dir,onOpenStorage:s})]})}):h.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background",children:[h.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",ref:f,style:{width:d},children:[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",onPointerDown:m}),h.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[k(n.entries),n.truncated&&h.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:cV()})]}),h.jsx(_C,{dir:n.dir,onOpenStorage:s})]}),b?h.jsx(Cpt,{projectId:e.id,entry:b,onDelete:S},b.path):h.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",children:[h.jsx(AKe,{size:22,strokeWidth:1.5}),h.jsx("span",{children:HG()})]})]})}const dM=20*1024*1024,fM="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",hM="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",_M="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",Npt="font-mono text-base font-medium text-text",zpt="mt-1 mb-0 text-sm leading-relaxed text-text";function pM(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 a=s.indexOf(",");n(a>=0?s.slice(a+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function Apt(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function mM({accept:e,busy:n,prompt:t,onFile:r}){const[s,a]=M.useState(!1),o=M.useRef(null);return h.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:l=>{l.preventDefault(),a(!0)},onDragLeave:()=>a(!1),onDrop:l=>{var d;if(l.preventDefault(),a(!1),n)return;const c=(d=l.dataTransfer.files)==null?void 0:d[0];c&&r(c)},onClick:()=>{var l;n||(l=o.current)==null||l.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:l=>{var c;(l.key==="Enter"||l.key===" ")&&!n&&(l.preventDefault(),(c=o.current)==null||c.click())},children:[h.jsx("input",{ref:o,type:"file",accept:e,hidden:!0,onChange:l=>{var d;const c=(d=l.target.files)==null?void 0:d[0];c&&r(c),l.target.value=""}}),n?h.jsxs(h.Fragment,{children:[h.jsx(dn,{}),h.jsx("span",{children:Q$e()})]}):h.jsxs(h.Fragment,{children:[h.jsx(rYe,{size:20,strokeWidth:1.5}),h.jsx("span",{children:t})]})]})}function gM({bytes:e,updatedAt:n}){return h.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[Sa(e),n>0&&h.jsxs("span",{className:"text-muted",children:[" · ",Na(n)]})]})}function Tpt({skill:e,onDeleted:n,onError:t}){const[r,s]=M.useState(!1);return h.jsxs("div",{className:_M,children:[h.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[h.jsxs("code",{className:Npt,children:["/",e.name]}),e.origin&&h.jsx(Dt,{children:e.origin})]}),h.jsx(gM,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&h.jsx(Jt,{"data-tip":x$e(),"data-tip-align":"end","aria-label":SBe({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(bBe({name:Ae(e.name)}))&&(s(!0),RXe(e.name).then(n).catch(a=>{s(!1),t(a instanceof Error?a.message:String(a))}))},children:h.jsx(cd,{size:13})})]})}function jpt({template:e,onChanged:n,onError:t}){const[r,s]=M.useState(!1),a=e.supportFiles.length;return h.jsxs("div",{className:_M,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("span",{className:"text-base font-medium text-text",children:e.name}),h.jsxs("p",{className:zpt,children:[e.entry,a>0&&(a===1?XBe():s$e({count:Vt(a)}))]})]}),h.jsx(gM,{bytes:e.bytes,updatedAt:e.updatedAt}),h.jsx(Jt,{"data-tip":k$e(),"data-tip-align":"end","aria-label":jBe({name:Ae(e.name)}),disabled:r,onClick:()=>{window.confirm(NBe({name:Ae(e.name)}))&&(s(!0),TXe(e.name).then(n).catch(o=>{s(!1),t(o instanceof Error?o.message:String(o))}))},children:h.jsx(cd,{size:13})})]})}function Mpt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useCallback(()=>{a(!0),jXe().then(g=>{n(g),d(null)}).catch(g=>{n([]),d(g instanceof Error?g.message:String(g))}).finally(()=>a(!1))},[]);M.useEffect(()=>{_()},[_]);const f=M.useRef(!1),m=M.useCallback(async g=>{if(!f.current){if(l(null),!Apt(g.name)){l(aHe());return}if(g.size>dM){l(BE());return}f.current=!0,r(!0);try{await MXe({filename:g.name,contentBase64:await pM(g)}),_()}catch(S){l(S instanceof Error?S.message:String(S))}finally{f.current=!1,r(!1)}}},[_]);return h.jsxs("section",{className:fM,children:[h.jsxs("div",{className:"flex items-baseline gap-2.5",children:[h.jsx("h3",{children:K$e()}),h.jsxs(Qe,{className:"ms-auto",size:"small",onClick:_,disabled:s,children:[h.jsx(ld,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Rp()]})]}),h.jsx("p",{className:hM,children:LBe()}),h.jsx(mM,{accept:".md,.markdown,.zip",busy:t,prompt:$Be(),onFile:g=>void m(g)}),o&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:o}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",M$e()]}):c?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[l$e()," ",c]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:H$e()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(g=>h.jsx(Tpt,{skill:g,onDeleted:_,onError:l},g.name))})]})}function Rpt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),[o,l]=M.useState(null),c=M.useCallback(()=>{zXe().then(f=>{n(f),l(null)}).catch(f=>{n([]),l(f instanceof Error?f.message:String(f))})},[]);M.useEffect(()=>{c()},[c]);const d=M.useRef(!1),_=M.useCallback(async f=>{if(d.current)return;a(null);const m=f.name.toLowerCase();if(!m.endsWith(".tex")&&!m.endsWith(".zip")){a(uHe());return}if(f.size>dM){a(BE());return}d.current=!0,r(!0);try{await AXe({filename:f.name,contentBase64:await pM(f)}),c()}catch(g){a(g instanceof Error?g.message:String(g))}finally{d.current=!1,r(!1)}},[c]);return h.jsxs("section",{className:fM,children:[h.jsx("h3",{children:z$e()}),h.jsx("p",{className:hM,children:nHe()}),h.jsx(mM,{accept:".tex,.zip",busy:t,prompt:UBe(),onFile:f=>void _(f)}),s&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:s}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",O$e()]}):o?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[f$e()," ",o]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:q$e()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(f=>h.jsx(jpt,{template:f,onChanged:c,onError:a},f.name))})]})}function Dpt(){return h.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:[h.jsx("h1",{children:m$e()}),h.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:e$e()}),h.jsx(Mpt,{}),h.jsx(Rpt,{})]})}const Lpt="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function fl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:a,onPromote:o,onClose:l}){return h.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-24 [&: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?Lpt:""}`,onClick:a,onDoubleClick:o,title:s?nFe({label:n}):n,"aria-label":s?QPe({label:n}):n,children:[t,h.jsx("span",{className:"tab-label","data-label":n,children:h.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),h.jsx("span",{role:"button",className:"tab-close",title:sre(),onClick:c=>{c.stopPropagation(),l()},children:h.jsx(_s,{size:12})})]})}const pC=["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 Opt({owner:e,repo:n,branch:t}){return!e||!n?h.jsx("span",{className:pC,children:h.jsx("code",{children:t})}):h.jsxs("a",{className:pC,href:$p(e,n,t),target:"_blank",rel:"noopener noreferrer",title:K0({name:Ae(t)}),children:[h.jsx("code",{children:t}),h.jsx(fm,{size:12})]})}const eb=["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(" "),mC=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function gC(e){return new Date(e).toLocaleString(N(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function vC(e,n){return tp((e.endedAt??n)-e.createdAt)}function Ipt({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:a}){const o=r[0]??null,l=r.some(_=>_.status==="running"||_.status==="starting"),[c,d]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!l)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[l]),h.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:h.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:[h.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[h.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[h.jsx("h1",{children:e.title||e.slug}),h.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),h.jsx(xo,{status:o?Di(o):"idle"})]}),h.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[o&&h.jsxs(Qe,{...gr(_=>s(o.id,_)),children:[h.jsx(Wu,{size:15}),Gle()]}),h.jsxs(Qe,{...gr(a),children:[h.jsx(Op,{size:15}),gle()]})]}),e.description&&h.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:[h.jsx("h2",{children:Ale()}),h.jsx(za,{text:e.description})]}),h.jsxs("section",{className:eb,children:[h.jsx("h2",{children:o?hle():oce()}),o&&h.jsxs(h.Fragment,{children:[h.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:[h.jsx(xo,{status:Di(o)}),h.jsx(e4,{backend:o.backend}),h.jsxs("span",{title:rce(),children:[h.jsx(hWe,{size:13}),gC(o.createdAt)]}),h.jsxs("span",{title:Rle(),children:[h.jsx(TWe,{size:13}),vC(o,c)]}),o.commitSha&&h.jsxs("span",{title:yle(),children:[h.jsx(sKe,{size:14}),h.jsx("code",{children:o.commitSha.slice(0,7)})]}),o.exitCode!==null&&o.exitCode!==void 0&&o.exitCode!==0&&h.jsxs("span",{children:[Ile()," ",o.exitCode]})]}),o.command&&h.jsxs("code",{className:mC,children:["$ ",o.command]}),o.resultMarkdown&&h.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${o.status==="failed"?"failed":""}`,children:h.jsx(za,{text:o.resultMarkdown})})]})]}),h.jsxs("section",{className:eb,children:[h.jsx("h2",{children:"Git"}),h.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:[h.jsx(Opt,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&h.jsxs("span",{children:[Ple()," ",h.jsx("code",{children:n.slug})]}),h.jsxs("span",{title:gC(e.createdAt),children:[Cle()," ",Na(e.createdAt)]})]}),e.runCommand!==(o==null?void 0:o.command)&&h.jsxs("code",{className:mC,children:["$ ",e.runCommand]})]}),r.length>0&&h.jsxs("section",{className:eb,children:[h.jsx("h2",{children:Jle()}),h.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)=>h.jsxs("button",{...gr(m=>s(_.id,m)),children:[h.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[Yle()," ",r.length-f]}),h.jsx(xo,{status:Di(_)}),h.jsx("span",{children:Na(_.createdAt)}),h.jsx("span",{children:vC(_,c)}),h.jsx(Wu,{size:13})]},_.id))})]})]})})}function bC(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}=t4(t,!0);let a=!1,o=0,l=!1,c=!1;async function d(){if(l){c=!0;return}l=!0;try{for(;;){const f=await kYe(e,o);if(a)return;if(f.dataBase64&&r.write(bC(f.dataBase64)),o=f.nextOffset,f.eof)break}}catch{}finally{l=!1,c&&!a&&(c=!1,d())}}const _=nZe(e,f=>{if(a)return;const m=bC(f.dataBase64);!l&&f.offset===o?(r.write(m),o+=m.length):f.offset+m.length>o&&d()});return d(),()=>{a=!0,_(),s()}},[e]),h.jsx("div",{ref:n,className:"h-full w-full"})}function $pt({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:a,parentExperiment:o,onOpenView:l,onOpenCode:c}){const d=r.filter(_=>_.experimentId===e.id).sort((_,f)=>f.createdAt-_.createdAt);return t==="overview"?h.jsx(Ipt,{experiment:e,parentExperiment:o,project:n,runs:d,onOpenLogs:(_,f)=>l("terminal",_,f),onOpenCode:_=>c("files",_)}):h.jsx(Hpt,{experiment:e,expRuns:d,selectedRunId:s,onSelectRun:a})}function Hpt({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),f=t&&n.find(v=>v.id===t)||n[0]||null,m=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",g=!!(f&&m&&(f.cancelRequested||o===f.id)),S=v=>{const x=n.findIndex(y=>y.id===v);return x===-1?n.length:n.length-x},k=M.useRef(null);M.useEffect(()=>{if(k.current===null){k.current=new Set(n.map(x=>x.id));return}const v=n.find(x=>!k.current.has(x.id));for(const x of n)k.current.add(x.id);v&&r(v.id)},[n,r]),M.useEffect(()=>{if(!c)return;const v=x=>{var y;(y=_.current)!=null&&y.contains(x.target)||d(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function b(){if(f){a(null),l(f.id);try{await lN(f.id)}catch(v){l(null),a(v instanceof Error?v.message:String(v))}}}return h.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[h.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:[h.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}),h.jsx("span",{className:"flex-1"}),s&&h.jsx("span",{className:"error",role:"alert",children:s}),m&&h.jsxs(Qe,{size:"small",variant:"ghost",disabled:g,onClick:()=>void b(),children:[h.jsx(WE,{size:13}),g?Lre():iE()]}),n.length>0&&f&&h.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[h.jsxs(Qe,{title:joe(),"aria-expanded":c,onClick:()=>d(v=>!v),children:[h.jsxs("span",{children:[n7()," ",S(f.id)]}),h.jsx(xo,{status:g?"cancelling":Di(f)}),h.jsx(ta,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&h.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=>h.jsxs(Yr,{className:"justify-start",active:v.id===(f==null?void 0:f.id),onClick:()=>{r(v.id),d(!1)},children:[h.jsxs("span",{className:"font-medium",children:[n7()," ",S(v.id)]}),h.jsx(xo,{status:Di(v)}),h.jsx("span",{className:"ms-auto text-xs text-muted",children:Na(v.createdAt)})]},v.id))})]})]}),h.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?h.jsx(Bpt,{runId:f.id},f.id):h.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:koe()})})]})}function Ppt({projectId:e,filePath:n,sessionId:t,enabled:r,ready:s,source:a}){const[o,l]=M.useState(void 0),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,A]=M.useState(null),[E,j]=M.useState(null),[T,D]=M.useState(!1),[I,P]=M.useState(0),H=M.useCallback(Z=>{D(Z),Z&&P(J=>J+1)},[]),F=M.useRef(a);F.current=a,M.useEffect(()=>{if(!r)return;let Z=!1;return jYe().then(J=>{Z||(l(J.engine),d(J.hint),f(J.installCommand))}).catch(()=>{Z||l(null)}),()=>{Z=!0}},[r]);const V=M.useRef(!1),X=M.useCallback(()=>{if(V.current)return;V.current=!0,g(!0);const Z=F.current;j(null),v(null),A(null),MYe(e,n,{sessionId:t}).then(J=>{var L,$;const B=J.pdfPath;if(J.ok&&B){k(K=>({path:B,version:((K==null?void 0:K.version)??0)+1,source:Z})),y(J.hadErrors),A(J.note),J.hadErrors&&v(((L=J.log)==null?void 0:L.trim())||null),H(!0);return}k(null),y(!1),A(J.note),D(!1),v((($=J.log)==null?void 0:$.trim())||b0e())}).catch(J=>{k(null),y(!1),A(null),D(!1),j(J instanceof Error?J.message:String(J))}).finally(()=>{V.current=!1,g(!1)})},[e,n,t,H]),W=M.useRef(null);return M.useEffect(()=>{!r||!s||!o||W.current!==n&&(W.current=n,X())},[r,s,o,n,X]),{engine:o,installHint:c,installCommand:_,compiling:m,compiled:S,stale:S!==null&&S.source!==a,log:b,builtWithErrors:x,note:C,error:E,showPdf:T,setShowPdf:H,viewNonce:I,compile:X,dismiss:()=>{j(null),v(null)}}}const Fpt=3e4;function Upt({projectId:e,filePath:n,sessionId:t,enabled:r,savedSource:s,dirty:a,onPulled:o}){const[l,c]=M.useState(!1),[d,_]=M.useState(null),[f,m]=M.useState(!1),[g,S]=M.useState(!1),[k,b]=M.useState(null),[v,x]=M.useState(null),[y,C]=M.useState(!1),A=M.useCallback(H=>{c(H.hasToken),_(H.link)},[]);M.useEffect(()=>{let H=!1;if(m(!1),_(null),b(null),x(null),C(!1),D.current=!1,!!r)return LYe(e,n,{sessionId:t}).then(F=>{H||A(F)}).catch(F=>{H||x(F instanceof Error?F.message:String(F))}).finally(()=>{H||m(!0)}),()=>{H=!0}},[r,e,n,t,A]),M.useEffect(()=>{C(!1)},[s]);const E=M.useRef(!1),j=M.useRef(o);j.current=o;const T=M.useRef(a);T.current=a;const D=M.useRef(!1),I=M.useCallback(H=>E.current||T.current?!1:(E.current=!0,S(!0),x(null),BYe(e,n,{sessionId:t,resolve:H}).then(F=>{D.current=!1,b(F),F.pulled.includes(n)&&(T.current?C(!0):j.current(F.pulled))}).catch(F=>{D.current=!0,b(null),x(F instanceof Error?F.message:String(F))}).finally(()=>{E.current=!1,S(!1)}),!0),[e,n,t]),P=M.useRef(null);return M.useEffect(()=>{if(!r||!f||!d||a)return;const H=`${n}:${d.projectId}:${s}`;P.current!==H&&I()&&(P.current=H)},[r,f,d,n,s,a,g,I]),M.useEffect(()=>{if(!r||!f||!d||a)return;const H=setInterval(()=>{E.current||D.current||$Ye(e,n,{sessionId:t}).then(F=>{F.remoteChanged&&I()}).catch(F=>{D.current=!0,x(F instanceof Error?F.message:String(F))})},Fpt);return()=>clearInterval(H)},[r,f,d,a,e,n,t,I]),{hasToken:l,link:d,loaded:f,syncing:g,last:k,error:v,blocked:a,staleOnDisk:y,reloaded:()=>C(!1),uploadUrl:HYe(e,n,{sessionId:t}),saveToken:async H=>{const F=await cN(H);c(F.hasToken)},linkProject:async H=>{A(await OYe(e,n,{project:H,sessionId:t}))},unlink:async()=>{A(await IYe(e,n,{sessionId:t})),P.current=null,D.current=!1,b(null),x(null)},sync:H=>{D.current=!1,I(H)},dismiss:()=>{D.current=!1,x(null)}}}function vM(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function xC(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),a=r===-1?"":n.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1);let d;try{d=decodeURI(l)}catch{return null}if(!d||d.includes("\0"))return null;const _=d.startsWith("/"),f=_?[]:e.split("/").filter(Boolean);for(const m of d.split("/"))if(!(!m||m===".")){if(m===".."){if(f.length===0)return null;f.pop();continue}f.push(m)}return f.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:a}}function qpt(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function Gpt({value:e,onChange:n,onSave:t,onBlur:r,path:s,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l}){const c=M.useMemo(()=>ST(e,ky(s)),[e,s]),{ruleCh:d,codeCh:_}=nM(c.length),f=M.useRef(null),m=M.useRef(null),g=()=>{const b=f.current;b&&m.current&&(m.current.scrollTop=b.scrollTop)};M.useLayoutEffect(g,[e]),M.useLayoutEffect(()=>{var A;const b=f.current;if(!b||!a)return;const v=e.split(` -`),x=Math.min(Math.max(Math.trunc(a),1),v.length);let y=0;for(let E=0;E{if((b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="s"){b.preventDefault(),t();return}if(b.key==="Tab"){b.preventDefault();const v=b.currentTarget,{selectionStart:x,selectionEnd:y}=v,C=e.slice(0,x)+" "+e.slice(y);n(C),requestAnimationFrame(()=>{v.selectionStart=v.selectionEnd=x+1})}},k=`absolute inset-0 m-0 py-3.5 pe-4 ${bp} ${eM} [scrollbar-gutter:stable]`;return h.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${bp}`,children:[h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${d}ch`},"aria-hidden":"true"}),h.jsx("div",{ref:m,className:`file-view-code ${k} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:c.map((b,v)=>h.jsxs("div",{"data-line":v+1,className:"relative",style:{paddingInlineStart:`${_}ch`},children:[h.jsx("span",{className:`${tM} absolute start-0 pe-[1ch]`,style:{width:`${d}ch`},children:v+1}),kT(b)?h.jsx("br",{}):b]},v))}),h.jsx("textarea",{ref:f,className:`file-view-editarea ${k} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${_}ch`},value:e,onChange:b=>n(b.target.value),onScroll:g,onKeyDown:S,onBlur:r,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}const yC=[{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"]}],Vpt=4e6,Wpt=200,wC=16e6,Kpt=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)}),SC=e=>e.startsWith("//")?`https:${e}`:e;async function Ypt(e,n){var s;let t=Vpt;const r=new Map;for(const{element:a,attribute:o,url:l,typePrefixes:c}of e){if(r.has(l)){const S=r.get(l);S&&a.setAttribute(o,S);continue}if(n.aborted)return;if(r.size>=Wpt)continue;r.set(l,null);const d=await fetch(l,{signal:n}).catch(()=>null);if(!(d!=null&&d.ok))continue;const _=d.headers.get("content-type")??"",f=Number(d.headers.get("content-length"));if(!c.some(S=>_.startsWith(S))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=d.body)==null?void 0:s.cancel().catch(()=>{}));continue}const m=await d.blob().catch(()=>null),g=m&&await Kpt(m);!m||!g||(t-=m.size,r.set(l,g),a.setAttribute(o,g))}}async function Xpt(e,n,t){var o;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const l of r.querySelectorAll(yC.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:d,typePrefixes:_}of yC){if(!l.matches(c))continue;const f=l.getAttribute(d);if(!f)continue;const m=n(f);m&&(m===f?l.setAttribute(d,SC(f)):s.push({element:l,attribute:d,url:m,typePrefixes:_}))}await Ypt(s,t);for(const l of r.querySelectorAll("a[href]")){const c=l.getAttribute("href");!c||!vM(c)||(l.setAttribute("href",SC(c)),l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer"))}const a=((o=r.querySelector("base[href]"))==null?void 0:o.getAttribute("href"))??"";if(!/^https?:\/\//i.test(a)){const l=r.createElement("base");l.setAttribute("href","about:srcdoc"),r.head.prepend(l)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function Zpt(e,n,t,r){var l;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${wC-1}`}}).catch(()=>null),a=s!=null&&s.ok?await s.text().catch(()=>null):null;if(a===null)return{text:e,partial:!0};const o=Number((l=s==null?void 0:s.headers.get("content-range"))==null?void 0:l.split("/").pop());return{text:a,partial:Number.isFinite(o)&&o>wC}}function Qpt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;const c=new AbortController;return o(null),Zpt(e,n,t,c.signal).then(async({text:d,partial:_})=>({source:await Xpt(d,s,c.signal),partial:_})).then(d=>{l||o(d)}),()=>{l=!0,c.abort()}},[e,n,t,s]),a===null?h.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[h.jsx(dn,{})," ",lE()]}):h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a.partial&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:lde()}),h.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:fde({name:Ae(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:a.source})]})}const g0=e=>Ca(new Intl.ListFormat(N()).format(e.map(Ae)));function Jpt(e){if(e.error)return zye();if(e.syncing)return awe();if(e.blocked)return gE();const n=e.last;return n?n.pulled.length&&n.pushed.length?R4e({pulled:g0(n.pulled),pushed:g0(n.pushed)}):n.pulled.length?A4e({paths:g0(n.pulled)}):n.pushed.length?I4e({paths:g0(n.pushed)}):n.conflicts.length?Hye():mE():C4e()}function kC({href:e}){return h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:g4e()})}function emt({overleaf:e}){var m,g;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=()=>{t(""),o(null),c(!0)},_=!e.hasToken||l;async function f(S){S.preventDefault();const k=n.trim();if(!(r||!k)){s(!0),o(null);try{_?(await e.saveToken(k),c(!1)):await e.linkProject(k),t("")}catch(b){o(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!l){const S=((m=e.last)==null?void 0:m.conflicts)??[];return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-subtext",children:[h.jsx("span",{className:"flex-1 min-w-0",children:Jpt(e)}),e.syncing&&h.jsx(dn,{}),h.jsxs("a",{className:"inline-flex items-center gap-1 text-sm text-subtext whitespace-nowrap",href:e.link.url,target:"_blank",rel:"noreferrer",children:[n4e()," ",h.jsx(gc,{size:11})]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,"data-tip":e.blocked?P4e():void 0,onClick:()=>e.sync(),children:c4e()}),h.jsx(Qe,{variant:"ghost",disabled:e.syncing,onClick:()=>void e.unlink().catch(k=>{o(k instanceof Error?k.message:String(k))}),children:h4e()})]}),S.map(k=>h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-accent-red",children:[h.jsxs("span",{className:"flex-1 min-w-0",children:[h.jsx("code",{className:"font-mono",children:k})," ",Kye()]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"keep-local"}),children:Qye()}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"take-overleaf"}),children:y4e()})]},k)),((g=e.last)==null?void 0:g.note)&&h.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(kC,{href:e.uploadUrl}),h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:N7()})]})]})}return h.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[h.jsx("div",{className:"text-sm text-subtext",children:_?uwe():_we()}),h.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[h.jsx("input",{className:"flex-1 min-w-55 text-sm",type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?yye():"https://www.overleaf.com/project/…",autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:r||!n.trim(),children:r?_?ja():jp():_?K4e():Mye()}),h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?gye():Oye()})]}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(kC,{href:e.uploadUrl}),l?h.jsx(Qe,{variant:"ghost",type:"button",onClick:()=>c(!1),children:qye()}):e.hasToken&&h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:N7()})]})]})}function tmt({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const a=r.current;if(a){const o=document.createRange();o.selectNodeContents(a);const l=window.getSelection();l==null||l.removeAllRanges(),l==null||l.addRange(o)}t("select"),setTimeout(()=>t("idle"),4e3)}};return h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.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}),h.jsx(Jt,{"data-tip":n==="copied"?Y0():n==="select"?gfe():kue(),"aria-label":zue(),onClick:()=>void s(),children:n==="copied"?h.jsx(Ws,{size:13}):h.jsx(Lp,{size:13})})]})}function nmt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:a,branchLabel:o,onOpenFile:l,scrollPosition:c,onScrollPositionChange:d,lineScrollRequest:_,onLineScrollRequestHandled:f,onEdit:m}){var mn;const[g,S]=M.useState(null),[k,b]=M.useState(null),[v,x]=M.useState(!0),[y,C]=M.useState(0),A=t==="artifacts",E=t==="abs",j=x4(n),T=Xj(n),D=dpt(n),I=j||D,[P,H]=M.useState(!1),[F,V]=M.useState(""),[X,W]=M.useState(!1),[Z,J]=M.useState(null),B=M.useRef(null),L=M.useRef(c),$=(g==null?void 0:g.file)??null,K=(g==null?void 0:g.source)==="checkout"?g.file.path:n,G=K.split("/").slice(0,-1).join("/"),re=(g==null?void 0:g.source)==="artifact",oe=M.useCallback(Ye=>{var xt;return((xt=xC(G,Ye,E))==null?void 0:xt.path)??null},[E,G]),he=M.useCallback(Ye=>E?zYe(Ye):re?xh(e,Ye):W7(e,Ye,{sessionId:r,ref:s}),[re,s,E,e,r]),ie=M.useCallback(Ye=>{if(vM(Ye))return Ye;const xt=xC(G,Ye,E);return xt?qpt(he(xt.path),xt):null},[E,G,he]),q=sM($==null?void 0:$.presentation),te=(g==null?void 0:g.source)==="artifact"&&!A,le=A&&(g==null?void 0:g.source)==="checkout",ge=!s&&(g==null?void 0:g.source)==="checkout"&&$!=null&&!$.notFound,ue=r!=null&&(g==null?void 0:g.source)==="checkout"&&g.file.root==="clone",Ce=ge&&$!=null&&!$.binary&&!$.truncated&&!q&&!ue,Ee=M.useMemo(()=>(($==null?void 0:$.content)??"").replace(/\r\n/g,` -`),[$==null?void 0:$.content]),Le=Ce&&F!==Ee,Pe=M.useRef(null);M.useEffect(()=>{const Ye=($==null?void 0:$.content)??"";if(Pe.current!==null&&Ye===Pe.current){Pe.current=null;return}V(Ye.replace(/\r\n/g,` -`)),J(null)},[$==null?void 0:$.content,n]);const Ve=async()=>{if(!Ce||$==null||!Le||X)return!Le;const Ye=$.content.includes(`\r +`:"")+_.content]}),["",""]),t=hn(n,2),r=hn(sM(t[0],t[1]),2),s=r[0],a=r[1];if(s.length===0&&a.length===0)return[[],[]];var o=function(d){if(d&&!wo(d))return d.lineNumber},l=o(e.find(hi)),c=o(e.find(Rl));if(l===void 0||c===void 0)throw new Error("Could not find start line number for edit");return[_C(hC(s),l),_C(hC(a),c)]}function lpt(e){var n=e.reduce((function(r,s){var a=hn(r,3),o=a[0],l=a[1],c=a[2];if(!c||!hi(c)||!Rl(s))return[o,l,s];var d=hn(sM(c.content,s.content),2),_=d[0],f=d[1];return[o.concat(q2(_,c.lineNumber)),l.concat(q2(f,s.lineNumber)),s]}),[[],[],null]),t=hn(n,2);return[t[0],t[1]]}function cpt(e){var n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,t=(n===void 0?"block":n)==="block"?opt:lpt,r=w4(e.map((function(l){return l.changes})),rM).map(t).reduce((function(l,c){var d=hn(l,2),_=d[0],f=d[1],m=hn(c,2),g=m[0],S=m[1];return[_.concat(g),f.concat(S)]}),[[],[]]),s=hn(r,2),a=s[0],o=s[1];return npt(dC(a),dC(o))}var upt=["enhancers"],pC=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,a=hn(P0t(e,Nl(t,upt)),2),o=a[0],l=a[1],c=[lC(o),lC(l)],d=(n=[c[0],c[1]],s.reduce((function(k,b){return b(k)}),n)),_=hn(d,2),f=_[0],m=_[1],g=[f.map(cC),m.map(cC)],S=g[1];return{old:g[0].map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]})),new:S.map((function(k){var b;return(b=k.children)!==null&&b!==void 0?b:[]}))}};const G2=["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]:text-sm","[&_.openresearch-diff-file]:leading-[1.55] [&_.openresearch-diff-file.diff-unified]:table-auto","[&_.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_col.diff-gutter-col:nth-child(2)]:w-[1%]","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:first-child]:hidden","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:sticky","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:start-0","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:z-1","[&_.openresearch-diff-file.diff-unified_.diff-line_>_td:nth-child(2)]:w-[1%]","[&_.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]:leading-[1.55]","[&_.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]:px-4","[&_.openresearch-diff-file_.diff-code]:whitespace-pre","[&_.openresearch-diff-file_.diff-code]:break-normal","[&_.openresearch-diff-file_.diff-code]:wrap-normal","[&_.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(" "),dpt=2e3,fpt={highlight(e,n){return gt.highlight(e,n).children}};function hpt(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function k4(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 _pt(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function V2(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 ppt(e){const n=[cpt(e.hunks,{type:"line"})],t=Ay(_pt(e));return t&>.registered(t)?pC(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:fpt}):pC(e.hunks,{enhancers:n,highlight:!1})}function mpt(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:I2(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:I2(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const gpt=({change:e,side:n})=>n==="old"?null:hpt(e);function iM({bytesRead:e,byteLimit:n}){return h.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:[h.jsx("h4",{children:ghe()}),h.jsx("p",{children:Yhe({limit:Te(wa(n)),read:Te(wa(e))})})]})}function aM({file:e,defaultExpanded:n}){const[t,r]=M.useState(n),{additions:s,deletions:a}=M.useMemo(()=>k4(e),[e]),o=t&&s+a<=dpt,l=M.useMemo(()=>{if(o)try{return ppt(e)}catch{return}},[e,o]);return h.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:[h.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-semibold [&_.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:[h.jsx("span",{className:"chev",children:t?h.jsx(ta,{size:14}):h.jsx(ja,{size:14})}),h.jsx("span",{className:"path",children:h.jsx("code",{children:V2(e)})}),h.jsxs("span",{className:"stats",children:[h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",s]}),h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",a]})]})]}),t&&(e.hunks.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:Rhe()}):h.jsx("div",{className:"diff-file-body overflow-x-auto bg-background",children:h.jsx(j0t,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:gpt,tokens:l,viewType:"unified"})}))]})}function vpt({files:e,className:n}){return h.jsx("div",{className:n?`${G2} ${n}`:G2,children:e.map((t,r)=>h.jsx(aM,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function bpt(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 oM({diff:e,partial:n=!1}){var m;const t=M.useMemo(()=>mpt(e,n),[e,n]),r=t.files,s=M.useMemo(()=>r.map((g,S)=>({file:g,key:`${g.oldPath}→${g.newPath}#${S}`,changes:k4(g)})),[r]),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=l&&!n,_=s.some(g=>g.key===a)?a:((m=s[0])==null?void 0:m.key)??null,f=s.find(g=>g.key===_)??null;return t.failed?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?Ahe():Ghe()}):s.length===0?h.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:Che()}):h.jsxs("div",{className:"diff-explorer @container",children:[h.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:[h.jsx("strong",{children:n?s.length===1?Phe():yhe({count:Ft(s.length)}):s.length===1?Ihe():che({count:Ft(s.length)})}),!n&&h.jsx("button",{type:"button",onClick:()=>c(g=>!g),children:d?ihe():Jhe()})]}),d?h.jsx(vpt,{files:r}):h.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:[h.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":hhe(),children:s.map(g=>h.jsxs("button",{type:"button",className:g.key===_?"active":"","aria-pressed":g.key===_,onClick:()=>o(g.key),children:[h.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-${g.file.type}`,children:bpt(g.file)}),h.jsx("code",{title:V2(g.file),children:V2(g.file)}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-add text-accent-green",children:["+",g.changes.additions]}),h.jsxs("span",{className:"diff-explorer-stat font-mono text-xs diff-stat-del text-accent-red",children:["−",g.changes.deletions]})]},g.key))}),h.jsx("div",{className:`${G2} diff-explorer-preview min-w-0`,children:f&&h.jsx(aM,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function xpt({experiment:e,refreshKey:n,onLoadingChange:t}){const[r,s]=M.useState(null),[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;return t(!0),o(null),s(null),FYe(e.id).then(c=>{l||s(c)}).catch(c=>{l||o(c.message)}).finally(()=>{l||t(!1)}),()=>{l=!0}},[e.id,n,t]),h.jsx(Pu,{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:a?h.jsxs(Wi,{children:[iW()," ",Te(a)]}):r?r.diff.trim()?h.jsxs(h.Fragment,{children:[r.truncated&&h.jsx(iM,{bytesRead:r.bytesRead,byteLimit:r.byteLimit}),h.jsx(oM,{diff:r.diff,partial:r.truncated})]}):h.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?hW():tW()}):h.jsx(Wi,{children:cW()})})}function lM({view:e,onViewChange:n,showViewToggle:t=!0,branchLabel:r,branchTitle:s,githubHref:a,githubTitle:o,refreshing:l,onRefresh:c}){return h.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&&h.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":kre(),children:[h.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:zre()}),h.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:xre()})]}),r&&h.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:[h.jsx(Fp,{size:12}),h.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),a&&h.jsx(Wp,{href:a,target:"_blank",rel:"noopener noreferrer",title:o,"aria-label":o,children:h.jsx(gm,{size:13})}),h.jsx("span",{className:"flex-1"}),h.jsx(Jt,{title:a7(),"aria-label":a7(),onClick:c,children:l?h.jsx(dn,{}):h.jsx(oN,{size:13})})]})}const ypt=/\.(md|mdx|markdown)$/i,wpt=/\.tex$/i,Spt=/\.html?$/i,kpt=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,Cpt=/\.(csv|tsv|xlsx?|ods)$/i,Ept=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,Npt=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,zpt=/\.pdf$/i,Apt=/\.(docx?|log|rtf|txt)$/i;function Tpt(e){return kpt.test(e)}function C4(e){return ypt.test(e)}function cM(e){return wpt.test(e)}function jpt(e){return Spt.test(e)}function uM({name:e}){const n=C4(e)?"markdown":Tpt(e)?"image":Cpt.test(e)?"spreadsheet":Ept.test(e)?"code":Npt.test(e)?"archive":zpt.test(e)?"pdf":Apt.test(e)||cM(e)?"document":"file";let t;return n==="markdown"?t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M1 3h14v10H1z",fill:"currentColor",opacity:".18"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"1.5",y:"2",width:"13",height:"12",rx:"2",fill:"currentColor",opacity:".18"}),h.jsx("circle",{cx:"5",cy:"5.5",r:"1.4",fill:"currentColor"}),h.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=h.jsxs(h.Fragment,{children:[h.jsx("rect",{x:"2",y:"1.5",width:"12",height:"13",rx:"1.5",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M3.5 4.5h9M3.5 8h9M3.5 11.5h9M7 3v10M10.5 3v10",stroke:"currentColor",strokeWidth:"1.1"})]}):n==="code"?t=h.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=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M2 2h12v12H2z",fill:"currentColor",opacity:".18"}),h.jsx("path",{d:"M7 2h2v2H7V2Zm0 3h2v2H7V5Zm0 3h2v2H7V8Zm-0.5 3h3v2h-3v-2Z",fill:"currentColor"})]}):t=h.jsxs(h.Fragment,{children:[h.jsx("path",{d:"M3 1.5h6l4 4v9H3v-13Z",fill:"currentColor",opacity:".2"}),h.jsx("path",{d:"M9 1.5v4h4",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),h.jsx("path",{d:"M5 8h6M5 10.5h6M5 13h4",stroke:"currentColor",strokeWidth:"1.2"})]}),h.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 dM=["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(" "),mC=["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 gC(){return{dirs:new Map,files:[]}}function fM(e){const n=gC();for(const t of e){const r=t.split("/");let s=n;for(let a=0;aa(t),title:t,children:[c?h.jsx(ta,{size:13,className:mC}):h.jsx(ja,{size:13,className:mC}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),c&&h.jsx(E4,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:a,onOpenFile:o})]})}function E4({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:a}){const o=[...e.dirs.keys()].sort((c,d)=>c.localeCompare(d)),l=[...e.files].sort((c,d)=>c.localeCompare(d));return h.jsxs(h.Fragment,{children:[o.map(c=>{const d=n?`${n}/${c}`:c;return h.jsx(Mpt,{name:c,node:e.dirs.get(c),path:d,depth:t,toggled:r,onToggle:s,onOpenFile:a},`d:${d}`)}),l.map(c=>{const d=n?`${n}/${c}`:c;return h.jsxs("button",{type:"button",className:dM,style:{paddingInlineStart:8+t*14},...gr(_=>a(d,_)),title:gI({name:Te(d)}),children:[h.jsx(uM,{name:c}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c})]},`f:${d}`)})]})}function Rpt({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:a,onToggledChange:o,onOpenFile:l}){const c=t.branchName,d=`${e}:${c}`,[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState(!1),[x,y]=M.useState(0),[C,A]=M.useState(void 0),E=M.useRef(0),j=M.useRef(null),T=M.useCallback(()=>{j.current=d;const B=++E.current;k(!0),Ab(e,{ref:c}).then(F=>{B===E.current&&(f(F),g(null))}).catch(F=>{B===E.current&&g(F.message)}).finally(()=>{B===E.current&&k(!1)})},[e,c,d]);M.useEffect(()=>(E.current++,j.current=null,f(null),g(null),k(!1),()=>{E.current++}),[d]),M.useEffect(()=>{r==="files"&&j.current!==d&&T()},[r,d,T]),M.useEffect(()=>{A(void 0);const B=t.chatSessionId;if(!B)return;let F=!1;return mN(B).then(V=>{!F&&V.exists&&V.branch===c&&A(B)}).catch(()=>{}),()=>{F=!0}},[t.chatSessionId,c]);const D=M.useMemo(()=>_?fM(_.entries):null,[_]),I=r==="files"?S:b,P=M.useCallback(B=>{const F=new Set(s);F.has(B)?F.delete(B):F.add(B),o(F)},[s,o]);return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0",children:[h.jsx(lM,{view:r,onViewChange:a,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?qp(n.githubOwner,n.githubRepo,c):void 0,githubTitle:nE({branch:Te(c)}),refreshing:I,onRefresh:()=>r==="files"?T():y(B=>B+1)}),r==="changes"?h.jsx(xpt,{experiment:t,refreshKey:x,onLoadingChange:v},t.id):h.jsxs(h.Fragment,{children:[(_==null?void 0:_.truncated)&&h.jsx(Wi,{children:Lre()}),m&&D&&h.jsxs(Wi,{children:[Ure()," ",Te(m)]}),h.jsx(Pu,{children:D?D.dirs.size===0&&D.files.length===0?h.jsx(Wi,{children:$re()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(E4,{node:D,parentPath:"",depth:0,toggled:s,onToggle:P,onOpenFile:(B,F)=>C?l(B,C,void 0,F):l(B,void 0,c,F)})}):h.jsx(Wi,{children:m?lE({error:Te(m)}):cE()})})]})]})}const Dpt=5e3;function Lpt({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:a,onOpenFile:o}){var D;const l=n.id,[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!0),b=M.useRef(0),v=M.useCallback(()=>{const I=++b.current;k(!0),(async()=>{if(!e)return[null,await Ab(l,{ref:n.baselineBranch})];const B=await mN(e),F=B.exists?{sessionId:e}:{ref:n.baselineBranch};return[B,await Ab(l,F)]})().then(([B,F])=>{I===b.current&&(d(B),f(F),g(null))}).catch(B=>{I===b.current&&g(B.message)}).finally(()=>{I===b.current&&k(!1)})},[e,l,n.baselineBranch]);M.useEffect(()=>(d(null),f(null),g(null),v(),()=>{b.current++}),[v]),M.useEffect(()=>{if(!e)return;let I=!1,P=!1,B=!1,F=null;const V=()=>{F||(F=setInterval(v,Dpt))},X=()=>{F&&(clearInterval(F),F=null)},W=Ff(Z=>{Z.type!=="busy"||Z.sessionId!==e||(P=!0,Z.busy&&!I?(I=!0,V()):!Z.busy&&I&&(I=!1,X(),v()))});return O0(l).then(Z=>{var J;B||P||I||(J=Z.find($=>$.id===e))!=null&&J.busy&&(I=!0,V())}).catch(()=>{}),()=>{B=!0,W(),X()}},[e,l,v]);const x=M.useMemo(()=>_?fM(_.entries):null,[_]),y=M.useCallback(I=>{const P=new Set(r);P.has(I)?P.delete(I):P.add(I),a(P)},[r,a]),C=e&&(c!=null&&c.exists)?c:null,A=(C==null?void 0:C.branch)??(C!=null&&C.baselineBranch?GVe({branch:Te(C.baselineBranch)}):zE()),E=((D=C==null?void 0:C.files)==null?void 0:D.length)??0,j=C?IVe({branch:Te(`${A}${E>0?"*":""}`)}):PVe({branch:Te(n.baselineBranch)}),T=C?C.branch:n.baselineBranch;return h.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[h.jsx(lM,{view:C?t:"files",onViewChange:s,showViewToggle:!!C,branchLabel:j,branchTitle:j,githubHref:n.githubEnabled&&T?qp(n.githubOwner,n.githubRepo,T):void 0,githubTitle:T?nE({branch:Te(T)}):void 0,refreshing:S,onRefresh:v}),m&&(c||_)&&h.jsxs(Wi,{children:[dWe()," ",Te(m)]}),!_||e&&!c?h.jsx(Pu,{children:h.jsx(Wi,{children:m?lE({error:Te(m)}):cE()})}):C&&t==="changes"?h.jsx(Pu,{className:"wt-changes px-4 pb-6 pt-0 [&_>_:first-child]:mt-3.5",children:E===0||!C.diff?h.jsx("div",{className:"changes-note text-sm text-muted",children:rWe()}):h.jsxs(h.Fragment,{children:[C.diff.truncated&&h.jsx(iM,{bytesRead:C.diff.bytesRead,byteLimit:C.diff.byteLimit}),h.jsx(oM,{diff:C.diff.diff,partial:C.diff.truncated})]})}):h.jsxs(Pu,{children:[_.truncated&&h.jsx(Wi,{children:YVe()}),x?x.dirs.size===0&&x.files.length===0?h.jsx(Wi,{children:oWe()}):h.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:h.jsx(E4,{node:x,parentPath:"",depth:0,toggled:r,onToggle:y,onOpenFile:(I,P)=>C?o(I,e,void 0,P):o(I,void 0,n.baselineBranch,P)})}):h.jsx(Wi,{children:JVe()})]})]})}const kp="font-mono text-sm leading-[1.55] [tab-size:4]",hM="whitespace-pre-wrap break-words",_M="file-view-gutter text-right text-muted select-none";function pM(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}function mM({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const a=M.useMemo(()=>{if(!e)return[];const _=e.replace(/\r\n?/g,` +`),f=MT(_,Ay(n));return _.endsWith(` +`)?f.slice(0,-1):f},[e,n]),o=t&&a.length>0?Math.min(Math.max(Math.trunc(t),1),a.length):void 0,l=M.useRef(null);M.useEffect(()=>{var _;r!==void 0&&(o?((_=l.current)==null||_.scrollIntoView({block:"center"}),s==null||s()):a.length===0&&(s==null||s()))},[a.length,s,r,o]);const{ruleCh:c}=pM(a.length),d=M.useMemo(()=>a.map((_,f)=>h.jsxs("div",{ref:f+1===o?l:void 0,className:`file-view-line flex items-stretch ${f+1===o?"file-view-line-highlight bg-accent-blue-subtle shadow-file-line":""}`,children:[h.jsx("span",{"data-line":f+1,className:`${_M} before:content-[attr(data-line)] shrink-0 pe-[1ch]`,style:{width:`${c}ch`},"aria-hidden":"true"}),h.jsx("code",{className:`file-view-code flex-1 min-w-0 ps-[2ch] pe-4 ${kp} ${hM}`,children:RT(_)?h.jsx("br",{}):_})]},f)),[a,c,o]);return h.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${kp}`,children:[a.length>0&&h.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"}),d]})}function gM(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function vC({url:e,name:n}){return h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Y0e()," ",h.jsxs("a",{href:e,download:n,children:[mE()," ",Te(n)]})]})}function W2({kind:e,url:n,name:t,downloadBar:r=!0}){const[s,a]=M.useState(!1);if(M.useEffect(()=>a(!1),[e,n]),s)return h.jsx(vC,{url:n,name:t});let o;return e==="image"?o=h.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:h.jsx("img",{src:n,alt:t,onError:()=>a(!0)})}):e==="audio"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("audio",{className:"w-full max-w-160",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):e==="video"?o=h.jsx("div",{className:"flex min-h-0 flex-1 items-center justify-center p-6",children:h.jsx("video",{className:"max-h-full max-w-full rounded-sm border border-border",controls:!0,preload:"metadata",src:n,"aria-label":t,onError:()=>a(!0)})}):o=h.jsx("object",{className:"fpreview-pdf block min-h-0 flex-1 w-full border-0","aria-label":t,data:n,type:"application/pdf",onError:()=>a(!0),children:h.jsx(vC,{url:n,name:t})}),h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[o,r&&h.jsx("div",{className:"shrink-0 border-t border-border-variant py-1.5 px-3 text-end text-sm",children:h.jsxs("a",{href:n,download:t,children:[mE()," ",t]})})]})}const bC="tip-up [&[data-tip]::after]:top-auto [&[data-tip]::after]:bottom-[calc(100%_+_6px)]";function Opt(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function Ipt(e,n,t){const r=t.indexOf("#"),s=r===-1?t:t.slice(0,r),a=r===-1?"":t.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1),d=l.startsWith("/")?[]:n.split("/").filter(g=>g.length>0);for(const g of l.split("/"))if(!(!g||g==="."))if(g===".."){if(d.length===0)return null;d.pop()}else d.push(g);const _=d.join("/");if(!_)return null;const f=new URLSearchParams(c);f.delete("path");const m=f.toString();return`${wh(e,_)}${m?`&${m}`:""}${a}`}function Bpt(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const vM="orx:files-tree-width",bM="orx:artifacts-collapsed:",xM=180,yM=560,$pt=8,Hpt=280;function Ppt(){try{const e=Number(localStorage.getItem(vM));if(Number.isFinite(e)&&e>=xM&&e<=yM)return e}catch{}return Hpt}function Fpt(e){try{const n=localStorage.getItem(`${bM}${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 K2(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=K2(t.children??[],n);if(r)return r}}return null}function wM({projectId:e,folder:n,markdown:t}){const r=s=>Opt(s)?s:Ipt(e,n,s);return h.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:h.jsx(yst,{remarkPlugins:[kT,[CT,OT]],rehypePlugins:[JA],components:{a:({href:s,children:a,...o})=>{const l=!s||s.startsWith("#"),c=l?s:r(s);return c?h.jsx("a",{...o,href:c,...l?{}:{target:"_blank",rel:"noopener noreferrer"},children:a}):h.jsx("span",{children:a})},img:({src:s,alt:a})=>{if(!s||typeof s!="string")return null;const o=r(s);return o?h.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"artifact-img",children:[h.jsx("img",{src:o,alt:a??"",loading:"lazy"}),a&&h.jsx("span",{className:"artifact-img-caption",children:a})]}):null},...IT},children:DT(Bpt(t))})})}function Upt(e){return e.presentation==="text"&&C4(e.name)?"markdown":gM(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function qpt(e,n,t){const[r,s]=M.useState(null),[a,o]=M.useState(!1),[l,c]=M.useState(!1),[d,_]=M.useState(null),f=M.useRef(0),m=M.useRef(!1),g=t==="markdown"||t==="text"&&n.size<=vN;return M.useEffect(()=>{if(o(!1),c(!1),_(null),!g)return;let S=!1;const k=++f.current;return bN(e,n.path).then(v=>{if(!v)throw new Error(qG());return v}).then(v=>{S||k!==f.current||(v.binary?o(!0):(m.current=!0,s(v.content)),c(v.truncated))}).catch(v=>{!S&&k===f.current&&!m.current&&_(v instanceof Error?v.message:String(v))}),()=>{S=!0}},[e,n.path,n.modifiedAt,t,g]),{text:r,binary:a,truncated:l,error:d,wantsText:g}}function Gpt({projectId:e,entry:n,onDelete:t}){const r=Upt(n),{text:s,binary:a,truncated:o,error:l,wantsText:c}=qpt(e,n,r),[d,_]=M.useState(!1),f=r==="markdown",m=n.path.split("/").slice(0,-1).join("/"),g=`${wh(e,n.path)}&v=${n.modifiedAt}`;let S;return r==="image"||r==="audio"||r==="video"||r==="pdf"?S=h.jsx(W2,{kind:r,url:g,name:n.name}):r==="download"||!c||a?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[r==="download"||a?OG():ZV()," ",h.jsx("a",{href:g,...r==="download"||a?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:r==="download"||a?hE():KG()})]}):l?S=h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[hV()," ",Te(l)]}):s===null?S=h.jsxs(vr,{children:[h.jsx(dn,{})," ",CV()]}):f&&!d?S=h.jsx(wM,{projectId:e,folder:m,markdown:s}):S=h.jsx(mM,{text:s,path:n.path}),h.jsxs("div",{className:"fpreview flex-1 min-w-0 bg-background file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"fpreview-head h-10 flex items-center gap-2 py-0 px-3.5 border-b border-b-border-variant text-subtext shrink-0",children:[h.jsx(Ku,{size:13,className:"shrink-0"}),h.jsx("code",{className:"fpreview-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Te(n.path),children:n.path}),h.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0",children:[RV()," ",new Date(n.modifiedAt).toLocaleString(N(),{dateStyle:"medium",timeStyle:"short"})]}),(r==="text"||r==="download")&&h.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:wa(n.size)}),f&&h.jsx(Jt,{active:d,"data-tip":d?np():Tu(),"data-tip-align":"end","aria-label":d?np():Tu(),onClick:()=>_(k=>!k),children:h.jsx(Eb,{size:13})}),h.jsx(Wp,{href:g,target:"_blank",rel:"noopener noreferrer","data-tip":R6(),"data-tip-align":"end","aria-label":R6(),children:h.jsx(vc,{size:13})}),h.jsx(Jt,{"data-tip":M6(),"data-tip-align":"end","aria-label":M6(),onClick:()=>{window.confirm(sE({path:Te(n.path)}))&&t(n.path)},children:h.jsx(dd,{size:13})})]}),h.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 ${f&&!d?"doc":""}`,children:[S,o&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:gV()})]})]})}function SM({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l}){return h.jsx("div",{className:"flex w-full max-w-full min-w-0 flex-col items-stretch",children:e.map(c=>{var _;const d={paddingInlineStart:8+Math.min(n,$pt)*14};if(c.isDir){const f=!t.has(c.path);return h.jsxs("div",{className:"min-w-0 max-w-full",children:[h.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:d,onClick:()=>s(c.path),children:[h.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":f?yG({name:Te(c.name)}):MG({name:Te(c.name)}),onClick:m=>{m.stopPropagation(),s(c.path)},children:h.jsx(ja,{size:13,className:f?"open":""})}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name}),h.jsx(Jt,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":cV(),"data-tip-align":"end","aria-label":zG({name:Te(c.name)}),onClick:m=>{m.stopPropagation(),window.confirm(sE({path:Te(c.path)}))&&l(c.path)},children:h.jsx(dd,{size:12})})]}),f&&(((_=c.children)==null?void 0:_.length)??0)>0&&h.jsx(SM,{entries:c.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:a,onOpenFile:o,onDelete:l})]},c.path)}return h.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===c.path?"selected":""}`,style:d,title:vO({path:Te(c.path)}),"aria-keyshortcuts":"Space Enter","aria-pressed":r===c.path,onClick:()=>a(c.path),onDoubleClick:()=>o(c.path),onAuxClick:f=>{f.button===1&&(f.preventDefault(),a(c.path),o(c.path))},onKeyDown:f=>{if(f.key===" "){f.preventDefault(),f.stopPropagation(),a(c.path);return}f.key==="Enter"&&(f.preventDefault(),f.stopPropagation(),a(c.path),o(c.path))},children:[h.jsx(uM,{name:c.name}),h.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:c.name})]},c.path)})})}function xC({dir:e,onOpenStorage:n}){const[t,r]=M.useState(!1);return h.jsxs("div",{className:"ftree-footer shrink-0 flex items-center gap-0.5 py-[5px] px-2 border-t border-t-border-variant [&_code]:flex-1 [&_code]:min-w-0 [&_code]:[direction:rtl] [&_code]:text-left [&_code]:font-mono [&_code]:text-xs [&_code]:text-muted [&_code]:overflow-hidden [&_code]:text-ellipsis [&_code]:whitespace-nowrap",title:Te(e),children:[h.jsx("code",{className:"path-front-ellipsis",children:e}),h.jsx(Jt,{size:"small",className:bC,"data-tip":t?tp():HG(),"aria-label":nV(),onClick:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e),r(!0),setTimeout(()=>r(!1),1200)},children:t?h.jsx(Ys,{size:12}):h.jsx(Hp,{size:12})}),h.jsx(Jt,{size:"small",className:bC,"data-tip":D6(),"data-tip-align":"end","aria-label":D6(),onClick:n,children:h.jsx(iYe,{size:12})})]})}function Vpt({project:e,artifacts:n,onChanged:t,onOpenFile:r,onOpenStorage:s}){const[a,o]=M.useState(null),[l,c]=M.useState(()=>Fpt(e.id)),[d,_]=M.useState(Ppt),f=M.useRef(null);M.useEffect(()=>{try{localStorage.setItem(`${bM}${e.id}`,JSON.stringify([...l]))}catch{}},[e.id,l]);const m=v=>{var E;v.preventDefault(),v.currentTarget.setPointerCapture(v.pointerId);const x=(E=f.current)==null?void 0:E.getBoundingClientRect(),y=document.body.style.userSelect;document.body.style.userSelect="none";const C=j=>{const T=Math.round(j.clientX-((x==null?void 0:x.left)??0)),D=Math.min(Math.max(T,xM),yM);_(D);try{localStorage.setItem(vM,String(D))}catch{}},A=()=>{window.removeEventListener("pointermove",C),window.removeEventListener("pointerup",A),window.removeEventListener("pointercancel",A),document.body.style.userSelect=y};window.addEventListener("pointermove",C),window.addEventListener("pointerup",A),window.addEventListener("pointercancel",A)};M.useEffect(()=>{if(!a||!n)return;const v=K2(n.entries,a);(!v||v.isDir)&&o(null)},[a,n]);const g=v=>c(x=>{const y=new Set(x);return y.has(v)?y.delete(v):y.add(v),y}),S=v=>{(a===v||a!=null&&a.startsWith(v+"/"))&&o(null),AXe(e.id,v).catch(()=>{}).finally(t)};if(!n)return h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs(vr,{className:"p-5",children:[h.jsx(dn,{})," ",AV()]})});const k=v=>h.jsx(SM,{entries:v,depth:0,collapsed:l,selected:a,onToggle:g,onSelect:o,onOpenFile:r,onDelete:S}),b=a?K2(n.entries,a):null;return n.entries.length===0?h.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:h.jsxs("div",{className:"files-empty-state flex-1 flex flex-col items-center justify-center gap-1.5 p-6 text-center text-muted [&_h3]:mt-1.5 [&_h3]:mx-0 [&_h3]:mb-0 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:text-text [&_p]:m-0 [&_p]:max-w-105 [&_p]:text-sm [&_p]:leading-[1.55] [&_p]:text-subtext [&_.ftree-footer]:mt-2.5 [&_.ftree-footer]:max-w-full [&_.ftree-footer]:border [&_.ftree-footer]:border-border [&_.ftree-footer]:rounded-md [&_.ftree-footer]:py-1.5 [&_.ftree-footer]:px-2.5 [&_.ftree-footer]:bg-background [&_.ftree-footer_code]:max-w-95",children:[h.jsx(zx,{size:28,strokeWidth:1.5}),h.jsx("h3",{children:IV()}),h.jsx("p",{children:WV()}),h.jsx(xC,{dir:n.dir,onOpenStorage:s})]})}):h.jsxs("div",{className:"files-tab h-full min-h-0 flex bg-background",children:[h.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",ref:f,style:{width:d},children:[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",onPointerDown:m}),h.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[k(n.entries),n.truncated&&h.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:yV()})]}),h.jsx(xC,{dir:n.dir,onOpenStorage:s})]}),b?h.jsx(Gpt,{projectId:e.id,entry:b,onDelete:S},b.path):h.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",children:[h.jsx(GKe,{size:22,strokeWidth:1.5}),h.jsx("span",{children:QG()})]})]})}const kM=20*1024*1024,CM="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",EM="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",NM="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",Wpt="font-mono text-base font-medium text-text",Kpt="mt-1 mb-0 text-sm leading-relaxed text-text";function zM(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 a=s.indexOf(",");n(a>=0?s.slice(a+1):s)},r.onerror=()=>t(r.error??new Error("could not read file")),r.readAsDataURL(e)})}function Ypt(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function AM({accept:e,busy:n,prompt:t,onFile:r}){const[s,a]=M.useState(!1),o=M.useRef(null);return h.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:l=>{l.preventDefault(),a(!0)},onDragLeave:()=>a(!1),onDrop:l=>{var d;if(l.preventDefault(),a(!1),n)return;const c=(d=l.dataTransfer.files)==null?void 0:d[0];c&&r(c)},onClick:()=>{var l;n||(l=o.current)==null||l.click()},role:"button",tabIndex:0,"aria-disabled":n,"aria-busy":n,onKeyDown:l=>{var c;(l.key==="Enter"||l.key===" ")&&!n&&(l.preventDefault(),(c=o.current)==null||c.click())},children:[h.jsx("input",{ref:o,type:"file",accept:e,hidden:!0,onChange:l=>{var d;const c=(d=l.target.files)==null?void 0:d[0];c&&r(c),l.target.value=""}}),n?h.jsxs(h.Fragment,{children:[h.jsx(dn,{}),h.jsx("span",{children:_He()})]}):h.jsxs(h.Fragment,{children:[h.jsx(bYe,{size:20,strokeWidth:1.5}),h.jsx("span",{children:t})]})]})}function TM({bytes:e,updatedAt:n}){return h.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[wa(e),n>0&&h.jsxs("span",{className:"text-muted",children:[" · ",Ea(n)]})]})}function Xpt({skill:e,onDeleted:n,onError:t}){const[r,s]=M.useState(!1);return h.jsxs("div",{className:NM,children:[h.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[h.jsxs("code",{className:Wpt,children:["/",e.name]}),e.origin&&h.jsx(Rt,{children:e.origin})]}),h.jsx(TM,{bytes:e.bytes,updatedAt:e.updatedAt}),!e.origin&&h.jsx(Jt,{"data-tip":O$e(),"data-tip-align":"end","aria-label":$Be({name:Te(e.name)}),disabled:r,onClick:()=>{window.confirm(LBe({name:Te(e.name)}))&&(s(!0),YXe(e.name).then(n).catch(a=>{s(!1),t(a instanceof Error?a.message:String(a))}))},children:h.jsx(dd,{size:13})})]})}function Zpt({template:e,onChanged:n,onError:t}){const[r,s]=M.useState(!1),a=e.supportFiles.length;return h.jsxs("div",{className:NM,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("span",{className:"text-base font-medium text-text",children:e.name}),h.jsxs("p",{className:Kpt,children:[e.entry,a>0&&(a===1?f$e():x$e({count:Ft(a)}))]})]}),h.jsx(TM,{bytes:e.bytes,updatedAt:e.updatedAt}),h.jsx(Jt,{"data-tip":H$e(),"data-tip-align":"end","aria-label":WBe({name:Te(e.name)}),disabled:r,onClick:()=>{window.confirm(UBe({name:Te(e.name)}))&&(s(!0),VXe(e.name).then(n).catch(o=>{s(!1),t(o instanceof Error?o.message:String(o))}))},children:h.jsx(dd,{size:13})})]})}function Qpt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),_=M.useCallback(()=>{a(!0),WXe().then(g=>{n(g),d(null)}).catch(g=>{n([]),d(g instanceof Error?g.message:String(g))}).finally(()=>a(!1))},[]);M.useEffect(()=>{_()},[_]);const f=M.useRef(!1),m=M.useCallback(async g=>{if(!f.current){if(l(null),!Ypt(g.name)){l(wHe());return}if(g.size>kM){l(qE());return}f.current=!0,r(!0);try{await KXe({filename:g.name,contentBase64:await zM(g)}),_()}catch(S){l(S instanceof Error?S.message:String(S))}finally{f.current=!1,r(!1)}}},[_]);return h.jsxs("section",{className:CM,children:[h.jsxs("div",{className:"flex items-baseline gap-2.5",children:[h.jsx("h3",{children:uHe()}),h.jsxs(Qe,{className:"ms-auto",size:"small",onClick:_,disabled:s,children:[h.jsx(ud,{size:12,className:s?"animate-[spin_0.9s_linear_infinite]":""})," ",Bp()]})]}),h.jsx("p",{className:EM,children:ZBe()}),h.jsx(AM,{accept:".md,.markdown,.zip",busy:t,prompt:t$e(),onFile:g=>void m(g)}),o&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:o}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",K$e()]}):c?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[k$e()," ",c]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:nHe()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(g=>h.jsx(Xpt,{skill:g,onDeleted:_,onError:l},g.name))})]})}function Jpt(){const[e,n]=M.useState(null),[t,r]=M.useState(!1),[s,a]=M.useState(null),[o,l]=M.useState(null),c=M.useCallback(()=>{qXe().then(f=>{n(f),l(null)}).catch(f=>{n([]),l(f instanceof Error?f.message:String(f))})},[]);M.useEffect(()=>{c()},[c]);const d=M.useRef(!1),_=M.useCallback(async f=>{if(d.current)return;a(null);const m=f.name.toLowerCase();if(!m.endsWith(".tex")&&!m.endsWith(".zip")){a(EHe());return}if(f.size>kM){a(qE());return}d.current=!0,r(!0);try{await GXe({filename:f.name,contentBase64:await zM(f)}),c()}catch(g){a(g instanceof Error?g.message:String(g))}finally{d.current=!1,r(!1)}},[c]);return h.jsxs("section",{className:CM,children:[h.jsx("h3",{children:q$e()}),h.jsx("p",{className:EM,children:vHe()}),h.jsx(AM,{accept:".tex,.zip",busy:t,prompt:i$e(),onFile:f=>void _(f)}),s&&h.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:s}),e===null?h.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[h.jsx(dn,{})," ",Q$e()]}):o?h.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[z$e()," ",o]}):e.length===0?h.jsx("div",{className:"pt-3 text-sm text-subtext",children:aHe()}):h.jsx("div",{className:"flex flex-col mt-1",children:e.map(f=>h.jsx(Zpt,{template:f,onChanged:c,onError:a},f.name))})]})}function emt(){return h.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:[h.jsx("h1",{children:M$e()}),h.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:m$e()}),h.jsx(Qpt,{}),h.jsx(Jpt,{})]})}const tmt="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function hl({active:e,label:n,icon:t,shimmer:r=!1,preview:s=!1,onSelect:a,onPromote:o,onClose:l}){return h.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-24 [&: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?tmt:""}`,onClick:a,onDoubleClick:o,title:s?vFe({label:n}):n,"aria-label":s?_Fe({label:n}):n,children:[t,h.jsx("span",{className:"tab-label","data-label":n,children:h.jsx("span",{className:r?"tool-running-shimmer":"",children:n})}),h.jsx("span",{role:"button",className:"tab-close",title:mre(),onClick:c=>{c.stopPropagation(),l()},children:h.jsx(_s,{size:12})})]})}const yC=["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 nmt({owner:e,repo:n,branch:t}){return!e||!n?h.jsx("span",{className:yC,children:h.jsx("code",{children:t})}):h.jsxs("a",{className:yC,href:qp(e,n,t),target:"_blank",rel:"noopener noreferrer",title:ep({name:Te(t)}),children:[h.jsx("code",{children:t}),h.jsx(gm,{size:12})]})}const sb=["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(" "),wC=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function SC(e){return new Date(e).toLocaleString(N(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function kC(e,n){return op((e.endedAt??n)-e.createdAt)}function rmt({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:a}){const o=r[0]??null,l=r.some(_=>_.status==="running"||_.status==="starting"),[c,d]=M.useState(()=>Date.now());return M.useEffect(()=>{if(!l)return;d(Date.now());const _=window.setInterval(()=>d(Date.now()),1e3);return()=>window.clearInterval(_)},[l]),h.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:h.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:[h.jsxs("header",{className:"experiment-overview-head flex items-start justify-between gap-6",children:[h.jsxs("div",{className:"experiment-overview-heading min-w-0",children:[h.jsx("h1",{children:e.title||e.slug}),h.jsx("div",{className:"experiment-overview-slug mt-[5px] text-muted text-sm",children:e.slug})]}),h.jsx(bo,{status:o?Li(o):"idle"})]}),h.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[o&&h.jsxs(Qe,{...gr(_=>s(o.id,_)),children:[h.jsx(Yu,{size:15}),rce()]}),h.jsxs(Qe,{...gr(a),children:[h.jsx(Pp,{size:15}),Ale()]})]}),e.description&&h.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:[h.jsx("h2",{children:Ple()}),h.jsx(Na,{text:e.description})]}),h.jsxs("section",{className:sb,children:[h.jsx("h2",{children:o?Cle():bce()}),o&&h.jsxs(h.Fragment,{children:[h.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:[h.jsx(bo,{status:Li(o)}),h.jsx(i4,{backend:o.backend}),h.jsxs("span",{title:pce(),children:[h.jsx(AWe,{size:13}),SC(o.createdAt)]}),h.jsxs("span",{title:Gle(),children:[h.jsx(VWe,{size:13}),kC(o,c)]}),o.commitSha&&h.jsxs("span",{title:Rle(),children:[h.jsx(xKe,{size:14}),h.jsx("code",{children:o.commitSha.slice(0,7)})]}),o.exitCode!==null&&o.exitCode!==void 0&&o.exitCode!==0&&h.jsxs("span",{children:[Yle()," ",o.exitCode]})]}),o.command&&h.jsxs("code",{className:wC,children:["$ ",o.command]}),o.resultMarkdown&&h.jsx("div",{className:`experiment-overview-result mt-4 [&.failed]:text-accent-red ${o.status==="failed"?"failed":""}`,children:h.jsx(Na,{text:o.resultMarkdown})})]})]}),h.jsxs("section",{className:sb,children:[h.jsx("h2",{children:"Git"}),h.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:[h.jsx(nmt,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&h.jsxs("span",{children:[Jle()," ",h.jsx("code",{children:n.slug})]}),h.jsxs("span",{title:SC(e.createdAt),children:[Ile()," ",Ea(e.createdAt)]})]}),e.runCommand!==(o==null?void 0:o.command)&&h.jsxs("code",{className:wC,children:["$ ",e.runCommand]})]}),r.length>0&&h.jsxs("section",{className:sb,children:[h.jsx("h2",{children:dce()}),h.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)=>h.jsxs("button",{...gr(m=>s(_.id,m)),children:[h.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[oce()," ",r.length-f]}),h.jsx(bo,{status:Li(_)}),h.jsx("span",{children:Ea(_.createdAt)}),h.jsx("span",{children:kC(_,c)}),h.jsx(Yu,{size:13})]},_.id))})]})]})})}function CC(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}=a4(t,!0);let a=!1,o=0,l=!1,c=!1;async function d(){if(l){c=!0;return}l=!0;try{for(;;){const f=await HYe(e,o);if(a)return;if(f.dataBase64&&r.write(CC(f.dataBase64)),o=f.nextOffset,f.eof)break}}catch{}finally{l=!1,c&&!a&&(c=!1,d())}}const _=yZe(e,f=>{if(a)return;const m=CC(f.dataBase64);!l&&f.offset===o?(r.write(m),o+=m.length):f.offset+m.length>o&&d()});return d(),()=>{a=!0,_(),s()}},[e]),h.jsx("div",{ref:n,className:"h-full w-full"})}function imt({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:a,parentExperiment:o,onOpenView:l,onOpenCode:c}){const d=r.filter(_=>_.experimentId===e.id).sort((_,f)=>f.createdAt-_.createdAt);return t==="overview"?h.jsx(rmt,{experiment:e,parentExperiment:o,project:n,runs:d,onOpenLogs:(_,f)=>l("terminal",_,f),onOpenCode:_=>c("files",_)}):h.jsx(amt,{experiment:e,expRuns:d,selectedRunId:s,onSelectRun:a})}function amt({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,a]=M.useState(null),[o,l]=M.useState(null),[c,d]=M.useState(!1),_=M.useRef(null),f=t&&n.find(v=>v.id===t)||n[0]||null,m=(f==null?void 0:f.status)==="running"||(f==null?void 0:f.status)==="starting",g=!!(f&&m&&(f.cancelRequested||o===f.id)),S=v=>{const x=n.findIndex(y=>y.id===v);return x===-1?n.length:n.length-x},k=M.useRef(null);M.useEffect(()=>{if(k.current===null){k.current=new Set(n.map(x=>x.id));return}const v=n.find(x=>!k.current.has(x.id));for(const x of n)k.current.add(x.id);v&&r(v.id)},[n,r]),M.useEffect(()=>{if(!c)return;const v=x=>{var y;(y=_.current)!=null&&y.contains(x.target)||d(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[c]);async function b(){if(f){a(null),l(f.id);try{await _N(f.id)}catch(v){l(null),a(v instanceof Error?v.message:String(v))}}}return h.jsxs("div",{className:"term-view absolute inset-0 flex flex-col bg-background z-20",children:[h.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:[h.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}),h.jsx("span",{className:"flex-1"}),s&&h.jsx("span",{className:"error",role:"alert",children:s}),m&&h.jsxs(Qe,{size:"small",variant:"ghost",disabled:g,onClick:()=>void b(),children:[h.jsx(JE,{size:13}),g?Wre():dE()]}),n.length>0&&f&&h.jsxs("div",{className:"run-history relative shrink-0",ref:_,children:[h.jsxs(Qe,{title:Uoe(),"aria-expanded":c,onClick:()=>d(v=>!v),children:[h.jsxs("span",{children:[o7()," ",S(f.id)]}),h.jsx(bo,{status:g?"cancelling":Li(f)}),h.jsx(ta,{size:14,className:"run-picker-chev text-muted shrink-0"})]}),c&&h.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=>h.jsxs(Zr,{className:"justify-start",active:v.id===(f==null?void 0:f.id),onClick:()=>{r(v.id),d(!1)},children:[h.jsxs("span",{className:"font-medium",children:[o7()," ",S(v.id)]}),h.jsx(bo,{status:Li(v)}),h.jsx("span",{className:"ms-auto text-xs text-muted",children:Ea(v.createdAt)})]},v.id))})]})]}),h.jsx("div",{className:"term-fill flex-1 min-h-0 bg-terminal pt-1 pe-0 pb-1 ps-1.5",children:f?h.jsx(smt,{runId:f.id},f.id):h.jsx("div",{className:"term-empty h-full flex items-center justify-center p-6 text-center text-sm text-muted",children:Ooe()})})]})}function omt({projectId:e,filePath:n,sessionId:t,enabled:r,ready:s,source:a}){const[o,l]=M.useState(void 0),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState(!1),[S,k]=M.useState(null),[b,v]=M.useState(null),[x,y]=M.useState(!1),[C,A]=M.useState(null),[E,j]=M.useState(null),[T,D]=M.useState(!1),[I,P]=M.useState(0),B=M.useCallback(Z=>{D(Z),Z&&P(J=>J+1)},[]),F=M.useRef(a);F.current=a,M.useEffect(()=>{if(!r)return;let Z=!1;return WYe().then(J=>{Z||(l(J.engine),d(J.hint),f(J.installCommand))}).catch(()=>{Z||l(null)}),()=>{Z=!0}},[r]);const V=M.useRef(!1),X=M.useCallback(()=>{if(V.current)return;V.current=!0,g(!0);const Z=F.current;j(null),v(null),A(null),KYe(e,n,{sessionId:t}).then(J=>{var L,H;const $=J.pdfPath;if(J.ok&&$){k(Y=>({path:$,version:((Y==null?void 0:Y.version)??0)+1,source:Z})),y(J.hadErrors),A(J.note),J.hadErrors&&v(((L=J.log)==null?void 0:L.trim())||null),B(!0);return}k(null),y(!1),A(J.note),D(!1),v(((H=J.log)==null?void 0:H.trim())||j0e())}).catch(J=>{k(null),y(!1),A(null),D(!1),j(J instanceof Error?J.message:String(J))}).finally(()=>{V.current=!1,g(!1)})},[e,n,t,B]),W=M.useRef(null);return M.useEffect(()=>{!r||!s||!o||W.current!==n&&(W.current=n,X())},[r,s,o,n,X]),{engine:o,installHint:c,installCommand:_,compiling:m,compiled:S,stale:S!==null&&S.source!==a,log:b,builtWithErrors:x,note:C,error:E,showPdf:T,setShowPdf:B,viewNonce:I,compile:X,dismiss:()=>{j(null),v(null)}}}const lmt=3e4;function cmt({projectId:e,filePath:n,sessionId:t,enabled:r,savedSource:s,dirty:a,onPulled:o}){const[l,c]=M.useState(!1),[d,_]=M.useState(null),[f,m]=M.useState(!1),[g,S]=M.useState(!1),[k,b]=M.useState(null),[v,x]=M.useState(null),[y,C]=M.useState(!1),A=M.useCallback(B=>{c(B.hasToken),_(B.link)},[]);M.useEffect(()=>{let B=!1;if(m(!1),_(null),b(null),x(null),C(!1),D.current=!1,!!r)return ZYe(e,n,{sessionId:t}).then(F=>{B||A(F)}).catch(F=>{B||x(F instanceof Error?F.message:String(F))}).finally(()=>{B||m(!0)}),()=>{B=!0}},[r,e,n,t,A]),M.useEffect(()=>{C(!1)},[s]);const E=M.useRef(!1),j=M.useRef(o);j.current=o;const T=M.useRef(a);T.current=a;const D=M.useRef(!1),I=M.useCallback(B=>E.current||T.current?!1:(E.current=!0,S(!0),x(null),eXe(e,n,{sessionId:t,resolve:B}).then(F=>{D.current=!1,b(F),F.pulled.includes(n)&&(T.current?C(!0):j.current(F.pulled))}).catch(F=>{D.current=!0,b(null),x(F instanceof Error?F.message:String(F))}).finally(()=>{E.current=!1,S(!1)}),!0),[e,n,t]),P=M.useRef(null);return M.useEffect(()=>{if(!r||!f||!d||a)return;const B=`${n}:${d.projectId}:${s}`;P.current!==B&&I()&&(P.current=B)},[r,f,d,n,s,a,g,I]),M.useEffect(()=>{if(!r||!f||!d||a)return;const B=setInterval(()=>{E.current||D.current||tXe(e,n,{sessionId:t}).then(F=>{F.remoteChanged&&I()}).catch(F=>{D.current=!0,x(F instanceof Error?F.message:String(F))})},lmt);return()=>clearInterval(B)},[r,f,d,a,e,n,t,I]),{hasToken:l,link:d,loaded:f,syncing:g,last:k,error:v,blocked:a,staleOnDisk:y,reloaded:()=>C(!1),uploadUrl:nXe(e,n,{sessionId:t}),saveToken:async B=>{const F=await pN(B);c(F.hasToken)},linkProject:async B=>{A(await QYe(e,n,{project:B,sessionId:t}))},unlink:async()=>{A(await JYe(e,n,{sessionId:t})),P.current=null,D.current=!1,b(null),x(null)},sync:B=>{D.current=!1,I(B)},dismiss:()=>{D.current=!1,x(null)}}}function jM(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function EC(e,n,t=!1){const r=n.indexOf("#"),s=r===-1?n:n.slice(0,r),a=r===-1?"":n.slice(r),o=s.indexOf("?"),l=o===-1?s:s.slice(0,o),c=o===-1?"":s.slice(o+1);let d;try{d=decodeURI(l)}catch{return null}if(!d||d.includes("\0"))return null;const _=d.startsWith("/"),f=_?[]:e.split("/").filter(Boolean);for(const m of d.split("/"))if(!(!m||m===".")){if(m===".."){if(f.length===0)return null;f.pop();continue}f.push(m)}return f.length===0?null:{path:`${t&&(_||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:a}}function umt(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function dmt({value:e,onChange:n,onSave:t,onBlur:r,path:s,highlightLine:a,scrollRequest:o,onScrollRequestHandled:l}){const c=M.useMemo(()=>MT(e,Ay(s)),[e,s]),{ruleCh:d,codeCh:_}=pM(c.length),f=M.useRef(null),m=M.useRef(null),g=()=>{const b=f.current;b&&m.current&&(m.current.scrollTop=b.scrollTop)};M.useLayoutEffect(g,[e]),M.useLayoutEffect(()=>{var A;const b=f.current;if(!b||!a)return;const v=e.split(` +`),x=Math.min(Math.max(Math.trunc(a),1),v.length);let y=0;for(let E=0;E{if((b.metaKey||b.ctrlKey)&&b.key.toLowerCase()==="s"){b.preventDefault(),t();return}if(b.key==="Tab"){b.preventDefault();const v=b.currentTarget,{selectionStart:x,selectionEnd:y}=v,C=e.slice(0,x)+" "+e.slice(y);n(C),requestAnimationFrame(()=>{v.selectionStart=v.selectionEnd=x+1})}},k=`absolute inset-0 m-0 py-3.5 pe-4 ${kp} ${hM} [scrollbar-gutter:stable]`;return h.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${kp}`,children:[h.jsx("div",{className:"absolute start-0 top-0 bottom-0 border-e border-e-border-variant pointer-events-none",style:{width:`${d}ch`},"aria-hidden":"true"}),h.jsx("div",{ref:m,className:`file-view-code ${k} overflow-hidden pointer-events-none`,"aria-hidden":"true",children:c.map((b,v)=>h.jsxs("div",{"data-line":v+1,className:"relative",style:{paddingInlineStart:`${_}ch`},children:[h.jsx("span",{className:`${_M} absolute start-0 pe-[1ch]`,style:{width:`${d}ch`},children:v+1}),RT(b)?h.jsx("br",{}):b]},v))}),h.jsx("textarea",{ref:f,className:`file-view-editarea ${k} overflow-y-auto overflow-x-hidden resize-none border-0 bg-transparent text-transparent caret-text outline-none`,style:{paddingInlineStart:`${_}ch`},value:e,onChange:b=>n(b.target.value),onScroll:g,onKeyDown:S,onBlur:r,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}const NC=[{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"]}],fmt=4e6,hmt=200,zC=16e6,_mt=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)}),AC=e=>e.startsWith("//")?`https:${e}`:e;async function pmt(e,n){var s;let t=fmt;const r=new Map;for(const{element:a,attribute:o,url:l,typePrefixes:c}of e){if(r.has(l)){const S=r.get(l);S&&a.setAttribute(o,S);continue}if(n.aborted)return;if(r.size>=hmt)continue;r.set(l,null);const d=await fetch(l,{signal:n}).catch(()=>null);if(!(d!=null&&d.ok))continue;const _=d.headers.get("content-type")??"",f=Number(d.headers.get("content-length"));if(!c.some(S=>_.startsWith(S))||!(Number.isFinite(f)&&f>0&&f<=t)){await((s=d.body)==null?void 0:s.cancel().catch(()=>{}));continue}const m=await d.blob().catch(()=>null),g=m&&await _mt(m);!m||!g||(t-=m.size,r.set(l,g),a.setAttribute(o,g))}}async function mmt(e,n,t){var o;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const l of r.querySelectorAll(NC.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:d,typePrefixes:_}of NC){if(!l.matches(c))continue;const f=l.getAttribute(d);if(!f)continue;const m=n(f);m&&(m===f?l.setAttribute(d,AC(f)):s.push({element:l,attribute:d,url:m,typePrefixes:_}))}await pmt(s,t);for(const l of r.querySelectorAll("a[href]")){const c=l.getAttribute("href");!c||!jM(c)||(l.setAttribute("href",AC(c)),l.setAttribute("target","_blank"),l.setAttribute("rel","noopener noreferrer"))}const a=((o=r.querySelector("base[href]"))==null?void 0:o.getAttribute("href"))??"";if(!/^https?:\/\//i.test(a)){const l=r.createElement("base");l.setAttribute("href","about:srcdoc"),r.head.prepend(l)}return`${r.doctype?``:""}${r.documentElement.outerHTML}`}async function gmt(e,n,t,r){var l;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${zC-1}`}}).catch(()=>null),a=s!=null&&s.ok?await s.text().catch(()=>null):null;if(a===null)return{text:e,partial:!0};const o=Number((l=s==null?void 0:s.headers.get("content-range"))==null?void 0:l.split("/").pop());return{text:a,partial:Number.isFinite(o)&&o>zC}}function vmt({html:e,truncated:n,url:t,name:r,resolveSrc:s}){const[a,o]=M.useState(null);return M.useEffect(()=>{let l=!1;const c=new AbortController;return o(null),gmt(e,n,t,c.signal).then(async({text:d,partial:_})=>({source:await mmt(d,s,c.signal),partial:_})).then(d=>{l||o(d)}),()=>{l=!0,c.abort()}},[e,n,t,s]),a===null?h.jsxs("div",{className:"file-view-note flex items-center gap-2 py-2.5 px-4 text-sm text-muted",children:[h.jsx(dn,{})," ",_E()]}):h.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[a.partial&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-muted",children:xde()}),h.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:kde({name:Te(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:a.source})]})}const S0=e=>ka(new Intl.ListFormat(N()).format(e.map(Te)));function bmt(e){if(e.error)return Hye();if(e.syncing)return vwe();if(e.blocked)return SE();const n=e.last;return n?n.pulled.length&&n.pushed.length?G4e({pulled:S0(n.pulled),pushed:S0(n.pushed)}):n.pulled.length?P4e({paths:S0(n.pulled)}):n.pushed.length?Y4e({paths:S0(n.pushed)}):n.conflicts.length?Qye():wE():I4e()}function TC({href:e}){return h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:A4e()})}function xmt({overleaf:e}){var m,g;const[n,t]=M.useState(""),[r,s]=M.useState(!1),[a,o]=M.useState(null),[l,c]=M.useState(!1),d=()=>{t(""),o(null),c(!0)},_=!e.hasToken||l;async function f(S){S.preventDefault();const k=n.trim();if(!(r||!k)){s(!0),o(null);try{_?(await e.saveToken(k),c(!1)):await e.linkProject(k),t("")}catch(b){o(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!l){const S=((m=e.last)==null?void 0:m.conflicts)??[];return h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-subtext",children:[h.jsx("span",{className:"flex-1 min-w-0",children:bmt(e)}),e.syncing&&h.jsx(dn,{}),h.jsxs("a",{className:"inline-flex items-center gap-1 text-sm text-subtext whitespace-nowrap",href:e.link.url,target:"_blank",rel:"noreferrer",children:[_4e()," ",h.jsx(vc,{size:11})]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,"data-tip":e.blocked?J4e():void 0,onClick:()=>e.sync(),children:y4e()}),h.jsx(Qe,{variant:"ghost",disabled:e.syncing,onClick:()=>void e.unlink().catch(k=>{o(k instanceof Error?k.message:String(k))}),children:C4e()})]}),S.map(k=>h.jsxs("div",{className:"flex items-center flex-wrap gap-2 text-sm text-accent-red",children:[h.jsxs("span",{className:"flex-1 min-w-0",children:[h.jsx("code",{className:"font-mono",children:k})," ",a4e()]}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"keep-local"}),children:u4e()}),h.jsx(Qe,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[k]:"take-overleaf"}),children:R4e()})]},k)),((g=e.last)==null?void 0:g.note)&&h.jsx("div",{className:"text-sm text-accent-amber",children:e.last.note}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(TC,{href:e.uploadUrl}),h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:M7()})]})]})}return h.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[h.jsx("div",{className:"text-sm text-subtext",children:_?wwe():Ewe()}),h.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[h.jsx("input",{className:"flex-1 min-w-55 text-sm",type:_?"password":"text",value:n,onChange:S=>t(S.target.value),placeholder:_?Rye():"https://www.overleaf.com/project/…",autoComplete:"off"}),h.jsx(Qe,{type:"submit",disabled:r||!n.trim(),children:r?_?Ta():Op():_?awe():qye()}),h.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:_?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:_?Aye():Kye()})]}),a&&h.jsx("div",{className:"text-sm text-accent-red whitespace-pre-wrap",children:a}),h.jsxs("div",{className:"flex items-center flex-wrap gap-3",children:[h.jsx(TC,{href:e.uploadUrl}),l?h.jsx(Qe,{variant:"ghost",type:"button",onClick:()=>c(!1),children:n4e()}):e.hasToken&&h.jsx(Qe,{variant:"ghost",type:"button",onClick:d,children:M7()})]})]})}function ymt({command:e}){const[n,t]=M.useState("idle"),r=M.useRef(null),s=async()=>{try{await navigator.clipboard.writeText(e),t("copied"),setTimeout(()=>t("idle"),1500)}catch{const a=r.current;if(a){const o=document.createRange();o.selectNodeContents(a);const l=window.getSelection();l==null||l.removeAllRanges(),l==null||l.addRange(o)}t("select"),setTimeout(()=>t("idle"),4e3)}};return h.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[h.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}),h.jsx(Jt,{"data-tip":n==="copied"?tp():n==="select"?Afe():Oue(),"aria-label":Hue(),onClick:()=>void s(),children:n==="copied"?h.jsx(Ys,{size:13}):h.jsx(Hp,{size:13})})]})}function wmt({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:a,branchLabel:o,onOpenFile:l,scrollPosition:c,onScrollPositionChange:d,lineScrollRequest:_,onLineScrollRequestHandled:f,onEdit:m}){var mn;const[g,S]=M.useState(null),[k,b]=M.useState(null),[v,x]=M.useState(!0),[y,C]=M.useState(0),A=t==="artifacts",E=t==="abs",j=C4(n),T=cM(n),D=jpt(n),I=j||D,[P,B]=M.useState(!1),[F,V]=M.useState(""),[X,W]=M.useState(!1),[Z,J]=M.useState(null),$=M.useRef(null),L=M.useRef(c),H=(g==null?void 0:g.file)??null,Y=(g==null?void 0:g.source)==="checkout"?g.file.path:n,G=Y.split("/").slice(0,-1).join("/"),ee=(g==null?void 0:g.source)==="artifact",oe=M.useCallback(Xe=>{var xt;return((xt=EC(G,Xe,E))==null?void 0:xt.path)??null},[E,G]),he=M.useCallback(Xe=>E?qYe(Xe):ee?wh(e,Xe):Q7(e,Xe,{sessionId:r,ref:s}),[ee,s,E,e,r]),ie=M.useCallback(Xe=>{if(jM(Xe))return Xe;const xt=EC(G,Xe,E);return xt?umt(he(xt.path),xt):null},[E,G,he]),q=gM(H==null?void 0:H.presentation),ne=(g==null?void 0:g.source)==="artifact"&&!A,le=A&&(g==null?void 0:g.source)==="checkout",ge=!s&&(g==null?void 0:g.source)==="checkout"&&H!=null&&!H.notFound,ue=r!=null&&(g==null?void 0:g.source)==="checkout"&&g.file.root==="clone",Ce=ge&&H!=null&&!H.binary&&!H.truncated&&!q&&!ue,Ee=M.useMemo(()=>((H==null?void 0:H.content)??"").replace(/\r\n/g,` +`),[H==null?void 0:H.content]),Le=Ce&&F!==Ee,Pe=M.useRef(null);M.useEffect(()=>{const Xe=(H==null?void 0:H.content)??"";if(Pe.current!==null&&Xe===Pe.current){Pe.current=null;return}V(Xe.replace(/\r\n/g,` +`)),J(null)},[H==null?void 0:H.content,n]);const Ve=async()=>{if(!Ce||H==null||!Le||X)return!Le;const Xe=H.content.includes(`\r `)?F.replace(/\n/g,`\r -`):F;W(!0),J(null);try{return await AYe(e,K,Ye,{sessionId:r}),Pe.current=Ye,S(xt=>xt&&xt.source==="checkout"?{source:"checkout",file:{...xt.file,content:Ye}}:xt),!0}catch(xt){return J(xt instanceof Error?xt.message:String(xt)),!1}finally{W(!1)}},ft=T&&ge&&!ue,Be=Ppt({projectId:e,filePath:K,sessionId:r,enabled:ft,ready:$!=null&&!$.notFound,source:Ce?F:($==null?void 0:$.content)??""}),wt=Upt({projectId:e,filePath:K,sessionId:r,enabled:ft,savedSource:Ee,dirty:Le,onPulled:M.useCallback(Ye=>{Ye.includes(K)&&C(xt=>xt+1)},[K])}),[At,vt]=M.useState(!1),Ot=((mn=wt.last)==null?void 0:mn.conflicts.length)??0;M.useEffect(()=>{Ot>0&&vt(!0)},[Ot]);const St=wt.error?nwe():Ot>0?hye():wt.blocked?gE():wt.link?mE():Q4e(),kt=wt.error||Ot>0?"text-accent-red":wt.link?"text-accent-green":void 0,xe=T&&Be.showPdf&&Be.compiled!=null,je=Ce&&!(I&&!P)&&!xe,We=Be.compiled?`${W7(e,Be.compiled.path,{sessionId:r})}&v=${Be.compiled.version}`:null,st=We?`${We}&view=${Be.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,nt=Be.compiled?Be.compiled.path.split("/").pop()??Be.compiled.path:null,Ht=async()=>{Le&&!await Ve()||T&&Be.engine&&Be.compile()},bt=async()=>{Le&&await Ht()},[nn,Wt]=M.useState(!1),[pn,Lt]=M.useState(null),En=async()=>{Wt(!0),Lt(null);try{await TYe(e,K,{sessionId:r})}catch(Ye){Lt(Ye instanceof Error?Ye.message:String(Ye))}finally{Wt(!1)}},Ft=`${he(K)}&v=${y}`;M.useEffect(()=>{let Ye=!1;x(!0);const xt=async()=>{const Nt=await mXe(e,n),rt=(Nt==null?void 0:Nt.presentation)==="text"||(Nt==null?void 0:Nt.presentation)==="unknown",Ie=Nt&&rt?await hN(e,n):null,it=Nt===null||rt&&Ie===null;return{path:n,content:(Ie==null?void 0:Ie.content)??"",truncated:(Ie==null?void 0:Ie.truncated)??!1,binary:(Ie==null?void 0:Ie.binary)??(Nt==null?void 0:Nt.presentation)==="download",notFound:it,presentation:Ie?Ie.binary?"download":"text":(Nt==null?void 0:Nt.presentation)??"download"}},Wn=async()=>{for(const Nt of[`artifacts/${n}`,n]){const rt=await V7(e,Nt,{sessionId:r}).catch(()=>null);if(rt&&!rt.notFound)return rt}return null};return(E?NYe(n).then(Nt=>({source:"absolute",file:Nt})):A?xt().then(async Nt=>{if(!Nt.notFound)return{source:"artifact",file:Nt};const rt=await Wn();return rt?{source:"checkout",file:rt}:{source:"artifact",file:Nt}}):V7(e,n,{sessionId:r,ref:s}).then(Nt=>Nt.notFound&&!s?xt().then(rt=>rt.notFound?{source:"checkout",file:Nt}:{source:"artifact",file:rt,checkoutRoot:Nt.root}):{source:"checkout",file:Nt})).then(Nt=>{Ye||(S(Nt),b(null))}).catch(Nt=>{Ye||b(Nt.message)}).finally(()=>{Ye||x(!1)}),()=>{Ye=!0}},[e,n,t,r,s,y]),M.useLayoutEffect(()=>{const Ye=B.current,xt=L.current;!Ye||!$||!xt||(Ye.scrollTop=xt.top,Ye.scrollLeft=xt.left)},[$]);const br=Ye=>{if(Ye.source==="absolute")return jde();if(A)return Sde({root:r?V_():G_()});if(s)return Nde({branch:Ae(s)});if(r&&Ye.source==="checkout"&&Ye.file.root==="clone")return Ufe();const xt=Ye.source==="checkout"?Ye.file.root:Ye.checkoutRoot;return Lde({root:xt==="worktree"?V_():G_()})};return h.jsxs("div",{className:"file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"file-view-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant text-text shrink-0",children:[h.jsx(Vu,{size:13,className:"shrink-0"}),h.jsx("code",{className:"file-view-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:K,children:K}),o&&h.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 shrink-0 [&_svg]:flex-none",title:uO({branch:Ae(o)}),children:[h.jsx(Ip,{size:11}),o]}),je&&(X||Le||Z)&&h.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${Z?"text-accent-red":"text-muted"}`,title:Z??(X?ja():$fe()),children:X?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",hfe()]}):Z?cfe():Lfe()}),T&&Be.compiled&&h.jsx(Jt,{active:!Be.showPdf,"data-tip":Be.stale&&Be.showPdf?Xde():Be.showPdf?zu():l7(),"data-tip-align":"end","aria-label":Be.showPdf?zu():l7(),onClick:()=>Be.setShowPdf(!Be.showPdf),children:Be.showPdf?h.jsx(wb,{size:13}):h.jsx(Vu,{size:13,className:Be.stale?"text-accent-amber":void 0})}),T&&We&&nt&&h.jsx(Fp,{"data-tip":Be.stale?Xue({name:Ae(nt)}):v6({name:Ae(nt)}),"data-tip-align":"end","aria-label":v6({name:Ae(nt)}),href:We,download:nt,children:h.jsx(PWe,{size:13,className:Be.stale?"text-accent-amber":void 0})}),ft&&h.jsx(Jt,{active:At,"data-tip":St,"data-tip-align":"end","aria-label":LI({status:St}),"aria-expanded":At,onClick:()=>vt(Ye=>!Ye),children:wt.syncing?h.jsx(dn,{}):h.jsx(DWe,{size:13,className:kt})}),T&&ge&&h.jsx(Jt,{"data-tip":Be.compiled?a7():r7(),"data-tip-align":"end","aria-label":Be.compiled?a7():r7(),disabled:Be.compiling||!Be.engine,onClick:()=>void Ht(),children:Be.compiling?h.jsx(dn,{}):h.jsx(VWe,{size:13})}),I&&h.jsx(Jt,{active:P,"data-tip":P?X0():zu(),"data-tip-align":"end","aria-label":P?X0():zu(),onClick:()=>H(Ye=>!Ye),children:h.jsx(wb,{size:13})}),ge&&h.jsx(Jt,{"data-tip":pn??i7(),"data-tip-align":"end","aria-label":i7(),disabled:nn,onClick:()=>void En(),children:nn?h.jsx(dn,{}):h.jsx(gc,{size:13})}),h.jsx(Jt,{"data-tip":o7(),"data-tip-align":"end","aria-label":o7(),onClick:()=>C(Ye=>Ye+1),children:v?h.jsx(dn,{}):h.jsx(tN,{size:13})})]}),!k&&le&&(g==null?void 0:g.source)==="checkout"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:$de({root:g.file.root==="worktree"?V_():G_()})}),(Be.error||Be.log)&&h.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:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:`flex-1 min-w-0 text-sm ${Be.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Be.error??(Be.builtWithErrors?xue():hue())}),h.jsx(Jt,{"data-tip":s7(),"data-tip-align":"end","aria-label":$ue(),onClick:Be.dismiss,children:h.jsx(_s,{size:13})})]}),Be.log&&h.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Be.log})]}),ft&&wt.staleOnDisk&&h.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:[h.jsx("span",{className:"flex-1 min-w-0",children:Vde()}),h.jsx(Qe,{onClick:()=>{wt.reloaded(),C(Ye=>Ye+1)},children:Mue()})]}),ft&&wt.error&&h.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4 flex items-start gap-2",children:[h.jsx("span",{className:"flex-1 min-w-0 text-sm text-accent-red whitespace-pre-wrap",children:wt.error}),h.jsx(Jt,{"data-tip":s7(),"data-tip-align":"end","aria-label":Uue(),onClick:wt.dismiss,children:h.jsx(_s,{size:13})})]}),ft&&At&&wt.loaded&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4",children:h.jsx(emt,{overleaf:wt})}),T&&ge&&Be.engine===null&&Be.installHint&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Be.installHint,Be.installCommand&&h.jsx(tmt,{command:Be.installCommand})]}),Be.note&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Be.note}),xe&&Be.stale&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:Nfe()}),h.jsxs("div",{ref:B,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Ye=>{const xt={top:Ye.currentTarget.scrollTop,left:Ye.currentTarget.scrollLeft};L.current=xt,d==null||d(xt)},children:[!je&&!k&&!A&&(g==null?void 0:g.source)==="checkout"&&!g.file.notFound&&!s&&r&&g.file.root==="clone"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:jfe()}),!je&&!k&&(g==null?void 0:g.source)==="artifact"&&!g.file.notFound&&te&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:iue({root:g.checkoutRoot==="worktree"?V_():G_()})}),k?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[ede()," ",Ae(k)]}):$===null?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:lE()}):$.notFound?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:g?br(g):bde()}):q?h.jsx(F2,{kind:q,url:Ft,name:n.split("/").pop()??n}):$.binary?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[cue()," ",h.jsx("a",{href:Ft,download:n.split("/").pop()??n,children:oE()})]}):xe&&st&&nt?h.jsx(F2,{kind:"pdf",url:st,name:nt,downloadBar:!1},st):j&&!P?h.jsx("div",{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:re?h.jsx(cM,{projectId:e,folder:G,markdown:$.content}):h.jsx(za,{text:$.content,resolveFilePath:oe,resolveImageSrc:ie,onOpenFile:l&&((Ye,xt,Wn,Kn,Nt)=>l(Ye,r,s,Nt))})}):D&&!P?h.jsx(Qpt,{html:$.content,truncated:$.truncated,url:Ft,name:K,resolveSrc:ie}):je?h.jsx(Gpt,{value:F,onChange:Ye=>{V(Ye),m==null||m(),Z&&J(null)},onSave:()=>void bt(),onBlur:()=>void bt(),path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}):h.jsxs(h.Fragment,{children:[h.jsx(rM,{text:$.content,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}),$.truncated&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:sde()})]})]})]})}const tb=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function rmt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:a,setOpen:o,ref:l}=Ao(),c=M.useRef(null);return M.useEffect(()=>{if(!a)return;const d=_=>{var f;_.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[a]),h.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[h.jsx(Jt,{className:"project-back text-text","aria-label":c7(),onClick:n,children:h.jsx(Bf,{size:18})}),h.jsxs("div",{className:"project-switcher",ref:l,children:[h.jsxs("button",{ref:c,className:`brand${a?" open":""}`,onClick:()=>o(d=>!d),"aria-expanded":a,children:[h.jsxs("span",{className:"brand-project-copy",children:[h.jsx("span",{className:"brand-project-label",children:c_e()}),h.jsx("span",{className:"brand-project",children:e})]}),h.jsx(ta,{className:"project-chevron",size:14})]}),a&&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 project-menu",children:[h.jsx(Yr,{onClick:()=>{o(!1),r()},children:h.jsxs("span",{className:tb,children:[h.jsx(ZE,{size:14}),Qhe()]})}),h.jsx(Yr,{onClick:()=>{o(!1),n()},children:h.jsxs("span",{className:tb,children:[h.jsx(lKe,{size:14}),c7()]})}),h.jsx(Yr,{onClick:()=>{var d;(d=c.current)==null||d.focus(),o(!1),t()},children:h.jsxs("span",{className:tb,children:[h.jsx(QWe,{size:14}),n_e()]})})]})]}),s&&h.jsx(Jt,{"data-tip":u7(),"data-tip-align":"end","aria-label":u7(),onClick:s,children:h.jsx(JE,{size:15})})]})}function CC(){const e=M.useSyncExternalStore(lZe,Z7,Z7);return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":w7()}),!e&&h.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[h.jsx(VE,{size:13,className:"shrink-0 text-accent-amber"}),h.jsx("span",{dir:"auto",className:"min-w-0",children:w7()})]})]})}const EC=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),nh=["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(" "),NC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),bM=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),zC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),smt=[{id:"AI/ML",label:uve},{id:"Biology",label:_ve},{id:"Physics",label:wve},{id:"Other",label:vve}];function imt({onDone:e,preferredAgent:n}){const[t,r]=M.useState(0),[s,a]=M.useState(null),[o,l]=M.useState(),[c,d]=M.useState(!1),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState([]),[x,y]=M.useState(""),[C,A]=M.useState(""),[E,j]=M.useState([]),[T,D]=M.useState(""),[I,P]=M.useState([]),[H,F]=M.useState(!1),V=M.useRef(0),[X,W]=M.useState(!1),[Z,J]=M.useState(!1),B=(s==null?void 0:s.some(q=>q.agentReady))??!1,L=o!=null,$=M.useRef(0),K=(q,te=!1)=>{const le=++$.current;k(!0),W(!1),J(!1),l(void 0);const ge=()=>le===$.current;Promise.allSettled([ep(q,te).then(ue=>ge()&&a(ue)),aN().then(ue=>ge()&&l(ue.gitVersion))]).then(([ue,Ce])=>{ge()&&(ue.status==="rejected"&&(W(!0),a(null)),Ce.status==="rejected"&&(J(!0),l(void 0)))}).finally(()=>ge()&&k(!1))};M.useEffect(()=>K(!1),[]),M.useEffect(()=>{if(s===null)return;const q=s.filter(te=>te.agentReady);g(te=>{var ge;if(te&&q.some(ue=>ue.id===te))return te;const le=n&&q.find(ue=>ue.id===n.harness);return(le==null?void 0:le.id)??((ge=q[0])==null?void 0:ge.id)??null})},[s,n]),M.useEffect(()=>Dx(()=>{ep(!0).then(q=>{a(q),W(!1)}).catch(()=>W(!0))}),[]),M.useEffect(()=>{gXe().then(q=>{v(q.researchAreas),y(q.otherArea??""),A(q.background??""),j(q.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const q=T.trim();if(q.length<3){P([]),F(!1);return}const te=++V.current;F(!0);const le=setTimeout(()=>{oN(q).then(ge=>te===V.current&&P(ge)).catch(()=>te===V.current&&P([])).finally(()=>te===V.current&&F(!1))},350);return()=>clearTimeout(le)},[T]);const G=q=>{const te=E.some(le=>le.paperId===q.paperId);j(le=>le.some(ge=>ge.paperId===q.paperId)?le:[...le,{paperId:q.paperId,title:AC(q.title)}]),D(""),P([]),te||kb(q.paperId).then(le=>{var ue;const ge=(ue=le.title)==null?void 0:ue.trim();ge&&j(Ce=>Ce.map(Ee=>Ee.paperId===q.paperId?{...Ee,title:ge}:Ee))}).catch(()=>{})},re=q=>j(te=>te.filter(le=>le.paperId!==q)),oe=q=>{v(te=>te.includes(q)?te.filter(le=>le!==q):[...te,q])},he=b.length>0&&(!b.includes("Other")||x.trim().length>0),ie=async()=>{const q=s==null?void 0:s.find(le=>le.id===m&&le.agentReady);if(!q||c)return;const te=omt(q);d(!0),f(null);try{const le=await hYe(te,{researchAreas:b,otherArea:b.includes("Other")?x:null,background:C||null,papers:E});e(le.project,le.selection)}catch(le){f(le instanceof Error?le.message:String(le))}finally{d(!1)}};return h.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${t===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:h.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${t===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:t===0?h.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:[h.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[h.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:h.jsx(Y1,{})}),h.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:J1e()})]}),h.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[h.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),h.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:obe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Lxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Bbe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:pxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Ebe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:iye()})]})})]})]}),h.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:h.jsxs(Qe,{variant:"primary",size:"large",onClick:()=>r(1),children:[k7()," ",h.jsx(A0,{size:20})]})})]}):t===1?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(Y1,{}),h.jsx("span",{children:bxe()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Pve()}),h.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:u2e()}),s!==null&&!B&&h.jsx("p",{className:EC,children:oxe()}),s!==null&&B&&m===null&&h.jsx("p",{className:EC,children:Gve()}),h.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:s!==null?s.map(q=>h.jsx(cmt,{h:q,selected:m===q.id,onSelect:()=>g(q.id)},q.id)):X?h.jsx("div",{className:nh,children:E7()}):h.jsxs(vr,{className:"py-2",children:[h.jsx(dn,{})," ",vbe()]})}),(o===null||Z)&&h.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[h.jsx(umt,{gitVersion:o,error:Z}),Z?h.jsx("p",{className:NC,children:E7()}):h.jsx("p",{className:NC,children:Dbe()})]}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(0),children:[h.jsx(Bf,{size:12})," ",S7()]}),(X||Z||o===null||s!==null&&!B)&&h.jsxs(Qe,{variant:"ghost",onClick:()=>K(!0,!0),disabled:S,children:[h.jsx(ld,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",v2e()]}),h.jsx("div",{className:"flex-1"}),h.jsxs(Qe,{variant:"primary",onClick:()=>r(2),disabled:S||!B||m===null||!L,title:S?Zxe():B?m===null?rbe():Z?E2e():o===void 0?Wxe():o===null?Vbe():void 0:rxe(),children:[k7()," ",h.jsx(A0,{size:13})]})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(Y1,{}),h.jsx("span",{children:Sxe()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:Nxe()}),h.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:h.jsxs("div",{className:bM,children:[h.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:[h.jsx("legend",{children:tye()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Jve()}),h.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:smt.map(q=>h.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:[h.jsx("input",{type:"checkbox",checked:b.includes(q.id),onChange:()=>oe(q.id),disabled:c}),h.jsx("span",{children:q.label()})]},q.id))}),b.includes("Other")&&h.jsx("input",{className:"onb-other-area w-full mt-2",value:x,onChange:q=>y(q.target.value),disabled:c,placeholder:jxe(),"aria-label":_2e()})]}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:D2e()}),h.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:C,onChange:q=>A(q.target.value),disabled:c,rows:4,placeholder:wbe()}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:T2e()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:rve()}),h.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[h.jsx("input",{id:"onb-paper-search",value:T,onChange:q=>D(q.target.value),disabled:c,placeholder:P2e()}),H?h.jsx("div",{className:nh,children:G2e()}):I.length>0?h.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:I.map(q=>h.jsxs("button",{type:"button",onClick:()=>G(q),disabled:c,children:[h.jsx(Xf,{children:AC(q.title)}),h.jsx("span",{className:"id",children:q.paperId})]},q.paperId))}):null]}),E.length>0&&h.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:E.map(q=>h.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:[h.jsx(Xf,{children:q.title||q.paperId}),h.jsx("span",{className:"id",children:q.paperId}),h.jsx("button",{type:"button","aria-label":WI({name:Ae(q.paperId)}),onClick:()=>re(q.paperId),disabled:c,children:h.jsx(_s,{size:12})})]},q.paperId))})]})}),!he&&h.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:b.length===0?Yve():_be()}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(1),disabled:c,children:[h.jsx(Bf,{size:12})," ",S7()]}),h.jsx("div",{className:"flex-1"}),h.jsx(Qe,{variant:"primary",onClick:()=>void ie(),disabled:c||m===null||!he,children:c?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",J2e()]}):h.jsxs(h.Fragment,{children:[Tbe()," ",h.jsx(A0,{size:13})]})})]}),m===null&&h.jsx("p",{className:zC,children:cye()}),_&&h.jsx("p",{className:zC,children:_})]})})})}function AC(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function amt(e){return e.agentReady?{tone:"success",label:dxe()}:e.installed?e.installBroken?{tone:"warning",label:Fbe()}:e.authState==="unknown"?{tone:"warning",label:$xe()}:e.authState==="unsupported"?{tone:"warning",label:Uxe()}:e.installed?{tone:"warning",label:a2e()}:{tone:"neutral",label:C7()}:{tone:"neutral",label:C7()}}function omt(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:Hp(e,n).defaultId}}function lmt({harness:e}){return h.jsx(y2,{harness:e,size:26})}function cmt({h:e,selected:n,onSelect:t}){var c;const r=amt(e),s=n?{tone:"success",label:Y2e()}:r,o=[(c=e.version)==null?void 0:c.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(d=>Z0(d)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),l=h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[h.jsx(lmt,{harness:e.id}),h.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),h.jsx(Bx,{tone:s.tone,children:s.label})]});return e.agentReady?h.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[l,h.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??_E(),e.plan?` · ${e.plan}`:""]}),h.jsx("div",{className:`${nh} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:o,children:o})]}):h.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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:[l,h.jsx("div",{className:nh,children:Th(e.agentNote)})]})}function umt({gitVersion:e,error:n}){return h.jsxs("div",{className:bM,children:[h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsx("span",{className:"onb-card-name font-semibold text-base",children:Xbe()}),h.jsx(Bx,{tone:e?"success":n||e===null?"danger":"warning",children:e?w2e():n?Ave():e===null?pE():Rve()})]}),(e||!n&&e===void 0)&&h.jsx("div",{className:nh,children:e??Ive()})]})}function nb(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function dmt(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 fmt(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 hmt(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function _mt({onCreated:e,onCancel:n}){const[t,r]=M.useState("blank"),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(""),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(null),[b,v]=M.useState(!1),[x,y]=M.useState(!1),[C,A]=M.useState(!1),[E,j]=M.useState(null),[T,D]=M.useState(!1),[I,P]=M.useState(!1),[H,F]=M.useState(void 0),[V,X]=M.useState("research-project"),[W,Z]=M.useState(null),[J,B]=M.useState(!1),[L,$]=M.useState(!1),[K,G]=M.useState(""),[re,oe]=M.useState(null),[he,ie]=M.useState([]),[q,te]=M.useState(!1),[le,ge]=M.useState(""),[ue,Ce]=M.useState(0),Ee=M.useRef(0),Le=M.useRef(0),Pe=M.useRef(0),Ve=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),ft=t==="paper"?fmt(re==null?void 0:re.repoUrl):null,Be=s.trim()?`~/OpenResearch/${nb(s,48)}`:"",wt=`~/OpenResearch/${nb(s||(re==null?void 0:re.title)||(re==null?void 0:re.paperId)||"")}`,At=t==="blank"&&!_?Be:t==="paper"&&re&&!_?wt:c,vt=ft??(t==="folder"&&(m!=null&&m.githubOwner)&&m.githubRepo?{owner:m.githubOwner,repo:m.githubRepo}:null);M.useEffect(()=>{mYe().then(({login:Ie})=>F(Ie)).catch(()=>F(null)),jx().then(Ie=>P(Ie.githubForNewProjects)).catch(()=>{})},[]),M.useEffect(()=>{let Ie=!0;B(!0);const it=setTimeout(()=>{gYe(s.trim()).then(({repo:Ut})=>Ie&&X(Ut)).catch(()=>Ie&&X(nb(s,48))).finally(()=>Ie&&B(!1))},150);return()=>{Ie=!1,clearTimeout(it)}},[s]),M.useEffect(()=>{let Ie=!0;if(Z(null),$(!!vt),!!vt)return vYe(vt.owner,vt.repo).then(({canPush:it})=>{Ie&&it&&Z(`github.com/${vt.owner}/${vt.repo}`)}).catch(()=>{}).finally(()=>Ie&&$(!1)),()=>{Ie=!1}},[vt==null?void 0:vt.owner,vt==null?void 0:vt.repo]),M.useEffect(()=>{const Ie=++Le.current,it=At.trim();if(!it){g(null),k(null),v(!1);return}v(!0),k(null);const Ut=setTimeout(()=>{aN(it).then(en=>{Ie===Le.current&&g(en)}).catch(en=>{Ie===Le.current&&(g(null),k(en instanceof Error?en.message:String(en)))}).finally(()=>{Ie===Le.current&&v(!1)})},200);return()=>clearTimeout(Ut)},[t,ue,At]),M.useEffect(()=>{const Ie=++Ee.current;if(t!=="paper"||re){te(!1);return}const it=K.trim(),Ut=dmt(it);if(!Ut&&it.length<3){ie([]),ge(""),te(!1);return}j(null),te(!0),ie([]),ge("");const en=setTimeout(()=>{if(Ut){kb(Ut).then(Mt=>{var Ln;Ie===Ee.current&&(oe(Mt),o||a(((Ln=Mt.title)==null?void 0:Ln.trim())||Mt.paperId))}).catch(Mt=>Ie===Ee.current&&j(Mt instanceof Error?Mt.message:String(Mt))).finally(()=>Ie===Ee.current&&te(!1));return}oN(it).then(Mt=>{Ie===Ee.current&&(ie(Mt),ge(it))}).catch(Mt=>Ie===Ee.current&&j(Mt instanceof Error?Mt.message:String(Mt))).finally(()=>Ie===Ee.current&&te(!1))},350);return()=>clearTimeout(en)},[t,re,K,o]);async function Ot(Ie){var Ut;const it=++Ee.current;te(!0),j(null);try{const en=await kb(Ie);if(it!==Ee.current)return;oe(en),ie([]),o||a(((Ut=en.title)==null?void 0:Ut.trim())||en.paperId)}catch(en){it===Ee.current&&j(en instanceof Error?en.message:String(en))}finally{it===Ee.current&&te(!1)}}function St(){Ee.current+=1,Pe.current+=1,oe(null),G(""),ie([]),ge(""),te(!1),y(!1),d(""),f(!1),Ve.current.paper={name:o?s:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function kt(Ie){if(Ie===t)return;Ee.current+=1,Pe.current+=1,Ve.current[t]={name:s,nameTouched:o,path:c,pathTouched:_};const it=Ve.current[Ie];r(Ie),j(null),k(null),g(null),te(!1),y(!1),a(it.name),l(it.nameTouched),d(it.path),f(it.pathTouched)}async function xe(){if(x)return;const Ie=++Pe.current;y(!0),j(null);try{const it=await _Ye();if(Ie!==Pe.current||!it)return;if(f(!0),g(null),v(!0),d(it),Ce(Ut=>Ut+1),t==="folder"&&!o){const Ut=it.replace(/[\\/]+$/,"").split(/[\\/]/).pop();Ut&&a(Ut)}}catch(it){Ie===Pe.current&&j(it instanceof Error?it.message:String(it))}finally{Ie===Pe.current&&y(!1)}}async function je(Ie){if(Ie.preventDefault(),!!Wn){A(!0),j(null);try{const it=await pYe({name:s.trim(),path:At.trim(),createFolder:t!=="folder",requireNewFolder:t==="blank",initializeGit:!0,githubSyncEnabled:I,locale:N(),...t==="paper"&&re?{paperId:re.paperId,cloneUrl:re.repoUrl??void 0}:{}});e(it.project,it.githubPublicationError)}catch(it){j(it instanceof Error?it.message:String(it))}finally{A(!1)}}}const We=s.trim(),st=t==="paper"&&re&&!re.repoUrl?re.paperId:null,nt=t==="folder"&&(m==null?void 0:m.gitState)==="ready"?m.resolvedPath??null:null,Ht=We!==""&&(t==="blank"||st!==null||nt!==null);M.useEffect(()=>{if(!Ht)return;const Ie=window.setTimeout(()=>{bYe({name:We,paperId:st??void 0,path:nt??void 0,locale:N()}).catch(()=>{})},1200);return()=>window.clearTimeout(Ie)},[Ht,We,st,nt]);const bt=(m==null?void 0:m.gitVersion)===null,nn=t==="folder"&&!!At.trim()&&m!==null&&m.exists===!1,Wt=t==="blank"&&(m==null?void 0:m.exists)===!0,pn=!!At.trim()&&(m==null?void 0:m.exists)===!0&&m.directory===!1,Lt=t==="paper"&&!!(re!=null&&re.repoUrl)&&(m==null?void 0:m.empty)===!1,En=t==="paper"&&!!re&&!(re!=null&&re.repoUrl)&&(m==null?void 0:m.empty)===!1,Ft=t==="folder"&&((m==null?void 0:m.gitState)==="detached"||(m==null?void 0:m.gitState)==="invalid"),br=_&&!At.trim()||pn||Lt||En,mn=_&&!At.trim()||pn||Wt,Ye=_&&!At.trim()?y7():pn?m7():Wt?Lme():null,xt=_&&!At.trim()?y7():pn?m7():Lt?T1e():En?nme():null,Wn=!!(s.trim()&&At.trim())&&!C&&!x&&!b&&m!==null&&!S&&!bt&&!nn&&!Wt&&!pn&&!Lt&&!En&&!Ft&&(t!=="paper"||!!re)&&(!I||typeof H=="string"&&!J&&!L),Kn=W??`github.com/${H??"you"}/${V}`,Nt=H===void 0||J||L,rt=t==="paper"&&!re&&K.trim().length>=3&&le===K.trim()&&!q&&he.length===0&&!E;return h.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:je,children:[h.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:[h.jsx("button",{type:"button",className:t==="blank"?"active":"","aria-pressed":t==="blank",onClick:()=>kt("blank"),children:$me()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="paper"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="folder"?"active":"","aria-pressed":t==="folder",onClick:()=>kt("folder"),children:lge()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="blank"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="paper"?"active":"","aria-pressed":t==="paper",onClick:()=>kt("paper"),children:mge()})]}),t==="paper"&&!re&&h.jsxs("label",{className:"!font-normal",children:[$ge(),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:K,onChange:Ie=>{j(null),ge(""),G(Ie.target.value)},placeholder:Yge()}),!rt&&h.jsx("span",{className:"repo-hint",children:q?F1e():D1e()}),rt&&h.jsx("span",{className:"project-path-notice block",children:Nge()}),he.length>0&&h.jsx("div",{className:"paper-results",children:he.map(Ie=>h.jsxs("button",{type:"button",onClick:()=>void Ot(Ie.paperId),children:[h.jsx(Xf,{children:Ie.title}),h.jsx("span",{className:"id",children:Ie.paperId})]},Ie.paperId))})]}),re&&t==="paper"&&h.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[h.jsxs("div",{className:"meta",children:[h.jsx(Xf,{className:"block",children:re.title||re.paperId}),re.repoUrl&&h.jsx("div",{className:"id",children:hmt(re.repoUrl)})]}),h.jsx(Qe,{size:"small",type:"button","aria-label":Zme(),onClick:St,children:Wme()})]}),!re.repoUrl&&h.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:[h.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[h.jsx(VE,{size:16})," ",jge()]}),h.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Lge()})]})]}),(t!=="paper"||re)&&h.jsxs(h.Fragment,{children:[t==="blank"&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:x7()}),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:v7()})]}),t==="paper"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:re!=null&&re.repoUrl?gme():b7()}),h.jsx("input",{className:"text-sm font-normal",value:At,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},"aria-describedby":br?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g7()}),br&&h.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:xt})]}):t==="folder"?h.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":c?ame({path:Ae(c)}):_7(),disabled:x,title:c||void 0,onClick:()=>void xe(),children:[h.jsx($f,{className:c?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),h.jsx("span",{className:c?"text-sm":"placeholder",children:x?hme():c||_7()}),h.jsx(Ma,{className:"folder-picker-chevron",size:15})]}):s.trim()?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:b7()}),h.jsx("input",{className:"text-sm font-normal",value:At,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":mn?"blank-destination-description":void 0,spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:g7()}),mn&&h.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Ye})]}):null,t!=="blank"&&At&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:x7()}),h.jsx("input",{className:"text-sm font-normal",value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:v7()})]}),bt&&h.jsx("div",{className:"project-path-notice error",children:xge()}),!bt&&t==="folder"&&c.trim()&&!b&&(m==null?void 0:m.exists)===!1&&h.jsx("div",{className:"project-path-notice error",children:r1e()}),!bt&&t==="folder"&&c.trim()&&!b&&pn&&h.jsx("div",{className:"project-path-notice error",children:d1e()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="detached"&&h.jsx("div",{className:"project-path-notice error",children:tge()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="invalid"&&h.jsx("div",{className:"project-path-notice error",children:o1e()}),S&&h.jsx("div",{className:"project-path-notice error",role:"alert",children:S})]}),E&&h.jsx("div",{className:"error",role:"alert",children:E}),(t!=="paper"||re)&&At&&(t!=="blank"||s.trim())&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[h.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${I&&H===null?" text-accent-red":" text-text"}`,"aria-expanded":T,"aria-controls":"new-project-advanced-settings",onClick:()=>D(Ie=>!Ie),children:[I?H===null?Kpe():Qpe():qpe(),h.jsx(ta,{className:T?"rotate-180":"",size:16})]}),T&&h.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[h.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[h.jsx("input",{className:"m-0",type:"checkbox",checked:I,onChange:Ie=>P(Ie.target.checked),disabled:C}),h.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Jge()})]}),h.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[h.jsx("span",{children:Nt?p1e({repository:Ae(Kn)}):W?S1e({repository:Ae(Kn)}):b1e({repository:Ae(Kn)})}),h.jsx("span",{children:fge()}),H===null&&h.jsx("span",{children:B1e({command:Ae("gh auth login")})})]})]})]}),h.jsxs("div",{className:"actions new-project-actions",children:[n&&h.jsx(Qe,{type:"button",onClick:n,children:Ume()}),h.jsx(Qe,{variant:"primary",className:"ms-auto",disabled:!Wn,children:C?zme():t==="paper"?re!=null&&re.repoUrl?yme():p7():t==="folder"?V1e():p7()})]})]})}function xM({onClose:e,onCreated:n}){const t=M.useRef(null),r=M.useRef(e);return r.current=e,M.useEffect(()=>{const s=t.current;if(!s)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...s.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(s.querySelector("[data-initial-focus]")??o()[0]??s).focus();const l=c=>{if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&!c.altKey&&c.shiftKey){c.preventDefault(),c.stopPropagation();return}if(c.key!=="Tab")return;const d=o();if(d.length===0){c.preventDefault(),s.focus();return}const _=d[0],f=d[d.length-1];c.shiftKey&&document.activeElement===_?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),_.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),h.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:s=>{s.target===s.currentTarget&&e()},children:h.jsxs("div",{ref:t,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:[h.jsx("h2",{id:"new-project-dialog-title",children:vE()}),h.jsx(_mt,{onCancel:e,onCreated:n})]})})}function pmt({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const a=M.useRef(null),o=M.useRef(r),l=M.useRef(n);o.current=r,l.current=n,M.useEffect(()=>{const d=a.current;if(!d)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...d.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??d).focus();const m=g=>{if(g.key==="Escape"){g.preventDefault(),l.current||o.current();return}if(g.key!=="Tab")return;const S=f();if(S.length===0){g.preventDefault(),d.focus();return}const k=S[0],b=S[S.length-1];g.shiftKey&&document.activeElement===k?(g.preventDefault(),b.focus()):!g.shiftKey&&document.activeElement===b&&(g.preventDefault(),k.focus())};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0),_==null||_.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:d=>{!n&&d.target===d.currentTarget&&r()},children:h.jsxs("div",{ref:a,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:[h.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:U5e()}),h.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[h.jsx("p",{className:"m-0",children:k5e({name:Ca(e.name)})}),h.jsx("p",{className:"m-0",children:c?s3e():l3e()}),t&&h.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx(Qe,{disabled:n,onClick:r,children:L5e()}),h.jsx(Qe,{variant:"danger",disabled:n,onClick:s,children:n?Z5e():W5e()})]})]})})}function TC(){return h.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 jC({projects:e,onOpen:n,onCreated:t,onDeleted:r}){const[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState({}),S=M.useRef(0),k=e.map(v=>v.id).join("\0");M.useEffect(()=>{let v=!0,x=null;const y=()=>{x=null;const E=++S.current;dYe().then(j=>{!v||E!==S.current||g(Object.fromEntries(j.map(T=>[T.projectId,T])))}).catch(()=>{})},C=()=>{x===null&&(x=setTimeout(y,100))};y();const A=sZe(C);return()=>{v=!1,A(),x!==null&&clearTimeout(x)}},[k]);async function b(v){l(v.id),d(null);try{await wYe(v.id),d(null),f(null),r(v.id)}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(null)}}return h.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[h.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",children:[h.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:[h.jsx("h2",{children:S3e()}),h.jsxs(Qe,{onClick:()=>a(!0),children:[h.jsx(Ex,{size:15})," ",vE()]})]}),h.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:h.jsxs("div",{children:[h.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:[h.jsx("span",{children:b3e()}),h.jsx("span",{children:z7()}),h.jsx("span",{children:A7()}),h.jsx("span",{children:T7()})]}),e.length===0?h.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:p3e()}):[...e].sort((v,x)=>{var A,E;const y=((A=m[v.id])==null?void 0:A.lastMessageAt)??v.createdAt;return(((E=m[x.id])==null?void 0:E.lastMessageAt)??x.createdAt)-y||v.name.localeCompare(x.name)}).map(v=>{const x=m[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,C=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):D3e(),A=x?x.activeAgents>0?m5e({count:Vt(x.activeAgents)}):T3e():"—",E=x?x.totalAgents===1?B3e():x5e({count:Vt(x.totalAgents)}):"—",j=x?x.runningExperiments>0?F3e({count:Vt(x.runningExperiments)}):x.totalExperiments===0?fx():j7({count:Vt(x.totalExperiments)}):"—",T=x&&x.runningExperiments>0?j7({count:Vt(x.totalExperiments)}):null;return h.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:[h.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":xI({name:Ca(v.name)}),onClick:()=>n(v.id)}),h.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:[h.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),h.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[h.jsxs("span",{children:[$5e()," ",Na(v.createdAt)]}),v.paperId&&h.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&h.jsxs("span",{children:[j5e()," ",Ae(v.paperId)]}),h.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":bb({name:Ca(v.name)}),disabled:o===v.id,onClick:D=>{D.stopPropagation(),d(null),f(v)},children:h.jsx(cd,{size:14})})]})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:z7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.activeAgents>0&&h.jsx(TC,{}),A]}),h.jsx("span",{className:"text-xs text-muted",children:E})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:A7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.runningExperiments>0&&h.jsx(TC,{}),j]}),T&&h.jsx("span",{className:"text-xs text-muted",children:T})]}),h.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[h.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:T7()}),y?h.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":K0({name:Ca(v.name)}),children:[h.jsx("span",{className:"inline-flex shrink-0",children:h.jsx(fm,{size:14})}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ae(C)})]}):h.jsx("span",{className:"text-sm text-text pointer-events-none",children:C})]})]},v.id)})]})})]}),s&&h.jsx(xM,{onClose:()=>a(!1),onCreated:(v,x)=>{a(!1),t(v,x)}}),_&&h.jsx(pmt,{project:_,deleting:o===_.id,error:c,onClose:()=>{d(null),f(null)},onConfirm:()=>void b(_)})]})}function mmt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:a,onCancel:o}){const[l,c]=M.useState(new Set),[d,_]=M.useState(null),f=new Map;for(const S of e){const k=f.get(S.experimentId);k?k.push(S):f.set(S.experimentId,[S])}for(const S of f.values())S.sort((k,b)=>b.createdAt-k.createdAt);const m=[...n].sort((S,k)=>{var x,y,C,A;const b=((y=(x=f.get(S.id))==null?void 0:x[0])==null?void 0:y.createdAt)??S.createdAt;return(((A=(C=f.get(k.id))==null?void 0:C[0])==null?void 0:A.createdAt)??k.createdAt)-b});if(m.length===0)return h.jsx("div",{className:"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]: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 experiments-empty-state [&_p]:text-2xl",children:h.jsx("p",{children:t??pce()})});async function g(S){_(null),c(k=>new Set(k).add(S));try{await o(S)}catch(k){c(b=>{const v=new Set(b);return v.delete(S),v}),_(k instanceof Error?k.message:String(k))}}return h.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[d&&h.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[tue()," ",d]}),h.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":Wce(),children:m.map(S=>{const k=f.get(S.id)??[],b=k[0]??null,v=k.find(A=>A.status==="running"||A.status==="starting"),x=v??b,y=!!(v&&(v.cancelRequested||l.has(v.id))),C=v?y?"cancelling":Di(v):b?Di(b):"idle";return h.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:()=>r(S,"preview"),onDoubleClick:()=>r(S,"keepOpen"),onAuxClick:A=>{A.button===1&&(A.preventDefault(),r(S,"keepOpen"))},children:[h.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[h.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...gr(A=>r(S,A),{stopPropagation:!0}),children:S.title||S.slug}),h.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:S.branchName,children:[h.jsx(Ip,{size:14,"aria-hidden":"true"}),h.jsx("code",{children:S.branchName})]})]}),h.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:[h.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:h.jsx(xo,{status:C})}),h.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:h.jsx("span",{children:k.length===1?Sce():jce({count:Vt(k.length)})})}),h.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:h.jsx("span",{children:b?Na(b.createdAt):bce()})})]}),h.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":nO({name:S.title||S.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[h.jsxs(Qe,{size:"small",disabled:!x,title:x?Nce():dce(),...gr(A=>{x&&s(S.id,x.id,A)},{stopPropagation:!0}),children:[h.jsx(Wu,{size:15}),Zce()]}),h.jsxs(Qe,{size:"small",title:Y9({branch:Ae(S.branchName)}),...gr(A=>a(S.id,A),{stopPropagation:!0}),children:[h.jsx(Op,{size:15}),Uce()]}),v&&h.jsxs(Qe,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?Lce():$ce(),onClick:()=>void g(v.id),children:[h.jsx(WE,{size:15}),y?xse():iE()]})]})]},S.id)})})]})}function gmt({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,a]=M.useState(null),o=M.useRef(null),l=M.useCallback(c=>{t||(r(!0),a(null),c().catch(()=>a(dqe())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const c=d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),l(e))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,l]),M.useEffect(()=>{const c=o.current;if(!c)return;const d=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??c).focus();const f=m=>{if(m.key!=="Tab")return;const g=_();if(g.length===0){m.preventDefault(),c.focus();return}const S=g[0],k=g[g.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),k.focus()):!m.shiftKey&&document.activeElement===k&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),d==null||d.focus()}},[]),Up.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:h.jsxs("div",{ref:o,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:[h.jsx(Jt,{className:"absolute end-3.5 top-3.5","aria-label":PUe(),onClick:()=>l(e),disabled:t,children:h.jsx(_s,{size:16})}),h.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[h.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:h.jsx(Rx,{})}),h.jsxs("div",{children:[h.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:YUe()}),h.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:bqe()})]})]}),h.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[h.jsxs("p",{dir:"auto",children:[pqe()," ",h.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:oqe()}),IUe()]}),h.jsx("p",{dir:"auto",children:rqe()})]}),s&&h.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),h.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[h.jsx(Qe,{onClick:()=>l(n),disabled:t,children:GUe()}),h.jsx(Qe,{variant:"primary",onClick:()=>l(e),disabled:t,children:t?ja():JUe()})]})]})}),document.body)}function Rr(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function jm(){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}})}$0.prototype=jm.prototype={constructor:$0,on:function(e,n){var t=this._,r=bmt(e+"",t),s,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(s),r=0,s,a;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),RC.hasOwnProperty(n)?{space:RC[n],local:e}:e}function ymt(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===q2&&n.documentElement.namespaceURI===q2?n.createElement(e):n.createElementNS(t,e)}}function wmt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function yM(e){var n=Mm(e);return(n.local?wmt:ymt)(n)}function Smt(){}function w4(e){return e==null?Smt:function(){return this.querySelector(e)}}function kmt(e){typeof e!="function"&&(e=w4(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=x+1);!(A=b[y])&&++y=0;)(o=r[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ymt(e){e||(e=Xmt);function n(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var t=this._groups,r=t.length,s=new Array(r),a=0;an?1:e>=n?0:NaN}function Zmt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Qmt(){return Array.from(this)}function Jmt(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?ugt:typeof n=="function"?fgt:dgt)(e,n,t??"")):nd(this.node(),e)}function nd(e,n){return e.style.getPropertyValue(n)||EM(e).getComputedStyle(e,null).getPropertyValue(n)}function _gt(e){return function(){delete this[e]}}function pgt(e,n){return function(){this[e]=n}}function mgt(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function ggt(e,n){return arguments.length>1?this.each((n==null?_gt:typeof n=="function"?mgt:pgt)(e,n)):this.node()[e]}function NM(e){return e.trim().split(/^|\s+/)}function S4(e){return e.classList||new zM(e)}function zM(e){this._node=e,this._names=NM(e.getAttribute("class")||"")}zM.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 AM(e,n){for(var t=S4(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function Ggt(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,a;t()=>e;function G2(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:a,x:o,y:l,dx:c,dy:d,dispatch:_}){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:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:_}})}G2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function t1t(e){return!e.ctrlKey&&!e.button}function n1t(){return this.parentNode}function r1t(e,n){return n??{x:e.x,y:e.y}}function s1t(){return navigator.maxTouchPoints||"ontouchstart"in this}function LM(){var e=t1t,n=n1t,t=r1t,r=s1t,s={},a=jm("start","drag","end"),o=0,l,c,d,_,f=0;function m(C){C.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,e1t).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,A){if(!(_||!e.call(this,C,A))){var E=y(this,n.call(this,C,A),C,A,"mouse");E&&(di(C.view).on("mousemove.drag",S,rh).on("mouseup.drag",k,rh),RM(C.view),rb(C),d=!1,l=C.clientX,c=C.clientY,E("start",C))}}function S(C){if(Hu(C),!d){var A=C.clientX-l,E=C.clientY-c;d=A*A+E*E>f}s.mouse("drag",C)}function k(C){di(C.view).on("mousemove.drag mouseup.drag",null),DM(C.view,d),Hu(C),s.mouse("end",C)}function b(C,A){if(e.call(this,C,A)){var E=C.changedTouches,j=n.call(this,C,A),T=E.length,D,I;for(D=0;D>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?b0(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?b0(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=a1t.exec(e))?new Vs(n[1],n[2],n[3],1):(n=o1t.exec(e))?new Vs(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=l1t.exec(e))?b0(n[1],n[2],n[3],n[4]):(n=c1t.exec(e))?b0(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=u1t.exec(e))?HC(n[1],n[2]/100,n[3]/100,1):(n=d1t.exec(e))?HC(n[1],n[2]/100,n[3]/100,n[4]):DC.hasOwnProperty(e)?IC(DC[e]):e==="transparent"?new Vs(NaN,NaN,NaN,0):null}function IC(e){return new Vs(e>>16&255,e>>8&255,e&255,1)}function b0(e,n,t,r){return r<=0&&(e=n=t=NaN),new Vs(e,n,t,r)}function _1t(e){return e instanceof Dh||(e=bc(e)),e?(e=e.rgb(),new Vs(e.r,e.g,e.b,e.opacity)):new Vs}function V2(e,n,t,r){return arguments.length===1?_1t(e):new Vs(e,n,t,r??1)}function Vs(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}k4(Vs,V2,OM(Dh,{brighter(e){return e=e==null?yp:Math.pow(yp,e),new Vs(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sh:Math.pow(sh,e),new Vs(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vs(pc(this.r),pc(this.g),pc(this.b),wp(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:BC,formatHex:BC,formatHex8:p1t,formatRgb:$C,toString:$C}));function BC(){return`#${cc(this.r)}${cc(this.g)}${cc(this.b)}`}function p1t(){return`#${cc(this.r)}${cc(this.g)}${cc(this.b)}${cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function $C(){const e=wp(this.opacity);return`${e===1?"rgb(":"rgba("}${pc(this.r)}, ${pc(this.g)}, ${pc(this.b)}${e===1?")":`, ${e})`}`}function wp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function pc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cc(e){return e=pc(e),(e<16?"0":"")+e.toString(16)}function HC(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ki(e,n,t,r)}function IM(e){if(e instanceof Ki)return new Ki(e.h,e.s,e.l,e.opacity);if(e instanceof Dh||(e=bc(e)),!e)return new Ki;if(e instanceof Ki)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),a=Math.max(n,t,r),o=NaN,l=a-s,c=(a+s)/2;return l?(n===a?o=(t-r)/l+(t0&&c<1?0:o,new Ki(o,l,c,e.opacity)}function m1t(e,n,t,r){return arguments.length===1?IM(e):new Ki(e,n,t,r??1)}function Ki(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}k4(Ki,m1t,OM(Dh,{brighter(e){return e=e==null?yp:Math.pow(yp,e),new Ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sh:Math.pow(sh,e),new Ki(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 Vs(sb(e>=240?e-240:e+120,s,r),sb(e,s,r),sb(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ki(PC(this.h),x0(this.s),x0(this.l),wp(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=wp(this.opacity);return`${e===1?"hsl(":"hsla("}${PC(this.h)}, ${x0(this.s)*100}%, ${x0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PC(e){return e=(e||0)%360,e<0?e+360:e}function x0(e){return Math.max(0,Math.min(1,e||0))}function sb(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 C4=e=>()=>e;function g1t(e,n){return function(t){return e+t*n}}function v1t(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 b1t(e){return(e=+e)==1?BM:function(n,t){return t-n?v1t(n,t,e):C4(isNaN(n)?t:n)}}function BM(e,n){var t=n-e;return t?g1t(e,t):C4(isNaN(e)?n:e)}const Sp=(function e(n){var t=b1t(n);function r(s,a){var o=t((s=V2(s)).r,(a=V2(a)).r),l=t(s.g,a.g),c=t(s.b,a.b),d=BM(s.opacity,a.opacity);return function(_){return s.r=o(_),s.g=l(_),s.b=c(_),s.opacity=d(_),s+""}}return r.gamma=e,r})(1);function x1t(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(a){for(s=0;st&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:wa(r,s)})),t=ib.lastIndex;return t180?_+=360:_-d>180&&(d+=360),m.push({i:f.push(s(f)+"rotate(",null,r)-2,x:wa(d,_)})):_&&f.push(s(f)+"rotate("+_+r)}function l(d,_,f,m){d!==_?m.push({i:f.push(s(f)+"skewX(",null,r)-2,x:wa(d,_)}):_&&f.push(s(f)+"skewX("+_+r)}function c(d,_,f,m,g,S){if(d!==f||_!==m){var k=g.push(s(g)+"scale(",null,",",null,")");S.push({i:k-4,x:wa(d,f)},{i:k-2,x:wa(_,m)})}else(f!==1||m!==1)&&g.push(s(g)+"scale("+f+","+m+")")}return function(d,_){var f=[],m=[];return d=e(d),_=e(_),a(d.translateX,d.translateY,_.translateX,_.translateY,f,m),o(d.rotate,_.rotate,f,m),l(d.skewX,_.skewX,f,m),c(d.scaleX,d.scaleY,_.scaleX,_.scaleY,f,m),d=_=null,function(g){for(var S=-1,k=m.length,b;++S=0&&e._call.call(void 0,n),e=e._next;--rd}function qC(){xc=(Cp=ah.now())+Rm,rd=Cf=0;try{L1t()}finally{rd=0,I1t(),xc=0}}function O1t(){var e=ah.now(),n=e-Cp;n>FM&&(Rm-=n,Cp=e)}function I1t(){for(var e,n=kp,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:kp=t);Ef=e,Y2(r)}function Y2(e){if(!rd){Cf&&(Cf=clearTimeout(Cf));var n=e-xc;n>24?(e<1/0&&(Cf=setTimeout(qC,e-ah.now()-Rm)),gf&&(gf=clearInterval(gf))):(gf||(Cp=ah.now(),gf=setInterval(O1t,FM)),rd=1,UM(qC))}}function GC(e,n,t){var r=new Ep;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var B1t=jm("start","end","cancel","interrupt"),$1t=[],GM=0,VC=1,X2=2,P0=3,WC=4,Z2=5,F0=6;function Dm(e,n,t,r,s,a){var o=e.__transition;if(!o)e.__transition={};else if(t in o)return;H1t(e,t,{name:n,index:r,group:s,on:B1t,tween:$1t,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:GM})}function N4(e,n){var t=na(e,n);if(t.state>GM)throw new Error("too late; already scheduled");return t}function Ba(e,n){var t=na(e,n);if(t.state>P0)throw new Error("too late; already running");return t}function na(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function H1t(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=qM(a,0,t.time);function a(d){t.state=VC,t.timer.restart(o,t.delay,t.time),t.delay<=d&&o(d-t.delay)}function o(d){var _,f,m,g;if(t.state!==VC)return c();for(_ in r)if(g=r[_],g.name===t.name){if(g.state===P0)return GC(o);g.state===WC?(g.state=F0,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[_]):+_X2&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function mvt(e,n,t){var r,s,a=pvt(n)?N4:Ba;return function(){var o=a(this,e),l=o.on;l!==r&&(s=(r=l).copy()).on(n,t),o.on=s}}function gvt(e,n){var t=this._id;return arguments.length<2?na(this.node(),t).on.on(e):this.each(mvt(t,e,n))}function vvt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function bvt(){return this.on("end.remove",vvt(this._id))}function xvt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=w4(e));for(var r=this._groups,s=r.length,a=new Array(s),o=0;o()=>e;function Gvt(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 vo(e,n,t){this.k=e,this.x=n,this.y=t}vo.prototype={constructor:vo,scale:function(e){return e===1?this:new vo(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new vo(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 Lm=new vo(1,0,0);YM.prototype=vo.prototype;function YM(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Lm;return e.__zoom}function ab(e){e.stopImmediatePropagation()}function vf(e){e.preventDefault(),e.stopImmediatePropagation()}function Vvt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Wvt(){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 KC(){return this.__zoom||Lm}function Kvt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Yvt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xvt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],a=e.invertY(n[0][1])-t[0][1],o=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function XM(){var e=Vvt,n=Wvt,t=Xvt,r=Kvt,s=Yvt,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=H0,d=jm("start","zoom","end"),_,f,m,g=500,S=150,k=0,b=10;function v(V){V.property("__zoom",KC).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",I).filter(s).on("touchstart.zoom",P).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(V,X,W,Z){var J=V.selection?V.selection():V;J.property("__zoom",KC),V!==J?A(V,X,W,Z):J.interrupt().each(function(){E(this,arguments).event(Z).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},v.scaleBy=function(V,X,W,Z){v.scaleTo(V,function(){var J=this.__zoom.k,B=typeof X=="function"?X.apply(this,arguments):X;return J*B},W,Z)},v.scaleTo=function(V,X,W,Z){v.transform(V,function(){var J=n.apply(this,arguments),B=this.__zoom,L=W==null?C(J):typeof W=="function"?W.apply(this,arguments):W,$=B.invert(L),K=typeof X=="function"?X.apply(this,arguments):X;return t(y(x(B,K),L,$),J,o)},W,Z)},v.translateBy=function(V,X,W,Z){v.transform(V,function(){return t(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof W=="function"?W.apply(this,arguments):W),n.apply(this,arguments),o)},null,Z)},v.translateTo=function(V,X,W,Z,J){v.transform(V,function(){var B=n.apply(this,arguments),L=this.__zoom,$=Z==null?C(B):typeof Z=="function"?Z.apply(this,arguments):Z;return t(Lm.translate($[0],$[1]).scale(L.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof W=="function"?-W.apply(this,arguments):-W),B,o)},Z,J)};function x(V,X){return X=Math.max(a[0],Math.min(a[1],X)),X===V.k?V:new vo(X,V.x,V.y)}function y(V,X,W){var Z=X[0]-W[0]*V.k,J=X[1]-W[1]*V.k;return Z===V.x&&J===V.y?V:new vo(V.k,Z,J)}function C(V){return[(+V[0][0]+ +V[1][0])/2,(+V[0][1]+ +V[1][1])/2]}function A(V,X,W,Z){V.on("start.zoom",function(){E(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,B=arguments,L=E(J,B).event(Z),$=n.apply(J,B),K=W==null?C($):typeof W=="function"?W.apply(J,B):W,G=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),re=J.__zoom,oe=typeof X=="function"?X.apply(J,B):X,he=c(re.invert(K).concat(G/re.k),oe.invert(K).concat(G/oe.k));return function(ie){if(ie===1)ie=oe;else{var q=he(ie),te=G/q[2];ie=new vo(te,K[0]-q[0]*te,K[1]-q[1]*te)}L.zoom(null,ie)}})}function E(V,X,W){return!W&&V.__zooming||new j(V,X)}function j(V,X){this.that=V,this.args=X,this.active=0,this.sourceEvent=null,this.extent=n.apply(V,X),this.taps=0}j.prototype={event:function(V){return V&&(this.sourceEvent=V),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(V,X){return this.mouse&&V!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&V!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&V!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(V){var X=di(this.that).datum();d.call(V,this.that,new Gvt(V,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:d}),X)}};function T(V,...X){if(!e.apply(this,arguments))return;var W=E(this,X).event(V),Z=this.__zoom,J=Math.max(a[0],Math.min(a[1],Z.k*Math.pow(2,r.apply(this,arguments)))),B=Vi(V);if(W.wheel)(W.mouse[0][0]!==B[0]||W.mouse[0][1]!==B[1])&&(W.mouse[1]=Z.invert(W.mouse[0]=B)),clearTimeout(W.wheel);else{if(Z.k===J)return;W.mouse=[B,Z.invert(B)],U0(this),W.start()}vf(V),W.wheel=setTimeout(L,S),W.zoom("mouse",t(y(x(Z,J),W.mouse[0],W.mouse[1]),W.extent,o));function L(){W.wheel=null,W.end()}}function D(V,...X){if(m||!e.apply(this,arguments))return;var W=V.currentTarget,Z=E(this,X,!0).event(V),J=di(V.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",G,!0),B=Vi(V,W),L=V.clientX,$=V.clientY;RM(V.view),ab(V),Z.mouse=[B,this.__zoom.invert(B)],U0(this),Z.start();function K(re){if(vf(re),!Z.moved){var oe=re.clientX-L,he=re.clientY-$;Z.moved=oe*oe+he*he>k}Z.event(re).zoom("mouse",t(y(Z.that.__zoom,Z.mouse[0]=Vi(re,W),Z.mouse[1]),Z.extent,o))}function G(re){J.on("mousemove.zoom mouseup.zoom",null),DM(re.view,Z.moved),vf(re),Z.event(re).end()}}function I(V,...X){if(e.apply(this,arguments)){var W=this.__zoom,Z=Vi(V.changedTouches?V.changedTouches[0]:V,this),J=W.invert(Z),B=W.k*(V.shiftKey?.5:2),L=t(y(x(W,B),Z,J),n.apply(this,X),o);vf(V),l>0?di(this).transition().duration(l).call(A,L,Z,V):di(this).call(v.transform,L,Z,V)}}function P(V,...X){if(e.apply(this,arguments)){var W=V.touches,Z=W.length,J=E(this,X,V.changedTouches.length===Z).event(V),B,L,$,K;for(ab(V),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.`},oh=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ZM=["Enter"," ","Escape"],QM={"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 sd;(function(e){e.Strict="strict",e.Loose="loose"})(sd||(sd={}));var mc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(mc||(mc={}));var lh;(function(e){e.Partial="partial",e.Full="full"})(lh||(lh={}));const JM={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var pl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(pl||(pl={}));var Np;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Np||(Np={}));var mt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(mt||(mt={}));const YC={[mt.Left]:mt.Right,[mt.Right]:mt.Left,[mt.Top]:mt.Bottom,[mt.Bottom]:mt.Top};function eR(e){return e===null?null:e?"valid":"invalid"}const tR=e=>"id"in e&&"source"in e&&"target"in e,Zvt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),A4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Lh=(e,n=[0,0])=>{const{width:t,height:r}=jo(e),s=e.origin??n,a=t*s[0],o=r*s[1];return{x:e.position.x-a,y:e.position.y-o}},Qvt=(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 a=typeof s=="string";let o=!n.nodeLookup&&!a?s:void 0;n.nodeLookup&&(o=a?n.nodeLookup.get(s):A4(s)?s:n.nodeLookup.get(s.id));const l=o?zp(o,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Om(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Im(t)},Oh=(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=Om(t,zp(s)),r=!0)}),r?Im(t):{x:0,y:0,width:0,height:0}},T4=(e,n,[t,r,s]=[0,0,1],a=!1,o=!1)=>{const l=(n.x-t)/s,c=(n.y-r)/s,d=n.width/s,_=n.height/s,f=[];for(const m of e.values()){const{measured:g,selectable:S=!0,hidden:k=!1}=m;if(o&&!S||k)continue;const b=g.width??m.width??m.initialWidth??0,v=g.height??m.height??m.initialHeight??0,{x,y}=m.internals.positionAbsolute,C=iR(l,c,d,_,x,y,b,v),A=b*v,E=a&&C>0;(!m.internals.handleBounds||E||C>=A||m.dragging)&&f.push(m)}return f},Jvt=(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 ebt(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 tbt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:a},o){if(e.size===0)return!0;const l=ebt(e,o),c=Oh(l),d=M4(c,n,t,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(d,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),!0}function nR({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:a}){const o=t.get(e),l=o.parentId?t.get(o.parentId):void 0,{x:c,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},_=o.origin??r;let f=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",ea.error005());else{const g=l.measured.width,S=l.measured.height;g&&S&&(f=[[c,d],[c+g,d+S]])}else l&&wc(o.extent)&&(f=[[o.extent[0][0]+c,o.extent[0][1]+d],[o.extent[1][0]+c,o.extent[1][1]+d]]);const m=wc(f)?yc(n,f,o.measured):n;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ea.error015())),{position:{x:m.x-c+(o.measured.width??0)*_[0],y:m.y-d+(o.measured.height??0)*_[1]},positionAbsolute:m}}async function nbt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of t){if(m.deletable===!1)continue;const g=a.has(m.id),S=!g&&m.parentId&&o.find(k=>k.id===m.parentId);(g||S)&&o.push(m)}const l=new Set(n.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),_=Jvt(o,c);for(const m of c)l.has(m.id)&&!_.find(S=>S.id===m.id)&&_.push(m);if(!s)return{edges:_,nodes:o};const f=await s({nodes:o,edges:_});return typeof f=="boolean"?f?{edges:_,nodes:o}:{edges:[],nodes:[]}:f}const id=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),yc=(e={x:0,y:0},n,t)=>({x:id(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:id(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function rR(e,n,t){const{width:r,height:s}=jo(t),{x:a,y:o}=t.internals.positionAbsolute;return yc(e,[[a,o],[a+r,o+s]],n)}const XC=(e,n,t)=>et?-id(Math.abs(e-t),1,n)/n:0,j4=(e,n,t=15,r=40)=>{const s=XC(e.x,r,n.width-r)*t,a=XC(e.y,r,n.height-r)*t;return[s,a]},Om=(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)}),Q2=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Im=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),ch=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=A4(e)?e.internals.positionAbsolute:Lh(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},zp=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=A4(e)?e.internals.positionAbsolute:Lh(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},sR=(e,n)=>Im(Om(Q2(e),Q2(n))),iR=(e,n,t,r,s,a,o,l)=>{const c=Math.max(0,Math.min(e+t,s+o)-Math.max(e,s)),d=Math.max(0,Math.min(n+r,a+l)-Math.max(n,a));return Math.ceil(c*d)},Ap=(e,n)=>iR(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),ZC=e=>Yi(e.width)&&Yi(e.height)&&Yi(e.x)&&Yi(e.y),Yi=e=>!isNaN(e)&&isFinite(e),aR=(e,n)=>(t,r)=>{},Ih=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Bh=({x:e,y:n},[t,r,s],a=!1,o=[1,1])=>{const l={x:(e-t)/s,y:(n-r)/s};return a?Ih(l,o):l},ad=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function xu(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 rbt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=xu(e,t),s=xu(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=xu(e.top??e.y??0,t),s=xu(e.bottom??e.y??0,t),a=xu(e.left??e.x??0,n),o=xu(e.right??e.x??0,n);return{top:r,right:o,bottom:s,left:a,x:a+o,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function sbt(e,n,t,r,s,a){const{x:o,y:l}=ad(e,[n,t,r]),{x:c,y:d}=ad({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-c,f=a-d;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(_),bottom:Math.floor(f)}}const M4=(e,n,t,r,s,a)=>{const o=rbt(a,n,t),l=(n-o.x)/e.width,c=(t-o.y)/e.height,d=Math.min(l,c),_=id(d,r,s),f=e.x+e.width/2,m=e.y+e.height/2,g=n/2-f*_,S=t/2-m*_,k=sbt(e,g,S,_,n,t),b={left:Math.min(k.left-o.left,0),top:Math.min(k.top-o.top,0),right:Math.min(k.right-o.right,0),bottom:Math.min(k.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:S-b.top+b.bottom,zoom:_}},uh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function wc(e){return e!=null&&e!=="parent"}function jo(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 oR(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 lR(e,n={width:0,height:0},t,r,s){const a={...e},o=r.get(t);if(o){const l=o.origin||s;a.x+=o.internals.positionAbsolute.x-(n.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(n.height??0)*l[1]}return a}function QC(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function ibt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function abt(e){return{...QM,...e||{}}}function Lf(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:a,y:o}=Xi(e),l=Bh({x:a-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},r),{x:c,y:d}=t?Ih(l,n):l;return{xSnapped:c,ySnapped:d,...l}}const R4=e=>({width:e.offsetWidth,height:e.offsetHeight}),cR=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},obt=["INPUT","SELECT","TEXTAREA"];function uR(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:obt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const dR=e=>"clientX"in e,Xi=(e,n)=>{var a,o;const t=dR(e),r=t?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,s=t?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},JC=(e,n,t,r,s)=>{const a=n.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(l.left-t.left)/r,y:(l.top-t.top)/r,...R4(o)}})};function fR({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+s*.375+o*.375+t*.125,d=n*.125+a*.375+l*.375+r*.125,_=Math.abs(c-e),f=Math.abs(d-n);return[c,d,_,f]}function S0(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function e9({pos:e,x1:n,y1:t,x2:r,y2:s,c:a}){switch(e){case mt.Left:return[n-S0(n-r,a),t];case mt.Right:return[n+S0(r-n,a),t];case mt.Top:return[n,t-S0(t-s,a)];case mt.Bottom:return[n,t+S0(s-t,a)]}}function hR({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top,curvature:o=.25}){const[l,c]=e9({pos:t,x1:e,y1:n,x2:r,y2:s,c:o}),[d,_]=e9({pos:a,x1:r,y1:s,x2:e,y2:n,c:o}),[f,m,g,S]=fR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:_});return[`M${e},${n} C${l},${c} ${d},${_} ${r},${s}`,f,m,g,S]}function _R({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,a=t0}const ubt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,dbt=(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)),fbt=(e,n,t={})=>{var a;if(!e.source||!e.target)return(a=t.onError)==null||a.call(t,"006",ea.error006()),n;const r=t.getEdgeId||ubt;let s;return tR(e)?s={...e}:s={...e,id:r(e)},dbt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function pR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,a,o,l]=_R({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,a,o,l]}const t9={[mt.Left]:{x:-1,y:0},[mt.Right]:{x:1,y:0},[mt.Top]:{x:0,y:-1},[mt.Bottom]:{x:0,y:1}},hbt=({source:e,sourcePosition:n=mt.Bottom,target:t})=>n===mt.Left||n===mt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function _bt({source:e,sourcePosition:n=mt.Bottom,target:t,targetPosition:r=mt.Top,center:s,offset:a,stepPosition:o}){const l=t9[n],c=t9[r],d={x:e.x+l.x*a,y:e.y+l.y*a},_={x:t.x+c.x*a,y:t.y+c.y*a},f=hbt({source:d,sourcePosition:n,target:_}),m=f.x!==0?"x":"y",g=f[m];let S=[],k,b;const v={x:0,y:0},x={x:0,y:0},[,,y,C]=_R({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(l[m]*c[m]===-1){m==="x"?(k=s.x??d.x+(_.x-d.x)*o,b=s.y??(d.y+_.y)/2):(k=s.x??(d.x+_.x)/2,b=s.y??d.y+(_.y-d.y)*o);const T=[{x:k,y:d.y},{x:k,y:_.y}],D=[{x:d.x,y:b},{x:_.x,y:b}];l[m]===g?S=m==="x"?T:D:S=m==="x"?D:T}else{const T=[{x:d.x,y:_.y}],D=[{x:_.x,y:d.y}];if(m==="x"?S=l.x===g?D:T:S=l.y===g?T:D,n===r){const V=Math.abs(e[m]-t[m]);if(V<=a){const X=Math.min(a-1,a-V);l[m]===g?v[m]=(d[m]>e[m]?-1:1)*X:x[m]=(_[m]>t[m]?-1:1)*X}}if(n!==r){const V=m==="x"?"y":"x",X=l[m]===c[V],W=d[V]>_[V],Z=d[V]<_[V];(l[m]===1&&(!X&&W||X&&Z)||l[m]!==1&&(!X&&Z||X&&W))&&(S=m==="x"?T:D)}const I={x:d.x+v.x,y:d.y+v.y},P={x:_.x+x.x,y:_.y+x.y},H=Math.max(Math.abs(I.x-S[0].x),Math.abs(P.x-S[0].x)),F=Math.max(Math.abs(I.y-S[0].y),Math.abs(P.y-S[0].y));H>=F?(k=(I.x+P.x)/2,b=S[0].y):(k=S[0].x,b=(I.y+P.y)/2)}const A={x:d.x+v.x,y:d.y+v.y},E={x:_.x+x.x,y:_.y+x.y};return[[e,...A.x!==S[0].x||A.y!==S[0].y?[A]:[],...S,...E.x!==S[S.length-1].x||E.y!==S[S.length-1].y?[E]:[],t],k,b,y,C]}function pbt(e,n,t,r){const s=Math.min(n9(e,n)/2,n9(n,t)/2,r),{x:a,y:o}=n;if(e.x===a&&a===t.x||e.y===o&&o===t.y)return`L${a} ${o}`;if(e.y===o){const d=e.xt.id===n):e[0])||null}function ex(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function gbt(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const d=ex(c,n);a.has(d)||(o.push({id:d,color:c.color||t,...c}),a.add(d))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const mR=1e3,vbt=10,D4={nodeOrigin:[0,0],nodeExtent:oh,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},bbt={...D4,checkEquality:!0};function L4(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function xbt(e,n,t){const r=L4(D4,t);for(const s of e.values())if(s.parentId)I4(s,e,n,r);else{const a=Lh(s,r.nodeOrigin),o=wc(s.extent)?s.extent:r.nodeExtent,l=yc(a,o,jo(s));s.internals.positionAbsolute=l}}function ybt(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 a={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(a):s.type==="target"&&r.push(a)}return{source:t,target:r}}function O4(e){return e==="manual"}function tx(e,n,t,r={}){var _,f;const s=L4(bbt,r),a={i:0},o=new Map(n),l=s!=null&&s.elevateNodesOnSelect&&!O4(s.zIndexMode)?mR:0;let c=e.length>0,d=!1;n.clear(),t.clear();for(const m of e){let g=o.get(m.id);if(s.checkEquality&&m===(g==null?void 0:g.internals.userNode))n.set(m.id,g);else{const S=Lh(m,s.nodeOrigin),k=wc(m.extent)?m.extent:s.nodeExtent,b=yc(S,k,jo(m));g={...s.defaults,...m,measured:{width:(_=m.measured)==null?void 0:_.width,height:(f=m.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:ybt(m,g),z:gR(m,l,s.zIndexMode),userNode:m}},n.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),m.parentId&&I4(g,n,t,r,a),d||(d=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function wbt(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 I4(e,n,t,r,s){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:c}=L4(D4,r),d=e.parentId,_=n.get(d);if(!_){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}wbt(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&c==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*vbt),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const f=a&&!O4(c)?mR:0,{x:m,y:g,z:S}=Sbt(e,_,o,l,f,c),{positionAbsolute:k}=e.internals,b=m!==k.x||g!==k.y;(b||S!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:g}:k,z:S}})}function gR(e,n,t){const r=Yi(e.zIndex)?e.zIndex:0;return O4(t)?r:r+(e.selected?n:0)}function Sbt(e,n,t,r,s,a){const{x:o,y:l}=n.internals.positionAbsolute,c=jo(e),d=Lh(e,t),_=wc(e.extent)?yc(d,e.extent,c):d;let f=yc({x:o+_.x,y:l+_.y},r,c);e.extent==="parent"&&(f=rR(f,c,n));const m=gR(e,s,a),g=n.internals.z??0;return{x:f.x,y:f.y,z:g>=m?g+1:m}}function B4(e,n,t,r=[0,0]){var o;const s=[],a=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const d=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??ch(c),_=sR(d,l.rect);a.set(l.parentId,{expandedRect:_,parent:c})}return a.size>0&&a.forEach(({expandedRect:l,parent:c},d)=>{var y;const _=c.internals.positionAbsolute,f=jo(c),m=c.origin??r,g=l.x<_.x?Math.round(Math.abs(_.x-l.x)):0,S=l.y<_.y?Math.round(Math.abs(_.y-l.y)):0,k=Math.max(f.width,Math.round(l.width)),b=Math.max(f.height,Math.round(l.height)),v=(k-f.width)*m[0],x=(b-f.height)*m[1];(g>0||S>0||v||x)&&(s.push({id:d,type:"position",position:{x:c.position.x-g+v,y:c.position.y-S+x}}),(y=t.get(d))==null||y.forEach(C=>{e.some(A=>A.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+g,y:C.position.y+S}})})),(f.width0){const g=B4(m,n,t,s);d.push(...g)}return{changes:d,updatedInternals:c}}async function Cbt({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:a}){if(!n||!e.x&&!e.y)return!1;const o=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,a]],r);return!!o&&(o.x!==t[0]||o.y!==t[1]||o.k!==t[2])}function a9(e,n,t,r,s,a){let o=s;const l=r.get(o)||new Map;r.set(o,l.set(t,n)),o=`${s}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(t,n)),a){o=`${s}-${e}-${a}`;const d=r.get(o)||new Map;r.set(o,d.set(t,n))}}function vR(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:s,target:a,sourceHandle:o,targetHandle:l},d=`${s}-${o}--${a}-${l}`,_=`${a}-${l}--${s}-${o}`;a9("source",c,_,e,s,o),a9("target",c,d,e,a,l),n.set(r.id,r)}}function bR(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:bR(t,n):!1}function o9(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 Ebt(e,n,t,r){const s=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!bR(o,e))&&(o.draggable||n&&typeof o.draggable>"u")){const l=e.get(a);l&&s.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:t.x-l.internals.positionAbsolute.x,y:t.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function ob({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var o,l,c;const s=[];for(const[d,_]of n){const f=(o=t.get(d))==null?void 0:o.internals.userNode;f&&s.push({...f,position:_.position,dragging:r})}if(!e)return[s[0],s];const a=(l=t.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((c=n.get(e))==null?void 0:c.position)||a.position,dragging:r}:s[0],s]}function Nbt({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const a={x:t-s.distance.x,y:r-s.distance.y},o=Ih(a,n);return{x:o.x-a.x,y:o.y-a.y}}function zbt({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let a={x:null,y:null},o=0,l=new Map,c=!1,d={x:0,y:0},_=null,f=!1,m=null,g=!1,S=!1,k=null;function b({noDragClassName:x,handleSelector:y,domNode:C,isSelectable:A,nodeId:E,nodeClickDistance:j=0}){m=di(C);function T({x:H,y:F}){const{nodeLookup:V,nodeExtent:X,snapGrid:W,snapToGrid:Z,nodeOrigin:J,onNodeDrag:B,onSelectionDrag:L,onError:$,updateNodePositions:K}=n();a={x:H,y:F};let G=!1;const re=l.size>1,oe=re&&X?Q2(Oh(l)):null,he=re&&Z?Nbt({dragItems:l,snapGrid:W,x:H,y:F}):null;for(const[ie,q]of l){if(!V.has(ie))continue;let te={x:H-q.distance.x,y:F-q.distance.y};Z&&(te=he?{x:Math.round(te.x+he.x),y:Math.round(te.y+he.y)}:Ih(te,W));let le=null;if(re&&X&&!q.extent&&oe){const{positionAbsolute:Ce}=q.internals,Ee=Ce.x-oe.x+X[0][0],Le=Ce.x+q.measured.width-oe.x2+X[1][0],Pe=Ce.y-oe.y+X[0][1],Ve=Ce.y+q.measured.height-oe.y2+X[1][1];le=[[Ee,Pe],[Le,Ve]]}const{position:ge,positionAbsolute:ue}=nR({nodeId:ie,nextPosition:te,nodeLookup:V,nodeExtent:le||X,nodeOrigin:J,onError:$});G=G||q.position.x!==ge.x||q.position.y!==ge.y,q.position=ge,q.internals.positionAbsolute=ue}if(S=S||G,!!G&&(K(l,!0),k&&(r||B||!E&&L))){const[ie,q]=ob({nodeId:E,dragItems:l,nodeLookup:V});r==null||r(k,l,ie,q),B==null||B(k,ie,q),E||L==null||L(k,q)}}async function D(){if(!_)return;const{transform:H,panBy:F,autoPanSpeed:V,autoPanOnNodeDrag:X}=n();if(!X){c=!1,cancelAnimationFrame(o);return}const[W,Z]=j4(d,_,V);(W!==0||Z!==0)&&(a.x=(a.x??0)-W/H[2],a.y=(a.y??0)-Z/H[2],await F({x:W,y:Z})&&T(a)),o=requestAnimationFrame(D)}function I(H){var re;const{nodeLookup:F,multiSelectionActive:V,nodesDraggable:X,transform:W,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:B,onNodeDragStart:L,onSelectionDragStart:$,unselectNodesAndEdges:K}=n();f=!0,(!B||!A)&&!V&&E&&((re=F.get(E))!=null&&re.selected||K()),A&&B&&E&&(e==null||e(E));const G=Lf(H.sourceEvent,{transform:W,snapGrid:Z,snapToGrid:J,containerBounds:_});if(a=G,l=Ebt(F,X,G,E),l.size>0&&(t||L||!E&&$)){const[oe,he]=ob({nodeId:E,dragItems:l,nodeLookup:F});t==null||t(H.sourceEvent,l,oe,he),L==null||L(H.sourceEvent,oe,he),E||$==null||$(H.sourceEvent,he)}}const P=LM().clickDistance(j).on("start",H=>{const{domNode:F,nodeDragThreshold:V,transform:X,snapGrid:W,snapToGrid:Z}=n();_=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,S=!1,k=H.sourceEvent,V===0&&I(H),a=Lf(H.sourceEvent,{transform:X,snapGrid:W,snapToGrid:Z,containerBounds:_}),d=Xi(H.sourceEvent,_)}).on("drag",H=>{const{autoPanOnNodeDrag:F,transform:V,snapGrid:X,snapToGrid:W,nodeDragThreshold:Z,nodeLookup:J}=n(),B=Lf(H.sourceEvent,{transform:V,snapGrid:X,snapToGrid:W,containerBounds:_});if(k=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||E&&!J.has(E))&&(g=!0),!g){if(!c&&F&&f&&(c=!0,D()),!f){const L=Xi(H.sourceEvent,_),$=L.x-d.x,K=L.y-d.y;Math.sqrt($*$+K*K)>Z&&I(H)}(a.x!==B.xSnapped||a.y!==B.ySnapped)&&l&&f&&(d=Xi(H.sourceEvent,_),T(B))}}).on("end",H=>{if(!f||g){g&&l.size>0&&n().updateNodePositions(l,!1);return}if(c=!1,f=!1,cancelAnimationFrame(o),l.size>0){const{nodeLookup:F,updateNodePositions:V,onNodeDragStop:X,onSelectionDragStop:W}=n();if(S&&(V(l,!1),S=!1),s||X||!E&&W){const[Z,J]=ob({nodeId:E,dragItems:l,nodeLookup:F,dragging:!1});s==null||s(H.sourceEvent,l,Z,J),X==null||X(H.sourceEvent,Z,J),E||W==null||W(H.sourceEvent,J)}}}).filter(H=>{const F=H.target;return!H.button&&(!x||!o9(F,`.${x}`,C))&&(!y||o9(F,y,C))});m.call(P)}function v(){m==null||m.on(".drag",null)}return{update:b,destroy:v}}function Abt(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of n.values())Ap(s,ch(a))>0&&r.push(a);return r}const Tbt=250;function jbt(e,n,t,r){var l,c;let s=[],a=1/0;const o=Abt(e,t,n+Tbt);for(const d of o){const _=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of _){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:m,y:g}=Sc(d,f,f.position,!0),S=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));S>n||(S1){const d=r.type==="source"?"target":"source";return s.find(_=>_.type===d)??s[0]}return s[0]}function xR(e,n,t,r,s,a=!1){var d,_,f;const o=r.get(e);if(!o)return null;const l=s==="strict"?(d=o.internals.handleBounds)==null?void 0:d[n]:[...((_=o.internals.handleBounds)==null?void 0:_.source)??[],...((f=o.internals.handleBounds)==null?void 0:f.target)??[]],c=(t?l==null?void 0:l.find(m=>m.id===t):l==null?void 0:l[0])??null;return c&&a?{...c,...Sc(o,c,c.position,!0)}:c}function yR(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function Mbt(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const wR=()=>!0;function Rbt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:d,autoPanOnConnect:_,flowId:f,panBy:m,cancelConnection:g,onConnectStart:S,onConnect:k,onConnectEnd:b,isValidConnection:v=wR,onReconnectEnd:x,updateConnection:y,getTransform:C,getFromHandle:A,autoPanSpeed:E,dragThreshold:j=1,handleDomNode:T}){const D=cR(e.target);let I=0,P;const{x:H,y:F}=Xi(e),V=yR(a,T),X=l==null?void 0:l.getBoundingClientRect();let W=!1;if(!X||!V)return;const Z=xR(s,V,r,c,n);if(!Z)return;let J=Xi(e,X),B=!1,L=null,$=!1,K=null;function G(){if(!_||!X)return;const[ge,ue]=j4(J,X,E);m({x:ge,y:ue}),I=requestAnimationFrame(G)}const re={...Z,nodeId:s,type:V,position:Z.position},oe=c.get(s);let ie={inProgress:!0,isValid:null,from:Sc(oe,re,mt.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:oe,to:J,toHandle:null,toPosition:YC[re.position],toNode:null,pointer:J};function q(){W=!0,y(ie),S==null||S(e,{nodeId:s,handleId:r,handleType:V})}j===0&&q();function te(ge){if(!W){const{x:Ve,y:ft}=Xi(ge),Be=Ve-H,wt=ft-F;if(!(Be*Be+wt*wt>j*j))return;q()}if(!A()||!re){le(ge);return}const ue=C();J=Xi(ge,X),P=jbt(Bh(J,ue,!1,[1,1]),t,c,re),B||(G(),B=!0);const Ce=SR(ge,{handle:P,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:o?"target":"source",isValidConnection:v,doc:D,lib:d,flowId:f,nodeLookup:c});K=Ce.handleDomNode,L=Ce.connection,$=Mbt(!!P,Ce.isValid);const Ee=c.get(s),Le=Ee?Sc(Ee,re,mt.Left,!0):ie.from,Pe={...ie,from:Le,isValid:$,to:Ce.toHandle&&$?ad({x:Ce.toHandle.x,y:Ce.toHandle.y},ue):J,toHandle:Ce.toHandle,toPosition:$&&Ce.toHandle?Ce.toHandle.position:YC[re.position],toNode:Ce.toHandle?c.get(Ce.toHandle.nodeId):null,pointer:J};y(Pe),ie=Pe}function le(ge){if(!("touches"in ge&&ge.touches.length>0)){if(W){(P||K)&&L&&$&&(k==null||k(L));const{inProgress:ue,...Ce}=ie,Ee={...Ce,toPosition:ie.toHandle?ie.toPosition:null};b==null||b(ge,Ee),a&&(x==null||x(ge,Ee))}g(),cancelAnimationFrame(I),B=!1,$=!1,L=null,K=null,D.removeEventListener("mousemove",te),D.removeEventListener("mouseup",le),D.removeEventListener("touchmove",te),D.removeEventListener("touchend",le)}}D.addEventListener("mousemove",te),D.addEventListener("mouseup",le),D.addEventListener("touchmove",te),D.addEventListener("touchend",le)}function SR(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:d=wR,nodeLookup:_}){const f=a==="target",m=n?o.querySelector(`.${l}-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:g,y:S}=Xi(e),k=o.elementFromPoint(g,S),b=k!=null&&k.classList.contains(`${l}-flow__handle`)?k:m,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const x=yR(void 0,b),y=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),A=b.classList.contains("connectable"),E=b.classList.contains("connectableend");if(!y||!x)return v;const j={source:f?y:r,sourceHandle:f?C:s,target:f?r:y,targetHandle:f?s:C};v.connection=j;const D=A&&E&&(t===sd.Strict?f&&x==="source"||!f&&x==="target":y!==r||C!==s);v.isValid=D&&d(j),v.toHandle=xR(y,x,C,_,t,!0)}return v}const nx={onPointerDown:Rbt,isValid:SR};function Dbt({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=di(e);function a({translateExtent:l,width:c,height:d,zoomStep:_=1,pannable:f=!0,zoomable:m=!0,inversePan:g=!1}){const S=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),A=y.sourceEvent.ctrlKey&&uh()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*_,j=C[2]*Math.pow(2,E*A);n.scaleTo(j)};let k=[0,0];const b=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},v=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const A=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[A[0]-k[0],A[1]-k[1]];k=A;const j=r()*Math.max(C[2],Math.log(C[2]))*(g?-1:1),T={x:C[0]-E[0]*j,y:C[1]-E[1]*j},D=[[0,0],[c,d]];n.setViewportConstrained({x:T.x,y:T.y,zoom:C[2]},D,l)},x=XM().on("start",b).on("zoom",f?v:null).on("zoom.wheel",m?S:null);s.call(x,{})}function o(){s.on("zoom",null)}return{update:a,destroy:o,pointer:Vi}}const Bm=e=>({x:e.x,y:e.y,zoom:e.k}),lb=({x:e,y:n,zoom:t})=>Lm.translate(e,n).scale(t),Mu=(e,n)=>e.target.closest(`.${n}`),kR=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),Lbt=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,cb=(e,n=0,t=Lbt,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},CR=e=>{const n=e.ctrlKey&&uh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function Obt({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:d}){return _=>{if(Mu(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(_.ctrlKey&&o){const b=Vi(_),v=CR(_),x=f*Math.pow(2,v);r.scaleTo(t,x,b,_);return}const m=_.deltaMode===1?20:1;let g=s===mc.Vertical?0:_.deltaX*m,S=s===mc.Horizontal?0:_.deltaY*m;!uh()&&_.shiftKey&&s!==mc.Vertical&&(g=_.deltaY*m,S=0),r.translateBy(t,-(g/f)*a,-(S/f)*a,{internal:!0});const k=Bm(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(_,k),e.panScrollTimeout=setTimeout(()=>{d==null||d(_,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(_,k))}}function Ibt({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const a=r.type==="wheel",o=!n&&a&&!r.ctrlKey,l=Mu(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),t.call(this,r,s)}}function Bbt({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const s=Bm(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function $bt({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return a=>{var o,l;e.usedRightMouseButton=!!(t&&kR(n,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),s&&!((l=a.sourceEvent)!=null&&l.internal)&&(s==null||s(a.sourceEvent,Bm(a.transform)))}}function Hbt({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&kR(n,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Bm(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,c)},t?150:0)}}}function Pbt({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:d,connectionInProgress:_}){return f=>{var b;const m=e||n,g=t&&f.ctrlKey,S=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Mu(f,`${d}-flow__node`)||Mu(f,`${d}-flow__edge`)))return!0;if(!r&&!m&&!s&&!a&&!t||o||_&&!S||Mu(f,l)&&S||Mu(f,c)&&(!S||s&&S&&!e)||!t&&f.ctrlKey&&S)return!1;if(!t&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!m&&!s&&!g&&S||!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||S)&&k}}function Fbt({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),f=XM().scaleExtent([n,t]).translateExtent(r),m=di(e).call(f);x({x:s.x,y:s.y,zoom:id(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const g=m.on("wheel.zoom"),S=m.on("dblclick.zoom");f.wheelDelta(CR);async function k(P,H){return m?new Promise(F=>{f==null||f.interpolate((H==null?void 0:H.interpolate)==="linear"?Df:H0).transform(cb(m,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>F(!0)),P)}):!1}function b({noWheelClassName:P,noPanClassName:H,onPaneContextMenu:F,userSelectionActive:V,panOnScroll:X,panOnDrag:W,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:B,zoomOnPinch:L,zoomOnScroll:$,zoomOnDoubleClick:K,zoomActivationKeyPressed:G,lib:re,onTransformChange:oe,connectionInProgress:he,paneClickDistance:ie,selectionOnDrag:q}){V&&!d.isZoomingOrPanning&&v();const te=X&&!G&&!V;f.clickDistance(q?1/0:!Yi(ie)||ie<0?0:ie);const le=te?Obt({zoomPanValues:d,noWheelClassName:P,d3Selection:m,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):Ibt({noWheelClassName:P,preventScrolling:B,d3ZoomHandler:g});m.on("wheel.zoom",le,{passive:!1});const ge=Bbt({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:o});f.on("start",ge);const ue=$bt({zoomPanValues:d,panOnDrag:W,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:oe});f.on("zoom",ue);const Ce=Hbt({zoomPanValues:d,panOnDrag:W,panOnScroll:X,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});f.on("end",Ce);const Ee=Pbt({zoomActivationKeyPressed:G,panOnDrag:W,zoomOnScroll:$,panOnScroll:X,zoomOnDoubleClick:K,zoomOnPinch:L,userSelectionActive:V,noPanClassName:H,noWheelClassName:P,lib:re,connectionInProgress:he});f.filter(Ee),K?m.on("dblclick.zoom",S):m.on("dblclick.zoom",null)}function v(){f.on("zoom",null)}async function x(P,H,F){const V=lb(P),X=f==null?void 0:f.constrain()(V,H,F);return X&&await k(X),X}async function y(P,H){const F=lb(P);return await k(F,H),F}function C(P){if(m){const H=lb(P),F=m.property("__zoom");(F.k!==P.zoom||F.x!==P.x||F.y!==P.y)&&(f==null||f.transform(m,H,null,{sync:!0}))}}function A(){const P=m?YM(m.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function E(P,H){return m?new Promise(F=>{f==null||f.interpolate((H==null?void 0:H.interpolate)==="linear"?Df:H0).scaleTo(cb(m,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>F(!0)),P)}):!1}async function j(P,H){return m?new Promise(F=>{f==null||f.interpolate((H==null?void 0:H.interpolate)==="linear"?Df:H0).scaleBy(cb(m,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>F(!0)),P)}):!1}function T(P){f==null||f.scaleExtent(P)}function D(P){f==null||f.translateExtent(P)}function I(P){const H=!Yi(P)||P<0?0:P;f==null||f.clickDistance(H)}return{update:b,destroy:v,setViewport:y,setViewportConstrained:x,getViewport:A,scaleTo:E,scaleBy:j,setScaleExtent:T,setTranslateExtent:D,syncViewport:C,setClickDistance:I}}var od;(function(e){e.Line="line",e.Handle="handle"})(od||(od={}));function Ubt({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:a}){const o=e-n,l=t-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&s&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function l9(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 hl(e,n){return Math.max(0,n-e)}function _l(e,n){return Math.max(0,e-n)}function k0(e,n,t){return Math.max(0,n-e,e-t)}function c9(e,n){return e?!n:n}function qbt(e,n,t,r,s,a,o,l){let{affectsX:c,affectsY:d}=n;const{isHorizontal:_,isVertical:f}=n,m=_&&f,{xSnapped:g,ySnapped:S}=t,{minWidth:k,maxWidth:b,minHeight:v,maxHeight:x}=r,{x:y,y:C,width:A,height:E,aspectRatio:j}=e;let T=Math.floor(_?g-e.pointerX:0),D=Math.floor(f?S-e.pointerY:0);const I=A+(c?-T:T),P=E+(d?-D:D),H=-a[0]*A,F=-a[1]*E;let V=k0(I,k,b),X=k0(P,v,x);if(o){let J=0,B=0;c&&T<0?J=hl(y+T+H,o[0][0]):!c&&T>0&&(J=_l(y+I+H,o[1][0])),d&&D<0?B=hl(C+D+F,o[0][1]):!d&&D>0&&(B=_l(C+P+F,o[1][1])),V=Math.max(V,J),X=Math.max(X,B)}if(l){let J=0,B=0;c&&T>0?J=_l(y+T,l[0][0]):!c&&T<0&&(J=hl(y+I,l[1][0])),d&&D>0?B=_l(C+D,l[0][1]):!d&&D<0&&(B=hl(C+P,l[1][1])),V=Math.max(V,J),X=Math.max(X,B)}if(s){if(_){const J=k0(I/j,v,x)*j;if(V=Math.max(V,J),o){let B=0;!c&&!d||c&&!d&&m?B=_l(C+F+I/j,o[1][1])*j:B=hl(C+F+(c?T:-T)/j,o[0][1])*j,V=Math.max(V,B)}if(l){let B=0;!c&&!d||c&&!d&&m?B=hl(C+I/j,l[1][1])*j:B=_l(C+(c?T:-T)/j,l[0][1])*j,V=Math.max(V,B)}}if(f){const J=k0(P*j,k,b)/j;if(X=Math.max(X,J),o){let B=0;!c&&!d||d&&!c&&m?B=_l(y+P*j+H,o[1][0])/j:B=hl(y+(d?D:-D)*j+H,o[0][0])/j,X=Math.max(X,B)}if(l){let B=0;!c&&!d||d&&!c&&m?B=hl(y+P*j,l[1][0])/j:B=_l(y+(d?D:-D)*j,l[0][0])/j,X=Math.max(X,B)}}}D=D+(D<0?X:-X),T=T+(T<0?V:-V),s&&(m?I>P*j?D=(c9(c,d)?-T:T)/j:T=(c9(c,d)?-D:D)*j:_?(D=T/j,d=c):(T=D*j,c=d));const W=c?y+T:y,Z=d?C+D:C;return{width:A+(c?-T:T),height:E+(d?-D:D),x:a[0]*T*(c?-1:1)+W,y:a[1]*D*(d?-1:1)+Z}}const ER={width:0,height:0,x:0,y:0},Gbt={...ER,pointerX:0,pointerY:0,aspectRatio:1};function Vbt(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=t[0]*a,c=t[1]*o;return[[r-l,s-c],[r+a-l,s+o-c]]}function Wbt({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const a=di(e);let o={controlDirection:l9("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:d,boundaries:_,keepAspectRatio:f,resizeDirection:m,onResizeStart:g,onResize:S,onResizeEnd:k,shouldResize:b}){let v={...ER},x={...Gbt};o={boundaries:_,resizeDirection:m,keepAspectRatio:f,controlDirection:l9(d)};let y,C=null,A=[],E,j,T,D=!1;const I=LM().on("start",P=>{const{nodeLookup:H,transform:F,snapGrid:V,snapToGrid:X,nodeOrigin:W,paneDomNode:Z}=t();if(y=H.get(n),!y)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:B}=Lf(P.sourceEvent,{transform:F,snapGrid:V,snapToGrid:X,containerBounds:C});v={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},x={...v,pointerX:J,pointerY:B,aspectRatio:v.width/v.height},E=void 0,j=wc(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=H.get(y.parentId)),E&&y.extent==="parent"&&(j=[[0,0],[E.measured.width,E.measured.height]]),A=[],T=void 0;for(const[L,$]of H)if($.parentId===n&&(A.push({id:L,position:{...$.position},extent:$.extent}),$.extent==="parent"||$.expandParent)){const K=Vbt($,y,$.origin??W);T?T=[[Math.min(K[0][0],T[0][0]),Math.min(K[0][1],T[0][1])],[Math.max(K[1][0],T[1][0]),Math.max(K[1][1],T[1][1])]]:T=K}g==null||g(P,{...v})}).on("drag",P=>{const{transform:H,snapGrid:F,snapToGrid:V,nodeOrigin:X}=t(),W=Lf(P.sourceEvent,{transform:H,snapGrid:F,snapToGrid:V,containerBounds:C}),Z=[];if(!y)return;const{x:J,y:B,width:L,height:$}=v,K={},G=y.origin??X,{width:re,height:oe,x:he,y:ie}=qbt(x,o.controlDirection,W,o.boundaries,o.keepAspectRatio,G,j,T),q=re!==L,te=oe!==$,le=he!==J&&q,ge=ie!==B&&te;if(!le&&!ge&&!q&&!te)return;if((le||ge||G[0]===1||G[1]===1)&&(K.x=le?he:v.x,K.y=ge?ie:v.y,v.x=K.x,v.y=K.y,A.length>0)){const Le=he-J,Pe=ie-B;for(const Ve of A)Ve.position={x:Ve.position.x-Le+G[0]*(re-L),y:Ve.position.y-Pe+G[1]*(oe-$)},Z.push(Ve)}if((q||te)&&(K.width=q&&(!o.resizeDirection||o.resizeDirection==="horizontal")?re:v.width,K.height=te&&(!o.resizeDirection||o.resizeDirection==="vertical")?oe:v.height,v.width=K.width,v.height=K.height),E&&y.expandParent){const Le=G[0]*(K.width??0);K.x&&K.x{D&&(k==null||k(P,{...v}),s==null||s({...v}),D=!1)});a.call(I)}function c(){a.on(".drag",null)}return{update:l,destroy:c}}var ub={exports:{}},db={},fb={exports:{}},hb={};/** +`):F;W(!0),J(null);try{return await GYe(e,Y,Xe,{sessionId:r}),Pe.current=Xe,S(xt=>xt&&xt.source==="checkout"?{source:"checkout",file:{...xt.file,content:Xe}}:xt),!0}catch(xt){return J(xt instanceof Error?xt.message:String(xt)),!1}finally{W(!1)}},ht=T&&ge&&!ue,Be=omt({projectId:e,filePath:Y,sessionId:r,enabled:ht,ready:H!=null&&!H.notFound,source:Ce?F:(H==null?void 0:H.content)??""}),wt=cmt({projectId:e,filePath:Y,sessionId:r,enabled:ht,savedSource:Ee,dirty:Le,onPulled:M.useCallback(Xe=>{Xe.includes(Y)&&C(xt=>xt+1)},[Y])}),[zt,vt]=M.useState(!1),Lt=((mn=wt.last)==null?void 0:mn.conflicts.length)??0;M.useEffect(()=>{Lt>0&&vt(!0)},[Lt]);const St=wt.error?_we():Lt>0?Cye():wt.blocked?SE():wt.link?wE():uwe(),kt=wt.error||Lt>0?"text-accent-red":wt.link?"text-accent-green":void 0,xe=T&&Be.showPdf&&Be.compiled!=null,je=Ce&&!(I&&!P)&&!xe,We=Be.compiled?`${Q7(e,Be.compiled.path,{sessionId:r})}&v=${Be.compiled.version}`:null,st=We?`${We}&view=${Be.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,nt=Be.compiled?Be.compiled.path.split("/").pop()??Be.compiled.path:null,Ht=async()=>{Le&&!await Ve()||T&&Be.engine&&Be.compile()},bt=async()=>{Le&&await Ht()},[nn,Wt]=M.useState(!1),[pn,Dt]=M.useState(null),Nn=async()=>{Wt(!0),Dt(null);try{await VYe(e,Y,{sessionId:r})}catch(Xe){Dt(Xe instanceof Error?Xe.message:String(Xe))}finally{Wt(!1)}},Ut=`${he(Y)}&v=${y}`;M.useEffect(()=>{let Xe=!1;x(!0);const xt=async()=>{const Et=await MXe(e,n),rt=(Et==null?void 0:Et.presentation)==="text"||(Et==null?void 0:Et.presentation)==="unknown",Ie=Et&&rt?await bN(e,n):null,it=Et===null||rt&&Ie===null;return{path:n,content:(Ie==null?void 0:Ie.content)??"",truncated:(Ie==null?void 0:Ie.truncated)??!1,binary:(Ie==null?void 0:Ie.binary)??(Et==null?void 0:Et.presentation)==="download",notFound:it,presentation:Ie?Ie.binary?"download":"text":(Et==null?void 0:Et.presentation)??"download"}},Vn=async()=>{for(const Et of[`artifacts/${n}`,n]){const rt=await Z7(e,Et,{sessionId:r}).catch(()=>null);if(rt&&!rt.notFound)return rt}return null};return(E?UYe(n).then(Et=>({source:"absolute",file:Et})):A?xt().then(async Et=>{if(!Et.notFound)return{source:"artifact",file:Et};const rt=await Vn();return rt?{source:"checkout",file:rt}:{source:"artifact",file:Et}}):Z7(e,n,{sessionId:r,ref:s}).then(Et=>Et.notFound&&!s?xt().then(rt=>rt.notFound?{source:"checkout",file:Et}:{source:"artifact",file:rt,checkoutRoot:Et.root}):{source:"checkout",file:Et})).then(Et=>{Xe||(S(Et),b(null))}).catch(Et=>{Xe||b(Et.message)}).finally(()=>{Xe||x(!1)}),()=>{Xe=!0}},[e,n,t,r,s,y]),M.useLayoutEffect(()=>{const Xe=$.current,xt=L.current;!Xe||!H||!xt||(Xe.scrollTop=xt.top,Xe.scrollLeft=xt.left)},[H]);const br=Xe=>{if(Xe.source==="absolute")return Ude();if(A)return Lde({root:r?Q_():Z_()});if(s)return $de({branch:Te(s)});if(r&&Xe.source==="checkout"&&Xe.file.root==="clone")return the();const xt=Xe.source==="checkout"?Xe.file.root:Xe.checkoutRoot;return Wde({root:xt==="worktree"?Q_():Z_()})};return h.jsxs("div",{className:"file-view flex flex-col h-full min-h-0",children:[h.jsxs("div",{className:"file-view-header flex items-center gap-2 py-1.5 px-3 border-b border-b-border-variant text-text shrink-0",children:[h.jsx(Ku,{size:13,className:"shrink-0"}),h.jsx("code",{className:"file-view-path font-mono text-sm text-text flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:Y,children:Y}),o&&h.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 shrink-0 [&_svg]:flex-none",title:wO({branch:Te(o)}),children:[h.jsx(Fp,{size:11}),o]}),je&&(X||Le||Z)&&h.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${Z?"text-accent-red":"text-muted"}`,title:Z??(X?Ta():Zfe()),children:X?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",Cfe()]}):Z?yfe():Wfe()}),T&&Be.compiled&&h.jsx(Jt,{active:!Be.showPdf,"data-tip":Be.stale&&Be.showPdf?lfe():Be.showPdf?Tu():h7(),"data-tip-align":"end","aria-label":Be.showPdf?Tu():h7(),onClick:()=>Be.setShowPdf(!Be.showPdf),children:Be.showPdf?h.jsx(Eb,{size:13}):h.jsx(Ku,{size:13,className:Be.stale?"text-accent-amber":void 0})}),T&&We&&nt&&h.jsx(Wp,{"data-tip":Be.stale?lde({name:Te(nt)}):S6({name:Te(nt)}),"data-tip-align":"end","aria-label":S6({name:Te(nt)}),href:We,download:nt,children:h.jsx(rKe,{size:13,className:Be.stale?"text-accent-amber":void 0})}),ht&&h.jsx(Jt,{active:zt,"data-tip":St,"data-tip-align":"end","aria-label":WI({status:St}),"aria-expanded":zt,onClick:()=>vt(Xe=>!Xe),children:wt.syncing?h.jsx(dn,{}):h.jsx(XWe,{size:13,className:kt})}),T&&ge&&h.jsx(Jt,{"data-tip":Be.compiled?d7():l7(),"data-tip-align":"end","aria-label":Be.compiled?d7():l7(),disabled:Be.compiling||!Be.engine,onClick:()=>void Ht(),children:Be.compiling?h.jsx(dn,{}):h.jsx(lKe,{size:13})}),I&&h.jsx(Jt,{active:P,"data-tip":P?np():Tu(),"data-tip-align":"end","aria-label":P?np():Tu(),onClick:()=>B(Xe=>!Xe),children:h.jsx(Eb,{size:13})}),ge&&h.jsx(Jt,{"data-tip":pn??u7(),"data-tip-align":"end","aria-label":u7(),disabled:nn,onClick:()=>void Nn(),children:nn?h.jsx(dn,{}):h.jsx(vc,{size:13})}),h.jsx(Jt,{"data-tip":f7(),"data-tip-align":"end","aria-label":f7(),onClick:()=>C(Xe=>Xe+1),children:v?h.jsx(dn,{}):h.jsx(oN,{size:13})})]}),!k&&le&&(g==null?void 0:g.source)==="checkout"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted border-b border-b-border-variant shrink-0",children:Zde({root:g.file.root==="worktree"?Q_():Z_()})}),(Be.error||Be.log)&&h.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:[h.jsxs("div",{className:"flex items-start gap-2",children:[h.jsx("span",{className:`flex-1 min-w-0 text-sm ${Be.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Be.error??(Be.builtWithErrors?Mue():Cue())}),h.jsx(Jt,{"data-tip":c7(),"data-tip-align":"end","aria-label":Zue(),onClick:Be.dismiss,children:h.jsx(_s,{size:13})})]}),Be.log&&h.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Be.log})]}),ht&&wt.staleOnDisk&&h.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:[h.jsx("span",{className:"flex-1 min-w-0",children:sfe()}),h.jsx(Qe,{onClick:()=>{wt.reloaded(),C(Xe=>Xe+1)},children:que()})]}),ht&&wt.error&&h.jsxs("div",{className:"file-view-note shrink-0 max-h-45 overflow-auto border-b border-b-border-variant py-2.5 px-4 flex items-start gap-2",children:[h.jsx("span",{className:"flex-1 min-w-0 text-sm text-accent-red whitespace-pre-wrap",children:wt.error}),h.jsx(Jt,{"data-tip":c7(),"data-tip-align":"end","aria-label":tde(),onClick:wt.dismiss,children:h.jsx(_s,{size:13})})]}),ht&&zt&&wt.loaded&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4",children:h.jsx(xmt,{overleaf:wt})}),T&&ge&&Be.engine===null&&Be.installHint&&h.jsxs("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2.5 px-4 text-sm text-subtext",children:[Be.installHint,Be.installCommand&&h.jsx(ymt,{command:Be.installCommand})]}),Be.note&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-accent-amber",children:Be.note}),xe&&Be.stale&&h.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:$fe()}),h.jsxs("div",{ref:$,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",onScroll:Xe=>{const xt={top:Xe.currentTarget.scrollTop,left:Xe.currentTarget.scrollLeft};L.current=xt,d==null||d(xt)},children:[!je&&!k&&!A&&(g==null?void 0:g.source)==="checkout"&&!g.file.notFound&&!s&&r&&g.file.root==="clone"&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Ufe()}),!je&&!k&&(g==null?void 0:g.source)==="artifact"&&!g.file.notFound&&ne&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:gue({root:g.checkoutRoot==="worktree"?Q_():Z_()})}),k?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[fde()," ",Te(k)]}):H===null?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:_E()}):H.notFound?h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:g?br(g):jde()}):q?h.jsx(W2,{kind:q,url:Ut,name:n.split("/").pop()??n}):H.binary?h.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[yue()," ",h.jsx("a",{href:Ut,download:n.split("/").pop()??n,children:hE()})]}):xe&&st&&nt?h.jsx(W2,{kind:"pdf",url:st,name:nt,downloadBar:!1},st):j&&!P?h.jsx("div",{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:ee?h.jsx(wM,{projectId:e,folder:G,markdown:H.content}):h.jsx(Na,{text:H.content,resolveFilePath:oe,resolveImageSrc:ie,onOpenFile:l&&((Xe,xt,Vn,Wn,Et)=>l(Xe,r,s,Et))})}):D&&!P?h.jsx(vmt,{html:H.content,truncated:H.truncated,url:Ut,name:Y,resolveSrc:ie}):je?h.jsx(dmt,{value:F,onChange:Xe=>{V(Xe),m==null||m(),Z&&J(null)},onSave:()=>void bt(),onBlur:()=>void bt(),path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}):h.jsxs(h.Fragment,{children:[h.jsx(mM,{text:H.content,path:n,highlightLine:a,scrollRequest:_,onScrollRequestHandled:f}),H.truncated&&h.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:mde()})]})]})]})}const ib=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function Smt({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:a,setOpen:o,ref:l}=zo(),c=M.useRef(null);return M.useEffect(()=>{if(!a)return;const d=_=>{var f;_.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",d,!0),()=>document.removeEventListener("keydown",d,!0)},[a]),h.jsxs("div",{className:"rail-brand flex items-center gap-1 h-16 p-2 border-b border-b-border shrink-0 [&_.project-switcher]:relative [&_.project-switcher]:flex-1 [&_.project-switcher]:self-stretch [&_.project-switcher]:min-w-0 [&_.project-back]:shrink-0 [&_.brand]:flex [&_.brand]:items-center [&_.brand]:justify-between [&_.brand]:gap-2 [&_.brand]:w-full [&_.brand]:h-full [&_.brand]:min-w-0 [&_.brand]:font-semibold [&_.brand]:text-base [&_.brand]:text-text [&_.brand]:py-1 [&_.brand]:px-1.5 [&_.brand]:border [&_.brand]:border-transparent [&_.brand]:rounded-sm [&_.brand:hover]:bg-surface [&_.brand:hover]:border-border [&_.brand.open]:bg-surface [&_.brand.open]:border-border [&_.brand_svg]:shrink-0 [&_.brand-project-copy]:flex [&_.brand-project-copy]:flex-col [&_.brand-project-copy]:gap-[3px] [&_.brand-project-copy]:min-w-0 [&_.brand-project-copy]:leading-[1.15] [&_.brand-project-copy]:text-start [&_.brand-project-label]:text-muted [&_.brand-project-label]:text-xs [&_.brand-project-label]:font-medium [&_.brand-project-label]:tracking-[0.04em] [&_.brand-project-label]:uppercase [&_.brand_.brand-project]:min-w-0 [&_.brand_.brand-project]:overflow-hidden [&_.brand_.brand-project]:text-ellipsis [&_.brand_.brand-project]:whitespace-nowrap [&_.brand_.brand-project]:text-xl [&_.project-chevron]:text-muted [&_.project-chevron]:opacity-0 [&_.project-chevron]:transition-transform [&_.project-chevron]:duration-120 [&_.project-chevron]:ease-standard [&_.brand:hover_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:opacity-100 [&_.brand.open_.project-chevron]:rotate-180 [&_.project-menu]:start-0 [&_.project-menu]:w-52.5 [&_.project-menu]:z-70",children:[h.jsx(Jt,{className:"project-back text-text","aria-label":_7(),onClick:n,children:h.jsx($f,{size:18})}),h.jsxs("div",{className:"project-switcher",ref:l,children:[h.jsxs("button",{ref:c,className:`brand${a?" open":""}`,onClick:()=>o(d=>!d),"aria-expanded":a,children:[h.jsxs("span",{className:"brand-project-copy",children:[h.jsx("span",{className:"brand-project-label",children:y_e()}),h.jsx("span",{className:"brand-project",children:e})]}),h.jsx(ta,{className:"project-chevron",size:14})]}),a&&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 project-menu",children:[h.jsx(Zr,{onClick:()=>{o(!1),r()},children:h.jsxs("span",{className:ib,children:[h.jsx(rN,{size:14}),u_e()]})}),h.jsx(Zr,{onClick:()=>{o(!1),n()},children:h.jsxs("span",{className:ib,children:[h.jsx(kKe,{size:14}),_7()]})}),h.jsx(Zr,{onClick:()=>{var d;(d=c.current)==null||d.focus(),o(!1),t()},children:h.jsxs("span",{className:ib,children:[h.jsx(_Ke,{size:14}),__e()]})})]})]}),s&&h.jsx(Jt,{"data-tip":p7(),"data-tip-align":"end","aria-label":p7(),onClick:s,children:h.jsx(iN,{size:15})})]})}function jC(){const e=M.useSyncExternalStore(NZe,nS,nS);return h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":N7()}),!e&&h.jsxs("div",{className:"offline-banner flex items-center gap-2 shrink-0 py-1.5 px-3.5 text-sm text-text bg-accent-amber-subtle border-b border-b-accent-amber","aria-hidden":!0,children:[h.jsx(QE,{size:13,className:"shrink-0 text-accent-amber"}),h.jsx("span",{dir:"auto",className:"min-w-0",children:N7()})]})]})}const MC=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),sh=["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(" "),RC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),MM=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),DC=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),kmt=[{id:"AI/ML",label:wve},{id:"Biology",label:Eve},{id:"Physics",label:Dve},{id:"Other",label:Tve}];function Cmt({onDone:e,preferredAgent:n}){const[t,r]=M.useState(0),[s,a]=M.useState(null),[o,l]=M.useState(),[c,d]=M.useState(!1),[_,f]=M.useState(null),[m,g]=M.useState(null),[S,k]=M.useState(!1),[b,v]=M.useState([]),[x,y]=M.useState(""),[C,A]=M.useState(""),[E,j]=M.useState([]),[T,D]=M.useState(""),[I,P]=M.useState([]),[B,F]=M.useState(!1),V=M.useRef(0),[X,W]=M.useState(!1),[Z,J]=M.useState(!1),$=(s==null?void 0:s.some(q=>q.agentReady))??!1,L=o!=null,H=M.useRef(0),Y=(q,ne=!1)=>{const le=++H.current;k(!0),W(!1),J(!1),l(void 0);const ge=()=>le===H.current;Promise.allSettled([ap(q,ne).then(ue=>ge()&&a(ue)),fN().then(ue=>ge()&&l(ue.gitVersion))]).then(([ue,Ce])=>{ge()&&(ue.status==="rejected"&&(W(!0),a(null)),Ce.status==="rejected"&&(J(!0),l(void 0)))}).finally(()=>ge()&&k(!1))};M.useEffect(()=>Y(!1),[]),M.useEffect(()=>{if(s===null)return;const q=s.filter(ne=>ne.agentReady);g(ne=>{var ge;if(ne&&q.some(ue=>ue.id===ne))return ne;const le=n&&q.find(ue=>ue.id===n.harness);return(le==null?void 0:le.id)??((ge=q[0])==null?void 0:ge.id)??null})},[s,n]),M.useEffect(()=>$x(()=>{ap(!0).then(q=>{a(q),W(!1)}).catch(()=>W(!0))}),[]),M.useEffect(()=>{RXe().then(q=>{v(q.researchAreas),y(q.otherArea??""),A(q.background??""),j(q.papers)}).catch(()=>{})},[]),M.useEffect(()=>{const q=T.trim();if(q.length<3){P([]),F(!1);return}const ne=++V.current;F(!0);const le=setTimeout(()=>{hN(q).then(ge=>ne===V.current&&P(ge)).catch(()=>ne===V.current&&P([])).finally(()=>ne===V.current&&F(!1))},350);return()=>clearTimeout(le)},[T]);const G=q=>{const ne=E.some(le=>le.paperId===q.paperId);j(le=>le.some(ge=>ge.paperId===q.paperId)?le:[...le,{paperId:q.paperId,title:LC(q.title)}]),D(""),P([]),ne||zb(q.paperId).then(le=>{var ue;const ge=(ue=le.title)==null?void 0:ue.trim();ge&&j(Ce=>Ce.map(Ee=>Ee.paperId===q.paperId?{...Ee,title:ge}:Ee))}).catch(()=>{})},ee=q=>j(ne=>ne.filter(le=>le.paperId!==q)),oe=q=>{v(ne=>ne.includes(q)?ne.filter(le=>le!==q):[...ne,q])},he=b.length>0&&(!b.includes("Other")||x.trim().length>0),ie=async()=>{const q=s==null?void 0:s.find(le=>le.id===m&&le.agentReady);if(!q||c)return;const ne=Nmt(q);d(!0),f(null);try{const le=await AYe(ne,{researchAreas:b,otherArea:b.includes("Other")?x:null,background:C||null,papers:E});e(le.project,le.selection)}catch(le){f(le instanceof Error?le.message:String(le))}finally{d(!1)}};return h.jsx("div",{className:`home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas onboarding ${t===0?"[&_.home-inner]:max-w-300 [&_.home-inner]:pt-0 [&_.home-inner]:pb-0":"[&_.home-inner]:max-w-140 [&_.home-inner]:pt-24"}`,children:h.jsx("div",{className:`home-inner max-w-155 my-0 mx-auto ${t===0?"px-8 sm:px-12":"pt-12 px-6 pb-16"}`,children:t===0?h.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:[h.jsxs("div",{className:"onb-intro-copy relative z-10 min-[1120px]:col-start-1 min-[1120px]:row-start-1 min-[1120px]:self-start",children:[h.jsx("div",{className:"onb-intro-brand mb-10 text-6xl font-semibold leading-none tracking-[-0.035em]",children:h.jsx(J1,{})}),h.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:dve()})]}),h.jsxs("div",{className:"onb-intro-features relative min-[1120px]:col-start-2 min-[1120px]:row-start-1 min-[1120px]:self-end",children:[h.jsx("div",{"aria-hidden":"true",className:"absolute -inset-14 rounded-full bg-primary-subtle opacity-70 blur-3xl"}),h.jsxs("ul",{className:"onb-intro-list relative flex flex-col gap-4 m-0 p-0 list-none",children:[h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:bbe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Wxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Xbe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Nxe()})]})}),h.jsx("li",{className:"rounded-2xl border border-border bg-background p-6 shadow-card",children:h.jsxs("span",{children:[h.jsx("strong",{className:"mb-1.5 block text-xl font-semibold tracking-[-0.015em]",children:Bbe()}),h.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:gye()})]})})]})]}),h.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:h.jsxs(Qe,{variant:"primary",size:"large",onClick:()=>r(1),children:[A7()," ",h.jsx(L0,{size:20})]})})]}):t===1?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(J1,{}),h.jsx("span",{children:jxe()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Jve()}),h.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:w2e()}),s!==null&&!$&&h.jsx("p",{className:MC,children:bxe()}),s!==null&&$&&m===null&&h.jsx("p",{className:MC,children:rbe()}),h.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:s!==null?s.map(q=>h.jsx(Amt,{h:q,selected:m===q.id,onSelect:()=>g(q.id)},q.id)):X?h.jsx("div",{className:sh,children:j7()}):h.jsxs(vr,{className:"py-2",children:[h.jsx(dn,{})," ",Tbe()]})}),(o===null||Z)&&h.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[h.jsx(Tmt,{gitVersion:o,error:Z}),Z?h.jsx("p",{className:RC,children:j7()}):h.jsx("p",{className:RC,children:Vbe()})]}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(0),children:[h.jsx($f,{size:12})," ",z7()]}),(X||Z||o===null||s!==null&&!$)&&h.jsxs(Qe,{variant:"ghost",onClick:()=>Y(!0,!0),disabled:S,children:[h.jsx(ud,{size:12,className:S?"animate-[spin_0.9s_linear_infinite]":""})," ",T2e()]}),h.jsx("div",{className:"flex-1"}),h.jsxs(Qe,{variant:"primary",onClick:()=>r(2),disabled:S||!$||m===null||!L,title:S?cye():$?m===null?pbe():Z?B2e():o===void 0?iye():o===null?s2e():void 0:pxe(),children:[A7()," ",h.jsx(L0,{size:13})]})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"onb-eyebrow mb-4.5 flex items-center gap-2 text-xl font-medium text-muted",children:[h.jsx(J1,{}),h.jsx("span",{children:Lxe()})]}),h.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:$xe()}),h.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:h.jsxs("div",{className:MM,children:[h.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:[h.jsx("legend",{children:hye()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:dbe()}),h.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:kmt.map(q=>h.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:[h.jsx("input",{type:"checkbox",checked:b.includes(q.id),onChange:()=>oe(q.id),disabled:c}),h.jsx("span",{children:q.label()})]},q.id))}),b.includes("Other")&&h.jsx("input",{className:"onb-other-area w-full mt-2",value:x,onChange:q=>y(q.target.value),disabled:c,placeholder:Uxe(),"aria-label":E2e()})]}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:V2e()}),h.jsx("textarea",{id:"onb-background",className:"onb-textarea w-full resize-y min-h-19.5 leading-normal text-base mb-3.5",value:C,onChange:q=>A(q.target.value),disabled:c,rows:4,placeholder:Dbe()}),h.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:F2e()}),h.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:pve()}),h.jsxs("div",{className:"onb-paper-search flex flex-col gap-1.5 mt-3 [&_input]:w-full",children:[h.jsx("input",{id:"onb-paper-search",value:T,onChange:q=>D(q.target.value),disabled:c,placeholder:J2e()}),B?h.jsx("div",{className:sh,children:rxe()}):I.length>0?h.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:I.map(q=>h.jsxs("button",{type:"button",onClick:()=>G(q),disabled:c,children:[h.jsx(Qf,{children:LC(q.title)}),h.jsx("span",{className:"id",children:q.paperId})]},q.paperId))}):null]}),E.length>0&&h.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:E.map(q=>h.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:[h.jsx(Qf,{children:q.title||q.paperId}),h.jsx("span",{className:"id",children:q.paperId}),h.jsx("button",{type:"button","aria-label":iB({name:Te(q.paperId)}),onClick:()=>ee(q.paperId),disabled:c,children:h.jsx(_s,{size:12})})]},q.paperId))})]})}),!he&&h.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:b.length===0?obe():Ebe()}),h.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[h.jsxs(Qe,{variant:"ghost",onClick:()=>r(1),disabled:c,children:[h.jsx($f,{size:12})," ",z7()]}),h.jsx("div",{className:"flex-1"}),h.jsx(Qe,{variant:"primary",onClick:()=>void ie(),disabled:c||m===null||!he,children:c?h.jsxs(h.Fragment,{children:[h.jsx(dn,{})," ",dxe()]}):h.jsxs(h.Fragment,{children:[Fbe()," ",h.jsx(L0,{size:13})]})})]}),m===null&&h.jsx("p",{className:DC,children:yye()}),_&&h.jsx("p",{className:DC,children:_})]})})})}function LC(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function Emt(e){return e.agentReady?{tone:"success",label:Sxe()}:e.installed?e.installBroken?{tone:"warning",label:e2e()}:e.authState==="unknown"?{tone:"warning",label:Zxe()}:e.authState==="unsupported"?{tone:"warning",label:tye()}:e.installed?{tone:"warning",label:v2e()}:{tone:"neutral",label:T7()}:{tone:"neutral",label:T7()}}function Nmt(e){var t,r;const n=((t=e.models[0])==null?void 0:t.id)??null;return{harness:e.id,model:n,permissionMode:((r=e.options)==null?void 0:r.defaultPermissionMode)??null,reasoningLevel:Gp(e,n).defaultId}}function zmt({harness:e}){return h.jsx(E2,{harness:e,size:26})}function Amt({h:e,selected:n,onSelect:t}){var c;const r=Emt(e),s=n?{tone:"success",label:oxe()}:r,o=[(c=e.version)==null?void 0:c.replace(/\s*\(.*\)$/,""),e.models.length>0&&`${e.models.length} model${e.models.length===1?"":"s"} — ${e.models.slice(0,3).map(d=>rp(d)).join(", ")}${e.models.length>3?", …":""}`].filter(Boolean).join(" · "),l=h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsxs("span",{className:"onb-card-identity flex items-center gap-3 min-w-0",children:[h.jsx(zmt,{harness:e.id}),h.jsx("span",{className:"onb-card-name text-lg font-semibold tracking-[-0.01em]",children:e.name})]}),h.jsx(Ux,{tone:s.tone,children:s.label})]});return e.agentReady?h.jsxs("button",{type:"button",className:`onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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${n?" selected":""}`,"aria-pressed":n,onClick:t,children:[l,h.jsxs("div",{className:"onb-card-detail text-sm",children:[e.account??xE(),e.plan?` · ${e.plan}`:""]}),h.jsx("div",{className:`${sh} w-full overflow-hidden text-ellipsis whitespace-nowrap`,title:o,children:o})]}):h.jsxs("div",{className:"onb-card flex flex-col gap-2.5 bg-background border border-border rounded-lg py-5.5 px-6 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:[l,h.jsx("div",{className:sh,children:Mh(e.agentNote)})]})}function Tmt({gitVersion:e,error:n}){return h.jsxs("div",{className:MM,children:[h.jsxs("div",{className:"onb-card-head flex items-center justify-between gap-3",children:[h.jsx("span",{className:"onb-card-name font-semibold text-base",children:l2e()}),h.jsx(Ux,{tone:e?"success":n||e===null?"danger":"warning",children:e?D2e():n?Pve():e===null?yE():Gve()})]}),(e||!n&&e===void 0)&&h.jsx("div",{className:sh,children:e??Yve()})]})}function ab(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function jmt(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 Mmt(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 Rmt(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function Dmt({onCreated:e,onCancel:n}){const[t,r]=M.useState("blank"),[s,a]=M.useState(""),[o,l]=M.useState(!1),[c,d]=M.useState(""),[_,f]=M.useState(!1),[m,g]=M.useState(null),[S,k]=M.useState(null),[b,v]=M.useState(!1),[x,y]=M.useState(!1),[C,A]=M.useState(!1),[E,j]=M.useState(null),[T,D]=M.useState(!1),[I,P]=M.useState(!1),[B,F]=M.useState(void 0),[V,X]=M.useState("research-project"),[W,Z]=M.useState(null),[J,$]=M.useState(!1),[L,H]=M.useState(!1),[Y,G]=M.useState(""),[ee,oe]=M.useState(null),[he,ie]=M.useState([]),[q,ne]=M.useState(!1),[le,ge]=M.useState(""),[ue,Ce]=M.useState(0),Ee=M.useRef(0),Le=M.useRef(0),Pe=M.useRef(0),Ve=M.useRef({blank:{name:"",nameTouched:!1,path:"",pathTouched:!1},folder:{name:"",nameTouched:!1,path:"",pathTouched:!1},paper:{name:"",nameTouched:!1,path:"",pathTouched:!1}}),ht=t==="paper"?Mmt(ee==null?void 0:ee.repoUrl):null,Be=s.trim()?`~/OpenResearch/${ab(s,48)}`:"",wt=`~/OpenResearch/${ab(s||(ee==null?void 0:ee.title)||(ee==null?void 0:ee.paperId)||"")}`,zt=t==="blank"&&!_?Be:t==="paper"&&ee&&!_?wt:c,vt=ht??(t==="folder"&&(m!=null&&m.githubOwner)&&m.githubRepo?{owner:m.githubOwner,repo:m.githubRepo}:null);M.useEffect(()=>{MYe().then(({login:Ie})=>F(Ie)).catch(()=>F(null)),Lx().then(Ie=>P(Ie.githubForNewProjects)).catch(()=>{})},[]),M.useEffect(()=>{let Ie=!0;$(!0);const it=setTimeout(()=>{RYe(s.trim()).then(({repo:qt})=>Ie&&X(qt)).catch(()=>Ie&&X(ab(s,48))).finally(()=>Ie&&$(!1))},150);return()=>{Ie=!1,clearTimeout(it)}},[s]),M.useEffect(()=>{let Ie=!0;if(Z(null),H(!!vt),!!vt)return DYe(vt.owner,vt.repo).then(({canPush:it})=>{Ie&&it&&Z(`github.com/${vt.owner}/${vt.repo}`)}).catch(()=>{}).finally(()=>Ie&&H(!1)),()=>{Ie=!1}},[vt==null?void 0:vt.owner,vt==null?void 0:vt.repo]),M.useEffect(()=>{const Ie=++Le.current,it=zt.trim();if(!it){g(null),k(null),v(!1);return}v(!0),k(null);const qt=setTimeout(()=>{fN(it).then(en=>{Ie===Le.current&&g(en)}).catch(en=>{Ie===Le.current&&(g(null),k(en instanceof Error?en.message:String(en)))}).finally(()=>{Ie===Le.current&&v(!1)})},200);return()=>clearTimeout(qt)},[t,ue,zt]),M.useEffect(()=>{const Ie=++Ee.current;if(t!=="paper"||ee){ne(!1);return}const it=Y.trim(),qt=jmt(it);if(!qt&&it.length<3){ie([]),ge(""),ne(!1);return}j(null),ne(!0),ie([]),ge("");const en=setTimeout(()=>{if(qt){zb(qt).then(jt=>{var On;Ie===Ee.current&&(oe(jt),o||a(((On=jt.title)==null?void 0:On.trim())||jt.paperId))}).catch(jt=>Ie===Ee.current&&j(jt instanceof Error?jt.message:String(jt))).finally(()=>Ie===Ee.current&&ne(!1));return}hN(it).then(jt=>{Ie===Ee.current&&(ie(jt),ge(it))}).catch(jt=>Ie===Ee.current&&j(jt instanceof Error?jt.message:String(jt))).finally(()=>Ie===Ee.current&&ne(!1))},350);return()=>clearTimeout(en)},[t,ee,Y,o]);async function Lt(Ie){var qt;const it=++Ee.current;ne(!0),j(null);try{const en=await zb(Ie);if(it!==Ee.current)return;oe(en),ie([]),o||a(((qt=en.title)==null?void 0:qt.trim())||en.paperId)}catch(en){it===Ee.current&&j(en instanceof Error?en.message:String(en))}finally{it===Ee.current&&ne(!1)}}function St(){Ee.current+=1,Pe.current+=1,oe(null),G(""),ie([]),ge(""),ne(!1),y(!1),d(""),f(!1),Ve.current.paper={name:o?s:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function kt(Ie){if(Ie===t)return;Ee.current+=1,Pe.current+=1,Ve.current[t]={name:s,nameTouched:o,path:c,pathTouched:_};const it=Ve.current[Ie];r(Ie),j(null),k(null),g(null),ne(!1),y(!1),a(it.name),l(it.nameTouched),d(it.path),f(it.pathTouched)}async function xe(){if(x)return;const Ie=++Pe.current;y(!0),j(null);try{const it=await TYe();if(Ie!==Pe.current||!it)return;if(f(!0),g(null),v(!0),d(it),Ce(qt=>qt+1),t==="folder"&&!o){const qt=it.replace(/[\\/]+$/,"").split(/[\\/]/).pop();qt&&a(qt)}}catch(it){Ie===Pe.current&&j(it instanceof Error?it.message:String(it))}finally{Ie===Pe.current&&y(!1)}}async function je(Ie){if(Ie.preventDefault(),!!Vn){A(!0),j(null);try{const it=await jYe({name:s.trim(),path:zt.trim(),createFolder:t!=="folder",requireNewFolder:t==="blank",initializeGit:!0,githubSyncEnabled:I,locale:N(),...t==="paper"&&ee?{paperId:ee.paperId,cloneUrl:ee.repoUrl??void 0}:{}});e(it.project,it.githubPublicationError)}catch(it){j(it instanceof Error?it.message:String(it))}finally{A(!1)}}}const We=s.trim(),st=t==="paper"&&ee&&!ee.repoUrl?ee.paperId:null,nt=t==="folder"&&(m==null?void 0:m.gitState)==="ready"?m.resolvedPath??null:null,Ht=We!==""&&(t==="blank"||st!==null||nt!==null);M.useEffect(()=>{if(!Ht)return;const Ie=window.setTimeout(()=>{LYe({name:We,paperId:st??void 0,path:nt??void 0,locale:N()}).catch(()=>{})},1200);return()=>window.clearTimeout(Ie)},[Ht,We,st,nt]);const bt=(m==null?void 0:m.gitVersion)===null,nn=t==="folder"&&!!zt.trim()&&m!==null&&m.exists===!1,Wt=t==="blank"&&(m==null?void 0:m.exists)===!0,pn=!!zt.trim()&&(m==null?void 0:m.exists)===!0&&m.directory===!1,Dt=t==="paper"&&!!(ee!=null&&ee.repoUrl)&&(m==null?void 0:m.empty)===!1,Nn=t==="paper"&&!!ee&&!(ee!=null&&ee.repoUrl)&&(m==null?void 0:m.empty)===!1,Ut=t==="folder"&&((m==null?void 0:m.gitState)==="detached"||(m==null?void 0:m.gitState)==="invalid"),br=_&&!zt.trim()||pn||Dt||Nn,mn=_&&!zt.trim()||pn||Wt,Xe=_&&!zt.trim()?E7():pn?y7():Wt?Wme():null,xt=_&&!zt.trim()?E7():pn?y7():Dt?F1e():Nn?_me():null,Vn=!!(s.trim()&&zt.trim())&&!C&&!x&&!b&&m!==null&&!S&&!bt&&!nn&&!Wt&&!pn&&!Dt&&!Nn&&!Ut&&(t!=="paper"||!!ee)&&(!I||typeof B=="string"&&!J&&!L),Wn=W??`github.com/${B??"you"}/${V}`,Et=B===void 0||J||L,rt=t==="paper"&&!ee&&Y.trim().length>=3&&le===Y.trim()&&!q&&he.length===0&&!E;return h.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:je,children:[h.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:[h.jsx("button",{type:"button",className:t==="blank"?"active":"","aria-pressed":t==="blank",onClick:()=>kt("blank"),children:Zme()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="paper"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="folder"?"active":"","aria-pressed":t==="folder",onClick:()=>kt("folder"),children:xge()}),h.jsx("span",{"aria-hidden":!0,className:`h-6 w-px bg-border${t==="blank"?"":" invisible"}`}),h.jsx("button",{type:"button",className:t==="paper"?"active":"","aria-pressed":t==="paper",onClick:()=>kt("paper"),children:zge()})]}),t==="paper"&&!ee&&h.jsxs("label",{className:"!font-normal",children:[Zge(),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:Y,onChange:Ie=>{j(null),ge(""),G(Ie.target.value)},placeholder:o1e()}),!rt&&h.jsx("span",{className:"repo-hint",children:q?eve():V1e()}),rt&&h.jsx("span",{className:"project-path-notice block",children:$ge()}),he.length>0&&h.jsx("div",{className:"paper-results",children:he.map(Ie=>h.jsxs("button",{type:"button",onClick:()=>void Lt(Ie.paperId),children:[h.jsx(Qf,{children:Ie.title}),h.jsx("span",{className:"id",children:Ie.paperId})]},Ie.paperId))})]}),ee&&t==="paper"&&h.jsxs("div",{className:"paper-pick !flex-col !items-stretch",children:[h.jsxs("div",{className:"flex items-start justify-between gap-2.5",children:[h.jsxs("div",{className:"meta",children:[h.jsx(Qf,{className:"block",children:ee.title||ee.paperId}),ee.repoUrl&&h.jsx("div",{className:"id",children:Rmt(ee.repoUrl)})]}),h.jsx(Qe,{size:"small",type:"button","aria-label":cge(),onClick:St,children:ige()})]}),!ee.repoUrl&&h.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:[h.jsxs("span",{className:"flex items-center gap-[5px] text-sm",children:[h.jsx(QE,{size:16})," ",Uge()]}),h.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Wge()})]})]}),(t!=="paper"||ee)&&h.jsxs(h.Fragment,{children:[t==="blank"&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:C7()}),h.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:S7()})]}),t==="paper"?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:ee!=null&&ee.repoUrl?Ame():k7()}),h.jsx("input",{className:"text-sm font-normal",value:zt,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},"aria-describedby":br?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:w7()}),br&&h.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:xt})]}):t==="folder"?h.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":c?vme({path:Te(c)}):b7(),disabled:x,title:c||void 0,onClick:()=>void xe(),children:[h.jsx(Hf,{className:c?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),h.jsx("span",{className:c?"text-sm":"placeholder",children:x?Cme():c||b7()}),h.jsx(ja,{className:"folder-picker-chevron",size:15})]}):s.trim()?h.jsxs("label",{className:"project-location-field",children:[h.jsx("span",{className:"project-location-label !font-medium",children:k7()}),h.jsx("input",{className:"text-sm font-normal",value:zt,onChange:Ie=>{f(!0),g(null),d(Ie.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":mn?"blank-destination-description":void 0,spellCheck:!1}),b&&h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:w7()}),mn&&h.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:Xe})]}):null,t!=="blank"&&zt&&h.jsxs("label",{className:"!font-normal",children:[h.jsx("span",{className:"project-field-label !font-medium",children:C7()}),h.jsx("input",{className:"text-sm font-normal",value:s,onChange:Ie=>{l(!0),a(Ie.target.value)},placeholder:S7()})]}),bt&&h.jsx("div",{className:"project-path-notice error",children:Mge()}),!bt&&t==="folder"&&c.trim()&&!b&&(m==null?void 0:m.exists)===!1&&h.jsx("div",{className:"project-path-notice error",children:p1e()}),!bt&&t==="folder"&&c.trim()&&!b&&pn&&h.jsx("div",{className:"project-path-notice error",children:S1e()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="detached"&&h.jsx("div",{className:"project-path-notice error",children:hge()}),!bt&&t==="folder"&&!b&&(m==null?void 0:m.gitState)==="invalid"&&h.jsx("div",{className:"project-path-notice error",children:b1e()}),S&&h.jsx("div",{className:"project-path-notice error",role:"alert",children:S})]}),E&&h.jsx("div",{className:"error",role:"alert",children:E}),(t!=="paper"||ee)&&zt&&(t!=="blank"||s.trim())&&h.jsxs("div",{className:"flex w-full flex-col items-start gap-2",children:[h.jsxs("button",{type:"button",className:`inline-flex items-center gap-1 text-sm font-medium${I&&B===null?" text-accent-red":" text-text"}`,"aria-expanded":T,"aria-controls":"new-project-advanced-settings",onClick:()=>D(Ie=>!Ie),children:[I?B===null?ame():ume():nme(),h.jsx(ta,{className:T?"rotate-180":"",size:16})]}),T&&h.jsxs("label",{id:"new-project-advanced-settings",className:"flex w-full flex-col items-stretch gap-[7px] font-normal",children:[h.jsxs("span",{className:"flex flex-row items-center gap-[9px]",children:[h.jsx("input",{className:"m-0",type:"checkbox",checked:I,onChange:Ie=>P(Ie.target.checked),disabled:C}),h.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:d1e()})]}),h.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[h.jsx("span",{children:Et?N1e({repository:Te(Wn)}):W?L1e({repository:Te(Wn)}):j1e({repository:Te(Wn)})}),h.jsx("span",{children:kge()}),B===null&&h.jsx("span",{children:X1e({command:Te("gh auth login")})})]})]})]}),h.jsxs("div",{className:"actions new-project-actions",children:[n&&h.jsx(Qe,{type:"button",onClick:n,children:tge()}),h.jsx(Qe,{variant:"primary",className:"ms-auto",disabled:!Vn,children:C?Hme():t==="paper"?ee!=null&&ee.repoUrl?Rme():x7():t==="folder"?sve():x7()})]})]})}function RM({onClose:e,onCreated:n}){const t=M.useRef(null),r=M.useRef(e);return r.current=e,M.useEffect(()=>{const s=t.current;if(!s)return;const a=document.activeElement instanceof HTMLElement?document.activeElement:null,o=()=>[...s.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(s.querySelector("[data-initial-focus]")??o()[0]??s).focus();const l=c=>{if(c.key==="Escape"){c.preventDefault(),c.stopPropagation(),r.current();return}if(c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&!c.altKey&&c.shiftKey){c.preventDefault(),c.stopPropagation();return}if(c.key!=="Tab")return;const d=o();if(d.length===0){c.preventDefault(),s.focus();return}const _=d[0],f=d[d.length-1];c.shiftKey&&document.activeElement===_?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),_.focus())};return document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("keydown",l,!0),a==null||a.focus()}},[]),h.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:s=>{s.target===s.currentTarget&&e()},children:h.jsxs("div",{ref:t,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:[h.jsx("h2",{id:"new-project-dialog-title",children:kE()}),h.jsx(Dmt,{onCancel:e,onCreated:n})]})})}function Lmt({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const a=M.useRef(null),o=M.useRef(r),l=M.useRef(n);o.current=r,l.current=n,M.useEffect(()=>{const d=a.current;if(!d)return;const _=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...d.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??d).focus();const m=g=>{if(g.key==="Escape"){g.preventDefault(),l.current||o.current();return}if(g.key!=="Tab")return;const S=f();if(S.length===0){g.preventDefault(),d.focus();return}const k=S[0],b=S[S.length-1];g.shiftKey&&document.activeElement===k?(g.preventDefault(),b.focus()):!g.shiftKey&&document.activeElement===b&&(g.preventDefault(),k.focus())};return document.addEventListener("keydown",m,!0),()=>{document.removeEventListener("keydown",m,!0),_==null||_.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return h.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:d=>{!n&&d.target===d.currentTarget&&r()},children:h.jsxs("div",{ref:a,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:[h.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:i3e()}),h.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[h.jsx("p",{className:"m-0",children:H5e({name:ka(e.name)})}),h.jsx("p",{className:"m-0",children:c?x3e():k3e()}),t&&h.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx(Qe,{disabled:n,onClick:r,children:Z5e()}),h.jsx(Qe,{variant:"danger",disabled:n,onClick:s,children:n?h3e():c3e()})]})]})})}function OC(){return h.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 IC({projects:e,onOpen:n,onCreated:t,onDeleted:r}){const[s,a]=M.useState(!1),[o,l]=M.useState(null),[c,d]=M.useState(null),[_,f]=M.useState(null),[m,g]=M.useState({}),S=M.useRef(0),k=e.map(v=>v.id).join("\0");M.useEffect(()=>{let v=!0,x=null;const y=()=>{x=null;const E=++S.current;NYe().then(j=>{!v||E!==S.current||g(Object.fromEntries(j.map(T=>[T.projectId,T])))}).catch(()=>{})},C=()=>{x===null&&(x=setTimeout(y,100))};y();const A=SZe(C);return()=>{v=!1,A(),x!==null&&clearTimeout(x)}},[k]);async function b(v){l(v.id),d(null);try{await BYe(v.id),d(null),f(null),r(v.id)}catch(x){d(x instanceof Error?x.message:String(x))}finally{l(null)}}return h.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[h.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",children:[h.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:[h.jsx("h2",{children:$3e()}),h.jsxs(Qe,{onClick:()=>a(!0),children:[h.jsx(Tx,{size:15})," ",kE()]})]}),h.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:h.jsxs("div",{children:[h.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:[h.jsx("span",{children:L3e()}),h.jsx("span",{children:R7()}),h.jsx("span",{children:D7()}),h.jsx("span",{children:L7()})]}),e.length===0?h.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:j3e()}):[...e].sort((v,x)=>{var A,E;const y=((A=m[v.id])==null?void 0:A.lastMessageAt)??v.createdAt;return(((E=m[x.id])==null?void 0:E.lastMessageAt)??x.createdAt)-y||v.name.localeCompare(x.name)}).map(v=>{const x=m[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,C=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):X3e(),A=x?x.activeAgents>0?M5e({count:Ft(x.activeAgents)}):V3e():"—",E=x?x.totalAgents===1?e6e():O5e({count:Ft(x.totalAgents)}):"—",j=x?x.runningExperiments>0?s6e({count:Ft(x.runningExperiments)}):x.totalExperiments===0?mx():O7({count:Ft(x.totalExperiments)}):"—",T=x&&x.runningExperiments>0?O7({count:Ft(x.totalExperiments)}):null;return h.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:[h.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":MI({name:ka(v.name)}),onClick:()=>n(v.id)}),h.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:[h.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),h.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[h.jsxs("span",{children:[t3e()," ",Ea(v.createdAt)]}),v.paperId&&h.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&h.jsxs("span",{children:[W5e()," ",Te(v.paperId)]}),h.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":Sb({name:ka(v.name)}),disabled:o===v.id,onClick:D=>{D.stopPropagation(),d(null),f(v)},children:h.jsx(dd,{size:14})})]})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:R7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.activeAgents>0&&h.jsx(OC,{}),A]}),h.jsx("span",{className:"text-xs text-muted",children:E})]}),h.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[h.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:D7()}),h.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[x&&x.runningExperiments>0&&h.jsx(OC,{}),j]}),T&&h.jsx("span",{className:"text-xs text-muted",children:T})]}),h.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[h.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:L7()}),y?h.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":ep({name:ka(v.name)}),children:[h.jsx("span",{className:"inline-flex shrink-0",children:h.jsx(gm,{size:14})}),h.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Te(C)})]}):h.jsx("span",{className:"text-sm text-text pointer-events-none",children:C})]})]},v.id)})]})})]}),s&&h.jsx(RM,{onClose:()=>a(!1),onCreated:(v,x)=>{a(!1),t(v,x)}}),_&&h.jsx(Lmt,{project:_,deleting:o===_.id,error:c,onClose:()=>{d(null),f(null)},onConfirm:()=>void b(_)})]})}function Omt({runs:e,experiments:n,emptyHint:t,onOpen:r,onOpenLogs:s,onOpenCode:a,onCancel:o}){const[l,c]=M.useState(new Set),[d,_]=M.useState(null),f=new Map;for(const S of e){const k=f.get(S.experimentId);k?k.push(S):f.set(S.experimentId,[S])}for(const S of f.values())S.sort((k,b)=>b.createdAt-k.createdAt);const m=[...n].sort((S,k)=>{var x,y,C,A;const b=((y=(x=f.get(S.id))==null?void 0:x[0])==null?void 0:y.createdAt)??S.createdAt;return(((A=(C=f.get(k.id))==null?void 0:C[0])==null?void 0:A.createdAt)??k.createdAt)-b});if(m.length===0)return h.jsx("div",{className:"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]: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 experiments-empty-state [&_p]:text-2xl",children:h.jsx("p",{children:t??Nce()})});async function g(S){_(null),c(k=>new Set(k).add(S));try{await o(S)}catch(k){c(b=>{const v=new Set(b);return v.delete(S),v}),_(k instanceof Error?k.message:String(k))}}return h.jsxs("div",{className:"experiments-table-wrap absolute inset-0 overflow-auto bg-background @container",children:[d&&h.jsxs("div",{className:"experiments-table-error py-2 px-3 text-accent-red text-sm border-b border-b-border",role:"alert",children:[hue()," ",d]}),h.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":iue(),children:m.map(S=>{const k=f.get(S.id)??[],b=k[0]??null,v=k.find(A=>A.status==="running"||A.status==="starting"),x=v??b,y=!!(v&&(v.cancelRequested||l.has(v.id))),C=v?y?"cancelling":Li(v):b?Li(b):"idle";return h.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:()=>r(S,"preview"),onDoubleClick:()=>r(S,"keepOpen"),onAuxClick:A=>{A.button===1&&(A.preventDefault(),r(S,"keepOpen"))},children:[h.jsxs("div",{className:"experiment-table-name [grid-area:name] self-start min-w-0",children:[h.jsx("button",{type:"button",className:"experiment-table-title block w-full overflow-hidden text-text font-semibold text-start text-ellipsis whitespace-nowrap",...gr(A=>r(S,A),{stopPropagation:!0}),children:S.title||S.slug}),h.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:S.branchName,children:[h.jsx(Fp,{size:14,"aria-hidden":"true"}),h.jsx("code",{children:S.branchName})]})]}),h.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:[h.jsx("div",{className:"experiment-table-status flex items-center min-w-0",children:h.jsx(bo,{status:C})}),h.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:h.jsx("span",{children:k.length===1?Lce():Uce({count:Ft(k.length)})})}),h.jsx("div",{className:"experiment-table-latest flex items-center gap-1.5 min-w-0 text-subtext text-sm font-medium whitespace-nowrap",children:h.jsx("span",{children:b?Ea(b.createdAt):jce()})})]}),h.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":_O({name:S.title||S.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[h.jsxs(Qe,{size:"small",disabled:!x,title:x?$ce():Sce(),...gr(A=>{x&&s(S.id,x.id,A)},{stopPropagation:!0}),children:[h.jsx(Yu,{size:15}),cue()]}),h.jsxs(Qe,{size:"small",title:tE({branch:Te(S.branchName)}),...gr(A=>a(S.id,A),{stopPropagation:!0}),children:[h.jsx(Pp,{size:15}),tue()]}),v&&h.jsxs(Qe,{size:"small",variant:"danger",className:"[@container((max-width:_560px))]:ms-auto",disabled:y,title:y?Wce():Zce(),onClick:()=>void g(v.id),children:[h.jsx(JE,{size:15}),y?Mse():dE()]})]})]},S.id)})})]})}function Imt({onClose:e,onCreateProject:n}){const[t,r]=M.useState(!1),[s,a]=M.useState(null),o=M.useRef(null),l=M.useCallback(c=>{t||(r(!0),a(null),c().catch(()=>a(Nqe())).finally(()=>r(!1)))},[t]);return M.useEffect(()=>{const c=d=>{d.key==="Escape"&&(d.preventDefault(),d.stopPropagation(),l(e))};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[e,l]),M.useEffect(()=>{const c=o.current;if(!c)return;const d=document.activeElement instanceof HTMLElement?document.activeElement:null,_=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(_()[0]??c).focus();const f=m=>{if(m.key!=="Tab")return;const g=_();if(g.length===0){m.preventDefault(),c.focus();return}const S=g[0],k=g[g.length-1];m.shiftKey&&document.activeElement===S?(m.preventDefault(),k.focus()):!m.shiftKey&&document.activeElement===k&&(m.preventDefault(),S.focus())};return document.addEventListener("keydown",f,!0),()=>{document.removeEventListener("keydown",f,!0),d==null||d.focus()}},[]),Kp.createPortal(h.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",children:h.jsxs("div",{ref:o,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:[h.jsx(Jt,{className:"absolute end-3.5 top-3.5","aria-label":rqe(),onClick:()=>l(e),disabled:t,children:h.jsx(_s,{size:16})}),h.jsxs("div",{className:"mb-5 flex items-center gap-3 pe-8",children:[h.jsx("span",{className:"block h-9 w-9 shrink-0 [&_svg]:block [&_svg]:h-full [&_svg]:w-full",children:h.jsx(Ix,{})}),h.jsxs("div",{children:[h.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:dqe()}),h.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:Lqe()})]})]}),h.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[h.jsxs("p",{dir:"auto",children:[jqe()," ",h.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:Sqe()}),JUe()]}),h.jsx("p",{dir:"auto",children:bqe()})]}),s&&h.jsx("p",{className:"mt-3 mb-0 text-sm text-accent-red",children:s}),h.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-end gap-2.5",children:[h.jsx(Qe,{onClick:()=>l(n),disabled:t,children:oqe()}),h.jsx(Qe,{variant:"primary",onClick:()=>l(e),disabled:t,children:t?Ta():pqe()})]})]})}),document.body)}function Lr(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Om(){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}})}G0.prototype=Om.prototype={constructor:G0,on:function(e,n){var t=this._,r=$mt(e+"",t),s,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var t=new Array(s),r=0,s,a;r=0&&(n=e.slice(0,t))!=="xmlns"&&(e=e.slice(t+1)),$C.hasOwnProperty(n)?{space:$C[n],local:e}:e}function Pmt(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===Y2&&n.documentElement.namespaceURI===Y2?n.createElement(e):n.createElementNS(t,e)}}function Fmt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function DM(e){var n=Im(e);return(n.local?Fmt:Pmt)(n)}function Umt(){}function N4(e){return e==null?Umt:function(){return this.querySelector(e)}}function qmt(e){typeof e!="function"&&(e=N4(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=y&&(y=x+1);!(A=b[y])&&++y=0;)(o=r[s])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function pgt(e){e||(e=mgt);function n(f,m){return f&&m?e(f.__data__,m.__data__):!f-!m}for(var t=this._groups,r=t.length,s=new Array(r),a=0;an?1:e>=n?0:NaN}function ggt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function vgt(){return Array.from(this)}function bgt(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?Tgt:typeof n=="function"?Mgt:jgt)(e,n,t??"")):sd(this.node(),e)}function sd(e,n){return e.style.getPropertyValue(n)||$M(e).getComputedStyle(e,null).getPropertyValue(n)}function Dgt(e){return function(){delete this[e]}}function Lgt(e,n){return function(){this[e]=n}}function Ogt(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function Igt(e,n){return arguments.length>1?this.each((n==null?Dgt:typeof n=="function"?Ogt:Lgt)(e,n)):this.node()[e]}function HM(e){return e.trim().split(/^|\s+/)}function z4(e){return e.classList||new PM(e)}function PM(e){this._node=e,this._names=HM(e.getAttribute("class")||"")}PM.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 FM(e,n){for(var t=z4(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function d1t(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,a;t()=>e;function X2(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:a,x:o,y:l,dx:c,dy:d,dispatch:_}){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:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:_}})}X2.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function y1t(e){return!e.ctrlKey&&!e.button}function w1t(){return this.parentNode}function S1t(e,n){return n??{x:e.x,y:e.y}}function k1t(){return navigator.maxTouchPoints||"ontouchstart"in this}function KM(){var e=y1t,n=w1t,t=S1t,r=k1t,s={},a=Om("start","drag","end"),o=0,l,c,d,_,f=0;function m(C){C.on("mousedown.drag",g).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,x1t).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(C,A){if(!(_||!e.call(this,C,A))){var E=y(this,n.call(this,C,A),C,A,"mouse");E&&(ci(C.view).on("mousemove.drag",S,ih).on("mouseup.drag",k,ih),VM(C.view),ob(C),d=!1,l=C.clientX,c=C.clientY,E("start",C))}}function S(C){if(Fu(C),!d){var A=C.clientX-l,E=C.clientY-c;d=A*A+E*E>f}s.mouse("drag",C)}function k(C){ci(C.view).on("mousemove.drag mouseup.drag",null),WM(C.view,d),Fu(C),s.mouse("end",C)}function b(C,A){if(e.call(this,C,A)){var E=C.changedTouches,j=n.call(this,C,A),T=E.length,D,I;for(D=0;D>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):t===8?C0(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?C0(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=E1t.exec(e))?new Ks(n[1],n[2],n[3],1):(n=N1t.exec(e))?new Ks(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=z1t.exec(e))?C0(n[1],n[2],n[3],n[4]):(n=A1t.exec(e))?C0(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=T1t.exec(e))?VC(n[1],n[2]/100,n[3]/100,1):(n=j1t.exec(e))?VC(n[1],n[2]/100,n[3]/100,n[4]):HC.hasOwnProperty(e)?UC(HC[e]):e==="transparent"?new Ks(NaN,NaN,NaN,0):null}function UC(e){return new Ks(e>>16&255,e>>8&255,e&255,1)}function C0(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ks(e,n,t,r)}function D1t(e){return e instanceof Oh||(e=xc(e)),e?(e=e.rgb(),new Ks(e.r,e.g,e.b,e.opacity)):new Ks}function Z2(e,n,t,r){return arguments.length===1?D1t(e):new Ks(e,n,t,r??1)}function Ks(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}A4(Ks,Z2,YM(Oh,{brighter(e){return e=e==null?Ep:Math.pow(Ep,e),new Ks(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ah:Math.pow(ah,e),new Ks(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ks(mc(this.r),mc(this.g),mc(this.b),Np(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:qC,formatHex:qC,formatHex8:L1t,formatRgb:GC,toString:GC}));function qC(){return`#${uc(this.r)}${uc(this.g)}${uc(this.b)}`}function L1t(){return`#${uc(this.r)}${uc(this.g)}${uc(this.b)}${uc((isNaN(this.opacity)?1:this.opacity)*255)}`}function GC(){const e=Np(this.opacity);return`${e===1?"rgb(":"rgba("}${mc(this.r)}, ${mc(this.g)}, ${mc(this.b)}${e===1?")":`, ${e})`}`}function Np(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uc(e){return e=mc(e),(e<16?"0":"")+e.toString(16)}function VC(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new Ki(e,n,t,r)}function XM(e){if(e instanceof Ki)return new Ki(e.h,e.s,e.l,e.opacity);if(e instanceof Oh||(e=xc(e)),!e)return new Ki;if(e instanceof Ki)return e;e=e.rgb();var n=e.r/255,t=e.g/255,r=e.b/255,s=Math.min(n,t,r),a=Math.max(n,t,r),o=NaN,l=a-s,c=(a+s)/2;return l?(n===a?o=(t-r)/l+(t0&&c<1?0:o,new Ki(o,l,c,e.opacity)}function O1t(e,n,t,r){return arguments.length===1?XM(e):new Ki(e,n,t,r??1)}function Ki(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}A4(Ki,O1t,YM(Oh,{brighter(e){return e=e==null?Ep:Math.pow(Ep,e),new Ki(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ah:Math.pow(ah,e),new Ki(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 Ks(lb(e>=240?e-240:e+120,s,r),lb(e,s,r),lb(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new Ki(WC(this.h),E0(this.s),E0(this.l),Np(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=Np(this.opacity);return`${e===1?"hsl(":"hsla("}${WC(this.h)}, ${E0(this.s)*100}%, ${E0(this.l)*100}%${e===1?")":`, ${e})`}`}}));function WC(e){return e=(e||0)%360,e<0?e+360:e}function E0(e){return Math.max(0,Math.min(1,e||0))}function lb(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 T4=e=>()=>e;function I1t(e,n){return function(t){return e+t*n}}function B1t(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 $1t(e){return(e=+e)==1?ZM:function(n,t){return t-n?B1t(n,t,e):T4(isNaN(n)?t:n)}}function ZM(e,n){var t=n-e;return t?I1t(e,t):T4(isNaN(e)?n:e)}const zp=(function e(n){var t=$1t(n);function r(s,a){var o=t((s=Z2(s)).r,(a=Z2(a)).r),l=t(s.g,a.g),c=t(s.b,a.b),d=ZM(s.opacity,a.opacity);return function(_){return s.r=o(_),s.g=l(_),s.b=c(_),s.opacity=d(_),s+""}}return r.gamma=e,r})(1);function H1t(e,n){n||(n=[]);var t=e?Math.min(n.length,e.length):0,r=n.slice(),s;return function(a){for(s=0;st&&(a=n.slice(t,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:ya(r,s)})),t=cb.lastIndex;return t180?_+=360:_-d>180&&(d+=360),m.push({i:f.push(s(f)+"rotate(",null,r)-2,x:ya(d,_)})):_&&f.push(s(f)+"rotate("+_+r)}function l(d,_,f,m){d!==_?m.push({i:f.push(s(f)+"skewX(",null,r)-2,x:ya(d,_)}):_&&f.push(s(f)+"skewX("+_+r)}function c(d,_,f,m,g,S){if(d!==f||_!==m){var k=g.push(s(g)+"scale(",null,",",null,")");S.push({i:k-4,x:ya(d,f)},{i:k-2,x:ya(_,m)})}else(f!==1||m!==1)&&g.push(s(g)+"scale("+f+","+m+")")}return function(d,_){var f=[],m=[];return d=e(d),_=e(_),a(d.translateX,d.translateY,_.translateX,_.translateY,f,m),o(d.rotate,_.rotate,f,m),l(d.skewX,_.skewX,f,m),c(d.scaleX,d.scaleY,_.scaleX,_.scaleY,f,m),d=_=null,function(g){for(var S=-1,k=m.length,b;++S=0&&e._call.call(void 0,n),e=e._next;--id}function XC(){yc=(Tp=lh.now())+Bm,id=Cf=0;try{tvt()}finally{id=0,rvt(),yc=0}}function nvt(){var e=lh.now(),n=e-Tp;n>tR&&(Bm-=n,Tp=e)}function rvt(){for(var e,n=Ap,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:Ap=t);Ef=e,ex(r)}function ex(e){if(!id){Cf&&(Cf=clearTimeout(Cf));var n=e-yc;n>24?(e<1/0&&(Cf=setTimeout(XC,e-lh.now()-Bm)),gf&&(gf=clearInterval(gf))):(gf||(Tp=lh.now(),gf=setInterval(nvt,tR)),id=1,nR(XC))}}function ZC(e,n,t){var r=new jp;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var svt=Om("start","end","cancel","interrupt"),ivt=[],sR=0,QC=1,tx=2,W0=3,JC=4,nx=5,K0=6;function $m(e,n,t,r,s,a){var o=e.__transition;if(!o)e.__transition={};else if(t in o)return;avt(e,t,{name:n,index:r,group:s,on:svt,tween:ivt,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:sR})}function M4(e,n){var t=na(e,n);if(t.state>sR)throw new Error("too late; already scheduled");return t}function Ia(e,n){var t=na(e,n);if(t.state>W0)throw new Error("too late; already running");return t}function na(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function avt(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=rR(a,0,t.time);function a(d){t.state=QC,t.timer.restart(o,t.delay,t.time),t.delay<=d&&o(d-t.delay)}function o(d){var _,f,m,g;if(t.state!==QC)return c();for(_ in r)if(g=r[_],g.name===t.name){if(g.state===W0)return ZC(o);g.state===JC?(g.state=K0,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[_]):+_tx&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function Ovt(e,n,t){var r,s,a=Lvt(n)?M4:Ia;return function(){var o=a(this,e),l=o.on;l!==r&&(s=(r=l).copy()).on(n,t),o.on=s}}function Ivt(e,n){var t=this._id;return arguments.length<2?na(this.node(),t).on.on(e):this.each(Ovt(t,e,n))}function Bvt(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function $vt(){return this.on("end.remove",Bvt(this._id))}function Hvt(e){var n=this._name,t=this._id;typeof e!="function"&&(e=N4(e));for(var r=this._groups,s=r.length,a=new Array(s),o=0;o()=>e;function dbt(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 go(e,n,t){this.k=e,this.x=n,this.y=t}go.prototype={constructor:go,scale:function(e){return e===1?this:new go(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new go(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 Hm=new go(1,0,0);lR.prototype=go.prototype;function lR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Hm;return e.__zoom}function ub(e){e.stopImmediatePropagation()}function vf(e){e.preventDefault(),e.stopImmediatePropagation()}function fbt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function hbt(){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 e9(){return this.__zoom||Hm}function _bt(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function pbt(){return navigator.maxTouchPoints||"ontouchstart"in this}function mbt(e,n,t){var r=e.invertX(n[0][0])-t[0][0],s=e.invertX(n[1][0])-t[1][0],a=e.invertY(n[0][1])-t[0][1],o=e.invertY(n[1][1])-t[1][1];return e.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function cR(){var e=fbt,n=hbt,t=mbt,r=_bt,s=pbt,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=V0,d=Om("start","zoom","end"),_,f,m,g=500,S=150,k=0,b=10;function v(V){V.property("__zoom",e9).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",I).filter(s).on("touchstart.zoom",P).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(V,X,W,Z){var J=V.selection?V.selection():V;J.property("__zoom",e9),V!==J?A(V,X,W,Z):J.interrupt().each(function(){E(this,arguments).event(Z).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},v.scaleBy=function(V,X,W,Z){v.scaleTo(V,function(){var J=this.__zoom.k,$=typeof X=="function"?X.apply(this,arguments):X;return J*$},W,Z)},v.scaleTo=function(V,X,W,Z){v.transform(V,function(){var J=n.apply(this,arguments),$=this.__zoom,L=W==null?C(J):typeof W=="function"?W.apply(this,arguments):W,H=$.invert(L),Y=typeof X=="function"?X.apply(this,arguments):X;return t(y(x($,Y),L,H),J,o)},W,Z)},v.translateBy=function(V,X,W,Z){v.transform(V,function(){return t(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof W=="function"?W.apply(this,arguments):W),n.apply(this,arguments),o)},null,Z)},v.translateTo=function(V,X,W,Z,J){v.transform(V,function(){var $=n.apply(this,arguments),L=this.__zoom,H=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(Hm.translate(H[0],H[1]).scale(L.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof W=="function"?-W.apply(this,arguments):-W),$,o)},Z,J)};function x(V,X){return X=Math.max(a[0],Math.min(a[1],X)),X===V.k?V:new go(X,V.x,V.y)}function y(V,X,W){var Z=X[0]-W[0]*V.k,J=X[1]-W[1]*V.k;return Z===V.x&&J===V.y?V:new go(V.k,Z,J)}function C(V){return[(+V[0][0]+ +V[1][0])/2,(+V[0][1]+ +V[1][1])/2]}function A(V,X,W,Z){V.on("start.zoom",function(){E(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){E(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,$=arguments,L=E(J,$).event(Z),H=n.apply(J,$),Y=W==null?C(H):typeof W=="function"?W.apply(J,$):W,G=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),ee=J.__zoom,oe=typeof X=="function"?X.apply(J,$):X,he=c(ee.invert(Y).concat(G/ee.k),oe.invert(Y).concat(G/oe.k));return function(ie){if(ie===1)ie=oe;else{var q=he(ie),ne=G/q[2];ie=new go(ne,Y[0]-q[0]*ne,Y[1]-q[1]*ne)}L.zoom(null,ie)}})}function E(V,X,W){return!W&&V.__zooming||new j(V,X)}function j(V,X){this.that=V,this.args=X,this.active=0,this.sourceEvent=null,this.extent=n.apply(V,X),this.taps=0}j.prototype={event:function(V){return V&&(this.sourceEvent=V),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(V,X){return this.mouse&&V!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&V!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&V!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(V){var X=ci(this.that).datum();d.call(V,this.that,new dbt(V,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:d}),X)}};function T(V,...X){if(!e.apply(this,arguments))return;var W=E(this,X).event(V),Z=this.__zoom,J=Math.max(a[0],Math.min(a[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=Vi(V);if(W.wheel)(W.mouse[0][0]!==$[0]||W.mouse[0][1]!==$[1])&&(W.mouse[1]=Z.invert(W.mouse[0]=$)),clearTimeout(W.wheel);else{if(Z.k===J)return;W.mouse=[$,Z.invert($)],Y0(this),W.start()}vf(V),W.wheel=setTimeout(L,S),W.zoom("mouse",t(y(x(Z,J),W.mouse[0],W.mouse[1]),W.extent,o));function L(){W.wheel=null,W.end()}}function D(V,...X){if(m||!e.apply(this,arguments))return;var W=V.currentTarget,Z=E(this,X,!0).event(V),J=ci(V.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",G,!0),$=Vi(V,W),L=V.clientX,H=V.clientY;VM(V.view),ub(V),Z.mouse=[$,this.__zoom.invert($)],Y0(this),Z.start();function Y(ee){if(vf(ee),!Z.moved){var oe=ee.clientX-L,he=ee.clientY-H;Z.moved=oe*oe+he*he>k}Z.event(ee).zoom("mouse",t(y(Z.that.__zoom,Z.mouse[0]=Vi(ee,W),Z.mouse[1]),Z.extent,o))}function G(ee){J.on("mousemove.zoom mouseup.zoom",null),WM(ee.view,Z.moved),vf(ee),Z.event(ee).end()}}function I(V,...X){if(e.apply(this,arguments)){var W=this.__zoom,Z=Vi(V.changedTouches?V.changedTouches[0]:V,this),J=W.invert(Z),$=W.k*(V.shiftKey?.5:2),L=t(y(x(W,$),Z,J),n.apply(this,X),o);vf(V),l>0?ci(this).transition().duration(l).call(A,L,Z,V):ci(this).call(v.transform,L,Z,V)}}function P(V,...X){if(e.apply(this,arguments)){var W=V.touches,Z=W.length,J=E(this,X,V.changedTouches.length===Z).event(V),$,L,H,Y;for(ub(V),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.`},ch=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],uR=["Enter"," ","Escape"],dR={"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 ad;(function(e){e.Strict="strict",e.Loose="loose"})(ad||(ad={}));var gc;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(gc||(gc={}));var uh;(function(e){e.Partial="partial",e.Full="full"})(uh||(uh={}));const fR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var gl;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(gl||(gl={}));var Mp;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Mp||(Mp={}));var mt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(mt||(mt={}));const t9={[mt.Left]:mt.Right,[mt.Right]:mt.Left,[mt.Top]:mt.Bottom,[mt.Bottom]:mt.Top};function hR(e){return e===null?null:e?"valid":"invalid"}const _R=e=>"id"in e&&"source"in e&&"target"in e,gbt=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),D4=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Ih=(e,n=[0,0])=>{const{width:t,height:r}=To(e),s=e.origin??n,a=t*s[0],o=r*s[1];return{x:e.position.x-a,y:e.position.y-o}},vbt=(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 a=typeof s=="string";let o=!n.nodeLookup&&!a?s:void 0;n.nodeLookup&&(o=a?n.nodeLookup.get(s):D4(s)?s:n.nodeLookup.get(s.id));const l=o?Rp(o,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Pm(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Fm(t)},Bh=(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=Pm(t,Rp(s)),r=!0)}),r?Fm(t):{x:0,y:0,width:0,height:0}},L4=(e,n,[t,r,s]=[0,0,1],a=!1,o=!1)=>{const l=(n.x-t)/s,c=(n.y-r)/s,d=n.width/s,_=n.height/s,f=[];for(const m of e.values()){const{measured:g,selectable:S=!0,hidden:k=!1}=m;if(o&&!S||k)continue;const b=g.width??m.width??m.initialWidth??0,v=g.height??m.height??m.initialHeight??0,{x,y}=m.internals.positionAbsolute,C=vR(l,c,d,_,x,y,b,v),A=b*v,E=a&&C>0;(!m.internals.handleBounds||E||C>=A||m.dragging)&&f.push(m)}return f},bbt=(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 xbt(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 ybt({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:a},o){if(e.size===0)return!0;const l=xbt(e,o),c=Bh(l),d=I4(c,n,t,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(d,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),!0}function pR({nodeId:e,nextPosition:n,nodeLookup:t,nodeOrigin:r=[0,0],nodeExtent:s,onError:a}){const o=t.get(e),l=o.parentId?t.get(o.parentId):void 0,{x:c,y:d}=l?l.internals.positionAbsolute:{x:0,y:0},_=o.origin??r;let f=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",ea.error005());else{const g=l.measured.width,S=l.measured.height;g&&S&&(f=[[c,d],[c+g,d+S]])}else l&&Sc(o.extent)&&(f=[[o.extent[0][0]+c,o.extent[0][1]+d],[o.extent[1][0]+c,o.extent[1][1]+d]]);const m=Sc(f)?wc(n,f,o.measured):n;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ea.error015())),{position:{x:m.x-c+(o.measured.width??0)*_[0],y:m.y-d+(o.measured.height??0)*_[1]},positionAbsolute:m}}async function wbt({nodesToRemove:e=[],edgesToRemove:n=[],nodes:t,edges:r,onBeforeDelete:s}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of t){if(m.deletable===!1)continue;const g=a.has(m.id),S=!g&&m.parentId&&o.find(k=>k.id===m.parentId);(g||S)&&o.push(m)}const l=new Set(n.map(m=>m.id)),c=r.filter(m=>m.deletable!==!1),_=bbt(o,c);for(const m of c)l.has(m.id)&&!_.find(S=>S.id===m.id)&&_.push(m);if(!s)return{edges:_,nodes:o};const f=await s({nodes:o,edges:_});return typeof f=="boolean"?f?{edges:_,nodes:o}:{edges:[],nodes:[]}:f}const od=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),wc=(e={x:0,y:0},n,t)=>({x:od(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:od(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function mR(e,n,t){const{width:r,height:s}=To(t),{x:a,y:o}=t.internals.positionAbsolute;return wc(e,[[a,o],[a+r,o+s]],n)}const n9=(e,n,t)=>et?-od(Math.abs(e-t),1,n)/n:0,O4=(e,n,t=15,r=40)=>{const s=n9(e.x,r,n.width-r)*t,a=n9(e.y,r,n.height-r)*t;return[s,a]},Pm=(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)}),rx=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),Fm=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),dh=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=D4(e)?e.internals.positionAbsolute:Ih(e,n);return{x:t,y:r,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},Rp=(e,n=[0,0])=>{var s,a;const{x:t,y:r}=D4(e)?e.internals.positionAbsolute:Ih(e,n);return{x:t,y:r,x2:t+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},gR=(e,n)=>Fm(Pm(rx(e),rx(n))),vR=(e,n,t,r,s,a,o,l)=>{const c=Math.max(0,Math.min(e+t,s+o)-Math.max(e,s)),d=Math.max(0,Math.min(n+r,a+l)-Math.max(n,a));return Math.ceil(c*d)},Dp=(e,n)=>vR(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),r9=e=>Yi(e.width)&&Yi(e.height)&&Yi(e.x)&&Yi(e.y),Yi=e=>!isNaN(e)&&isFinite(e),bR=(e,n)=>(t,r)=>{},$h=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Hh=({x:e,y:n},[t,r,s],a=!1,o=[1,1])=>{const l={x:(e-t)/s,y:(n-r)/s};return a?$h(l,o):l},ld=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function wu(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 Sbt(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=wu(e,t),s=wu(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=wu(e.top??e.y??0,t),s=wu(e.bottom??e.y??0,t),a=wu(e.left??e.x??0,n),o=wu(e.right??e.x??0,n);return{top:r,right:o,bottom:s,left:a,x:a+o,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function kbt(e,n,t,r,s,a){const{x:o,y:l}=ld(e,[n,t,r]),{x:c,y:d}=ld({x:e.x+e.width,y:e.y+e.height},[n,t,r]),_=s-c,f=a-d;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(_),bottom:Math.floor(f)}}const I4=(e,n,t,r,s,a)=>{const o=Sbt(a,n,t),l=(n-o.x)/e.width,c=(t-o.y)/e.height,d=Math.min(l,c),_=od(d,r,s),f=e.x+e.width/2,m=e.y+e.height/2,g=n/2-f*_,S=t/2-m*_,k=kbt(e,g,S,_,n,t),b={left:Math.min(k.left-o.left,0),top:Math.min(k.top-o.top,0),right:Math.min(k.right-o.right,0),bottom:Math.min(k.bottom-o.bottom,0)};return{x:g-b.left+b.right,y:S-b.top+b.bottom,zoom:_}},fh=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Sc(e){return e!=null&&e!=="parent"}function To(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 xR(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 yR(e,n={width:0,height:0},t,r,s){const a={...e},o=r.get(t);if(o){const l=o.origin||s;a.x+=o.internals.positionAbsolute.x-(n.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(n.height??0)*l[1]}return a}function s9(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function Cbt(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function Ebt(e){return{...dR,...e||{}}}function Lf(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:a,y:o}=Xi(e),l=Hh({x:a-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},r),{x:c,y:d}=t?$h(l,n):l;return{xSnapped:c,ySnapped:d,...l}}const B4=e=>({width:e.offsetWidth,height:e.offsetHeight}),wR=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},Nbt=["INPUT","SELECT","TEXTAREA"];function SR(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:Nbt.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const kR=e=>"clientX"in e,Xi=(e,n)=>{var a,o;const t=kR(e),r=t?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,s=t?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((n==null?void 0:n.left)??0),y:s-((n==null?void 0:n.top)??0)}},i9=(e,n,t,r,s)=>{const a=n.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(l.left-t.left)/r,y:(l.top-t.top)/r,...B4(o)}})};function CR({sourceX:e,sourceY:n,targetX:t,targetY:r,sourceControlX:s,sourceControlY:a,targetControlX:o,targetControlY:l}){const c=e*.125+s*.375+o*.375+t*.125,d=n*.125+a*.375+l*.375+r*.125,_=Math.abs(c-e),f=Math.abs(d-n);return[c,d,_,f]}function A0(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function a9({pos:e,x1:n,y1:t,x2:r,y2:s,c:a}){switch(e){case mt.Left:return[n-A0(n-r,a),t];case mt.Right:return[n+A0(r-n,a),t];case mt.Top:return[n,t-A0(t-s,a)];case mt.Bottom:return[n,t+A0(s-t,a)]}}function ER({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top,curvature:o=.25}){const[l,c]=a9({pos:t,x1:e,y1:n,x2:r,y2:s,c:o}),[d,_]=a9({pos:a,x1:r,y1:s,x2:e,y2:n,c:o}),[f,m,g,S]=CR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:_});return[`M${e},${n} C${l},${c} ${d},${_} ${r},${s}`,f,m,g,S]}function NR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,a=t0}const Tbt=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,jbt=(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)),Mbt=(e,n,t={})=>{var a;if(!e.source||!e.target)return(a=t.onError)==null||a.call(t,"006",ea.error006()),n;const r=t.getEdgeId||Tbt;let s;return _R(e)?s={...e}:s={...e,id:r(e)},jbt(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function zR({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,a,o,l]=NR({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,a,o,l]}const o9={[mt.Left]:{x:-1,y:0},[mt.Right]:{x:1,y:0},[mt.Top]:{x:0,y:-1},[mt.Bottom]:{x:0,y:1}},Rbt=({source:e,sourcePosition:n=mt.Bottom,target:t})=>n===mt.Left||n===mt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function Dbt({source:e,sourcePosition:n=mt.Bottom,target:t,targetPosition:r=mt.Top,center:s,offset:a,stepPosition:o}){const l=o9[n],c=o9[r],d={x:e.x+l.x*a,y:e.y+l.y*a},_={x:t.x+c.x*a,y:t.y+c.y*a},f=Rbt({source:d,sourcePosition:n,target:_}),m=f.x!==0?"x":"y",g=f[m];let S=[],k,b;const v={x:0,y:0},x={x:0,y:0},[,,y,C]=NR({sourceX:e.x,sourceY:e.y,targetX:t.x,targetY:t.y});if(l[m]*c[m]===-1){m==="x"?(k=s.x??d.x+(_.x-d.x)*o,b=s.y??(d.y+_.y)/2):(k=s.x??(d.x+_.x)/2,b=s.y??d.y+(_.y-d.y)*o);const T=[{x:k,y:d.y},{x:k,y:_.y}],D=[{x:d.x,y:b},{x:_.x,y:b}];l[m]===g?S=m==="x"?T:D:S=m==="x"?D:T}else{const T=[{x:d.x,y:_.y}],D=[{x:_.x,y:d.y}];if(m==="x"?S=l.x===g?D:T:S=l.y===g?T:D,n===r){const V=Math.abs(e[m]-t[m]);if(V<=a){const X=Math.min(a-1,a-V);l[m]===g?v[m]=(d[m]>e[m]?-1:1)*X:x[m]=(_[m]>t[m]?-1:1)*X}}if(n!==r){const V=m==="x"?"y":"x",X=l[m]===c[V],W=d[V]>_[V],Z=d[V]<_[V];(l[m]===1&&(!X&&W||X&&Z)||l[m]!==1&&(!X&&Z||X&&W))&&(S=m==="x"?T:D)}const I={x:d.x+v.x,y:d.y+v.y},P={x:_.x+x.x,y:_.y+x.y},B=Math.max(Math.abs(I.x-S[0].x),Math.abs(P.x-S[0].x)),F=Math.max(Math.abs(I.y-S[0].y),Math.abs(P.y-S[0].y));B>=F?(k=(I.x+P.x)/2,b=S[0].y):(k=S[0].x,b=(I.y+P.y)/2)}const A={x:d.x+v.x,y:d.y+v.y},E={x:_.x+x.x,y:_.y+x.y};return[[e,...A.x!==S[0].x||A.y!==S[0].y?[A]:[],...S,...E.x!==S[S.length-1].x||E.y!==S[S.length-1].y?[E]:[],t],k,b,y,C]}function Lbt(e,n,t,r){const s=Math.min(l9(e,n)/2,l9(n,t)/2,r),{x:a,y:o}=n;if(e.x===a&&a===t.x||e.y===o&&o===t.y)return`L${a} ${o}`;if(e.y===o){const d=e.xt.id===n):e[0])||null}function ix(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function Ibt(e,{id:n,defaultColor:t,defaultMarkerStart:r,defaultMarkerEnd:s}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const d=ix(c,n);a.has(d)||(o.push({id:d,color:c.color||t,...c}),a.add(d))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const AR=1e3,Bbt=10,$4={nodeOrigin:[0,0],nodeExtent:ch,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},$bt={...$4,checkEquality:!0};function H4(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function Hbt(e,n,t){const r=H4($4,t);for(const s of e.values())if(s.parentId)F4(s,e,n,r);else{const a=Ih(s,r.nodeOrigin),o=Sc(s.extent)?s.extent:r.nodeExtent,l=wc(a,o,To(s));s.internals.positionAbsolute=l}}function Pbt(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 a={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(a):s.type==="target"&&r.push(a)}return{source:t,target:r}}function P4(e){return e==="manual"}function ax(e,n,t,r={}){var _,f;const s=H4($bt,r),a={i:0},o=new Map(n),l=s!=null&&s.elevateNodesOnSelect&&!P4(s.zIndexMode)?AR:0;let c=e.length>0,d=!1;n.clear(),t.clear();for(const m of e){let g=o.get(m.id);if(s.checkEquality&&m===(g==null?void 0:g.internals.userNode))n.set(m.id,g);else{const S=Ih(m,s.nodeOrigin),k=Sc(m.extent)?m.extent:s.nodeExtent,b=wc(S,k,To(m));g={...s.defaults,...m,measured:{width:(_=m.measured)==null?void 0:_.width,height:(f=m.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:Pbt(m,g),z:TR(m,l,s.zIndexMode),userNode:m}},n.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(c=!1),m.parentId&&F4(g,n,t,r,a),d||(d=m.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:d}}function Fbt(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 F4(e,n,t,r,s){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:c}=H4($4,r),d=e.parentId,_=n.get(d);if(!_){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Fbt(e,t),s&&!_.parentId&&_.internals.rootParentIndex===void 0&&c==="auto"&&(_.internals.rootParentIndex=++s.i,_.internals.z=_.internals.z+s.i*Bbt),s&&_.internals.rootParentIndex!==void 0&&(s.i=_.internals.rootParentIndex);const f=a&&!P4(c)?AR:0,{x:m,y:g,z:S}=Ubt(e,_,o,l,f,c),{positionAbsolute:k}=e.internals,b=m!==k.x||g!==k.y;(b||S!==e.internals.z)&&n.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:m,y:g}:k,z:S}})}function TR(e,n,t){const r=Yi(e.zIndex)?e.zIndex:0;return P4(t)?r:r+(e.selected?n:0)}function Ubt(e,n,t,r,s,a){const{x:o,y:l}=n.internals.positionAbsolute,c=To(e),d=Ih(e,t),_=Sc(e.extent)?wc(d,e.extent,c):d;let f=wc({x:o+_.x,y:l+_.y},r,c);e.extent==="parent"&&(f=mR(f,c,n));const m=TR(e,s,a),g=n.internals.z??0;return{x:f.x,y:f.y,z:g>=m?g+1:m}}function U4(e,n,t,r=[0,0]){var o;const s=[],a=new Map;for(const l of e){const c=n.get(l.parentId);if(!c)continue;const d=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??dh(c),_=gR(d,l.rect);a.set(l.parentId,{expandedRect:_,parent:c})}return a.size>0&&a.forEach(({expandedRect:l,parent:c},d)=>{var y;const _=c.internals.positionAbsolute,f=To(c),m=c.origin??r,g=l.x<_.x?Math.round(Math.abs(_.x-l.x)):0,S=l.y<_.y?Math.round(Math.abs(_.y-l.y)):0,k=Math.max(f.width,Math.round(l.width)),b=Math.max(f.height,Math.round(l.height)),v=(k-f.width)*m[0],x=(b-f.height)*m[1];(g>0||S>0||v||x)&&(s.push({id:d,type:"position",position:{x:c.position.x-g+v,y:c.position.y-S+x}}),(y=t.get(d))==null||y.forEach(C=>{e.some(A=>A.id===C.id)||s.push({id:C.id,type:"position",position:{x:C.position.x+g,y:C.position.y+S}})})),(f.width0){const g=U4(m,n,t,s);d.push(...g)}return{changes:d,updatedInternals:c}}async function Gbt({delta:e,panZoom:n,transform:t,translateExtent:r,width:s,height:a}){if(!n||!e.x&&!e.y)return!1;const o=await n.setViewportConstrained({x:t[0]+e.x,y:t[1]+e.y,zoom:t[2]},[[0,0],[s,a]],r);return!!o&&(o.x!==t[0]||o.y!==t[1]||o.k!==t[2])}function f9(e,n,t,r,s,a){let o=s;const l=r.get(o)||new Map;r.set(o,l.set(t,n)),o=`${s}-${e}`;const c=r.get(o)||new Map;if(r.set(o,c.set(t,n)),a){o=`${s}-${e}-${a}`;const d=r.get(o)||new Map;r.set(o,d.set(t,n))}}function jR(e,n,t){e.clear(),n.clear();for(const r of t){const{source:s,target:a,sourceHandle:o=null,targetHandle:l=null}=r,c={edgeId:r.id,source:s,target:a,sourceHandle:o,targetHandle:l},d=`${s}-${o}--${a}-${l}`,_=`${a}-${l}--${s}-${o}`;f9("source",c,_,e,s,o),f9("target",c,d,e,a,l),n.set(r.id,r)}}function MR(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:MR(t,n):!1}function h9(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 Vbt(e,n,t,r){const s=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!MR(o,e))&&(o.draggable||n&&typeof o.draggable>"u")){const l=e.get(a);l&&s.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:t.x-l.internals.positionAbsolute.x,y:t.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function db({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var o,l,c;const s=[];for(const[d,_]of n){const f=(o=t.get(d))==null?void 0:o.internals.userNode;f&&s.push({...f,position:_.position,dragging:r})}if(!e)return[s[0],s];const a=(l=t.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((c=n.get(e))==null?void 0:c.position)||a.position,dragging:r}:s[0],s]}function Wbt({dragItems:e,snapGrid:n,x:t,y:r}){const s=e.values().next().value;if(!s)return null;const a={x:t-s.distance.x,y:r-s.distance.y},o=$h(a,n);return{x:o.x-a.x,y:o.y-a.y}}function Kbt({onNodeMouseDown:e,getStoreItems:n,onDragStart:t,onDrag:r,onDragStop:s}){let a={x:null,y:null},o=0,l=new Map,c=!1,d={x:0,y:0},_=null,f=!1,m=null,g=!1,S=!1,k=null;function b({noDragClassName:x,handleSelector:y,domNode:C,isSelectable:A,nodeId:E,nodeClickDistance:j=0}){m=ci(C);function T({x:B,y:F}){const{nodeLookup:V,nodeExtent:X,snapGrid:W,snapToGrid:Z,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:H,updateNodePositions:Y}=n();a={x:B,y:F};let G=!1;const ee=l.size>1,oe=ee&&X?rx(Bh(l)):null,he=ee&&Z?Wbt({dragItems:l,snapGrid:W,x:B,y:F}):null;for(const[ie,q]of l){if(!V.has(ie))continue;let ne={x:B-q.distance.x,y:F-q.distance.y};Z&&(ne=he?{x:Math.round(ne.x+he.x),y:Math.round(ne.y+he.y)}:$h(ne,W));let le=null;if(ee&&X&&!q.extent&&oe){const{positionAbsolute:Ce}=q.internals,Ee=Ce.x-oe.x+X[0][0],Le=Ce.x+q.measured.width-oe.x2+X[1][0],Pe=Ce.y-oe.y+X[0][1],Ve=Ce.y+q.measured.height-oe.y2+X[1][1];le=[[Ee,Pe],[Le,Ve]]}const{position:ge,positionAbsolute:ue}=pR({nodeId:ie,nextPosition:ne,nodeLookup:V,nodeExtent:le||X,nodeOrigin:J,onError:H});G=G||q.position.x!==ge.x||q.position.y!==ge.y,q.position=ge,q.internals.positionAbsolute=ue}if(S=S||G,!!G&&(Y(l,!0),k&&(r||$||!E&&L))){const[ie,q]=db({nodeId:E,dragItems:l,nodeLookup:V});r==null||r(k,l,ie,q),$==null||$(k,ie,q),E||L==null||L(k,q)}}async function D(){if(!_)return;const{transform:B,panBy:F,autoPanSpeed:V,autoPanOnNodeDrag:X}=n();if(!X){c=!1,cancelAnimationFrame(o);return}const[W,Z]=O4(d,_,V);(W!==0||Z!==0)&&(a.x=(a.x??0)-W/B[2],a.y=(a.y??0)-Z/B[2],await F({x:W,y:Z})&&T(a)),o=requestAnimationFrame(D)}function I(B){var ee;const{nodeLookup:F,multiSelectionActive:V,nodesDraggable:X,transform:W,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:H,unselectNodesAndEdges:Y}=n();f=!0,(!$||!A)&&!V&&E&&((ee=F.get(E))!=null&&ee.selected||Y()),A&&$&&E&&(e==null||e(E));const G=Lf(B.sourceEvent,{transform:W,snapGrid:Z,snapToGrid:J,containerBounds:_});if(a=G,l=Vbt(F,X,G,E),l.size>0&&(t||L||!E&&H)){const[oe,he]=db({nodeId:E,dragItems:l,nodeLookup:F});t==null||t(B.sourceEvent,l,oe,he),L==null||L(B.sourceEvent,oe,he),E||H==null||H(B.sourceEvent,he)}}const P=KM().clickDistance(j).on("start",B=>{const{domNode:F,nodeDragThreshold:V,transform:X,snapGrid:W,snapToGrid:Z}=n();_=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,S=!1,k=B.sourceEvent,V===0&&I(B),a=Lf(B.sourceEvent,{transform:X,snapGrid:W,snapToGrid:Z,containerBounds:_}),d=Xi(B.sourceEvent,_)}).on("drag",B=>{const{autoPanOnNodeDrag:F,transform:V,snapGrid:X,snapToGrid:W,nodeDragThreshold:Z,nodeLookup:J}=n(),$=Lf(B.sourceEvent,{transform:V,snapGrid:X,snapToGrid:W,containerBounds:_});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||E&&!J.has(E))&&(g=!0),!g){if(!c&&F&&f&&(c=!0,D()),!f){const L=Xi(B.sourceEvent,_),H=L.x-d.x,Y=L.y-d.y;Math.sqrt(H*H+Y*Y)>Z&&I(B)}(a.x!==$.xSnapped||a.y!==$.ySnapped)&&l&&f&&(d=Xi(B.sourceEvent,_),T($))}}).on("end",B=>{if(!f||g){g&&l.size>0&&n().updateNodePositions(l,!1);return}if(c=!1,f=!1,cancelAnimationFrame(o),l.size>0){const{nodeLookup:F,updateNodePositions:V,onNodeDragStop:X,onSelectionDragStop:W}=n();if(S&&(V(l,!1),S=!1),s||X||!E&&W){const[Z,J]=db({nodeId:E,dragItems:l,nodeLookup:F,dragging:!1});s==null||s(B.sourceEvent,l,Z,J),X==null||X(B.sourceEvent,Z,J),E||W==null||W(B.sourceEvent,J)}}}).filter(B=>{const F=B.target;return!B.button&&(!x||!h9(F,`.${x}`,C))&&(!y||h9(F,y,C))});m.call(P)}function v(){m==null||m.on(".drag",null)}return{update:b,destroy:v}}function Ybt(e,n,t){const r=[],s={x:e.x-t,y:e.y-t,width:t*2,height:t*2};for(const a of n.values())Dp(s,dh(a))>0&&r.push(a);return r}const Xbt=250;function Zbt(e,n,t,r){var l,c;let s=[],a=1/0;const o=Ybt(e,t,n+Xbt);for(const d of o){const _=[...((l=d.internals.handleBounds)==null?void 0:l.source)??[],...((c=d.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of _){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:m,y:g}=kc(d,f,f.position,!0),S=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));S>n||(S1){const d=r.type==="source"?"target":"source";return s.find(_=>_.type===d)??s[0]}return s[0]}function RR(e,n,t,r,s,a=!1){var d,_,f;const o=r.get(e);if(!o)return null;const l=s==="strict"?(d=o.internals.handleBounds)==null?void 0:d[n]:[...((_=o.internals.handleBounds)==null?void 0:_.source)??[],...((f=o.internals.handleBounds)==null?void 0:f.target)??[]],c=(t?l==null?void 0:l.find(m=>m.id===t):l==null?void 0:l[0])??null;return c&&a?{...c,...kc(o,c,c.position,!0)}:c}function DR(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function Qbt(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const LR=()=>!0;function Jbt(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:c,lib:d,autoPanOnConnect:_,flowId:f,panBy:m,cancelConnection:g,onConnectStart:S,onConnect:k,onConnectEnd:b,isValidConnection:v=LR,onReconnectEnd:x,updateConnection:y,getTransform:C,getFromHandle:A,autoPanSpeed:E,dragThreshold:j=1,handleDomNode:T}){const D=wR(e.target);let I=0,P;const{x:B,y:F}=Xi(e),V=DR(a,T),X=l==null?void 0:l.getBoundingClientRect();let W=!1;if(!X||!V)return;const Z=RR(s,V,r,c,n);if(!Z)return;let J=Xi(e,X),$=!1,L=null,H=!1,Y=null;function G(){if(!_||!X)return;const[ge,ue]=O4(J,X,E);m({x:ge,y:ue}),I=requestAnimationFrame(G)}const ee={...Z,nodeId:s,type:V,position:Z.position},oe=c.get(s);let ie={inProgress:!0,isValid:null,from:kc(oe,ee,mt.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:oe,to:J,toHandle:null,toPosition:t9[ee.position],toNode:null,pointer:J};function q(){W=!0,y(ie),S==null||S(e,{nodeId:s,handleId:r,handleType:V})}j===0&&q();function ne(ge){if(!W){const{x:Ve,y:ht}=Xi(ge),Be=Ve-B,wt=ht-F;if(!(Be*Be+wt*wt>j*j))return;q()}if(!A()||!ee){le(ge);return}const ue=C();J=Xi(ge,X),P=Zbt(Hh(J,ue,!1,[1,1]),t,c,ee),$||(G(),$=!0);const Ce=OR(ge,{handle:P,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:o?"target":"source",isValidConnection:v,doc:D,lib:d,flowId:f,nodeLookup:c});Y=Ce.handleDomNode,L=Ce.connection,H=Qbt(!!P,Ce.isValid);const Ee=c.get(s),Le=Ee?kc(Ee,ee,mt.Left,!0):ie.from,Pe={...ie,from:Le,isValid:H,to:Ce.toHandle&&H?ld({x:Ce.toHandle.x,y:Ce.toHandle.y},ue):J,toHandle:Ce.toHandle,toPosition:H&&Ce.toHandle?Ce.toHandle.position:t9[ee.position],toNode:Ce.toHandle?c.get(Ce.toHandle.nodeId):null,pointer:J};y(Pe),ie=Pe}function le(ge){if(!("touches"in ge&&ge.touches.length>0)){if(W){(P||Y)&&L&&H&&(k==null||k(L));const{inProgress:ue,...Ce}=ie,Ee={...Ce,toPosition:ie.toHandle?ie.toPosition:null};b==null||b(ge,Ee),a&&(x==null||x(ge,Ee))}g(),cancelAnimationFrame(I),$=!1,H=!1,L=null,Y=null,D.removeEventListener("mousemove",ne),D.removeEventListener("mouseup",le),D.removeEventListener("touchmove",ne),D.removeEventListener("touchend",le)}}D.addEventListener("mousemove",ne),D.addEventListener("mouseup",le),D.addEventListener("touchmove",ne),D.addEventListener("touchend",le)}function OR(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:a,doc:o,lib:l,flowId:c,isValidConnection:d=LR,nodeLookup:_}){const f=a==="target",m=n?o.querySelector(`.${l}-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:g,y:S}=Xi(e),k=o.elementFromPoint(g,S),b=k!=null&&k.classList.contains(`${l}-flow__handle`)?k:m,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const x=DR(void 0,b),y=b.getAttribute("data-nodeid"),C=b.getAttribute("data-handleid"),A=b.classList.contains("connectable"),E=b.classList.contains("connectableend");if(!y||!x)return v;const j={source:f?y:r,sourceHandle:f?C:s,target:f?r:y,targetHandle:f?s:C};v.connection=j;const D=A&&E&&(t===ad.Strict?f&&x==="source"||!f&&x==="target":y!==r||C!==s);v.isValid=D&&d(j),v.toHandle=RR(y,x,C,_,t,!0)}return v}const ox={onPointerDown:Jbt,isValid:OR};function e2t({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=ci(e);function a({translateExtent:l,width:c,height:d,zoomStep:_=1,pannable:f=!0,zoomable:m=!0,inversePan:g=!1}){const S=y=>{if(y.sourceEvent.type!=="wheel"||!n)return;const C=t(),A=y.sourceEvent.ctrlKey&&fh()?10:1,E=-y.sourceEvent.deltaY*(y.sourceEvent.deltaMode===1?.05:y.sourceEvent.deltaMode?1:.002)*_,j=C[2]*Math.pow(2,E*A);n.scaleTo(j)};let k=[0,0];const b=y=>{(y.sourceEvent.type==="mousedown"||y.sourceEvent.type==="touchstart")&&(k=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY])},v=y=>{const C=t();if(y.sourceEvent.type!=="mousemove"&&y.sourceEvent.type!=="touchmove"||!n)return;const A=[y.sourceEvent.clientX??y.sourceEvent.touches[0].clientX,y.sourceEvent.clientY??y.sourceEvent.touches[0].clientY],E=[A[0]-k[0],A[1]-k[1]];k=A;const j=r()*Math.max(C[2],Math.log(C[2]))*(g?-1:1),T={x:C[0]-E[0]*j,y:C[1]-E[1]*j},D=[[0,0],[c,d]];n.setViewportConstrained({x:T.x,y:T.y,zoom:C[2]},D,l)},x=cR().on("start",b).on("zoom",f?v:null).on("zoom.wheel",m?S:null);s.call(x,{})}function o(){s.on("zoom",null)}return{update:a,destroy:o,pointer:Vi}}const Um=e=>({x:e.x,y:e.y,zoom:e.k}),fb=({x:e,y:n,zoom:t})=>Hm.translate(e,n).scale(t),Du=(e,n)=>e.target.closest(`.${n}`),IR=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),t2t=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,hb=(e,n=0,t=t2t,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},BR=e=>{const n=e.ctrlKey&&fh()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function n2t({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:d}){return _=>{if(Du(_,n))return _.ctrlKey&&_.preventDefault(),!1;_.preventDefault(),_.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(_.ctrlKey&&o){const b=Vi(_),v=BR(_),x=f*Math.pow(2,v);r.scaleTo(t,x,b,_);return}const m=_.deltaMode===1?20:1;let g=s===gc.Vertical?0:_.deltaX*m,S=s===gc.Horizontal?0:_.deltaY*m;!fh()&&_.shiftKey&&s!==gc.Vertical&&(g=_.deltaY*m,S=0),r.translateBy(t,-(g/f)*a,-(S/f)*a,{internal:!0});const k=Um(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(_,k),e.panScrollTimeout=setTimeout(()=>{d==null||d(_,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(_,k))}}function r2t({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const a=r.type==="wheel",o=!n&&a&&!r.ctrlKey,l=Du(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),t.call(this,r,s)}}function s2t({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const s=Um(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&n(!0),t&&(t==null||t(r.sourceEvent,s))}}function i2t({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return a=>{var o,l;e.usedRightMouseButton=!!(t&&IR(n,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),s&&!((l=a.sourceEvent)!=null&&l.internal)&&(s==null||s(a.sourceEvent,Um(a.transform)))}}function a2t({zoomPanValues:e,panOnDrag:n,panOnScroll:t,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&IR(n,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=Um(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,c)},t?150:0)}}}function o2t({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:d,connectionInProgress:_}){return f=>{var b;const m=e||n,g=t&&f.ctrlKey,S=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Du(f,`${d}-flow__node`)||Du(f,`${d}-flow__edge`)))return!0;if(!r&&!m&&!s&&!a&&!t||o||_&&!S||Du(f,l)&&S||Du(f,c)&&(!S||s&&S&&!e)||!t&&f.ctrlKey&&S)return!1;if(!t&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!m&&!s&&!g&&S||!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||S)&&k}}function l2t({domNode:e,minZoom:n,maxZoom:t,translateExtent:r,viewport:s,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},_=e.getBoundingClientRect(),f=cR().scaleExtent([n,t]).translateExtent(r),m=ci(e).call(f);x({x:s.x,y:s.y,zoom:od(s.zoom,n,t)},[[0,0],[_.width,_.height]],r);const g=m.on("wheel.zoom"),S=m.on("dblclick.zoom");f.wheelDelta(BR);async function k(P,B){return m?new Promise(F=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?Df:V0).transform(hb(m,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>F(!0)),P)}):!1}function b({noWheelClassName:P,noPanClassName:B,onPaneContextMenu:F,userSelectionActive:V,panOnScroll:X,panOnDrag:W,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:H,zoomOnDoubleClick:Y,zoomActivationKeyPressed:G,lib:ee,onTransformChange:oe,connectionInProgress:he,paneClickDistance:ie,selectionOnDrag:q}){V&&!d.isZoomingOrPanning&&v();const ne=X&&!G&&!V;f.clickDistance(q?1/0:!Yi(ie)||ie<0?0:ie);const le=ne?n2t({zoomPanValues:d,noWheelClassName:P,d3Selection:m,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):r2t({noWheelClassName:P,preventScrolling:$,d3ZoomHandler:g});m.on("wheel.zoom",le,{passive:!1});const ge=s2t({zoomPanValues:d,onDraggingChange:c,onPanZoomStart:o});f.on("start",ge);const ue=i2t({zoomPanValues:d,panOnDrag:W,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:oe});f.on("zoom",ue);const Ce=a2t({zoomPanValues:d,panOnDrag:W,panOnScroll:X,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});f.on("end",Ce);const Ee=o2t({zoomActivationKeyPressed:G,panOnDrag:W,zoomOnScroll:H,panOnScroll:X,zoomOnDoubleClick:Y,zoomOnPinch:L,userSelectionActive:V,noPanClassName:B,noWheelClassName:P,lib:ee,connectionInProgress:he});f.filter(Ee),Y?m.on("dblclick.zoom",S):m.on("dblclick.zoom",null)}function v(){f.on("zoom",null)}async function x(P,B,F){const V=fb(P),X=f==null?void 0:f.constrain()(V,B,F);return X&&await k(X),X}async function y(P,B){const F=fb(P);return await k(F,B),F}function C(P){if(m){const B=fb(P),F=m.property("__zoom");(F.k!==P.zoom||F.x!==P.x||F.y!==P.y)&&(f==null||f.transform(m,B,null,{sync:!0}))}}function A(){const P=m?lR(m.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}async function E(P,B){return m?new Promise(F=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?Df:V0).scaleTo(hb(m,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>F(!0)),P)}):!1}async function j(P,B){return m?new Promise(F=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?Df:V0).scaleBy(hb(m,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>F(!0)),P)}):!1}function T(P){f==null||f.scaleExtent(P)}function D(P){f==null||f.translateExtent(P)}function I(P){const B=!Yi(P)||P<0?0:P;f==null||f.clickDistance(B)}return{update:b,destroy:v,setViewport:y,setViewportConstrained:x,getViewport:A,scaleTo:E,scaleBy:j,setScaleExtent:T,setTranslateExtent:D,syncViewport:C,setClickDistance:I}}var cd;(function(e){e.Line="line",e.Handle="handle"})(cd||(cd={}));function c2t({width:e,prevWidth:n,height:t,prevHeight:r,affectsX:s,affectsY:a}){const o=e-n,l=t-r,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&s&&(c[0]=c[0]*-1),l&&a&&(c[1]=c[1]*-1),c}function _9(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 _l(e,n){return Math.max(0,n-e)}function pl(e,n){return Math.max(0,e-n)}function T0(e,n,t){return Math.max(0,n-e,e-t)}function p9(e,n){return e?!n:n}function u2t(e,n,t,r,s,a,o,l){let{affectsX:c,affectsY:d}=n;const{isHorizontal:_,isVertical:f}=n,m=_&&f,{xSnapped:g,ySnapped:S}=t,{minWidth:k,maxWidth:b,minHeight:v,maxHeight:x}=r,{x:y,y:C,width:A,height:E,aspectRatio:j}=e;let T=Math.floor(_?g-e.pointerX:0),D=Math.floor(f?S-e.pointerY:0);const I=A+(c?-T:T),P=E+(d?-D:D),B=-a[0]*A,F=-a[1]*E;let V=T0(I,k,b),X=T0(P,v,x);if(o){let J=0,$=0;c&&T<0?J=_l(y+T+B,o[0][0]):!c&&T>0&&(J=pl(y+I+B,o[1][0])),d&&D<0?$=_l(C+D+F,o[0][1]):!d&&D>0&&($=pl(C+P+F,o[1][1])),V=Math.max(V,J),X=Math.max(X,$)}if(l){let J=0,$=0;c&&T>0?J=pl(y+T,l[0][0]):!c&&T<0&&(J=_l(y+I,l[1][0])),d&&D>0?$=pl(C+D,l[0][1]):!d&&D<0&&($=_l(C+P,l[1][1])),V=Math.max(V,J),X=Math.max(X,$)}if(s){if(_){const J=T0(I/j,v,x)*j;if(V=Math.max(V,J),o){let $=0;!c&&!d||c&&!d&&m?$=pl(C+F+I/j,o[1][1])*j:$=_l(C+F+(c?T:-T)/j,o[0][1])*j,V=Math.max(V,$)}if(l){let $=0;!c&&!d||c&&!d&&m?$=_l(C+I/j,l[1][1])*j:$=pl(C+(c?T:-T)/j,l[0][1])*j,V=Math.max(V,$)}}if(f){const J=T0(P*j,k,b)/j;if(X=Math.max(X,J),o){let $=0;!c&&!d||d&&!c&&m?$=pl(y+P*j+B,o[1][0])/j:$=_l(y+(d?D:-D)*j+B,o[0][0])/j,X=Math.max(X,$)}if(l){let $=0;!c&&!d||d&&!c&&m?$=_l(y+P*j,l[1][0])/j:$=pl(y+(d?D:-D)*j,l[0][0])/j,X=Math.max(X,$)}}}D=D+(D<0?X:-X),T=T+(T<0?V:-V),s&&(m?I>P*j?D=(p9(c,d)?-T:T)/j:T=(p9(c,d)?-D:D)*j:_?(D=T/j,d=c):(T=D*j,c=d));const W=c?y+T:y,Z=d?C+D:C;return{width:A+(c?-T:T),height:E+(d?-D:D),x:a[0]*T*(c?-1:1)+W,y:a[1]*D*(d?-1:1)+Z}}const $R={width:0,height:0,x:0,y:0},d2t={...$R,pointerX:0,pointerY:0,aspectRatio:1};function f2t(e,n,t){const r=n.position.x+e.position.x,s=n.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=t[0]*a,c=t[1]*o;return[[r-l,s-c],[r+a-l,s+o-c]]}function h2t({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const a=ci(e);let o={controlDirection:_9("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:d,boundaries:_,keepAspectRatio:f,resizeDirection:m,onResizeStart:g,onResize:S,onResizeEnd:k,shouldResize:b}){let v={...$R},x={...d2t};o={boundaries:_,resizeDirection:m,keepAspectRatio:f,controlDirection:_9(d)};let y,C=null,A=[],E,j,T,D=!1;const I=KM().on("start",P=>{const{nodeLookup:B,transform:F,snapGrid:V,snapToGrid:X,nodeOrigin:W,paneDomNode:Z}=t();if(y=B.get(n),!y)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=Lf(P.sourceEvent,{transform:F,snapGrid:V,snapToGrid:X,containerBounds:C});v={width:y.measured.width??0,height:y.measured.height??0,x:y.position.x??0,y:y.position.y??0},x={...v,pointerX:J,pointerY:$,aspectRatio:v.width/v.height},E=void 0,j=Sc(y.extent)?y.extent:void 0,y.parentId&&(y.extent==="parent"||y.expandParent)&&(E=B.get(y.parentId)),E&&y.extent==="parent"&&(j=[[0,0],[E.measured.width,E.measured.height]]),A=[],T=void 0;for(const[L,H]of B)if(H.parentId===n&&(A.push({id:L,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const Y=f2t(H,y,H.origin??W);T?T=[[Math.min(Y[0][0],T[0][0]),Math.min(Y[0][1],T[0][1])],[Math.max(Y[1][0],T[1][0]),Math.max(Y[1][1],T[1][1])]]:T=Y}g==null||g(P,{...v})}).on("drag",P=>{const{transform:B,snapGrid:F,snapToGrid:V,nodeOrigin:X}=t(),W=Lf(P.sourceEvent,{transform:B,snapGrid:F,snapToGrid:V,containerBounds:C}),Z=[];if(!y)return;const{x:J,y:$,width:L,height:H}=v,Y={},G=y.origin??X,{width:ee,height:oe,x:he,y:ie}=u2t(x,o.controlDirection,W,o.boundaries,o.keepAspectRatio,G,j,T),q=ee!==L,ne=oe!==H,le=he!==J&&q,ge=ie!==$&≠if(!le&&!ge&&!q&&!ne)return;if((le||ge||G[0]===1||G[1]===1)&&(Y.x=le?he:v.x,Y.y=ge?ie:v.y,v.x=Y.x,v.y=Y.y,A.length>0)){const Le=he-J,Pe=ie-$;for(const Ve of A)Ve.position={x:Ve.position.x-Le+G[0]*(ee-L),y:Ve.position.y-Pe+G[1]*(oe-H)},Z.push(Ve)}if((q||ne)&&(Y.width=q&&(!o.resizeDirection||o.resizeDirection==="horizontal")?ee:v.width,Y.height=ne&&(!o.resizeDirection||o.resizeDirection==="vertical")?oe:v.height,v.width=Y.width,v.height=Y.height),E&&y.expandParent){const Le=G[0]*(Y.width??0);Y.x&&Y.x{D&&(k==null||k(P,{...v}),s==null||s({...v}),D=!1)});a.call(I)}function c(){a.on(".drag",null)}return{update:l,destroy:c}}var _b={exports:{}},pb={},mb={exports:{}},gb={};/** * @license React * use-sync-external-store-shim.production.js * @@ -1057,7 +1058,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var u9;function Kbt(){if(u9)return hb;u9=1;var e=bh();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(f,m){var g=m(),S=r({inst:{value:g,getSnapshot:m}}),k=S[0].inst,b=S[1];return a(function(){k.value=g,k.getSnapshot=m,c(k)&&b({inst:k})},[f,g,m]),s(function(){return c(k)&&b({inst:k}),f(function(){c(k)&&b({inst:k})})},[f]),o(g),g}function c(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!t(f,g)}catch{return!0}}function d(f,m){return m()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return hb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,hb}var d9;function Ybt(){return d9||(d9=1,fb.exports=Kbt()),fb.exports}/** + */var m9;function _2t(){if(m9)return gb;m9=1;var e=yh();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var t=typeof Object.is=="function"?Object.is:n,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(f,m){var g=m(),S=r({inst:{value:g,getSnapshot:m}}),k=S[0].inst,b=S[1];return a(function(){k.value=g,k.getSnapshot=m,c(k)&&b({inst:k})},[f,g,m]),s(function(){return c(k)&&b({inst:k}),f(function(){c(k)&&b({inst:k})})},[f]),o(g),g}function c(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!t(f,g)}catch{return!0}}function d(f,m){return m()}var _=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return gb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:_,gb}var g9;function p2t(){return g9||(g9=1,mb.exports=_2t()),mb.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -1065,12 +1066,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var f9;function Xbt(){if(f9)return db;f9=1;var e=bh(),n=Ybt();function t(d,_){return d===_&&(d!==0||1/d===1/_)||d!==d&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return db.useSyncExternalStoreWithSelector=function(d,_,f,m,g){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=l(function(){function v(E){if(!x){if(x=!0,y=E,E=m(E),g!==void 0&&k.hasValue){var j=k.value;if(g(j,E))return C=j}return C=E}if(j=C,r(y,E))return j;var T=m(E);return g!==void 0&&g(j,T)?(y=E,j):(y=E,C=T)}var x=!1,y,C,A=f===void 0?null:f;return[function(){return v(_())},A===null?void 0:function(){return v(A())}]},[_,f,m,g]);var b=s(d,S[0],S[1]);return o(function(){k.hasValue=!0,k.value=b},[b]),c(b),b},db}var h9;function Zbt(){return h9||(h9=1,ub.exports=Xbt()),ub.exports}var Qbt=Zbt();const Jbt=vh(Qbt),e2t={},_9=e=>{let n;const t=new Set,r=(_,f)=>{const m=typeof _=="function"?_(n):_;if(!Object.is(m,n)){const g=n;n=f??(typeof m!="object"||m===null)?m:Object.assign({},n,m),t.forEach(S=>S(n,g))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>d,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(e2t?"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()}},d=n=e(r,s,c);return c},t2t=e=>e?_9(e):_9,{useDebugValue:n2t}=Ze,{useSyncExternalStoreWithSelector:r2t}=Jbt,s2t=e=>e;function NR(e,n=s2t,t){const r=r2t(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return n2t(r),r}const p9=(e,n)=>{const t=t2t(e),r=(s,a=n)=>NR(t,s,a);return Object.assign(r,t),r},i2t=(e,n)=>e?p9(e,n):p9;function Jn(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 $m=M.createContext(null),a2t=$m.Provider,zR=ea.error001("react");function _n(e,n){const t=M.useContext($m);if(t===null)throw new Error(zR);return NR(t,e,n)}function tr(){const e=M.useContext($m);if(e===null)throw new Error(zR);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const m9={display:"none"},o2t={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},AR="react-flow__node-desc",TR="react-flow__edge-desc",l2t="react-flow__aria-live",c2t=e=>e.ariaLiveMessage,u2t=e=>e.ariaLabelConfig;function d2t({rfId:e}){const n=_n(c2t);return h.jsx("div",{id:`${l2t}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:o2t,children:n})}function f2t({rfId:e,disableKeyboardA11y:n}){const t=_n(u2t);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${AR}-${e}`,style:m9,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${TR}-${e}`,style:m9,children:t["edge.a11yDescription.default"]}),!n&&h.jsx(d2t,{rfId:e})]})}const Hm=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},a)=>{const o=`${e}`.split("-");return h.jsx("div",{className:Rr(["react-flow__panel",t,...o]),style:r,ref:a,...s,children:n})});Hm.displayName="Panel";const g9="https://reactflow.dev?utm_source=attribution";function h2t({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Hm,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${g9}`,children:h.jsx("a",{href:g9,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const _2t=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}},C0=e=>e.id;function p2t(e,n){return Jn(e.selectedNodes.map(C0),n.selectedNodes.map(C0))&&Jn(e.selectedEdges.map(C0),n.selectedEdges.map(C0))}function m2t({onSelectionChange:e}){const n=tr(),{selectedNodes:t,selectedEdges:r}=_n(_2t,p2t);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(a=>a(s))},[t,r,e]),null}const g2t=e=>!!e.onSelectionChangeHandlers;function v2t({onSelectionChange:e}){const n=_n(g2t);return e||n?h.jsx(m2t,{onSelectionChange:e}):null}const jR=[0,0],b2t={x:0,y:0,zoom:1},x2t=["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"],v9=[...x2t,"rfId"],y2t=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}),b9={translateExtent:oh,nodeOrigin:jR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function w2t(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c}=_n(y2t,Jn),d=tr();M.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{_.current=b9,l()}),[]);const _=M.useRef(b9);return M.useEffect(()=>{for(const f of v9){const m=e[f],g=_.current[f];m!==g&&(typeof e[f]>"u"||(f==="nodes"?n(m):f==="edges"?t(m):f==="minZoom"?r(m):f==="maxZoom"?s(m):f==="translateExtent"?a(m):f==="nodeExtent"?o(m):f==="ariaLabelConfig"?d.setState({ariaLabelConfig:abt(m)}):f==="fitView"?d.setState({fitViewQueued:m}):f==="fitViewOptions"?d.setState({fitViewOptions:m}):d.setState({[f]:m})))}_.current=e},v9.map(f=>e[f])),null}function x9(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function S2t(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=x9(),a=()=>t(s!=null&&s.matches?"dark":"light");return a(),s==null||s.addEventListener("change",a),()=>{s==null||s.removeEventListener("change",a)}},[e]),n!==null?n:(r=x9())!=null&&r.matches?"dark":"light"}const y9=typeof document<"u"?document:null;function dh(e=null,n={target:y9,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),a=M.useRef(new Set([])),[o,l]=M.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` + */var v9;function m2t(){if(v9)return pb;v9=1;var e=yh(),n=p2t();function t(d,_){return d===_&&(d!==0||1/d===1/_)||d!==d&&_!==_}var r=typeof Object.is=="function"?Object.is:t,s=n.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return pb.useSyncExternalStoreWithSelector=function(d,_,f,m,g){var S=a(null);if(S.current===null){var k={hasValue:!1,value:null};S.current=k}else k=S.current;S=l(function(){function v(E){if(!x){if(x=!0,y=E,E=m(E),g!==void 0&&k.hasValue){var j=k.value;if(g(j,E))return C=j}return C=E}if(j=C,r(y,E))return j;var T=m(E);return g!==void 0&&g(j,T)?(y=E,j):(y=E,C=T)}var x=!1,y,C,A=f===void 0?null:f;return[function(){return v(_())},A===null?void 0:function(){return v(A())}]},[_,f,m,g]);var b=s(d,S[0],S[1]);return o(function(){k.hasValue=!0,k.value=b},[b]),c(b),b},pb}var b9;function g2t(){return b9||(b9=1,_b.exports=m2t()),_b.exports}var v2t=g2t();const b2t=xh(v2t),x2t={},x9=e=>{let n;const t=new Set,r=(_,f)=>{const m=typeof _=="function"?_(n):_;if(!Object.is(m,n)){const g=n;n=f??(typeof m!="object"||m===null)?m:Object.assign({},n,m),t.forEach(S=>S(n,g))}},s=()=>n,c={setState:r,getState:s,getInitialState:()=>d,subscribe:_=>(t.add(_),()=>t.delete(_)),destroy:()=>{(x2t?"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()}},d=n=e(r,s,c);return c},y2t=e=>e?x9(e):x9,{useDebugValue:w2t}=Ze,{useSyncExternalStoreWithSelector:S2t}=b2t,k2t=e=>e;function HR(e,n=k2t,t){const r=S2t(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return w2t(r),r}const y9=(e,n)=>{const t=y2t(e),r=(s,a=n)=>HR(t,s,a);return Object.assign(r,t),r},C2t=(e,n)=>e?y9(e,n):y9;function er(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 qm=M.createContext(null),E2t=qm.Provider,PR=ea.error001("react");function _n(e,n){const t=M.useContext(qm);if(t===null)throw new Error(PR);return HR(t,e,n)}function nr(){const e=M.useContext(qm);if(e===null)throw new Error(PR);return M.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const w9={display:"none"},N2t={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},FR="react-flow__node-desc",UR="react-flow__edge-desc",z2t="react-flow__aria-live",A2t=e=>e.ariaLiveMessage,T2t=e=>e.ariaLabelConfig;function j2t({rfId:e}){const n=_n(A2t);return h.jsx("div",{id:`${z2t}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:N2t,children:n})}function M2t({rfId:e,disableKeyboardA11y:n}){const t=_n(T2t);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${FR}-${e}`,style:w9,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${UR}-${e}`,style:w9,children:t["edge.a11yDescription.default"]}),!n&&h.jsx(j2t,{rfId:e})]})}const Gm=M.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},a)=>{const o=`${e}`.split("-");return h.jsx("div",{className:Lr(["react-flow__panel",t,...o]),style:r,ref:a,...s,children:n})});Gm.displayName="Panel";const S9="https://reactflow.dev?utm_source=attribution";function R2t({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Gm,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${S9}`,children:h.jsx("a",{href:S9,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const D2t=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}},j0=e=>e.id;function L2t(e,n){return er(e.selectedNodes.map(j0),n.selectedNodes.map(j0))&&er(e.selectedEdges.map(j0),n.selectedEdges.map(j0))}function O2t({onSelectionChange:e}){const n=nr(),{selectedNodes:t,selectedEdges:r}=_n(D2t,L2t);return M.useEffect(()=>{const s={nodes:t,edges:r};e==null||e(s),n.getState().onSelectionChangeHandlers.forEach(a=>a(s))},[t,r,e]),null}const I2t=e=>!!e.onSelectionChangeHandlers;function B2t({onSelectionChange:e}){const n=_n(I2t);return e||n?h.jsx(O2t,{onSelectionChange:e}):null}const qR=[0,0],$2t={x:0,y:0,zoom:1},H2t=["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"],k9=[...H2t,"rfId"],P2t=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}),C9={translateExtent:ch,nodeOrigin:qR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function F2t(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:c}=_n(P2t,er),d=nr();M.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{_.current=C9,l()}),[]);const _=M.useRef(C9);return M.useEffect(()=>{for(const f of k9){const m=e[f],g=_.current[f];m!==g&&(typeof e[f]>"u"||(f==="nodes"?n(m):f==="edges"?t(m):f==="minZoom"?r(m):f==="maxZoom"?s(m):f==="translateExtent"?a(m):f==="nodeExtent"?o(m):f==="ariaLabelConfig"?d.setState({ariaLabelConfig:Ebt(m)}):f==="fitView"?d.setState({fitViewQueued:m}):f==="fitViewOptions"?d.setState({fitViewOptions:m}):d.setState({[f]:m})))}_.current=e},k9.map(f=>e[f])),null}function E9(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function U2t(e){var r;const[n,t]=M.useState(e==="system"?null:e);return M.useEffect(()=>{if(e!=="system"){t(e);return}const s=E9(),a=()=>t(s!=null&&s.matches?"dark":"light");return a(),s==null||s.addEventListener("change",a),()=>{s==null||s.removeEventListener("change",a)}},[e]),n!==null?n:(r=E9())!=null&&r.matches?"dark":"light"}const N9=typeof document<"u"?document:null;function hh(e=null,n={target:N9,actInsideInputWithModifier:!0}){const[t,r]=M.useState(!1),s=M.useRef(!1),a=M.useRef(new Set([])),[o,l]=M.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` `).replace(` `,` +`).split(` -`)),_=d.reduce((f,m)=>f.concat(...m),[]);return[d,_]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(n==null?void 0:n.target)??y9,d=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=g=>{var b,v;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!d)&&uR(g))return!1;const k=S9(g.code,l);if(a.current.add(g[k]),w9(o,a.current,!1)){const x=((v=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:v[0])||g.target,y=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&g.preventDefault(),r(!0)}},f=g=>{const S=S9(g.code,l);w9(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[S]),g.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",_),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",_),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),t}function w9(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function S9(e,n){return n.includes(e)?"code":"key"}const k2t=()=>{const e=tr();return M.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,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??a},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:a,maxZoom:o,panZoom:l}=e.getState(),c=M4(n,r,s,a,o,(t==null?void 0:t.padding)??.1);return l?(await l.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:a,domNode:o}=e.getState();if(!o)return n;const{x:l,y:c}=o.getBoundingClientRect(),d={x:n.x-l,y:n.y-c},_=t.snapGrid??s,f=t.snapToGrid??a;return Bh(d,r,f,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:a}=r.getBoundingClientRect(),o=ad(n,t);return{x:o.x+s,y:o.y+a}}}),[])};function MR(e,n){const t=[],r=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of n){const o=r.get(a.id);if(!o){t.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){t.push({...o[0].item});continue}const l={...a};for(const c of o)C2t(c,l);t.push(l)}return s.length&&s.forEach(a=>{a.index!==void 0?t.splice(a.index,0,{...a.item}):t.push({...a.item})}),t}function C2t(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 E2t(e,n){return MR(e,n)}function N2t(e,n){return MR(e,n)}function ac(e,n){return{id:e,type:"select",selected:n}}function Ru(e,n=new Set,t=!1){const r=[];for(const[s,a]of e){const o=n.has(s);!(a.selected===void 0&&!o)&&a.selected!==o&&(t&&(a.selected=o),r.push(ac(a.id,o)))}return r}function k9({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=n.get(o.id),c=((s=l==null?void 0:l.internals)==null?void 0:s.userNode)??l;c!==void 0&&c!==o&&t.push({id:o.id,item:o,type:"replace"}),c===void 0&&t.push({item:o,type:"add",index:a})}for(const[a]of n)r.get(a)===void 0&&t.push({id:a,type:"remove"});return t}function C9(e){return{id:e.id,type:"remove"}}const z2t=aR();function A2t(e,n,t={}){return fbt(e,n,{...t,onError:t.onError??z2t})}const E9=e=>Zvt(e),T2t=e=>tR(e);function RR(e){return M.forwardRef(e)}const j2t=typeof window<"u"?M.useLayoutEffect:M.useEffect;function N9(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>M2t(()=>t(s=>s+BigInt(1))));return j2t(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function M2t(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const DR=M.createContext(null);function R2t({children:e}){const n=tr(),t=M.useCallback(l=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:_,onNodesChange:f,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:S}=n.getState();let k=c;for(const v of l)k=typeof v=="function"?v(k):v;let b=k9({items:k,lookup:m});for(const v of S.values())b=v(b);_&&d(k),b.length>0?f==null||f(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:x,setNodes:y}=n.getState();v&&y(x)})},[]),r=N9(t),s=M.useCallback(l=>{const{edges:c=[],setEdges:d,hasDefaultEdges:_,onEdgesChange:f,edgeLookup:m}=n.getState();let g=c;for(const S of l)g=typeof S=="function"?S(g):S;_?d(g):f&&f(k9({items:g,lookup:m}))},[]),a=N9(s),o=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return h.jsx(DR.Provider,{value:o,children:e})}function D2t(){const e=M.useContext(DR);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const L2t=e=>!!e.panZoom;function $4(){const e=k2t(),n=tr(),t=D2t(),r=_n(L2t),s=M.useMemo(()=>{const a=f=>n.getState().nodeLookup.get(f),o=f=>{t.nodeQueue.push(f)},l=f=>{t.edgeQueue.push(f)},c=f=>{var v,x;const{nodeLookup:m,nodeOrigin:g}=n.getState(),S=E9(f)?f:m.get(f.id),k=S.parentId?lR(S.position,S.measured,S.parentId,m,g):S.position,b={...S,position:k,width:((v=S.measured)==null?void 0:v.width)??S.width,height:((x=S.measured)==null?void 0:x.height)??S.height};return ch(b)},d=(f,m,g={replace:!1})=>{o(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&E9(b)?b:{...k,...b}}return k}))},_=(f,m,g={replace:!1})=>{l(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&T2t(b)?b:{...k,...b}}return k}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var m;return(m=a(f))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(m=>({...m}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:o,setEdges:l,addNodes:f=>{const m=Array.isArray(f)?f:[f];t.nodeQueue.push(g=>[...g,...m])},addEdges:f=>{const m=Array.isArray(f)?f:[f];t.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:f=[],edges:m=[],transform:g}=n.getState(),[S,k,b]=g;return{nodes:f.map(v=>({...v})),edges:m.map(v=>({...v})),viewport:{x:S,y:k,zoom:b}}},deleteElements:async({nodes:f=[],edges:m=[]})=>{const{nodes:g,edges:S,onNodesDelete:k,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:x,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:A,edges:E}=await nbt({nodesToRemove:f,edgesToRemove:m,nodes:g,edges:S,onBeforeDelete:C}),j=E.length>0,T=A.length>0;if(j){const D=E.map(C9);b==null||b(E),x(D)}if(T){const D=A.map(C9);k==null||k(A),v(D)}return(T||j)&&(y==null||y({nodes:A,edges:E})),{deletedNodes:A,deletedEdges:E}},getIntersectingNodes:(f,m=!0,g)=>{const S=ZC(f),k=S?f:c(f),b=g!==void 0;return k?(g||n.getState().nodes).filter(v=>{const x=n.getState().nodeLookup.get(v.id);if(x&&!S&&(v.id===f.id||!x.internals.positionAbsolute))return!1;const y=ch(b?v:x),C=Ap(y,k);return m&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,m,g=!0)=>{const k=ZC(f)?f:c(f);if(!k)return!1;const b=Ap(k,m);return g&&b>0||b>=m.width*m.height||b>=k.width*k.height},updateNode:d,updateNodeData:(f,m,g={replace:!1})=>{d(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},updateEdge:_,updateEdgeData:(f,m,g={replace:!1})=>{_(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},getNodesBounds:f=>{const{nodeLookup:m,nodeOrigin:g}=n.getState();return Qvt(f,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:f,id:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}-${f}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:f,handleId:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}${f?m?`-${f}-${m}`:`-${f}`:""}`))==null?void 0:S.values())??[])},fitView:async f=>{const m=n.getState().fitViewResolver??ibt();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:m}),t.nodeQueue.push(g=>[...g]),m.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const z9=e=>e.selected,O2t=typeof window<"u"?window:void 0;function I2t({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=tr(),{deleteElements:r}=$4(),s=dh(e,{actInsideInputWithModifier:!1}),a=dh(n,{target:O2t});M.useEffect(()=>{if(s){const{edges:o,nodes:l}=t.getState();r({nodes:l.filter(z9),edges:o.filter(z9)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:a})},[a])}function B2t(e){const n=tr();M.useEffect(()=>{const t=()=>{var s,a,o,l;if(!e.current||!(((a=(s=e.current).checkVisibility)==null?void 0:a.call(s))??!0))return!1;const r=R4(e.current);(r.height===0||r.width===0)&&((l=(o=n.getState()).onError)==null||l.call(o,"004",ea.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 Pm={position:"absolute",width:"100%",height:"100%",top:0,left:0},$2t=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function H2t({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=mc.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:_,maxZoom:f,zoomActivationKeyCode:m,preventScrolling:g=!0,children:S,noWheelClassName:k,noPanClassName:b,onViewportChange:v,isControlledViewport:x,paneClickDistance:y,selectionOnDrag:C}){const A=tr(),E=M.useRef(null),{userSelectionActive:j,lib:T,connectionInProgress:D}=_n($2t,Jn),I=dh(m),P=M.useRef();B2t(E);const H=M.useCallback(F=>{v==null||v({x:F[0],y:F[1],zoom:F[2]}),x||A.setState({transform:F})},[v,x]);return M.useEffect(()=>{if(E.current){P.current=Fbt({domNode:E.current,minZoom:_,maxZoom:f,translateExtent:d,viewport:c,onDraggingChange:W=>A.setState(Z=>Z.paneDragging===W?Z:{paneDragging:W}),onPanZoomStart:(W,Z)=>{const{onViewportChangeStart:J,onMoveStart:B}=A.getState();B==null||B(W,Z),J==null||J(Z)},onPanZoom:(W,Z)=>{const{onViewportChange:J,onMove:B}=A.getState();B==null||B(W,Z),J==null||J(Z)},onPanZoomEnd:(W,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:B}=A.getState();B==null||B(W,Z),J==null||J(Z)}});const{x:F,y:V,zoom:X}=P.current.getViewport();return A.setState({panZoom:P.current,transform:[F,V,X],domNode:E.current.closest(".react-flow")}),()=>{var W;(W=P.current)==null||W.destroy()}}},[]),M.useEffect(()=>{var F;(F=P.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:I,preventScrolling:g,noPanClassName:b,userSelectionActive:j,noWheelClassName:k,lib:T,onTransformChange:H,connectionInProgress:D,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,a,o,l,I,g,b,j,k,T,H,D,C,y]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:Pm,children:S})}const P2t=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function F2t(){const{userSelectionActive:e,userSelectionRect:n}=_n(P2t,Jn);return e&&n?h.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 _b=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},U2t=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function q2t({isSelecting:e,selectionKeyPressed:n,selectionMode:t=lh.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:l,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:_,onPaneScroll:f,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:S,children:k}){const b=M.useRef(0),v=tr(),{userSelectionActive:x,elementsSelectable:y,dragging:C,panBy:A,autoPanSpeed:E}=_n(U2t,Jn),j=y&&(e||x),T=M.useRef(null),D=M.useRef(),I=M.useRef(new Set),P=M.useRef(new Set),H=M.useRef(!1),F=M.useRef(!1),V=M.useRef({x:0,y:0}),X=M.useRef(!1),W=q=>{if(F.current||H.current||v.getState().connection.inProgress){F.current=!1,H.current=!1;return}d==null||d(q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},Z=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}_==null||_(q)},J=f?q=>f(q):void 0,B=q=>{F.current&&(q.stopPropagation(),F.current=!1)},L=q=>{var Ve,ft;const{domNode:te,transform:le}=v.getState();if(D.current=te==null?void 0:te.getBoundingClientRect(),!D.current)return;const ge=q.target===T.current;if(!ge&&!!q.target.closest(".nokey")||!e||!(o&&ge||n)||q.button!==0||!q.isPrimary)return;(ft=(Ve=q.target)==null?void 0:Ve.setPointerCapture)==null||ft.call(Ve,q.pointerId),F.current=!1;const{x:Ee,y:Le}=Xi(q.nativeEvent,D.current),Pe=Bh({x:Ee,y:Le},le);v.setState({userSelectionRect:{width:0,height:0,startX:Pe.x,startY:Pe.y,x:Ee,y:Le}}),ge||(q.stopPropagation(),q.preventDefault())};function $(q,te){const{userSelectionRect:le}=v.getState();if(!le)return;const{transform:ge,nodeLookup:ue,edgeLookup:Ce,connectionLookup:Ee,triggerNodeChanges:Le,triggerEdgeChanges:Pe,defaultEdgeOptions:Ve}=v.getState(),ft={x:le.startX,y:le.startY},{x:Be,y:wt}=ad(ft,ge),At={startX:ft.x,startY:ft.y,x:qkt.id)),P.current=new Set;const St=(Ve==null?void 0:Ve.selectable)??!0;for(const kt of I.current){const xe=Ee.get(kt);if(xe)for(const{edgeId:je}of xe.values()){const We=Ce.get(je);We&&(We.selectable??St)&&P.current.add(je)}}if(!QC(vt,I.current)){const kt=Ru(ue,I.current,!0);Le(kt)}if(!QC(Ot,P.current)){const kt=Ru(Ce,P.current);Pe(kt)}v.setState({userSelectionRect:At,userSelectionActive:!0,nodesSelectionActive:!1})}function K(){if(!s||!D.current)return;const[q,te]=j4(V.current,D.current,E);A({x:q,y:te}).then(le=>{if(!F.current||!le){b.current=requestAnimationFrame(K);return}const{x:ge,y:ue}=V.current;$(ge,ue),b.current=requestAnimationFrame(K)})}const G=()=>{cancelAnimationFrame(b.current),b.current=0,X.current=!1};M.useEffect(()=>()=>G(),[]);const re=q=>{const{userSelectionRect:te,transform:le,resetSelectedElements:ge}=v.getState();if(!D.current||!te)return;const{x:ue,y:Ce}=Xi(q.nativeEvent,D.current);V.current={x:ue,y:Ce};const Ee=ad({x:te.startX,y:te.startY},le);if(!F.current){const Le=n?0:a;if(Math.hypot(ue-Ee.x,Ce-Ee.y)<=Le)return;ge(),l==null||l(q)}F.current=!0,X.current||(K(),X.current=!0),$(ue,Ce)},oe=q=>{var te,le;if(!j){q.target===T.current&&v.getState().connection.inProgress&&(H.current=!0);return}q.button===0&&((le=(te=q.target)==null?void 0:te.releasePointerCapture)==null||le.call(te,q.pointerId),!x&&q.target===T.current&&v.getState().userSelectionRect&&(W==null||W(q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(c==null||c(q),v.setState({nodesSelectionActive:I.current.size>0})),G())},he=q=>{var te,le;(le=(te=q.target)==null?void 0:te.releasePointerCapture)==null||le.call(te,q.pointerId),G()},ie=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Rr(["react-flow__pane",{draggable:ie,dragging:C,selection:e}]),onClick:j?void 0:_b(W,T),onContextMenu:_b(Z,T),onWheel:_b(J,T),onPointerEnter:j?void 0:m,onPointerMove:j?re:g,onPointerUp:oe,onPointerCancel:j?he:void 0,onPointerDownCapture:j?L:void 0,onClickCapture:j?B:void 0,onPointerLeave:S,ref:T,style:Pm,children:[k,h.jsx(F2t,{})]})}function rx({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=n.getState(),d=l.get(e);if(!d){c==null||c("012",ea.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(t||d.selected&&o)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function LR({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:a,nodeClickDistance:o}){const l=tr(),[c,d]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=zbt({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{rx({id:f,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:s,nodeClickDistance:o}),()=>{var f;(f=_.current)==null||f.destroy()}},[t,r,n,a,e,s,o]),c}const G2t=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function OR(){const e=tr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:d,nodeOrigin:_}=e.getState(),f=new Map,m=G2t(o),g=s?a[0]:5,S=s?a[1]:5,k=t.direction.x*g*t.factor,b=t.direction.y*S*t.factor;for(const[,v]of d){if(!m(v))continue;let x={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+b};s&&(x=Ih(x,a));const{position:y,positionAbsolute:C}=nR({nodeId:v.id,nextPosition:x,nodeLookup:d,nodeExtent:r,nodeOrigin:_,onError:l});v.position=y,v.internals.positionAbsolute=C,f.set(v.id,v)}c(f)},[])}const H4=M.createContext(null),V2t=H4.Provider;H4.Consumer;const IR=()=>M.useContext(H4),W2t=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),BR=M.createContext(null);function K2t({children:e}){const n=_n(W2t,Jn);return h.jsx(BR.Provider,{value:n,children:e})}function Y2t(){const e=M.useContext(BR);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const X2t={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},Z2t=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:d}=o;if(!l&&!s)return X2t;const _=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===t;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t,connectingTo:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:a===sd.Strict?(l==null?void 0:l.type)!==t:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!s,valid:_&&d}};function Q2t({type:e="source",position:n=mt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:d,onMouseDown:_,onTouchStart:f,...m},g){var X,W;const S=o||null,k=e==="target",b=tr(),v=IR(),{connectOnClick:x,noPanClassName:y,rfId:C}=Y2t(),{connectingFrom:A,connectingTo:E,clickConnecting:j,isPossibleEndHandle:T,connectionInProcess:D,clickConnectionInProcess:I,valid:P}=_n(Z2t(v,S,e),Jn);v||(W=(X=b.getState()).onError)==null||W.call(X,"010",ea.error010());const H=Z=>{const{defaultEdgeOptions:J,onConnect:B,hasDefaultEdges:L}=b.getState(),$={...J,...Z};if(L){const{edges:K,setEdges:G,onError:re}=b.getState();G(A2t($,K,{onError:re}))}B==null||B($),l==null||l($)},F=Z=>{if(!v)return;const J=dR(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){const B=b.getState();nx.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:k,handleId:S,nodeId:v,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...L)=>{var $,K;return(K=($=b.getState()).onConnectEnd)==null?void 0:K.call($,...L)},updateConnection:B.updateConnection,onConnect:H,isValidConnection:t||((...L)=>{var $,K;return((K=($=b.getState()).isValidConnection)==null?void 0:K.call($,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}J?_==null||_(Z):f==null||f(Z)},V=Z=>{const{onClickConnectStart:J,onClickConnectEnd:B,connectionClickStartHandle:L,connectionMode:$,isValidConnection:K,lib:G,rfId:re,nodeLookup:oe,connection:he}=b.getState();if(!v||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:v,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:S}});return}const ie=cR(Z.target),q=t||K,{connection:te,isValid:le}=nx.isValid(Z.nativeEvent,{handle:{nodeId:v,id:S,type:e},connectionMode:$,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:q,flowId:re,doc:ie,lib:G,nodeLookup:oe});le&&te&&H(te);const ge=structuredClone(he);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,B==null||B(Z,ge),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":S,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${S}-${e}`,className:Rr(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,d,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:a,clickconnecting:j,connectingfrom:A,connectingto:E,valid:P,connectionindicator:r&&(!D||T)&&(D||I?a:s)}]),onMouseDown:F,onTouchStart:F,onClick:x?V:void 0,ref:g,...m,children:c})}const El=M.memo(RR(Q2t));function J2t({data:e,isConnectable:n,sourcePosition:t=mt.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(El,{type:"source",position:t,isConnectable:n})]})}function ext({data:e,isConnectable:n,targetPosition:t=mt.Top,sourcePosition:r=mt.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(El,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,h.jsx(El,{type:"source",position:r,isConnectable:n})]})}function txt(){return null}function nxt({data:e,isConnectable:n,targetPosition:t=mt.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(El,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Tp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},A9={input:J2t,default:ext,output:nxt,group:txt};function rxt(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 sxt=e=>{const{width:n,height:t,x:r,y:s}=Oh(e.nodeLookup,{filter:a=>!!a.selected});return{width:Yi(n)?n:null,height:Yi(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 ixt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=tr(),{width:s,height:a,transformString:o,userSelectionActive:l}=_n(sxt,Jn),c=OR(),d=M.useRef(null);M.useEffect(()=>{var g;t||(g=d.current)==null||g.focus({preventScroll:!0})},[t]);const _=!l&&s!==null&&a!==null;if(LR({nodeRef:d,disabled:!_}),!_)return null;const f=e?g=>{const S=r.getState().nodes.filter(k=>k.selected);e(g,S)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Tp,g.key)&&(g.preventDefault(),c({direction:Tp[g.key],factor:g.shiftKey?4:1}))};return h.jsx("div",{className:Rr(["react-flow__nodesselection","react-flow__container",n]),style:{transform:o},children:h.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:m,style:{width:s,height:a}})})}const T9=typeof window<"u"?window:void 0,axt=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function $R({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:_,selectionMode:f,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:A,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:T,autoPanOnSelection:D,defaultViewport:I,translateExtent:P,minZoom:H,maxZoom:F,preventScrolling:V,onSelectionContextMenu:X,noWheelClassName:W,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:B,isControlledViewport:L}){const{nodesSelectionActive:$,userSelectionActive:K}=_n(axt,Jn),G=dh(d,{target:T9}),re=dh(k,{target:T9}),oe=re||T,he=re||C,ie=_&&oe!==!0,q=G||K||ie;return I2t({deleteKeyCode:c,multiSelectionKeyCode:S}),h.jsx(H2t,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:he,panOnScrollSpeed:A,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:!G&&oe,defaultViewport:I,translateExtent:P,minZoom:H,maxZoom:F,zoomActivationKeyCode:b,preventScrolling:V,noWheelClassName:W,noPanClassName:Z,onViewportChange:B,isControlledViewport:L,paneClickDistance:l,selectionOnDrag:ie,children:h.jsxs(q2t,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:oe,autoPanOnSelection:D,isSelecting:!!q,selectionMode:f,selectionKeyPressed:G,paneClickDistance:l,selectionOnDrag:ie,children:[e,$&&h.jsx(ixt,{onSelectionContextMenu:X,noPanClassName:Z,disableKeyboardA11y:J})]})})}$R.displayName="FlowRenderer";const oxt=M.memo($R),lxt=e=>n=>e?T4(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 cxt(e){return _n(M.useCallback(lxt(e),[e]),Jn)}const uxt=e=>e.updateNodeInternals;function dxt(){const e=_n(uxt),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const a=s.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function fxt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=tr(),a=M.useRef(null),o=M.useRef(null),l=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),d=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!_||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[_,e.hidden]),M.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),M.useEffect(()=>{if(a.current){const f=d.current!==n,m=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(f||m||g)&&(d.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),a}function hxt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:_,resizeObserver:f,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:S,rfId:k,nodeTypes:b,nodeClickDistance:v,onError:x}){const{node:y,internals:C,isParent:A}=_n(q=>{const te=q.nodeLookup.get(e),le=q.parentLookup.has(e);return{node:te,internals:te.internals,isParent:le}},Jn);let E=y.type||"default",j=(b==null?void 0:b[E])||A9[E];j===void 0&&(x==null||x("003",ea.error003(E)),E="default",j=(b==null?void 0:b.default)||A9.default);const T=!!(y.draggable||l&&typeof y.draggable>"u"),D=!!(y.selectable||c&&typeof y.selectable>"u"),I=!!(y.connectable||d&&typeof y.connectable>"u"),P=!!(y.focusable||_&&typeof y.focusable>"u"),H=tr(),F=oR(y),V=fxt({node:y,nodeType:E,hasDimensions:F,resizeObserver:f}),X=LR({nodeRef:V,disabled:y.hidden||!T,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:v}),W=OR();if(y.hidden)return null;const Z=jo(y),J=rxt(y),B=D||T||n||t||r||s,L=t?q=>t(q,{...C.userNode}):void 0,$=r?q=>r(q,{...C.userNode}):void 0,K=s?q=>s(q,{...C.userNode}):void 0,G=a?q=>a(q,{...C.userNode}):void 0,re=o?q=>o(q,{...C.userNode}):void 0,oe=q=>{const{selectNodesOnDrag:te,nodeDragThreshold:le}=H.getState();D&&(!te||!T||le>0)&&rx({id:e,store:H,nodeRef:V}),n&&n(q,{...C.userNode})},he=q=>{if(!(uR(q.nativeEvent)||S)){if(ZM.includes(q.key)&&D){const te=q.key==="Escape";rx({id:e,store:H,unselect:te,nodeRef:V})}else if(T&&y.selected&&Object.prototype.hasOwnProperty.call(Tp,q.key)){q.preventDefault();const{ariaLabelConfig:te}=H.getState();H.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),W({direction:Tp[q.key],factor:q.shiftKey?4:1})}}},ie=()=>{var Ee;if(S||!((Ee=V.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:q,width:te,height:le,autoPanOnNodeFocus:ge,setCenter:ue}=H.getState();if(!ge)return;T4(new Map([[e,y]]),{x:0,y:0,width:te,height:le},q,!0).length>0||ue(y.position.x+Z.width/2,y.position.y+Z.height/2,{zoom:q[2]})};return h.jsx("div",{className:Rr(["react-flow__node",`react-flow__node-${E}`,{[g]:T},y.className,{selected:y.selected,selectable:D,parent:A,draggable:T,dragging:X}]),ref:V,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:B?"all":"none",visibility:F?"visible":"hidden",...y.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:$,onMouseLeave:K,onContextMenu:G,onClick:oe,onDoubleClick:re,onKeyDown:P?he:void 0,tabIndex:P?0:void 0,onFocus:P?ie:void 0,role:y.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${AR}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:h.jsx(V2t,{value:e,children:h.jsx(j,{id:e,data:y.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:T,deletable:y.deletable??!0,isConnectable:I,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:X,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...Z})})})}var _xt=M.memo(hxt);const pxt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function HR(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:a}=_n(pxt,Jn),o=cxt(e.onlyRenderVisibleElements),l=dxt();return h.jsx("div",{className:"react-flow__nodes",style:Pm,children:o.map(c=>h.jsx(_xt,{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:l,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}HR.displayName="NodeRenderer";const mxt=M.memo(HR);function gxt(e){return _n(M.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 a=t.nodeLookup.get(s.source),o=t.nodeLookup.get(s.target);a&&o&&cbt({sourceNode:a,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Jn)}const vxt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},bxt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},j9={[Np.Arrow]:vxt,[Np.ArrowClosed]:bxt};function xxt(e){const n=tr();return M.useMemo(()=>{var s,a;return Object.prototype.hasOwnProperty.call(j9,e)?j9[e]:((a=(s=n.getState()).onError)==null||a.call(s,"009",ea.error009(e)),null)},[e])}const yxt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=xxt(n);return c?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:h.jsx(c,{color:t,strokeWidth:o})}):null},PR=({defaultColor:e,rfId:n})=>{const t=_n(a=>a.edges),r=_n(a=>a.defaultEdgeOptions),s=M.useMemo(()=>gbt(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?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(a=>h.jsx(yxt,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};PR.displayName="MarkerDefinitions";var wxt=M.memo(PR);function FR({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:d,..._}){const[f,m]=M.useState({x:1,y:0,width:0,height:0}),g=Rr(["react-flow__edge-textwrapper",d]),S=M.useRef(null);return M.useEffect(()=>{if(S.current){const k=S.current.getBBox();m({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?h.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:g,visibility:f.width?"visible":"hidden",..._,children:[s&&h.jsx("rect",{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),h.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:S,style:r,children:t}),c]}):null}FR.displayName="EdgeText";const Sxt=M.memo(FR);function Fm({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:d=20,..._}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{..._,d:e,fill:"none",className:Rr(["react-flow__edge-path",_.className])}),d?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Yi(n)&&Yi(t)?h.jsx(Sxt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function M9({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===mt.Left||e===mt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function UR({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top}){const[o,l]=M9({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,d]=M9({pos:a,x1:r,y1:s,x2:e,y2:n}),[_,f,m,g]=fR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${n} C${o},${l} ${c},${d} ${r},${s}`,_,f,m,g]}function qR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})=>{const[x,y,C]=UR({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l}),A=e.isInternal?void 0:n;return h.jsx(Fm,{id:A,path:x,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})})}const kxt=qR({isInternal:!1}),GR=qR({isInternal:!0});kxt.displayName="SimpleBezierEdge";GR.displayName="SimpleBezierEdgeInternal";function VR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,sourcePosition:g=mt.Bottom,targetPosition:S=mt.Top,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,A]=J2({sourceX:t,sourceY:r,sourcePosition:g,targetX:s,targetY:a,targetPosition:S,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return h.jsx(Fm,{id:E,path:y,labelX:C,labelY:A,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:k,markerStart:b,interactionWidth:x})})}const WR=VR({isInternal:!1}),KR=VR({isInternal:!0});WR.displayName="SmoothStepEdge";KR.displayName="SmoothStepEdgeInternal";function YR(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return h.jsx(WR,{...t,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=t.pathOptions)==null?void 0:a.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const Cxt=YR({isInternal:!1}),XR=YR({isInternal:!0});Cxt.displayName="StepEdge";XR.displayName="StepEdgeInternal";function ZR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})=>{const[b,v,x]=pR({sourceX:t,sourceY:r,targetX:s,targetY:a}),y=e.isInternal?void 0:n;return h.jsx(Fm,{id:y,path:b,labelX:v,labelY:x,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})})}const Ext=ZR({isInternal:!1}),QR=ZR({isInternal:!0});Ext.displayName="StraightEdge";QR.displayName="StraightEdgeInternal";function JR(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o=mt.Bottom,targetPosition:l=mt.Top,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,A]=hR({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return h.jsx(Fm,{id:E,path:y,labelX:C,labelY:A,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:x})})}const Nxt=JR({isInternal:!1}),eD=JR({isInternal:!0});Nxt.displayName="BezierEdge";eD.displayName="BezierEdgeInternal";const R9={default:eD,straight:QR,step:XR,smoothstep:KR,simplebezier:GR},D9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},zxt=(e,n,t)=>t===mt.Left?e-n:t===mt.Right?e+n:e,Axt=(e,n,t)=>t===mt.Top?e-n:t===mt.Bottom?e+n:e,L9="react-flow__edgeupdater";function O9({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:a,onMouseOut:o,type:l}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:o,className:Rr([L9,`${L9}-${l}`]),cx:zxt(n,r,e),cy:Axt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function Txt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:d,onReconnectStart:_,onReconnectEnd:f,setReconnecting:m,setUpdateHover:g}){const S=tr(),k=(C,A)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:j,connectionMode:T,connectionRadius:D,lib:I,onConnectStart:P,cancelConnection:H,nodeLookup:F,rfId:V,panBy:X,updateConnection:W}=S.getState(),Z=A.type==="target",J=($,K)=>{m(!1),f==null||f($,t,A.type,K)},B=$=>d==null?void 0:d(t,$),L=($,K)=>{m(!0),_==null||_(C,t,A.type),P==null||P($,K)};nx.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:T,connectionRadius:D,domNode:j,handleId:A.id,nodeId:A.nodeId,nodeLookup:F,isTarget:Z,edgeUpdaterType:A.type,lib:I,flowId:V,cancelConnection:H,panBy:X,isValidConnection:(...$)=>{var K,G;return((G=(K=S.getState()).isValidConnection)==null?void 0:G.call(K,...$))??!0},onConnect:B,onConnectStart:L,onConnectEnd:(...$)=>{var K,G;return(G=(K=S.getState()).onConnectEnd)==null?void 0:G.call(K,...$)},onReconnectEnd:J,updateConnection:W,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>g(!0),y=()=>g(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(O9,{position:l,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:x,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&h.jsx(O9,{position:c,centerX:a,centerY:o,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:y,type:"target"})]})}function jxt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,rfId:S,edgeTypes:k,noPanClassName:b,onError:v,disableKeyboardA11y:x}){let y=_n(ue=>ue.edgeLookup.get(e));const C=_n(ue=>ue.defaultEdgeOptions);y=C?{...C,...y}:y;let A=y.type||"default",E=(k==null?void 0:k[A])||R9[A];E===void 0&&(v==null||v("011",ea.error011(A)),A="default",E=(k==null?void 0:k.default)||R9.default);const j=!!(y.focusable||n&&typeof y.focusable>"u"),T=typeof f<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),D=!!(y.selectable||r&&typeof y.selectable>"u"),I=M.useRef(null),[P,H]=M.useState(!1),[F,V]=M.useState(!1),X=tr(),{zIndex:W=y.zIndex,sourceX:Z,sourceY:J,targetX:B,targetY:L,sourcePosition:$,targetPosition:K}=_n(M.useCallback(ue=>{const Ce=ue.nodeLookup.get(y.source),Ee=ue.nodeLookup.get(y.target);if(!Ce||!Ee)return D9;const Le=mbt({id:e,sourceNode:Ce,targetNode:Ee,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ue.connectionMode,onError:v}),Pe=lbt({selected:y.selected,zIndex:y.zIndex,sourceNode:Ce,targetNode:Ee,elevateOnSelect:ue.elevateEdgesOnSelect,zIndexMode:ue.zIndexMode});return{...Le||D9,zIndex:Pe}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),Jn),G=M.useMemo(()=>y.markerStart?`url('#${ex(y.markerStart,S)}')`:void 0,[y.markerStart,S]),re=M.useMemo(()=>y.markerEnd?`url('#${ex(y.markerEnd,S)}')`:void 0,[y.markerEnd,S]);if(y.hidden||Z===null||J===null||B===null||L===null)return null;const oe=ue=>{var Pe;const{addSelectedEdges:Ce,unselectNodesAndEdges:Ee,multiSelectionActive:Le}=X.getState();D&&(X.setState({nodesSelectionActive:!1}),y.selected&&Le?(Ee({nodes:[],edges:[y]}),(Pe=I.current)==null||Pe.blur()):Ce([e])),s&&s(ue,y)},he=a?ue=>{a(ue,{...y})}:void 0,ie=o?ue=>{o(ue,{...y})}:void 0,q=l?ue=>{l(ue,{...y})}:void 0,te=c?ue=>{c(ue,{...y})}:void 0,le=d?ue=>{d(ue,{...y})}:void 0,ge=ue=>{var Ce;if(!x&&ZM.includes(ue.key)&&D){const{unselectNodesAndEdges:Ee,addSelectedEdges:Le}=X.getState();ue.key==="Escape"?((Ce=I.current)==null||Ce.blur(),Ee({edges:[y]})):Le([e])}};return h.jsx("svg",{style:{zIndex:W},children:h.jsxs("g",{className:Rr(["react-flow__edge",`react-flow__edge-${A}`,y.className,b,{selected:y.selected,animated:y.animated,inactive:!D&&!s,updating:P,selectable:D}]),onClick:oe,onDoubleClick:he,onContextMenu:ie,onMouseEnter:q,onMouseMove:te,onMouseLeave:le,onKeyDown:j?ge:void 0,tabIndex:j?0:void 0,role:y.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":j?`${TR}-${S}`:void 0,ref:I,...y.domAttributes,children:[!F&&h.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:D,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:B,targetY:L,sourcePosition:$,targetPosition:K,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:G,markerEnd:re,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),T&&h.jsx(Txt,{edge:y,isReconnectable:T,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,sourceX:Z,sourceY:J,targetX:B,targetY:L,sourcePosition:$,targetPosition:K,setUpdateHover:H,setReconnecting:V})]})})}var Mxt=M.memo(jxt);const Rxt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function tD({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:_,reconnectRadius:f,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,disableKeyboardA11y:k}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,onError:y}=_n(Rxt,Jn),C=gxt(n);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(wxt,{defaultColor:e,rfId:t}),C.map(A=>h.jsx(Mxt,{id:A,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,noPanClassName:s,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:_,reconnectRadius:f,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},A))]})}tD.displayName="EdgeRenderer";const Dxt=M.memo(tD),Lxt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Oxt({children:e}){const n=_n(Lxt);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function Ixt(e){const n=$4(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const Bxt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function $xt(e){const n=_n(Bxt),t=tr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function Hxt(e){return e.connection.inProgress?{...e.connection,to:Bh(e.connection.to,e.transform)}:{...e.connection}}function Pxt(e){return Hxt}function Fxt(e){const n=Pxt();return _n(n,Jn)}const Uxt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function qxt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:a,height:o,isValid:l,inProgress:c}=_n(Uxt,Jn);return!(a&&s&&c)?null:h.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Rr(["react-flow__connection",eR(l)]),children:h.jsx(nD,{style:n,type:t,CustomComponent:r,isValid:l})})})}const nD=({style:e,type:n=pl.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:d,toNode:_,toHandle:f,toPosition:m,pointer:g}=Fxt();if(!s)return;if(t)return h.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:eR(r),toNode:_,toHandle:f,pointer:g});let S="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(n){case pl.Bezier:[S]=hR(k);break;case pl.SimpleBezier:[S]=UR(k);break;case pl.Step:[S]=J2({...k,borderRadius:0});break;case pl.SmoothStep:[S]=J2(k);break;default:[S]=pR(k)}return h.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};nD.displayName="ConnectionLine";const Gxt={};function I9(e=Gxt){M.useRef(e),tr(),M.useEffect(()=>{},[e])}function Vxt(){tr(),M.useRef(!1),M.useEffect(()=>{},[])}function rD({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,onSelectionContextMenu:f,onSelectionStart:m,onSelectionEnd:g,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:j,deleteKeyCode:T,onlyRenderVisibleElements:D,elementsSelectable:I,defaultViewport:P,translateExtent:H,minZoom:F,maxZoom:V,preventScrolling:X,defaultMarkerColor:W,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:$,zoomOnDoubleClick:K,panOnDrag:G,autoPanOnSelection:re,onPaneClick:oe,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:q,onPaneScroll:te,onPaneContextMenu:le,paneClickDistance:ge,nodeClickDistance:ue,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,onReconnect:ft,onReconnectStart:Be,onReconnectEnd:wt,noDragClassName:At,noWheelClassName:vt,noPanClassName:Ot,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe,viewport:je,onViewportChange:We}){return I9(e),I9(n),Vxt(),Ixt(t),$xt(je),h.jsx(oxt,{onPaneClick:oe,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:q,onPaneContextMenu:le,onPaneScroll:te,paneClickDistance:ge,deleteKeyCode:T,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:j,elementsSelectable:I,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:K,panOnScroll:B,panOnScrollSpeed:L,panOnScrollMode:$,panOnDrag:G,autoPanOnSelection:re,defaultViewport:P,translateExtent:H,minZoom:F,maxZoom:V,onSelectionContextMenu:f,preventScrolling:X,noDragClassName:At,noWheelClassName:vt,noPanClassName:Ot,disableKeyboardA11y:St,onViewportChange:We,isControlledViewport:!!je,children:h.jsxs(Oxt,{children:[h.jsx(Dxt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:o,onReconnect:ft,onReconnectStart:Be,onReconnectEnd:wt,onlyRenderVisibleElements:D,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,defaultMarkerColor:W,noPanClassName:Ot,disableKeyboardA11y:St,rfId:xe}),h.jsx(qxt,{style:k,type:S,component:b,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(mxt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,nodeClickDistance:ue,onlyRenderVisibleElements:D,noPanClassName:Ot,noDragClassName:At,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}rD.displayName="GraphView";const Wxt=M.memo(rD),Kxt=aR(),B9=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:d=2,nodeOrigin:_,nodeExtent:f,zIndexMode:m="basic"}={})=>{const g=new Map,S=new Map,k=new Map,b=new Map,v=r??n??[],x=t??e??[],y=_??[0,0],C=f??oh;vR(k,b,v);const{nodesInitialized:A}=tx(x,g,S,{nodeOrigin:y,nodeExtent:C,zIndexMode:m});let E=[0,0,1];if(o&&s&&a){const j=Oh(g,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:T,y:D,zoom:I}=M4(j,s,a,c,d,(l==null?void 0:l.padding)??.1);E=[T,D,I]}return{rfId:"1",width:s??0,height:a??0,transform:E,nodes:x,nodesInitialized:A,nodeLookup:g,parentLookup:S,edges:v,edgeLookup:b,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:oh,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:sd.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...JM},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Kxt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:QM,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Yxt=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m})=>i2t((g,S)=>{async function k(){const{nodeLookup:b,panZoom:v,fitViewOptions:x,fitViewResolver:y,width:C,height:A,minZoom:E,maxZoom:j}=S();v&&(await tbt({nodes:b,width:C,height:A,panZoom:v,minZoom:E,maxZoom:j},x),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...B9({nodes:e,edges:n,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:m}),setNodes:b=>{const{nodeLookup:v,parentLookup:x,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:A,zIndexMode:E,nodesSelectionActive:j}=S(),{nodesInitialized:T,hasSelectedNodes:D}=tx(b,v,x,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),I=j&&D;A&&T?(k(),g({nodes:b,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:I})):g({nodes:b,nodesInitialized:T,nodesSelectionActive:I})},setEdges:b=>{const{connectionLookup:v,edgeLookup:x}=S();vR(v,x,b),g({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:x}=S();x(b),g({hasDefaultNodes:!0})}if(v){const{setEdges:x}=S();x(v),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:x,parentLookup:y,domNode:C,nodeOrigin:A,nodeExtent:E,debug:j,fitViewQueued:T,zIndexMode:D}=S(),{changes:I,updatedInternals:P}=kbt(b,x,y,C,A,E,D);P&&(xbt(x,y,{nodeOrigin:A,nodeExtent:E,zIndexMode:D}),T?(k(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(I==null?void 0:I.length)>0&&(j&&console.log("React Flow: trigger node changes",I),v==null||v(I)))},updateNodePositions:(b,v=!1)=>{const x=[];let y=[];const{nodeLookup:C,triggerNodeChanges:A,connection:E,updateConnection:j,onNodesChangeMiddlewareMap:T}=S();for(const[D,I]of b){const P=C.get(D),H=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(I!=null&&I.position)),F={id:D,type:"position",position:H?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:v};if(P&&E.inProgress&&E.fromNode.id===P.id){const V=Sc(P,E.fromHandle,mt.Left,!0);j({...E,from:V})}H&&P.parentId&&x.push({id:D,parentId:P.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),y.push(F)}if(x.length>0){const{parentLookup:D,nodeOrigin:I}=S(),P=B4(x,C,D,I);y.push(...P)}for(const D of T.values())y=D(y);A(y)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:x,nodes:y,hasDefaultNodes:C,debug:A}=S();if(b!=null&&b.length){if(C){const E=E2t(b,y);x(E)}A&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:x,edges:y,hasDefaultEdges:C,debug:A}=S();if(b!=null&&b.length){if(C){const E=N2t(b,y);x(E)}A&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:A}=S();if(v){const E=b.map(j=>ac(j,!0));C(E);return}C(Ru(y,new Set([...b]),!0)),A(Ru(x))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:A}=S();if(v){const E=b.map(j=>ac(j,!0));A(E);return}A(Ru(x,new Set([...b]))),C(Ru(y,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:x,nodes:y,nodeLookup:C,triggerNodeChanges:A,triggerEdgeChanges:E}=S(),j=b||y,T=v||x,D=[];for(const P of j){if(!P.selected)continue;const H=C.get(P.id);H&&(H.selected=!1),D.push(ac(P.id,!1))}const I=[];for(const P of T)P.selected&&I.push(ac(P.id,!1));A(D),E(I)},setMinZoom:b=>{const{panZoom:v,maxZoom:x}=S();v==null||v.setScaleExtent([b,x]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:x}=S();v==null||v.setScaleExtent([x,b]),g({maxZoom:b})},setTranslateExtent:b=>{var v;(v=S().panZoom)==null||v.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:x,triggerEdgeChanges:y,elementsSelectable:C}=S();if(!C)return;const A=v.reduce((j,T)=>T.selected?[...j,ac(T.id,!1)]:j,[]),E=b.reduce((j,T)=>T.selected?[...j,ac(T.id,!1)]:j,[]);x(A),y(E)},setNodeExtent:b=>{const{nodes:v,nodeLookup:x,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:A,nodeExtent:E,zIndexMode:j}=S();b[0][0]===E[0][0]&&b[0][1]===E[0][1]&&b[1][0]===E[1][0]&&b[1][1]===E[1][1]||(tx(v,x,y,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:A,checkEquality:!1,zIndexMode:j}),g({nodeExtent:b}))},panBy:b=>{const{transform:v,width:x,height:y,panZoom:C,translateExtent:A}=S();return Cbt({delta:b,panZoom:C,transform:v,translateExtent:A,width:x,height:y})},setCenter:async(b,v,x)=>{const{width:y,height:C,maxZoom:A,panZoom:E}=S();if(!E)return!1;const j=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:A;return await E.setViewport({x:y/2-b*j,y:C/2-v*j,zoom:j},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{g({connection:{...JM}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...B9()})}},Object.is);function Xxt({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m,children:g}){const[S]=M.useState(()=>Yxt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:d,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:_,nodeExtent:f,zIndexMode:m}));return h.jsx(a2t,{value:S,children:h.jsx(R2t,{children:h.jsx(K2t,{children:g})})})}function Zxt({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g}){return M.useContext($m)?h.jsx(h.Fragment,{children:e}):h.jsx(Xxt,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g,children:e})}const Qxt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Jxt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:_,onMoveStart:f,onMoveEnd:m,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:A,onNodeDoubleClick:E,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:D,onNodesDelete:I,onEdgesDelete:P,onDelete:H,onSelectionChange:F,onSelectionDragStart:V,onSelectionDrag:X,onSelectionDragStop:W,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:B,onBeforeDelete:L,connectionMode:$,connectionLineType:K=pl.Bezier,connectionLineStyle:G,connectionLineComponent:re,connectionLineContainerStyle:oe,deleteKeyCode:he="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:q=!1,selectionMode:te=lh.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ge=uh()?"Meta":"Control",zoomActivationKeyCode:ue=uh()?"Meta":"Control",snapToGrid:Ce,snapGrid:Ee,onlyRenderVisibleElements:Le=!1,selectNodesOnDrag:Pe,nodesDraggable:Ve,autoPanOnNodeFocus:ft,nodesConnectable:Be,nodesFocusable:wt,nodeOrigin:At=jR,edgesFocusable:vt,edgesReconnectable:Ot,elementsSelectable:St=!0,defaultViewport:kt=b2t,minZoom:xe=.5,maxZoom:je=2,translateExtent:We=oh,preventScrolling:st=!0,nodeExtent:nt,defaultMarkerColor:Ht="#b1b1b7",zoomOnScroll:bt=!0,zoomOnPinch:nn=!0,panOnScroll:Wt=!1,panOnScrollSpeed:pn=.5,panOnScrollMode:Lt=mc.Free,zoomOnDoubleClick:En=!0,panOnDrag:Ft=!0,onPaneClick:br,onPaneMouseEnter:mn,onPaneMouseMove:Ye,onPaneMouseLeave:xt,onPaneScroll:Wn,onPaneContextMenu:Kn,paneClickDistance:Nt=1,nodeClickDistance:rt=0,children:Ie,onReconnect:it,onReconnectStart:Ut,onReconnectEnd:en,onEdgeContextMenu:Mt,onEdgeDoubleClick:Ln,onEdgeMouseEnter:_r,onEdgeMouseMove:is,onEdgeMouseLeave:or,reconnectRadius:xr=10,onNodesChange:Ts,onEdgesChange:Nn,noDragClassName:rn="nodrag",noWheelClassName:Fn="nowheel",noPanClassName:Dr="nopan",fitView:Lr,fitViewOptions:qr,connectOnClick:ln,attributionPosition:lr,proOptions:Sn,defaultEdgeOptions:et,elevateNodesOnSelect:_t=!0,elevateEdgesOnSelect:yr=!1,disableKeyboardA11y:wr=!1,autoPanOnConnect:Gr,autoPanOnNodeDrag:Un,autoPanOnSelection:Mo=!0,autoPanSpeed:vs,connectionRadius:as,isValidConnection:js,onError:Zt,style:It,id:Ys,nodeDragThreshold:Ii,connectionDragThreshold:Sr,viewport:os,onViewportChange:bs,width:cr,height:Xs,colorMode:Ml="light",debug:$a,onScroll:Or,ariaLabelConfig:ls,zIndexMode:Zs="basic",...Yn},Bi){const Hn=Ys||"1",zn=S2t(Ml),Qs=M.useCallback(ra=>{ra.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Or==null||Or(ra)},[Or]);return h.jsx("div",{"data-testid":"rf__wrapper",...Yn,onScroll:Qs,style:{...It,...Qxt},ref:Bi,className:Rr(["react-flow",s,zn]),id:Ys,role:"application",children:h.jsxs(Zxt,{nodes:e,edges:n,width:cr,height:Xs,fitView:Lr,fitViewOptions:qr,minZoom:xe,maxZoom:je,nodeOrigin:At,nodeExtent:nt,zIndexMode:Zs,children:[h.jsx(w2t,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:Ve,autoPanOnNodeFocus:ft,nodesConnectable:Be,nodesFocusable:wt,edgesFocusable:vt,edgesReconnectable:Ot,elementsSelectable:St,elevateNodesOnSelect:_t,elevateEdgesOnSelect:yr,minZoom:xe,maxZoom:je,nodeExtent:nt,onNodesChange:Ts,onEdgesChange:Nn,snapToGrid:Ce,snapGrid:Ee,connectionMode:$,translateExtent:We,connectOnClick:ln,defaultEdgeOptions:et,fitView:Lr,fitViewOptions:qr,onNodesDelete:I,onEdgesDelete:P,onDelete:H,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:V,onSelectionDragStop:W,onMove:_,onMoveStart:f,onMoveEnd:m,noPanClassName:Dr,nodeOrigin:At,rfId:Hn,autoPanOnConnect:Gr,autoPanOnNodeDrag:Un,autoPanSpeed:vs,onError:Zt,connectionRadius:as,isValidConnection:js,selectNodesOnDrag:Pe,nodeDragThreshold:Ii,connectionDragThreshold:Sr,onBeforeDelete:L,debug:$a,ariaLabelConfig:ls,zIndexMode:Zs}),h.jsx(Wxt,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:A,onNodeDoubleClick:E,nodeTypes:a,edgeTypes:o,connectionLineType:K,connectionLineStyle:G,connectionLineComponent:re,connectionLineContainerStyle:oe,selectionKeyCode:ie,selectionOnDrag:q,selectionMode:te,deleteKeyCode:he,multiSelectionKeyCode:ge,panActivationKeyCode:le,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Le,defaultViewport:kt,translateExtent:We,minZoom:xe,maxZoom:je,preventScrolling:st,zoomOnScroll:bt,zoomOnPinch:nn,zoomOnDoubleClick:En,panOnScroll:Wt,panOnScrollSpeed:pn,panOnScrollMode:Lt,panOnDrag:Ft,autoPanOnSelection:Mo,onPaneClick:br,onPaneMouseEnter:mn,onPaneMouseMove:Ye,onPaneMouseLeave:xt,onPaneScroll:Wn,onPaneContextMenu:Kn,paneClickDistance:Nt,nodeClickDistance:rt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:B,onReconnect:it,onReconnectStart:Ut,onReconnectEnd:en,onEdgeContextMenu:Mt,onEdgeDoubleClick:Ln,onEdgeMouseEnter:_r,onEdgeMouseMove:is,onEdgeMouseLeave:or,reconnectRadius:xr,defaultMarkerColor:Ht,noDragClassName:rn,noWheelClassName:Fn,noPanClassName:Dr,rfId:Hn,disableKeyboardA11y:wr,nodeExtent:nt,viewport:os,onViewportChange:bs}),h.jsx(v2t,{onSelectionChange:F}),Ie,h.jsx(h2t,{proOptions:Sn,position:lr}),h.jsx(f2t,{rfId:Hn,disableKeyboardA11y:wr})]})})}var eyt=RR(Jxt);function tyt({dimensions:e,lineWidth:n,variant:t,className:r}){return h.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Rr(["react-flow__background-pattern",t,r])})}function nyt({radius:e,className:n}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Rr(["react-flow__background-pattern","dots",n])})}var yo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(yo||(yo={}));const ryt={[yo.Dots]:1,[yo.Lines]:1,[yo.Cross]:6},syt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function sD({id:e,variant:n=yo.Dots,gap:t=20,size:r,lineWidth:s=1,offset:a=0,color:o,bgColor:l,style:c,className:d,patternClassName:_}){const f=M.useRef(null),{transform:m,patternId:g}=_n(syt,Jn),S=r||ryt[n],k=n===yo.Dots,b=n===yo.Cross,v=Array.isArray(t)?t:[t,t],x=[v[0]*m[2]||1,v[1]*m[2]||1],y=S*m[2],C=Array.isArray(a)?a:[a,a],A=b?[y,y]:x,E=[C[0]*m[2]||1+A[0]/2,C[1]*m[2]||1+A[1]/2],j=`${g}${e||""}`;return h.jsxs("svg",{className:Rr(["react-flow__background",d]),style:{...c,...Pm,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:f,"data-testid":"rf__background",children:[h.jsx("pattern",{id:j,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:k?h.jsx(nyt,{radius:y/2,className:_}):h.jsx(tyt,{dimensions:A,lineWidth:s,variant:n,className:_})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}sD.displayName="Background";const iyt=M.memo(sD);function ayt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function oyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function lyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 cyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 uyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 E0({children:e,className:n,...t}){return h.jsx("button",{type:"button",className:Rr(["react-flow__controls-button",n]),...t,children:e})}const dyt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function iD({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:d,children:_,position:f="bottom-left",orientation:m="vertical","aria-label":g}){const S=tr(),{isInteractive:k,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:x}=_n(dyt,Jn),{zoomIn:y,zoomOut:C,fitView:A}=$4(),E=()=>{y(),a==null||a()},j=()=>{C(),o==null||o()},T=()=>{A(s),l==null||l()},D=()=>{S.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},I=m==="horizontal"?"horizontal":"vertical";return h.jsxs(Hm,{className:Rr(["react-flow__controls",I,d]),position:f,style:e,"data-testid":"rf__controls","aria-label":g??x["controls.ariaLabel"],children:[n&&h.jsxs(h.Fragment,{children:[h.jsx(E0,{onClick:E,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(ayt,{})}),h.jsx(E0,{onClick:j,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(oyt,{})})]}),t&&h.jsx(E0,{className:"react-flow__controls-fitview",onClick:T,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:h.jsx(lyt,{})}),r&&h.jsx(E0,{className:"react-flow__controls-interactive",onClick:D,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?h.jsx(uyt,{}):h.jsx(cyt,{})}),_]})}iD.displayName="Controls";M.memo(iD);function fyt({id:e,x:n,y:t,width:r,height:s,style:a,color:o,strokeColor:l,strokeWidth:c,className:d,borderRadius:_,shapeRendering:f,selected:m,onClick:g}){const{background:S,backgroundColor:k}=a||{},b=o||S||k;return h.jsx("rect",{className:Rr(["react-flow__minimap-node",{selected:m},d]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:l,strokeWidth:c},shapeRendering:f,onClick:g?v=>g(v,e):void 0})}const hyt=M.memo(fyt),_yt=e=>e.nodes.map(n=>n.id),pb=e=>e instanceof Function?e:()=>e;function pyt({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:a=hyt,onClick:o}){const l=_n(_yt,Jn),c=pb(n),d=pb(e),_=pb(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:l.map(m=>h.jsx(gyt,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:a,onClick:o,shapeRendering:f},m))})}function myt({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:d,x:_,y:f,width:m,height:g}=_n(S=>{const k=S.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const b=k.internals.userNode,{x:v,y:x}=k.internals.positionAbsolute,{width:y,height:C}=jo(b);return{node:b,x:v,y:x,width:y,height:C}},Jn);return!d||d.hidden||!oR(d)?null:h.jsx(l,{x:_,y:f,width:m,height:g,style:d.style,selected:!!d.selected,className:r(d),color:n(d),borderRadius:s,strokeColor:t(d),strokeWidth:a,shapeRendering:o,onClick:c,id:d.id})}const gyt=M.memo(myt);var vyt=M.memo(pyt);const byt=200,xyt=150,yyt=e=>!e.hidden,wyt=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?sR(Oh(e.nodeLookup,{filter:yyt}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Syt="react-flow__minimap-desc";function aD({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:_,maskStrokeWidth:f,position:m="bottom-right",onClick:g,onNodeClick:S,pannable:k=!1,zoomable:b=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:C=5}){const A=tr(),E=M.useRef(null),{boundingRect:j,viewBB:T,rfId:D,panZoom:I,translateExtent:P,flowWidth:H,flowHeight:F,ariaLabelConfig:V}=_n(wyt,Jn),X=(e==null?void 0:e.width)??byt,W=(e==null?void 0:e.height)??xyt,Z=j.width/X,J=j.height/W,B=Math.max(Z,J),L=B*X,$=B*W,K=C*B,G=j.x-(L-j.width)/2-K,re=j.y-($-j.height)/2-K,oe=L+K*2,he=$+K*2,ie=`${Syt}-${D}`,q=M.useRef(0),te=M.useRef();q.current=B,M.useEffect(()=>{if(E.current&&I)return te.current=Dbt({domNode:E.current,panZoom:I,getTransform:()=>A.getState().transform,getViewScale:()=>q.current}),()=>{var Ce;(Ce=te.current)==null||Ce.destroy()}},[I]),M.useEffect(()=>{var Ce;(Ce=te.current)==null||Ce.update({translateExtent:P,width:H,height:F,inversePan:x,pannable:k,zoomStep:y,zoomable:b})},[k,b,x,y,P,H,F]);const le=g?Ce=>{var Pe;const[Ee,Le]=((Pe=te.current)==null?void 0:Pe.pointer(Ce))||[0,0];g(Ce,{x:Ee,y:Le})}:void 0,ge=S?M.useCallback((Ce,Ee)=>{const Le=A.getState().nodeLookup.get(Ee).internals.userNode;S(Ce,Le)},[]):void 0,ue=v??V["minimap.ariaLabel"];return h.jsx(Hm,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*B: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 o=="number"?o:void 0},className:Rr(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:X,height:W,viewBox:`${G} ${re} ${oe} ${he}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ie,ref:E,onClick:le,children:[ue&&h.jsx("title",{id:ie,children:ue}),h.jsx(vyt,{onClick:ge,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:a,nodeClassName:s,nodeStrokeWidth:o,nodeComponent:l}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-K},${re-K}h${oe+K*2}v${he+K*2}h${-oe-K*2}z - M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}aD.displayName="MiniMap";M.memo(aD);const kyt=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,Cyt={[od.Line]:"right",[od.Handle]:"bottom-right"};function Eyt({nodeId:e,position:n,variant:t=od.Handle,className:r,style:s=void 0,children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:m,autoScale:g=!0,shouldResize:S,onResizeStart:k,onResize:b,onResizeEnd:v}){const x=IR(),y=typeof e=="string"?e:x,C=tr(),A=M.useRef(null),E=t===od.Handle,j=_n(M.useCallback(kyt(E&&g),[E,g]),Jn),T=M.useRef(null),D=n??Cyt[t];M.useEffect(()=>{if(!(!A.current||!y))return T.current||(T.current=Wbt({domNode:A.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:P,transform:H,snapGrid:F,snapToGrid:V,nodeOrigin:X,domNode:W}=C.getState();return{nodeLookup:P,transform:H,snapGrid:F,snapToGrid:V,nodeOrigin:X,paneDomNode:W}},onChange:(P,H)=>{const{triggerNodeChanges:F,nodeLookup:V,parentLookup:X,nodeOrigin:W}=C.getState(),Z=[],J={x:P.x,y:P.y},B=V.get(y);if(B&&B.expandParent&&B.parentId){const L=B.origin??W,$=P.width??B.measured.width??0,K=P.height??B.measured.height??0,G={id:B.id,parentId:B.parentId,rect:{width:$,height:K,...lR({x:P.x??B.position.x,y:P.y??B.position.y},{width:$,height:K},B.parentId,V,L)}},re=B4([G],V,X,W);Z.push(...re),J.x=P.x?Math.max(L[0]*$,P.x):void 0,J.y=P.y?Math.max(L[1]*K,P.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:y,type:"position",position:{...J}};Z.push(L)}if(P.width!==void 0&&P.height!==void 0){const $={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};Z.push($)}for(const L of H){const $={...L,type:"position"};Z.push($)}F(Z)},onEnd:({width:P,height:H})=>{const F={id:y,type:"dimensions",resizing:!1,dimensions:{width:P,height:H}};C.getState().triggerNodeChanges([F])}})),T.current.update({controlPosition:D,boundaries:{minWidth:l,minHeight:c,maxWidth:d,maxHeight:_},keepAspectRatio:f,resizeDirection:m,onResizeStart:k,onResize:b,onResizeEnd:v,shouldResize:S}),()=>{var P;(P=T.current)==null||P.destroy()}},[D,l,c,d,_,f,k,b,v,S]);const I=D.split("-");return h.jsx("div",{className:Rr(["react-flow__resize-control","nodrag",...I,t,r]),ref:A,style:{...s,scale:j,...o&&{[E?"backgroundColor":"borderColor"]:o}},children:a})}M.memo(Eyt);function Nyt(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(a=>{if(!a)return;function o(){n(a.offsetWidth),r(a.offsetHeight)}const l=new ResizeObserver(o),c=new MutationObserver(o);return l.observe(a),c.observe(a,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),o(),()=>{l.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const N0=8;function zyt(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:a},o]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){o({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let l=0,c=0,d=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":l=e.x-t-_,c=e.y+e.height/2-r/2;break;case"right":l=e.x+e.width+_,c=e.y+e.height/2-r/2;break;case"below":l=e.x+e.width/2-t/2,c=e.y+e.height+_;break;case"above":l=e.x+e.width/2-t/2,c=e.y-r-_;break}const f=l,m=c;l=Math.min(Math.max(l,N0),a-t-N0),c=Math.min(Math.max(c,N0),s-r-N0),d=e.anchor==="left"||e.anchor==="right"?m-c:f-l}return{x:l,y:c,arrowAdjustment:d}}const mb=380,gb=12,Ayt=350,Tyt=150,sx=new EventTarget;function jyt(){sx.dispatchEvent(new Event("move"))}function Myt(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),a=M.useRef(void 0);M.useEffect(()=>{const d=()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),r(null)};return sx.addEventListener("move",d),()=>{sx.removeEventListener("move",d),window.clearTimeout(s.current),window.clearTimeout(a.current)}},[]),M.useEffect(()=>{r(d=>{var f;if(!d)return d;const _=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return _&&d.x===_.x&&d.y===_.y&&d.width===_.width&&d.height===_.height?d:_})},[e,n]);const o=M.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var d;r(((d=e.current)==null?void 0:d.getBoundingClientRect())??null)},Ayt)},[e]),l=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),a.current=window.setTimeout(()=>r(null),Tyt)},[]),c=M.useCallback(()=>window.clearTimeout(a.current),[]);return{rect:t,onMouseEnter:o,onMouseLeave:l,keepOpen:c}}function Ryt(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(N(),t)}function Dyt({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:a,onOpenCode:o,onMouseEnter:l,onMouseLeave:c}){const d=Nyt(),_=s.right+gb+mb<=window.innerWidth,f=s.x-gb-mb>=0,m=_?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:g,y:S}=zyt({x:s.x,y:s.y,width:s.width,height:s.height,anchor:m,distance:gb},d),[k,b]=M.useState(null),v=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null;M.useEffect(()=>{if(b(null),!v)return;let P=!1;return CYe(v).then(H=>{let F=H.diff;if(H.truncated){const Z=F.lastIndexOf(` +`)),_=d.reduce((f,m)=>f.concat(...m),[]);return[d,_]}return[[],[]]},[e]);return M.useEffect(()=>{const c=(n==null?void 0:n.target)??N9,d=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const _=g=>{var b,v;if(s.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!s.current||s.current&&!d)&&SR(g))return!1;const k=A9(g.code,l);if(a.current.add(g[k]),z9(o,a.current,!1)){const x=((v=(b=g.composedPath)==null?void 0:b.call(g))==null?void 0:v[0])||g.target,y=(x==null?void 0:x.nodeName)==="BUTTON"||(x==null?void 0:x.nodeName)==="A";n.preventDefault!==!1&&(s.current||!y)&&g.preventDefault(),r(!0)}},f=g=>{const S=A9(g.code,l);z9(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[S]),g.key==="Meta"&&a.current.clear(),s.current=!1},m=()=>{a.current.clear(),r(!1)};return c==null||c.addEventListener("keydown",_),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{c==null||c.removeEventListener("keydown",_),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),t}function z9(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function A9(e,n){return n.includes(e)?"code":"key"}const q2t=()=>{const e=nr();return M.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,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:n.x??r,y:n.y??s,zoom:n.zoom??a},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:a,maxZoom:o,panZoom:l}=e.getState(),c=I4(n,r,s,a,o,(t==null?void 0:t.padding)??.1);return l?(await l.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:a,domNode:o}=e.getState();if(!o)return n;const{x:l,y:c}=o.getBoundingClientRect(),d={x:n.x-l,y:n.y-c},_=t.snapGrid??s,f=t.snapToGrid??a;return Hh(d,r,f,_)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:a}=r.getBoundingClientRect(),o=ld(n,t);return{x:o.x+s,y:o.y+a}}}),[])};function GR(e,n){const t=[],r=new Map,s=[];for(const a of e)if(a.type==="add"){s.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of n){const o=r.get(a.id);if(!o){t.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){t.push({...o[0].item});continue}const l={...a};for(const c of o)G2t(c,l);t.push(l)}return s.length&&s.forEach(a=>{a.index!==void 0?t.splice(a.index,0,{...a.item}):t.push({...a.item})}),t}function G2t(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 V2t(e,n){return GR(e,n)}function W2t(e,n){return GR(e,n)}function oc(e,n){return{id:e,type:"select",selected:n}}function Lu(e,n=new Set,t=!1){const r=[];for(const[s,a]of e){const o=n.has(s);!(a.selected===void 0&&!o)&&a.selected!==o&&(t&&(a.selected=o),r.push(oc(a.id,o)))}return r}function T9({items:e=[],lookup:n}){var s;const t=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=n.get(o.id),c=((s=l==null?void 0:l.internals)==null?void 0:s.userNode)??l;c!==void 0&&c!==o&&t.push({id:o.id,item:o,type:"replace"}),c===void 0&&t.push({item:o,type:"add",index:a})}for(const[a]of n)r.get(a)===void 0&&t.push({id:a,type:"remove"});return t}function j9(e){return{id:e.id,type:"remove"}}const K2t=bR();function Y2t(e,n,t={}){return Mbt(e,n,{...t,onError:t.onError??K2t})}const M9=e=>gbt(e),X2t=e=>_R(e);function VR(e){return M.forwardRef(e)}const Z2t=typeof window<"u"?M.useLayoutEffect:M.useEffect;function R9(e){const[n,t]=M.useState(BigInt(0)),[r]=M.useState(()=>Q2t(()=>t(s=>s+BigInt(1))));return Z2t(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function Q2t(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const WR=M.createContext(null);function J2t({children:e}){const n=nr(),t=M.useCallback(l=>{const{nodes:c=[],setNodes:d,hasDefaultNodes:_,onNodesChange:f,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:S}=n.getState();let k=c;for(const v of l)k=typeof v=="function"?v(k):v;let b=T9({items:k,lookup:m});for(const v of S.values())b=v(b);_&&d(k),b.length>0?f==null||f(b):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:x,setNodes:y}=n.getState();v&&y(x)})},[]),r=R9(t),s=M.useCallback(l=>{const{edges:c=[],setEdges:d,hasDefaultEdges:_,onEdgesChange:f,edgeLookup:m}=n.getState();let g=c;for(const S of l)g=typeof S=="function"?S(g):S;_?d(g):f&&f(T9({items:g,lookup:m}))},[]),a=R9(s),o=M.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return h.jsx(WR.Provider,{value:o,children:e})}function ext(){const e=M.useContext(WR);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const txt=e=>!!e.panZoom;function q4(){const e=q2t(),n=nr(),t=ext(),r=_n(txt),s=M.useMemo(()=>{const a=f=>n.getState().nodeLookup.get(f),o=f=>{t.nodeQueue.push(f)},l=f=>{t.edgeQueue.push(f)},c=f=>{var v,x;const{nodeLookup:m,nodeOrigin:g}=n.getState(),S=M9(f)?f:m.get(f.id),k=S.parentId?yR(S.position,S.measured,S.parentId,m,g):S.position,b={...S,position:k,width:((v=S.measured)==null?void 0:v.width)??S.width,height:((x=S.measured)==null?void 0:x.height)??S.height};return dh(b)},d=(f,m,g={replace:!1})=>{o(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&M9(b)?b:{...k,...b}}return k}))},_=(f,m,g={replace:!1})=>{l(S=>S.map(k=>{if(k.id===f){const b=typeof m=="function"?m(k):m;return g.replace&&X2t(b)?b:{...k,...b}}return k}))};return{getNodes:()=>n.getState().nodes.map(f=>({...f})),getNode:f=>{var m;return(m=a(f))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:f=[]}=n.getState();return f.map(m=>({...m}))},getEdge:f=>n.getState().edgeLookup.get(f),setNodes:o,setEdges:l,addNodes:f=>{const m=Array.isArray(f)?f:[f];t.nodeQueue.push(g=>[...g,...m])},addEdges:f=>{const m=Array.isArray(f)?f:[f];t.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:f=[],edges:m=[],transform:g}=n.getState(),[S,k,b]=g;return{nodes:f.map(v=>({...v})),edges:m.map(v=>({...v})),viewport:{x:S,y:k,zoom:b}}},deleteElements:async({nodes:f=[],edges:m=[]})=>{const{nodes:g,edges:S,onNodesDelete:k,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:x,onDelete:y,onBeforeDelete:C}=n.getState(),{nodes:A,edges:E}=await wbt({nodesToRemove:f,edgesToRemove:m,nodes:g,edges:S,onBeforeDelete:C}),j=E.length>0,T=A.length>0;if(j){const D=E.map(j9);b==null||b(E),x(D)}if(T){const D=A.map(j9);k==null||k(A),v(D)}return(T||j)&&(y==null||y({nodes:A,edges:E})),{deletedNodes:A,deletedEdges:E}},getIntersectingNodes:(f,m=!0,g)=>{const S=r9(f),k=S?f:c(f),b=g!==void 0;return k?(g||n.getState().nodes).filter(v=>{const x=n.getState().nodeLookup.get(v.id);if(x&&!S&&(v.id===f.id||!x.internals.positionAbsolute))return!1;const y=dh(b?v:x),C=Dp(y,k);return m&&C>0||C>=y.width*y.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,m,g=!0)=>{const k=r9(f)?f:c(f);if(!k)return!1;const b=Dp(k,m);return g&&b>0||b>=m.width*m.height||b>=k.width*k.height},updateNode:d,updateNodeData:(f,m,g={replace:!1})=>{d(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},updateEdge:_,updateEdgeData:(f,m,g={replace:!1})=>{_(f,S=>{const k=typeof m=="function"?m(S):m;return g.replace?{...S,data:k}:{...S,data:{...S.data,...k}}},g)},getNodesBounds:f=>{const{nodeLookup:m,nodeOrigin:g}=n.getState();return vbt(f,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:f,id:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}-${f}${m?`-${m}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:f,handleId:m,nodeId:g})=>{var S;return Array.from(((S=n.getState().connectionLookup.get(`${g}${f?m?`-${f}-${m}`:`-${f}`:""}`))==null?void 0:S.values())??[])},fitView:async f=>{const m=n.getState().fitViewResolver??Cbt();return n.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:m}),t.nodeQueue.push(g=>[...g]),m.promise}}},[]);return M.useMemo(()=>({...s,...e,viewportInitialized:r}),[r])}const D9=e=>e.selected,nxt=typeof window<"u"?window:void 0;function rxt({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=nr(),{deleteElements:r}=q4(),s=hh(e,{actInsideInputWithModifier:!1}),a=hh(n,{target:nxt});M.useEffect(()=>{if(s){const{edges:o,nodes:l}=t.getState();r({nodes:l.filter(D9),edges:o.filter(D9)}),t.setState({nodesSelectionActive:!1})}},[s]),M.useEffect(()=>{t.setState({multiSelectionActive:a})},[a])}function sxt(e){const n=nr();M.useEffect(()=>{const t=()=>{var s,a,o,l;if(!e.current||!(((a=(s=e.current).checkVisibility)==null?void 0:a.call(s))??!0))return!1;const r=B4(e.current);(r.height===0||r.width===0)&&((l=(o=n.getState()).onError)==null||l.call(o,"004",ea.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 Vm={position:"absolute",width:"100%",height:"100%",top:0,left:0},ixt=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function axt({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:a=gc.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:_,maxZoom:f,zoomActivationKeyCode:m,preventScrolling:g=!0,children:S,noWheelClassName:k,noPanClassName:b,onViewportChange:v,isControlledViewport:x,paneClickDistance:y,selectionOnDrag:C}){const A=nr(),E=M.useRef(null),{userSelectionActive:j,lib:T,connectionInProgress:D}=_n(ixt,er),I=hh(m),P=M.useRef();sxt(E);const B=M.useCallback(F=>{v==null||v({x:F[0],y:F[1],zoom:F[2]}),x||A.setState({transform:F})},[v,x]);return M.useEffect(()=>{if(E.current){P.current=l2t({domNode:E.current,minZoom:_,maxZoom:f,translateExtent:d,viewport:c,onDraggingChange:W=>A.setState(Z=>Z.paneDragging===W?Z:{paneDragging:W}),onPanZoomStart:(W,Z)=>{const{onViewportChangeStart:J,onMoveStart:$}=A.getState();$==null||$(W,Z),J==null||J(Z)},onPanZoom:(W,Z)=>{const{onViewportChange:J,onMove:$}=A.getState();$==null||$(W,Z),J==null||J(Z)},onPanZoomEnd:(W,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=A.getState();$==null||$(W,Z),J==null||J(Z)}});const{x:F,y:V,zoom:X}=P.current.getViewport();return A.setState({panZoom:P.current,transform:[F,V,X],domNode:E.current.closest(".react-flow")}),()=>{var W;(W=P.current)==null||W.destroy()}}},[]),M.useEffect(()=>{var F;(F=P.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:n,zoomOnPinch:t,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:I,preventScrolling:g,noPanClassName:b,userSelectionActive:j,noWheelClassName:k,lib:T,onTransformChange:B,connectionInProgress:D,selectionOnDrag:C,paneClickDistance:y})},[e,n,t,r,s,a,o,l,I,g,b,j,k,T,B,D,C,y]),h.jsx("div",{className:"react-flow__renderer",ref:E,style:Vm,children:S})}const oxt=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function lxt(){const{userSelectionActive:e,userSelectionRect:n}=_n(oxt,er);return e&&n?h.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 vb=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},cxt=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function uxt({isSelecting:e,selectionKeyPressed:n,selectionMode:t=uh.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:a,selectionOnDrag:o,onSelectionStart:l,onSelectionEnd:c,onPaneClick:d,onPaneContextMenu:_,onPaneScroll:f,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:S,children:k}){const b=M.useRef(0),v=nr(),{userSelectionActive:x,elementsSelectable:y,dragging:C,panBy:A,autoPanSpeed:E}=_n(cxt,er),j=y&&(e||x),T=M.useRef(null),D=M.useRef(),I=M.useRef(new Set),P=M.useRef(new Set),B=M.useRef(!1),F=M.useRef(!1),V=M.useRef({x:0,y:0}),X=M.useRef(!1),W=q=>{if(F.current||B.current||v.getState().connection.inProgress){F.current=!1,B.current=!1;return}d==null||d(q),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},Z=q=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){q.preventDefault();return}_==null||_(q)},J=f?q=>f(q):void 0,$=q=>{F.current&&(q.stopPropagation(),F.current=!1)},L=q=>{var Ve,ht;const{domNode:ne,transform:le}=v.getState();if(D.current=ne==null?void 0:ne.getBoundingClientRect(),!D.current)return;const ge=q.target===T.current;if(!ge&&!!q.target.closest(".nokey")||!e||!(o&&ge||n)||q.button!==0||!q.isPrimary)return;(ht=(Ve=q.target)==null?void 0:Ve.setPointerCapture)==null||ht.call(Ve,q.pointerId),F.current=!1;const{x:Ee,y:Le}=Xi(q.nativeEvent,D.current),Pe=Hh({x:Ee,y:Le},le);v.setState({userSelectionRect:{width:0,height:0,startX:Pe.x,startY:Pe.y,x:Ee,y:Le}}),ge||(q.stopPropagation(),q.preventDefault())};function H(q,ne){const{userSelectionRect:le}=v.getState();if(!le)return;const{transform:ge,nodeLookup:ue,edgeLookup:Ce,connectionLookup:Ee,triggerNodeChanges:Le,triggerEdgeChanges:Pe,defaultEdgeOptions:Ve}=v.getState(),ht={x:le.startX,y:le.startY},{x:Be,y:wt}=ld(ht,ge),zt={startX:ht.x,startY:ht.y,x:qkt.id)),P.current=new Set;const St=(Ve==null?void 0:Ve.selectable)??!0;for(const kt of I.current){const xe=Ee.get(kt);if(xe)for(const{edgeId:je}of xe.values()){const We=Ce.get(je);We&&(We.selectable??St)&&P.current.add(je)}}if(!s9(vt,I.current)){const kt=Lu(ue,I.current,!0);Le(kt)}if(!s9(Lt,P.current)){const kt=Lu(Ce,P.current);Pe(kt)}v.setState({userSelectionRect:zt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!s||!D.current)return;const[q,ne]=O4(V.current,D.current,E);A({x:q,y:ne}).then(le=>{if(!F.current||!le){b.current=requestAnimationFrame(Y);return}const{x:ge,y:ue}=V.current;H(ge,ue),b.current=requestAnimationFrame(Y)})}const G=()=>{cancelAnimationFrame(b.current),b.current=0,X.current=!1};M.useEffect(()=>()=>G(),[]);const ee=q=>{const{userSelectionRect:ne,transform:le,resetSelectedElements:ge}=v.getState();if(!D.current||!ne)return;const{x:ue,y:Ce}=Xi(q.nativeEvent,D.current);V.current={x:ue,y:Ce};const Ee=ld({x:ne.startX,y:ne.startY},le);if(!F.current){const Le=n?0:a;if(Math.hypot(ue-Ee.x,Ce-Ee.y)<=Le)return;ge(),l==null||l(q)}F.current=!0,X.current||(Y(),X.current=!0),H(ue,Ce)},oe=q=>{var ne,le;if(!j){q.target===T.current&&v.getState().connection.inProgress&&(B.current=!0);return}q.button===0&&((le=(ne=q.target)==null?void 0:ne.releasePointerCapture)==null||le.call(ne,q.pointerId),!x&&q.target===T.current&&v.getState().userSelectionRect&&(W==null||W(q)),v.setState({userSelectionActive:!1,userSelectionRect:null}),F.current&&(c==null||c(q),v.setState({nodesSelectionActive:I.current.size>0})),G())},he=q=>{var ne,le;(le=(ne=q.target)==null?void 0:ne.releasePointerCapture)==null||le.call(ne,q.pointerId),G()},ie=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Lr(["react-flow__pane",{draggable:ie,dragging:C,selection:e}]),onClick:j?void 0:vb(W,T),onContextMenu:vb(Z,T),onWheel:vb(J,T),onPointerEnter:j?void 0:m,onPointerMove:j?ee:g,onPointerUp:oe,onPointerCancel:j?he:void 0,onPointerDownCapture:j?L:void 0,onClickCapture:j?$:void 0,onPointerLeave:S,ref:T,style:Vm,children:[k,h.jsx(lxt,{})]})}function lx({id:e,store:n,unselect:t=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:c}=n.getState(),d=l.get(e);if(!d){c==null||c("012",ea.error012(e));return}n.setState({nodesSelectionActive:!1}),d.selected?(t||d.selected&&o)&&(a({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var _;return(_=r==null?void 0:r.current)==null?void 0:_.blur()})):s([e])}function KR({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:a,nodeClickDistance:o}){const l=nr(),[c,d]=M.useState(!1),_=M.useRef();return M.useEffect(()=>{_.current=Kbt({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{lx({id:f,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),M.useEffect(()=>{if(!(n||!e.current||!_.current))return _.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:s,nodeClickDistance:o}),()=>{var f;(f=_.current)==null||f.destroy()}},[t,r,n,a,e,s,o]),c}const dxt=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function YR(){const e=nr();return M.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:c,nodeLookup:d,nodeOrigin:_}=e.getState(),f=new Map,m=dxt(o),g=s?a[0]:5,S=s?a[1]:5,k=t.direction.x*g*t.factor,b=t.direction.y*S*t.factor;for(const[,v]of d){if(!m(v))continue;let x={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+b};s&&(x=$h(x,a));const{position:y,positionAbsolute:C}=pR({nodeId:v.id,nextPosition:x,nodeLookup:d,nodeExtent:r,nodeOrigin:_,onError:l});v.position=y,v.internals.positionAbsolute=C,f.set(v.id,v)}c(f)},[])}const G4=M.createContext(null),fxt=G4.Provider;G4.Consumer;const XR=()=>M.useContext(G4),hxt=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),ZR=M.createContext(null);function _xt({children:e}){const n=_n(hxt,er);return h.jsx(ZR.Provider,{value:n,children:e})}function pxt(){const e=M.useContext(ZR);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const mxt={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},gxt=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:c,isValid:d}=o;if(!l&&!s)return mxt;const _=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===n&&(c==null?void 0:c.type)===t;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===n&&(l==null?void 0:l.type)===t,connectingTo:_,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:a===ad.Strict?(l==null?void 0:l.type)!==t:e!==(l==null?void 0:l.nodeId)||n!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!s,valid:_&&d}};function vxt({type:e="source",position:n=mt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:c,className:d,onMouseDown:_,onTouchStart:f,...m},g){var X,W;const S=o||null,k=e==="target",b=nr(),v=XR(),{connectOnClick:x,noPanClassName:y,rfId:C}=pxt(),{connectingFrom:A,connectingTo:E,clickConnecting:j,isPossibleEndHandle:T,connectionInProcess:D,clickConnectionInProcess:I,valid:P}=_n(gxt(v,S,e),er);v||(W=(X=b.getState()).onError)==null||W.call(X,"010",ea.error010());const B=Z=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=b.getState(),H={...J,...Z};if(L){const{edges:Y,setEdges:G,onError:ee}=b.getState();G(Y2t(H,Y,{onError:ee}))}$==null||$(H),l==null||l(H)},F=Z=>{if(!v)return;const J=kR(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){const $=b.getState();ox.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:S,nodeId:v,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var H,Y;return(Y=(H=b.getState()).onConnectEnd)==null?void 0:Y.call(H,...L)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...L)=>{var H,Y;return((Y=(H=b.getState()).isValidConnection)==null?void 0:Y.call(H,...L))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?_==null||_(Z):f==null||f(Z)},V=Z=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:H,isValidConnection:Y,lib:G,rfId:ee,nodeLookup:oe,connection:he}=b.getState();if(!v||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:v,handleId:S,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:S}});return}const ie=wR(Z.target),q=t||Y,{connection:ne,isValid:le}=ox.isValid(Z.nativeEvent,{handle:{nodeId:v,id:S,type:e},connectionMode:H,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:q,flowId:ee,doc:ie,lib:G,nodeLookup:oe});le&&ne&&B(ne);const ge=structuredClone(he);delete ge.inProgress,ge.toPosition=ge.toHandle?ge.toHandle.position:null,$==null||$(Z,ge),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":S,"data-nodeid":v,"data-handlepos":n,"data-id":`${C}-${v}-${S}-${e}`,className:Lr(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",y,d,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:a,clickconnecting:j,connectingfrom:A,connectingto:E,valid:P,connectionindicator:r&&(!D||T)&&(D||I?a:s)}]),onMouseDown:F,onTouchStart:F,onClick:x?V:void 0,ref:g,...m,children:c})}const zl=M.memo(VR(vxt));function bxt({data:e,isConnectable:n,sourcePosition:t=mt.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(zl,{type:"source",position:t,isConnectable:n})]})}function xxt({data:e,isConnectable:n,targetPosition:t=mt.Top,sourcePosition:r=mt.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(zl,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,h.jsx(zl,{type:"source",position:r,isConnectable:n})]})}function yxt(){return null}function wxt({data:e,isConnectable:n,targetPosition:t=mt.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(zl,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Lp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},L9={input:bxt,default:xxt,output:wxt,group:yxt};function Sxt(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 kxt=e=>{const{width:n,height:t,x:r,y:s}=Bh(e.nodeLookup,{filter:a=>!!a.selected});return{width:Yi(n)?n:null,height:Yi(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 Cxt({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=nr(),{width:s,height:a,transformString:o,userSelectionActive:l}=_n(kxt,er),c=YR(),d=M.useRef(null);M.useEffect(()=>{var g;t||(g=d.current)==null||g.focus({preventScroll:!0})},[t]);const _=!l&&s!==null&&a!==null;if(KR({nodeRef:d,disabled:!_}),!_)return null;const f=e?g=>{const S=r.getState().nodes.filter(k=>k.selected);e(g,S)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(Lp,g.key)&&(g.preventDefault(),c({direction:Lp[g.key],factor:g.shiftKey?4:1}))};return h.jsx("div",{className:Lr(["react-flow__nodesselection","react-flow__container",n]),style:{transform:o},children:h.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:t?void 0:-1,onKeyDown:t?void 0:m,style:{width:s,height:a}})})}const O9=typeof window<"u"?window:void 0,Ext=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function QR({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:_,selectionMode:f,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:S,panActivationKeyCode:k,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:C,panOnScrollSpeed:A,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:T,autoPanOnSelection:D,defaultViewport:I,translateExtent:P,minZoom:B,maxZoom:F,preventScrolling:V,onSelectionContextMenu:X,noWheelClassName:W,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:H,userSelectionActive:Y}=_n(Ext,er),G=hh(d,{target:O9}),ee=hh(k,{target:O9}),oe=ee||T,he=ee||C,ie=_&&oe!==!0,q=G||Y||ie;return rxt({deleteKeyCode:c,multiSelectionKeyCode:S}),h.jsx(axt,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:x,zoomOnPinch:y,panOnScroll:he,panOnScrollSpeed:A,panOnScrollMode:E,zoomOnDoubleClick:j,panOnDrag:!G&&oe,defaultViewport:I,translateExtent:P,minZoom:B,maxZoom:F,zoomActivationKeyCode:b,preventScrolling:V,noWheelClassName:W,noPanClassName:Z,onViewportChange:$,isControlledViewport:L,paneClickDistance:l,selectionOnDrag:ie,children:h.jsxs(uxt,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:oe,autoPanOnSelection:D,isSelecting:!!q,selectionMode:f,selectionKeyPressed:G,paneClickDistance:l,selectionOnDrag:ie,children:[e,H&&h.jsx(Cxt,{onSelectionContextMenu:X,noPanClassName:Z,disableKeyboardA11y:J})]})})}QR.displayName="FlowRenderer";const Nxt=M.memo(QR),zxt=e=>n=>e?L4(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 Axt(e){return _n(M.useCallback(zxt(e),[e]),er)}const Txt=e=>e.updateNodeInternals;function jxt(){const e=_n(Txt),[n]=M.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(t=>{const r=new Map;t.forEach(s=>{const a=s.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:s.target,force:!0})}),e(r)}));return M.useEffect(()=>()=>{n==null||n.disconnect()},[n]),n}function Mxt({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=nr(),a=M.useRef(null),o=M.useRef(null),l=M.useRef(e.sourcePosition),c=M.useRef(e.targetPosition),d=M.useRef(n),_=t&&!!e.internals.handleBounds;return M.useEffect(()=>{a.current&&!e.hidden&&(!_||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[_,e.hidden]),M.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),M.useEffect(()=>{if(a.current){const f=d.current!==n,m=l.current!==e.sourcePosition,g=c.current!==e.targetPosition;(f||m||g)&&(d.current=n,l.current=e.sourcePosition,c.current=e.targetPosition,s.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,n,e.sourcePosition,e.targetPosition]),a}function Rxt({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:_,resizeObserver:f,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:S,rfId:k,nodeTypes:b,nodeClickDistance:v,onError:x}){const{node:y,internals:C,isParent:A}=_n(q=>{const ne=q.nodeLookup.get(e),le=q.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:le}},er);let E=y.type||"default",j=(b==null?void 0:b[E])||L9[E];j===void 0&&(x==null||x("003",ea.error003(E)),E="default",j=(b==null?void 0:b.default)||L9.default);const T=!!(y.draggable||l&&typeof y.draggable>"u"),D=!!(y.selectable||c&&typeof y.selectable>"u"),I=!!(y.connectable||d&&typeof y.connectable>"u"),P=!!(y.focusable||_&&typeof y.focusable>"u"),B=nr(),F=xR(y),V=Mxt({node:y,nodeType:E,hasDimensions:F,resizeObserver:f}),X=KR({nodeRef:V,disabled:y.hidden||!T,noDragClassName:m,handleSelector:y.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:v}),W=YR();if(y.hidden)return null;const Z=To(y),J=Sxt(y),$=D||T||n||t||r||s,L=t?q=>t(q,{...C.userNode}):void 0,H=r?q=>r(q,{...C.userNode}):void 0,Y=s?q=>s(q,{...C.userNode}):void 0,G=a?q=>a(q,{...C.userNode}):void 0,ee=o?q=>o(q,{...C.userNode}):void 0,oe=q=>{const{selectNodesOnDrag:ne,nodeDragThreshold:le}=B.getState();D&&(!ne||!T||le>0)&&lx({id:e,store:B,nodeRef:V}),n&&n(q,{...C.userNode})},he=q=>{if(!(SR(q.nativeEvent)||S)){if(uR.includes(q.key)&&D){const ne=q.key==="Escape";lx({id:e,store:B,unselect:ne,nodeRef:V})}else if(T&&y.selected&&Object.prototype.hasOwnProperty.call(Lp,q.key)){q.preventDefault();const{ariaLabelConfig:ne}=B.getState();B.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:q.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),W({direction:Lp[q.key],factor:q.shiftKey?4:1})}}},ie=()=>{var Ee;if(S||!((Ee=V.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:q,width:ne,height:le,autoPanOnNodeFocus:ge,setCenter:ue}=B.getState();if(!ge)return;L4(new Map([[e,y]]),{x:0,y:0,width:ne,height:le},q,!0).length>0||ue(y.position.x+Z.width/2,y.position.y+Z.height/2,{zoom:q[2]})};return h.jsx("div",{className:Lr(["react-flow__node",`react-flow__node-${E}`,{[g]:T},y.className,{selected:y.selected,selectable:D,parent:A,draggable:T,dragging:X}]),ref:V,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:F?"visible":"hidden",...y.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:H,onMouseLeave:Y,onContextMenu:G,onClick:oe,onDoubleClick:ee,onKeyDown:P?he:void 0,tabIndex:P?0:void 0,onFocus:P?ie:void 0,role:y.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${FR}-${k}`,"aria-label":y.ariaLabel,...y.domAttributes,children:h.jsx(fxt,{value:e,children:h.jsx(j,{id:e,data:y.data,type:E,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:y.selected??!1,selectable:D,draggable:T,deletable:y.deletable??!0,isConnectable:I,sourcePosition:y.sourcePosition,targetPosition:y.targetPosition,dragging:X,dragHandle:y.dragHandle,zIndex:C.z,parentId:y.parentId,...Z})})})}var Dxt=M.memo(Rxt);const Lxt=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function JR(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:a}=_n(Lxt,er),o=Axt(e.onlyRenderVisibleElements),l=jxt();return h.jsx("div",{className:"react-flow__nodes",style:Vm,children:o.map(c=>h.jsx(Dxt,{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:l,nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}JR.displayName="NodeRenderer";const Oxt=M.memo(JR);function Ixt(e){return _n(M.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 a=t.nodeLookup.get(s.source),o=t.nodeLookup.get(s.target);a&&o&&Abt({sourceNode:a,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),er)}const Bxt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:t,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},$xt=({color:e="none",strokeWidth:n=1})=>{const t={strokeWidth:n,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:t,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},I9={[Mp.Arrow]:Bxt,[Mp.ArrowClosed]:$xt};function Hxt(e){const n=nr();return M.useMemo(()=>{var s,a;return Object.prototype.hasOwnProperty.call(I9,e)?I9[e]:((a=(s=n.getState()).onError)==null||a.call(s,"009",ea.error009(e)),null)},[e])}const Pxt=({id:e,type:n,color:t,width:r=12.5,height:s=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const c=Hxt(n);return c?h.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:h.jsx(c,{color:t,strokeWidth:o})}):null},eD=({defaultColor:e,rfId:n})=>{const t=_n(a=>a.edges),r=_n(a=>a.defaultEdgeOptions),s=M.useMemo(()=>Ibt(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?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:s.map(a=>h.jsx(Pxt,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};eD.displayName="MarkerDefinitions";var Fxt=M.memo(eD);function tD({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:c,className:d,..._}){const[f,m]=M.useState({x:1,y:0,width:0,height:0}),g=Lr(["react-flow__edge-textwrapper",d]),S=M.useRef(null);return M.useEffect(()=>{if(S.current){const k=S.current.getBBox();m({x:k.x,y:k.y,width:k.width,height:k.height})}},[t]),t?h.jsxs("g",{transform:`translate(${e-f.width/2} ${n-f.height/2})`,className:g,visibility:f.width?"visible":"hidden",..._,children:[s&&h.jsx("rect",{width:f.width+2*o[0],x:-o[0],y:-o[1],height:f.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),h.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:S,style:r,children:t}),c]}):null}tD.displayName="EdgeText";const Uxt=M.memo(tD);function Wm({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c,interactionWidth:d=20,..._}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{..._,d:e,fill:"none",className:Lr(["react-flow__edge-path",_.className])}),d?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Yi(n)&&Yi(t)?h.jsx(Uxt,{x:n,y:t,label:r,labelStyle:s,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:c}):null]})}function B9({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===mt.Left||e===mt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function nD({sourceX:e,sourceY:n,sourcePosition:t=mt.Bottom,targetX:r,targetY:s,targetPosition:a=mt.Top}){const[o,l]=B9({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,d]=B9({pos:a,x1:r,y1:s,x2:e,y2:n}),[_,f,m,g]=CR({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${n} C${o},${l} ${c},${d} ${r},${s}`,_,f,m,g]}function rD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o,targetPosition:l,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})=>{const[x,y,C]=nD({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l}),A=e.isInternal?void 0:n;return h.jsx(Wm,{id:A,path:x,labelX:y,labelY:C,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:v})})}const qxt=rD({isInternal:!1}),sD=rD({isInternal:!0});qxt.displayName="SimpleBezierEdge";sD.displayName="SimpleBezierEdgeInternal";function iD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,sourcePosition:g=mt.Bottom,targetPosition:S=mt.Top,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,A]=sx({sourceX:t,sourceY:r,sourcePosition:g,targetX:s,targetY:a,targetPosition:S,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),E=e.isInternal?void 0:n;return h.jsx(Wm,{id:E,path:y,labelX:C,labelY:A,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:k,markerStart:b,interactionWidth:x})})}const aD=iD({isInternal:!1}),oD=iD({isInternal:!0});aD.displayName="SmoothStepEdge";oD.displayName="SmoothStepEdgeInternal";function lD(e){return M.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return h.jsx(aD,{...t,id:r,pathOptions:M.useMemo(()=>{var a;return{borderRadius:0,offset:(a=t.pathOptions)==null?void 0:a.offset}},[(s=t.pathOptions)==null?void 0:s.offset])})})}const Gxt=lD({isInternal:!1}),cD=lD({isInternal:!0});Gxt.displayName="StepEdge";cD.displayName="StepEdgeInternal";function uD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})=>{const[b,v,x]=zR({sourceX:t,sourceY:r,targetX:s,targetY:a}),y=e.isInternal?void 0:n;return h.jsx(Wm,{id:y,path:b,labelX:v,labelY:x,label:o,labelStyle:l,labelShowBg:c,labelBgStyle:d,labelBgPadding:_,labelBgBorderRadius:f,style:m,markerEnd:g,markerStart:S,interactionWidth:k})})}const Vxt=uD({isInternal:!1}),dD=uD({isInternal:!0});Vxt.displayName="StraightEdge";dD.displayName="StraightEdgeInternal";function fD(e){return M.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:a,sourcePosition:o=mt.Bottom,targetPosition:l=mt.Top,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,pathOptions:v,interactionWidth:x})=>{const[y,C,A]=ER({sourceX:t,sourceY:r,sourcePosition:o,targetX:s,targetY:a,targetPosition:l,curvature:v==null?void 0:v.curvature}),E=e.isInternal?void 0:n;return h.jsx(Wm,{id:E,path:y,labelX:C,labelY:A,label:c,labelStyle:d,labelShowBg:_,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,style:S,markerEnd:k,markerStart:b,interactionWidth:x})})}const Wxt=fD({isInternal:!1}),hD=fD({isInternal:!0});Wxt.displayName="BezierEdge";hD.displayName="BezierEdgeInternal";const $9={default:hD,straight:dD,step:cD,smoothstep:oD,simplebezier:sD},H9={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},Kxt=(e,n,t)=>t===mt.Left?e-n:t===mt.Right?e+n:e,Yxt=(e,n,t)=>t===mt.Top?e-n:t===mt.Bottom?e+n:e,P9="react-flow__edgeupdater";function F9({position:e,centerX:n,centerY:t,radius:r=10,onMouseDown:s,onMouseEnter:a,onMouseOut:o,type:l}){return h.jsx("circle",{onMouseDown:s,onMouseEnter:a,onMouseOut:o,className:Lr([P9,`${P9}-${l}`]),cx:Kxt(n,r,e),cy:Yxt(t,r,e),r,stroke:"transparent",fill:"transparent"})}function Xxt({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:a,targetY:o,sourcePosition:l,targetPosition:c,onReconnect:d,onReconnectStart:_,onReconnectEnd:f,setReconnecting:m,setUpdateHover:g}){const S=nr(),k=(C,A)=>{if(C.button!==0)return;const{autoPanOnConnect:E,domNode:j,connectionMode:T,connectionRadius:D,lib:I,onConnectStart:P,cancelConnection:B,nodeLookup:F,rfId:V,panBy:X,updateConnection:W}=S.getState(),Z=A.type==="target",J=(H,Y)=>{m(!1),f==null||f(H,t,A.type,Y)},$=H=>d==null?void 0:d(t,H),L=(H,Y)=>{m(!0),_==null||_(C,t,A.type),P==null||P(H,Y)};ox.onPointerDown(C.nativeEvent,{autoPanOnConnect:E,connectionMode:T,connectionRadius:D,domNode:j,handleId:A.id,nodeId:A.nodeId,nodeLookup:F,isTarget:Z,edgeUpdaterType:A.type,lib:I,flowId:V,cancelConnection:B,panBy:X,isValidConnection:(...H)=>{var Y,G;return((G=(Y=S.getState()).isValidConnection)==null?void 0:G.call(Y,...H))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...H)=>{var Y,G;return(G=(Y=S.getState()).onConnectEnd)==null?void 0:G.call(Y,...H)},onReconnectEnd:J,updateConnection:W,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},b=C=>k(C,{nodeId:t.target,id:t.targetHandle??null,type:"target"}),v=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),x=()=>g(!0),y=()=>g(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(F9,{position:l,centerX:r,centerY:s,radius:n,onMouseDown:b,onMouseEnter:x,onMouseOut:y,type:"source"}),(e===!0||e==="target")&&h.jsx(F9,{position:c,centerX:a,centerY:o,radius:n,onMouseDown:v,onMouseEnter:x,onMouseOut:y,type:"target"})]})}function Zxt({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,rfId:S,edgeTypes:k,noPanClassName:b,onError:v,disableKeyboardA11y:x}){let y=_n(ue=>ue.edgeLookup.get(e));const C=_n(ue=>ue.defaultEdgeOptions);y=C?{...C,...y}:y;let A=y.type||"default",E=(k==null?void 0:k[A])||$9[A];E===void 0&&(v==null||v("011",ea.error011(A)),A="default",E=(k==null?void 0:k.default)||$9.default);const j=!!(y.focusable||n&&typeof y.focusable>"u"),T=typeof f<"u"&&(y.reconnectable||t&&typeof y.reconnectable>"u"),D=!!(y.selectable||r&&typeof y.selectable>"u"),I=M.useRef(null),[P,B]=M.useState(!1),[F,V]=M.useState(!1),X=nr(),{zIndex:W=y.zIndex,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:H,targetPosition:Y}=_n(M.useCallback(ue=>{const Ce=ue.nodeLookup.get(y.source),Ee=ue.nodeLookup.get(y.target);if(!Ce||!Ee)return H9;const Le=Obt({id:e,sourceNode:Ce,targetNode:Ee,sourceHandle:y.sourceHandle||null,targetHandle:y.targetHandle||null,connectionMode:ue.connectionMode,onError:v}),Pe=zbt({selected:y.selected,zIndex:y.zIndex,sourceNode:Ce,targetNode:Ee,elevateOnSelect:ue.elevateEdgesOnSelect,zIndexMode:ue.zIndexMode});return{...Le||H9,zIndex:Pe}},[y.source,y.target,y.sourceHandle,y.targetHandle,y.selected,y.zIndex]),er),G=M.useMemo(()=>y.markerStart?`url('#${ix(y.markerStart,S)}')`:void 0,[y.markerStart,S]),ee=M.useMemo(()=>y.markerEnd?`url('#${ix(y.markerEnd,S)}')`:void 0,[y.markerEnd,S]);if(y.hidden||Z===null||J===null||$===null||L===null)return null;const oe=ue=>{var Pe;const{addSelectedEdges:Ce,unselectNodesAndEdges:Ee,multiSelectionActive:Le}=X.getState();D&&(X.setState({nodesSelectionActive:!1}),y.selected&&Le?(Ee({nodes:[],edges:[y]}),(Pe=I.current)==null||Pe.blur()):Ce([e])),s&&s(ue,y)},he=a?ue=>{a(ue,{...y})}:void 0,ie=o?ue=>{o(ue,{...y})}:void 0,q=l?ue=>{l(ue,{...y})}:void 0,ne=c?ue=>{c(ue,{...y})}:void 0,le=d?ue=>{d(ue,{...y})}:void 0,ge=ue=>{var Ce;if(!x&&uR.includes(ue.key)&&D){const{unselectNodesAndEdges:Ee,addSelectedEdges:Le}=X.getState();ue.key==="Escape"?((Ce=I.current)==null||Ce.blur(),Ee({edges:[y]})):Le([e])}};return h.jsx("svg",{style:{zIndex:W},children:h.jsxs("g",{className:Lr(["react-flow__edge",`react-flow__edge-${A}`,y.className,b,{selected:y.selected,animated:y.animated,inactive:!D&&!s,updating:P,selectable:D}]),onClick:oe,onDoubleClick:he,onContextMenu:ie,onMouseEnter:q,onMouseMove:ne,onMouseLeave:le,onKeyDown:j?ge:void 0,tabIndex:j?0:void 0,role:y.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":y.ariaLabel===null?void 0:y.ariaLabel||`Edge from ${y.source} to ${y.target}`,"aria-describedby":j?`${UR}-${S}`:void 0,ref:I,...y.domAttributes,children:[!F&&h.jsx(E,{id:e,source:y.source,target:y.target,type:y.type,selected:y.selected,animated:y.animated,selectable:D,deletable:y.deletable??!0,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:H,targetPosition:Y,data:y.data,style:y.style,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerStart:G,markerEnd:ee,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth}),T&&h.jsx(Xxt,{edge:y,isReconnectable:T,reconnectRadius:_,onReconnect:f,onReconnectStart:m,onReconnectEnd:g,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:H,targetPosition:Y,setUpdateHover:B,setReconnecting:V})]})})}var Qxt=M.memo(Zxt);const Jxt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function _D({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:_,reconnectRadius:f,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,disableKeyboardA11y:k}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,onError:y}=_n(Jxt,er),C=Ixt(n);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(Fxt,{defaultColor:e,rfId:t}),C.map(A=>h.jsx(Qxt,{id:A,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:x,noPanClassName:s,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:_,reconnectRadius:f,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:S,rfId:t,onError:y,edgeTypes:r,disableKeyboardA11y:k},A))]})}_D.displayName="EdgeRenderer";const eyt=M.memo(_D),tyt=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function nyt({children:e}){const n=_n(tyt);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function ryt(e){const n=q4(),t=M.useRef(!1);M.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const syt=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function iyt(e){const n=_n(syt),t=nr();return M.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function ayt(e){return e.connection.inProgress?{...e.connection,to:Hh(e.connection.to,e.transform)}:{...e.connection}}function oyt(e){return ayt}function lyt(e){const n=oyt();return _n(n,er)}const cyt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function uyt({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:a,height:o,isValid:l,inProgress:c}=_n(cyt,er);return!(a&&s&&c)?null:h.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Lr(["react-flow__connection",hR(l)]),children:h.jsx(pD,{style:n,type:t,CustomComponent:r,isValid:l})})})}const pD=({style:e,type:n=gl.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:a,fromNode:o,fromHandle:l,fromPosition:c,to:d,toNode:_,toHandle:f,toPosition:m,pointer:g}=lyt();if(!s)return;if(t)return h.jsx(t,{connectionLineType:n,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:d.x,toY:d.y,fromPosition:c,toPosition:m,connectionStatus:hR(r),toNode:_,toHandle:f,pointer:g});let S="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:d.x,targetY:d.y,targetPosition:m};switch(n){case gl.Bezier:[S]=ER(k);break;case gl.SimpleBezier:[S]=nD(k);break;case gl.Step:[S]=sx({...k,borderRadius:0});break;case gl.SmoothStep:[S]=sx(k);break;default:[S]=zR(k)}return h.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:e})};pD.displayName="ConnectionLine";const dyt={};function U9(e=dyt){M.useRef(e),nr(),M.useEffect(()=>{},[e])}function fyt(){nr(),M.useRef(!1),M.useEffect(()=>{},[])}function mD({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,onSelectionContextMenu:f,onSelectionStart:m,onSelectionEnd:g,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:j,deleteKeyCode:T,onlyRenderVisibleElements:D,elementsSelectable:I,defaultViewport:P,translateExtent:B,minZoom:F,maxZoom:V,preventScrolling:X,defaultMarkerColor:W,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:H,zoomOnDoubleClick:Y,panOnDrag:G,autoPanOnSelection:ee,onPaneClick:oe,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:q,onPaneScroll:ne,onPaneContextMenu:le,paneClickDistance:ge,nodeClickDistance:ue,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,onReconnect:ht,onReconnectStart:Be,onReconnectEnd:wt,noDragClassName:zt,noWheelClassName:vt,noPanClassName:Lt,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe,viewport:je,onViewportChange:We}){return U9(e),U9(n),fyt(),ryt(t),iyt(je),h.jsx(Nxt,{onPaneClick:oe,onPaneMouseEnter:he,onPaneMouseMove:ie,onPaneMouseLeave:q,onPaneContextMenu:le,onPaneScroll:ne,paneClickDistance:ge,deleteKeyCode:T,selectionKeyCode:x,selectionOnDrag:y,selectionMode:C,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:A,panActivationKeyCode:E,zoomActivationKeyCode:j,elementsSelectable:I,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:Y,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:H,panOnDrag:G,autoPanOnSelection:ee,defaultViewport:P,translateExtent:B,minZoom:F,maxZoom:V,onSelectionContextMenu:f,preventScrolling:X,noDragClassName:zt,noWheelClassName:vt,noPanClassName:Lt,disableKeyboardA11y:St,onViewportChange:We,isControlledViewport:!!je,children:h.jsxs(nyt,{children:[h.jsx(eyt,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:o,onReconnect:ht,onReconnectStart:Be,onReconnectEnd:wt,onlyRenderVisibleElements:D,onEdgeContextMenu:Ce,onEdgeMouseEnter:Ee,onEdgeMouseMove:Le,onEdgeMouseLeave:Pe,reconnectRadius:Ve,defaultMarkerColor:W,noPanClassName:Lt,disableKeyboardA11y:St,rfId:xe}),h.jsx(uyt,{style:k,type:S,component:b,containerStyle:v}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(Oxt,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:_,nodeClickDistance:ue,onlyRenderVisibleElements:D,noPanClassName:Lt,noDragClassName:zt,disableKeyboardA11y:St,nodeExtent:kt,rfId:xe}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}mD.displayName="GraphView";const hyt=M.memo(mD),_yt=bR(),q9=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c=.5,maxZoom:d=2,nodeOrigin:_,nodeExtent:f,zIndexMode:m="basic"}={})=>{const g=new Map,S=new Map,k=new Map,b=new Map,v=r??n??[],x=t??e??[],y=_??[0,0],C=f??ch;jR(k,b,v);const{nodesInitialized:A}=ax(x,g,S,{nodeOrigin:y,nodeExtent:C,zIndexMode:m});let E=[0,0,1];if(o&&s&&a){const j=Bh(g,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:T,y:D,zoom:I}=I4(j,s,a,c,d,(l==null?void 0:l.padding)??.1);E=[T,D,I]}return{rfId:"1",width:s??0,height:a??0,transform:E,nodes:x,nodesInitialized:A,nodeLookup:g,parentLookup:S,edges:v,edgeLookup:b,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:d,translateExtent:ch,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ad.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:y,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:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...fR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:_yt,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:dR,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},pyt=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m})=>C2t((g,S)=>{async function k(){const{nodeLookup:b,panZoom:v,fitViewOptions:x,fitViewResolver:y,width:C,height:A,minZoom:E,maxZoom:j}=S();v&&(await ybt({nodes:b,width:C,height:A,panZoom:v,minZoom:E,maxZoom:j},x),y==null||y.resolve(!0),g({fitViewResolver:null}))}return{...q9({nodes:e,edges:n,width:s,height:a,fitView:o,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:_,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:m}),setNodes:b=>{const{nodeLookup:v,parentLookup:x,nodeOrigin:y,elevateNodesOnSelect:C,fitViewQueued:A,zIndexMode:E,nodesSelectionActive:j}=S(),{nodesInitialized:T,hasSelectedNodes:D}=ax(b,v,x,{nodeOrigin:y,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:E}),I=j&&D;A&&T?(k(),g({nodes:b,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:I})):g({nodes:b,nodesInitialized:T,nodesSelectionActive:I})},setEdges:b=>{const{connectionLookup:v,edgeLookup:x}=S();jR(v,x,b),g({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:x}=S();x(b),g({hasDefaultNodes:!0})}if(v){const{setEdges:x}=S();x(v),g({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:x,parentLookup:y,domNode:C,nodeOrigin:A,nodeExtent:E,debug:j,fitViewQueued:T,zIndexMode:D}=S(),{changes:I,updatedInternals:P}=qbt(b,x,y,C,A,E,D);P&&(Hbt(x,y,{nodeOrigin:A,nodeExtent:E,zIndexMode:D}),T?(k(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(I==null?void 0:I.length)>0&&(j&&console.log("React Flow: trigger node changes",I),v==null||v(I)))},updateNodePositions:(b,v=!1)=>{const x=[];let y=[];const{nodeLookup:C,triggerNodeChanges:A,connection:E,updateConnection:j,onNodesChangeMiddlewareMap:T}=S();for(const[D,I]of b){const P=C.get(D),B=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(I!=null&&I.position)),F={id:D,type:"position",position:B?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:v};if(P&&E.inProgress&&E.fromNode.id===P.id){const V=kc(P,E.fromHandle,mt.Left,!0);j({...E,from:V})}B&&P.parentId&&x.push({id:D,parentId:P.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),y.push(F)}if(x.length>0){const{parentLookup:D,nodeOrigin:I}=S(),P=U4(x,C,D,I);y.push(...P)}for(const D of T.values())y=D(y);A(y)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:x,nodes:y,hasDefaultNodes:C,debug:A}=S();if(b!=null&&b.length){if(C){const E=V2t(b,y);x(E)}A&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:x,edges:y,hasDefaultEdges:C,debug:A}=S();if(b!=null&&b.length){if(C){const E=W2t(b,y);x(E)}A&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:A}=S();if(v){const E=b.map(j=>oc(j,!0));C(E);return}C(Lu(y,new Set([...b]),!0)),A(Lu(x))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:x,nodeLookup:y,triggerNodeChanges:C,triggerEdgeChanges:A}=S();if(v){const E=b.map(j=>oc(j,!0));A(E);return}A(Lu(x,new Set([...b]))),C(Lu(y,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:x,nodes:y,nodeLookup:C,triggerNodeChanges:A,triggerEdgeChanges:E}=S(),j=b||y,T=v||x,D=[];for(const P of j){if(!P.selected)continue;const B=C.get(P.id);B&&(B.selected=!1),D.push(oc(P.id,!1))}const I=[];for(const P of T)P.selected&&I.push(oc(P.id,!1));A(D),E(I)},setMinZoom:b=>{const{panZoom:v,maxZoom:x}=S();v==null||v.setScaleExtent([b,x]),g({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:x}=S();v==null||v.setScaleExtent([x,b]),g({maxZoom:b})},setTranslateExtent:b=>{var v;(v=S().panZoom)==null||v.setTranslateExtent(b),g({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:x,triggerEdgeChanges:y,elementsSelectable:C}=S();if(!C)return;const A=v.reduce((j,T)=>T.selected?[...j,oc(T.id,!1)]:j,[]),E=b.reduce((j,T)=>T.selected?[...j,oc(T.id,!1)]:j,[]);x(A),y(E)},setNodeExtent:b=>{const{nodes:v,nodeLookup:x,parentLookup:y,nodeOrigin:C,elevateNodesOnSelect:A,nodeExtent:E,zIndexMode:j}=S();b[0][0]===E[0][0]&&b[0][1]===E[0][1]&&b[1][0]===E[1][0]&&b[1][1]===E[1][1]||(ax(v,x,y,{nodeOrigin:C,nodeExtent:b,elevateNodesOnSelect:A,checkEquality:!1,zIndexMode:j}),g({nodeExtent:b}))},panBy:b=>{const{transform:v,width:x,height:y,panZoom:C,translateExtent:A}=S();return Gbt({delta:b,panZoom:C,transform:v,translateExtent:A,width:x,height:y})},setCenter:async(b,v,x)=>{const{width:y,height:C,maxZoom:A,panZoom:E}=S();if(!E)return!1;const j=typeof(x==null?void 0:x.zoom)<"u"?x.zoom:A;return await E.setViewport({x:y/2-b*j,y:C/2-v*j,zoom:j},{duration:x==null?void 0:x.duration,ease:x==null?void 0:x.ease,interpolate:x==null?void 0:x.interpolate}),!0},cancelConnection:()=>{g({connection:{...fR}})},updateConnection:b=>{g({connection:b})},reset:()=>g({...q9()})}},Object.is);function myt({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:_,nodeExtent:f,zIndexMode:m,children:g}){const[S]=M.useState(()=>pyt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:a,fitView:d,minZoom:o,maxZoom:l,fitViewOptions:c,nodeOrigin:_,nodeExtent:f,zIndexMode:m}));return h.jsx(E2t,{value:S,children:h.jsx(J2t,{children:h.jsx(_xt,{children:g})})})}function gyt({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:a,height:o,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g}){return M.useContext(qm)?h.jsx(h.Fragment,{children:e}):h.jsx(myt,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:_,nodeOrigin:f,nodeExtent:m,zIndexMode:g,children:e})}const vyt={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function byt({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:_,onMoveStart:f,onMoveEnd:m,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:A,onNodeDoubleClick:E,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:D,onNodesDelete:I,onEdgesDelete:P,onDelete:B,onSelectionChange:F,onSelectionDragStart:V,onSelectionDrag:X,onSelectionDragStop:W,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:H,connectionLineType:Y=gl.Bezier,connectionLineStyle:G,connectionLineComponent:ee,connectionLineContainerStyle:oe,deleteKeyCode:he="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:q=!1,selectionMode:ne=uh.Full,panActivationKeyCode:le="Space",multiSelectionKeyCode:ge=fh()?"Meta":"Control",zoomActivationKeyCode:ue=fh()?"Meta":"Control",snapToGrid:Ce,snapGrid:Ee,onlyRenderVisibleElements:Le=!1,selectNodesOnDrag:Pe,nodesDraggable:Ve,autoPanOnNodeFocus:ht,nodesConnectable:Be,nodesFocusable:wt,nodeOrigin:zt=qR,edgesFocusable:vt,edgesReconnectable:Lt,elementsSelectable:St=!0,defaultViewport:kt=$2t,minZoom:xe=.5,maxZoom:je=2,translateExtent:We=ch,preventScrolling:st=!0,nodeExtent:nt,defaultMarkerColor:Ht="#b1b1b7",zoomOnScroll:bt=!0,zoomOnPinch:nn=!0,panOnScroll:Wt=!1,panOnScrollSpeed:pn=.5,panOnScrollMode:Dt=gc.Free,zoomOnDoubleClick:Nn=!0,panOnDrag:Ut=!0,onPaneClick:br,onPaneMouseEnter:mn,onPaneMouseMove:Xe,onPaneMouseLeave:xt,onPaneScroll:Vn,onPaneContextMenu:Wn,paneClickDistance:Et=1,nodeClickDistance:rt=0,children:Ie,onReconnect:it,onReconnectStart:qt,onReconnectEnd:en,onEdgeContextMenu:jt,onEdgeDoubleClick:On,onEdgeMouseEnter:_r,onEdgeMouseMove:is,onEdgeMouseLeave:ar,reconnectRadius:xr=10,onNodesChange:js,onEdgesChange:zn,noDragClassName:rn="nodrag",noWheelClassName:Pn="nowheel",noPanClassName:Or="nopan",fitView:Ir,fitViewOptions:Vr,connectOnClick:ln,attributionPosition:or,proOptions:Cn,defaultEdgeOptions:et,elevateNodesOnSelect:pt=!0,elevateEdgesOnSelect:yr=!1,disableKeyboardA11y:wr=!1,autoPanOnConnect:Wr,autoPanOnNodeDrag:Fn,autoPanOnSelection:jo=!0,autoPanSpeed:vs,connectionRadius:as,isValidConnection:Ms,onError:Zt,style:Ot,id:Zs,nodeDragThreshold:Bi,connectionDragThreshold:Sr,viewport:os,onViewportChange:bs,width:lr,height:Qs,colorMode:Dl="light",debug:Ba,onScroll:Br,ariaLabelConfig:ls,zIndexMode:Js="basic",...Kn},$i){const jn=Zs||"1",bn=U2t(Dl),ei=M.useCallback(ra=>{ra.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Br==null||Br(ra)},[Br]);return h.jsx("div",{"data-testid":"rf__wrapper",...Kn,onScroll:ei,style:{...Ot,...vyt},ref:$i,className:Lr(["react-flow",s,bn]),id:Zs,role:"application",children:h.jsxs(gyt,{nodes:e,edges:n,width:lr,height:Qs,fitView:Ir,fitViewOptions:Vr,minZoom:xe,maxZoom:je,nodeOrigin:zt,nodeExtent:nt,zIndexMode:Js,children:[h.jsx(F2t,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:g,onConnectStart:S,onConnectEnd:k,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:Ve,autoPanOnNodeFocus:ht,nodesConnectable:Be,nodesFocusable:wt,edgesFocusable:vt,edgesReconnectable:Lt,elementsSelectable:St,elevateNodesOnSelect:pt,elevateEdgesOnSelect:yr,minZoom:xe,maxZoom:je,nodeExtent:nt,onNodesChange:js,onEdgesChange:zn,snapToGrid:Ce,snapGrid:Ee,connectionMode:H,translateExtent:We,connectOnClick:ln,defaultEdgeOptions:et,fitView:Ir,fitViewOptions:Vr,onNodesDelete:I,onEdgesDelete:P,onDelete:B,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:V,onSelectionDragStop:W,onMove:_,onMoveStart:f,onMoveEnd:m,noPanClassName:Or,nodeOrigin:zt,rfId:jn,autoPanOnConnect:Wr,autoPanOnNodeDrag:Fn,autoPanSpeed:vs,onError:Zt,connectionRadius:as,isValidConnection:Ms,selectNodesOnDrag:Pe,nodeDragThreshold:Bi,connectionDragThreshold:Sr,onBeforeDelete:L,debug:Ba,ariaLabelConfig:ls,zIndexMode:Js}),h.jsx(hyt,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:x,onNodeMouseMove:y,onNodeMouseLeave:C,onNodeContextMenu:A,onNodeDoubleClick:E,nodeTypes:a,edgeTypes:o,connectionLineType:Y,connectionLineStyle:G,connectionLineComponent:ee,connectionLineContainerStyle:oe,selectionKeyCode:ie,selectionOnDrag:q,selectionMode:ne,deleteKeyCode:he,multiSelectionKeyCode:ge,panActivationKeyCode:le,zoomActivationKeyCode:ue,onlyRenderVisibleElements:Le,defaultViewport:kt,translateExtent:We,minZoom:xe,maxZoom:je,preventScrolling:st,zoomOnScroll:bt,zoomOnPinch:nn,zoomOnDoubleClick:Nn,panOnScroll:Wt,panOnScrollSpeed:pn,panOnScrollMode:Dt,panOnDrag:Ut,autoPanOnSelection:jo,onPaneClick:br,onPaneMouseEnter:mn,onPaneMouseMove:Xe,onPaneMouseLeave:xt,onPaneScroll:Vn,onPaneContextMenu:Wn,paneClickDistance:Et,nodeClickDistance:rt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onReconnect:it,onReconnectStart:qt,onReconnectEnd:en,onEdgeContextMenu:jt,onEdgeDoubleClick:On,onEdgeMouseEnter:_r,onEdgeMouseMove:is,onEdgeMouseLeave:ar,reconnectRadius:xr,defaultMarkerColor:Ht,noDragClassName:rn,noWheelClassName:Pn,noPanClassName:Or,rfId:jn,disableKeyboardA11y:wr,nodeExtent:nt,viewport:os,onViewportChange:bs}),h.jsx(B2t,{onSelectionChange:F}),Ie,h.jsx(R2t,{proOptions:Cn,position:or}),h.jsx(M2t,{rfId:jn,disableKeyboardA11y:wr})]})})}var xyt=VR(byt);function yyt({dimensions:e,lineWidth:n,variant:t,className:r}){return h.jsx("path",{strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Lr(["react-flow__background-pattern",t,r])})}function wyt({radius:e,className:n}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Lr(["react-flow__background-pattern","dots",n])})}var xo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(xo||(xo={}));const Syt={[xo.Dots]:1,[xo.Lines]:1,[xo.Cross]:6},kyt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function gD({id:e,variant:n=xo.Dots,gap:t=20,size:r,lineWidth:s=1,offset:a=0,color:o,bgColor:l,style:c,className:d,patternClassName:_}){const f=M.useRef(null),{transform:m,patternId:g}=_n(kyt,er),S=r||Syt[n],k=n===xo.Dots,b=n===xo.Cross,v=Array.isArray(t)?t:[t,t],x=[v[0]*m[2]||1,v[1]*m[2]||1],y=S*m[2],C=Array.isArray(a)?a:[a,a],A=b?[y,y]:x,E=[C[0]*m[2]||1+A[0]/2,C[1]*m[2]||1+A[1]/2],j=`${g}${e||""}`;return h.jsxs("svg",{className:Lr(["react-flow__background",d]),style:{...c,...Vm,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:f,"data-testid":"rf__background",children:[h.jsx("pattern",{id:j,x:m[0]%x[0],y:m[1]%x[1],width:x[0],height:x[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:k?h.jsx(wyt,{radius:y/2,className:_}):h.jsx(yyt,{dimensions:A,lineWidth:s,variant:n,className:_})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}gD.displayName="Background";const Cyt=M.memo(gD);function Eyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Nyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function zyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 Ayt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 Tyt(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 M0({children:e,className:n,...t}){return h.jsx("button",{type:"button",className:Lr(["react-flow__controls-button",n]),...t,children:e})}const jyt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function vD({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:c,className:d,children:_,position:f="bottom-left",orientation:m="vertical","aria-label":g}){const S=nr(),{isInteractive:k,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:x}=_n(jyt,er),{zoomIn:y,zoomOut:C,fitView:A}=q4(),E=()=>{y(),a==null||a()},j=()=>{C(),o==null||o()},T=()=>{A(s),l==null||l()},D=()=>{S.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},I=m==="horizontal"?"horizontal":"vertical";return h.jsxs(Gm,{className:Lr(["react-flow__controls",I,d]),position:f,style:e,"data-testid":"rf__controls","aria-label":g??x["controls.ariaLabel"],children:[n&&h.jsxs(h.Fragment,{children:[h.jsx(M0,{onClick:E,className:"react-flow__controls-zoomin",title:x["controls.zoomIn.ariaLabel"],"aria-label":x["controls.zoomIn.ariaLabel"],disabled:v,children:h.jsx(Eyt,{})}),h.jsx(M0,{onClick:j,className:"react-flow__controls-zoomout",title:x["controls.zoomOut.ariaLabel"],"aria-label":x["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(Nyt,{})})]}),t&&h.jsx(M0,{className:"react-flow__controls-fitview",onClick:T,title:x["controls.fitView.ariaLabel"],"aria-label":x["controls.fitView.ariaLabel"],children:h.jsx(zyt,{})}),r&&h.jsx(M0,{className:"react-flow__controls-interactive",onClick:D,title:x["controls.interactive.ariaLabel"],"aria-label":x["controls.interactive.ariaLabel"],children:k?h.jsx(Tyt,{}):h.jsx(Ayt,{})}),_]})}vD.displayName="Controls";M.memo(vD);function Myt({id:e,x:n,y:t,width:r,height:s,style:a,color:o,strokeColor:l,strokeWidth:c,className:d,borderRadius:_,shapeRendering:f,selected:m,onClick:g}){const{background:S,backgroundColor:k}=a||{},b=o||S||k;return h.jsx("rect",{className:Lr(["react-flow__minimap-node",{selected:m},d]),x:n,y:t,rx:_,ry:_,width:r,height:s,style:{fill:b,stroke:l,strokeWidth:c},shapeRendering:f,onClick:g?v=>g(v,e):void 0})}const Ryt=M.memo(Myt),Dyt=e=>e.nodes.map(n=>n.id),bb=e=>e instanceof Function?e:()=>e;function Lyt({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:a=Ryt,onClick:o}){const l=_n(Dyt,er),c=bb(n),d=bb(e),_=bb(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:l.map(m=>h.jsx(Iyt,{id:m,nodeColorFunc:c,nodeStrokeColorFunc:d,nodeClassNameFunc:_,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:a,onClick:o,shapeRendering:f},m))})}function Oyt({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:c}){const{node:d,x:_,y:f,width:m,height:g}=_n(S=>{const k=S.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const b=k.internals.userNode,{x:v,y:x}=k.internals.positionAbsolute,{width:y,height:C}=To(b);return{node:b,x:v,y:x,width:y,height:C}},er);return!d||d.hidden||!xR(d)?null:h.jsx(l,{x:_,y:f,width:m,height:g,style:d.style,selected:!!d.selected,className:r(d),color:n(d),borderRadius:s,strokeColor:t(d),strokeWidth:a,shapeRendering:o,onClick:c,id:d.id})}const Iyt=M.memo(Oyt);var Byt=M.memo(Lyt);const $yt=200,Hyt=150,Pyt=e=>!e.hidden,Fyt=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?gR(Bh(e.nodeLookup,{filter:Pyt}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Uyt="react-flow__minimap-desc";function bD({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:_,maskStrokeWidth:f,position:m="bottom-right",onClick:g,onNodeClick:S,pannable:k=!1,zoomable:b=!1,ariaLabel:v,inversePan:x,zoomStep:y=1,offsetScale:C=5}){const A=nr(),E=M.useRef(null),{boundingRect:j,viewBB:T,rfId:D,panZoom:I,translateExtent:P,flowWidth:B,flowHeight:F,ariaLabelConfig:V}=_n(Fyt,er),X=(e==null?void 0:e.width)??$yt,W=(e==null?void 0:e.height)??Hyt,Z=j.width/X,J=j.height/W,$=Math.max(Z,J),L=$*X,H=$*W,Y=C*$,G=j.x-(L-j.width)/2-Y,ee=j.y-(H-j.height)/2-Y,oe=L+Y*2,he=H+Y*2,ie=`${Uyt}-${D}`,q=M.useRef(0),ne=M.useRef();q.current=$,M.useEffect(()=>{if(E.current&&I)return ne.current=e2t({domNode:E.current,panZoom:I,getTransform:()=>A.getState().transform,getViewScale:()=>q.current}),()=>{var Ce;(Ce=ne.current)==null||Ce.destroy()}},[I]),M.useEffect(()=>{var Ce;(Ce=ne.current)==null||Ce.update({translateExtent:P,width:B,height:F,inversePan:x,pannable:k,zoomStep:y,zoomable:b})},[k,b,x,y,P,B,F]);const le=g?Ce=>{var Pe;const[Ee,Le]=((Pe=ne.current)==null?void 0:Pe.pointer(Ce))||[0,0];g(Ce,{x:Ee,y:Le})}:void 0,ge=S?M.useCallback((Ce,Ee)=>{const Le=A.getState().nodeLookup.get(Ee).internals.userNode;S(Ce,Le)},[]):void 0,ue=v??V["minimap.ariaLabel"];return h.jsx(Gm,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof _=="string"?_: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 o=="number"?o:void 0},className:Lr(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:X,height:W,viewBox:`${G} ${ee} ${oe} ${he}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ie,ref:E,onClick:le,children:[ue&&h.jsx("title",{id:ie,children:ue}),h.jsx(Byt,{onClick:ge,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:a,nodeClassName:s,nodeStrokeWidth:o,nodeComponent:l}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${G-Y},${ee-Y}h${oe+Y*2}v${he+Y*2}h${-oe-Y*2}z + M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}bD.displayName="MiniMap";M.memo(bD);const qyt=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,Gyt={[cd.Line]:"right",[cd.Handle]:"bottom-right"};function Vyt({nodeId:e,position:n,variant:t=cd.Handle,className:r,style:s=void 0,children:a,color:o,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:_=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:m,autoScale:g=!0,shouldResize:S,onResizeStart:k,onResize:b,onResizeEnd:v}){const x=XR(),y=typeof e=="string"?e:x,C=nr(),A=M.useRef(null),E=t===cd.Handle,j=_n(M.useCallback(qyt(E&&g),[E,g]),er),T=M.useRef(null),D=n??Gyt[t];M.useEffect(()=>{if(!(!A.current||!y))return T.current||(T.current=h2t({domNode:A.current,nodeId:y,getStoreItems:()=>{const{nodeLookup:P,transform:B,snapGrid:F,snapToGrid:V,nodeOrigin:X,domNode:W}=C.getState();return{nodeLookup:P,transform:B,snapGrid:F,snapToGrid:V,nodeOrigin:X,paneDomNode:W}},onChange:(P,B)=>{const{triggerNodeChanges:F,nodeLookup:V,parentLookup:X,nodeOrigin:W}=C.getState(),Z=[],J={x:P.x,y:P.y},$=V.get(y);if($&&$.expandParent&&$.parentId){const L=$.origin??W,H=P.width??$.measured.width??0,Y=P.height??$.measured.height??0,G={id:$.id,parentId:$.parentId,rect:{width:H,height:Y,...yR({x:P.x??$.position.x,y:P.y??$.position.y},{width:H,height:Y},$.parentId,V,L)}},ee=U4([G],V,X,W);Z.push(...ee),J.x=P.x?Math.max(L[0]*H,P.x):void 0,J.y=P.y?Math.max(L[1]*Y,P.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:y,type:"position",position:{...J}};Z.push(L)}if(P.width!==void 0&&P.height!==void 0){const H={id:y,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};Z.push(H)}for(const L of B){const H={...L,type:"position"};Z.push(H)}F(Z)},onEnd:({width:P,height:B})=>{const F={id:y,type:"dimensions",resizing:!1,dimensions:{width:P,height:B}};C.getState().triggerNodeChanges([F])}})),T.current.update({controlPosition:D,boundaries:{minWidth:l,minHeight:c,maxWidth:d,maxHeight:_},keepAspectRatio:f,resizeDirection:m,onResizeStart:k,onResize:b,onResizeEnd:v,shouldResize:S}),()=>{var P;(P=T.current)==null||P.destroy()}},[D,l,c,d,_,f,k,b,v,S]);const I=D.split("-");return h.jsx("div",{className:Lr(["react-flow__resize-control","nodrag",...I,t,r]),ref:A,style:{...s,scale:j,...o&&{[E?"backgroundColor":"borderColor"]:o}},children:a})}M.memo(Vyt);function Wyt(){const[e,n]=M.useState(0),[t,r]=M.useState(0);return{ref:M.useCallback(a=>{if(!a)return;function o(){n(a.offsetWidth),r(a.offsetHeight)}const l=new ResizeObserver(o),c=new MutationObserver(o);return l.observe(a),c.observe(a,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),o(),()=>{l.disconnect(),c.disconnect()}},[]),offsetWidth:e,offsetHeight:t}}const R0=8;function Kyt(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:a},o]=M.useState({viewWidth:0,viewHeight:0});M.useEffect(()=>{function _(){o({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",_),_(),()=>window.removeEventListener("resize",_)},[]);let l=0,c=0,d=0;if(e){const{distance:_}=e;switch(e.anchor){case"left":l=e.x-t-_,c=e.y+e.height/2-r/2;break;case"right":l=e.x+e.width+_,c=e.y+e.height/2-r/2;break;case"below":l=e.x+e.width/2-t/2,c=e.y+e.height+_;break;case"above":l=e.x+e.width/2-t/2,c=e.y-r-_;break}const f=l,m=c;l=Math.min(Math.max(l,R0),a-t-R0),c=Math.min(Math.max(c,R0),s-r-R0),d=e.anchor==="left"||e.anchor==="right"?m-c:f-l}return{x:l,y:c,arrowAdjustment:d}}const xb=380,yb=12,Yyt=350,Xyt=150,cx=new EventTarget;function Zyt(){cx.dispatchEvent(new Event("move"))}function Qyt(e,n){const[t,r]=M.useState(null),s=M.useRef(void 0),a=M.useRef(void 0);M.useEffect(()=>{const d=()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),r(null)};return cx.addEventListener("move",d),()=>{cx.removeEventListener("move",d),window.clearTimeout(s.current),window.clearTimeout(a.current)}},[]),M.useEffect(()=>{r(d=>{var f;if(!d)return d;const _=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return _&&d.x===_.x&&d.y===_.y&&d.width===_.width&&d.height===_.height?d:_})},[e,n]);const o=M.useCallback(()=>{window.clearTimeout(a.current),window.clearTimeout(s.current),s.current=window.setTimeout(()=>{var d;r(((d=e.current)==null?void 0:d.getBoundingClientRect())??null)},Yyt)},[e]),l=M.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(a.current),a.current=window.setTimeout(()=>r(null),Xyt)},[]),c=M.useCallback(()=>window.clearTimeout(a.current),[]);return{rect:t,onMouseEnter:o,onMouseLeave:l,keepOpen:c}}function Jyt(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(N(),t)}function e4t({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:a,onOpenCode:o,onMouseEnter:l,onMouseLeave:c}){const d=Wyt(),_=s.right+yb+xb<=window.innerWidth,f=s.x-yb-xb>=0,m=_?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:g,y:S}=Kyt({x:s.x,y:s.y,width:s.width,height:s.height,anchor:m,distance:yb},d),[k,b]=M.useState(null),v=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null;M.useEffect(()=>{if(b(null),!v)return;let P=!1;return PYe(v).then(B=>{let F=B.diff;if(B.truncated){const Z=F.lastIndexOf(` diff --git `);F=Z!==-1?F.slice(0,Z+1):F.slice(0,F.lastIndexOf(` -`)+1)}let V=[];try{V=F.trim()?M2(F):[]}catch{return}if(H.truncated&&V.every(Z=>Z.hunks.length===0))return;let X=0,W=0;for(const Z of V){const J=b4(Z);X+=J.additions,W+=J.deletions}P||b({fileCount:V.length,additions:X,deletions:W,truncated:H.truncated})}).catch(()=>{}),()=>{P=!0}},[v]);const x={done:0,failed:0,cancelled:0,live:0};for(const P of n)P.status==="done"?x.done+=1:P.status==="failed"?x.failed+=1:P.status==="cancelled"?x.cancelled+=1:x.live+=1;const y=t?tp((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,A=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=M.useRef(null),[j,T]=M.useState(!1),[D,I]=M.useState(!1);return M.useEffect(()=>{T(!1)},[A]),M.useEffect(()=>{const P=E.current;P&&I(P.scrollHeight>P.clientHeight+1)},[A,j]),Up.createPortal(h.jsxs("div",{ref:d.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-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:mb,left:g,top:S,visibility:d.offsetHeight===0?"hidden":void 0},onMouseEnter:l,onMouseLeave:c,children:[h.jsxs("div",{className:"hc-head",children:[h.jsx("span",{className:"hc-slug",children:e.slug}),h.jsx(xo,{status:t?Di(t):"idle"})]}),e.title&&h.jsx("div",{className:"hc-title",children:e.title}),h.jsxs("div",{className:"hc-actions",children:[a&&h.jsxs("button",{type:"button",...gr(a),children:[h.jsx(Wu,{size:13}),cle()]}),h.jsxs("button",{type:"button",...gr(o),children:[h.jsx(Op,{size:13}),Zoe()]})]}),A&&h.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:E,children:A}),A&&(D||j)&&h.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>T(P=>!P),children:j?sE():hse()}),C&&h.jsx("div",{className:"hc-failure",children:C}),h.jsxs("div",{className:"hc-stats",children:[h.jsx("span",{children:new Intl.ListFormat(N(),{style:"short"}).format([n.length===1?P_e():G_e({count:Vt(n.length)}),...x.done>0?[g_e({count:Vt(x.done)})]:[],...x.failed>0?[y_e({count:Vt(x.failed)})]:[],...x.cancelled>0?[h_e({count:Vt(x.cancelled)})]:[],...x.live>0?[R_e({count:Vt(x.live)})]:[]])}),t&&Mx(t.backend)&&h.jsx(e4,{backend:t.backend}),y&&h.jsx("span",{children:y}),t&&h.jsx("span",{children:Na(t.createdAt)})]}),h.jsxs("div",{className:"hc-git",children:[h.jsxs("div",{className:"hc-git-row",children:[h.jsxs("span",{className:"hc-branch",title:e.branchName,children:[h.jsx(Ip,{size:12}),e.branchName]}),r&&h.jsxs("span",{children:[ile()," ",h.jsx("span",{children:r})]})]}),k&&k.fileCount>0&&h.jsx("div",{className:"hc-git-row",title:k.truncated?AO({parent:Ae(r??"parent")}):CO({parent:Ae(r??"parent")}),children:h.jsxs("span",{children:[k.truncated&&"≥ ",h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",k.additions]})," ",h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",k.deletions]})," · ",k.fileCount===1&&!k.truncated?I_e():k.truncated?A_e({count:Vt(k.fileCount)}):C_e({count:Vt(k.fileCount)})]})})]}),h.jsxs("div",{className:"hc-foot",children:[h.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),h.jsxs("span",{children:[tle()," ",Ryt(e.createdAt)]})]})]}),document.body)}const $9=["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(" "),Lyt=264,H9=132,q0=44,Oyt=72,Iyt=148,Byt=44;function $yt(e){const n=new Map(e.map(a=>[a.id,{exp:a,children:[]}])),t=[];for(const a of e){const o=n.get(a.id),l=a.parentExperimentId?n.get(a.parentExperimentId):void 0;l?l.children.push(o):t.push(o)}const r=(a,o)=>a.exp.createdAt-o.exp.createdAt,s=a=>{a.children.sort(r),a.children.forEach(s)};return t.sort(r),t.forEach(s),t}function Hyt(e,n){const t=new Map,r=l=>{const c=t.get(l)??1+l.children.reduce((d,_)=>d+r(_),0);return t.set(l,c),c},s=new Map,a=l=>{const c=s.get(l)??(n(l)||l.children.some(a));return s.set(l,c),c};function o(l){if(n(l)){const _=[];let f=0;for(const m of l.children)a(m)?_.push(...o(m)):f+=r(m);return f>0&&_.push({kind:"elided",id:`el-${l.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:l.exp,children:_}]}if(!a(l))return[];let c=0;const d=[];return(function _(f){c+=1;for(const m of f.children)n(m)?d.push(...o(m)):a(m)?_(m):c+=r(m)})(l),[{kind:"elided",id:`el-${l.exp.id}`,count:c,children:d}]}return e.flatMap(o)}function ix(e){return e.kind==="exp"?Lyt:Iyt}function z0(e){return e.kind==="exp"?e.exp.id:e.id}function G0(e){if(e.children.length===0)return ix(e);const n=e.children.reduce((t,r)=>t+G0(r),0)+q0*(e.children.length-1);return Math.max(ix(e),n)}function Pyt(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const Fyt=M.memo(function({data:n}){Cc();const{exp:t,latestRun:r,runs:s,isBaseline:a,parentSlug:o,githubOwner:l,githubRepo:c,onOpenView:d,onOpenCode:_}=n,f=r?Di(r):void 0,m=f==="running"||f==="starting"||f==="cancelling",g=a?Sqe():m?Bqe():po(),S=s.slice(-8),k=M.useRef(null),b=Myt(k,n);return h.jsxs("div",{ref:k,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] ${m?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[h.jsx(El,{type:"target",position:mt.Top}),h.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...gr(v=>d(t.id,"overview",v)),children:[h.jsxs("div",{className:"node-eyebrow",children:[h.jsx("span",{children:g}),h.jsx(xo,{status:f??"idle"})]}),h.jsx("div",{className:"node-head",children:h.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&h.jsx("div",{className:"node-title",children:t.title||t.description}),h.jsxs("div",{className:"node-meta",children:[h.jsx("span",{children:SGe()}),S.length>0?h.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:S.map(v=>h.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 ${Pyt(Di(v))}`,title:RT(Di(v))},v.id))}):h.jsx("span",{children:dGe()}),h.jsx("span",{className:"flex-1"}),r&&h.jsx("span",{children:Na(r.createdAt)})]})]}),h.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&h.jsxs("button",{className:"node-action",title:pGe(),...gr(v=>d(t.id,"terminal",v)),children:[h.jsx(Wu,{size:13}),PE()]}),h.jsxs("button",{className:"node-action",title:Y9({branch:Ae(t.branchName)}),...gr(v=>_(t.id,t.branchName,"files",v)),children:[h.jsx(Op,{size:13}),Xqe()]}),l&&c&&h.jsx("a",{className:"node-action node-action-ext",title:K0({name:Ae(t.branchName)}),"aria-label":K0({name:Ae(t.branchName)}),href:$p(l,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:h.jsx(fm,{size:13})})]}),h.jsx(El,{type:"source",position:mt.Bottom}),b.rect&&h.jsx(Dyt,{exp:t,runs:s,latestRun:r,parentSlug:o,anchor:b.rect,onOpenLogs:s.length>0?v=>d(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),Uyt=M.memo(function({data:n}){Cc();const{count:t,onShowProjectScope:r}=n;return h.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:NGe(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[h.jsx(El,{type:"target",position:mt.Top}),h.jsx(yx,{size:14}),h.jsxs("span",{className:"elided-node-label",children:[t===1?Dqe():Tqe({count:Vt(t)}),h.jsx("span",{className:"elided-node-sub",children:bGe()})]}),h.jsx(El,{type:"source",position:mt.Bottom})]})}),qyt={exp:Fyt,elided:Uyt},oD={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},Gyt={...oD.style,strokeDasharray:"4 4"};function Vyt({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:a,onShowProjectScope:o}){const{nodes:l,edges:c}=M.useMemo(()=>{const d=new Map;for(const v of n){const x=d.get(v.experimentId);x?x.push(v):d.set(v.experimentId,[v])}for(const v of d.values())v.sort((x,y)=>x.createdAt-y.createdAt);const _=[],f=[],m=v=>!a||v.exp.chatSessionId===a,g=Hyt($yt(e),m),S=new Map(e.map(v=>[v.id,v.slug]));function k(v,x,y){const C=x-ix(v)/2;if(v.kind==="exp"){const j=d.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y},data:{exp:v.exp,latestRun:j[j.length-1]??null,runs:j,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?S.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:y+(H9-Byt)/2},data:{count:v.count,onShowProjectScope:o}});if(v.children.length===0)return;const A=v.children.reduce((j,T)=>j+G0(T),0)+q0*(v.children.length-1);let E=x-A/2;for(const j of v.children){const T=G0(j),D=v.kind==="elided"||j.kind==="elided";f.push({id:`e-${z0(v)}-${z0(j)}`,source:z0(v),target:z0(j),...D?{style:Gyt}:{}}),k(j,E+T/2,y+H9+Oyt),E+=T+q0}}let b=0;for(const v of g){const x=G0(v);k(v,b+x/2,0),b+=x+q0}return{nodes:_,edges:f}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,a,o]);return e.length===0?h.jsxs("div",{className:$9,children:[h.jsx("p",{className:"empty-state-title",children:oGe()}),h.jsx("p",{className:"empty-state-hint",children:Vqe()})]}):l.length===0&&a?h.jsxs("div",{className:$9,children:[h.jsx("p",{className:"empty-state-title",children:rGe()}),h.jsx("p",{className:"empty-state-hint",children:Fqe()})]}):h.jsx(eyt,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.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:l,edges:c,nodeTypes:qyt,defaultEdgeOptions:oD,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:jyt,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:h.jsx(iyt,{variant:yo.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},a??"project")}const P9=["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(" "),vb=(e,n)=>e.id===n.id&&e.view===n.view,yu=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,P4=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,bf=(e,n,t)=>`${e}:${n??""}:${P4(t)}`,lD=e=>({...e,lineScrollRequest:void 0});function xf(e){return typeof e=="object"&&"path"in e?lD(e):e}const wu=(e,n)=>e.branch===n.branch;function Gt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${P4(e)}`:`experiment:${e.id}:${e.view}`}function yf(e,n){const t=e.filter(r=>Gt(r)!==n);return t.length===e.length?e:t}function Wyt(e){return e!==void 0}function F9(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===Nf&&n){const r={path:Sb,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[Gt(r)],panelOpen:!0}}if(e===sN){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(Gt),panelOpen:!0}}if(e===iN){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Gt),panelOpen:!0}}return t}function Kyt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Yyt(e,n,t,r,s){let a=e,o;const l=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(a.startsWith("artifacts/"))return a=a.slice(10),a?{path:a,source:"artifacts"}:null;if(a==="~"||a.startsWith("~/"))return{path:a,source:"abs"};const d=m=>{const g=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[S,k]=[g(a),g(m)];return S===k?"":S.startsWith(`${k}/`)?S.slice(k.length).replace(/^\/+/,""):null},_=a.startsWith("/")&&c?d(c):null,f=a.startsWith("/")&&l?d(l):null;if(!a.startsWith("/"))o=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(f!==null)a=f;else{const m=s?Kyt(s):"[^/]+",g=a.match(new RegExp(`/files/${m}/(.+)$`)),S=g?null:a.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=g||S?null:a.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(g)return{path:g[1],source:"artifacts"};S?(o=S[1],a=S[2]):k&&(a=k[1])}}return a?a.startsWith("/")?{path:a,source:"abs"}:{path:a,sessionId:o}:null}function Xyt(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const ax="orx:panel-width",cD="orx:experiments-view";function Zyt(){try{return localStorage.getItem(cD)==="tree"?"tree":"table"}catch{return"table"}}const fh=360,Qyt=10,Jyt=272,e4t=380,t4t=Jyt+56,n4t=80,r4t=48;function V0(){return Math.max(fh,window.innerWidth-t4t-e4t)}function s4t(){const e=V0();try{const n=Number(localStorage.getItem(ax));if(Number.isFinite(n)&&n>=fh)return Math.min(n,e)}catch{}return Math.max(fh,Math.min(760,e,Math.round(window.innerWidth*.42)))}function wf(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 U9(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function i4t(){var Ic;const e=Cc(),[n,t]=M.useState(null),[r,s]=M.useState(null),a=M.useRef(void 0);a.current=r==null?void 0:r.tourCompleted;const o=M.useRef(!1),[l,c]=M.useState(null),d=M.useRef(null),[_,f]=M.useState(null),[m,g]=M.useState([]),[S,k]=M.useState([]),b=M.useRef(S);b.current=S;const v=M.useRef(new Map),x=M.useRef(new Set),y=M.useRef(null),C=M.useRef(!1),A=M.useRef(new Map),E=M.useRef(new Map),j=M.useRef(0),T=M.useRef(m);T.current=m;const[D,I]=M.useState(null),[P,H]=M.useState(Zyt),[F,V]=M.useState("project"),X=M.useRef(null),{open:W,setOpen:Z,ref:J}=Ao(X),[B,L]=M.useState(null),[$,K]=M.useState(!1),G=m.every(ae=>ae.chatSessionId),re=B&&G?F:"project",oe=M.useMemo(()=>re!=="agent"?m:m.filter(ae=>ae.chatSessionId===B),[m,re,B]),he=M.useMemo(()=>{if(re!=="agent")return S;const ae=new Set(oe.map(be=>be.id));return S.filter(be=>ae.has(be.experimentId))},[S,oe,re]);M.useEffect(()=>{try{localStorage.setItem(cD,P)}catch{}},[P]);const[ie,q]=M.useState(null),[te,le]=M.useState("experiments"),[ge,ue]=M.useState([]),[Ce,Ee]=M.useState(!1),[Le,Pe]=M.useState(!1),[Ve,ft]=M.useState(!1),[Be,wt]=M.useState([]),[At,vt]=M.useState([]),Ot=M.useRef(new Map),St=M.useRef(0),[kt,xe]=M.useState([]),[je,We]=M.useState([]),[st,nt]=M.useState([]),[Ht,bt]=M.useState([]),[nn,Wt]=M.useState(null),[pn,Lt]=M.useState("files"),[En,Ft]=M.useState(new Set),[br,mn]=M.useState(!1),[Ye,xt]=M.useState(!1),[Wn,Kn]=M.useState(s4t),[Nt,rt]=M.useState(!0),[Ie,it]=M.useState(!1),[Ut,en]=M.useState(!1),[Mt,Ln]=M.useState("chat"),[_r,is]=M.useState(null),or=M.useRef(new Map),xr=M.useRef(F9()),Ts=M.useRef(null),Nn=M.useRef(!1),rn=M.useRef(ge);rn.current=ge;const Fn=M.useRef(Ht);Fn.current=Ht;const Dr=M.useRef(null),Lr=M.useCallback(ae=>{const be=[...ae];Fn.current=be,bt(be)},[]),qr=M.useCallback(ae=>{Dr.current=ae,Wt(ae)},[]),ln=M.useCallback(ae=>{const be=Gt(ae);wt($e=>yf($e,be)),vt($e=>yf($e,be)),xe($e=>yf($e,be)),We($e=>yf($e,be)),nt($e=>yf($e,be));const ke=It.current;ke&&"path"in ae&&Ot.current.delete(bf(ke,Ts.current,ae));const De=rn.current.filter($e=>Gt($e)!==be);rn.current=De,ue(De)},[]),lr=M.useCallback(ae=>{Nn.current=!1;const be=Gt(ae),ke=[...rn.current.filter(De=>Gt(De)!==be),xf(ae)];rn.current=ke,ue(ke),le(ae)},[]),Sn=M.useCallback((ae,be)=>{Nn.current=!1;const ke=Gt(ae),De=Dr.current,$e=yct({order:Fn.current,previewKey:De?Gt(De):null},ke,be);$e.replacedKey&&De&&typeof De!="string"&&Gt(De)===$e.replacedKey&&ln(De),Lr($e.order),$e.previewKey===null?qr(null):$e.previewKey===ke&&qr(xf(ae));const pt=[...rn.current.filter(ct=>Gt(ct)!==ke),xf(ae)];rn.current=pt,ue(pt),le(ae)},[ln,Lr,qr]),et=M.useCallback(ae=>{const be=Dr.current;be&&Gt(be)===Gt(ae)&&qr(null)},[qr]);M.useEffect(()=>{let ae=!1;const be=De=>{const $e=Dr.current,pt=De.target;if(pt instanceof Element&&pt.closest("input, textarea, [contenteditable='true']")!==null){ae=!1;return}if($e&&Gt($e)===Gt(xr.current.rightTab)&&(De.metaKey||De.ctrlKey)&&!De.altKey&&!De.shiftKey&&De.key.toLowerCase()==="k"){De.preventDefault(),ae=!0;return}if(ae&&De.key==="Enter"){De.preventDefault(),ae=!1;const Tt=Dr.current;Tt&&et(Tt);return}ae=!1},ke=()=>{ae=!1};return window.addEventListener("keydown",be),window.addEventListener("blur",ke),window.addEventListener("pointerdown",ke),()=>{window.removeEventListener("keydown",be),window.removeEventListener("blur",ke),window.removeEventListener("pointerdown",ke)}},[et]);const _t=M.useCallback((ae,be)=>{Nn.current=!1;const ke=Gt(ae),De=Dr.current;De&&Gt(De)===ke&&qr(null);const $e=wct({order:Fn.current,previewKey:De?Gt(De):null},ke,rn.current.map(Gt));Lr($e.order);const pt=rn.current.filter(Tt=>Gt(Tt)!==ke);if(rn.current=pt,ue(pt),!be)return;const ct=$e.fallbackKey?pt.find(Tt=>Gt(Tt)===$e.fallbackKey):void 0;ct?le(ct):(mn(!1),xt(!1))},[Lr,qr]),yr=M.useCallback(ae=>{ae!=="chat"&&(Nn.current=!1),Ln(ae)},[]);xr.current={rightTab:xf(te),tabHistory:ge,experimentsTabOpen:Ce,filesTabOpen:Le,artifactsTabOpen:Ve,expTabs:Be,fileTabs:At,planTabs:kt,subagentTabs:je,codeTabs:st,contentTabOrder:Fn.current,previewTab:Dr.current,filesView:pn,filesToggled:En,selectedRunId:ie,scope:F,panelOpen:br,panelMax:Ye};const wr=M.useCallback(ae=>{const be=Ts.current;if(be===ae)return;be&&or.current.set(be,xr.current);let ke=ae?or.current.get(ae):void 0;if(!ke){const De=ae===Nf&&a.current===!1&&!o.current;De&&(o.current=!0,K(!0)),ke=F9(ae??void 0,De)}if(ae&&Nn.current){Nn.current=!1;const De="experiments";ke={...ke,rightTab:De,tabHistory:[...ke.tabHistory.filter($e=>Gt($e)!==Gt(De)),De],experimentsTabOpen:!0,panelOpen:!0}}le(ke.rightTab),rn.current=ke.tabHistory,ue(ke.tabHistory),Ee(ke.experimentsTabOpen),Pe(ke.filesTabOpen),ft(ke.artifactsTabOpen),wt(ke.expTabs),vt(ke.fileTabs),xe(ke.planTabs),We(ke.subagentTabs),nt(ke.codeTabs),Lr(ke.contentTabOrder),qr(ke.previewTab),Lt(ke.filesView),Ft(ke.filesToggled),q(ke.selectedRunId),V(ke.scope),mn(ke.panelOpen),xt(ke.panelMax),Ts.current=ae,L(ae)},[Lr,qr]),Gr=(r==null?void 0:r.onboardingCompleted)??!1,[Un,Mo]=M.useState(!1),vs=M.useCallback(()=>Mo(!0),[]),as=M.useCallback(async()=>{const ae=await G7({tourCompleted:!0});s(be=>be&&{...be,tourCompleted:ae.tourCompleted}),Mo(!1)},[]),js=M.useCallback(async()=>{await as(),en(!0)},[as]);M.useEffect(()=>{!_||!W_(_)||Ie||!Gr||r!=null&&r.tourCompleted||vs()},[_,Ie,Gr,vs,r==null?void 0:r.tourCompleted]);const Zt=(n==null?void 0:n.find(ae=>ae.id===_))??null;M.useEffect(()=>{const ae=Ie||l||r===null?null:Zt==null?void 0:Zt.name;document.title=ae?`${Ca(ae)} - OpenResearch`:"OpenResearch"},[Ie,l,r,Zt]);const It=M.useRef(_);It.current=_;const Ys=M.useCallback(()=>{Ln("chat"),Ee(!0),lr("experiments"),mn(!0),Ts.current||(Nn.current=!0)},[lr]),Ii=M.useCallback(()=>{c(null),t(null),s(null),Promise.allSettled([uYe(),fYe()]).then(([ae,be])=>{const ke=[];ae.status==="fulfilled"?(t(ae.value),f(De=>{var $e;return De&&ae.value.some(pt=>pt.id===De)?De:(($e=ae.value[0])==null?void 0:$e.id)??null})):ke.push(Aq()),be.status==="fulfilled"?(d.current=be.value.preferredAgent,s(be.value)):ke.push(Uq()),ke.length>0&&c(Wq({items:new Intl.ListFormat(N()).format(ke)}))})},[]);M.useEffect(()=>{Ii()},[Ii]);const Sr=M.useRef(Promise.resolve()),os=M.useRef(0),bs=M.useCallback(ae=>{const be=++os.current;s(De=>De&&{...De,preferredAgent:ae});const ke=Sr.current.then(()=>G7({preferredAgent:ae})).then(De=>{d.current=De.preferredAgent,be===os.current&&s($e=>$e&&{...$e,preferredAgent:De.preferredAgent})}).catch(De=>{throw be===os.current&&s($e=>$e&&{...$e,preferredAgent:d.current}),De});return Sr.current=ke.catch(()=>{}),ke},[]);M.useEffect(()=>{const ae=()=>Kn(be=>Math.min(be,V0()));return window.addEventListener("resize",ae),()=>window.removeEventListener("resize",ae)},[]);const cr=M.useCallback(ae=>{C.current=!1,A.current.clear(),E.current.clear();const be=++j.current;Tx(ae).then(ke=>{if(It.current!==ae||y.current!==ae||j.current!==be)return;A.current=new Map(ke.map($e=>[$e.id,$e]));const De=[...E.current.values()].some($e=>{const pt=A.current.get($e.id);return!pt||pt.status!=="running"&&pt.updatedAt<=$e.updatedAt});E.current.clear();for(const $e of ke){const pt=v.current.get($e.id);(!pt||pt.updatedAt<$e.updatedAt)&&v.current.set($e.id,$e)}k($e=>{const pt=new Map(ke.map(ct=>[ct.id,ct]));for(const ct of $e){const Tt=pt.get(ct.id);(!Tt||Tt.updatedAt<=ct.updatedAt)&&pt.set(ct.id,ct)}return[...pt.values()]}),C.current=!0,De&&Ys()}).catch(()=>{j.current===be&&E.current.clear()})},[Ys]);M.useEffect(()=>{if(!_)return;const ae=Ts.current;ae&&or.current.set(ae,xr.current),Ts.current=null,Nn.current=!1,L(null),y.current=_,v.current.clear(),x.current.clear(),yYe(_).catch(()=>{}),g([]),k([]),I(null),q(null),wt([]),vt([]),K(!1),xe([]),We([]),nt([]),Lr([]),qr(null),Lt("files"),Ft(new Set),rn.current=[],ue([]),le("experiments"),Ee(!1),Pe(!1),ft(!1),mn(!1),xt(!1),V("project"),SYe(_).then(g).catch(()=>{}),cr(_),K7(_).then(I).catch(()=>{})},[cr,_,Lr,qr]);const Xs=M.useCallback(()=>{const ae=It.current;ae&&K7(ae).then(I).catch(()=>{})},[]),Ml=M.useCallback(()=>{Xs(),Ln("chat"),ft(!0),lr("artifacts"),mn(!0)},[Xs,lr]);dZe({onReconnect:()=>{const ae=It.current;ae&&(y.current=ae,v.current.clear(),x.current.clear(),cr(ae))},onRun:ae=>{if(ae.projectId!==It.current||ae.projectId!==y.current)return;const be=v.current.get(ae.id),ke=x.current.has(ae.id);if(be&&be.updatedAt>ae.updatedAt||(v.current.set(ae.id,ae),x.current.add(ae.id),k(pt=>wf(pt,ae)),ae.status!=="running"||(be==null?void 0:be.status)==="running"))return;const De=A.current.get(ae.id),$e=C.current&&(!De||De.status!=="running"&&De.updatedAt<=ae.updatedAt);ke&&be||$e?Ys():C.current||E.current.set(ae.id,ae)},onExperiment:ae=>{ae.projectId===It.current&&g(be=>wf(be,ae))},onProject:ae=>{t(be=>be?wf(be,ae):[ae])},onArtifacts:ae=>{ae===It.current&&Xs()}});const $a=M.useCallback(()=>V("project"),[]),Or=M.useCallback((ae,be="overview",ke="preview")=>{const De={id:ae,view:be};wt($e=>$e.some(pt=>vb(pt,De))?$e:[...$e,De]),Sn(De,ke),mn(!0)},[Sn]),ls=M.useCallback((ae,be="preview")=>{const ke=b.current.filter($e=>$e.id===ae||$e.id.startsWith(ae)),De=ke.length===1?ke[0]:null;De&&(q(De.id),Or(De.experimentId,"terminal",be))},[Or]),Zs=M.useMemo(()=>new Map(m.map(ae=>{var be;return[ae.id,((be=ae.title)==null?void 0:be.trim())||ae.slug||po()]})),[m,e]),Yn=U9(Zs),Bi=M.useMemo(()=>{const ae=new Map;for(const be of S)ae.set(be.id,Yn.get(be.experimentId)??po());return ae},[Yn,S,e]),Hn=U9(Bi),zn=M.useCallback(ae=>{const be=Hn.get(ae);if(be)return be;const ke=[...Hn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Hn]),Qs=M.useCallback(ae=>{const be=Yn.get(ae);if(be)return be;const ke=[...Yn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Yn]),ra=M.useCallback((ae,be="preview")=>{const ke=T.current.filter(De=>De.id===ae||De.id.startsWith(ae));ke.length===1&&Or(ke[0].id,"overview",be)},[Or]),Dc=M.useCallback(ae=>{const be=Be.findIndex(ke=>vb(ke,ae));be!==-1&&(wt(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[Be,_t,te]),ur=M.useCallback((ae,be="preview")=>{const ke=lD(ae);vt(De=>{const $e=De.findIndex(ct=>yu(ct,ae));if($e===-1)return[...De,ke];const pt=De.slice();return pt[$e]=ke,pt}),Sn(ae,be),mn(!0)},[Sn]),Ha=M.useCallback((ae,be,ke,De,$e,pt)=>{const ct=n==null?void 0:n.find(ds=>ds.id===_),Tt=Yyt(ae,ct==null?void 0:ct.repoPath,be,(ct==null?void 0:ct.artifactsDir)??(ct==null?void 0:ct.filesDir),ct==null?void 0:ct.slug);if(!Tt)return null;const An=$e?T.current.find(ds=>ds.id===$e||$e.length>=6&&ds.id.startsWith($e)):void 0,us=ke??(An==null?void 0:An.branchName),ws=Tt.source==null||Tt.source==="repo";return us&&ws&&(Tt.ref=us),pt&&!Tt.ref&&ws&&(Tt.branchLabel=pt),De!=null&&(Tt.line=De,Tt.lineScrollRequest=++St.current),Tt},[n,_]),Pa=M.useCallback((ae,be,ke,De,$e,pt,ct="preview")=>{const Tt=Ha(ae,be,ke,De,$e,pt);Tt&&ur(Tt,ct)},[ur,Ha]),Fa=M.useCallback(ae=>ur({path:ae,source:"artifacts"},"keepOpen"),[ur]),Ro=M.useCallback((ae,be,ke,De,$e,pt="preview")=>{const ct=Ha(ae,be,$e,ke,De);ct&&ur(ct,pt)},[ur,Ha]),Ms=M.useCallback((ae,be)=>{et(ae),be()},[et]),Lc=M.useCallback(ae=>{const be=At.findIndex(ke=>yu(ke,ae));be!==-1&&(vt(ke=>ke.filter((De,$e)=>$e!==be)),_&&Ot.current.delete(bf(_,B,ae)),B===Nf&&yu(ae,{path:Sb,source:"artifacts"})&&K(!1),_t(ae,Gt(te)===Gt(ae)))},[B,At,_t,_,te]),Ua=M.useCallback(ae=>{ae.lineScrollRequest!==void 0&&le(be=>typeof be!="object"||!("path"in be)||!yu(be,ae)||be.lineScrollRequest!==ae.lineScrollRequest?be:xf(be))},[]),xs=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"plan",sessionId:be,promptId:ke,plan:ae};xe(pt=>{const ct=pt.findIndex(An=>An.promptId===ke);if(ct===-1)return[...pt,$e];const Tt=pt.slice();return Tt[ct]=$e,Tt}),Sn($e,De),mn(!0)},[Sn]),nr=M.useCallback(ae=>{const be=kt.findIndex(ke=>ke.promptId===ae.promptId);be!==-1&&(xe(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[_t,kt,te]),qa=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"subagent",sessionId:ae,spawnPartId:be,label:ke};We(pt=>pt.some(ct=>ct.spawnPartId===be)?pt:[...pt,$e]),Sn($e,De),mn(!0)},[Sn]),rr=M.useCallback(ae=>{const be=je.findIndex(ke=>ke.spawnPartId===ae.spawnPartId);be!==-1&&(We(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[_t,te,je]),[yi,Rs]=M.useState({});M.useEffect(()=>{if(Rs(ct=>{const Tt=new Set(je.map(An=>An.spawnPartId));return Object.keys(ct).every(An=>Tt.has(An))?ct:Object.fromEntries(Object.entries(ct).filter(([An])=>Tt.has(An)))}),je.length===0)return;let ae=!0;const be=new Set,ke=(ct,Tt,An)=>{Rs(us=>{var ds;let ws=us;for(const Os of Tt)if(!(An&&be.has(Os.spawnPartId)))for(const Dl of ct){const Hi=o4(Dl.parts,Os.spawnPartId);if(!Hi)continue;An||be.add(Os.spawnPartId);const Wa={label:Cft(Hi),running:((ds=Hi.state)==null?void 0:ds.status)==="running"},Lo=ws[Os.spawnPartId];(!Lo||Lo.label!==Wa.label||Lo.running!==Wa.running)&&(ws===us&&(ws={...us}),ws[Os.spawnPartId]=Wa);break}return ws})};let De=0;const $e=()=>{const ct=++De;for(const Tt of new Set(je.map(An=>An.sessionId)))Au(Tt).then(({messages:An})=>{ae&&ct===De&&ke(An,je.filter(us=>us.sessionId===Tt),!0)}).catch(()=>{})};$e();const pt=Hf(ct=>{if(ct.type==="reconnected"){be.clear(),$e();return}if(ct.type!=="message")return;const Tt=je.filter(An=>An.sessionId===ct.sessionId);Tt.length&&ke([ct.message],Tt,!1)});return()=>{ae=!1,pt()}},[je]);const sa=M.useCallback((ae,be,ke="files",De="preview")=>{const $e={code:!0,experimentId:ae,branch:be,view:ke,toggled:new Set};nt(pt=>pt.some(ct=>wu(ct,$e))?pt.map(ct=>wu(ct,$e)?{...ct,experimentId:ae,view:ke}:ct):[...pt,$e]),Sn($e,De),mn(!0)},[Sn]),Ds=M.useCallback((ae,be)=>{nt(ke=>ke.map(De=>wu(De,ae)?{...De,...be}:De))},[]),ia=M.useCallback(ae=>{const be=st.findIndex(ke=>wu(ke,ae));be!==-1&&(nt(ke=>ke.filter((De,$e)=>$e!==be)),_t(ae,Gt(te)===Gt(ae)))},[st,_t,te]),Ls=M.useCallback(()=>{Ln("chat"),Pe(!0),lr("files"),mn(!0)},[lr]),Ga=M.useCallback(ae=>{ae==="experiments"?Ee(!1):ae==="files"?Pe(!1):ft(!1),_t(ae,te===ae)},[_t,te]),aa=ae=>{ae.preventDefault(),ae.currentTarget.setPointerCapture(ae.pointerId);const ke=document.body.style.userSelect;document.body.style.userSelect="none";const De=Ye,$e=ae.clientX,pt=Wn;let ct=!1;function Tt(){window.removeEventListener("pointermove",An),window.removeEventListener("pointerup",Tt),window.removeEventListener("pointercancel",Tt),document.body.style.userSelect=ke}function An(us){if(De){const Dl=us.clientX-$e;if(ct||Dlds+n4t){xt(!0);return}xt(!1);const Os=Math.min(Math.max(ws,fh),ds);Kn(Os);try{localStorage.setItem(ax,String(Os))}catch{}}window.addEventListener("pointermove",An),window.addEventListener("pointerup",Tt),window.addEventListener("pointercancel",Tt)},Xr=(ae,be)=>{t(ke=>ke?wf(ke,ae):[ae]),f(ae.id),it(!1),be&&(is({projectId:ae.id,message:be}),yr("git"))},Do=ae=>{t(be=>be&&be.filter(ke=>ke.id!==ae)),_===ae&&f(null)},Zr=typeof te=="object"&&"id"in te?te:null,Pn=typeof te=="object"&&"path"in te?te:null,ys=B===Nf&&$?At.find(ae=>yu(ae,{path:Sb,source:"artifacts"})):void 0,oa=ys?[ys]:[],Qr=typeof te=="object"&&"kind"in te&&te.kind==="plan"?te:null,kn=typeof te=="object"&&"kind"in te&&te.kind==="subagent"?te:null,cs=typeof te=="object"&&"code"in te?te:null,kr=cs?st.find(ae=>wu(ae,cs))??null:null,$i=new Map;for(const ae of[...Be,...At,...kt,...je,...st])$i.set(Gt(ae),ae);const vd=ys?Gt(ys):null,Rl=Ht.filter(ae=>ae!==vd).map(ae=>$i.get(ae)).filter(Wyt),Js=ae=>nn!==null&&Gt(nn)===Gt(ae),Vr=ae=>h.jsx(fl,{active:Pn!==null&&yu(Pn,ae),label:ae.path.split("/").pop()||ae.path,icon:h.jsx(XE,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>Lc(ae)},`file:${P4(ae)}`),ei=Zr?m.find(ae=>ae.id===Zr.id)??null:null,Va=kr?m.find(ae=>ae.id===kr.experimentId)??null:null,Oc=ae=>{var ke,De;if("path"in ae)return Vr(ae);if("id"in ae){const $e=m.find(pt=>pt.id===ae.id);return h.jsx(fl,{active:Zr!==null&&vb(Zr,ae),label:$e?$e.title||$e.slug:"…",icon:ae.view==="overview"?h.jsx(pWe,{size:12,className:"shrink-0"}):h.jsx(Wu,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>Dc(ae)},Gt(ae))}if("kind"in ae&&ae.kind==="plan")return h.jsx(fl,{active:Qr!==null&&Qr.promptId===ae.promptId,label:eE(),icon:h.jsx(Nx,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>nr(ae)},Gt(ae));if("kind"in ae)return h.jsx(fl,{active:kn!==null&&kn.spawnPartId===ae.spawnPartId,label:((ke=yi[ae.spawnPartId])==null?void 0:ke.label)??ae.label??Zq(),shimmer:((De=yi[ae.spawnPartId])==null?void 0:De.running)??!1,icon:h.jsx(Ax,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>rr(ae)},Gt(ae));const be=m.find($e=>$e.id===ae.experimentId);return h.jsx(fl,{active:kr!==null&&wu(kr,ae),label:(be==null?void 0:be.slug)??ae.branch,icon:h.jsx($f,{size:12,className:"shrink-0"}),preview:Js(ae),onSelect:()=>lr(ae),onPromote:()=>et(ae),onClose:()=>ia(ae)},Gt(ae))};if(l)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsxs("div",{className:P9,children:[h.jsx("p",{children:l}),h.jsx(Qe,{variant:"primary",onClick:Ii,children:Gu()})]})});if(n===null||r===null)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsx("div",{className:P9,children:h.jsx(dn,{})})});if(n.length===0)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(CC,{}),Gr?h.jsx(jC,{projects:n,onOpen:f,onCreated:Xr,onDeleted:Do}):h.jsx(imt,{preferredAgent:r.preferredAgent,onDone:(ae,be)=>{xdt(),d.current=be,t([ae]),f(ae.id),s(ke=>({...ke??{tourCompleted:!1},onboardingCompleted:!0,preferredAgent:be}))}})]});const bd=h.jsx(rmt,{projectName:((Ic=n.find(ae=>ae.id===_))==null?void 0:Ic.name)??"",onHome:()=>it(!0),onNewProject:()=>en(!0),onRepository:()=>yr("git"),onCollapse:()=>rt(!1)});return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(CC,{}),h.jsx(Ict,{}),Ie?h.jsx(jC,{projects:n,onOpen:ae=>{f(ae),it(!1)},onCreated:Xr,onDeleted:Do}):h.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[_&&h.jsx(Ift,{projectId:_,projectName:(Zt==null?void 0:Zt.name)??"",railHeader:bd,railOpen:Nt,onShowRail:()=>rt(!0),mainView:Mt,onSelectMainView:yr,experimentsActive:Mt==="chat"&&br&&te==="experiments",filesActive:Mt==="chat"&&br&&te==="files",artifactsActive:Mt==="chat"&&br&&te==="artifacts",onOpenExperiments:Ys,onOpenArtifacts:Ml,onOpenFile:Ro,onOpenRun:ls,runExperimentName:zn,onOpenExperiment:ra,experimentName:Qs,onOpenPlan:xs,onOpenSubagent:qa,onOpenWorktree:Ls,composerPrefill:Zt&&W_(Zt.id)&&(r==null?void 0:r.tourCompleted)===!1?lYe:null,onOpenDemoWelcome:Zt&&W_(Zt.id)?vs:void 0,onActiveSessionChange:wr,preferredAgent:r.preferredAgent,onPreferredAgentChange:bs,children:Mt==="skills"?h.jsx(Dpt,{}):Mt!=="chat"?h.jsx(idt,{tab:Mt,project:Zt,githubPublicationError:_r&&_r.projectId===(Zt==null?void 0:Zt.id)?_r.message:null,onProjectUpdate:ae=>{t(be=>be?wf(be,ae):[ae]),ae.githubEnabled&&is(null)},onSelectTab:yr}):null}),Mt==="chat"&&br&&h.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Ye?"max":""}`,style:Ye?void 0:{width:Wn},"data-onboarding":"experiments",children:[h.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 ${Ye?"cursor-e-resize":"cursor-col-resize"}`,title:Ye?PU():IU(),onPointerDown:aa}),h.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:[h.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:[oa.map(Vr),Le&&h.jsx(fl,{active:te==="files",label:cq(),icon:h.jsx($f,{size:12,className:"shrink-0"}),onSelect:()=>lr("files"),onClose:()=>Ga("files")}),Ve&&h.jsx(fl,{active:te==="artifacts",label:NU(),icon:h.jsx(kx,{size:12,className:"shrink-0"}),onSelect:()=>lr("artifacts"),onClose:()=>Ga("artifacts")}),Ce&&h.jsx(fl,{active:te==="experiments",label:iq(),icon:h.jsx(wx,{size:12,className:"shrink-0"}),onSelect:()=>lr("experiments"),onClose:()=>Ga("experiments")}),Rl.map(Oc)]}),h.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[h.jsx(Jt,{title:Ye?E6():C6(),"aria-label":Ye?E6():C6(),onClick:()=>xt(ae=>!ae),children:Ye?h.jsx(SKe,{size:14}):h.jsx(xKe,{size:14})}),h.jsx(Jt,{title:w6(),"aria-label":w6(),onClick:()=>{Nn.current=!1,mn(!1),xt(!1)},children:h.jsx(_s,{size:14})})]})]}),te==="artifacts"?h.jsx(_o,{children:Zt&&h.jsx(Ept,{project:Zt,artifacts:D,onChanged:Xs,onOpenFile:Fa,onOpenStorage:()=>yr("storage")},Zt.id)}):te==="experiments"?h.jsxs(_o,{children:[h.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[h.jsx("span",{className:"flex-1"}),h.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[h.jsxs("div",{className:"option-picker relative inline-flex",ref:J,children:[h.jsx(Jt,{size:"small",ref:X,className:"experiment-scope-trigger",active:re==="agent",title:ZU({scope:re==="agent"?S6():k6()}),"aria-label":hq(),"aria-expanded":W,onClick:()=>Z(ae=>!ae),children:h.jsx(tKe,{size:16,strokeWidth:2.5})}),W&&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 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:[h.jsxs(Yr,{"aria-pressed":re==="agent",disabled:!B||!G,title:B?G?void 0:gq():Cq(),onClick:()=>{V("agent"),Z(!1)},children:[h.jsx("span",{children:S6()}),re==="agent"&&h.jsx(Ws,{size:13})]}),h.jsxs(Yr,{"aria-pressed":re==="project",onClick:()=>{V("project"),Z(!1)},children:[h.jsx("span",{children:k6()}),re==="project"&&h.jsx(Ws,{size:13})]})]})]}),h.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":tq(),children:[h.jsx("button",{className:P==="table"?"active":"","aria-pressed":P==="table",onClick:()=>H("table"),children:tG()}),h.jsx("button",{className:P==="tree"?"active":"","aria-pressed":P==="tree",onClick:()=>H("tree"),children:iG()})]})]})]}),h.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:P==="tree"?Zt&&h.jsx(Vyt,{experiments:m,runs:he,project:Zt,onOpenView:Or,onOpenCode:sa,agentSessionId:re==="agent"?B:null,onShowProjectScope:$a}):h.jsx(mmt,{runs:he,emptyHint:re==="agent"&&m.length>0?yq():void 0,experiments:oe,onOpen:(ae,be)=>{Or(ae.id,"overview",be)},onOpenLogs:(ae,be,ke)=>{q(be),Or(ae,"terminal",ke)},onOpenCode:(ae,be)=>{const ke=m.find(De=>De.id===ae);ke&&sa(ke.id,ke.branchName,"files",be)},onCancel:lN})})]}):te==="files"?h.jsx(_o,{children:Zt?h.jsx(ppt,{sessionId:B??void 0,project:Zt,view:pn,toggled:En,onViewChange:Lt,onToggledChange:Ft,onOpenFile:(ae,be,ke,De)=>Pa(ae,be,ke,void 0,void 0,void 0,De)},`files:${B??`project:${Zt.id}`}`):h.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:h.jsx($u,{children:h.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:[h.jsx(ZE,{size:22}),h.jsx("p",{children:$q()})]})})})}):Pn?h.jsx(_o,{children:_&&h.jsx(nmt,{projectId:_,path:Pn.path,source:Pn.source,sessionId:Pn.source==="artifacts"?B??void 0:Pn.sessionId,gitRef:Pn.ref,line:Pn.line,branchLabel:Xyt(Pn,Zt==null?void 0:Zt.baselineBranch),onOpenFile:(ae,be,ke,De)=>Ms(Pn,()=>Pa(ae,be,ke,void 0,void 0,void 0,De)),scrollPosition:Ot.current.get(bf(_,B,Pn)),onScrollPositionChange:ae=>{Ot.current.set(bf(_,B,Pn),ae)},lineScrollRequest:Pn.lineScrollRequest,onLineScrollRequestHandled:()=>Ua(Pn),onEdit:()=>et(Pn)},bf(_,B,Pn))}):Qr?h.jsx(_o,{children:h.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:h.jsx(za,{text:Qr.plan,onOpenFile:(ae,be,ke,De,$e)=>Ms(Qr,()=>Pa(ae,Qr.sessionId,De,be,ke,void 0,$e))})})}):kn?h.jsx(Bft,{sessionId:kn.sessionId,spawnPartId:kn.spawnPartId,onOpenFile:(ae,be,ke,De,$e)=>Ms(kn,()=>Ro(ae,kn.sessionId,be,ke,De,$e)),onOpenRun:(ae,be)=>Ms(kn,()=>ls(ae,be)),runExperimentName:zn,onOpenExperiment:(ae,be)=>Ms(kn,()=>ra(ae,be)),experimentName:Qs,onOpenSubagent:(ae,be,ke)=>Ms(kn,()=>qa(kn.sessionId,ae,be,ke))},kn.spawnPartId):kr?h.jsx(_o,{children:_&&Zt&&kr&&Va&&h.jsx(hpt,{projectId:_,project:Zt,experiment:Va,view:kr.view,toggled:kr.toggled,onViewChange:ae=>Ds(kr,{view:ae}),onToggledChange:ae=>Ds(kr,{toggled:ae}),onOpenFile:(ae,be,ke,De)=>Ms(kr,()=>Pa(ae,be,ke,void 0,void 0,Va.branchName,De))},`code:${kr.branch}`)}):h.jsx(_o,{children:Zr&&ei&&Zt&&h.jsx($pt,{experiment:ei,project:Zt,view:Zr.view,runs:S,selectedRunId:ie,onSelectRun:q,parentExperiment:m.find(ae=>ae.id===ei.parentExperimentId)??null,onOpenView:(ae,be,ke)=>{be&&q(be),Ms(Zr,()=>Or(ei.id,ae,ke))},onOpenCode:(ae,be)=>Ms(Zr,()=>sa(ei.id,ei.branchName,ae,be))},`${Zr.id}:${Zr.view}`)})]})]}),Ut&&h.jsx(xM,{onClose:()=>en(!1),onCreated:(ae,be)=>{en(!1),Xr(ae,be)}}),Un&&!Ie&&Zt&&W_(Zt.id)&&h.jsx(gmt,{onClose:as,onCreateProject:js})]})}const a4t=N();document.documentElement.lang=a4t;document.documentElement.dir="ltr";HL.createRoot(document.getElementById("root")).render(h.jsxs(M.StrictMode,{children:[h.jsx(i4t,{}),h.jsx(dJe,{})]})); +`)+1)}let V=[];try{V=F.trim()?I2(F):[]}catch{return}if(B.truncated&&V.every(Z=>Z.hunks.length===0))return;let X=0,W=0;for(const Z of V){const J=k4(Z);X+=J.additions,W+=J.deletions}P||b({fileCount:V.length,additions:X,deletions:W,truncated:B.truncated})}).catch(()=>{}),()=>{P=!0}},[v]);const x={done:0,failed:0,cancelled:0,live:0};for(const P of n)P.status==="done"?x.done+=1:P.status==="failed"?x.failed+=1:P.status==="cancelled"?x.cancelled+=1:x.live+=1;const y=t?op((t.endedAt??Date.now())-t.createdAt):null,C=(t==null?void 0:t.status)==="failed"&&t.resultMarkdown?t.resultMarkdown:null,A=e.description||(C?null:t==null?void 0:t.resultMarkdown)||null,E=M.useRef(null),[j,T]=M.useState(!1),[D,I]=M.useState(!1);return M.useEffect(()=>{T(!1)},[A]),M.useEffect(()=>{const P=E.current;P&&I(P.scrollHeight>P.clientHeight+1)},[A,j]),Kp.createPortal(h.jsxs("div",{ref:d.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-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:xb,left:g,top:S,visibility:d.offsetHeight===0?"hidden":void 0},onMouseEnter:l,onMouseLeave:c,children:[h.jsxs("div",{className:"hc-head",children:[h.jsx("span",{className:"hc-slug",children:e.slug}),h.jsx(bo,{status:t?Li(t):"idle"})]}),e.title&&h.jsx("div",{className:"hc-title",children:e.title}),h.jsxs("div",{className:"hc-actions",children:[a&&h.jsxs("button",{type:"button",...gr(a),children:[h.jsx(Yu,{size:13}),yle()]}),h.jsxs("button",{type:"button",...gr(o),children:[h.jsx(Pp,{size:13}),cle()]})]}),A&&h.jsx("div",{className:`hc-body${j?" expanded":""}`,ref:E,children:A}),A&&(D||j)&&h.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>T(P=>!P),children:j?uE():Cse()}),C&&h.jsx("div",{className:"hc-failure",children:C}),h.jsxs("div",{className:"hc-stats",children:[h.jsx("span",{children:new Intl.ListFormat(N(),{style:"short"}).format([n.length===1?J_e():r0e({count:Ft(n.length)}),...x.done>0?[A_e({count:Ft(x.done)})]:[],...x.failed>0?[R_e({count:Ft(x.failed)})]:[],...x.cancelled>0?[C_e({count:Ft(x.cancelled)})]:[],...x.live>0?[G_e({count:Ft(x.live)})]:[]])}),t&&Ox(t.backend)&&h.jsx(i4,{backend:t.backend}),y&&h.jsx("span",{children:y}),t&&h.jsx("span",{children:Ea(t.createdAt)})]}),h.jsxs("div",{className:"hc-git",children:[h.jsxs("div",{className:"hc-git-row",children:[h.jsxs("span",{className:"hc-branch",title:e.branchName,children:[h.jsx(Fp,{size:12}),e.branchName]}),r&&h.jsxs("span",{children:[gle()," ",h.jsx("span",{children:r})]})]}),k&&k.fileCount>0&&h.jsx("div",{className:"hc-git-row",title:k.truncated?PO({parent:Te(r??"parent")}):IO({parent:Te(r??"parent")}),children:h.jsxs("span",{children:[k.truncated&&"≥ ",h.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",k.additions]})," ",h.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",k.deletions]})," · ",k.fileCount===1&&!k.truncated?Y_e():k.truncated?P_e({count:Ft(k.fileCount)}):I_e({count:Ft(k.fileCount)})]})})]}),h.jsxs("div",{className:"hc-foot",children:[h.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),h.jsxs("span",{children:[hle()," ",Jyt(e.createdAt)]})]})]}),document.body)}const G9=["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(" "),t4t=264,V9=132,X0=44,n4t=72,r4t=148,s4t=44;function i4t(e){const n=new Map(e.map(a=>[a.id,{exp:a,children:[]}])),t=[];for(const a of e){const o=n.get(a.id),l=a.parentExperimentId?n.get(a.parentExperimentId):void 0;l?l.children.push(o):t.push(o)}const r=(a,o)=>a.exp.createdAt-o.exp.createdAt,s=a=>{a.children.sort(r),a.children.forEach(s)};return t.sort(r),t.forEach(s),t}function a4t(e,n){const t=new Map,r=l=>{const c=t.get(l)??1+l.children.reduce((d,_)=>d+r(_),0);return t.set(l,c),c},s=new Map,a=l=>{const c=s.get(l)??(n(l)||l.children.some(a));return s.set(l,c),c};function o(l){if(n(l)){const _=[];let f=0;for(const m of l.children)a(m)?_.push(...o(m)):f+=r(m);return f>0&&_.push({kind:"elided",id:`el-${l.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:l.exp,children:_}]}if(!a(l))return[];let c=0;const d=[];return(function _(f){c+=1;for(const m of f.children)n(m)?d.push(...o(m)):a(m)?_(m):c+=r(m)})(l),[{kind:"elided",id:`el-${l.exp.id}`,count:c,children:d}]}return e.flatMap(o)}function ux(e){return e.kind==="exp"?t4t:r4t}function D0(e){return e.kind==="exp"?e.exp.id:e.id}function Z0(e){if(e.children.length===0)return ux(e);const n=e.children.reduce((t,r)=>t+Z0(r),0)+X0*(e.children.length-1);return Math.max(ux(e),n)}function o4t(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const l4t=M.memo(function({data:n}){Ec();const{exp:t,latestRun:r,runs:s,isBaseline:a,parentSlug:o,githubOwner:l,githubRepo:c,onOpenView:d,onOpenCode:_}=n,f=r?Li(r):void 0,m=f==="running"||f==="starting"||f==="cancelling",g=a?$qe():m?eGe():_o(),S=s.slice(-8),k=M.useRef(null),b=Qyt(k,n);return h.jsxs("div",{ref:k,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] ${m?"live":""}`,onMouseEnter:b.onMouseEnter,onMouseLeave:b.onMouseLeave,children:[h.jsx(zl,{type:"target",position:mt.Top}),h.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...gr(v=>d(t.id,"overview",v)),children:[h.jsxs("div",{className:"node-eyebrow",children:[h.jsx("span",{children:g}),h.jsx(bo,{status:f??"idle"})]}),h.jsx("div",{className:"node-head",children:h.jsx("span",{className:"node-slug",children:t.slug})}),(t.title||t.description)&&h.jsx("div",{className:"node-title",children:t.title||t.description}),h.jsxs("div",{className:"node-meta",children:[h.jsx("span",{children:$Ge()}),S.length>0?h.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:S.map(v=>h.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 ${o4t(Li(v))}`,title:qT(Li(v))},v.id))}):h.jsx("span",{children:NGe()}),h.jsx("span",{className:"flex-1"}),r&&h.jsx("span",{children:Ea(r.createdAt)})]})]}),h.jsxs("div",{className:"node-actions",onClick:v=>v.stopPropagation(),children:[s.length>0&&h.jsxs("button",{className:"node-action",title:jGe(),...gr(v=>d(t.id,"terminal",v)),children:[h.jsx(Yu,{size:13}),WE()]}),h.jsxs("button",{className:"node-action",title:tE({branch:Te(t.branchName)}),...gr(v=>_(t.id,t.branchName,"files",v)),children:[h.jsx(Pp,{size:13}),fGe()]}),l&&c&&h.jsx("a",{className:"node-action node-action-ext",title:ep({name:Te(t.branchName)}),"aria-label":ep({name:Te(t.branchName)}),href:qp(l,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:h.jsx(gm,{size:13})})]}),h.jsx(zl,{type:"source",position:mt.Bottom}),b.rect&&h.jsx(e4t,{exp:t,runs:s,latestRun:r,parentSlug:o,anchor:b.rect,onOpenLogs:s.length>0?v=>d(t.id,"terminal",v):void 0,onOpenCode:v=>_(t.id,t.branchName,"files",v),onMouseEnter:b.keepOpen,onMouseLeave:b.onMouseLeave})]})}),c4t=M.memo(function({data:n}){Ec();const{count:t,onShowProjectScope:r}=n;return h.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:UGe(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[h.jsx(zl,{type:"target",position:mt.Top}),h.jsx(Cx,{size:14}),h.jsxs("span",{className:"elided-node-label",children:[t===1?Xqe():Vqe({count:Ft(t)}),h.jsx("span",{className:"elided-node-sub",children:LGe()})]}),h.jsx(zl,{type:"source",position:mt.Bottom})]})}),u4t={exp:l4t,elided:c4t},xD={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},d4t={...xD.style,strokeDasharray:"4 4"};function f4t({experiments:e,runs:n,project:t,onOpenView:r,onOpenCode:s,agentSessionId:a,onShowProjectScope:o}){const{nodes:l,edges:c}=M.useMemo(()=>{const d=new Map;for(const v of n){const x=d.get(v.experimentId);x?x.push(v):d.set(v.experimentId,[v])}for(const v of d.values())v.sort((x,y)=>x.createdAt-y.createdAt);const _=[],f=[],m=v=>!a||v.exp.chatSessionId===a,g=a4t(i4t(e),m),S=new Map(e.map(v=>[v.id,v.slug]));function k(v,x,y){const C=x-ux(v)/2;if(v.kind==="exp"){const j=d.get(v.exp.id)??[];_.push({id:v.exp.id,type:"exp",position:{x:C,y},data:{exp:v.exp,latestRun:j[j.length-1]??null,runs:j,isBaseline:!v.exp.parentExperimentId,parentSlug:v.exp.parentExperimentId?S.get(v.exp.parentExperimentId)??null:null,githubOwner:t.githubEnabled?t.githubOwner:"",githubRepo:t.githubEnabled?t.githubRepo:"",onOpenView:r,onOpenCode:s}})}else _.push({id:v.id,type:"elided",position:{x:C,y:y+(V9-s4t)/2},data:{count:v.count,onShowProjectScope:o}});if(v.children.length===0)return;const A=v.children.reduce((j,T)=>j+Z0(T),0)+X0*(v.children.length-1);let E=x-A/2;for(const j of v.children){const T=Z0(j),D=v.kind==="elided"||j.kind==="elided";f.push({id:`e-${D0(v)}-${D0(j)}`,source:D0(v),target:D0(j),...D?{style:d4t}:{}}),k(j,E+T/2,y+V9+n4t),E+=T+X0}}let b=0;for(const v of g){const x=Z0(v);k(v,b+x/2,0),b+=x+X0}return{nodes:_,edges:f}},[e,n,r,s,t.githubOwner,t.githubRepo,t.githubEnabled,a,o]);return e.length===0?h.jsxs("div",{className:G9,children:[h.jsx("p",{className:"empty-state-title",children:SGe()}),h.jsx("p",{className:"empty-state-hint",children:lGe()})]}):l.length===0&&a?h.jsxs("div",{className:G9,children:[h.jsx("p",{className:"empty-state-title",children:bGe()}),h.jsx("p",{className:"empty-state-hint",children:sGe()})]}):h.jsx(xyt,{className:"[&_.react-flow\\_\\_node.react-flow\\_\\_node-exp.selectable]:cursor-default [&_.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:l,edges:c,nodeTypes:u4t,defaultEdgeOptions:xD,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:Zyt,minZoom:.15,fitView:!0,fitViewOptions:{padding:.25,maxZoom:1},children:h.jsx(Cyt,{variant:xo.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},a??"project")}const W9=["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(" "),wb=(e,n)=>e.id===n.id&&e.view===n.view,Su=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,V4=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,bf=(e,n,t)=>`${e}:${n??""}:${V4(t)}`,yD=e=>({...e,lineScrollRequest:void 0});function xf(e){return typeof e=="object"&&"path"in e?yD(e):e}const ku=(e,n)=>e.branch===n.branch;function Vt(e){return typeof e=="string"?`home:${e}`:"code"in e?`code:${e.branch}`:"kind"in e?e.kind==="plan"?`plan:${e.promptId}`:`subagent:${e.spawnPartId}`:"path"in e?`file:${V4(e)}`:`experiment:${e.id}:${e.view}`}function yf(e,n){const t=e.filter(r=>Vt(r)!==n);return t.length===e.length?e:t}function h4t(e){return e!==void 0}function K9(e,n=!1){const t={rightTab:"experiments",tabHistory:[],experimentsTabOpen:!1,filesTabOpen:!1,artifactsTabOpen:!1,expTabs:[],fileTabs:[],planTabs:[],subagentTabs:[],codeTabs:[],contentTabOrder:[],previewTab:null,filesView:"files",filesToggled:new Set,selectedRunId:null,scope:"project",panelOpen:!1,panelMax:!1};if(e===Nf&&n){const r={path:Nb,source:"artifacts"},s="experiments";return{...t,rightTab:s,tabHistory:[r,s],experimentsTabOpen:!0,fileTabs:[r],contentTabOrder:[Vt(r)],panelOpen:!0}}if(e===uN){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(Vt),panelOpen:!0}}if(e===dN){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Vt),panelOpen:!0}}return t}function _4t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p4t(e,n,t,r,s){let a=e,o;const l=n==null?void 0:n.replace(/\/+$/,""),c=r==null?void 0:r.replace(/\/+$/,"");if(a.startsWith("artifacts/"))return a=a.slice(10),a?{path:a,source:"artifacts"}:null;if(a==="~"||a.startsWith("~/"))return{path:a,source:"abs"};const d=m=>{const g=b=>b.replace(/^\/private(?=\/(?:tmp|var)(?:\/|$))/,""),[S,k]=[g(a),g(m)];return S===k?"":S.startsWith(`${k}/`)?S.slice(k.length).replace(/^\/+/,""):null},_=a.startsWith("/")&&c?d(c):null,f=a.startsWith("/")&&l?d(l):null;if(!a.startsWith("/"))o=t;else{if(_!==null)return _?{path:_,source:"artifacts"}:null;if(f!==null)a=f;else{const m=s?_4t(s):"[^/]+",g=a.match(new RegExp(`/files/${m}/(.+)$`)),S=g?null:a.match(/\/openresearch\/worktrees\/[^/]+\/([^/]+)\/(.+)$/),k=g||S?null:a.match(/\/openresearch\/repos\/[^/]+\/[^/]+\/(.+)$/);if(g)return{path:g[1],source:"artifacts"};S?(o=S[1],a=S[2]):k&&(a=k[1])}}return a?a.startsWith("/")?{path:a,source:"abs"}:{path:a,sessionId:o}:null}function m4t(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const dx="orx:panel-width",wD="orx:experiments-view";function g4t(){try{return localStorage.getItem(wD)==="tree"?"tree":"table"}catch{return"table"}}const _h=360,v4t=10,b4t=272,x4t=380,y4t=b4t+56,w4t=80,S4t=48;function Q0(){return Math.max(_h,window.innerWidth-y4t-x4t)}function k4t(){const e=Q0();try{const n=Number(localStorage.getItem(dx));if(Number.isFinite(n)&&n>=_h)return Math.min(n,e)}catch{}return Math.max(_h,Math.min(760,e,Math.round(window.innerWidth*.42)))}function wf(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 Y9(e){const n=M.useRef(e);return n.current.size===e.size&&[...e].every(([r,s])=>n.current.get(r)===s)||(n.current=e),n.current}function C4t(){var Ll;const e=Ec(),[n,t]=M.useState(null),[r,s]=M.useState(null),a=M.useRef(void 0);a.current=r==null?void 0:r.tourCompleted;const o=M.useRef(!1),[l,c]=M.useState(null),d=M.useRef(null),[_,f]=M.useState(null),[m,g]=M.useState([]),[S,k]=M.useState([]),b=M.useRef(S);b.current=S;const v=M.useRef(new Map),x=M.useRef(new Set),y=M.useRef(null),C=M.useRef(!1),A=M.useRef(new Map),E=M.useRef(new Map),j=M.useRef(0),T=M.useRef(m);T.current=m;const[D,I]=M.useState(null),[P,B]=M.useState(g4t),[F,V]=M.useState("project"),X=M.useRef(null),{open:W,setOpen:Z,ref:J}=zo(X),[$,L]=M.useState(null),[H,Y]=M.useState(!1),G=m.every(ae=>ae.chatSessionId),ee=$&&G?F:"project",oe=M.useMemo(()=>ee!=="agent"?m:m.filter(ae=>ae.chatSessionId===$),[m,ee,$]),he=M.useMemo(()=>{if(ee!=="agent")return S;const ae=new Set(oe.map(be=>be.id));return S.filter(be=>ae.has(be.experimentId))},[S,oe,ee]);M.useEffect(()=>{try{localStorage.setItem(wD,P)}catch{}},[P]);const[ie,q]=M.useState(null),[ne,le]=M.useState("experiments"),[ge,ue]=M.useState([]),[Ce,Ee]=M.useState(!1),[Le,Pe]=M.useState(!1),[Ve,ht]=M.useState(!1),[Be,wt]=M.useState([]),[zt,vt]=M.useState([]),Lt=M.useRef(new Map),St=M.useRef(0),[kt,xe]=M.useState([]),[je,We]=M.useState([]),[st,nt]=M.useState([]),[Ht,bt]=M.useState([]),[nn,Wt]=M.useState(null),[pn,Dt]=M.useState("files"),[Nn,Ut]=M.useState(new Set),[br,mn]=M.useState(!1),[Xe,xt]=M.useState(!1),[Vn,Wn]=M.useState(k4t),[Et,rt]=M.useState(!0),[Ie,it]=M.useState(!1),[qt,en]=M.useState(!1),[jt,On]=M.useState("chat"),[_r,is]=M.useState(null),ar=M.useRef(new Map),xr=M.useRef(K9()),js=M.useRef(null),zn=M.useRef(!1),rn=M.useRef(ge);rn.current=ge;const Pn=M.useRef(Ht);Pn.current=Ht;const Or=M.useRef(null),Ir=M.useCallback(ae=>{const be=[...ae];Pn.current=be,bt(be)},[]),Vr=M.useCallback(ae=>{Or.current=ae,Wt(ae)},[]),ln=M.useCallback(ae=>{const be=Vt(ae);wt($e=>yf($e,be)),vt($e=>yf($e,be)),xe($e=>yf($e,be)),We($e=>yf($e,be)),nt($e=>yf($e,be));const ke=Ot.current;ke&&"path"in ae&&Lt.current.delete(bf(ke,js.current,ae));const De=rn.current.filter($e=>Vt($e)!==be);rn.current=De,ue(De)},[]),or=M.useCallback(ae=>{zn.current=!1;const be=Vt(ae),ke=[...rn.current.filter(De=>Vt(De)!==be),xf(ae)];rn.current=ke,ue(ke),le(ae)},[]),Cn=M.useCallback((ae,be)=>{zn.current=!1;const ke=Vt(ae),De=Or.current,$e=Uct({order:Pn.current,previewKey:De?Vt(De):null},ke,be);$e.replacedKey&&De&&typeof De!="string"&&Vt(De)===$e.replacedKey&&ln(De),Ir($e.order),$e.previewKey===null?Vr(null):$e.previewKey===ke&&Vr(xf(ae));const ft=[...rn.current.filter(ct=>Vt(ct)!==ke),xf(ae)];rn.current=ft,ue(ft),le(ae)},[ln,Ir,Vr]),et=M.useCallback(ae=>{const be=Or.current;be&&Vt(be)===Vt(ae)&&Vr(null)},[Vr]);M.useEffect(()=>{let ae=!1;const be=De=>{const $e=Or.current,ft=De.target;if(ft instanceof Element&&ft.closest("input, textarea, [contenteditable='true']")!==null){ae=!1;return}if($e&&Vt($e)===Vt(xr.current.rightTab)&&(De.metaKey||De.ctrlKey)&&!De.altKey&&!De.shiftKey&&De.key.toLowerCase()==="k"){De.preventDefault(),ae=!0;return}if(ae&&De.key==="Enter"){De.preventDefault(),ae=!1;const It=Or.current;It&&et(It);return}ae=!1},ke=()=>{ae=!1};return window.addEventListener("keydown",be),window.addEventListener("blur",ke),window.addEventListener("pointerdown",ke),()=>{window.removeEventListener("keydown",be),window.removeEventListener("blur",ke),window.removeEventListener("pointerdown",ke)}},[et]);const pt=M.useCallback((ae,be)=>{zn.current=!1;const ke=Vt(ae),De=Or.current;De&&Vt(De)===ke&&Vr(null);const $e=qct({order:Pn.current,previewKey:De?Vt(De):null},ke,rn.current.map(Vt));Ir($e.order);const ft=rn.current.filter(It=>Vt(It)!==ke);if(rn.current=ft,ue(ft),!be)return;const ct=$e.fallbackKey?ft.find(It=>Vt(It)===$e.fallbackKey):void 0;ct?le(ct):(mn(!1),xt(!1))},[Ir,Vr]),yr=M.useCallback(ae=>{ae!=="chat"&&(zn.current=!1),On(ae)},[]);xr.current={rightTab:xf(ne),tabHistory:ge,experimentsTabOpen:Ce,filesTabOpen:Le,artifactsTabOpen:Ve,expTabs:Be,fileTabs:zt,planTabs:kt,subagentTabs:je,codeTabs:st,contentTabOrder:Pn.current,previewTab:Or.current,filesView:pn,filesToggled:Nn,selectedRunId:ie,scope:F,panelOpen:br,panelMax:Xe};const wr=M.useCallback(ae=>{const be=js.current;if(be===ae)return;be&&ar.current.set(be,xr.current);let ke=ae?ar.current.get(ae):void 0;if(!ke){const De=ae===Nf&&a.current===!1&&!o.current;De&&(o.current=!0,Y(!0)),ke=K9(ae??void 0,De)}if(ae&&zn.current){zn.current=!1;const De="experiments";ke={...ke,rightTab:De,tabHistory:[...ke.tabHistory.filter($e=>Vt($e)!==Vt(De)),De],experimentsTabOpen:!0,panelOpen:!0}}le(ke.rightTab),rn.current=ke.tabHistory,ue(ke.tabHistory),Ee(ke.experimentsTabOpen),Pe(ke.filesTabOpen),ht(ke.artifactsTabOpen),wt(ke.expTabs),vt(ke.fileTabs),xe(ke.planTabs),We(ke.subagentTabs),nt(ke.codeTabs),Ir(ke.contentTabOrder),Vr(ke.previewTab),Dt(ke.filesView),Ut(ke.filesToggled),q(ke.selectedRunId),V(ke.scope),mn(ke.panelOpen),xt(ke.panelMax),js.current=ae,L(ae)},[Ir,Vr]),Wr=(r==null?void 0:r.onboardingCompleted)??!1,[Fn,jo]=M.useState(!1),vs=M.useCallback(()=>jo(!0),[]),as=M.useCallback(async()=>{const ae=await X7({tourCompleted:!0});s(be=>be&&{...be,tourCompleted:ae.tourCompleted}),jo(!1)},[]),Ms=M.useCallback(async()=>{await as(),en(!0)},[as]);M.useEffect(()=>{!_||!J_(_)||Ie||!Wr||r!=null&&r.tourCompleted||vs()},[_,Ie,Wr,vs,r==null?void 0:r.tourCompleted]);const Zt=(n==null?void 0:n.find(ae=>ae.id===_))??null;M.useEffect(()=>{const ae=Ie||l||r===null?null:Zt==null?void 0:Zt.name;document.title=ae?`${ka(ae)} - OpenResearch`:"OpenResearch"},[Ie,l,r,Zt]);const Ot=M.useRef(_);Ot.current=_;const Zs=M.useCallback(()=>{On("chat"),Ee(!0),or("experiments"),mn(!0),js.current||(zn.current=!0)},[or]),Bi=M.useCallback(()=>{c(null),t(null),s(null),Promise.allSettled([EYe(),zYe()]).then(([ae,be])=>{const ke=[];ae.status==="fulfilled"?(t(ae.value),f(De=>{var $e;return De&&ae.value.some(ft=>ft.id===De)?De:(($e=ae.value[0])==null?void 0:$e.id)??null})):ke.push(Pq()),be.status==="fulfilled"?(d.current=be.value.preferredAgent,s(be.value)):ke.push(tG()),ke.length>0&&c(iG({items:new Intl.ListFormat(N()).format(ke)}))})},[]);M.useEffect(()=>{Bi()},[Bi]);const Sr=M.useRef(Promise.resolve()),os=M.useRef(0),bs=M.useCallback(ae=>{const be=++os.current;s(De=>De&&{...De,preferredAgent:ae});const ke=Sr.current.then(()=>X7({preferredAgent:ae})).then(De=>{d.current=De.preferredAgent,be===os.current&&s($e=>$e&&{...$e,preferredAgent:De.preferredAgent})}).catch(De=>{throw be===os.current&&s($e=>$e&&{...$e,preferredAgent:d.current}),De});return Sr.current=ke.catch(()=>{}),ke},[]);M.useEffect(()=>{const ae=()=>Wn(be=>Math.min(be,Q0()));return window.addEventListener("resize",ae),()=>window.removeEventListener("resize",ae)},[]);const lr=M.useCallback(ae=>{C.current=!1,A.current.clear(),E.current.clear();const be=++j.current;Dx(ae).then(ke=>{if(Ot.current!==ae||y.current!==ae||j.current!==be)return;A.current=new Map(ke.map($e=>[$e.id,$e]));const De=[...E.current.values()].some($e=>{const ft=A.current.get($e.id);return!ft||ft.status!=="running"&&ft.updatedAt<=$e.updatedAt});E.current.clear();for(const $e of ke){const ft=v.current.get($e.id);(!ft||ft.updatedAt<$e.updatedAt)&&v.current.set($e.id,$e)}k($e=>{const ft=new Map(ke.map(ct=>[ct.id,ct]));for(const ct of $e){const It=ft.get(ct.id);(!It||It.updatedAt<=ct.updatedAt)&&ft.set(ct.id,ct)}return[...ft.values()]}),C.current=!0,De&&Zs()}).catch(()=>{j.current===be&&E.current.clear()})},[Zs]);M.useEffect(()=>{if(!_)return;const ae=js.current;ae&&ar.current.set(ae,xr.current),js.current=null,zn.current=!1,L(null),y.current=_,v.current.clear(),x.current.clear(),IYe(_).catch(()=>{}),g([]),k([]),I(null),q(null),wt([]),vt([]),Y(!1),xe([]),We([]),nt([]),Ir([]),Vr(null),Dt("files"),Ut(new Set),rn.current=[],ue([]),le("experiments"),Ee(!1),Pe(!1),ht(!1),mn(!1),xt(!1),V("project"),$Ye(_).then(g).catch(()=>{}),lr(_),J7(_).then(I).catch(()=>{})},[lr,_,Ir,Vr]);const Qs=M.useCallback(()=>{const ae=Ot.current;ae&&J7(ae).then(I).catch(()=>{})},[]),Dl=M.useCallback(()=>{Qs(),On("chat"),ht(!0),or("artifacts"),mn(!0)},[Qs,or]);TZe({onReconnect:()=>{const ae=Ot.current;ae&&(y.current=ae,v.current.clear(),x.current.clear(),lr(ae))},onRun:ae=>{if(ae.projectId!==Ot.current||ae.projectId!==y.current)return;const be=v.current.get(ae.id),ke=x.current.has(ae.id);if(be&&be.updatedAt>ae.updatedAt||(v.current.set(ae.id,ae),x.current.add(ae.id),k(ft=>wf(ft,ae)),ae.status!=="running"||(be==null?void 0:be.status)==="running"))return;const De=A.current.get(ae.id),$e=C.current&&(!De||De.status!=="running"&&De.updatedAt<=ae.updatedAt);ke&&be||$e?Zs():C.current||E.current.set(ae.id,ae)},onExperiment:ae=>{ae.projectId===Ot.current&&g(be=>wf(be,ae))},onProject:ae=>{t(be=>be?wf(be,ae):[ae])},onArtifacts:ae=>{ae===Ot.current&&Qs()}});const Ba=M.useCallback(()=>V("project"),[]),Br=M.useCallback((ae,be="overview",ke="preview")=>{const De={id:ae,view:be};wt($e=>$e.some(ft=>wb(ft,De))?$e:[...$e,De]),Cn(De,ke),mn(!0)},[Cn]),ls=M.useCallback((ae,be="preview")=>{const ke=b.current.filter($e=>$e.id===ae||$e.id.startsWith(ae)),De=ke.length===1?ke[0]:null;De&&(q(De.id),Br(De.experimentId,"terminal",be))},[Br]),Js=M.useMemo(()=>new Map(m.map(ae=>{var be;return[ae.id,((be=ae.title)==null?void 0:be.trim())||ae.slug||_o()]})),[m,e]),Kn=Y9(Js),$i=M.useMemo(()=>{const ae=new Map;for(const be of S)ae.set(be.id,Kn.get(be.experimentId)??_o());return ae},[Kn,S,e]),jn=Y9($i),bn=M.useCallback(ae=>{const be=jn.get(ae);if(be)return be;const ke=[...jn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[jn]),ei=M.useCallback(ae=>{const be=Kn.get(ae);if(be)return be;const ke=[...Kn].filter(([De])=>De.startsWith(ae));return ke.length===1?ke[0][1]:""},[Kn]),ra=M.useCallback((ae,be="preview")=>{const ke=T.current.filter(De=>De.id===ae||De.id.startsWith(ae));ke.length===1&&Br(ke[0].id,"overview",be)},[Br]),Lc=M.useCallback(ae=>{const be=Be.findIndex(ke=>wb(ke,ae));be!==-1&&(wt(ke=>ke.filter((De,$e)=>$e!==be)),pt(ae,Vt(ne)===Vt(ae)))},[Be,pt,ne]),cr=M.useCallback((ae,be="preview")=>{const ke=yD(ae);vt(De=>{const $e=De.findIndex(ct=>Su(ct,ae));if($e===-1)return[...De,ke];const ft=De.slice();return ft[$e]=ke,ft}),Cn(ae,be),mn(!0)},[Cn]),$a=M.useCallback((ae,be,ke,De,$e,ft)=>{const ct=n==null?void 0:n.find(Qr=>Qr.id===_),It=p4t(ae,ct==null?void 0:ct.repoPath,be,(ct==null?void 0:ct.artifactsDir)??(ct==null?void 0:ct.filesDir),ct==null?void 0:ct.slug);if(!It)return null;const Mn=$e?T.current.find(Qr=>Qr.id===$e||$e.length>=6&&Qr.id.startsWith($e)):void 0,$r=ke??(Mn==null?void 0:Mn.branchName),us=It.source==null||It.source==="repo";return $r&&us&&(It.ref=$r),ft&&!It.ref&&us&&(It.branchLabel=ft),De!=null&&(It.line=De,It.lineScrollRequest=++St.current),It},[n,_]),Ha=M.useCallback((ae,be,ke,De,$e,ft,ct="preview")=>{const It=$a(ae,be,ke,De,$e,ft);It&&cr(It,ct)},[cr,$a]),Pa=M.useCallback(ae=>cr({path:ae,source:"artifacts"},"keepOpen"),[cr]),Mo=M.useCallback((ae,be,ke,De,$e,ft="preview")=>{const ct=$a(ae,be,$e,ke,De);ct&&cr(ct,ft)},[cr,$a]),Rs=M.useCallback((ae,be)=>{et(ae),be()},[et]),Oc=M.useCallback(ae=>{const be=zt.findIndex(ke=>Su(ke,ae));be!==-1&&(vt(ke=>ke.filter((De,$e)=>$e!==be)),_&&Lt.current.delete(bf(_,$,ae)),$===Nf&&Su(ae,{path:Nb,source:"artifacts"})&&Y(!1),pt(ae,Vt(ne)===Vt(ae)))},[$,zt,pt,_,ne]),Fa=M.useCallback(ae=>{ae.lineScrollRequest!==void 0&&le(be=>typeof be!="object"||!("path"in be)||!Su(be,ae)||be.lineScrollRequest!==ae.lineScrollRequest?be:xf(be))},[]),xs=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"plan",sessionId:be,promptId:ke,plan:ae};xe(ft=>{const ct=ft.findIndex(Mn=>Mn.promptId===ke);if(ct===-1)return[...ft,$e];const It=ft.slice();return It[ct]=$e,It}),Cn($e,De),mn(!0)},[Cn]),rr=M.useCallback(ae=>{const be=kt.findIndex(ke=>ke.promptId===ae.promptId);be!==-1&&(xe(ke=>ke.filter((De,$e)=>$e!==be)),pt(ae,Vt(ne)===Vt(ae)))},[pt,kt,ne]),Ua=M.useCallback((ae,be,ke,De="preview")=>{const $e={kind:"subagent",sessionId:ae,spawnPartId:be,label:ke};We(ft=>ft.some(ct=>ct.spawnPartId===be)?ft:[...ft,$e]),Cn($e,De),mn(!0)},[Cn]),Yn=M.useCallback(ae=>{const be=je.findIndex(ke=>ke.spawnPartId===ae.spawnPartId);be!==-1&&(We(ke=>ke.filter((De,$e)=>$e!==be)),pt(ae,Vt(ne)===Vt(ae)))},[pt,ne,je]),[Ds,Ro]=M.useState({});M.useEffect(()=>{if(Ro(ct=>{const It=new Set(je.map(Mn=>Mn.spawnPartId));return Object.keys(ct).every(Mn=>It.has(Mn))?ct:Object.fromEntries(Object.entries(ct).filter(([Mn])=>It.has(Mn)))}),je.length===0)return;let ae=!0;const be=new Set,ke=(ct,It,Mn)=>{Ro($r=>{var Qr;let us=$r;for(const xi of It)if(!(Mn&&be.has(xi.spawnPartId)))for(const Ol of ct){const yi=f4(Ol.parts,xi.spawnPartId);if(!yi)continue;Mn||be.add(xi.spawnPartId);const Lo={label:Gft(yi),running:((Qr=yi.state)==null?void 0:Qr.status)==="running"},Oo=us[xi.spawnPartId];(!Oo||Oo.label!==Lo.label||Oo.running!==Lo.running)&&(us===$r&&(us={...$r}),us[xi.spawnPartId]=Lo);break}return us})};let De=0;const $e=()=>{const ct=++De;for(const It of new Set(je.map(Mn=>Mn.sessionId)))ju(It).then(({messages:Mn})=>{ae&&ct===De&&ke(Mn,je.filter($r=>$r.sessionId===It),!0)}).catch(()=>{})};$e();const ft=Ff(ct=>{if(ct.type==="reconnected"){be.clear(),$e();return}if(ct.type!=="message")return;const It=je.filter(Mn=>Mn.sessionId===ct.sessionId);It.length&&ke([ct.message],It,!1)});return()=>{ae=!1,ft()}},[je]);const qa=M.useCallback((ae,be,ke="files",De="preview")=>{const $e={code:!0,experimentId:ae,branch:be,view:ke,toggled:new Set};nt(ft=>ft.some(ct=>ku(ct,$e))?ft.map(ct=>ku(ct,$e)?{...ct,experimentId:ae,view:ke}:ct):[...ft,$e]),Cn($e,De),mn(!0)},[Cn]),Ls=M.useCallback((ae,be)=>{nt(ke=>ke.map(De=>ku(De,ae)?{...De,...be}:De))},[]),sa=M.useCallback(ae=>{const be=st.findIndex(ke=>ku(ke,ae));be!==-1&&(nt(ke=>ke.filter((De,$e)=>$e!==be)),pt(ae,Vt(ne)===Vt(ae)))},[st,pt,ne]),kr=M.useCallback(()=>{On("chat"),Pe(!0),or("files"),mn(!0)},[or]),ia=M.useCallback(ae=>{ae==="experiments"?Ee(!1):ae==="files"?Pe(!1):ht(!1),pt(ae,ne===ae)},[pt,ne]),aa=ae=>{ae.preventDefault(),ae.currentTarget.setPointerCapture(ae.pointerId);const ke=document.body.style.userSelect;document.body.style.userSelect="none";const De=Xe,$e=ae.clientX,ft=Vn;let ct=!1;function It(){window.removeEventListener("pointermove",Mn),window.removeEventListener("pointerup",It),window.removeEventListener("pointercancel",It),document.body.style.userSelect=ke}function Mn($r){if(De){const Ol=$r.clientX-$e;if(ct||OlQr+w4t){xt(!0);return}xt(!1);const xi=Math.min(Math.max(us,_h),Qr);Wn(xi);try{localStorage.setItem(dx,String(xi))}catch{}}window.addEventListener("pointermove",Mn),window.addEventListener("pointerup",It),window.addEventListener("pointercancel",It)},Os=(ae,be)=>{t(ke=>ke?wf(ke,ae):[ae]),f(ae.id),it(!1),be&&(is({projectId:ae.id,message:be}),yr("git"))},Ga=ae=>{t(be=>be&&be.filter(ke=>ke.id!==ae)),_===ae&&f(null)},Cr=typeof ne=="object"&&"id"in ne?ne:null,ur=typeof ne=="object"&&"path"in ne?ne:null,Hi=$===Nf&&H?zt.find(ae=>Su(ae,{path:Nb,source:"artifacts"})):void 0,bi=Hi?[Hi]:[],ys=typeof ne=="object"&&"kind"in ne&&ne.kind==="plan"?ne:null,xn=typeof ne=="object"&&"kind"in ne&&ne.kind==="subagent"?ne:null,Kr=typeof ne=="object"&&"code"in ne?ne:null,Er=Kr?st.find(ae=>ku(ae,Kr))??null:null,Is=new Map;for(const ae of[...Be,...zt,...kt,...je,...st])Is.set(Vt(ae),ae);const Ic=Hi?Vt(Hi):null,Do=Ht.filter(ae=>ae!==Ic).map(ae=>Is.get(ae)).filter(h4t),Pi=ae=>nn!==null&&Vt(nn)===Vt(ae),oa=ae=>h.jsx(hl,{active:ur!==null&&Su(ur,ae),label:ae.path.split("/").pop()||ae.path,icon:h.jsx(nN,{size:12,className:"shrink-0"}),preview:Pi(ae),onSelect:()=>or(ae),onPromote:()=>et(ae),onClose:()=>Oc(ae)},`file:${V4(ae)}`),ws=Cr?m.find(ae=>ae.id===Cr.id)??null:null,cs=Er?m.find(ae=>ae.id===Er.experimentId)??null:null,yd=ae=>{var ke,De;if("path"in ae)return oa(ae);if("id"in ae){const $e=m.find(ft=>ft.id===ae.id);return h.jsx(hl,{active:Cr!==null&&wb(Cr,ae),label:$e?$e.title||$e.slug:"…",icon:ae.view==="overview"?h.jsx(jWe,{size:12,className:"shrink-0"}):h.jsx(Yu,{size:12,className:"shrink-0"}),preview:Pi(ae),onSelect:()=>or(ae),onPromote:()=>et(ae),onClose:()=>Lc(ae)},Vt(ae))}if("kind"in ae&&ae.kind==="plan")return h.jsx(hl,{active:ys!==null&&ys.promptId===ae.promptId,label:aE(),icon:h.jsx(jx,{size:12,className:"shrink-0"}),preview:Pi(ae),onSelect:()=>or(ae),onPromote:()=>et(ae),onClose:()=>rr(ae)},Vt(ae));if("kind"in ae)return h.jsx(hl,{active:xn!==null&&xn.spawnPartId===ae.spawnPartId,label:((ke=Ds[ae.spawnPartId])==null?void 0:ke.label)??ae.label??cG(),shimmer:((De=Ds[ae.spawnPartId])==null?void 0:De.running)??!1,icon:h.jsx(Rx,{size:12,className:"shrink-0"}),preview:Pi(ae),onSelect:()=>or(ae),onPromote:()=>et(ae),onClose:()=>Yn(ae)},Vt(ae));const be=m.find($e=>$e.id===ae.experimentId);return h.jsx(hl,{active:Er!==null&&ku(Er,ae),label:(be==null?void 0:be.slug)??ae.branch,icon:h.jsx(Hf,{size:12,className:"shrink-0"}),preview:Pi(ae),onSelect:()=>or(ae),onPromote:()=>et(ae),onClose:()=>sa(ae)},Vt(ae))};if(l)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsxs("div",{className:W9,children:[h.jsx("p",{children:l}),h.jsx(Qe,{variant:"primary",onClick:Bi,children:Wu()})]})});if(n===null||r===null)return h.jsx("div",{className:"app flex flex-col h-full",children:h.jsx("div",{className:W9,children:h.jsx(dn,{})})});if(n.length===0)return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(jC,{}),Wr?h.jsx(IC,{projects:n,onOpen:f,onCreated:Os,onDeleted:Ga}):h.jsx(Cmt,{preferredAgent:r.preferredAgent,onDone:(ae,be)=>{Fdt(),d.current=be,t([ae]),f(ae.id),s(ke=>({...ke??{tourCompleted:!1},onboardingCompleted:!0,preferredAgent:be}))}})]});const Bc=h.jsx(Smt,{projectName:((Ll=n.find(ae=>ae.id===_))==null?void 0:Ll.name)??"",onHome:()=>it(!0),onNewProject:()=>en(!0),onRepository:()=>yr("git"),onCollapse:()=>rt(!1)});return h.jsxs("div",{className:"app flex flex-col h-full",children:[h.jsx(jC,{}),h.jsx(iut,{}),Ie?h.jsx(IC,{projects:n,onOpen:ae=>{f(ae),it(!1)},onCreated:Os,onDeleted:Ga}):h.jsxs("div",{className:"app-body flex flex-1 min-h-0 py-0 px-3.5",children:[_&&h.jsx(rht,{projectId:_,projectName:(Zt==null?void 0:Zt.name)??"",railHeader:Bc,railOpen:Et,onShowRail:()=>rt(!0),mainView:jt,onSelectMainView:yr,experimentsActive:jt==="chat"&&br&&ne==="experiments",filesActive:jt==="chat"&&br&&ne==="files",artifactsActive:jt==="chat"&&br&&ne==="artifacts",onOpenExperiments:Zs,onOpenArtifacts:Dl,onOpenFile:Mo,onOpenRun:ls,runExperimentName:bn,onOpenExperiment:ra,experimentName:ei,onOpenPlan:xs,onOpenSubagent:Ua,onOpenWorktree:kr,composerPrefill:Zt&&J_(Zt.id)&&(r==null?void 0:r.tourCompleted)===!1?kYe:null,onOpenDemoWelcome:Zt&&J_(Zt.id)?vs:void 0,onActiveSessionChange:wr,preferredAgent:r.preferredAgent,onPreferredAgentChange:bs,children:jt==="skills"?h.jsx(emt,{}):jt!=="chat"?h.jsx(Ndt,{tab:jt,project:Zt,githubPublicationError:_r&&_r.projectId===(Zt==null?void 0:Zt.id)?_r.message:null,onProjectUpdate:ae=>{t(be=>be?wf(be,ae):[ae]),ae.githubEnabled&&is(null)},onSelectTab:yr}):null}),jt==="chat"&&br&&h.jsxs("aside",{className:`right-pane relative shrink-0 min-w-0 flex flex-col mt-5 me-0 mb-5 ms-3.5 bg-canvas [&.max]:fixed [&.max]:inset-2.5 [&.max]:m-0 [&.max]:z-60 [&.max]:shadow-panel-max border border-border rounded-lg overflow-hidden shadow-elevated ${Xe?"max":""}`,style:Xe?void 0:{width:Vn},"data-onboarding":"experiments",children:[h.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 ${Xe?"cursor-e-resize":"cursor-col-resize"}`,title:Xe?JU():YU(),onPointerDown:aa}),h.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:[h.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:[bi.map(oa),Le&&h.jsx(hl,{active:ne==="files",label:yq(),icon:h.jsx(Hf,{size:12,className:"shrink-0"}),onSelect:()=>or("files"),onClose:()=>ia("files")}),Ve&&h.jsx(hl,{active:ne==="artifacts",label:$U(),icon:h.jsx(zx,{size:12,className:"shrink-0"}),onSelect:()=>or("artifacts"),onClose:()=>ia("artifacts")}),Ce&&h.jsx(hl,{active:ne==="experiments",label:gq(),icon:h.jsx(Ex,{size:12,className:"shrink-0"}),onSelect:()=>or("experiments"),onClose:()=>ia("experiments")}),Do.map(yd)]}),h.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[h.jsx(Jt,{title:Xe?j6():T6(),"aria-label":Xe?j6():T6(),onClick:()=>xt(ae=>!ae),children:Xe?h.jsx($Ke,{size:14}):h.jsx(OKe,{size:14})}),h.jsx(Jt,{title:N6(),"aria-label":N6(),onClick:()=>{zn.current=!1,mn(!1),xt(!1)},children:h.jsx(_s,{size:14})})]})]}),ne==="artifacts"?h.jsx(ho,{children:Zt&&h.jsx(Vpt,{project:Zt,artifacts:D,onChanged:Qs,onOpenFile:Pa,onOpenStorage:()=>yr("storage")},Zt.id)}):ne==="experiments"?h.jsxs(ho,{children:[h.jsxs("div",{className:"pane-toolbar flex shrink-0 flex-wrap items-center gap-2 bg-background px-3 pt-2.5 pb-2",children:[h.jsx("span",{className:"flex-1"}),h.jsxs("div",{className:"experiments-toolbar-controls inline-flex items-center gap-[5px]",children:[h.jsxs("div",{className:"option-picker relative inline-flex",ref:J,children:[h.jsx(Jt,{size:"small",ref:X,className:"experiment-scope-trigger",active:ee==="agent",title:cq({scope:ee==="agent"?z6():A6()}),"aria-label":Cq(),"aria-expanded":W,onClick:()=>Z(ae=>!ae),children:h.jsx(gKe,{size:16,strokeWidth:2.5})}),W&&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 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:[h.jsxs(Zr,{"aria-pressed":ee==="agent",disabled:!$||!G,title:$?G?void 0:Aq():Iq(),onClick:()=>{V("agent"),Z(!1)},children:[h.jsx("span",{children:z6()}),ee==="agent"&&h.jsx(Ys,{size:13})]}),h.jsxs(Zr,{"aria-pressed":ee==="project",onClick:()=>{V("project"),Z(!1)},children:[h.jsx("span",{children:A6()}),ee==="project"&&h.jsx(Ys,{size:13})]})]})]}),h.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":hq(),children:[h.jsx("button",{className:P==="table"?"active":"","aria-pressed":P==="table",onClick:()=>B("table"),children:hG()}),h.jsx("button",{className:P==="tree"?"active":"","aria-pressed":P==="tree",onClick:()=>B("tree"),children:gG()})]})]})]}),h.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:P==="tree"?Zt&&h.jsx(f4t,{experiments:m,runs:he,project:Zt,onOpenView:Br,onOpenCode:qa,agentSessionId:ee==="agent"?$:null,onShowProjectScope:Ba}):h.jsx(Omt,{runs:he,emptyHint:ee==="agent"&&m.length>0?Rq():void 0,experiments:oe,onOpen:(ae,be)=>{Br(ae.id,"overview",be)},onOpenLogs:(ae,be,ke)=>{q(be),Br(ae,"terminal",ke)},onOpenCode:(ae,be)=>{const ke=m.find(De=>De.id===ae);ke&&qa(ke.id,ke.branchName,"files",be)},onCancel:_N})})]}):ne==="files"?h.jsx(ho,{children:Zt?h.jsx(Lpt,{sessionId:$??void 0,project:Zt,view:pn,toggled:Nn,onViewChange:Dt,onToggledChange:Ut,onOpenFile:(ae,be,ke,De)=>Ha(ae,be,ke,void 0,void 0,void 0,De)},`files:${$??`project:${Zt.id}`}`):h.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:h.jsx(Pu,{children:h.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:[h.jsx(rN,{size:22}),h.jsx("p",{children:Zq()})]})})})}):ur?h.jsx(ho,{children:_&&h.jsx(wmt,{projectId:_,path:ur.path,source:ur.source,sessionId:ur.source==="artifacts"?$??void 0:ur.sessionId,gitRef:ur.ref,line:ur.line,branchLabel:m4t(ur,Zt==null?void 0:Zt.baselineBranch),onOpenFile:(ae,be,ke,De)=>Rs(ur,()=>Ha(ae,be,ke,void 0,void 0,void 0,De)),scrollPosition:Lt.current.get(bf(_,$,ur)),onScrollPositionChange:ae=>{Lt.current.set(bf(_,$,ur),ae)},lineScrollRequest:ur.lineScrollRequest,onLineScrollRequestHandled:()=>Fa(ur),onEdit:()=>et(ur)},bf(_,$,ur))}):ys?h.jsx(ho,{children:h.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:h.jsx(Na,{text:ys.plan,onOpenFile:(ae,be,ke,De,$e)=>Rs(ys,()=>Ha(ae,ys.sessionId,De,be,ke,void 0,$e))})})}):xn?h.jsx(sht,{sessionId:xn.sessionId,spawnPartId:xn.spawnPartId,onOpenFile:(ae,be,ke,De,$e)=>Rs(xn,()=>Mo(ae,xn.sessionId,be,ke,De,$e)),onOpenRun:(ae,be)=>Rs(xn,()=>ls(ae,be)),runExperimentName:bn,onOpenExperiment:(ae,be)=>Rs(xn,()=>ra(ae,be)),experimentName:ei,onOpenSubagent:(ae,be,ke)=>Rs(xn,()=>Ua(xn.sessionId,ae,be,ke))},xn.spawnPartId):Er?h.jsx(ho,{children:_&&Zt&&Er&&cs&&h.jsx(Rpt,{projectId:_,project:Zt,experiment:cs,view:Er.view,toggled:Er.toggled,onViewChange:ae=>Ls(Er,{view:ae}),onToggledChange:ae=>Ls(Er,{toggled:ae}),onOpenFile:(ae,be,ke,De)=>Rs(Er,()=>Ha(ae,be,ke,void 0,void 0,cs.branchName,De))},`code:${Er.branch}`)}):h.jsx(ho,{children:Cr&&ws&&Zt&&h.jsx(imt,{experiment:ws,project:Zt,view:Cr.view,runs:S,selectedRunId:ie,onSelectRun:q,parentExperiment:m.find(ae=>ae.id===ws.parentExperimentId)??null,onOpenView:(ae,be,ke)=>{be&&q(be),Rs(Cr,()=>Br(ws.id,ae,ke))},onOpenCode:(ae,be)=>Rs(Cr,()=>qa(ws.id,ws.branchName,ae,be))},`${Cr.id}:${Cr.view}`)})]})]}),qt&&h.jsx(RM,{onClose:()=>en(!1),onCreated:(ae,be)=>{en(!1),Os(ae,be)}}),Fn&&!Ie&&Zt&&J_(Zt.id)&&h.jsx(Imt,{onClose:as,onCreateProject:Ms})]})}const E4t=N();document.documentElement.lang=E4t;document.documentElement.dir="ltr";QL.createRoot(document.getElementById("root")).render(h.jsxs(M.StrictMode,{children:[h.jsx(C4t,{}),h.jsx(RJe,{})]})); diff --git a/ui/dist/index.html b/ui/dist/index.html index 7e92cdc3..59dde0d4 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/en.json b/ui/messages/en.json index 1937f8b1..0d52d525 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -1043,6 +1043,7 @@ "tasks_all_done": "All tasks done", "tasks_show_list": "Show task list", "tasks_hide_list": "Hide task list", + "progress_step": "Step {count}", "activity_updated_tasks": "Updated tasks ({done} of {total} done)", "activity_updating_tasks": "Updating tasks", "activity_update_tasks": "Update tasks", diff --git a/ui/messages/fa.json b/ui/messages/fa.json index fb3f1445..016fb379 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -1043,6 +1043,7 @@ "tasks_all_done": "همهٔ کارها انجام شد", "tasks_show_list": "نمایش فهرست کارها", "tasks_hide_list": "پنهان کردن فهرست کارها", + "progress_step": "گام {count}", "activity_updated_tasks": "کارها به‌روز شد ({done} از {total} انجام شد)", "activity_updating_tasks": "در حال به‌روزرسانی کارها", "activity_update_tasks": "به‌روزرسانی کارها", diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index fe1d37d4..19a72f9b 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -1043,6 +1043,7 @@ "tasks_all_done": "所有任务已完成", "tasks_show_list": "显示任务列表", "tasks_hide_list": "隐藏任务列表", + "progress_step": "第 {count} 步", "activity_updated_tasks": "已更新任务(已完成 {done}/{total})", "activity_updating_tasks": "正在更新任务", "activity_update_tasks": "更新任务", diff --git a/ui/src/components/ChatPanel.tsx b/ui/src/components/ChatPanel.tsx index 751e981f..2196da20 100644 --- a/ui/src/components/ChatPanel.tsx +++ b/ui/src/components/ChatPanel.tsx @@ -111,12 +111,22 @@ import { shellWrapperBody, unwrapShellBody, } from "../orxCommand"; -import { activeTurnTaskList, isTaskListTool, lastTaskList, parseTaskList, toolBaseName, toolSegments } from "../taskProgress"; +import { + activeTurnTaskList, + isTaskListTool, + lastTaskList, + parseTaskList, + priorTaskLists, + type TaskList, + toolBaseName, + toolSegments, +} from "../taskProgress"; +import { type OutlineStep, turnOutline } from "../turnOutline"; import { LitSourceLogo, parseOrxLit, paperUrl } from "./LitSourceLogo"; import { LitSourcesList } from "./LitSourcesPicker"; import { Md } from "./Md"; import { PlanStrip } from "./PlanStrip"; -import { TaskListCard, TaskStrip } from "./TaskList"; +import { ProgressStrip, TaskListCard, TaskStrip } from "./TaskList"; import { SETTINGS_NAV, type SettingsTab } from "./SettingsPage"; import { SkillMenu } from "./SkillMenu"; import { ComposerSkillChips, MessageWithChips } from "./SkillChips"; @@ -3083,6 +3093,7 @@ const Message = memo(function Message({ onRecover, skills, predictTextTail = false, + priorTasks = null, forkCount, forkIndex = 0, forkPrevId, @@ -3112,6 +3123,8 @@ const Message = memo(function Message({ /** Known slash-skills, for rendering a `/name` token as a command chip. */ skills?: SkillInfo[]; predictTextTail?: boolean; + /** The task list as it stood before this message; incremental calls build on it. */ + priorTasks?: TaskList | null; /** Set only on a user message, the one bearer of the fork controls. */ forkCount?: number; forkIndex?: number; @@ -3255,6 +3268,7 @@ const Message = memo(function Message({ onOpenPlan, onOpenSubagent, predictTextTail, + priorTasks, })} {turnStatus && ( void; onOpenSubagent?: OpenSubagent; predictTextTail?: boolean; + priorTasks?: TaskList | null; }, ): React.ReactNode[] { const { @@ -3304,6 +3319,7 @@ function renderParts( onOpenPlan, onOpenSubagent, predictTextTail = false, + priorTasks = null, } = opts; // A steer never becomes the tail — the streaming caret belongs on the // assistant text it interrupted. @@ -3314,7 +3330,7 @@ function renderParts( // Only the newest task-list update renders (as the checklist card); earlier // ones are superseded bookkeeping and paint nothing. A failed write stays // an ordinary error row. - const taskCard = lastTaskList(parts); + const taskCard = lastTaskList(parts, priorTasks); let toolRun: ChatPart[] = []; const flushTools = () => { if (toolRun.length === 0) return; @@ -3773,6 +3789,7 @@ const Transcript = memo(function Transcript({ return forkPositions(allMessages, messages, bearers, (id) => id.startsWith(LOCAL_PREFIX)); }, [messages, visibleMessages, allMessages]); const activeMessage = visibleMessages.at(-1); + const priorTasks = useMemo(() => priorTaskLists(messages), [messages]); const transcriptAnnouncement = useTranscriptAnnouncement(messages); const pendingTailTool = busy ? streamTailTool(messages) : null; return ( @@ -3814,6 +3831,7 @@ const Transcript = memo(function Transcript({ onRecover={onRecover} skills={skills} predictTextTail={busy && m === activeMessage && m.role === "assistant"} + priorTasks={priorTasks.get(m.id) ?? null} /> ); })} @@ -4964,6 +4982,17 @@ export function ChatPanel({ // The running turn's task list, docked so the current step stays in view // as the transcript scrolls. const liveTasks = useMemo(() => (busy ? activeTurnTaskList(messages) : null), [messages, busy]); + // Without a task list, the turn's own phases stand in for it. + const liveOutline = useMemo(() => { + const tail = messages.at(-1); + if (!busy || liveTasks || tail?.role !== "assistant") return null; + const steps = turnOutline(tail.parts); + return steps.length > 0 ? steps : null; + }, [messages, busy, liveTasks]); + const describeOutlineStep = useCallback( + (step: OutlineStep) => (step.toolParts.length > 0 ? toolGroupSummary(squashToolParts(step.toolParts)) : ""), + [], + ); // The newest ANSWERABLE unresolved question card's part id: typed composer // text answers IT as a custom answer, instead of racing the held turn with @@ -6032,6 +6061,7 @@ export function ChatPanel({ the interim ("Waiting for your input…" for a beat until the old card's resolve broadcast lands, then Working…). */} {liveTasks && !pendingPlan && } + {liveOutline && !pendingPlan && } {pendingPlan && !(revisingPlan && pendingPlan.promptId === revisingPlan.promptId) && ( 0 ? Math.round((list.done / list.total) * 100) : 0; return ( -
+
-
-
-
- {open && ( -
- -
- )} + {bar} + {open &&
{children}
}
); } + +/** Docked while a turn runs: the current step and a progress bar stay in + * view as the transcript scrolls; the full list expands on demand. */ +export function TaskStrip({ list }: { list: TaskList }) { + const headline = list.current + ? list.current.activeText ?? list.current.text + : taskAllDone(list) + ? m.tasks_all_done() + : m.tasks_title(); + const pct = list.total > 0 ? Math.round((list.done / list.total) * 100) : 0; + return ( + +
+
+ } + > + +
+ ); +} + +/** Docked fallback when the agent keeps no task list: the turn's own phases, + * read off its narration, with the tool activity each one produced. */ +export function ProgressStrip({ steps, describe }: { steps: OutlineStep[]; describe: (step: OutlineStep) => string }) { + const current = steps.at(-1); + if (!current) return null; + return ( + +
    + {steps.map((step) => { + const detail = describe(step); + return ( +
  1. + + + {step.label || detail || m.chat_working()} + {step.label && detail && · {detail}} + +
  2. + ); + })} +
+
+ ); +} diff --git a/ui/src/taskProgress.ts b/ui/src/taskProgress.ts index 7d51d971..736d1555 100644 --- a/ui/src/taskProgress.ts +++ b/ui/src/taskProgress.ts @@ -6,6 +6,8 @@ export interface TaskItem { text: string; status: TaskStatus; activeText?: string; + /** Claude Code task number, the key its TaskUpdate calls address. */ + id?: string; } export type TaskStatus = "pending" | "in_progress" | "completed" | "cancelled"; @@ -28,42 +30,40 @@ export function toolBaseName(tool: string): string { return toolSegments(tool).at(-1) ?? tool.toLowerCase(); } -// Claude Code `TodoWrite`, OpenCode `todowrite`, Codex `update_plan`. +// Whole-list writes: OpenCode `todowrite`, Claude Code's legacy `TodoWrite`, +// Codex `update_plan`. Incremental: Claude Code's TaskCreate / TaskUpdate / +// TaskList, folded in order (TaskGet is a read, hidden like the others). +const WHOLE_LIST_TOOLS = new Set(["todowrite", "update_plan"]); +const INCREMENTAL_TOOLS = new Set(["taskcreate", "taskupdate", "tasklist", "taskget"]); + export function isTaskListTool(tool: string | undefined): boolean { if (!tool) return false; const base = toolBaseName(tool); - return base === "todowrite" || base === "update_plan"; + return WHOLE_LIST_TOOLS.has(base) || INCREMENTAL_TOOLS.has(base); } -function taskStatus(raw: unknown): TaskStatus { +function taskStatus(raw: unknown): TaskStatus | null { const status = typeof raw === "string" ? raw.toLowerCase() : ""; if (status === "in_progress" || status === "inprogress") return "in_progress"; if (status === "completed") return "completed"; if (status === "cancelled") return "cancelled"; - return "pending"; + if (status === "pending") return "pending"; + return null; +} + +function optionalText(value: unknown): string | undefined { + return typeof value === "string" && value.trim() !== "" ? value.trim() : undefined; } function taskItem(raw: unknown): TaskItem | null { if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null; const record = Object.fromEntries(Object.entries(raw)); - const text = [record.content, record.step].find( - (value): value is string => typeof value === "string" && value.trim() !== "", - ); + const text = optionalText(record.content) ?? optionalText(record.step); if (!text) return null; - const activeText = typeof record.activeForm === "string" && record.activeForm.trim() !== "" - ? record.activeForm.trim() - : undefined; - return { text: text.trim(), status: taskStatus(record.status), activeText }; + return { text, status: taskStatus(record.status) ?? "pending", activeText: optionalText(record.activeForm) }; } -/** The task list a tool call carries; null for other tools, empty lists, and - * failed writes (a denied `TodoWrite` never became the agent's list). */ -export function parseTaskList(part: ChatPart): TaskList | null { - if (part.type !== "tool" || !isTaskListTool(part.tool) || part.state?.status === "error") return null; - const input = part.state?.input ?? {}; - const raw = [input.todos, input.plan].find(Array.isArray); - if (!raw) return null; - const items = raw.map(taskItem).filter((item): item is TaskItem => item !== null); +function toTaskList(items: TaskItem[]): TaskList | null { if (items.length === 0) return null; return { items, @@ -73,12 +73,102 @@ export function parseTaskList(part: ChatPart): TaskList | null { }; } -/** The last task-list part among `parts` — the one whose state is current; - * earlier updates are superseded. */ -export function lastTaskList(parts: ChatPart[]): { id: string; list: TaskList } | null { +/** The task list a whole-list tool call carries; null for other tools, empty + * lists, and failed writes (a denied write never became the agent's list). */ +export function parseTaskList(part: ChatPart): TaskList | null { + if (part.type !== "tool" || !part.tool || !WHOLE_LIST_TOOLS.has(toolBaseName(part.tool))) return null; + if (part.state?.status === "error") return null; + const input = part.state?.input ?? {}; + const raw = [input.todos, input.plan].find(Array.isArray); + if (!raw) return null; + return toTaskList(raw.map(taskItem).filter((item): item is TaskItem => item !== null)); +} + +// TaskCreate's result: "Task #3 created successfully: …". +const TASK_NUMBER = /#(\d+)/; +// TaskList's lines: "#3 [completed] Inspect the loader (owner) [blocked by #1]". +const TASK_LINE = /^#(\d+)\s+\[([^\]]+)\]\s+(.+?)(?:\s+\([^)]*\))?(?:\s+\[blocked by[^\]]*\])?$/; + +function nextTaskId(items: TaskItem[]): string { + return String(items.reduce((max, item) => Math.max(max, Number(item.id) || 0), 0) + 1); +} + +function applyIncremental(items: TaskItem[], base: string, part: ChatPart): TaskItem[] { + const input = part.state?.input ?? {}; + const output = part.state?.output ?? ""; + switch (base) { + case "taskcreate": { + const text = optionalText(input.subject) ?? optionalText(input.description); + if (!text) return items; + // The id arrives with the result; until then the harness's own rule + // (highest id + 1) predicts it. + const id = TASK_NUMBER.exec(output)?.[1] ?? nextTaskId(items); + const item: TaskItem = { id, text, status: "pending", activeText: optionalText(input.activeForm) }; + return [...items.filter((existing) => existing.id !== id), item]; + } + case "taskupdate": { + const id = typeof input.taskId === "string" || typeof input.taskId === "number" ? String(input.taskId) : null; + if (!id) return items; + if (typeof input.status === "string" && input.status.toLowerCase() === "deleted") { + return items.filter((existing) => existing.id !== id); + } + return items.map((existing) => + existing.id === id + ? { + ...existing, + status: taskStatus(input.status) ?? existing.status, + text: optionalText(input.subject) ?? existing.text, + activeText: optionalText(input.activeForm) ?? existing.activeText, + } + : existing, + ); + } + case "tasklist": { + // The harness's own listing is authoritative when it parses. + if (/^No tasks found/i.test(output.trim())) return []; + const listed = output.split("\n").flatMap((line) => { + const match = TASK_LINE.exec(line.trim()); + const status = match ? taskStatus(match[2]) : null; + if (!match || !status) return []; + const prior = items.find((existing) => existing.id === match[1]); + return [{ id: match[1], text: match[3], status, activeText: prior?.activeText }]; + }); + return listed.length > 0 ? listed : items; + } + default: + return items; + } +} + +/** Fold every task-list call in `parts` onto `prior` (the list as it stood + * before this message). Failed calls are skipped; a message without task + * calls returns `prior` itself, so memoized consumers see a stable value. */ +export function foldTaskList(parts: ChatPart[], prior: TaskList | null): TaskList | null { + let items = prior?.items ?? []; + let touched = false; + for (const part of parts) { + if (part.type !== "tool" || !part.tool || part.state?.status === "error") continue; + const base = toolBaseName(part.tool); + if (WHOLE_LIST_TOOLS.has(base)) { + const list = parseTaskList(part); + if (list) items = list.items; + touched = touched || list !== null; + } else if (INCREMENTAL_TOOLS.has(base)) { + items = applyIncremental(items, base, part); + touched = true; + } + } + return touched ? toTaskList(items) : prior; +} + +/** The card anchor for a message: its last successful task-list call, with + * the list as it stands after the whole message. Earlier calls are superseded. */ +export function lastTaskList(parts: ChatPart[], prior: TaskList | null): { id: string; list: TaskList } | null { for (let index = parts.length - 1; index >= 0; index--) { - const list = parseTaskList(parts[index]); - if (list) return { id: parts[index].id, list }; + const part = parts[index]; + if (part.type !== "tool" || !isTaskListTool(part.tool) || part.state?.status === "error") continue; + const list = foldTaskList(parts, prior); + return list ? { id: part.id, list } : null; } return null; } @@ -87,9 +177,25 @@ export function taskAllDone(list: TaskList): boolean { return list.total > 0 && list.done === list.total; } -/** The running turn's task list: the newest one in the tail assistant - * message. Earlier turns' lists are history, not live progress. */ +/** For each assistant message on the branch that touches the task list, the + * list as it stood before it — what its incremental calls build on. Other + * messages are absent (null), keeping their memoized render untouched. */ +export function priorTaskLists(messages: ChatMessage[]): Map { + const priors = new Map(); + let list: TaskList | null = null; + for (const message of messages) { + if (message.role !== "assistant") continue; + const next = foldTaskList(message.parts, list); + if (next !== list) priors.set(message.id, list); + list = next; + } + return priors; +} + +/** The running turn's task list: the tail assistant message's list, shown + * only when that turn touched the list. Earlier turns' lists are history. */ export function activeTurnTaskList(messages: ChatMessage[]): TaskList | null { const message = messages.at(-1); - return message?.role === "assistant" ? lastTaskList(message.parts)?.list ?? null : null; + if (message?.role !== "assistant") return null; + return lastTaskList(message.parts, priorTaskLists(messages).get(message.id) ?? null)?.list ?? null; } diff --git a/ui/src/turnOutline.ts b/ui/src/turnOutline.ts new file mode 100644 index 00000000..2aa07c75 --- /dev/null +++ b/ui/src/turnOutline.ts @@ -0,0 +1,55 @@ +import type { ChatPart } from "./api"; +import { isTurnStatusPart, partIsVisible } from "./chatRendering.ts"; +import { isTaskListTool } from "./taskProgress.ts"; + +/** One phase of a running turn: the agent's narration that opened it and the + * tool calls that followed. */ +export interface OutlineStep { + id: string; + label: string; + toolParts: ChatPart[]; + done: boolean; +} + +const LABEL_LIMIT = 110; +// A sentence this short ("Clean tree.") says little on its own — take the next one too. +const TERSE_SENTENCE = 30; + +/** Leading sentence(s) of a narration paragraph, stripped of markdown markers + * and clipped for a one-line strip. */ +export function stepLabel(text: string): string { + const flat = text + .replace(/```[\s\S]*?(```|$)/g, " ") + .replace(/<(file|run)\b[^>]*\bpath="([^"]*)"[^>]*\/?>/g, "$2") + .replace(/<(file|run)\b[^>]*\/?>/g, "") + .replace(/^\s*(?:#+|[-*]|\d+[.)])\s+/, "") + .replace(/\*\*|__|[`#]+/g, "") + .replace(/\s+/g, " ") + .trim(); + // Sentence breaks need a few letters before the stop, so "e.g." and "1." don't end one. + const sentences = flat.split(/(?<=[a-z]{3}[.!?])\s+(?=\S)/i); + let label = sentences[0] ?? ""; + if (label.length < TERSE_SENTENCE && sentences[1]) label = `${label} ${sentences[1]}`; + return label.length > LABEL_LIMIT ? `${label.slice(0, LABEL_LIMIT - 1).trimEnd()}…` : label; +} + +/** Phases of a running assistant message, in order: every phase but the last + * is finished, the last is what the agent is doing now. */ +export function turnOutline(parts: ChatPart[]): OutlineStep[] { + const steps: OutlineStep[] = []; + for (const part of parts) { + if (isTurnStatusPart(part) || !partIsVisible(part)) continue; + if (part.type === "text") { + const label = stepLabel(part.text ?? ""); + if (label) steps.push({ id: part.id, label, toolParts: [], done: true }); + continue; + } + if (part.type !== "tool" || isTaskListTool(part.tool)) continue; + const current = steps.at(-1); + if (current) current.toolParts.push(part); + else steps.push({ id: part.id, label: "", toolParts: [part], done: true }); + } + const last = steps.at(-1); + if (last) last.done = false; + return steps; +} diff --git a/ui/tests/taskProgress.test.mjs b/ui/tests/taskProgress.test.mjs index 56111ef1..482734aa 100644 --- a/ui/tests/taskProgress.test.mjs +++ b/ui/tests/taskProgress.test.mjs @@ -2,28 +2,29 @@ import assert from "node:assert/strict"; import test from "node:test"; import { activeTurnTaskList, + foldTaskList, isTaskListTool, lastTaskList, parseTaskList, + priorTaskLists, taskAllDone, toolBaseName, } from "../src/taskProgress.ts"; -const tool = (id, name, input, status = "completed") => ({ id, type: "tool", tool: name, state: { status, input } }); +const tool = (id, name, input, status = "completed", output) => ({ id, type: "tool", tool: name, state: { status, input, output } }); const message = (id, role, ...parts) => ({ id, role, parts, createdAt: 0 }); -test("recognizes each harness's task-list tool by base name", () => { +test("recognizes each harness's task-list tools by base name", () => { assert.equal(toolBaseName("mcp__planner__update_plan"), "update_plan"); - assert.equal(isTaskListTool("TodoWrite"), true); - assert.equal(isTaskListTool("todowrite"), true); - assert.equal(isTaskListTool("update_plan"), true); - assert.equal(isTaskListTool("mcp__planner__update_plan"), true); + for (const name of ["TodoWrite", "todowrite", "update_plan", "TaskCreate", "TaskUpdate", "TaskList", "TaskGet"]) { + assert.equal(isTaskListTool(name), true, name); + } assert.equal(isTaskListTool("todoread"), false); - assert.equal(isTaskListTool("Bash"), false); + assert.equal(isTaskListTool("Task"), false); assert.equal(isTaskListTool(undefined), false); }); -test("parses Claude Code TodoWrite input with active forms", () => { +test("parses a whole-list TodoWrite with active forms", () => { const list = parseTaskList(tool("t1", "TodoWrite", { todos: [ { content: "Read the config", status: "completed", activeForm: "Reading the config" }, @@ -50,7 +51,6 @@ test("parses Codex update_plan steps with camel-case statuses", () => { { step: "Patch the loader", status: "inProgress" }, { step: "Verify", status: "pending" }, ], - explanation: "Starting the fix", })); assert.equal(plan.done, 1); assert.equal(plan.total, 3); @@ -68,10 +68,8 @@ test("cancelled OpenCode todos are listed but leave the count", () => { assert.deepEqual(list.items.map((item) => item.status), ["completed", "cancelled"]); assert.equal(list.done, 1); assert.equal(list.total, 1); - assert.equal(list.current, null); assert.equal(taskAllDone(list), true); - const abandoned = parseTaskList(tool("x", "todowrite", { todos: [{ content: "Drop", status: "cancelled" }] })); - assert.equal(taskAllDone(abandoned), false); + assert.equal(taskAllDone(parseTaskList(tool("x", "todowrite", { todos: [{ content: "Drop", status: "cancelled" }] }))), false); }); test("non-task tools, empty lists, and failed writes parse as null", () => { @@ -82,20 +80,70 @@ test("non-task tools, empty lists, and failed writes parse as null", () => { assert.equal(parseTaskList({ id: "x", type: "text", text: "TodoWrite" }), null); }); -test("the last parsable task-list part in a message is the current one", () => { - const first = tool("t1", "TodoWrite", { todos: [{ content: "a", status: "pending" }] }); - const second = tool("t2", "TodoWrite", { todos: [{ content: "a", status: "completed" }] }); - const denied = tool("t3", "TodoWrite", { todos: [{ content: "a", status: "pending" }] }, "error"); - const bash = tool("b", "Bash", { command: "ls" }); - assert.equal(lastTaskList([first, bash, second, bash, denied]).id, "t2"); - assert.equal(lastTaskList([first, bash, second, bash, denied]).list.done, 1); - assert.equal(lastTaskList([bash]), null); +test("folds Claude Code TaskCreate / TaskUpdate / TaskList calls in order", () => { + const parts = [ + tool("c1", "TaskCreate", { subject: "Inspect loader", description: "…", activeForm: "Inspecting loader" }, "completed", "Task #1 created successfully: Inspect loader"), + tool("c2", "TaskCreate", { subject: "Run tests", activeForm: "Running tests" }, "running"), + tool("u1", "TaskUpdate", { taskId: "1", status: "in_progress" }, "completed", "Updated task #1 status"), + tool("bash", "Bash", { command: "ls" }), + tool("u2", "TaskUpdate", { taskId: 1, status: "completed" }, "completed", "Updated task #1 status"), + tool("u3", "TaskUpdate", { taskId: "9", status: "completed" }, "completed"), + tool("denied", "TaskUpdate", { taskId: "2", status: "completed" }, "error"), + tool("g", "TaskGet", { taskId: "1" }, "completed", "#1 ..."), + ]; + const list = foldTaskList(parts, null); + assert.deepEqual(list.items, [ + { id: "1", text: "Inspect loader", status: "completed", activeText: "Inspecting loader" }, + { id: "2", text: "Run tests", status: "pending", activeText: "Running tests" }, + ]); + assert.equal(list.done, 1); + assert.equal(list.total, 2); + + const listed = foldTaskList([ + ...parts, + tool("l", "TaskList", {}, "completed", "#1 [completed] Inspect loader (worker) [blocked by #2]\n#2 [in_progress] Run tests"), + ], null); + assert.deepEqual(listed.items.map((item) => [item.id, item.text, item.status, item.activeText]), [ + ["1", "Inspect loader", "completed", "Inspecting loader"], + ["2", "Run tests", "in_progress", "Running tests"], + ]); + assert.equal(foldTaskList([...parts, tool("l", "TaskList", {}, "completed", "No tasks found")], null), null); + + const deleted = foldTaskList([...parts, tool("d", "TaskUpdate", { taskId: "2", status: "deleted" })], null); + assert.deepEqual(deleted.items.map((item) => item.id), ["1"]); + assert.equal(taskAllDone(deleted), true); + + // A provisional id follows the harness's highest-id-plus-one rule. + const gap = foldTaskList([ + tool("l", "TaskList", {}, "completed", "#1 [pending] A\n#3 [pending] C"), + tool("c", "TaskCreate", { subject: "D" }, "running"), + ], null); + assert.deepEqual(gap.items.map((item) => [item.id, item.text]), [["1", "A"], ["3", "C"], ["4", "D"]]); + assert.equal(lastTaskList(parts, null).id, "g"); + assert.equal(lastTaskList([tool("bash", "Bash", { command: "ls" })], null), null); +}); + +test("incremental calls build on the list from earlier turns", () => { + const first = message("a1", "assistant", tool("c1", "TaskCreate", { subject: "Step one" }, "completed", "Task #1 created successfully: Step one")); + const second = message("a2", "assistant", tool("u1", "TaskUpdate", { taskId: "1", status: "completed" })); + const messages = [first, message("u", "user"), second]; + const priors = priorTaskLists(messages); + assert.equal(priors.get("a1"), null); + assert.equal(priors.get("a2").items[0].status, "pending"); + // Messages without task calls keep the prior list by identity and get no entry. + const untouched = message("a4", "assistant", tool("b", "Bash", {})); + const before = priors.get("a2"); + assert.equal(foldTaskList(untouched.parts, before), before); + assert.equal(priorTaskLists([...messages, message("u2", "user"), untouched]).has("a4"), false); + assert.equal(activeTurnTaskList(messages).items[0].status, "completed"); + assert.equal(activeTurnTaskList([first, message("u", "user")]), null); + assert.equal(activeTurnTaskList([first, message("u", "user"), message("a3", "assistant", tool("b", "Bash", {}))]), null); }); -test("activeTurnTaskList only reads the tail assistant message", () => { - const older = tool("t1", "TodoWrite", { todos: [{ content: "old", status: "in_progress" }] }); - const live = tool("t2", "TodoWrite", { todos: [{ content: "new", status: "in_progress" }] }); - assert.equal(activeTurnTaskList([message("a1", "assistant", older), message("u1", "user")]), null); - assert.equal(activeTurnTaskList([message("a1", "assistant", older), message("u1", "user"), message("a2", "assistant")]), null); - assert.equal(activeTurnTaskList([message("a1", "assistant", older), message("u1", "user"), message("a2", "assistant", live)]).current.text, "new"); +test("a whole-list write replaces whatever was folded before it", () => { + const list = foldTaskList([ + tool("c1", "TaskCreate", { subject: "Old" }, "completed", "Task #1 created successfully: Old"), + tool("w", "TodoWrite", { todos: [{ content: "New", status: "in_progress" }] }), + ], null); + assert.deepEqual(list.items.map((item) => item.text), ["New"]); }); diff --git a/ui/tests/turnOutline.test.mjs b/ui/tests/turnOutline.test.mjs new file mode 100644 index 00000000..a6eb6cf0 --- /dev/null +++ b/ui/tests/turnOutline.test.mjs @@ -0,0 +1,40 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { stepLabel, turnOutline } from "../src/turnOutline.ts"; + +const text = (id, body) => ({ id, type: "text", text: body }); +const tool = (id, name = "Bash") => ({ id, type: "tool", tool: name, state: { status: "completed", input: {} } }); + +test("step labels take the first sentence without markdown or tags", () => { + assert.equal(stepLabel("I'll **read** `loader.py` first, then the tests. Then edit it."), "I'll read loader.py first, then the tests."); + assert.equal(stepLabel("## Plan\nLooking at now"), "Plan Looking at src/a.py now"); + assert.equal(stepLabel("x".repeat(200)).length, 110); + assert.equal(stepLabel(" "), ""); + assert.equal(stepLabel("1. Read the config e.g. loader.py first. Then edit."), "Read the config e.g. loader.py first."); + assert.equal(stepLabel("Clean tree. Now let's write the module."), "Clean tree. Now let's write the module."); + assert.equal(stepLabel("Running:\n```bash\npytest -q\n```\nThen report."), "Running: Then report."); +}); + +test("narration opens a step and following tools attach to it", () => { + const parts = [ + { id: "r", type: "reasoning", text: "hidden" }, + text("t1", "I'll survey the repo first."), + tool("b1"), + tool("todo", "TodoWrite"), + tool("b2", "Read"), + text("t2", "Now the tests."), + tool("b3"), + { id: "turn-retry", type: "tool", tool: "retry", state: { status: "running", input: {} } }, + ]; + const steps = turnOutline(parts); + assert.deepEqual(steps.map((step) => [step.id, step.label, step.toolParts.map((p) => p.id), step.done]), [ + ["t1", "I'll survey the repo first.", ["b1", "b2"], true], + ["t2", "Now the tests.", ["b3"], false], + ]); +}); + +test("tools before any narration form an unlabeled first step", () => { + const steps = turnOutline([tool("b1"), text("t1", "Done.")]); + assert.deepEqual(steps.map((step) => [step.id, step.label, step.toolParts.length, step.done]), [["b1", "", 1, true], ["t1", "Done.", 0, false]]); + assert.deepEqual(turnOutline([]), []); +});