diff --git a/docs/research/WEB_EVIDENCE_TERMINAL_STRINGS_2026-10-07.md b/docs/research/WEB_EVIDENCE_TERMINAL_STRINGS_2026-10-07.md new file mode 100644 index 00000000..6436cd9e --- /dev/null +++ b/docs/research/WEB_EVIDENCE_TERMINAL_STRINGS_2026-10-07.md @@ -0,0 +1,18 @@ +# Terminal strings in Web evidence + +- Status: validated source and regression evidence +- Created / verified: 2026-10-07 +- Source: origin/main at 3cb2ecfe1bfbb98252651885311d309f83749428 +- Issue: [#700](https://github.com/openpi-dev/openpi/issues/700) +- Supersedes: none + +## Verified facts + +Web evidence stripped escape introducers while retaining hidden DCS, PM, APC and SOS payloads. It now uses the canonical shared terminal sanitizer on its bounded candidate. Tests cover ESC/C1 introducers, terminators, unterminated strings and actual tool projections. + +## Verification boundary + +Eight evidence tests pass. Unicode and tab behavior follows the shared sanitizer. Canonical execution and persisted evidence are unchanged. + +Full repository validation results and CI are recorded on the linked PR. Local +Windows failures are retained separately and are not reported as passing. diff --git a/tests/web/evidence-view.spec.ts b/tests/web/evidence-view.spec.ts index 8bd90966..7914cba9 100644 --- a/tests/web/evidence-view.spec.ts +++ b/tests/web/evidence-view.spec.ts @@ -239,6 +239,7 @@ it.each(["failed", "cancelled", "unknown", "running"] as const)( it("expands a file summary without nested controls and opens the resolved file through the active artifact context", () => { const open = vi.fn(); + const identity = "/workspace/a\u200bb.md"; const { container } = render( createElement( ArtifactContext.Provider, @@ -249,8 +250,8 @@ it("expands a file summary without nested controls and opens the resolved file t name: "read", arguments: JSON.stringify({ path: "report.md" }), evidenceArguments: { - path: "report.md", - resolvedPath: "/workspace/report.md", + path: "a\u200bb.md", + resolvedPath: identity, }, }, result: { content: "report", isError: false }, @@ -259,12 +260,12 @@ it("expands a file summary without nested controls and opens the resolved file t ); const summary = container.querySelector(".tool-evidence-card > summary")!; - expect(summary.textContent).toContain("report.md"); + expect(summary.textContent).toContain("ab.md"); expect(summary.querySelector("button, a, input, [tabindex]")).toBeNull(); fireEvent.click(summary); expect(open).not.toHaveBeenCalled(); - fireEvent.click(screen.getByRole("button", { name: "/workspace/report.md" })); - expect(open).toHaveBeenCalledWith("/workspace/report.md"); + fireEvent.click(screen.getByRole("button", { name: "/workspace/ab.md" })); + expect(open).toHaveBeenCalledWith(identity); }); it("opens local links using authenticated API and stops preview reads on close", async () => { @@ -521,3 +522,105 @@ it("polls metadata with backoff, retains changed text until refresh, and stops o vi.useRealTimers(); } }); + +it("keeps oversized evidence references non-actionable in projected and legacy calls", () => { + const huge = "x".repeat(1024 * 1024); + const open = vi.fn(); + for (const evidenceArguments of [ + undefined, + { path: huge, resolvedPath: "small.txt" }, + { path: "small.txt", resolvedPath: huge }, + ]) { + const { container, unmount } = render( + createElement( + ArtifactContext.Provider, + { value: { open } }, + createElement(ToolEvidence, { + call: { + type: "toolCall", + name: "read", + arguments: JSON.stringify({ path: huge }), + evidenceArguments, + }, + defaultOpen: true, + }), + ), + ); + expect(screen.queryByRole("button")).toBeNull(); + expect( + screen.getByText("File reference exceeds the evidence byte limit."), + ).toBeTruthy(); + expect(container.textContent!.length).toBeLessThan(64 * 1024); + expect(open).not.toHaveBeenCalled(); + unmount(); + } +}); + +it("opens admitted exact identities even when their display label is empty", () => { + const open = vi.fn(); + render( + createElement( + ArtifactContext.Provider, + { value: { open } }, + createElement(ToolEvidence, { + call: { + type: "toolCall", + name: "read", + arguments: JSON.stringify({ path: "\u200b" }), + }, + defaultOpen: true, + }), + ), + ); + fireEvent.click(screen.getByRole("button", { name: "File reference" })); + expect(open).toHaveBeenCalledWith("\u200b"); + expect(document.body.textContent).not.toContain("\u200b"); +}); + +it("shows only sanitized labels when terminal or bidi characters sanitize away", () => { + const open = vi.fn(); + const hidden = "\x1b]52;c;HIDDEN_PATH_PAYLOAD\x07"; + const { unmount } = render( + createElement( + ArtifactContext.Provider, + { value: { open } }, + createElement(ToolEvidence, { + call: { + type: "toolCall", + name: "read", + arguments: JSON.stringify({ path: hidden }), + }, + defaultOpen: true, + }), + ), + ); + const card = document.querySelector(".tool-evidence-card"); + const summary = card?.querySelector("summary"); + expect(summary?.textContent).toContain("File reference"); + expect(summary?.textContent).not.toContain("HIDDEN_PATH_PAYLOAD"); + expect(card?.querySelector(".evidence-filename")?.textContent).toBe( + "File reference", + ); + expect( + card?.querySelector(".evidence-target")?.title ?? "", + ).not.toContain("HIDDEN_PATH_PAYLOAD"); + fireEvent.click(screen.getByRole("button", { name: "File reference" })); + expect(open).toHaveBeenCalledWith(hidden); + unmount(); + + render( + createElement(ToolEvidence, { + call: { + type: "toolCall", + name: "read", + arguments: JSON.stringify({ path: "safe\u202eevil.txt" }), + }, + defaultOpen: true, + }), + ); + const target = document.querySelector(".evidence-target"); + expect(target?.textContent).toContain("safeevil.txt"); + expect(target?.title).toBe("safeevil.txt"); + expect(target?.title).not.toContain("\u202e"); + expect(document.body.textContent).not.toContain("\u202e"); +}); diff --git a/tests/web/evidence.test.ts b/tests/web/evidence.test.ts index ea3e4b46..bf8235ae 100644 --- a/tests/web/evidence.test.ts +++ b/tests/web/evidence.test.ts @@ -1,4 +1,7 @@ import assert from "node:assert/strict"; +import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; import test from "node:test"; import { evidenceText, @@ -8,6 +11,7 @@ import { } from "../../web/protocol/evidence.ts"; import { projectMessage } from "../../web/protocol/types.ts"; import { reduceLiveTools } from "../../web/protocol/live-tools.ts"; +import { ArtifactReader } from "../../web/host/artifacts.ts"; function call(name: string, args: Record = {}) { const part = projectMessage({ @@ -17,6 +21,36 @@ function call(name: string, args: Record = {}) { return part; } +test("Web evidence strips terminal-owned hidden strings rather than exposing their payloads", () => { + for (const start of [ + "\x1bP", + "\x1bX", + "\x1b^", + "\x1b_", + "\u0090", + "\u0098", + "\u009e", + "\u009f", + ]) { + for (const end of ["\x1b\\", "\u009c"]) { + assert.equal( + evidenceText(`before${start}hidden${end}after`).text, + "beforeafter", + ); + } + assert.equal(evidenceText(`before${start}unterminated`).text, "before"); + } + assert.equal( + evidenceText("中文\t👩‍💻\x1b[31mvisible\x1b[0m").text, + "中文 👩‍💻visible", + ); + const result = projectToolEvidence(call("bash"), { + content: "before\x1bPhidden\x1b\\after", + isError: false, + }); + assert.equal(result.output, "beforeafter"); +}); + test("bounded messages preserve final bash receipts before output truncation", () => { const message = projectMessage({ role: "toolResult", @@ -84,6 +118,61 @@ test("file evidence preserves requested range after oversized arguments and neve ); }); +test("file evidence keeps artifact identities separate from sanitized display labels", async () => { + const root = await mkdtemp(join(tmpdir(), "openpi-evidence-path-")); + const identity = "a\u200bb.txt"; + const resolvedPath = join(root, identity); + const reader = new ArtifactReader(() => ({ sessionId: "s", cwd: root })); + try { + await writeFile(resolvedPath, "zero-width identity"); + await writeFile(join(root, "ab.txt"), "different file"); + const message = projectMessage( + { + content: [ + { + type: "toolCall", + id: "call", + name: "read", + arguments: { path: identity }, + }, + ], + }, + (path) => join(root, path), + ); + const part = message.parts?.[0]; + assert.ok(part?.type === "toolCall"); + const view = projectToolEvidence(part); + assert.equal(view.path, identity); + assert.equal(view.displayPath, "ab.txt"); + assert.equal(view.resolvedPath, resolvedPath); + const handle = await reader.resolveFile("s", view.resolvedPath!); + assert.equal( + (await reader.read(handle, "s")).preview.text, + "zero-width identity", + ); + + const tabView = projectToolEvidence(call("read", { path: "a\tb.txt" })); + assert.equal(tabView.path, "a\tb.txt"); + assert.equal(tabView.displayPath, "a b.txt"); + if (process.platform !== "win32") { + // Windows filenames cannot contain tab characters. + await writeFile(join(root, "a\tb.txt"), "tab identity"); + assert.equal( + await readFile(join(root, tabView.path!), "utf8"), + "tab identity", + ); + } + // Artifact policy still rejects controls; evidence must not silently retarget + // the sanitized label to another real file to bypass that boundary. + await assert.rejects(reader.resolveFile("s", tabView.path!), { + code: "ARTIFACT_DENIED", + }); + } finally { + reader.dispose(); + await rm(root, { recursive: true, force: true }); + } +}); + test("terminal receipts, TAP observations, and tool returns remain separate", () => { const bash = call("bash", { command: "node --test" }); const output = @@ -201,3 +290,118 @@ test("successful foreground completion does not invent an exit code or process s "unknown", ); }); +test("evidence admits exact UTF-8 path bytes and rejects oversized identities without fallback", () => { + const budget = 4096; + for (const exact of [ + "x".repeat(budget), + "中".repeat(1365) + "x", + "😀".repeat(1024), + ]) { + for (const path of [exact.slice(0, -2), exact]) { + assert.equal(projectToolEvidence(call("read", { path })).path, path); + } + const path = exact + "x"; + const view = projectToolEvidence(call("read", { path })); + assert.equal(view.path, undefined); + assert.equal(view.resolvedPath, undefined); + assert.equal( + view.pathUnavailable, + "File reference exceeds the evidence byte limit.", + ); + assert.equal(view.truncated, true); + for (const legacy of [ + { + type: "toolCall" as const, + name: "read", + arguments: JSON.stringify({ path }), + }, + { + type: "toolCall" as const, + name: "read", + arguments: "{}", + evidenceArguments: { path, resolvedPath: "short.txt" }, + }, + { + type: "toolCall" as const, + name: "read", + arguments: "{}", + evidenceArguments: { path: "short.txt", resolvedPath: path }, + }, + ]) { + const projected = projectToolEvidence(legacy); + assert.equal(projected.path, undefined); + assert.equal(projected.resolvedPath, undefined); + } + } +}); + +test("production evidence serialization bounds raw and resolved 1 MiB paths", () => { + const huge = "x".repeat(1024 * 1024); + let resolutions = 0; + for (const path of [huge, "short.txt"]) { + const message = projectMessage( + { content: [{ type: "toolCall", name: "read", arguments: { path } }] }, + () => { + resolutions++; + return huge; + }, + ); + const part = message.parts?.[0]; + assert.ok(part?.type === "toolCall"); + const view = projectToolEvidence(part); + assert.equal(view.path, undefined); + assert.equal(view.resolvedPath, undefined); + assert.ok(view.pathUnavailable); + assert.ok(Buffer.byteLength(JSON.stringify(message)) < 64 * 1024); + assert.ok(Buffer.byteLength(JSON.stringify(view)) < 64 * 1024); + assert.ok(Buffer.byteLength(view.displayPath ?? "") <= 12 * 1024); + } + assert.equal(resolutions, 1); + const exact = "中".repeat(1365) + "x"; + const projected = projectMessage( + { + content: [{ type: "toolCall", name: "read", arguments: { path: "ok" } }], + }, + () => exact, + ); + const part = projected.parts?.[0]; + assert.ok(part?.type === "toolCall"); + assert.equal(projectToolEvidence(part).resolvedPath, exact); +}); + +test("raw tool arguments cannot supply the trusted resolved evidence identity", () => { + for (const path of ["~/.note", "@named/path", "report.md"]) { + let resolverCalls = 0; + const message = projectMessage( + { + content: [ + { + type: "toolCall", + name: "read", + arguments: { path, resolvedPath: "different.txt" }, + }, + ], + }, + () => { + resolverCalls++; + return "/workspace/report.md"; + }, + ); + const part = message.parts?.[0]; + assert.ok(part?.type === "toolCall"); + const view = projectToolEvidence(part); + assert.equal(view.path, path); + assert.equal( + view.resolvedPath, + path === "report.md" ? "/workspace/report.md" : undefined, + ); + assert.equal(resolverCalls, path === "report.md" ? 1 : 0); + const legacy = projectToolEvidence({ + type: "toolCall", + name: "read", + arguments: JSON.stringify({ path, resolvedPath: "different.txt" }), + }); + assert.equal(legacy.path, path); + assert.equal(legacy.resolvedPath, undefined); + } +}); diff --git a/web/dist/app.js b/web/dist/app.js index 14b2af00..f5f6651d 100644 --- a/web/dist/app.js +++ b/web/dist/app.js @@ -47,77 +47,78 @@ Try polyfilling it using "@formatjs/intl-pluralrules" `)}\n}`);let o=``;t.length>0&&(o=`@scope (${r}) to (${i}) {\n${t.join(` -`)}\n}`);let s=Ti(e);return s&&(o=o?`${o}\n\n${s}`:s),{prose:a,component:o}}var Oi={..._,...l,...C,...h,...le,...u,...x,...d,...v,...T,...B,...S,...f,...Qr};function ki(e){return`var(${e})`}Object.fromEntries(Object.keys(Oi).map(e=>[e,ki(e)]));function Ai(e){let t=0,n=null,r=!1;for(let i=0;if*e*s.a+p*t*c.a,_=g(s.r,c.r),v=g(s.g,c.g),y=g(s.b,c.b);return wt({...h===0?{r:0,g:0,b:0}:{r:_/h,g:v/h,b:y/h},a:h*m})}function Ii(e){let t=e.indexOf(`color-mix(`);if(t===-1)return e;let n=t+9,r=Ni(e,n);if(r===-1)return e;let i=Ii(e.slice(n+1,r)),a=Fi(i)??`color-mix(${i})`;return e.slice(0,t)+a+Ii(e.slice(r+1))}function Li(e,t,n,r){let i=e.indexOf(`var(`);if(i===-1)return e;let a=i+3,o=Ni(e,a);if(o===-1)return e;let s=e.slice(a+1,o),c=Ai(s),l=(c?c[0]:s).trim(),u=c?c[1]:null,d;r.has(l)?d=e.slice(i,o+1):l in t?(r.add(l),d=zi(l,t,n,r),r.delete(l)):d=u===null?e.slice(i,o+1):Li(u.trim(),t,n,r);let f=Li(e.slice(o+1),t,n,r);return e.slice(0,i)+d+f}function Ri(e,t,n,r){return!e.includes(`var(`)&&!e.includes(`color-mix(`)?e:Ii(Li(e,t,n,r))}function zi(e,t,n,r){if(e in n)return n[e];let i=t[e];if(i===void 0)return``;let a=Ri(i,t,n,r);return n[e]=a,a}function Bi(e){let t={};for(let n of Object.keys(e))zi(n,e,t,new Set);return t}function Vi(e,t){let{mode:n}=t,r={};for(let[e,t]of Object.entries(Oi))r[e]=Mi(t,n);if(e==null)return Bi(r);for(let[t,i]of Object.entries(e.tokens))r[t]=Mi(i,n);if(e.__inputTokens)for(let[t,i]of Object.entries(e.__inputTokens))i!==void 0&&(r[t]=Mi(i,n));return Bi(r)}function Hi(e,t=!1){let n=(0,K.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),r=(0,K.useCallback)(()=>window.matchMedia(e).matches,[e]),i=(0,K.useCallback)(()=>t,[t]);return(0,K.useSyncExternalStore)(n,r,i)}var Ui=(0,K.createContext)(null);Ui.displayName=`ThemeContext`;function Wi(){if(typeof document>`u`)return null;let e=document.documentElement.getAttribute(`data-theme`);return e===`light`||e===`dark`?e:null}function Gi(){return null}function Ki(){return typeof document>`u`?null:document.documentElement.getAttribute(A(`theme`))}function qi(){return null}function Ji(){return null}var Yi=new Set,Xi=null,Zi=new Set,Qi=null;function $i(){for(let e of Yi)e()}function ea(e){return Yi.add(e),Yi.size===1&&typeof MutationObserver<`u`&&(Xi=new MutationObserver($i),Xi.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})),()=>{Yi.delete(e),Yi.size===0&&Xi&&(Xi.disconnect(),Xi=null)}}function ta(){for(let e of Zi)e()}function na(e){return Zi.add(e),Zi.size===1&&typeof MutationObserver<`u`&&(Qi=new MutationObserver(ta),Qi.observe(document.documentElement,{attributes:!0,attributeFilter:[A(`theme`)]})),()=>{Zi.delete(e),Zi.size===0&&Qi&&(Qi.disconnect(),Qi=null)}}function ra(){return()=>{}}function ia(e){return(0,K.useSyncExternalStore)(e?ra:ea,e?Ji:Wi,Gi)}function aa(e){return(0,K.useSyncExternalStore)(e?ra:na,e?Ji:Ki,qi)}function oa(){let e=(0,K.use)(Ui),t=aa(e!=null);return e?.theme.name??t}function sa(){let e=(0,K.use)(Ui),t=e!=null,n=ia(t),r=aa(t),i=Hi(`(prefers-color-scheme: dark)`),a=e?.mode??n??`system`,o=e?.theme??ti(r),s=a===`system`?i?`dark`:`light`:a,c=(0,K.useMemo)(()=>Vi(o,{mode:s}),[o,s]),l=(0,K.useCallback)(e=>c[e]??``,[c]),u=o?.name??`default`;return(0,K.useMemo)(()=>({name:u,mode:s,token:l,tokens:c}),[u,s,l,c])}var ca={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,width:`1em`,height:`1em`,"aria-hidden":!0},la={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,width:`1em`,height:`1em`,"aria-hidden":!0},ua={close:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M6 6l12 12M6 18L18 6`})}),chevronDown:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M6 9l6 6 6-6`})}),"numberInput:stepperDown":(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M7.5 9.75l4.5 4.5 4.5-4.5`})}),chevronLeft:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M15 6l-6 6 6 6`})}),chevronRight:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M9 6l6 6-6 6`})}),chevronsLeft:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M18 6l-6 6 6 6M11 6l-6 6 6 6`})}),chevronsRight:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M6 6l6 6-6 6M13 6l6 6-6 6`})}),check:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M5 13l4 4L19 7`})}),success:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3a9 9 0 100 18 9 9 0 000-18zm4.06 6.56a.75.75 0 00-1.12-1l-3.94 4.4-1.94-1.94a.75.75 0 00-1.06 1.06l2.5 2.5a.75.75 0 001.09-.03l4.47-5z`})}),error:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3a9 9 0 100 18 9 9 0 000-18zm-2.47 5.47a.75.75 0 00-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 101.06 1.06L12 13.06l2.47 2.47a.75.75 0 101.06-1.06L13.06 12l2.47-2.47a.75.75 0 00-1.06-1.06L12 10.94l-2.47-2.47z`})}),warning:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.29 3.86L2.07 19.05A2 2 0 003.78 22h16.44a2 2 0 001.71-2.95L13.71 3.86a2 2 0 00-3.42 0zM12 9a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 9zm0 9a1 1 0 100-2 1 1 0 000 2z`})}),info:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 100 2 1 1 0 000-2zm-.75 3.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5z`})}),calendar:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`}),(0,q.jsx)(`path`,{d:`M16 2v4M8 2v4M3 10h18`})]}),clock:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,q.jsx)(`path`,{d:`M12 7v5l3 3`})]}),externalLink:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6`}),(0,q.jsx)(`path`,{d:`M15 3h6v6`}),(0,q.jsx)(`path`,{d:`M10 14L21 3`})]}),menu:(0,q.jsx)(`svg`,{...ca,strokeWidth:2,children:(0,q.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h16`})}),moreHorizontal:(0,q.jsxs)(`svg`,{...la,children:[(0,q.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.5`}),(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,q.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.5`})]}),search:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,q.jsx)(`path`,{d:`M21 21l-4.35-4.35`})]}),arrowUp:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M12 19V5m0 0l-7 7m7-7l7 7`})}),arrowDown:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M12 5v14m0 0l7-7m-7 7l-7-7`})}),arrowsUpDown:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5`})}),funnel:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z`})}),eyeSlash:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M3.98 8.223A10.477 10.477 0 001.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88`})}),viewColumns:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125z`})}),copy:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z`}),(0,q.jsx)(`path`,{d:`M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2`})]}),checkDouble:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M2 13l4 4L14 7`}),(0,q.jsx)(`path`,{d:`M9 13l4 4L21 7`})]}),wrench:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`})}),stop:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})}),microphone:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z`}),(0,q.jsx)(`path`,{d:`M19 10v1a7 7 0 01-14 0v-1`}),(0,q.jsx)(`path`,{d:`M12 18v4m-4 0h8`})]})},da={};function fa(e){return e==null?null:typeof e==`string`?ti(e)?.icons??null:e.icons??null}function pa(e,t){return fa(t)?.[e]??da[e]??ua[e]}var ma={root:{kmuXW:`x2lah0s`,$$css:!0},span:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,$$css:!0}},ha={primary:{kMwMTN:`xtbr613`,$$css:!0},secondary:{kMwMTN:`xv9yike`,$$css:!0},tertiary:{kMwMTN:`xv9yike`,$$css:!0},disabled:{kMwMTN:`xqa6c3m`,$$css:!0},accent:{kMwMTN:`xqwr325`,$$css:!0},success:{kMwMTN:`xtjic6`,$$css:!0},error:{kMwMTN:`xjt36v0`,$$css:!0},warning:{kMwMTN:`xs3pv69`,$$css:!0},inherit:{kMwMTN:`x1heor9g`,$$css:!0},blue:{kMwMTN:`x1fns2mt`,$$css:!0},red:{kMwMTN:`xeffzf7`,$$css:!0},green:{kMwMTN:`xmxeech`,$$css:!0},gray:{kMwMTN:`x1eyinzz`,$$css:!0},cyan:{kMwMTN:`x157w0xa`,$$css:!0},teal:{kMwMTN:`x1f3zxcb`,$$css:!0},yellow:{kMwMTN:`x1g6zdft`,$$css:!0},orange:{kMwMTN:`xxu74a4`,$$css:!0},pink:{kMwMTN:`x1kxxfg5`,$$css:!0},purple:{kMwMTN:`xzdw94u`,$$css:!0}},ga={xsm:{kzqmXN:`x1jw3ynk`,kZKoxP:`xvle69y`,$$css:!0},sm:{kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,$$css:!0},md:{kzqmXN:`xwqq7k2`,kZKoxP:`xmll18r`,$$css:!0},lg:{kzqmXN:`xp8d6y2`,kZKoxP:`xam5rvr`,$$css:!0}},_a={xsm:{kzqmXN:`x1jw3ynk`,kZKoxP:`xvle69y`,kGuDYH:`xboafo0`,$$css:!0},sm:{kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,kGuDYH:`x1jchvi3`,$$css:!0},md:{kzqmXN:`xwqq7k2`,kZKoxP:`xmll18r`,kGuDYH:`x1603h9y`,$$css:!0},lg:{kzqmXN:`xp8d6y2`,kZKoxP:`xam5rvr`,kGuDYH:`xngnso2`,$$css:!0}};function va(e){return e!=null&&e!==``?{role:`img`,"aria-label":e}:{"aria-hidden":`true`}}function ya({icon:e,color:t=`inherit`,size:n=`md`,label:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=va(r);return typeof e==`string`?(0,q.jsx)(ba,{name:e,color:t,size:n,a11yProps:l,className:a,style:o,xstyle:s,spanProps:c}):(0,q.jsx)(e,{ref:i,...l,...H(O(`icon`,{size:n,color:t}),w(ma.root,ha[t],ga[n],s),a??void 0,o),...c})}ya.displayName=`Icon`;function ba({name:e,color:t,size:n,a11yProps:r,className:i,style:a,xstyle:o,spanProps:s}){let c=pa(e,oa());if(c==null)return null;let l=s??{};return(0,q.jsx)(`span`,{...r,...l,...H(O(`icon`,{size:n,color:t}),w(ma.span,ha[t],_a[n],o),i??void 0,a),children:c})}function xa(e,t){return typeof e==`string`||typeof e==`function`||typeof e==`object`&&e&&`render`in e?(0,q.jsx)(ya,{icon:e,...t}):e}var Sa=[`noopener`,`noreferrer`];function Ca(e,t){if(e!==`_blank`)return{target:e,rel:t};let n=t?.split(/\s+/).filter(Boolean)??[];for(let e of Sa)n.includes(e)||n.push(e);return{target:e,rel:n.join(` `)}}var wa=[`button`,`a`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="combobox"]`,`[role="listbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[data-pressable-container]`].join(`,`),Ta=`[aria-readonly="true"]`;function Ea(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(wa)&&!n.matches(Ta))return!0;n=n.parentElement}return!1}function Da(e){if(typeof document>`u`||!(`getSelection`in document))return!1;let t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function Oa({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return(0,K.useEffect)(()=>{let t=e.current;t&&t.setAttribute(`data-pressable-container`,`true`)},[e]),{onClick:(0,K.useCallback)(o=>{if(a)return;let s=e.current;if(!s||Da(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&Ea(c,s))&&(n?.(o),!o.defaultPrevented&&(r!=null&&(i===`_blank`||o.ctrlKey||o.metaKey?window.open(r,`_blank`,`noopener`):t?.current?t.current.click():window.location.href=r),r==null&&n==null&&t?.current))){let e=new MouseEvent(`click`,{bubbles:o.bubbles,cancelable:o.cancelable,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey,altKey:o.altKey,button:o.button});t.current.dispatchEvent(e),o.stopPropagation()}},[e,t,n,r,i,a]),onMouseUp:(0,K.useCallback)(t=>{if(a)return;let n=e.current;if(!n)return;let i=t.target;i instanceof Element&&t.button===1&&r!=null&&(i===t.currentTarget||!Ea(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a])}}var ka=new Set([`option`,`tab`,`row`,`gridcell`,`columnheader`,`rowheader`,`treeitem`]),Aa={root:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kg3NbH:`xf314gf`,kVAEAm:`x1n2onr6`,kB7OPa:`x9f619`,k9WMMc:`x1yc453h`,kaIpWk:`xh6dtrn`,$$css:!0},alignStart:{kGNEyG:`x1cy8zhl`,$$css:!0},interactive:{kkrTdU:`x1ypdohk x16khyan`,k1ekBW:`x15406qy`,kIyJzY:`xkvfbh3`,kAMwcw:`xlr8y92`,$$css:!0},highlighted:{kWkggS:`x1lmrjuc`,$$css:!0},selected:{kWkggS:`xgcxg3y`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kfzvcC:`x47corl`,$$css:!0},inlineLabel:{kmuXW:`x2lah0s`,$$css:!0},inlineDescription:{kmuXW:`xs83m0k`,k7Eaqz:`xeuugli`,$$css:!0},label:{kMwMTN:`x5tbw38`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},labelSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},labelMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0},description:{kMwMTN:`x1gb3s7i`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},descriptionSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},descriptionMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},ja={lineClamp:e=>[{kJFfOR:e==null?e:`x1yhjpo9`,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},Ma={compact:{k8WAf4:`xu0wf1k`,$$css:!0},balanced:{k8WAf4:`xce4md1`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`xrrkdod`,$$css:!0}};function Na({as:e=`div`,marker:t,startContent:n,label:r,description:i,endContent:a,align:o=`center`,density:s=`balanced`,labelLines:c,descriptionLines:l,layout:u=`stacked`,onClick:d,interactiveRef:f,href:p,target:m,rel:h,isHighlighted:g=!1,isSelected:_=!1,isDisabled:v=!1,xstyle:y,className:b,style:x,ref:S,role:C,...T}){let E=nn(),D=f!=null,k=(0,K.useRef)(null),{onClick:A}=Oa({containerRef:k,interactiveRef:f??void 0,disabled:v});Vr(`Item`,"`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",D&&(d!=null||p!=null));let j=d!=null||p!=null||D,{target:M,rel:N}=Ca(m,h),P=C!=null,F=C!=null&&ka.has(C),I=typeof r==`string`,ee=typeof i==`string`,L=c==null?I?Aa.labelSingleTruncate:null:c===1?Aa.labelSingleTruncate:Aa.labelMultiTruncate,R=u===`inline`&&i!=null,te=l==null?ee||R?Aa.descriptionSingleTruncate:null:l===1?Aa.descriptionSingleTruncate:Aa.descriptionMultiTruncate,z=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{...w(Aa.label,R&&Aa.inlineLabel,L,c!=null&&c>1&&ja.lineClamp(c)),children:r}),i!=null&&(0,q.jsx)(`span`,{...w(Aa.description,R&&Aa.inlineDescription,te,l!=null&&l>1&&ja.lineClamp(l)),children:i})]}),B=e=>{v||e.target.closest(`button, a, input, select, textarea`)||d?.(e)},ne=(0,q.jsxs)(q.Fragment,{children:[t,n!=null&&(0,q.jsx)(`span`,{className:`x3psx0u x78zum5`,children:n}),P||D?(0,q.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}):p==null?d==null?(0,q.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}):(0,q.jsx)(`button`,{type:`button`,onClick:d,disabled:v,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}):(0,q.jsx)(E,{href:p,target:M,rel:N,"aria-disabled":v||void 0,tabIndex:v?-1:void 0,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}),a!=null&&(0,q.jsx)(`span`,{...{0:{className:`x3psx0u x78zum5 xvc5jky`},1:{className:`x3psx0u x78zum5 xvc5jky xbyyjgo`}}[!!v<<0],children:a})]}),re=we(S,k);return(0,q.jsx)(e,{ref:D?re:S,...T,"aria-selected":F&&_||void 0,"aria-current":T[`aria-current`]??(_&&!F?!0:void 0),"aria-disabled":v||void 0,...H(O(`item`,{density:s,align:o}),Te.focusWithin(Aa.root,Ma[s],o===`start`&&Aa.alignStart,j&&Aa.interactive,j&&rn.backgroundColor,g&&Aa.highlighted,_&&Aa.selected,v&&!P&&Aa.disabled,y),b,x),role:C,onClick:D?A:P?d:j?B:void 0,children:ne})}Na.displayName=`Item`;var Pa=(0,K.createContext)(null);Pa.displayName=`DropdownMenuContext`;function Fa(){return(0,K.use)(Pa)}var Ia=(0,K.createContext)(null);Ia.displayName=`DropdownMenuRadioGroupContext`;function La(){return(0,K.use)(Ia)}function Ra(e,t){if(t||e.pointerType!==`mouse`)return;let n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}var za={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},destructive:{kMwMTN:`xjt36v0`,"--_item-label-color":`xufyqxy`,"--_item-description-color":`xqlix59`,$$css:!0}},Ba={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}};function Va({icon:e,label:t,description:n,onClick:r,isDisabled:i=!1,endContent:a,hasCloseOnSelect:o=!0,variant:s=`default`,xstyle:c,className:l,style:u}){let d=Fa(),f=d?.menuSize??`md`,p=(0,K.useCallback)(()=>{i||(r?.(),o&&d?.closeMenu())},[i,r,o,d]),m=(0,K.useCallback)(e=>Ra(e,i),[i]),h=s===`destructive`;return(0,q.jsx)(Na,{role:`menuitem`,tabIndex:i?void 0:-1,onPointerMove:m,startContent:e?xa(e,{size:`sm`,color:h?`error`:`secondary`}):void 0,label:t,description:n,endContent:a,onClick:p,isDisabled:i,xstyle:[za.root,Ba[f],h&&za.destructive,i&&za.disabled,c],...H(O(`dropdown-menu-item`,{size:f,variant:h?`destructive`:null}),{className:l,style:u})})}Va.displayName=`DropdownMenuItem`;var Ha={horizontal:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kzqmXN:`xh8yej3`,$$css:!0},vertical:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kZKoxP:`x5yr21d`,$$css:!0}},Ua={horizontalLine:{kZKoxP:`xsyqizj`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},verticalLine:{kzqmXN:`xjk4fl7`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},subtle:{kWkggS:`x1m4xfpy`,$$css:!0},strong:{kWkggS:`x7njt3n`,$$css:!0}},Wa={horizontal:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,kzqmXN:`xx6qvi6`,$$css:!0},vertical:{keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,kZKoxP:`x12qplqi`,$$css:!0}};function Ga({orientation:e=`horizontal`,label:t,variant:n=`subtle`,isFullBleed:r=!1,xstyle:i,className:a,style:o,ref:s,"aria-label":c,"aria-labelledby":l,...u}){let d=e===`horizontal`,f=(0,K.useId)(),p=l??(t&&c==null?f:void 0);return(0,q.jsxs)(`div`,{ref:s,...u,role:`separator`,"aria-orientation":e,"aria-label":c,"aria-labelledby":p,...H(O(`divider`,{variant:n,orientation:e}),w(d?Ha.horizontal:Ha.vertical,r&&(d?Wa.horizontal:Wa.vertical),i),a,o),children:[(0,q.jsx)(`div`,{...w(d?Ua.horizontalLine:Ua.verticalLine,Ua[n])}),t&&(0,q.jsx)(`div`,{id:f,...{0:{className:`x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4`},1:{className:`x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82`}}[!d<<0],children:t}),t&&(0,q.jsx)(`div`,{...w(d?Ua.horizontalLine:Ua.verticalLine,Ua[n])})]})}Ga.displayName=`Divider`;var Ka={divider:{kqGvvJ:`xsq74q5`,$$css:!0}},qa=O(`dropdown-menu-divider`).className;function Ja({xstyle:e,className:t,style:n,ref:r}){return(0,q.jsx)(Ga,{ref:r,xstyle:[Ka.divider,e],className:t?`${qa} ${t}`:qa,style:n})}Ja.displayName=`DropdownMenuDivider`;function Ya(e){return!e||typeof window>`u`?!1:window.getComputedStyle(e).direction===`rtl`}var Xa=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function Za(e){if(e.isContentEditable)return e;let t=e.closest(`[contenteditable]`);return t&&t.getAttribute(`contenteditable`)!==`false`?t:null}function Qa(e,t){if(!(e instanceof HTMLElement))return!1;let n=Za(e);if(n){let e=typeof window<`u`?window.getSelection():null;return e&&e.rangeCount>0&&!e.isCollapsed?!0:(n.textContent??``).length>0}let r=e.tagName===`TEXTAREA`,i=e.tagName===`INPUT`&&Xa.has(e.type);if(!r&&!i)return!1;let{selectionStart:a,selectionEnd:o,value:s}=e;return a!==o||a==null?!0:t===`ArrowLeft`||t===`ArrowUp`||t===`Home`?a>0:t===`ArrowRight`||t===`ArrowDown`||t===`End`?ae.getAttribute(`aria-disabled`)===`true`||e.disabled===!0||e.hasAttribute(`disabled`),[]),f=(0,K.useCallback)(()=>{let e=u.current;if(!e)return[];let r=Array.from(e.querySelectorAll(t));return n?r.filter(t=>t.closest(n)===e):r},[t,n]),p=(0,K.useCallback)(e=>{let t=u.current;if(!t||!n)return!0;let r=e.target;return!r||r.closest(n)===t},[n]),m=(0,K.useCallback)((e,t,n,r)=>{let i=e.length;if(i===0)return-1;let a=t;for(let t=0;t=i){if(!r)return-1;a=(a+i)%i}let t=e[a];if(t&&!d(t))return a;a+=n}return-1},[d]),h=(0,K.useCallback)(()=>{let e=f(),t=document.activeElement;return e.findIndex(e=>e===t||e.contains(t))},[f]),g=(0,K.useCallback)((e,t)=>{e.getAttribute(`tabindex`)!==String(t)&&e.setAttribute(`tabindex`,String(t))},[]),_=(0,K.useCallback)(()=>{let e=f(),t=e.filter(e=>!d(e));if(t.length===0)return;let n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0];for(let t of e)g(t,t===n?0:-1)},[f,d,g]);ne(()=>{c&&_()});let v=(0,K.useCallback)((e,t)=>{let n=e[t];if(n){if(c)for(let t of e)g(t,t===n?0:-1);n.focus()}},[c,g]),y=(0,K.useCallback)(e=>{let t=f();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1));v(t,n)},[f,v]),b=(0,K.useCallback)(()=>{let e=f(),t=m(e,0,1,!1);return t!==-1&&(v(e,t),!0)},[f,m,v]),x=(0,K.useCallback)(()=>{let e=f(),t=m(e,e.length-1,-1,!1);return t!==-1&&(v(e,t),!0)},[f,m,v]),S=(0,K.useCallback)(()=>{c&&_()},[c,_]);return{listRef:u,handleKeyDown:(0,K.useCallback)(e=>{if(e.ctrlKey||e.metaKey||e.altKey||!p(e))return;if(e.key===`Escape`){i&&(e.preventDefault(),i());return}let t=a===`horizontal`||a===`both`,n=a===`vertical`||a===`both`,c=[],d=[];if(t){let t=e.key===`ArrowLeft`||e.key===`ArrowRight`?s??Ya(u.current):!1;c.push(t?`ArrowLeft`:`ArrowRight`),d.push(t?`ArrowRight`:`ArrowLeft`)}n&&(c.push(`ArrowDown`),d.push(`ArrowUp`));let g=c.includes(e.key),_=d.includes(e.key),y=o&&e.key===`Home`,S=o&&e.key===`End`;if(!g&&!_&&!y&&!S||l&&(Qa(e.target,e.key)||Qa(document.activeElement,e.key)))return;let C=h(),w=f();if(g){let e=C===-1?0:C+1,t=m(w,e,1,r);t!==-1&&v(w,t)}else if(_){let e=C===-1?w.length-1:C-1,t=m(w,e,-1,r);t!==-1&&v(w,t)}else y?b():S&&x();e.preventDefault()},[h,f,r,a,s,o,l,m,v,b,x,i,p]),handleFocus:S,focusItem:y,focusFirst:b,focusLast:x,ownsEvent:p,getItems:f}}var eo=500,to=300;function no(e){let{show:t,hide:n,isOpen:r,isEnabled:i,showDelay:a=150,hideDelay:o=200,clickGuardMs:s=eo,itemSelector:c,popoverId:l,ownsFocus:u=!0}=e,d=Hi(`(hover: hover)`),f=(0,K.useRef)(null),p=(0,K.useRef)(null),m=(0,K.useRef)(null),h=(0,K.useRef)(!1),g=(0,K.useRef)(0),_=(0,K.useRef)(0),v=(0,K.useRef)(r);ne(()=>{let e=v.current;v.current=r,e&&!r&&(h.current=!1,_.current=0,g.current=Date.now())},[r]);let y=(0,K.useCallback)(()=>{f.current&&=(clearTimeout(f.current),null),p.current&&=(clearTimeout(p.current),null)},[]),b=(0,K.useRef)(()=>{}),{listRef:x,handleKeyDown:S,focusFirst:C}=$a({itemSelector:c,onEscape:()=>b.current()}),w=(0,K.useCallback)(()=>{let e=x.current?.contains(document.activeElement)??!1;n(),e&&m.current?.focus()},[n,x]);(0,K.useEffect)(()=>{b.current=()=>{y(),w()}},[y,w]),(0,K.useEffect)(()=>()=>y(),[y]);let T=(0,K.useCallback)(()=>{C()||x.current?.focus()},[C,x]),E=(0,K.useCallback)(()=>{if(!u){t();return}t({skipAutoFocus:!0}),T()},[u,t,T]),D=(0,K.useCallback)(()=>s>0&&_.current>0&&Date.now()-_.current{if(l&&e?.preventDefault(),y(),e!=null&&e.detail===0){g.current=0,h.current=!1,_.current=0,r?u&&T():E();return}if(!r){g.current=0,h.current=!1,_.current=0,E();return}if(D()){u&&T();return}w()},[l,y,r,u,D,E,T,w]),k=(0,K.useCallback)(()=>{if(!d||g.current>0&&Date.now()-g.current{_.current=Date.now(),t({skipAutoFocus:!0})};a>0?f.current=setTimeout(e,a):e()},[d,r,y,t,a]),A=(0,K.useCallback)(()=>{g.current=0,h.current&&(y(),p.current=setTimeout(()=>{n()},o))},[y,n,o]),j=(0,K.useCallback)(()=>{y()},[y]),M=(0,K.useCallback)(e=>{m.current=e},[]),N=(0,K.useCallback)(()=>{},[]),P=(0,K.useCallback)(e=>{},[]),F=(0,K.useCallback)(e=>{},[]);return i?{triggerProps:{onClick:O,onMouseEnter:k,onMouseLeave:A,...l?{popoverTarget:l}:null},contentProps:{onMouseEnter:j,onMouseLeave:A,onKeyDown:S},menuRef:x,focusFirst:C,focusMenu:T,confirmHoverOpen:D,close:w,setTriggerEl:M}:{triggerProps:{onClick:N,onMouseEnter:N,onMouseLeave:N},contentProps:{onMouseEnter:N,onMouseLeave:N,onKeyDown:F},menuRef:x,focusFirst:C,focusMenu:T,confirmHoverOpen:D,close:w,setTriggerEl:P}}function ro(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&e.key!==` `}function io(e){let{getItemLabels:t,onMatch:n,getCurrentIndex:r,resetMs:i=750,isDisabled:a}=e,o=(0,K.useRef)(``),s=(0,K.useRef)(void 0),c=(0,K.useCallback)(()=>{o.current=``,s.current&&=(clearTimeout(s.current),void 0)},[]),l=(0,K.useCallback)(()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=``,s.current=void 0},i)},[i]);return{onKeyDown:(0,K.useCallback)(e=>{let i=e.key===` `&&!e.ctrlKey&&!e.metaKey&&o.current.length>0;if(!ro(e)&&!i)return!1;let s=t();if(s.length===0)return!1;let c=e.key.toLowerCase(),u=o.current.length>0&&o.current.split(``).every(e=>e===c)?c:o.current+c;o.current=u,l();let d=r?.()??-1,f=s.length,p=d>=0,m=p?d:0,h=p&&u.length===1?1:0;for(let e=0;e`[role="${e}"]:not([aria-disabled="true"])`).join(`,`),so=`[role="menu"]`,co={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},open:{kWkggS:`x1lmrjuc`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0}},lo={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}},uo={popover:{k7Eaqz:`x5w4yej`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]};function fo(e){let{icon:t,label:n,description:r,isDisabled:i=!1,hasSpinner:a=!1,menuWidth:o,onOpenChange:s,children:c,xstyle:l,className:u,style:d,"data-testid":f,menuDataTestId:m}=e,h=Fa(),g=h?.menuSize??`md`,_=!i,v=(0,K.useId)(),y=(0,K.useId)(),b=(0,K.useRef)(null),[x,S]=(0,K.useState)(!1),C=ce({mode:`context`,lightDismiss:!1,onShow:(0,K.useCallback)(()=>{S(!0),s?.(!0)},[s]),onHide:(0,K.useCallback)(()=>{S(!1),s?.(!1)},[s])}),w=(0,K.useCallback)(()=>{_&&C.show()},[_,C]),T=(0,K.useCallback)(()=>{C.hide()},[C]),{listRef:E,handleKeyDown:D,focusFirst:k,focusItem:A,ownsEvent:j,getItems:M}=$a({itemSelector:oo,boundarySelector:so,wrap:!1,onEscape:()=>L({focusTrigger:!0})}),N=io({getItemLabels:()=>M().map(e=>e.textContent),onMatch:A,getCurrentIndex:()=>M().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))}),{triggerProps:P,contentProps:F,confirmHoverOpen:I}=no({show:w,hide:T,isOpen:x,isEnabled:_}),ee=(0,K.useCallback)(e=>{_&&(C.show(),e?.focusFirst&&(k()||E.current?.focus()))},[_,C,k,E]),L=(0,K.useCallback)(e=>{C.hide(),e?.focusTrigger!==!1&&b.current?.focus()},[C]),te=(0,K.useCallback)(e=>{b.current=e,C.ref(e)},[C]),z=(0,K.useCallback)(()=>{if(!i)if(x){if(I()){k()||E.current?.focus();return}L({focusTrigger:!0})}else ee({focusFirst:!0})},[i,x,ee,L,I,k,E]),B=(0,K.useCallback)(e=>{if(i)return;let t=typeof window<`u`&&b.current&&window.getComputedStyle(b.current).direction===`rtl`?`ArrowLeft`:`ArrowRight`;(e.key===t||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),ee({focusFirst:!0}))},[i,ee]),ne=(0,K.useCallback)(e=>Ra(e,i),[i]),re=(0,K.useCallback)(e=>{if(!j(e))return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),L({focusTrigger:!0});return}if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&ao.has(t.getAttribute(`role`)??``)&&t.click();return}let t=typeof window<`u`&&E.current&&window.getComputedStyle(E.current).direction===`rtl`?`ArrowRight`:`ArrowLeft`;if(e.key===t){e.preventDefault(),L({focusTrigger:!0});return}if(N.onKeyDown(e)){e.preventDefault();return}D(e)},[j,L,D,N,E]),V=(0,K.useMemo)(()=>({menuSize:g,closeMenu:()=>{L({focusTrigger:!1}),h?.closeMenu()}}),[g,L,h]),ie=a?(0,q.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,q.jsx)(Gt,{size:`sm`})}):(0,q.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,q.jsx)(ya,{icon:`chevronRight`,size:`sm`,color:`secondary`,...O(`dropdown-menu-indicator-icon`)})}),ae=o?uo.popoverCustomWidth(o):uo.popover;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Na,{ref:e=>te(e),id:y,role:`menuitem`,tabIndex:i?void 0:-1,"aria-haspopup":`menu`,"aria-expanded":x,"aria-controls":x?v:void 0,"aria-disabled":i||void 0,"data-testid":f,onMouseEnter:P.onMouseEnter,onMouseLeave:P.onMouseLeave,onPointerMove:ne,startContent:t?xa(t,{size:`sm`,color:`secondary`}):void 0,label:n,description:r,endContent:ie,onClick:z,onKeyDown:B,isDisabled:i,xstyle:[co.root,lo[g],x&&co.open,i&&co.disabled,l],...H(O(`dropdown-menu-item`,{size:g}),{className:u,style:d})}),C.render((0,q.jsx)(`div`,{ref:E,id:v,role:`menu`,tabIndex:-1,"aria-labelledby":y,onKeyDown:re,onMouseEnter:F.onMouseEnter,onMouseLeave:F.onMouseLeave,"data-testid":m,...H(O(`dropdown-menu`),{className:`x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92`}),children:(0,q.jsx)(Pa,{value:V,children:c})}),{placement:`end`,alignment:`start`,offset:p[`--spacing-1`],xstyle:[ae,R.end]})]})}fo.displayName=`DropdownMenuSubMenu`;function po(e,t){return`item-${e.id??t}`}function mo(e,t){return`section-${e.id??t}`}function ho(e,t){let{items:n,id:r,...i}=e;return(0,q.jsx)(Va,{...i},po(e,t))}function go(e){let t=[];for(let n=0;n0?t.push((0,q.jsx)(fo,{icon:r.icon,label:r.label,isDisabled:r.isDisabled,children:go(r.items)},po(r,n))):t.push(ho(r,n)))}return t}var _o={dropdown:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kskxy:`xuyqlj2`,kORKVm:`x1odjw0f`,"--_dropdown-menu-radius":`x1fcsqxe`,"--_dropdown-menu-padding":`xgory14`,kmVPX3:`x9epnlk`,kaIpWk:`x1n97fys`,kSiTet:`x1hc1fzr`,k1ekBW:`x19991ni`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0},popover:{k7Eaqz:`xrzjruh`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]},vo=`@astryx.dropdownMenu.label`;function yo({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:r,onClick:i,hasChevron:a=!0,placement:o=`below`,alignment:s=`start`,className:c,style:l,xstyle:u,"data-testid":d,...f}){let m=jr(),h=e??{label:m(vo)},g=(`items`in f?f.items:void 0)??[],_=f.children,{items:v,children:y,...b}=f,x=(0,K.useId)(),S=h.size??`md`,C=(0,K.useRef)(null),[T,E]=(0,K.useState)(!1),D=t!==void 0,k=D?t:T,A=(0,K.useCallback)(()=>{n?.(!1),D||E(!1),C.current?.focus()},[D,n]),j=(0,K.useRef)(!1),M=(0,K.useRef)(`keyboard`),N=Gr({onHide:A,onShow:(0,K.useCallback)(()=>{n?.(!0),D||E(!0)},[D,n]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:`none`}),P=(0,K.useCallback)(()=>{N.hide()},[N]),{listRef:F,handleKeyDown:I,focusFirst:ee,focusItem:L,ownsEvent:te,getItems:z}=$a({itemSelector:oo,boundarySelector:so,wrap:!1,onEscape:P}),B=io({getItemLabels:()=>z().map(e=>e.textContent),onMatch:L,getCurrentIndex:()=>z().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))});(0,K.useEffect)(()=>{D&&(t&&!N.isOpen?(j.current=!0,N.show()):!t&&N.isOpen&&N.hide())},[t,D,N]),(0,K.useEffect)(()=>{!N.isOpen||!j.current||(j.current=!1,requestAnimationFrame(()=>{(M.current===`pointer`||!ee())&&F.current?.focus(),M.current=`keyboard`}))},[N.isOpen,ee,F]);let ne=(0,K.useCallback)(e=>{if(te(e)){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&ao.has(t.getAttribute(`role`)??``)&&t.click();return}if(e.key===`Tab`){P();return}if(B.onKeyDown(e)){e.preventDefault();return}I(e)}},[I,P,B,te]),re=(0,K.useCallback)((e=`keyboard`)=>{M.current=e,j.current=!0,N.show()},[N]),V=(0,K.useCallback)(e=>{if(N.wasJustDismissed())return;i?.();let r=e.detail===0?`keyboard`:`pointer`;D?(t||(M.current=r),n?.(!t)):N.isOpen?N.hide():re(r)},[i,D,n,t,N,re]),ie=(0,K.useCallback)(e=>{N.isOpen||(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),re())},[N.isOpen,re]),ae=h.isIconOnly===!0,oe=h.endContent??(a&&!ae?(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`inherit`}):void 0),se=r?_o.popoverCustomWidth(r):_o.popover,ce=(0,K.useMemo)(()=>({closeMenu:P,menuSize:S}),[P,S]),le=f.items===void 0?_:go(g);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Br,{...h,ref:e=>{C.current=e,N.triggerRef(e);let t=h.ref;typeof t==`function`?t(e):t&&(t.current=e)},tooltip:k?void 0:h.tooltip,endContent:oe,onClick:V,onKeyDown:ie,"aria-haspopup":`menu`,"aria-expanded":k,"aria-controls":x,"data-testid":d}),N.render((0,q.jsx)(`div`,{...b,ref:F,id:x,role:`menu`,tabIndex:-1,"aria-label":h.label,onKeyDown:ne,...H(O(`dropdown-menu`),w(_o.dropdown,u),c,l),children:(0,q.jsx)(Pa,{value:ce,children:le})}),{placement:o,alignment:s,offset:p[`--spacing-1`],xstyle:[se,R[o]]})]})}yo.displayName=`DropdownMenu`;var bo={box:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kaIpWk:`xx3sua9`,k1ekBW:`xts7igz`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},unchecked:{kMwMTN:`xqwr325`,kVAM5u:`xvy26l8 xilc7fp`,kWkggS:`x10xzikg xeultfy`,$$css:!0},checked:{kMwMTN:`x17wrial`,kVAM5u:`xad5do x1ozl1p1`,kWkggS:`x1ewilqj x17srpfb`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kVAM5u:`x14i3s5s x61roa7`,$$css:!0},disabledUnchecked:{kWkggS:`xwmxj5m xqxnq6d`,$$css:!0},checkmark:{k1xSpc:`x1s85apg`,kMwMTN:`x17wrial xs5hli`,$$css:!0},checkmarkVisible:{k1xSpc:`x1lliihq`,$$css:!0},indeterminateMark:{k1xSpc:`x1s85apg`,kWkggS:`x1azo05 xwvh9j7`,kaIpWk:`xjspbzw`,$$css:!0},indeterminateMarkVisible:{k1xSpc:`x1lliihq`,$$css:!0}},xo={sm:{kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,$$css:!0}},So={sm:{kzqmXN:`xsmyaan`,kZKoxP:`x1kpxq89`,$$css:!0},md:{kzqmXN:`x6jxa94`,kZKoxP:`x1v9usgg`,$$css:!0}},Co={sm:{kzqmXN:`x1fsd2vl`,kZKoxP:`x36qwtl`,$$css:!0},md:{kzqmXN:`xsmyaan`,kZKoxP:`x36qwtl`,$$css:!0}};function wo({state:e,size:t=`md`,isDisabled:n=!1,children:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=e===`checked`,u=e===`indeterminate`,d=l||u;return(0,q.jsx)(`span`,{...c,ref:i,"aria-hidden":`true`,...H(O(`checkbox-indicator`,{size:t,checked:l?`checked`:u?`indeterminate`:null,disabled:n?`disabled`:null},{legacyNames:[`checkbox`]}),w(bo.box,xo[t],d?bo.checked:bo.unchecked,n&&bo.disabled,n&&!d&&bo.disabledUnchecked,s),a,o),children:mt(r)?r:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`svg`,{viewBox:`0 0 10 10`,...H(O(`checkbox-indicator-check`,{size:t}),w(bo.checkmark,So[t],l&&bo.checkmarkVisible)),children:(0,q.jsx)(`path`,{d:`M8.5 2.5L4 7.5L1.5 5`,stroke:`currentColor`,strokeWidth:`1.5`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,q.jsx)(`span`,{...H(O(`checkbox-indicator-dash`,{size:t}),w(bo.indeterminateMark,Co[t],u&&bo.indeterminateMarkVisible))})]})})}wo.displayName=`CheckboxIndicator`;var To={sm:`sm`,md:`sm`},Eo={slot:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,$$css:!0},enabled:{kMwMTN:`xqwr325`,$$css:!0},disabled:{kMwMTN:`xqa6c3m`,$$css:!0}};function Do({state:e,size:t=`md`,isDisabled:n=!1,children:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=e===`checked`;return mt(r)?(0,q.jsx)(`span`,{...c,ref:i,"aria-hidden":`true`,...H(w(Eo.slot,n?Eo.disabled:Eo.enabled,s),a,o),children:r}):l?(0,q.jsx)(ya,{...c,"aria-hidden":`true`,icon:`check`,size:To[t],color:n?`disabled`:`accent`,xstyle:s,className:a,style:o}):null}Do.displayName=`CheckIndicator`;var Oo={circle:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kaIpWk:`xjspbzw`,k1ekBW:`xts7igz`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},unchecked:{kVAM5u:`xvy26l8 xilc7fp`,kWkggS:`x10xzikg xeultfy`,$$css:!0},checked:{kVAM5u:`xad5do x1ozl1p1`,kWkggS:`x1ewilqj x17srpfb`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kVAM5u:`x14i3s5s x61roa7`,$$css:!0},disabledUnchecked:{kWkggS:`xwmxj5m xqxnq6d`,$$css:!0},dot:{kaIpWk:`xjspbzw`,kWkggS:`x1azo05 xwvh9j7`,$$css:!0}},ko={sm:{kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,$$css:!0}},Ao={sm:{kzqmXN:`x1xc55vz`,kZKoxP:`xdk7pt`,$$css:!0},md:{kzqmXN:`x1fsd2vl`,kZKoxP:`x170jfvy`,$$css:!0}};function jo({state:e,size:t=`md`,isDisabled:n=!1,children:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=e!==`unchecked`;return(0,q.jsx)(`span`,{...c,ref:i,"aria-hidden":`true`,...H(O(`radio-indicator`,{size:t,checked:l?`checked`:null,disabled:n?`disabled`:null},{legacyNames:[`radio`]}),w(Oo.circle,ko[t],l?Oo.checked:Oo.unchecked,n&&Oo.disabled,n&&!l&&Oo.disabledUnchecked,s),a,o),children:mt(r)?r:l&&(0,q.jsx)(`span`,{...H(O(`radio-indicator-dot`,{size:t},{legacyNames:[`radio-dot`]}),w(Oo.dot,Ao[t]))})})}jo.displayName=`RadioIndicator`;var Mo={check:Do,checkbox:wo,radio:jo};function No(e){return e==null?null:typeof e==`string`?ti(e):e}function Po(e){return No(e)?.indicators??null}function Fo(e,t){return Po(t)?.[e]??Mo[e]}function Io(e){return Fo(e,oa())}var Lo={root:{kzqmXN:`xh8yej3`,kaIpWk:`x1ws5lxm`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},marker:{kfzvcC:`x47corl`,kayTVb:`x1g77sc7 xozvky`,keTefX:`x1lziwak x1jymrmb`,$$css:!0}};function Ro({label:e,description:t,icon:n,value:r,onChange:i,isDisabled:a=!1,hasCloseOnSelect:o=!1,endContent:s,xstyle:c,className:l,style:u,...d}){let f=Fa(),p=f?.menuSize??`md`,m=p===`sm`?`sm`:`md`,h=Io(`checkbox`),g=(0,K.useCallback)(()=>{a||(i?.(!r),o&&f?.closeMenu())},[a,i,r,o,f]),_=(0,K.useCallback)(e=>Ra(e,a),[a]);return(0,q.jsx)(Na,{...d,role:`menuitemcheckbox`,"aria-checked":r,tabIndex:a?void 0:-1,onPointerMove:_,marker:(0,q.jsx)(h,{state:r?`checked`:`unchecked`,size:m,isDisabled:a,xstyle:Lo.marker}),startContent:n?xa(n,{size:`sm`,color:`secondary`}):void 0,label:e,description:t,endContent:s,onClick:g,isDisabled:a,xstyle:[Lo.root,a&&Lo.disabled,c],...H(O(`dropdown-menu-item`,{size:p}),{className:l,style:u})})}Ro.displayName=`DropdownMenuCheckboxItem`;var zo={group:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,$$css:!0}};function Bo({value:e,onChange:t,label:n,hasCloseOnSelect:r=!0,children:i,xstyle:a,className:o,style:s,...c}){let l=(0,K.useMemo)(()=>({value:e,onChange:t,hasCloseOnSelect:r}),[e,t,r]);return(0,q.jsx)(`div`,{...c,role:`group`,"aria-label":n,...H(w(zo.group,a),{className:o,style:s}),children:(0,q.jsx)(Ia,{value:l,children:i})})}Bo.displayName=`DropdownMenuRadioGroup`;var Vo={root:{kzqmXN:`xh8yej3`,kaIpWk:`x1ws5lxm`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},marker:{kfzvcC:`x47corl`,kayTVb:`x1g77sc7 xozvky`,keTefX:`x1lziwak x1jymrmb`,$$css:!0}};function Ho({value:e,label:t,description:n,icon:r,isDisabled:i=!1,endContent:a,xstyle:o,className:s,style:c,...l}){let u=Fa(),d=La();if(!d)throw Error(`DropdownMenuRadioItem must be used within a DropdownMenuRadioGroup`);let f=u?.menuSize??`md`,p=f===`sm`?`sm`:`md`,m=d.value===e,h=Io(`radio`),g=(0,K.useCallback)(()=>{i||(d.onChange(e),d.hasCloseOnSelect&&u?.closeMenu())},[i,d,e,u]),_=(0,K.useCallback)(e=>Ra(e,i),[i]);return(0,q.jsx)(Na,{...l,role:`menuitemradio`,"aria-checked":m,tabIndex:i?void 0:-1,onPointerMove:_,marker:(0,q.jsx)(h,{state:m?`checked`:`unchecked`,size:p,isDisabled:i,xstyle:Vo.marker,...O(`dropdown-menu-radio`,{size:p,checked:m?`checked`:null,disabled:i?`disabled`:null})}),startContent:r?xa(r,{size:`sm`,color:`secondary`}):void 0,label:t,description:n,endContent:a,onClick:g,isDisabled:i,xstyle:[Vo.root,i&&Vo.disabled,o],...H(O(`dropdown-menu-item`,{size:f}),{className:s,style:c})})}Ho.displayName=`DropdownMenuRadioItem`;var Uo=U(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Wo=U(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),Go=U(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ko=U(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),qo=U(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Jo=U(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Yo=U(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Xo=U(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Zo=U(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Qo=U(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),$o=U(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),es=U(`brush-cleaning`,[[`path`,{d:`m16 22-1-4`,key:`1ow2iv`}],[`path`,{d:`M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1`,key:`11gii7`}],[`path`,{d:`M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z`,key:`bju7h4`}],[`path`,{d:`m8 22 1-4`,key:`s3unb`}]]),ts=U(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),ns=U(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),rs=U(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),is=U(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),as=U(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),os=U(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ss=U(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),cs=U(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),ls=U(`circle-alert`,[[`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`}]]),us=U(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ds=U(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),fs=U(`circle-question-mark`,[[`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`}]]),ps=U(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),ms=U(`circle-x`,[[`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`}]]),hs=U(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),gs=U(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),_s=U(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),vs=U(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),ys=U(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),bs=U(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),xs=U(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),Ss=U(`copy`,[[`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`}]]),Cs=U(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),ws=U(`cpu`,[[`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`}]]),Ts=U(`download`,[[`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`}]]),Es=U(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ds=U(`ellipsis`,[[`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`}]]),Os=U(`external-link`,[[`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`}]]),ks=U(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),As=U(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),js=U(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Ms=U(`file-diff`,[[`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:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),Ns=U(`file-image`,[[`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`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Ps=U(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),Fs=U(`file-text`,[[`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`}]]),Is=U(`file`,[[`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`}]]),Ls=U(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),Rs=U(`folder-input`,[[`path`,{d:`M2 9V5a2 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 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),zs=U(`folder-open`,[[`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`}]]),Bs=U(`folder-plus`,[[`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`}]]),Vs=U(`folder`,[[`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`}]]),Hs=U(`funnel`,[[`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`}]]),Us=U(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Ws=U(`git-branch`,[[`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`}]]),Gs=U(`globe`,[[`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`}]]),Ks=U(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),qs=U(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Js=U(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ys=U(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Xs=U(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Zs=U(`lightbulb`,[[`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`}]]),Qs=U(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),$s=U(`list-checks`,[[`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`}]]),ec=U(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),tc=U(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),nc=U(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),rc=U(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ic=U(`mail-open`,[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]),ac=U(`maximize-2`,[[`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`}]]),oc=U(`maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),sc=U(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),cc=U(`message-circle-plus`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),lc=U(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`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`}]]),uc=U(`message-square-plus`,[[`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:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),dc=U(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),fc=U(`minimize-2`,[[`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`}]]),pc=U(`monitor`,[[`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`}]]),mc=U(`panel-bottom`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),hc=U(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),gc=U(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),_c=U(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),vc=U(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),yc=U(`pencil`,[[`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`}]]),bc=U(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),xc=U(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Sc=U(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Cc=U(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),wc=U(`rotate-ccw-clock`,[[`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`}]]),Tc=U(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Ec=U(`scan`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),Dc=U(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Oc=U(`server`,[[`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`}]]),kc=U(`settings-2`,[[`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`}]]),Ac=U(`settings`,[[`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`}]]),jc=U(`sheet`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`line`,{x1:`3`,x2:`21`,y1:`9`,y2:`9`,key:`1vqk6q`}],[`line`,{x1:`3`,x2:`21`,y1:`15`,y2:`15`,key:`o2sbyz`}],[`line`,{x1:`9`,x2:`9`,y1:`9`,y2:`21`,key:`1ib60c`}],[`line`,{x1:`15`,x2:`15`,y1:`9`,y2:`21`,key:`1n26ft`}]]),Mc=U(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Nc=U(`sliders-horizontal`,[[`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`}]]),Pc=U(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Fc=U(`square-arrow-out-up-right`,[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]]),Ic=U(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Lc=U(`square-terminal`,[[`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`}]]),Rc=U(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),zc=U(`sun`,[[`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`}]]),Bc=U(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Vc=U(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Hc=U(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),Uc=U(`trash-2`,[[`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`}]]),Wc=U(`triangle-alert`,[[`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`}]]),Gc=U(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),Kc=U(`upload`,[[`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`}]]),qc=U(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),Jc=U(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),Yc=U(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Xc=U(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),Zc=U(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Qc=U(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),$c=E(),el=Ie(),tl=e=>typeof e==`string`,nl=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},rl=e=>e==null?``:String(e),il=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},al=/###/g,ol=e=>e&&e.includes(`###`)?e.replace(al,`.`):e,sl=e=>!e||tl(e),cl=(e,t,n)=>{let r=tl(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=cl(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=cl(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=cl(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ul=(e,t,n,r)=>{let{obj:i,k:a}=cl(e,t,Object);i[a]=i[a]||[],i[a].push(n)},dl=(e,t)=>{let{obj:n,k:r}=cl(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},fl=(e,t,n)=>{let r=dl(e,n);return r===void 0?dl(t,n):r},pl=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?tl(e[r])||e[r]instanceof String||tl(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):pl(e[r],t[r],n):e[r]=t[r]);return e},ml=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),hl={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},gl=e=>tl(e)?e.replace(/[&<>"'\/]/g,e=>hl[e]):e,_l=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},vl=[` `,`,`,`?`,`!`,`;`],yl=new _l(20),bl=(e,t,n)=>{t||=``,n||=``;let r=vl.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=yl.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},xl=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;ee?.replace(/_/g,`-`),Cl={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},wl=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Cl,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>tl(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),tl(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Tl=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):tl(n)&&i?o.push(...n.split(i)):o.push(n)));let s=dl(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!tl(n)?s:xl(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),ll(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(tl(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=dl(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?pl(s,n,i):s={...s,...n},ll(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Dl={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Ol=Symbol(`i18next/PATH_KEY`);function kl(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ol?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Al(e,t){let{[Ol]:n}=e(kl()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var jl=e=>!tl(e)&&typeof e!=`boolean`&&typeof e!=`number`,Ml=class e extends Tl{constructor(e,t={}){super(),il([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=wl.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=jl(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bl(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:tl(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:tl(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Al(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Al(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!tl(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=jl(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(tl(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:jl(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&tl(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=tl(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!tl(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;oi?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=tl(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Dl.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return tl(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Al(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!tl(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(tl(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!tl(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Nl=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wl.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Sl(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Sl(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(tl(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),tl(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||tl(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=tl(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return tl(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):tl(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},Pl={zero:0,one:1,two:2,few:3,many:4,other:5},Fl={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Il=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=wl.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Sl(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Fl;if(!e.match(/-|_/))return Fl;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Pl[e]-Pl[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Ll=(e,t,n,r=`.`,i=!0)=>{let a=fl(e,t,n);return!a&&i&&tl(n)&&(a=xl(e,n,r),a===void 0&&(a=xl(t,n,r))),a},Rl=e=>e.replace(/\$/g,`$$$$`),zl=class{constructor(e={}){this.logger=wl.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?gl:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ml(i):a||`{{`,this.suffix=o?ml(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ml(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ml(l):``,this.nestingPrefix=d?ml(d):f||ml(`$t(`),this.nestingSuffix=p?ml(p):m||ml(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Ll(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Ll(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=tl(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!tl(a)&&!this.useRawValueToEscape&&(a=rl(a));let s=t.safeValue(a);if(e=e.replace(i[0],Rl(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${ml(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!tl(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!tl(i))return i;tl(i)||(i=rl(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Bl=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Vl=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Sl(r),i),t[o]=s),s(n)}},Hl=e=>(t,n,r)=>e(Sl(n),r)(t),Ul=class{constructor(e={}){this.logger=wl.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Vl:Hl;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Vl(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e-1&&!t.includes(`)`)&&e+1{let{formatName:i,formatOptions:a}=Bl(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Wl=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Gl=class extends Tl{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=wl.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ul(n.loaded,[i],a),Wl(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();tl(e)&&(e=this.languageUtils.toResolveHierarchy(e)),tl(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Kl=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),tl(e[1])&&(t.defaultValue=e[1]),tl(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ql=e=>(tl(e.ns)&&(e.ns=[e.ns]),tl(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),tl(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Jl=()=>{},Yl=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Xl=class e extends Tl{constructor(e={},t){if(super(),this.options=ql(e),this.services={},this.logger=wl,this.modules={external:[]},Yl(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(tl(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Kl();this.options={...n,...this.options,...ql(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?wl.init(r(this.modules.logger),this.options):wl.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Ul;let t=new Nl(this.options);this.store=new El(this.options.resources,this.options);let n=this.services;n.logger=wl,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Il(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new zl(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Gl(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Ml(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Jl,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=nl(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Jl){let n=t,r=tl(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=nl();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Jl,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Dl.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=tl(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(tl(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Al(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Al(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Al(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return tl(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=nl();return this.options.ns?(tl(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=nl();tl(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Nl(Kl());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Jl){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new El(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Kl().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new zl(n)}return a.translator=new Ml(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Xl.createInstance,Xl.dir,Xl.init,Xl.loadResources,Xl.reloadResources,Xl.use,Xl.changeLanguage,Xl.getFixedT,Xl.t,Xl.exists,Xl.setDefaultNamespace,Xl.hasLoadedNamespace,Xl.loadNamespaces,Xl.loadLanguages;var Zl={type:`3rdParty`,init(e){De(e.options.react),ke(e)}};function Ql({i18n:e,defaultNS:t,children:n}){let r=(0,K.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,K.createElement)(Oe.Provider,{value:r},n)}var $l=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},eu=(e=>e?$l(e):$l),tu=e=>e;function nu(e,t=tu){let n=K.useSyncExternalStore(e.subscribe,K.useCallback(()=>t(e.getState()),[e,t]),K.useCallback(()=>t(e.getInitialState()),[e,t]));return K.useDebugValue(n),n}var ru=Array.from({length:16},(e,t)=>`cell-${t+1}`);function iu({animated:e=!1,compact:t=!1}){let[n,r]=(0,K.useState)(0),i=t?10:16,a=(0,q.jsxs)(`strong`,{className:t?`brand-lockup compact`:`brand-lockup`,children:[(0,q.jsx)(`span`,{className:`brand-word`,children:`Open`}),(0,q.jsx)(`span`,{className:`pixel-mark`,role:`img`,"aria-label":`OpenPI`,children:ru.slice(0,i).map(e=>(0,q.jsx)(`i`,{},e))})]},n);return e?(0,q.jsx)(`button`,{className:`landing-brand`,type:`button`,"aria-label":`Replay OpenPI logo animation`,onClick:()=>r(e=>e+1),children:a}):a}function au(e,t,n){return Math.min(n,Math.max(t,Math.round(e)))}function ou({side:e,value:t,min:n,max:r,defaultValue:i,collapseThreshold:a,onCollapse:o,onExpandPastMax:s,onChange:c,onDraggingChange:l}){let{t:u}=W(),d=(0,K.useRef)(null),f=(e,t)=>{d.current?.pointerId===t&&(d.current=null,e.hasPointerCapture(t)&&e.releasePointerCapture(t),l(!1))},p=e=>c(au(e,n,r));return(0,q.jsx)(`hr`,{className:`pane-resizer ${e}`,tabIndex:0,"aria-label":u(e===`left`?`resizeSidebar`:`resizeWorkbar`),"aria-orientation":`vertical`,"aria-valuenow":t,"aria-valuemin":n,"aria-valuemax":r,"data-pane-resizer":e,onKeyDown:a=>{if(a.key===`Escape`&&d.current){a.preventDefault(),a.stopPropagation();let e=d.current;e.started&&p(e.startValue),f(a.currentTarget,e.pointerId);return}let o;switch(a.key){case`ArrowLeft`:case`ArrowRight`:o=t+(a.key===`ArrowRight`?1:-1)*(e===`left`?16:-16);break;case`Home`:o=n;break;case`End`:o=r;break;case`Enter`:o=i;break;default:return}a.preventDefault(),p(o)},onDoubleClick:()=>p(i),onPointerDown:e=>{e.button!==0||d.current||(e.preventDefault(),e.currentTarget.focus({preventScroll:!0}),d.current={pointerId:e.pointerId,startX:e.clientX,startValue:t,started:!1},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:t=>{let n=d.current;if(!n||n.pointerId!==t.pointerId)return;let i=t.clientX-n.startX;if(!n.started){if(Math.abs(i)<4)return;n.started=!0,l(!0)}let c=n.startValue+(e===`left`?i:-i);if(s&&c>=r+48){f(t.currentTarget,t.pointerId),s();return}if(o&&a!==void 0&&c<=a){f(t.currentTarget,t.pointerId),o();return}p(c)},onPointerUp:e=>f(e.currentTarget,e.pointerId),onPointerCancel:e=>{d.current?.pointerId===e.pointerId&&(d.current.started&&p(d.current.startValue),f(e.currentTarget,e.pointerId))},onLostPointerCapture:()=>{d.current&&(d.current=null,l(!1))}})}var su=`data-astryx-live-region`,cu=`position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;inset-block-start:0;inset-inline-start:0;pointer-events:none;user-select:none;`,lu=2e3,uu={polite:null,assertive:null};function du(e){let t=uu[e];t!=null&&(clearTimeout(t),uu[e]=null)}function fu(e,t){du(e),uu[e]=setTimeout(()=>{uu[e]=null,t.textContent=``},lu)}var pu=null;function mu(e){let t=document.createElement(`div`);return t.setAttribute(su,e),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-atomic`,`true`),t.setAttribute(`role`,e===`assertive`?`alert`:`status`),t.style.cssText=cu,document.body.appendChild(t),t}function hu(){return typeof document>`u`?null:pu?(pu.polite.isConnected||document.body.appendChild(pu.polite),pu.assertive.isConnected||document.body.appendChild(pu.assertive),pu):(pu={polite:mu(`polite`),assertive:mu(`assertive`)},pu)}function gu(e,t){let n=hu();if(!n)return;let r=t===`assertive`?n.assertive:n.polite;r.textContent=``,requestAnimationFrame(()=>{r.textContent=e}),fu(t,r)}function _u(e){if(du(e),!pu)return;let t=e===`assertive`?pu.assertive:pu.polite;t.textContent=``}function vu(){return(0,K.useCallback)((e,t=`polite`)=>{if(!e){_u(t);return}gu(e,t)},[])}var yu={base:{k1xSpc:`xjp7ctv`,kMwMTN:`x1tgivj0`,kMv6JI:`x9ynric`,$$css:!0},light:{kQNsl9:`x19aimcq`,$$css:!0},dark:{kQNsl9:`xntwwlm`,$$css:!0},system:{kQNsl9:`x108lcm5`,$$css:!0}},bu=K.createContext(!1);bu.displayName=`ThemeNestingContext`;var xu=new Set,Su=0;function Cu(e){let t=(0,K.useId)();(0,K.useInsertionEffect)(()=>{if(e.__built)return;let n=`astryx-theme-${e.name}`;if(xu.has(n))return;`${e.name}`,`${e.name}${e.name}${e.name}${e.name}`;let{prose:r,component:i}=Di(e),a=Ei();xu.add(n);let o=[()=>xu.delete(n)];if(a){if(Su++===0){let e=document.createElement(`style`);e.setAttribute(A(`theme-base`),``),e.textContent=`@layer astryx-base {\n${a}\n}`,document.head.appendChild(e)}o.push(()=>{--Su===0&&document.querySelector(`style[${A(`theme-base`)}]`)?.remove()})}if(r){let n=document.createElement(`style`);n.setAttribute(A(`theme-prose`),e.name),n.setAttribute(A(`id`),t),n.textContent=`@layer reset {\n${r}\n}`,document.head.appendChild(n)}if(i){let n=document.createElement(`style`);n.setAttribute(A(`theme`),e.name),n.setAttribute(A(`id`),t),n.textContent=`@layer astryx-theme {\n${i}\n}`,document.head.appendChild(n)}return(r||i)&&o.push(()=>{let n=document.querySelector(`style[${A(`theme-prose`)}="${e.name}"][${A(`id`)}="${t}"]`),r=document.querySelector(`style[${A(`theme`)}="${e.name}"][${A(`id`)}="${t}"]`);n?.remove(),r?.remove()}),()=>{for(let e of o)e()}},[e,t])}function wu(e,t,n){ne(()=>{if(!e&&!(typeof document>`u`))return t===`light`||t===`dark`?document.documentElement.setAttribute(`data-theme`,t):document.documentElement.removeAttribute(`data-theme`),document.documentElement.setAttribute(A(`theme`),n),()=>{document.documentElement.removeAttribute(`data-theme`),document.documentElement.removeAttribute(A(`theme`))}},[e,t,n])}function Tu({theme:e,mode:t=`system`,children:n}){let r=(0,K.use)(bu);ei(e),Cu(e),wu(r,t,e.name);let i=t===`dark`?yu.dark:t===`light`?yu.light:yu.system,a=(0,K.useMemo)(()=>({theme:e,mode:t}),[e,t]);return(0,q.jsx)(Ui,{value:a,children:(0,q.jsx)(bu,{value:!0,children:(0,q.jsx)(`div`,{...w(yu.base,i),"data-astryx-theme":e.name,"data-theme":t===`system`?void 0:t,children:n})})})}Tu.displayName=`Theme`;function Eu(e,t){let n=document.createElement(`span`);n.style.display=`none`,e.appendChild(n);try{return t.map(e=>(n.style.color=`var(${e})`,St(getComputedStyle(n).color)))}finally{n.remove()}}function Du(e){let t=[],n=e;for(;n!==null;){let e=getComputedStyle(n);if(e.backgroundImage!==`none`)return null;let r=St(e.backgroundColor);if(r!==null&&r.a>0&&(t.push(r),r.a>=1))break;n=n.parentElement}let r=t.pop();return r===void 0||r.a<1?null:t.reduceRight((e,t)=>qr(t,e),r)}var Ou=3;function ku(e,t,n,r){return n===null||r===null?null:t!==null&&Yr(t,e)>=Ou?`off`:Yr(n,e)>=Yr(r,e)?`dark`:`light`}function Au(e,t){let[n,r]=(0,K.useState)(null),{tokens:i}=sa(),a=(0,K.useRef)(null);return ne(()=>{let n=e.current?.parentElement??null;if(!t||n===null)return;let o=Du(n);if(o===null)return;let s=wt(o),c=a.current;if(c!==null&&c.background===s&&c.tokens===i)return;a.current={background:s,tokens:i};let[l,u,d]=Eu(n,[`--color-text-primary`,`--color-on-dark`,`--color-on-light`]),f=ku(o,l,u,d);f!==null&&r(e=>e===f?e:f)}),t?n:null}function ju({mode:e,fallback:t=`dark`,children:n}){let r=(0,K.useRef)(null),i=Au(r,e===`auto`),a=e===`auto`?i??t:e;return(0,q.jsx)(`div`,{ref:r,...a===`off`?null:{[A(`media`)]:a},...{0:{className:`xjp7ctv`},1:{className:`xjp7ctv x1tgivj0`}}[(a!==`off`)<<0],children:n})}ju.displayName=`MediaTheme`;var Mu=8,Nu=.4,Pu=48,Fu=1.2,Iu=1.2,Lu=`120%`,Ru=.4,zu=.02;function Bu(e,t){return Math.min(Math.max(e/t,0),1)}function Vu(e){e.style.removeProperty(`transition-duration`),e.style.removeProperty(`--_toast-swipe-y`),e.style.removeProperty(`--_toast-swipe-exit-y`),e.style.removeProperty(`--_toast-swipe-opacity`),e.style.removeProperty(`--_toast-swipe-scale`)}function Hu({direction:e,enabled:t,canPauseTimer:n,isTimerPaused:r,pauseTimer:i,resumeTimer:a,dismiss:o,shouldIgnoreTarget:s}){let c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useCallback)(e=>{let t=c.current,n=l.current;l.current=null,t&&Vu(t),e&&n?.pausedTimer&&a()},[a]),d=(0,K.useCallback)((a,o)=>{let u=c.current;if(!u||!t||l.current!=null||s(o,u))return!1;let d=n&&!r();d&&i();let f=Math.max(u.getBoundingClientRect().height,1);return l.current={pointerId:a.pointerId,startX:a.clientX,startY:a.clientY,startTime:Date.now(),direction:e,intent:`pending`,pausedTimer:d,surfaceSize:f,dismissThreshold:Math.max(f*Nu,Pu)},!0},[n,e,t,r,i,s]),f=(0,K.useCallback)((e,t,n)=>{let r=l.current,i=c.current;if(!r||!i||e.pointerId!==r.pointerId)return;let a=e.clientX-r.startX,o=e.clientY-r.startY,s=Math.abs(a),d=Math.abs(o);if(r.intent===`pending`){if(s>Mu&&s>d){n?.(),u(!0);return}if(d<=Mu||d<=s*Iu)return;if(r.intent=o*r.direction>0?`vertical`:`opposite`,r.intent===`opposite`){n?.(),u(!0);return}i.style.setProperty(`transition-duration`,`0s`)}t();let f=Math.max(0,o*r.direction),p=Bu(f,r.surfaceSize);i.style.setProperty(`--_toast-swipe-y`,`${f*r.direction}px`),i.style.setProperty(`--_toast-swipe-opacity`,(1-p*Ru).toFixed(3)),i.style.setProperty(`--_toast-swipe-scale`,(1-p*zu).toFixed(3))},[u]),p=(0,K.useCallback)(e=>{let t=l.current,n=c.current;if(!t||!n||e.pointerId!==t.pointerId)return;let r=Math.max(0,(e.clientY-t.startY)*t.direction),i=Math.max(1,Date.now()-t.startTime),s=t.intent===`vertical`&&(r>=t.dismissThreshold||r>=Pu&&r/i>Fu);if(l.current=null,n.style.removeProperty(`transition-duration`),s){n.style.setProperty(`--_toast-swipe-exit-y`,t.direction===1?Lu:`calc(-1 * ${Lu})`),o();return}Vu(n),t.pausedTimer&&a()},[o,a]),m=(0,K.useCallback)(e=>{e.pointerType===`pen`&&(e.button==null||e.button===0)&&d(e,e.target)&&c.current?.setPointerCapture?.(e.pointerId)},[d]),h=(0,K.useCallback)(e=>{e.pointerType===`pen`&&f(e,()=>e.preventDefault(),()=>c.current?.releasePointerCapture?.(e.pointerId))},[f]),g=(0,K.useCallback)(e=>{e.pointerType===`pen`&&(c.current?.releasePointerCapture?.(e.pointerId),p(e))},[p]),_=(0,K.useCallback)(e=>{e.pointerType===`pen`&&l.current?.pointerId===e.pointerId&&u(!0)},[u]);return(0,K.useEffect)(()=>{let e=c.current;if(!e||!t)return;let n=e=>({pointerId:e.identifier,clientX:e.clientX,clientY:e.clientY}),r=e=>{let t=l.current?.pointerId;return t==null?void 0:[...e.changedTouches].find(e=>e.identifier===t)},i=e=>{let t=e.touches.length===1?e.changedTouches[0]:null;t&&d(n(t),e.target)},a=e=>{let t=r(e);t&&f(n(t),()=>{e.cancelable&&e.preventDefault()})},o=e=>{let t=r(e);t?p(n(t)):e.touches.length===0&&u(!0)},s=()=>u(!0);return e.addEventListener(`touchstart`,i,{passive:!0}),e.addEventListener(`touchmove`,a,{passive:!1}),e.addEventListener(`touchend`,o,{passive:!0}),e.addEventListener(`touchcancel`,s,{passive:!0}),()=>{e.removeEventListener(`touchstart`,i),e.removeEventListener(`touchmove`,a),e.removeEventListener(`touchend`,o),e.removeEventListener(`touchcancel`,s)}},[d,t,p,f,u]),{rootRef:c,bindings:{onPointerDown:m,onPointerMove:h,onPointerUp:g,onPointerCancel:_,onLostPointerCapture:_}}}var Uu=`${wa},[tabindex],[contenteditable]:not([contenteditable="false"])`;function Wu(e,t){if(!(e instanceof Element))return!1;let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(Uu))return!0;n=n.parentElement}return!1}p[`--spacing-2`];function Gu(e){return(0,q.jsx)(Ku,{...e,gestureDirection:1})}function Ku({type:e,body:t,endContent:n,isAutoHide:r,autoHideDuration:i,isExiting:a=!1,onDismiss:o,renderContent:s,gestureDirection:c}){let l=jr(),u=(0,K.useRef)(null),d=(0,K.useRef)(!1),f=(0,K.useRef)(i),p=(0,K.useRef)(null),m=(0,K.useRef)(o);m.current=o;let h=(0,K.useCallback)(()=>{!r||d.current||(u.current&&clearTimeout(u.current),p.current=Date.now(),u.current=setTimeout(()=>{m.current(`auto`)},f.current))},[r]),g=(0,K.useCallback)(()=>{if(!(!r||d.current)&&(d.current=!0,u.current&&=(clearTimeout(u.current),null),p.current!=null)){let e=Date.now()-p.current;f.current=Math.max(f.current-e,1e3)}},[r]),_=(0,K.useCallback)(()=>{!r||!d.current||(d.current=!1,h())},[r,h]);(0,K.useEffect)(()=>(f.current=i,h(),()=>{u.current&&clearTimeout(u.current)}),[i,h]),(0,K.useEffect)(()=>{if(r)return window.addEventListener(`blur`,g),window.addEventListener(`focus`,_),()=>{window.removeEventListener(`blur`,g),window.removeEventListener(`focus`,_)}},[r,g,_]);let v=(0,K.useCallback)(()=>d.current,[]),y=(0,K.useCallback)(()=>{m.current(`manual`)},[]),{rootRef:b,bindings:x}=Hu({direction:c,enabled:!a,canPauseTimer:r,isTimerPaused:v,pauseTimer:g,resumeTimer:_,dismiss:y,shouldIgnoreTarget:Wu}),S=(0,K.useCallback)(()=>{o(`manual`)},[o]),C=e===`error`,{mode:w}=sa(),T=C||w===`light`?`dark`:`light`;return(0,q.jsx)(`div`,{ref:b,role:C?`alert`:`status`,"aria-live":C?`assertive`:`polite`,"aria-atomic":`true`,onMouseEnter:g,onMouseLeave:_,onFocusCapture:g,onBlurCapture:_,...x,...H(O(`toast`,{type:e}),{0:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x1i7u4iq x9ynric xjm74w1 xw6l6zx x1qk3xlt x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c xenstv7`},2:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x1i7u4iq x9ynric xjm74w1 xw6l6zx x1qk3xlt x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c x1l5t2a3`},1:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c xenstv7 xg01cxk x149p1fo`},3:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c x1l5t2a3 xg01cxk x149p1fo`}}[!!C<<1|!!a<<0]),children:(0,q.jsx)(ju,{mode:`auto`,fallback:T,children:s?s({body:t,endContent:n,type:e,isAutoHide:r,autoHideDuration:i,dismiss:S}):(0,q.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xozqiw3 xjcht0a xh8yej3`,children:[(0,q.jsx)(`div`,{className:`x98rzlu xeuugli xj0a0fe`,children:t}),(0,q.jsxs)(`div`,{className:`x2lah0s x78zum5 x6s0dn4 x1txdalj x1q370uo xmequkd`,children:[n,(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,icon:(0,q.jsx)(ya,{icon:`close`,size:`sm`,color:`inherit`}),label:l(`@astryx.toast.dismiss`),onClick:S,isIconOnly:!0})]})]})})})}Gu.displayName=`Toast`,Ku.displayName=`ToastSurface`;var qu=(0,K.createContext)(null);qu.displayName=`InteractiveRoleContext`;var Ju=`button, [role="button"]`;function Yu(e){return e.matches(Ju)?e:e.querySelector(Ju)}var Xu={contentPadding:{kLKAdn:`x1vlblms`,kGO01o:`xvmdzux`,kZCmMZ:`x126nfab`,kwRFfy:`x1t818jl`,$$css:!0},customWidth:e=>[{kzqmXN:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x5lhr3w`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}],matchTrigger:{k7Eaqz:`xrzjruh`,$$css:!0}};function Zu({children:e,anchorRef:t,content:n,placement:r=`below`,alignment:i=`start`,isOpen:a,onOpenChange:o,isEnabled:s=!0,width:c,label:l,role:u=`dialog`,isModal:d,hasCloseButton:f,closeButtonLabel:m,hasAutoFocus:h,hasLightDismiss:g=!0,hasEscapeDismiss:_=!0,xstyle:v,className:y,style:b,"data-testid":x}){let S=(0,K.useRef)(null),C=a!==void 0,w=(0,K.useCallback)(()=>{o?.(!0)},[o]),T=(0,K.useCallback)(()=>{o?.(!1)},[o]),E=Wr({dialogLabel:l,role:u,isModal:d,hasLightDismiss:g,hasEscapeDismiss:_,hasCloseButton:f,closeButtonLabel:m,hasAutoFocus:h,surfaceTarget:`popover`,xstyle:[Xu.contentPadding,v],className:y,style:b,onShow:w,onHide:T}),D=(0,K.useCallback)(()=>{s&&E.toggle()},[s,E]),O=(0,K.useCallback)(e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),D())},[D]),k=(0,K.useCallback)(e=>{e.setAttribute(`aria-haspopup`,E.triggerProps[`aria-haspopup`]),e.setAttribute(`aria-expanded`,String(E.triggerProps[`aria-expanded`])),e.setAttribute(`aria-controls`,E.triggerProps[`aria-controls`]),e.addEventListener(`click`,D);let t=e.tagName!==`BUTTON`&&e.getAttribute(`role`)===`button`;return t&&e.addEventListener(`keydown`,O),()=>{e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-expanded`),e.removeAttribute(`aria-controls`),e.removeEventListener(`click`,D),t&&e.removeEventListener(`keydown`,O)}},[E,D,O]);ne(()=>{if(!t)return;let e=t.current;if(!e)return;let n=Yu(e);if(!n)return;E.triggerRef(e);let r=k(n);return()=>{E.triggerRef(null),r()}},[t,E,k]),ne(()=>{if(t||typeof e==`function`)return;let n=S.current;if(!n)return;E.triggerRef(n);let r=Yu(n);if(!r)return;let i=k(r);return()=>{E.triggerRef(null),i()}},[t,E,k]),ne(()=>{C&&(a&&!E.isOpen?E.show():!a&&E.isOpen&&E.hide())},[a,C,E]);let A=c?Xu.customWidth(c):Xu.matchTrigger;if(t&&e==null)return(0,q.jsx)(q.Fragment,{children:E.render((0,q.jsx)(`div`,{"data-testid":x,children:n}),{placement:r,alignment:i,offset:p[`--spacing-1`],xstyle:[A,R[r]]})});if(typeof e==`function`){let t={ref:E.triggerRef,onClick:D,"aria-haspopup":`dialog`,"aria-expanded":E.isOpen,"aria-controls":E.id};return(0,q.jsxs)(q.Fragment,{children:[e(t),E.render((0,q.jsx)(`div`,{"data-testid":x,children:n}),{placement:r,alignment:i,offset:p[`--spacing-1`],xstyle:[A,R[r]]})]})}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(qu,{value:`button`,children:(0,q.jsx)(`div`,{ref:S,className:`x3nfvp2`,children:e})}),E.render((0,q.jsx)(`div`,{"data-testid":x,children:n}),{placement:r,alignment:i,offset:p[`--spacing-1`],xstyle:[A,R[r]]})]})}Zu.displayName=`Popover`;var Qu={container:{kWkggS:`x10xzikg`,"--_hovercard-radius":`xqwz7mz`,kaIpWk:`x7a53xk`,kGVxlE:`x14hfi27`,$$css:!0}};function $u(e){return e.hasAttribute(`tabindex`)?e.tabIndex>=0:[`A`,`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function ed(e={}){let{placement:t=`above`,alignment:n=`center`,delay:r=300,hideDelay:i=200,focusTrigger:a=`auto`,touchTrigger:o=`auto`,isEnabled:s=!0,label:c,isOpen:l,isDefaultOpen:u=!1,onShow:d,onHide:f}=e,m=ce({mode:`context`,lazyMount:!0,onShow:d,onHide:f}),h=Qu.container,g=(0,K.useRef)(null),_=(0,K.useRef)(null),v=(0,K.useRef)(null),y=(0,K.useRef)(!1),b=(0,K.useRef)(!1),x=(0,K.useCallback)(()=>{g.current&&=(clearTimeout(g.current),null),_.current&&=(clearTimeout(_.current),null)},[]),S=(0,K.useCallback)(()=>{x(),m.show()},[x,m]),C=(0,K.useCallback)(()=>{x(),y.current=!1,m.hide()},[x,m]),w=P({touchTrigger:o,isEnabled:s,isControlled:l!==void 0,isOpen:m.isOpen,layerId:m.id,triggerRef:v,show:S,hide:C}),T=(0,K.useCallback)(()=>{!s||l===!1||(x(),g.current=setTimeout(()=>{m.show()},r))},[s,l,x,m,r]),E=(0,K.useCallback)(()=>{l!==!0&&(x(),_.current=setTimeout(()=>{y.current||m.hide()},i))},[l,x,m,i]),D=(0,K.useCallback)(()=>{w.isTouchPointerRef.current||T()},[w,T]),k=(0,K.useCallback)(()=>{w.isTouchPointerRef.current||E()},[w,E]),A=(0,K.useCallback)(e=>{w.handlePointerDown(e)},[w]),M=(0,K.useCallback)(()=>{if(s&&!w.isTouchInteraction()){if(b.current){b.current=!1;return}x(),m.show()}},[s,w,x,m]),N=(0,K.useCallback)(e=>{let t=e.relatedTarget;document.getElementById(m.id)?.contains(t)||E()},[m.id,E]);j({isActive:!0,isPresent:()=>{let e=typeof document>`u`?null:document.getElementById(m.id);if(e==null)return!1;try{return e.matches(`:popover-open`)}catch{return m.isOpen}},onDismiss:()=>{if(x(),w.clearTapOpen(),l!==void 0){f?.();return}let e=(typeof document>`u`?null:document.getElementById(m.id))?.contains(document.activeElement)??!1;m.hide(),e&&(b.current=!0,v.current?.focus())}});let{handlePointerEnter:F}=w,I=(0,K.useCallback)(e=>{v.current&&(v.current.removeEventListener(`mouseenter`,D),v.current.removeEventListener(`mouseleave`,k),v.current.removeEventListener(`focusin`,M),v.current.removeEventListener(`focusout`,N),v.current.removeEventListener(`pointerenter`,F),v.current.removeEventListener(`pointerdown`,A)),e&&(e.addEventListener(`pointerenter`,F),e.addEventListener(`mouseenter`,D),e.addEventListener(`mouseleave`,k),e.addEventListener(`pointerdown`,A),(a===`always`||a===`auto`&&$u(e))&&(e.addEventListener(`focusin`,M),e.addEventListener(`focusout`,N))),v.current=e},[a,D,k,M,N,F,A]),ee=(0,K.useCallback)(e=>{m.ref(e),I(e)},[m,I]);(0,K.useEffect)(()=>()=>{x()},[x]),(0,K.useEffect)(()=>{u&&m.show()},[]),(0,K.useEffect)(()=>{if(l!==void 0)if(l)x(),m.show();else{x();let e=(typeof document>`u`?null:document.getElementById(m.id))?.contains(document.activeElement)??!1;m.hide(),e&&(b.current=!0,v.current?.focus())}},[l,x,m]);let L=(0,K.useCallback)((e,r)=>{let i=r?.placement??t,a=O(`hover-card`,void 0,{legacyNames:[`hovercard`]}).className,o={placement:i,alignment:r?.alignment??n,offset:p[`--spacing-1`],role:c?`dialog`:`group`,"aria-label":c||void 0,xstyle:[h,R[i],r?.xstyle],className:r?.className?`${a} ${r.className}`:a,style:r?.style,as:`div`};return m.render((0,q.jsx)(`div`,{className:`x1lliihq x1vlblms xvmdzux x126nfab x1t818jl`,onMouseEnter:()=>{w.isTouchPointerRef.current||(y.current=!0,x())},onMouseLeave:()=>{w.isTouchPointerRef.current||(y.current=!1,E())},onBlur:e=>{let t=e.relatedTarget;e.currentTarget.contains(t)||v.current?.contains(t)||E()},children:e}),o)},[m,t,n,c,x,E,h,w]);return{ref:ee,positionRef:m.ref,interactionRef:I,anchorId:m.anchorId,id:m.id,describedBy:m.id,isOpen:m.isOpen,renderHoverCard:L,show:m.show,hide:m.hide}}async function td(e,t=n){let n=t,r=t.defaultView??globalThis.window,{HTMLInputElement:i,HTMLTextAreaElement:a,HTMLElement:o}=r;try{return await r.navigator.clipboard.writeText(e),!0}catch{}let s=n.activeElement,c=r.getSelection(),l=c?Array.from({length:c.rangeCount},(e,t)=>c.getRangeAt(t).cloneRange()):[],u=s instanceof i||s instanceof a?{start:s.selectionStart,end:s.selectionEnd,direction:s.selectionDirection}:null,d=n.createElement(`textarea`);d.value=e,d.readOnly=!0,d.style.cssText=`position:fixed;opacity:0;pointer-events:none`;try{return n.body.append(d),d.focus({preventScroll:!0}),d.select(),n.execCommand(`copy`)}catch{return!1}finally{if(d.remove(),s instanceof o&&s.isConnected&&(s.focus({preventScroll:!0}),u&&u.start!==null&&u.end!==null&&(s instanceof i||s instanceof a)&&s.setSelectionRange(u.start,u.end,u.direction??void 0)),c){c.removeAllRanges();for(let e of l)e.startContainer.isConnected&&e.endContainer.isConnected&&c.addRange(e)}}}var nd=8e3;function rd(e,t){let n=0;for(let r of e){let e=r.codePointAt(0);if(n+=e<=127?1:e<=2047?2:e<=65535?3:4,n>t)return}return n}function id(e){return rd(e,1/0)}function ad(e){return rd(e,nd)!==void 0}var od=12288;function sd(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function cd(e,t=!1){let n=t?e.slice(-24576):e.slice(0,od*2),r=n.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\|$)/gu,``).replace(/(?:\x1b\[|\x9b)[0-?]*[ -/]*[@-~]/gu,``).replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/gu,``).split(` +`)}\n}`);let s=Ti(e);return s&&(o=o?`${o}\n\n${s}`:s),{prose:a,component:o}}var Oi={..._,...l,...C,...h,...le,...u,...x,...d,...v,...T,...B,...S,...f,...Qr};function ki(e){return`var(${e})`}Object.fromEntries(Object.keys(Oi).map(e=>[e,ki(e)]));function Ai(e){let t=0,n=null,r=!1;for(let i=0;if*e*s.a+p*t*c.a,_=g(s.r,c.r),v=g(s.g,c.g),y=g(s.b,c.b);return wt({...h===0?{r:0,g:0,b:0}:{r:_/h,g:v/h,b:y/h},a:h*m})}function Ii(e){let t=e.indexOf(`color-mix(`);if(t===-1)return e;let n=t+9,r=Ni(e,n);if(r===-1)return e;let i=Ii(e.slice(n+1,r)),a=Fi(i)??`color-mix(${i})`;return e.slice(0,t)+a+Ii(e.slice(r+1))}function Li(e,t,n,r){let i=e.indexOf(`var(`);if(i===-1)return e;let a=i+3,o=Ni(e,a);if(o===-1)return e;let s=e.slice(a+1,o),c=Ai(s),l=(c?c[0]:s).trim(),u=c?c[1]:null,d;r.has(l)?d=e.slice(i,o+1):l in t?(r.add(l),d=zi(l,t,n,r),r.delete(l)):d=u===null?e.slice(i,o+1):Li(u.trim(),t,n,r);let f=Li(e.slice(o+1),t,n,r);return e.slice(0,i)+d+f}function Ri(e,t,n,r){return!e.includes(`var(`)&&!e.includes(`color-mix(`)?e:Ii(Li(e,t,n,r))}function zi(e,t,n,r){if(e in n)return n[e];let i=t[e];if(i===void 0)return``;let a=Ri(i,t,n,r);return n[e]=a,a}function Bi(e){let t={};for(let n of Object.keys(e))zi(n,e,t,new Set);return t}function Vi(e,t){let{mode:n}=t,r={};for(let[e,t]of Object.entries(Oi))r[e]=Mi(t,n);if(e==null)return Bi(r);for(let[t,i]of Object.entries(e.tokens))r[t]=Mi(i,n);if(e.__inputTokens)for(let[t,i]of Object.entries(e.__inputTokens))i!==void 0&&(r[t]=Mi(i,n));return Bi(r)}function Hi(e,t=!1){let n=(0,K.useCallback)(t=>{let n=window.matchMedia(e);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},[e]),r=(0,K.useCallback)(()=>window.matchMedia(e).matches,[e]),i=(0,K.useCallback)(()=>t,[t]);return(0,K.useSyncExternalStore)(n,r,i)}var Ui=(0,K.createContext)(null);Ui.displayName=`ThemeContext`;function Wi(){if(typeof document>`u`)return null;let e=document.documentElement.getAttribute(`data-theme`);return e===`light`||e===`dark`?e:null}function Gi(){return null}function Ki(){return typeof document>`u`?null:document.documentElement.getAttribute(A(`theme`))}function qi(){return null}function Ji(){return null}var Yi=new Set,Xi=null,Zi=new Set,Qi=null;function $i(){for(let e of Yi)e()}function ea(e){return Yi.add(e),Yi.size===1&&typeof MutationObserver<`u`&&(Xi=new MutationObserver($i),Xi.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})),()=>{Yi.delete(e),Yi.size===0&&Xi&&(Xi.disconnect(),Xi=null)}}function ta(){for(let e of Zi)e()}function na(e){return Zi.add(e),Zi.size===1&&typeof MutationObserver<`u`&&(Qi=new MutationObserver(ta),Qi.observe(document.documentElement,{attributes:!0,attributeFilter:[A(`theme`)]})),()=>{Zi.delete(e),Zi.size===0&&Qi&&(Qi.disconnect(),Qi=null)}}function ra(){return()=>{}}function ia(e){return(0,K.useSyncExternalStore)(e?ra:ea,e?Ji:Wi,Gi)}function aa(e){return(0,K.useSyncExternalStore)(e?ra:na,e?Ji:Ki,qi)}function oa(){let e=(0,K.use)(Ui),t=aa(e!=null);return e?.theme.name??t}function sa(){let e=(0,K.use)(Ui),t=e!=null,n=ia(t),r=aa(t),i=Hi(`(prefers-color-scheme: dark)`),a=e?.mode??n??`system`,o=e?.theme??ti(r),s=a===`system`?i?`dark`:`light`:a,c=(0,K.useMemo)(()=>Vi(o,{mode:s}),[o,s]),l=(0,K.useCallback)(e=>c[e]??``,[c]),u=o?.name??`default`;return(0,K.useMemo)(()=>({name:u,mode:s,token:l,tokens:c}),[u,s,l,c])}var ca={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.5,strokeLinecap:`round`,strokeLinejoin:`round`,width:`1em`,height:`1em`,"aria-hidden":!0},la={xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,width:`1em`,height:`1em`,"aria-hidden":!0},ua={close:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M6 6l12 12M6 18L18 6`})}),chevronDown:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M6 9l6 6 6-6`})}),"numberInput:stepperDown":(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M7.5 9.75l4.5 4.5 4.5-4.5`})}),chevronLeft:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M15 6l-6 6 6 6`})}),chevronRight:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M9 6l6 6-6 6`})}),chevronsLeft:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M18 6l-6 6 6 6M11 6l-6 6 6 6`})}),chevronsRight:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M6 6l6 6-6 6M13 6l6 6-6 6`})}),check:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M5 13l4 4L19 7`})}),success:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3a9 9 0 100 18 9 9 0 000-18zm4.06 6.56a.75.75 0 00-1.12-1l-3.94 4.4-1.94-1.94a.75.75 0 00-1.06 1.06l2.5 2.5a.75.75 0 001.09-.03l4.47-5z`})}),error:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3a9 9 0 100 18 9 9 0 000-18zm-2.47 5.47a.75.75 0 00-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 101.06 1.06L12 13.06l2.47 2.47a.75.75 0 101.06-1.06L13.06 12l2.47-2.47a.75.75 0 00-1.06-1.06L12 10.94l-2.47-2.47z`})}),warning:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M10.29 3.86L2.07 19.05A2 2 0 003.78 22h16.44a2 2 0 001.71-2.95L13.71 3.86a2 2 0 00-3.42 0zM12 9a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 9zm0 9a1 1 0 100-2 1 1 0 000 2z`})}),info:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M12 3a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 100 2 1 1 0 000-2zm-.75 3.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5z`})}),calendar:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`}),(0,q.jsx)(`path`,{d:`M16 2v4M8 2v4M3 10h18`})]}),clock:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,q.jsx)(`path`,{d:`M12 7v5l3 3`})]}),externalLink:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6`}),(0,q.jsx)(`path`,{d:`M15 3h6v6`}),(0,q.jsx)(`path`,{d:`M10 14L21 3`})]}),menu:(0,q.jsx)(`svg`,{...ca,strokeWidth:2,children:(0,q.jsx)(`path`,{d:`M4 6h16M4 12h16M4 18h16`})}),moreHorizontal:(0,q.jsxs)(`svg`,{...la,children:[(0,q.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.5`}),(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,q.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.5`})]}),search:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,q.jsx)(`path`,{d:`M21 21l-4.35-4.35`})]}),arrowUp:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M12 19V5m0 0l-7 7m7-7l7 7`})}),arrowDown:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M12 5v14m0 0l7-7m-7 7l-7-7`})}),arrowsUpDown:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5`})}),funnel:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z`})}),eyeSlash:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M3.98 8.223A10.477 10.477 0 001.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88`})}),viewColumns:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125z`})}),copy:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z`}),(0,q.jsx)(`path`,{d:`M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2`})]}),checkDouble:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M2 13l4 4L14 7`}),(0,q.jsx)(`path`,{d:`M9 13l4 4L21 7`})]}),wrench:(0,q.jsx)(`svg`,{...ca,children:(0,q.jsx)(`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z`})}),stop:(0,q.jsx)(`svg`,{...la,children:(0,q.jsx)(`rect`,{x:`6`,y:`6`,width:`12`,height:`12`,rx:`2`})}),microphone:(0,q.jsxs)(`svg`,{...ca,children:[(0,q.jsx)(`path`,{d:`M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z`}),(0,q.jsx)(`path`,{d:`M19 10v1a7 7 0 01-14 0v-1`}),(0,q.jsx)(`path`,{d:`M12 18v4m-4 0h8`})]})},da={};function fa(e){return e==null?null:typeof e==`string`?ti(e)?.icons??null:e.icons??null}function pa(e,t){return fa(t)?.[e]??da[e]??ua[e]}var ma={root:{kmuXW:`x2lah0s`,$$css:!0},span:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,$$css:!0}},ha={primary:{kMwMTN:`xtbr613`,$$css:!0},secondary:{kMwMTN:`xv9yike`,$$css:!0},tertiary:{kMwMTN:`xv9yike`,$$css:!0},disabled:{kMwMTN:`xqa6c3m`,$$css:!0},accent:{kMwMTN:`xqwr325`,$$css:!0},success:{kMwMTN:`xtjic6`,$$css:!0},error:{kMwMTN:`xjt36v0`,$$css:!0},warning:{kMwMTN:`xs3pv69`,$$css:!0},inherit:{kMwMTN:`x1heor9g`,$$css:!0},blue:{kMwMTN:`x1fns2mt`,$$css:!0},red:{kMwMTN:`xeffzf7`,$$css:!0},green:{kMwMTN:`xmxeech`,$$css:!0},gray:{kMwMTN:`x1eyinzz`,$$css:!0},cyan:{kMwMTN:`x157w0xa`,$$css:!0},teal:{kMwMTN:`x1f3zxcb`,$$css:!0},yellow:{kMwMTN:`x1g6zdft`,$$css:!0},orange:{kMwMTN:`xxu74a4`,$$css:!0},pink:{kMwMTN:`x1kxxfg5`,$$css:!0},purple:{kMwMTN:`xzdw94u`,$$css:!0}},ga={xsm:{kzqmXN:`x1jw3ynk`,kZKoxP:`xvle69y`,$$css:!0},sm:{kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,$$css:!0},md:{kzqmXN:`xwqq7k2`,kZKoxP:`xmll18r`,$$css:!0},lg:{kzqmXN:`xp8d6y2`,kZKoxP:`xam5rvr`,$$css:!0}},_a={xsm:{kzqmXN:`x1jw3ynk`,kZKoxP:`xvle69y`,kGuDYH:`xboafo0`,$$css:!0},sm:{kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,kGuDYH:`x1jchvi3`,$$css:!0},md:{kzqmXN:`xwqq7k2`,kZKoxP:`xmll18r`,kGuDYH:`x1603h9y`,$$css:!0},lg:{kzqmXN:`xp8d6y2`,kZKoxP:`xam5rvr`,kGuDYH:`xngnso2`,$$css:!0}};function va(e){return e!=null&&e!==``?{role:`img`,"aria-label":e}:{"aria-hidden":`true`}}function ya({icon:e,color:t=`inherit`,size:n=`md`,label:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=va(r);return typeof e==`string`?(0,q.jsx)(ba,{name:e,color:t,size:n,a11yProps:l,className:a,style:o,xstyle:s,spanProps:c}):(0,q.jsx)(e,{ref:i,...l,...H(O(`icon`,{size:n,color:t}),w(ma.root,ha[t],ga[n],s),a??void 0,o),...c})}ya.displayName=`Icon`;function ba({name:e,color:t,size:n,a11yProps:r,className:i,style:a,xstyle:o,spanProps:s}){let c=pa(e,oa());if(c==null)return null;let l=s??{};return(0,q.jsx)(`span`,{...r,...l,...H(O(`icon`,{size:n,color:t}),w(ma.span,ha[t],_a[n],o),i??void 0,a),children:c})}function xa(e,t){return typeof e==`string`||typeof e==`function`||typeof e==`object`&&e&&`render`in e?(0,q.jsx)(ya,{icon:e,...t}):e}var Sa=[`noopener`,`noreferrer`];function Ca(e,t){if(e!==`_blank`)return{target:e,rel:t};let n=t?.split(/\s+/).filter(Boolean)??[];for(let e of Sa)n.includes(e)||n.push(e);return{target:e,rel:n.join(` `)}}var wa=[`button`,`a`,`input`,`select`,`textarea`,`[role="button"]`,`[role="link"]`,`[role="checkbox"]`,`[role="radio"]`,`[role="switch"]`,`[role="tab"]`,`[role="menuitem"]`,`[role="option"]`,`[role="combobox"]`,`[role="listbox"]`,`[role="slider"]`,`[role="spinbutton"]`,`[data-pressable-container]`].join(`,`),Ta=`[aria-readonly="true"]`;function Ea(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(wa)&&!n.matches(Ta))return!0;n=n.parentElement}return!1}function Da(e){if(typeof document>`u`||!(`getSelection`in document))return!1;let t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function Oa({containerRef:e,interactiveRef:t,onClick:n,href:r,target:i,disabled:a=!1}){return(0,K.useEffect)(()=>{let t=e.current;t&&t.setAttribute(`data-pressable-container`,`true`)},[e]),{onClick:(0,K.useCallback)(o=>{if(a)return;let s=e.current;if(!s||Da(s))return;let c=o.target;if(c instanceof Element&&!(c!==o.currentTarget&&Ea(c,s))&&(n?.(o),!o.defaultPrevented&&(r!=null&&(i===`_blank`||o.ctrlKey||o.metaKey?window.open(r,`_blank`,`noopener`):t?.current?t.current.click():window.location.href=r),r==null&&n==null&&t?.current))){let e=new MouseEvent(`click`,{bubbles:o.bubbles,cancelable:o.cancelable,ctrlKey:o.ctrlKey,metaKey:o.metaKey,shiftKey:o.shiftKey,altKey:o.altKey,button:o.button});t.current.dispatchEvent(e),o.stopPropagation()}},[e,t,n,r,i,a]),onMouseUp:(0,K.useCallback)(t=>{if(a)return;let n=e.current;if(!n)return;let i=t.target;i instanceof Element&&t.button===1&&r!=null&&(i===t.currentTarget||!Ea(i,n))&&window.open(r,`_blank`,`noopener`)},[e,r,a])}}var ka=new Set([`option`,`tab`,`row`,`gridcell`,`columnheader`,`rowheader`,`treeitem`]),Aa={root:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,kg3NbH:`xf314gf`,kVAEAm:`x1n2onr6`,kB7OPa:`x9f619`,k9WMMc:`x1yc453h`,kaIpWk:`xh6dtrn`,$$css:!0},alignStart:{kGNEyG:`x1cy8zhl`,$$css:!0},interactive:{kkrTdU:`x1ypdohk x16khyan`,k1ekBW:`x15406qy`,kIyJzY:`xkvfbh3`,kAMwcw:`xlr8y92`,$$css:!0},highlighted:{kWkggS:`x1lmrjuc`,$$css:!0},selected:{kWkggS:`xgcxg3y`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kfzvcC:`x47corl`,$$css:!0},inlineLabel:{kmuXW:`x2lah0s`,$$css:!0},inlineDescription:{kmuXW:`xs83m0k`,k7Eaqz:`xeuugli`,$$css:!0},label:{kMwMTN:`x5tbw38`,kGuDYH:`xjm74w1`,kLWn49:`xw6l6zx`,$$css:!0},labelSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},labelMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0},description:{kMwMTN:`x1gb3s7i`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},descriptionSingleTruncate:{kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,$$css:!0},descriptionMultiTruncate:{kVQacm:`xb3r6kr`,k1xSpc:`x104kibb`,kgKLqz:`x1ua5tub`,$$css:!0}},ja={lineClamp:e=>[{kJFfOR:e==null?e:`x1yhjpo9`,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},Ma={compact:{k8WAf4:`xu0wf1k`,$$css:!0},balanced:{k8WAf4:`xce4md1`,$$css:!0},spacious:{k8WAf4:`x8o8v82`,kg3NbH:`xrrkdod`,$$css:!0}};function Na({as:e=`div`,marker:t,startContent:n,label:r,description:i,endContent:a,align:o=`center`,density:s=`balanced`,labelLines:c,descriptionLines:l,layout:u=`stacked`,onClick:d,interactiveRef:f,href:p,target:m,rel:h,isHighlighted:g=!1,isSelected:_=!1,isDisabled:v=!1,xstyle:y,className:b,style:x,ref:S,role:C,...T}){let E=nn(),D=f!=null,k=(0,K.useRef)(null),{onClick:A}=Oa({containerRef:k,interactiveRef:f??void 0,disabled:v});Vr(`Item`,"`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",D&&(d!=null||p!=null));let j=d!=null||p!=null||D,{target:M,rel:N}=Ca(m,h),P=C!=null,F=C!=null&&ka.has(C),I=typeof r==`string`,ee=typeof i==`string`,L=c==null?I?Aa.labelSingleTruncate:null:c===1?Aa.labelSingleTruncate:Aa.labelMultiTruncate,R=u===`inline`&&i!=null,te=l==null?ee||R?Aa.descriptionSingleTruncate:null:l===1?Aa.descriptionSingleTruncate:Aa.descriptionMultiTruncate,z=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{...w(Aa.label,R&&Aa.inlineLabel,L,c!=null&&c>1&&ja.lineClamp(c)),children:r}),i!=null&&(0,q.jsx)(`span`,{...w(Aa.description,R&&Aa.inlineDescription,te,l!=null&&l>1&&ja.lineClamp(l)),children:i})]}),B=e=>{v||e.target.closest(`button, a, input, select, textarea`)||d?.(e)},ne=(0,q.jsxs)(q.Fragment,{children:[t,n!=null&&(0,q.jsx)(`span`,{className:`x3psx0u x78zum5`,children:n}),P||D?(0,q.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}):p==null?d==null?(0,q.jsx)(`span`,{...{0:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h`},2:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo`},3:{className:`x78zum5 x98rzlu xeuugli x1yc453h x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}):(0,q.jsx)(`button`,{type:`button`,onClick:d,disabled:v,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}):(0,q.jsx)(E,{href:p,target:M,rel:N,"aria-disabled":v||void 0,tabIndex:v?-1:void 0,...{0:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz`},2:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9`},1:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo`},3:{className:`xmper1u x16khyan xln7xf2 x1heor9g x78zum5 x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz x1q0g3np x6s0dn4 x1lfs0n9 xbyyjgo`}}[!!R<<1|!!v<<0],children:z}),a!=null&&(0,q.jsx)(`span`,{...{0:{className:`x3psx0u x78zum5 xvc5jky`},1:{className:`x3psx0u x78zum5 xvc5jky xbyyjgo`}}[!!v<<0],children:a})]}),re=we(S,k);return(0,q.jsx)(e,{ref:D?re:S,...T,"aria-selected":F&&_||void 0,"aria-current":T[`aria-current`]??(_&&!F?!0:void 0),"aria-disabled":v||void 0,...H(O(`item`,{density:s,align:o}),Te.focusWithin(Aa.root,Ma[s],o===`start`&&Aa.alignStart,j&&Aa.interactive,j&&rn.backgroundColor,g&&Aa.highlighted,_&&Aa.selected,v&&!P&&Aa.disabled,y),b,x),role:C,onClick:D?A:P?d:j?B:void 0,children:ne})}Na.displayName=`Item`;var Pa=(0,K.createContext)(null);Pa.displayName=`DropdownMenuContext`;function Fa(){return(0,K.use)(Pa)}var Ia=(0,K.createContext)(null);Ia.displayName=`DropdownMenuRadioGroupContext`;function La(){return(0,K.use)(Ia)}function Ra(e,t){if(t||e.pointerType!==`mouse`)return;let n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}var za={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},destructive:{kMwMTN:`xjt36v0`,"--_item-label-color":`xufyqxy`,"--_item-description-color":`xqlix59`,$$css:!0}},Ba={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}};function Va({icon:e,label:t,description:n,onClick:r,isDisabled:i=!1,endContent:a,hasCloseOnSelect:o=!0,variant:s=`default`,xstyle:c,className:l,style:u}){let d=Fa(),f=d?.menuSize??`md`,p=(0,K.useCallback)(()=>{i||(r?.(),o&&d?.closeMenu())},[i,r,o,d]),m=(0,K.useCallback)(e=>Ra(e,i),[i]),h=s===`destructive`;return(0,q.jsx)(Na,{role:`menuitem`,tabIndex:i?void 0:-1,onPointerMove:m,startContent:e?xa(e,{size:`sm`,color:h?`error`:`secondary`}):void 0,label:t,description:n,endContent:a,onClick:p,isDisabled:i,xstyle:[za.root,Ba[f],h&&za.destructive,i&&za.disabled,c],...H(O(`dropdown-menu-item`,{size:f,variant:h?`destructive`:null}),{className:l,style:u})})}Va.displayName=`DropdownMenuItem`;var Ha={horizontal:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kzqmXN:`xh8yej3`,$$css:!0},vertical:{k1xSpc:`x3nfvp2`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kZKoxP:`x5yr21d`,$$css:!0}},Ua={horizontalLine:{kZKoxP:`xsyqizj`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},verticalLine:{kzqmXN:`xjk4fl7`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,$$css:!0},subtle:{kWkggS:`x1m4xfpy`,$$css:!0},strong:{kWkggS:`x7njt3n`,$$css:!0}},Wa={horizontal:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,kzqmXN:`xx6qvi6`,$$css:!0},vertical:{keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,kZKoxP:`x12qplqi`,$$css:!0}};function Ga({orientation:e=`horizontal`,label:t,variant:n=`subtle`,isFullBleed:r=!1,xstyle:i,className:a,style:o,ref:s,"aria-label":c,"aria-labelledby":l,...u}){let d=e===`horizontal`,f=(0,K.useId)(),p=l??(t&&c==null?f:void 0);return(0,q.jsxs)(`div`,{ref:s,...u,role:`separator`,"aria-orientation":e,"aria-label":c,"aria-labelledby":p,...H(O(`divider`,{variant:n,orientation:e}),w(d?Ha.horizontal:Ha.vertical,r&&(d?Wa.horizontal:Wa.vertical),i),a,o),children:[(0,q.jsx)(`div`,{...w(d?Ua.horizontalLine:Ua.verticalLine,Ua[n])}),t&&(0,q.jsx)(`div`,{id:f,...{0:{className:`x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4`},1:{className:`x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82`}}[!d<<0],children:t}),t&&(0,q.jsx)(`div`,{...w(d?Ua.horizontalLine:Ua.verticalLine,Ua[n])})]})}Ga.displayName=`Divider`;var Ka={divider:{kqGvvJ:`xsq74q5`,$$css:!0}},qa=O(`dropdown-menu-divider`).className;function Ja({xstyle:e,className:t,style:n,ref:r}){return(0,q.jsx)(Ga,{ref:r,xstyle:[Ka.divider,e],className:t?`${qa} ${t}`:qa,style:n})}Ja.displayName=`DropdownMenuDivider`;function Ya(e){return!e||typeof window>`u`?!1:window.getComputedStyle(e).direction===`rtl`}var Xa=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function Za(e){if(e.isContentEditable)return e;let t=e.closest(`[contenteditable]`);return t&&t.getAttribute(`contenteditable`)!==`false`?t:null}function Qa(e,t){if(!(e instanceof HTMLElement))return!1;let n=Za(e);if(n){let e=typeof window<`u`?window.getSelection():null;return e&&e.rangeCount>0&&!e.isCollapsed?!0:(n.textContent??``).length>0}let r=e.tagName===`TEXTAREA`,i=e.tagName===`INPUT`&&Xa.has(e.type);if(!r&&!i)return!1;let{selectionStart:a,selectionEnd:o,value:s}=e;return a!==o||a==null?!0:t===`ArrowLeft`||t===`ArrowUp`||t===`Home`?a>0:t===`ArrowRight`||t===`ArrowDown`||t===`End`?ae.getAttribute(`aria-disabled`)===`true`||e.disabled===!0||e.hasAttribute(`disabled`),[]),f=(0,K.useCallback)(()=>{let e=u.current;if(!e)return[];let r=Array.from(e.querySelectorAll(t));return n?r.filter(t=>t.closest(n)===e):r},[t,n]),p=(0,K.useCallback)(e=>{let t=u.current;if(!t||!n)return!0;let r=e.target;return!r||r.closest(n)===t},[n]),m=(0,K.useCallback)((e,t,n,r)=>{let i=e.length;if(i===0)return-1;let a=t;for(let t=0;t=i){if(!r)return-1;a=(a+i)%i}let t=e[a];if(t&&!d(t))return a;a+=n}return-1},[d]),h=(0,K.useCallback)(()=>{let e=f(),t=document.activeElement;return e.findIndex(e=>e===t||e.contains(t))},[f]),g=(0,K.useCallback)((e,t)=>{e.getAttribute(`tabindex`)!==String(t)&&e.setAttribute(`tabindex`,String(t))},[]),_=(0,K.useCallback)(()=>{let e=f(),t=e.filter(e=>!d(e));if(t.length===0)return;let n=t.find(e=>e.getAttribute(`tabindex`)===`0`)??t[0];for(let t of e)g(t,t===n?0:-1)},[f,d,g]);ne(()=>{c&&_()});let v=(0,K.useCallback)((e,t)=>{let n=e[t];if(n){if(c)for(let t of e)g(t,t===n?0:-1);n.focus()}},[c,g]),y=(0,K.useCallback)(e=>{let t=f();if(t.length===0)return;let n=Math.max(0,Math.min(e,t.length-1));v(t,n)},[f,v]),b=(0,K.useCallback)(()=>{let e=f(),t=m(e,0,1,!1);return t!==-1&&(v(e,t),!0)},[f,m,v]),x=(0,K.useCallback)(()=>{let e=f(),t=m(e,e.length-1,-1,!1);return t!==-1&&(v(e,t),!0)},[f,m,v]),S=(0,K.useCallback)(()=>{c&&_()},[c,_]);return{listRef:u,handleKeyDown:(0,K.useCallback)(e=>{if(e.ctrlKey||e.metaKey||e.altKey||!p(e))return;if(e.key===`Escape`){i&&(e.preventDefault(),i());return}let t=a===`horizontal`||a===`both`,n=a===`vertical`||a===`both`,c=[],d=[];if(t){let t=e.key===`ArrowLeft`||e.key===`ArrowRight`?s??Ya(u.current):!1;c.push(t?`ArrowLeft`:`ArrowRight`),d.push(t?`ArrowRight`:`ArrowLeft`)}n&&(c.push(`ArrowDown`),d.push(`ArrowUp`));let g=c.includes(e.key),_=d.includes(e.key),y=o&&e.key===`Home`,S=o&&e.key===`End`;if(!g&&!_&&!y&&!S||l&&(Qa(e.target,e.key)||Qa(document.activeElement,e.key)))return;let C=h(),w=f();if(g){let e=C===-1?0:C+1,t=m(w,e,1,r);t!==-1&&v(w,t)}else if(_){let e=C===-1?w.length-1:C-1,t=m(w,e,-1,r);t!==-1&&v(w,t)}else y?b():S&&x();e.preventDefault()},[h,f,r,a,s,o,l,m,v,b,x,i,p]),handleFocus:S,focusItem:y,focusFirst:b,focusLast:x,ownsEvent:p,getItems:f}}var eo=500,to=300;function no(e){let{show:t,hide:n,isOpen:r,isEnabled:i,showDelay:a=150,hideDelay:o=200,clickGuardMs:s=eo,itemSelector:c,popoverId:l,ownsFocus:u=!0}=e,d=Hi(`(hover: hover)`),f=(0,K.useRef)(null),p=(0,K.useRef)(null),m=(0,K.useRef)(null),h=(0,K.useRef)(!1),g=(0,K.useRef)(0),_=(0,K.useRef)(0),v=(0,K.useRef)(r);ne(()=>{let e=v.current;v.current=r,e&&!r&&(h.current=!1,_.current=0,g.current=Date.now())},[r]);let y=(0,K.useCallback)(()=>{f.current&&=(clearTimeout(f.current),null),p.current&&=(clearTimeout(p.current),null)},[]),b=(0,K.useRef)(()=>{}),{listRef:x,handleKeyDown:S,focusFirst:C}=$a({itemSelector:c,onEscape:()=>b.current()}),w=(0,K.useCallback)(()=>{let e=x.current?.contains(document.activeElement)??!1;n(),e&&m.current?.focus()},[n,x]);(0,K.useEffect)(()=>{b.current=()=>{y(),w()}},[y,w]),(0,K.useEffect)(()=>()=>y(),[y]);let T=(0,K.useCallback)(()=>{C()||x.current?.focus()},[C,x]),E=(0,K.useCallback)(()=>{if(!u){t();return}t({skipAutoFocus:!0}),T()},[u,t,T]),D=(0,K.useCallback)(()=>s>0&&_.current>0&&Date.now()-_.current{if(l&&e?.preventDefault(),y(),e!=null&&e.detail===0){g.current=0,h.current=!1,_.current=0,r?u&&T():E();return}if(!r){g.current=0,h.current=!1,_.current=0,E();return}if(D()){u&&T();return}w()},[l,y,r,u,D,E,T,w]),k=(0,K.useCallback)(()=>{if(!d||g.current>0&&Date.now()-g.current{_.current=Date.now(),t({skipAutoFocus:!0})};a>0?f.current=setTimeout(e,a):e()},[d,r,y,t,a]),A=(0,K.useCallback)(()=>{g.current=0,h.current&&(y(),p.current=setTimeout(()=>{n()},o))},[y,n,o]),j=(0,K.useCallback)(()=>{y()},[y]),M=(0,K.useCallback)(e=>{m.current=e},[]),N=(0,K.useCallback)(()=>{},[]),P=(0,K.useCallback)(e=>{},[]),F=(0,K.useCallback)(e=>{},[]);return i?{triggerProps:{onClick:O,onMouseEnter:k,onMouseLeave:A,...l?{popoverTarget:l}:null},contentProps:{onMouseEnter:j,onMouseLeave:A,onKeyDown:S},menuRef:x,focusFirst:C,focusMenu:T,confirmHoverOpen:D,close:w,setTriggerEl:M}:{triggerProps:{onClick:N,onMouseEnter:N,onMouseLeave:N},contentProps:{onMouseEnter:N,onMouseLeave:N,onKeyDown:F},menuRef:x,focusFirst:C,focusMenu:T,confirmHoverOpen:D,close:w,setTriggerEl:P}}function ro(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&e.key!==` `}function io(e){let{getItemLabels:t,onMatch:n,getCurrentIndex:r,resetMs:i=750,isDisabled:a}=e,o=(0,K.useRef)(``),s=(0,K.useRef)(void 0),c=(0,K.useCallback)(()=>{o.current=``,s.current&&=(clearTimeout(s.current),void 0)},[]),l=(0,K.useCallback)(()=>{s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{o.current=``,s.current=void 0},i)},[i]);return{onKeyDown:(0,K.useCallback)(e=>{let i=e.key===` `&&!e.ctrlKey&&!e.metaKey&&o.current.length>0;if(!ro(e)&&!i)return!1;let s=t();if(s.length===0)return!1;let c=e.key.toLowerCase(),u=o.current.length>0&&o.current.split(``).every(e=>e===c)?c:o.current+c;o.current=u,l();let d=r?.()??-1,f=s.length,p=d>=0,m=p?d:0,h=p&&u.length===1?1:0;for(let e=0;e`[role="${e}"]:not([aria-disabled="true"])`).join(`,`),so=`[role="menu"]`,co={root:{kB7OPa:`x9f619`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`x1ws5lxm`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},open:{kWkggS:`x1lmrjuc`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0}},lo={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}},uo={popover:{k7Eaqz:`x5w4yej`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]};function fo(e){let{icon:t,label:n,description:r,isDisabled:i=!1,hasSpinner:a=!1,menuWidth:o,onOpenChange:s,children:c,xstyle:l,className:u,style:d,"data-testid":f,menuDataTestId:m}=e,h=Fa(),g=h?.menuSize??`md`,_=!i,v=(0,K.useId)(),y=(0,K.useId)(),b=(0,K.useRef)(null),[x,S]=(0,K.useState)(!1),C=ce({mode:`context`,lightDismiss:!1,onShow:(0,K.useCallback)(()=>{S(!0),s?.(!0)},[s]),onHide:(0,K.useCallback)(()=>{S(!1),s?.(!1)},[s])}),w=(0,K.useCallback)(()=>{_&&C.show()},[_,C]),T=(0,K.useCallback)(()=>{C.hide()},[C]),{listRef:E,handleKeyDown:D,focusFirst:k,focusItem:A,ownsEvent:j,getItems:M}=$a({itemSelector:oo,boundarySelector:so,wrap:!1,onEscape:()=>L({focusTrigger:!0})}),N=io({getItemLabels:()=>M().map(e=>e.textContent),onMatch:A,getCurrentIndex:()=>M().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))}),{triggerProps:P,contentProps:F,confirmHoverOpen:I}=no({show:w,hide:T,isOpen:x,isEnabled:_}),ee=(0,K.useCallback)(e=>{_&&(C.show(),e?.focusFirst&&(k()||E.current?.focus()))},[_,C,k,E]),L=(0,K.useCallback)(e=>{C.hide(),e?.focusTrigger!==!1&&b.current?.focus()},[C]),te=(0,K.useCallback)(e=>{b.current=e,C.ref(e)},[C]),z=(0,K.useCallback)(()=>{if(!i)if(x){if(I()){k()||E.current?.focus();return}L({focusTrigger:!0})}else ee({focusFirst:!0})},[i,x,ee,L,I,k,E]),B=(0,K.useCallback)(e=>{if(i)return;let t=typeof window<`u`&&b.current&&window.getComputedStyle(b.current).direction===`rtl`?`ArrowLeft`:`ArrowRight`;(e.key===t||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),ee({focusFirst:!0}))},[i,ee]),ne=(0,K.useCallback)(e=>Ra(e,i),[i]),re=(0,K.useCallback)(e=>{if(!j(e))return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),L({focusTrigger:!0});return}if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&ao.has(t.getAttribute(`role`)??``)&&t.click();return}let t=typeof window<`u`&&E.current&&window.getComputedStyle(E.current).direction===`rtl`?`ArrowRight`:`ArrowLeft`;if(e.key===t){e.preventDefault(),L({focusTrigger:!0});return}if(N.onKeyDown(e)){e.preventDefault();return}D(e)},[j,L,D,N,E]),V=(0,K.useMemo)(()=>({menuSize:g,closeMenu:()=>{L({focusTrigger:!1}),h?.closeMenu()}}),[g,L,h]),ie=a?(0,q.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,q.jsx)(Gt,{size:`sm`})}):(0,q.jsx)(`span`,{className:`x78zum5 x6s0dn4`,children:(0,q.jsx)(ya,{icon:`chevronRight`,size:`sm`,color:`secondary`,...O(`dropdown-menu-indicator-icon`)})}),ae=o?uo.popoverCustomWidth(o):uo.popover;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Na,{ref:e=>te(e),id:y,role:`menuitem`,tabIndex:i?void 0:-1,"aria-haspopup":`menu`,"aria-expanded":x,"aria-controls":x?v:void 0,"aria-disabled":i||void 0,"data-testid":f,onMouseEnter:P.onMouseEnter,onMouseLeave:P.onMouseLeave,onPointerMove:ne,startContent:t?xa(t,{size:`sm`,color:`secondary`}):void 0,label:n,description:r,endContent:ie,onClick:z,onKeyDown:B,isDisabled:i,xstyle:[co.root,lo[g],x&&co.open,i&&co.disabled,l],...H(O(`dropdown-menu-item`,{size:g}),{className:u,style:d})}),C.render((0,q.jsx)(`div`,{ref:E,id:v,role:`menu`,tabIndex:-1,"aria-labelledby":y,onKeyDown:re,onMouseEnter:F.onMouseEnter,onMouseLeave:F.onMouseLeave,"data-testid":m,...H(O(`dropdown-menu`),{className:`x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92`}),children:(0,q.jsx)(Pa,{value:V,children:c})}),{placement:`end`,alignment:`start`,offset:p[`--spacing-1`],xstyle:[ae,R.end]})]})}fo.displayName=`DropdownMenuSubMenu`;function po(e,t){return`item-${e.id??t}`}function mo(e,t){return`section-${e.id??t}`}function ho(e,t){let{items:n,id:r,...i}=e;return(0,q.jsx)(Va,{...i},po(e,t))}function go(e){let t=[];for(let n=0;n0?t.push((0,q.jsx)(fo,{icon:r.icon,label:r.label,isDisabled:r.isDisabled,children:go(r.items)},po(r,n))):t.push(ho(r,n)))}return t}var _o={dropdown:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kskxy:`xuyqlj2`,kORKVm:`x1odjw0f`,"--_dropdown-menu-radius":`x1fcsqxe`,"--_dropdown-menu-padding":`xgory14`,kmVPX3:`x9epnlk`,kaIpWk:`x1n97fys`,kSiTet:`x1hc1fzr`,k1ekBW:`x19991ni`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,$$css:!0},popover:{k7Eaqz:`xrzjruh`,$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xkj4a21`,$$css:!0},{"--x-minWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]},vo=`@astryx.dropdownMenu.label`;function yo({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:r,onClick:i,hasChevron:a=!0,placement:o=`below`,alignment:s=`start`,className:c,style:l,xstyle:u,"data-testid":d,...f}){let m=jr(),h=e??{label:m(vo)},g=(`items`in f?f.items:void 0)??[],_=f.children,{items:v,children:y,...b}=f,x=(0,K.useId)(),S=h.size??`md`,C=(0,K.useRef)(null),[T,E]=(0,K.useState)(!1),D=t!==void 0,k=D?t:T,A=(0,K.useCallback)(()=>{n?.(!1),D||E(!1),C.current?.focus()},[D,n]),j=(0,K.useRef)(!1),M=(0,K.useRef)(`keyboard`),N=Gr({onHide:A,onShow:(0,K.useCallback)(()=>{n?.(!0),D||E(!0)},[D,n]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:`none`}),P=(0,K.useCallback)(()=>{N.hide()},[N]),{listRef:F,handleKeyDown:I,focusFirst:ee,focusItem:L,ownsEvent:te,getItems:z}=$a({itemSelector:oo,boundarySelector:so,wrap:!1,onEscape:P}),B=io({getItemLabels:()=>z().map(e=>e.textContent),onMatch:L,getCurrentIndex:()=>z().findIndex(e=>e===document.activeElement||e.contains(document.activeElement))});(0,K.useEffect)(()=>{D&&(t&&!N.isOpen?(j.current=!0,N.show()):!t&&N.isOpen&&N.hide())},[t,D,N]),(0,K.useEffect)(()=>{!N.isOpen||!j.current||(j.current=!1,requestAnimationFrame(()=>{(M.current===`pointer`||!ee())&&F.current?.focus(),M.current=`keyboard`}))},[N.isOpen,ee,F]);let ne=(0,K.useCallback)(e=>{if(te(e)){if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=document.activeElement;t&&ao.has(t.getAttribute(`role`)??``)&&t.click();return}if(e.key===`Tab`){P();return}if(B.onKeyDown(e)){e.preventDefault();return}I(e)}},[I,P,B,te]),re=(0,K.useCallback)((e=`keyboard`)=>{M.current=e,j.current=!0,N.show()},[N]),V=(0,K.useCallback)(e=>{if(N.wasJustDismissed())return;i?.();let r=e.detail===0?`keyboard`:`pointer`;D?(t||(M.current=r),n?.(!t)):N.isOpen?N.hide():re(r)},[i,D,n,t,N,re]),ie=(0,K.useCallback)(e=>{N.isOpen||(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),re())},[N.isOpen,re]),ae=h.isIconOnly===!0,oe=h.endContent??(a&&!ae?(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`inherit`}):void 0),se=r?_o.popoverCustomWidth(r):_o.popover,ce=(0,K.useMemo)(()=>({closeMenu:P,menuSize:S}),[P,S]),le=f.items===void 0?_:go(g);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Br,{...h,ref:e=>{C.current=e,N.triggerRef(e);let t=h.ref;typeof t==`function`?t(e):t&&(t.current=e)},tooltip:k?void 0:h.tooltip,endContent:oe,onClick:V,onKeyDown:ie,"aria-haspopup":`menu`,"aria-expanded":k,"aria-controls":x,"data-testid":d}),N.render((0,q.jsx)(`div`,{...b,ref:F,id:x,role:`menu`,tabIndex:-1,"aria-label":h.label,onKeyDown:ne,...H(O(`dropdown-menu`),w(_o.dropdown,u),c,l),children:(0,q.jsx)(Pa,{value:ce,children:le})}),{placement:o,alignment:s,offset:p[`--spacing-1`],xstyle:[se,R[o]]})]})}yo.displayName=`DropdownMenu`;var bo={box:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kaIpWk:`xx3sua9`,k1ekBW:`xts7igz`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},unchecked:{kMwMTN:`xqwr325`,kVAM5u:`xvy26l8 xilc7fp`,kWkggS:`x10xzikg xeultfy`,$$css:!0},checked:{kMwMTN:`x17wrial`,kVAM5u:`xad5do x1ozl1p1`,kWkggS:`x1ewilqj x17srpfb`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kVAM5u:`x14i3s5s x61roa7`,$$css:!0},disabledUnchecked:{kWkggS:`xwmxj5m xqxnq6d`,$$css:!0},checkmark:{k1xSpc:`x1s85apg`,kMwMTN:`x17wrial xs5hli`,$$css:!0},checkmarkVisible:{k1xSpc:`x1lliihq`,$$css:!0},indeterminateMark:{k1xSpc:`x1s85apg`,kWkggS:`x1azo05 xwvh9j7`,kaIpWk:`xjspbzw`,$$css:!0},indeterminateMarkVisible:{k1xSpc:`x1lliihq`,$$css:!0}},xo={sm:{kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,$$css:!0}},So={sm:{kzqmXN:`xsmyaan`,kZKoxP:`x1kpxq89`,$$css:!0},md:{kzqmXN:`x6jxa94`,kZKoxP:`x1v9usgg`,$$css:!0}},Co={sm:{kzqmXN:`x1fsd2vl`,kZKoxP:`x36qwtl`,$$css:!0},md:{kzqmXN:`xsmyaan`,kZKoxP:`x36qwtl`,$$css:!0}};function wo({state:e,size:t=`md`,isDisabled:n=!1,children:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=e===`checked`,u=e===`indeterminate`,d=l||u;return(0,q.jsx)(`span`,{...c,ref:i,"aria-hidden":`true`,...H(O(`checkbox-indicator`,{size:t,checked:l?`checked`:u?`indeterminate`:null,disabled:n?`disabled`:null},{legacyNames:[`checkbox`]}),w(bo.box,xo[t],d?bo.checked:bo.unchecked,n&&bo.disabled,n&&!d&&bo.disabledUnchecked,s),a,o),children:mt(r)?r:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`svg`,{viewBox:`0 0 10 10`,...H(O(`checkbox-indicator-check`,{size:t}),w(bo.checkmark,So[t],l&&bo.checkmarkVisible)),children:(0,q.jsx)(`path`,{d:`M8.5 2.5L4 7.5L1.5 5`,stroke:`currentColor`,strokeWidth:`1.5`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})}),(0,q.jsx)(`span`,{...H(O(`checkbox-indicator-dash`,{size:t}),w(bo.indeterminateMark,Co[t],u&&bo.indeterminateMarkVisible))})]})})}wo.displayName=`CheckboxIndicator`;var To={sm:`sm`,md:`sm`},Eo={slot:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,kzqmXN:`xcdlrvm`,kZKoxP:`x1l36t39`,$$css:!0},enabled:{kMwMTN:`xqwr325`,$$css:!0},disabled:{kMwMTN:`xqa6c3m`,$$css:!0}};function Do({state:e,size:t=`md`,isDisabled:n=!1,children:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=e===`checked`;return mt(r)?(0,q.jsx)(`span`,{...c,ref:i,"aria-hidden":`true`,...H(w(Eo.slot,n?Eo.disabled:Eo.enabled,s),a,o),children:r}):l?(0,q.jsx)(ya,{...c,"aria-hidden":`true`,icon:`check`,size:To[t],color:n?`disabled`:`accent`,xstyle:s,className:a,style:o}):null}Do.displayName=`CheckIndicator`;var Oo={circle:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmuXW:`x2lah0s`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kaIpWk:`xjspbzw`,k1ekBW:`xts7igz`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},unchecked:{kVAM5u:`xvy26l8 xilc7fp`,kWkggS:`x10xzikg xeultfy`,$$css:!0},checked:{kVAM5u:`xad5do x1ozl1p1`,kWkggS:`x1ewilqj x17srpfb`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kVAM5u:`x14i3s5s x61roa7`,$$css:!0},disabledUnchecked:{kWkggS:`xwmxj5m xqxnq6d`,$$css:!0},dot:{kaIpWk:`xjspbzw`,kWkggS:`x1azo05 xwvh9j7`,$$css:!0}},ko={sm:{kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`xvy4d1p`,kZKoxP:`xxk0z11`,$$css:!0}},Ao={sm:{kzqmXN:`x1xc55vz`,kZKoxP:`xdk7pt`,$$css:!0},md:{kzqmXN:`x1fsd2vl`,kZKoxP:`x170jfvy`,$$css:!0}};function jo({state:e,size:t=`md`,isDisabled:n=!1,children:r,ref:i,className:a,style:o,xstyle:s,...c}){let l=e!==`unchecked`;return(0,q.jsx)(`span`,{...c,ref:i,"aria-hidden":`true`,...H(O(`radio-indicator`,{size:t,checked:l?`checked`:null,disabled:n?`disabled`:null},{legacyNames:[`radio`]}),w(Oo.circle,ko[t],l?Oo.checked:Oo.unchecked,n&&Oo.disabled,n&&!l&&Oo.disabledUnchecked,s),a,o),children:mt(r)?r:l&&(0,q.jsx)(`span`,{...H(O(`radio-indicator-dot`,{size:t},{legacyNames:[`radio-dot`]}),w(Oo.dot,Ao[t]))})})}jo.displayName=`RadioIndicator`;var Mo={check:Do,checkbox:wo,radio:jo};function No(e){return e==null?null:typeof e==`string`?ti(e):e}function Po(e){return No(e)?.indicators??null}function Fo(e,t){return Po(t)?.[e]??Mo[e]}function Io(e){return Fo(e,oa())}var Lo={root:{kzqmXN:`xh8yej3`,kaIpWk:`x1ws5lxm`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},marker:{kfzvcC:`x47corl`,kayTVb:`x1g77sc7 xozvky`,keTefX:`x1lziwak x1jymrmb`,$$css:!0}};function Ro({label:e,description:t,icon:n,value:r,onChange:i,isDisabled:a=!1,hasCloseOnSelect:o=!1,endContent:s,xstyle:c,className:l,style:u,...d}){let f=Fa(),p=f?.menuSize??`md`,m=p===`sm`?`sm`:`md`,h=Io(`checkbox`),g=(0,K.useCallback)(()=>{a||(i?.(!r),o&&f?.closeMenu())},[a,i,r,o,f]),_=(0,K.useCallback)(e=>Ra(e,a),[a]);return(0,q.jsx)(Na,{...d,role:`menuitemcheckbox`,"aria-checked":r,tabIndex:a?void 0:-1,onPointerMove:_,marker:(0,q.jsx)(h,{state:r?`checked`:`unchecked`,size:m,isDisabled:a,xstyle:Lo.marker}),startContent:n?xa(n,{size:`sm`,color:`secondary`}):void 0,label:e,description:t,endContent:s,onClick:g,isDisabled:a,xstyle:[Lo.root,a&&Lo.disabled,c],...H(O(`dropdown-menu-item`,{size:p}),{className:l,style:u})})}Ro.displayName=`DropdownMenuCheckboxItem`;var zo={group:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,$$css:!0}};function Bo({value:e,onChange:t,label:n,hasCloseOnSelect:r=!0,children:i,xstyle:a,className:o,style:s,...c}){let l=(0,K.useMemo)(()=>({value:e,onChange:t,hasCloseOnSelect:r}),[e,t,r]);return(0,q.jsx)(`div`,{...c,role:`group`,"aria-label":n,...H(w(zo.group,a),{className:o,style:s}),children:(0,q.jsx)(Ia,{value:l,children:i})})}Bo.displayName=`DropdownMenuRadioGroup`;var Vo={root:{kzqmXN:`xh8yej3`,kaIpWk:`x1ws5lxm`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w x1c52tdz`,kkrTdU:`x1ypdohk x16khyan`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0},marker:{kfzvcC:`x47corl`,kayTVb:`x1g77sc7 xozvky`,keTefX:`x1lziwak x1jymrmb`,$$css:!0}};function Ho({value:e,label:t,description:n,icon:r,isDisabled:i=!1,endContent:a,xstyle:o,className:s,style:c,...l}){let u=Fa(),d=La();if(!d)throw Error(`DropdownMenuRadioItem must be used within a DropdownMenuRadioGroup`);let f=u?.menuSize??`md`,p=f===`sm`?`sm`:`md`,m=d.value===e,h=Io(`radio`),g=(0,K.useCallback)(()=>{i||(d.onChange(e),d.hasCloseOnSelect&&u?.closeMenu())},[i,d,e,u]),_=(0,K.useCallback)(e=>Ra(e,i),[i]);return(0,q.jsx)(Na,{...l,role:`menuitemradio`,"aria-checked":m,tabIndex:i?void 0:-1,onPointerMove:_,marker:(0,q.jsx)(h,{state:m?`checked`:`unchecked`,size:p,isDisabled:i,xstyle:Vo.marker,...O(`dropdown-menu-radio`,{size:p,checked:m?`checked`:null,disabled:i?`disabled`:null})}),startContent:r?xa(r,{size:`sm`,color:`secondary`}):void 0,label:t,description:n,endContent:a,onClick:g,isDisabled:i,xstyle:[Vo.root,i&&Vo.disabled,o],...H(O(`dropdown-menu-item`,{size:f}),{className:s,style:c})})}Ho.displayName=`DropdownMenuRadioItem`;var Uo=U(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),Wo=U(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),Go=U(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),Ko=U(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),qo=U(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Jo=U(`arrow-up-down`,[[`path`,{d:`m21 16-4 4-4-4`,key:`f6ql7i`}],[`path`,{d:`M17 20V4`,key:`1ejh1v`}],[`path`,{d:`m3 8 4-4 4 4`,key:`11wl7u`}],[`path`,{d:`M7 4v16`,key:`1glfcx`}]]),Yo=U(`arrow-up-right`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Xo=U(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),Zo=U(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Qo=U(`book-open`,[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]),$o=U(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),es=U(`brush-cleaning`,[[`path`,{d:`m16 22-1-4`,key:`1ow2iv`}],[`path`,{d:`M19 14a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2h-3a1 1 0 0 1-1-1V4a2 2 0 0 0-4 0v5a1 1 0 0 1-1 1H6a2 2 0 0 0-2 2v1a1 1 0 0 0 1 1`,key:`11gii7`}],[`path`,{d:`M19 14H5l-1.973 6.767A1 1 0 0 0 4 22h16a1 1 0 0 0 .973-1.233z`,key:`bju7h4`}],[`path`,{d:`m8 22 1-4`,key:`s3unb`}]]),ts=U(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),ns=U(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),rs=U(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),is=U(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),as=U(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),os=U(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ss=U(`chevrons-left`,[[`path`,{d:`m11 17-5-5 5-5`,key:`13zhaf`}],[`path`,{d:`m18 17-5-5 5-5`,key:`h8a8et`}]]),cs=U(`chevrons-right`,[[`path`,{d:`m6 17 5-5-5-5`,key:`xnjwq`}],[`path`,{d:`m13 17 5-5-5-5`,key:`17xmmf`}]]),ls=U(`circle-alert`,[[`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`}]]),us=U(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),ds=U(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]]),fs=U(`circle-question-mark`,[[`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`}]]),ps=U(`circle-stop`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`rect`,{x:`9`,y:`9`,width:`6`,height:`6`,rx:`1`,key:`1ssd4o`}]]),ms=U(`circle-x`,[[`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`}]]),hs=U(`circle`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),gs=U(`clipboard-list`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),_s=U(`clipboard`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}]]),vs=U(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),ys=U(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),bs=U(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),xs=U(`columns-2`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M12 3v18`,key:`108xh3`}]]),Ss=U(`copy`,[[`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`}]]),Cs=U(`corner-down-right`,[[`path`,{d:`m15 10 5 5-5 5`,key:`qqa56n`}],[`path`,{d:`M4 4v7a4 4 0 0 0 4 4h12`,key:`z08zvw`}]]),ws=U(`cpu`,[[`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`}]]),Ts=U(`download`,[[`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`}]]),Es=U(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ds=U(`ellipsis`,[[`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`}]]),Os=U(`external-link`,[[`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`}]]),ks=U(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),As=U(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),js=U(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),Ms=U(`file-diff`,[[`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:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),Ns=U(`file-image`,[[`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`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Ps=U(`file-plus-corner`,[[`path`,{d:`M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35`,key:`17jvcc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M14 19h6`,key:`bvotb8`}],[`path`,{d:`M17 16v6`,key:`18yu1i`}]]),Fs=U(`file-text`,[[`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`}]]),Is=U(`file`,[[`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`}]]),Ls=U(`folder-cog`,[[`path`,{d:`M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3`,key:`128dxu`}],[`path`,{d:`m14.305 19.53.923-.382`,key:`3m78fa`}],[`path`,{d:`m15.228 16.852-.923-.383`,key:`npixar`}],[`path`,{d:`m16.852 15.228-.383-.923`,key:`5xggr7`}],[`path`,{d:`m16.852 20.772-.383.924`,key:`dpfhf9`}],[`path`,{d:`m19.148 15.228.383-.923`,key:`1reyyz`}],[`path`,{d:`m19.53 21.696-.382-.924`,key:`1goivc`}],[`path`,{d:`m20.772 16.852.924-.383`,key:`htqkph`}],[`path`,{d:`m20.772 19.148.924.383`,key:`9w9pjp`}],[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}]]),Rs=U(`folder-input`,[[`path`,{d:`M2 9V5a2 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 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),zs=U(`folder-open`,[[`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`}]]),Bs=U(`folder-plus`,[[`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`}]]),Vs=U(`folder`,[[`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`}]]),Hs=U(`funnel`,[[`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`}]]),Us=U(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),Ws=U(`git-branch`,[[`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`}]]),Gs=U(`globe`,[[`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`}]]),Ks=U(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),qs=U(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),Js=U(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Ys=U(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Xs=U(`layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),Zs=U(`lightbulb`,[[`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`}]]),Qs=U(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),$s=U(`list-checks`,[[`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`}]]),ec=U(`list-ordered`,[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]),tc=U(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),nc=U(`list-tree`,[[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`M3 10a2 2 0 0 0 2 2h3`,key:`1npucw`}],[`path`,{d:`M3 5v12a2 2 0 0 0 2 2h3`,key:`x1gjn2`}]]),rc=U(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),ic=U(`mail-open`,[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]),ac=U(`maximize-2`,[[`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`}]]),oc=U(`maximize`,[[`path`,{d:`M8 3H5a2 2 0 0 0-2 2v3`,key:`1dcmit`}],[`path`,{d:`M21 8V5a2 2 0 0 0-2-2h-3`,key:`1e4gt3`}],[`path`,{d:`M3 16v3a2 2 0 0 0 2 2h3`,key:`wsl5sc`}],[`path`,{d:`M16 21h3a2 2 0 0 0 2-2v-3`,key:`18trek`}]]),sc=U(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),cc=U(`message-circle-plus`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}],[`path`,{d:`M12 8v8`,key:`napkw2`}]]),lc=U(`message-circle-question-mark`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`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`}]]),uc=U(`message-square-plus`,[[`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:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),dc=U(`mic`,[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M19 10v2a7 7 0 0 1-14 0v-2`,key:`1vc78b`}],[`rect`,{x:`9`,y:`2`,width:`6`,height:`13`,rx:`3`,key:`s6n7sd`}]]),fc=U(`minimize-2`,[[`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`}]]),pc=U(`monitor`,[[`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`}]]),mc=U(`panel-bottom`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 15h18`,key:`5xshup`}]]),hc=U(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),gc=U(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),_c=U(`panel-right-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}],[`path`,{d:`m8 9 3 3-3 3`,key:`12hl5m`}]]),vc=U(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),yc=U(`pencil`,[[`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`}]]),bc=U(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),xc=U(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Sc=U(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z`,key:`1xoxul`}],[`path`,{d:`M9 8V2`,key:`14iosj`}]]),Cc=U(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),wc=U(`rotate-ccw-clock`,[[`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`}]]),Tc=U(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),Ec=U(`scan`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}]]),Dc=U(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Oc=U(`server`,[[`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`}]]),kc=U(`settings-2`,[[`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`}]]),Ac=U(`settings`,[[`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`}]]),jc=U(`sheet`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`line`,{x1:`3`,x2:`21`,y1:`9`,y2:`9`,key:`1vqk6q`}],[`line`,{x1:`3`,x2:`21`,y1:`15`,y2:`15`,key:`o2sbyz`}],[`line`,{x1:`9`,x2:`9`,y1:`9`,y2:`21`,key:`1ib60c`}],[`line`,{x1:`15`,x2:`15`,y1:`9`,y2:`21`,key:`1n26ft`}]]),Mc=U(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Nc=U(`sliders-horizontal`,[[`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`}]]),Pc=U(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),Fc=U(`square-arrow-out-up-right`,[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]]),Ic=U(`square-pen`,[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]]),Lc=U(`square-terminal`,[[`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`}]]),Rc=U(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),zc=U(`sun`,[[`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`}]]),Bc=U(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),Vc=U(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Hc=U(`text-wrap`,[[`path`,{d:`m16 16-3 3 3 3`,key:`117b85`}],[`path`,{d:`M3 12h14.5a1 1 0 0 1 0 7H13`,key:`18xa6z`}],[`path`,{d:`M3 19h6`,key:`1ygdsz`}],[`path`,{d:`M3 5h18`,key:`1u36vt`}]]),Uc=U(`trash-2`,[[`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`}]]),Wc=U(`triangle-alert`,[[`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`}]]),Gc=U(`unfold-vertical`,[[`path`,{d:`M12 22v-6`,key:`6o8u61`}],[`path`,{d:`M12 8V2`,key:`1wkif3`}],[`path`,{d:`M4 12H2`,key:`rhcxmi`}],[`path`,{d:`M10 12H8`,key:`s88cx1`}],[`path`,{d:`M16 12h-2`,key:`10asgb`}],[`path`,{d:`M22 12h-2`,key:`14jgyd`}],[`path`,{d:`m15 19-3 3-3-3`,key:`11eu04`}],[`path`,{d:`m15 5-3-3-3 3`,key:`itvq4r`}]]),Kc=U(`upload`,[[`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`}]]),qc=U(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),Jc=U(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),Yc=U(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),Xc=U(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),Zc=U(`zoom-in`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`11`,x2:`11`,y1:`8`,y2:`14`,key:`1vmskp`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),Qc=U(`zoom-out`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`line`,{x1:`21`,x2:`16.65`,y1:`21`,y2:`16.65`,key:`13gj7c`}],[`line`,{x1:`8`,x2:`14`,y1:`11`,y2:`11`,key:`durymu`}]]),$c=E(),el=Ie(),tl=e=>typeof e==`string`,nl=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},rl=e=>e==null?``:String(e),il=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},al=/###/g,ol=e=>e&&e.includes(`###`)?e.replace(al,`.`):e,sl=e=>!e||tl(e),cl=(e,t,n)=>{let r=tl(t)?t.split(`.`):t,i=0;for(;i{let{obj:r,k:i}=cl(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=cl(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=cl(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},ul=(e,t,n,r)=>{let{obj:i,k:a}=cl(e,t,Object);i[a]=i[a]||[],i[a].push(n)},dl=(e,t)=>{let{obj:n,k:r}=cl(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},fl=(e,t,n)=>{let r=dl(e,n);return r===void 0?dl(t,n):r},pl=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?tl(e[r])||e[r]instanceof String||tl(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):pl(e[r],t[r],n):e[r]=t[r]);return e},ml=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),hl={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},gl=e=>tl(e)?e.replace(/[&<>"'\/]/g,e=>hl[e]):e,_l=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},vl=[` `,`,`,`?`,`!`,`;`],yl=new _l(20),bl=(e,t,n)=>{t||=``,n||=``;let r=vl.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=yl.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},xl=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;ee?.replace(/_/g,`-`),Cl={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},wl=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Cl,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>tl(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),tl(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Tl=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r{for(let i=0;i-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):tl(n)&&i?o.push(...n.split(i)):o.push(n)));let s=dl(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!tl(n)?s:xl(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),ll(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(tl(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=dl(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?pl(s,n,i):s={...s,...n},ll(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Dl={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},Ol=Symbol(`i18next/PATH_KEY`);function kl(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Ol?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Al(e,t){let{[Ol]:n}=e(kl()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var jl=e=>!tl(e)&&typeof e!=`boolean`&&typeof e!=`number`,Ml=class e extends Tl{constructor(e,t={}){super(),il([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=wl.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=jl(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!bl(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:tl(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:tl(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Al(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Al(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!tl(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=jl(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(tl(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:jl(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&tl(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=tl(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!tl(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;oi?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=tl(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Dl.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return tl(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Al(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!tl(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(tl(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!tl(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Nl=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wl.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Sl(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Sl(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(tl(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),tl(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||tl(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=tl(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return tl(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):tl(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{l.includes(e)||u(this.formatLanguageCode(e))}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},Pl={zero:0,one:1,two:2,few:3,many:4,other:5},Fl={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Il=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=wl.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Sl(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Fl;if(!e.match(/-|_/))return Fl;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Pl[e]-Pl[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Ll=(e,t,n,r=`.`,i=!0)=>{let a=fl(e,t,n);return!a&&i&&tl(n)&&(a=xl(e,n,r),a===void 0&&(a=xl(t,n,r))),a},Rl=e=>e.replace(/\$/g,`$$$$`),zl=class{constructor(e={}){this.logger=wl.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?gl:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ml(i):a||`{{`,this.suffix=o?ml(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ml(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ml(l):``,this.nestingPrefix=d?ml(d):f||ml(`$t(`),this.nestingSuffix=p?ml(p):m||ml(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=Ll(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Ll(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e):e}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=tl(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else!tl(a)&&!this.useRawValueToEscape&&(a=rl(a));let s=t.safeValue(a);if(e=e.replace(i[0],Rl(s)),u?(t.regex.lastIndex+=s.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${ml(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!tl(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!tl(i))return i;tl(i)||(i=rl(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},Bl=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Vl=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Sl(r),i),t[o]=s),s(n)}},Hl=e=>(t,n,r)=>e(Sl(n),r)(t),Ul=class{constructor(e={}){this.logger=wl.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Vl:Hl;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Vl(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e-1&&!t.includes(`)`)&&e+1{let{formatName:i,formatOptions:a}=Bl(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},Wl=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},Gl=class extends Tl{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=wl.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{ul(n.loaded,[i],a),Wl(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();tl(e)&&(e=this.languageUtils.toResolveHierarchy(e)),tl(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(n!=null&&n!==``){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},Kl=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),tl(e[1])&&(t.defaultValue=e[1]),tl(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),ql=e=>(tl(e.ns)&&(e.ns=[e.ns]),tl(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),tl(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),Jl=()=>{},Yl=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Xl=class e extends Tl{constructor(e={},t){if(super(),this.options=ql(e),this.services={},this.logger=wl,this.modules={external:[]},Yl(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(tl(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=Kl();this.options={...n,...this.options,...ql(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?wl.init(r(this.modules.logger),this.options):wl.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:Ul;let t=new Nl(this.options);this.store=new El(this.options.resources,this.options);let n=this.services;n.logger=wl,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new Il(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new zl(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new Gl(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new Ml(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=Jl,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=nl(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=Jl){let n=t,r=tl(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=nl();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=Jl,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Dl.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=tl(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(tl(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Al(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Al(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Al(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return tl(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=nl();return this.options.ns?(tl(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=nl();tl(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Nl(Kl());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=Jl){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new El(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={...Kl().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new zl(n)}return a.translator=new Ml(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Xl.createInstance,Xl.dir,Xl.init,Xl.loadResources,Xl.reloadResources,Xl.use,Xl.changeLanguage,Xl.getFixedT,Xl.t,Xl.exists,Xl.setDefaultNamespace,Xl.hasLoadedNamespace,Xl.loadNamespaces,Xl.loadLanguages;var Zl={type:`3rdParty`,init(e){De(e.options.react),ke(e)}};function Ql({i18n:e,defaultNS:t,children:n}){let r=(0,K.useMemo)(()=>({i18n:e,defaultNS:t}),[e,t]);return(0,K.createElement)(Oe.Provider,{value:r},n)}var $l=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},eu=(e=>e?$l(e):$l),tu=e=>e;function nu(e,t=tu){let n=K.useSyncExternalStore(e.subscribe,K.useCallback(()=>t(e.getState()),[e,t]),K.useCallback(()=>t(e.getInitialState()),[e,t]));return K.useDebugValue(n),n}var ru=Array.from({length:16},(e,t)=>`cell-${t+1}`);function iu({animated:e=!1,compact:t=!1}){let[n,r]=(0,K.useState)(0),i=t?10:16,a=(0,q.jsxs)(`strong`,{className:t?`brand-lockup compact`:`brand-lockup`,children:[(0,q.jsx)(`span`,{className:`brand-word`,children:`Open`}),(0,q.jsx)(`span`,{className:`pixel-mark`,role:`img`,"aria-label":`OpenPI`,children:ru.slice(0,i).map(e=>(0,q.jsx)(`i`,{},e))})]},n);return e?(0,q.jsx)(`button`,{className:`landing-brand`,type:`button`,"aria-label":`Replay OpenPI logo animation`,onClick:()=>r(e=>e+1),children:a}):a}function au(e,t,n){return Math.min(n,Math.max(t,Math.round(e)))}function ou({side:e,value:t,min:n,max:r,defaultValue:i,collapseThreshold:a,onCollapse:o,onExpandPastMax:s,onChange:c,onDraggingChange:l}){let{t:u}=W(),d=(0,K.useRef)(null),f=(e,t)=>{d.current?.pointerId===t&&(d.current=null,e.hasPointerCapture(t)&&e.releasePointerCapture(t),l(!1))},p=e=>c(au(e,n,r));return(0,q.jsx)(`hr`,{className:`pane-resizer ${e}`,tabIndex:0,"aria-label":u(e===`left`?`resizeSidebar`:`resizeWorkbar`),"aria-orientation":`vertical`,"aria-valuenow":t,"aria-valuemin":n,"aria-valuemax":r,"data-pane-resizer":e,onKeyDown:a=>{if(a.key===`Escape`&&d.current){a.preventDefault(),a.stopPropagation();let e=d.current;e.started&&p(e.startValue),f(a.currentTarget,e.pointerId);return}let o;switch(a.key){case`ArrowLeft`:case`ArrowRight`:o=t+(a.key===`ArrowRight`?1:-1)*(e===`left`?16:-16);break;case`Home`:o=n;break;case`End`:o=r;break;case`Enter`:o=i;break;default:return}a.preventDefault(),p(o)},onDoubleClick:()=>p(i),onPointerDown:e=>{e.button!==0||d.current||(e.preventDefault(),e.currentTarget.focus({preventScroll:!0}),d.current={pointerId:e.pointerId,startX:e.clientX,startValue:t,started:!1},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:t=>{let n=d.current;if(!n||n.pointerId!==t.pointerId)return;let i=t.clientX-n.startX;if(!n.started){if(Math.abs(i)<4)return;n.started=!0,l(!0)}let c=n.startValue+(e===`left`?i:-i);if(s&&c>=r+48){f(t.currentTarget,t.pointerId),s();return}if(o&&a!==void 0&&c<=a){f(t.currentTarget,t.pointerId),o();return}p(c)},onPointerUp:e=>f(e.currentTarget,e.pointerId),onPointerCancel:e=>{d.current?.pointerId===e.pointerId&&(d.current.started&&p(d.current.startValue),f(e.currentTarget,e.pointerId))},onLostPointerCapture:()=>{d.current&&(d.current=null,l(!1))}})}var su=`data-astryx-live-region`,cu=`position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;inset-block-start:0;inset-inline-start:0;pointer-events:none;user-select:none;`,lu=2e3,uu={polite:null,assertive:null};function du(e){let t=uu[e];t!=null&&(clearTimeout(t),uu[e]=null)}function fu(e,t){du(e),uu[e]=setTimeout(()=>{uu[e]=null,t.textContent=``},lu)}var pu=null;function mu(e){let t=document.createElement(`div`);return t.setAttribute(su,e),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-atomic`,`true`),t.setAttribute(`role`,e===`assertive`?`alert`:`status`),t.style.cssText=cu,document.body.appendChild(t),t}function hu(){return typeof document>`u`?null:pu?(pu.polite.isConnected||document.body.appendChild(pu.polite),pu.assertive.isConnected||document.body.appendChild(pu.assertive),pu):(pu={polite:mu(`polite`),assertive:mu(`assertive`)},pu)}function gu(e,t){let n=hu();if(!n)return;let r=t===`assertive`?n.assertive:n.polite;r.textContent=``,requestAnimationFrame(()=>{r.textContent=e}),fu(t,r)}function _u(e){if(du(e),!pu)return;let t=e===`assertive`?pu.assertive:pu.polite;t.textContent=``}function vu(){return(0,K.useCallback)((e,t=`polite`)=>{if(!e){_u(t);return}gu(e,t)},[])}var yu={base:{k1xSpc:`xjp7ctv`,kMwMTN:`x1tgivj0`,kMv6JI:`x9ynric`,$$css:!0},light:{kQNsl9:`x19aimcq`,$$css:!0},dark:{kQNsl9:`xntwwlm`,$$css:!0},system:{kQNsl9:`x108lcm5`,$$css:!0}},bu=K.createContext(!1);bu.displayName=`ThemeNestingContext`;var xu=new Set,Su=0;function Cu(e){let t=(0,K.useId)();(0,K.useInsertionEffect)(()=>{if(e.__built)return;let n=`astryx-theme-${e.name}`;if(xu.has(n))return;`${e.name}`,`${e.name}${e.name}${e.name}${e.name}`;let{prose:r,component:i}=Di(e),a=Ei();xu.add(n);let o=[()=>xu.delete(n)];if(a){if(Su++===0){let e=document.createElement(`style`);e.setAttribute(A(`theme-base`),``),e.textContent=`@layer astryx-base {\n${a}\n}`,document.head.appendChild(e)}o.push(()=>{--Su===0&&document.querySelector(`style[${A(`theme-base`)}]`)?.remove()})}if(r){let n=document.createElement(`style`);n.setAttribute(A(`theme-prose`),e.name),n.setAttribute(A(`id`),t),n.textContent=`@layer reset {\n${r}\n}`,document.head.appendChild(n)}if(i){let n=document.createElement(`style`);n.setAttribute(A(`theme`),e.name),n.setAttribute(A(`id`),t),n.textContent=`@layer astryx-theme {\n${i}\n}`,document.head.appendChild(n)}return(r||i)&&o.push(()=>{let n=document.querySelector(`style[${A(`theme-prose`)}="${e.name}"][${A(`id`)}="${t}"]`),r=document.querySelector(`style[${A(`theme`)}="${e.name}"][${A(`id`)}="${t}"]`);n?.remove(),r?.remove()}),()=>{for(let e of o)e()}},[e,t])}function wu(e,t,n){ne(()=>{if(!e&&!(typeof document>`u`))return t===`light`||t===`dark`?document.documentElement.setAttribute(`data-theme`,t):document.documentElement.removeAttribute(`data-theme`),document.documentElement.setAttribute(A(`theme`),n),()=>{document.documentElement.removeAttribute(`data-theme`),document.documentElement.removeAttribute(A(`theme`))}},[e,t,n])}function Tu({theme:e,mode:t=`system`,children:n}){let r=(0,K.use)(bu);ei(e),Cu(e),wu(r,t,e.name);let i=t===`dark`?yu.dark:t===`light`?yu.light:yu.system,a=(0,K.useMemo)(()=>({theme:e,mode:t}),[e,t]);return(0,q.jsx)(Ui,{value:a,children:(0,q.jsx)(bu,{value:!0,children:(0,q.jsx)(`div`,{...w(yu.base,i),"data-astryx-theme":e.name,"data-theme":t===`system`?void 0:t,children:n})})})}Tu.displayName=`Theme`;function Eu(e,t){let n=document.createElement(`span`);n.style.display=`none`,e.appendChild(n);try{return t.map(e=>(n.style.color=`var(${e})`,St(getComputedStyle(n).color)))}finally{n.remove()}}function Du(e){let t=[],n=e;for(;n!==null;){let e=getComputedStyle(n);if(e.backgroundImage!==`none`)return null;let r=St(e.backgroundColor);if(r!==null&&r.a>0&&(t.push(r),r.a>=1))break;n=n.parentElement}let r=t.pop();return r===void 0||r.a<1?null:t.reduceRight((e,t)=>qr(t,e),r)}var Ou=3;function ku(e,t,n,r){return n===null||r===null?null:t!==null&&Yr(t,e)>=Ou?`off`:Yr(n,e)>=Yr(r,e)?`dark`:`light`}function Au(e,t){let[n,r]=(0,K.useState)(null),{tokens:i}=sa(),a=(0,K.useRef)(null);return ne(()=>{let n=e.current?.parentElement??null;if(!t||n===null)return;let o=Du(n);if(o===null)return;let s=wt(o),c=a.current;if(c!==null&&c.background===s&&c.tokens===i)return;a.current={background:s,tokens:i};let[l,u,d]=Eu(n,[`--color-text-primary`,`--color-on-dark`,`--color-on-light`]),f=ku(o,l,u,d);f!==null&&r(e=>e===f?e:f)}),t?n:null}function ju({mode:e,fallback:t=`dark`,children:n}){let r=(0,K.useRef)(null),i=Au(r,e===`auto`),a=e===`auto`?i??t:e;return(0,q.jsx)(`div`,{ref:r,...a===`off`?null:{[A(`media`)]:a},...{0:{className:`xjp7ctv`},1:{className:`xjp7ctv x1tgivj0`}}[(a!==`off`)<<0],children:n})}ju.displayName=`MediaTheme`;var Mu=8,Nu=.4,Pu=48,Fu=1.2,Iu=1.2,Lu=`120%`,Ru=.4,zu=.02;function Bu(e,t){return Math.min(Math.max(e/t,0),1)}function Vu(e){e.style.removeProperty(`transition-duration`),e.style.removeProperty(`--_toast-swipe-y`),e.style.removeProperty(`--_toast-swipe-exit-y`),e.style.removeProperty(`--_toast-swipe-opacity`),e.style.removeProperty(`--_toast-swipe-scale`)}function Hu({direction:e,enabled:t,canPauseTimer:n,isTimerPaused:r,pauseTimer:i,resumeTimer:a,dismiss:o,shouldIgnoreTarget:s}){let c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useCallback)(e=>{let t=c.current,n=l.current;l.current=null,t&&Vu(t),e&&n?.pausedTimer&&a()},[a]),d=(0,K.useCallback)((a,o)=>{let u=c.current;if(!u||!t||l.current!=null||s(o,u))return!1;let d=n&&!r();d&&i();let f=Math.max(u.getBoundingClientRect().height,1);return l.current={pointerId:a.pointerId,startX:a.clientX,startY:a.clientY,startTime:Date.now(),direction:e,intent:`pending`,pausedTimer:d,surfaceSize:f,dismissThreshold:Math.max(f*Nu,Pu)},!0},[n,e,t,r,i,s]),f=(0,K.useCallback)((e,t,n)=>{let r=l.current,i=c.current;if(!r||!i||e.pointerId!==r.pointerId)return;let a=e.clientX-r.startX,o=e.clientY-r.startY,s=Math.abs(a),d=Math.abs(o);if(r.intent===`pending`){if(s>Mu&&s>d){n?.(),u(!0);return}if(d<=Mu||d<=s*Iu)return;if(r.intent=o*r.direction>0?`vertical`:`opposite`,r.intent===`opposite`){n?.(),u(!0);return}i.style.setProperty(`transition-duration`,`0s`)}t();let f=Math.max(0,o*r.direction),p=Bu(f,r.surfaceSize);i.style.setProperty(`--_toast-swipe-y`,`${f*r.direction}px`),i.style.setProperty(`--_toast-swipe-opacity`,(1-p*Ru).toFixed(3)),i.style.setProperty(`--_toast-swipe-scale`,(1-p*zu).toFixed(3))},[u]),p=(0,K.useCallback)(e=>{let t=l.current,n=c.current;if(!t||!n||e.pointerId!==t.pointerId)return;let r=Math.max(0,(e.clientY-t.startY)*t.direction),i=Math.max(1,Date.now()-t.startTime),s=t.intent===`vertical`&&(r>=t.dismissThreshold||r>=Pu&&r/i>Fu);if(l.current=null,n.style.removeProperty(`transition-duration`),s){n.style.setProperty(`--_toast-swipe-exit-y`,t.direction===1?Lu:`calc(-1 * ${Lu})`),o();return}Vu(n),t.pausedTimer&&a()},[o,a]),m=(0,K.useCallback)(e=>{e.pointerType===`pen`&&(e.button==null||e.button===0)&&d(e,e.target)&&c.current?.setPointerCapture?.(e.pointerId)},[d]),h=(0,K.useCallback)(e=>{e.pointerType===`pen`&&f(e,()=>e.preventDefault(),()=>c.current?.releasePointerCapture?.(e.pointerId))},[f]),g=(0,K.useCallback)(e=>{e.pointerType===`pen`&&(c.current?.releasePointerCapture?.(e.pointerId),p(e))},[p]),_=(0,K.useCallback)(e=>{e.pointerType===`pen`&&l.current?.pointerId===e.pointerId&&u(!0)},[u]);return(0,K.useEffect)(()=>{let e=c.current;if(!e||!t)return;let n=e=>({pointerId:e.identifier,clientX:e.clientX,clientY:e.clientY}),r=e=>{let t=l.current?.pointerId;return t==null?void 0:[...e.changedTouches].find(e=>e.identifier===t)},i=e=>{let t=e.touches.length===1?e.changedTouches[0]:null;t&&d(n(t),e.target)},a=e=>{let t=r(e);t&&f(n(t),()=>{e.cancelable&&e.preventDefault()})},o=e=>{let t=r(e);t?p(n(t)):e.touches.length===0&&u(!0)},s=()=>u(!0);return e.addEventListener(`touchstart`,i,{passive:!0}),e.addEventListener(`touchmove`,a,{passive:!1}),e.addEventListener(`touchend`,o,{passive:!0}),e.addEventListener(`touchcancel`,s,{passive:!0}),()=>{e.removeEventListener(`touchstart`,i),e.removeEventListener(`touchmove`,a),e.removeEventListener(`touchend`,o),e.removeEventListener(`touchcancel`,s)}},[d,t,p,f,u]),{rootRef:c,bindings:{onPointerDown:m,onPointerMove:h,onPointerUp:g,onPointerCancel:_,onLostPointerCapture:_}}}var Uu=`${wa},[tabindex],[contenteditable]:not([contenteditable="false"])`;function Wu(e,t){if(!(e instanceof Element))return!1;let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(Uu))return!0;n=n.parentElement}return!1}p[`--spacing-2`];function Gu(e){return(0,q.jsx)(Ku,{...e,gestureDirection:1})}function Ku({type:e,body:t,endContent:n,isAutoHide:r,autoHideDuration:i,isExiting:a=!1,onDismiss:o,renderContent:s,gestureDirection:c}){let l=jr(),u=(0,K.useRef)(null),d=(0,K.useRef)(!1),f=(0,K.useRef)(i),p=(0,K.useRef)(null),m=(0,K.useRef)(o);m.current=o;let h=(0,K.useCallback)(()=>{!r||d.current||(u.current&&clearTimeout(u.current),p.current=Date.now(),u.current=setTimeout(()=>{m.current(`auto`)},f.current))},[r]),g=(0,K.useCallback)(()=>{if(!(!r||d.current)&&(d.current=!0,u.current&&=(clearTimeout(u.current),null),p.current!=null)){let e=Date.now()-p.current;f.current=Math.max(f.current-e,1e3)}},[r]),_=(0,K.useCallback)(()=>{!r||!d.current||(d.current=!1,h())},[r,h]);(0,K.useEffect)(()=>(f.current=i,h(),()=>{u.current&&clearTimeout(u.current)}),[i,h]),(0,K.useEffect)(()=>{if(r)return window.addEventListener(`blur`,g),window.addEventListener(`focus`,_),()=>{window.removeEventListener(`blur`,g),window.removeEventListener(`focus`,_)}},[r,g,_]);let v=(0,K.useCallback)(()=>d.current,[]),y=(0,K.useCallback)(()=>{m.current(`manual`)},[]),{rootRef:b,bindings:x}=Hu({direction:c,enabled:!a,canPauseTimer:r,isTimerPaused:v,pauseTimer:g,resumeTimer:_,dismiss:y,shouldIgnoreTarget:Wu}),S=(0,K.useCallback)(()=>{o(`manual`)},[o]),C=e===`error`,{mode:w}=sa(),T=C||w===`light`?`dark`:`light`;return(0,q.jsx)(`div`,{ref:b,role:C?`alert`:`status`,"aria-live":C?`assertive`:`polite`,"aria-atomic":`true`,onMouseEnter:g,onMouseLeave:_,onFocusCapture:g,onBlurCapture:_,...x,...H(O(`toast`,{type:e}),{0:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x1i7u4iq x9ynric xjm74w1 xw6l6zx x1qk3xlt x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c xenstv7`},2:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x1i7u4iq x9ynric xjm74w1 xw6l6zx x1qk3xlt x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c x1l5t2a3`},1:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c xenstv7 xg01cxk x149p1fo`},3:{className:`x1na6nto x1pzlopt x1hviunn x9f619 x1l2rt3b x193iq5w x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x6s140c x1l5t2a3 xg01cxk x149p1fo`}}[!!C<<1|!!a<<0]),children:(0,q.jsx)(ju,{mode:`auto`,fallback:T,children:s?s({body:t,endContent:n,type:e,isAutoHide:r,autoHideDuration:i,dismiss:S}):(0,q.jsxs)(`div`,{className:`x78zum5 x1cy8zhl xozqiw3 xjcht0a xh8yej3`,children:[(0,q.jsx)(`div`,{className:`x98rzlu xeuugli xj0a0fe`,children:t}),(0,q.jsxs)(`div`,{className:`x2lah0s x78zum5 x6s0dn4 x1txdalj x1q370uo xmequkd`,children:[n,(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,icon:(0,q.jsx)(ya,{icon:`close`,size:`sm`,color:`inherit`}),label:l(`@astryx.toast.dismiss`),onClick:S,isIconOnly:!0})]})]})})})}Gu.displayName=`Toast`,Ku.displayName=`ToastSurface`;var qu=(0,K.createContext)(null);qu.displayName=`InteractiveRoleContext`;var Ju=`button, [role="button"]`;function Yu(e){return e.matches(Ju)?e:e.querySelector(Ju)}var Xu={contentPadding:{kLKAdn:`x1vlblms`,kGO01o:`xvmdzux`,kZCmMZ:`x126nfab`,kwRFfy:`x1t818jl`,$$css:!0},customWidth:e=>[{kzqmXN:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x5lhr3w`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}],matchTrigger:{k7Eaqz:`xrzjruh`,$$css:!0}};function Zu({children:e,anchorRef:t,content:n,placement:r=`below`,alignment:i=`start`,isOpen:a,onOpenChange:o,isEnabled:s=!0,width:c,label:l,role:u=`dialog`,isModal:d,hasCloseButton:f,closeButtonLabel:m,hasAutoFocus:h,hasLightDismiss:g=!0,hasEscapeDismiss:_=!0,xstyle:v,className:y,style:b,"data-testid":x}){let S=(0,K.useRef)(null),C=a!==void 0,w=(0,K.useCallback)(()=>{o?.(!0)},[o]),T=(0,K.useCallback)(()=>{o?.(!1)},[o]),E=Wr({dialogLabel:l,role:u,isModal:d,hasLightDismiss:g,hasEscapeDismiss:_,hasCloseButton:f,closeButtonLabel:m,hasAutoFocus:h,surfaceTarget:`popover`,xstyle:[Xu.contentPadding,v],className:y,style:b,onShow:w,onHide:T}),D=(0,K.useCallback)(()=>{s&&E.toggle()},[s,E]),O=(0,K.useCallback)(e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),D())},[D]),k=(0,K.useCallback)(e=>{e.setAttribute(`aria-haspopup`,E.triggerProps[`aria-haspopup`]),e.setAttribute(`aria-expanded`,String(E.triggerProps[`aria-expanded`])),e.setAttribute(`aria-controls`,E.triggerProps[`aria-controls`]),e.addEventListener(`click`,D);let t=e.tagName!==`BUTTON`&&e.getAttribute(`role`)===`button`;return t&&e.addEventListener(`keydown`,O),()=>{e.removeAttribute(`aria-haspopup`),e.removeAttribute(`aria-expanded`),e.removeAttribute(`aria-controls`),e.removeEventListener(`click`,D),t&&e.removeEventListener(`keydown`,O)}},[E,D,O]);ne(()=>{if(!t)return;let e=t.current;if(!e)return;let n=Yu(e);if(!n)return;E.triggerRef(e);let r=k(n);return()=>{E.triggerRef(null),r()}},[t,E,k]),ne(()=>{if(t||typeof e==`function`)return;let n=S.current;if(!n)return;E.triggerRef(n);let r=Yu(n);if(!r)return;let i=k(r);return()=>{E.triggerRef(null),i()}},[t,E,k]),ne(()=>{C&&(a&&!E.isOpen?E.show():!a&&E.isOpen&&E.hide())},[a,C,E]);let A=c?Xu.customWidth(c):Xu.matchTrigger;if(t&&e==null)return(0,q.jsx)(q.Fragment,{children:E.render((0,q.jsx)(`div`,{"data-testid":x,children:n}),{placement:r,alignment:i,offset:p[`--spacing-1`],xstyle:[A,R[r]]})});if(typeof e==`function`){let t={ref:E.triggerRef,onClick:D,"aria-haspopup":`dialog`,"aria-expanded":E.isOpen,"aria-controls":E.id};return(0,q.jsxs)(q.Fragment,{children:[e(t),E.render((0,q.jsx)(`div`,{"data-testid":x,children:n}),{placement:r,alignment:i,offset:p[`--spacing-1`],xstyle:[A,R[r]]})]})}return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(qu,{value:`button`,children:(0,q.jsx)(`div`,{ref:S,className:`x3nfvp2`,children:e})}),E.render((0,q.jsx)(`div`,{"data-testid":x,children:n}),{placement:r,alignment:i,offset:p[`--spacing-1`],xstyle:[A,R[r]]})]})}Zu.displayName=`Popover`;var Qu={container:{kWkggS:`x10xzikg`,"--_hovercard-radius":`xqwz7mz`,kaIpWk:`x7a53xk`,kGVxlE:`x14hfi27`,$$css:!0}};function $u(e){return e.hasAttribute(`tabindex`)?e.tabIndex>=0:[`A`,`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function ed(e={}){let{placement:t=`above`,alignment:n=`center`,delay:r=300,hideDelay:i=200,focusTrigger:a=`auto`,touchTrigger:o=`auto`,isEnabled:s=!0,label:c,isOpen:l,isDefaultOpen:u=!1,onShow:d,onHide:f}=e,m=ce({mode:`context`,lazyMount:!0,onShow:d,onHide:f}),h=Qu.container,g=(0,K.useRef)(null),_=(0,K.useRef)(null),v=(0,K.useRef)(null),y=(0,K.useRef)(!1),b=(0,K.useRef)(!1),x=(0,K.useCallback)(()=>{g.current&&=(clearTimeout(g.current),null),_.current&&=(clearTimeout(_.current),null)},[]),S=(0,K.useCallback)(()=>{x(),m.show()},[x,m]),C=(0,K.useCallback)(()=>{x(),y.current=!1,m.hide()},[x,m]),w=P({touchTrigger:o,isEnabled:s,isControlled:l!==void 0,isOpen:m.isOpen,layerId:m.id,triggerRef:v,show:S,hide:C}),T=(0,K.useCallback)(()=>{!s||l===!1||(x(),g.current=setTimeout(()=>{m.show()},r))},[s,l,x,m,r]),E=(0,K.useCallback)(()=>{l!==!0&&(x(),_.current=setTimeout(()=>{y.current||m.hide()},i))},[l,x,m,i]),D=(0,K.useCallback)(()=>{w.isTouchPointerRef.current||T()},[w,T]),k=(0,K.useCallback)(()=>{w.isTouchPointerRef.current||E()},[w,E]),A=(0,K.useCallback)(e=>{w.handlePointerDown(e)},[w]),M=(0,K.useCallback)(()=>{if(s&&!w.isTouchInteraction()){if(b.current){b.current=!1;return}x(),m.show()}},[s,w,x,m]),N=(0,K.useCallback)(e=>{let t=e.relatedTarget;document.getElementById(m.id)?.contains(t)||E()},[m.id,E]);j({isActive:!0,isPresent:()=>{let e=typeof document>`u`?null:document.getElementById(m.id);if(e==null)return!1;try{return e.matches(`:popover-open`)}catch{return m.isOpen}},onDismiss:()=>{if(x(),w.clearTapOpen(),l!==void 0){f?.();return}let e=(typeof document>`u`?null:document.getElementById(m.id))?.contains(document.activeElement)??!1;m.hide(),e&&(b.current=!0,v.current?.focus())}});let{handlePointerEnter:F}=w,I=(0,K.useCallback)(e=>{v.current&&(v.current.removeEventListener(`mouseenter`,D),v.current.removeEventListener(`mouseleave`,k),v.current.removeEventListener(`focusin`,M),v.current.removeEventListener(`focusout`,N),v.current.removeEventListener(`pointerenter`,F),v.current.removeEventListener(`pointerdown`,A)),e&&(e.addEventListener(`pointerenter`,F),e.addEventListener(`mouseenter`,D),e.addEventListener(`mouseleave`,k),e.addEventListener(`pointerdown`,A),(a===`always`||a===`auto`&&$u(e))&&(e.addEventListener(`focusin`,M),e.addEventListener(`focusout`,N))),v.current=e},[a,D,k,M,N,F,A]),ee=(0,K.useCallback)(e=>{m.ref(e),I(e)},[m,I]);(0,K.useEffect)(()=>()=>{x()},[x]),(0,K.useEffect)(()=>{u&&m.show()},[]),(0,K.useEffect)(()=>{if(l!==void 0)if(l)x(),m.show();else{x();let e=(typeof document>`u`?null:document.getElementById(m.id))?.contains(document.activeElement)??!1;m.hide(),e&&(b.current=!0,v.current?.focus())}},[l,x,m]);let L=(0,K.useCallback)((e,r)=>{let i=r?.placement??t,a=O(`hover-card`,void 0,{legacyNames:[`hovercard`]}).className,o={placement:i,alignment:r?.alignment??n,offset:p[`--spacing-1`],role:c?`dialog`:`group`,"aria-label":c||void 0,xstyle:[h,R[i],r?.xstyle],className:r?.className?`${a} ${r.className}`:a,style:r?.style,as:`div`};return m.render((0,q.jsx)(`div`,{className:`x1lliihq x1vlblms xvmdzux x126nfab x1t818jl`,onMouseEnter:()=>{w.isTouchPointerRef.current||(y.current=!0,x())},onMouseLeave:()=>{w.isTouchPointerRef.current||(y.current=!1,E())},onBlur:e=>{let t=e.relatedTarget;e.currentTarget.contains(t)||v.current?.contains(t)||E()},children:e}),o)},[m,t,n,c,x,E,h,w]);return{ref:ee,positionRef:m.ref,interactionRef:I,anchorId:m.anchorId,id:m.id,describedBy:m.id,isOpen:m.isOpen,renderHoverCard:L,show:m.show,hide:m.hide}}async function td(e,t=n){let n=t,r=t.defaultView??globalThis.window,{HTMLInputElement:i,HTMLTextAreaElement:a,HTMLElement:o}=r;try{return await r.navigator.clipboard.writeText(e),!0}catch{}let s=n.activeElement,c=r.getSelection(),l=c?Array.from({length:c.rangeCount},(e,t)=>c.getRangeAt(t).cloneRange()):[],u=s instanceof i||s instanceof a?{start:s.selectionStart,end:s.selectionEnd,direction:s.selectionDirection}:null,d=n.createElement(`textarea`);d.value=e,d.readOnly=!0,d.style.cssText=`position:fixed;opacity:0;pointer-events:none`;try{return n.body.append(d),d.focus({preventScroll:!0}),d.select(),n.execCommand(`copy`)}catch{return!1}finally{if(d.remove(),s instanceof o&&s.isConnected&&(s.focus({preventScroll:!0}),u&&u.start!==null&&u.end!==null&&(s instanceof i||s instanceof a)&&s.setSelectionRange(u.start,u.end,u.direction??void 0)),c){c.removeAllRanges();for(let e of l)e.startContainer.isConnected&&e.endContainer.isConnected&&c.addRange(e)}}}var nd=/\p{Cf}/u,rd=class{state=`text`;stringEscape=!1;push(e){let t=``;for(let n of e){let e=n.codePointAt(0);if(this.state===`osc`||this.state===`st_string`){n===`œ`||this.state===`osc`&&n===`\x07`||this.stringEscape&&n===`\\`?(this.state=`text`,this.stringEscape=!1):this.stringEscape=n===`\x1B`;continue}if(this.state===`csi`){e>=64&&e<=126?this.state=`text`:(e<32||e>63)&&(this.state=`text`,t+=this.safeCharacter(n,e));continue}if(this.state===`escape`||this.state===`escape_intermediate`){if(this.state===`escape`){if(n===`[`){this.state=`csi`;continue}if(n===`]`){this.state=`osc`;continue}if(n===`P`||n===`X`||n===`^`||n===`_`){this.state=`st_string`;continue}}e>=32&&e<=47?this.state=`escape_intermediate`:e>=48&&e<=126?this.state=`text`:(this.state=`text`,t+=this.safeCharacter(n,e));continue}n===`\x1B`?this.state=`escape`:n===`›`?this.state=`csi`:n===``?this.state=`osc`:n===``||n===`˜`||n===`ž`||n===`Ÿ`?this.state=`st_string`:t+=this.safeCharacter(n,e)}return t}safeCharacter(e,t){return e===` `?` `:e===` +`||e===`‌`||e===`‍`?e:t<=31||t>=127&&t<=159||nd.test(e)?``:e}};function id(e){return new rd().push(e)}var ad=8e3;function od(e,t){let n=0;for(let r of e){let e=r.codePointAt(0);if(n+=e<=127?1:e<=2047?2:e<=65535?3:4,n>t)return}return n}function sd(e){return od(e,1/0)}function cd(e){return od(e,ad)!==void 0}var ld=12288,ud=4096;function dd(e){return e&&typeof e==`object`&&!Array.isArray(e)?e:{}}function fd(e,t=!1){let n=dd(e),r={},i=e=>Object.getOwnPropertyDescriptor(n,e)?.value,a=t&&typeof i(`pathUnavailable`)==`string`;for(let e of t?[`path`,`resolvedPath`]:[`path`]){let n=i(e),o=e===`path`?`displayPath`:`displayResolvedPath`,s=typeof n==`string`?n:t?i(o):void 0;typeof s==`string`&&(r[o]=pd(s).text),typeof n==`string`&&(n.length>ud||new TextEncoder().encode(n).length>ud?a=!0:r[e]=n)}a&&(delete r.path,delete r.resolvedPath,r.pathUnavailable=`File reference exceeds the evidence byte limit.`);for(let e of[`command`,`offset`,`limit`,`id`]){let t=i(e);typeof t==`string`?r[e]=pd(t).text:typeof t==`number`&&Number.isSafeInteger(t)&&(r[e]=t)}return r}function pd(e,t=!1){let n=t?e.slice(-24576):e.slice(0,ld*2),r=id(n).split(` `),i=(t?r.slice(-300):r.slice(0,300)).join(` -`),a=new TextEncoder().encode(i),o=t?Math.max(0,a.length-od):0,s=t?a.length:Math.min(a.length,od);for(;oo&&(a[s]&192)==128;)s--;return{text:new TextDecoder().decode(a.subarray(o,s)),truncated:e.length>n.length||r.length>300||a.length>12288}}function ld(e){if(e.evidenceArguments)return e.evidenceArguments;try{return sd(JSON.parse(e.arguments))}catch{return{}}}function ud(e){return[`read`,`write`,`edit`,`bash`].includes(e)}function dd(e,t){if(t?.forkSnapshotToolResult)return{state:`unknown`};if(e===`bash`&&t?.terminalReceipt)return t.terminalReceipt;if(e===`bash`&&t?.isError===!0&&!t.truncation){let e=t.content.trimEnd().split(` -`).at(-1);if(e===`Command aborted`)return{state:`cancelled`};if(/^Command timed out after \d+(?:\.\d+)? seconds$/u.test(e??``))return{state:`timed_out`};let n=/^Command exited with code (-?\d+)$/u.exec(e??``);if(n)return{state:`failed`,exitCode:Number(n[1])}}}function fd(e){let t=/^\s*Tests\s+((?:\d+ (?:passed|failed|skipped|todo)(?:\s*\|\s*)?)+)\s*\((\d+)\)\s*$/mu.exec(e);if(t){let n=Number(/(\d+) passed/u.exec(t[1])?.[1]??0),r=Number(/(\d+) failed/u.exec(t[1])?.[1]??0),i=Number(t[2]);if(Number.isSafeInteger(i)&&n+r<=i)return{format:`Vitest`,tests:i,passed:n,failed:r,cancelled:0,failures:pd(e,/^\s*(?:FAIL\s|×\s)/u)}}let n=/^Ran (\d+) tests? across \d+ files?\./mu.exec(e),r=/^\s*(\d+) pass\s*$/mu.exec(e),i=/^\s*(\d+) fail\s*$/mu.exec(e);if(n&&r&&i){let t=Number(n[1]),a=Number(r[1]),o=Number(i[1]);if(Number.isSafeInteger(t)&&a+o<=t)return{format:`Bun`,tests:t,passed:a,failed:o,cancelled:0,failures:pd(e,/^\s*\(fail\) /u)}}let a=t=>{let n=RegExp(`^[#ℹ] ${t} (\\d+)$`,`mu`).exec(e),r=n?Number(n[1]):void 0;return r!==void 0&&Number.isSafeInteger(r)?r:void 0},o=a(`tests`),s=a(`pass`),c=a(`fail`),l=a(`cancelled`)??0;if(o===void 0||s===void 0||c===void 0||s+c+l>o)return;let u=pd(e,/^(?:\s*not ok \d+\b|✖ )/u);return{format:/^ℹ tests /mu.test(e)?`Node`:`TAP`,tests:o,passed:s,failed:c,cancelled:l,failures:u}}function pd(e,t){return e.split(` +`),a=new TextEncoder().encode(i),o=t?Math.max(0,a.length-ld):0,s=t?a.length:Math.min(a.length,ld);for(;oo&&(a[s]&192)==128;)s--;return{text:new TextDecoder().decode(a.subarray(o,s)),truncated:e.length>n.length||r.length>300||a.length>12288}}function md(e){if(e.evidenceArguments)return fd(e.evidenceArguments,!0);try{return fd(JSON.parse(e.arguments))}catch{return{}}}function hd(e){return[`read`,`write`,`edit`,`bash`].includes(e)}function gd(e,t){if(t?.forkSnapshotToolResult)return{state:`unknown`};if(e===`bash`&&t?.terminalReceipt)return t.terminalReceipt;if(e===`bash`&&t?.isError===!0&&!t.truncation){let e=t.content.trimEnd().split(` +`).at(-1);if(e===`Command aborted`)return{state:`cancelled`};if(/^Command timed out after \d+(?:\.\d+)? seconds$/u.test(e??``))return{state:`timed_out`};let n=/^Command exited with code (-?\d+)$/u.exec(e??``);if(n)return{state:`failed`,exitCode:Number(n[1])}}}function _d(e){let t=/^\s*Tests\s+((?:\d+ (?:passed|failed|skipped|todo)(?:\s*\|\s*)?)+)\s*\((\d+)\)\s*$/mu.exec(e);if(t){let n=Number(/(\d+) passed/u.exec(t[1])?.[1]??0),r=Number(/(\d+) failed/u.exec(t[1])?.[1]??0),i=Number(t[2]);if(Number.isSafeInteger(i)&&n+r<=i)return{format:`Vitest`,tests:i,passed:n,failed:r,cancelled:0,failures:vd(e,/^\s*(?:FAIL\s|×\s)/u)}}let n=/^Ran (\d+) tests? across \d+ files?\./mu.exec(e),r=/^\s*(\d+) pass\s*$/mu.exec(e),i=/^\s*(\d+) fail\s*$/mu.exec(e);if(n&&r&&i){let t=Number(n[1]),a=Number(r[1]),o=Number(i[1]);if(Number.isSafeInteger(t)&&a+o<=t)return{format:`Bun`,tests:t,passed:a,failed:o,cancelled:0,failures:vd(e,/^\s*\(fail\) /u)}}let a=t=>{let n=RegExp(`^[#ℹ] ${t} (\\d+)$`,`mu`).exec(e),r=n?Number(n[1]):void 0;return r!==void 0&&Number.isSafeInteger(r)?r:void 0},o=a(`tests`),s=a(`pass`),c=a(`fail`),l=a(`cancelled`)??0;if(o===void 0||s===void 0||c===void 0||s+c+l>o)return;let u=vd(e,/^(?:\s*not ok \d+\b|✖ )/u);return{format:/^ℹ tests /mu.test(e)?`Node`:`TAP`,tests:o,passed:s,failed:c,cancelled:l,failures:u}}function vd(e,t){return e.split(` `).flatMap((e,n,r)=>t.test(e)?[r.slice(n,n+8).join(` -`)]:[]).slice(0,20)}function md(e,t,n){let r=ld(e),i=sd(t?.details),a=dd(e.name,t),o=a?.state??(n===`running`||n===`cancelled`||n===`timed_out`?n:t?.isError===!0?`failed`:t?.isError===!1?`returned`:`unknown`),s=e.name===`bash`,c=cd(t?.content??``,s),l=e.name===`read`?/\n\n(\[(?:\d+ more lines in file\. Use offset=\d+ to continue\.|Showing lines [^\n]+)\])$/u.exec(c.text):null,u=c.truncated||!!t?.truncation||sd(i.truncation).truncated===!0||e.evidenceTruncated===!0,d=s&&!t?.forkSnapshotToolResult?fd(c.text):void 0,f=e.name===`read`?`file`:[`write`,`edit`].includes(e.name)?`change`:d?`test`:`terminal`,p=[`write`,`edit`].includes(e.name)&&o===`returned`&&t?.isError===!1&&typeof i.diff==`string`?cd(i.diff):void 0,m=typeof r.offset==`number`&&Number.isSafeInteger(r.offset)&&r.offset>0?r.offset:1;return{kind:f,state:o,processState:a?.state??(e.name===`bash`&&t?.isError===!1?`returned`:e.name===`bash`&&n===`running`?`running`:`unknown`),output:l?c.text.slice(0,l.index):c.text,truncated:u||p?.truncated===!0,readRecovery:l?.[1],numberLines:e.name===`read`&&t?.isError===!1&&sd(i.truncation).firstLineExceedsLimit!==!0&&!!c.text,path:typeof r.path==`string`?cd(r.path).text:void 0,resolvedPath:typeof r.resolvedPath==`string`?cd(r.resolvedPath).text:void 0,command:typeof r.command==`string`?cd(r.command).text:void 0,offset:m,diff:p?.text,tests:d,change:o===`returned`&&t?.isError===!1&&[`created`,`overwritten`,`unchanged`].includes(String(i.change))?String(i.change):void 0,evidenceUnavailable:typeof i.evidenceUnavailable==`string`?cd(i.evidenceUnavailable).text:void 0,exitCode:a&&`exitCode`in a?a.exitCode:void 0,signal:a&&`signal`in a?a.signal:void 0,recovery:typeof i.fullOutputPath==`string`?cd(i.fullOutputPath).text:void 0,rawArguments:cd(e.arguments).text,rawResult:cd(JSON.stringify({content:t?.content,details:t?.details,isError:t?.isError})).text}}function hd(e,t){return t.every((t,n)=>e[n]===t)}function gd(e){if(hd(e,[137,80,78,71,13,10,26,10]))return`image/png`;if(hd(e,[255,216,255]))return`image/jpeg`;let t=new TextDecoder(`ascii`).decode(e.subarray(0,12));return t.startsWith(`GIF87a`)||t.startsWith(`GIF89a`)?`image/gif`:t.startsWith(`RIFF`)&&t.slice(8,12)===`WEBP`?`image/webp`:null}function _d(e){let t=``,n=32768;for(let r=0;r10485760)throw Error(`image-size`);let t=await e.arrayBuffer().catch(()=>{throw Error(`image-read`)}),n=new Uint8Array(t),r=gd(n);if(!r)throw Error(`image-type`);let i=_d(n);return{id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${e.name}`,name:e.name||`image`,size:n.length,mimeType:r,data:i,previewUrl:`data:${r};base64,${i}`}}function yd(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function bd(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var xd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cd={};function wd(e,t){return((t||Cd).jsx?Sd:xd).test(e)}var Td=/[ \t\n\f\r]/g;function Ed(e){return typeof e==`object`?e.type===`text`&&Dd(e.value):Dd(e)}function Dd(e){return e.replace(Td,``)===``}var Od=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Od.prototype.normal={},Od.prototype.property={},Od.prototype.space=void 0;function kd(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Od(n,r,t)}function Ad(e){return e.toLowerCase()}var jd=class{constructor(e,t){this.attribute=t,this.property=e}};jd.prototype.attribute=``,jd.prototype.booleanish=!1,jd.prototype.boolean=!1,jd.prototype.commaOrSpaceSeparated=!1,jd.prototype.commaSeparated=!1,jd.prototype.defined=!1,jd.prototype.mustUseProperty=!1,jd.prototype.number=!1,jd.prototype.overloadedBoolean=!1,jd.prototype.property=``,jd.prototype.spaceSeparated=!1,jd.prototype.space=void 0;var Md=t({boolean:()=>Pd,booleanish:()=>Fd,commaOrSpaceSeparated:()=>Bd,commaSeparated:()=>zd,number:()=>Ld,overloadedBoolean:()=>Id,spaceSeparated:()=>Rd}),Nd=0,Pd=Vd(),Fd=Vd(),Id=Vd(),Ld=Vd(),Rd=Vd(),zd=Vd(),Bd=Vd();function Vd(){return 2**++Nd}var Hd=Object.keys(Md),Ud=class extends jd{constructor(e,t,n,r){let i=-1;if(super(e,t),Wd(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&rf.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(nf,sf);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!nf.test(e)){let n=e.replace(tf,of);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ud}return new i(r,t)}function of(e){return`-`+e.toLowerCase()}function sf(e){return e.charAt(1).toUpperCase()}var cf=kd([Kd,Yd,Zd,Qd,$d],`html`),lf=kd([Kd,Xd,Zd,Qd,$d],`svg`);function uf(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function df(e){return e.join(` `).trim()}var ff=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` -`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),pf=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(ff());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),mf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),hf=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(pf()),r=mf();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),gf=vf(`end`),_f=vf(`start`);function vf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function yf(e){let t=_f(e),n=gf(e);if(t&&n)return{start:t,end:n}}function bf(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Sf(e.position):`start`in e||`end`in e?Sf(e):`line`in e||`column`in e?xf(e):``}function xf(e){return Cf(e&&e.line)+`:`+Cf(e&&e.column)}function Sf(e){return xf(e&&e.start)+`-`+xf(e&&e.end)}function Cf(e){return e&&typeof e==`number`?e:1}var wf=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=bf(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};wf.prototype.file=``,wf.prototype.name=``,wf.prototype.reason=``,wf.prototype.message=``,wf.prototype.stack=``,wf.prototype.column=void 0,wf.prototype.line=void 0,wf.prototype.ancestors=void 0,wf.prototype.cause=void 0,wf.prototype.fatal=void 0,wf.prototype.place=void 0,wf.prototype.ruleId=void 0,wf.prototype.source=void 0;var Tf=e(hf(),1),Ef={}.hasOwnProperty,Df=new Map,Of=/[A-Z]/g,kf=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Af=new Set([`td`,`th`]);function jf(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Hf(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Vf(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?lf:cf,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Mf(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Mf(e,t,n){if(t.type===`element`)return Nf(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Pf(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return If(e,t,n);if(t.type===`mdxjsEsm`)return Ff(e,t);if(t.type===`root`)return Lf(e,t,n);if(t.type===`text`)return Rf(e,t)}function Nf(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=lf,e.schema=i),e.ancestors.push(t);let a=Jf(e,t.tagName,!1),o=Uf(e,t),s=Gf(e,t);return kf.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Ed(e)})),zf(e,o,a,t),Bf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Pf(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Yf(e,t.position)}function Ff(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yf(e,t.position)}function If(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=lf,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Jf(e,t.name,!0),o=Wf(e,t),s=Gf(e,t);return zf(e,o,a,t),Bf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Lf(e,t,n){let r={};return Bf(r,Gf(e,t)),e.create(t,e.Fragment,r,n)}function Rf(e,t){return t.value}function zf(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Bf(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Vf(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Hf(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=_f(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Uf(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Ef.call(t.properties,i)){let a=Kf(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Af.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Wf(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Yf(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Yf(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function Gf(e,t){let n=[],r=-1,i=e.passKeys?new Map:Df;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(sp(e,e.length,0,t),e):t}var lp={}.hasOwnProperty;function up(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function mp(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var hp=Dp(/[A-Za-z]/),gp=Dp(/[\dA-Za-z]/),_p=Dp(/[#-'*+\--9=?A-Z^-~]/);function vp(e){return e!==null&&(e<32||e===127)}var yp=Dp(/\d/),bp=Dp(/[\dA-Fa-f]/),xp=Dp(/[!-/:-@[-`{-~]/);function Sp(e){return e!==null&&e<-2}function Cp(e){return e!==null&&(e<0||e===32)}function wp(e){return e===-2||e===-1||e===32}var Tp=Dp(/\p{P}|\p{S}/u),Ep=Dp(/\s/);function Dp(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Op(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function kp(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return wp(r)?(e.enter(n),s(r)):t(r)}function s(r){return wp(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fp(e,t,n){return kp(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Ip(e){if(e===null||Cp(e)||Ep(e))return 1;if(Tp(e))return 2}function Lp(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Vp(d,-c),Vp(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=cp(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=cp(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=cp(l,Lp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=cp(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=cp(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,sp(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&wp(t)?kp(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Sp(t)?e.check(em,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Sp(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),wp(t)?kp(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),wp(t)?kp(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Sp(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function rm(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var im={name:`codeIndented`,tokenize:om},am={partial:!0,tokenize:sm};function om(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),kp(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Sp(t)?e.attempt(am,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Sp(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function sm(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Sp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):kp(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Sp(e)?i(e):n(e)}}var cm={name:`codeText`,previous:um,resolve:lm,tokenize:dm};function lm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&pm(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),pm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),pm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function xm(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||vp(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Sp(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Cp(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Sp(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Sp(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!wp(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Cm(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Sp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),kp(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Sp(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function wm(e,t){let n;return r;function r(i){return Sp(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):wp(i)?kp(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Tm={name:`definition`,tokenize:Dm},Em={partial:!0,tokenize:Om};function Dm(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Sm.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=mp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Cp(t)?wm(e,l)(t):l(t)}function l(t){return xm(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Em,d,d)(t)}function d(t){return wp(t)?kp(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Sp(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Om(e,t,n){return r;function r(t){return Cp(t)?wm(e,i)(t):n(t)}function i(t){return Cm(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return wp(t)?kp(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Sp(e)?t(e):n(e)}}var km={name:`hardBreakEscape`,tokenize:Am};function Am(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Sp(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var jm={name:`headingAtx`,resolve:Mm,tokenize:Nm};function Mm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},sp(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Nm(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Cp(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Sp(n)?(e.exit(`atxHeading`),t(n)):wp(n)?kp(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Cp(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Pm=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Fm=[`pre`,`script`,`style`,`textarea`],Im={concrete:!0,name:`htmlFlow`,resolveTo:zm,tokenize:Bm},Lm={partial:!0,tokenize:Hm},Rm={partial:!0,tokenize:Vm};function zm(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Bm(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):hp(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):hp(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return hp(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Cp(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Fm.includes(l)?(i=1,r.interrupt?t(s):O(s)):Pm.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||gp(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return wp(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||hp(t)?(e.consume(t),b):wp(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||gp(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):wp(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):wp(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Sp(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Cp(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||wp(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Sp(t)?O(t):wp(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Sp(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Lm,L,k)(t)):t===null||Sp(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Rm,A,L)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Sp(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Fm.includes(n)?(e.consume(t),ee):O(t)}return hp(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||Sp(t)?(e.exit(`htmlFlowData`),L(t)):(e.consume(t),ee)}function L(n){return e.exit(`htmlFlow`),t(n)}}function Vm(e,t,n){let r=this;return i;function i(t){return Sp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Hm(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Wp,t,n)}}var Um={name:`htmlText`,tokenize:Wm};function Wm(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):hp(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):hp(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Sp(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Sp(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Sp(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Sp(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return hp(t)?(e.consume(t),S):n(t)}function S(t){return t===45||gp(t)?(e.consume(t),S):C(t)}function C(t){return Sp(t)?(o=C,N(t)):wp(t)?(e.consume(t),C):M(t)}function w(t){return t===45||gp(t)?(e.consume(t),w):t===47||t===62||Cp(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||hp(t)?(e.consume(t),E):Sp(t)?(o=T,N(t)):wp(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||gp(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Sp(t)?(o=D,N(t)):wp(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Sp(t)?(o=O,N(t)):wp(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Sp(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Cp(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Cp(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return wp(t)?kp(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Gm={name:`labelEnd`,resolveAll:Ym,resolveTo:Xm,tokenize:Zm},Km={tokenize:Qm},qm={tokenize:$m},Jm={tokenize:eh};function Ym(e){let t=-1,n=[];for(;++t=3&&(a===null||Sp(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),wp(t)?kp(e,s,`whitespace`)(t):s(t))}}var lh={continuation:{tokenize:ph},exit:hh,name:`list`,tokenize:fh},uh={partial:!0,tokenize:gh},dh={partial:!0,tokenize:mh};function fh(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:yp(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(sh,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return yp(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Wp,r.interrupt?n:u,e.attempt(uh,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return wp(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ph(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Wp,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kp(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!wp(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(dh,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,kp(e,e.attempt(lh,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function mh(e,t,n){let r=this;return kp(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function hh(e){e.exit(this.containerState.type)}function gh(e,t,n){let r=this;return kp(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!wp(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var _h={name:`setextUnderline`,resolveTo:vh,tokenize:yh};function vh(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function yh(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),wp(t)?kp(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Sp(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var bh={tokenize:xh};function xh(e){let t=this,n=e.attempt(Wp,r,e.attempt(this.parser.constructs.flowInitial,i,kp(e,e.attempt(this.parser.constructs.flow,i,e.attempt(gm,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Sh={resolveAll:Eh()},Ch=Th(`string`),wh=Th(`text`);function Th(e){return{resolveAll:Eh(e===`text`?Dh:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iIh,contentInitial:()=>Ah,disable:()=>Lh,document:()=>kh,flow:()=>Mh,flowInitial:()=>jh,insideSpan:()=>Fh,string:()=>Nh,text:()=>Ph}),kh={42:lh,43:lh,45:lh,48:lh,49:lh,50:lh,51:lh,52:lh,53:lh,54:lh,55:lh,56:lh,57:lh,62:Kp},Ah={91:Tm},jh={[-2]:im,[-1]:im,32:im},Mh={35:jm,42:sh,45:[_h,sh],60:Im,61:_h,95:sh,96:tm,126:tm},Nh={38:Qp,92:Xp},Ph={[-5]:ah,[-4]:ah,[-3]:ah,33:th,38:Qp,42:Rp,60:[Hp,Um],91:rh,92:[km,Xp],93:Gm,95:Rp,96:cm},Fh={null:[Rp,Sh]},Ih={null:[42,95]},Lh={null:[]};function Rh(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=cp(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Lp(a,l.events,l),l.events):[]}function f(e,t){return Bh(p(e),t)}function p(e){return zh(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Bh(e,t){let n=-1,r=[],i;for(;++n0?r.offset:1;return{kind:f,state:o,processState:a?.state??(e.name===`bash`&&t?.isError===!1?`returned`:e.name===`bash`&&n===`running`?`running`:`unknown`),output:l?c.text.slice(0,l.index):c.text,truncated:u||p?.truncated===!0,readRecovery:l?.[1],numberLines:e.name===`read`&&t?.isError===!1&&dd(i.truncation).firstLineExceedsLimit!==!0&&!!c.text,path:typeof r.path==`string`?r.path:void 0,displayPath:typeof r.displayPath==`string`?r.displayPath:void 0,resolvedPath:typeof r.resolvedPath==`string`?r.resolvedPath:void 0,displayResolvedPath:typeof r.displayResolvedPath==`string`?r.displayResolvedPath:void 0,pathUnavailable:typeof r.pathUnavailable==`string`?r.pathUnavailable:void 0,command:typeof r.command==`string`?pd(r.command).text:void 0,offset:m,diff:p?.text,tests:d,change:o===`returned`&&t?.isError===!1&&[`created`,`overwritten`,`unchanged`].includes(String(i.change))?String(i.change):void 0,evidenceUnavailable:typeof i.evidenceUnavailable==`string`?pd(i.evidenceUnavailable).text:void 0,exitCode:a&&`exitCode`in a?a.exitCode:void 0,signal:a&&`signal`in a?a.signal:void 0,recovery:typeof i.fullOutputPath==`string`?pd(i.fullOutputPath).text:void 0,rawArguments:pd(e.arguments).text,rawResult:pd(JSON.stringify({content:t?.content,details:t?.details,isError:t?.isError})).text}}function bd(e,t){return t.every((t,n)=>e[n]===t)}function xd(e){if(bd(e,[137,80,78,71,13,10,26,10]))return`image/png`;if(bd(e,[255,216,255]))return`image/jpeg`;let t=new TextDecoder(`ascii`).decode(e.subarray(0,12));return t.startsWith(`GIF87a`)||t.startsWith(`GIF89a`)?`image/gif`:t.startsWith(`RIFF`)&&t.slice(8,12)===`WEBP`?`image/webp`:null}function Sd(e){let t=``,n=32768;for(let r=0;r10485760)throw Error(`image-size`);let t=await e.arrayBuffer().catch(()=>{throw Error(`image-read`)}),n=new Uint8Array(t),r=xd(n);if(!r)throw Error(`image-type`);let i=Sd(n);return{id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${e.name}`,name:e.name||`image`,size:n.length,mimeType:r,data:i,previewUrl:`data:${r};base64,${i}`}}function wd(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Td(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ed=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dd=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Od={};function kd(e,t){return((t||Od).jsx?Dd:Ed).test(e)}var Ad=/[ \t\n\f\r]/g;function jd(e){return typeof e==`object`?e.type===`text`&&Md(e.value):Md(e)}function Md(e){return e.replace(Ad,``)===``}var Nd=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Nd.prototype.normal={},Nd.prototype.property={},Nd.prototype.space=void 0;function Pd(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Nd(n,r,t)}function Fd(e){return e.toLowerCase()}var Id=class{constructor(e,t){this.attribute=t,this.property=e}};Id.prototype.attribute=``,Id.prototype.booleanish=!1,Id.prototype.boolean=!1,Id.prototype.commaOrSpaceSeparated=!1,Id.prototype.commaSeparated=!1,Id.prototype.defined=!1,Id.prototype.mustUseProperty=!1,Id.prototype.number=!1,Id.prototype.overloadedBoolean=!1,Id.prototype.property=``,Id.prototype.spaceSeparated=!1,Id.prototype.space=void 0;var Ld=t({boolean:()=>zd,booleanish:()=>Bd,commaOrSpaceSeparated:()=>Gd,commaSeparated:()=>Wd,number:()=>Hd,overloadedBoolean:()=>Vd,spaceSeparated:()=>Ud}),Rd=0,zd=Kd(),Bd=Kd(),Vd=Kd(),Hd=Kd(),Ud=Kd(),Wd=Kd(),Gd=Kd();function Kd(){return 2**++Rd}var qd=Object.keys(Ld),Jd=class extends Id{constructor(e,t,n,r){let i=-1;if(super(e,t),Yd(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&lf.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(cf,ff);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!cf.test(e)){let n=e.replace(sf,df);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Jd}return new i(r,t)}function df(e){return`-`+e.toLowerCase()}function ff(e){return e.charAt(1).toUpperCase()}var pf=Pd([Zd,ef,nf,rf,af],`html`),mf=Pd([Zd,tf,nf,rf,af],`svg`);function hf(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function gf(e){return e.join(` `).trim()}var _f=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),vf=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(_f());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),yf=n((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),bf=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(vf()),r=yf();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),xf=Cf(`end`),Sf=Cf(`start`);function Cf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function wf(e){let t=Sf(e),n=xf(e);if(t&&n)return{start:t,end:n}}function Tf(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Df(e.position):`start`in e||`end`in e?Df(e):`line`in e||`column`in e?Ef(e):``}function Ef(e){return Of(e&&e.line)+`:`+Of(e&&e.column)}function Df(e){return Ef(e&&e.start)+`-`+Ef(e&&e.end)}function Of(e){return e&&typeof e==`number`?e:1}var kf=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Tf(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};kf.prototype.file=``,kf.prototype.name=``,kf.prototype.reason=``,kf.prototype.message=``,kf.prototype.stack=``,kf.prototype.column=void 0,kf.prototype.line=void 0,kf.prototype.ancestors=void 0,kf.prototype.cause=void 0,kf.prototype.fatal=void 0,kf.prototype.place=void 0,kf.prototype.ruleId=void 0,kf.prototype.source=void 0;var Af=e(bf(),1),jf={}.hasOwnProperty,Mf=new Map,Nf=/[A-Z]/g,Pf=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Ff=new Set([`td`,`th`]);function If(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qf(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Kf(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?mf:pf,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Lf(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Lf(e,t,n){if(t.type===`element`)return Rf(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return zf(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Vf(e,t,n);if(t.type===`mdxjsEsm`)return Bf(e,t);if(t.type===`root`)return Hf(e,t,n);if(t.type===`text`)return Uf(e,t)}function Rf(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=mf,e.schema=i),e.ancestors.push(t);let a=$f(e,t.tagName,!1),o=Jf(e,t),s=Xf(e,t);return Pf.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!jd(e)})),Wf(e,o,a,t),Gf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function zf(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ep(e,t.position)}function Bf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ep(e,t.position)}function Vf(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=mf,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:$f(e,t.name,!0),o=Yf(e,t),s=Xf(e,t);return Wf(e,o,a,t),Gf(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Hf(e,t,n){let r={};return Gf(r,Xf(e,t)),e.create(t,e.Fragment,r,n)}function Uf(e,t){return t.value}function Wf(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gf(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Kf(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qf(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Sf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Jf(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&jf.call(t.properties,i)){let a=Zf(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Ff.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Yf(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ep(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else ep(e,t.position);else a=r.value===null||r.value;n[i]=a}return n}function Xf(e,t){let n=[],r=-1,i=e.passKeys?new Map:Mf;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(fp(e,e.length,0,t),e):t}var mp={}.hasOwnProperty;function hp(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function yp(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var bp=Mp(/[A-Za-z]/),xp=Mp(/[\dA-Za-z]/),Sp=Mp(/[#-'*+\--9=?A-Z^-~]/);function Cp(e){return e!==null&&(e<32||e===127)}var wp=Mp(/\d/),Tp=Mp(/[\dA-Fa-f]/),Ep=Mp(/[!-/:-@[-`{-~]/);function Dp(e){return e!==null&&e<-2}function Op(e){return e!==null&&(e<0||e===32)}function kp(e){return e===-2||e===-1||e===32}var Ap=Mp(/\p{P}|\p{S}/u),jp=Mp(/\s/);function Mp(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Np(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Pp(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return kp(r)?(e.enter(n),s(r)):t(r)}function s(r){return kp(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Bp(e,t,n){return Pp(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Vp(e){if(e===null||Op(e)||jp(e))return 1;if(Ap(e))return 2}function Hp(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Kp(d,-c),Kp(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=pp(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=pp(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=pp(l,Hp(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=pp(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=pp(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,fp(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&kp(t)?Pp(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Dp(t)?e.check(am,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Dp(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),kp(t)?Pp(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),kp(t)?Pp(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Dp(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function cm(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var lm={name:`codeIndented`,tokenize:dm},um={partial:!0,tokenize:fm};function dm(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Pp(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Dp(t)?e.attempt(um,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Dp(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function fm(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Dp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Pp(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Dp(e)?i(e):n(e)}}var pm={name:`codeText`,previous:hm,resolve:mm,tokenize:gm};function mm(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&vm(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),vm(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),vm(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Em(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Cp(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Dp(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Op(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Dp(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Dp(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!kp(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Om(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Dp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Pp(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Dp(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function km(e,t){let n;return r;function r(i){return Dp(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):kp(i)?Pp(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Am={name:`definition`,tokenize:Mm},jm={partial:!0,tokenize:Nm};function Mm(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Dm.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=yp(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Op(t)?km(e,l)(t):l(t)}function l(t){return Em(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(jm,d,d)(t)}function d(t){return kp(t)?Pp(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Dp(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Nm(e,t,n){return r;function r(t){return Op(t)?km(e,i)(t):n(t)}function i(t){return Om(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return kp(t)?Pp(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Dp(e)?t(e):n(e)}}var Pm={name:`hardBreakEscape`,tokenize:Fm};function Fm(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Dp(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Im={name:`headingAtx`,resolve:Lm,tokenize:Rm};function Lm(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},fp(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Rm(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Op(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Dp(n)?(e.exit(`atxHeading`),t(n)):kp(n)?Pp(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Op(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var zm=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Bm=[`pre`,`script`,`style`,`textarea`],Vm={concrete:!0,name:`htmlFlow`,resolveTo:Wm,tokenize:Gm},Hm={partial:!0,tokenize:qm},Um={partial:!0,tokenize:Km};function Wm(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Gm(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):bp(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):bp(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return bp(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Op(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Bm.includes(l)?(i=1,r.interrupt?t(s):O(s)):zm.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||xp(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return kp(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||bp(t)?(e.consume(t),b):kp(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||xp(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):kp(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):kp(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Dp(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Op(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||kp(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Dp(t)?O(t):kp(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),ee):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Dp(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Hm,L,k)(t)):t===null||Dp(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Um,A,L)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Dp(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Bm.includes(n)?(e.consume(t),ee):O(t)}return bp(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),ee):t===45&&i===2?(e.consume(t),I):O(t)}function ee(t){return t===null||Dp(t)?(e.exit(`htmlFlowData`),L(t)):(e.consume(t),ee)}function L(n){return e.exit(`htmlFlow`),t(n)}}function Km(e,t,n){let r=this;return i;function i(t){return Dp(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function qm(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Yp,t,n)}}var Jm={name:`htmlText`,tokenize:Ym};function Ym(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):bp(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):bp(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Dp(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Dp(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Dp(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Dp(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return bp(t)?(e.consume(t),S):n(t)}function S(t){return t===45||xp(t)?(e.consume(t),S):C(t)}function C(t){return Dp(t)?(o=C,N(t)):kp(t)?(e.consume(t),C):M(t)}function w(t){return t===45||xp(t)?(e.consume(t),w):t===47||t===62||Op(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||bp(t)?(e.consume(t),E):Dp(t)?(o=T,N(t)):kp(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||xp(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Dp(t)?(o=D,N(t)):kp(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Dp(t)?(o=O,N(t)):kp(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Dp(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Op(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Op(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return kp(t)?Pp(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var Xm={name:`labelEnd`,resolveAll:eh,resolveTo:th,tokenize:nh},Zm={tokenize:rh},Qm={tokenize:ih},$m={tokenize:ah};function eh(e){let t=-1,n=[];for(;++t=3&&(a===null||Dp(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),kp(t)?Pp(e,s,`whitespace`)(t):s(t))}}var mh={continuation:{tokenize:vh},exit:bh,name:`list`,tokenize:_h},hh={partial:!0,tokenize:xh},gh={partial:!0,tokenize:yh};function _h(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:wp(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(fh,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return wp(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Yp,r.interrupt?n:u,e.attempt(hh,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return kp(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function vh(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Yp,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pp(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!kp(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(gh,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pp(e,e.attempt(mh,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function yh(e,t,n){let r=this;return Pp(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function bh(e){e.exit(this.containerState.type)}function xh(e,t,n){let r=this;return Pp(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!kp(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Sh={name:`setextUnderline`,resolveTo:Ch,tokenize:wh};function Ch(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function wh(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),kp(t)?Pp(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Dp(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Th={tokenize:Eh};function Eh(e){let t=this,n=e.attempt(Yp,r,e.attempt(this.parser.constructs.flowInitial,i,Pp(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xm,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Dh={resolveAll:jh()},Oh=Ah(`string`),kh=Ah(`text`);function Ah(e){return{resolveAll:jh(e===`text`?Mh:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++iVh,contentInitial:()=>Fh,disable:()=>Hh,document:()=>Ph,flow:()=>Lh,flowInitial:()=>Ih,insideSpan:()=>Bh,string:()=>Rh,text:()=>zh}),Ph={42:mh,43:mh,45:mh,48:mh,49:mh,50:mh,51:mh,52:mh,53:mh,54:mh,55:mh,56:mh,57:mh,62:Zp},Fh={91:Am},Ih={[-2]:lm,[-1]:lm,32:lm},Lh={35:Im,42:fh,45:[Sh,fh],60:Vm,61:Sh,95:fh,96:om,126:om},Rh={38:rm,92:tm},zh={[-5]:uh,[-4]:uh,[-3]:uh,33:oh,38:rm,42:Up,60:[qp,Jm],91:ch,92:[Pm,tm],93:Xm,95:Up,96:pm},Bh={null:[Up,Dh]},Vh={null:[42,95]},Hh={null:[]};function Uh(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=pp(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Hp(a,l.events,l),l.events):[]}function f(e,t){return Gh(p(e),t)}function p(e){return Wh(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Gh(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||eg).call(a,void 0,e[0])}for(r.position={start:Zh(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Zh(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ag(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function og(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sg(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Op(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function cg(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lg(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ug(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function dg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ug(e,t);let i={src:Op(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function fg(e,t){let n={src:Op(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function pg(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ug(e,t);let i={href:Op(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hg(e,t){let n={href:Op(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gg(e,t,n){let r=e.all(t),i=n?_g(n):vg(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||ag).call(a,void 0,e[0])}for(r.position={start:ng(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ng(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ug(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dg(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function fg(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Np(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function pg(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mg(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hg(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function gg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hg(e,t);let i={src:Np(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function _g(e,t){let n={src:Np(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function vg(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function yg(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hg(e,t);let i={href:Np(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bg(e,t){let n={href:Np(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xg(e,t,n){let r=e.all(t),i=n?Sg(n):Cg(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s1}function yg(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=_f(t.children[1]),o=gf(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function wg(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(kg(t.slice(i),i>0,!1)),a.join(``)}function kg(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Eg||t===Dg;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Eg||t===Dg;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Ag(e,t){let n={type:`text`,value:Og(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jg(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Mg={blockquote:ng,break:rg,code:ig,delete:ag,emphasis:og,footnoteReference:sg,heading:cg,html:lg,imageReference:dg,image:fg,inlineCode:pg,linkReference:mg,link:hg,listItem:gg,list:yg,paragraph:bg,root:xg,strong:Sg,table:Cg,tableCell:Tg,tableRow:wg,text:Ag,thematicBreak:jg,toml:Ng,yaml:Ng,definition:Ng,footnoteDefinition:Ng};function Ng(){}var{defineProperty:Pg}=Object,Fg=typeof self==`object`?self:globalThis,Ig=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Fg[e](t)},Lg=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Pg(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Fg[e]==`function`?Ig(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Ig(a,o),i)};return r},Rg=e=>Lg(new Map,e)(0),zg=``,{toString:Bg}={},{keys:Vg,is:Hg}=Object,Ug=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Bg.call(e).slice(8,-1);switch(n){case`Array`:return[1,zg];case`Object`:return[2,zg];case`Date`:return[3,zg];case`RegExp`:return[4,zg];case`Map`:return[5,zg];case`Set`:return[6,zg];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Wg=([e,t])=>e===0&&(t===`function`||t===`symbol`),Gg=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Ug(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Hg(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Vg(o))(e||!Wg(Ug(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?zg:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Wg(Ug(n))||Wg(Ug(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Wg(Ug(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Kg=(e,{json:t,lossy:n}={})=>{let r=[];return Gg(!(t||n),!!t,new Map,r)(e),r},qg=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Rg(Kg(e,t)):structuredClone(e):(e,t)=>Rg(Kg(e,t));function Jg(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Yg(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Xg(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Jg,r=e.options.footnoteBackLabel||Yg,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...qg(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` +`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Sg(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r1}function wg(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Sf(t.children[1]),o=xf(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function kg(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Pg(t.slice(i),i>0,!1)),a.join(``)}function Pg(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===jg||t===Mg;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===jg||t===Mg;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Fg(e,t){let n={type:`text`,value:Ng(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Ig(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Lg={blockquote:sg,break:cg,code:lg,delete:ug,emphasis:dg,footnoteReference:fg,heading:pg,html:mg,imageReference:gg,image:_g,inlineCode:vg,linkReference:yg,link:bg,listItem:xg,list:wg,paragraph:Tg,root:Eg,strong:Dg,table:Og,tableCell:Ag,tableRow:kg,text:Fg,thematicBreak:Ig,toml:Rg,yaml:Rg,definition:Rg,footnoteDefinition:Rg};function Rg(){}var{defineProperty:zg}=Object,Bg=typeof self==`object`?self:globalThis,Vg=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Bg[e](t)},Hg=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?zg(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Bg[e]==`function`?Vg(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(Vg(a,o),i)};return r},Ug=e=>Hg(new Map,e)(0),Wg=``,{toString:Gg}={},{keys:Kg,is:qg}=Object,Jg=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Gg.call(e).slice(8,-1);switch(n){case`Array`:return[1,Wg];case`Object`:return[2,Wg];case`Date`:return[3,Wg];case`RegExp`:return[4,Wg];case`Map`:return[5,Wg];case`Set`:return[6,Wg];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Yg=([e,t])=>e===0&&(t===`function`||t===`symbol`),Xg=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=Jg(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&qg(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of Kg(o))(e||!Yg(Jg(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?Wg:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Yg(Jg(n))||Yg(Jg(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Yg(Jg(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Zg=(e,{json:t,lossy:n}={})=>{let r=[];return Xg(!(t||n),!!t,new Map,r)(e),r},Qg=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Ug(Zg(e,t)):structuredClone(e):(e,t)=>Ug(Zg(e,t));function $g(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function e_(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function t_(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||$g,r=e.options.footnoteBackLabel||e_,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Qg(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:` `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:` -`}]}}var Zg=(function(e){if(e==null)return n_;if(typeof e==`function`)return t_(e);if(typeof e==`object`)return Array.isArray(e)?Qg(e):$g(e);if(typeof e==`string`)return e_(e);throw Error(`Expected function, string, or object as test`)});function Qg(e){let t=[],n=-1;for(;++n`:``))+`)`})}return u;function u(){let l=a_,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=s_(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d`:``))+`)`})}return u;function u(){let l=u_,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=f_(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d0&&n.push({type:`text`,value:` -`}),n}function g_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function __(e,t){let n=d_(e,t),r=n.one(e,void 0),i=Xg(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` -`},i)),a}function v_(e,t){return e&&`run`in e?async function(n,r){let i=__(n,{file:r,...t});await e.run(i,r)}:function(n,r){return __(n,{file:r,...e||t})}}function y_(e){if(e)throw e}var b_=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var w_={basename:T_,dirname:E_,extname:D_,join:O_,sep:`/`};function T_(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);j_(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function E_(e){if(j_(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function D_(e){j_(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function O_(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function A_(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function j_(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var M_={cwd:N_};function N_(){return`/`}function P_(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function F_(e){if(typeof e==`string`)e=new URL(e);else if(!P_(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return I_(e)}function I_(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];x_(o)&&x_(r)&&(r=(0,W_.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function q_(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function J_(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Y_(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function X_(e){if(!x_(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Z_(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Q_(e){return $_(e)?e:new R_(e)}function $_(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function ev(e){return typeof e==`string`||tv(e)}function tv(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var nv=[],rv={allowDangerousHtml:!0},iv=/^(https?|ircs?|mailto|xmpp)$/i,av=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function ov(e){let t=sv(e),n=cv(e);return lv(t.runSync(t.parse(n),n),e)}function sv(e){let t=e.rehypePlugins||nv,n=e.remarkPlugins||nv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...rv}:rv;return K_().use(tg).use(n).use(v_,r).use(t)}function cv(e){let t=e.children||``,n=new R_;return typeof t==`string`?n.value=t:``+t,n}function lv(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||uv;for(let e of av)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return c_(e,l),jf(e,{Fragment:q.Fragment,components:i,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in $f)if(Object.hasOwn($f,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=$f[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function uv(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||iv.test(e.slice(0,t))?e:``}var dv=/[#.]/g;function fv(e,t){let n=e||``,r={},i=0,a,o;for(;i-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=wv(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length1?n[e.line-2]:0)+e.column-1;if(r=55296&&e<=57343}function ty(e){return e>=56320&&e<=57343}function ny(e,t){return(e-55296)*1024+9216+t}function ry(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function iy(e){return e>=64976&&e<=65007||Qv.has(e)}var Y;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(Y||={});var ay=65536,oy=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ay,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(ty(t))return this.pos++,this._addGap(),ny(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,J.EOF;return this._err(Y.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,J.EOF;let n=this.html.charCodeAt(t);return n===J.CARRIAGE_RETURN?J.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,J.EOF;let e=this.html.charCodeAt(this.pos);return e===J.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,J.LINE_FEED):e===J.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ey(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===J.LINE_FEED||e===J.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){ry(e)?this._err(Y.controlCharacterInInputStream):iy(e)&&this._err(Y.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var ly=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),uy=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function dy(e){return e>=55296&&e<=57343||e>1114111?65533:uy.get(e)??e}var fy;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(fy||={});var py=32,my;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(my||={});function hy(e){return e>=fy.ZERO&&e<=fy.NINE}function gy(e){return e>=fy.UPPER_A&&e<=fy.UPPER_F||e>=fy.LOWER_A&&e<=fy.LOWER_F}function _y(e){return e>=fy.UPPER_A&&e<=fy.UPPER_Z||e>=fy.LOWER_A&&e<=fy.LOWER_Z||hy(e)}function vy(e){return e===fy.EQUALS||_y(e)}var yy;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(yy||={});var by;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(by||={});var xy=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=yy.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=by.Strict}startEntity(e){this.decodeMode=e,this.state=yy.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case yy.EntityStart:return e.charCodeAt(t)===fy.NUM?(this.state=yy.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=yy.NamedEntity,this.stateNamedEntity(e,t));case yy.NumericStart:return this.stateNumericStart(e,t);case yy.NumericDecimal:return this.stateNumericDecimal(e,t);case yy.NumericHex:return this.stateNumericHex(e,t);case yy.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|py)===fy.LOWER_X?(this.state=yy.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=yy.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,i!==0){if(a===fy.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==by.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&my.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~my.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case yy.NamedEntity:return this.result!==0&&(this.decodeMode!==by.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case yy.NumericDecimal:return this.emitNumericEntity(0,2);case yy.NumericHex:return this.emitNumericEntity(0,3);case yy.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case yy.EntityStart:return 0}}};function Sy(e,t,n,r){let i=(t&my.BRANCH_LENGTH)>>7,a=t&my.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(nr)s=t-1;else return e[t+i]}return-1}var Cy;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(Cy||={});var wy;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(wy||={});var Ty;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Ty||={});var X;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(X||={});var Z;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(Z||={});var Ey=new Map([[X.A,Z.A],[X.ADDRESS,Z.ADDRESS],[X.ANNOTATION_XML,Z.ANNOTATION_XML],[X.APPLET,Z.APPLET],[X.AREA,Z.AREA],[X.ARTICLE,Z.ARTICLE],[X.ASIDE,Z.ASIDE],[X.B,Z.B],[X.BASE,Z.BASE],[X.BASEFONT,Z.BASEFONT],[X.BGSOUND,Z.BGSOUND],[X.BIG,Z.BIG],[X.BLOCKQUOTE,Z.BLOCKQUOTE],[X.BODY,Z.BODY],[X.BR,Z.BR],[X.BUTTON,Z.BUTTON],[X.CAPTION,Z.CAPTION],[X.CENTER,Z.CENTER],[X.CODE,Z.CODE],[X.COL,Z.COL],[X.COLGROUP,Z.COLGROUP],[X.DD,Z.DD],[X.DESC,Z.DESC],[X.DETAILS,Z.DETAILS],[X.DIALOG,Z.DIALOG],[X.DIR,Z.DIR],[X.DIV,Z.DIV],[X.DL,Z.DL],[X.DT,Z.DT],[X.EM,Z.EM],[X.EMBED,Z.EMBED],[X.FIELDSET,Z.FIELDSET],[X.FIGCAPTION,Z.FIGCAPTION],[X.FIGURE,Z.FIGURE],[X.FONT,Z.FONT],[X.FOOTER,Z.FOOTER],[X.FOREIGN_OBJECT,Z.FOREIGN_OBJECT],[X.FORM,Z.FORM],[X.FRAME,Z.FRAME],[X.FRAMESET,Z.FRAMESET],[X.H1,Z.H1],[X.H2,Z.H2],[X.H3,Z.H3],[X.H4,Z.H4],[X.H5,Z.H5],[X.H6,Z.H6],[X.HEAD,Z.HEAD],[X.HEADER,Z.HEADER],[X.HGROUP,Z.HGROUP],[X.HR,Z.HR],[X.HTML,Z.HTML],[X.I,Z.I],[X.IMG,Z.IMG],[X.IMAGE,Z.IMAGE],[X.INPUT,Z.INPUT],[X.IFRAME,Z.IFRAME],[X.KEYGEN,Z.KEYGEN],[X.LABEL,Z.LABEL],[X.LI,Z.LI],[X.LINK,Z.LINK],[X.LISTING,Z.LISTING],[X.MAIN,Z.MAIN],[X.MALIGNMARK,Z.MALIGNMARK],[X.MARQUEE,Z.MARQUEE],[X.MATH,Z.MATH],[X.MENU,Z.MENU],[X.META,Z.META],[X.MGLYPH,Z.MGLYPH],[X.MI,Z.MI],[X.MO,Z.MO],[X.MN,Z.MN],[X.MS,Z.MS],[X.MTEXT,Z.MTEXT],[X.NAV,Z.NAV],[X.NOBR,Z.NOBR],[X.NOFRAMES,Z.NOFRAMES],[X.NOEMBED,Z.NOEMBED],[X.NOSCRIPT,Z.NOSCRIPT],[X.OBJECT,Z.OBJECT],[X.OL,Z.OL],[X.OPTGROUP,Z.OPTGROUP],[X.OPTION,Z.OPTION],[X.P,Z.P],[X.PARAM,Z.PARAM],[X.PLAINTEXT,Z.PLAINTEXT],[X.PRE,Z.PRE],[X.RB,Z.RB],[X.RP,Z.RP],[X.RT,Z.RT],[X.RTC,Z.RTC],[X.RUBY,Z.RUBY],[X.S,Z.S],[X.SCRIPT,Z.SCRIPT],[X.SEARCH,Z.SEARCH],[X.SECTION,Z.SECTION],[X.SELECT,Z.SELECT],[X.SOURCE,Z.SOURCE],[X.SMALL,Z.SMALL],[X.SPAN,Z.SPAN],[X.STRIKE,Z.STRIKE],[X.STRONG,Z.STRONG],[X.STYLE,Z.STYLE],[X.SUB,Z.SUB],[X.SUMMARY,Z.SUMMARY],[X.SUP,Z.SUP],[X.TABLE,Z.TABLE],[X.TBODY,Z.TBODY],[X.TEMPLATE,Z.TEMPLATE],[X.TEXTAREA,Z.TEXTAREA],[X.TFOOT,Z.TFOOT],[X.TD,Z.TD],[X.TH,Z.TH],[X.THEAD,Z.THEAD],[X.TITLE,Z.TITLE],[X.TR,Z.TR],[X.TRACK,Z.TRACK],[X.TT,Z.TT],[X.U,Z.U],[X.UL,Z.UL],[X.SVG,Z.SVG],[X.VAR,Z.VAR],[X.WBR,Z.WBR],[X.XMP,Z.XMP]]);function Dy(e){return Ey.get(e)??Z.UNKNOWN}var Oy=Z,ky={[Cy.HTML]:new Set([Oy.ADDRESS,Oy.APPLET,Oy.AREA,Oy.ARTICLE,Oy.ASIDE,Oy.BASE,Oy.BASEFONT,Oy.BGSOUND,Oy.BLOCKQUOTE,Oy.BODY,Oy.BR,Oy.BUTTON,Oy.CAPTION,Oy.CENTER,Oy.COL,Oy.COLGROUP,Oy.DD,Oy.DETAILS,Oy.DIR,Oy.DIV,Oy.DL,Oy.DT,Oy.EMBED,Oy.FIELDSET,Oy.FIGCAPTION,Oy.FIGURE,Oy.FOOTER,Oy.FORM,Oy.FRAME,Oy.FRAMESET,Oy.H1,Oy.H2,Oy.H3,Oy.H4,Oy.H5,Oy.H6,Oy.HEAD,Oy.HEADER,Oy.HGROUP,Oy.HR,Oy.HTML,Oy.IFRAME,Oy.IMG,Oy.INPUT,Oy.LI,Oy.LINK,Oy.LISTING,Oy.MAIN,Oy.MARQUEE,Oy.MENU,Oy.META,Oy.NAV,Oy.NOEMBED,Oy.NOFRAMES,Oy.NOSCRIPT,Oy.OBJECT,Oy.OL,Oy.P,Oy.PARAM,Oy.PLAINTEXT,Oy.PRE,Oy.SCRIPT,Oy.SECTION,Oy.SELECT,Oy.SOURCE,Oy.STYLE,Oy.SUMMARY,Oy.TABLE,Oy.TBODY,Oy.TD,Oy.TEMPLATE,Oy.TEXTAREA,Oy.TFOOT,Oy.TH,Oy.THEAD,Oy.TITLE,Oy.TR,Oy.TRACK,Oy.UL,Oy.WBR,Oy.XMP]),[Cy.MATHML]:new Set([Oy.MI,Oy.MO,Oy.MN,Oy.MS,Oy.MTEXT,Oy.ANNOTATION_XML]),[Cy.SVG]:new Set([Oy.TITLE,Oy.FOREIGN_OBJECT,Oy.DESC]),[Cy.XLINK]:new Set,[Cy.XML]:new Set,[Cy.XMLNS]:new Set},Ay=new Set([Oy.H1,Oy.H2,Oy.H3,Oy.H4,Oy.H5,Oy.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var jy={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function My(e){return e>=J.DIGIT_0&&e<=J.DIGIT_9}function Ny(e){return e>=J.LATIN_CAPITAL_A&&e<=J.LATIN_CAPITAL_Z}function Py(e){return e>=J.LATIN_SMALL_A&&e<=J.LATIN_SMALL_Z}function Fy(e){return Py(e)||Ny(e)}function Iy(e){return Fy(e)||My(e)}function Ly(e){return e+32}function Ry(e){return e===J.SPACE||e===J.LINE_FEED||e===J.TABULATION||e===J.FORM_FEED}function zy(e){return Ry(e)||e===J.SOLIDUS||e===J.GREATER_THAN_SIGN}function By(e){return e===J.NULL?Y.nullCharacterReference:e>1114111?Y.characterReferenceOutsideUnicodeRange:ey(e)?Y.surrogateCharacterReference:iy(e)?Y.noncharacterCharacterReference:ry(e)||e===J.CARRIAGE_RETURN?Y.controlCharacterReference:null}var Vy=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new oy(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new xy(ly,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=By(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Y.endTagWithAttributes),e.selfClosing&&this._err(Y.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case sy.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case sy.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case sy.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:sy.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Ry(e)?sy.WHITESPACE_CHARACTER:e===J.NULL?sy.NULL_CHARACTER:sy.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(sy.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?by.Attribute:by.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case J.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case J.AMPERSAND:this._startCharacterReference();break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitCodePoint(e);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case J.AMPERSAND:this._startCharacterReference();break;case J.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case J.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case J.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(Fy(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case J.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case J.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case J.QUESTION_MARK:this._err(Y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case J.EOF:this._err(Y.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(Y.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(Fy(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case J.GREATER_THAN_SIGN:this._err(Y.missingEndTagName),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofBeforeTagName),this._emitChars(``);break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case J.EOF:this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===J.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Fy(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){Fy(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(``);break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case J.EOF:this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===J.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith($v.SCRIPT,!1)&&zy(this.preprocessor.peek($v.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<$v.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Q.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.SOLIDUS:case J.GREATER_THAN_SIGN:case J.EOF:this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case J.EQUALS_SIGN:this._err(Y.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Q.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:case J.SOLIDUS:case J.GREATER_THAN_SIGN:case J.EOF:this._leaveAttrName(),this.state=Q.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case J.EQUALS_SIGN:this._leaveAttrName(),this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case J.QUOTATION_MARK:case J.APOSTROPHE:case J.LESS_THAN_SIGN:this._err(Y.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(Ny(e)?Ly(e):e)}}_stateAfterAttributeName(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.SOLIDUS:this.state=Q.SELF_CLOSING_START_TAG;break;case J.EQUALS_SIGN:this.state=Q.BEFORE_ATTRIBUTE_VALUE;break;case J.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentTagToken();break;case J.EOF:this._err(Y.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Q.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.QUOTATION_MARK:this.state=Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case J.APOSTROPHE:this.state=Q.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case J.GREATER_THAN_SIGN:this._err(Y.missingAttributeValue),this.state=Q.DATA,this.emitCurrentTagToken();break;default:this.state=Q.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case J.QUOTATION_MARK:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case J.AMPERSAND:this._startCharacterReference();break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case J.EOF:this._err(Y.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case J.APOSTROPHE:this.state=Q.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case J.AMPERSAND:this._startCharacterReference();break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case J.EOF:this._err(Y.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case J.AMPERSAND:this._startCharacterReference();break;case J.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case J.QUOTATION_MARK:case J.APOSTROPHE:case J.LESS_THAN_SIGN:case J.EQUALS_SIGN:case J.GRAVE_ACCENT:this._err(Y.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case J.EOF:this._err(Y.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this._leaveAttrValue(),this.state=Q.BEFORE_ATTRIBUTE_NAME;break;case J.SOLIDUS:this._leaveAttrValue(),this.state=Q.SELF_CLOSING_START_TAG;break;case J.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Q.DATA,this.emitCurrentTagToken();break;case J.EOF:this._err(Y.eofInTag),this._emitEOFToken();break;default:this._err(Y.missingWhitespaceBetweenAttributes),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case J.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Q.DATA,this.emitCurrentTagToken();break}case J.EOF:this._err(Y.eofInTag),this._emitEOFToken();break;default:this._err(Y.unexpectedSolidusInTag),this.state=Q.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case J.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case J.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch($v.DASH_DASH,!0)?(this._createCommentToken($v.DASH_DASH.length+1),this.state=Q.COMMENT_START):this._consumeSequenceIfMatch($v.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation($v.DOCTYPE.length+1),this.state=Q.DOCTYPE):this._consumeSequenceIfMatch($v.CDATA_START,!0)?this.inForeignNode?this.state=Q.CDATA_SECTION:(this._err(Y.cdataInHtmlContent),this._createCommentToken($v.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Q.BOGUS_COMMENT):this._ensureHibernation()||(this._err(Y.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case J.HYPHEN_MINUS:this.state=Q.COMMENT_START_DASH;break;case J.GREATER_THAN_SIGN:{this._err(Y.abruptClosingOfEmptyComment),this.state=Q.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case J.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case J.GREATER_THAN_SIGN:this._err(Y.abruptClosingOfEmptyComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case J.EOF:this._err(Y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case J.HYPHEN_MINUS:this.state=Q.COMMENT_END_DASH;break;case J.LESS_THAN_SIGN:t.data+=`<`,this.state=Q.COMMENT_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.data+=`�`;break;case J.EOF:this._err(Y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case J.EXCLAMATION_MARK:t.data+=`!`,this.state=Q.COMMENT_LESS_THAN_SIGN_BANG;break;case J.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===J.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Q.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===J.HYPHEN_MINUS?this.state=Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Q.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==J.GREATER_THAN_SIGN&&e!==J.EOF&&this._err(Y.nestedComment),this.state=Q.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case J.HYPHEN_MINUS:this.state=Q.COMMENT_END;break;case J.EOF:this._err(Y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case J.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentComment(t);break;case J.EXCLAMATION_MARK:this.state=Q.COMMENT_END_BANG;break;case J.HYPHEN_MINUS:t.data+=`-`;break;case J.EOF:this._err(Y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Q.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case J.HYPHEN_MINUS:t.data+=`--!`,this.state=Q.COMMENT_END_DASH;break;case J.GREATER_THAN_SIGN:this._err(Y.incorrectlyClosedComment),this.state=Q.DATA,this.emitCurrentComment(t);break;case J.EOF:this._err(Y.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Q.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_NAME;break;case J.GREATER_THAN_SIGN:this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case J.EOF:{this._err(Y.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(Y.missingWhitespaceBeforeDoctypeName),this.state=Q.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(Ny(e))this._createDoctypeToken(String.fromCharCode(Ly(e))),this.state=Q.DOCTYPE_NAME;else switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Q.DOCTYPE_NAME;break;case J.GREATER_THAN_SIGN:{this._err(Y.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Q.DATA;break}case J.EOF:{this._err(Y.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Q.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this.state=Q.AFTER_DOCTYPE_NAME;break;case J.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.name+=`�`;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(Ny(e)?Ly(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch($v.PUBLIC,!1)?this.state=Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch($v.SYSTEM,!1)?this.state=Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(Y.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case J.QUOTATION_MARK:this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case J.APOSTROPHE:this._err(Y.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case J.GREATER_THAN_SIGN:this._err(Y.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.QUOTATION_MARK:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case J.APOSTROPHE:t.publicId=``,this.state=Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case J.GREATER_THAN_SIGN:this._err(Y.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case J.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.publicId+=`�`;break;case J.GREATER_THAN_SIGN:this._err(Y.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case J.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.publicId+=`�`;break;case J.GREATER_THAN_SIGN:this._err(Y.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this.state=Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case J.GREATER_THAN_SIGN:this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.QUOTATION_MARK:this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case J.APOSTROPHE:this._err(Y.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case J.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:this.state=Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case J.QUOTATION_MARK:this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case J.APOSTROPHE:this._err(Y.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case J.GREATER_THAN_SIGN:this._err(Y.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.QUOTATION_MARK:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case J.APOSTROPHE:t.systemId=``,this.state=Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case J.GREATER_THAN_SIGN:this._err(Y.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.DATA,this.emitCurrentDoctype(t);break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case J.QUOTATION_MARK:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.systemId+=`�`;break;case J.GREATER_THAN_SIGN:this._err(Y.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case J.APOSTROPHE:this.state=Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case J.NULL:this._err(Y.unexpectedNullCharacter),t.systemId+=`�`;break;case J.GREATER_THAN_SIGN:this._err(Y.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case J.SPACE:case J.LINE_FEED:case J.TABULATION:case J.FORM_FEED:break;case J.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(Y.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Q.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case J.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Q.DATA;break;case J.NULL:this._err(Y.unexpectedNullCharacter);break;case J.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case J.RIGHT_SQUARE_BRACKET:this.state=Q.CDATA_SECTION_BRACKET;break;case J.EOF:this._err(Y.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===J.RIGHT_SQUARE_BRACKET?this.state=Q.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case J.GREATER_THAN_SIGN:this.state=Q.DATA;break;case J.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Q.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(J.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Iy(this.preprocessor.peek(1))?Q.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){Iy(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===J.SEMICOLON&&this._err(Y.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},Hy=new Set([Z.DD,Z.DT,Z.LI,Z.OPTGROUP,Z.OPTION,Z.P,Z.RB,Z.RP,Z.RT,Z.RTC]),Uy=new Set([...Hy,Z.CAPTION,Z.COLGROUP,Z.TBODY,Z.TD,Z.TFOOT,Z.TH,Z.THEAD,Z.TR]),Wy=new Set([Z.APPLET,Z.CAPTION,Z.HTML,Z.MARQUEE,Z.OBJECT,Z.TABLE,Z.TD,Z.TEMPLATE,Z.TH]),Gy=new Set([...Wy,Z.OL,Z.UL]),Ky=new Set([...Wy,Z.BUTTON]),qy=new Set([Z.ANNOTATION_XML,Z.MI,Z.MN,Z.MO,Z.MS,Z.MTEXT]),Jy=new Set([Z.DESC,Z.FOREIGN_OBJECT,Z.TITLE]),Yy=new Set([Z.TR,Z.TEMPLATE,Z.HTML]),Xy=new Set([Z.TBODY,Z.TFOOT,Z.THEAD,Z.TEMPLATE,Z.HTML]),Zy=new Set([Z.TABLE,Z.TEMPLATE,Z.HTML]),Qy=new Set([Z.TD,Z.TH]),$y=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=Z.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===Z.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===Cy.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==Cy.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(Zy,Cy.HTML)}clearBackToTableBodyContext(){this.clearBackTo(Xy,Cy.HTML)}clearBackToTableRowContext(){this.clearBackTo(Yy,Cy.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Z.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===Z.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case Cy.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case Cy.SVG:if(Jy.has(r))return!1;break;case Cy.MATHML:if(qy.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Wy)}hasInListItemScope(e){return this.hasInDynamicScope(e,Gy)}hasInButtonScope(e){return this.hasInDynamicScope(e,Ky)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case Cy.HTML:if(Ay.has(t))return!0;if(Wy.has(t))return!1;break;case Cy.SVG:if(Jy.has(t))return!1;break;case Cy.MATHML:if(qy.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Cy.HTML)switch(this.tagIDs[t]){case e:return!0;case Z.TABLE:case Z.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===Cy.HTML)switch(this.tagIDs[e]){case Z.TBODY:case Z.THEAD:case Z.TFOOT:return!0;case Z.TABLE:case Z.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Cy.HTML)switch(this.tagIDs[t]){case e:return!0;case Z.OPTION:case Z.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Hy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Uy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Uy.has(this.currentTagId);)this.pop()}},eb=3,tb;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(tb||={});var nb={type:tb.Marker},rb=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])),i=0;for(let e=0;er.get(e.name)===e.value)&&(i+=1,i>=eb&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(nb)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:tb.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:tb.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(nb);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===tb.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===tb.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===tb.Element&&t.element===e)}},ib={createDocument(){return{nodeName:`#document`,mode:Ty.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};ib.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(ib.isTextNode(n)){n.value+=t;return}}ib.appendChild(e,ib.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ib.isTextNode(r)?r.value+=t:ib.insertBefore(e,ib.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;re.startsWith(t))}function mb(e){return e.name===ab&&e.publicId===null&&(e.systemId===null||e.systemId===ob)}function hb(e){if(e.name!==ab)return Ty.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===sb)return Ty.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),ub.has(n))return Ty.QUIRKS;let e=t===null?lb:cb;if(pb(n,e))return Ty.QUIRKS;if(e=t===null?db:fb,pb(n,e))return Ty.LIMITED_QUIRKS}return Ty.NO_QUIRKS}var gb={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},_b=`definitionurl`,vb=`definitionURL`,yb=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),bb=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:Cy.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:Cy.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:Cy.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:Cy.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:Cy.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:Cy.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:Cy.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:Cy.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:Cy.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:Cy.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:Cy.XMLNS}]]),xb=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),Sb=new Set([Z.B,Z.BIG,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.CENTER,Z.CODE,Z.DD,Z.DIV,Z.DL,Z.DT,Z.EM,Z.EMBED,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HR,Z.I,Z.IMG,Z.LI,Z.LISTING,Z.MENU,Z.META,Z.NOBR,Z.OL,Z.P,Z.PRE,Z.RUBY,Z.S,Z.SMALL,Z.SPAN,Z.STRONG,Z.STRIKE,Z.SUB,Z.SUP,Z.TABLE,Z.TT,Z.U,Z.UL,Z.VAR]);function Cb(e){let t=e.tagID;return t===Z.FONT&&e.attrs.some(({name:e})=>e===wy.COLOR||e===wy.SIZE||e===wy.FACE)||Sb.has(t)}function wb(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===Cy.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,Cy.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=jy.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===X.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Cy.HTML))switch(this.fragmentContextID){case Z.TITLE:case Z.TEXTAREA:this.tokenizer.state=jy.RCDATA;break;case Z.STYLE:case Z.XMP:case Z.IFRAME:case Z.NOEMBED:case Z.NOFRAMES:case Z.NOSCRIPT:this.tokenizer.state=jy.RAWTEXT;break;case Z.SCRIPT:this.tokenizer.state=jy.SCRIPT_DATA;break;case Z.PLAINTEXT:this.tokenizer.state=jy.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,Cy.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,Cy.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(X.HTML,Cy.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Z.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===sy.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===Z.SVG&&this.treeAdapter.getTagName(t)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===Cy.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===Z.MGLYPH||e.tagID===Z.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,Cy.HTML)}_processToken(e){switch(e.type){case sy.CHARACTER:this.onCharacter(e);break;case sy.NULL_CHARACTER:this.onNullCharacter(e);break;case sy.COMMENT:this.onComment(e);break;case sy.DOCTYPE:this.onDoctype(e);break;case sy.START_TAG:this._processStartTag(e);break;case sy.END_TAG:this.onEndTag(e);break;case sy.EOF:this.onEof(e);break;case sy.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Ab(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===tb.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Z.P),this.openElements.popUntilTagNamePopped(Z.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Z.TR:this.insertionMode=$.IN_ROW;return;case Z.TBODY:case Z.THEAD:case Z.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case Z.CAPTION:this.insertionMode=$.IN_CAPTION;return;case Z.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case Z.TABLE:this.insertionMode=$.IN_TABLE;return;case Z.BODY:this.insertionMode=$.IN_BODY;return;case Z.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case Z.SELECT:this._resetInsertionModeForSelect(e);return;case Z.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case Z.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case Z.TD:case Z.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case Z.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===Z.TEMPLATE)break;if(e===Z.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return Fb.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Z.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===Cy.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Z.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return ky[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){tC(this,e);return}switch(this.insertionMode){case $.INITIAL:Xb(this,e);break;case $.BEFORE_HTML:$b(this,e);break;case $.BEFORE_HEAD:nx(this,e);break;case $.IN_HEAD:ox(this,e);break;case $.IN_HEAD_NO_SCRIPT:lx(this,e);break;case $.AFTER_HEAD:fx(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:hx(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:uS(this,e);break;case $.IN_TABLE_TEXT:CS(this,e);break;case $.IN_COLUMN_GROUP:AS(this,e);break;case $.AFTER_BODY:KS(this,e);break;case $.AFTER_AFTER_BODY:QS(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eC(this,e);return}switch(this.insertionMode){case $.INITIAL:Xb(this,e);break;case $.BEFORE_HTML:$b(this,e);break;case $.BEFORE_HEAD:nx(this,e);break;case $.IN_HEAD:ox(this,e);break;case $.IN_HEAD_NO_SCRIPT:lx(this,e);break;case $.AFTER_HEAD:fx(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:uS(this,e);break;case $.IN_COLUMN_GROUP:AS(this,e);break;case $.AFTER_BODY:KS(this,e);break;case $.AFTER_AFTER_BODY:QS(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Gb(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:Gb(this,e);break;case $.IN_TABLE_TEXT:wS(this,e);break;case $.AFTER_BODY:Kb(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:qb(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:Yb(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,Y.misplacedDoctype);break;case $.IN_TABLE_TEXT:wS(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?rC(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:Xb(this,e);break;case $.BEFORE_HTML:Zb(this,e);break;case $.BEFORE_HEAD:ex(this,e);break;case $.IN_HEAD:rx(this,e);break;case $.IN_HEAD_NO_SCRIPT:sx(this,e);break;case $.AFTER_HEAD:ux(this,e);break;case $.IN_BODY:Jx(this,e);break;case $.IN_TABLE:yS(this,e);break;case $.IN_TABLE_TEXT:wS(this,e);break;case $.IN_CAPTION:ES(this,e);break;case $.IN_COLUMN_GROUP:OS(this,e);break;case $.IN_TABLE_BODY:jS(this,e);break;case $.IN_ROW:NS(this,e);break;case $.IN_CELL:FS(this,e);break;case $.IN_SELECT:LS(this,e);break;case $.IN_SELECT_IN_TABLE:zS(this,e);break;case $.IN_TEMPLATE:VS(this,e);break;case $.AFTER_BODY:WS(this,e);break;case $.IN_FRAMESET:qS(this,e);break;case $.AFTER_FRAMESET:YS(this,e);break;case $.AFTER_AFTER_BODY:ZS(this,e);break;case $.AFTER_AFTER_FRAMESET:$S(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?iC(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:Xb(this,e);break;case $.BEFORE_HTML:Qb(this,e);break;case $.BEFORE_HEAD:tx(this,e);break;case $.IN_HEAD:ix(this,e);break;case $.IN_HEAD_NO_SCRIPT:cx(this,e);break;case $.AFTER_HEAD:dx(this,e);break;case $.IN_BODY:oS(this,e);break;case $.TEXT:cS(this,e);break;case $.IN_TABLE:bS(this,e);break;case $.IN_TABLE_TEXT:wS(this,e);break;case $.IN_CAPTION:DS(this,e);break;case $.IN_COLUMN_GROUP:kS(this,e);break;case $.IN_TABLE_BODY:MS(this,e);break;case $.IN_ROW:PS(this,e);break;case $.IN_CELL:IS(this,e);break;case $.IN_SELECT:RS(this,e);break;case $.IN_SELECT_IN_TABLE:BS(this,e);break;case $.IN_TEMPLATE:HS(this,e);break;case $.AFTER_BODY:GS(this,e);break;case $.IN_FRAMESET:JS(this,e);break;case $.AFTER_FRAMESET:XS(this,e);break;case $.AFTER_AFTER_BODY:QS(this,e)}}onEof(e){switch(this.insertionMode){case $.INITIAL:Xb(this,e);break;case $.BEFORE_HTML:$b(this,e);break;case $.BEFORE_HEAD:nx(this,e);break;case $.IN_HEAD:ox(this,e);break;case $.IN_HEAD_NO_SCRIPT:lx(this,e);break;case $.AFTER_HEAD:fx(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:sS(this,e);break;case $.TEXT:lS(this,e);break;case $.IN_TABLE_TEXT:wS(this,e);break;case $.IN_TEMPLATE:US(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:Jb(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===J.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:mx(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:uS(this,e);break;case $.IN_TABLE_TEXT:SS(this,e)}}};function Rb(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):aS(e,t),n}function zb(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Bb(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Nb;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Vb(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Vb(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Hb(e,t,n){let r=Dy(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===Z.TEMPLATE&&i===Cy.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Ub(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Wb(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Yb(e,t){e._setDocumentType(t);let n=t.forceQuirks?Ty.QUIRKS:hb(t);mb(t)||e._err(t,Y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function Xb(e,t){e._err(t,Y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ty.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function Zb(e,t){t.tagID===Z.HTML?(e._insertElement(t,Cy.HTML),e.insertionMode=$.BEFORE_HEAD):$b(e,t)}function Qb(e,t){let n=t.tagID;(n===Z.HTML||n===Z.HEAD||n===Z.BODY||n===Z.BR)&&$b(e,t)}function $b(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function ex(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.HEAD:e._insertElement(t,Cy.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:nx(e,t)}}function tx(e,t){let n=t.tagID;n===Z.HEAD||n===Z.BODY||n===Z.HTML||n===Z.BR?nx(e,t):e._err(t,Y.endTagWithoutMatchingOpenElement)}function nx(e,t){e._insertFakeElement(X.HEAD,Z.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function rx(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.BASE:case Z.BASEFONT:case Z.BGSOUND:case Z.LINK:case Z.META:e._appendElement(t,Cy.HTML),t.ackSelfClosing=!0;break;case Z.TITLE:e._switchToTextParsing(t,jy.RCDATA);break;case Z.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,jy.RAWTEXT):(e._insertElement(t,Cy.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case Z.NOFRAMES:case Z.STYLE:e._switchToTextParsing(t,jy.RAWTEXT);break;case Z.SCRIPT:e._switchToTextParsing(t,jy.SCRIPT_DATA);break;case Z.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case Z.HEAD:e._err(t,Y.misplacedStartTagForHeadElement);break;default:ox(e,t)}}function ix(e,t){switch(t.tagID){case Z.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case Z.BODY:case Z.BR:case Z.HTML:ox(e,t);break;case Z.TEMPLATE:ax(e,t);break;default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function ax(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Z.TEMPLATE&&e._err(t,Y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Y.endTagWithoutMatchingOpenElement)}function ox(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function sx(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.BASEFONT:case Z.BGSOUND:case Z.HEAD:case Z.LINK:case Z.META:case Z.NOFRAMES:case Z.STYLE:rx(e,t);break;case Z.NOSCRIPT:e._err(t,Y.nestedNoscriptInHead);break;default:lx(e,t)}}function cx(e,t){switch(t.tagID){case Z.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case Z.BR:lx(e,t);break;default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function lx(e,t){let n=t.type===sy.EOF?Y.openElementsLeftAfterEof:Y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function ux(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.BODY:e._insertElement(t,Cy.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case Z.FRAMESET:e._insertElement(t,Cy.HTML),e.insertionMode=$.IN_FRAMESET;break;case Z.BASE:case Z.BASEFONT:case Z.BGSOUND:case Z.LINK:case Z.META:case Z.NOFRAMES:case Z.SCRIPT:case Z.STYLE:case Z.TEMPLATE:case Z.TITLE:e._err(t,Y.abandonedHeadElementChild),e.openElements.push(e.headElement,Z.HEAD),rx(e,t),e.openElements.remove(e.headElement);break;case Z.HEAD:e._err(t,Y.misplacedStartTagForHeadElement);break;default:fx(e,t)}}function dx(e,t){switch(t.tagID){case Z.BODY:case Z.HTML:case Z.BR:fx(e,t);break;case Z.TEMPLATE:ax(e,t);break;default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function fx(e,t){e._insertFakeElement(X.BODY,Z.BODY),e.insertionMode=$.IN_BODY,px(e,t)}function px(e,t){switch(t.type){case sy.CHARACTER:hx(e,t);break;case sy.WHITESPACE_CHARACTER:mx(e,t);break;case sy.COMMENT:Gb(e,t);break;case sy.START_TAG:Jx(e,t);break;case sy.END_TAG:oS(e,t);break;case sy.EOF:sS(e,t)}}function mx(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function hx(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function gx(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function _x(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function vx(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Cy.HTML),e.insertionMode=$.IN_FRAMESET)}function yx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Cy.HTML)}function bx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Ay.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Cy.HTML)}function xx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Cy.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Sx(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Cy.HTML),n||(e.formElement=e.openElements.current))}function Cx(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===Z.LI&&r===Z.LI||(n===Z.DD||n===Z.DT)&&(r===Z.DD||r===Z.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==Z.ADDRESS&&r!==Z.DIV&&r!==Z.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Cy.HTML)}function wx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Cy.HTML),e.tokenizer.state=jy.PLAINTEXT}function Tx(e,t){e.openElements.hasInScope(Z.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Z.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML),e.framesetOk=!1}function Ex(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Wb(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ox(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Z.NOBR)&&(Wb(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Cy.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function kx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Ax(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ty.QUIRKS&&e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Cy.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function jx(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Cy.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mx(e){let t=cy(e,wy.TYPE);return t!=null&&t.toLowerCase()===jb}function Nx(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Cy.HTML),Mx(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Px(e,t){e._appendElement(t,Cy.HTML),t.ackSelfClosing=!0}function Fx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._appendElement(t,Cy.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ix(e,t){t.tagName=X.IMG,t.tagID=Z.IMG,jx(e,t)}function Lx(e,t){e._insertElement(t,Cy.HTML),e.skipNextNewLine=!0,e.tokenizer.state=jy.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function Rx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,jy.RAWTEXT)}function zx(e,t){e.framesetOk=!1,e._switchToTextParsing(t,jy.RAWTEXT)}function Bx(e,t){e._switchToTextParsing(t,jy.RAWTEXT)}function Vx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function Hx(e,t){e.openElements.currentTagId===Z.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML)}function Ux(e,t){e.openElements.hasInScope(Z.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Cy.HTML)}function Wx(e,t){e.openElements.hasInScope(Z.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Z.RTC),e._insertElement(t,Cy.HTML)}function Gx(e,t){e._reconstructActiveFormattingElements(),wb(t),Eb(t),t.selfClosing?e._appendElement(t,Cy.MATHML):e._insertElement(t,Cy.MATHML),t.ackSelfClosing=!0}function Kx(e,t){e._reconstructActiveFormattingElements(),Tb(t),Eb(t),t.selfClosing?e._appendElement(t,Cy.SVG):e._insertElement(t,Cy.SVG),t.ackSelfClosing=!0}function qx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Cy.HTML)}function Jx(e,t){switch(t.tagID){case Z.I:case Z.S:case Z.B:case Z.U:case Z.EM:case Z.TT:case Z.BIG:case Z.CODE:case Z.FONT:case Z.SMALL:case Z.STRIKE:case Z.STRONG:Dx(e,t);break;case Z.A:Ex(e,t);break;case Z.H1:case Z.H2:case Z.H3:case Z.H4:case Z.H5:case Z.H6:bx(e,t);break;case Z.P:case Z.DL:case Z.OL:case Z.UL:case Z.DIV:case Z.DIR:case Z.NAV:case Z.MAIN:case Z.MENU:case Z.ASIDE:case Z.CENTER:case Z.FIGURE:case Z.FOOTER:case Z.HEADER:case Z.HGROUP:case Z.DIALOG:case Z.DETAILS:case Z.ADDRESS:case Z.ARTICLE:case Z.SEARCH:case Z.SECTION:case Z.SUMMARY:case Z.FIELDSET:case Z.BLOCKQUOTE:case Z.FIGCAPTION:yx(e,t);break;case Z.LI:case Z.DD:case Z.DT:Cx(e,t);break;case Z.BR:case Z.IMG:case Z.WBR:case Z.AREA:case Z.EMBED:case Z.KEYGEN:jx(e,t);break;case Z.HR:Fx(e,t);break;case Z.RB:case Z.RTC:Ux(e,t);break;case Z.RT:case Z.RP:Wx(e,t);break;case Z.PRE:case Z.LISTING:xx(e,t);break;case Z.XMP:Rx(e,t);break;case Z.SVG:Kx(e,t);break;case Z.HTML:gx(e,t);break;case Z.BASE:case Z.LINK:case Z.META:case Z.STYLE:case Z.TITLE:case Z.SCRIPT:case Z.BGSOUND:case Z.BASEFONT:case Z.TEMPLATE:rx(e,t);break;case Z.BODY:_x(e,t);break;case Z.FORM:Sx(e,t);break;case Z.NOBR:Ox(e,t);break;case Z.MATH:Gx(e,t);break;case Z.TABLE:Ax(e,t);break;case Z.INPUT:Nx(e,t);break;case Z.PARAM:case Z.TRACK:case Z.SOURCE:Px(e,t);break;case Z.IMAGE:Ix(e,t);break;case Z.BUTTON:Tx(e,t);break;case Z.APPLET:case Z.OBJECT:case Z.MARQUEE:kx(e,t);break;case Z.IFRAME:zx(e,t);break;case Z.SELECT:Vx(e,t);break;case Z.OPTION:case Z.OPTGROUP:Hx(e,t);break;case Z.NOEMBED:case Z.NOFRAMES:Bx(e,t);break;case Z.FRAMESET:vx(e,t);break;case Z.TEXTAREA:Lx(e,t);break;case Z.NOSCRIPT:e.options.scriptingEnabled?Bx(e,t):qx(e,t);break;case Z.PLAINTEXT:wx(e,t);break;case Z.COL:case Z.TH:case Z.TD:case Z.TR:case Z.HEAD:case Z.FRAME:case Z.TBODY:case Z.TFOOT:case Z.THEAD:case Z.CAPTION:case Z.COLGROUP:break;default:qx(e,t)}}function Yx(e,t){if(e.openElements.hasInScope(Z.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Xx(e,t){e.openElements.hasInScope(Z.BODY)&&(e.insertionMode=$.AFTER_BODY,GS(e,t))}function Zx(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Qx(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Z.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Z.FORM):n&&e.openElements.remove(n))}function $x(e){e.openElements.hasInButtonScope(Z.P)||e._insertFakeElement(X.P,Z.P),e._closePElement()}function eS(e){e.openElements.hasInListItemScope(Z.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Z.LI),e.openElements.popUntilTagNamePopped(Z.LI))}function tS(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function nS(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function rS(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function iS(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,Z.BR),e.openElements.pop(),e.framesetOk=!1}function aS(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==Z.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function oS(e,t){switch(t.tagID){case Z.A:case Z.B:case Z.I:case Z.S:case Z.U:case Z.EM:case Z.TT:case Z.BIG:case Z.CODE:case Z.FONT:case Z.NOBR:case Z.SMALL:case Z.STRIKE:case Z.STRONG:Wb(e,t);break;case Z.P:$x(e);break;case Z.DL:case Z.UL:case Z.OL:case Z.DIR:case Z.DIV:case Z.NAV:case Z.PRE:case Z.MAIN:case Z.MENU:case Z.ASIDE:case Z.BUTTON:case Z.CENTER:case Z.FIGURE:case Z.FOOTER:case Z.HEADER:case Z.HGROUP:case Z.DIALOG:case Z.ADDRESS:case Z.ARTICLE:case Z.DETAILS:case Z.SEARCH:case Z.SECTION:case Z.SUMMARY:case Z.LISTING:case Z.FIELDSET:case Z.BLOCKQUOTE:case Z.FIGCAPTION:Zx(e,t);break;case Z.LI:eS(e);break;case Z.DD:case Z.DT:tS(e,t);break;case Z.H1:case Z.H2:case Z.H3:case Z.H4:case Z.H5:case Z.H6:nS(e);break;case Z.BR:iS(e);break;case Z.BODY:Yx(e,t);break;case Z.HTML:Xx(e,t);break;case Z.FORM:Qx(e);break;case Z.APPLET:case Z.OBJECT:case Z.MARQUEE:rS(e,t);break;case Z.TEMPLATE:ax(e,t);break;default:aS(e,t)}}function sS(e,t){e.tmplInsertionModeStack.length>0?US(e,t):Jb(e,t)}function cS(e,t){var n;t.tagID===Z.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function lS(e,t){e._err(t,Y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function uS(e,t){if(e.openElements.currentTagId!==void 0&&Fb.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case sy.CHARACTER:CS(e,t);break;case sy.WHITESPACE_CHARACTER:SS(e,t)}else xS(e,t)}function dS(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Cy.HTML),e.insertionMode=$.IN_CAPTION}function fS(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Cy.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function pS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,Z.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,OS(e,t)}function mS(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Cy.HTML),e.insertionMode=$.IN_TABLE_BODY}function hS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,Z.TBODY),e.insertionMode=$.IN_TABLE_BODY,jS(e,t)}function gS(e,t){e.openElements.hasInTableScope(Z.TABLE)&&(e.openElements.popUntilTagNamePopped(Z.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function _S(e,t){Mx(t)?e._appendElement(t,Cy.HTML):xS(e,t),t.ackSelfClosing=!0}function vS(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Cy.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function yS(e,t){switch(t.tagID){case Z.TD:case Z.TH:case Z.TR:hS(e,t);break;case Z.STYLE:case Z.SCRIPT:case Z.TEMPLATE:rx(e,t);break;case Z.COL:pS(e,t);break;case Z.FORM:vS(e,t);break;case Z.TABLE:gS(e,t);break;case Z.TBODY:case Z.TFOOT:case Z.THEAD:mS(e,t);break;case Z.INPUT:_S(e,t);break;case Z.CAPTION:dS(e,t);break;case Z.COLGROUP:fS(e,t);break;default:xS(e,t)}}function bS(e,t){switch(t.tagID){case Z.TABLE:e.openElements.hasInTableScope(Z.TABLE)&&(e.openElements.popUntilTagNamePopped(Z.TABLE),e._resetInsertionMode());break;case Z.TEMPLATE:ax(e,t);break;case Z.BODY:case Z.CAPTION:case Z.COL:case Z.COLGROUP:case Z.HTML:case Z.TBODY:case Z.TD:case Z.TFOOT:case Z.TH:case Z.THEAD:case Z.TR:break;default:xS(e,t)}}function xS(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,px(e,t),e.fosterParentingEnabled=n}function SS(e,t){e.pendingCharacterTokens.push(t)}function CS(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wS(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===Z.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Z.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Z.OPTGROUP&&e.openElements.pop();break;case Z.OPTION:e.openElements.currentTagId===Z.OPTION&&e.openElements.pop();break;case Z.SELECT:e.openElements.hasInSelectScope(Z.SELECT)&&(e.openElements.popUntilTagNamePopped(Z.SELECT),e._resetInsertionMode());break;case Z.TEMPLATE:ax(e,t)}}function zS(e,t){let n=t.tagID;n===Z.CAPTION||n===Z.TABLE||n===Z.TBODY||n===Z.TFOOT||n===Z.THEAD||n===Z.TR||n===Z.TD||n===Z.TH?(e.openElements.popUntilTagNamePopped(Z.SELECT),e._resetInsertionMode(),e._processStartTag(t)):LS(e,t)}function BS(e,t){let n=t.tagID;n===Z.CAPTION||n===Z.TABLE||n===Z.TBODY||n===Z.TFOOT||n===Z.THEAD||n===Z.TR||n===Z.TD||n===Z.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Z.SELECT),e._resetInsertionMode(),e.onEndTag(t)):RS(e,t)}function VS(e,t){switch(t.tagID){case Z.BASE:case Z.BASEFONT:case Z.BGSOUND:case Z.LINK:case Z.META:case Z.NOFRAMES:case Z.SCRIPT:case Z.STYLE:case Z.TEMPLATE:case Z.TITLE:rx(e,t);break;case Z.CAPTION:case Z.COLGROUP:case Z.TBODY:case Z.TFOOT:case Z.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,yS(e,t);break;case Z.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,OS(e,t);break;case Z.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,jS(e,t);break;case Z.TD:case Z.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,NS(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,Jx(e,t)}}function HS(e,t){t.tagID===Z.TEMPLATE&&ax(e,t)}function US(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Jb(e,t)}function WS(e,t){t.tagID===Z.HTML?Jx(e,t):KS(e,t)}function GS(e,t){if(t.tagID===Z.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Z.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else KS(e,t)}function KS(e,t){e.insertionMode=$.IN_BODY,px(e,t)}function qS(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.FRAMESET:e._insertElement(t,Cy.HTML);break;case Z.FRAME:e._appendElement(t,Cy.HTML),t.ackSelfClosing=!0;break;case Z.NOFRAMES:rx(e,t)}}function JS(e,t){t.tagID===Z.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==Z.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function YS(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.NOFRAMES:rx(e,t)}}function XS(e,t){t.tagID===Z.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function ZS(e,t){t.tagID===Z.HTML?Jx(e,t):QS(e,t)}function QS(e,t){e.insertionMode=$.IN_BODY,px(e,t)}function $S(e,t){switch(t.tagID){case Z.HTML:Jx(e,t);break;case Z.NOFRAMES:rx(e,t)}}function eC(e,t){t.chars=`�`,e._insertCharacters(t)}function tC(e,t){e._insertCharacters(t),e.framesetOk=!1}function nC(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Cy.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function rC(e,t){if(Cb(t))nC(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Cy.MATHML?wb(t):r===Cy.SVG&&(Db(t),Tb(t)),Eb(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function iC(e,t){if(t.tagID===Z.P||t.tagID===Z.BR){nC(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Cy.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;var aC=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,oC=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),sC={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function cC(e,t){let n=SC(e),r=Lv(`type`,{handlers:{root:uC,element:dC,text:fC,comment:hC,doctype:pC,raw:gC},unknown:_C}),i={parser:n?new Lb(sC):Lb.getFragmentParser(void 0,sC),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),vC(i,_f());let a=Ov(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&c_(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function lC(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);let n={type:sy.CHARACTER,chars:e.value,location:CC(e)};vC(t,_f(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pC(e,t){let n={type:sy.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:CC(e)};vC(t,_f(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function mC(e,t){t.stitches=!0;let n=wC(e);`children`in e&&`children`in n&&(n.children=cC({type:`root`,children:e.children},t.options).children),hC({type:`comment`,value:{stitch:n}},t)}function hC(e,t){let n=e.value,r={type:sy.COMMENT,data:n,location:CC(e)};vC(t,_f(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function gC(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,yC(t,_f(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(aC,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function _C(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))mC(n,t);else{let e=``;throw oC.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function vC(e,t){yC(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=jy.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function yC(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function bC(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===jy.PLAINTEXT)return;vC(t,_f(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Tv.html;i===Tv.html&&n===`svg`&&(i=Tv.svg);let a=Vv({...e,children:[]},{space:i===Tv.svg?`svg`:`html`}),o={type:sy.START_TAG,tagName:n,tagID:Dy(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:CC(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function xC(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&Zv.includes(n)||t.parser.tokenizer.state===jy.PLAINTEXT)return;vC(t,gf(e));let r={type:sy.END_TAG,tagName:n,tagID:Dy(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:CC(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===jy.RCDATA||t.parser.tokenizer.state===jy.RAWTEXT||t.parser.tokenizer.state===jy.SCRIPT_DATA)&&(t.parser.tokenizer.state=jy.DATA)}function SC(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function CC(e){let t=_f(e)||{line:void 0,column:void 0,offset:void 0},n=gf(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function wC(e){return`children`in e?qg({...e,children:[]}):qg(e)}function TC(e){return function(t,n){return cC(t,{...e,file:n})}}var EC=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],DC={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...EC,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...EC],h2:[[`className`,`sr-only`]],img:[...EC,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...EC,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...EC],table:[...EC],ul:[...EC,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},OC={}.hasOwnProperty;function kC(e,t){let n={type:`root`,children:[]},r=AC({schema:t?{...DC,...t}:DC,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function AC(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return jC(e,n);case`doctype`:return MC(e,n);case`element`:return NC(e,n);case`root`:return PC(e,n);case`text`:return FC(e,n)}}}function jC(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return HC(r,t),r}}function MC(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return HC(e,t),e}}function NC(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=IC(e,t.children),i=LC(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&OC.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function WC(e){return function(t){return kC(t,e)}}function GC(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function KC(e,t,n){let r=Zg((n||{}).ignore||[]),i=qC(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=$C(e,`(`),a=$C(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function hw(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||Ep(n)||Tp(n))&&(!t||n!==47)}Tw.peek=ww;function gw(){this.buffer()}function _w(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function vw(){this.buffer()}function yw(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function bw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xw(e){this.exit(e)}function Sw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Cw(e){this.exit(e)}function ww(){return`[`}function Tw(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ew(){return{enter:{gfmFootnoteCallString:gw,gfmFootnoteCall:_w,gfmFootnoteDefinitionLabelString:vw,gfmFootnoteDefinition:yw},exit:{gfmFootnoteCallString:bw,gfmFootnoteCall:xw,gfmFootnoteDefinitionLabelString:Sw,gfmFootnoteDefinition:Cw}}}function Dw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Tw},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` -`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?kw:Ow))),s(),o}}function Ow(e,t,n){return t===0?e:kw(e,t,n)}function kw(e,t,n){return(n?``:` `)+e}var Aw=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Fw.peek=Iw;function jw(){return{canContainEols:[`delete`],enter:{strikethrough:Nw},exit:{strikethrough:Pw}}}function Mw(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Aw}],handlers:{delete:Fw}}}function Nw(e){this.enter({type:`delete`,children:[]},e)}function Pw(e){this.exit(e)}function Fw(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Iw(){return`~`}function Lw(e){return e.length}function Rw(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Lw,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Hw);return i(),o}function Hw(e,t,n){return`>`+(n?``:` `)+e}function Uw(e,t){return Ww(e,t.inConstruct,!0)&&!Ww(e,t.notInConstruct,!1)}function Ww(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function qw(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Jw(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Yw(e,t,n,r){let i=Jw(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(qw(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,Xw);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Kw(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` +`}),n}function x_(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function S_(e,t){let n=g_(e,t),r=n.one(e,void 0),i=t_(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` +`},i)),a}function C_(e,t){return e&&`run`in e?async function(n,r){let i=S_(n,{file:r,...t});await e.run(i,r)}:function(n,r){return S_(n,{file:r,...e||t})}}function w_(e){if(e)throw e}var T_=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var k_={basename:A_,dirname:j_,extname:M_,join:N_,sep:`/`};function A_(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);I_(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function j_(e){if(I_(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function M_(e){I_(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function N_(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function F_(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function I_(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var L_={cwd:R_};function R_(){return`/`}function z_(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function B_(e){if(typeof e==`string`)e=new URL(e);else if(!z_(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return V_(e)}function V_(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];E_(o)&&E_(r)&&(r=(0,Y_.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Q_(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function $_(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function ev(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function tv(e){if(!E_(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function nv(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function rv(e){return iv(e)?e:new U_(e)}function iv(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function av(e){return typeof e==`string`||ov(e)}function ov(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var sv=[],cv={allowDangerousHtml:!0},lv=/^(https?|ircs?|mailto|xmpp)$/i,uv=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function dv(e){let t=fv(e),n=pv(e);return mv(t.runSync(t.parse(n),n),e)}function fv(e){let t=e.rehypePlugins||sv,n=e.remarkPlugins||sv,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cv}:cv;return Z_().use(og).use(n).use(C_,r).use(t)}function pv(e){let t=e.children||``,n=new U_;return typeof t==`string`?n.value=t:``+t,n}function mv(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||hv;for(let e of uv)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return p_(e,l),If(e,{Fragment:q.Fragment,components:i,ignoreInvalidStyle:!0,jsx:q.jsx,jsxs:q.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in ip)if(Object.hasOwn(ip,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=ip[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function hv(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||lv.test(e.slice(0,t))?e:``}var gv=/[#.]/g;function _v(e,t){let n=e||``,r={},i=0,a,o;for(;i-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=kv(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length1?n[e.line-2]:0)+e.column-1;if(r=55296&&e<=57343}function oy(e){return e>=56320&&e<=57343}function sy(e,t){return(e-55296)*1024+9216+t}function cy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ly(e){return e>=64976&&e<=65007||ry.has(e)}var Y;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(Y||={});var uy=65536,dy=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=uy,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(oy(t))return this.pos++,this._addGap(),sy(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,J.EOF;return this._err(Y.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,J.EOF;let n=this.html.charCodeAt(t);return n===J.CARRIAGE_RETURN?J.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,J.EOF;let e=this.html.charCodeAt(this.pos);return e===J.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,J.LINE_FEED):e===J.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ay(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===J.LINE_FEED||e===J.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){cy(e)?this._err(Y.controlCharacterInInputStream):ly(e)&&this._err(Y.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var my=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),hy=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function gy(e){return e>=55296&&e<=57343||e>1114111?65533:hy.get(e)??e}var _y;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(_y||={});var vy=32,yy;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(yy||={});function by(e){return e>=_y.ZERO&&e<=_y.NINE}function xy(e){return e>=_y.UPPER_A&&e<=_y.UPPER_F||e>=_y.LOWER_A&&e<=_y.LOWER_F}function Sy(e){return e>=_y.UPPER_A&&e<=_y.UPPER_Z||e>=_y.LOWER_A&&e<=_y.LOWER_Z||by(e)}function Cy(e){return e===_y.EQUALS||Sy(e)}var wy;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(wy||={});var Ty;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(Ty||={});var Ey=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=wy.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ty.Strict}startEntity(e){this.decodeMode=e,this.state=wy.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case wy.EntityStart:return e.charCodeAt(t)===_y.NUM?(this.state=wy.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=wy.NamedEntity,this.stateNamedEntity(e,t));case wy.NumericStart:return this.stateNumericStart(e,t);case wy.NumericDecimal:return this.stateNumericDecimal(e,t);case wy.NumericHex:return this.stateNumericHex(e,t);case wy.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|vy)===_y.LOWER_X?(this.state=wy.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=wy.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t>14;for(;t>14,i!==0){if(a===_y.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Ty.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&yy.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~yy.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case wy.NamedEntity:return this.result!==0&&(this.decodeMode!==Ty.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case wy.NumericDecimal:return this.emitNumericEntity(0,2);case wy.NumericHex:return this.emitNumericEntity(0,3);case wy.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case wy.EntityStart:return 0}}};function Dy(e,t,n,r){let i=(t&yy.BRANCH_LENGTH)>>7,a=t&yy.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(nr)s=t-1;else return e[t+i]}return-1}var Oy;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(Oy||={});var ky;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(ky||={});var Ay;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(Ay||={});var X;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(X||={});var Z;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(Z||={});var jy=new Map([[X.A,Z.A],[X.ADDRESS,Z.ADDRESS],[X.ANNOTATION_XML,Z.ANNOTATION_XML],[X.APPLET,Z.APPLET],[X.AREA,Z.AREA],[X.ARTICLE,Z.ARTICLE],[X.ASIDE,Z.ASIDE],[X.B,Z.B],[X.BASE,Z.BASE],[X.BASEFONT,Z.BASEFONT],[X.BGSOUND,Z.BGSOUND],[X.BIG,Z.BIG],[X.BLOCKQUOTE,Z.BLOCKQUOTE],[X.BODY,Z.BODY],[X.BR,Z.BR],[X.BUTTON,Z.BUTTON],[X.CAPTION,Z.CAPTION],[X.CENTER,Z.CENTER],[X.CODE,Z.CODE],[X.COL,Z.COL],[X.COLGROUP,Z.COLGROUP],[X.DD,Z.DD],[X.DESC,Z.DESC],[X.DETAILS,Z.DETAILS],[X.DIALOG,Z.DIALOG],[X.DIR,Z.DIR],[X.DIV,Z.DIV],[X.DL,Z.DL],[X.DT,Z.DT],[X.EM,Z.EM],[X.EMBED,Z.EMBED],[X.FIELDSET,Z.FIELDSET],[X.FIGCAPTION,Z.FIGCAPTION],[X.FIGURE,Z.FIGURE],[X.FONT,Z.FONT],[X.FOOTER,Z.FOOTER],[X.FOREIGN_OBJECT,Z.FOREIGN_OBJECT],[X.FORM,Z.FORM],[X.FRAME,Z.FRAME],[X.FRAMESET,Z.FRAMESET],[X.H1,Z.H1],[X.H2,Z.H2],[X.H3,Z.H3],[X.H4,Z.H4],[X.H5,Z.H5],[X.H6,Z.H6],[X.HEAD,Z.HEAD],[X.HEADER,Z.HEADER],[X.HGROUP,Z.HGROUP],[X.HR,Z.HR],[X.HTML,Z.HTML],[X.I,Z.I],[X.IMG,Z.IMG],[X.IMAGE,Z.IMAGE],[X.INPUT,Z.INPUT],[X.IFRAME,Z.IFRAME],[X.KEYGEN,Z.KEYGEN],[X.LABEL,Z.LABEL],[X.LI,Z.LI],[X.LINK,Z.LINK],[X.LISTING,Z.LISTING],[X.MAIN,Z.MAIN],[X.MALIGNMARK,Z.MALIGNMARK],[X.MARQUEE,Z.MARQUEE],[X.MATH,Z.MATH],[X.MENU,Z.MENU],[X.META,Z.META],[X.MGLYPH,Z.MGLYPH],[X.MI,Z.MI],[X.MO,Z.MO],[X.MN,Z.MN],[X.MS,Z.MS],[X.MTEXT,Z.MTEXT],[X.NAV,Z.NAV],[X.NOBR,Z.NOBR],[X.NOFRAMES,Z.NOFRAMES],[X.NOEMBED,Z.NOEMBED],[X.NOSCRIPT,Z.NOSCRIPT],[X.OBJECT,Z.OBJECT],[X.OL,Z.OL],[X.OPTGROUP,Z.OPTGROUP],[X.OPTION,Z.OPTION],[X.P,Z.P],[X.PARAM,Z.PARAM],[X.PLAINTEXT,Z.PLAINTEXT],[X.PRE,Z.PRE],[X.RB,Z.RB],[X.RP,Z.RP],[X.RT,Z.RT],[X.RTC,Z.RTC],[X.RUBY,Z.RUBY],[X.S,Z.S],[X.SCRIPT,Z.SCRIPT],[X.SEARCH,Z.SEARCH],[X.SECTION,Z.SECTION],[X.SELECT,Z.SELECT],[X.SOURCE,Z.SOURCE],[X.SMALL,Z.SMALL],[X.SPAN,Z.SPAN],[X.STRIKE,Z.STRIKE],[X.STRONG,Z.STRONG],[X.STYLE,Z.STYLE],[X.SUB,Z.SUB],[X.SUMMARY,Z.SUMMARY],[X.SUP,Z.SUP],[X.TABLE,Z.TABLE],[X.TBODY,Z.TBODY],[X.TEMPLATE,Z.TEMPLATE],[X.TEXTAREA,Z.TEXTAREA],[X.TFOOT,Z.TFOOT],[X.TD,Z.TD],[X.TH,Z.TH],[X.THEAD,Z.THEAD],[X.TITLE,Z.TITLE],[X.TR,Z.TR],[X.TRACK,Z.TRACK],[X.TT,Z.TT],[X.U,Z.U],[X.UL,Z.UL],[X.SVG,Z.SVG],[X.VAR,Z.VAR],[X.WBR,Z.WBR],[X.XMP,Z.XMP]]);function My(e){return jy.get(e)??Z.UNKNOWN}var Ny=Z,Py={[Oy.HTML]:new Set([Ny.ADDRESS,Ny.APPLET,Ny.AREA,Ny.ARTICLE,Ny.ASIDE,Ny.BASE,Ny.BASEFONT,Ny.BGSOUND,Ny.BLOCKQUOTE,Ny.BODY,Ny.BR,Ny.BUTTON,Ny.CAPTION,Ny.CENTER,Ny.COL,Ny.COLGROUP,Ny.DD,Ny.DETAILS,Ny.DIR,Ny.DIV,Ny.DL,Ny.DT,Ny.EMBED,Ny.FIELDSET,Ny.FIGCAPTION,Ny.FIGURE,Ny.FOOTER,Ny.FORM,Ny.FRAME,Ny.FRAMESET,Ny.H1,Ny.H2,Ny.H3,Ny.H4,Ny.H5,Ny.H6,Ny.HEAD,Ny.HEADER,Ny.HGROUP,Ny.HR,Ny.HTML,Ny.IFRAME,Ny.IMG,Ny.INPUT,Ny.LI,Ny.LINK,Ny.LISTING,Ny.MAIN,Ny.MARQUEE,Ny.MENU,Ny.META,Ny.NAV,Ny.NOEMBED,Ny.NOFRAMES,Ny.NOSCRIPT,Ny.OBJECT,Ny.OL,Ny.P,Ny.PARAM,Ny.PLAINTEXT,Ny.PRE,Ny.SCRIPT,Ny.SECTION,Ny.SELECT,Ny.SOURCE,Ny.STYLE,Ny.SUMMARY,Ny.TABLE,Ny.TBODY,Ny.TD,Ny.TEMPLATE,Ny.TEXTAREA,Ny.TFOOT,Ny.TH,Ny.THEAD,Ny.TITLE,Ny.TR,Ny.TRACK,Ny.UL,Ny.WBR,Ny.XMP]),[Oy.MATHML]:new Set([Ny.MI,Ny.MO,Ny.MN,Ny.MS,Ny.MTEXT,Ny.ANNOTATION_XML]),[Oy.SVG]:new Set([Ny.TITLE,Ny.FOREIGN_OBJECT,Ny.DESC]),[Oy.XLINK]:new Set,[Oy.XML]:new Set,[Oy.XMLNS]:new Set},Fy=new Set([Ny.H1,Ny.H2,Ny.H3,Ny.H4,Ny.H5,Ny.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var Q;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Q||={});var Iy={DATA:Q.DATA,RCDATA:Q.RCDATA,RAWTEXT:Q.RAWTEXT,SCRIPT_DATA:Q.SCRIPT_DATA,PLAINTEXT:Q.PLAINTEXT,CDATA_SECTION:Q.CDATA_SECTION};function Ly(e){return e>=J.DIGIT_0&&e<=J.DIGIT_9}function Ry(e){return e>=J.LATIN_CAPITAL_A&&e<=J.LATIN_CAPITAL_Z}function zy(e){return e>=J.LATIN_SMALL_A&&e<=J.LATIN_SMALL_Z}function By(e){return zy(e)||Ry(e)}function Vy(e){return By(e)||Ly(e)}function Hy(e){return e+32}function Uy(e){return e===J.SPACE||e===J.LINE_FEED||e===J.TABULATION||e===J.FORM_FEED}function Wy(e){return Uy(e)||e===J.SOLIDUS||e===J.GREATER_THAN_SIGN}function Gy(e){return e===J.NULL?Y.nullCharacterReference:e>1114111?Y.characterReferenceOutsideUnicodeRange:ay(e)?Y.surrogateCharacterReference:ly(e)?Y.noncharacterCharacterReference:cy(e)||e===J.CARRIAGE_RETURN?Y.controlCharacterReference:null}var Ky=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Q.DATA,this.returnState=Q.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new dy(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ey(my,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(Y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Gy(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(Y.endTagWithAttributes),e.selfClosing&&this._err(Y.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case fy.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case fy.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case fy.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:fy.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=Uy(e)?fy.WHITESPACE_CHARACTER:e===J.NULL?fy.NULL_CHARACTER:fy.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(fy.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Q.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ty.Attribute:Ty.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Q.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Q.DATA:this._stateData(e);break;case Q.RCDATA:this._stateRcdata(e);break;case Q.RAWTEXT:this._stateRawtext(e);break;case Q.SCRIPT_DATA:this._stateScriptData(e);break;case Q.PLAINTEXT:this._statePlaintext(e);break;case Q.TAG_OPEN:this._stateTagOpen(e);break;case Q.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Q.TAG_NAME:this._stateTagName(e);break;case Q.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Q.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Q.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Q.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Q.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Q.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Q.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Q.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Q.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Q.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Q.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Q.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Q.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Q.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Q.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Q.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Q.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Q.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Q.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Q.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Q.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Q.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Q.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Q.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Q.BOGUS_COMMENT:this._stateBogusComment(e);break;case Q.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Q.COMMENT_START:this._stateCommentStart(e);break;case Q.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Q.COMMENT:this._stateComment(e);break;case Q.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Q.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Q.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Q.COMMENT_END:this._stateCommentEnd(e);break;case Q.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Q.DOCTYPE:this._stateDoctype(e);break;case Q.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Q.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Q.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Q.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Q.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Q.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Q.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Q.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Q.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Q.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Q.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Q.CDATA_SECTION:this._stateCdataSection(e);break;case Q.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Q.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Q.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Q.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case J.LESS_THAN_SIGN:this.state=Q.TAG_OPEN;break;case J.AMPERSAND:this._startCharacterReference();break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitCodePoint(e);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case J.AMPERSAND:this._startCharacterReference();break;case J.LESS_THAN_SIGN:this.state=Q.RCDATA_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case J.LESS_THAN_SIGN:this.state=Q.RAWTEXT_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case J.LESS_THAN_SIGN:this.state=Q.SCRIPT_DATA_LESS_THAN_SIGN;break;case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case J.NULL:this._err(Y.unexpectedNullCharacter),this._emitChars(`�`);break;case J.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(By(e))this._createStartTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case J.EXCLAMATION_MARK:this.state=Q.MARKUP_DECLARATION_OPEN;break;case J.SOLIDUS:this.state=Q.END_TAG_OPEN;break;case J.QUESTION_MARK:this._err(Y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Q.BOGUS_COMMENT,this._stateBogusComment(e);break;case J.EOF:this._err(Y.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(Y.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Q.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(By(e))this._createEndTagToken(),this.state=Q.TAG_NAME,this._stateTagName(e);else switch(e){case J.GREATER_THAN_SIGN:this._err(Y.missingEndTagName),this.state=Q.DATA;break;case J.EOF:this._err(Y.eofBeforeTagName),this._emitChars(``);break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case J.EOF:this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===J.SOLIDUS?this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:By(e)?(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Q.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){By(e)?(this.state=Q.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(``);break;case J.NULL:this._err(Y.unexpectedNullCharacter),this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case J.EOF:this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===J.SOLIDUS?(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Q.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(iy.SCRIPT,!1)&&Wy(this.preprocessor.peek(iy.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==Oy.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(nb,Oy.HTML)}clearBackToTableBodyContext(){this.clearBackTo(tb,Oy.HTML)}clearBackToTableRowContext(){this.clearBackTo(eb,Oy.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===Z.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===Z.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case Oy.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case Oy.SVG:if($y.has(r))return!1;break;case Oy.MATHML:if(Qy.has(r))return!1}}return!0}hasInScope(e){return this.hasInDynamicScope(e,Yy)}hasInListItemScope(e){return this.hasInDynamicScope(e,Xy)}hasInButtonScope(e){return this.hasInDynamicScope(e,Zy)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case Oy.HTML:if(Fy.has(t))return!0;if(Yy.has(t))return!1;break;case Oy.SVG:if($y.has(t))return!1;break;case Oy.MATHML:if(Qy.has(t))return!1}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Oy.HTML)switch(this.tagIDs[t]){case e:return!0;case Z.TABLE:case Z.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===Oy.HTML)switch(this.tagIDs[e]){case Z.TBODY:case Z.THEAD:case Z.TFOOT:return!0;case Z.TABLE:case Z.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===Oy.HTML)switch(this.tagIDs[t]){case e:return!0;case Z.OPTION:case Z.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&qy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Jy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Jy.has(this.currentTagId);)this.pop()}},ab=3,ob;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(ob||={});var sb={type:ob.Marker},cb=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])),i=0;for(let e=0;er.get(e.name)===e.value)&&(i+=1,i>=ab&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(sb)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:ob.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ob.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(sb);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===ob.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===ob.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===ob.Element&&t.element===e)}},lb={createDocument(){return{nodeName:`#document`,mode:Ay.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};lb.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(lb.isTextNode(n)){n.value+=t;return}}lb.appendChild(e,lb.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&lb.isTextNode(r)?r.value+=t:lb.insertBefore(e,lb.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;re.startsWith(t))}function yb(e){return e.name===ub&&e.publicId===null&&(e.systemId===null||e.systemId===db)}function bb(e){if(e.name!==ub)return Ay.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===fb)return Ay.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),hb.has(n))return Ay.QUIRKS;let e=t===null?mb:pb;if(vb(n,e))return Ay.QUIRKS;if(e=t===null?gb:_b,vb(n,e))return Ay.LIMITED_QUIRKS}return Ay.NO_QUIRKS}var xb={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Sb=`definitionurl`,Cb=`definitionURL`,wb=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),Tb=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:Oy.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:Oy.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:Oy.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:Oy.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:Oy.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:Oy.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:Oy.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:Oy.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:Oy.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:Oy.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:Oy.XMLNS}]]),Eb=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),Db=new Set([Z.B,Z.BIG,Z.BLOCKQUOTE,Z.BODY,Z.BR,Z.CENTER,Z.CODE,Z.DD,Z.DIV,Z.DL,Z.DT,Z.EM,Z.EMBED,Z.H1,Z.H2,Z.H3,Z.H4,Z.H5,Z.H6,Z.HEAD,Z.HR,Z.I,Z.IMG,Z.LI,Z.LISTING,Z.MENU,Z.META,Z.NOBR,Z.OL,Z.P,Z.PRE,Z.RUBY,Z.S,Z.SMALL,Z.SPAN,Z.STRONG,Z.STRIKE,Z.SUB,Z.SUP,Z.TABLE,Z.TT,Z.U,Z.UL,Z.VAR]);function Ob(e){let t=e.tagID;return t===Z.FONT&&e.attrs.some(({name:e})=>e===ky.COLOR||e===ky.SIZE||e===ky.FACE)||Db.has(t)}function kb(e){for(let t=0;t0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===Oy.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,Oy.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=$.TEXT}switchToPlaintextParsing(){this.insertionMode=$.TEXT,this.originalInsertionMode=$.IN_BODY,this.tokenizer.state=Iy.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===X.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==Oy.HTML))switch(this.fragmentContextID){case Z.TITLE:case Z.TEXTAREA:this.tokenizer.state=Iy.RCDATA;break;case Z.STYLE:case Z.XMP:case Z.IFRAME:case Z.NOEMBED:case Z.NOFRAMES:case Z.NOSCRIPT:this.tokenizer.state=Iy.RAWTEXT;break;case Z.SCRIPT:this.tokenizer.state=Iy.SCRIPT_DATA;break;case Z.PLAINTEXT:this.tokenizer.state=Iy.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,Oy.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,Oy.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(X.HTML,Oy.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,Z.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===fy.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===Z.SVG&&this.treeAdapter.getTagName(t)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===Oy.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===Z.MGLYPH||e.tagID===Z.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,Oy.HTML)}_processToken(e){switch(e.type){case fy.CHARACTER:this.onCharacter(e);break;case fy.NULL_CHARACTER:this.onNullCharacter(e);break;case fy.COMMENT:this.onComment(e);break;case fy.DOCTYPE:this.onDoctype(e);break;case fy.START_TAG:this._processStartTag(e);break;case fy.END_TAG:this.onEndTag(e);break;case fy.EOF:this.onEof(e);break;case fy.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){return Fb(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===ob.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=$.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(Z.P),this.openElements.popUntilTagNamePopped(Z.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case Z.TR:this.insertionMode=$.IN_ROW;return;case Z.TBODY:case Z.THEAD:case Z.TFOOT:this.insertionMode=$.IN_TABLE_BODY;return;case Z.CAPTION:this.insertionMode=$.IN_CAPTION;return;case Z.COLGROUP:this.insertionMode=$.IN_COLUMN_GROUP;return;case Z.TABLE:this.insertionMode=$.IN_TABLE;return;case Z.BODY:this.insertionMode=$.IN_BODY;return;case Z.FRAMESET:this.insertionMode=$.IN_FRAMESET;return;case Z.SELECT:this._resetInsertionModeForSelect(e);return;case Z.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case Z.HTML:this.insertionMode=this.headElement?$.AFTER_HEAD:$.BEFORE_HEAD;return;case Z.TD:case Z.TH:if(e>0){this.insertionMode=$.IN_CELL;return}break;case Z.HEAD:if(e>0){this.insertionMode=$.IN_HEAD;return}}this.insertionMode=$.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===Z.TEMPLATE)break;if(e===Z.TABLE){this.insertionMode=$.IN_SELECT_IN_TABLE;return}}this.insertionMode=$.IN_SELECT}_isElementCausesFosterParenting(e){return Bb.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case Z.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===Oy.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case Z.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return Py[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){oC(this,e);return}switch(this.insertionMode){case $.INITIAL:tx(this,e);break;case $.BEFORE_HTML:ix(this,e);break;case $.BEFORE_HEAD:sx(this,e);break;case $.IN_HEAD:dx(this,e);break;case $.IN_HEAD_NO_SCRIPT:mx(this,e);break;case $.AFTER_HEAD:_x(this,e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:bx(this,e);break;case $.TEXT:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:hS(this,e);break;case $.IN_TABLE_TEXT:OS(this,e);break;case $.IN_COLUMN_GROUP:FS(this,e);break;case $.AFTER_BODY:ZS(this,e);break;case $.AFTER_AFTER_BODY:rC(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aC(this,e);return}switch(this.insertionMode){case $.INITIAL:tx(this,e);break;case $.BEFORE_HTML:ix(this,e);break;case $.BEFORE_HEAD:sx(this,e);break;case $.IN_HEAD:dx(this,e);break;case $.IN_HEAD_NO_SCRIPT:mx(this,e);break;case $.AFTER_HEAD:_x(this,e);break;case $.TEXT:this._insertCharacters(e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:hS(this,e);break;case $.IN_COLUMN_GROUP:FS(this,e);break;case $.AFTER_BODY:ZS(this,e);break;case $.AFTER_AFTER_BODY:rC(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Xb(this,e);return}switch(this.insertionMode){case $.INITIAL:case $.BEFORE_HTML:case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_TEMPLATE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:Xb(this,e);break;case $.IN_TABLE_TEXT:kS(this,e);break;case $.AFTER_BODY:Zb(this,e);break;case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:Qb(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case $.INITIAL:ex(this,e);break;case $.BEFORE_HEAD:case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:this._err(e,Y.misplacedDoctype);break;case $.IN_TABLE_TEXT:kS(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,Y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?cC(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:tx(this,e);break;case $.BEFORE_HTML:nx(this,e);break;case $.BEFORE_HEAD:ax(this,e);break;case $.IN_HEAD:cx(this,e);break;case $.IN_HEAD_NO_SCRIPT:fx(this,e);break;case $.AFTER_HEAD:hx(this,e);break;case $.IN_BODY:$x(this,e);break;case $.IN_TABLE:wS(this,e);break;case $.IN_TABLE_TEXT:kS(this,e);break;case $.IN_CAPTION:jS(this,e);break;case $.IN_COLUMN_GROUP:NS(this,e);break;case $.IN_TABLE_BODY:IS(this,e);break;case $.IN_ROW:RS(this,e);break;case $.IN_CELL:BS(this,e);break;case $.IN_SELECT:HS(this,e);break;case $.IN_SELECT_IN_TABLE:WS(this,e);break;case $.IN_TEMPLATE:KS(this,e);break;case $.AFTER_BODY:YS(this,e);break;case $.IN_FRAMESET:QS(this,e);break;case $.AFTER_FRAMESET:eC(this,e);break;case $.AFTER_AFTER_BODY:nC(this,e);break;case $.AFTER_AFTER_FRAMESET:iC(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?lC(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case $.INITIAL:tx(this,e);break;case $.BEFORE_HTML:rx(this,e);break;case $.BEFORE_HEAD:ox(this,e);break;case $.IN_HEAD:lx(this,e);break;case $.IN_HEAD_NO_SCRIPT:px(this,e);break;case $.AFTER_HEAD:gx(this,e);break;case $.IN_BODY:dS(this,e);break;case $.TEXT:pS(this,e);break;case $.IN_TABLE:TS(this,e);break;case $.IN_TABLE_TEXT:kS(this,e);break;case $.IN_CAPTION:MS(this,e);break;case $.IN_COLUMN_GROUP:PS(this,e);break;case $.IN_TABLE_BODY:LS(this,e);break;case $.IN_ROW:zS(this,e);break;case $.IN_CELL:VS(this,e);break;case $.IN_SELECT:US(this,e);break;case $.IN_SELECT_IN_TABLE:GS(this,e);break;case $.IN_TEMPLATE:qS(this,e);break;case $.AFTER_BODY:XS(this,e);break;case $.IN_FRAMESET:$S(this,e);break;case $.AFTER_FRAMESET:tC(this,e);break;case $.AFTER_AFTER_BODY:rC(this,e)}}onEof(e){switch(this.insertionMode){case $.INITIAL:tx(this,e);break;case $.BEFORE_HTML:ix(this,e);break;case $.BEFORE_HEAD:sx(this,e);break;case $.IN_HEAD:dx(this,e);break;case $.IN_HEAD_NO_SCRIPT:mx(this,e);break;case $.AFTER_HEAD:_x(this,e);break;case $.IN_BODY:case $.IN_TABLE:case $.IN_CAPTION:case $.IN_COLUMN_GROUP:case $.IN_TABLE_BODY:case $.IN_ROW:case $.IN_CELL:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:fS(this,e);break;case $.TEXT:mS(this,e);break;case $.IN_TABLE_TEXT:kS(this,e);break;case $.IN_TEMPLATE:JS(this,e);break;case $.AFTER_BODY:case $.IN_FRAMESET:case $.AFTER_FRAMESET:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:$b(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===J.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case $.IN_HEAD:case $.IN_HEAD_NO_SCRIPT:case $.AFTER_HEAD:case $.TEXT:case $.IN_COLUMN_GROUP:case $.IN_SELECT:case $.IN_SELECT_IN_TABLE:case $.IN_FRAMESET:case $.AFTER_FRAMESET:this._insertCharacters(e);break;case $.IN_BODY:case $.IN_CAPTION:case $.IN_CELL:case $.IN_TEMPLATE:case $.AFTER_BODY:case $.AFTER_AFTER_BODY:case $.AFTER_AFTER_FRAMESET:yx(this,e);break;case $.IN_TABLE:case $.IN_TABLE_BODY:case $.IN_ROW:hS(this,e);break;case $.IN_TABLE_TEXT:DS(this,e)}}};function Ub(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):uS(e,t),n}function Wb(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Gb(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Rb;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Kb(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Kb(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function qb(e,t,n){let r=My(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===Z.TEMPLATE&&i===Oy.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Jb(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Yb(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function ex(e,t){e._setDocumentType(t);let n=t.forceQuirks?Ay.QUIRKS:bb(t);yb(t)||e._err(t,Y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=$.BEFORE_HTML}function tx(e,t){e._err(t,Y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Ay.QUIRKS),e.insertionMode=$.BEFORE_HTML,e._processToken(t)}function nx(e,t){t.tagID===Z.HTML?(e._insertElement(t,Oy.HTML),e.insertionMode=$.BEFORE_HEAD):ix(e,t)}function rx(e,t){let n=t.tagID;(n===Z.HTML||n===Z.HEAD||n===Z.BODY||n===Z.BR)&&ix(e,t)}function ix(e,t){e._insertFakeRootElement(),e.insertionMode=$.BEFORE_HEAD,e._processToken(t)}function ax(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.HEAD:e._insertElement(t,Oy.HTML),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD;break;default:sx(e,t)}}function ox(e,t){let n=t.tagID;n===Z.HEAD||n===Z.BODY||n===Z.HTML||n===Z.BR?sx(e,t):e._err(t,Y.endTagWithoutMatchingOpenElement)}function sx(e,t){e._insertFakeElement(X.HEAD,Z.HEAD),e.headElement=e.openElements.current,e.insertionMode=$.IN_HEAD,e._processToken(t)}function cx(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.BASE:case Z.BASEFONT:case Z.BGSOUND:case Z.LINK:case Z.META:e._appendElement(t,Oy.HTML),t.ackSelfClosing=!0;break;case Z.TITLE:e._switchToTextParsing(t,Iy.RCDATA);break;case Z.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,Iy.RAWTEXT):(e._insertElement(t,Oy.HTML),e.insertionMode=$.IN_HEAD_NO_SCRIPT);break;case Z.NOFRAMES:case Z.STYLE:e._switchToTextParsing(t,Iy.RAWTEXT);break;case Z.SCRIPT:e._switchToTextParsing(t,Iy.SCRIPT_DATA);break;case Z.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=$.IN_TEMPLATE,e.tmplInsertionModeStack.unshift($.IN_TEMPLATE);break;case Z.HEAD:e._err(t,Y.misplacedStartTagForHeadElement);break;default:dx(e,t)}}function lx(e,t){switch(t.tagID){case Z.HEAD:e.openElements.pop(),e.insertionMode=$.AFTER_HEAD;break;case Z.BODY:case Z.BR:case Z.HTML:dx(e,t);break;case Z.TEMPLATE:ux(e,t);break;default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function ux(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==Z.TEMPLATE&&e._err(t,Y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(Z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Y.endTagWithoutMatchingOpenElement)}function dx(e,t){e.openElements.pop(),e.insertionMode=$.AFTER_HEAD,e._processToken(t)}function fx(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.BASEFONT:case Z.BGSOUND:case Z.HEAD:case Z.LINK:case Z.META:case Z.NOFRAMES:case Z.STYLE:cx(e,t);break;case Z.NOSCRIPT:e._err(t,Y.nestedNoscriptInHead);break;default:mx(e,t)}}function px(e,t){switch(t.tagID){case Z.NOSCRIPT:e.openElements.pop(),e.insertionMode=$.IN_HEAD;break;case Z.BR:mx(e,t);break;default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function mx(e,t){let n=t.type===fy.EOF?Y.openElementsLeftAfterEof:Y.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=$.IN_HEAD,e._processToken(t)}function hx(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.BODY:e._insertElement(t,Oy.HTML),e.framesetOk=!1,e.insertionMode=$.IN_BODY;break;case Z.FRAMESET:e._insertElement(t,Oy.HTML),e.insertionMode=$.IN_FRAMESET;break;case Z.BASE:case Z.BASEFONT:case Z.BGSOUND:case Z.LINK:case Z.META:case Z.NOFRAMES:case Z.SCRIPT:case Z.STYLE:case Z.TEMPLATE:case Z.TITLE:e._err(t,Y.abandonedHeadElementChild),e.openElements.push(e.headElement,Z.HEAD),cx(e,t),e.openElements.remove(e.headElement);break;case Z.HEAD:e._err(t,Y.misplacedStartTagForHeadElement);break;default:_x(e,t)}}function gx(e,t){switch(t.tagID){case Z.BODY:case Z.HTML:case Z.BR:_x(e,t);break;case Z.TEMPLATE:ux(e,t);break;default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function _x(e,t){e._insertFakeElement(X.BODY,Z.BODY),e.insertionMode=$.IN_BODY,vx(e,t)}function vx(e,t){switch(t.type){case fy.CHARACTER:bx(e,t);break;case fy.WHITESPACE_CHARACTER:yx(e,t);break;case fy.COMMENT:Xb(e,t);break;case fy.START_TAG:$x(e,t);break;case fy.END_TAG:dS(e,t);break;case fy.EOF:fS(e,t)}}function yx(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function bx(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function xx(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Sx(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Cx(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Oy.HTML),e.insertionMode=$.IN_FRAMESET)}function wx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Oy.HTML)}function Tx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Fy.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,Oy.HTML)}function Ex(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Oy.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Dx(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Oy.HTML),n||(e.formElement=e.openElements.current))}function Ox(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===Z.LI&&r===Z.LI||(n===Z.DD||n===Z.DT)&&(r===Z.DD||r===Z.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==Z.ADDRESS&&r!==Z.DIV&&r!==Z.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Oy.HTML)}function kx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Oy.HTML),e.tokenizer.state=Iy.PLAINTEXT}function Ax(e,t){e.openElements.hasInScope(Z.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Z.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML),e.framesetOk=!1}function jx(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Yb(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Mx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Nx(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Z.NOBR)&&(Yb(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Oy.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Px(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Fx(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ay.QUIRKS&&e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._insertElement(t,Oy.HTML),e.framesetOk=!1,e.insertionMode=$.IN_TABLE}function Ix(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Oy.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Lx(e){let t=py(e,ky.TYPE);return t!=null&&t.toLowerCase()===Ib}function Rx(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Oy.HTML),Lx(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function zx(e,t){e._appendElement(t,Oy.HTML),t.ackSelfClosing=!0}function Bx(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._appendElement(t,Oy.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Vx(e,t){t.tagName=X.IMG,t.tagID=Z.IMG,Ix(e,t)}function Hx(e,t){e._insertElement(t,Oy.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Iy.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=$.TEXT}function Ux(e,t){e.openElements.hasInButtonScope(Z.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Iy.RAWTEXT)}function Wx(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Iy.RAWTEXT)}function Gx(e,t){e._switchToTextParsing(t,Iy.RAWTEXT)}function Kx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===$.IN_TABLE||e.insertionMode===$.IN_CAPTION||e.insertionMode===$.IN_TABLE_BODY||e.insertionMode===$.IN_ROW||e.insertionMode===$.IN_CELL?$.IN_SELECT_IN_TABLE:$.IN_SELECT}function qx(e,t){e.openElements.currentTagId===Z.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML)}function Jx(e,t){e.openElements.hasInScope(Z.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Oy.HTML)}function Yx(e,t){e.openElements.hasInScope(Z.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Z.RTC),e._insertElement(t,Oy.HTML)}function Xx(e,t){e._reconstructActiveFormattingElements(),kb(t),jb(t),t.selfClosing?e._appendElement(t,Oy.MATHML):e._insertElement(t,Oy.MATHML),t.ackSelfClosing=!0}function Zx(e,t){e._reconstructActiveFormattingElements(),Ab(t),jb(t),t.selfClosing?e._appendElement(t,Oy.SVG):e._insertElement(t,Oy.SVG),t.ackSelfClosing=!0}function Qx(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Oy.HTML)}function $x(e,t){switch(t.tagID){case Z.I:case Z.S:case Z.B:case Z.U:case Z.EM:case Z.TT:case Z.BIG:case Z.CODE:case Z.FONT:case Z.SMALL:case Z.STRIKE:case Z.STRONG:Mx(e,t);break;case Z.A:jx(e,t);break;case Z.H1:case Z.H2:case Z.H3:case Z.H4:case Z.H5:case Z.H6:Tx(e,t);break;case Z.P:case Z.DL:case Z.OL:case Z.UL:case Z.DIV:case Z.DIR:case Z.NAV:case Z.MAIN:case Z.MENU:case Z.ASIDE:case Z.CENTER:case Z.FIGURE:case Z.FOOTER:case Z.HEADER:case Z.HGROUP:case Z.DIALOG:case Z.DETAILS:case Z.ADDRESS:case Z.ARTICLE:case Z.SEARCH:case Z.SECTION:case Z.SUMMARY:case Z.FIELDSET:case Z.BLOCKQUOTE:case Z.FIGCAPTION:wx(e,t);break;case Z.LI:case Z.DD:case Z.DT:Ox(e,t);break;case Z.BR:case Z.IMG:case Z.WBR:case Z.AREA:case Z.EMBED:case Z.KEYGEN:Ix(e,t);break;case Z.HR:Bx(e,t);break;case Z.RB:case Z.RTC:Jx(e,t);break;case Z.RT:case Z.RP:Yx(e,t);break;case Z.PRE:case Z.LISTING:Ex(e,t);break;case Z.XMP:Ux(e,t);break;case Z.SVG:Zx(e,t);break;case Z.HTML:xx(e,t);break;case Z.BASE:case Z.LINK:case Z.META:case Z.STYLE:case Z.TITLE:case Z.SCRIPT:case Z.BGSOUND:case Z.BASEFONT:case Z.TEMPLATE:cx(e,t);break;case Z.BODY:Sx(e,t);break;case Z.FORM:Dx(e,t);break;case Z.NOBR:Nx(e,t);break;case Z.MATH:Xx(e,t);break;case Z.TABLE:Fx(e,t);break;case Z.INPUT:Rx(e,t);break;case Z.PARAM:case Z.TRACK:case Z.SOURCE:zx(e,t);break;case Z.IMAGE:Vx(e,t);break;case Z.BUTTON:Ax(e,t);break;case Z.APPLET:case Z.OBJECT:case Z.MARQUEE:Px(e,t);break;case Z.IFRAME:Wx(e,t);break;case Z.SELECT:Kx(e,t);break;case Z.OPTION:case Z.OPTGROUP:qx(e,t);break;case Z.NOEMBED:case Z.NOFRAMES:Gx(e,t);break;case Z.FRAMESET:Cx(e,t);break;case Z.TEXTAREA:Hx(e,t);break;case Z.NOSCRIPT:e.options.scriptingEnabled?Gx(e,t):Qx(e,t);break;case Z.PLAINTEXT:kx(e,t);break;case Z.COL:case Z.TH:case Z.TD:case Z.TR:case Z.HEAD:case Z.FRAME:case Z.TBODY:case Z.TFOOT:case Z.THEAD:case Z.CAPTION:case Z.COLGROUP:break;default:Qx(e,t)}}function eS(e,t){if(e.openElements.hasInScope(Z.BODY)&&(e.insertionMode=$.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function tS(e,t){e.openElements.hasInScope(Z.BODY)&&(e.insertionMode=$.AFTER_BODY,XS(e,t))}function nS(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function rS(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Z.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Z.FORM):n&&e.openElements.remove(n))}function iS(e){e.openElements.hasInButtonScope(Z.P)||e._insertFakeElement(X.P,Z.P),e._closePElement()}function aS(e){e.openElements.hasInListItemScope(Z.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Z.LI),e.openElements.popUntilTagNamePopped(Z.LI))}function oS(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function sS(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function cS(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function lS(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,Z.BR),e.openElements.pop(),e.framesetOk=!1}function uS(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==Z.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function dS(e,t){switch(t.tagID){case Z.A:case Z.B:case Z.I:case Z.S:case Z.U:case Z.EM:case Z.TT:case Z.BIG:case Z.CODE:case Z.FONT:case Z.NOBR:case Z.SMALL:case Z.STRIKE:case Z.STRONG:Yb(e,t);break;case Z.P:iS(e);break;case Z.DL:case Z.UL:case Z.OL:case Z.DIR:case Z.DIV:case Z.NAV:case Z.PRE:case Z.MAIN:case Z.MENU:case Z.ASIDE:case Z.BUTTON:case Z.CENTER:case Z.FIGURE:case Z.FOOTER:case Z.HEADER:case Z.HGROUP:case Z.DIALOG:case Z.ADDRESS:case Z.ARTICLE:case Z.DETAILS:case Z.SEARCH:case Z.SECTION:case Z.SUMMARY:case Z.LISTING:case Z.FIELDSET:case Z.BLOCKQUOTE:case Z.FIGCAPTION:nS(e,t);break;case Z.LI:aS(e);break;case Z.DD:case Z.DT:oS(e,t);break;case Z.H1:case Z.H2:case Z.H3:case Z.H4:case Z.H5:case Z.H6:sS(e);break;case Z.BR:lS(e);break;case Z.BODY:eS(e,t);break;case Z.HTML:tS(e,t);break;case Z.FORM:rS(e);break;case Z.APPLET:case Z.OBJECT:case Z.MARQUEE:cS(e,t);break;case Z.TEMPLATE:ux(e,t);break;default:uS(e,t)}}function fS(e,t){e.tmplInsertionModeStack.length>0?JS(e,t):$b(e,t)}function pS(e,t){var n;t.tagID===Z.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function mS(e,t){e._err(t,Y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function hS(e,t){if(e.openElements.currentTagId!==void 0&&Bb.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=$.IN_TABLE_TEXT,t.type){case fy.CHARACTER:OS(e,t);break;case fy.WHITESPACE_CHARACTER:DS(e,t)}else ES(e,t)}function gS(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Oy.HTML),e.insertionMode=$.IN_CAPTION}function _S(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Oy.HTML),e.insertionMode=$.IN_COLUMN_GROUP}function vS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,Z.COLGROUP),e.insertionMode=$.IN_COLUMN_GROUP,NS(e,t)}function yS(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Oy.HTML),e.insertionMode=$.IN_TABLE_BODY}function bS(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,Z.TBODY),e.insertionMode=$.IN_TABLE_BODY,IS(e,t)}function xS(e,t){e.openElements.hasInTableScope(Z.TABLE)&&(e.openElements.popUntilTagNamePopped(Z.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function SS(e,t){Lx(t)?e._appendElement(t,Oy.HTML):ES(e,t),t.ackSelfClosing=!0}function CS(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,Oy.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function wS(e,t){switch(t.tagID){case Z.TD:case Z.TH:case Z.TR:bS(e,t);break;case Z.STYLE:case Z.SCRIPT:case Z.TEMPLATE:cx(e,t);break;case Z.COL:vS(e,t);break;case Z.FORM:CS(e,t);break;case Z.TABLE:xS(e,t);break;case Z.TBODY:case Z.TFOOT:case Z.THEAD:yS(e,t);break;case Z.INPUT:SS(e,t);break;case Z.CAPTION:gS(e,t);break;case Z.COLGROUP:_S(e,t);break;default:ES(e,t)}}function TS(e,t){switch(t.tagID){case Z.TABLE:e.openElements.hasInTableScope(Z.TABLE)&&(e.openElements.popUntilTagNamePopped(Z.TABLE),e._resetInsertionMode());break;case Z.TEMPLATE:ux(e,t);break;case Z.BODY:case Z.CAPTION:case Z.COL:case Z.COLGROUP:case Z.HTML:case Z.TBODY:case Z.TD:case Z.TFOOT:case Z.TH:case Z.THEAD:case Z.TR:break;default:ES(e,t)}}function ES(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,vx(e,t),e.fosterParentingEnabled=n}function DS(e,t){e.pendingCharacterTokens.push(t)}function OS(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function kS(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===Z.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===Z.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===Z.OPTGROUP&&e.openElements.pop();break;case Z.OPTION:e.openElements.currentTagId===Z.OPTION&&e.openElements.pop();break;case Z.SELECT:e.openElements.hasInSelectScope(Z.SELECT)&&(e.openElements.popUntilTagNamePopped(Z.SELECT),e._resetInsertionMode());break;case Z.TEMPLATE:ux(e,t)}}function WS(e,t){let n=t.tagID;n===Z.CAPTION||n===Z.TABLE||n===Z.TBODY||n===Z.TFOOT||n===Z.THEAD||n===Z.TR||n===Z.TD||n===Z.TH?(e.openElements.popUntilTagNamePopped(Z.SELECT),e._resetInsertionMode(),e._processStartTag(t)):HS(e,t)}function GS(e,t){let n=t.tagID;n===Z.CAPTION||n===Z.TABLE||n===Z.TBODY||n===Z.TFOOT||n===Z.THEAD||n===Z.TR||n===Z.TD||n===Z.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(Z.SELECT),e._resetInsertionMode(),e.onEndTag(t)):US(e,t)}function KS(e,t){switch(t.tagID){case Z.BASE:case Z.BASEFONT:case Z.BGSOUND:case Z.LINK:case Z.META:case Z.NOFRAMES:case Z.SCRIPT:case Z.STYLE:case Z.TEMPLATE:case Z.TITLE:cx(e,t);break;case Z.CAPTION:case Z.COLGROUP:case Z.TBODY:case Z.TFOOT:case Z.THEAD:e.tmplInsertionModeStack[0]=$.IN_TABLE,e.insertionMode=$.IN_TABLE,wS(e,t);break;case Z.COL:e.tmplInsertionModeStack[0]=$.IN_COLUMN_GROUP,e.insertionMode=$.IN_COLUMN_GROUP,NS(e,t);break;case Z.TR:e.tmplInsertionModeStack[0]=$.IN_TABLE_BODY,e.insertionMode=$.IN_TABLE_BODY,IS(e,t);break;case Z.TD:case Z.TH:e.tmplInsertionModeStack[0]=$.IN_ROW,e.insertionMode=$.IN_ROW,RS(e,t);break;default:e.tmplInsertionModeStack[0]=$.IN_BODY,e.insertionMode=$.IN_BODY,$x(e,t)}}function qS(e,t){t.tagID===Z.TEMPLATE&&ux(e,t)}function JS(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(Z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):$b(e,t)}function YS(e,t){t.tagID===Z.HTML?$x(e,t):ZS(e,t)}function XS(e,t){if(t.tagID===Z.HTML){if(e.fragmentContext||(e.insertionMode=$.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===Z.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else ZS(e,t)}function ZS(e,t){e.insertionMode=$.IN_BODY,vx(e,t)}function QS(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.FRAMESET:e._insertElement(t,Oy.HTML);break;case Z.FRAME:e._appendElement(t,Oy.HTML),t.ackSelfClosing=!0;break;case Z.NOFRAMES:cx(e,t)}}function $S(e,t){t.tagID===Z.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==Z.FRAMESET&&(e.insertionMode=$.AFTER_FRAMESET))}function eC(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.NOFRAMES:cx(e,t)}}function tC(e,t){t.tagID===Z.HTML&&(e.insertionMode=$.AFTER_AFTER_FRAMESET)}function nC(e,t){t.tagID===Z.HTML?$x(e,t):rC(e,t)}function rC(e,t){e.insertionMode=$.IN_BODY,vx(e,t)}function iC(e,t){switch(t.tagID){case Z.HTML:$x(e,t);break;case Z.NOFRAMES:cx(e,t)}}function aC(e,t){t.chars=`�`,e._insertCharacters(t)}function oC(e,t){e._insertCharacters(t),e.framesetOk=!1}function sC(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Oy.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function cC(e,t){if(Ob(t))sC(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Oy.MATHML?kb(t):r===Oy.SVG&&(Mb(t),Ab(t)),jb(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function lC(e,t){if(t.tagID===Z.P||t.tagID===Z.BR){sC(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Oy.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;var uC=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,dC=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),fC={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function pC(e,t){let n=DC(e),r=Hv(`type`,{handlers:{root:hC,element:gC,text:_C,comment:bC,doctype:vC,raw:xC},unknown:SC}),i={parser:n?new Hb(fC):Hb.getFragmentParser(void 0,fC),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),CC(i,Sf());let a=Nv(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&p_(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function mC(e,t){let n=-1;if(e)for(;++n4&&(t.parser.tokenizer.state=0);let n={type:fy.CHARACTER,chars:e.value,location:OC(e)};CC(t,Sf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function vC(e,t){let n={type:fy.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:OC(e)};CC(t,Sf(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function yC(e,t){t.stitches=!0;let n=kC(e);`children`in e&&`children`in n&&(n.children=pC({type:`root`,children:e.children},t.options).children),bC({type:`comment`,value:{stitch:n}},t)}function bC(e,t){let n=e.value,r={type:fy.COMMENT,data:n,location:OC(e)};CC(t,Sf(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function xC(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,wC(t,Sf(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(uC,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function SC(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))yC(n,t);else{let e=``;throw dC.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function CC(e,t){wC(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Iy.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function wC(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function TC(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Iy.PLAINTEXT)return;CC(t,Sf(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:Av.html;i===Av.html&&n===`svg`&&(i=Av.svg);let a=Kv({...e,children:[]},{space:i===Av.svg?`svg`:`html`}),o={type:fy.START_TAG,tagName:n,tagID:My(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:OC(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function EC(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ny.includes(n)||t.parser.tokenizer.state===Iy.PLAINTEXT)return;CC(t,xf(e));let r={type:fy.END_TAG,tagName:n,tagID:My(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:OC(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Iy.RCDATA||t.parser.tokenizer.state===Iy.RAWTEXT||t.parser.tokenizer.state===Iy.SCRIPT_DATA)&&(t.parser.tokenizer.state=Iy.DATA)}function DC(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function OC(e){let t=Sf(e)||{line:void 0,column:void 0,offset:void 0},n=xf(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function kC(e){return`children`in e?Qg({...e,children:[]}):Qg(e)}function AC(e){return function(t,n){return pC(t,{...e,file:n})}}var jC=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],MC={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...jC,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...jC],h2:[[`className`,`sr-only`]],img:[...jC,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...jC,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...jC],table:[...jC],ul:[...jC,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},NC={}.hasOwnProperty;function PC(e,t){let n={type:`root`,children:[]},r=FC({schema:t?{...MC,...t}:MC,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function FC(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return IC(e,n);case`doctype`:return LC(e,n);case`element`:return RC(e,n);case`root`:return zC(e,n);case`text`:return BC(e,n)}}}function IC(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return qC(r,t),r}}function LC(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return qC(e,t),e}}function RC(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=VC(e,t.children),i=HC(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&NC.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r1){let e=!1,n=0;for(;++n-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l4&&t.slice(0,4).toLowerCase()===`data`)return n}function YC(e){return function(t){return PC(t,e)}}function XC(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function ZC(e,t,n){let r=n_((n||{}).ignore||[]),i=QC(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=iw(e,`(`),a=iw(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function bw(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||jp(n)||Ap(n))&&(!t||n!==47)}Aw.peek=kw;function xw(){this.buffer()}function Sw(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Cw(){this.buffer()}function ww(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Tw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ew(e){this.exit(e)}function Dw(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yp(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ow(e){this.exit(e)}function kw(){return`[`}function Aw(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function jw(){return{enter:{gfmFootnoteCallString:xw,gfmFootnoteCall:Sw,gfmFootnoteDefinitionLabelString:Cw,gfmFootnoteDefinition:ww},exit:{gfmFootnoteCallString:Tw,gfmFootnoteCall:Ew,gfmFootnoteDefinitionLabelString:Dw,gfmFootnoteDefinition:Ow}}}function Mw(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Aw},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Pw:Nw))),s(),o}}function Nw(e,t,n){return t===0?e:Pw(e,t,n)}function Pw(e,t,n){return(n?``:` `)+e}var Fw=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Bw.peek=Vw;function Iw(){return{canContainEols:[`delete`],enter:{strikethrough:Rw},exit:{strikethrough:zw}}}function Lw(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Fw}],handlers:{delete:Bw}}}function Rw(e){this.enter({type:`delete`,children:[]},e)}function zw(e){this.exit(e)}function Bw(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Vw(){return`~`}function Hw(e){return e.length}function Uw(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Hw,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),qw);return i(),o}function qw(e,t,n){return`>`+(n?``:` `)+e}function Jw(e,t){return Yw(e,t.inConstruct,!0)&&!Yw(e,t.notInConstruct,!1)}function Yw(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++ro&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Qw(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function $w(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function eT(e,t,n,r){let i=$w(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Qw(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,tT);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Zw(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:` `,encode:["`"],...s.current()})),t()}return u+=s.move(` `),a&&(u+=s.move(a+` -`)),u+=s.move(c),l(),u}function Xw(e,t,n){return(n?``:` `)+e}function Zw(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Qw(e,t,n,r){let i=Zw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` -`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function $w(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function eT(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function tT(e,t,n){let r=Ip(e),i=Ip(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}nT.peek=rT;function nT(e,t,n,r){let i=$w(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=tT(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=eT(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=tT(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+eT(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function rT(e,t,n){return n.options.emphasis||`*`}function iT(e,t){let n=!1;return c_(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&tp(e)&&(t.options.setext||n))}function aT(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(iT(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` +`)),u+=s.move(c),l(),u}function tT(e,t,n){return(n?``:` `)+e}function nT(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function rT(e,t,n,r){let i=nT(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:` +`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function iT(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function aT(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function oT(e,t,n){let r=Vp(e),i=Vp(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sT.peek=cT;function sT(e,t,n,r){let i=iT(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=oT(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=aT(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=oT(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+aT(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function cT(e,t,n){return n.options.emphasis||`*`}function lT(e,t){let n=!1;return p_(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&op(e)&&(t.options.setext||n))}function uT(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(lT(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:` `,after:` `});return r(),t(),o+` `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(` `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:` -`,...a.current()});return/^[\t ]/.test(l)&&(l=eT(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}oT.peek=sT;function oT(e){return e.value||``}function sT(){return`<`}cT.peek=lT;function cT(e,t,n,r){let i=Zw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function lT(){return`!`}uT.peek=dT;function uT(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function dT(){return`!`}fT.peek=pT;function fT(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}hT.peek=gT;function hT(e,t,n,r){let i=Zw(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(mT(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function gT(e,t,n){return mT(e,n)?`<`:`[`}_T.peek=vT;function _T(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function vT(){return`[`}function yT(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function bT(e){let t=yT(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function xT(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ST(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function CT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?xT(n):yT(n),s=e.ordered?o===`.`?`)`:`.`:bT(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),ST(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function ET(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var DT=Zg([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function OT(e,t,n,r){return(e.children.some(function(e){return DT(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function kT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}AT.peek=jT;function AT(e,t,n,r){let i=kT(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=tT(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=eT(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=tT(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+eT(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function jT(e,t,n){return n.options.strong||`*`}function MT(e,t,n,r){return n.safe(e.value,r)}function NT(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function PT(e,t,n){let r=(ST(n)+(n.options.ruleSpaces?` `:``)).repeat(NT(n));return n.options.ruleSpaces?r.slice(0,-1):r}var FT={blockquote:Vw,break:Gw,code:Yw,definition:Qw,emphasis:nT,hardBreak:Gw,heading:aT,html:oT,image:cT,imageReference:uT,inlineCode:fT,link:hT,linkReference:_T,list:CT,listItem:TT,paragraph:ET,root:OT,strong:AT,text:MT,thematicBreak:PT};function IT(){return{enter:{table:LT,tableData:VT,tableHeader:VT,tableRow:zT},exit:{codeText:HT,table:RT,tableData:BT,tableHeader:BT,tableRow:BT}}}function LT(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function RT(e){this.exit(e),this.data.inTable=void 0}function zT(e){this.enter({type:`tableRow`,children:[]},e)}function BT(e){this.exit(e)}function VT(e){this.enter({type:`tableCell`,children:[]},e)}function HT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,UT));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function UT(e,t){return t===`|`?t:e}function WT(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` +`,...a.current()});return/^[\t ]/.test(l)&&(l=aT(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}dT.peek=fT;function dT(e){return e.value||``}function fT(){return`<`}pT.peek=mT;function pT(e,t,n,r){let i=nT(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function mT(){return`!`}hT.peek=gT;function hT(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function gT(){return`!`}_T.peek=vT;function _T(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}bT.peek=xT;function bT(e,t,n,r){let i=nT(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(yT(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function xT(e,t,n){return yT(e,n)?`<`:`[`}ST.peek=CT;function ST(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function CT(){return`[`}function wT(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function TT(e){let t=wT(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function ET(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function DT(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function OT(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?ET(n):wT(n),s=e.ordered?o===`.`?`)`:`.`:TT(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),DT(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function jT(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var MT=n_([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function NT(e,t,n,r){return(e.children.some(function(e){return MT(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function PT(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}FT.peek=IT;function FT(e,t,n,r){let i=PT(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=oT(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=aT(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=oT(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+aT(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function IT(e,t,n){return n.options.strong||`*`}function LT(e,t,n,r){return n.safe(e.value,r)}function RT(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zT(e,t,n){let r=(DT(n)+(n.options.ruleSpaces?` `:``)).repeat(RT(n));return n.options.ruleSpaces?r.slice(0,-1):r}var BT={blockquote:Kw,break:Xw,code:eT,definition:rT,emphasis:sT,hardBreak:Xw,heading:uT,html:dT,image:pT,imageReference:hT,inlineCode:_T,link:bT,linkReference:ST,list:OT,listItem:AT,paragraph:jT,root:NT,strong:FT,text:LT,thematicBreak:zT};function VT(){return{enter:{table:HT,tableData:KT,tableHeader:KT,tableRow:WT},exit:{codeText:qT,table:UT,tableData:GT,tableHeader:GT,tableRow:GT}}}function HT(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function UT(e){this.exit(e),this.data.inTable=void 0}function WT(e){this.enter({type:`tableRow`,children:[]},e)}function GT(e){this.exit(e)}function KT(e){this.enter({type:`tableCell`,children:[]},e)}function qT(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,JT));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function JT(e,t){return t===`|`?t:e}function YT(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` -`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Rw(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var SE={tokenize:AE,partial:!0};function CE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:DE,continuation:{tokenize:OE},exit:kE}},text:{91:{name:`gfmFootnoteCall`,tokenize:EE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:wE,resolveTo:TE}}}}function wE(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=mp(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function TE(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function EE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Cp(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(mp(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Cp(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function DE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Cp(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=mp(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Cp(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),kp(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function OE(e,t,n){return e.check(Wp,t,e.attempt(SE,t,n))}function kE(e){e.exit(`gfmFootnoteDefinition`)}function AE(e,t,n){let r=this;return kp(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function jE(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Ip(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var ME=class{constructor(){this.map=[]}add(e,t,n){NE(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function NE(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Sp(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):wp(t)?kp(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Cp(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,wp(t)?kp(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return wp(t)?kp(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Sp(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return wp(t)?kp(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Sp(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Sp(n)?(e.exit(`tableRow`),t(n)):wp(n)?kp(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Cp(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function LE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new ME;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},BE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function zE(e,t,n,r,i){let a=[],o=BE(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function BE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var VE={name:`tasklistCheck`,tokenize:UE};function HE(){return{text:{91:VE}}}function UE(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Cp(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Sp(r)?t(r):wp(r)?e.check({tokenize:WE},t,n)(r):n(r)}}function WE(e,t,n){return kp(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function GE(e){return up([sE(),CE(),jE(e),FE(),HE()])}var KE={};function qE(e){let t=this,n=e||KE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(GE(n)),a.push(XT()),o.push(ZT(n))}var JE=(0,K.createContext)(null),YE=Promise.resolve();function XE({src:e,alt:t}){let n=(0,K.useContext)(JE),r=(0,K.useMemo)(()=>new de,[]),[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(!1),c=n?.parent;return(0,K.useEffect)(()=>{if(!c||!n?.sessionId)return;let t=n.sessionId,i=new AbortController,o,l;return YE=YE.then(async()=>{try{if(i.signal.aborted||(o=(await r.resolveArtifact(t,e,c,i.signal)).handle,i.signal.aborted))return;let n=await r.artifactPreview(t,o,i.signal),s=await r.downloadArtifact(n.artifact,i.signal),u=gd(new Uint8Array(await s.slice(0,12).arrayBuffer()));if(!u)throw Error(`Unsupported image`);i.signal.aborted||(l=URL.createObjectURL(new Blob([s],{type:u})),a(l))}catch{i.signal.aborted||s(!0)}finally{o&&r.releaseArtifact(t,o).catch(()=>void 0)}}),()=>{i.abort(),l&&URL.revokeObjectURL(l)}},[r,e,c,n?.sessionId]),i?(0,q.jsx)(`img`,{className:`file-inline-image`,src:i,alt:t}):(0,q.jsx)(`span`,{children:o?`[${t||e}]`:t})}var ZE=new Map;async function QE(e,t){if(!e||e.length>1e5||!t)return``;let n=`${t}\0${e}`,r=ZE.get(n);if(r!==void 0)return r;let{default:i}=await Ee(async()=>{let{default:e}=await import(`./app-common.js`);return{default:e}},__vite__mapDeps([3,1]));if(!i.getLanguage(t))return``;let a=Me.sanitize(i.highlight(e,{language:t,ignoreIllegals:!0}).value,{ALLOWED_TAGS:[`span`],ALLOWED_ATTR:[`class`]});return ZE.set(n,a),ZE.size>20&&ZE.delete(ZE.keys().next().value),a}var $E=(0,K.createContext)(!1),eD=(0,K.lazy)(()=>Ee(()=>import(`./app-MermaidPreview.js`),__vite__mapDeps([4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])).catch(()=>({default:oD})));function tD(){return e=>{let t=e=>e.type===`text`?e.value:e.type===`element`&&![`ul`,`ol`].includes(e.tagName)?e.children.map(t).join(``):``,n=e=>{if(e.type===`element`&&(e.tagName===`li`||e.tagName===`p`)){let n=t(e).trim();for(let t of e.children)t.type===`element`&&t.tagName===`input`&&t.properties.type===`checkbox`&&n&&(t.properties.ariaLabel=n)}for(let t of e.children)t.type===`element`&&n(t)};n(e)}}function nD(){return e=>{let t=e=>{if(e.type===`element`){let t=e.tagName===`a`?`href`:e.tagName===`img`?`src`:void 0,n=t?e.properties[t]:void 0,r=typeof n==`string`?n.replace(/%5c/giu,`\\`):n;t&&typeof r==`string`&&/^[a-z]:[\\/]/iu.test(r)&&!/[\x00-\x1f\x7f]/u.test(r)&&(e.data={...e.data,openpiWindowsPath:r},e.properties[t]=`./`)}for(let n of e.children)n.type===`element`&&t(n)};t(e)}}function rD(e){let t=e?.data?.openpiWindowsPath;return typeof t==`string`?t:void 0}function iD(e){if(!e.trim())return``;try{let t=new URL(e,document.baseURI);return[`http:`,`https:`,`mailto:`,`tel:`].includes(t.protocol)?t.href:``}catch{return``}}function aD({children:e,node:t,...n}){let{t:r}=W(),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(!1),c=(0,K.useContext)($E),l=(0,K.useId)(),u=(0,K.useRef)(null),[d,f]=(0,K.useState)({source:``,language:``,html:``}),[p,m]=(0,K.useState)(`idle`),h=(0,K.useRef)(0),g=(0,K.useRef)(void 0),_=(0,K.useRef)(null);(0,K.useEffect)(()=>()=>{h.current+=1,window.clearTimeout(g.current)},[]);let v=p===`copied`,y=(0,K.isValidElement)(e)?/(?:^|\s)language-([\w+-]+)/u.exec(e.props.className??``)?.[1]:void 0,b=(0,K.isValidElement)(e)&&typeof e.props.children==`string`?e.props.children:``,x=b.replace(/\n$/u,``).split(` -`).length,S=x>10,C=!c&&d.source===b&&d.language===y?d.html:``;return(0,K.useEffect)(()=>{if(c||!y||!b)return;let e=!1;return QE(b,y).then(t=>{e||f({source:b,language:y,html:t})}).catch(()=>void 0),()=>{e=!0}},[b,y,c]),(0,q.jsxs)(`div`,{className:`markdown-code-block`,"data-wrap":i||void 0,"data-collapsible":S||void 0,"data-expanded":o||void 0,children:[(0,q.jsxs)(`div`,{className:`markdown-code-toolbar`,children:[(0,q.jsx)(`span`,{className:`markdown-code-language`,children:y??r(`codeBlock`)}),p===`failed`&&(0,q.jsx)(`span`,{role:`status`,children:r(`copyCodeFailed`)}),(0,q.jsx)(V,{content:r(`wrapCode`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`wrapCode`),"aria-pressed":i,onClick:()=>a(e=>!e),children:(0,q.jsx)(Hc,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:r(v?`copiedCode`:`copyCode`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(v?`copiedCode`:`copyCode`),"data-copied":v||void 0,disabled:p===`copying`,onClick:()=>{let e=++h.current;window.clearTimeout(g.current),m(`copying`),td(_.current?.textContent??``).then(t=>{e===h.current&&(m(t?`copied`:`failed`),t&&(g.current=window.setTimeout(()=>m(`idle`),1200)))})},children:v?(0,q.jsx)(rs,{"aria-hidden":`true`}):(0,q.jsx)(_s,{"aria-hidden":`true`})})})]}),(0,q.jsx)(`div`,{className:`markdown-code-body`,children:(0,q.jsx)(`section`,{ref:u,id:l,className:`markdown-code-scroll`,"aria-label":r(`codeBlock`),tabIndex:0,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.currentTarget;t.scrollWidth<=t.clientWidth||(e.preventDefault(),t.scrollLeft+=e.key===`ArrowRight`?40:-40)},children:(0,q.jsx)(`pre`,{ref:_,...n,children:C?(0,q.jsx)(`code`,{className:`language-${y}`,dangerouslySetInnerHTML:{__html:C}}):e})})}),S&&(0,q.jsxs)(`button`,{className:`markdown-code-expand`,type:`button`,"aria-expanded":o,"aria-controls":l,onClick:()=>{o&&u.current&&(u.current.scrollTop=0),s(e=>!e)},children:[o?r(`collapseCode`):r(`expandCode`,{count:x}),(0,q.jsx)(is,{"aria-hidden":`true`})]})]})}function oD({source:e}){let{t}=W();return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`evidence-warning`,role:`alert`,children:[(0,q.jsx)(`p`,{children:t(`filesDiagramLoadError`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),children:t(`reloadPage`)})]}),(0,q.jsx)(aD,{children:(0,q.jsx)(`code`,{className:`language-mermaid`,children:e})})]})}function sD(e){let t=e.children;return(0,K.isValidElement)(t)&&t.props.className===`language-mermaid`?(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(`pre`,{children:t.props.children}),children:(0,q.jsx)(eD,{source:String(t.props.children??``)})}):(0,q.jsx)(aD,{...e})}function cD({children:e,node:t,...n}){return(0,q.jsx)(`section`,{className:`markdown-table-scroll`,"aria-label":`Table`,tabIndex:0,children:(0,q.jsx)(`table`,{...n,children:e})})}function lD({href:e,node:t,children:n,...r}){let{t:i}=W(),a=(0,K.useContext)(JE);if(e=rD(t)??e,_e(e??``))return a&&!a.disabled?(0,q.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>a.open(e??``,a.parent),children:[n,(0,q.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,q.jsxs)(`span`,{title:i(`artifactReferenceUnavailable`,{path:e}),children:[n,(0,q.jsxs)(`small`,{className:`artifact-link-path`,children:[` (`,e,`)`]})]});let o=iD(e??``);return o?(0,q.jsx)(`a`,{...r,href:o,target:`_blank`,rel:`noreferrer`,children:n}):n}function uD(){return e=>{let t=0,n=e=>{if(e.type===`element`&&e.tagName===`img`){let n=rD(e)??e.properties.src;typeof n==`string`&&_e(n)&&(e.data={...e.data,openpiInlineImage:t++<16})}for(let t of e.children)t.type===`element`&&n(t)};n(e)}}function dD({src:e,node:t,alt:n,title:r}){let{t:i}=W(),a=(0,K.useContext)(JE);if(e=rD(t)??e,t?.data?.openpiInlineImage&&e&&a?.parent&&!a.disabled)return(0,q.jsx)(XE,{src:e,alt:n||``},JSON.stringify([a.sessionId,a.parent,e]));if(_e(e??``))return a&&!a.disabled?(0,q.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>a.open(e??``,a.parent),children:[`[image: `,n||`image`,`]`,(0,q.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,q.jsxs)(`span`,{title:i(`artifactReferenceUnavailable`,{path:e}),children:[`[image: `,n||`image`,`]`,(0,q.jsxs)(`small`,{className:`artifact-link-path`,children:[` (`,e,`)`]})]});let o=iD(e??``),s=n||`image`;return o?(0,q.jsxs)(`a`,{href:o,title:r,target:`_blank`,rel:`noreferrer`,children:[`[image: `,s,`]`]}):(0,q.jsx)(`span`,{children:s})}var fD=(0,K.memo)(function({children:e,filePreview:t=!1}){return(0,q.jsx)(`div`,{className:`markdown`,children:(0,q.jsx)(ov,{remarkPlugins:[qE,QC],rehypePlugins:[...t?[TC]:[],nD,WC,tD,...t?[uD]:[]],urlTransform:e=>_e(e)?e:iD(e),components:{pre:t?sD:aD,table:cD,a:lD,img:dD},children:e})})}),pD=(0,K.memo)(function({children:e,filePreview:t=!1,streaming:n=!1}){let r=(0,K.useDeferredValue)(e);return(0,q.jsx)($E.Provider,{value:n,children:(0,q.jsx)(fD,{filePreview:t,children:n?r:e})})});function mD(e,t){let n=[],r=[],i=``,a=!1,o=!1;for(let s=0;s0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var DE={tokenize:FE,partial:!0};function OE(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:ME,continuation:{tokenize:NE},exit:PE}},text:{91:{name:`gfmFootnoteCall`,tokenize:jE},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:kE,resolveTo:AE}}}}function kE(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=yp(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function AE(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function jE(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||Op(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(yp(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return Op(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function ME(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||Op(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=yp(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return Op(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Pp(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function NE(e,t,n){return e.check(Yp,t,e.attempt(DE,t,n))}function PE(e){e.exit(`gfmFootnoteDefinition`)}function FE(e,t,n){let r=this;return Pp(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function IE(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Vp(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var LE=class{constructor(){this.map=[]}add(e,t,n){RE(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function RE(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Dp(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):kp(t)?Pp(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||Op(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,kp(t)?Pp(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return kp(t)?Pp(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Dp(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return kp(t)?Pp(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Dp(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Dp(n)?(e.exit(`tableRow`),t(n)):kp(n)?Pp(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||Op(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function HE(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new LE;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},GE(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function WE(e,t,n,r,i){let a=[],o=GE(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function GE(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var KE={name:`tasklistCheck`,tokenize:JE};function qE(){return{text:{91:KE}}}function JE(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return Op(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Dp(r)?t(r):kp(r)?e.check({tokenize:YE},t,n)(r):n(r)}}function YE(e,t,n){return Pp(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function XE(e){return hp([fE(),OE(),IE(e),BE(),qE()])}var ZE={};function QE(e){let t=this,n=e||ZE,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(XE(n)),a.push(tE()),o.push(nE(n))}var $E=(0,K.createContext)(null),eD=Promise.resolve();function tD({src:e,alt:t}){let n=(0,K.useContext)($E),r=(0,K.useMemo)(()=>new de,[]),[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(!1),c=n?.parent;return(0,K.useEffect)(()=>{if(!c||!n?.sessionId)return;let t=n.sessionId,i=new AbortController,o,l;return eD=eD.then(async()=>{try{if(i.signal.aborted||(o=(await r.resolveArtifact(t,e,c,i.signal)).handle,i.signal.aborted))return;let n=await r.artifactPreview(t,o,i.signal),s=await r.downloadArtifact(n.artifact,i.signal),u=xd(new Uint8Array(await s.slice(0,12).arrayBuffer()));if(!u)throw Error(`Unsupported image`);i.signal.aborted||(l=URL.createObjectURL(new Blob([s],{type:u})),a(l))}catch{i.signal.aborted||s(!0)}finally{o&&r.releaseArtifact(t,o).catch(()=>void 0)}}),()=>{i.abort(),l&&URL.revokeObjectURL(l)}},[r,e,c,n?.sessionId]),i?(0,q.jsx)(`img`,{className:`file-inline-image`,src:i,alt:t}):(0,q.jsx)(`span`,{children:o?`[${t||e}]`:t})}var nD=new Map;async function rD(e,t){if(!e||e.length>1e5||!t)return``;let n=`${t}\0${e}`,r=nD.get(n);if(r!==void 0)return r;let{default:i}=await Ee(async()=>{let{default:e}=await import(`./app-common.js`);return{default:e}},__vite__mapDeps([3,1]));if(!i.getLanguage(t))return``;let a=Me.sanitize(i.highlight(e,{language:t,ignoreIllegals:!0}).value,{ALLOWED_TAGS:[`span`],ALLOWED_ATTR:[`class`]});return nD.set(n,a),nD.size>20&&nD.delete(nD.keys().next().value),a}var iD=(0,K.createContext)(!1),aD=(0,K.lazy)(()=>Ee(()=>import(`./app-MermaidPreview.js`),__vite__mapDeps([4,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])).catch(()=>({default:dD})));function oD(){return e=>{let t=e=>e.type===`text`?e.value:e.type===`element`&&![`ul`,`ol`].includes(e.tagName)?e.children.map(t).join(``):``,n=e=>{if(e.type===`element`&&(e.tagName===`li`||e.tagName===`p`)){let n=t(e).trim();for(let t of e.children)t.type===`element`&&t.tagName===`input`&&t.properties.type===`checkbox`&&n&&(t.properties.ariaLabel=n)}for(let t of e.children)t.type===`element`&&n(t)};n(e)}}function sD(){return e=>{let t=e=>{if(e.type===`element`){let t=e.tagName===`a`?`href`:e.tagName===`img`?`src`:void 0,n=t?e.properties[t]:void 0,r=typeof n==`string`?n.replace(/%5c/giu,`\\`):n;t&&typeof r==`string`&&/^[a-z]:[\\/]/iu.test(r)&&!/[\x00-\x1f\x7f]/u.test(r)&&(e.data={...e.data,openpiWindowsPath:r},e.properties[t]=`./`)}for(let n of e.children)n.type===`element`&&t(n)};t(e)}}function cD(e){let t=e?.data?.openpiWindowsPath;return typeof t==`string`?t:void 0}function lD(e){if(!e.trim())return``;try{let t=new URL(e,document.baseURI);return[`http:`,`https:`,`mailto:`,`tel:`].includes(t.protocol)?t.href:``}catch{return``}}function uD({children:e,node:t,...n}){let{t:r}=W(),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(!1),c=(0,K.useContext)(iD),l=(0,K.useId)(),u=(0,K.useRef)(null),[d,f]=(0,K.useState)({source:``,language:``,html:``}),[p,m]=(0,K.useState)(`idle`),h=(0,K.useRef)(0),g=(0,K.useRef)(void 0),_=(0,K.useRef)(null);(0,K.useEffect)(()=>()=>{h.current+=1,window.clearTimeout(g.current)},[]);let v=p===`copied`,y=(0,K.isValidElement)(e)?/(?:^|\s)language-([\w+-]+)/u.exec(e.props.className??``)?.[1]:void 0,b=(0,K.isValidElement)(e)&&typeof e.props.children==`string`?e.props.children:``,x=b.replace(/\n$/u,``).split(` +`).length,S=x>10,C=!c&&d.source===b&&d.language===y?d.html:``;return(0,K.useEffect)(()=>{if(c||!y||!b)return;let e=!1;return rD(b,y).then(t=>{e||f({source:b,language:y,html:t})}).catch(()=>void 0),()=>{e=!0}},[b,y,c]),(0,q.jsxs)(`div`,{className:`markdown-code-block`,"data-wrap":i||void 0,"data-collapsible":S||void 0,"data-expanded":o||void 0,children:[(0,q.jsxs)(`div`,{className:`markdown-code-toolbar`,children:[(0,q.jsx)(`span`,{className:`markdown-code-language`,children:y??r(`codeBlock`)}),p===`failed`&&(0,q.jsx)(`span`,{role:`status`,children:r(`copyCodeFailed`)}),(0,q.jsx)(V,{content:r(`wrapCode`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`wrapCode`),"aria-pressed":i,onClick:()=>a(e=>!e),children:(0,q.jsx)(Hc,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:r(v?`copiedCode`:`copyCode`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(v?`copiedCode`:`copyCode`),"data-copied":v||void 0,disabled:p===`copying`,onClick:()=>{let e=++h.current;window.clearTimeout(g.current),m(`copying`),td(_.current?.textContent??``).then(t=>{e===h.current&&(m(t?`copied`:`failed`),t&&(g.current=window.setTimeout(()=>m(`idle`),1200)))})},children:v?(0,q.jsx)(rs,{"aria-hidden":`true`}):(0,q.jsx)(_s,{"aria-hidden":`true`})})})]}),(0,q.jsx)(`div`,{className:`markdown-code-body`,children:(0,q.jsx)(`section`,{ref:u,id:l,className:`markdown-code-scroll`,"aria-label":r(`codeBlock`),tabIndex:0,onKeyDown:e=>{if(e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let t=e.currentTarget;t.scrollWidth<=t.clientWidth||(e.preventDefault(),t.scrollLeft+=e.key===`ArrowRight`?40:-40)},children:(0,q.jsx)(`pre`,{ref:_,...n,children:C?(0,q.jsx)(`code`,{className:`language-${y}`,dangerouslySetInnerHTML:{__html:C}}):e})})}),S&&(0,q.jsxs)(`button`,{className:`markdown-code-expand`,type:`button`,"aria-expanded":o,"aria-controls":l,onClick:()=>{o&&u.current&&(u.current.scrollTop=0),s(e=>!e)},children:[o?r(`collapseCode`):r(`expandCode`,{count:x}),(0,q.jsx)(is,{"aria-hidden":`true`})]})]})}function dD({source:e}){let{t}=W();return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`evidence-warning`,role:`alert`,children:[(0,q.jsx)(`p`,{children:t(`filesDiagramLoadError`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>window.location.reload(),children:t(`reloadPage`)})]}),(0,q.jsx)(uD,{children:(0,q.jsx)(`code`,{className:`language-mermaid`,children:e})})]})}function fD(e){let t=e.children;return(0,K.isValidElement)(t)&&t.props.className===`language-mermaid`?(0,q.jsx)(K.Suspense,{fallback:(0,q.jsx)(`pre`,{children:t.props.children}),children:(0,q.jsx)(aD,{source:String(t.props.children??``)})}):(0,q.jsx)(uD,{...e})}function pD({children:e,node:t,...n}){return(0,q.jsx)(`section`,{className:`markdown-table-scroll`,"aria-label":`Table`,tabIndex:0,children:(0,q.jsx)(`table`,{...n,children:e})})}function mD({href:e,node:t,children:n,...r}){let{t:i}=W(),a=(0,K.useContext)($E);if(e=cD(t)??e,_e(e??``))return a&&!a.disabled?(0,q.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>a.open(e??``,a.parent),children:[n,(0,q.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,q.jsxs)(`span`,{title:i(`artifactReferenceUnavailable`,{path:e}),children:[n,(0,q.jsxs)(`small`,{className:`artifact-link-path`,children:[` (`,e,`)`]})]});let o=lD(e??``);return o?(0,q.jsx)(`a`,{...r,href:o,target:`_blank`,rel:`noreferrer`,children:n}):n}function hD(){return e=>{let t=0,n=e=>{if(e.type===`element`&&e.tagName===`img`){let n=cD(e)??e.properties.src;typeof n==`string`&&_e(n)&&(e.data={...e.data,openpiInlineImage:t++<16})}for(let t of e.children)t.type===`element`&&n(t)};n(e)}}function gD({src:e,node:t,alt:n,title:r}){let{t:i}=W(),a=(0,K.useContext)($E);if(e=cD(t)??e,t?.data?.openpiInlineImage&&e&&a?.parent&&!a.disabled)return(0,q.jsx)(tD,{src:e,alt:n||``},JSON.stringify([a.sessionId,a.parent,e]));if(_e(e??``))return a&&!a.disabled?(0,q.jsxs)(`button`,{type:`button`,className:`artifact-link`,title:`Open read-only file: ${e}`,onClick:()=>a.open(e??``,a.parent),children:[`[image: `,n||`image`,`]`,(0,q.jsxs)(`small`,{className:`artifact-link-path`,"aria-hidden":`true`,children:[` `,`(`,e,`)`]})]}):(0,q.jsxs)(`span`,{title:i(`artifactReferenceUnavailable`,{path:e}),children:[`[image: `,n||`image`,`]`,(0,q.jsxs)(`small`,{className:`artifact-link-path`,children:[` (`,e,`)`]})]});let o=lD(e??``),s=n||`image`;return o?(0,q.jsxs)(`a`,{href:o,title:r,target:`_blank`,rel:`noreferrer`,children:[`[image: `,s,`]`]}):(0,q.jsx)(`span`,{children:s})}var _D=(0,K.memo)(function({children:e,filePreview:t=!1}){return(0,q.jsx)(`div`,{className:`markdown`,children:(0,q.jsx)(dv,{remarkPlugins:[QE,rw],rehypePlugins:[...t?[AC]:[],sD,YC,oD,...t?[hD]:[]],urlTransform:e=>_e(e)?e:lD(e),components:{pre:t?fD:uD,table:pD,a:mD,img:gD},children:e})})}),vD=(0,K.memo)(function({children:e,filePreview:t=!1,streaming:n=!1}){let r=(0,K.useDeferredValue)(e);return(0,q.jsx)(iD.Provider,{value:n,children:(0,q.jsx)(_D,{filePreview:t,children:n?r:e})})});function yD(e,t){let n=[],r=[],i=``,a=!1,o=!1;for(let s=0;s${e}`}function gD({table:e}){let{t}=W(),n=Math.max(0,...e.rows.map(e=>e.length));return(0,q.jsxs)(q.Fragment,{children:[e.truncated&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:t(`filesTableTruncated`)}),(0,q.jsx)(`section`,{className:`file-table-scroll`,"aria-label":e.name||t(`filesTable`),tabIndex:0,children:(0,q.jsxs)(`table`,{className:`file-table`,children:[(0,q.jsx)(`thead`,{children:(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{"aria-label":t(`filesRow`)}),Array.from({length:n},(e,t)=>(0,q.jsx)(`th`,{scope:`col`,children:t<26?String.fromCharCode(65+t):`A${String.fromCharCode(65+t-26)}`},t))]})}),(0,q.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{scope:`row`,className:`file-row-number`,children:t+1}),Array.from({length:n},(t,n)=>(0,q.jsx)(`td`,{children:e[n]??``},n))]},t))})]})})]})}function _D({html:e,name:t}){return(0,q.jsx)(`iframe`,{className:`file-preview-frame`,title:t,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:hD(e)})}function vD({data:e,extension:t,name:n,initialPage:r,onReadingChange:i}){let{t:a}=W(),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(r??0);return(0,K.useEffect)(()=>i(u),[i,u]),(0,K.useEffect)(()=>{s(null),l(``);let n=new Worker(new URL(`/app-office-worker-BWWYuKWX.js`,``+import.meta.url),{type:`module`}),r=window.setTimeout(()=>{n.terminate(),l(a(`filesDocumentLimit`))},15e3);n.onmessage=e=>{clearTimeout(r),n.terminate(),e.data.result?s(e.data.result):l(e.data.error||a(`filesPreviewFailed`))},n.onerror=()=>{clearTimeout(r),n.terminate(),l(a(`filesPreviewFailed`))};let i=e.slice(0);return n.postMessage({data:i,extension:t},[i]),()=>{clearTimeout(r),n.terminate()}},[e,t,a]),c?(0,q.jsx)(`p`,{role:`alert`,className:`evidence-warning`,children:c}):o?o.kind===`document`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`file-preview-note`,children:a(`filesOfficeLayout`)}),(0,q.jsx)(_D,{html:o.html,name:n})]}):o.kind===`sheets`?(0,q.jsxs)(q.Fragment,{children:[o.truncated&&(0,q.jsx)(`p`,{children:a(`filesTableTruncated`)}),(0,q.jsx)(`div`,{className:`file-sheet-tabs`,role:`toolbar`,"aria-label":a(`filesSheets`),children:o.sheets.map((e,t)=>(0,q.jsx)(`button`,{type:`button`,"aria-pressed":u===t,onClick:()=>d(t),children:e.name},e.name))}),o.sheets[u]&&(0,q.jsx)(gD,{table:o.sheets[u]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:u===0,"aria-label":a(`filesPreviousPage`),onClick:()=>d(e=>e-1),children:(0,q.jsx)(as,{})}),(0,q.jsxs)(`span`,{children:[u+1,` / `,o.slides.length]}),(0,q.jsx)(`button`,{type:`button`,disabled:u===o.slides.length-1,"aria-label":a(`filesNextPage`),onClick:()=>d(e=>e+1),children:(0,q.jsx)(os,{})})]}),(0,q.jsx)(`p`,{className:`file-preview-note`,children:a(`filesSlidesLayout`)}),o.truncated&&(0,q.jsx)(`p`,{children:a(`artifactPreviewTruncated`)}),(0,q.jsx)(_D,{html:o.slides[u],name:n})]}):(0,q.jsx)(`p`,{role:`status`,children:a(`readingFile`)})}function yD({data:e,initialPage:t,initialScale:n,onReadingChange:r}){let{t:i}=W(),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(t??1),[l,u]=(0,K.useState)(n??1);(0,K.useEffect)(()=>r(s,l),[r,s,l]);let[d,f]=(0,K.useState)(null),p=d&&(!d.render||d.render.pdf===a&&d.render.page===s&&d.render.scale===l)?d.message:``,[m,h]=(0,K.useState)(!0),[g,_]=(0,K.useState)(null),v=(0,K.useRef)(null);return(0,K.useEffect)(()=>{let t=!1,n;return Promise.all([Ee(()=>import(`./app-pdf.js`),__vite__mapDeps([30,5])),Ee(()=>import(`./app-pdf.worker.min.js`),[])]).then(async([r,i])=>{if(t)return;r.GlobalWorkerOptions.workerSrc=i.default,n=r.getDocument({data:new Uint8Array(e.slice(0)),useWasm:!1,useSystemFonts:!0,disableAutoFetch:!0,maxImageSize:16e6});let a=await n.promise;t||o(a)}).catch(e=>{t||(h(!1),f({message:e instanceof Error?e.message:i(`filesPreviewFailed`)}))}),()=>{t=!0,n?.destroy()}},[e,i]),(0,K.useEffect)(()=>{if(!a||!v.current)return;let t=!1,n,r=v.current;return h(!0),f(null),_(null),a.getPage(s).then(async i=>{if(t)return;let o=i.getViewport({scale:1}),c=Math.min(l*1.5,Math.sqrt(8e6/(o.width*o.height))),u=i.getViewport({scale:c});r.width=u.width,r.height=u.height,r.style.width=`${Math.min(o.width,r.parentElement?.clientWidth||o.width)*l}px`,n=i.render({canvas:r,viewport:u}),await n.promise,t||(_({pdf:a,data:e,page:s,scale:l}),f(null),h(!1))}).catch(e=>{t||(h(!1),f({message:e instanceof Error?e.message:i(`filesPreviewFailed`),render:{pdf:a,page:s,scale:l}}))}),()=>{t=!0,n?.cancel()}},[a,e,s,l,i]),(0,q.jsxs)(`div`,{className:`file-pdf`,children:[(0,q.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesPreviousPage`),disabled:!a||s===1,onClick:()=>c(e=>e-1),children:(0,q.jsx)(as,{})}),(0,q.jsxs)(`span`,{children:[s,` / `,a?.numPages??`…`]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesNextPage`),disabled:!a||s===a.numPages,onClick:()=>c(e=>e+1),children:(0,q.jsx)(os,{})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesZoomOut`),disabled:l<=.5,onClick:()=>u(e=>Math.max(.5,e-.25)),children:(0,q.jsx)(G,{})}),(0,q.jsxs)(`button`,{type:`button`,"aria-label":i(`filesZoomReset`),onClick:()=>u(1),children:[(0,q.jsx)(oc,{}),` `,Math.round(l*100),`%`]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesZoomIn`),disabled:l>=3,onClick:()=>u(e=>Math.min(3,e+.25)),children:(0,q.jsx)(Ae,{})})]}),p&&(0,q.jsx)(`p`,{role:`alert`,children:p}),m&&(0,q.jsx)(`p`,{role:`status`,children:i(`readingFile`)}),(0,q.jsx)(`section`,{className:`file-media-viewport`,tabIndex:0,"aria-label":i(`filePreview`),children:(0,q.jsx)(`canvas`,{ref:v,style:{display:!m&&!p&&g!==null&&g.pdf===a&&g.data===e&&g.page===s&&g.scale===l?`block`:`none`},"aria-label":i(`filesPdfPage`,{page:s}),role:`img`})})]})}function bD({artifact:e,client:t}){let{t:n}=W(),r=be(),i=r?.artifact?.document,a=i?.path===e.path&&i.revision===e.revision?i:void 0,o=(t,n)=>{r?.artifact?.reference===encodeURI(e.path)&&(r.artifact.document={path:e.path,revision:e.revision,page:t,scale:n})},[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(``);if((0,K.useEffect)(()=>{let r=new AbortController;return c(null),u(``),t.downloadArtifact(e,r.signal).then(e=>e.arrayBuffer()).then(e=>{r.signal.aborted||c(e)}).catch(e=>{r.signal.aborted||u(e instanceof Error?e.message:n(`filesPreviewFailed`))}),()=>r.abort()},[e,t,n]),l)return(0,q.jsx)(`p`,{role:`alert`,className:`evidence-warning`,children:l});if(!s)return(0,q.jsx)(`p`,{role:`status`,children:n(`readingFile`)});let d=e.name.split(`.`).at(-1)?.toLowerCase()??``;return d===`pdf`?(0,q.jsx)(yD,{data:s,initialPage:a?.page,initialScale:a?.scale,onReadingChange:o}):(0,q.jsx)(vD,{data:s,extension:d,name:e.name,initialPage:a?.page,onReadingChange:o})}function xD({children:e,text:t}){let{t:n}=W(),r=(0,K.useRef)(null),i=(0,K.useRef)(null),a=(0,K.useRef)(null),o=(0,K.useId)(),[s,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)([]),[d,f]=(0,K.useState)(null);(0,K.useLayoutEffect)(()=>{let e=[...r.current?.querySelectorAll(`.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6`)??[]].filter(e=>e.textContent?.trim());u(e);let t=r.current?.closest(`.artifact-panel-body`),n=()=>{let n=t?.getBoundingClientRect().top??0;f(e.filter(e=>e.getBoundingClientRect().top<=n+56).at(-1)??e[0]??null)};return n(),t?.addEventListener(`scroll`,n,{passive:!0}),()=>t?.removeEventListener(`scroll`,n)},[t]),(0,K.useEffect)(()=>{if(!s)return;a.current?.querySelector(`button`)?.focus();let e=e=>{e.target instanceof Node&&!a.current?.contains(e.target)&&c(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[s]);let p=e=>{let t=e.parentElement;for(;t&&t!==r.current;)t instanceof HTMLDetailsElement&&(t.open=!0),t=t.parentElement;let n=r.current?.closest(`.artifact-panel-body`);n&&n.scrollTo({top:n.scrollTop+e.getBoundingClientRect().top-n.getBoundingClientRect().top-16,behavior:`instant`}),f(e),c(!1),e.tabIndex=-1,e.focus({preventScroll:!0})};return(0,q.jsxs)(`div`,{className:`file-markdown`,ref:r,children:[l.length>1&&(0,q.jsx)(`div`,{className:`file-outline-bar`,children:(0,q.jsxs)(`section`,{className:`file-outline`,"aria-label":n(`filesOutline`),ref:a,onKeyDown:e=>{e.key===`Escape`&&s&&(e.preventDefault(),e.stopPropagation(),c(!1),i.current?.focus())},children:[(0,q.jsx)(`button`,{type:`button`,ref:i,className:`icon-button`,title:n(`filesOutline`),"aria-label":n(`filesOutline`),"aria-expanded":s,"aria-controls":o,onClick:()=>c(e=>!e),children:(0,q.jsx)(nc,{"aria-hidden":`true`})}),s&&(0,q.jsx)(`nav`,{id:o,"aria-label":n(`filesOutline`),className:`file-outline-panel`,children:l.map((e,t)=>(0,q.jsxs)(`button`,{type:`button`,"aria-current":d===e?`location`:void 0,style:{paddingInlineStart:10+(Number(e.tagName.slice(1))-1)*10},onClick:()=>p(e),children:[(0,q.jsx)(`small`,{"aria-hidden":`true`,children:e.tagName.slice(1)}),(0,q.jsx)(`span`,{children:e.textContent})]},`${t}:${e.textContent}`))})]})}),e]})}var SD=1e5;function CD({text:e,name:t}){let[n,r]=(0,K.useState)(``);return(0,K.useEffect)(()=>{let n=!1;return r(``),Ee(async()=>{let{default:e}=await import(`./app-common.js`);return{default:e}},__vite__mapDeps([3,1])).then(({default:i})=>{let a=t.split(`.`).at(-1)?.toLowerCase()??``,o={tsx:`typescript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,svg:`xml`,html:`xml`,yml:`yaml`,md:`markdown`,sh:`bash`}[a]??a;if(n||e.length>1e5||!i.getLanguage(o))return;let s=i.highlight(e,{language:o,ignoreIllegals:!0});r(Me.sanitize(s.value,{ALLOWED_TAGS:[`span`],ALLOWED_ATTR:[`class`]}))}).catch(()=>void 0),()=>{n=!0}},[e,t]),(0,q.jsx)(`section`,{className:`file-code`,"aria-label":`File preview content`,tabIndex:0,children:(0,q.jsx)(`pre`,{children:n?(0,q.jsx)(`code`,{dangerouslySetInnerHTML:{__html:n}}):(0,q.jsx)(`code`,{children:e})})})}function wD({preview:e,client:t,source:n=!1}){let{t:r}=W(),{name:i}=e.artifact,a=i.split(`.`).at(-1)?.toLowerCase()??``,o=e.text,s=TD(i),c=[`md`,`markdown`].includes(a),l=c&&(o?.length??0)>SD,u=(0,K.useMemo)(()=>[`csv`,`tsv`].includes(a)?mD(o??``,a===`tsv`?` `:`,`):null,[o,a]);return[`pdf`,`docx`,`xlsx`,`pptx`].includes(a)?(0,q.jsx)(bD,{artifact:e.artifact,client:t}):o===void 0?(0,q.jsx)(`p`,{children:r(`artifactUnsupported`)}):(0,q.jsxs)(q.Fragment,{children:[l&&!n&&(0,q.jsx)(`p`,{role:`status`,children:r(`filesLargeMarkdownSource`)}),n||!s||l?(0,q.jsx)(CD,{text:o,name:i}):c?(0,q.jsx)(xD,{text:o,children:(0,q.jsx)(pD,{filePreview:!0,children:o})}):u?(0,q.jsx)(gD,{table:u}):(0,q.jsx)(_D,{html:o,name:i})]})}function TD(e){return/\.(?:md|markdown|html?|svg|csv|tsv)$/iu.test(e)}var ED=new Map;function DD(e,t,n,r){for(let[i,a]of ED){let o=JSON.parse(i);if(!Array.isArray(o)||o[0]!==e||o[1]!==t||typeof o[2]!=`string`)continue;let s=o[2],c=n.includes(`\\`)?`\\`:`/`;if(s!==n&&!s.startsWith(`${n}${c}`))continue;let l=JSON.stringify([e,t,`${r}${s.slice(n.length)}`]);ED.has(l)||(ED.set(l,a),ED.delete(i))}}function OD(e,t,n,r){let{t:i}=W(),[,a]=(0,K.useReducer)(e=>e+1,0),[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)(null),u=e?JSON.stringify([e.artifact.sessionId,t,e.artifact.path]):``,d=(0,K.useRef)(u);d.current=u,(0,K.useEffect)(()=>()=>{d.current=``},[]),(0,K.useEffect)(()=>{let e=e=>{ED.size&&(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[]);let f=ED.get(u),p=!!(e?.artifact.editable&&!e.truncated&&(f||ED.size<16));return{text:f?.text??e?.text??``,dirty:!!f,conflict:!!(f&&e&&f.revision!==e.artifact.revision),canEdit:p,saving:o,change:t=>{!e||o||(e.text?.includes(`\r +`&&s++,n.length===500)){o||=s${e}`}function xD({table:e}){let{t}=W(),n=Math.max(0,...e.rows.map(e=>e.length));return(0,q.jsxs)(q.Fragment,{children:[e.truncated&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:t(`filesTableTruncated`)}),(0,q.jsx)(`section`,{className:`file-table-scroll`,"aria-label":e.name||t(`filesTable`),tabIndex:0,children:(0,q.jsxs)(`table`,{className:`file-table`,children:[(0,q.jsx)(`thead`,{children:(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{"aria-label":t(`filesRow`)}),Array.from({length:n},(e,t)=>(0,q.jsx)(`th`,{scope:`col`,children:t<26?String.fromCharCode(65+t):`A${String.fromCharCode(65+t-26)}`},t))]})}),(0,q.jsx)(`tbody`,{children:e.rows.map((e,t)=>(0,q.jsxs)(`tr`,{children:[(0,q.jsx)(`th`,{scope:`row`,className:`file-row-number`,children:t+1}),Array.from({length:n},(t,n)=>(0,q.jsx)(`td`,{children:e[n]??``},n))]},t))})]})})]})}function SD({html:e,name:t}){return(0,q.jsx)(`iframe`,{className:`file-preview-frame`,title:t,sandbox:``,referrerPolicy:`no-referrer`,srcDoc:bD(e)})}function CD({data:e,extension:t,name:n,initialPage:r,onReadingChange:i}){let{t:a}=W(),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(r??0);return(0,K.useEffect)(()=>i(u),[i,u]),(0,K.useEffect)(()=>{s(null),l(``);let n=new Worker(new URL(`/app-office-worker-BWWYuKWX.js`,``+import.meta.url),{type:`module`}),r=window.setTimeout(()=>{n.terminate(),l(a(`filesDocumentLimit`))},15e3);n.onmessage=e=>{clearTimeout(r),n.terminate(),e.data.result?s(e.data.result):l(e.data.error||a(`filesPreviewFailed`))},n.onerror=()=>{clearTimeout(r),n.terminate(),l(a(`filesPreviewFailed`))};let i=e.slice(0);return n.postMessage({data:i,extension:t},[i]),()=>{clearTimeout(r),n.terminate()}},[e,t,a]),c?(0,q.jsx)(`p`,{role:`alert`,className:`evidence-warning`,children:c}):o?o.kind===`document`?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`file-preview-note`,children:a(`filesOfficeLayout`)}),(0,q.jsx)(SD,{html:o.html,name:n})]}):o.kind===`sheets`?(0,q.jsxs)(q.Fragment,{children:[o.truncated&&(0,q.jsx)(`p`,{children:a(`filesTableTruncated`)}),(0,q.jsx)(`div`,{className:`file-sheet-tabs`,role:`toolbar`,"aria-label":a(`filesSheets`),children:o.sheets.map((e,t)=>(0,q.jsx)(`button`,{type:`button`,"aria-pressed":u===t,onClick:()=>d(t),children:e.name},e.name))}),o.sheets[u]&&(0,q.jsx)(xD,{table:o.sheets[u]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:u===0,"aria-label":a(`filesPreviousPage`),onClick:()=>d(e=>e-1),children:(0,q.jsx)(as,{})}),(0,q.jsxs)(`span`,{children:[u+1,` / `,o.slides.length]}),(0,q.jsx)(`button`,{type:`button`,disabled:u===o.slides.length-1,"aria-label":a(`filesNextPage`),onClick:()=>d(e=>e+1),children:(0,q.jsx)(os,{})})]}),(0,q.jsx)(`p`,{className:`file-preview-note`,children:a(`filesSlidesLayout`)}),o.truncated&&(0,q.jsx)(`p`,{children:a(`artifactPreviewTruncated`)}),(0,q.jsx)(SD,{html:o.slides[u],name:n})]}):(0,q.jsx)(`p`,{role:`status`,children:a(`readingFile`)})}function wD({data:e,initialPage:t,initialScale:n,onReadingChange:r}){let{t:i}=W(),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(t??1),[l,u]=(0,K.useState)(n??1);(0,K.useEffect)(()=>r(s,l),[r,s,l]);let[d,f]=(0,K.useState)(null),p=d&&(!d.render||d.render.pdf===a&&d.render.page===s&&d.render.scale===l)?d.message:``,[m,h]=(0,K.useState)(!0),[g,_]=(0,K.useState)(null),v=(0,K.useRef)(null);return(0,K.useEffect)(()=>{let t=!1,n;return Promise.all([Ee(()=>import(`./app-pdf.js`),__vite__mapDeps([30,5])),Ee(()=>import(`./app-pdf.worker.min.js`),[])]).then(async([r,i])=>{if(t)return;r.GlobalWorkerOptions.workerSrc=i.default,n=r.getDocument({data:new Uint8Array(e.slice(0)),useWasm:!1,useSystemFonts:!0,disableAutoFetch:!0,maxImageSize:16e6});let a=await n.promise;t||o(a)}).catch(e=>{t||(h(!1),f({message:e instanceof Error?e.message:i(`filesPreviewFailed`)}))}),()=>{t=!0,n?.destroy()}},[e,i]),(0,K.useEffect)(()=>{if(!a||!v.current)return;let t=!1,n,r=v.current;return h(!0),f(null),_(null),a.getPage(s).then(async i=>{if(t)return;let o=i.getViewport({scale:1}),c=Math.min(l*1.5,Math.sqrt(8e6/(o.width*o.height))),u=i.getViewport({scale:c});r.width=u.width,r.height=u.height,r.style.width=`${Math.min(o.width,r.parentElement?.clientWidth||o.width)*l}px`,n=i.render({canvas:r,viewport:u}),await n.promise,t||(_({pdf:a,data:e,page:s,scale:l}),f(null),h(!1))}).catch(e=>{t||(h(!1),f({message:e instanceof Error?e.message:i(`filesPreviewFailed`),render:{pdf:a,page:s,scale:l}}))}),()=>{t=!0,n?.cancel()}},[a,e,s,l,i]),(0,q.jsxs)(`div`,{className:`file-pdf`,children:[(0,q.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesPreviousPage`),disabled:!a||s===1,onClick:()=>c(e=>e-1),children:(0,q.jsx)(as,{})}),(0,q.jsxs)(`span`,{children:[s,` / `,a?.numPages??`…`]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesNextPage`),disabled:!a||s===a.numPages,onClick:()=>c(e=>e+1),children:(0,q.jsx)(os,{})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesZoomOut`),disabled:l<=.5,onClick:()=>u(e=>Math.max(.5,e-.25)),children:(0,q.jsx)(G,{})}),(0,q.jsxs)(`button`,{type:`button`,"aria-label":i(`filesZoomReset`),onClick:()=>u(1),children:[(0,q.jsx)(oc,{}),` `,Math.round(l*100),`%`]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`filesZoomIn`),disabled:l>=3,onClick:()=>u(e=>Math.min(3,e+.25)),children:(0,q.jsx)(Ae,{})})]}),p&&(0,q.jsx)(`p`,{role:`alert`,children:p}),m&&(0,q.jsx)(`p`,{role:`status`,children:i(`readingFile`)}),(0,q.jsx)(`section`,{className:`file-media-viewport`,tabIndex:0,"aria-label":i(`filePreview`),children:(0,q.jsx)(`canvas`,{ref:v,style:{display:!m&&!p&&g!==null&&g.pdf===a&&g.data===e&&g.page===s&&g.scale===l?`block`:`none`},"aria-label":i(`filesPdfPage`,{page:s}),role:`img`})})]})}function TD({artifact:e,client:t}){let{t:n}=W(),r=be(),i=r?.artifact?.document,a=i?.path===e.path&&i.revision===e.revision?i:void 0,o=(t,n)=>{r?.artifact?.reference===encodeURI(e.path)&&(r.artifact.document={path:e.path,revision:e.revision,page:t,scale:n})},[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(``);if((0,K.useEffect)(()=>{let r=new AbortController;return c(null),u(``),t.downloadArtifact(e,r.signal).then(e=>e.arrayBuffer()).then(e=>{r.signal.aborted||c(e)}).catch(e=>{r.signal.aborted||u(e instanceof Error?e.message:n(`filesPreviewFailed`))}),()=>r.abort()},[e,t,n]),l)return(0,q.jsx)(`p`,{role:`alert`,className:`evidence-warning`,children:l});if(!s)return(0,q.jsx)(`p`,{role:`status`,children:n(`readingFile`)});let d=e.name.split(`.`).at(-1)?.toLowerCase()??``;return d===`pdf`?(0,q.jsx)(wD,{data:s,initialPage:a?.page,initialScale:a?.scale,onReadingChange:o}):(0,q.jsx)(CD,{data:s,extension:d,name:e.name,initialPage:a?.page,onReadingChange:o})}function ED({children:e,text:t}){let{t:n}=W(),r=(0,K.useRef)(null),i=(0,K.useRef)(null),a=(0,K.useRef)(null),o=(0,K.useId)(),[s,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)([]),[d,f]=(0,K.useState)(null);(0,K.useLayoutEffect)(()=>{let e=[...r.current?.querySelectorAll(`.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6`)??[]].filter(e=>e.textContent?.trim());u(e);let t=r.current?.closest(`.artifact-panel-body`),n=()=>{let n=t?.getBoundingClientRect().top??0;f(e.filter(e=>e.getBoundingClientRect().top<=n+56).at(-1)??e[0]??null)};return n(),t?.addEventListener(`scroll`,n,{passive:!0}),()=>t?.removeEventListener(`scroll`,n)},[t]),(0,K.useEffect)(()=>{if(!s)return;a.current?.querySelector(`button`)?.focus();let e=e=>{e.target instanceof Node&&!a.current?.contains(e.target)&&c(!1)};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[s]);let p=e=>{let t=e.parentElement;for(;t&&t!==r.current;)t instanceof HTMLDetailsElement&&(t.open=!0),t=t.parentElement;let n=r.current?.closest(`.artifact-panel-body`);n&&n.scrollTo({top:n.scrollTop+e.getBoundingClientRect().top-n.getBoundingClientRect().top-16,behavior:`instant`}),f(e),c(!1),e.tabIndex=-1,e.focus({preventScroll:!0})};return(0,q.jsxs)(`div`,{className:`file-markdown`,ref:r,children:[l.length>1&&(0,q.jsx)(`div`,{className:`file-outline-bar`,children:(0,q.jsxs)(`section`,{className:`file-outline`,"aria-label":n(`filesOutline`),ref:a,onKeyDown:e=>{e.key===`Escape`&&s&&(e.preventDefault(),e.stopPropagation(),c(!1),i.current?.focus())},children:[(0,q.jsx)(`button`,{type:`button`,ref:i,className:`icon-button`,title:n(`filesOutline`),"aria-label":n(`filesOutline`),"aria-expanded":s,"aria-controls":o,onClick:()=>c(e=>!e),children:(0,q.jsx)(nc,{"aria-hidden":`true`})}),s&&(0,q.jsx)(`nav`,{id:o,"aria-label":n(`filesOutline`),className:`file-outline-panel`,children:l.map((e,t)=>(0,q.jsxs)(`button`,{type:`button`,"aria-current":d===e?`location`:void 0,style:{paddingInlineStart:10+(Number(e.tagName.slice(1))-1)*10},onClick:()=>p(e),children:[(0,q.jsx)(`small`,{"aria-hidden":`true`,children:e.tagName.slice(1)}),(0,q.jsx)(`span`,{children:e.textContent})]},`${t}:${e.textContent}`))})]})}),e]})}var DD=1e5;function OD({text:e,name:t}){let[n,r]=(0,K.useState)(``);return(0,K.useEffect)(()=>{let n=!1;return r(``),Ee(async()=>{let{default:e}=await import(`./app-common.js`);return{default:e}},__vite__mapDeps([3,1])).then(({default:i})=>{let a=t.split(`.`).at(-1)?.toLowerCase()??``,o={tsx:`typescript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,svg:`xml`,html:`xml`,yml:`yaml`,md:`markdown`,sh:`bash`}[a]??a;if(n||e.length>1e5||!i.getLanguage(o))return;let s=i.highlight(e,{language:o,ignoreIllegals:!0});r(Me.sanitize(s.value,{ALLOWED_TAGS:[`span`],ALLOWED_ATTR:[`class`]}))}).catch(()=>void 0),()=>{n=!0}},[e,t]),(0,q.jsx)(`section`,{className:`file-code`,"aria-label":`File preview content`,tabIndex:0,children:(0,q.jsx)(`pre`,{children:n?(0,q.jsx)(`code`,{dangerouslySetInnerHTML:{__html:n}}):(0,q.jsx)(`code`,{children:e})})})}function kD({preview:e,client:t,source:n=!1}){let{t:r}=W(),{name:i}=e.artifact,a=i.split(`.`).at(-1)?.toLowerCase()??``,o=e.text,s=AD(i),c=[`md`,`markdown`].includes(a),l=c&&(o?.length??0)>DD,u=(0,K.useMemo)(()=>[`csv`,`tsv`].includes(a)?yD(o??``,a===`tsv`?` `:`,`):null,[o,a]);return[`pdf`,`docx`,`xlsx`,`pptx`].includes(a)?(0,q.jsx)(TD,{artifact:e.artifact,client:t}):o===void 0?(0,q.jsx)(`p`,{children:r(`artifactUnsupported`)}):(0,q.jsxs)(q.Fragment,{children:[l&&!n&&(0,q.jsx)(`p`,{role:`status`,children:r(`filesLargeMarkdownSource`)}),n||!s||l?(0,q.jsx)(OD,{text:o,name:i}):c?(0,q.jsx)(ED,{text:o,children:(0,q.jsx)(vD,{filePreview:!0,children:o})}):u?(0,q.jsx)(xD,{table:u}):(0,q.jsx)(SD,{html:o,name:i})]})}function AD(e){return/\.(?:md|markdown|html?|svg|csv|tsv)$/iu.test(e)}var jD=new Map;function MD(e,t,n,r){for(let[i,a]of jD){let o=JSON.parse(i);if(!Array.isArray(o)||o[0]!==e||o[1]!==t||typeof o[2]!=`string`)continue;let s=o[2],c=n.includes(`\\`)?`\\`:`/`;if(s!==n&&!s.startsWith(`${n}${c}`))continue;let l=JSON.stringify([e,t,`${r}${s.slice(n.length)}`]);jD.has(l)||(jD.set(l,a),jD.delete(i))}}function ND(e,t,n,r){let{t:i}=W(),[,a]=(0,K.useReducer)(e=>e+1,0),[o,s]=(0,K.useState)(!1),[c,l]=(0,K.useState)(null),u=e?JSON.stringify([e.artifact.sessionId,t,e.artifact.path]):``,d=(0,K.useRef)(u);d.current=u,(0,K.useEffect)(()=>()=>{d.current=``},[]),(0,K.useEffect)(()=>{let e=e=>{jD.size&&(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[]);let f=jD.get(u),p=!!(e?.artifact.editable&&!e.truncated&&(f||jD.size<16));return{text:f?.text??e?.text??``,dirty:!!f,conflict:!!(f&&e&&f.revision!==e.artifact.revision),canEdit:p,saving:o,change:t=>{!e||o||(e.text?.includes(`\r `)&&!/(?{ED.delete(u),l(null),a()},reconcile:()=>{!f||!e||e.truncated||(ED.set(u,{text:f.text,revision:e.artifact.revision}),l(null),a())},save:async()=>{if(!(!f||!e||o||!p)){s(!0),l(null);try{let t=await n.saveArtifact(e.artifact,f.revision,f.text);ED.get(u)===f&&ED.delete(u),d.current===u&&(r(f.text,t.revision),l({key:u,error:!1,text:i(`filesSaved`)}))}catch(e){d.current===u&&l({key:u,error:!0,text:e instanceof ge&&e.code===`ARTIFACT_CHANGED`?i(`filesSaveConflict`):i(`filesSaveFailed`)})}finally{s(!1),a()}}},message:c?.key===u?c:null}}function kD({artifact:e,client:t}){let{t:n}=W(),[r,i]=(0,K.useState)(null),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(!1),{sessionId:l,handle:u,revision:d}=e;return(0,K.useEffect)(()=>{let e=new AbortController,r;return i(null),o(null),t.downloadArtifact({sessionId:l,handle:u,revision:d},e.signal).then(async t=>{let a=gd(new Uint8Array(await t.slice(0,12).arrayBuffer()));if(!e.signal.aborted){if(!a)throw Error(n(`artifactImagePreviewFailed`));r=URL.createObjectURL(new Blob([t],{type:a})),i({url:r,loaded:!1})}}).catch(t=>{e.signal.aborted||o(t instanceof Error?t.message:n(`artifactImagePreviewFailed`))}),()=>{e.abort(),r&&URL.revokeObjectURL(r)}},[l,u,d,t,n]),a?(0,q.jsxs)(`div`,{role:`alert`,className:`evidence-warning`,children:[(0,q.jsx)(`p`,{children:n(`artifactImagePreviewFailed`)}),a!==n(`artifactImagePreviewFailed`)&&(0,q.jsx)(`small`,{children:a})]}):(0,q.jsxs)(`div`,{className:`artifact-image-preview`,"data-original":s,children:[(0,q.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":!s,onClick:()=>c(!1),children:n(`filesFitImage`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":s,onClick:()=>c(!0),children:n(`filesOriginalImage`)})]}),!r?.loaded&&(0,q.jsx)(`p`,{role:`status`,children:n(`readingFile`)}),(0,q.jsx)(`div`,{className:`file-media-viewport`,children:r&&(0,q.jsx)(`img`,{src:r.url,alt:e.name,hidden:!r.loaded,onLoad:()=>i(e=>e?{...e,loaded:!0}:null),onError:()=>o(n(`artifactImagePreviewFailed`))})})]})}var AD=(0,K.forwardRef)(function({sessionId:e,sessionPath:t,children:n,disabled:r=!1,embedded:i=!1,active:a=!0,onOpen:o,onClose:s},c){let{t:l}=W(),u=(0,K.useMemo)(()=>new de,[]),d=be(),f=i?d?.artifact:void 0,[p,m]=(0,K.useState)(()=>f?{sessionId:e,sessionPath:t,reference:f.reference}:null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(f?.source??!1),[y,b]=(0,K.useState)(f?.editing??!1),[x,S]=(0,K.useState)(null),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(null),[k,A]=(0,K.useState)(!1),[M,N]=(0,K.useState)(!1),P=(0,K.useRef)(null),F=(0,K.useRef)(null),I=(0,K.useRef)(0),ee=(0,K.useRef)(null),L=(0,K.useRef)(null),R=(0,K.useRef)(null),te=(0,K.useRef)(null),B=(0,K.useRef)(f?.scroll??0),ne=(0,K.useRef)(!!f);(0,K.useLayoutEffect)(()=>{!i||!d||(d.artifact=p?{reference:h?.artifact.path?encodeURI(h.artifact.path):p.reference,source:_,editing:y,scroll:B.current,document:d.artifact?.document}:void 0)},[i,d,p,h?.artifact.path,_,y]);let re=(0,K.useRef)(null),ie=(0,K.useRef)(new Set),ae=(0,K.useRef)(void 0),oe=(0,K.useRef)(!1),se=(0,K.useRef)(null),ce=JSON.stringify([e,t,r]),le=(0,K.useRef)(ce);le.current=ce;let H=!!(p&&!r&&p.sessionId===e&&p.sessionPath===t);(0,K.useEffect)(()=>()=>{se.current!==null&&(window.cancelAnimationFrame(se.current),se.current=null)},[ce]);let ue=(0,K.useCallback)((n,i,a)=>{if(r)return;let s=document.activeElement,c=a??(s instanceof HTMLElement?s:null),l=!!(i||c?.closest(`.artifact-panel`));l||(F.current=c),o?.(l),se.current!==null&&(window.cancelAnimationFrame(se.current),se.current=null),oe.current=!0,I.current++,g(null),v(!1),b(!1),B.current=0,ne.current=!1,S(null),w(!1),O(null),A(!1),ae.current=i,m({reference:n,parent:i,sessionId:e,sessionPath:t})},[r,o,e,t]),fe=(0,K.useCallback)(({restoreFocus:e=!0}={})=>{if(!p)return;let t=++I.current,n=F.current,r=document.activeElement,i=H?`user`:`context`;if(F.current=null,oe.current=!1,ae.current=void 0,m(null),g(null),O(null),P.current?.abort(),s?.(i),se.current!==null&&window.cancelAnimationFrame(se.current),i===`context`||!e){se.current=null;return}se.current=window.requestAnimationFrame(()=>{se.current=null,t===I.current&&le.current===ce&&(document.activeElement===document.body||document.activeElement===r||document.activeElement===n)&&n?.isConnected&&n.checkVisibility({visibilityProperty:!0})&&n.focus()})},[s,p,H,ce]);j({isActive:H&&a,onDismiss:fe,getContainer:()=>ee.current,isPresent:()=>ee.current?.contains(document.activeElement)??!1}),(0,K.useImperativeHandle)(c,()=>({close:fe}),[fe]),(0,K.useLayoutEffect)(()=>{y?R.current?.focus({preventScroll:!0}):te.current&&(te.current.scrollTop=B.current)},[y]),(0,K.useLayoutEffect)(()=>{!a||!h||!ne.current||!te.current||(te.current.scrollTop=B.current,ne.current=!1)},[a,h]),(0,K.useEffect)(()=>{!p||H||(I.current++,m(null),g(null),O(null),oe.current=!1,F.current=null,ae.current=void 0,s?.(`context`))},[p,H,s]),(0,K.useEffect)(()=>{if(!p||!e||!H||!a)return;let t=new AbortController,n,r=p.parent,i,o=!1,s,c=!1,l=2e3;oe.current&&(oe.current=!1,L.current?.focus());let d=async()=>{if(document.visibilityState===`hidden`){i=setTimeout(d,2e3);return}try{if(n||=(await(p.external?u.authorizeArtifact(e,p.reference,t.signal):u.resolveArtifact(e,p.reference,r,t.signal))).handle,r&&=(u.releaseArtifact(e,r).catch(()=>void 0),void 0),o){u.releaseArtifact(e,n).catch(()=>void 0);return}if(s){if((await u.artifactMetadata(e,n,t.signal)).identity===s){o||S(null),l=Math.min(l*2,3e4);return}if(c){o||A(!0),l=3e4;return}}let i=await u.artifactPreview(e,n,t.signal);o||(s=i.identity,c=i.text!==void 0,l=2e3,g(e=>e?.artifact.path===i.artifact.path&&e.artifact.revision===i.artifact.revision?{...i,text:e.text,truncated:e.truncated,nextOffset:e.nextOffset}:i),S(null))}catch(e){let t=e instanceof ge&&[401,403,410].includes(e.status);!o&&t&&(g(null),re.current?.abort()),o||w(e instanceof ge&&e.code===`ARTIFACT_DENIED`),l=Math.min(l*2,3e4),o||S(e instanceof Error?e.message:`Unable to read file`),t&&(o=!0)}finally{o||(i=setTimeout(d,l))}};return d(),()=>{o=!0,t.abort(),clearTimeout(i),re.current?.abort(),P.current?.abort(),N(!1),E(!1),n&&n!==ae.current&&u.releaseArtifact(e,n).catch(()=>void 0),r&&u.releaseArtifact(e,r).catch(()=>void 0);for(let e of ie.current)URL.revokeObjectURL(e);ie.current.clear()}},[u,p,H,e,a]);let pe=(0,K.useMemo)(()=>({open:ue,disabled:r}),[ue,r]),_e=h?.artifact.path??p?.reference??``,ve=h?.artifact.name??_e.split(/[\\/]/u).at(-1)??_e,ye=OD(h,t,u,(e,t)=>{g(n=>n&&{...n,text:e,truncated:!1,nextOffset:void 0,artifact:{...n.artifact,revision:t,bytes:new TextEncoder().encode(e).length}}),A(!1),m(e=>e&&{...e})}),xe=async()=>{if(!h||T)return;let e=new AbortController;re.current=e,E(!0);try{let t=await u.downloadArtifact(h.artifact,e.signal);if(e.signal.aborted)return;let n=URL.createObjectURL(t);ie.current.add(n);let r=document.createElement(`a`);r.href=n,r.download=h.artifact.name,r.click(),setTimeout(()=>{URL.revokeObjectURL(n),ie.current.delete(n)},1e3)}catch(t){e.signal.aborted||S(t instanceof Error?t.message:`Download failed`)}finally{e.signal.aborted||E(!1)}},Se=async()=>{if(!h?.nextOffset||P.current)return;let e=h,t=new AbortController;P.current=t,N(!0);try{let n=await u.artifactPreview(e.artifact.sessionId,e.artifact.handle,t.signal,{offset:e.nextOffset,revision:e.artifact.revision});t.signal.aborted||g(t=>t?.artifact.handle===e.artifact.handle&&t.artifact.revision===n.artifact.revision?{...n,text:(t.text??``)+(n.text??``)}:t)}catch(e){t.signal.aborted||S(e instanceof Error?e.message:l(`filesReadFailed`))}finally{P.current===t&&(P.current=null,N(!1))}};return(0,q.jsxs)(JE.Provider,{value:pe,children:[n,p&&H&&(0,q.jsx)(z,{children:(0,q.jsxs)(`aside`,{ref:ee,className:`artifact-panel${i?` artifact-panel-embedded`:``}`,"aria-label":l(`filePreview`),onKeyDown:e=>{if(i&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`){e.preventDefault(),e.stopPropagation(),ye.save();return}},children:[(0,q.jsxs)(`header`,{children:[(0,q.jsxs)(`div`,{className:`artifact-title`,children:[(0,q.jsx)(`small`,{title:_e,children:i?_e.split(/[\\/]/u).slice(0,-1).at(-1)||l(`files`):`${l(`filePreview`)} · ${l(`artifactReadOnly`)}`}),i&&(0,q.jsx)(os,{"aria-hidden":`true`}),(0,q.jsx)(`h2`,{title:_e,children:ve}),ye.dirty&&(0,q.jsx)(`span`,{className:`file-unsaved`,role:`img`,title:l(`filesUnsaved`),"aria-label":l(`filesUnsaved`),children:`●`})]}),(0,q.jsxs)(`div`,{className:`artifact-header-actions`,children:[i&&h?.text!==void 0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`fieldset`,{className:`file-mode-switch`,"aria-label":l(`filesMode`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":!y,onClick:()=>b(!1),children:l(`filesPreview`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":y,disabled:!ye.canEdit,title:l(h.truncated?`filesEditLoadFirst`:h.artifact.editable?`filesEdit`:`filesEditUnavailable`),onClick:()=>{B.current=te.current?.scrollTop??0,b(!0)},children:l(`filesEdit`)})]}),(y||ye.dirty||ye.saving)&&(0,q.jsxs)(`button`,{type:`button`,className:`file-save-button`,title:`${l(`filesSave`)} (Cmd/Ctrl+S)`,disabled:!ye.dirty||ye.saving||!ye.canEdit,onClick:()=>void ye.save(),children:[(0,q.jsx)(Tc,{"aria-hidden":`true`}),l(ye.saving?`filesSaving`:ye.dirty?`filesSave`:`filesSaved`)]}),ye.dirty&&(0,q.jsx)(`button`,{type:`button`,title:l(`filesDiscard`),"aria-label":l(`filesDiscard`),disabled:ye.saving,onClick:()=>{window.confirm(l(`filesDiscardConfirm`))&&ye.discard()},children:(0,q.jsx)(he,{"aria-hidden":`true`})})]}),!i&&h?.text!==void 0&&TD(ve)&&(0,q.jsxs)(`button`,{type:`button`,className:`file-source-toggle`,"aria-pressed":_,onClick:()=>v(e=>!e),children:[_?(0,q.jsx)(As,{"aria-hidden":`true`}):(0,q.jsx)(bs,{"aria-hidden":`true`}),l(_?`filesPreview`:`filesSource`)]}),(0,q.jsx)(V,{content:l(`copyFilePath`),placement:`below`,children:(0,q.jsx)(`button`,{className:`artifact-icon-button`,type:`button`,"aria-label":l(`copyFilePath`),onClick:()=>{let e=++I.current;td(_e).then(t=>{e===I.current&&O(t?`copied`:`failed`)})},children:D===`copied`?(0,q.jsx)(rs,{"aria-hidden":`true`}):(0,q.jsx)(_s,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:l(`refreshFile`),placement:`below`,children:(0,q.jsxs)(`button`,{className:`artifact-icon-button`,type:`button`,"aria-label":l(`refreshFile`),onClick:()=>{I.current++,O(null),S(null),w(!1),A(!1),ae.current=void 0,m(n=>n?{sessionId:e,sessionPath:t,reference:h?encodeURI(h.artifact.path):n.reference,...n.external?{external:!0}:{},...h?{}:{parent:n.parent}}:null)},children:[(0,q.jsx)(me,{"aria-hidden":`true`}),` `,l(`refreshFile`)]})}),(0,q.jsx)(V,{content:l(`downloadFile`),placement:`below`,children:(0,q.jsxs)(`button`,{className:`artifact-icon-button`,type:`button`,"aria-label":l(T?`downloadingFile`:`downloadFile`),disabled:!h||T,onClick:()=>void xe(),children:[(0,q.jsx)(Ts,{"aria-hidden":`true`}),` `,l(T?`downloadingFile`:`downloadFile`)]})}),(0,q.jsx)(V,{content:l(`closePreview`),placement:`below`,children:(0,q.jsx)(`button`,{className:`artifact-icon-button`,ref:L,type:`button`,"aria-label":l(`closePreview`),onClick:()=>fe(),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]})]}),(0,q.jsxs)(`div`,{className:`artifact-panel-body`,ref:te,onScroll:e=>{ne.current||(B.current=e.currentTarget.scrollTop,i&&d?.artifact&&(d.artifact.scroll=B.current))},children:[!i&&(0,q.jsx)(`div`,{className:`artifact-source`,children:(0,q.jsx)(`code`,{title:_e,children:_e})}),D&&(0,q.jsx)(`p`,{role:`status`,children:l(D===`copied`?`filePathCopied`:`copyFailed`)}),x&&(0,q.jsxs)(`p`,{role:`status`,className:`evidence-warning`,children:[h?l(`artifactOlderPreview`):``,x]}),k&&(0,q.jsx)(`p`,{className:`evidence-warning`,role:`status`,children:l(`filesContentChanged`)}),ye.message&&(0,q.jsx)(`p`,{role:`status`,className:ye.message.error?`evidence-warning`:`file-save-status`,children:ye.message.text}),ye.conflict&&(0,q.jsxs)(`div`,{className:`file-conflict`,children:[(0,q.jsx)(`p`,{children:l(`filesSaveConflict`)}),(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:l(`filesDiskVersion`)}),(0,q.jsx)(`pre`,{children:h?.text})]}),(0,q.jsx)(`button`,{type:`button`,disabled:!ye.canEdit||ye.saving,onClick:ye.reconcile,children:l(`filesReconcile`)})]}),C&&!p.external&&/^(?:\/(?!\/)|[a-z]:[\\/])/iu.test(p.reference)&&(0,q.jsxs)(`div`,{className:`artifact-external-access`,children:[(0,q.jsx)(`p`,{children:l(`artifactExternalAccess`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{oe.current=!0,S(null),w(!1),m({...p,parent:void 0,external:!0})},children:l(`artifactAuthorizeFile`)})]}),!h&&!x&&(0,q.jsx)(`p`,{role:`status`,children:l(`readingFile`)}),h&&(0,q.jsxs)(q.Fragment,{children:[h.truncated&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:l(`artifactPreviewTruncated`)}),/\.(?:png|jpe?g|gif|webp)$/iu.test(h.artifact.name)?(0,q.jsx)(kD,{artifact:h.artifact,client:u},JSON.stringify([h.artifact.sessionId,h.artifact.path,h.artifact.handle,h.artifact.revision])):(0,q.jsxs)(JE.Provider,{value:{open:ue,disabled:r,parent:h.artifact.handle,sessionId:e},children:[i&&ye.canEdit&&(0,q.jsx)(`textarea`,{ref:R,hidden:!y,className:`file-editor`,"aria-label":l(`filesEditor`),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:1048576,value:ye.text,disabled:ye.saving,onChange:e=>ye.change(e.currentTarget.value)}),!(i&&y&&ye.canEdit)&&(0,q.jsx)(wD,{preview:ye.dirty?{...h,text:ye.text}:h,client:u,source:_},`${h.artifact.path}:${h.artifact.revision}`)]}),h.nextOffset!==void 0&&(0,q.jsx)(`button`,{type:`button`,className:`file-read-more`,disabled:M||k,onClick:()=>void Se(),children:l(M?`readingFile`:`filesReadMore`)}),(0,q.jsxs)(`details`,{className:`artifact-file-details`,children:[(0,q.jsx)(`summary`,{children:l(`artifactFileDetails`)}),(0,q.jsx)(`p`,{className:`artifact-session`,children:l(`artifactSession`,{sessionId:e})}),(0,q.jsxs)(`p`,{className:`artifact-revision`,children:[l(`artifactVersion`),`:`,` `,(0,q.jsx)(`code`,{children:h.artifact.revision}),` ·`,` `,l(`artifactBytes`,{count:h.artifact.bytes})]})]})]})]})]})})]})});function jD(e,t){let n=e.name?.trim();if(n)return n;let r=e.firstMessage?.trim();return r&&r!==`(no messages)`?r:t}function MD(e){return e.split(/[\\/]/u).filter(Boolean).at(-1)||e}function ND(e,t=2){let n=e.split(/[\\/]/u).filter(Boolean);return n.length<=t?e:`…/${n.slice(-t).join(`/`)}`}function PD(e,t=96){let n=String(e??``).replace(/\s+/gu,` `).trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function FD(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function ID(e,t=Date.now()){if(typeof e!=`number`)return``;let n=Math.max(0,Math.round((t-e)/1e3)),r=Math.floor(n/60),i=n%60;return r>0?`${r}m${String(i).padStart(2,`0`)}s`:`${i}s`}function LD(e,t=e?.selectedSession){if(!e||!t||t.id!==e.currentSessionId)return!1;let n=e.currentSessionPath??e.sessions.find(t=>t.id===e.currentSessionId&&t.controller===`web`)?.path??e.runtime.activeTurn?.sessionPath;return!!(n&&n===t.path)}function RD(e,t=[],n=[]){return t.find(t=>t.id===e)?.title||n.find(t=>t.id===e)?.title||e}function zD(e){return e&&typeof e==`object`?e:{}}function BD(e){let t=new Map;for(let n of e){let e=n.role===`toolResult`&&n.toolName===`subagent_spawn`,r=n.role===`toolResult`&&n.toolName===`subagent_send`,i=n.customType===`subagent-finished`,a=n.role===`toolResult`&&[`subagent_wait`,`subagent_check`].includes(n.toolName??``)||n.customType===`subagent-result`||i;if(!e&&!r&&!a||n.isError)continue;let o=zD(n.details);for(let a of Array.isArray(o.results)?o.results:[o]){let s=zD(a);if(typeof s.id!=`string`||!s.id||s.id.length>160||/[\u0000-\u001f\u007f]/u.test(s.id))continue;let c=t.get(s.id),l={...c,id:s.id,title:typeof s.title==`string`?s.title:c?.title??s.id};typeof s.model==`string`&&(l.model=s.model),e?l.receipt=n.content:r?(l.state=s.status===`running`?`running`:void 0,l.result=void 0):(i||(l.result=typeof o.displayContent==`string`?o.displayContent:n.content),l.state=s.outcome===`uncertain`?void 0:s.outcome===`interrupted`?`interrupted`:s.status===`done`||s.status===`error`||s.status===`running`?s.status:void 0),t.delete(s.id),t.set(s.id,l)}}return[...t.values()].slice(-32)}function VD(e,t,n=[],r=!0){let i=new Set(e.map(e=>e.id));return[...e.map(e=>({kind:`subagents`,id:e.id,title:e.title,taskPreview:e.taskPreview,state:e.outcome===`interrupted`?`interrupted`:e.status===`unknown`||!r&&e.status===`running`?void 0:e.status,timestamp:e.settledAt??e.createdAt,createdAt:e.createdAt,saved:!1})),...n.flatMap(e=>(e.children?.items??[]).map(e=>({kind:`workflows`,id:e.id,title:e.title,taskPreview:e.taskPreview,state:e.outcome===`interrupted`?`interrupted`:e.status===`unknown`||!r&&e.status===`running`?void 0:e.status,timestamp:e.settledAt??e.createdAt,createdAt:e.createdAt,saved:!1}))),...t.filter(e=>!i.has(e.id)).map(e=>({kind:`subagents`,id:e.id,title:e.title,taskPreview:void 0,state:e.state===`running`?void 0:e.state,timestamp:void 0,createdAt:void 0,saved:!0}))].sort((e,t)=>(t.timestamp??0)-(e.timestamp??0))}function HD(e){return e===`interrupted`?`interrupted`:e===`running`?`running`:e===`done`||e===`completed`?`done`:[`error`,`failed`,`aborted`,`killed`,`timed_out`].includes(e)?`error`:e===`uncertain`?`warn`:`unknown`}function UD({kind:e,label:t,status:n,elapsed:r,onClick:i}){return(0,q.jsxs)(i?`button`:`span`,{className:`activity-chip ${e} ${n}`,type:i?`button`:void 0,onClick:i,children:[n===`running`?(0,q.jsx)(`i`,{className:`activity-chip-dot`}):n===`done`?(0,q.jsx)(rs,{}):n===`error`?(0,q.jsx)(je,{}):n===`interrupted`?(0,q.jsx)(ps,{}):(0,q.jsx)(`span`,{className:`activity-chip-glyph`,children:`?`}),(0,q.jsx)(`span`,{className:`activity-chip-text`,title:t,children:t},`${n}:${t}`),r&&(0,q.jsx)(`span`,{className:`activity-chip-elapsed`,children:r})]})}function WD({snapshot:e,onInspectSubagent:t,observed:n=!0,expanded:r,onExpandedChange:i}){let{t:a}=W(),o=(0,K.useRef)(null),[,s]=(0,K.useState)(0),c=e?.runtime.capabilities,l=(0,K.useMemo)(()=>BD((e?.selectedSession?.entries??[]).flatMap(e=>e.message?[e.message]:[])),[e?.selectedSession?.entries]),u=c?.subagents,d=c?.workflows?.items??[],f=d.flatMap(e=>e.children?.items??[]),p=new Set([...(u?.items??[]).map(e=>`subagents:${e.id}`),...l.map(e=>`subagents:${e.id}`),...f.map(e=>`workflows:${e.id}`)]).size,m=Math.max(p,(u?.items.length??0)+(u?.omitted??0)+f.length+d.reduce((e,t)=>e+(t.children?.omitted??0),0)),h=VD(u?.items??[],l,d,n),g=h.filter(e=>e.state===`running`).length,_=h.filter(e=>e.state===`done`).length,v=h.filter(e=>e.state===`error`||e.state===`interrupted`).length,y=Math.max(0,m-g-_-v),b=[a(`subagentProgress`,{running:g,completed:_}),v?a(`subagentSummaryOther`,{count:v}):``,y?a(`subagentSummaryUnknown`,{count:y}):``].filter(Boolean).join(` · `),x=u?.childExecutionAdmission,S=(c?.workflows?.items??[]).some(e=>e.status===`running`);(0,K.useEffect)(()=>{if(!S)return;let e=window.setInterval(()=>s(e=>e+1),1e3);return()=>window.clearInterval(e)},[S]);let C=[];for(let e of c?.workflows?.items??[]){let t=e.agents.done+e.agents.error,n=e.agents.total?` · ${a(`activityAgentProgress`,{completed:t,total:e.agents.total})}`:``,r=e.status===`running`&&e.currentPhase?` · ${e.currentPhase}`:``,i=ID(e.startedAt,e.finishedAt);C.push({key:`workflow-${e.runId}`,kind:`workflow`,label:`${e.name||e.runId}${r}${n}`,elapsed:i,status:HD(e.status)})}C.sort((e,t)=>Number(t.status===`running`)-Number(e.status===`running`));let w=c?.workflows?.omitted??0;if(!C.length&&!w&&!(t&&m)&&!x?.enabled)return null;let T=C.filter(e=>e.status===`running`).length+g,E=C.filter(e=>e.status===`error`).length+h.filter(e=>e.state===`error`).length,D=[n&&T>0?a(`runtimeActivityRunning`,{count:T}):a(`runtimeActivityCount`,{count:C.length+m+w}),E>0?a(`processFailureCount`,{count:E}):``].filter(Boolean).join(` · `);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`details`,{className:`activity-summary`,open:r,onToggle:e=>{e.currentTarget.open!==r&&i?.(e.currentTarget.open)},children:[(0,q.jsxs)(`summary`,{ref:o,children:[n&&T>0?(0,q.jsx)(`i`,{className:`activity-chip-dot`,"aria-hidden":`true`}):(0,q.jsx)(Uo,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a(`runtimeActivities`)}),(0,q.jsx)(is,{className:`activity-summary-chevron`,"aria-hidden":`true`})]}),(0,q.jsxs)(`div`,{className:`activity-bar composer-status-details`,hidden:r===!1,role:`status`,"aria-label":a(`runtimeActivities`),children:[t&&m>0&&(0,q.jsx)(`button`,{className:`activity-chip subagent-list-trigger`,type:`button`,onClick:()=>t(),children:b}),x?.enabled&&x.limit!==void 0&&(0,q.jsx)(`span`,{className:`activity-chip subagent-list-trigger`,children:a(`activityCapacity`,{running:x.held,limit:x.limit,queued:x.queued})}),C.map(({key:e,...t})=>(0,q.jsx)(UD,{...t},e)),w>0&&(0,q.jsxs)(`span`,{className:`activity-chip more`,children:[`+`,w]})]})]}),(0,q.jsx)(V,{anchorRef:o,focusTrigger:`always`,content:D,placement:`above`})]})}var GD={count:32,textBytes:1048576,imageBytes:134217728};function KD(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function qD(e){if(e.length>8192)return!1;try{let t=JSON.parse(e);return Array.isArray(t)&&(t.length===3&&t[0]===`session`&&typeof t[1]==`string`&&t[1].length>0&&t[1].length<=1024&&typeof t[2]==`string`&&t[2].length>0&&t[2].length<=4096||t.length===2&&t[0]===`workspace`&&(t[1]===null||typeof t[1]==`string`&&t[1].length<=4096))}catch{return!1}}function JD(e,t){if(!qD(e)||!KD(t)||typeof t.prompt!=`string`||t.prompt.length*2>GD.textBytes||!Array.isArray(t.images))return null;let n=[],r=[],i=!1,a=typeof t.caret==`number`&&Number.isSafeInteger(t.caret)&&t.caret>=0&&t.caret<=t.prompt.length?t.caret:t.prompt.length;a!==t.caret&&(i=!0);let o=0;for(let e of t.images){if(!KD(e)||typeof e.name!=`string`||e.name.length>1024||typeof e.data!=`string`||typeof e.size!=`number`||!Number.isSafeInteger(e.size)||e.size<=0||e.size>10485760||e.data.length!==Math.ceil(e.size/3)*4||!/^[A-Za-z0-9+/]*={0,2}$/u.test(e.data)){i=!0;continue}try{let t=atob(e.data);if(t.length!==e.size){i=!0;continue}let r=gd(Uint8Array.from(t.slice(0,12),e=>e.charCodeAt(0)));if(!r||r!==e.mimeType||n.length>=8||o+e.size>33554432){i=!0;continue}o+=e.size,n.push({id:typeof e.id==`string`&&e.id.length<=1024?e.id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${n.length}-${e.name}`,name:e.name,size:e.size,data:e.data,mimeType:r,previewUrl:`data:${r};base64,${e.data}`})}catch{i=!0}}let s=0;for(let e of Array.isArray(t.files)?t.files:[]){if(!KD(e)||typeof e.name!=`string`||!e.name||e.name.length>1024||/[\u0000-\u001f\u007f]/u.test(e.name)||typeof e.mimeType!=`string`||e.mimeType.length>256||typeof e.data!=`string`||typeof e.size!=`number`||!Number.isSafeInteger(e.size)||e.size<0||e.size>52428800||e.data.length!==Math.ceil(e.size/3)*4||!/^[A-Za-z0-9+/]*={0,2}$/u.test(e.data)||r.length+n.length>=8||s+e.size>52428800||e.text!==void 0&&(typeof e.text!=`string`||new TextEncoder().encode(e.text).length>1048576)){i=!0;continue}try{if(atob(e.data).length!==e.size){i=!0;continue}s+=e.size,r.push({id:typeof e.id==`string`&&e.id.length<=1024?e.id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${r.length}`,name:e.name,mimeType:e.mimeType,size:e.size,data:e.data,...typeof e.text==`string`?{text:e.text}:{},extraction:e.extraction===`text`||e.extraction===`truncated`?e.extraction:`unavailable`,...e.extraction===`unavailable`&&(e.extractionError===`encoding`||e.extractionError===`document`)?{extractionError:e.extractionError}:{}})}catch{i=!0}}return t.files!==void 0&&!Array.isArray(t.files)&&(i=!0),{draft:{prompt:t.prompt,caret:a,images:n,...r.length?{files:r}:{},revision:0},invalid:i}}var YD=`openpi.composer-drafts`,XD=`drafts`;function ZD(){let e=()=>new Promise((e,t)=>{let n;try{n=window.indexedDB.open(YD,1)}catch(e){t(e);return}n.onupgradeneeded=()=>{n.result.createObjectStore(XD,{keyPath:`key`}).createIndex(`usage`,[`textBytes`,`imageBytes`])},n.onerror=()=>t(n.error),n.onblocked=()=>{n.onsuccess=()=>n.result.close(),t(Error(`draft-storage-blocked`))},n.onsuccess=()=>{n.result.onversionchange=()=>n.result.close(),e(n.result)}});return{async read(){let t=await e();try{return await new Promise((e,n)=>{let r=t.transaction(XD,`readonly`),i=r.objectStore(XD).getAll(void 0,GD.count+1),a=[];i.onsuccess=()=>{a=i.result},r.oncomplete=()=>e(a),i.onerror=()=>n(i.error),r.onabort=()=>n(r.error)})}finally{t.close()}},async write(t){let n=await e();try{await new Promise((e,r)=>{let i=n.transaction(XD,`readwrite`),a=i.objectStore(XD),o=new Set(t.map(({key:e})=>e)),s=0,c=0,l=0,u=a.index(`usage`).openKeyCursor();u.onsuccess=()=>{let e=u.result;if(e){if(!o.has(String(e.primaryKey))){let t=e.key;s+=1,c+=t[0],l+=t[1]}e.continue();return}for(let{draft:e}of t)e&&(s+=1,c+=e.prompt.length*2,l+=e.images.reduce((e,t)=>e+t.size,0)+(e.files??[]).reduce((e,t)=>e+t.size+(t.text?.length??0)*2,0));if(s>GD.count||c>GD.textBytes||l>GD.imageBytes){i.abort();return}for(let{key:e,draft:n}of t)n?a.put({key:e,draft:{prompt:n.prompt,caret:n.caret,images:n.images.map(({previewUrl:e,...t})=>t),...n.files?.length?{files:n.files}:{}},textBytes:n.prompt.length*2,imageBytes:n.images.reduce((e,t)=>e+t.size,0)+(n.files??[]).reduce((e,t)=>e+t.size+(t.text?.length??0)*2,0)}):a.delete(e)},i.oncomplete=()=>e(),i.onerror=()=>r(i.error),i.onabort=()=>r(i.error??Error(`draft-storage-limit`))})}finally{n.close()}}}}function QD(e){let t=new Map,n=new Set,r=new Map,i=new Set,a={status:e?`loading`:`saved`,invalid:!1},o=!1,s=!!e,c=0,l=()=>({prompt:``,images:[],caret:0,revision:c,files:void 0}),u=e=>e.prompt.length>0||e.images.length>0||!!e.files?.length,d=e=>e.images.reduce((e,t)=>e+t.size,0)+(e.files??[]).reduce((e,t)=>e+t.size+(t.text?.length??0)*2,0),f=(e={})=>{a={...a,...e};for(let e of i)e()},p=(e,n)=>{let r=0,i=0,a=0;for(let[n,o]of t)n!==e&&(r+=1,i+=o.prompt.length*2,a+=d(o));return u(n)&&(r+=1),i+=n.prompt.length*2,a+=d(n),r<=GD.count&&i<=GD.textBytes&&a<=GD.imageBytes},m=async()=>{if(!e||s||o||r.size===0)return;o=!0,f({status:`pending`});let t=Array.from(r,([e,t])=>({key:e,draft:t}));r.clear();try{await e.write(t),o=!1,f({status:r.size>0?`pending`:`saved`}),r.size>0&&m()}catch{for(let{key:e,draft:n}of t)r.has(e)||r.set(e,n);o=!1,f({status:`failed`})}},h=(t,i)=>{s&&n.add(t),e&&(r.set(t,i),s||f({status:`pending`}),Promise.resolve().then(m))},g=()=>e?e.read().then(e=>{let i=!1;for(let r of e){if(typeof r!=`object`||!r||!(`key`in r)||typeof r.key!=`string`||!(`draft`in r)){i=!0;continue}if(n.has(r.key))continue;let e=JD(r.key,r.draft);if(!e||!u(e.draft)||!p(r.key,e.draft)){i=!0;continue}i||=e.invalid,t.set(r.key,{...e.draft,revision:++c})}n.clear(),s=!1,f({status:r.size>0?`pending`:`saved`,invalid:i}),m()}).catch(()=>{f({status:`failed`})}):Promise.resolve();return{ready:g(),storageState:()=>a,subscribe(e){return i.add(e),()=>i.delete(e)},hasContent:()=>t.size>0,hasUnsavedChanges:()=>r.size>0||o,retryStorage(){return s?(f({status:`loading`}),g()):m()},read(e){return t.get(e)??l()},edit(e,n,r){let i={...n,...r};if(i.caret=Math.min(Math.max(i.caret,0),i.prompt.length),i.prompt!==n.prompt||i.images!==n.images||i.files!==n.files){if(!p(e,i))return null;i.revision=++c}return u(i)?t.set(e,i):t.delete(e),(i.prompt!==n.prompt||i.images!==n.images||i.files!==n.files||i.caret!==n.caret)&&h(e,u(i)?i:null),i},clear(e,n){return t.get(e)?.revision===n?(t.delete(e),c+=1,h(e,null),l()):null},move(e,n){if(t.has(n))return!1;let r=t.get(e);return r&&(t.delete(e),t.set(n,r),h(e,null),h(n,r)),!0}}}var $D=(0,K.createContext)(null);$D.displayName=`LayoutDividerContext`;var eO=(0,K.lazy)(async()=>Ee(()=>import(`./app-Tooltip.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2]))),tO={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function nO({level:e,type:t,accessibilityLevel:n,color:r=`primary`,display:i=`block`,maxLines:a=0,hasTruncateTooltip:o=!0,wordBreak:s,textWrap:c,justify:l=`start`,hasCapsize:u=!1,hasStrikethrough:d=!1,xstyle:f,className:p,style:m,children:h,ref:g,..._}){let v=tO[e],y=n&&n!==e?{"aria-level":n}:{},b=s??(a===1?`break-all`:`break-word`),x=a>0||u?`block`:i,S=dt({maxLines:a}),C=typeof o==`string`?o:`above`,T=a>0&&o!==!1&&S.isTruncated,E=(0,K.useRef)(null),D=we(g,S.ref,E),k=a>1?{WebkitLineClamp:a}:void 0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(v,{ref:D,...H(O(`heading`,{level:e,color:r,...t&&{type:t}}),w(Ge[At(r)],t?Je[t]:Xe[e],t&&qe[t],a===1?Qe.singleLine:a>1?Qe.multiLine:Ze[x],a>0&&$e[b],c&&et[c],l!==`start`&&it[l],u&&tt.enabled,d&&nt.strikethrough,f),p,{...m,...k}),...y,..._,children:h}),T&&(0,q.jsx)(K.Suspense,{fallback:null,children:(0,q.jsx)(eO,{anchorRef:E,content:(0,q.jsx)(`span`,{...w(at.content),children:S.fullText}),placement:C})})]})}nO.displayName=`Heading`;var rO={scale:1,x:0,y:0};function iO({children:e,original:t,disabled:n=!1}){let{t:r}=W(),i=(0,K.useRef)(null),a=(0,K.useRef)(null),o=(0,K.useRef)(void 0),s=(0,K.useRef)(rO),[c,l]=(0,K.useState)(rO),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(2),[m,h]=(0,K.useState)(!1),g=(0,K.useRef)(null),_=(0,K.useCallback)((e,t=!1)=>{let n=a.current,r=n&&t?getComputedStyle(n).transform:`none`;o.current?.cancel(),s.current=e,l(e),n?.animate&&t&&!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches&&(o.current=n.animate([{transform:r},{transform:`translate(${e.x}px, ${e.y}px) scale(${e.scale})`}],{duration:160,easing:`cubic-bezier(.16, 1, .3, 1)`}))},[]),v=(0,K.useCallback)(()=>{if(o.current?.playState!==`running`||!a.current)return;let e=new DOMMatrixReadOnly(getComputedStyle(a.current).transform);_({scale:e.a,x:e.e,y:e.f})},[_]);(0,K.useEffect)(()=>()=>o.current?.cancel(),[]);let y=(0,K.useCallback)(e=>{let t=a.current?.querySelector(`img`);if(!t||!a.current)return rO;let n=Math.max(0,(t.offsetWidth*e.scale-a.current.clientWidth)/2),r=Math.max(0,(t.offsetHeight*e.scale-a.current.clientHeight)/2);return{scale:e.scale,x:Math.max(-n,Math.min(n,e.x)),y:Math.max(-r,Math.min(r,e.y))}},[]),b=(0,K.useCallback)((e,t,n=!0)=>{let r=a.current?.querySelector(`img`),o=i.current?.getBoundingClientRect();if(!r?.offsetWidth||!o)return;let c=Math.min(8,Math.max(2,r.naturalWidth/r.offsetWidth));p(c);let l=Math.max(1,Math.min(c,e)),u=l/s.current.scale,d=t?t.x-o.left-o.width/2:0,f=t?t.y-o.top-o.height/2:0;_(y({scale:l,x:d-(d-s.current.x)*u,y:f-(f-s.current.y)*u}),n)},[y,_]),x=(0,K.useCallback)((e=!1)=>{let t=g.current;g.current=null,h(!1),t&&(e&&_(t.view),i.current?.hasPointerCapture(t.pointerId)&&i.current.releasePointerCapture(t.pointerId))},[_]);return(0,K.useEffect)(()=>{x(),_(rO);let e=i.current;if(!e||t)return;let n=t=>{if(a.current?.querySelector(`img`)?.complete){if(v(),t.ctrlKey)t.preventDefault(),b(s.current.scale*Math.exp(-t.deltaY*.01),{x:t.clientX,y:t.clientY},!1);else if(s.current.scale>1){t.preventDefault();let n=t.deltaMode===1?16:t.deltaMode===2?e.clientHeight:1;_(y({...s.current,x:s.current.x-t.deltaX*n,y:s.current.y-t.deltaY*n}))}}},r=()=>{x(),_(rO)};return e.addEventListener(`wheel`,n,{passive:!1}),window.addEventListener(`resize`,r),()=>{e.removeEventListener(`wheel`,n),window.removeEventListener(`resize`,r)}},[t,y,x,v,_,b]),(0,q.jsxs)(`section`,{ref:i,className:`draft-image-preview-body`,"aria-label":r(`imageViewMode`),"data-mode":t?`original`:`fit`,"data-zoomed":!t&&c.scale>1||void 0,"data-dragging":m||void 0,tabIndex:!n&&(t||u)?0:void 0,onLoadCapture:()=>{d(!0),_(rO)},onErrorCapture:()=>{d(!1),_(rO)},onDoubleClick:e=>{t||!(e.target instanceof HTMLImageElement)||b(c.scale>1?1:2,{x:e.clientX,y:e.clientY})},onPointerDown:e=>{t||g.current||e.button!==0||c.scale<=1||!(e.target instanceof Node)||!a.current?.contains(e.target)||(e.preventDefault(),e.currentTarget.focus({preventScroll:!0}),v(),g.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,view:s.current},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=g.current;if(!t||t.pointerId!==e.pointerId)return;let n=e.clientX-t.x,r=e.clientY-t.y;!m&&Math.hypot(n,r)<4||(h(!0),_(y({...t.view,x:t.view.x+n,y:t.view.y+r})))},onPointerUp:e=>{g.current?.pointerId===e.pointerId&&x()},onPointerCancel:e=>{g.current?.pointerId===e.pointerId&&x(!0)},onLostPointerCapture:()=>x(!0),onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||t||e.target!==e.currentTarget)){if(e.key===`+`||e.key===`=`)b(c.scale*1.25);else if(e.key===`-`)b(c.scale/1.25);else if(e.key===`0`)b(1);else if(e.key===`Escape`&&g.current)x(!0);else if(c.scale>1&&[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key))_(y({...c,x:c.x+(e.key===`ArrowLeft`?40:e.key===`ArrowRight`?-40:0),y:c.y+(e.key===`ArrowUp`?40:e.key===`ArrowDown`?-40:0)}),!0);else return;e.preventDefault(),e.stopPropagation()}},children:[(0,q.jsx)(`div`,{ref:a,className:`image-zoom-layer`,style:t?void 0:{transform:`translate(${c.x}px, ${c.y}px) scale(${c.scale})`},children:e}),!t&&u&&(0,q.jsxs)(`fieldset`,{className:`image-zoom-controls`,"aria-label":r(`imageZoom`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`zoomOut`),disabled:c.scale<=1,onClick:()=>b(c.scale/1.25),children:(0,q.jsx)(Qc,{"aria-hidden":`true`})}),(0,q.jsxs)(`output`,{"aria-label":r(`imageZoom`),title:r(`imageZoomHelp`),children:[Math.round(c.scale*100),`%`]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`zoomIn`),disabled:c.scale>=f,onClick:()=>b(c.scale*1.25),children:(0,q.jsx)(Zc,{"aria-hidden":`true`})})]})]})}function aO(e,t,n){if(!e.animate||!e.showPopover||!e.complete||!e.naturalWidth||!t.isConnected||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();if(!r.width||!r.height||!i.width||!i.height)return;let a=Math.max(i.width/r.width,i.height/r.height),o=i.left+i.width/2-r.left-r.width/2,s=i.top+i.height/2-r.top-r.height/2,c=Math.max(0,(1-i.width/(r.width*a))*50),l=Math.max(0,(1-i.height/(r.height*a))*50),u=Number.parseFloat(getComputedStyle(t).borderRadius)||0,d=e.closest(`.draft-image-preview-body`)?.getBoundingClientRect(),f=!n&&d?[Math.max(0,d.top-r.top)/r.height*100,Math.max(0,r.right-d.right)/r.width*100,Math.max(0,r.bottom-d.bottom)/r.height*100,Math.max(0,d.left-r.left)/r.width*100]:[0,0,0,0],p={transform:`translate(${o}px, ${s}px) scale(${a})`,clipPath:`inset(${l}% ${c}% round ${u/a}px)`},m={transform:`translate(0, 0) scale(1)`,clipPath:`inset(${f.map(e=>`${e}%`).join(` `)} round 0px)`},h=document.createElement(`img`);h.src=e.currentSrc||e.src,h.alt=``,h.popover=`manual`,h.inert=!0,h.setAttribute(`aria-hidden`,`true`),h.className=`image-preview-flight`,Object.assign(h.style,{position:`fixed`,inset:`auto`,left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,maxWidth:`none`,maxHeight:`none`,margin:`0`,padding:`0`,border:`0`,background:`transparent`,pointerEvents:`none`,objectFit:`fill`,transformOrigin:`center`,overflow:`visible`}),document.body.append(h),h.showPopover();let g=e.style.visibility,_=t.style.visibility;e.style.visibility=t.style.visibility=`hidden`;let v=h.animate(n?[p,m]:[m,p],{duration:n?260:180,easing:n?`cubic-bezier(.16, 1, .3, 1)`:`cubic-bezier(.4, 0, .2, 1)`,fill:`both`}),y=e.closest(`dialog`),b=()=>{v.onfinish=v.oncancel=null,v.cancel(),h.remove(),e.style.visibility=g,t.style.visibility=_,window.removeEventListener(`resize`,b),y?.removeEventListener(`pointerdown`,b)};return v.onfinish=v.oncancel=b,window.addEventListener(`resize`,b),y?.addEventListener(`pointerdown`,b),b}function oO({ownerKey:e,images:t,onRemove:n}){let{t:r}=W(),i=(0,K.useRef)(null),a=(0,K.useRef)(new Map),o=(0,K.useRef)(null),s=(0,K.useRef)(null),[c,l]=(0,K.useState)(null),u=(0,K.useRef)(null),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(`fit`),h=c?.ownerKey===e?t.find(e=>e.id===c.id):void 0,g=c?JSON.stringify([c.ownerKey,c.id]):``,_=!!(h&&c?.open);(0,K.useLayoutEffect)(()=>{let n=o.current;n&&(n.owner!==e||!t.some(e=>e.id===n.id))&&(n.stop(),o.current=null)},[e,t]),(0,K.useLayoutEffect)(()=>()=>o.current?.stop(),[]),(0,K.useEffect)(()=>{if(!_){s.current=null;return}o.current?.stop();let t=s.current!==null;s.current=g;let n=i.current?.querySelector(`.image-zoom-layer img`),r=h&&a.current.get(h.id);if(!n||!r||!h)return;let c=0,l,u=()=>{cancelAnimationFrame(c),c=requestAnimationFrame(()=>{if(!i.current?.open)return;if(t){window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||(l=n.animate?.([{opacity:0},{opacity:1}],{duration:160,easing:`ease-out`}));return}let a=aO(n,r,!0);a&&(o.current={owner:e,id:h.id,stop:a})})};return n.complete?u():n.addEventListener(`load`,u,{once:!0}),()=>{cancelAnimationFrame(c),n.removeEventListener(`load`,u),l?.cancel()}},[_,g,e,h]);let v=t.findIndex(e=>e.id===h?.id),y=e=>{let n=t[v+e];!c||!n||(f(null),m(`fit`),l({...c,id:n.id}))},b=()=>{if(!_)return;o.current?.stop(),o.current=null;let t=i.current?.querySelector(`.image-zoom-layer img`),n=h&&a.current.get(h.id);if(t&&n&&h){let r=aO(t,n,!1);r&&(o.current={owner:e,id:h.id,stop:r})}u.current=c,l(e=>e&&{...e,open:!1})};return(0,K.useEffect)(()=>{if(c&&!h){u.current=null,l(null);return}if(_||!u.current)return;let n=u.current;u.current=null;let r=document.activeElement;n.ownerKey===e&&t.some(e=>e.id===n.id)&&n.trigger.isConnected&&(r===document.body||i.current?.contains(r))&&n.trigger.focus()},[c,h,_,e,t]),(0,q.jsxs)(q.Fragment,{children:[t.length>0&&(0,q.jsx)(`section`,{className:`composer-attachment-group`,"aria-label":r(`imageAttachments`),children:t.map(t=>(0,q.jsxs)(`div`,{className:`composer-attachment`,children:[(0,q.jsx)(V,{content:r(`previewAttachment`),placement:`above`,children:(0,q.jsxs)(`button`,{type:`button`,className:`composer-attachment-preview`,"aria-label":`${r(`previewAttachment`)} ${t.name}`,onClick:n=>{n.currentTarget.focus(),n.currentTarget.blur(),u.current=null,f(null),m(`fit`),l({ownerKey:e,id:t.id,trigger:n.currentTarget,open:!0})},children:[(0,q.jsx)(`img`,{ref:e=>{e?a.current.set(t.id,e):a.current.delete(t.id)},src:t.previewUrl,alt:``}),(0,q.jsxs)(`span`,{title:t.name,children:[t.name,(0,q.jsxs)(`small`,{children:[(t.size/1024).toFixed(1),` KB`]})]})]})}),(0,q.jsx)(V,{content:r(`removeAttachment`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-attachment-remove`,"aria-label":`${r(`removeAttachment`)} ${t.name}`,onClick:()=>n(t.id),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},t.id))}),(0,q.jsx)(Se,{ref:i,className:`draft-image-dialog`,isOpen:_,onOpenChange:e=>!e&&b(),purpose:`info`,width:800,maxHeight:`calc(100dvh - 32px)`,padding:0,"aria-label":`${r(`previewAttachment`)} ${h?.name??``}`.trim(),children:h&&(0,q.jsxs)(`section`,{className:`draft-image-preview`,inert:!_,"aria-label":r(`imageAttachments`),onKeyDown:e=>{p===`original`||e.defaultPrevented||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||e.altKey||e.ctrlKey||e.metaKey||!(e.target instanceof HTMLElement)||!e.target.classList.contains(`draft-image-preview-body`)||(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&(e.preventDefault(),y(e.key===`ArrowLeft`?-1:1))},children:[(0,q.jsxs)(`header`,{children:[(0,q.jsx)(`strong`,{title:h.name,children:h.name}),t.length>1&&(0,q.jsxs)(`div`,{className:`image-gallery-navigation`,children:[(0,q.jsx)(V,{content:r(`previousImage`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`previousImage`),disabled:v<=0,onClick:()=>y(-1),children:(0,q.jsx)(as,{"aria-hidden":`true`})})}),(0,q.jsxs)(`output`,{"aria-label":r(`imagePosition`,{current:v+1,total:t.length}),children:[v+1,` / `,t.length]}),(0,q.jsx)(V,{content:r(`nextImage`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`nextImage`),disabled:v>=t.length-1,onClick:()=>y(1),children:(0,q.jsx)(os,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`fieldset`,{className:`draft-image-preview-modes`,"aria-label":r(`imageViewMode`),children:[(0,q.jsx)(V,{content:r(`fitImage`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`fitImage`),"aria-pressed":p===`fit`,disabled:d===g,onClick:()=>m(`fit`),children:(0,q.jsx)(Ec,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:r(`originalImageSize`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`originalImageSize`),"aria-pressed":p===`original`,disabled:d===g,onClick:()=>m(`original`),children:(0,q.jsx)(ac,{"aria-hidden":`true`})})})]}),(0,q.jsx)(V,{content:r(`closeImagePreview`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,"aria-label":r(`closeImagePreview`),onClick:b,children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]}),(0,q.jsx)(iO,{original:p===`original`,disabled:d===g,children:d===g?(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`alert`,children:r(`imagePreviewFailed`)}):(0,q.jsx)(`img`,{src:h.previewUrl,alt:h.name,draggable:!1,onError:()=>f(g)},g)},g)]})})]})}function sO({ownerKey:e,files:t,onRemove:n}){let{t:r}=W(),i=(0,K.useRef)(null),[a,o]=(0,K.useState)(null),s=(0,K.useRef)(null),c=a?.ownerKey===e?t.find(e=>e.id===a.id):void 0,l=!!(c&&a?.open),u=()=>{l&&(s.current=a,o(e=>e&&{...e,open:!1}))};(0,K.useEffect)(()=>{if(a&&!c){s.current=null,o(null);return}if(l||!s.current)return;let n=s.current;s.current=null;let r=document.activeElement;n.ownerKey===e&&t.some(e=>e.id===n.id)&&n.trigger.isConnected&&(r===document.body||i.current?.contains(r))&&n.trigger.focus()},[a,c,l,e,t]);let d=e=>r(e.extractionError?`fileAttachmentExtractionFailed`:e.extraction===`truncated`?`fileAttachmentTextTruncated`:e.extraction===`text`?`fileAttachmentTextReady`:`fileAttachmentOriginalReady`);return(0,q.jsxs)(q.Fragment,{children:[t.length>0&&(0,q.jsx)(`section`,{className:`composer-attachment-group`,"aria-label":r(`fileAttachments`),children:t.map(t=>(0,q.jsxs)(`div`,{className:`composer-attachment composer-file-attachment`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`composer-attachment-preview`,"aria-label":`${r(`previewFileAttachment`)} ${t.name}`,onClick:n=>{n.currentTarget.focus(),n.currentTarget.blur(),s.current=null,o({ownerKey:e,id:t.id,trigger:n.currentTarget,open:!0})},children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{title:t.name,children:[t.name,(0,q.jsxs)(`small`,{children:[(t.size/1024).toFixed(1),` KB ·`,` `,d(t)]})]})]}),(0,q.jsx)(V,{content:`${r(`removeAttachment`)} ${t.name}`,placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-attachment-remove`,"aria-label":`${r(`removeAttachment`)} ${t.name}`,onClick:()=>n(t.id),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},t.id))}),(0,q.jsx)(Se,{ref:i,isOpen:l,onOpenChange:e=>!e&&u(),purpose:`info`,width:720,maxHeight:`calc(100dvh - 32px)`,padding:0,"aria-label":`${r(`previewFileAttachment`)} ${c?.name??``}`.trim(),children:c&&(0,q.jsxs)(`div`,{className:`draft-file-preview`,inert:!l,children:[(0,q.jsxs)(`header`,{children:[(0,q.jsxs)(`div`,{className:`draft-preview-heading`,children:[(0,q.jsx)(`strong`,{title:c.name,children:c.name}),(0,q.jsxs)(`p`,{children:[d(c),` · `,(c.size/1024).toFixed(1),` KB`]})]}),(0,q.jsx)(V,{content:r(`closePreview`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,"aria-label":r(`closePreview`),onClick:u,children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`div`,{className:`draft-file-preview-content`,children:[c.extractionError&&(0,q.jsx)(`p`,{children:r(c.extractionError===`encoding`?`fileAttachmentEncodingUnavailable`:`fileAttachmentDocumentUnavailable`)}),c.text===void 0?(0,q.jsx)(`p`,{children:r(`fileAttachmentNoText`)}):(0,q.jsxs)(`pre`,{children:[c.text.slice(0,2e4),c.text.length>2e4?`\n${r(`fileAttachmentPreviewTruncated`)}`:``]})]})]})})]})}var cO=new Set(`txt md markdown csv tsv json jsonl ndjson xml html htm css scss sass less yaml yml toml ini cfg conf config log rst tex diff patch sql graphql gql py ipynb js mjs cjs jsx ts mts cts tsx java kt kts scala c cc cpp cxx h hpp cs go rs rb php swift sh bash zsh fish ps1 bat cmd r lua pl proto vue svelte astro svg srt vtt env gitignore dockerignore editorconfig properties lock`.split(` `));function lO(e,t,n){let r=e.split(`.`).at(-1)?.toLowerCase()||``;return new TextDecoder(`ascii`).decode(n.subarray(0,5))===`%PDF-`?`pdf`:[`pdf`,`docx`,`xlsx`,`pptx`].includes(r)?r:cO.has(r)||/^(?:readme|license|licence|changelog|dockerfile|makefile|gemfile)$/iu.test(e)||t.startsWith(`text/`)||/^application\/(?:json|(?:[^;]+\+)?xml|javascript|x-yaml)(?:;|$)/iu.test(t)?`text`:`binary`}var uO=15e3;function dO(e,t){return new Promise((n,r)=>{let i=new FileReader,a=e=>{clearTimeout(s),t?.removeEventListener(`abort`,o),e?r(e):i.result instanceof ArrayBuffer?n(i.result):r(Error(`file-read`))},o=()=>{i.abort(),a(new DOMException(`File staging cancelled.`,`AbortError`))},s=setTimeout(()=>{i.abort(),a(Error(`file-timeout`))},uO);i.onload=()=>a(),i.onerror=()=>a(Error(`file-read`)),t?.addEventListener(`abort`,o,{once:!0}),t?.aborted?o():i.readAsArrayBuffer(e)})}function fO(e,t,n){return new Promise((r,i)=>{let a=new Worker(new URL(`/app-file-text-worker-DegOHoqE.js`,``+import.meta.url),{type:`module`}),o=(e,t)=>{clearTimeout(c),n?.removeEventListener(`abort`,s),a.terminate(),t?i(t):e?r(e):i(Error(`file-document-invalid`))},s=()=>o(void 0,new DOMException(`File staging cancelled.`,`AbortError`)),c=setTimeout(()=>o(void 0,Error(`file-timeout`)),uO);a.onmessage=e=>{!e.data||!(`result`in e.data||`error`in e.data)||(e.data.error?o(void 0,Error(e.data.error)):o(e.data.result))},a.onerror=()=>o(void 0,Error(`file-document-invalid`)),n?.addEventListener(`abort`,s,{once:!0}),n?.aborted?s():a.postMessage({data:e,kind:t},[e])})}async function pO(e,t){if(e.size>52428800)throw Error(`file-size`);let n=await dO(e,t),r=new Uint8Array(n),i=lO(e.name,e.type,r),a=r.length,o=await fO(n,i,t);return t?.throwIfAborted(),{id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${e.name}`,name:e.name||`file`,size:a,mimeType:e.type||`application/octet-stream`,...o}}var mO=!1;typeof window<`u`&&requestAnimationFrame(()=>{mO=!0});var hO={slideDown:{kKVMdj:`x1srr2gu x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},slideUp:{kKVMdj:`x1dvww92 x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},fadeIn:{kKVMdj:`xqcmdr3 x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},scaleIn:{kKVMdj:`x97zbip x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0}};function gO(e=`slideDown`){let[t]=(0,K.useState)(()=>mO);return t?hO[e]:null}var _O=new Set([`text`,`password`,`email`,`number`,`search`,`tel`,`url`,`date`,`datetime-local`,`month`,`time`,`week`]),vO=new Set([`true`,`menu`,`listbox`,`tree`,`grid`,`dialog`]);function yO(e){if(e.getAttribute(`role`)===`combobox`)return!0;let t=e.getAttribute(`aria-haspopup`);return t!=null&&vO.has(t)}function bO({containerRef:e,inputRef:t,disabled:n=!1}){return Oa({containerRef:e,interactiveRef:t,onClick:(0,K.useCallback)(()=>{let e=t.current;e!=null&&(e instanceof HTMLElement&&yO(e)?e.click():e instanceof HTMLInputElement&&_O.has(e.type)||e instanceof HTMLTextAreaElement?e.focus():e instanceof HTMLElement?e.click():`focus`in e&&e.focus())},[t]),disabled:n})}var xO={warning:`warning`,error:`error`,success:`success`},SO={warning:`@astryx.input.statusButton.warning`,error:`@astryx.input.statusButton.error`,success:`@astryx.input.statusButton.success`},CO={statusButton:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kfzvcC:`x67bb7w`,kaIpWk:`xjspbzw`,kInvED:`x7s97pk`,$$css:!0}};function wO({status:e,statusVariant:t=`attached`,isInGroup:n=!1,size:r=`md`}){let i=jr(),a=t===`tooltip`&&!!e?.message,[o,s]=(0,K.useState)(void 0),c=F({placement:`above`,isEnabled:a,isOpen:o}),l=(0,K.useCallback)(()=>{s(void 0)},[]),u=(0,K.useCallback)(()=>{typeof window>`u`||typeof window.matchMedia!=`function`||!window.matchMedia(`(hover: none)`).matches||s(e=>e!==!0)},[]);if((0,K.useEffect)(()=>{if(o!==!0)return;let e=e=>{e.key===`Escape`&&s(void 0)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),!(e&&!n&&t!==`detached`))return{statusIcon:null,describedBy:void 0};let d=(0,q.jsx)(ya,{icon:xO[e.type],size:r,color:e.type,...O(`input-status-icon`,{size:r,status:e.type})});return a?{statusIcon:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{type:`button`,ref:c.ref,"aria-label":i(SO[e.type]),"aria-describedby":c.describedBy,onClick:u,onBlur:l,...w(fe.focusVisible,CO.statusButton),children:d}),c.renderTooltip(e.message)]}),describedBy:c.describedBy}:{statusIcon:d,describedBy:void 0}}var TO=(0,K.createContext)({direction:`vertical`});TO.displayName=`FormLayoutContext`;var EO={label:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`xzye2dw`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kLWn49:`x1kq96og`,k63SB2:`x1e4wzip`,kMwMTN:`xv1l7n4`,kkrTdU:`x1ypdohk x16khyan`,$$css:!0},labelDisabled:{kMwMTN:`xnbbluu`,kkrTdU:`xt0e3qv`,$$css:!0},srOnly:{ksu8eU:`xng3xce`,kMcinP:`xzpqnlu`,kZKoxP:`xjm9jq1`,kLqNvP:`x1o0tod`,kogj98:`xkdpibf`,kVQacm:`xb3r6kr`,kmVPX3:`x1717udv`,kfzvcC:`x47corl`,kVAEAm:`x10l6tqk`,k87sOh:`x13vifvy`,kfSwDN:`x87ps6o`,khDVqt:`xuxw1ft`,kzqmXN:`x1i1rx1s`,$$css:!0}};function DO({label:e,inputID:t,labelID:n,isGroupLabel:r=!1,isLabelHidden:i=!1,isDisabled:a=!1,isOptional:o=!1,isRequired:s=!1,labelIcon:c,labelTooltip:l,description:u,descriptionID:d,className:f,style:p,xstyle:m,ref:h,...g}){let _=jr(),{defaultOptionality:v}=(0,K.use)(TO),y=o&&v!==`optional`?_(`@astryx.field.optional`):s&&v!==`required`?_(`@astryx.field.required`):null,b=r?`span`:`label`,x=!r&&t!=null,S=(0,K.useRef)(null),C=bO({containerRef:S,inputRef:(0,K.useMemo)(()=>({get current(){return t==null?null:S.current?.ownerDocument.getElementById(t)??null},set current(e){}}),[t]),disabled:!x}),T=(0,q.jsxs)(q.Fragment,{children:[c&&xa(c,{size:`sm`,color:`inherit`}),e,y&&(0,q.jsxs)(`span`,{className:`x1sodnla x141an7d x1ltkj2j xv1l7n4`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ∙ `}),y]}),l&&(0,q.jsx)(V,{content:l,placement:`above`,children:(0,q.jsx)(ya,{icon:`info`,size:`sm`,color:`inherit`})})]});return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(b,{ref:h,id:n,htmlFor:r?void 0:t,...g,...H(O(`field-label`),w(EO.label,a&&EO.labelDisabled,i&&EO.srOnly,m),f,p),children:T}),u&&(0,q.jsx)(`span`,{ref:x?S:void 0,id:d,...x?C:void 0,...{0:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4`},2:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk x16khyan`},1:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s`},3:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk x16khyan xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s`}}[!!x<<1|!!i<<0],children:u})]})}DO.displayName=`FieldLabel`;var OO={warning:`warning`,error:`error`,success:`success`},kO={base:{kMv6JI:`x9ynric`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},attached:{keoZOQ:`x1c40v9y`,kLKAdn:`x1ak3mig`,kGO01o:`x1wesfrj`,kg3NbH:`xf314gf`,kVL7Gh:`xquck67`,kT0f0o:`x14i3lts`,$$css:!0},detached:{keoZOQ:`xcsaf9d`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`xh6dtrn`,$$css:!0}},AO={warning:{kWkggS:`x24i8r5`,kMwMTN:`xdhq94a`,$$css:!0},error:{kWkggS:`x1pritpl`,kMwMTN:`x1joocv1`,$$css:!0},success:{kWkggS:`xu13z74`,kMwMTN:`xltfdvo`,$$css:!0}};function jO({ref:e,type:t,message:n,id:r,variant:i=`attached`,xstyle:a,className:o,style:s,...c}){let l=gO(`slideDown`),u=vu();return(0,K.useEffect)(()=>{n&&u(n,t===`error`?`assertive`:`polite`)},[u,n,t]),(0,q.jsx)(`div`,{ref:e,id:r,...c,...H(O(`field-status`,{type:t,variant:i}),w(kO.base,l,i===`attached`?kO.attached:kO.detached,AO[t],a),o,s),children:i===`detached`?(0,q.jsxs)(`span`,{className:`x78zum5 x1cy8zhl xzye2dw`,children:[(0,q.jsx)(`span`,{className:`x3nfvp2 x6s0dn4 x14o5nre x2lah0s`,children:(0,q.jsx)(ya,{icon:OO[t],size:`sm`,color:`inherit`,...O(`field-status-icon`,{type:t})})}),(0,q.jsx)(`span`,{children:n})]}):n})}jO.displayName=`FieldStatus`;var MO={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,$$css:!0},containerGap:{kOIVth:`xzye2dw`,$$css:!0},horizontalLabels:{k1xSpc:`xjp7ctv`,$$css:!0}},NO={width:e=>[{kzqmXN:e==null?e:`x5lhr3w`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function PO({label:e,isLabelHidden:t=!1,description:n,inputID:r,labelID:i,isGroupLabel:a=!1,descriptionID:o,isOptional:s=!1,isRequired:c=!1,isDisabled:l=!1,labelIcon:u,status:d,labelTooltip:f,statusVariant:p=`attached`,width:m,xstyle:h,children:g,className:_,style:v,ref:y,...b}){let{direction:x}=(0,K.use)(TO),S=x===`horizontal-labels`,C=o??(n?`${r}-desc`:void 0),T=d?.messageID??(d?.message?`${r}-status`:void 0);Vr(`Field`,`isOptional and isRequired are mutually exclusive. isOptional takes precedence.`,s&&c);let E=(0,q.jsx)(DO,{label:e,inputID:r,labelID:i,isGroupLabel:a,isLabelHidden:t,isDisabled:l,isOptional:s,isRequired:c,labelIcon:u,labelTooltip:f,description:S?void 0:n,descriptionID:S?void 0:C}),D=d?.message&&p!==`tooltip`?(0,q.jsx)(jO,{type:d.type,message:d.message,id:T,variant:p}):null;return S?(0,q.jsxs)(`div`,{ref:y,...H(O(`field`,{layout:`horizontal-labels`}),w(MO.horizontalLabels,h),_,v),...b,children:[(0,q.jsx)(`div`,{className:`x1enrzb7`,children:E}),(0,q.jsxs)(`div`,{className:`x78zum5 xdt5ytf xc8icb0`,children:[n&&(0,q.jsx)(jt,{type:`supporting`,display:`block`,id:C,children:n}),g,D]})]}):(0,q.jsxs)(`div`,{ref:y,...H(O(`field`),w(MO.container,!t&&MO.containerGap,m!=null&&NO.width(m),h),_,v),...b,children:[E,p===`attached`?(0,q.jsxs)(`div`,{className:`x78zum5 xdt5ytf xc8icb0`,children:[g,D]}):(0,q.jsxs)(q.Fragment,{children:[g,D]})]})}PO.displayName=`Field`;var FO={base:{kB7OPa:`x9f619`,kVAEAm:`x1n2onr6`,kY2c9j:`x1vjfegm`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kVAM5u:`xvy26l8 x6q1khz`,"--_field-radius":`x1832zxr`,kaIpWk:`xvdfih8`,kWkggS:`x10xzikg`,k1ekBW:`x12zzom9`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kGVxlE:`x1gnnqk1 x1xqjsvb xuihb5h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kSiTet:`xbyyjgo`,kVAM5u:`xvy26l8`,kGVxlE:`x1gnnqk1`,$$css:!0}},IO={warning:{kVAM5u:`x8wg1ba`,$$css:!0},error:{kVAM5u:`x1ofxpqo`,$$css:!0},success:{kVAM5u:`x16m2moy`,$$css:!0}},LO={warning:{kGVxlE:`x1gnnqk1 x9156jc`,$$css:!0},error:{kGVxlE:`x1gnnqk1 x1bgmis8`,$$css:!0},success:{kGVxlE:`x1gnnqk1 x8wp45d`,$$css:!0}},RO={warning:{kVAM5u:`x8wg1ba xa1yw2k`,$$css:!0},error:{kVAM5u:`x1ofxpqo xk2sxw7`,$$css:!0},success:{kVAM5u:`x16m2moy xyq33ac`,$$css:!0}},zO={button:{kZKoxP:`x1qx5ct2`,kmuXW:`x2lah0s`,kVAEAm:`x1n2onr6`,"--_input-clear-hit-inset":`xtoycft x181bpwf`,"--_input-clear-hit-content":`xqxtgf4 xp8r40j`,k5JduY:`xh3pasq`,kwXMNM:`x1j6awrg`,kv0HGH:`xht581f`,$$css:!0}};function BO({label:e,onClick:t,onPointerDown:n,onClickCapture:r,xstyle:i,iconClassName:a}){let{className:o}=O(`input-clear-icon`),{className:s}=O(`input-clear-button`);return(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:e,className:s,icon:(0,q.jsx)(ya,{icon:`close`,size:`sm`,color:`secondary`,className:a==null?o:`${o} ${a}`}),onClick:t,onPointerDown:n,onClickCapture:r,isIconOnly:!0,xstyle:[zO.button,i]})}function VO(e){return BO(e)}function HO(e){return BO(e)}VO.displayName=`InputClearButton`;var UO={inGroup:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kZKoxP:`x5yr21d`,keTefX:`xd10s4z x1pwwqoy`,krdFHd:`x15mokao x8eehn2`,kVL7Gh:`xbiv7yw x1xrp5p4`,kfmiAY:`x1ga7v0g x1tzxhge`,kT0f0o:`x16uus16 x1rmb4wm`,kXnDq0:`x1rm9qnc`,$$css:!0}};function WO({isRequired:e=!1,isOptional:t=!1}){let{defaultOptionality:n}=(0,K.use)(TO);return!t&&(e||n===`required`)}var GO=(0,K.createContext)(null);GO.displayName=`InputGroupContext`;function KO(){return(0,K.use)(GO)}var qO={sm:{kZKoxP:`x6k0iem`,$$css:!0},md:{kZKoxP:`x1ueg155`,$$css:!0},lg:{kZKoxP:`xssyfek`,$$css:!0}};function JO({type:e=`text`,label:t,isLabelHidden:n=!1,description:r,isOptional:i=!1,isRequired:a=!1,isDisabled:o=!1,isReadOnly:s=!1,disabledMessage:c,startIcon:l,status:u,statusVariant:d=`attached`,size:f,onChange:p,changeAction:m,isLoading:h=!1,value:g,placeholder:_,labelTooltip:v,hasClear:y=!1,hasAutoFocus:b=!1,htmlName:x,onEnter:S,onKeyDown:C,width:T,xstyle:E,className:D,style:k,ref:A,...j}){let M=jr(),N=WO({isRequired:a,isOptional:i}),P=Zt(f,`md`),I=(0,K.useId)(),ee=(0,K.useId)(),L=(0,K.useId)(),R=(0,K.useId)(),te=(0,K.useRef)(null),z=(0,K.useRef)(null),B=KO(),[,ne]=(0,K.useTransition)(),[re,V]=(0,K.useOptimistic)(g),ie=h||re!==g,ae=o&&!!c,oe=F({placement:`above`,focusTrigger:`always`,isEnabled:ae}),{statusIcon:se,describedBy:ce}=wO({status:u,statusVariant:d,isInGroup:!!B}),{ariaLabelledBy:le,ariaDescribedBy:ue}=gt(ee,[r?L:null,!B&&d!==`tooltip`&&u?.message?R:null,ce,ae?oe.describedBy:null],B),de=e=>{if(o||s)return;let t=e.target.value;p?.(t,e),m&&!e.defaultPrevented&&ne(async()=>{V(t),await m(t,e)})},fe=(0,K.useCallback)(()=>{p?.(``,null),te.current?.focus()},[p]),{onClick:pe,onMouseUp:me}=bO({containerRef:z,inputRef:te,disabled:o}),he=(0,q.jsxs)(`div`,{ref:e=>{z.current=e,oe.ref(e)},onClick:pe,onMouseUp:me,...H(O(`text-input`,{size:P,status:u?.type??null,disabled:o?`disabled`:null,readonly:s?`readonly`:null}),w(FO.base,qO[P],o&&FO.disabled,u&&IO[u.type],u&&!o&&LO[u.type],u&&RO[u.type],B&&UO.inGroup,E),D,k),children:[l&&xa(l,{size:`sm`,color:`secondary`}),B&&(0,q.jsx)(Kt,{id:ee,children:t}),(0,q.jsx)(`input`,{...j,ref:we(A,te),id:I,name:o?void 0:x,type:e,value:re,onChange:de,onKeyDown:S||C?e=>{e.key===`Enter`&&S?.(),C?.(e)}:void 0,placeholder:_,disabled:o&&!ae,"aria-disabled":ae?`true`:void 0,readOnly:s||ae||void 0,autoFocus:b,"data-autofocus":b||void 0,"aria-describedby":ue,"aria-required":N?`true`:void 0,"aria-invalid":u?.type===`error`?`true`:void 0,"aria-busy":ie||void 0,"aria-labelledby":le,...{0:{className:`x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5`},1:{className:`x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5 xt0e3qv`}}[!!o<<0]}),y&&g!==``&&!o&&!s&&(0,q.jsx)(VO,{label:M(`@astryx.textInput.clearLabel`,{label:t}),onClick:fe}),ie&&(0,q.jsx)(Gt,{size:`sm`}),se]});return B?(0,q.jsxs)(q.Fragment,{children:[he,ae&&oe.renderTooltip(c)]}):(0,q.jsxs)(PO,{label:t,isLabelHidden:n,description:r,inputID:I,descriptionID:r?L:void 0,isOptional:i,isRequired:a,isDisabled:o,status:u?{type:u.type,message:u.message,messageID:u.message?R:void 0}:void 0,statusVariant:d,labelTooltip:v,width:T,children:[he,ae&&oe.renderTooltip(c)]})}JO.displayName=`TextInput`;var YO={ARTIFACT_DENIED:`fileReferenceDenied`,ARTIFACT_MISSING:`fileReferenceMissing`,ARTIFACT_UNSUPPORTED:`fileReferenceUnsupported`,ARTIFACT_EXPIRED:`fileReferenceExpired`,ARTIFACT_LIMIT:`fileReferenceBusy`,ARTIFACT_BUSY:`fileReferenceBusy`};function XO({open:e,sessionId:t,onClose:n,onInsert:r}){let{t:i}=W(),a=(0,K.useMemo)(()=>new de,[]),o=(0,K.useRef)(null),[s,c]=(0,K.useState)(``),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(null);(0,K.useEffect)(()=>(c(``),u(!1),f(null),()=>{o.current?.abort(),o.current=null}),[e,t]);let p=()=>{o.current?.abort(),o.current=null,n()},m=async()=>{let e=s.trim();if(!e||o.current)return;if(f(null),!t){let t=r(e);if(t){f(t);return}n();return}let c=new AbortController;o.current=c,u(!0);let l;try{if(l=(await a.resolveArtifact(t,encodeURI(e),void 0,c.signal)).handle,c.signal.aborted||(await a.artifactMetadata(t,l,c.signal),c.signal.aborted))return;let i=r(e);if(i){f(i);return}n()}catch(e){if(!c.signal.aborted){let t=e instanceof ge&&e.code?YO[e.code]:void 0;f(t?i(t):e instanceof Error?e.message:i(`fileReferenceFailed`))}}finally{o.current===c&&(o.current=null),l&&a.releaseArtifact(t,l).catch(()=>void 0),c.signal.aborted||u(!1)}};return(0,q.jsx)(Se,{isOpen:e,onOpenChange:e=>!e&&p(),purpose:`form`,width:460,"aria-label":i(`fileReferenceTitle`),children:(0,q.jsxs)(`form`,{className:`openpi-dialog file-reference-dialog`,onSubmit:e=>{e.preventDefault(),m()},children:[(0,q.jsxs)(`div`,{className:`file-reference-heading`,children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:i(`fileReferenceTitle`)}),(0,q.jsx)(`p`,{children:i(`fileReferenceDetail`)})]})]}),(0,q.jsx)(JO,{label:i(`fileReferenceLabel`),value:s,placeholder:i(`fileReferencePlaceholder`),description:i(t?`fileReferenceValidatedHint`:`fileReferenceDraftHint`),hasAutoFocus:!0,hasClear:!0,isDisabled:l,onChange:e=>{c(e.slice(0,4096)),f(null)}}),d&&(0,q.jsx)(`p`,{className:`file-reference-error`,role:`alert`,children:d}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:p,children:i(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,className:`primary`,disabled:l||!s.trim(),children:i(l?`fileReferenceChecking`:`insertReference`)})]})]})})}function ZO(e,t=e.split(/[\\/]/u).at(-1)||e){let n=encodeURI(e).replace(/[<>]/gu,encodeURIComponent);return`[${t.replace(/[\\[\]]/gu,`\\$&`)}](<${n}>)`}function QO(e){return[...e.matchAll(/(?\r\n]+)>\)/gu)].slice(0,100).flatMap(e=>{let t=e[2];return t.length>4096||!_e(t)?[]:[{name:e[1].replace(/\\([\\[\]])/gu,`$1`),reference:t,start:e.index,end:e.index+e[0].length}]})}function $O({items:e,onClose:t,open:n=!0,viewKey:r}){let i=(0,K.useRef)(null),a=(0,K.useRef)(e);(0,K.useLayoutEffect)(()=>{n&&(a.current=e)},[n,e]);let o=n?e:a.current,s=(0,K.useRef)(t);return s.current=t,(0,K.useEffect)(()=>{if(!n)return;i.current?.querySelector(`button:not(:disabled)`)?.focus();let e=e=>{!(e.target instanceof Element)||i.current?.contains(e.target)||e.target.closest(`.composer-context-trigger`)||s.current()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[n,r]),(0,K.useLayoutEffect)(()=>{if(!n)return;let e=i.current,t=e?.closest(`form`);if(!e||!t)return;let r=()=>{let n=window.visualViewport,r=n?.offsetTop??0,i=r+(n?.height??window.innerHeight),a=t.getBoundingClientRect(),o=Math.max(0,a.top-r-16),s=Math.max(0,i-a.bottom-16),c=o<180&&s>o;e.dataset.placement=c?`below`:`above`,e.style.maxHeight=`${Math.min(400,c?s:o)}px`};r();let a=typeof ResizeObserver>`u`?null:new ResizeObserver(r);return a?.observe(t),window.addEventListener(`resize`,r),window.visualViewport?.addEventListener(`resize`,r),window.visualViewport?.addEventListener(`scroll`,r),()=>{a?.disconnect(),window.removeEventListener(`resize`,r),window.visualViewport?.removeEventListener(`resize`,r),window.visualViewport?.removeEventListener(`scroll`,r)}},[n,r]),(0,q.jsx)(`div`,{ref:i,id:`composer-action-menu`,className:`composer-action-menu`,role:`menu`,hidden:!n,inert:!n,onKeyDown:e=>{if(!e.nativeEvent.isComposing){if(e.key===`Escape`||e.key===`Tab`)e.key===`Escape`&&e.preventDefault(),t(!0);else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault();let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled)`)],n=t.indexOf(document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowUp`?-1:1)+t.length)%t.length]?.focus()}}},children:o.map((e,t)=>(0,q.jsxs)(`div`,{role:`none`,children:[o[t-1]?.section!==e.section&&(0,q.jsx)(`div`,{className:`composer-action-section`,role:`presentation`,children:e.section}),(0,q.jsxs)(`button`,{type:`button`,role:`menuitem`,"aria-label":[e.label,e.alias].filter(Boolean).join(` `),"aria-description":e.description,disabled:e.disabled,onClick:e.onClick,title:e.description,children:[e.icon,(0,q.jsx)(`span`,{children:e.label}),e.alias&&(0,q.jsx)(`small`,{children:e.alias}),(0,q.jsx)(`span`,{className:`composer-action-description`,children:e.description})]})]},e.id))})}var ek={triggerContainer:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib xdk3u5w`,kLWn49:`x1kq96og`,kMwMTN:`x1tgivj0`,kkrTdU:`x1ypdohk x16khyan`,$$css:!0},trigger:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,kCS8Yb:`x1r8uery`,k7Eaqz:`xeuugli`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kWkggS:`xjbqb8w`,kMv6JI:`xjb2p0i`,kGuDYH:`x1qlqyl8`,kLWn49:`x15bjb6t`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kI3sdo:`x1a2a7pz`,kaIpWk:`xh6dtrn`,$$css:!0},triggerText:{kzQI83:`x1iyjqo2`,k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,k9WMMc:`x1yc453h`,$$css:!0},placeholder:{kMwMTN:`xv1l7n4`,$$css:!0},triggerGhost:{kzqmXN:`x14atkfc`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kGVxlE:`x1gnnqk1 x1s17dad x15ysqaf`,k63SB2:`x1e4wzip`,k1ekBW:`xrafxwg`,k3aq6I:`x3oybdh xk4oym4`,$$css:!0},triggerGhostDisabled:{kKwaWg:`x18o3ruo`,k3aq6I:`x1c071of x1pdlv7q`,$$css:!0},triggerIcon:{kmuXW:`x2lah0s`,$$css:!0},triggerIconRotation:{k1ekBW:`x11xpdln`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,k3nNDw:`x1g0ag68`,$$css:!0},triggerIconOpen:{k3aq6I:`x19jd1h0`,$$css:!0},popover:{k7Eaqz:`xrzjruh`,$$css:!0},content:{kB7OPa:`x9f619`,kskxy:`xpnbb6b`,kVQacm:`xysyzu8`,kmVPX3:`x1b2ylru`,$$css:!0},sm:{kZKoxP:`x6k0iem`,$$css:!0},md:{kZKoxP:`x1ueg155`,$$css:!0},lg:{kZKoxP:`xssyfek`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,$$css:!0}};function tk({label:e,value:t,onChange:n,changeAction:r,children:i,triggerLabel:a,placeholder:o,isLabelHidden:s=!1,description:c,isOptional:l=!1,isRequired:u=!1,isDisabled:d=!1,isLoading:f=!1,status:m,statusVariant:h=`attached`,labelTooltip:g,size:_=`md`,variant:v=`input`,startIcon:y,width:b,placement:x=`below`,alignment:S=`start`,handleRef:C,onOpenChange:T,contentXstyle:E,xstyle:D,className:k,style:A,"data-testid":j,onClick:M,...N}){let P=jr(),F=WO({isRequired:u,isOptional:l}),I=o??P(`@astryx.selector.placeholder`),ee=v===`ghost`&&h===`attached`?`detached`:h,L=(0,K.useId)(),te=(0,K.useId)(),z=(0,K.useId)(),B=(0,K.useId)(),ne=(0,K.useId)(),re=[c?B:null,m?.message?ne:null].filter(e=>e!=null).join(` `)||void 0,V=(0,K.useRef)(null),[ie,ae]=(0,K.useTransition)(),[oe,se]=(0,K.useOptimistic)(t),ce=f||ie,le=Wr({dialogLabel:e,hasCloseButton:!1,hasAutoFocus:!0,surfaceTarget:`complex-selector-popup`,onShow:(0,K.useCallback)(()=>{T?.(!0)},[T]),onHide:(0,K.useCallback)(()=>{V.current?.focus(),T?.(!1)},[T])}),ue=le.isOpen,de=(0,K.useCallback)(()=>{d||(le.isOpen?le.hide():le.show())},[d,le]),pe=(0,K.useCallback)(()=>{le.hide()},[le]);(0,K.useImperativeHandle)(C,()=>({open:()=>{d||le.show()},close:()=>le.hide(),toggle:()=>{d||(le.isOpen?le.hide():le.show())},isOpen:()=>le.isOpen}),[d,le]);let me=(0,K.useCallback)(e=>{n?.(e),r&&ae(async()=>{se(e),await r(e)})},[r,n,se,ae]),he=a??I,ge=xa(y,{size:`sm`,color:`secondary`}),_e=(0,q.jsx)(`div`,{id:z,...w(ek.content,E),children:i(oe,me,pe,{isOpen:ue,isBusy:ce,triggerId:L,contentId:z})}),ve=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{ref:le.triggerRef,"data-testid":j,...N,onClick:pt(M,de),...H(O(`complex-selector`,{variant:v,size:_,status:m?.type??null}),w(FO.base,ek.triggerContainer,ek[_],fe.focusWithin,v===`ghost`&&ek.triggerGhost,v===`ghost`&&rn.backgroundImage,d&&FO.disabled,v===`ghost`&&d&&ek.triggerGhostDisabled,d&&ek.disabled,a==null&&ek.placeholder,D),k,A),children:[mt(ge)&&ge,(0,q.jsx)(`button`,{ref:V,id:L,type:`button`,"aria-haspopup":`dialog`,"aria-expanded":ue,"aria-controls":z,"aria-describedby":re,"aria-labelledby":te,"aria-required":F?`true`:void 0,"aria-invalid":m?.type===`error`?`true`:void 0,"aria-busy":ce||void 0,disabled:d,onKeyDown:e=>{e.key===`ArrowDown`&&!ue&&!d&&(e.preventDefault(),le.show())},className:`x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x16khyan x1a2a7pz xh6dtrn`,children:(0,q.jsx)(`span`,{className:`x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h`,children:he})}),ce&&(0,q.jsx)(Gt,{size:`sm`}),(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`secondary`,xstyle:[ek.triggerIcon,ek.triggerIconRotation,ue&&ek.triggerIconOpen],...O(`complex-selector-indicator-icon`,{state:ue?`expanded`:`collapsed`})})]}),le.render(_e,{placement:x,alignment:S,offset:p[`--spacing-1`],xstyle:[ek.popover,R[x]]})]});return(0,q.jsx)(PO,{label:e,isLabelHidden:s,description:c,inputID:L,descriptionID:c?B:void 0,labelID:te,isOptional:l,isRequired:u,isDisabled:d,status:m?{type:m.type,message:m.message,messageID:m.message?ne:void 0}:void 0,statusVariant:ee,labelTooltip:g,width:b,children:ve})}tk.displayName=`ComplexSelector`;function nk(e){let t=`${e.provider}/${e.id}`;return e.label===t?t:`${e.label} (${t})`}var rk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37.9998%2023.021C33.7998%2025.2889%2029.5698%2027.3649%2024.8614%2028.3069C23.8114%2028.5154%2022.6474%2028.5154%2021.5809%2028.3714C20.5639%2028.2439%2020.0554%2027.3484%2020.4169%2026.4064C20.7619%2025.5289%2021.2209%2024.635%2021.8119%2023.9C23.0899%2022.3025%2024.5329%2020.849%2025.8289%2019.268C26.6203%2018.2991%2027.3335%2017.2689%2027.9618%2016.187C28.4208%2015.4205%2028.2078%2014.4935%2027.4038%2014.111C26.0584%2013.4556%2024.6154%2012.9936%2023.1889%2012.4986C23.0239%2012.4341%2022.7779%2012.6096%2022.4509%2012.7221C22.8604%2013.0881%2023.1559%2013.3596%2023.5654%2013.727C19.3339%2014.447%2015.3305%2015.467%2011.4455%2016.874C11.4275%2016.9535%2011.396%2017.0165%2011.411%2017.0495C11.9855%2017.927%2011.723%2018.5975%2010.886%2019.1405C10.5611%2019.3531%2010.2732%2019.6176%2010.034%2019.9235C12.593%2020.6735%2014.873%2020.243%2017.0539%2018.821C16.9234%2018.6305%2016.7914%2018.455%2016.6609%2018.263C17.4799%2018.407%2017.9719%2018.854%2018.0379%2019.556C18.0544%2019.7165%2017.9569%2019.8755%2017.9074%2020.036C17.7919%2019.907%2017.6449%2019.781%2017.5474%2019.6355C17.4799%2019.5395%2017.4634%2019.4285%2017.4154%2019.268C14.8235%2020.993%2012.035%2021.425%208.96751%2020.531C8.96751%2021.137%208.93451%2021.6485%208.98401%2022.1435C9.01701%2022.574%208.83701%2022.766%208.44401%2022.9895C7.55752%2023.5325%206.63803%2024.092%205.90003%2024.8105C5.01504%2025.6879%205.34354%2026.7589%206.54053%2027.2059C7.90102%2027.7159%209.329%2027.7309%2010.7555%2027.5569C12.4445%2027.3484%2014.1005%2027.0769%2015.9394%2026.8219C13.79%2027.8269%2011.6735%2028.5319%209.4445%2028.8169C7.88452%2029.0269%206.32753%2029.1379%204.78554%2028.6909C2.57156%2028.0684%201.58607%2026.4394%202.16057%2024.251C2.70206%2022.2065%204.01455%2020.5775%205.42454%2019.076C10.133%2014.078%2016.0864%2011.5401%2022.9744%2011.0286C24.5824%2010.9176%2026.2069%2011.1246%2027.7143%2011.7951C29.8308%2012.7536%2030.7173%2014.78%2029.6838%2016.826C29.0118%2018.1835%2028.0758%2019.4285%2027.1413%2020.6585C26.2234%2021.872%2025.1899%2022.9895%2024.2224%2024.155C23.9434%2024.506%2023.6809%2024.875%2023.4679%2025.2724C23.0569%2026.0224%2023.3359%2026.5174%2024.2059%2026.4394C26.0254%2026.2624%2027.8808%2026.1199%2029.6358%2025.6729C32.2098%2025.0174%2034.7193%2024.092%2037.2618%2023.2775C37.5243%2023.213%2037.7703%2023.117%2037.9998%2023.0225V23.021Z'%20fill='currentColor'/%3e%3c/svg%3e`,ik=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.5835%2024.7904H25.7835C26.0754%2024.7904%2026.314%2025.0318%2026.314%2025.3277V27.8096C26.8199%2027.9343%2027.2691%2028.2255%2027.5896%2028.6362C27.9102%2029.047%2028.0833%2029.5536%2028.0813%2030.0746C28.0813%2031.3605%2027.0517%2032.4037%2025.7835%2032.4037C24.514%2032.4037%2023.4844%2031.3605%2023.4844%2030.0746C23.4844%2028.9741%2024.2399%2028.0509%2025.2531%2027.8082V25.865H21.5849V32.2237C21.5852%2032.3161%2021.5618%2032.407%2021.5169%2032.4877C21.4721%2032.5684%2021.4072%2032.6362%2021.3285%2032.6846L17.6603%2034.9224C17.577%2034.9733%2017.4813%2035%2017.3837%2034.9995C17.2862%2034.999%2017.1907%2034.9714%2017.108%2034.9197L10.3906%2030.7114C10.3131%2030.6628%2010.2493%2030.5952%2010.2052%2030.515C10.161%2030.4348%2010.138%2030.3447%2010.1384%2030.2532V25.8636L6.78241%2023.9136C6.70609%2023.8694%206.64181%2023.8071%206.59521%2023.7322C6.5486%2023.6573%206.52111%2023.5721%206.51514%2023.4841V23.4472V16.4626C6.51514%2016.2717%206.61468%2016.0944%206.77696%2015.999L10.1384%2014.0053V9.70163C10.1384%209.52572%2010.2229%209.36208%2010.3634%209.26253L10.392%209.24344L17.1107%205.07885C17.194%205.027%2017.2901%204.99951%2017.3882%204.99951C17.4863%204.99951%2017.5824%205.027%2017.6657%205.07885L21.3339%207.36296C21.4115%207.41162%2021.4753%207.47921%2021.5194%207.55938C21.5636%207.63955%2021.5866%207.72964%2021.5862%207.82115V13.9999H26.8445V11.3857C26.3384%2011.2609%2025.8889%2010.9696%2025.5684%2010.5585C25.2479%2010.1475%2025.0749%209.6406%2025.0772%209.11935C25.0772%207.83342%2026.1067%206.79023%2027.3749%206.79023C28.6445%206.79023%2029.6727%207.83342%2029.6727%209.11935C29.6727%2010.2198%2028.9186%2011.143%2027.9054%2011.3857V14.5371C27.9059%2014.6073%2027.8926%2014.6768%2027.8662%2014.7418C27.8399%2014.8068%2027.8009%2014.8659%2027.7516%2014.9158C27.7024%2014.9658%2027.6437%2015.0055%2027.5791%2015.0327C27.5144%2015.0599%2027.4451%2015.0741%2027.3749%2015.0744H21.5862V17.5372H30.6191C30.7351%2017.0302%2031.0192%2016.5773%2031.4252%2016.2522C31.8313%2015.9271%2032.3353%2015.749%2032.8554%2015.7467C34.1236%2015.7467%2035.1532%2016.7885%2035.1532%2018.0745C35.1532%2019.3604%2034.125%2020.4036%2032.8554%2020.4036C32.3351%2020.4012%2031.8309%2020.2229%2031.4249%2019.8975C31.0188%2019.5722%2030.7348%2019.119%2030.6191%2018.6117H21.5835V21.2531H28.3377L29.5854%2022.8622C29.9329%2022.659%2030.3283%2022.5522%2030.7309%2022.5527C32.0004%2022.5527%2033.0286%2023.5945%2033.0286%2024.8804C33.0286%2026.1664%2032.0004%2027.2096%2030.7309%2027.2096C29.4627%2027.2096%2028.4331%2026.1664%2028.4331%2024.8804C28.4331%2024.4086%2028.5722%2023.9695%2028.8095%2023.6027L27.8222%2022.3277H21.5835V24.7904ZM17.3875%206.16704L14.6016%207.89342V11.9407H13.5407V8.55071L11.1993%2010.003V14.019L14.0766%2015.8735L17.0316%2014.0135V10.9098H18.0925V14.3135C18.0925%2014.499%2017.9971%2014.6721%2017.8416%2014.7703L14.6466%2016.779V19.6167L16.5857%2020.9927L15.9775%2021.8736L14.0602%2020.5127L11.9738%2021.8831L11.397%2020.9831L13.5857%2019.5445V16.8308L10.6579%2014.9408L7.57606%2016.7681V19.0536L10.2652%2017.4322L10.8079%2018.3554L7.57606%2020.304V23.1363L10.5297%2024.8518L13.6252%2022.9863L14.1666%2023.9095L11.1993%2025.6973V29.9546L13.7575%2031.5569L16.9825%2029.6123L17.5253%2030.5369L14.7748%2032.1951L17.3903%2033.8328L20.5239%2031.9196V24.0377L14.0357%2027.9828L13.4902%2027.0623L20.5239%2022.7859V8.12115L17.3875%206.16704ZM25.7835%2028.8228C25.6198%2028.8237%2025.4579%2028.8568%2025.307%2028.9204C25.1561%2028.984%2025.0192%2029.0767%2024.9042%2029.1932C24.7892%2029.3097%2024.6983%2029.4478%2024.6367%2029.5995C24.5751%2029.7512%2024.5441%2029.9136%2024.5453%2030.0773C24.5453%2030.7687%2025.099%2031.3292%2025.7835%2031.3292C25.947%2031.3281%2026.1087%2031.2948%2026.2594%2031.2313C26.41%2031.1677%2026.5467%2031.0751%2026.6615%2030.9587C26.7764%2030.8424%2026.8672%2030.7045%2026.9287%2030.553C26.9903%2030.4016%2027.0215%2030.2395%2027.0204%2030.076C27.0216%2029.9123%2026.9906%2029.7501%2026.9291%2029.5985C26.8676%2029.4468%2026.7769%2029.3088%2026.662%2029.1923C26.5471%2029.0758%2026.4104%2028.9831%2026.2597%2028.9194C26.109%2028.8558%2025.9472%2028.8238%2025.7835%2028.8228ZM30.7336%2023.6272C30.5699%2023.6281%2030.4079%2023.6613%2030.257%2023.7249C30.1062%2023.7884%2029.9693%2023.8811%2029.8543%2023.9977C29.7393%2024.1142%2029.6484%2024.2523%2029.5868%2024.404C29.5252%2024.5557%2029.4942%2024.7181%2029.4954%2024.8818C29.4954%2025.5745%2030.0491%2026.1364%2030.7322%2026.1364C30.896%2026.1355%2031.0579%2026.1023%2031.2088%2026.0387C31.3597%2025.9752%2031.4966%2025.8825%2031.6116%2025.7659C31.7266%2025.6494%2031.8175%2025.5113%2031.8791%2025.3596C31.9406%2025.2079%2031.9717%2025.0455%2031.9704%2024.8818C31.9717%2024.7181%2031.9406%2024.5557%2031.8791%2024.404C31.8175%2024.2523%2031.7266%2024.1142%2031.6116%2023.9977C31.4966%2023.8811%2031.3597%2023.7884%2031.2088%2023.7249C31.0579%2023.6613%2030.8973%2023.6281%2030.7336%2023.6272ZM32.8541%2016.8226C32.6904%2016.8235%2032.5284%2016.8567%2032.3775%2016.9203C32.2266%2016.9838%2032.0898%2017.0765%2031.9747%2017.1931C31.8597%2017.3096%2031.7688%2017.4477%2031.7073%2017.5994C31.6457%2017.7511%2031.6146%2017.9135%2031.6159%2018.0772C31.6159%2018.7686%2032.1709%2019.329%2032.8541%2019.329C33.0176%2019.3279%2033.1793%2019.2947%2033.3299%2019.2311C33.4806%2019.1676%2033.6172%2019.075%2033.7321%2018.9586C33.8469%2018.8422%2033.9377%2018.7044%2033.9993%2018.5529C34.0609%2018.4014%2034.092%2018.2393%2034.0909%2018.0758C34.0922%2017.9122%2034.0612%2017.7499%2033.9997%2017.5983C33.9382%2017.4467%2033.8474%2017.3087%2033.7325%2017.1922C33.6177%2017.0757%2033.481%2016.9829%2033.3302%2016.9193C33.1795%2016.8556%2033.0177%2016.8223%2032.8541%2016.8213V16.8226ZM27.3736%207.86342C27.2099%207.86449%2027.0482%207.8978%2026.8974%207.96145C26.7467%208.02509%2026.61%208.11783%2026.4951%208.23434C26.3802%208.35086%2026.2895%208.48887%2026.228%208.64049C26.1665%208.79212%2026.1355%208.95437%2026.1367%209.11798C26.1367%209.81072%2026.6904%2010.3725%2027.3736%2010.3725C27.5373%2010.3717%2027.6992%2010.3385%2027.8501%2010.2749C28.001%2010.2113%2028.1379%2010.1186%2028.2529%2010.0021C28.3679%209.88558%2028.4588%209.7475%2028.5204%209.59579C28.582%209.44408%2028.613%209.28171%2028.6118%209.11798C28.613%208.95426%2028.582%208.79189%2028.5204%208.64018C28.4588%208.48847%2028.3679%208.35039%2028.2529%208.23386C28.1379%208.11733%2028.001%208.02462%2027.8501%207.96106C27.6992%207.89749%2027.5373%207.86432%2027.3736%207.86342Z'%20fill='currentColor'/%3e%3c/svg%3e`,ak=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANh0lEQVR42u2b2XMcVxXGv+7p0YxH1jKW5UiRZEtWbGcldpwYDCEhJHFCMCEUVRRQ/An8QbzwAlW8hK0KCCQkOKuXxFlsS4mDjXdbkW1JtpbRjDQzzUN+Nzq59IxmZFlVFHRV12zd996zfec75/YEcRzrFo9AUsiZ4rMkVczZ6DhuLEmqct7WI1gFBfxXH+EazRE06AErvXfFR7RK46QkZSStk5SWFEual1SQVPaErOVyMb+neV1cixCIVhjzgVlcJGmTpAck7ZLUK6ko6bikI5JOe4oq1/GUTkmDjH9e0nXv92qNtTgFxmupAHe0SXpI0rOSHpO0Bcu/LWlG0lkDhIH36hacQXH3S7qX749IOoTC4hqhsCKhV0MBoRGqS9JTnEOSWiS1S/qqpBHOS0YQG9vOGzolPS7p+5LulLTAOFN4woy5N/AUUM8718QD2iV9RdIO77oeSQ9KGgUPPjMCu7TpPq+X9DUUEHL9JUknuG/GCFVPwKY9ImxC4EbR2IFXWtJ9kh6VtNVbWMqbOwRH3HfreB/jDUmcwx0thFDUYGZpWgGxp1lfyzMA3kXCIm3G7ZO0W9LdkrJ1skHKm3MWy1+RNGcwIGaOWFIrIfcA5xB4dNswIPAs5xY0Iel1SRsk7ZN0h2GCWT5vkdQv6bKkkhFCKCzP6yLfzUsaN9hhM4i7r1/SdxBckk5J+ojXqQTPiVdDAb4HBJJugNbtkrYZBYRGCZux0oKkMSOoJOXIAK2GQ4RY/rrnJY4etwGyPzXY8x5YUgV3Frx1xisNgTRnFQssGku4RY1LOob2b/K7W2wOD7gfQQOjxIhF540xAjDAeVHgWX+LpB9I+q6knSi+nfR5t6QBxmwIC8JlgCNgcX014itt4neclHdS0rQR0JGbe1l8xszRwrjreZ+0tsAUWhslPSnp55KeYX53ZFF21vu+aQwIvQquFzRvAZRmJV0z6ckC13FishdMkOEKg1in1dznOEMHixeuewWsSLEW5/a74BuPGA9xGaeVzzfBkFVRQAAxeRo0X8TShyW9DFuTWfgoGPAgcW/jvA/lDKA8N1cOZbWZrHKMeaw3Dkt6jtiXKZltBrkq6QIgqDqEaVkF2GMTsfaA+W4D17VKOsfEs6TCDyS9T+7vxOVTWHkrpOkSSigS25EJgaKkMzDAMi7dixG+iSLLxvIBAn9CFrhoMkCwHDmKmgBBe9yNQI+Cvn+R9A4TnZV0gN/3SrrLsL1tkr6Bi7+Bq5Y8rr8Ahowby/9Y0n5J21Fo2TRf5iS9hUe+Y6wfrFQBPs38DEq6nnBII1wHiugnNOap/AomJW0E+Bw5cvR4RNJRrJ01IBgTAiUW30G8v0AW8TPDolH4X/HGuJkeQlSD+dn3o5L+hhBPJ3jDZknfI4YPIPwUKfE0oXOnCRlHiroRwoFjG9a/hmIGUeDjeIGfqRYQ/m0w6bxXbFVWqoCqp4CzvLabktVZNE3O3okAjpP/k3tOkxnSCJPC2r2EwxTK2MC9MxClOdLmHkkP85u1vFDUIUn/kPQvQ6BCj7avWAGWPV0kzlKAzWYEGDT39RHzLYb2XmaRrcS+q/23cu0YQFk27j2BAh6W9ARZJTTsMcT6n+KZhyVNGq4QewVc4DVZq82CYMDCTrOwEbxgL8J0M3kLmJDHpY/jCdNkiZIBLlckneP7OQQM8aQ+AG/IWDJlSugzKPYwxnFgXW62jdZMLTBLOFwDxS9iwV0QpS4AbQu5PY8nFACzaYTP8tuQceWY67KM14+H2VB06XkatH+Le227rOkeYrRMGawEYLkB27rAeZnfdxky041C7mLBC5yLCOmUUMBzclgvA57EXn/Bkp0REP8Imcc1SIJlmq4NKyCV0ACxrSZXlMxK+thw9TGwYQALhgiZR2llk0FcRugFA0KE9ztOlpFOkFleItvcSOAreZTZAjjnAd0YwHW49AWeRA1YPql1LdP6HkUZI2DAQ6SuPnNfq0HowIBhi3HbMAGMU8b6Y/QdDno1iMgwAxigi/k2EI6bUP5JSW9SYjsFpBohQvWOKgD2MYA3yvvz9Pi24Q3pGooMErpBFdP5yZjvp8CdGHLkBF2HsD0ofQMh1snnjfCKPOuyawlXa2NEaPkcFPYyi30OXOhocpMlyfNSpMQ9YMs9hFCWUE57pXDGeFVYqzCKTMnpbhpCcy0m3mPeL5C2SgZ4XBenRCjMkvaOYZ0SabOHeEzV6C36uBN6v/VL+hbz7fDKbf8o4pkzYMVZGOopZHBgWY1QQsWUrd+m2dDNQDHCFkD/KYPsgdF4kckmuLYCQyvyeS/jpxIAtpFmzQCUup7XXkL5N1HAVTjDCPXMlKkzYknlyFtARMxsNyzPdXCKCD5rGpuBAbYqSimg+UkWEGCtlhVudFZNCi0BvDdR9g1+m2O+MQwwyzomCMcLHrY55caR98MCGnuPwdsBkxwLqBDTPcb1y6a741tn3iiqxfD0oI71/WqujOUu4FFjnGcA3hktPYdQQoYyZ2UZjvMl93dufIyF95s8njOac03MrNm4iIn3DtPQdDGd4Z6MVrYdH5qmrPMsZ/0prC1TB6RRdsowxAVkWvQVEMRxHHhsr5UF51i03XUJDdqmjIsGZodGpntcJW4fgxsMJrh3WMdKQUIavE4o3sTFF7l2Ebe32OQI1KfgwIRf50QeEjstz6xSakzTANluQs02MsMG0+siZxsh6fJ/ymBLBe+Y470rnK5I+hBC9CFc4AsmeLsekWmjibFT0tdhh7tY6CRK7zSe5W+92VTp4t31+rohWJvwxMwyADqL15yR9EdJvzFts0zUwO5vUMdFq8bSrvM7yAJ3a+l5AVfUTGpp67vquXlYg4kWySaf0p7LQms3MecmuEunV8dEZve6HeY46u0/1GWCSYoITVW44LXFHuYcJu63GbJyDXBN8X3OEKuslz1CDx/yEB+X109QDrsNlS6U3Guq0C7m7sQ4BUjQRW9brhrV2Q2uh8q229INydmPxXvNOCWsdgQ2tgOBWlHKPPdHCaDo1pA39ywy3vuAoNtKv4N5+/FC99pjKtWjFFJ206QSNZiGrGtWsdp9WHyA/t0jRngRc2/iulUsvw1BnFeUEK6CdQtYr8PrB6QJrSdN2+wgXjRPDTKBhduxfh4PcBnkHIC40KwC/MO1vvazO7sZJdmxTkh6hcbFDTxjDwWMIDWnsN4wQp5GCfeiAEeaHNtz5e1zhFIn5fG0IV0FhPT7gbHBnC91vaNlLG/bTJGx9l5qhu3ePcdxz3c5p2mLP2IEPYE7XmIs1/A8T5h0G0VVTav8GkJv5LmADoxxEKHLK0lXjSjAHf1sTO7Dmt3e9Wfo0r6I25fYR/gZrptDOb/j1T1PEME7LtJLGCBtrjcZZoFudIGttd2MOc9vBwx3ifTlBzCaVoC/nZQl1Twh6UcwOlcB3kDwC6D8a1hXxOw3ud7F9Ch9/DM0TBwAzhGjo1y7C+9ax5mhqDmOJ3QRhk+x3pwBWlubhJ7rN9QWt8/iuBJ5Bwve43VUTrInd0BLD0cEAOQ+9gKc8Nex8CnG7iMsUlj2MsVNGSu30vhwHZ8c131k+ohD+vxBiW7m+b3pFFdMsXZLm6NV0+xwpeVV4u4E7elD5vo7aVw8jyUjrPsq3jENmA2jhMBQ2RLe8QabJ4NaesjiHhR8iDC7JOknzLHPsMKDjDHptdSrze4NhqbnN4JFpljEMSw64+3FZ3DNPcaKC4TGL0D6Kulyi0mJgaG0JTY8HmSszbjzQ+DQhKRfMZbr/Q0Rbv1c90sMUzGVYtMKkEdhD2P9GV79oxPu/ywKyANSJ7Do++baDkhKYDY7ZFLfZXoSwwjZg5t3M/brAO2rhMhuPGEr4PkBZyGh7RY3uzEiA3gFj0raYwvx+DwLETH9EkrwcabThNh5PCk2+HMUutuFAtyxE/7xKl7wazjHC/r84akMntBL6JW9/YUVKSA0WODc1QJlD1XfM6B3GS95jfMKlnQPNrQDajEhdkVLD1a5VrnbWN1OUzXPvMOSfoghXAv+E9ZWRPAx0w+o2+pvlAnGCe/dRuQ64m6fITCnJP3JWH/OpCaH/i7+J8GVUgJru8D+/2bI1zbm6zMe5I5PCLn1jDee0BKLb0UB9j89boERFtoPMQkhNK9I+oMnvNsh6jFt94CwqiYo2THEUUl/xqIbCIkceNADGLutuo+aMGTTu8P+k6IpUt7jxH0bRORFaoART3iHxo7cBAnKtXNFZJBxyt/1WP0xFDkMTzhP+Kw6FV6uCdJi6vFFQPLvkn6L5Yv6zz9GZLX0SFy6QYUvghGHyB5ZhJ80bK/sNVbiRrf4oiaF9wnSFOlxns9HsXzR69Q6F89jNZfb53HdYo14tajtyNQ4Sr9J3BcTdrZjNfjfgVtRQJnmxMvEvBJi2f/OPRfgNjBdm3vKE0QJBU3RbL6qRi+xfLtDoNHuUarG9+4hqGnDHGeg1vM1FG7/onPL/xFabQXUOio1POcqDG07bayS6dQUauwJxGr836drrgBHWlKmoKkYAIoTPOAkWeI6171LYVNaJuTsHzZsxVq9Fa9YrX2BoFaerREeObOFVtDSM8PNzLc6C///f4f/x49ojeezuzYpE8cVrcH/hJOOfwP7YXRCmlwoyAAAAABJRU5ErkJggg==`,ok=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2040'%3e%3cpath%20fill='currentColor'%20d='M33.0017%2034.7292C34.7884%2036.1587%2037.4682%2035.2056%2035.0115%2032.5854C27.6419%2024.9626%2029.2053%204%2020.049%204C10.8927%204%2012.456%2024.9626%205.08629%2032.5854C2.40641%2035.4438%205.3096%2036.1587%207.09621%2034.7292C14.0192%2029.7269%2013.5726%2020.913%2020.049%2020.913C26.5253%2020.913%2026.0787%2029.7269%2033.0017%2034.7292Z'/%3e%3c/svg%3e`,sk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.68%207.58398L11.296%2029.68L4%2029.6L12.144%2015.584L21.68%207.58398ZM22.8%209.32798L36%2032.416H11.584L26.464%2029.76L18.672%2020.496L22.8%209.32798Z'%20fill='currentColor'/%3e%3c/svg%3e`,ck=`data:image/svg+xml,%3csvg%20fill='currentColor'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCerebras%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M14.121%202.701a9.299%209.299%200%20000%2018.598V22.7c-5.91%200-10.7-4.791-10.7-10.701S8.21%201.299%2014.12%201.299V2.7zm4.752%203.677A7.353%207.353%200%20109.42%2017.643l-.901%201.074a8.754%208.754%200%2001-1.08-12.334%208.755%208.755%200%200112.335-1.08l-.901%201.075zm-2.255.844a5.407%205.407%200%2000-5.048%209.563l-.656%201.24a6.81%206.81%200%20016.358-12.043l-.654%201.24zM14.12%208.539a3.46%203.46%200%20100%206.922v1.402a4.863%204.863%200%20010-9.726v1.402z'%20fill='%23F15A29'%20fill-rule='evenodd'%3e%3c/path%3e%3cpath%20d='M15.407%2010.836a2.24%202.24%200%2000-.51-.409%201.084%201.084%200%2000-.544-.152c-.255%200-.483.047-.684.14a1.58%201.58%200%2000-.84.912c-.074.203-.11.416-.11.631%200%20.218.036.43.11.631a1.594%201.594%200%2000.84.913c.2.093.43.14.684.14.216%200%20.417-.046.602-.135.188-.09.35-.225.475-.392l.928%201.006c-.14.14-.3.261-.482.363a3.367%203.367%200%2001-1.083.38c-.17.026-.317.04-.44.04a3.315%203.315%200%2001-1.182-.21%202.825%202.825%200%2001-.961-.597%202.816%202.816%200%2001-.644-.929%202.987%202.987%200%2001-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315%203.315%200%20011.182-.21c.355%200%20.712.068%201.072.204.361.138.685.36.944.649l-.962.97z'%3e%3c/path%3e%3c/svg%3e`,lk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCloudflare%3c/title%3e%3cpath%20d='M16.493%2017.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148%200%2001-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054%202.153-.9%202.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92%208.91%2015.66%207%2012.942%207c-2.503%200-4.628%201.638-5.381%203.903a2.432%202.432%200%2000-1.803-.491c-1.21.109-2.153%201.092-2.287%202.32-.027.328%200%20.628.054.9C1.56%2013.688%200%2015.326%200%2017.319c0%20.19.027.355.027.545%200%20.082.08.137.161.137h15.983c.08%200%20.188-.055.215-.164l.107-.437'%20fill='%23F38020'%3e%3c/path%3e%3cpath%20d='M19.238%2011.75h-.242c-.054%200-.108.054-.135.109l-.35%201.2c-.134.52-.08.983.162%201.338.215.328.592.518%201.05.518l1.855.11c.054%200%20.108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557%201.937l-.134.355c-.027.055.026.137.107.137h6.592c.081%200%20.162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777'%20fill='%23FCAD32'%3e%3c/path%3e%3c/svg%3e`,uk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.14882%2013.5552C9.58082%2013.5552%2010.4448%2013.5336%2011.6544%2013.0368C13.0584%2012.4536%2015.8232%2011.4168%2017.832%2010.3368C19.236%209.5808%2019.8408%208.5872%2019.8408%207.248C19.8408%205.412%2018.3504%203.9%2016.4928%203.9H8.71682C6.06002%203.9%203.90002%206.06%203.90002%208.7168C3.90002%2011.3736%205.93042%2013.5552%209.14882%2013.5552Z'%20fill='currentColor'/%3e%3cpath%20d='M10.4664%2016.86C10.4664%2015.564%2011.244%2014.376%2012.4536%2013.8792L14.8944%2012.864C17.3784%2011.8488%2020.1%2013.6632%2020.1%2016.3416C20.1%2018.4152%2018.4152%2020.1%2016.3416%2020.1H13.6848C11.9136%2020.1%2010.4664%2018.6528%2010.4664%2016.86Z'%20fill='currentColor'/%3e%3cpath%20d='M6.68642%2014.1816C5.15282%2014.1816%203.90002%2015.4344%203.90002%2016.968V17.3352C3.90002%2018.8472%205.15282%2020.1%206.68642%2020.1C8.22003%2020.1%209.47283%2018.8472%209.47283%2017.3136V16.9464C9.45123%2015.4344%208.22003%2014.1816%206.68642%2014.1816Z'%20fill='currentColor'/%3e%3c/svg%3e`,dk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2040'%3e%3cpath%20fill='currentColor'%20d='M29.6214%2014.2072L20.9502%209.12249C20.6718%208.95917%2020.3282%208.95917%2020.0498%209.12249L11.3786%2014.2072C11.1445%2014.3445%2011%2014.5984%2011%2014.8733V25.1267C11%2025.4012%2011.1445%2025.6555%2011.3786%2025.7928L20.0498%2030.8775C20.3282%2031.0408%2020.6718%2031.0408%2020.9502%2030.8775L29.6214%2025.7928C29.8555%2025.6555%2030%2025.4016%2030%2025.1267V14.8733C30%2014.5988%2029.8555%2014.3445%2029.6214%2014.2072ZM29.0767%2015.2843L20.706%2030.0101C20.6494%2030.1093%2020.5%2030.0688%2020.5%2029.9538V20.3115C20.5%2020.1189%2020.3986%2019.9407%2020.2342%2019.8439L12.0124%2015.0226C11.9147%2014.9651%2011.9546%2014.8134%2012.0678%2014.8134H28.8093C29.047%2014.8134%2029.1956%2015.0751%2029.0767%2015.2843Z'/%3e%3c/svg%3e`,fk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepInfra%3c/title%3e%3cpath%20d='M3.294%207.821A2.297%202.297%200%20011%205.527a2.297%202.297%200%20012.294-2.295A2.297%202.297%200%20015.59%205.527%202.297%202.297%200%20013.294%207.82zm0-3.688a1.396%201.396%200%20000%202.79%201.396%201.396%200%20000-2.79zM3.294%2014.293A2.297%202.297%200%20011%2011.998a2.297%202.297%200%20012.294-2.294%202.297%202.297%200%20012.295%202.294%202.297%202.297%200%2001-2.295%202.295zm0-3.688a1.395%201.395%200%20000%202.788%201.395%201.395%200%20100-2.788zM3.294%2020.761A2.297%202.297%200%20011%2018.467a2.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.295%202.294zm0-3.688a1.396%201.396%200%20000%202.79%201.396%201.396%200%20000-2.79zM20.738%207.821a2.297%202.297%200%2001-2.295-2.294%202.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.294%202.294zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM20.738%2014.293a2.297%202.297%200%2001-2.295-2.295%202.297%202.297%200%20012.294-2.294%202.297%202.297%200%20012.295%202.294%202.297%202.297%200%2001-2.294%202.295zm0-3.688c-.769%200-1.395.625-1.395%201.393a1.396%201.396%200%20002.79%200c0-.77-.626-1.393-1.395-1.393zM20.738%2020.761a2.297%202.297%200%2001-2.295-2.294%202.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.294%202.294zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM12.016%2011.057a2.297%202.297%200%2001-2.294-2.294%202.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.295%202.294zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.625-1.395-1.395-1.395zM12.017%204.589a2.297%202.297%200%2001-2.295-2.295A2.297%202.297%200%200112.017%200a2.297%202.297%200%20012.294%202.294%202.297%202.297%200%2001-2.294%202.295zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM12.017%2017.529a2.297%202.297%200%2001-2.295-2.295%202.297%202.297%200%20012.295-2.294%202.297%202.297%200%20012.294%202.294%202.297%202.297%200%2001-2.294%202.295zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM12.016%2024a2.297%202.297%200%2001-2.294-2.295%202.297%202.297%200%20012.294-2.294%202.297%202.297%200%20012.295%202.294A2.297%202.297%200%200112.016%2024zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.625-1.395-1.395-1.395z'%20fill='%232A3275'%3e%3c/path%3e%3cpath%20d='M8.363%208.222a.742.742%200%2001-.277-.053l-1.494-.596a.75.75%200%2011.557-1.392l1.493.595a.75.75%200%2001-.278%201.446h-.001zM8.363%2014.566a.743.743%200%2001-.277-.053l-1.494-.595a.75.75%200%2011.557-1.393l1.493.596a.75.75%200%2001-.278%201.445h-.001zM17.124%2011.397a.741.741%200%2001-.277-.054l-1.493-.595a.75.75%200%2011.555-1.392l1.493.595a.75.75%200%2001-.278%201.446zM17.124%205.05a.744.744%200%2001-.277-.054L15.354%204.4a.75.75%200%2001.555-1.392l1.493.596a.75.75%200%2001-.278%201.445zM17.124%2017.739a.743.743%200%2001-.277-.053l-1.494-.596a.75.75%200%2011.556-1.392l1.493.596a.75.75%200%2001-.278%201.445zM6.91%2017.966a.75.75%200%2001-.279-1.445l1.494-.595a.749.749%200%2011.556%201.392l-1.493.595a.743.743%200%2001-.277.053H6.91zM6.91%2011.66a.75.75%200%2001-.279-1.446l1.494-.595a.75.75%200%2001.556%201.392l-1.493.595a.743.743%200%2001-.277.053H6.91zM6.91%205.033a.75.75%200%2001-.279-1.446l1.494-.595a.75.75%200%2001.556%201.392l-1.493.596a.744.744%200%2001-.277.053H6.91zM8.363%2021.364a.743.743%200%2001-.277-.053l-1.494-.596a.75.75%200%2001.555-1.392l1.494.595a.75.75%200%2001-.278%201.446zM15.63%208.223a.75.75%200%2001-.278-1.447l1.494-.595a.75.75%200%2001.556%201.393l-1.494.595a.744.744%200%2001-.276.054h-.002zM15.63%2014.567a.75.75%200%2001-.278-1.446l1.494-.596a.75.75%200%2001.556%201.394l-1.494.595a.743.743%200%2001-.276.053h-.002zM15.63%2021.363a.749.749%200%2001-.278-1.445l1.494-.595a.75.75%200%2011.555%201.392l-1.494.595a.741.741%200%2001-.277.053z'%20fill='%235699DB'%3e%3c/path%3e%3c/svg%3e`,pk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.6638%209.91965C35.3251%209.75432%2035.1785%2010.0703%2034.9811%2010.2316C34.9131%2010.2836%2034.8558%2010.3516%2034.7985%2010.413C34.3025%2010.9423%2033.7238%2011.289%2032.9678%2011.2476C31.8625%2011.1863%2030.9186%2011.533%2030.0839%2012.3783C29.9066%2011.3356%2029.3173%2010.7143%2028.4213%2010.3143C27.9519%2010.1063%2027.4773%209.89965%2027.148%209.44766C26.9186%209.12633%2026.856%208.76767%2026.7413%208.41568C26.668%208.20235%2026.5946%207.98502%2026.3506%207.94902C26.084%207.90769%2025.98%208.13035%2025.876%208.31702C25.4587%209.07967%2025.2973%209.91965%2025.3133%2010.7703C25.3493%2012.6849%2026.1573%2014.2102%2027.764%2015.2942C27.9466%2015.4182%2027.9933%2015.5435%2027.9359%2015.7249C27.8266%2016.0982%2027.696%2016.4609%2027.5813%2016.8355C27.508%2017.0742%2027.3986%2017.1248%2027.1426%2017.0222C26.2777%2016.6504%2025.4919%2016.1164%2024.828%2015.4489C23.6854%2014.3449%2022.6534%2013.1263%2021.3654%2012.1716C21.067%2011.9511%2020.7606%2011.7416%2020.4468%2011.5436C19.1335%2010.2676%2020.6201%209.21967%2020.9641%209.09567C21.3241%208.965%2021.0881%208.51968%2019.9254%208.52501C18.7628%208.53035%2017.6988%208.91834%2016.3428%209.43699C16.1413%209.51421%2015.934%209.57529%2015.7229%209.61966C14.4557%209.38091%2013.1598%209.33506%2011.8789%209.48366C9.36565%209.76365%207.35902%2010.953%205.88305%2012.9809C4.10975%2015.4182%203.69243%2018.1888%204.20308%2021.0768C4.74041%2024.122%206.29504%2026.6433%208.683%2028.6139C11.1603%2030.6579%2014.0122%2031.6592%2017.2668%2031.4672C19.2428%2031.3539%2021.4441%2031.0886%2023.9254%2028.9873C24.552%2029.2993%2025.208%2029.4233%2026.2986%2029.5166C27.1386%2029.5953%2027.9466%2029.4766%2028.5719%2029.3459C29.5519%2029.1379%2029.4839%2028.23%2029.1306%2028.0646C26.2573%2026.726%2026.888%2027.2713%2026.3133%2026.83C27.7746%2025.102%2029.9746%2023.3074%2030.8359%2017.4928C30.9026%2017.0302%2030.8452%2016.7395%2030.8359%2016.3662C30.8306%2016.1395%2030.8826%2016.0502%2031.1426%2016.0249C31.8639%2015.95%2032.5637%2015.7349%2033.2025%2015.3915C35.0638%2014.3742%2035.8158%2012.7049%2035.9931%2010.7023C36.0198%2010.3956%2035.9878%2010.081%2035.6638%209.91965ZM19.4414%2027.9433C16.6562%2025.754%2015.3055%2025.0327%2014.7482%2025.0634C14.2256%2025.0954%2014.3202%2025.6913%2014.4349%2026.0807C14.5549%2026.4647%2014.7109%2026.7286%2014.9295%2027.066C15.0815%2027.2886%2015.1855%2027.6206%2014.7789%2027.87C13.8816%2028.4246%2012.3229%2027.6833%2012.2496%2027.6473C10.435%2026.578%208.91632%2025.1673%207.84834%2023.2381C6.81637%2021.3808%206.21638%2019.3888%206.11771%2017.2622C6.09105%2016.7475%206.24171%2016.5662%206.7537%2016.4729C7.42583%2016.3442%208.11451%2016.3267%208.79233%2016.4209C11.6349%2016.8368%2014.0536%2018.1075%2016.0828%2020.1194C17.2402%2021.2661%2018.1161%2022.6354%2019.0188%2023.974C19.9788%2025.3953%2021.0108%2026.75%2022.3254%2027.8593C22.7894%2028.2486%2023.1587%2028.5446%2023.5134%2028.7619C22.4441%2028.8819%2020.6601%2028.9086%2019.4414%2027.9433ZM20.7748%2019.3568C20.7745%2019.2906%2020.7904%2019.2253%2020.8211%2019.1666C20.8517%2019.1078%2020.8962%2019.0575%2020.9507%2019.0198C21.0052%2018.9821%2021.068%2018.9583%2021.1337%2018.9503C21.1995%2018.9424%2021.2662%2018.9505%2021.3281%2018.9741C21.407%2019.0024%2021.475%2019.0546%2021.5228%2019.1235C21.5706%2019.1923%2021.5958%2019.2743%2021.5947%2019.3581C21.5949%2019.4123%2021.5843%2019.4659%2021.5636%2019.5159C21.5428%2019.5659%2021.5123%2019.6113%2021.4738%2019.6494C21.4354%2019.6875%2021.3897%2019.7176%2021.3395%2019.7378C21.2893%2019.7581%2021.2356%2019.7682%2021.1814%2019.7675C21.1277%2019.7676%2021.0745%2019.7571%2021.0248%2019.7365C20.9752%2019.7158%2020.9302%2019.6855%2020.8925%2019.6473C20.8548%2019.609%2020.825%2019.5636%2020.805%2019.5138C20.785%2019.4639%2020.7739%2019.4105%2020.7748%2019.3568ZM24.9213%2021.4848C24.6547%2021.5928%2024.3893%2021.6861%2024.1347%2021.6981C23.7516%2021.7114%2023.3756%2021.5918%2023.0707%2021.3594C22.7054%2021.0528%2022.4441%2020.8821%2022.3347%2020.3488C22.297%2020.0881%2022.3042%2019.823%2022.3561%2019.5648C22.4494%2019.1288%2022.3454%2018.8488%2022.0374%2018.5955C21.7881%2018.3875%2021.4694%2018.3302%2021.1201%2018.3302C21.0005%2018.3232%2020.8843%2018.2875%2020.7814%2018.2262C20.6348%2018.1542%2020.5148%2017.9728%2020.6294%2017.7488C20.6668%2017.6768%2020.8428%2017.5008%2020.8854%2017.4688C21.3601%2017.1995%2021.9081%2017.2875%2022.4134%2017.4902C22.8827%2017.6822%2023.2374%2018.0342%2023.748%2018.5328C24.2694%2019.1341%2024.364%2019.3008%2024.6613%2019.7515C24.896%2020.1048%2025.1093%2020.4674%2025.2547%2020.8821C25.344%2021.1421%2025.2293%2021.3541%2024.9213%2021.4848Z'%20fill='currentColor'/%3e%3c/svg%3e`,mk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.45%205.74999L11.9991%2011.6956L9.54562%205.74999H7.97237L10.6604%2012.2495C10.7678%2012.5138%2010.9515%2012.7402%2011.1882%2012.8996C11.4248%2013.059%2011.7036%2013.1442%2011.9889%2013.1444C12.2742%2013.1446%2012.5531%2013.0597%2012.79%2012.9006C13.0268%2012.7415%2013.2109%2012.5154%2013.3186%2012.2512L16.0232%205.74999H14.45ZM15.4965%2014.808L19.98%2010.2195L19.3684%208.75911L14.4719%2013.7807C14.272%2013.9856%2014.1369%2014.2448%2014.0835%2014.5261C14.0301%2014.8073%2014.0608%2015.098%2014.1718%2015.3619C14.2807%2015.624%2014.4648%2015.848%2014.7008%2016.0056C14.9369%2016.1632%2015.2144%2016.2473%2015.4983%2016.2474L15.5%2016.25L22.5%2016.2325L21.8884%2014.7721L15.4983%2014.808H15.4965ZM4.02%2010.216L4.63162%208.75561L9.52813%2013.7772C9.93763%2014.1964%2010.0557%2014.8176%209.82825%2015.3584C9.71925%2015.6204%209.53511%2015.8443%209.29905%2016.0019C9.06299%2016.1595%208.78557%2016.2437%208.50175%2016.2439L1.50175%2016.2281L1.5%2016.2299L2.11163%2014.7695L8.50175%2014.8062L4.02%2010.216Z'%20fill='currentColor'/%3e%3c/svg%3e`,hk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.3993%2026.4544C34.2871%2028.3855%2027.8314%2032.9425%2020%2032.9425C12.1686%2032.9425%205.71288%2028.3855%204.60075%2026.4544C4.5427%2026.3532%204.50826%2026.2401%204.5%2026.1237V22.418C4.51199%2022.3209%204.53496%2022.2256%204.56846%2022.1338C5.04896%2020.9261%206.30833%2019.1733%207.93325%2018.7031C8.14896%2018.149%208.468%2017.3404%208.76508%2016.7437C8.71727%2016.2776%208.69485%2015.8094%208.69792%2015.3409C8.69792%2013.6217%209.06217%2012.113%2010.1601%2010.9906C10.6729%2010.4662%2011.3097%2010.0644%2012.064%209.76091C13.871%208.29357%2016.4453%207.05745%2019.9716%207.05745C23.4978%207.05745%2026.129%208.29357%2027.936%209.76091C28.6903%2010.0644%2029.3271%2010.4662%2029.8399%2010.9906C30.9378%2012.113%2031.3021%2013.6217%2031.3021%2015.3409C31.3021%2015.8162%2031.284%2016.2877%2031.2349%2016.7437C31.532%2017.3404%2031.851%2018.149%2032.0667%2018.7031C33.6917%2019.1733%2034.951%2020.9261%2035.4315%2022.1338C35.4677%2022.2248%2035.4908%2022.3205%2035.5%2022.418V26.1237C35.4917%2026.2401%2035.4573%2026.3532%2035.3993%2026.4544ZM20.2222%2018.7147H19.7778C19.6422%2018.945%2019.4889%2019.1644%2019.3193%2019.3709C18.3247%2020.5941%2016.8419%2021.2981%2014.7881%2021.2981C12.56%2021.2981%2010.9273%2020.8344%209.90304%2019.6719C9.86495%2019.6283%209.82833%2019.5835%209.79325%2019.5375L9.66667%2019.6719V28.1775C11.5202%2029.1837%2015.4972%2030.992%2020%2030.992C24.5028%2030.992%2028.4798%2029.1837%2030.3333%2028.1775V19.6719L30.2067%2019.5375C30.2067%2019.5375%2030.1641%2019.5957%2030.097%2019.6719C29.0727%2020.8344%2027.44%2021.2981%2025.2119%2021.2981C23.1581%2021.2981%2021.6753%2020.5941%2020.6807%2019.3709C20.5111%2019.1644%2020.3578%2018.945%2020.2222%2018.7147ZM23.2292%2022.9127C23.9383%2022.9127%2024.5208%2023.4952%2024.5208%2024.2043V26.7877C24.5208%2027.4968%2023.9383%2028.0793%2023.2292%2028.0793C22.52%2028.0793%2021.9375%2027.4968%2021.9375%2026.7877V24.2043C21.9375%2023.4952%2022.52%2022.9127%2023.2292%2022.9127ZM16.7708%2022.9127C17.48%2022.9127%2018.0625%2023.4952%2018.0625%2024.2043V26.7877C18.0625%2027.4968%2017.48%2028.0793%2016.7708%2028.0793C16.0617%2028.0793%2015.4792%2027.4968%2015.4792%2026.7877V24.2043C15.4792%2023.4952%2016.0617%2022.9127%2016.7708%2022.9127ZM21.0501%2014.9237C21.2258%2016.289%2021.5707%2017.3947%2022.1842%2018.149C22.7551%2018.8517%2023.649%2019.3606%2025.2119%2019.3606C27.2437%2019.3606%2028.1724%2018.9253%2028.6438%2018.3905C29.1398%2017.8287%2029.3646%2016.9051%2029.3646%2015.3409C29.3646%2013.8684%2029.0507%2012.9552%2028.454%2012.3455C27.8378%2011.7152%2026.7502%2011.2321%2024.8063%2011.0216C22.8856%2010.8136%2021.975%2011.1998%2021.5345%2011.7049C21.187%2012.1014%2020.97%2012.7485%2020.9688%2013.7431V13.7702C20.9688%2014.1121%2020.9959%2014.4966%2021.0501%2014.9237ZM18.9499%2014.9237C19.0041%2014.4966%2019.0312%2014.1117%2019.0312%2013.7689V13.7431C19.03%2012.7485%2018.813%2012.1014%2018.4655%2011.7049C18.025%2011.1998%2017.1144%2010.8136%2015.1937%2011.0216C13.2498%2011.2321%2012.1622%2011.7152%2011.546%2012.3455C10.9493%2012.9552%2010.6354%2013.8684%2010.6354%2015.3409C10.6354%2016.9051%2010.8615%2017.8287%2011.3562%2018.3905C11.8276%2018.9253%2012.7563%2019.3606%2014.7881%2019.3606C16.351%2019.3606%2017.2449%2018.8517%2017.8158%2018.149C18.4293%2017.3947%2018.7742%2016.289%2018.9499%2014.9237Z'%20fill='currentColor'/%3e%3c/svg%3e`,gk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37%2020.034C27.8809%2020.5837%2020.5808%2027.8809%2020.0326%2037H19.966C19.4163%2027.8809%2012.1177%2020.5837%203%2020.034V19.9674C12.1191%2019.4163%2019.4163%2012.1191%2019.966%203H20.0326C20.5822%2012.1191%2027.8809%2019.4163%2037%2019.9674V20.034Z'%20fill='currentColor'/%3e%3c/svg%3e`,_k=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.056%204.50022C14.0839%204.44597%209.20616%209.15015%209.15036%2015.0106C9.09611%2020.8726%2013.8855%2025.6621%2019.8576%2025.7163H23.6085V21.7391H20.056C16.3252%2021.7825%2013.2671%2018.8468%2013.2237%2015.1827C13.1787%2011.5216%2016.1702%208.52086%2019.901%208.47746H20.056C23.7868%208.47746%2026.8108%2011.4457%2026.8216%2015.1083V24.8809C26.8216%2028.5109%2023.8085%2031.4683%2020.1211%2031.5132C18.3617%2031.5007%2016.6759%2030.8049%2015.42%2029.5726L12.551%2032.3905C14.5529%2034.3571%2017.239%2035.4715%2020.0451%2035.4998H20.1877C26.0823%2035.413%2030.8175%2030.7212%2030.85%2024.9351V14.8603C30.7059%209.0928%2025.9165%204.50022%2020.056%204.50022Z'%20fill='currentColor'/%3e%3c/svg%3e`,vk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M26.7365%207.70867C30.9594%2010.1097%2033.562%2014.5441%2033.562%2019.3448C33.562%2020.7468%2033.3436%2022.0995%2032.9378%2023.3705C33.2276%2023.3346%2033.5219%2023.3669%2033.7971%2023.4647C34.0723%2023.5626%2034.3208%2023.7233%2034.523%2023.9341C34.8338%2024.2495%2035.0303%2024.6597%2035.0814%2025.0996C35.1324%2025.5394%2035.0351%2025.9837%2034.8048%2026.3619C35.0922%2026.5944%2035.3008%2026.9044%2035.4079%2027.2525L35.4318%2027.3398C35.5164%2027.6526%2035.6009%2028.3121%2035.15%2028.9828C35.4938%2029.5042%2035.5431%2030.1608%2035.2811%2030.7244C34.9217%2031.5276%2034.0228%2032.1588%2032.2826%2032.838L31.9979%2032.9479L31.8133%2033.0156C31.1398%2033.2593%2030.5593%2033.4312%2030.3183%2033.5017L30.1971%2033.5355C28.9431%2033.8779%2027.6495%2034.0639%2026.3476%2034.0907C24.4876%2034.0907%2023.1067%2033.5834%2022.2289%2032.5872C20.7465%2032.8382%2019.2331%2032.8468%2017.748%2032.6126C16.8688%2033.5933%2015.4935%2034.0907%2013.6504%2034.0907C12.4424%2034.0666%2011.2411%2033.9044%2010.07%2033.6074L9.75858%2033.5228L9.37391%2033.4101C8.81508%2033.2406%208.26281%2033.0503%207.71825%2032.8394C5.97523%2032.1588%205.07625%2031.529%204.71693%2030.7244C4.45485%2030.1608%204.50416%2029.5028%204.84798%2028.9828C4.68566%2028.7453%204.57646%2028.4756%204.52782%2028.1921C4.47919%2027.9085%204.49227%2027.6178%204.56616%2027.3398C4.66339%2026.9552%204.88461%2026.6127%205.19602%2026.3619C4.96607%2025.9839%204.86892%2025.5399%204.91997%2025.1003C4.97102%2024.6607%205.16735%2024.2508%205.47783%2023.9355C5.80614%2023.5861%206.26268%2023.3846%206.76995%2023.362L6.87985%2023.3606C6.46754%2022.0619%206.2584%2020.7073%206.25986%2019.3448C6.25986%2014.5441%208.86242%2010.1097%2013.0854%207.70867C15.1666%206.52898%2017.518%205.90889%2019.9102%205.90889C22.3025%205.90889%2024.6553%206.52898%2026.7365%207.70867ZM8.99205%2023.8862C9.16818%2024.8542%2012.3132%2027.1975%2012.0075%2027.7006C11.7397%2028.1444%2010.8858%2027.3638%2010.6717%2027.1566L10.6139%2027.1003L10.3772%2026.8932C9.58668%2026.2182%207.13067%2024.2159%206.51631%2024.8754C5.91041%2025.5235%206.68399%2026.0858%208.00288%2026.8762L9.10759%2027.5343L9.29923%2027.6512C10.7717%2028.5573%2010.8774%2028.8349%2010.6378%2029.2195C10.3729%2029.6352%206.312%2026.2605%205.93155%2027.6935C5.5511%2029.1181%2010.077%2029.5309%209.79804%2030.5201C9.51622%2031.5064%206.60649%2028.6545%206.01469%2029.7634C5.41583%2030.8766%2010.1193%2032.1842%2010.1574%2032.1941L10.3828%2032.2504L10.6294%2032.3096C12.3583%2032.7098%2015.6527%2033.2255%2016.8786%2031.4585C17.8269%2030.0875%2017.7804%2029.0504%2016.5292%2027.7809L16.4488%2027.7006C15.1173%2026.3929%2014.3423%2024.4766%2014.3423%2024.4766L14.3183%2024.3949L14.2831%2024.2934C14.1676%2023.9834%2013.8829%2023.393%2013.3954%2023.4705C12.7472%2023.5734%2012.271%2025.1755%2013.5645%2026.1943L13.6349%2026.2478C15.0116%2027.2637%2013.3602%2027.9528%2012.8275%2027.0002L12.7458%2026.8537L12.5443%2026.5014C11.8919%2025.3756%2010.7379%2023.5269%2010.0939%2023.1239C9.34432%2022.6561%208.81592%2022.9154%208.99205%2023.8862ZM29.9055%2023.1239C29.1544%2023.5959%2027.7031%2026.0463%2027.1719%2027.0002C27.0805%2027.1684%2026.9358%2027.3014%2026.7606%2027.3785C26.5854%2027.4555%2026.3895%2027.4721%2026.2038%2027.4258C26.1115%2027.3997%2026.0266%2027.3525%2025.9558%2027.2877C25.9293%2027.2626%2025.9061%2027.2342%2025.8868%2027.2031L25.8671%2027.1637L25.8558%2027.1355L25.8459%2027.1087L25.8417%2027.0904L25.8375%2027.0665C25.8337%2027.0441%2025.8318%2027.0215%2025.8318%2026.9988C25.8318%2026.8297%2025.9319%2026.624%2026.1841%2026.3972C26.2207%2026.3633%2026.2602%2026.3309%2026.3025%2026.2985L26.3687%2026.2478C26.3997%2026.2253%2026.4293%2026.2027%2026.4575%2026.1788C27.7017%2025.1783%2027.2649%2023.6283%2026.6421%2023.4776L26.5984%2023.4691L26.5195%2023.4635C26.4902%2023.4638%2026.4609%2023.4667%2026.4321%2023.4719L26.3927%2023.479L26.3335%2023.4987L26.2785%2023.5227L26.2391%2023.5438L26.1996%2023.5706L26.1489%2023.6086L26.1165%2023.6368C25.8727%2023.8594%2025.7318%2024.2399%2025.6797%2024.4005L25.6571%2024.4766C25.6571%2024.4766%2024.9103%2026.3211%2023.6295%2027.6245L23.5534%2027.7006C23.0391%2028.205%2022.7136%2028.6728%2022.5642%2029.135C22.3627%2029.7507%2022.4712%2030.3581%2022.8601%2031.0415C22.9376%2031.1781%2023.025%2031.3162%2023.1236%2031.4585C24.3664%2033.2551%2027.7482%2032.6929%2029.456%2032.2899L29.859%2032.1913L30.2112%2032.087C30.6001%2031.9686%2031.2483%2031.7587%2031.9021%2031.4952L32.167%2031.3867L32.2586%2031.3472L32.3488%2031.3078L32.5235%2031.2289L32.6376%2031.1753C33.383%2030.8202%2033.996%2030.4102%2034.0383%2030.01L34.0397%2029.9593C34.0385%2029.8907%2034.0206%2029.8235%2033.9875%2029.7634C33.8551%2029.5154%2033.6057%2029.4647%2033.2957%2029.5267L33.2323%2029.5408C33.1703%2029.5549%2033.1055%2029.5746%2033.0406%2029.5972L32.904%2029.6465L32.8279%2029.6775C32.0402%2030.0016%2031.0834%2030.6709%2030.5635%2030.7272H30.572C30.5486%2030.7299%2030.525%2030.7314%2030.5015%2030.7315H30.4677L30.4339%2030.7272L30.4015%2030.7202C30.3056%2030.6976%2030.238%2030.6356%2030.2042%2030.5201C30.191%2030.4743%2030.1886%2030.4261%2030.1971%2030.3792C30.2845%2029.8931%2031.547%2029.5408%2032.6109%2029.0969L32.7039%2029.0575C33.4479%2028.7419%2034.0707%2028.3769%2034.0918%2027.8851V27.8288C34.0892%2027.7821%2034.0816%2027.7358%2034.0693%2027.6907C34.0016%2027.4371%2033.8227%2027.337%2033.562%2027.337C32.4559%2027.337%2029.9689%2029.2533%2029.4475%2029.2533C29.4123%2029.2533%2029.3799%2029.2435%2029.3658%2029.2195C29.3408%2029.1801%2029.3191%2029.1386%2029.301%2029.0955C29.1601%2028.7602%2029.3968%2028.4445%2030.7946%2027.5935L31.0891%2027.4159C31.8472%2026.965%2032.5122%2026.5874%2032.9786%2026.245C33.3873%2025.9463%2033.648%2025.6729%2033.6874%2025.3995L33.6916%2025.3601C33.7029%2025.2009%2033.6381%2025.0402%2033.4845%2024.8754C33.4561%2024.8447%2033.4228%2024.819%2033.3859%2024.7993L33.338%2024.7781L33.3196%2024.7711C33.2605%2024.7517%2033.1987%2024.7422%2033.1365%2024.7429C32.9082%2024.7429%2032.6165%2024.8415%2032.2981%2024.9965C31.4005%2025.4376%2030.2817%2026.338%2029.7251%2026.8072L29.3742%2027.1101L29.3277%2027.1566C29.215%2027.2666%2028.9219%2027.5371%2028.6331%2027.7006L28.533%2027.7527L28.4753%2027.7795C28.4202%2027.8031%2028.3625%2027.8202%2028.3034%2027.8302H28.3104C28.2959%2027.8322%2028.2813%2027.8337%2028.2667%2027.8344L28.2808%2027.833L28.2625%2027.8344C28.1512%2027.8415%2028.0582%2027.8048%2027.9948%2027.7006C27.9792%2027.6727%2027.9723%2027.6408%2027.975%2027.609C28.0131%2026.9537%2030.8411%2024.8035%2031.0074%2023.8862L31.02%2023.8186C31.1609%2022.9027%2030.6382%2022.6674%2029.9055%2023.1239ZM19.9123%207.29581C13.1516%207.29581%207.67034%2012.6911%207.67034%2019.3434C7.67034%2020.3184%207.7873%2021.2653%208.00852%2022.1728L8.01979%2022.1601C8.37488%2021.7402%208.88214%2021.5119%209.45282%2021.5119C9.95304%2021.5232%2010.4378%2021.6768%2010.852%2021.9515C11.162%2022.1488%2011.5072%2022.4926%2011.8595%2022.9294C12.2273%2022.4053%2012.8318%2022.0868%2013.4799%2022.077C14.6805%2022.077%2015.4061%2023.1028%2015.6809%2024.0257L15.7471%2024.1736L15.8317%2024.3526C16.1022%2024.9106%2016.6701%2025.9575%2017.4422%2026.7198C18.9359%2028.1853%2019.3078%2029.7%2018.5695%2031.3219C19.5178%2031.4242%2020.4747%2031.4176%2021.4215%2031.3021C20.7099%2029.724%2021.0551%2028.2444%2022.4642%2026.8128L22.5572%2026.7198C23.5365%2025.756%2024.1875%2024.3385%2024.3213%2024.0257C24.5961%2023.1028%2025.3189%2022.077%2026.5195%2022.077C27.1676%2022.0868%2027.7721%2022.4053%2028.1399%2022.9294C28.4922%2022.4926%2028.8374%2022.1502%2029.1516%2021.9515C29.5658%2021.6763%2030.0494%2021.5239%2030.5466%2021.5119C31.0496%2021.5119%2031.5076%2021.6895%2031.85%2022.0192C32.0472%2021.1596%2032.1529%2020.2649%2032.1529%2019.3448C32.1529%2012.6911%2026.6716%207.29581%2019.9123%207.29581ZM22.529%2019.8732L23.1476%2019.5744C23.9268%2019.2025%2024.4016%2019.0348%2024.4016%2019.7886C24.4016%2021.3287%2023.3152%2024.3089%2019.956%2024.385H19.6968C16.4207%2024.3117%2015.3061%2021.4823%2015.2497%2019.9112L15.2483%2019.7886C15.2483%2018.2288%2017.2943%2020.6143%2019.8278%2020.6143C20.8367%2020.6143%2021.7709%2020.2311%2022.529%2019.8732ZM28.1892%2015.4445C28.8233%2015.4445%2029.3348%2015.9489%2029.3348%2016.5717C29.3348%2017.1931%2028.8219%2017.699%2028.1892%2017.699C28.0401%2017.7001%2027.8922%2017.6718%2027.754%2017.6158C27.6157%2017.5597%2027.4899%2017.477%2027.3837%2017.3723C27.2774%2017.2676%2027.1928%2017.1431%2027.1347%2017.0057C27.0766%2016.8683%2027.0462%2016.7209%2027.0451%2016.5717C27.0451%2015.9489%2027.558%2015.4445%2028.1892%2015.4445ZM11.8102%2015.4445C12.4415%2015.4445%2012.9544%2015.9489%2012.9544%2016.5717C12.9544%2017.1931%2012.4415%2017.699%2011.8102%2017.699C11.6609%2017.7003%2011.5129%2017.6721%2011.3745%2017.6162C11.2361%2017.5602%2011.1101%2017.4775%2011.0037%2017.3728C10.8973%2017.2681%2010.8126%2017.1435%2010.7544%2017.006C10.6962%2016.8686%2010.6657%2016.721%2010.6646%2016.5717C10.6646%2015.9489%2011.1775%2015.4445%2011.8102%2015.4445ZM22.7868%2014.2594C23.2377%2013.7184%2023.9789%2013.4985%2024.6609%2013.7043C25.3415%2013.91%2025.8304%2014.499%2025.8981%2015.1979C25.9657%2015.8954%2025.5993%2016.5647%2024.9695%2016.893C24.5158%2017.1297%2024.3396%2016.2209%2023.8887%2016.0687L23.8916%2016.0645C23.4872%2015.9264%2022.8038%2016.5745%2022.5882%2016.1758C22.425%2015.8734%2022.3565%2015.529%2022.3917%2015.1872C22.4269%2014.8455%2022.5655%2014.5222%2022.7868%2014.2594ZM16.6954%2014.2594C17.1492%2014.8005%2017.2267%2015.5558%2016.8927%2016.1758C16.6785%2016.5745%2015.9909%2015.9264%2015.5893%2016.0645L15.5935%2016.0687C15.4414%2016.1194%2015.3202%2016.2575%2015.2089%2016.4069L15.0426%2016.6394C14.8876%2016.8507%2014.7326%2017.0085%2014.5114%2016.893C14.2053%2016.7349%2013.9535%2016.4889%2013.7882%2016.1866C13.623%2015.8843%2013.552%2015.5395%2013.5842%2015.1965C13.6518%2014.499%2014.1408%2013.91%2014.8214%2013.7043C15.1538%2013.6037%2015.5085%2013.6026%2015.8415%2013.7013C16.1746%2013.7999%2016.4714%2013.994%2016.6954%2014.2594Z'%20fill='currentColor'/%3e%3c/svg%3e`,yk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eHunyuan%3c/title%3e%3ccircle%20cx='12'%20cy='12'%20fill='%230055E9'%20r='12'%3e%3c/circle%3e%3cpath%20d='M12%200c.518%200%201.028.033%201.528.096A6.188%206.188%200%200112.12%2012.28l-.12.001c-2.99%200-5.242%202.179-5.554%205.11-.223%202.086.353%204.412%202.242%206.146C3.672%2022.1%200%2017.479%200%2012%200%205.373%205.373%200%2012%200z'%20fill='%23A8DFF5'%3e%3c/path%3e%3cpath%20d='M5.286%205a2.438%202.438%200%2001.682%203.38c-3.962%205.966-3.215%2010.743%202.648%2015.136C3.636%2022.056%200%2017.452%200%2012c0-1.787.39-3.482%201.09-5.006.253-.435.525-.872.817-1.311A2.438%202.438%200%20015.286%205z'%20fill='%230055E9'%3e%3c/path%3e%3cpath%20d='M12.98.04c.272.021.543.053.81.093.583.106%201.117.254%201.538.44%206.638%202.927%208.07%2010.052%201.748%2015.642a4.125%204.125%200%2001-5.822-.358c-1.51-1.706-1.3-4.184.357-5.822.858-.848%203.108-1.223%204.045-2.441%201.257-1.634%202.122-6.009-2.523-7.506L12.98.039z'%20fill='%2300BCFF'%3e%3c/path%3e%3cpath%20d='M13.528.096A6.187%206.187%200%200112%2012.281a5.75%205.75%200%2000-1.71.255c.147-.905.595-1.784%201.321-2.501.858-.848%203.108-1.223%204.045-2.441%201.27-1.651%202.14-6.104-2.676-7.554.184.014.367.033.548.056z'%20fill='%23ECECEE'%3e%3c/path%3e%3c/svg%3e`,bk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.51531%2015.81L10.908%2017.7878C10.8981%2018.3134%2010.9136%2018.8392%2010.9545%2019.3633L15.5704%2020.5979C14.2013%2021.163%2012.7171%2021.3928%2011.2413%2021.2683L11.1018%2021.2559L11.0677%2021.2528L11.0026%2021.2458L10.9297%2021.238C10.8891%2021.2332%2010.8486%2021.228%2010.808%2021.2225L10.7251%2021.2117L10.6399%2021.1993C10.557%2021.1872%2010.4743%2021.1741%2010.3919%2021.1598L10.3593%2021.1536L10.3012%2021.1435L10.2183%2021.128L10.164%2021.1164L10.0919%2021.1016L10.0338%2021.0892L9.96019%2021.0737L9.88501%2021.0559L9.81216%2021.0389L9.75946%2021.0257L9.69126%2021.0086L9.62151%2020.99L9.54789%2020.9707L9.48434%2020.9528L9.39986%2020.9296L9.35181%2020.9141L9.28671%2020.8947L9.21464%2020.873L9.13326%2020.8467L9.08831%2020.8319L9.02631%2020.8118L8.95656%2020.7878L8.90541%2020.7692C8.89403%2020.7653%208.88267%2020.7615%208.87131%2020.7575L8.81861%2020.7382L8.74034%2020.7095L8.69617%2020.6924L8.63417%2020.6692L8.56674%2020.6421L8.49854%2020.6149L8.43732%2020.5901L8.36369%2020.5591L8.31487%2020.5374L8.26604%2020.5165C8.25543%2020.5119%208.24484%2020.5073%208.23427%2020.5026L8.18312%2020.4793L8.10329%2020.4429L8.06299%2020.4243L7.98859%2020.3886L7.94054%2020.3654L7.87544%2020.3344L7.80879%2020.3003L7.73672%2020.2639L7.69642%2020.2429L7.61659%2020.2003L7.57242%2020.1771L7.52747%2020.1523C7.51556%2020.1456%207.50367%2020.1389%207.49182%2020.1321L7.41897%2020.091L7.37247%2020.0647L7.33294%2020.0414L7.27714%2020.0097L7.21359%2019.9709L7.14152%2019.9275L7.10122%2019.9027L7.03612%2019.8616L6.98885%2019.8314L6.92762%2019.7927L6.87337%2019.7562L6.8323%2019.7291C6.81831%2019.7199%206.80436%2019.7106%206.79045%2019.7012L6.75635%2019.678L6.72225%2019.6547C6.71188%2019.6475%206.70155%2019.6403%206.69125%2019.633L6.64707%2019.602L6.58817%2019.5602L6.5347%2019.5214L6.47735%2019.4796L6.43395%2019.447L6.37505%2019.4028L6.31615%2019.3571L6.2495%2019.3052L6.21462%2019.2781L6.16502%2019.2378L6.10767%2019.1913L6.0387%2019.1347L6.00305%2019.1045L5.9674%2019.0742C5.95625%2019.0647%205.94515%2019.0552%205.93407%2019.0456L5.8992%2019.0146L5.85192%2018.9735L5.79767%2018.9255L5.74497%2018.8789L5.69692%2018.834L5.645%2018.786L5.60392%2018.7472L5.53572%2018.6821C5.51002%2018.6572%205.48444%2018.6321%205.459%2018.6069L5.43653%2018.5852L5.40475%2018.5527L5.35128%2018.4984L5.31253%2018.4589L5.27378%2018.4178C5.2295%2018.3724%205.18609%2018.3262%205.14358%2018.2791L5.08158%2018.2109L5.03353%2018.1567L4.9785%2018.0947L4.94595%2018.0567L4.90488%2018.0086L4.85993%2017.9559L4.82428%2017.9125C4.81728%2017.904%204.8103%2017.8955%204.80335%2017.887L4.76848%2017.8443L4.71733%2017.7808L4.68555%2017.7405L4.6468%2017.6909L4.6313%2017.6715C4.18786%2017.0967%203.81331%2016.4719%203.51531%2015.81ZM2.72481%2011.3196L11.5234%2013.6733C11.3761%2014.1864%2011.2547%2014.7065%2011.1599%2015.2318L19.543%2017.4747C19.1266%2018.0449%2018.6469%2018.5662%2018.1132%2019.0285L3.20918%2015.0404L3.19678%2015.0047L3.16966%2014.9241C3.15647%2014.8847%203.14356%2014.8452%203.13091%2014.8056L3.12548%2014.7877C3.06583%2014.5981%203.01233%2014.4066%202.96506%2014.2135L2.94181%2014.1158L2.92786%2014.0538L2.91158%2013.9786L2.89763%2013.9159L2.88368%2013.8461L2.87051%2013.781L2.85656%2013.7082C2.83641%2013.5989%202.81781%2013.4888%202.80153%2013.378L2.78836%2013.2866L2.77983%2013.2222L2.76976%2013.1432C2.76457%2013.1016%202.75966%2013.06%202.75503%2013.0184L2.75116%2012.982C2.69326%2012.4297%202.68444%2011.8734%202.72481%2011.3196ZM3.95938%207.32839L13.2191%209.80528C12.9339%2010.2742%2012.6727%2010.7593%2012.4363%2011.2584L21.1899%2013.6004C21.0799%2014.2359%2020.9047%2014.8497%2020.6722%2015.4333L11.721%2013.0386L2.79611%2010.6516L2.80773%2010.5741L2.81393%2010.5361L2.82168%2010.4842L2.83331%2010.4168L2.84726%2010.3408C2.86741%2010.2261%202.89066%2010.1122%202.91546%209.99825L2.93716%209.90215L2.95266%209.83628L2.97126%209.7611C2.98831%209.69135%203.00613%209.6216%203.02551%209.5534L3.04721%209.47435L3.06503%209.41003L3.08828%209.33253L3.10766%209.26898L3.13091%209.19458L3.15106%209.13103L3.17508%209.05741C3.37577%208.45541%203.63808%207.87573%203.95783%207.32761L3.95938%207.32839ZM7.40192%203.9184L16.1478%206.25734C15.6862%206.67623%2015.2494%207.12157%2014.8396%207.59111L20.9024%209.21318C21.1093%209.87348%2021.2449%2010.5648%2021.3%2011.2785L4.33215%206.74016L4.36703%206.68979L4.38795%206.65879L4.41895%206.61616L4.4546%206.56579L4.49723%206.50689L4.53908%206.45109L4.58868%206.38444L4.62743%206.33406L4.6716%206.27749L4.71423%206.22324L4.76073%206.16589L4.80335%206.11241L4.85373%206.05274L4.89558%206.00159L4.94673%205.94192L4.9878%205.89542L5.0436%205.83187L5.08468%205.78537L5.1366%205.72802L5.17845%205.68307L5.23503%205.62262L5.27998%205.57612L5.3288%205.52419L5.459%205.39244L5.5365%205.31649L5.58222%205.27309L5.64112%205.21807C6.17525%204.71752%206.76621%204.28132%207.40192%203.9184ZM12.0132%202.7001H12.0883L12.1519%202.70088L12.2054%202.70165L12.2472%202.7032L12.2999%202.70475L12.3356%202.70553L12.3945%202.70785L12.4309%202.7094L12.4774%202.71173L12.5192%202.71328L12.5867%202.71715L12.668%202.72258L12.7796%202.7311L12.8478%202.73653L12.8819%202.73963L12.9416%202.74583L13.0052%202.75203L13.0416%202.7559L13.1206%202.7652L13.1594%202.76985L13.2431%202.7807L13.3059%202.78845L13.3384%202.7931L13.3888%202.80085L13.5492%202.82565L13.6035%202.83495L13.6538%202.84348L13.7623%202.86363L13.8336%202.87758L13.9189%202.89462L13.9545%202.90237L14.0126%202.91477L14.0444%202.92252L14.0925%202.9326L14.125%202.94035L14.1754%202.95197L14.2134%202.96127L14.2684%202.97445L14.3428%202.99305L14.4296%203.0163L14.5172%203.03955L14.6047%203.06435L14.6435%203.07597L14.6977%203.09147L14.7582%203.11007L14.8148%203.1279L14.8535%203.1403L14.8923%203.1527L14.9512%203.17207L15.0279%203.19765L15.1069%203.22555L15.1441%203.23872L15.1937%203.25655L15.2658%203.2829L15.3511%203.31467L15.441%203.34955L15.5185%203.38055L15.5549%203.39605L15.6014%203.41465L15.6332%203.4286L15.682%203.44875L15.713%203.4627L15.7572%203.48207L15.8424%203.51927L15.9199%203.55492L15.9773%203.58205L16.0354%203.60995L16.0819%203.63165L16.1532%203.6673L16.2237%203.70217L16.3028%203.74247L16.3438%203.76417L16.3818%203.78432L16.4175%203.80292L16.464%203.8285L16.4957%203.84555L16.536%203.86802L16.6042%203.90677L16.6864%203.95327L16.7538%203.9928L16.798%204.01915L16.8391%204.04395L16.9135%204.08967L16.9817%204.1323L17.0576%204.18035L17.0855%204.19895L17.1351%204.23072L17.2002%204.27412L17.2312%204.29505L17.2793%204.3276L17.3273%204.36092L17.3451%204.3741C17.387%204.40277%2017.4288%204.43222%2017.4699%204.46244L17.5342%204.50894L17.5846%204.54614L17.628%204.57947L17.6947%204.62984L17.7582%204.67944L17.7892%204.70269L17.828%204.73447L17.8946%204.78794L17.9558%204.83832L18.0217%204.89334C18.5735%205.35834%2019.0703%205.88767%2019.5012%206.46736L8.29704%203.47045L8.34509%203.44952L8.39547%203.42782L8.45824%203.40147L8.52489%203.37435C8.61247%203.33947%208.70082%203.3046%208.78916%203.27282L8.86356%203.2457L8.93564%203.22012L9.00074%203.19687L9.07514%203.17285C9.14256%203.1496%209.21154%203.1279%209.27974%203.10697L9.35026%203.08605L9.41691%203.06667L9.49596%203.04342L9.56184%203.0256L9.63934%203.00545L9.70599%202.98685L9.77574%202.96902L9.84626%202.95197L9.91989%202.93492L9.98964%202.91942L10.0656%202.90315L10.1361%202.88765L10.2097%202.8737L10.281%202.85975L10.3585%202.8458L10.4291%202.8334L10.505%202.82023L10.5763%202.80938L10.6515%202.79775L10.7228%202.78768L10.8018%202.7776L10.8724%202.7683L10.9537%202.759L11.0235%202.75125L11.1049%202.7435C11.1769%202.73575%2011.249%202.72955%2011.3219%202.7249L11.404%202.7187L11.4738%202.71483L11.559%202.71018L11.6311%202.70708L11.7086%202.70398L11.7838%202.70243L11.8605%202.70088L12.0132%202.69933V2.7001Z'%20fill='currentColor'/%3e%3c/svg%3e`,xk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M27.1942%209.03509C24.4881%209.03509%2022.3726%2011.0731%2020.4574%2013.6623C17.8258%2010.3114%2015.6255%209.03509%2012.9925%209.03509C7.62404%209.03509%203.51001%2016.0234%203.51001%2023.4181C3.51001%2028.0453%205.74831%2030.9649%209.49831%2030.9649C12.1971%2030.9649%2014.1387%2029.693%2017.5904%2023.6594C17.5904%2023.6594%2019.029%2021.1199%2020.0173%2019.3699C20.3643%2019.9293%2020.7298%2020.5327%2021.1138%2021.1798L22.7322%2023.902C25.8843%2029.1769%2027.6416%2030.9649%2030.8229%2030.9649C34.4778%2030.9649%2036.51%2028.0058%2036.51%2023.2822C36.51%2015.538%2032.3039%209.03509%2027.1942%209.03509ZM14.9574%2022.0263C12.1606%2026.4123%2011.1928%2027.3962%209.63574%2027.3962C8.03194%2027.3962%207.07872%2025.9883%207.07872%2023.4781C7.07872%2018.1096%209.75562%2012.6199%2012.9471%2012.6199C14.6752%2012.6199%2016.1197%2013.617%2018.3316%2016.7836C16.2308%2020.0058%2014.9574%2022.0263%2014.9574%2022.0263ZM25.5202%2021.4751L23.5831%2018.2456C23.0969%2017.4514%2022.5938%2016.6676%2022.0743%2015.8947C23.8185%2013.2032%2025.2556%2011.8611%2026.9676%2011.8611C30.5202%2011.8611%2033.3638%2017.095%2033.3638%2023.5219C33.3638%2025.9722%2032.5612%2027.3947%2030.8989%2027.3947C29.3053%2027.3947%2028.5451%2026.3421%2025.5188%2021.4737'%20fill='currentColor'/%3e%3c/svg%3e`,Sk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eLM%20Studio%3c/title%3e%3cpath%20d='M2.84%202a1.273%201.273%200%20100%202.547h14.107a1.273%201.273%200%20100-2.547H2.84zM7.935%205.33a1.273%201.273%200%20000%202.548H22.04a1.274%201.274%200%20000-2.547H7.935zM3.624%209.935c0-.704.57-1.274%201.274-1.274h14.106a1.274%201.274%200%20010%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM1.273%2012.188a1.273%201.273%200%20100%202.547H15.38a1.274%201.274%200%20000-2.547H1.273zM3.624%2016.792c0-.704.57-1.274%201.274-1.274h14.106a1.273%201.273%200%20110%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM13.029%2018.849a1.273%201.273%200%20100%202.547h9.698a1.273%201.273%200%20100-2.547h-9.698z'%20fill-opacity='.3'%3e%3c/path%3e%3cpath%20d='M2.84%202a1.273%201.273%200%20100%202.547h10.287a1.274%201.274%200%20000-2.547H2.84zM7.935%205.33a1.273%201.273%200%20000%202.548H18.22a1.274%201.274%200%20000-2.547H7.935zM3.624%209.935c0-.704.57-1.274%201.274-1.274h10.286a1.273%201.273%200%20010%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM1.273%2012.188a1.273%201.273%200%20100%202.547H11.56a1.274%201.274%200%20000-2.547H1.273zM3.624%2016.792c0-.704.57-1.274%201.274-1.274h10.286a1.273%201.273%200%20110%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM13.029%2018.849a1.273%201.273%200%20100%202.547h5.78a1.273%201.273%200%20100-2.547h-5.78z'%3e%3c/path%3e%3c/svg%3e`,Ck=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20version='1.0'%20width='1024pt'%20height='1024pt'%20viewBox='0%200%201024%201024'%20preserveAspectRatio='xMidYMid'%20id='svg12'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs12'%20/%3e%3cg%20transform='matrix(0.17799229,0,0,-0.17799229,-413.52,1737.5728)'%20fill='%23000000'%20stroke='none'%20id='g12'%3e%3cpath%20d='M%200,5120%20V%200%20h%205120%205120%20v%205120%205120%20H%205120%200%20Z%20m%203596,4831%20c%2061,-37%20155,-176%20204,-304%2035,-89%2075,-244%2090,-342%2014,-101%2012,-297%20-5,-454%20-16,-148%20-23,-301%20-15,-301%203,0%2014,14%2025,32%2010,18%2055,80%2099,138%20179,236%20317,380%20416,434%20l%2053,29%20-6,-32%20c%20-10,-49%20-56,-159%20-98,-233%20-20,-37%20-40,-76%20-44,-87%20-6,-21%20-6,-21%2027,-2%2056,33%20195,71%20281,77%2080,6%20290,-18%20310,-35%204,-4%20-55,-39%20-131,-78%20l%20-138,-71%2060,-12%20c%20267,-50%20496,-159%20627,-297%2025,-26%2063,-69%2084,-95%20l%2037,-48%20h%20-65%20c%20-60,0%20-74,5%20-169,54%20-94,50%20-255,113%20-264,103%20-2,-2%2017,-19%2044,-37%2026,-18%2070,-55%2099,-82%20l%2052,-48%20h%20-628%20-627%20l%20-149,-60%20c%20-82,-33%20-149,-59%20-149,-57%20-8,24%20-69,129%20-135,232%20-106,163%20-163,270%20-191,360%20-32,99%20-40,344%20-15,465%2028,139%20257,770%20279,770%206,0%2025,-9%2042,-19%20z%20m%201998,-306%20c%20-1,-239%20-33,-372%20-136,-580%20-71,-142%20-234,-374%20-263,-375%20-5,0%20-48,16%20-95,35%20-47,19%20-79,34%20-73,35%2033,1%20249,158%20236,171%20-13,13%20-204,58%20-301,71%20l%20-92,12%2078,81%20c%20180,184%20327,357%20464,544%2055,75%20114,148%20131,163%2029,26%2032,27%2042,10%206,-10%2010,-79%209,-167%20z%20M%203433,8105%20c%20-6,-39%20-5,-40%2031,-24%2016,8%2023,17%2019,28%20-4,11%20-1,10%209,-3%2015,-19%2013,-21%20-35,-43%20-27,-13%20-51,-22%20-53,-20%20-4,4%2026,97%2031,97%202,0%201,-16%20-2,-35%20z%20m%202699,3%20c%2020,-37%2019,-247%20-2,-353%20-25,-124%20-39,-175%20-50,-175%20-5,0%20-20,10%20-35,23%20l%20-25,22%2025,99%20c%2014,54%2025,118%2025,142%200,29%204,44%2013,44%207,0%208,3%202,8%20-5,4%20-10,31%20-10,61%20-1,40%20-6,57%20-20,67%20-29,22%20-2025,21%20-2025,-1%200,-34%2070,-414%2084,-452%2024,-67%2044,-91%20104,-120%2056,-28%2060,-28%20278,-31%20243,-4%20321,7%20393,53%2058,36%2085,92%20127,258%2020,82%2045,158%2055,170%2016,20%2026,22%20111,22%20123,-1%20168,-10%20168,-35%200,-43%20-8,-47%20-66,-37%20-64,11%20-114,3%20-143,-21%20-13,-11%20-31,-56%20-51,-132%20-59,-218%20-112,-291%20-242,-332%20-67,-21%20-91,-23%20-303,-23%20-210,0%20-236,2%20-301,22%20-160,51%20-230,168%20-269,450%20-20,141%20-21,143%20-55,143%20-36,0%20-384,-113%20-588,-192%20-215,-82%20-198,-79%20-173,-31%2030,59%2095,91%20651,317%20l%20135,55%201087,1%20h%201087%20z%20m%20-1516,-350%20-115,-223%20-55,-3%20c%20-31,-2%20-56,0%20-56,3%200,3%2052,104%20116,225%20l%20116,220%20h%2055%2054%20z%20m%20294,218%20c%200,-2%20-47,-100%20-105,-217%20-60,-123%20-112,-217%20-122,-221%20-10,-3%20-31,-7%20-46,-7%20-37,-1%20-36,1%2076,219%20116,225%20120,230%20163,230%2019,0%2034,-2%2034,-4%20z%20m%201028,-4%20c%20-1,-4%20-25,-63%20-52,-130%20l%20-50,-123%20-30,7%20c%20-17,3%20-33,8%20-35,10%20-2,2%2018,57%2045,124%20l%2049,120%20h%2038%20c%2021,0%2037,-3%2035,-8%20z%20m%20-507,-241%20c%20275,-69%20471,-147%20551,-219%2079,-71%2091,-136%2046,-242%20-33,-76%20-34,-76%20-97,-17%20-32,29%20-88,68%20-127,87%20-63,32%20-76,35%20-159,35%20-99,0%20-134,-12%20-192,-68%20-37,-35%20-40,-52%20-17,-86%2014,-19%2022,-22%2048,-16%2090,20%20116,22%20171,14%2067,-11%20164,-53%20229,-99%20128,-92%20119,-270%20-17,-343%20-36,-19%20-57,-22%20-152,-22%20-129,1%20-224,24%20-352,86%20-88,42%20-127,81%20-144,143%20-13,45%20-36,47%20-83,6%20-44,-39%20-68,-101%20-64,-165%203,-55%2018,-67%2038,-30%207,14%2018,25%2024,25%206,0%2041,-20%2078,-45%20147,-98%20254,-139%20417,-157%20130,-14%20245,-3%20354,33%2076,26%2093,20%2082,-29%20-11,-52%20-70,-108%20-158,-152%20-171,-83%20-335,-79%20-672,16%20-66,19%20-159,41%20-205,49%20-99,17%20-326,20%20-420,4%20-36,-6%20-120,-11%20-187,-12%20-68,-1%20-123,-3%20-123,-4%200,-1%2026,-26%2058,-56%2031,-29%2077,-73%20102,-96%20l%2045,-42%20-60,6%20c%20-76,9%20-212,48%20-274,79%20-51,27%20-134,88%20-193,144%20-21,20%20-38,34%20-38,32%200,-3%2017,-56%2038,-117%20l%2038,-113%20-25,17%20c%20-180,116%20-370,347%20-421,511%20-26,81%20-34,49%20-28,-111%207,-186%2077,-470%2078,-317%20l%201,55%2062,-120%20c%20119,-229%20216,-361%20418,-566%20232,-235%20430,-395%20604,-489%2060,-32%2060,-32%2020,-26%20-64,10%20-308,36%20-335,36%20-66,-1%20414,-266%20565,-313%2044,-14%20125,-32%20180,-41%20104,-16%20255,-26%20255,-16%200,3%20-16,12%20-36,19%20-34,12%20-268,163%20-278,179%20-2,4%2081,6%20185,4%20121,-2%20189,0%20189,6%200,6%20-4,12%20-9,14%20-31,11%20-275,438%20-259,453%202,2%2038,-14%2081,-36%2042,-22%2077,-38%2077,-36%200,3%20-11,29%20-24,58%20-57,130%20-113,351%20-130,519%20-5,51%20-3,46%2037,-65%20124,-346%20259,-568%20422,-698%20l%2050,-40%20-55,7%20c%20-30,4%20-75,11%20-100,16%20-25,5%20-63,12%20-84,15%20l%20-39,6%2041,-49%20c%2054,-64%20159,-162%20214,-200%2041,-28%20224,-123%20258,-134%208,-3%20-30,-3%20-85,-1%20-55,3%20-111,1%20-124,-4%20-22,-9%20-20,-12%2040,-51%2095,-61%20228,-120%20337,-149%2089,-23%20118,-26%20357,-29%20150,-2%20252,0%20240,5%20-11,4%20-74,25%20-140,46%20-104,33%20-266,97%20-287,114%20-7,6%20101,4%201095,-14%20409,-8%20428,-9%20423,-27%20-3,-10%20-9,-26%20-12,-37%20-5,-15%202,-19%2048,-24%2029,-4%20118,-7%20198,-8%2097,0%20136,-4%20117,-9%20-16,-5%20-35,-6%20-43,-3%20-8,3%20-14,0%20-14,-6%200,-8%2060,-11%20198,-11%20109,0%20201,-2%20204,-5%203,-3%20-4,-23%20-14,-45%20l%20-20,-40%20-87,-1%20c%20-47,-1%20-135,-3%20-196,-5%20-60,-3%20-315,-9%20-565,-14%20-250,-4%20-637,-14%20-860,-20%20-235,-7%20-554,-10%20-760,-6%20-195,3%20-512,7%20-703,8%20l%20-348,1%20-20,-29%20c%20-10,-16%20-19,-32%20-19,-35%200,-7%20171,-14%20690,-30%20206,-6%20383,-15%20393,-20%209,-6%2017,-19%2017,-29%200,-19%209,-20%20363,-22%20340,-1%20326,-2%20-228,-10%20-324,-4%20-606,-12%20-625,-16%20-26,-6%20-39,-17%20-54,-45%20l%20-20,-37%20h%20-136%20-136%20l%20-20,-44%20-21,-44%20201,-6%20c%20479,-16%20978,-24%201336,-22%20212,2%20257,1%20101,-1%20-177,-2%20-289,-7%20-297,-14%20-7,-5%20-20,-31%20-29,-57%20l%20-17,-47%20h%20-797%20-796%20l%20-5,-62%20-5,-62%20-45,31%20c%20-70,48%20-174,134%20-219,183%20-23,25%20-43,45%20-44,45%20-10,0%2019,-148%2044,-227%2055,-170%20126,-302%20226,-421%20l%2045,-52%20-59,21%20c%20-218,80%20-429,215%20-575,367%20-96,99%20-85,98%2015,-1%2093,-94%20196,-173%20312,-240%2077,-45%20236,-117%20257,-117%206,0%20-5,19%20-24,43%20-19,23%20-54,74%20-79,114%20-25,40%20-53,74%20-65,77%20-24,6%20-217,178%20-290,259%20-122,133%20-220,289%20-315,498%20-34,74%20-67,150%20-74,169%20-13,34%20-14,33%20-14,-44%20-1,-72%2022,-373%2034,-456%20l%205,-35%20-25,40%20c%20-67,104%20-186,363%20-240,520%20-53,158%20-145,603%20-145,704%200,58%20-8,31%20-29,-99%20-47,-290%20-54,-374%20-48,-620%205,-225%2013,-294%2052,-455%205,-16%205,-27%201,-24%20-3,3%20-15,46%20-26,95%20-63,290%20-56,624%2020,1061%2011,61%2020,114%2020,118%200,4%20-37,-44%20-81,-107%20-45,-62%20-111,-151%20-148,-197%20-36,-47%20-71,-94%20-78,-105%20-12,-21%20-12,-21%20-13,2%200,39%2029,312%2046,417%2023,155%20125,718%20130,727%2012,18%20-11,3%20-130,-88%20-69,-52%20-126,-92%20-126,-88%200,4%2013,50%2030,103%2041,134%20112,431%20155,651%2020,102%2044,218%2054,258%2011,39%2017,72%2016,72%20-4,0%20-102,-63%20-201,-130%20l%20-72,-48%2040,87%20c%2087,188%20191,397%20206,414%208,9%2047,27%2086,38%2039,12%20140,43%20223,70%2084,27%20159,49%20165,48%2013,0%20-196,-69%20-375,-125%20l%20-88,-27%20-30,-59%20c%20-17,-33%20-28,-63%20-25,-66%205,-4%20332,63%20401,83%2017,5%2025,-3%2044,-42%2073,-151%20172,-256%20305,-323%20105,-52%20170,-64%20331,-57%20148,6%20239,27%20372,84%2076,32%2084,38%2063,44%20l%20-25,7%2025,1%20c%2052,2%20163,66%20221,128%2075,79%20120,168%20159,320%2012,47%2033,73%2059,73%209,0%2087,-18%20172,-39%20z%20m%20-1571,-13%20c%200,-41%2037,-166%2067,-231%2038,-79%2082,-130%20156,-178%2072,-47%20137,-69%20230,-79%2066,-7%2068,-7%2022,-9%20-154,-4%20-330,100%20-402,236%20-48,91%20-104,283%20-82,283%205,0%209,-10%209,-22%20z%20m%202400,-483%20c%20102,-205%2063,-418%20-80,-441%20-19,-3%20-47,-1%20-62,5%20-28,10%20-28,12%20-28,97%200,48%20-5,116%20-11,150%20-10,57%20-9,66%209,91%2032,46%2070,128%2083,178%20l%2012,48%2019,-24%20c%2010,-13%2036,-60%2058,-104%20z%20m%20-1530,-6%20c%20-25,-4%20-76,-7%20-115,-6%20l%20-70,1%2080,6%20c%2044,3%2096,7%20115,7%2031,0%2029,0%20-10,-8%20z%20m%20-222,-16%20c%20-21,-2%20-55,-2%20-75,0%20-21,2%20-4,4%2037,4%2041,0%2058,-2%2038,-4%20z%20m%202793,-545%20-18,-33%20-114,1%20c%20-63,1%20-155,2%20-206,3%20l%20-92,1%2010,30%2011,30%20h%20214%20214%20z%20m%20801,-315%2026,-5%20-16,-44%20-16,-44%20h%20-251%20c%20-137,-1%20-373,-2%20-522,-3%20-306,-2%20-280,-10%20-247,70%20l%2015,34%20492,-1%20c%20271,-1%20504,-4%20519,-7%20z%20M%204015,6098%20c%2075,-113%20349,-363%20515,-470%20l%2075,-48%20h%20-112%20c%20-61,0%20-114,3%20-116,8%20-3,4%2040,6%2095,4%20l%20101,-3%20-84,56%20c%20-130,88%20-206,154%20-352,304%20l%20-134,138%2023,-90%20c%2012,-49%2019,-86%2015,-81%20-11,12%20-65,224%20-58,224%203,0%2017,-19%2032,-42%20z%20m%20-1073,-40%20c%20-8,-8%20-9,-4%20-5,13%204,13%208,18%2011,10%202,-7%20-1,-18%20-6,-23%20z%20m%204346,-32%20-22,-46%20-780,2%20-781,3%20779,5%20780,5%2013,33%2013,32%20h%20-770%20-771%20l%20-11,-31%20c%20-6,-16%20-12,-28%20-14,-26%20-2,2%201,18%207,35%20l%2011,32%20781,2%20c%20430,2%20783,2%20785,2%202,-1%20-7,-22%20-20,-48%20z%20m%20-4398,-1%20c%20-7,-9%20-15,-13%20-19,-10%20-3,3%201,10%209,15%2021,14%2024,12%2010,-5%20z%20m%203760,-322%20c%20-368,-7%20-690,-7%20-690,0%200,4%20188,6%20418,5%20229,-1%20352,-4%20272,-5%20z%20m%20223,0%20c%20-13,-2%20-35,-2%20-50,0%20-16,2%20-5,4%2022,4%2028,0%2040,-2%2028,-4%20z%20m%20170,0%20c%20-7,-2%20-21,-2%20-30,0%20-10,3%20-4,5%2012,5%2017,0%2024,-2%2018,-5%20z%20m%20155,0%20c%20-16,-2%20-40,-2%20-55,0%20-16,2%20-3,4%2027,4%2030,0%2043,-2%2028,-4%20z%20m%20605,0%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20M%206173,5603%20c%20-46,-2%20-120,-2%20-165,0%20-46,1%20-9,3%2082,3%2091,0%20128,-2%2083,-3%20z%20m%20114,1%20c%20-3,-3%20-12,-4%20-19,-1%20-8,3%20-5,6%206,6%2011,1%2017,-2%2013,-5%20z%20m%20211,-1%20c%20-38,-2%20-98,-2%20-135,0%20-38,2%20-7,3%2067,3%2074,0%20105,-1%2068,-3%20z%20m%20190,0%20c%20-21,-2%20-55,-2%20-75,0%20-21,2%20-4,4%2037,4%2041,0%2058,-2%2038,-4%20z%20m%202292,-121%20c%200,-4%20-7,-26%20-16,-49%20l%20-17,-44%20-585,1%20c%20-321,1%20-586,-1%20-588,-3%20-2,-2%20-12,-30%20-22,-63%20l%20-18,-59%20-754,3%20c%20-414,1%20-755,4%20-757,5%20-1,2%207,27%2019,55%20l%2022,52%20h%20420%20421%20l%2027,50%2027,49%20-27,4%20c%20-15,2%20395,4%20911,4%20515,0%20937,-2%20937,-5%20z%20m%20-765,-395%20c%2083,-1%20-223,-4%20-678,-5%20-735,-2%20-828,-4%20-834,-17%20-3,-9%20-3,-19%201,-22%203,-4%20100,-10%20214,-14%20l%20207,-7%20-222,2%20c%20-123,0%20-223,1%20-223,2%200,1%205,15%2011,32%20l%2011,32%20286,2%20c%20289,3%20949,0%201227,-5%20z%20M%207115,4980%20c%20-9,-16%20-18,-30%20-21,-30%20-2,0%202,14%2011,30%209,17%2018,30%2021,30%202,0%20-2,-13%20-11,-30%20z%20M%203625,4539%20c%2013,-46%2022,-85%2020,-87%20-3,-4%20-55,159%20-55,174%200,20%2013,-11%2035,-87%20z%20m%20-58,44%20c%20-3,-10%20-5,-4%20-5,12%200,17%202,24%205,18%202,-7%202,-21%200,-30%20z%20m%20-13,-87%20c%20-4,-31%20-9,-54%20-12,-52%20-2,3%20-1,30%203,61%203,31%209,55%2011,52%203,-2%202,-30%20-2,-61%20z%20m%20143,-163%20c%20-3,-2%20-12,15%20-22,39%20-28,69%20-27,78%200,19%2014,-29%2024,-55%2022,-58%20z%20m%20-163,0%20c%20-6,-76%20-8,-83%20-16,-55%20-5,20%20-5,39%202,51%205,11%2010,39%2010,62%200,23%203,40%206,36%203,-3%203,-45%20-2,-94%20z%20m%202254,50%20c%20-65,-2%20-171,-2%20-235,0%20-65,1%20-12,3%20117,3%20129,0%20182,-2%20118,-3%20z%20M%203877,4011%20c%2031,-47%2084,-120%20119,-162%2063,-76%20171,-176%20180,-167%202,3%20-5,27%20-16,54%20-29,67%20-70,240%20-69,289%201,33%203,30%209,-20%2016,-120%2062,-270%20107,-350%2015,-26%2011,-25%20-47,20%20-96,76%20-194,187%20-280,317%20-71,108%20-180,304%20-180,325%200,4%2028,-43%2061,-106%2033,-63%2085,-153%20116,-200%20z%20m%202666,172%20c%20-13,-2%20-33,-2%20-45,0%20-13,2%20-3,4%2022,4%2025,0%2035,-2%2023,-4%20z%20m%2080,0%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20m%2074,1%20c%20-3,-3%20-12,-4%20-19,-1%20-8,3%20-5,6%206,6%2011,1%2017,-2%2013,-5%20z%20m%2081,-1%20c%20-10,-2%20-28,-2%20-40,0%20-13,2%20-5,4%2017,4%2022,1%2032,-1%2023,-4%20z%20m%20944,-10%20c%20-95,-2%20-248,-2%20-340,0%20-92,1%20-14,3%20173,3%20187,0%20262,-2%20167,-3%20z%20m%201027,-29%20c%203,-2%20-3,-20%20-12,-39%20l%20-17,-35%20h%20-436%20c%20-411,0%20-436,1%20-429,18%204,9%2012,30%2017,46%20l%2011,28%20431,-7%20c%20237,-4%20433,-9%20435,-11%20z%20m%20-2735,-81%20-612,-3%20-27,-65%20c%20-16,-36%20-30,-63%20-32,-61%20-2,2%209,34%2026,70%20l%2030,66%20613,-2%20613,-3%20z%20M%204719,3961%20c%2056,-34%20134,-78%20174,-98%20l%2072,-38%20455,-5%20455,-5%20-451,-3%20-451,-2%20-112,60%20c%20-124,67%20-291,168%20-291,177%200,3%2011,-2%2023,-10%2013,-9%2070,-43%20126,-76%20z%20m%20674,-58%20c%20-7,-2%20-21,-2%20-30,0%20-10,3%20-4,5%2012,5%2017,0%2024,-2%2018,-5%20z%20m%20290,-10%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20m%20495,0%20c%20-81,-2%20-216,-2%20-300,0%20-84,1%20-18,3%20147,3%20165,0%20234,-2%20153,-3%20z%20m%20365,-10%20c%20-13,-2%20-35,-2%20-50,0%20-16,2%20-5,4%2022,4%2028,0%2040,-2%2028,-4%20z%20m%20100,0%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20m%20455,0%20c%20-82,-2%20-214,-2%20-295,0%20-82,1%20-15,3%20147,3%20162,0%20229,-2%20148,-3%20z%20m%20-725,-70%20c%20-18,-2%20-48,-2%20-65,0%20-18,2%20-4,4%2032,4%2036,0%2050,-2%2033,-4%20z%20m%20-385,-10%20c%20-10,-2%20-28,-2%20-40,0%20-13,2%20-5,4%2017,4%2022,1%2032,-1%2023,-4%20z%20m%2080,0%20c%20-10,-2%20-28,-2%20-40,0%20-13,2%20-5,4%2017,4%2022,1%2032,-1%2023,-4%20z%20m%20139,0%20c%20-20,-2%20-52,-2%20-70,0%20-17,2%200,4%2038,4%2039,0%2053,-2%2032,-4%20z%20m%20-235,-153%20-404,-5%20-13,-32%20-14,-33%20392,-3%20392,-2%20-402,-3%20-402,-2%2014,28%20c%208,15%2016,35%2019,45%205,16%2032,17%20413,15%20l%20408,-3%20z%20m%201578,-32%20-19,-43%20-319,-3%20-319,-2%2015,45%2014,45%20h%20324%20323%20z%20m%201217,-388%20c%2018,-10%2040,-31%2050,-47%2017,-26%2018,-82%2018,-1088%200,-997%20-1,-1063%20-18,-1088%20-9,-15%20-29,-35%20-44,-44%20-26,-17%20-207,-18%20-3673,-18%20-3497,0%20-3647,1%20-3673,18%20-16,10%20-37,32%20-48,50%20-19,31%20-19,55%20-17,1094%20l%203,1062%2030,31%20c%2017,18%2039,36%2050,40%2011,5%201656,9%203655,9%203586,1%203635,1%203667,-19%20z'%20id='path1'%20/%3e%3cpath%20d='m%203552,9557%20c%20-72,-188%20-131,-385%20-143,-476%20-23,-171%204,-313%2091,-486%2050,-101%20158,-252%20175,-248%206,2%2020,53%2033,115%2071,355%2070,721%20-4,975%20-27,93%20-88,233%20-101,233%20-4,0%20-27,-51%20-51,-113%20z'%20id='path2'%20/%3e%3cpath%20d='m%206896,6674%20c%20-3,-9%20-6,-18%20-6,-20%200,-2%2089,-4%20199,-4%20190,0%20199,1%20204,20%205,20%200,20%20-193,20%20-171,0%20-199,-2%20-204,-16%20z'%20id='path3'%20/%3e%3cpath%20d='m%207313,5393%20c%209,-2%2023,-2%2030,0%206,3%20-1,5%20-18,5%20-16,0%20-22,-2%20-12,-5%20z'%20id='path4'%20/%3e%3cpath%20d='m%207463,5393%20c%2015,-2%2039,-2%2055,0%2015,2%202,4%20-28,4%20-30,0%20-43,-2%20-27,-4%20z'%20id='path5'%20/%3e%3cpath%20d='m%207618,5383%20c%2012,-2%2032,-2%2045,0%2012,2%202,4%20-23,4%20-25,0%20-35,-2%20-22,-4%20z'%20id='path6'%20/%3e%3cpath%20d='m%207323,5283%20c%209,-2%2023,-2%2030,0%206,3%20-1,5%20-18,5%20-16,0%20-22,-2%20-12,-5%20z'%20id='path7'%20/%3e%3cpath%20d='m%207428,5283%20c%207,-3%2016,-2%2019,1%204,3%20-2,6%20-13,5%20-11,0%20-14,-3%20-6,-6%20z'%20id='path8'%20/%3e%3cpath%20d='m%201507,3112%20c%20-16,-17%20-17,-102%20-17,-1011%200,-665%203,-999%2010,-1012%2011,-19%2062,-19%203598,-19%202777,0%203591,3%203600,12%209,9%2012,249%2012,1020%200,986%200,1008%20-19,1018%20-14,7%20-1149,10%20-3594,10%20-3450,0%20-3574,-1%20-3590,-18%20z%20m%20653,-892%20v%20-640%20h%20205%20205%20v%20-135%20-135%20h%20-355%20-355%20v%20775%20775%20h%20150%20150%20z%20m%201258,626%20c%2067,-18%20114,-49%20150,-101%2056,-79%2056,-71%2059,-602%201,-271%20-2,-529%20-7,-574%20-14,-118%20-54,-181%20-150,-231%20-43,-22%20-55,-23%20-293,-26%20-280,-3%20-313,2%20-384,63%20-22,19%20-51,58%20-64,87%20l%20-24,53%20v%20570%20570%20l%2028,57%20c%2031,64%2079,105%20152,130%2067,23%20450,26%20533,4%20z%20m%201144,-15%20c%2026,-12%2065,-42%2087,-66%2058,-63%2071,-118%2071,-297%20v%20-148%20h%20-147%20-148%20l%203,92%20c%204,102%20-9,164%20-36,172%20-9,3%20-63,6%20-119,7%20-158,3%20-143,56%20-143,-508%200,-567%20-16,-513%20148,-513%20144,0%20146,2%20149,149%20l%202,106%20146,3%20145,3%20v%20-130%20c%200,-72%20-5,-153%20-11,-181%20-15,-72%20-64,-137%20-129,-174%20l%20-55,-31%20h%20-255%20c%20-291,0%20-301,2%20-377,89%20-68,77%20-67,64%20-70,649%20-4,568%20-1,612%2045,687%2029,47%20111,105%20161,113%2014,3%20130,4%20256,3%20219,-1%20232,-2%20277,-25%20z%20m%201109,-416%20c%2048,-242%20115,-579%20149,-750%2033,-170%2063,-320%2065,-332%20l%205,-23%20h%20-158%20-159%20l%20-22,133%20c%20-13,72%20-25,142%20-28,155%20-5,22%20-8,22%20-163,22%20h%20-158%20l%20-10,-47%20c%20-6,-27%20-18,-96%20-28,-155%20l%20-17,-108%20h%20-148%20c%20-94,0%20-149,4%20-149,10%200,10%20174,957%20245,1339%2019,101%2035,187%2035,192%200,6%2095,8%20227,7%20l%20227,-3%20z%20m%20689,-195%20v%20-640%20h%20215%20215%20v%20-135%20-135%20h%20-360%20-360%20v%20775%20775%20h%20145%20145%20z%20m%201315,618%20c%203,-13%2052,-264%20110,-558%2057,-294%20124,-633%20148,-753%20l%2043,-217%20-155,2%20-155,3%20-26,150%20-26,150%20-161,3%20c%20-160,2%20-161,2%20-166,-20%20-3,-13%20-16,-83%20-28,-155%20l%20-23,-133%20h%20-153%20c%20-142,0%20-154,1%20-149,18%203,9%2048,247%20100,527%2053,281%20117,621%20143,758%20l%2047,247%20h%20223%20223%20z%20m%20765,-753%20v%20-775%20h%20-150%20-150%20v%20775%20775%20h%20150%20150%20z'%20id='path9'%20/%3e%3cpath%20d='m%203110,2593%20c%20-108,-7%20-100,36%20-100,-513%200,-432%202,-479%2017,-491%2017,-15%20194,-26%20238,-15%2057,14%2055,-3%2055,506%200,539%206,507%20-90,513%20-30,3%20-84,2%20-120,0%20z'%20id='path10'%20/%3e%3cpath%20d='m%205297,2207%20c%20-32,-177%20-57,-326%20-57,-332%200,-9%20240,-16%20240,-7%200,2%20-25,142%20-55,311%20-30,170%20-55,318%20-55,330%200,11%20-3,21%20-7,21%20-5,0%20-34,-145%20-66,-323%20z'%20id='path11'%20/%3e%3cpath%20d='m%207386,2208%20c%20-32,-178%20-59,-327%20-60,-332%200,-5%2053,-10%20121,-10%2068,-1%20123,1%20123,2%200,2%20-25,140%20-55,307%20-30,166%20-55,314%20-55,329%200,80%20-22,-8%20-74,-296%20z'%20id='path12'%20/%3e%3c/g%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.3033,1032.2948%20c%20-20.71096,-17.301%20-45.27669,-43.2443%20-58.38474,-61.6589%20-11.072,-15.55418%20-33.46614,-57.80895%20-43.39625,-81.88298%20-3.01819,-7.31707%20-6.03272,-13.31332%20-6.69897,-13.32487%20-1.95247,-0.0337%20-1.40079,24.75105%201.29348,58.11165%201.37766,17.05815%202.27248,31.71195%201.98848,32.56395%20-0.78972,2.36917%20-12.80508,-19.62698%20-23.53365,-43.08218%20-12.96414,-28.3428%20-20.79049,-49.58497%20-26.46888,-71.84167%20-6.76534,-26.517%20-17.37487,-80.62553%20-18.56152,-94.66365%20-0.55492,-6.56464%20-1.64295,-11.93571%20-2.41786,-11.93571%20-0.7749,0%20-0.95287,-1.81703%20-0.39547,-4.03785%200.55739,-2.22083%200.38953,-4.02758%20-0.37302,-4.01502%20-0.76254,0.0126%20-13.37888,16.07913%20-28.03629,35.70348%20-17.629,23.60295%20-26.84316,34.7169%20-27.22097,32.83357%20-2.07325,-10.33507%2016.05308,-129.48461%2029.82122,-196.0234%201.51659,-7.32942%200.54523,-6.88403%20-22.72283,10.41915%20-10.36333,7.70663%20-19.26074,13.59374%20-19.77203,13.08245%20-0.5113,-0.51129%201.34431,-8.76373%204.12356,-18.33874%207.20702,-24.82946%2018.19753,-71.30929%2026.84032,-113.51007%204.09344,-19.98738%208.54196,-40.58853%209.88557,-45.78031%201.34361,-5.19179%202.20068,-10.16637%201.9046,-11.05463%20-0.29609,-0.88827%20-10.58825,5.03694%20-22.87147,13.16714%20-12.28321,8.13019%20-22.54778,14.5584%20-22.81014,14.28492%20-0.26236,-0.27349%206.30687,-14.67012%2014.5983,-31.99252%2012.34638,-25.79398%2015.62741,-31.41282%2018.1252,-31.03978%202.43485,0.36363%2030.81942,-5.14402%2070.03777,-13.58991%203.88554,-0.83677%204.75341,0.0873%2011.05023,11.76616%2015.48867,28.72712%2037.4065,48.23215%2065.33311,58.14095%2017.84309,6.33101%2059.21525,5.86977%2085.06634,-0.94835%2017.00919,-4.48612%2040.63194,-14.58061%2039.71468,-16.97092%20-0.4457,-1.16146%201.92757,-2.64588%205.9613,-3.72864%209.68831,-2.6006%2024.78351,-12.94263%2034.59881,-23.70435%209.65005,-10.58055%2019.42214,-29.62875%2024.37971,-47.52203%203.57011,-12.88552%207.16307,-19.62079%2010.46681,-19.62079%204.94171,0%2055.72594,13.36116%2073.98866,19.46617%2027.39258,9.15701%2044.55449,17.67808%2055.1997,27.40721%2013.86553,12.6723%2015.66214,23.71167%206.95446,42.73176%20-4.83371,10.55823%20-2.91266,10.82459%20-19.71904,-2.7342%20-5.19131,-4.18817%20-13.92002,-9.82098%20-19.39712,-12.51735%20-9.17362,-4.51615%20-11.2792,-4.89969%20-26.71917,-4.86702%20-19.82745,0.0419%20-26.52849,2.42277%20-35.81817,12.72582%20-4.62627,5.13094%20-5.88342,7.67706%20-5.10887,10.34708%201.37858,4.75209%207.04231,9.44926%2010.25887,8.50808%2010.37842,-3.03675%2023.66238,-4.16161%2031.66841,-2.68161%2012.32864,2.27907%2030.83972,10.32378%2040.26674,17.49949%2019.48079,14.82849%2020.97723,40.36687%203.22283,55.00154%20-8.74622,7.20937%20-17.39143,9.0287%20-37.52362,7.89659%20-19.39093,-1.09041%20-35.54676,-5.10624%20-53.01853,-13.17868%20-16.48419,-7.61618%20-22.87535,-12.98468%20-27.86253,-23.40428%20-5.67119,-11.84865%20-9.24734,-12.42612%20-18.66024,-3.01323%20-4.1907,4.19071%20-7.71185,9.58078%20-8.78569,13.44887%20-2.22444,8.01268%20-2.29783,20.18785%20-0.14115,23.41423%201.36972,2.04906%202.2258,1.73769%205.55079,-2.01893%202.16222,-2.4429%204.26363,-4.44164%204.66981,-4.44164%200.40618,0%208.37729,4.63204%2017.71361,10.2934%2031.79671,19.28098%2053.71653,25.60268%2089.10978,25.69939%2015.8895,0.0434%2022.53493,-0.74238%2036.88209,-4.3612%2019.15027,-4.83033%2022.90386,-4.64154%2021.21735,1.06707%20-3.76546,12.74559%20-18.65751,24.68116%20-40.02737,32.08087%20-26.82557,9.28885%20-44.41195,8.10049%20-104.48216,-7.06012%20l%20-39.57098,-9.98699%20-36.34069,0.0103%20c%20-39.16468,0.0111%20-93.64111,2.20926%20-93.73748,3.78243%20-0.0326,0.53184%207.41726,8.03383%2016.5552,16.67111%20l%2016.61445,15.70414%20-5.65299,0.0394%20c%20-7.36152,0.0513%20-34.00998,-7.1066%20-44.76909,-12.02524%20-10.65065,-4.86904%20-20.5517,-11.6761%20-34.71958,-23.87003%20-6.14204,-5.2863%20-11.47485,-9.30396%20-11.85068,-8.92814%20-0.37582,0.37583%201.93006,8.48762%205.12418,18.0262%203.19413,9.53857%205.38473,17.76564%204.86802,18.28234%20-1.52017,1.52017%20-18.65497,-12.14789%20-31.49364,-25.12178%20-19.95379,-20.16396%20-37.90692,-46.94999%20-43.78482,-65.32687%20-1.08022,-3.37724%20-2.80376,-5.85118%20-3.8301,-5.49765%20-2.77839,0.95704%20-1.95736,39.13313%201.24026,57.66961%205.2136,30.22295%2010.63706,42.34657%2011.94479,26.70143%200.50135,-5.99789%200.82627,-5.58332%2012.40171,15.82377%2021.71999,40.16799%2034.95735,57.79704%2070.97771,94.52557%2038.10485,38.85401%2068.36531,64.34063%2097.74168,82.32211%2015.62967,9.56707%2015.73868,9.5223%20-14.46874,5.9394%20-23.29329,-2.76278%20-32.30284,-3.02873%20-32.30284,-0.95348%200,3.91973%2051.50471,33.42368%2082.46175,47.23733%2010.90841,4.86757%2025.03298,9.64455%2035.29454,11.93685%2024.66343,5.50942%2063.13961,9.10432%2063.13961,5.89927%200,-0.7113%20-3.31382,-2.90325%20-7.36405,-4.87102%20-4.05022,-1.96778%20-16.57503,-9.56243%20-27.83293,-16.87703%20l%20-20.46889,-13.29937%2033.72447,-0.80753%2033.72448,-0.8076%20-4.30958,-5.118%20c%20-8.24182,-9.78787%20-44.62176,-72.56733%20-44.62176,-77.002%200,-0.60272%205.88972,1.86546%2013.08827,5.48481%207.19853,3.61936%2013.48438,6.18453%2013.96854,5.70037%200.48415,-0.48415%20-1.34899,-6.52629%20-4.07367,-13.42698%20-9.51018,-24.08618%20-21.52674,-71.06893%20-21.30298,-83.29114%200.0358,-1.95365%204.27231,6.98671%209.41452,19.86747%2012.46275,31.218%2017.65562,42.27397%2028.23379,60.11167%2011.10164,18.7204%2025.15989,36.3228%2037.24697,46.6371%2011.00484,9.39083%2010.77186,9.4566%20-16.71887,4.72358%20-10.16278,-1.74975%20-18.80674,-2.8524%20-19.20878,-2.45033%20-1.26564,1.26563%2017.48825,21.61853%2030.42073,33.01448%2011.32802,9.98212%2034.4235,24.3873%2051.98071,32.42152%20l%206.96969,3.18938%20-11.50992,-1.01183%20c%20-13.36877,-1.17525%20-26.45213,0.38295%20-26.43178,3.1479%200.0271,3.67793%2026.07377,18.5391%2048.47533,27.65798%2024.26104,9.87585%2030.84393,10.81252%2082.33703,11.71515%2030.00174,0.5259%2047.04857,0.26902%2046.03157,-0.69375%20-0.88838,-0.8409%20-12.8808,-5.35905%20-26.64983,-10.04033%20-13.76912,-4.68135%20-29.39562,-10.54695%20-34.72558,-13.0347%20l%20-9.69086,-4.52325%2033.71054,-0.1389%20c%2043.38588,-0.1788%20207.14335,2.7951%20220.04178,3.996%20l%209.8658,0.9186%20-0.17498,5.95275%20-0.17497,5.95268%208.88322,1.05165%20c%204.8858,0.5784%2017.10285,1.1235%2027.14898,1.21132%2010.2975,0.0901%2017.8758,0.7905%2017.3721,1.60568%20-1.7218,2.78587%204.4406,3.39967%2034.3492,3.42157%2016.5835,0.012%2031.7621,0.45375%2033.7301,0.98138%20l%203.5782,0.95925%20-3.1003,6.07725%20-3.1005,6.07717%20-27.1276,1.07903%20c%20-107.15948,4.26225%20-251.50605,6.52717%20-418.46093,6.5661%20l%20-181.36473,0.042%20-3.3876,5.34982%20c%20-1.96333,3.10065%20-2.78481,5.94293%20-1.95388,6.76043%200.78854,0.7758%2021.7845,2.17372%2046.65769,3.1065%2024.87318,0.93285%2067.02661,2.50395%2093.67428,3.4914%2026.64765,0.98745%2049.724,2.4771%2051.28075,3.3102%201.55675,0.83317%202.83046,2.5017%202.83046,3.70792%200,3.20363%203.63309,4.12185%2017.49487,4.42178%206.81188,0.14737%20-12.46619,0.7854%20-42.8402,1.41787%20-30.37399,0.63248%20-57.82445,1.63755%20-61.00103,2.2335%20-4.38686,0.82298%20-6.73788,2.6079%20-9.7777,7.42328%20l%20-4.00211,6.33975%20-24.35067,0.44587%20-24.3507,0.44588%20-3.33807,7.71607%20c%20-1.83594,4.24388%20-3.03186,8.0223%20-2.65762,8.39655%201.03876,1.03875%2095.9203,3.86655%20170.97465,5.09565%20l%2067.02838,1.09763%20-4.53321,9.4401%20-4.53322,9.44017%20H%20583.14747%20c%20-127.13881,0%20-141.1573,0.25208%20-142.04091,2.5548%20-0.53922,1.40513%20-0.98038,6.12946%20-0.98038,10.49851%200,4.3689%20-0.4804,7.9436%20-1.06757,7.9436%20-2.61387,0%20-26.83991,-19.54048%20-39.5428,-31.8947%20-7.71687,-7.50511%20-14.41947,-12.83483%20-14.98669,-11.91698%20-2.56171,4.14487%207.69271,42.95998%2017.42865,65.97118%202.33773,5.5252%204.25043,10.4313%204.25043,10.9022%200,2.4087%20-4.04289,-0.2661%20-17.9049,-11.8458%20z'%20id='path13'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20355.05406,421.62226%20c%20-22.15321,-2.54868%20-39.59314,-14.30198%20-48.63897,-32.77926%20-6.04069,-12.33888%20-8.90612,-23.2277%20-13.2547,-50.36877%20-1.8413,-11.49217%20-4.20443,-21.92702%20-5.25141,-23.18855%20-1.3313,-1.60412%20-3.86472,-2.02278%20-8.42679,-1.39258%20-9.07,1.25293%20-66.08936,19.96806%20-102.09803,33.51102%20-16.50454,6.2074%20-30.38086,10.91358%20-30.83627,10.45818%20-0.4554,-0.4554%201.14955,-3.42072%203.56656,-6.58958%205.6722,-7.43663%2027.9304,-18.20839%2091.38694,-44.22631%20l%2047.68436,-19.55115%20h%20191.56267%20c%20176.44971,0%20191.73756,0.21135%20193.77937,2.67882%201.70083,2.05542%202.19749,9.29085%202.13414,31.09149%20-0.0698,24.0326%20-0.65966,30.77805%20-3.82618,43.75651%20-4.99915,20.48989%20-5.04441,20.55596%20-10.72962,15.66574%20l%20-4.65695,-4.00572%203.63151,-15.11708%20c%201.99732,-8.31439%204.08768,-19.11455%204.64526,-24.00035%200.55759,-4.88581%201.52545,-9.24669%202.15082,-9.69085%201.28209,-0.91062%20-1.28033,-20.49609%20-3.1697,-24.22713%20-2.02842,-4.00562%20-50.45784,-5.0313%20-212.00487,-4.49001%20-104.31393,0.34951%20-148.65237,1.01809%20-149.89452,2.26024%20-1.95456,1.95456%20-0.1876,14.10347%208.31122,57.14459%205.72718,29.00448%209.56249,37.55882%2019.72081,43.98545%2011.16735,7.065%2019.81401,8.04705%2064.50501,7.32622%2044.97684,-0.72543%2051.97729,-1.97508%2063.2868,-11.29734%207.94205,-6.5465%2011.01861,-13.2364%2019.40745,-42.20073%208.6857,-29.9893%2010.04722,-33.16113%2014.74023,-34.33899%202.00472,-0.50316%2011.58278,-0.66744%2021.28458,-0.36507%2018.803,0.58602%2023.28604,2.22616%2021.78405,7.96975%20-0.78929,3.01829%20-1.77745,3.19583%20-13.15817,2.36422%20-22.65981,-1.6558%20-24.72434,0.30701%20-34.02158,32.34549%20-9.8321,33.88156%20-20.16489,47.26471%20-41.74556,54.06934%20-9.31197,2.93616%20-15.71318,3.49474%20-45.55974,3.97559%20-19.09906,0.30769%20-39.93798,-0.0402%20-46.30872,-0.77318%20z'%20id='path14'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.72518,277.27438%20c%20-1.83613,-3.70595%20-11.08035,-19.09394%20-20.54272,-34.19552%20-30.90205,-49.3185%20-36.66484,-64.15935%20-38.88444,-100.1388%20-1.36409,-22.11159%200.95113,-42.06571%207.39908,-63.770308%2010.014,-33.708396%2039.335,-112.759581%2043.29126,-116.715842%202.6544,-2.654398%2011.12175,3.275841%2019.60242,13.728864%2016.14315,19.897551%2029.01876,50.591928%2037.43022,89.230475%204.41311,20.271851%204.72573,61.869291%200.78293,104.176651%20-2.98872,32.06993%20-3.31457,44.11879%20-1.17206,43.33964%200.81424,-0.2961%206.73431,-7.80651%2013.15571,-16.68979%2020.26686,-28.03693%2035.48538,-46.25999%2054.72634,-65.53079%2020.32182,-20.35334%2035.62173,-31.421643%2035.62173,-25.7696%200,4.77523%20-5.52652,18.092%20-16.57515,39.93971%20-5.48094,10.83806%20-9.55955,20.11136%20-9.06357,20.60734%200.49598,0.49598%205.55908,-1.19341%2011.25132,-3.75422%2018.99804,-8.54675%2030.57629,-10.7267%2056.38109,-10.61544%2012.88076,0.0555%2027.73652,1.04419%2033.01282,2.197%20l%209.59325,2.09603%20-6.36296,3.94899%20c%20-3.49965,2.17195%20-14.35794,8.00914%20-24.12955,12.97153%20-20.38921,10.35438%20-21.07058,9.11777%208.94537,16.2351%2023.86774,5.65947%2048.53884,15.21447%2066.77706,25.86243%2013.00859,7.59477%2037.74481,30.20897%2046.13841,42.18039%20l%203.82376,5.45364%20-10.35019,-0.6642%20c%20-8.6108,-0.55259%20-14.15019,-2.45143%20-32.96217,-11.2991%20-42.19276,-19.84412%20-52.3725,-21.02598%20-30.46774,-3.53728%207.96216,6.357%2015.4381,12.71661%2016.61318,14.1325%201.95153,2.35145%20-7.43168,2.57436%20-108.3648,2.57436%20H%20280.89447%20l%20-18.50402,7.44437%20c%20-10.1772,4.09441%20-21.83916,8.76188%20-25.91544,10.37218%20l%20-7.41141,2.9278%20z%20m%2017.75927,-39.97998%20c%205.80406,-21.27448%209.54882,-53.13015%2010.43996,-88.81001%201.27526,-51.05987%20-2.84802,-80.48948%20-15.88225,-113.358388%20-6.67457,-16.831506%20-9.48275,-22.204866%20-11.60453,-22.204866%20-3.40199,0%20-22.32968,50.984152%20-31.47985,84.794954%20-3.87095,14.30358%20-4.36042,18.92317%20-4.27836,40.37854%200.0844,22.05107%200.49901,25.46023%204.61666,37.95584%207.72944,23.45617%2023.16073,51.61548%2036.79482,67.14385%202.73301,3.11273%205.77824,5.39119%206.76718,5.06325%200.98893,-0.32792%203.0708,-5.26135%204.62637,-10.96317%20z'%20id='path15'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20223.79996,274.00911%20c%20-3.01576,-5.46337%20-12.75571,-21.56243%20-21.64431,-35.77568%20-28.04556,-44.84602%20-33.66712,-59.7856%20-35.85763,-95.29337%20-1.98877,-32.23755%202.29585,-52.57337%2023.79181,-112.921479%2011.38913,-31.9740576%2024.7091,-65.375246%2026.97404,-67.640184%202.58513,-2.585125%2011.61189,3.853342%2020.00366,14.267891%2015.68739,19.4687319%2028.64184,50.586973%2036.95347,88.766962%204.41311,20.27185%204.72573,61.86929%200.78293,104.17665%20-2.95821,31.74252%20-3.30272,43.60883%20-1.26604,43.60883%200.76256,0%203.9281,-3.81576%207.03454,-8.47949%2023.23829,-34.88781%2070.26618,-87.12279%2088.08372,-97.83664%207.74948,-4.65983%208.4795,-4.82713%208.4795,-1.94324%200,4.64121%20-5.39199,17.70136%20-16.5211,40.01643%20-5.42626,10.88027%20-9.45223,20.19601%20-8.94659,20.70167%200.50565,0.50563%204.44399,-0.86181%208.75189,-3.03879%204.30787,-2.17696%2013.64703,-5.67819%2020.75365,-7.7805%2011.15619,-3.30029%2016.2304,-3.81098%2037.14827,-3.73878%2023.70739,0.0818%2044.54283,2.88307%2041.76258,5.61483%20-0.76122,0.74794%20-10.64101,6.18477%20-21.95508,12.08183%20-11.31409,5.89708%20-20.99043,11.40052%20-21.50302,12.22988%20-1.08667,1.75826%20-2.36785,1.34931%2023.56202,7.52117%2023.91072,5.69127%2048.58686,15.25725%2066.76129,25.88073%2013.07073,7.64022%2038.16434,30.54687%2046.20744,42.18039%20l%203.7705,5.45364%20-10.35019,-0.66047%20c%20-8.57332,-0.54708%20-14.01024,-2.39464%20-31.66988,-10.762%20-28.16171,-13.34337%20-45.48451,-19.30117%20-43.82435,-15.07244%200.2961,0.75424%207.4431,7.11386%2015.88222,14.13249%20l%2015.34385,12.76112%20-112.25237,0.80758%20-112.25236,0.80757%20-17.76657,7.39031%20c%20-9.7716,4.06468%20-20.68889,8.5347%20-24.26062,9.93339%20l%20-6.49406,2.5431%20z%20m%2019.6856,-36.71471%20c%207.1393,-26.15828%209.90784,-53.62125%2010.00034,-99.19977%200.0961,-47.373242%20-1.29745,-59.76127%20-9.74534,-86.629243%20-5.06182,-16.098753%20-15.04248,-38.544251%20-17.13918,-38.544251%20-3.57865,0%20-20.62976,45.580498%20-30.81445,82.372237%20-4.75575,17.179957%20-5.13519,20.392637%20-5.05509,42.801257%200.0788,22.04739%200.49306,25.46233%204.60422,37.95584%202.48469,7.55079%207.42999,19.54322%2010.98955,26.64985%2011.64717,23.25347%2028.52359,46.88658%2032.53247,45.55726%200.98893,-0.32793%203.07131,-5.26136%204.62748,-10.96318%20z'%20id='path16'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20392.38996,1035.8999%20c%20-15.13576,-12.2758%20-39.30543,-36.04348%20-50.69893,-49.8557%20-18.02207,-21.84802%20-33.09611,-48.27817%20-56.65212,-99.33128%20l%20-5.58923,-12.11355%20-0.51588,12.11355%20c%20-0.28374,6.66248%200.67245,27.26168%202.12485,45.77595%201.45241,18.51435%202.33964,33.96353%201.97165,34.33155%20-1.21618,1.21613%20-16.98653,-28.86262%20-26.75772,-51.03494%20-11.69211,-26.53118%20-18.37169,-45.23176%20-23.78746,-66.59686%20-6.21694,-24.52567%20-16.80633,-79.21537%20-17.94387,-92.67247%20-0.55492,-6.56464%20-1.64295,-11.93571%20-2.41786,-11.93571%20-0.7749,0%20-0.95287,-1.81703%20-0.39547,-4.03785%200.55739,-2.22082%200.38953,-4.02758%20-0.37302,-4.01502%20-0.76254,0.0126%20-13.37888,16.07913%20-28.03629,35.70348%20-17.629,23.60295%20-26.84316,34.7169%20-27.22097,32.83357%20-2.07325,-10.33507%2016.05308,-129.48461%2029.82122,-196.0234%201.51659,-7.32942%200.54523,-6.88403%20-22.72283,10.41915%20-10.36333,7.70663%20-19.26074,13.59374%20-19.77203,13.08245%20-0.5113,-0.51129%201.33793,-8.76373%204.10939,-18.33873%207.63584,-26.3808%2015.54565,-59.7204%2025.39746,-107.04951%204.90013,-23.5407%209.53249,-45.34512%2010.29414,-48.45426%203.23432,-13.20281%203.37321,-14.53628%201.51412,-14.53628%20-1.02924,0%20-11.30073,6.2168%20-22.82555,13.81511%20-11.52482,7.59831%20-21.16054,13.59453%20-21.4127,13.32492%20-0.25217,-0.26961%206.23357,-14.54891%2014.41274,-31.73178%20l%2014.87123,-31.24161%207.17067,-0.49381%20c%203.94388,-0.27161%2020.90912,-3.47471%2037.70055,-7.11803%2016.79143,-3.64331%2031.08287,-6.6242%2031.75876,-6.6242%200.67588,0%204.23751,5.57781%207.91473,12.39513%2016.42326,30.44767%2040.20957,50.6062%2070.39843,59.66158%2011.23677,3.37056%2047.78551,3.76315%2065.32881,0.70174%2020.85026,-3.63849%2055.71674,-16.65451%2054.32541,-20.28024%20-0.49141,-1.28058%201.06907,-2.42398%204.14875,-3.03992%208.68328,-1.73665%2022.77758,-10.93761%2033.80463,-22.06813%2012.16239,-12.27651%2020.02605,-26.6277%2026.43602,-48.24578%204.34839,-14.66532%207.72696,-21.11807%2011.05712,-21.11807%204.9417,0%2055.72593,13.36116%2073.98865,19.46617%2027.39258,9.15702%2044.55449,17.67808%2055.1997,27.40721%2013.86553,12.6723%2015.66214,23.71168%206.95446,42.73176%20-4.83138,10.55314%20-2.9355,10.80829%20-19.59561,-2.63733%20-5.12344,-4.13489%20-13.92937,-9.7677%20-19.56873,-12.51735%20-9.38836,-4.57757%20-11.62329,-4.99936%20-26.49069,-4.99936%20-18.36975,0%20-25.17485,2.05931%20-33.62887,10.1765%20-7.90467,7.58973%20-8.84921,10.00947%20-6.03298,15.45546%201.32662,2.56536%203.37321,5.03313%204.548,5.48395%201.17481,0.45081%207.56131,-0.21992%2014.19224,-1.49051%2014.65778,-2.80868%2024.98421,-1.38909%2042.19869,5.8011%2023.79945,9.94061%2035.27078,22.94875%2035.27078,39.99598%200,10.58582%20-4.10341,19.30789%20-12.23835,26.01339%20-8.74379,7.2074%20-17.39175,9.0281%20-37.52362,7.90011%20-19.28268,-1.08041%20-30.47972,-3.64169%20-48.23683,-11.03398%20-19.00042,-7.90991%20-26.41727,-13.63891%20-32.1233,-24.81304%20-6.4261,-12.58429%20-9.70757,-13.22628%20-19.18116,-3.75268%20-4.1907,4.1907%20-7.71186,9.58077%20-8.7857,13.44886%20-2.22444,8.01269%20-2.29783,20.18786%20-0.14115,23.41423%201.36972,2.04907%202.2258,1.7377%205.5508,-2.01893%202.16222,-2.4429%204.33752,-4.44164%204.83402,-4.44164%200.49649,0%206.58259,3.55967%2013.52466,7.91036%2033.75854,21.15693%2056.26604,27.94005%2093.13452,28.06809%2015.92178,0.0553%2022.50579,-0.72069%2036.88209,-4.34686%2019.15026,-4.83032%2022.90386,-4.64153%2021.21734,1.06708%20-3.76546,12.74558%20-18.6575,24.68115%20-40.02737,32.08086%20-26.82474,9.28856%20-44.45504,8.09993%20-104.48216,-7.04419%20l%20-39.57098,-9.9833%20-36.34069,4.8e-4%20c%20-39.1111,5e-4%20-93.6479,2.1957%20-93.72632,3.77262%20-0.0265,0.53184%207.4234,8.02699%2016.55521,16.6559%20l%2016.60329,15.68893%20-5.653,0.0547%20c%20-7.41168,0.0716%20-34.01594,-7.09405%20-45.02513,-12.12723%20-10.18732,-4.65744%20-25.00056,-14.97123%20-37.00626,-25.76581%20-4.69833,-4.22437%20-8.86842,-7.35468%20-9.26685,-6.95625%20-0.39843,0.39843%201.88895,8.52872%205.08308,18.0673%203.19412,9.53858%205.38473,17.76564%204.86801,18.28234%20-1.51834,1.51836%20-18.66372,-12.05161%20-31.23915,-24.72469%20-19.73199,-19.88524%20-38.17955,-47.39844%20-44.0117,-65.64032%20-1.06504,-3.33123%20-2.57395,-6.05678%20-3.35313,-6.05678%20-6.6031,0%200.16413,73.95258%208.12912,88.83531%202.50187,4.67477%204.84409,2.49057%204.84409,-4.51727%200,-5.39068%201.13295,-3.86338%2012.26636,16.53594%2023.19887,42.50643%2040.95007,65.32331%2082.43132,105.95488%2035.3382,34.61437%2056.53258,52.02502%2085.37209,70.13107%2016.21502,10.18005%2016.57434,10.01917%20-14.51772,6.50212%20-24.41149,-2.76127%20-31.49527,-2.97232%20-31.49527,-0.9381%200,3.9078%2051.50139,33.36645%2081.79682,46.78748%2019.36821,8.58022%2030.12457,11.84362%2050.64482,15.36525%2018.26703,3.135%2048.45426,5.0919%2048.45426,3.14115%200,-0.83258%20-3.31382,-3.12368%20-7.36405,-5.09145%20-4.05022,-1.96778%20-16.57395,-9.56243%20-27.83051,-16.87703%20l%20-20.46644,-13.29937%2032.67592,-0.43718%20c%2021.22249,-0.28402%2032.67594,-1.02487%2032.67594,-2.11365%200,-0.92205%20-2.11767,-4.35937%20-4.70593,-7.63852%20-8.46669,-10.72665%20-42.13319,-69.49345%20-42.13319,-73.54583%200,-0.60272%205.88972,1.86546%2013.08827,5.48481%207.19853,3.61936%2013.48438,6.18453%2013.96854,5.70038%200.48415,-0.48416%20-1.34899,-6.52629%20-4.07367,-13.42699%20-9.52451,-24.12245%20-21.55152,-71.17052%20-21.29193,-83.29114%200.0418,-1.95364%204.07765,6.62331%208.96845,19.0599%2018.431,46.86727%2037.37385,79.10213%2059.15526,100.66389%206.57339,6.50715%2012.99641,12.49223%2014.27339,13.3002%203.74235,2.36798%20-3.70055,1.8507%20-24.23174,-1.68412%20-10.16278,-1.74975%20-18.79221,-2.86688%20-19.17648,-2.48265%20-1.23748,1.2375%2017.91062,21.9978%2030.08509,32.61817%2013.97623,12.19215%2019.10427,15.54173%2041.06791,26.8248%20l%2016.57069,8.51265%20-17.22347,-0.0435%20c%20-9.47291,-0.024%20-17.83127,0.5724%20-18.57413,1.32525%20-3.41057,3.45668%2026.83353,21.31148%2051.94902,30.66848%2023.14963,8.6247%2029.25022,9.41677%2079.14196,10.2756%2029.34012,0.50505%2046.23566,0.23782%2045.22399,-0.71535%20-0.88838,-0.83693%20-12.8808,-5.35185%20-26.64983,-10.03313%20-13.76912,-4.68135%20-29.39562,-10.54695%20-34.72558,-13.0347%20l%20-9.69085,-4.52325%2034.72555,-0.1392%20c%2043.93558,-0.1761%20205.90206,2.78138%20219.02676,3.99938%20l%209.8658,0.91552%20-0.17498,5.95275%20-0.17497,5.95268%208.88322,1.05165%20c%204.8858,0.5784%2017.10285,1.1235%2027.14898,1.21132%2010.2975,0.0901%2017.8758,0.7905%2017.3721,1.60568%20-1.7218,2.78587%204.4406,3.39967%2034.3492,3.42157%2016.5835,0.012%2031.7621,0.45375%2033.7301,0.98138%20l%203.5782,0.95925%20-3.1003,6.07725%20-3.1005,6.07717%20-27.1276,1.08863%20c%20-105.1158,4.218%20-251.54753,6.5112%20-418.46093,6.55312%20l%20-181.36473,0.0457%20-3.3876,5.34983%20c%20-1.96333,3.10065%20-2.78481,5.94292%20-1.95388,6.76042%200.78854,0.7758%2021.7845,2.16668%2046.65769,3.09083%2024.87318,0.92415%2067.02839,2.49682%2093.67823,3.49485%2026.64985,0.99802%2049.72618,2.49465%2051.28076,3.32587%201.55457,0.8313%202.8265,2.49825%202.8265,3.70448%200,3.2043%203.63481,4.1223%2017.49487,4.4184%206.81188,0.1455%20-12.54446,0.7983%20-43.01412,1.45057%20-30.46965,0.65228%20-57.92012,1.65885%20-61.00103,2.2368%20-4.20322,0.78855%20-6.60742,2.64413%20-9.63035,7.43273%20l%20-4.0287,6.3819%20h%20-23.93078%20-23.93079%20l%20-3.78025,8.07097%20c%20-2.07914,4.4391%20-3.45206,8.39925%20-3.05094,8.80035%201.08129,1.08128%2094.49883,3.8913%20171.02351,5.14448%20l%2067.02838,1.09762%20-4.53321,9.4401%20-4.53322,9.44018%20H%20584.10526%20c%20-106.81527,0%20-140.56323,0.46042%20-142.04091,1.93815%20-1.06599,1.06597%20-1.93817,5.7903%20-1.93817,10.49844%200,4.7081%20-0.50023,8.5603%20-1.1116,8.5603%20-2.49359,0%20-31.09499,-23.11362%20-40.83543,-33.00027%20-12.50813,-12.69585%20-15.04354,-13.39492%20-13.5804,-3.7443%202.13579,14.08733%208.68935,37.18447%2015.04676,53.03047%203.60949,8.9967%206.56269,16.6443%206.56269,16.9948%200,1.9897%20-3.81094,-0.3435%20-13.81824,-8.4598%20z'%20id='path17'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20394.09464,1037.4132%20c%20-13.65598,-10.6837%20-43.23456,-39.68543%20-53.39888,-52.35743%20-17.78879,-22.17765%20-35.32089,-52.9929%20-52.68596,-92.6034%20-3.52579,-8.04247%20-7.1756,-15.3495%20-8.1107,-16.23787%20-1.98377,-1.88453%20-0.82412,36.88785%202.04301,68.307%200.9879,10.82572%201.49677,20.58142%201.13083,21.6792%20-1.58289,4.7487%20-30.79746,-56.22983%20-41.45412,-86.5257%20-2.7677,-7.86833%20-6.87787,-21.58718%20-9.1337,-30.48638%20-6.21694,-24.52567%20-16.80633,-79.21537%20-17.94387,-92.67247%20-0.55492,-6.56464%20-1.70789,-11.93571%20-2.56218,-11.93571%20-0.8637,0%20-1.08826,-1.8526%20-0.50583,-4.17319%200.66494,-2.64933%200.44832,-3.80292%20-0.59323,-3.15922%20-0.90235,0.55768%20-13.01601,16.06337%20-26.91924,34.45712%20-13.90323,18.39367%20-26.00178,34.16992%20-26.88567,35.05822%20-5.19086,5.217%208.02058,-89.05832%2024.76257,-176.70276%202.61389,-13.68371%204.42166,-25.21032%204.01729,-25.6147%20-0.8178,-0.81779%20-4.55164,1.70658%20-26.46861,17.89483%20-8.27694,6.1135%20-15.4493,10.71513%20-15.93857,10.22586%20-0.48927,-0.48926%201.70768,-10.19168%204.8821,-21.56091%2010.04728,-35.98442%2015.28685,-58.52268%2029.34974,-126.24951%204.12582,-19.86991%207.887,-37.13174%208.35818,-38.35962%201.72783,-4.50267%20-3.62451,-1.93288%20-24.12424,11.58258%20-11.52482,7.59831%20-21.15552,13.59453%20-21.40156,13.32493%20-0.24605,-0.26961%206.19588,-14.5504%2014.31539,-31.73509%20l%2014.76274,-31.24488%207.5451,-0.59451%20c%204.1498,-0.32697%2021.15886,-3.5286%2037.79789,-7.11473%2016.63905,-3.58612%2030.85669,-6.52022%2031.59478,-6.52022%200.73808,0%203.27187,3.81577%205.63063,8.47949%2019.09144,37.74746%2051.36686,62.13846%2087.10368,65.82554%2028.70167,2.96124%2064.23496,-2.43718%2091.67921,-13.92841%2011.32151,-4.74046%2014.38365,-6.8135%2013.10951,-8.87509%20-0.48681,-0.78767%200.34052,-1.43213%201.83851,-1.43213%206.34249,0%2024.21361,-10.81383%2034.56954,-20.91806%2013.0815,-12.76357%2020.58471,-25.87563%2027.62404,-48.27381%202.88663,-9.18486%206.48846,-18.23112%208.00405,-20.10281%20l%202.75564,-3.40306%2025.6512,6.17674%20c%2051.80879,12.47543%2088.48308,26.85809%20103.95431,40.76807%2013.3994,12.04721%2015.86207,21.70357%209.72101,38.11703%20-5.85319,15.64403%20-5.79777,15.62892%20-18.63383,5.08429%20-6.18484,-5.08076%20-16.31236,-11.67284%20-22.50561,-14.64906%20-10.49246,-5.04227%20-12.36506,-5.4089%20-27.45742,-5.37585%20-18.49061,0.0405%20-25.78905,2.48724%20-34.23511,11.47708%20-6.8963,7.3403%20-7.55004,12.1611%20-2.35384,17.35731%202.8567,2.85669%203.77399,2.89869%2016.25056,0.74404%2015.76439,-2.72244%2024.96391,-1.45364%2042.46606,5.85692%2023.6903,9.89531%2035.16431,22.93143%2035.16431,39.95166%200,10.58582%20-4.10341,19.30789%20-12.23835,26.01339%20-8.74379,7.2074%20-17.39175,9.0281%20-37.52362,7.90011%20-19.28268,-1.08041%20-30.47972,-3.64169%20-48.23683,-11.03398%20-19.04748,-7.9295%20-26.37741,-13.61454%20-32.513,-25.21683%20-3.97732,-7.52103%20-6.20974,-10.09464%20-8.75637,-10.09464%20-4.77681,0%20-16.85074,13.10218%20-18.91108,20.5216%20-2.14602,7.72796%20-2.17287,19.91276%20-0.0508,23.08724%201.36403,2.04054%202.28306,1.67159%205.82594,-2.33879%204.80057,-5.43403%201.88709,-6.38023%2026.22029,8.51538%2026.83357,16.42621%2051.20604,23.06305%2084.69442,23.06305%2017.24619,0%2023.7186,-0.73763%2037.63336,-4.28888%2018.42319,-4.70184%2022.46482,-4.45133%2020.76942,1.28733%20-3.82729,12.95484%20-20.42749,26.01813%20-41.61179,32.74578%20-26.83251,8.52138%20-43.51029,7.2723%20-102.89774,-7.70647%20l%20-39.57098,-9.98066%20-35.53312,-0.0431%20c%20-35.44056,-0.043%20-88.27613,1.90619%20-92.87066,3.42622%20-1.66805,0.55185%202.85992,5.77421%2014.53628,16.76554%2016.81566,15.82911%2016.91349,15.96453%2011.57509,16.02275%20-6.34417,0.0691%20-27.32434,-5.09783%20-40.34248,-9.93557%20-10.69031,-3.97268%20-23.15962,-12.10434%20-39.333,-25.65039%20-6.33321,-5.3044%20-11.76272,-9.39654%20-12.06559,-9.09366%20-0.30288,0.30288%202.06269,8.35497%205.25681,17.89356%203.19412,9.53857%205.38473,17.76564%204.86802,18.28233%20-1.51835,1.51836%20-18.66373,-12.0516%20-31.23915,-24.72468%20-19.732,-19.88525%20-38.17956,-47.39844%20-44.01171,-65.64033%20-4.48967,-14.04283%20-7.43023,-2.47181%20-5.75952,22.66353%201.3293,19.99901%206.34527,49.84625%209.74384,57.98016%202.85531,6.83371%205.63576,5.65308%205.63576,-2.39307%200,-5.44858%200.95057,-4.20574%2011.28218,14.75121%2021.97155,40.31446%2036.98155,60.47689%2071.01882,95.39723%2035.99592,36.92982%2067.54236,63.55951%2097.63,82.41376%2016.36274,10.25363%2016.72024,10.0902%20-14.37895,6.5724%20-25.48879,-2.88315%20-31.9648,-3.00832%20-31.16282,-0.6024%201.68201,5.046%2069.64909,42.78638%2092.53822,51.38408%2015.77247,5.92455%2032.63699,9.75097%2054.09735,12.27427%2022.54471,2.6508%2033.92788,3.01298%2033.92788,1.0794%200,-0.7113%20-3.31382,-2.90325%20-7.36404,-4.87102%20-4.05023,-1.96778%20-16.57396,-9.56243%20-27.83052,-16.87703%20l%20-20.46644,-13.29937%2032.67592,-0.43718%20c%2022.14397,-0.29632%2032.67594,-1.00207%2032.67594,-2.18955%200,-0.96382%20-1.83866,-3.9375%20-4.08591,-6.60817%20-7.66763,-9.11243%20-42.75321,-70.44371%20-42.75321,-74.73461%200,-0.4738%205.88973,2.09985%2013.08827,5.7192%207.19854,3.61935%2013.4483,6.22061%2013.88834,5.78056%200.44005,-0.44005%20-1.39209,-6.48458%20-4.07142,-13.43233%20-9.69429,-25.13811%20-21.49335,-71.52996%20-21.20288,-83.36598%200.0479,-1.95365%204.25696,6.98671%209.35339,19.86747%2018.78666,47.48173%2035.73076,76.09394%2059.05725,99.72546%2017.02383,17.24648%2017.38791,16.8603%20-11.02636,11.69543%20-9.69794,-1.76273%20-17.91153,-2.92613%20-18.25241,-2.58525%20-1.1472,1.1472%2018.61407,22.93845%2028.91061,31.8804%2014.43456,12.53565%2018.97986,15.51667%2040.4003,26.4969%20l%2018.99445,9.73657%20-16.83761,-0.0457%20c%20-20.76244,-0.0562%20-23.48492,1.62038%20-13.90186,8.56238%2021.24342,15.38865%2059.70125,30.08625%2085.2177,32.568%2018.83242,1.83165%2084.49577,2.15175%2084.49577,0.4119%200,-0.66735%20-10.35713,-4.7085%20-23.01578,-8.98043%20-12.65865,-4.27192%20-28.83025,-10.23142%20-35.93688,-13.24342%20l%20-12.92113,-5.4762%2035.53312,-0.0799%20c%2046.35422,-0.10418%20207.07449,2.87385%20220.00067,4.07647%20l%2010.03222,0.93338%20-0.3414,5.9349%20-0.34132,5.9349%208.88322,1.05165%20c%204.8858,0.5784%2016.98225,1.1235%2026.88073,1.21132%2014.4042,0.12788%2018.1833,0.6435%2018.9273,2.58248%200.7834,2.0415%205.9998,2.42272%2033.1511,2.42272%2017.7218,0%2033.3503,0.4332%2034.7299,0.96263%202.2137,0.84945%202.1435,1.6782%20-0.5963,7.04872%20l%20-3.1049,6.08618%20-26.3252,1.04647%20c%20-14.4788,0.57563%20-56.8513,1.7463%20-94.16105,2.60153%20-37.30973,0.85522%20-104.17665,2.41155%20-148.593,3.45847%20-52.35428,1.23405%20-129.42927,1.54455%20-219.14527,0.8829%20l%20-138.38818,-1.0206%20-3.5738,5.78258%20c%20-3.87466,6.26932%20-2.71935,8.60782%204.27817,8.6595%201.84116,0.0135%2021.82855,0.73065%2044.41641,1.59345%2022.58784,0.86272%2062.87322,2.38867%2089.52306,3.3909%2026.64985,1.00222%2049.72619,2.5023%2051.28077,3.33352%201.55457,0.8313%202.82649,2.49825%202.82649,3.70448%200,3.20512%203.63671,4.12282%2017.49488,4.41472%206.81188,0.14348%20-13.31682,0.816%20-44.73042,1.49453%20-37.52817,0.8106%20-58.69506,1.88782%20-61.72105,3.1413%20-2.53296,1.04917%20-6.06066,4.37407%20-7.83932,7.3887%20l%20-3.23395,5.48115%20h%20-24.00551%20-24.00552%20l%20-3.78026,8.07097%20c%20-2.07913,4.4391%20-3.46585,8.38545%20-3.08159,8.76968%201.06716,1.06717%2097.70641,3.98932%20171.86173,5.19675%20l%2066.22082,1.0782%20-4.53322,9.43905%20-4.53322,9.43905%20H%20585.2912%20c%20-92.67016,0%20-139.95684,0.55657%20-142.04092,1.6719%20-2.50362,1.33995%20-3.1241,3.42502%20-3.1241,10.49842%200,4.8546%20-0.54511,8.8189%20-1.21135,8.8097%20-2.29843,-0.032%20-27.72605,-20.36795%20-39.9669,-31.96407%20-6.75096,-6.3954%20-12.99978,-11.628%20-13.88628,-11.628%20-3.36735,0%205.94588,38.51397%2014.06033,58.14517%209.54702,23.0969%209.51399,23.1744%20-5.02734,11.798%20z'%20id='path18'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20712.52876,795.05752%20c%20-14.22324,-0.3813%20-18.9297,-1.01722%20-18.34756,-2.4792%200.43063,-1.0815%202.03186,-5.05529%203.55827,-8.83072%20l%202.77531,-6.8643%20h%2074.91494%2074.91488%20l%205.01345,-8.8833%205.01338,-8.8833%20h%20160.55247%20c%20109.289,0%20160.5525,0.53228%20160.5525,1.66703%200,0.91687%20-1.0532,4.18755%20-2.3404,7.26817%20l%20-2.3402,5.60108%20h%20-95.1389%20c%20-52.3264,0%20-99.54405,0.46042%20-104.92815,1.02322%20l%20-9.78923,1.02315%20-2.94487,10.2828%20-2.94488,10.2828%20-114.69524,-0.34725%20c%20-63.08235,-0.19102%20-123.30397,-0.5781%20-133.82577,-0.86018%20z%20m%20180.24094,-1.47735%20c%20-1.11038,-0.44805%20-2.9274,-0.44805%20-4.03785,0%20-1.11038,0.44805%20-0.2019,0.81465%202.01892,0.81465%202.22083,0%203.12938,-0.3666%202.01893,-0.81465%20z%20m%2017.68582,-0.8685%20c%20-1.5075,-1.5075%20-2.36887,-1.5075%20-3.87637,0%20-1.50743,1.50743%20-1.0767,1.93815%201.93822,1.93815%203.01493,0%203.44558,-0.43072%201.93815,-1.93815%20z%20m%2038.05546,-16.93815%20c%20-1.54426,-0.40425%20-4.45148,-0.41887%20-6.46058,-0.0322%20-2.0091,0.38633%20-0.74565,0.71708%202.80762,0.735%203.55336,0.018%205.19713,-0.29819%203.65296,-0.70245%20z%20m%20-57.28148,-2.28787%20c%20-1.27747,-1.27748%20-2.6274,-1.29143%20-4.76467,-0.0487%20-2.61435,1.51957%20-2.39446,1.73947%201.78252,1.78252%203.47468,0.036%204.28205,-0.4335%202.98215,-1.7334%20z%20m%2030.61275,0.6426%20c%20-1.99875,-0.38498%20-5.26935,-0.38498%20-7.2681,0%20-1.99875,0.38497%20-0.36345,0.69997%203.63405,0.69997%203.9975,0%205.6328,-0.315%203.63405,-0.69997%20z'%20id='path19'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20844.1121,618.7574%20c%20-1.85663,-1.17601%20-1.73813,-2.67552%200.72015,-9.11237%20l%202.94247,-7.70474%2090.4764,1.13704%20c%2049.76198,0.62537%2090.73498,1.39565%2091.05108,1.71173%200.3161,0.31608%20-0.2832,3.43824%20-1.3319,6.93816%20l%20-1.9065,6.36347%20-41.26865,1.06191%20c%20-58.24943,1.49885%20-138.04673,1.27469%20-140.68305,-0.3952%20z'%20id='path20'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20844.04265,618.71448%20c%20-1.95263,-1.23587%20-1.85865,-2.58475%200.63472,-9.11345%20l%202.92643,-7.66288%2090.5619,1.13811%20c%2049.809,0.62596%2090.8204,1.39672%2091.1365,1.7128%200.3161,0.31608%20-0.2833,3.43846%20-1.332,6.93863%20l%20-1.9067,6.36395%20-39.79513,1.05794%20c%20-57.09225,1.51776%20-139.53892,1.26555%20-142.22572,-0.4351%20z'%20id='path21'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.9003,1033.0855%20c%20-22.94087,-19.2606%20-48.68452,-46.98408%20-61.73949,-66.48768%20-10.63267,-15.88477%20-26.43984,-45.84285%20-42.15069,-79.8849%20l%20-5.59056,-12.11355%20-0.49344,10.49843%20c%20-0.2714,5.7741%200.6813,26.38357%202.1171,45.79875%201.43579,19.41525%202.27032,35.6406%201.85451,36.0564%20-2.33955,2.33955%20-31.15773,-58.60523%20-41.37888,-87.50813%20-8.75708,-24.76297%20-24.27113,-94.77352%20-26.84316,-121.13565%20-0.60669,-6.21832%20-1.79235,-12.17967%20-2.63481,-13.24743%20-0.84246,-1.06778%20-1.00344,-3.60593%20-0.35775,-5.64034%201.01411,-3.19518%200.83621,-3.41857%20-1.30636,-1.6404%20-1.36419,1.13219%20-14.00657,17.39198%20-28.09418,36.1329%20-17.20368,22.88633%20-25.80135,33.12705%20-26.18495,31.18905%20-0.79005,-3.99142%202.34475,-33.423%207.04845,-66.17551%203.54804,-24.70548%2020.33665,-121.25258%2022.77185,-130.95517%200.53963,-2.15005%200.35724,-3.89786%20-0.40531,-3.88403%20-0.76254,0.0138%20-10.35183,6.61438%20-21.30951,14.66789%20-10.95768,8.05352%20-20.31818,14.24764%20-20.8011,13.76471%20-0.48293,-0.48293%202.11434,-11.62607%205.77169,-24.76253%208.5737,-30.79499%2012.73519,-48.5922%2025.41229,-108.67944%205.71626,-27.09402%2010.79535,-50.53376%2011.28688,-52.08834%200.49154,-1.55457%200.36347,-2.82649%20-0.2846,-2.82649%20-1.81871,0%20-14.53577,7.63371%20-30.26692,18.16843%20-7.8477,5.2554%20-14.50762,9.31365%20-14.79983,9.01833%20-0.29222,-0.2953%206.12863,-14.60042%2014.26854,-31.78914%20l%2014.79983,-31.25223%207.3612,-0.57267%20c%204.04865,-0.31496%2019.31174,-3.18697%2033.91798,-6.38222%2014.60623,-3.19525%2028.7895,-6.20997%2031.51839,-6.69938%204.81271,-0.86313%205.20038,-0.4608%2012.91884,13.40731%2015.50042,27.85038%2043.15257,50.90756%2069.48614,57.9396%2012.66126,3.38104%2050.10863,3.39589%2067.67011,0.0269%2021.82881,-4.1877%2052.08349,-15.68752%2051.4047,-19.53895%20-0.16323,-0.92615%202.74402,-2.58396%206.46056,-3.68402%2010.12426,-2.99671%2028.40741,-16.22327%2036.79043,-26.61526%208.97022,-11.11993%2015.77509,-24.72529%2021.55336,-43.0929%204.87125,-15.48446%207.90827,-20.99684%2011.5681,-20.99684%204.97264,0%2055.15198,13.19908%2073.66187,19.37589%2025.84713,8.62526%2044.33787,17.7557%2054.54664,26.93427%2013.3994,12.04721%2015.86207,21.70357%209.72101,38.11703%20-5.8104,15.52968%20-5.73267,15.50788%20-18.60188,5.21637%20-6.20242,-4.96007%20-16.28077,-11.5325%20-22.39635,-14.60539%20-10.25796,-5.15431%20-12.2596,-5.58637%20-25.84227,-5.57806%20-18.89143,0.0115%20-25.53015,1.95048%20-34.27386,10.01016%20-7.59076,6.99692%20-9.06397,12.5185%20-4.87024,18.25377%202.08885,2.85666%203.14004,2.92675%2016.73843,1.11625%2017.10548,-2.27743%2025.69676,-1.05289%2042.83373,6.10525%2023.63212,9.87118%2035.10756,22.92226%2035.10756,39.92804%200,10.58582%20-4.10341,19.30789%20-12.23835,26.01339%20-8.74379,7.2074%20-17.39175,9.0281%20-37.52362,7.90011%20-19.28268,-1.08041%20-30.47972,-3.64169%20-48.23683,-11.03398%20-17.81272,-7.41548%20-26.45406,-13.78388%20-31.47735,-23.1979%20-7.85341,-14.71783%20-10.14111,-15.3165%20-19.84173,-5.19237%20-9.57657,9.99466%20-13.89481,28.30827%20-8.43543,35.77444%202.03071,2.77716%202.32461,2.70711%205.48167,-1.30644%201.83475,-2.33251%203.78226,-4.24093%204.32779,-4.24093%200.54555,0%209.23023,4.96117%2019.29931,11.02481%2032.43869,19.53473%2054.57524,25.32365%2092.284,24.13319%2017.18858,-0.54263%2026.01834,-1.64484%2036.71216,-4.58271%2017.50572,-4.8093%2019.5631,-3.72982%2014.16074,7.42995%20-6.54956,13.5296%20-26.42273,25.36248%20-51.66062,30.75977%20-20.87598,4.46446%20-36.26193,2.5924%20-90.44795,-11.00511%20l%20-39.57098,-9.93%20-33.11041,-0.0916%20c%20-44.59465,-0.12338%20-95.28686,2.32581%20-95.31565,4.60518%20-0.0122,0.97008%207.0742,8.45334%2015.74764,16.62948%2015.73091,14.82894%2015.75659,14.86588%2010.38601,14.94006%20-2.96114,0.0409%20-11.18218,-1.40607%20-18.26897,-3.21549%20-27.03978,-6.90387%20-37.38269,-12.25511%20-59.37181,-30.71796%20-6.45795,-5.42234%20-12.18831,-9.41221%20-12.73413,-8.86641%20-0.54581,0.54583%201.3999,8.29097%204.32382,17.21141%202.92392,8.92046%204.90653,16.6287%204.4058,17.12943%20-1.49294,1.49295%20-18.73751,-12.18428%20-31.21011,-24.75374%20-20.13338,-20.28973%20-37.85772,-46.74058%20-43.98464,-65.64032%20-4.47673,-13.80938%20-7.5036,-2.41919%20-5.82349,21.91396%201.40007,20.27733%206.45074,50.75988%209.69824,58.53224%202.92851,7.00892%205.71321,5.93668%205.73209,-2.20714%200.0127,-5.46378%200.96738,-4.20862%2011.4362,15.03539%2023.16972,42.59104%2043.99271,69.32866%2085.11015,109.28511%2033.01014,32.07807%2056.96565,51.63927%2084.1784,68.73695%2015.49924,9.73807%2015.84613,9.59902%20-15.18652,6.08873%20-11.54827,-1.30628%20-23.54069,-2.361%20-26.64984,-2.34383%20l%20-5.653,0.0315%205.11806,4.6581%20c%2011.72409,10.67055%2074.04588,43.76722%2095.82831,50.89072%2024.88283,8.13743%2080.7571,15.6783%2080.7571,10.89916%200,-0.7113%20-3.31382,-2.90326%20-7.36405,-4.87103%20-4.05022,-1.96778%20-16.57408,-9.56242%20-27.83082,-16.87702%20l%20-20.46676,-13.29938%2031.42026,-0.43987%20c%2017.28115,-0.24195%2032.0692,-1.08885%2032.86237,-1.88205%200.84604,-0.84608%20-0.58478,-4.00208%20-3.46176,-7.63583%20-8.84142,-11.16682%20-42.3075,-69.47636%20-42.3075,-73.71428%200,-0.55369%205.94285,1.8672%2013.20635,5.37975%207.26349,3.51254%2013.49653,6.09627%2013.85119,5.7416%200.35465,-0.35465%20-1.92755,-7.51288%20-5.07159,-15.90715%20-9.85407,-26.30956%20-20.54166,-68.85771%20-20.29857,-80.81025%200.0397,-1.95364%204.34334,7.13853%209.56357,20.20485%2019.33432,48.39404%2038.66669,80.27862%2062.71541,103.43548%2013.33202,12.8376%2013.27151,12.86865%20-14.9779,7.6785%20-9.65046,-1.773%20-17.82255,-2.94742%20-18.16018,-2.60985%20-1.11863,1.1187%2018.37865,22.65495%2028.02235,30.95288%2015.4575,13.3005%2020.47362,16.63875%2040.7911,27.14662%20l%2019.34804,10.00658%20-16.76271,-0.045%20c%20-20.88255,-0.0555%20-23.4105,1.60455%20-13.48108,8.85412%209.94766,7.26293%2040.1198,21.53783%2055.98815,26.48888%207.94771,2.47972%2020.77559,4.83592%2031.49527,5.78482%2023.50382,2.08065%2083.05948,2.15535%2080.99585,0.10163%20-0.8439,-0.83985%20-12.21727,-5.21535%20-25.27405,-9.7233%20-13.05681,-4.50795%20-28.6833,-10.33605%20-34.72555,-12.95138%20l%20-10.9859,-4.755%2035.53311,-0.057%20c%2047.29527,-0.0759%20207.32509,2.89793%20220.00069,4.08825%20l%2010.03223,0.94215%20-0.3414,5.9349%20-0.34133,5.9349%209.69083,1.03613%20c%205.32995,0.56977%2017.42632,1.11487%2026.88087,1.21132%2013.6759,0.13943%2017.38,0.67058%2018.1197,2.598%200.7833,2.0415%205.9997,2.42273%2033.151,2.42273%2017.7218,0%2033.3503,0.4332%2034.73,0.96262%202.214,0.8496%202.1446,1.6761%20-0.5911,7.03845%20l%20-3.0996,6.07575%20-23.9078,1.03418%20c%20-13.1492,0.5688%20-56.9777,1.74922%20-97.39662,2.62312%20-40.41893,0.87383%20-86.5716,2.11628%20-102.56153,2.76098%20-15.98992,0.64462%20-113.29665,1.20292%20-216.23722,1.24072%20l%20-187.16468,0.0683%20-3.0022,5.59778%20c%20-2.31408,4.31475%20-2.53761,5.8578%20-0.97516,6.73215%201.11488,0.62392%2023.09377,1.91925%2048.84196,2.87857%20117.81893,4.38945%20139.06039,5.4117%20141.70449,6.8196%201.55457,0.82778%202.8265,2.48498%202.8265,3.68258%200,2.89627%204.93207,4.06687%2018.57413,4.40827%206.2183,0.15563%20-14.39607,0.83805%20-45.80968,1.51658%20-36.49158,0.78817%20-58.73046,1.90252%20-61.58763,3.08602%20-2.45959,1.0188%20-5.81367,4.3437%20-7.45353,7.3887%20l%20-2.98153,5.53643%20h%20-24.39133%20-24.39133%20l%20-3.78025,8.07097%20c%20-2.07914,4.4391%20-3.4753,8.36483%20-3.10259,8.72393%201.08885,1.04902%20100.00524,4.062%20171.88273,5.23545%20l%2066.22082,1.08105%20-4.53322,9.44115%20-4.53322,9.44115%20H%20586.3101%20c%20-85.68995,0%20-139.46645,0.59632%20-142.04092,1.57515%20-3.75724,1.42845%20-4.143,2.406%20-4.143,10.49842%200,4.9078%20-0.54511,8.9169%20-1.21135,8.9092%20-1.91579,-0.023%20-28.00791,-20.7118%20-41.22965,-32.6926%20-6.61728,-5.99617%20-12.44869,-10.90222%20-12.95865,-10.90222%20-2.9546,0%206.78692,39.32172%2014.29677,57.70892%2010.03787,24.5769%209.87975,24.7003%20-10.12299,7.9066%20z'%20id='path22'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20989.67825,1008.2953%20c%20-5.9727,-0.7412%20-5.95268,-0.6902%20-3.23033,-8.2362%20l%202.01893,-5.59615%2075.10405,1.15612%20c%2041.3073,0.63593%2075.5968,1.64895%2076.199,2.2512%200.6021,0.60226%200.092,3.45723%20-1.1334,6.34423%20l%20-2.2282,5.2492%20-70.7404,-0.2584%20c%20-38.9072,-0.1422%20-73.1026,-0.5517%20-75.98965,-0.91%20z'%20id='path23'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.9003,1033.0855%20c%20-23.62422,-19.8343%20-48.77192,-47.04835%20-62.23647,-67.35033%20-11.51858,-17.3679%20-30.43833,-53.37907%20-40.88068,-77.81085%20-2.56283,-5.99625%20-5.33765,-10.90222%20-6.16628,-10.90222%20-1.68049,0%20-0.38383,36.19717%202.38266,66.51337%200.94973,10.40753%201.45937,20.23215%201.13253,21.83243%20-1.21992,5.97315%20-26.18805,-44.60438%20-39.1838,-79.37393%20-10.33034,-27.6384%20-24.30253,-87.80655%20-28.44794,-122.50477%20-0.97715,-8.17905%20-2.47441,-16.18829%20-3.32724,-17.79843%20-0.85283,-1.61014%20-1.07479,-4.4267%20-0.49322,-6.25904%201.99316,-6.27989%20-2.26226,-1.37279%20-25.87404,29.83644%20-12.91385,17.06903%20-24.98798,32.85173%20-26.83138,35.07255%20l%20-3.35165,4.03785%201.01889,-14.53627%20c%202.15778,-30.78412%2013.74528,-105.70093%2026.62785,-172.15732%201.77043,-9.13304%202.90415,-16.92033%202.51937,-17.30511%20-0.38478,-0.38479%20-9.8878,5.98095%20-21.11784,14.14609%20-11.23003,8.16512%20-20.80989,14.45404%20-21.28856,13.97537%20-0.47867,-0.47868%202.05326,-11.26788%205.62652,-23.97599%208.53344,-30.34871%2038.06924,-162.50392%2036.67265,-164.08837%20-0.76058,-0.86289%20-6.8658,2.69868%20-26.38127,15.38992%20-10.10087,6.56876%20-18.57783,11.72806%20-18.83769,11.4651%20-0.25986,-0.26296%206.24792,-14.65098%2014.46174,-31.97338%2010.62571,-22.4089%2015.64529,-31.37341%2017.39891,-31.0729%201.35558,0.2323%2016.9216,-2.59149%2034.59116,-6.27509%2017.66957,-3.68358%2034.0013,-7.02691%2036.29273,-7.42961%203.7863,-0.6654%204.88847,0.55466%2012.08586,13.37851%2014.01038,24.96284%2035.72855,44.72456%2060.55867,55.10332%209.32057,3.8959%2012.89969,4.42165%2034.2875,5.03659%2027.92575,0.80291%2044.71108,-1.2316%2064.52757,-7.82125%2015.75798,-5.24007%2031.14906,-12.53793%2029.63514,-14.05187%20-0.54497,-0.54495%202.09117,-2.03264%205.85807,-3.30598%2026.06508,-8.81088%2047.81093,-34.78484%2058.43517,-69.7969%204.66256,-15.36546%207.89149,-20.98248%2012.06171,-20.98248%205.08353,0%2053.91495,12.91386%2073.24464,19.37013%2046.08831,15.39385%2067.49905,31.50006%2067.49905,50.77608%200,5.87321%20-4.95973,20.8621%20-8.50949,25.71667%20-1.86791,2.55453%20-3.03167,2.0113%20-13.32379,-6.21932%20-6.20242,-4.96007%20-16.28077,-11.53249%20-22.39635,-14.60539%20-10.21973,-5.13511%20-12.29506,-5.58707%20-25.65488,-5.58707%20-18.46439,0%20-25.9976,2.30116%20-34.6391,10.58117%20-7.35738,7.04961%20-8.71554,12.18978%20-4.67932,17.70963%202.11018,2.88585%203.08258,2.94815%2016.55521,1.06064%2016.88394,-2.36543%2025.62279,-1.11711%2043.00388,6.143%2023.63212,9.87119%2035.10756,22.92227%2035.10756,39.92804%200,10.67036%20-4.10937,19.30899%20-12.47048,26.21509%20-8.70437,7.18967%20-16.11853,8.73487%20-36.79135,7.66779%20-19.67864,-1.01576%20-30.74984,-3.51532%20-48.73697,-11.00336%20-17.89127,-7.44816%20-26.31477,-13.72953%20-31.98006,-23.84738%20-6.47849,-11.57018%20-9.12987,-13.14108%20-14.92194,-8.84091%20-7.72567,5.73573%20-13.92704,17.5155%20-14.62761,27.7858%20-0.42942,6.29518%200.10384,10.13405%201.7042,12.26852%202.2579,3.01145%202.41576,2.97438%205.15835,-1.21135%201.55604,-2.37485%203.48231,-4.31788%204.28059,-4.31788%200.79828,0%209.47025,4.81516%2019.27107,10.70036%2021.83688,13.11267%2036.9795,19.13598%2056.69317,22.55103%2021.01494,3.64046%2051.92948,2.51653%2072.01857,-2.61831%2018.36554,-4.6943%2020.29454,-3.74083%2014.91482,7.37217%20-6.54957,13.52959%20-26.42274,25.36248%20-51.66063,30.75976%20-20.80669,4.44964%20-39.57181,2.12369%20-93.67823,-11.61153%20l%20-36.34069,-9.22527%20-29.07255,-0.14076%20c%20-38.68621,-0.18731%20-97.57836,2.36754%20-98.76311,4.28452%20-0.52098,0.84296%206.2245,8.41057%2014.98996,16.8169%20l%2015.93718,15.28425%20-8.88328,-0.78728%20c%20-11.04869,-0.97919%20-34.85867,-7.86503%20-45.84146,-13.25733%20-4.54619,-2.23206%20-15.52545,-9.86438%20-24.39835,-16.96072%20-8.87291,-7.09632%20-16.383,-12.15108%20-16.6891,-11.23279%20-0.3061,0.91829%201.75938,8.6212%204.58996,17.11759%202.83057,8.49638%204.75893,15.83553%204.28525,16.30921%20-3.29673,3.29673%20-37.41275,-28.71173%20-52.78009,-49.51953%20-9.37914,-12.69961%20-22.60469,-36.86734%20-22.60469,-41.3067%200,-1.04863%20-1.03875,-2.76868%20-2.30833,-3.82234%20-1.92565,-1.59815%20-2.49182,-0.69215%20-3.41515,5.4651%20-1.33456,8.89948%201.53615,43.24251%205.0275,60.14522%204.71194,22.81199%209.04896,30.40346%2010.09314,17.66699%200.50779,-6.19375%200.64801,-6.02427%2011.81485,14.27989%206.21553,11.3014%2014.41997,25.38769%2018.23211,31.30284%2030.74274,47.70241%20101.21326,115.91838%20152.716,147.83018%2014.17341,8.78205%2014.02849,8.82338%20-17.72479,5.0571%20-11.1041,-1.317%20-22.64042,-2.4009%20-25.63625,-2.40862%20-4.89072,-0.0127%20-5.2206,0.2601%20-3.23028,2.6703%203.54076,4.28782%2022.04931,15.6207%2047.79733,29.2665%2032.51053,17.22975%2048.93746,24.02565%2069.07048,28.57485%2018.33575,4.14315%2050.30458,7.98412%2058.18753,6.99112%20l%204.82696,-0.60802%20-5.45156,-3.17048%20c%20-7.22918,-4.20435%20-42.45131,-26.6586%20-47.27717,-30.13942%20-3.62656,-2.61578%20-2.33976,-2.74568%2028.00249,-2.82653%2017.49205,-0.0465%2032.18526,-0.702%2032.65156,-1.4565%200.46631,-0.7545%20-1.22952,-4.2069%20-3.76853,-7.67197%20-10.17345,-13.884%20-42.11263,-69.93081%20-42.11263,-73.89912%200,-0.5968%205.06956,1.46788%2011.26569,4.58821%2016.61088,8.36511%2017.01081,8.09058%2011.14751,-7.65163%20-9.77847,-26.25387%20-20.90041,-70.29915%20-20.74921,-82.17138%200.0269,-2.10921%204.96218,8.15751%2010.96741,22.81492%2019.60246,47.84531%2034.34861,72.53611%2057.62728,96.49055%2016.76328,17.24992%2017.21565,16.77495%20-11.30599,11.87055%20-9.77162,-1.68023%20-17.98652,-2.84693%20-18.25532,-2.5926%20-0.97831,0.92557%2020.6189,24.44512%2029.01366,31.59622%2014.82231,12.62625%2020.0133,16.04505%2040.2694,26.5212%20l%2019.68676,10.1817%20-17.10586,-0.21997%20c%20-20.21597,-0.25988%20-23.55658,1.3626%20-15.38565,7.4724%208.15024,6.09442%2028.0784,16.51335%2042.39003,22.16264%2025.33192,9.99938%2034.70247,11.40788%2082.9201,12.46373%2029.4483,0.64477%2044.01262,0.41895%2044.01262,-0.68243%200,-0.9054%20-10.80682,-5.36452%20-24.01515,-9.90922%20-13.20835,-4.54463%20-29.01655,-10.4925%20-35.12935,-13.21748%20l%20-11.11418,-4.95457%2086.41008,0.90683%20c%2097.42448,1.02247%20154.236,2.2008%20169.33868,3.51232%20l%2010.24725,0.8898%20-0.99818,5.32073%20c%20-0.77887,4.15147%20-0.38377,5.55645%201.79775,6.3936%201.53773,0.5901%2013.71923,1.52129%2027.07005,2.06932%2016.95828,0.69615%2024.92388,1.64617%2026.42998,3.15232%201.6493,1.64926%209.5,2.15596%2033.4037,2.15596%2017.1864,0%2032.3767,0.4332%2033.7563,0.96262%203.9885,1.53053%20-2.6874,13.57275%20-7.5263,13.57635%20-1.9807,0%20-25.7691,0.70935%20-52.8631,1.57297%20-154.16965,4.91445%20-295.75547,6.8937%20-430.86762,6.02318%20l%20-139.33455,-0.89768%20-3.17238,6.2184%20-3.17238,6.21833%204.41228,0.88177%20c%202.42676,0.48495%2024.03627,1.62045%2048.02112,2.5233%2023.98486,0.90285%2064.66863,2.44013%2090.40836,3.4161%2025.73975,0.97598%2048.08928,2.46473%2049.66562,3.3084%201.57635,0.8436%202.86609,2.5656%202.86609,3.82658%200,2.59117%205.77464,3.86737%2020.18927,4.46205%205.32997,0.21982%20-15.93237,0.90667%20-47.24963,1.52617%20-61.92579,1.22513%20-63.28967,1.43318%20-69.01272,10.52956%20l%20-3.25815,5.1786%20-24.43203,0.0622%20-24.43201,0.0623%20-3.54154,8.23252%20c%20-1.94786,4.5279%20-3.30928,8.4519%20-3.0254,8.72003%200.89474,0.8451%20107.68868,3.9615%20174.19937,5.08342%20l%2063.85358,1.07708%20-3.63903,7.4214%20c%20-2.00147,4.08172%20-3.66176,8.307%20-3.68954,9.38947%20-0.0392,1.52858%20-31.63216,2.0697%20-141.4348,2.42272%20-158.32425,0.50903%20-144.4269,-0.73875%20-144.4711,12.97193%20-0.0136,4.2196%20-0.50513,7.672%20-1.0923,7.672%20-2.01997,0%20-25.50191,-18.394%20-39.46907,-30.91698%20-7.69395,-6.8985%20-14.32845,-12.20325%20-14.74332,-11.78842%20-2.50198,2.502%206.71909,37.9009%2015.80452,60.6721%203.0566,7.661%205.55746,14.384%205.55746,14.9401%200,2.7255%20-4.31622,0.01%20-17.3079,-10.9003%20z'%20id='path25'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.9003,1033.0855%20c%20-23.73218,-19.9249%20-48.77297,-47.04303%20-62.1911,-67.35033%20-12.151,-18.38962%20-20.23469,-33.34927%20-37.90083,-70.13895%20l%20-9.30695,-19.38172%20-0.56324,8.0757%20c%20-0.30978,4.44165%200.64179,24.67042%202.11459,44.95282%201.4728,20.2824%202.3192,37.2357%201.8809,37.674%20-2.19311,2.19308%20-28.11571,-51.57322%20-39.05852,-81.01162%20-6.77153,-18.2169%20-14.69251,-48.0417%20-21.01879,-79.14203%20-4.14753,-20.38942%20-10.45365,-57.65166%20-11.00196,-65.00943%20-0.14894,-1.99874%20-0.75381,-3.63407%20-1.34414,-3.63407%20-0.59033,0%20-11.85595,14.23588%20-25.0347,31.6352%20-33.11344,43.71833%20-29.5355,39.73035%20-29.57845,32.96835%20-0.0682,-10.7355%206.26007,-60.6731%2012.0756,-95.29125%206.1887,-36.83958%2016.35717,-93.13257%2018.01901,-99.75384%200.9187,-3.66039%200.72496,-3.8187%20-2.53686,-2.07302%20-1.94234,1.0395%20-11.55156,7.718%20-21.35384,14.84112%20-9.80227,7.1231%20-18.20229,12.57113%20-18.6667,12.10671%20-0.46441,-0.46441%201.76854,-10.51702%204.96212,-22.33914%208.51078,-31.5056%2015.79657,-62.59951%2026.79757,-114.36542%205.38031,-25.31735%2010.18517,-47.30347%2010.67748,-48.85805%200.4923,-1.55457%200.23601,-2.82649%20-0.56953,-2.82649%20-0.80554,0%20-11.11628,6.21268%20-22.91276,13.80597%20-11.79647,7.59328%20-21.66396,13.5895%20-21.92775,13.32492%20-0.26378,-0.26458%206.18221,-14.56203%2014.32443,-31.77212%20l%2014.80402,-31.29107%206.80732,-0.59976%20c%203.74403,-0.32987%2019.00712,-3.18729%2033.91798,-6.34983%2014.91087,-3.16254%2029.3667,-6.15137%2032.12408,-6.64186%204.79552,-0.85302%205.28089,-0.41041%2011.16705,10.18349%2016.08057,28.94173%2038.22468,49.12839%2065.00112,59.25527%208.34624,3.15655%2012.31359,3.49934%2039.95406,3.45212%2028.28187,-0.0483%2031.92651,-0.39465%2046.48943,-4.41772%2018.51982,-5.11619%2040.6295,-14.88066%2039.14245,-17.28678%20-0.56516,-0.91445%200.008,-1.66263%201.27347,-1.66263%201.26556,0%207.3707,-2.53625%2013.56695,-5.63612%2020.67558,-10.34356%2037.53588,-31.05708%2046.54758,-57.18544%207.39711,-21.44702%209.58213,-26.44028%2012.32324,-28.16142%203.27666,-2.0574%2041.51381,7.05367%2073.34357,17.47617%2048.22454,15.79087%2070.15243,31.91659%2070.15243,51.58993%200,5.89557%20-4.96391,20.86782%20-8.53995,25.75834%20-1.91192,2.61472%20-2.90368,2.17995%20-12.46855,-5.46592%20-5.71528,-4.56863%20-15.08913,-10.93371%20-20.83078,-14.14462%20-9.14498,-5.11417%20-12.12922,-5.92673%20-24.06821,-6.55336%20-19.54589,-1.0259%20-29.54249,1.59756%20-38.3899,10.07486%20-7.6878,7.36621%20-9.19865,13.19588%20-4.60932,17.7852%202.99983,2.99985%205.95732,3.12208%2019.30399,0.79786%2016.45121,-2.86486%2036.59633,2.45055%2055.4357,14.62702%2013.10187,8.46814%2018.50371,16.80342%2019.33331,29.83206%200.77146,12.11546%20-2.86453,20.54585%20-12.17305,28.22437%20-7.70637,6.35692%20-14.29376,8.18153%20-29.52321,8.17752%20-23.67737,-0.006%20-44.57697,-5.17176%20-66.45936,-16.42602%20-13.69463,-7.04325%20-16.43699,-9.53471%20-22.35444,-20.30919%20-5.62226,-10.23698%20-8.10064,-11.44852%20-14.33642,-7.00826%20-11.1426,7.93424%20-18.72865,31.6014%20-12.69398,39.60306%202.272,3.01256%202.42842,2.97593%205.17203,-1.21135%201.55604,-2.37485%203.59311,-4.31788%204.52679,-4.31788%200.93367,0%206.84629,3.20675%2013.13916,7.12612%2018.20577,11.33906%2036.57742,19.90391%2051.1951,23.8671%2011.49242,3.11585%2017.5865,3.67718%2040.19598,3.7025%2022.97063,0.0257%2028.82448,-0.51591%2042.40161,-3.92313%2019.22796,-4.82534%2021.13254,-3.94902%2015.71958,7.23265%20-6.54957,13.5296%20-26.42274,25.36248%20-51.66063,30.75977%20-20.53254,4.391%20-38.87322,2.18308%20-92.87066,-11.18016%20-19.54321,-4.83653%20-41.19388,-9.26575%20-48.11259,-9.84269%20-13.73659,-1.14549%20-107.883,1.91047%20-113.88268,3.69659%20-3.42727,1.02032%20-2.50004,2.32193%2012.11356,17.0044%20l%2015.82493,15.89949%20-8.88328,-0.87205%20c%20-10.55529,-1.03619%20-34.12477,-7.73631%20-44.69828,-12.70644%20-4.14516,-1.94846%20-15.22607,-9.53974%20-24.62424,-16.86951%20-9.39816,-7.32976%20-17.29754,-12.73953%20-17.55416,-12.0217%20-0.25663,0.71783%201.79735,8.37269%204.56438,17.01081%202.76704,8.63812%204.6255,16.11115%204.12991,16.60673%20-1.63052,1.63053%20-14.31045,-8.23033%20-28.53482,-22.19079%20-18.45951,-18.11703%20-32.48856,-37.36001%20-42.39056,-58.14512%20-7.80744,-16.38845%20-8.12746,-16.79598%20-9.51251,-12.11356%20-4.02669,13.61292%206.57116,87.80897%2012.27531,85.94013%200.98437,-0.3225%202.0235,-2.97264%202.30916,-5.88921%200.47606,-4.86034%201.58474,-3.39981%2013.28697,17.50387%2024.11919,43.08405%2037.62443,60.59807%2077.38814,100.35946%2032.35132,32.34942%2057.07091,53.14652%2084.7394,71.29292%2021.99509,14.42557%2022.45862,14.00317%20-11.18942,10.197%20-11.54827,-1.30628%20-23.10823,-2.38231%20-25.68882,-2.39116%20-4.5829,-0.0158%20-4.62431,0.0585%20-1.78154,3.1998%208.10837,8.95965%2079.55082,46.77915%20100.95931,53.44493%2021.49952,6.69405%2075.91168,13.7193%2075.91168,9.80107%200,-0.98482%20-3.08896,-3.36375%20-6.86435,-5.28637%20-3.7754,-1.9227%20-15.938,-9.3873%20-27.028,-16.58805%20l%20-20.16366,-13.0923%2031.74332,-0.80753%20c%2017.45883,-0.44415%2032.12894,-1.1952%2032.60025,-1.66897%200.47132,-0.47378%20-2.41768,-5.56148%20-6.42001,-11.30603%20-10.85736,-15.5835%20-39.40068,-66.35565%20-39.40068,-70.0849%200,-0.42256%205.47854,1.83346%2012.17451,5.01337%206.69597,3.1799%2012.67316,5.28296%2013.28265,4.67347%200.60951,-0.60949%20-0.94502,-6.69943%20-3.45447,-13.53318%20-9.61977,-26.19656%20-20.4705,-69.32444%20-20.3387,-80.83929%200.0286,-2.50046%204.59241,6.76635%2011.02325,22.38274%2019.88191,48.28039%2034.75027,73.07857%2058.34658,97.31322%2015.8845,16.31422%2016.29817,15.91987%20-11.67735,11.13022%20-9.54953,-1.63492%20-17.36277,-2.40165%20-17.36277,-1.70377%200,2.11672%2016.34265,20.11162%2026.64984,29.34412%2012.89487,11.55045%2022.33194,17.8401%2043.60883,29.06438%20l%2017.76656,9.37245%20-10.49842,-0.2676%20c%20-21.47428,-0.54743%20-26.12199,-0.0345%20-25.55691,2.82195%201.44676,7.3131%2049.80084,30.14617%2074.81874,35.32987%2014.91483,3.0903%2097.71609,5.62673%2097.71609,2.99325%200,-0.8352%20-8.17665,-4.33087%20-18.17032,-7.76812%20-20.41352,-7.02105%20-50.05155,-18.48203%20-51.28079,-19.83015%20-1.56582,-1.7172%20231.46431,1.75597%20254.94119,3.7998%20l%2010.24725,0.89205%20-0.99818,5.32072%20c%20-0.77887,4.15148%20-0.38377,5.55645%201.79775,6.3936%201.53773,0.5901%2013.72898,1.51058%2027.09165,2.04563%2014.84428,0.5943%2024.74298,1.6635%2025.44548,2.74852%200.7542,1.1649%2011.8681,1.9206%2032.3029,2.19645%2017.1342,0.2313%2032.7952,0.792%2034.8023,1.24598%20l%203.6493,0.8253%20-3.171,6.21562%20-3.171,6.21555%20-23.8978,0.99578%20c%20-13.1438,0.54772%20-39.161,1.39755%20-57.8159,1.8885%20-18.65485,0.49102%20-62.62713,1.7235%20-97.71603,2.73885%20-35.08897,1.01535%20-150.19492,1.92472%20-255.79107,2.0208%20l%20-191.99294,0.17475%20-3.03639,5.91855%20-3.0364,5.91855%205.25015,0.88035%20c%204.21623,0.70695%20168.59236,7.34212%20181.89016,7.34212%201.98143,0%205.45201,1.99875%207.71243,4.44165%203.64502,3.9393%205.60007,4.5477%2017.28566,5.37968%208.81942,0.62797%201.42731,1.0653%20-22.35733,1.32285%20-19.54322,0.21157%20-46.24707,0.9285%20-59.3419,1.59315%20-21.86374,1.10977%20-24.13757,1.5174%20-27.83344,4.98945%20-2.21356,2.07952%20-4.44953,5.11965%20-4.96883,6.75577%20-0.86297,2.71898%20-3.07029,2.97488%20-25.66412,2.97488%20h%20-24.71996%20l%20-3.3338,7.6719%20c%20-1.83361,4.21957%20-2.83478,8.16075%20-2.22484,8.7582%200.60994,0.59745%2029.0913,1.86487%2063.29193,2.81655%2034.20063,0.9516%2074.53881,2.09227%2089.64039,2.53477%2015.10157,0.4425%2040.29273,0.81038%2055.98035,0.8175%20l%2028.52295,0.0127%20-3.89204,8.06775%20c%20-2.14061,4.4373%20-3.89202,8.75145%20-3.89202,9.58695%200,0.9333%20-54.10138,1.71503%20-140.27016,2.02688%20-115.96037,0.4197%20-140.73285,0.89182%20-142.94006,2.72437%20-1.81521,1.50713%20-2.66991,4.73858%20-2.66991,10.09468%200,4.3329%20-0.4804,7.878%20-1.06757,7.878%20-2.01997,0%20-25.50191,-18.39403%20-39.46907,-30.917%20-7.69395,-6.8985%20-14.3473,-12.18443%20-14.7852,-11.7465%20-2.52978,2.52975%209.30945,46.3824%2017.56819,65.0727%206.7598,15.2979%205.17193,15.2505%20-13.47223,-0.4026%20z'%20id='path26'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.90674,1033.135%20c%20-7.8066,-6.524%20-22.25104,-20.2057%20-32.09877,-30.4037%20-26.52842,-27.47188%20-41.45268,-51.15927%20-69.53606,-110.3654%20-6.81568,-14.36895%20-7.73277,-15.61665%20-8.31024,-11.30595%20-0.56367,4.2078%200.9974,34.55212%203.86374,75.1041%200.81032,11.46405%200.71198,11.94037%20-1.83403,8.8833%20-4.15246,-4.98608%20-27.0801,-52.90725%20-34.38926,-71.87723%20-11.71701,-30.41002%20-22.61203,-74.36265%20-30.22656,-121.93987%20-6.19684,-38.71917%20-2.31858,-38.9243%20-33.10372,1.75103%20-23.58993,31.1685%20-26.66329,34.63642%20-27.13477,30.618%20-1.4012,-11.94233%2012.42671,-106.09146%2025.50009,-173.62054%202.65399,-13.70885%204.57641,-25.17422%204.27206,-25.47856%20-0.30435,-0.30436%20-9.79544,6.07332%20-21.09133,14.1726%20-11.29588,8.09929%20-20.91138,14.35256%20-21.36778,13.89617%20-0.45639,-0.45642%202.50821,-13.41656%206.58801,-28.80033%208.8226,-33.26751%2015.57383,-62.55191%2026.74168,-115.99575%204.5479,-21.76404%208.6147,-40.56042%209.03732,-41.76973%201.16304,-3.32799%20-2.07401,-1.65126%20-24.44534,12.66217%20-11.13746,7.12588%20-20.53056,12.95614%20-20.87355,12.95614%20-0.99523,0%203.21213,-9.45646%2016.94845,-38.0933%207.35481,-15.33296%2013.54247,-26.33734%2014.48256,-25.75634%200.90275,0.55793%2016.37219,-2.03025%2034.37656,-5.7515%2018.00436,-3.72126%2034.57956,-7.0867%2036.83377,-7.47876%203.68765,-0.64137%204.97831,0.77341%2012.87357,14.11157%2019.09755,32.26317%2046.23377,53.21617%2075.52672,58.31732%2015.81538,2.75413%2052.79915,1.00323%2070.63049,-3.34382%2015.84174,-3.862%2042.48172,-14.68738%2041.18612,-16.73631%20-0.44417,-0.70243%203.4334,-3.00081%208.61682,-5.1075%2012.55357,-5.10215%2020.32174,-10.67873%2031.41565,-22.55252%2011.10349,-11.88404%2017.99929,-24.39789%2024.62807,-44.69264%205.66786,-17.3528%208.51669,-22.4367%2012.57267,-22.4367%205.26651,0%2053.17207,12.63006%2072.81097,19.19625%2046.6359,15.59252%2067.99998,31.59987%2067.99998,50.94996%200,5.87573%20-4.9602,20.86274%20-8.51291,25.72137%20-1.87507,2.56429%20-3.01274,2.0578%20-13.32381,-5.93168%20-6.20053,-4.80446%20-15.63457,-11.1973%20-20.96454,-14.20631%20-9.45692,-5.33885%20-10.13921,-5.47092%20-28.26499,-5.47092%20-17.35306,0%20-19.07072,0.29192%20-26.12792,4.4405%20-13.36546,7.85688%20-17.72678,16.94767%20-11.03572,23.003%202.96363,2.68204%204.32476,2.75037%2017.4141,0.87421%2012.33785,-1.76844%2015.56867,-1.69141%2024.64629,0.58763%2012.57708,3.15763%2030.86129,11.91382%2038.97085,18.66289%2016.86241,14.0335%2016.9539,39.42828%200.19189,53.25512%20-7.70637,6.35692%20-14.29376,8.18153%20-29.5232,8.17753%20-23.65665,-0.006%20-44.57757,-5.17232%20-66.40464,-16.39757%20-13.73121,-7.06168%20-17.24539,-10.24759%20-22.70439,-20.5835%20-5.25744,-9.95426%20-7.82324,-11.18998%20-14.0412,-6.76241%20-9.87478,7.03147%20-16.92684,25.2012%20-14.12063,36.38202%201.24325,4.95351%205.03236,5.42304%207.4412,0.9221%200.95084,-1.77666%202.51081,-3.23029%203.4666,-3.23029%200.95577,0%207.82283,3.67555%2015.26013,8.16789%2018.62973,11.25289%2037.95432,19.94175%2052.33951,23.53328%2019.05577,4.75764%2058.68842,4.29182%2079.54989,-0.93498%2019.53945,-4.89557%2021.77319,-3.8436%2015.78938,7.43599%20-7.16056,13.49777%20-27.1821,25.48628%20-50.66392,30.33658%20-22.29678,4.60553%20-38.70991,2.66794%20-94.74475,-11.18469%20l%20-36.34069,-8.98396%20-27.45741,-0.13076%20c%20-37.39344,-0.17808%20-95.3135,1.95784%20-97.96965,3.61286%20-1.60151,0.99787%201.83782,5.37944%2013.1428,16.74338%20l%2015.31194,15.3918%20h%20-5.38796%20c%20-6.53725,0%20-21.01807,-3.52407%20-37.44865,-9.11354%20-11.67772,-3.97261%20-22.59773,-10.70576%20-42.56024,-26.24218%20-5.01093,-3.89991%20-9.44737,-6.75414%20-9.85877,-6.34273%20-0.4114,0.4114%201.47327,7.85418%204.18815,16.53951%202.71488,8.68533%204.53754,16.19011%204.05034,16.67729%20-1.73681,1.73683%20-14.89753,-8.71508%20-30.01029,-23.83339%20-18.42648,-18.43326%20-32.75867,-38.28676%20-41.25072,-57.14211%20-3.4461,-7.65157%20-6.76066,-13.91194%20-7.36569,-13.91194%20-5.7758,0%200.21852,66.18446%207.59279,83.83357%202.5509,6.10514%204.90416,5.351%205.76344,-1.84699%200.44296,-3.71066%202.27818,-1.21173%2011.38798,15.50646%205.97295,10.9615%2015.10916,26.39814%2020.30268,34.30364%2030.03839,45.72409%2093.8346,107.78153%20145.12152,141.16625%2019.83202,12.90945%2020.59075,12.47587%20-15.15369,8.65957%20-13.61242,-1.45327%20-25.2727,-2.115%20-25.91175,-1.4703%20-2.81076,2.83538%2023.53185,19.05855%2062.63621,38.57475%2014.65741,7.3152%2031.73754,14.93483%2037.95583,16.93245%2021.30064,6.84285%2076.71925,14.31023%2076.71925,10.33755%200,-0.92137%20-4.67758,-4.24635%20-10.39462,-7.38885%20-5.71704,-3.1425%20-17.89117,-10.659%20-27.05363,-16.70347%20l%20-16.65901,-10.98983%2032.30284,-0.9279%20c%2017.76656,-0.51037%2032.50669,-1.05547%2032.75584,-1.21132%200.24916,-0.15593%20-3.08889,-5.55285%20-7.41791,-11.99325%20-12.10443,-18.0081%20-39.06663,-66.11874%20-39.06663,-69.70947%200,-0.40854%205.5189,1.8071%2012.26422,4.92363%206.74534,3.11652%2012.69848,5.23218%2013.22921,4.70145%200.53073,-0.53073%20-0.71994,-5.49006%20-2.77926,-11.02073%20-9.47474,-25.44606%20-21.20331,-71.73674%20-21.02718,-82.99085%200.0479,-3.05516%203.02501,2.70487%208.89671,17.21269%2019.88198,49.12443%2037.03146,78.10646%2060.45011,102.15865%2015.6678,16.09163%2015.79408,15.9078%20-8.04328,11.70885%20-18.30781,-3.22492%20-21.58527,-3.18735%20-19.67543,0.22538%202.91803,5.21422%2030.35863,31.76392%2039.8647,38.57047%205.32998,3.81638%2018.04922,11.35448%2028.26499,16.75125%20l%2018.57413,9.81248%20-18.17034,0.027%20c%20-20.54908,0.0308%20-22.60803,1.5063%20-11.94513,8.56267%2019.21989,12.7191%2053.72859,26.9868%2072.91674,30.14753%2016.36296,2.69542%2094.93546,4.20202%2092.66604,1.7769%20-1.00088,-1.06958%20-10.8129,-5.08695%20-21.80445,-8.92755%20-20.58161,-7.19145%20-45.28114,-16.7358%20-46.53901,-17.9835%20-1.80846,-1.79385%20233.9217,1.41262%20254.60281,3.4632%20l%2010.00417,0.99187%200.49425,5.9379%200.49418,5.9379%2010.49842,1.02263%20c%205.7741,0.56242%2017.52428,1.10752%2026.11145,1.21132%2010.9152,0.132%2015.815,0.79628%2016.2843,2.2077%200.4994,1.5024%208.696,2.13045%2032.0336,2.4546%2017.2493,0.23955%2033.0046,0.80025%2035.0117,1.2459%20l%203.6493,0.8103%20-3.1903,6.25335%20-3.1902,6.25335%20-24.6862,1.02623%20c%20-112.03955,4.65727%20-323.62096,7.86487%20-465.35126,7.05472%20-112.32978,-0.64207%20-135.7751,-0.40222%20-137.58505,1.40775%20-2.70468,2.70465%20-4.6481,8.52195%20-3.29802,9.87203%201.15391,1.15387%2029.71501,2.79607%2075.2012,4.3239%2017.3224,0.58185%2047.12177,1.73947%2066.22083,2.57265%2019.09905,0.8331%2037.48581,1.52167%2040.85945,1.53007%204.58675,0.0113%207.15975,1.1223%2010.201,4.40385%203.5788,3.8616%205.65408,4.5102%2017.28565,5.40293%209.51868,0.7305%203.72491,1.10527%20-20.69942,1.33882%20-18.65489,0.17843%20-45.39718,0.921%20-59.42732,1.65023%20-23.39411,1.21597%20-25.836,1.63275%20-29.44859,5.02657%20-2.16657,2.03543%20-4.3641,5.0394%20-4.8834,6.67553%20-0.86294,2.7189%20-3.07003,2.97487%20-25.65469,2.97487%20h%20-24.71052%20l%20-3.3429,8.04383%20c%20-1.83858,4.42417%20-2.844,8.34367%20-2.23425,8.71005%200.60972,0.36637%2030.90798,1.4709%2067.32943,2.45437%2036.42145,0.98355%2076.39622,2.14658%2088.83281,2.58458%2012.43659,0.43792%2035.81072,0.80145%2051.9425,0.80775%20l%2029.33052,0.0113%20-3.89204,8.06775%20c%20-2.14061,4.4373%20-3.89202,8.745%20-3.89202,9.57262%200,0.91403%20-54.69327,1.70978%20-139.30599,2.02688%20-109.74758,0.41122%20-140.07708,0.96247%20-142.94006,2.59777%20-3.00198,1.71465%20-3.63408,3.47055%20-3.63408,10.0946%200,4.4104%20-0.5451,8.0119%20-1.21135,8.0034%20-2.07255,-0.026%20-22.27357,-15.74675%20-37.47353,-29.16147%20-7.98729,-7.04918%20-14.90656,-12.81668%20-15.37614,-12.81668%20-3.57895,0%203.95039,32.10655%2013.02636,55.54705%207.52138,19.4255%207.78659,20.3645%205.75123,20.3645%20-0.95822,0%20-8.12942,-5.3378%20-15.93601,-11.8618%20z'%20id='path27'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20394.64346,1038.305%20c%20-4.7435,-3.6806%20-19.18924,-17.3083%20-32.10166,-30.2839%20-31.75892,-31.9144%20-46.73839,-54.48453%20-71.1309,-107.1757%20-5.65451,-12.2145%20-10.84748,-22.20818%20-11.53993,-22.20818%20-1.79586,0%20-1.50125,12.36465%201.17375,49.2618%201.28805,17.7666%202.33472,34.1199%202.32594,36.34073%20-0.0157,3.9633%20-0.0626,3.97822%20-2.54276,0.8076%20-3.89211,-4.9758%20-26.99195,-53.05965%20-33.75276,-70.25873%20-11.29309,-28.72875%20-23.15712,-76.1793%20-29.88365,-119.52045%20-4.19241,-27.01302%20-6.04745,-34.30107%20-8.53001,-33.51261%20-1.05782,0.33594%20-13.18893,15.40169%20-26.95801,33.47939%20-22.53804,29.59065%20-25.08882,32.4066%20-25.57742,28.23645%20-1.37104,-11.70195%2012.4518,-105.46727%2026.1823,-177.60389%202.02902,-10.65994%203.06964,-19.62955%202.3125,-19.93248%20-0.75714,-0.30293%20-10.12385,5.77222%20-20.81491,13.50032%20-10.69106,7.72811%20-19.83995,13.64945%20-20.33087,13.15855%20-0.49092,-0.49093%202.0778,-12.01718%205.70827,-25.6139%208.76787,-32.83726%2014.43756,-57.10197%2024.45737,-104.67085%204.58434,-21.76404%209.31322,-43.8084%2010.50862,-48.98747%202.65356,-11.49649%204.02897,-11.8204%20-22.67234,5.33937%20-11.0918,7.12822%20-20.48989,12.9604%20-20.88465,12.9604%20-1.08908,0%202.78698,-8.76761%2016.605,-37.56033%20l%2012.59186,-26.23778%205.98744,-0.4052%20c%203.29308,-0.22285%2018.51133,-2.99545%2033.81833,-6.16132%2015.30699,-3.16586%2030.03314,-6.14163%2032.72477,-6.61281%204.71369,-0.82516%205.21915,-0.30255%2013.72871,14.19473%2012.97643,22.10725%2030.54794,39.21318%2050.23933,48.90817%2017.68471,8.70702%2026.58487,10.64426%2048.90248,10.64426%2030.01418,0%2049.86573,-3.85409%2076.45643,-14.84366%206.44038,-2.66172%2011.70978,-5.74684%2011.70978,-6.85582%200,-1.10899%202.78135,-2.84965%206.18077,-3.86815%2016.02206,-4.80032%2038.70489,-25.2189%2048.37305,-43.54435%202.67607,-5.07232%207.12404,-16.07504%209.88438,-24.45047%205.83551,-17.70615%208.72575,-22.72777%2013.08121,-22.72777%205.3466,0%2052.57536,12.52681%2073.25738,19.43057%2027.132,9.05678%2045.15088,18.09103%2055.38212,27.76732%2013.35092,12.62675%2015.03271,23.67357%206.45614,42.40725%20-3.92609,8.57574%20-4.50148,9.13657%20-7.28013,7.09617%20-35.65917,-26.18505%20-39.57589,-27.88692%20-61.8195,-26.86131%20-13.17449,0.60745%20-16.70685,1.38088%20-22.91022,5.0163%20-12.62298,7.39756%20-17.2236,17.02438%20-10.87959,22.76563%202.8452,2.57486%204.4113,2.65361%2017.4204,0.87583%2012.3547,-1.68836%2015.71076,-1.59258%2024.73494,0.70588%2013.65264,3.47733%2029.56041,10.9755%2038.0583,17.93889%2017.76072,14.55357%2018.27412,39.77118%201.09815,53.93949%20-7.70637,6.35692%20-14.29376,8.18153%20-29.52321,8.17752%20-22.34001,-0.006%20-43.82109,-5.02919%20-63.79811,-14.91904%20-14.20609,-7.03291%20-19.71976,-11.73419%20-25.24606,-21.52622%20-2.7183,-4.81657%20-5.57847,-9.15054%20-6.35592,-9.63103%20-2.59506,-1.60384%20-10.5538,3.80633%20-14.96653,10.1739%20-7.56368,10.9144%20-9.91319,32.69332%20-3.52694,32.69332%201.28431,0%203.11307,-1.45363%204.06391,-3.23028%200.95083,-1.77666%202.5108,-3.23029%203.4666,-3.23029%200.95577,0%207.73457,3.62223%2015.06399,8.0494%2034.9299,21.09867%2052.24549,26.2626%2088.87635,26.50508%2022.06143,0.14604%2028.27243,-0.39982%2042.45252,-3.73098%2020.40771,-4.79416%2022.50707,-3.85796%2016.54605,7.37868%20-7.16056,13.49777%20-27.1821,25.48627%20-50.66392,30.33658%20-22.6708,4.68278%20-37.21016,2.96845%20-94.68125,-11.16384%20l%20-36.27723,-8.92066%20-39.63444,0.12085%20c%20-45.20353,0.13782%20-84.87837,1.7834%20-86.69061,3.59564%20-0.67752,0.67752%205.63548,8.19975%2014.02887,16.71609%20l%2015.2607,15.48424%20-9.79073,-0.94289%20c%20-5.38492,-0.51859%20-17.74075,-3.54292%20-27.45742,-6.72072%20-17.7747,-5.81314%20-26.41375,-10.83384%20-48.31263,-28.07753%20-4.95395,-3.90086%20-9.32259,-6.77705%20-9.70809,-6.39155%20-0.3855,0.38548%201.50437,7.82307%204.19971,16.52793%202.69534,8.70486%204.49603,16.23162%204.00153,16.72613%20-1.74935,1.74934%20-14.86698,-8.65793%20-30.0236,-23.8201%20-18.42648,-18.43326%20-32.75866,-38.28676%20-41.25071,-57.14211%20-3.4461,-7.65157%20-6.74865,-13.91194%20-7.33902,-13.91194%20-5.64699,0%200.29111,66.42203%207.47525,83.61609%202.68685,6.43053%205.55881,5.53881%205.61353,-1.74297%200.0352,-4.69205%200.6348,-4.06839%206.6905,6.95968%2023.32739,42.48166%2037.07501,61.97819%2065.59423,93.02401%2032.05969,34.89999%2069.10716,67.21681%20102.73751,89.61871%2022.10679,14.72588%2022.83439,14.19765%20-14.05448,10.20398%20-13.16,-1.42478%20-24.42561,-2.08755%20-25.0347,-1.47285%20-4.14562,4.18372%2072.40468,46.17225%20100.1664,54.94215%2021.98,6.9435%2077.19935,14.83065%2077.19935,11.02665%200,-0.80423%20-4.906,-4.27478%20-10.90221,-7.71233%20-5.99621,-3.43755%20-18.17035,-11.04225%20-27.05363,-16.89922%20l%20-16.15142,-10.6491%2032.30284,-0.96075%20c%2017.76656,-0.52838%2032.50669,-1.07355%2032.75584,-1.21133%200.24915,-0.13785%20-3.08704,-5.52%20-7.41375,-11.9604%20-13.28218,-19.77075%20-39.0708,-65.70951%20-39.0708,-69.59913%200,-0.46922%205.51891,1.69677%2012.26423,4.81329%206.74533,3.11653%2012.63151,5.29917%2013.08037,4.85029%200.44888,-0.44888%20-2.21172,-9.74389%20-5.91247,-20.65558%20-8.07961,-23.82292%20-15.6985,-54.29993%20-17.01589,-68.0668%20l%20-0.95978,-10.02976%209.04995,21.80442%20c%2020.87798,50.30218%2036.80965,77.1847%2060.24898,101.662%2015.9925,16.70062%2016.26843,16.31647%20-8.6671,12.06607%20-23.18276,-3.95167%20-23.25882,-3.71647%20-4.89233,15.1272%2019.38873,19.89248%2029.11617,27.17273%2053.85477,40.30628%20l%2018.9682,10.07002%20-17.26745,0.0248%20c%20-26.0784,0.0367%20-25.31144,2.77718%205.15389,18.4128%2020.2039,10.36913%2036.94083,16.59293%2052.92135,19.67925%2014.75334,2.84933%2094.05659,5.20148%2094.05659,2.7897%200,-0.90847%20-6.72308,-4.02217%20-14.94008,-6.91935%20-8.21704,-2.89717%20-23.66184,-8.62942%20-34.32177,-12.73837%20l%20-19.38171,-7.47075%2029.88013,-0.51803%20c%2035.1584,-0.6096%20220.94368,2.64165%20229.75393,4.02068%205.58945,0.87495%206.05677,1.36095%206.05677,6.29932%200,2.94323%200.58793,5.71463%201.3065,6.1587%200.71858,0.44408%2012.52928,1.31993%2026.2461,1.94625%2015.20098,0.69405%2025.38918,1.83503%2026.09118,2.92193%200.7511,1.16302%2012.9231,2.064%2035.0001,2.59072%2018.6167,0.44415%2034.1989,1.17098%2034.6272,1.61513%200.4283,0.44415%20-0.4269,3.35145%20-1.9005,6.46057%20l%20-2.6791,5.65298%20-16.1407,1.04745%20c%20-17.8686,1.15957%20-119.67913,3.8643%20-234.99238,6.24292%20-41.3073,0.85208%20-142.83829,1.55903%20-225.62453,1.57103%20l%20-150.52039,0.0217%20-2.5143,3.58965%20c%20-3.96019,5.65395%20-3.03588,7.4481%204.35006,8.44372%203.77539,0.50895%2036.66372,1.9992%2073.08517,3.3117%20111.61634,4.0221%20108.97615,3.82065%20113.45983,8.6586%203.32682,3.58973%205.64895,4.293%2017.06924,5.16945%209.80166,0.75218%205.07729,1.08578%20-18.2767,1.29053%20-33.46061,0.2934%20-64.84046,1.41667%20-78.65488,2.81565%20-8.87728,0.89902%20-15.74845,4.98082%20-17.45945,10.37167%20-0.94933,2.99108%20-2.53924,3.18818%20-25.72239,3.18818%20h%20-24.71052%20l%20-3.35299,8.06812%20-3.35299,8.0682%203.54143,0.7488%20c%204.38094,0.92625%20100.29216,3.71363%20177.36605,5.1546%20l%2057.53441,1.07565%20-4.23472,9.38573%20-4.23471,9.3858%20-110.78209,0.0533%20c%20-128.79092,0.0622%20-168.64271,1.09687%20-172.01252,4.4667%20-1.27467,1.2747%20-2.27795,5.42827%20-2.27795,9.43065%200,3.9341%20-0.54511,7.1458%20-1.21135,7.1373%20-2.07255,-0.026%20-22.27357,-15.7467%20-37.47353,-29.16143%20-7.9873,-7.04917%20-14.90656,-12.81667%20-15.37615,-12.81667%20-3.59614,0%205.27094,36.4268%2014.34465,58.9292%203.18912,7.9089%205.7984,14.9654%205.7984,15.6811%200,2.6144%20-3.1254,1.1576%20-11.56474,-5.3906%20z'%20id='path28'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20503.11672,187.27227%20c%20-1.77666,-0.8144%20-6.78374,-2.96315%20-11.12684,-4.775%20l%20-7.89655,-3.2943%2014.35712,-9.60149%20c%2019.54034,-13.06783%2025.59224,-18.37411%2024.42505,-21.41575%20-0.96653,-2.51874%20-24.72686,-8.89173%20-46.40862,-12.4477%20-5.77413,-0.947%20-12.90745,-2.11783%20-15.85181,-2.60183%20l%20-5.35338,-0.88002%2019.08209,-19.74506%20c%2025.66613,-26.55785%2046.37215,-50.869471%2072.32345,-84.917308%2022.60993,-29.6640009%2030.6859,-38.695279%2032.7481,-36.6218328%200.67551,0.6791993%201.19223,14.7990829%201.14825,31.3775198%20-0.11293,42.575415%20-3.88296,59.355876%20-21.64977,96.363431%20-9.22505,19.21544%20-25.63038,45.4558%20-38.624,61.77918%20-6.90117,8.66968%20-10.2052,9.97415%20-17.17309,6.78016%20z'%20id='path29'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20503.11672,187.27227%20c%20-1.77666,-0.8144%20-6.77642,-2.96003%20-11.11058,-4.76804%20l%20-7.88029,-3.28731%2013.70567,-9.25515%20c%2019.06463,-12.87393%2026.09762,-19.03029%2025.00195,-21.88557%20-0.92122,-2.40067%20-25.25316,-8.87541%20-46.36659,-12.33817%20-5.77413,-0.947%20-12.89745,-2.11595%20-15.8296,-2.59767%20l%20-5.33117,-0.87584%2019.7232,-20.5045%20c%2024.83789,-25.821803%2048.95643,-54.254427%2073.8009,-87.00169%2020.31146,-26.7723387%2028.53003,-35.851556%2030.58512,-33.7879767%202.09801,2.1066846%201.25978,59.0228027%20-1.06068,72.0201827%20-6.12617,34.314014%20-29.50356,81.621134%20-58.06484,117.501574%20-6.90117,8.66968%20-10.2052,9.97415%20-17.17309,6.78016%20z'%20id='path30'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20228.27904,282.11436%20c%20-1.44814,-2.81463%20-11.22728,-19.08539%20-21.73142,-36.15725%20-30.88963,-50.20341%20-35.29103,-60.83016%20-38.63721,-93.2857%20-3.58807,-34.80175%200.36444,-57.80064%2019.21411,-111.803153%2013.59443,-38.9467823%2029.25103,-78.016522%2031.26393,-78.016522%208.56988,0%2025.15062,20.268363%2037.65657,46.0315455%2020.89258,43.0402645%2026.98583,87.5520715%2021.03345,153.6514395%20-1.50938,16.7611%20-2.50862,34.83562%20-2.22054,40.1656%20l%200.52377,9.69084%2013.83153,-18.57413%20c%2020.54491,-27.58942%2036.09656,-45.50827%2057.47258,-66.22081%2018.52345,-17.94851%2029.64227,-26.42877%2029.64227,-22.60799%200,0.99098%200.72681,1.35258%201.61514,0.80357%200.88833,-0.54902%201.61514,-0.2451%201.61514,0.67537%200,3.6675%20-8.67123,24.48838%20-17.01804,40.86275%20-4.85333,9.52104%20-8.82423,17.65647%20-8.82423,18.07874%200,0.42226%205.2694,-1.42751%2011.70978,-4.11062%2016.75389,-6.97979%2030.08651,-9.42211%2051.28075,-9.39381%2023.17104,0.031%2039.5261,2.0662%2042.78403,5.32413%202.81125,2.81127%202.64872,2.92491%20-26.35088,18.42527%20l%20-15.06213,8.05072%2015.06213,3.6831%20c%2020.25559,4.953%2049.32928,15.03395%2062.47051,21.66087%2012.56936,6.33853%2028.30084,17.64079%2040.15513,28.84939%208.17772,7.7323%2021.45856,23.77646%2021.45856,25.92341%200,0.58419%20-3.77122,1.06216%20-8.38052,1.06216%20-6.7759,0%20-11.95579,-1.67929%20-27.05362,-8.77066%20-25.24224,-11.85612%20-43.36088,-18.99042%20-46.63012,-18.36084%20-1.89362,0.36469%200.43987,3.10488%207.78066,9.1367%205.76702,4.73869%2012.81059,11.08947%2015.65237,14.11285%20l%205.16685,5.49709%20H%20393.19179%20282.62396%20l%20-25.85596,10.36673%20-25.85596,10.36671%20z%20m%2015.48382,-43.86107%20c%207.19769,-23.30343%209.00686,-43.4218%209.00686,-100.15866%200,-46.384187%20-0.39193,-54.976157%20-3.02068,-66.220813%20-5.74607,-24.579125%20-18.6037,-56.589984%20-22.24295,-55.376901%20-3.98574,1.328581%20-23.71626,56.299694%20-31.56252,87.936154%20-3.57235,14.40391%20-4.31775,20.9484%20-4.20183,36.89185%200.16898,23.24349%203.55217,37.73915%2013.91266,59.61037%2011.15909,23.55707%2027.70312,47.79657%2032.62227,47.79657%201.35907,0%203.53097,-4.14831%205.48619,-10.47857%20z'%20id='path31'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.95185,278.2245%20c%20-2.89803,-5.11685%20-12.69915,-21.35978%20-21.78024,-36.09542%20-28.13589,-45.6553%20-32.97681,-57.60144%20-36.26473,-89.49196%20-4.12031,-39.96407%201.38247,-65.625413%2030.82635,-143.7538395%2016.19008,-42.9598705%2017.61266,-46.0315455%2021.31863,-46.0315455%204.76041,0%2020.42614,17.207768%2028.44076,31.2402954%2014.11699,24.7169966%2022.73403,49.8284516%2028.56481,83.2425616%203.08144,17.658593%203.01958,53.735568%20-0.14983,87.388018%20-1.38158,14.66945%20-2.2901,31.396%20-2.01893,37.17014%20l%200.49303,10.49841%2013.8308,-18.57413%20c%2020.34702,-27.32512%2035.96513,-45.36145%2057.48694,-66.38791%2018.11296,-17.69605%2029.62864,-26.39871%2029.62864,-22.39105%200,0.96357%200.72681,1.30274%201.61514,0.75373%200.88833,-0.54902%201.61514,-0.13692%201.61514,0.91578%200,3.62703%20-11.77655,31.41629%20-18.94807,44.71197%20-3.95301,7.32871%20-6.37262,13.32493%20-5.37694,13.32493%200.9957,0%206.28514,-1.88341%2011.7543,-4.18535%2014.86544,-6.25677%2028.9799,-8.68019%2050.52654,-8.67527%2023.0616,0.005%2038.63215,2.00021%2042.015,5.38305%202.77698,2.77699%201.9899,3.32688%20-26.37859,18.42977%20l%20-15.0513,8.01304%2015.0513,3.68039%20c%2020.24572,4.95057%2049.32097,15.03255%2062.45968,21.65821%2012.56936,6.33853%2028.30084,17.64079%2040.15513,28.84939%208.17772,7.7323%2021.45856,23.77646%2021.45856,25.92341%200,0.58419%20-3.77122,1.06216%20-8.38052,1.06216%20-6.7759,0%20-11.95579,-1.67929%20-27.05362,-8.77066%20-25.04872,-11.76522%20-43.35484,-18.99159%20-46.55101,-18.37607%20-1.76197,0.33933%201.59447,4.09943%2010.20337,11.43043%2023.09925,19.67041%2035.48347,17.33144%20-91.76552,17.33144%20H%20282.86385%20l%20-24.73792,9.85413%20c%20-13.60585,5.41975%20-25.22549,10.15138%20-25.82141,10.51472%20-0.59593,0.36333%20-3.45462,-3.52592%20-6.35267,-8.64277%20z%20m%2014.3691,-31.51157%20c%202.18088,-2.62791%207.698,-24.57044%2010.05109,-39.97476%201.01772,-6.66246%202.22089,-33.55458%202.67371,-59.76025%200.91233,-52.79793%20-0.49195,-68.42364%20-8.41887,-93.678236%20-5.10453,-16.262673%20-14.43467,-37.148264%20-16.5951,-37.148264%20-3.78003,0%20-24.03027,55.922973%20-32.16721,88.83281%20-5.44881,22.03769%20-5.68252,49.08675%20-0.59105,68.40801%205.55177,21.0681%2020.94346,50.91666%2035.30992,68.47527%206.05096,7.39544%207.16234,7.94848%209.73751,4.84542%20z'%20id='path32'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.91966,278.2245%20c%20-2.91576,-5.11685%20-12.68703,-21.29579%20-21.71396,-35.95321%20-27.81868,-45.17041%20-32.84227,-57.43972%20-36.28026,-88.60866%20-4.31068,-39.08084%200.57744,-62.955935%2028.31901,-138.318781%2015.76612,-42.830301%2020.13128,-52.492114%2023.7157,-52.492114%201.69579,0%206.64633,3.563068%2011.00119,7.917929%2020.81909,20.8190882%2038.37067,61.168896%2046.00293,105.757358%203.17123,18.52665%203.14815,53.352918%20-0.0588,88.787408%20-1.38276,15.27838%20-2.29128,32.07057%20-2.01893,37.31596%20l%200.49518,9.53709%2013.97873,-18.62793%20c%2020.87748,-27.82113%2036.03158,-45.29341%2057.33901,-66.11043%2018.11297,-17.69605%2029.62864,-26.39871%2029.62864,-22.39105%200,0.96357%200.72681,1.30274%201.61514,0.75373%200.88833,-0.54902%201.61514,-0.2451%201.61514,0.67537%200,3.5727%20-8.55377,24.31355%20-16.51909,40.05479%20-4.59292,9.07666%20-7.96509,16.8887%20-7.49371,17.3601%200.47139,0.47138%205.50311,-1.0308%2011.18161,-3.33818%2015.53151,-6.31102%2029.33609,-8.66493%2050.78702,-8.66002%2023.0616,0.005%2038.63215,2.00021%2042.015,5.38305%202.7988,2.79879%201.22108,3.90331%20-26.37726,18.46611%20l%20-15.04995,7.94141%2014.24239,3.52446%20c%2048.11451,11.90659%2076.14711,25.49562%20102.03285,49.46125%208.92089,8.25918%2022.84676,24.81471%2022.84676,27.16098%200,0.58419%20-3.72581,1.06216%20-8.27957,1.06216%20-6.78677,0%20-12.68376,-1.99932%20-32.70663,-11.08888%20-29.65475,-13.46207%20-39.47294,-17.20799%20-41.01825,-15.64965%20-0.64645,0.65189%202.45871,4.20919%206.90035,7.9051%204.44164,3.69593%2011.34637,9.79198%2015.34384,13.54678%20l%207.26814,6.82691%20-110.91295,0.0374%20-110.91297,0.0374%20-24.75896,9.8784%20c%20-13.61743,5.43311%20-25.24654,10.16474%20-25.84246,10.51472%20-0.59593,0.34997%20-3.46911,-3.55019%20-6.38486,-8.66704%20z%20m%2015.83841,-34.45733%20c%203.20315,-6.57343%208.51482,-35.71998%2010.1865,-55.89606%202.13052,-25.71405%202.04064,-83.52177%20-0.15776,-101.461015%20-0.97975,-7.994955%20-3.48805,-20.427851%20-5.57398,-27.628662%20-4.64536,-16.036115%20-15.38883,-41.362255%20-17.89247,-42.178871%20-3.51689,-1.147102%20-22.00549,48.803883%20-31.5175,85.151378%20-11.30787,43.20988%20-4.33173,82.06315%2022.08718,123.01339%2010.49573,16.26878%2016.96286,24.2168%2019.13132,23.51217%201.00497,-0.32656%202.68649,-2.35711%203.73671,-4.51233%20z'%20id='path33'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20213.9434,258.721%20c%20-41.11641,-67.34973%20-44.85892,-76.77368%20-46.9419,-118.20365%20-1.64492,-32.71712%204.70636,-59.582765%2030.35582,-128.403785%2014.76011,-39.603368%2019.05321,-49.26183%2021.89646,-49.26183%2012.89751,0%2039.99838,43.8880295%2050.36621,81.564669%2010.44501,37.957078%2012.11915,65.889846%207.28275,121.511276%20-1.38426,15.9197%20-2.29278,32.83697%20-2.01894,37.59395%20l%200.4979,8.64906%2014.40394,-19.27146%20c%2019.74057,-26.41152%2036.02655,-45.10811%2057.742,-66.28887%2018.98709,-18.51957%2026.60988,-23.97819%2030.29999,-21.69756%203.01588,1.8639%20-1.11522,13.86272%20-13.23729,38.44788%20-5.37011,10.89127%20-9.4092,20.15694%20-8.97576,20.59038%200.43342,0.43344%205.43409,-1.0998%2011.11259,-3.40718%2015.53151,-6.31102%2029.33609,-8.66493%2050.78702,-8.66002%2022.90253,0.005%2038.62837,1.99641%2041.94266,5.3107%202.90905,2.90905%202.6267,3.11654%20-22.44054,16.49026%20-20.25918,10.80856%20-21.08847,9.29673%209.57358,17.45321%2035.07759,9.33107%2058.42868,20.66613%2080.24658,38.95322%2011.46606,9.61048%2030.38751,30.54031%2030.38751,33.61291%200,0.90718%20-4.20717,1.25873%20-10.09464,0.84353%20-7.85826,-0.55419%20-13.85175,-2.50383%20-27.05363,-8.80033%20-24.10549,-11.49689%20-43.34219,-19.12652%20-44.72853,-17.74017%20-0.65373,0.65371%202.41974,4.2346%206.82991,7.9575%204.41017,3.7229%2011.28915,9.84915%2015.28663,13.61388%20l%207.26814,6.84497%20-110.70734,0.0374%20-110.70733,0.0374%20-18.50403,7.44437%20c%20-10.1772,4.09442%20-21.86284,8.77122%20-25.96807,10.39292%20l%20-7.46406,2.94856%20z%20m%2027.40139,-14.60459%20c%201.31271,-2.5385%203.86923,-11.89015%205.68116,-20.78145%207.72113,-37.88822%208.76702,-123.708148%201.8725,-153.647239%20-4.93556,-21.432402%20-17.55455,-53.536302%20-21.04337,-53.536302%20-3.67405,0%20-27.92793,69.078191%20-33.19355,94.539571%20-5.91022,28.57824%20-2.61229,58.65362%209.50505,86.68086%208.38508,19.39456%2029.44608,51.36001%2033.83943,51.36001%200.52362,0%202.02607,-2.07695%203.33878,-4.61545%20z'%20id='path34'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20218.40499,266.03407%20c%20-7.01141,-11.73703%20-16.99395,-28.24479%20-22.18343,-36.68391%20-13.50569,-21.96294%20-22.7646,-42.4852%20-25.74296,-57.05896%20-4.08742,-20.00063%20-4.90289,-49.26185%20-1.88342,-67.58275%203.63007,-22.02584%2025.06482,-86.641794%2042.90516,-129.339365%205.96937,-14.286602%207.60738,-15.028009%2016.67984,-7.549726%2020.24257,16.685633%2041.57802,64.241259%2048.85707,108.899881%203.06914,18.82986%203.01885,51.9801%20-0.13619,89.78968%20-1.38518,16.59971%20-2.2937,33.66516%20-2.01893,37.92324%20l%200.49957,7.74196%2014.40394,-19.27318%20c%2019.73725,-26.40941%2036.0237,-45.10704%2057.742,-66.29058%2018.98709,-18.51957%2026.60988,-23.97819%2030.29999,-21.69756%202.94712,1.82142%20-0.97853,13.38079%20-13.00807,38.30319%20-5.21858,10.8117%20-9.48833,20.01486%20-9.48833,20.45148%200,0.4366%207.44984,-1.81117%2016.5552,-4.99509%2015.2567,-5.33489%2018.32878,-5.84352%2039.16719,-6.48484%2024.71817,-0.7607%2045.19989,1.34221%2048.87591,5.01823%202.05404,2.05406%200.96106,3.15715%20-8.72763,8.80842%20-6.09165,3.55317%20-15.2549,8.50653%20-20.36278,11.00747%20-5.10789,2.50095%20-9.28707,5.0662%20-9.28707,5.70059%200,1.34251%204.59383,2.84798%2026.51752,8.69022%2040.06448,10.67642%2070.76821,27.78235%2093.05193,51.84191%208.52148,9.20059%2016.10247,18.97346%2016.10247,20.75816%200,0.68587%20-4.54258,0.92053%20-10.09464,0.52145%20-8.11143,-0.58306%20-14.3707,-2.72431%20-31.86018,-10.89913%20-23.37486,-10.92572%20-38.77204,-16.7776%20-40.25157,-15.29808%20-0.50559,0.5056%202.33921,3.58396%206.32179,6.84081%203.98258,3.25686%2010.87514,9.37071%2015.31678,13.58635%20l%208.07571,7.66481%20-110.70734,0.0348%20-110.70733,0.0348%20-18.50403,7.44436%20c%20-10.1772,4.09442%20-21.91414,8.79145%20-26.08209,10.43787%20l%20-7.57806,2.99349%20z%20m%2025.37895,-29.46418%20c%206.61272,-21.4095%208.74982,-45.13157%208.87153,-98.47526%200.096,-42.057138%20-0.34117,-52.178245%20-2.73173,-63.24782%20-3.68983,-17.085913%20-9.49783,-34.758778%20-15.82198,-48.143869%20-4.0694,-8.612884%20-5.48383,-10.339363%20-7.26176,-8.863813%20-4.8433,4.019587%20-27.44034,69.560457%20-32.36864,93.882632%20-3.7172,18.34517%20-2.46943,50.90481%202.55811,66.75143%205.18096,16.33018%2014.70574,35.55615%2025.92312,52.3263%209.3499,13.97826%2013.78336,18.5494%2016.41389,16.92365%200.66112,-0.4086%202.64897,-5.42756%204.41746,-11.15325%20z'%20id='path35'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20226.63084,279.7824%20c%20-2.43246,-4.19705%20-12.01412,-19.98682%20-21.29258,-35.08839%20-21.2355,-34.5628%20-31.51457,-55.94693%20-34.937,-72.68139%20-4.07527,-19.92665%20-4.85006,-48.81854%20-1.80488,-67.30417%203.62781,-22.022442%2025.06106,-86.63565%2042.90396,-129.339365%206.51736,-15.598117%208.4567,-15.887875%2020.8444,-3.114389%2020.51758,21.1565375%2037.73813,61.561499%2044.81358,105.147066%202.95555,18.206535%202.85935,52.437898%20-0.25171,89.568468%20-1.38212,16.49562%20-2.29064,33.40783%20-2.01892,37.58267%20l%200.49401,7.59061%2013.72871,-18.44772%20c%2025.74433,-34.59355%2069.08728,-81.03407%2081.73161,-87.5727%2011.87622,-6.141438%2010.44711,2.75931%20-6.01342,37.45253%20-5.22356,11.0095%20-9.49737,20.179%20-9.49737,20.37667%200,0.19767%207.44984,-2.26878%2016.5552,-5.48099%20l%2016.55521,-5.84038%20h%2031.49527%20c%2024.78569,0%2032.51783,0.51611%2036.29529,2.42271%202.64,1.33249%204.76265,3.14952%204.71699,4.03785%20-0.0457,0.88833%20-6.92996,5.38316%20-15.29843,9.98851%20-8.36849,4.60533%20-17.31261,9.53402%20-19.87583,10.95263%20-2.56323,1.4186%20-4.2907,2.94899%20-3.83883,3.40086%200.45187,0.45185%2010.90741,3.65486%2023.23454,7.11775%2045.52284,12.78818%2071.90058,27.18743%2095.15333,51.94292%208.72669,9.29068%2016.9,19.60656%2016.9,21.33023%200,0.58241%20-3.81577,1.05538%20-8.47949,1.05108%20-6.6553,-0.006%20-11.95414,-1.60894%20-24.63091,-7.45042%20-21.59185,-9.94957%20-47.77077,-20.41348%20-48.7132,-19.47106%20-0.41836,0.41838%202.35308,3.55965%206.15876,6.98064%203.80566,3.42098%2010.5764,9.65664%2015.04606,13.85704%20l%208.12667,7.63709%20-110.70734,0.0348%20-110.70733,0.0348%20-18.50403,7.44436%20c%20-10.1772,4.09442%20-21.93654,8.80028%20-26.13185,10.45748%20l%20-7.62784,3.01311%20z%20m%2018.71441,-50.21208%20c%205.79604,-24.82386%207.2104,-42.93561%207.26953,-93.09083%200.0397,-33.65637%20-0.58729,-51.66046%20-2.05295,-58.952673%20-4.73522,-23.559447%20-19.6022,-62.56075%20-23.03817,-60.4372%20-3.85959,2.385358%20-21.76817,51.205422%20-30.10378,82.065025%20-3.89137,14.406408%20-4.40728,19.179228%20-4.38378,40.555138%200.0294,26.70907%201.78412,35.92833%2010.70868,56.26214%206.66935,15.1955%2021.14452,39.2553%2028.34784,47.11815%205.3417,5.8308%205.87894,6.05921%207.86455,3.3437%201.17216,-1.60301%203.59679,-9.19158%205.38808,-16.86345%20z'%20id='path36'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.62903,278.16428%20c%20-2.99175,-5.08374%20-12.579,-20.87217%20-21.30501,-35.08542%20-31.65212,-51.55615%20-37.03952,-67.63715%20-37.06525,-110.63722%20-0.0136,-22.69921%200.53814,-28.76672%203.72176,-40.929685%206.69216,-25.567348%2026.87563,-83.4061905%2040.52926,-116.14287%206.50458,-15.595717%208.4448,-15.886699%2020.83495,-3.12469%2020.32853,20.9386335%2036.85737,59.362785%2044.69588,103.903278%203.10013,17.615782%203.04377,53.827917%20-0.14322,92.020257%20-1.3872,16.62383%20-2.29571,33.31864%20-2.01893,37.09959%20l%200.50323,6.87445%2013.66748,-18.41389%20c%2018.51739,-24.94809%2038.08992,-47.38734%2059.2581,-67.93745%2018.41861,-17.88082%2025.86886,-23.13458%2029.56625,-20.84948%202.97953,1.84146%20-0.76272,12.99748%20-12.88206,38.4027%20-5.19117,10.88202%20-8.7034,19.78549%20-7.80496,19.78549%200.89845,0%207.935,-2.34514%2015.63677,-5.2114%20l%2014.00321,-5.21141%2032.30285,-0.0378%20c%2025.56094,-0.0299%2033.30464,0.46783%2037.10286,2.38491%202.64,1.33249%204.76265,3.14952%204.71699,4.03785%20-0.0457,0.88833%20-6.92996,5.38316%20-15.29843,9.98851%20-8.36849,4.60533%20-17.31261,9.53402%20-19.87583,10.95263%20-2.56323,1.4186%20-4.2995,2.94018%20-3.85841,3.38128%200.44111,0.4411%209.87073,3.28772%2020.95474,6.32582%2036.63048,10.04035%2059.69202,20.57599%2078.99705,36.08976%2015.52668,12.47746%2035.35566,33.54417%2035.35566,37.56258%200,0.82017%20-3.81577,1.48235%20-8.47949,1.4715%20-6.23187,-0.0145%20-11.90446,-1.55925%20-21.40063,-5.82782%20-22.92654,-10.30556%20-45.11919,-19.64345%20-49.26183,-20.72768%20-2.8511,-0.7462%200.4718,3.22416%2011.30599,13.50895%20l%2015.34385,14.56573%20-110.70734,0.0578%20-110.70733,0.0578%20-18.50403,7.44436%20c%20-10.1772,4.09443%20-21.93315,8.79894%20-26.1243,10.45452%20l%20-7.6203,3.01014%20z%20m%2019.71622,-48.59396%20c%205.7349,-24.56201%207.12948,-42.87236%207.15165,-93.8984%200.0177,-40.803828%20-0.45837,-51.434358%20-2.77286,-61.915277%20-5.36527,-24.296051%20-18.53258,-56.856413%20-22.47444,-55.575155%20-4.437,1.442199%20-27.13245,67.292307%20-32.75344,95.033032%20-3.26392,16.10812%20-2.41936,46.64595%201.71546,62.02838%205.2069,19.37075%2025.11234,56.2798%2037.35506,69.26444%204.07564,4.32264%204.54153,4.45505%206.45713,1.8353%201.13551,-1.55289%203.53015,-9.10045%205.32144,-16.77232%20z'%20id='path37'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20209.20699,251.20123%20c%20-37.55583,-61.85066%20-41.92156,-74.2105%20-41.94822,-118.75959%20-0.0136,-22.74713%200.5371,-28.7786%203.7605,-41.186118%206.88563,-26.504141%2026.05728,-81.3912962%2040.47822,-115.886437%206.59543,-15.776365%208.73335,-16.089713%2021.03992,-3.083761%2020.41708,21.5773675%2036.71682,59.617987%2044.50321,103.862348%202.67928,15.224438%203.11659,56.436388%200.85441,80.521098%20-2.87208,30.57821%20-3.78667,53.72615%20-2.09798,53.09928%200.8996,-0.33395%207.06721,-7.92292%2013.7058,-16.8644%2017.04993,-22.96446%2038.24303,-47.15197%2058.80443,-67.11302%2018.41862,-17.88083%2025.86886,-23.13458%2029.56625,-20.84948%202.92603,1.8084%20-0.68457,12.71566%20-12.45115,37.61355%20-4.93766,10.44798%20-8.57564,19.39823%20-8.08445,19.88944%200.49122,0.4912%207.32708,-1.43618%2015.19083,-4.28306%2013.08418,-4.73681%2016.35576,-5.24125%2038.54483,-5.94302%2025.5095,-0.80679%2045.03408,1.16585%2048.79854,4.93032%202.91703,2.91703%202.21473,3.45636%20-19.32896,14.84321%20-9.54228,5.04354%20-17.74087,9.80317%20-18.2191,10.57695%20-0.47821,0.7738%202.2414,2.19115%206.0436,3.14968%2060.74588,15.3142%2092.82006,32.99996%20121.02167,66.73157%204.30906,5.154%207.83463,10.05999%207.83463,10.90221%200,0.8422%20-3.81577,1.52241%20-8.47949,1.51156%20-6.19641,-0.0144%20-11.95848,-1.56985%20-21.40063,-5.77702%20-32.62862,-14.5384%20-46.04702,-20.04185%20-48.75546,-19.99666%20-1.94186,0.0324%201.97024,4.63785%2011.60719,13.66428%20l%2014.53628,13.61537%20-110.47978,0.0644%20-110.47978,0.0644%20-20.34672,8.28357%20c%20-11.19069,4.55594%20-23.0366,9.23541%20-26.32423,10.3988%20l%20-5.97752,2.11525%20z%20m%2036.10025,-21.63091%20c%205.42438,-23.50644%207.01224,-44.30186%207.10806,-93.09083%200.10205,-51.95887%20-1.2125,-63.2578%20-10.38669,-89.276779%20-5.64816,-16.018793%20-12.07719,-29.436149%20-14.10456,-29.436149%20-3.33357,0%20-22.10078,50.760285%20-31.12743,84.191378%20-4.83851,17.91991%20-5.25399,56.17148%20-0.78724,72.47739%205.67382,20.71234%2024.41849,55.56244%2037.17254,69.11119%204.49054,4.77036%205.20089,5.04033%206.95395,2.64288%201.07387,-1.46862%203.40099,-8.94721%205.17137,-16.61908%20z'%20id='path38'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20209.20699,251.20123%20c%20-37.57833,-61.88772%20-41.84301,-73.87399%20-41.96706,-117.95202%20-0.0555,-19.71154%200.64106,-28.90764%202.93606,-38.763408%205.29525,-22.740176%2027.26863,-86.2175448%2040.95399,-118.309146%207.09086,-16.627759%209.02348,-16.979061%2021.40743,-3.891333%2017.1845,18.1610877%2031.1968,47.29833%2040.5305,84.279285%204.45169,17.637985%205.18697,23.683997%205.88854,48.419622%200.52194,18.40275%20-0.10274,39.86963%20-1.79033,61.52374%20-2.91755,37.43613%20-3.10989,43.48324%20-1.38063,43.40725%200.66624,-0.0293%205.57224,-6.02461%2010.9022,-13.32293%2016.36447,-22.40786%2039.8825,-49.51662%2060.00206,-69.16317%2019.81784,-19.35191%2027.40502,-24.82336%2031.18378,-22.48797%202.92603,1.8084%20-0.68457,12.71566%20-12.45115,37.61355%20-4.93766,10.44798%20-8.62627,19.34761%20-8.19693,19.77695%200.42934,0.42934%207.2652,-1.54674%2015.19083,-4.39128%2014.35961,-5.15372%2014.52367,-5.17214%2046.71306,-5.24067%2025.60777,-0.0545%2033.29768,0.43335%2037.10286,2.35393%202.64,1.33249%204.82044,3.12704%204.84543,3.98788%200.0412,1.41972%20-6.5548,5.41925%20-31.79109,19.2768%20l%20-8.54206,4.69055%206.46057,2.01657%20c%203.55331,1.1091%2015.54573,4.67292%2026.64984,7.91961%2023.24105,6.79532%2049.99161,19.00051%2062.92892,28.71189%2016.56825,12.43695%2040.44016,37.08574%2040.44016,41.75625%200,0.80856%20-3.81577,1.46123%20-8.47949,1.45038%20-6.21211,-0.0144%20-11.93456,-1.56519%20-21.40063,-5.79939%20-29.70048,-13.28513%20-47.75532,-20.45292%20-48.82477,-19.38345%20-0.62662,0.62659%205.01493,6.88196%2012.53674,13.9008%20l%2013.67604,12.76151%20-110.207,0.0777%20-110.20699,0.0777%20-20.6195,8.25851%20c%20-11.34073,4.5422%20-23.30939,9.22166%20-26.59702,10.39882%20l%20-5.97753,2.14029%20z%20m%2033.65096,-12.564%20c%206.99835,-24.41061%207.97673,-34.70222%208.71041,-91.62504%200.502,-38.9483%200.13156,-59.339755%20-1.23232,-67.835958%20-3.36436,-20.95798%20-18.14374,-61.40967%20-22.43656,-61.40967%20-3.40425,0%20-22.56382,52.350279%20-31.03395,84.794958%20-4.91461,18.82534%20-5.32389,55.22043%20-0.80826,71.87381%206.89482,25.42763%2034.43758,72.68139%2042.36374,72.68139%201.10326,0%203.09988,-3.81578%204.43694,-8.47949%20z'%20id='path39'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20228.88105,283.98786%20c%20-21.45876,-34.71428%20-42.95674,-71.76478%20-48.80995,-84.12104%20-8.98551,-18.9686%20-11.79707,-31.33217%20-13.14638,-57.80994%20-1.73596,-34.0655%203.12851,-55.84603%2027.21137,-121.83807%2016.82771,-46.111433%2021.86687,-57.367075%2025.68326,-57.367075%207.49646,0%2024.26119,20.796338%2036.00898,44.6684745%207.90834,16.0701615%2011.90143,27.6122885%2018.07288,52.2400425%205.7432,22.918713%206.90762,61.581768%203.26361,108.362858%20-2.93635,37.69632%20-3.07399,41.86658%20-1.37933,41.79211%200.66624,-0.0293%205.57224,-6.02461%2010.9022,-13.32293%2016.36447,-22.40786%2039.8825,-49.51662%2060.00206,-69.16317%2019.81784,-19.35191%2027.40502,-24.82336%2031.18378,-22.48797%202.91756,1.80315%20-0.63369,12.62318%20-12.36726,37.68087%20-4.90973,10.48502%20-8.61052,19.37993%20-8.22398,19.76646%200.38654,0.38656%207.19211,-1.65077%2015.12351,-4.52738%20l%2014.42069,-5.23018%20h%2032.30285%20c%2025.50352,0%2033.31317,0.50994%2037.10286,2.42271%202.64,1.33249%204.76008,3.14952%204.71129,4.03785%20-0.0883,1.60733%20-7.37834,6.11359%20-28.85306,17.83521%20l%20-11.26603,6.14937%206.42061,1.98297%20c%203.53133,1.09062%2015.50577,4.63932%2026.60988,7.88601%2024.17331,7.06791%2049.76154,18.92364%2064.40565,29.84095%2015.20856,11.33809%2038.96343,36.26639%2038.96343,40.88811%200,0.94469%20-4.08,1.29535%20-10.09464,0.86764%20-7.79347,-0.5542%20-14.32874,-2.66133%20-28.66876,-9.24347%20-23.15113,-10.62648%20-38.88287,-16.67618%20-40.12775,-15.43129%20-0.52416,0.52416%205.20119,6.6957%2012.723,13.71454%20l%2013.67604,12.76151%20-110.21112,0.0777%20-110.21112,0.0777%20-24.65324,9.86997%20c%20-13.55927,5.42848%20-25.50764,10.20977%20-26.55193,10.62509%20-1.04428,0.41531%20-2.94481,-0.93721%20-4.2234,-3.00562%20z%20m%2012.81092,-42.8213%20c%201.36738,-3.27258%204.0165,-13.26627%205.88694,-22.20819%203.10612,-14.84926%203.40838,-21.64633%203.48823,-78.44102%20l%200.0874,-62.182962%20-4.29914,-15.35616%20C%20241.94302,45.431437%20231.04714,19.107063%20228.33,18.22092%20c%20-2.47235,-0.806316%20-11.51063,21.247162%20-22.14707,54.039058%20-11.66196,35.953512%20-12.97587,42.756462%20-13.02721,67.449802%20-0.0506,24.33765%201.9567,34.99518%2010.19089,54.10725%209.92444,23.03524%2029.39346,53.29969%2034.28753,53.29969%200.86443,0%202.69046,-2.67757%204.05783,-5.95016%20z'%20id='path40'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20357.75394,424.70212%20c%20-29.25045,-3.2514%20-45.90713,-17.12433%20-55.01312,-45.81904%20-2.23213,-7.03386%20-5.90917,-23.37271%20-8.1712,-36.30854%20-2.26203,-12.93583%20-4.45863,-24.07927%20-4.88132,-24.7632%20-1.55674,-2.51887%20-9.78534,-1.08498%20-31.16755,5.4312%20-24.17414,7.36701%20-50.1017,16.35405%20-85.78587,29.7352%20-24.32528,9.1217%20-27.66028,10.07132%20-24.59106,7.0021%200.99657,-0.99657%201.46879,-2.70622%201.04937,-3.79922%20-1.29442,-3.37318%209.99251,-11.72682%2026.46665,-19.58838%208.65397,-4.12974%2038.26571,-16.94474%2065.80388,-28.4778%20l%2050.0694,-20.96919%20188.24231,0.89879%20c%20121.40704,0.57968%20189.7755,1.48171%20192.56057,2.54059%205.97157,2.2704%206.86199,6.8367%206.64146,34.0589%20-0.15401,19.00909%20-0.98664,26.89849%20-4.42134,41.89264%20-2.32738,10.16019%20-4.78586,19.00941%20-5.46326,19.66493%20-0.67741,0.65552%20-3.37167,-0.52917%20-5.98725,-2.63266%20l%20-4.75558,-3.82452%205.36978,-27.35562%20c%205.73883,-29.23567%205.90144,-42.98485%200.56078,-47.41723%20-2.07677,-1.72358%20-30.59748,-2.22067%20-148.89474,-2.59511%20-80.47925,-0.25475%20-160.86219,0.10866%20-178.62875,0.80757%20l%20-32.30284,1.27073%20-0.46803,4.03785%20c%20-0.53807,4.64205%209.83863,62.87785%2013.43518,75.40048%202.89595,10.08328%208.55951,17.18948%2017.51993,21.98265%206.43671,3.44317%208.26677,3.56324%2054.30787,3.56324%2053.9595,0%2058.78288,-0.73446%2070.06974,-10.66953%208.03791,-7.07526%2010.71931,-12.96636%2020.46285,-44.95745%203.63655,-11.93995%207.6677,-23.75068%208.95811,-26.24606%20l%202.3462,-4.53705%2018.93644,0.0238%20c%2021.32096,0.0268%2027.01215,1.73332%2027.01215,8.0996%200,3.93886%20-0.15865,3.98374%20-12.34075,3.49091%20-14.62233,-0.59154%20-22.69085,2.14248%20-26.12207,8.8515%20-1.28517,2.51289%20-5.04902,13.29065%20-8.36412,23.95058%20-15.9672,51.34376%20-29.00221,59.23905%20-96.9207,58.70469%20-13.32492,-0.10484%20-29.31482,-0.75615%20-35.53311,-1.44735%20z'%20id='path41'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20402.48347,1045.818%20c%20-2.93694,-2.0266%20-13.90227,-11.3518%20-24.36742,-20.7226%20-37.57978,-33.64993%20-58.07181,-62.87743%20-85.9297,-122.56048%20-5.68221,-12.17362%20-10.90847,-21.55665%20-11.61392,-20.8512%20-1.34286,1.34288%201.12461,49.2453%203.7533,72.8652%200.84034,7.55078%201.53386,14.8059%201.54114,16.12253%200.0399,7.20787%20-25.31907,-42.34035%20-38.01048,-74.2677%20-11.58422,-29.142%20-23.95591,-78.6789%20-32.27012,-129.21135%20-3.55763,-21.62262%20-4.22283,-24.42941%20-5.66265,-23.89338%20-0.70003,0.26062%20-12.68024,15.7369%20-26.62271,34.3918%20-13.94246,18.6549%20-25.73547,34.28145%20-26.20668,34.7256%20-1.96983,1.8567%201.28602,-40.0272%205.14769,-66.22084%204.89215,-33.18335%2013.65058,-85.54627%2019.42723,-116.14717%202.24901,-11.91373%203.89574,-21.8547%203.65942,-22.09103%20-0.23633,-0.23633%20-9.50702,6.3842%20-20.60153,14.71228%20-18.9791,14.24661%20-20.20205,14.90829%20-20.68275,11.19034%20-0.28101,-2.17336%204.26169,-23.03113%2010.09489,-46.35058%2010.49846,-41.96984%2031.84034,-138.80015%2030.81764,-139.82284%20-0.29161,-0.29162%20-9.84247,5.6893%20-21.22413,13.29093%20-16.14623,10.7838%20-20.97611,13.31691%20-21.97794,11.52673%20-0.83205,-1.48679%203.7344,-12.98896%2012.9729,-32.67675%2011.73177,-25.00109%2014.95419,-30.56783%2018.19366,-31.42958%209.75651,-2.59539%2072.97939,-14.24725%2073.9731,-13.63309%200.61097,0.3776%205.45352,7.72992%2010.76122,16.3385%2018.42853,29.8893%2046.64679,51.12032%2074.18985,55.81942%2017.3177,2.95455%2053.01405,1.01504%2072.13201,-3.9192%2015.84011,-4.08824%2040.18655,-14.26641%2040.18655,-16.80021%200,-0.77064%203.45236,-2.64692%207.67192,-4.1695%2016.18808,-5.84131%2038.00652,-26.49102%2047.19533,-44.66726%201.58338,-3.13206%205.58394,-13.32619%208.89012,-22.65363%208.99277,-25.37047%207.09785,-24.48669%2036.74661,-17.13843%2067.29717,16.67916%20104.77954,34.45776%20115.37234,54.72326%204.66249,8.92001%202.24509,26.53546%20-5.20107,37.89973%20l%20-2.4005,3.66363%20-10.86293,-8.96967%20c%20-5.97461,-4.93332%20-15.86657,-11.47605%20-21.98215,-14.5394%20-10.57063,-5.29494%20-11.95987,-5.56972%20-28.15882,-5.56972%20-13.92516,0%20-18.3007,0.61048%20-23.93915,3.34%20-7.8576,3.8038%20-16.73233,13.09379%20-16.73233,17.51528%200,6.02394%203.8028,7.08674%2018.96003,5.29889%2019.58289,-2.30988%2031.84778,0.32678%2052.3488,11.25371%2030.30393,16.15182%2035.74323,50.19556%2010.62246,66.48417%20-8.16321,5.29311%20-17.25407,6.65695%20-35.77518,5.36712%20-20.4443,-1.42379%20-33.08183,-4.79355%20-51.80911,-13.81475%20-17.0689,-8.22233%20-22.22802,-12.59722%20-28.74818,-24.37818%20-4.87857,-8.81485%20-8.62627,-9.71541%20-15.69132,-3.77057%20-8.52556,7.17379%20-15.50838,28.22957%20-11.41352,34.41595%201.33616,2.01861%202.18896,1.80418%205.61125,-1.41089%20l%204.03561,-3.79127%2017.0384,9.95898%20c%2035.53906,20.77267%2050.20896,24.91652%2088.12044,24.89171%2021.68151,-0.0142%2029.46948,-0.67615%2041.77416,-3.55068%2011.55495,-2.6994%2015.6526,-3.09482%2017.36277,-1.67548%207.80954,6.48134%20-5.45307,23.88294%20-26.0955,34.23936%20-15.54474,7.79888%20-25.84954,9.95598%20-46.77014,9.79037%20-20.50822,-0.16233%20-32.78631,-2.33502%20-72.01608,-12.74372%20-38.39515,-10.18725%20-45.0297,-10.93994%20-85.46026,-9.69539%20-19.98738,0.61525%20-46.15268,1.60747%20-58.1451,2.20491%20l%20-21.80442,1.08625%2016.81692,17.37475%20c%2016.13273,16.66785%2016.59273,17.33625%2011.30599,16.42897%20-38.55791,-6.61705%20-56.23502,-14.53105%20-82.23017,-36.81424%20-5.77413,-4.94961%20-10.67573,-8.47753%20-10.89243,-7.83981%20-0.21671,0.63771%202.11177,9.12752%205.17441,18.86625%203.06263,9.73872%205.39598,17.87922%205.18521,18.08997%20-0.21076,0.21076%20-5.16903,-3.20085%20-11.01836,-7.58138%20-23.99942,-17.97298%20-50.87912,-51.3133%20-62.78794,-77.87922%20-3.08573,-6.88357%20-6.25733,-12.51637%20-7.04801,-12.51734%20-2.57733,-0.003%200.25811,51.33472%203.74023,67.71958%203.27039,15.38867%208.19579,24.94396%208.19579,15.89988%200,-2.35875%200.58419,-4.64969%201.2982,-5.09096%200.71402,-0.44129%205.91806,7.6459%2011.56454,17.97152%2022.79368,41.68244%2043.09309,67.60239%2085.06758,108.62124%2030.0072,29.32403%2048.72337,45.0041%2075.86378,63.55715%209.86311,6.74243%2018.85557,13.37063%2019.98326,14.7294%202.59563,3.12758%203.2057,3.12878%20-25.69067,-0.0518%20-31.98572,-3.5208%20-32.75936,-3.20145%20-17.07092,7.04648%2014.99028,9.79185%2065.54726,35.8452%2080.331,41.39662%2017.09691,6.42015%2068.19689,15.18458%2078.8953,13.5318%203.51235,-0.54262%203.18015,-0.9831%20-3.3187,-4.40062%20-13.43333,-7.06403%20-42.11686,-26.33505%20-43.75572,-29.3973%20-1.56417,-2.92275%20-0.52874,-3.0489%2026.28972,-3.20355%2015.35491,-0.0885%2029.54933,-0.63368%2031.54314,-1.21133%20l%203.62512,-1.05037%20-4.92114,-7.26818%20c%20-14.35339,-21.19882%20-41.61423,-70.2753%20-39.9569,-71.93264%200.44776,-0.44777%205.82655,1.33176%2011.95282,3.9545%208.48005,3.63042%2011.25764,4.24609%2011.63704,2.57944%200.27407,-1.20404%20-2.06396,-9.69482%20-5.19565,-18.86841%20-8.14715,-23.86531%20-15.4785,-53.60811%20-16.453,-66.74863%20l%20-0.83846,-11.306%206.34011,16.15142%20c%2021.1348,53.84095%2035.95589,79.16085%2063.81197,109.01435%2016.79881,18.00345%2016.79895,18.0033%20-10.37978,13.0389%20-9.9861,-1.824%20-18.4495,-3.02348%20-18.80757,-2.66535%20-1.13898,1.13895%2029.11997,30.87067%2038.36158,37.69312%204.88581,3.6069%2017.60505,11.33835%2028.26499,17.181%2010.65994,5.84273%2018.65488,10.6452%2017.76656,10.67213%20-0.88833,0.027%20-0.5791,0.70477%200.68721,1.50615%201.42055,0.8991%20-2.60029,1.13085%20-10.49842,0.6051%20-7.04044,-0.4686%20-15.34463,-0.16853%20-18.45378,0.6669%20l%20-5.65299,1.51882%209.69085,6.26325%20c%2012.57209,8.12543%2040.74455,20.70203%2055.90216,24.95565%2013.86981,3.8922%2055.93511,6.8904%2086.23033,6.14603%20l%2019.38173,-0.47618%20-16.15148,-5.46637%20c%20-25.70755,-8.7006%20-49.26519,-18.2562%20-48.41178,-19.63703%200.43189,-0.69877%20-0.12779,-1.69792%20-1.24374,-2.2203%20-2.52525,-1.18215%20168.04865,0.47033%20221.41047,2.14493%2042.3804,1.3299%2042.17678,1.28055%2042.22665,10.2387%200.0232,4.12192%200.51885,4.45207%206.88913,4.58625%2015.25672,0.3213%2044.4526,2.86552%2051.2807,4.4688%203.9975,0.93855%2019.3904,1.73812%2034.2064,1.77682%2022.2703,0.0585%2027.3781,0.51015%2029.4763,2.60843%203.1012,3.10117%203.1058,2.62245%20-0.09,9.32302%20l%20-2.6276,5.51018%20-26.8487,1.0671%20c%20-106.9313,4.24987%20-251.40793,6.51345%20-418.25928,6.5532%20l%20-181.44209,0.0427%20-3.20577,3.95857%20c%20-3.08903,3.81443%20-3.09691,3.99893%20-0.21644,5.06445%201.64411,0.60818%2034.9489,2.3244%2074.01063,3.81383%20105.85054,4.03605%20111.43863,4.45192%20115.88072,8.62507%202.03601,1.91273%206.58503,4.1529%2010.10891,4.97813%20l%206.40708,1.50045%20-5.653,0.4584%20c%20-3.10915,0.25215%200.16151,0.8703%207.26814,1.37362%207.49448,0.53085%20-11.37367,1.37505%20-44.92613,2.01023%20-63.17235,1.1958%20-62.52707,1.09215%20-68.36896,10.98165%20l%20-2.88404,4.88227%20-24.28268,0.0165%20-24.28267,0.0165%20-2.82301,6.71685%20c%20-1.55265,3.69428%20-2.64287,6.87345%20-2.42271,7.06493%200.71213,0.61935%20116.63886,3.92347%20176.43025,5.0286%2045.16648,0.83482%2058.605,1.55467%2060.27941,3.22912%201.18514,1.18515%201.44557,2.15483%200.57872,2.15483%20-0.86684,0%20-3.23295,3.99742%20-5.25799,8.88322%20l%20-3.68193,8.8833%20H%20584.38418%20442.54889%20l%20-0.19108,6.05678%20c%20-0.10511,3.3313%20-0.65022,8.1128%20-1.21136,10.6258%20l%20-1.02027,4.569%20-13.24252,-9.8667%20c%20-7.28337,-5.4268%20-19.01383,-15.29605%20-26.06769,-21.93183%20-7.05384,-6.63577%20-13.36249,-12.06502%20-14.01919,-12.06502%20-3.63929,0%204.52756,33.24505%2014.63388,59.57055%203.9203,10.2119%206.96242,18.7166%206.76026,18.8995%20-0.20217,0.1828%20-2.77052,-1.3257%20-5.70745,-3.3524%20z'%20id='path42'%20/%3e%3c/svg%3e`,wk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.8758%209.20865C17.8758%208.59461%2017.3777%208.09634%2016.7663%208.09634C16.155%208.09634%2015.6567%208.59575%2015.6567%209.20865V27.6446C15.6567%2029.0714%2014.4985%2030.2324%2013.0755%2030.2324C11.6523%2030.2324%2010.4941%2029.0714%2010.4941%2027.6446V15.8167C10.4941%2015.2027%209.99591%2014.7044%209.38453%2014.7044C8.77316%2014.7044%208.275%2015.2038%208.275%2015.8167V20.8301C8.275%2022.2567%207.11678%2023.4179%205.69364%2023.4179C4.2705%2023.4179%203.1123%2022.2567%203.1123%2020.8301V19.0129C3.1123%2018.6054%203.44177%2018.2752%203.84822%2018.2752C4.25467%2018.2752%204.58413%2018.6054%204.58413%2019.0129V20.8301C4.58413%2021.4441%205.08227%2021.9424%205.69364%2021.9424C6.30502%2021.9424%206.80317%2021.443%206.80317%2020.8301V15.8167C6.80317%2014.39%207.96139%2013.2289%209.38453%2013.2289C10.8077%2013.2289%2011.9659%2014.39%2011.9659%2015.8167V27.6446C11.9659%2028.2587%2012.4641%2028.7569%2013.0755%2028.7569C13.6868%2028.7569%2014.1849%2028.2575%2014.1849%2027.6446V20.4123V9.20865C14.1849%207.78194%2015.3431%206.62082%2016.7663%206.62082C18.1894%206.62082%2019.3476%207.78194%2019.3476%209.20865V24.4746C19.3476%2024.8821%2019.0182%2025.2123%2018.6117%2025.2123C18.2053%2025.2123%2017.8758%2024.8821%2017.8758%2024.4746V9.20865ZM31.531%2013.2289C30.1079%2013.2289%2028.9496%2014.39%2028.9496%2015.8167V25.6969C28.9496%2026.311%2028.4515%2026.8093%2027.8401%2026.8093C27.2287%2026.8093%2026.7306%2026.3099%2026.7306%2025.6969V9.20865C26.7306%207.78194%2025.5723%206.62082%2024.1492%206.62082C22.7261%206.62082%2021.5679%207.78194%2021.5679%209.20865V30.1383C21.5679%2030.7523%2021.0697%2031.2506%2020.4583%2031.2506C19.8469%2031.2506%2019.3488%2030.7511%2019.3488%2030.1383V27.5471C19.3488%2027.1396%2019.0194%2026.8093%2018.6129%2026.8093C18.2065%2026.8093%2017.877%2027.1396%2017.877%2027.5471V30.1383C17.877%2031.565%2019.0352%2032.7261%2020.4583%2032.7261C21.8815%2032.7261%2023.0397%2031.565%2023.0397%2030.1383V9.20865C23.0397%208.59461%2023.5378%208.09634%2024.1492%208.09634C24.7605%208.09634%2025.2587%208.59575%2025.2587%209.20865V25.6969C25.2587%2027.1237%2026.417%2028.2848%2027.8401%2028.2848C29.2632%2028.2848%2030.4215%2027.1237%2030.4215%2025.6969V15.8167C30.4215%2015.2027%2030.9196%2014.7044%2031.531%2014.7044C32.1424%2014.7044%2032.6405%2015.2038%2032.6405%2015.8167V24.4746C32.6405%2024.8821%2032.97%2025.2123%2033.3764%2025.2123C33.7829%2025.2123%2034.1123%2024.8821%2034.1123%2024.4746V15.8167C34.1123%2014.39%2032.9541%2013.2289%2031.531%2013.2289Z'%20fill='currentColor'/%3e%3c/svg%3e`,Tk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.92783%208.88101H13.357V13.3088H17.7861V17.738H17.7835H22.2152V13.3088H26.6418V8.88101H31.0722V26.5949H35.5V31.0241H22.2139V26.5962H17.7861V22.1671H13.3557V26.5949L17.7861%2026.5962V31.0241H4.5V26.5949H8.92783V8.88101ZM22.2139%2026.5962H26.6418V22.1671H22.2152V26.5962H22.2139Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ek=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.85893%2026.3499L18.1801%2029.6463C18.1635%2030.5223%2018.1894%2031.3987%2018.2576%2032.2722L25.9507%2034.3298C23.669%2035.2716%2021.1952%2035.6547%2018.7355%2035.4471L18.503%2035.4265L18.4462%2035.4213L18.3377%2035.4097L18.2163%2035.3968C18.1486%2035.3886%2018.081%2035.38%2018.0135%2035.3709L17.8753%2035.3528L17.7332%2035.3322C17.5951%2035.3121%2017.4573%2035.2901%2017.3198%2035.2663L17.2656%2035.256L17.1687%2035.2392L17.0305%2035.2133L16.9401%2035.194L16.82%2035.1694L16.7231%2035.1488L16.6004%2035.1229L16.4751%2035.0932L16.3537%2035.0648L16.2659%2035.0428L16.1522%2035.0144L16.0359%2034.9834L15.9132%2034.9511L15.8073%2034.9214L15.6665%2034.8827L15.5864%2034.8568L15.4779%2034.8245L15.3578%2034.7884L15.2222%2034.7445L15.1473%2034.7199L15.0439%2034.6863L14.9277%2034.6463L14.8424%2034.6153C14.8235%2034.6089%2014.8045%2034.6025%2014.7856%2034.5959L14.6978%2034.5636L14.5673%2034.5158L14.4937%2034.4874L14.3904%2034.4487L14.278%2034.4035L14.1643%2034.3583L14.0623%2034.3169L13.9396%2034.2653L13.8582%2034.2291L13.7768%2034.1942C13.7591%2034.1865%2013.7415%2034.1788%2013.7239%2034.171L13.6386%2034.1322L13.5056%2034.0715L13.4384%2034.0405L13.3144%2033.9811L13.2343%2033.9423L13.1258%2033.8907L13.0147%2033.8338L12.8946%2033.7731L12.8274%2033.7383L12.6944%2033.6672L12.6208%2033.6285L12.5459%2033.5871C12.526%2033.576%2012.5062%2033.5648%2012.4864%2033.5536L12.365%2033.4851L12.2875%2033.4412L12.2217%2033.4024L12.1287%2033.3495L12.0227%2033.2849L11.9026%2033.2126L11.8354%2033.1712L11.7269%2033.1028L11.6482%2033.0524L11.5461%2032.9878L11.4557%2032.9271L11.3872%2032.8819C11.3639%2032.8665%2011.3407%2032.851%2011.3175%2032.8354L11.2607%2032.7966L11.2038%2032.7579C11.1866%2032.7459%2011.1693%2032.7338%2011.1522%2032.7217L11.0785%2032.6701L10.9804%2032.6003L10.8912%2032.5357L10.7957%2032.466L10.7233%2032.4117L10.6252%2032.3381L10.527%2032.2619L10.4159%2032.1753L10.3578%2032.1301L10.2751%2032.063L10.1795%2031.9855L10.0646%2031.8912L10.0052%2031.8408L9.94575%2031.7904C9.92717%2031.7746%209.90866%2031.7586%209.8902%2031.7426L9.83208%2031.691L9.75329%2031.6225L9.66287%2031.5424L9.57504%2031.4649L9.49496%2031.39L9.40841%2031.3099L9.33996%2031.2453L9.22629%2031.1368C9.18345%2031.0953%209.14082%2031.0535%209.09842%2031.0116L9.06096%2030.9754L9.008%2030.9211L8.91887%2030.8307L8.85429%2030.7648L8.78971%2030.6964C8.71592%2030.6207%208.64357%2030.5436%208.57271%2030.4652L8.46938%2030.3515L8.38929%2030.2611L8.29758%2030.1578L8.24333%2030.0945L8.17488%2030.0144L8.09996%2029.9266L8.04054%2029.8542C8.02888%2029.8401%208.01725%2029.8258%208.00567%2029.8116L7.94754%2029.7406L7.86229%2029.6346L7.80934%2029.5675L7.74475%2029.4848L7.71892%2029.4525C6.97985%2028.4945%206.3556%2027.4532%205.85893%2026.3499ZM4.54143%2018.8661L19.2057%2022.7888C18.9602%2023.6439%2018.758%2024.5109%2018.5999%2025.3864L32.5718%2029.1244C31.8777%2030.0748%2031.0782%2030.9436%2030.1887%2031.7142L5.34872%2025.0673L5.32805%2025.0079L5.28284%2024.8736C5.26087%2024.8078%205.23934%2024.742%205.21826%2024.676L5.20922%2024.6462C5.1098%2024.3302%205.02063%2024.011%204.94184%2023.6891L4.90309%2023.5264L4.87984%2023.423L4.85272%2023.2978L4.82947%2023.1931L4.80622%2023.0769L4.78426%2022.9684L4.76101%2022.847C4.72743%2022.6648%204.69643%2022.4814%204.6693%2022.2967L4.64735%2022.1443L4.63314%2022.0371L4.61635%2021.9053C4.6077%2021.8361%204.59952%2021.7668%204.5918%2021.6974L4.58535%2021.6367C4.48884%2020.7162%204.47414%2019.7891%204.54143%2018.8661ZM6.59905%2012.214L22.0318%2016.3421C21.5565%2017.1236%2021.1212%2017.9322%2020.7273%2018.764L35.3166%2022.6674C35.1332%2023.7266%2034.8413%2024.7496%2034.4538%2025.7222L19.5351%2021.731L4.66026%2017.7526L4.67964%2017.6235L4.68997%2017.5602L4.70289%2017.4736L4.72226%2017.3613L4.74551%2017.2347C4.7791%2017.0435%204.81785%2016.8536%204.85918%2016.6638L4.89534%2016.5036L4.92118%2016.3938L4.95218%2016.2685C4.98059%2016.1523%205.0103%2016.036%205.04259%2015.9224L5.07876%2015.7906L5.10847%2015.6834L5.14722%2015.5542L5.17951%2015.4483L5.21826%2015.3243L5.25184%2015.2184L5.29189%2015.0957C5.62637%2014.0924%206.06355%2013.1262%206.59646%2012.2127L6.59905%2012.214ZM12.3366%206.53068L26.913%2010.4289C26.1438%2011.1271%2025.4158%2011.8693%2024.7327%2012.6519L34.8374%2015.3553C35.1823%2016.4558%2035.4083%2017.608%2035.5%2018.7976L7.22034%2011.2336L7.27846%2011.1497L7.31334%2011.098L7.365%2011.027L7.42442%2010.943L7.49546%2010.8448L7.56521%2010.7518L7.64788%2010.6407L7.71246%2010.5568L7.78609%2010.4625L7.85713%2010.3721L7.93463%2010.2765L8.00567%2010.1874L8.08963%2010.0879L8.15938%2010.0027L8.24463%209.90321L8.31308%209.82571L8.40608%209.71979L8.47454%209.64229L8.56108%209.54671L8.63083%209.47179L8.72512%209.37104L8.80004%209.29354L8.88142%209.207L9.09842%208.98742L9.22758%208.86084L9.30379%208.7885L9.40196%208.69679C10.2922%207.86254%2011.2771%207.13554%2012.3366%206.53068ZM20.022%204.50018H20.1473L20.2532%204.50147L20.3423%204.50277L20.4121%204.50535L20.4999%204.50793L20.5593%204.50922L20.6575%204.5131L20.7182%204.51568L20.7957%204.51956L20.8655%204.52214L20.9778%204.5286L21.1135%204.53764L21.2995%204.55185L21.4131%204.56089L21.47%204.56606L21.5694%204.57639L21.6753%204.58672L21.736%204.59318L21.8678%204.60868L21.9324%204.61643L22.0719%204.63452L22.1765%204.64743L22.2308%204.65518L22.3147%204.6681L22.5821%204.70943L22.6725%204.72493L22.7565%204.73914L22.9373%204.77272L23.0561%204.79597L23.1982%204.82439L23.2576%204.83731L23.3545%204.85797L23.4075%204.87089L23.4875%204.88768L23.5418%204.9006L23.6257%204.91997L23.689%204.93547L23.7807%204.95743L23.9047%204.98843L24.0494%205.02718L24.1954%205.06593L24.3413%205.10726L24.4059%205.12664L24.4963%205.15247L24.5971%205.18347L24.6914%205.21318L24.756%205.23385L24.8205%205.25451L24.9187%205.28681L25.0466%205.32943L25.1783%205.37593L25.2403%205.39789L25.323%205.4276L25.4431%205.47151L25.5852%205.52447L25.735%205.5826L25.8642%205.63426L25.9249%205.6601L26.0024%205.6911L26.0554%205.71435L26.1367%205.74793L26.1884%205.77118L26.262%205.80347L26.4041%205.86547L26.5333%205.92489L26.6289%205.97009L26.7257%206.01659L26.8032%206.05276L26.9221%206.11218L27.0396%206.1703L27.1714%206.23747L27.2398%206.27364L27.3031%206.30722L27.3625%206.33822L27.44%206.38084L27.493%206.40926L27.5602%206.44672L27.6738%206.5113L27.8107%206.5888L27.9231%206.65468L27.9967%206.69859L28.0652%206.73993L28.1892%206.81613L28.3029%206.88718L28.4294%206.96726L28.4759%206.99826L28.5586%207.05122L28.6671%207.12355L28.7188%207.15842L28.7989%207.21267L28.8789%207.26822L28.9086%207.29017C28.9784%207.33797%2029.0481%207.38705%2029.1166%207.43742L29.2238%207.51492L29.3078%207.57692L29.3801%207.63246L29.4912%207.71642L29.5971%207.79909L29.6488%207.83784L29.7134%207.8908L29.8244%207.97992L29.9265%208.06388L30.0363%208.15559C30.9559%208.93059%2031.7839%209.81279%2032.5021%2010.779L13.8285%205.7841L13.9086%205.74922L13.9925%205.71305L14.0971%205.66914L14.2082%205.62393C14.3542%205.5658%2014.5014%205.50768%2014.6487%205.45472L14.7727%205.40951L14.8928%205.36689L15.0013%205.32814L15.1253%205.2881C15.2377%205.24935%2015.3526%205.21318%2015.4663%205.17831L15.5839%205.14343L15.6949%205.11114L15.8267%205.07239L15.9365%205.04268L16.0656%205.0091L16.1767%204.9781L16.293%204.94839L16.4105%204.91997L16.5332%204.89156L16.6495%204.86572L16.7761%204.8386L16.8936%204.81276L17.0163%204.78951L17.1351%204.76627L17.2643%204.74302L17.3818%204.72235L17.5084%204.70039L17.6273%204.68231L17.7526%204.66293L17.8714%204.64614L18.0031%204.62935L18.1207%204.61385L18.2563%204.59835L18.3726%204.58543L18.5082%204.57252C18.6283%204.5596%2018.7484%204.54927%2018.8698%204.54152L19.0068%204.53118L19.123%204.52472L19.2651%204.51697L19.3852%204.51181L19.5144%204.50664L19.6397%204.50406L19.7675%204.50147L20.022%204.49889V4.50018Z'%20fill='currentColor'/%3e%3c/svg%3e`,Dk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.1801%2015.8791V14.0283C16.3472%2014.0155%2016.5271%2014.0026%2016.7199%2014.0026C21.7966%2013.8356%2025.1254%2018.3596%2025.1254%2018.3596C25.1254%2018.3596%2021.5267%2023.3463%2017.671%2023.3463C17.1569%2023.3463%2016.6557%2023.2692%2016.1801%2023.1021V17.4728C18.1465%2017.7298%2018.545%2018.591%2019.7274%2020.5702L22.375%2018.3468C22.375%2018.3468%2020.4343%2015.8277%2017.1955%2015.8277C16.8356%2015.8277%2016.5014%2015.8405%2016.1801%2015.8791ZM16.1801%209.75492V12.5246C16.3472%2012.5118%2016.5271%2012.4989%2016.7199%2012.4861C23.763%2012.2547%2028.377%2018.2696%2028.377%2018.2696C28.377%2018.2696%2023.0819%2024.683%2017.5939%2024.683C17.0798%2024.683%2016.6171%2024.6444%2016.1801%2024.5545V26.2767C16.5528%2026.3152%2016.9384%2026.341%2017.3625%2026.341C22.4649%2026.341%2026.1664%2023.7448%2029.7523%2020.6473C30.3435%2021.1229%2032.7597%2022.2796%2033.261%2022.7937C29.8679%2025.6341%2021.9251%2027.9346%2017.4396%2027.9346C17.0155%2027.9346%2016.5914%2027.9089%2016.1801%2027.8704V30.2866H35.6001V9.75492H16.1801ZM16.1801%2023.1021V24.5545C11.4376%2023.7191%2010.1266%2018.7966%2010.1266%2018.7966C10.1266%2018.7966%2012.4015%2016.2775%2016.1801%2015.8791V17.4728H16.1673C14.188%2017.2414%2012.6329%2019.0922%2012.6329%2019.0922C12.6329%2019.0922%2013.5068%2022.2025%2016.1801%2023.1021ZM7.77464%2018.591C7.77464%2018.591%2010.5765%2014.4525%2016.1801%2014.0283V12.5246C9.9724%2013.0259%204.6001%2018.2696%204.6001%2018.2696C4.6001%2018.2696%207.64612%2027.0735%2016.1801%2027.8575V26.2767C9.90814%2025.4798%207.77464%2018.591%207.77464%2018.591Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ok=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOllama%3c/title%3e%3cpath%20d='M7.905%201.09c.216.085.411.225.588.41.295.306.544.744.734%201.263.191.522.315%201.1.362%201.68a5.054%205.054%200%20012.049-.636l.051-.004c.87-.07%201.73.087%202.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67%201.67%200%2001.589-.41c.257-.1.53-.118.796-.042.401.114.745.368%201.016.737.248.337.434.769.561%201.287.23.934.27%202.163.115%203.645l.053.04.026.019c.757.576%201.284%201.397%201.563%202.35.435%201.487.216%203.155-.534%204.088l-.018.021.002.003c.417.762.67%201.567.724%202.4l.002.03c.064%201.065-.2%202.137-.814%203.19l-.007.01.01.024c.472%201.157.62%202.322.438%203.486l-.006.039a.651.651%200%2001-.747.536.648.648%200%2001-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643%200%2001.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644%200%2001.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229%204.229%200%2000-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653%200%2001-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288%203.288%200%2000-1.772-.332c-1.245.099-2.343.801-2.67%201.686a.652.652%200%2001-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066%201.588a4.07%204.07%200%2000-.068%201.886c.112.558.331%201.02.582%201.269l.008.007c.212.207.257.53.109.785-.36.622-.629%201.549-.673%202.44-.05%201.018.186%201.902.719%202.536l.016.019a.643.643%200%2001.095.69c-.576%201.236-.753%202.252-.562%203.052a.652.652%200%2001-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339%204.339%200%2001-.598-1.309l-.005-.019a5.764%205.764%200%2001-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352%205.352%200%2001.093-2.49c.262-.915.777-1.701%201.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622%201.015-.737.266-.076.54-.059.797.042zm4.116%209.09c.936%200%201.8.313%202.446.855.63.527%201.005%201.235%201.005%201.94%200%20.888-.406%201.58-1.133%202.022-.62.375-1.451.557-2.403.557-1.009%200-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845%200-.707.398-1.417%201.056-1.946.668-.537%201.55-.849%202.485-.849zm0%20.896a3.07%203.07%200%2000-1.916.65c-.461.37-.722.835-.722%201.25%200%20.428.21.829.61%201.134.455.347%201.124.548%201.943.548.799%200%201.473-.147%201.932-.426.463-.28.7-.686.7-1.257%200-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662%201.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375%200%2001-.376.373.375.375%200%2001-.376-.373v-.46l-.271-.218a.347.347%200%2001-.052-.49.353.353%200%2001.494-.051l.215.172.22-.174a.353.353%200%2001.49.051zm-5.04-1.919c.478%200%20.867.39.867.871a.87.87%200%2001-.868.871.87.87%200%2001-.867-.87.87.87%200%2001.867-.872zm8.706%200c.48%200%20.868.39.868.871a.87.87%200%2001-.868.871.87.87%200%2001-.867-.87.87.87%200%2001.867-.872zM7.44%202.3l-.003.002a.659.659%200%2000-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216%201.631-.124%202.782.43-.128.899-.208%201.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628%200%2000-.107-.09L7.44%202.3zm9.174.04l-.002.001a.628.628%200%2000-.107.09c-.156.163-.32.45-.453.814-.29.794-.387%201.776-.23%202.572l.058.097.008.014h.03a5.184%205.184%200%20011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659%200%2000-.285-.239h-.004z'%3e%3c/path%3e%3c/svg%3e`,kk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M32.8377%2017.282C33.2127%2016.25%2033.3072%2015.218%2033.2127%2014.1875C33.1197%2013.1571%2032.7447%2012.1251%2032.2752%2011.1876C31.4322%209.78209%2030.2127%208.6571%2028.8072%208.0001C27.3072%207.34461%2025.7127%207.15711%2024.1197%207.53211C23.3698%206.78212%2022.5253%206.12512%2021.5878%205.65713C20.6503%205.18913%2019.5253%205.00013%2018.4948%205.00013C16.8851%204.99074%2015.3125%205.48246%2013.9948%206.40712C12.6824%207.34311%2011.7449%208.6571%2011.2754%2010.1571C10.1504%2010.4376%209.21289%2010.9071%208.27539%2011.4696C7.4324%2012.1251%206.77541%2012.9696%206.21291%2013.8126C5.36992%2015.2195%205.08792%2016.8125%205.27542%2018.407C5.46399%2019.9968%206.11605%2021.496%207.1504%2022.718C6.79608%2023.7086%206.66795%2024.7659%206.77541%2025.8124C6.86991%2026.8444%207.2449%2027.8749%207.7129%2028.8124C8.55739%2030.2194%209.77538%2031.3444%2011.1824%2031.9999C12.6824%2032.6569%2014.2753%2032.8444%2015.8698%2032.4694C16.6198%2033.2194%2017.4628%2033.8749%2018.4003%2034.3444C19.3378%2034.8139%2020.4628%2034.9999%2021.4948%2034.9999C23.1043%2035.0097%2024.6769%2034.5185%2025.9947%2033.5944C27.3072%2032.6569%2028.2447%2031.3444%2028.7127%2029.8444C29.7719%2029.6432%2030.7682%2029.1934%2031.6197%2028.5319C32.4627%2027.8749%2033.2127%2027.1249%2033.6822%2026.1874C34.5251%2024.7819%2034.8071%2023.1875%2034.6196%2021.5945C34.4322%2020%2033.8697%2018.5015%2032.8377%2017.282ZM21.5878%2033.0304C20.0878%2033.0304%2018.9628%2032.5609%2017.9323%2031.7179C17.9323%2031.7179%2018.0253%2031.6234%2018.1198%2031.6234L24.1197%2028.1554C24.2862%2028.0803%2024.4196%2027.9469%2024.4947%2027.7804C24.5698%2027.636%2024.6021%2027.4731%2024.5877%2027.3109V18.875L27.1197%2020.375V27.3124C27.1455%2028.0547%2027.0215%2028.7945%2026.755%2029.4878C26.4885%2030.181%2026.085%2030.8134%2025.5687%2031.3473C25.0523%2031.8811%2024.4337%2032.3054%2023.7497%2032.5949C23.0658%2032.8843%2022.3305%2033.0314%2021.5878%2033.0304ZM9.49488%2027.8749C8.83789%2026.7499%208.55739%2025.4374%208.83789%2024.125C8.83789%2024.125%208.93239%2024.2195%209.02539%2024.2195L15.0253%2027.6874C15.1693%2027.7638%2015.3325%2027.7966%2015.4948%2027.7819C15.6823%2027.7819%2015.8698%2027.7819%2015.9628%2027.6874L23.2753%2023.4695V26.3749L17.1823%2029.9374C16.5506%2030.3042%2015.8527%2030.5427%2015.1287%2030.6393C14.4046%2030.7358%2013.6686%2030.6884%2012.9629%2030.4999C11.4629%2030.1249%2010.2449%2029.1874%209.49488%2027.8749ZM7.9004%2014.8445C8.56239%2013.7234%209.58826%2012.8627%2010.8074%2012.4056V19.532C10.8074%2019.718%2010.8074%2019.907%2010.9004%2020C10.9755%2020.1665%2011.1089%2020.2998%2011.2754%2020.375L18.5878%2024.5944L16.0573%2026.0944L10.0574%2022.625C9.41842%2022.2639%208.85742%2021.7797%208.40684%2021.2004C7.95627%2020.6211%207.62506%2019.9582%207.4324%2019.25C7.05741%2017.8445%207.1504%2016.157%207.9004%2014.8445ZM28.6197%2019.625L21.3073%2015.407L23.8377%2013.9071L29.8377%2017.375C30.7752%2017.9375%2031.5252%2018.6875%2031.9947%2019.625C32.4642%2020.5625%2032.7447%2021.5945%2032.6502%2022.7195C32.5603%2023.7755%2032.1699%2024.7837%2031.5252%2025.6249C30.8697%2026.4694%2030.0252%2027.1249%2028.9947%2027.4999V20.375C28.9947%2020.1875%2028.9947%2020%2028.9002%2019.907C28.9002%2019.907%2028.8072%2019.718%2028.6197%2019.625ZM31.1502%2015.875C31.1502%2015.875%2031.0572%2015.782%2030.9627%2015.782L24.9627%2012.3126C24.7752%2012.2196%2024.6822%2012.2196%2024.4947%2012.2196C24.3072%2012.2196%2024.1197%2012.2196%2024.0252%2012.3126L16.7128%2016.532V13.6251L22.8073%2010.0626C23.7448%209.50009%2024.7752%209.31259%2025.9002%209.31259C26.9322%209.31259%2027.9627%209.68759%2028.9002%2010.3446C29.7447%2011.0001%2030.4947%2011.8446%2030.8697%2012.7821C31.2447%2013.7196%2031.3377%2014.8445%2031.1502%2015.875ZM15.4003%2021.125L12.8699%2019.625V12.5946C12.8699%2011.5626%2013.1503%2010.4376%2013.7128%209.59459C14.2753%208.6571%2015.1198%208.0001%2016.0573%207.53211C17.0127%207.05249%2018.0956%206.88812%2019.1503%207.06261C20.1823%207.15711%2021.2128%207.62511%2022.0573%208.2821C22.0573%208.2821%2021.9628%208.3751%2021.8698%208.3751L15.8698%2011.8446C15.7033%2011.9197%2015.57%2012.0531%2015.4948%2012.2196C15.4003%2012.4071%2015.4003%2012.5001%2015.4003%2012.6876V21.125ZM16.7128%2018.125L19.9948%2016.25L23.2753%2018.125V21.875L19.9948%2023.75L16.7128%2021.875V18.125Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ak=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eopencode%3c/title%3e%3cpath%20d='M16%206H8v12h8V6zm4%2016H4V2h16v20z'%3e%3c/path%3e%3c/svg%3e`,jk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M728.039%20234C819.325%20234%20893.323%20308.62%20893.323%20400.668C893.323%20492.716%20819.325%20567.336%20728.039%20567.336L891.984%20732.656C912.81%20753.655%20898.061%20789.56%20868.613%20789.56H397.472C245.333%20789.56%20122%20665.193%20122%20511.78C122%20358.367%20245.333%20234%20397.472%20234H728.039ZM397.472%20345.112C306.189%20345.112%20232.189%20419.732%20232.189%20511.78C232.189%20603.828%20306.189%20678.448%20397.472%20678.448C488.756%20678.448%20562.756%20603.828%20562.756%20511.78C562.756%20419.732%20488.756%20345.112%20397.472%20345.112Z'%20fill='currentColor'%20transform='scale(0.0234375)'/%3e%3c/svg%3e`,Mk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSiliconCloud%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M22.956%206.521H12.522c-.577%200-1.044.468-1.044%201.044v3.13c0%20.577-.466%201.044-1.043%201.044H1.044c-.577%200-1.044.467-1.044%201.044v4.174C0%2017.533.467%2018%201.044%2018h10.434c.577%200%201.044-.467%201.044-1.043v-3.13c0-.578.466-1.044%201.043-1.044h9.391c.577%200%201.044-.467%201.044-1.044V7.565c0-.576-.467-1.044-1.044-1.044z'%3e%3c/path%3e%3c/svg%3e`,Nk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eStepfun%3c/title%3e%3cpath%20d='M22.012%200h1.032v.927H24v.968h-.956V3.78h-1.032V1.896h-1.878v-.97h1.878V0zM2.6%2012.371V1.87h.969v10.502h-.97zm10.423.66h10.95v.918h-6.208v9.579h-4.742V13.03zM5.629%203.333v12.356H0v4.51h10.386V8L20.859%208l-.003-4.668-15.227.001z'%20fill='url(%23lobe-icons-stepfun-_R_0_)'%20fill-rule='evenodd'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-stepfun-_R_0_'%20x1='1.646'%20x2='18.342'%20y1='1.916'%20y2='22.091'%3e%3cstop%20stop-color='%2301A9FF'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%230160FF'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e`,Pk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eTencentCloud%3c/title%3e%3cpath%20d='M20.0483%2017.1416C19.6945%2017.4914%2018.987%2018.0161%2017.7488%2018.0161C17.2182%2018.0161%2016.5991%2018.0161%2016.3338%2018.0161C15.98%2018.0161%2013.3268%2018.0161%2010.143%2018.0161C12.4424%2015.8298%2014.3881%2013.9932%2014.565%2013.8183C14.7419%2013.6434%2015.1841%2013.2061%2015.6263%2012.8563C16.5107%2012.0692%2017.2182%2011.9817%2017.8373%2011.9817C18.7217%2011.9817%2019.4292%2012.3316%2020.0483%2012.8563C21.2864%2013.9932%2021.2864%2016.0047%2020.0483%2017.1416ZM21.5518%2011.457C20.6674%2010.495%2019.3408%209.88281%2017.9257%209.88281C16.6875%209.88281%2015.6263%2010.3201%2014.6534%2011.0197C14.2997%2011.3695%2013.769%2011.7194%2013.3268%2012.2441C12.9731%2012.5939%205.36719%2019.9401%205.36719%2019.9401C5.80939%2020.0276%206.34003%2020.0276%206.78223%2020.0276C7.22443%2020.0276%2016.0685%2020.0276%2016.4222%2020.0276C17.1298%2020.0276%2017.6604%2020.0276%2018.191%2019.9401C19.3408%2019.8527%2020.4905%2019.4154%2021.4633%2018.5409C23.4975%2016.6168%2023.4975%2013.381%2021.5518%2011.457Z'%20fill='%2300A3FF'%3e%3c/path%3e%3cpath%20d='M9.1701%2010.9323C8.19726%2010.2326%207.22442%209.88281%206.07469%209.88281C4.65965%209.88281%203.33304%2010.495%202.44864%2011.457C0.502952%2013.4685%200.502952%2016.6168%202.53708%2018.6283C3.42148%2019.4154%204.30589%2019.8527%205.36717%2019.9401L7.4013%2018.0161C7.04754%2018.0161%206.60533%2018.0161%206.25157%2018.0161C5.10185%2017.9287%204.39433%2017.5789%203.95212%2017.1416C2.71396%2015.9172%202.71396%2013.9932%203.86368%2012.7688C4.48277%2012.1566%205.19029%2011.8943%206.07469%2011.8943C6.60533%2011.8943%207.4013%2011.9817%208.19726%2012.7688C8.55102%2013.1186%209.52386%2013.8183%209.87763%2014.1681H9.96607L11.2927%2012.8563V12.7688C10.6736%2012.1566%209.70075%2011.3695%209.1701%2010.9323Z'%20fill='%2300C8DC'%3e%3c/path%3e%3cpath%20d='M18.4564%208.74536C17.4836%206.12171%2014.9188%204.28516%2012.0003%204.28516C8.5511%204.28516%205.80945%206.82135%205.27881%209.96973C5.54413%209.96973%205.80945%209.88228%206.16321%209.88228C6.51697%209.88228%206.95917%209.96973%207.31294%209.96973C7.75514%207.78336%209.70082%206.20917%2012.0003%206.20917C13.946%206.20917%2015.6263%207.34608%2016.4223%209.00773C16.4223%209.00773%2016.5107%209.09518%2016.5107%209.00773C17.1298%208.92027%2017.8373%208.74536%2018.4564%208.74536C18.4564%208.83282%2018.4564%208.83282%2018.4564%208.74536Z'%20fill='%23006EFF'%3e%3c/path%3e%3c/svg%3e`,Fk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.25'%20d='M27.539%2018.922C29.2526%2018.922%2030.8959%2018.2413%2032.1076%2017.0296C33.3193%2015.8179%2034%2014.1746%2034%2012.461C34%2010.7474%2033.3193%209.10406%2032.1076%207.89238C30.8959%206.68071%2029.2526%206%2027.539%206C25.8254%206%2024.1821%206.68071%2022.9704%207.89238C21.7587%209.10406%2021.078%2010.7474%2021.078%2012.461C21.078%2014.1746%2021.7587%2015.8179%2022.9704%2017.0296C24.1821%2018.2413%2025.8254%2018.922%2027.539%2018.922ZM27.539%2034C29.2526%2034%2030.8959%2033.3193%2032.1076%2032.1076C33.3193%2030.8959%2034%2029.2526%2034%2027.539C34%2025.8254%2033.3193%2024.1821%2032.1076%2022.9704C30.8959%2021.7587%2029.2526%2021.078%2027.539%2021.078C25.8254%2021.078%2024.1821%2021.7587%2022.9704%2022.9704C21.7587%2024.1821%2021.078%2025.8254%2021.078%2027.539C21.078%2029.2526%2021.7587%2030.8959%2022.9704%2032.1076C24.1821%2033.3193%2025.8254%2034%2027.539%2034ZM12.461%2034C14.1746%2034%2015.8179%2033.3193%2017.0296%2032.1076C18.2413%2030.8959%2018.922%2029.2526%2018.922%2027.539C18.922%2025.8254%2018.2413%2024.1821%2017.0296%2022.9704C15.8179%2021.7587%2014.1746%2021.078%2012.461%2021.078C10.7474%2021.078%209.10406%2021.7587%207.89238%2022.9704C6.68071%2024.1821%206%2025.8254%206%2027.539C6%2029.2526%206.68071%2030.8959%207.89238%2032.1076C9.10406%2033.3193%2010.7474%2034%2012.461%2034Z'%20fill='currentColor'/%3e%3cpath%20d='M12.461%2018.922C16.0293%2018.922%2018.922%2016.0293%2018.922%2012.461C18.922%208.89269%2016.0293%206%2012.461%206C8.89269%206%206%208.89269%206%2012.461C6%2016.0293%208.89269%2018.922%2012.461%2018.922Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ik=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eVercel%3c/title%3e%3cpath%20d='M12%200l12%2020.785H0L12%200z'%3e%3c/path%3e%3c/svg%3e`,Lk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eVolcengine%3c/title%3e%3cpath%20d='M19.44%2010.153l-2.936%2011.586a.215.215%200%2000.214.261h5.87a.215.215%200%2000.214-.261l-2.95-11.586a.214.214%200%2000-.412%200zM3.28%2012.778l-2.275%208.96A.214.214%200%20001.22%2022h4.532a.212.212%200%2000.214-.165.214.214%200%20000-.097l-2.276-8.96a.214.214%200%2000-.41%200z'%20fill='%2300E5E5'%3e%3c/path%3e%3cpath%20d='M7.29%205.359L3.148%2021.738a.215.215%200%2000.203.261h8.29a.214.214%200%2000.215-.261L7.7%205.358a.214.214%200%2000-.41%200z'%20fill='%23006EFF'%3e%3c/path%3e%3cpath%20d='M14.44.15a.214.214%200%2000-.41%200L8.366%2021.739a.214.214%200%2000.214.261H19.9a.216.216%200%2000.171-.078.214.214%200%2000.044-.183L14.439.15z'%20fill='%23006EFF'%3e%3c/path%3e%3cpath%20d='M10.278%207.741L6.685%2021.736a.214.214%200%2000.214.264h7.17a.215.215%200%2000.214-.264L10.688%207.741a.214.214%200%2000-.41%200z'%20fill='%2300E5E5'%3e%3c/path%3e%3c/svg%3e`,Rk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.4579%2015.6036L26.1529%2035H20.0656L6.37059%2015.6036H12.4579ZM12.4524%2026.3764L15.4974%2030.6909L12.4551%2035H6.36377L12.4524%2026.3764ZM33.6365%207.15727V35H28.647V14.2236L33.6365%207.15727ZM33.6365%205L20.0656%2024.2205L17.0206%2019.9073L27.5451%205H33.6365Z'%20fill='currentColor'/%3e%3c/svg%3e`,zk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eXiaomiMiMo%3c/title%3e%3cpath%20d='M.958%2015.936a.459.459%200%2001.459.44v2.729a.46.46%200%2001-.918%200v-2.729a.459.459%200%2001.459-.44zm4.814-2.035a.46.46%200%2001.553.45v4.754a.458.458%200%2011-.918%200V15.48L3.74%2017.202a.462.462%200%2001-.655.016.462.462%200%2001-.065-.082L.628%2014.67a.459.459%200%2001.658-.637l2.124%202.187%202.127-2.188a.46.46%200%2001.235-.13zm2.068.004a.46.46%200%2001.458.445v4.755a.46.46%200%2001-.458.458.459.459%200%2001-.458-.458V14.35a.459.459%200%2001.458-.445zm1.973%202.014a.46.46%200%2001.46.457v2.729a.46.46%200%2001-.784.324.46.46%200%2001-.134-.324v-2.729a.46.46%200%2001.458-.458zm.002-2.045a.458.458%200%2001.328.157l2.127%202.19%202.125-2.19a.459.459%200%2001.784.318v4.756a.46.46%200%2001-.455.458.46.46%200%2001-.458-.458V15.48l-1.667%201.723a.46.46%200%2001-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46%200%2001-.008-.667.461.461%200%2001.338-.128zm6.797%201.206a.46.46%200%2001.53.651A1.966%201.966%200%200019.81%2018.4a.462.462%200%2001.623.18.46.46%200%2001-.181.624%202.863%202.863%200%2001-1.38.353l-.142-.004a2.88%202.88%200%2001-2.393-4.263.461.461%200%2001.274-.21zm.864-.931a2.884%202.884%200%20013.915%203.914.46.46%200%2001-.402.24l-.057-.004a.458.458%200%2001-.164-.055.46.46%200%2001-.182-.622%201.967%201.967%200%2000-2.669-2.67.459.459%200%2011-.441-.803zM9.59%206.368c1.481%200%201.696%201.202%201.696%201.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133%200-1.289-.03-1.384-1.136-.082-.932.675-1.61%202.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379%201.012-.567%201.764-.567zm4.427.1c1.263%200%202.082.97%202.083%202.15%200%201.181-.824%202.154-2.083%202.154-1.26%200-2.084-.972-2.084-2.152%200-1.18.82-2.153%202.084-2.153zm6.801.015c.68%200%201.202.465%201.197%201.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628%200-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22%201.22%200%2001.947-.516c.398%200%20.76.193.982.686a1.321%201.321%200%20011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311%208.07l2.14%202.602H4.24L2.725%208.796%201.21%2010.672H0L2.138%208.07.13%205.583h1.138l1.458%201.772zm4.149%203.317h-.916V6.644h.916v4.028zm16.99%200h-.916V6.644h.916v4.028zM9.925%208.71c-1.055%200-1.359.412-1.326.742.032.329.324.537.757.537a1.013%201.013%200%20001.014-.968l.002-.31h-.447zM14.018%207.3c-.663%200-1.184.487-1.184%201.32%200%20.832.52%201.32%201.184%201.32.662%200%201.182-.49%201.182-1.32%200-.832-.52-1.32-1.182-1.32zM6.417%205.001a.568.568%200%2001.587.582.588.588%200%2001-1.175%200A.57.57%200%20016.417%205zm16.991%200a.57.57%200%2001.592.582.588.588%200%2001-1.174%200%20.57.57%200%2001.357-.542.572.572%200%2001.225-.04z'%3e%3c/path%3e%3c/svg%3e`,Bk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.1312%207.50002L17.4088%2011.1913H5.81625L8.5375%207.50002H20.1325H20.1312ZM34.0675%2028.81L31.3475%2032.5H19.795L22.5125%2028.81H34.0675ZM35%207.50002L16.58%2032.5H5L23.42%207.50002H35Z'%20fill='currentColor'/%3e%3c/svg%3e`,Vk={alibaba:rk,"alibaba-cn":rk,"alibaba-coding-plan":rk,"alibaba-coding-plan-cn":rk,"alibaba-token-plan":rk,"alibaba-token-plan-cn":rk,"amazon-bedrock":ik,anthropic:ak,"claude-subscription":ak,"google-antigravity":ok,azure:sk,"azure-openai-responses":sk,cerebras:ck,cloudflare:lk,"cloudflare-workers-ai":lk,cohere:uk,cursor:dk,deepinfra:fk,deepseek:pk,fireworks:mk,"fireworks-ai":mk,"github-copilot":hk,google:gk,"google-gemini-cli":gk,"google-vertex":gk,groq:_k,huggingface:vk,hunyuan:yk,kimi:bk,"kimi-code":bk,"kimi-coding":bk,"kimi-coding-plan":bk,"kimi-for-coding":bk,meta:xk,minimax:wk,"minimax-cn":wk,"minimax-coding-plan":wk,mistral:Tk,moonshot:Ek,"moonshot-global":Ek,moonshotai:Ek,nvidia:Dk,ollama:Ok,"ollama-cloud":Ok,openai:kk,"openai-codex":kk,opencode:Ak,"opencode-free":Ak,"opencode-go":Ak,openrouter:jk,siliconcloud:Mk,siliconflow:Mk,stepfun:Nk,"stepfun-ai":Nk,"stepfun-ai-step-plan":Nk,"stepfun-step-plan":Nk,tencent:Pk,"tencent-coding-plan":Pk,"tencent-token-plan":Pk,"tencent-tokenhub":yk,"lm-studio":Sk,lmstudio:Sk,localai:Ck,"local-ai":Ck,together:Fk,togetherai:Fk,vercel:Ik,volcengine:Lk,"volcengine-agent-plan":Lk,"volcengine-ark":Lk,"volcengine-coding-plan":Lk,xai:Rk,"xai-oauth":Rk,xiaomi:zk,xiaomimimo:zk,"xiaomi-token-plan-ams":zk,"xiaomi-token-plan-cn":zk,"xiaomi-token-plan-sgp":zk,zai:Bk,"z-ai":Bk,"zai-coding-plan":Bk,zenmux:`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eZenMux%3c/title%3e%3cg%20transform='scale(0.15)'%3e%3cpath%20clip-rule='evenodd'%20d='M76.5655%2012.5465C83.6841%2012.273%2098.0909%2013.2144%20109.616%2023.5631C119.071%2032.0522%20122.328%2047.7904%20120.125%2059.9938C118.105%2071.1802%20113.346%2080.3327%20115.21%2088.8073C117.074%2097.2819%20121.818%20101.46%20125.854%20103.215C129.752%20104.909%20133.52%20104.401%20132.803%20107.621C132.085%20110.841%20127.21%20112.028%20123.65%20112.028C121.698%20112.028%20115.795%20111.519%20113.176%20109.824C110.081%20107.821%20109.391%20106.026%20108.213%20104.583C108.013%20104.338%20107.66%20104.509%20107.707%20104.821C108.244%20108.371%20109.724%20114.394%20112.125%20118.13C114.068%20121.152%20114.871%20123.356%20119.322%20127.085C123.774%20130.813%20125.853%20134.203%20121.525%20136.604C117.68%20138.736%20109.322%20134.373%20104.407%20128.977C99.9829%20124.12%2096.9028%20118.129%2095.6846%20114.231C95.0335%20112.147%2094.3811%20108.562%2093.7296%20105.63C93.644%20105.244%2093.116%20105.306%2093.1046%20105.701C92.8883%20113.164%2091.7152%20120.291%2090.0001%20127.932C88.7652%20133.433%2085.7626%20140.135%2083.0508%20144.203C79.7442%20149.163%2074.8354%20150.711%2071.1866%20149.355C68.2684%20148.27%2070.3392%20144.582%2071.1866%20141.389C72.034%20138.197%2073.7294%20131.519%2074.8712%20124.203C75.9046%20117.581%2076.1781%20111.026%2075.7178%20104.815C75.6893%20104.436%2075.1073%20104.378%2074.9893%20104.739C74.0382%20107.652%2072.2455%20112.481%2070.9376%20115.418C68.2097%20121.543%2066.1909%20124.231%2060.5977%20130.672C55.5676%20136.464%2041.1004%20144.655%2039.2422%20136.604C38.7338%20134.401%2041.3978%20133.436%2043.8546%20131.519C47.5476%20128.638%2050.6336%20123.525%2053.5596%20117.282C56.1869%20111.676%2057.5223%20106.253%2057.7266%20102.791C57.746%20102.457%2057.3268%20102.331%2057.1387%20102.607C55.9225%20104.391%2054.1317%20106.805%2052.1592%20108.807C48.8643%20112.152%2045.2098%20115.595%2040.9717%20117.282C34.1576%20119.994%2027.2089%20118.129%2027.7169%20113.215C28.1415%20109.109%2032.725%20109.959%2038.4307%20103.734C44.0239%2097.6323%2045.8876%2092.8857%2046.2266%2087.6315C46.4975%2083.428%2042.3854%2073.4513%2040.295%2068.9879C36.9616%2061.8693%2034.4984%2041.666%2044.5323%2028.6491C57.0743%2012.3784%2072.1582%2012.7159%2076.5655%2012.5465ZM57.0001%2040.9997C52.3335%2040.9997%2050.0002%2044.5815%2050.0001%2048.9997C50.0001%2053.4179%2052.5927%2056.9997%2057.0001%2056.9997C61.4074%2056.9996%2064.0001%2053.4179%2064.0001%2048.9997C63.9999%2044.5816%2061.6666%2040.9997%2057.0001%2040.9997ZM95.0001%2040.9997C90.3335%2040.9997%2088.0002%2044.5815%2088.0001%2048.9997C88.0001%2053.4179%2090.5927%2056.9997%2095.0001%2056.9997C99.4074%2056.9996%20102%2053.4179%20102%2048.9997C102%2044.5816%2099.6666%2040.9997%2095.0001%2040.9997Z'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/svg%3e`},Hk=[[/deepseek/i,`deepseek`],[/(?:xiaomi|mimo)/i,`xiaomimimo`],[/kimi/i,`kimi`],[/moonshot/i,`moonshot`],[/(?:claude|anthropic)/i,`anthropic`],[/gemini/i,`google`],[/qwen/i,`alibaba`],[/llama/i,`meta`],[/minimax/i,`minimax`],[/(?:mistral|mixtral)/i,`mistral`],[/grok/i,`xai`],[/(?:openai|chatgpt|gpt[-_.:0-9])/i,`openai`],[/(?:^|[^a-z0-9])o[134](?:[^a-z0-9]|$)/i,`openai`],[/(?:^|[^a-z0-9])glm[-_.:0-9]/i,`zai`],[/doubao/i,`volcengine`],[/hunyuan/i,`hunyuan`],[/(?:stepfun|(?:^|[/_.:-])step-[0-9])/i,`stepfun`],[/(?:cohere|command[-_.:0-9])/i,`cohere`]],Uk={anthropic:`#d8765b`,deepseek:`#4d6bfe`,google:`#4285f4`,"google-gemini-cli":`#4285f4`,"google-vertex":`#4285f4`,"google-antigravity":`#6387ed`,meta:`#1685f8`,azure:`#168cda`,"azure-openai-responses":`#168cda`,"amazon-bedrock":`#e99b32`,alibaba:`#ed7d31`,"alibaba-cn":`#ed7d31`,mistral:`#ef8b31`,nvidia:`#76b900`,cohere:`#659a81`,groq:`#ef6847`};function Wk({id:e,modelId:t,modelName:n}){let r=e.trim().toLowerCase(),i=`${t??``} ${n??``}`,a=Object.hasOwn(Vk,r)?r:Hk.find(([e])=>e.test(i))?.[1],o=a?Vk[a]:void 0;return(0,q.jsx)(`span`,{className:`models-provider-icon${o?``:` models-provider-connection`}`,"aria-hidden":`true`,style:o?{maskImage:`url("${o}")`,color:Uk[r]??(a?Uk[a]:void 0)}:void 0,children:!o&&(0,q.jsx)(Oc,{strokeWidth:1.75})})}function Gk({snapshot:e,model:t,pending:n,disabled:r,actions:i,onChooseModel:a,onClose:o,active:s=!0}){let{t:c}=W(),l=e?.thinking,u=n??l?.level??``,d=e?.preferences.hiddenThinkingLevels??[],f=(l?.available??[]).filter(e=>!d.some(t=>t===e)||e===u||e===l?.level),[p]=(0,K.useState)(l?.level??``),[m,h]=(0,K.useState)(null),g=(0,K.useRef)(null),_=(0,K.useRef)(null),v=(0,K.useId)(),y=e=>e?e[0].toUpperCase()+e.slice(1):c(`unknownState`),b=()=>{g.current=null,h(null)};(0,K.useEffect)(()=>(s&&_.current?.focus(),()=>{g.current=null}),[s]);let x=()=>{let e=g.current;if(b(),e===null||r||!l?.supported)return;let t=f[e];t&&t!==u&&i.selectThinking(t)},S=m??Math.max(0,f.indexOf(u)),C=m===null?u:f[S]??u;return(0,q.jsxs)(`div`,{className:`thinking-controls`,children:[(0,q.jsxs)(`div`,{className:`thinking-strength`,"aria-live":`polite`,children:[(0,q.jsx)(`small`,{children:c(`thinkingLevel`)}),(0,q.jsx)(`span`,{children:y(C)})]}),(0,q.jsxs)(`div`,{className:`thinking-slider`,style:{"--thinking-position":f.length>1?S/(f.length-1):0},children:[(0,q.jsx)(`div`,{className:`thinking-slider-dots`,"aria-hidden":`true`,children:f.map((e,t)=>(0,q.jsx)(`span`,{"data-filled":t<=S},e))}),(0,q.jsx)(`input`,{ref:_,type:`range`,"aria-label":c(`thinkingLevel`),"aria-valuetext":y(C),"aria-describedby":v,min:0,max:Math.max(0,f.length-1),step:1,value:S,disabled:r||!l?.supported||f.length<2,onChange:e=>{g.current=Number(e.target.value),h(g.current)},onPointerUp:x,onPointerCancel:b,onBlur:x,onKeyUp:e=>{[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key)&&x()},onKeyDown:e=>{e.key===`Escape`&&(b(),o(),e.preventDefault(),e.stopPropagation())}})]}),(0,q.jsx)(`p`,{className:`thinking-available-levels`,id:v,children:c(`thinkingAvailableLevels`,{levels:f.map(y).join(` · `)})}),(0,q.jsx)(V,{content:`${t?nk(t):c(`selectModel`)} · ${c(`selectModel`)}`,placement:`above`,children:(0,q.jsxs)(`button`,{type:`button`,className:`thinking-model-link`,disabled:n!==null,onClick:a,children:[t&&(0,q.jsx)(Wk,{id:t.provider,modelId:t.id,modelName:t.name}),(0,q.jsx)(`span`,{children:t?.name||t?.id||c(`selectModel`)}),(0,q.jsx)(os,{"aria-hidden":`true`})]})}),(0,q.jsx)(V,{content:c(`resetThinking`,{level:y(p)}),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,className:`thinking-reset`,"aria-label":c(`resetThinking`,{level:y(p)}),disabled:r||!f.includes(p)||u===p,onClick:()=>{b(),i.selectThinking(p)},children:(0,q.jsx)(he,{"aria-hidden":`true`})})}),l&&!f.includes(l.level)&&(0,q.jsx)(`p`,{className:`thinking-control-notice`,role:`status`,children:c(`thinkingLevelMismatch`)})]})}var Kk=250;function qk(e){let{t}=W(),[n,r]=(0,K.useState)(``),[i,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(!1),c=(0,K.useRef)(e.modelSearch);(0,K.useEffect)(()=>{o&&(c.current=e.modelSearch)},[o,e.modelSearch]);let l=o?e.modelSearch:c.current,u=(0,K.useRef)(!1),d=(0,K.useRef)(null),f=(0,K.useRef)(null),p=(0,K.useRef)(null),m=(0,K.useId)(),h=(0,K.useRef)([]),g=e.draftModel??e.currentModel,_=e.thinkingDisabledReason===`thinkingInactiveHint`?void 0:e.snapshot?.thinking,v=_?.supported===!0,y=e.thinkingPendingLevel??_?.level??`off`,b=(i??(v?`thinking`:`models`))===`thinking`,x=e.snapshot?.models??[],S=(e.snapshot?.truncation.modelsOmitted??0)>0,C=x.length>0||S,w=n.trim(),T=l.query===w,E=S&&!!w&&(!T||l.status===`loading`),D=w?S?T?l.models:[]:x.filter(e=>[e.provider,e.id,e.name,e.label].some(e=>e.toLocaleLowerCase().includes(w.toLocaleLowerCase()))):x,O=new Map;for(let e of D){let t=O.get(e.provider);t?t.push(e):O.set(e.provider,[e])}let k=[...O.values()].flat(),A=e.actions.searchModels,j=e.modelSearch.query,M=e.modelSearch.status;(0,K.useEffect)(()=>{if(!o||!S||!w||j===w&&M!==`idle`)return;let e=window.setTimeout(()=>{A(w)},Kk);return()=>window.clearTimeout(e)},[o,S,w,A,j,M]);let N=(t,n)=>{e.actions.selectModel(`${t.provider}/${t.id}`),n()},P=g?nk(g):t(e.snapshot?C?`selectModel`:`configureModels`:`loadingModels`),F=!e.snapshot||e.sessionSwitching||e.modelSelectionPending||e.promptAdmissionPending||!e.workspaceDraft&&!!e.snapshot?.selectedSession&&!LD(e.snapshot)||e.liveRunning;(0,K.useEffect)(()=>{if(!o){u.current=!1;return}e.thinkingNeedsSession&&(g||b)&&!u.current&&(u.current=!0,e.actions.prepareSession())},[o,b,g,e.thinkingNeedsSession,e.actions]),(0,K.useEffect)(()=>{if(!o||b)return;let e=requestAnimationFrame(()=>p.current?.focus());return()=>cancelAnimationFrame(e)},[o,b]),(0,K.useEffect)(()=>{if(!o)return;let e=e=>{let t=e.target;d.current=t instanceof Element&&!t.closest(`.astryx-complex-selector-popup, .model-picker`)?t.closest(`button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex], [contenteditable='true']`):null};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[o]);let I=JSON.stringify([e.snapshot?.currentSessionId,e.snapshot?.currentSessionPath,g?.provider,g?.id]),ee=(0,K.useRef)(I);(0,K.useEffect)(()=>{ee.current!==I&&a(null),b&&ee.current!==I&&!u.current&&f.current?.close(),ee.current=I,e.thinkingNeedsSession||(u.current=!1)},[I,b,e.thinkingNeedsSession]),(0,K.useEffect)(()=>{F&&!u.current&&f.current?.close()},[F]);let L=(0,K.useRef)(e.openRequest);return(0,K.useEffect)(()=>{e.openRequest!==L.current&&(L.current=e.openRequest,e.openRequest&&!F&&(a(`models`),f.current?.open()))},[e.openRequest,F]),(0,q.jsx)(tk,{className:`model-selector model-picker${o?` is-open`:``}`,label:v?`${P}, ${t(`thinkingLevel`)}: ${y}`:P,isLabelHidden:!0,value:g?`${g.provider}/${g.id}`:``,triggerLabel:(0,q.jsxs)(`span`,{className:`model-thinking-label`,title:P,children:[g&&(0,q.jsx)(Wk,{id:g.provider,modelId:g.id,modelName:g.name}),(0,q.jsx)(`span`,{className:`model-picker-label`,children:g?.name||g?.id||P}),v&&(0,q.jsx)(`span`,{className:`model-picker-thinking`,children:y[0].toUpperCase()+y.slice(1)})]}),variant:`ghost`,size:`sm`,placement:`above`,alignment:`end`,isDisabled:F,isLoading:e.modelSelectionPending,handleRef:f,onOpenChange:t=>{s(t),t&&r(``),t||(e.actions.clearModelSearch(),d.current?.isConnected&&d.current.focus({preventScroll:!0}),d.current=null)},children:(i,s,c)=>e.thinkingNeedsSession&&(g||b)?(0,q.jsx)(`p`,{className:`thinking-preparing`,role:`status`,children:t(`switchingSession`)}):b?(0,q.jsx)(Gk,{active:o,snapshot:e.snapshot,model:g,pending:e.thinkingPendingLevel??null,disabled:F||!!e.thinkingDisabledReason,actions:e.actions,onClose:c,onChooseModel:()=>a(`models`)},JSON.stringify([I,o])):(0,q.jsxs)(`div`,{className:`model-search-panel ${S?`searchable`:``}`,children:[v&&(0,q.jsxs)(`button`,{type:`button`,className:`model-thinking-back`,onClick:()=>a(`thinking`),children:[(0,q.jsx)(Ko,{"aria-hidden":`true`}),t(`thinkingLevel`)]}),S&&(0,q.jsx)(`p`,{className:`model-search-truncation`,role:`status`,children:t(`modelsTruncated`,{shown:x.length,omitted:e.snapshot?.truncation.modelsOmitted??0})}),e.snapshot&&!C&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`noModels`)}),C&&(0,q.jsxs)(`label`,{className:`model-search-input`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:t(`searchModels`)}),(0,q.jsx)(`input`,{ref:p,name:`model-search`,autoComplete:`off`,spellCheck:!1,"aria-controls":m,value:n,placeholder:t(`searchModelsPlaceholder`),onChange:t=>{let n=t.currentTarget.value;r(n),n.trim()||e.actions.clearModelSearch()},onKeyDown:e=>{e.nativeEvent.isComposing||e.keyCode===229||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),c()):e.key===`ArrowDown`&&k.length&&(e.preventDefault(),e.stopPropagation(),h.current[0]?.focus()))}})]}),E&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`searchingModels`)}),S&&w&&T&&l.status===`error`&&(0,q.jsxs)(`p`,{className:`model-search-status model-search-error`,role:`alert`,children:[l.error??t(`modelSearchFailed`),(0,q.jsx)(V,{content:t(`retryModelSearch`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,className:`model-search-retry`,"aria-label":t(`retryModelSearch`),onClick:()=>void A(w),children:(0,q.jsx)(he,{"aria-hidden":`true`})})})]}),C&&w&&(!S||T&&l.status===`ready`)&&k.length===0&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`noMatchingModels`)}),S&&w&&T&&l.status===`ready`&&l.matchesOmitted>0&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`modelSearchTruncated`,{omitted:l.matchesOmitted})}),C&&(0,q.jsx)(`div`,{className:`model-search-options`,id:m,role:`listbox`,"aria-label":t(`selectModel`),"aria-busy":E,children:k.map((t,n)=>{let r=g?.provider===t.provider&&g.id===t.id;return(0,q.jsxs)(K.Fragment,{children:[(n===0||k[n-1]?.provider!==t.provider)&&(0,q.jsx)(`div`,{className:`model-provider-heading`,"aria-hidden":`true`,children:t.provider}),(0,q.jsxs)(`button`,{className:`model-search-option`,type:`button`,disabled:e.thinkingPendingLevel!=null,role:`option`,"aria-selected":r,"aria-label":nk(t),title:nk(t),ref:e=>{h.current[n]=e},onClick:()=>N(t,c),onKeyDownCapture:e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),c();return}if(e.key===`ArrowUp`&&n===0){e.preventDefault(),e.stopPropagation(),p.current?.focus();return}let t=e.key===`ArrowDown`?Math.min(n+1,k.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:e.key===`End`?k.length-1:null;t!==null&&t!==n&&(e.preventDefault(),e.stopPropagation(),h.current[t]?.focus())},children:[(0,q.jsx)(`span`,{className:`model-option-icon`,"aria-hidden":`true`,children:(0,q.jsx)(Wk,{id:t.provider,modelId:t.id,modelName:t.name})}),(0,q.jsxs)(`span`,{className:`model-menu-item-text`,children:[(0,q.jsx)(`span`,{className:`model-menu-item-label`,children:t.name||t.id}),t.name&&t.name!==t.id&&(0,q.jsx)(`span`,{className:`model-menu-item-sub`,children:t.id})]}),r&&(0,q.jsx)(rs,{className:`model-option-check`,"aria-hidden":`true`})]})]},`${t.provider}/${t.id}`)})}),e.onOpenProviders&&(0,q.jsxs)(q.Fragment,{children:[g&&_&&!v&&(0,q.jsx)(`p`,{className:`model-search-status`,children:t(`modelThinkingNotEnabled`)}),(0,q.jsxs)(`button`,{className:`model-settings-command`,type:`button`,onClick:()=>{c(),e.onOpenProviders?.()},children:[(0,q.jsx)(kc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:t(`openModelSettings`)}),(0,q.jsx)(os,{className:`model-settings-chevron`,"aria-hidden":`true`})]})]})]})})}var Jk=`openpi-slash-command-list`;function Yk(e){return`openpi-slash-command-${e}`}function Xk(e,t){let n=t.trim().toLocaleLowerCase(),r=n?e.filter(e=>e.name.toLocaleLowerCase().includes(n)):[],i=n?r.length>0?r:e.filter(e=>[e.description,e.source].some(e=>e?.toLocaleLowerCase().includes(n))):[...e];return[...i.filter(e=>e.availability===`available`),...i.filter(e=>e.availability===`unsupported`)]}function Zk({source:e}){return e===`extension`?(0,q.jsx)(Cc,{}):e===`prompt`?(0,q.jsx)(Fs,{}):(0,q.jsx)(Pc,{})}function Qk(e){let{t}=W(),n=(0,K.useRef)(null),r=e.open!==!1,i=(0,K.useRef)(e);(0,K.useLayoutEffect)(()=>{r&&(i.current=e)},[r,e]);let a=r?e:i.current,o={hidden:!r,inert:!r};(0,K.useLayoutEffect)(()=>{let e=n.current,t=e?.parentElement;if(!r||!e||!t||!a.preferBelow)return;let i=()=>{let n=window.visualViewport,r=n?.offsetTop??0,i=n?.height??window.innerHeight,a=r+i,o=t.getBoundingClientRect(),s=Math.max(0,a-o.bottom-8-12),c=Math.max(0,o.top-r-8-12),l=s>=Math.min(e.scrollHeight,224,i*.32)||s>=c?`below`:`above`,u=l===`below`?s:c;e.dataset.placement=l,e.style.setProperty(`--slash-command-available-height`,`${Math.floor(u)}px`)};i();let o=new ResizeObserver(i);return o.observe(e),o.observe(t),window.addEventListener(`resize`,i),window.visualViewport?.addEventListener(`resize`,i),window.visualViewport?.addEventListener(`scroll`,i),()=>{o.disconnect(),window.removeEventListener(`resize`,i),window.visualViewport?.removeEventListener(`resize`,i),window.visualViewport?.removeEventListener(`scroll`,i)}},[r,a.preferBelow]);let s=a.commands[a.activeIndex];return(0,K.useEffect)(()=>{!r||!s||(n.current?.querySelector(`[data-command-index="${a.activeIndex}"]`))?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[r,s,a.activeIndex]),a.draft?(0,q.jsx)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`status`,children:t(`commandSessionRequired`)}):a.commandDiscovery.status===`idle`||a.commandDiscovery.status===`loading`?(0,q.jsx)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`status`,children:t(`commandsLoading`)}):a.commandDiscovery.status===`error`?(0,q.jsxs)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`alert`,children:[(0,q.jsx)(`strong`,{children:t(`commandsUnavailable`)}),(0,q.jsx)(`span`,{children:a.commandDiscovery.error})]}):a.commandDiscovery.status===`ready`&&a.commands.length===0?(0,q.jsx)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`status`,children:t(`commandsNoMatch`)}):(0,q.jsxs)(`div`,{...o,ref:n,className:`slash-command-menu`,children:[(0,q.jsx)(`div`,{id:Jk,role:`listbox`,"aria-label":t(`commands`),children:a.commands.map((e,n)=>{let r=e.availability===`unsupported`;return(0,q.jsxs)(`button`,{id:Yk(n),"data-command-index":n,className:`slash-command-option`,type:`button`,role:`option`,"aria-selected":n===a.activeIndex,"aria-disabled":r,disabled:r,onMouseEnter:()=>a.onSelect(n),onMouseDown:e=>e.preventDefault(),onClick:()=>a.onComplete(e),children:[(0,q.jsx)(`span`,{className:`slash-command-icon`,children:(0,q.jsx)(Zk,{source:e.source})}),(0,q.jsxs)(`span`,{className:`slash-command-copy`,children:[(0,q.jsxs)(`span`,{className:`slash-command-heading`,children:[(0,q.jsxs)(`strong`,{children:[`/`,e.name]}),(0,q.jsx)(`span`,{children:t(`commandSource_${e.source}`)})]}),e.description&&(0,q.jsx)(`span`,{children:e.description}),r&&(0,q.jsx)(`span`,{children:t(`commandUnavailable_${e.unavailableReason??`not_integrated`}`)}),e.support&&(0,q.jsx)(`span`,{children:t(`commandSupport_${e.support}`)})]}),(0,q.jsx)(`span`,{className:`slash-command-support`,children:r?t(`commandUnsupported`):e.action?t(`commandOpensPanel`):e.argumentHint?t(`commandAcceptsArguments`):null})]},`${e.source}:${e.name}`)})}),a.commandDiscovery.commandsOmitted>0&&(0,q.jsx)(`div`,{className:`slash-command-bounded`,role:`status`,children:t(`commandsBounded`,{count:a.commandDiscovery.commandsOmitted})})]})}function $k(e){return{key:JSON.stringify([`workspace`,e]),kind:`workspace`,workspacePath:e}}function eA(e){return{key:JSON.stringify([`session`,e.id,e.path]),kind:`session`,workspacePath:e.cwd,sessionId:e.id,sessionPath:e.path}}function tA(e){let{t}=W(),n=e.snapshot?.selectedSession,r=e.selectedPath===void 0?n?.path??null:e.selectedPath,i=n?.path===r?n.path:null,a=!e.workspaceDraft&&!e.sessionSwitching&&n&&i?eA(n):null,[o]=(0,K.useState)(()=>QD(ZD())),s=(0,K.useSyncExternalStore)(o.subscribe,o.storageState),c=(0,K.useRef)(a??$k(e.selectedWorkspace)),l=e.workspaceDraft||!n&&!e.snapshot?.currentSessionId?$k(e.selectedWorkspace):a??c.current,[u,d]=(0,K.useState)(()=>o.read(c.current.key)),f=(0,K.useRef)(u);f.current=u;let{prompt:p,images:m,files:h=[],caret:g}=u,_=p.trim().length,v=_>Ce,y=l.key,b=(0,K.useRef)(new Map),x=(0,K.useRef)(null),S=(0,K.useRef)(!1),C=e.modelSearch??{query:``,status:`idle`,models:[],totalMatches:0,matchesOmitted:0,error:null},[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(0),[A,j]=(0,K.useState)(!1),[M,N]=(0,K.useState)(null),[P,F]=(0,K.useState)(null),[I,ee]=(0,K.useState)(0),L=(0,K.useMemo)(()=>new de,[]),R=(0,K.useRef)(null),te=(0,K.useRef)(y);(0,K.useEffect)(()=>{te.current!==y&&(te.current=y,N(null))},[y]);let[z,B]=(0,K.useState)(!1),[ne,re]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(null),[oe,se]=(0,K.useState)(!1),[ce,le]=(0,K.useState)(null),[H,ue]=(0,K.useState)(null),fe=H?.owner===y?H.panel:null,pe=fe===`queue`,me=e=>ue(fe===e?null:{owner:y,panel:e}),[he,ge]=(0,K.useState)(null),_e=he===y,ve=(0,K.useId)(),ye=(0,K.useId)(),be=(0,K.useRef)(null),xe=(0,K.useRef)(null),[Se,we]=(0,K.useState)(null),Te=(0,K.useRef)(null),Ee=(0,K.useRef)(null),U=(0,K.useRef)(null),De=(0,K.useRef)(null),Oe=(0,K.useRef)(null),ke=(0,K.useRef)(null),G=(0,K.useRef)(null),je=(0,K.useRef)(!1),Me=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=!0;return o.ready.then(()=>{if(!e)return;let t=o.read(c.current.key);f.current=t,S.current=!0,d(t)}),()=>{e=!1}},[o]),(0,K.useEffect)(()=>{let e=e=>{!G.current&&!Array.from(b.current.values()).some(e=>e.pending)&&!(o.storageState().status!==`saved`&&(o.hasContent()||o.hasUnsavedChanges()))||(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[o]),(0,K.useLayoutEffect)(()=>{let e=Te.current;if(!e)return;let t=De.current,n=e.getBoundingClientRect().height;t?.animation?.cancel(),e.style.height=`auto`,e.style.height=_e?`min(420px, 50dvh)`:`${Math.min(e.scrollHeight,220)}px`;let r=e.getBoundingClientRect().height;e.style.overflowY=_e||e.scrollHeight>220?`auto`:`hidden`;let i=xe.current;i&&(e.focus({preventScroll:!0}),e.setSelectionRange(i.start,i.end,i.direction),e.scrollTop=i.scrollTop,xe.current=null),De.current={owner:y,height:r},t?.owner===y&&n>0&&Math.abs(n-r)>1&&e.animate&&!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches&&(De.current.animation=e.animate([{height:`${n}px`},{height:`${r}px`}],{duration:180,easing:`cubic-bezier(.16, 1, .3, 1)`}))},[p,y,_e]),(0,K.useLayoutEffect)(()=>{let e=Te.current;e&&S.current&&(S.current=!1,e.setSelectionRange(g,g))},[p,g,y]),(0,K.useEffect)(()=>()=>De.current?.animation?.cancel(),[]),(0,K.useLayoutEffect)(()=>{let e=Ee.current;if(!e)return;let t=U.current,n=e.getBoundingClientRect().height,r=new Map(Array.from(t?.positions.keys()??[]).map(e=>{let t=getComputedStyle(e).translate.split(` `).map(Number.parseFloat);return[e,{x:t[0]||0,y:t[1]||0}]}));t?.animations.forEach(e=>{e.cancel()});let i=e.getBoundingClientRect(),a=i.height,o=new Map(Array.from(e.querySelectorAll(`.composer-attachment`)).map(e=>{let t=e.getBoundingClientRect();return[e,{left:t.left-i.left,top:t.top-i.top}]})),s=[];if(U.current={owner:y,height:a,positions:o,animations:s},!e.animate||t?.owner!==y||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let c={duration:220,easing:`cubic-bezier(.16, 1, .3, 1)`};t.height!==a&&s.push(e.animate([{height:`${n===a?t.height:n}px`},{height:`${a}px`}],c));for(let[e,n]of o){let i=t.positions.get(e);if(!i)continue;let a=r.get(e),o=i.left+(a?.x??0)-n.left,l=i.top+(a?.y??0)-n.top;Math.abs(o)+Math.abs(l)>1&&s.push(e.animate([{translate:`${o}px ${l}px`},{translate:`0 0`}],c))}},[m,h,y]),(0,K.useEffect)(()=>()=>U.current?.animations.forEach(e=>{e.cancel()}),[]),(0,K.useEffect)(()=>{if(A||!je.current)return;je.current=!1;let e=window.setTimeout(()=>{Te.current?.focus(),Te.current?.setSelectionRange(g,g)},0);return()=>window.clearTimeout(e)},[g,A]);let Ne=(0,K.useRef)(null),Pe=(0,K.useRef)(!1);(0,K.useLayoutEffect)(()=>{let n=c.current;if(n.key===l.key)return;Oe.current=null;let r=o.read(l.key),i=!1;if(n.kind===`workspace`&&l.kind===`session`&&n.workspacePath===l.workspacePath&&e.createdSession?.sessionId===l.sessionId&&e.createdSession.sessionPath===l.sessionPath&&e.createdSession.workspacePath===l.workspacePath&&o.move(n.key,l.key)){r=f.current;let e=G.current;e?.ownerKey===n.key&&(e.ownerKey=l.key);let t=b.current.get(n.key);t&&(b.current.delete(n.key),t.owner=l,b.current.set(l.key,t))}else{if(n.kind===`session`&&l.kind===`workspace`&&n.workspacePath===l.workspacePath&&e.workspaceDraft&&e.sessionSwitching&&!r.prompt&&r.images.length===0&&!r.files?.length){let{prompt:e,images:t,files:n,caret:a}=f.current,s=o.edit(l.key,r,{prompt:e,images:t,files:n,caret:a});s?r=s:i=!0}G.current?.controller.abort(),G.current=null,B(!1)}c.current=l,f.current=r,S.current=!0,je.current=!1,d(r),re(i?t(`draftLimit`):null),ae(null),we(null),se(!1),j(!1),D(!0)},[o,l,e.workspaceDraft,e.sessionSwitching,e.createdSession,t]),(0,K.useLayoutEffect)(()=>()=>{G.current?.controller.abort(),G.current=null},[]);let Fe=(0,K.useCallback)((e,n=y)=>{if(c.current.key!==n)return!1;let r=f.current,i=o.edit(n,r,e);return i?(i.revision!==r.revision&&(b.current.get(n)?.pending||b.current.delete(n),re(e=>e===t(`draftLimit`)?null:e)),e.prompt!==void 0&&(!e.prompt.trim()||e.prompt.startsWith(`/`))&&(Oe.current=null),f.current=i,d(i),!0):(re(t(`draftLimit`)),!1)},[o,y,t]);(0,K.useEffect)(()=>{let t=Oe.current;t&&(e.workspaceDraft||e.snapshot?.runtime.plan!==`ready`||e.snapshot.runtime.planRevision!==t.planRevision||e.snapshot.currentSessionId!==t.sessionId||e.snapshot.selectedSession?.path!==t.sessionPath||r!==t.sessionPath)&&(Oe.current=null)},[e.snapshot?.runtime.plan,e.snapshot?.runtime.planRevision,e.snapshot?.currentSessionId,e.snapshot?.selectedSession?.path,e.workspaceDraft,r]);let Ie=!!(!e.workspaceDraft&&n?.id&&LD(e.snapshot,n)&&r===n.path),Le=!!(e.selectedWorkspace&&(e.workspaceDraft||!n&&!e.snapshot?.currentSessionId)),Re=!!(!e.workspaceDraft&&n&&r===n.path),ze=Re||Le,Be=Ie&&e.snapshot?.selectedExecution?.sessionId===n?.id&&e.snapshot?.selectedExecution?.sessionPath===n?.path&&e.snapshot?.selectedExecution?.compaction?.state===`running`,Ve=!e.workspaceDraft&&(Ie?e.snapshot?.runtime.status===`running`||e.liveRunning:e.snapshot?.selectedExecution?.sessionId===n?.id&&e.snapshot?.selectedExecution?.sessionPath===n?.path&&e.snapshot?.selectedExecution?.status===`running`),He=Ie&&Ve&&!!(e.activeTurn??e.snapshot?.runtime.activeTurn),Ue=e.activeTurn??e.snapshot?.runtime.activeTurn,We=Ie&&Ve&&!Be&&!e.turnCancellationPending&&Ue?.sessionId===n?.id&&!!Ue?.commandId,Ge=Se?.ownerKey===y&&Se.expectedTurnCommandId===Ue?.commandId?Se.mode:e.snapshot?.preferences.followUpBehavior??`followUp`,Ke=We&&Ge===`steer`&&Ue?Ue:null,qe=e.sessionSwitching||!!e.planSelectionPending||!ze&&!!e.selectedWorkspace,Je=e.commandDiscovery??{sessionId:null,status:`idle`,commands:[],totalAvailable:0,commandsOmitted:0,error:null},Ye=/^\/[^\s/]*$/u.test(p)&&g>0,Xe=w&&Ye&&!E&&ze&&!e.sessionSwitching,Ze=Ie?n?.id:null,Qe=Ye?p.slice(1):``,$e=(0,K.useMemo)(()=>Xk(Je.commands,Qe),[Qe,Je.commands]),et=Xe&&!e.workspaceDraft&&Je.status===`ready`&&$e.length>0,tt=ze&&!!e.selectedWorkspace&&!e.sessionSwitching&&!e.planSelectionPending,nt=(0,K.useRef)(e.addSourcesRequest?.revision??0);(0,K.useEffect)(()=>{let r=e.addSourcesRequest;if(!(!r||r.revision===nt.current)&&(nt.current=r.revision,!(!tt||n?.id!==r.sessionId||n.path!==r.path))){if(r.feedback){let{filePath:e,side:n,line:i,code:a}=r.feedback,o=`${ZO(e)} — ${t(n===`new`?`sourceFeedbackNew`:`sourceFeedbackOld`,{path:e,line:i})}\n> ${a.split(` +`)),t===e.text&&(!f||f.revision===e.artifact.revision)?jD.delete(u):jD.set(u,{text:t,revision:f?.revision??e.artifact.revision}),l(null),a())},discard:()=>{jD.delete(u),l(null),a()},reconcile:()=>{!f||!e||e.truncated||(jD.set(u,{text:f.text,revision:e.artifact.revision}),l(null),a())},save:async()=>{if(!(!f||!e||o||!p)){s(!0),l(null);try{let t=await n.saveArtifact(e.artifact,f.revision,f.text);jD.get(u)===f&&jD.delete(u),d.current===u&&(r(f.text,t.revision),l({key:u,error:!1,text:i(`filesSaved`)}))}catch(e){d.current===u&&l({key:u,error:!0,text:e instanceof ge&&e.code===`ARTIFACT_CHANGED`?i(`filesSaveConflict`):i(`filesSaveFailed`)})}finally{s(!1),a()}}},message:c?.key===u?c:null}}function PD({artifact:e,client:t}){let{t:n}=W(),[r,i]=(0,K.useState)(null),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(!1),{sessionId:l,handle:u,revision:d}=e;return(0,K.useEffect)(()=>{let e=new AbortController,r;return i(null),o(null),t.downloadArtifact({sessionId:l,handle:u,revision:d},e.signal).then(async t=>{let a=xd(new Uint8Array(await t.slice(0,12).arrayBuffer()));if(!e.signal.aborted){if(!a)throw Error(n(`artifactImagePreviewFailed`));r=URL.createObjectURL(new Blob([t],{type:a})),i({url:r,loaded:!1})}}).catch(t=>{e.signal.aborted||o(t instanceof Error?t.message:n(`artifactImagePreviewFailed`))}),()=>{e.abort(),r&&URL.revokeObjectURL(r)}},[l,u,d,t,n]),a?(0,q.jsxs)(`div`,{role:`alert`,className:`evidence-warning`,children:[(0,q.jsx)(`p`,{children:n(`artifactImagePreviewFailed`)}),a!==n(`artifactImagePreviewFailed`)&&(0,q.jsx)(`small`,{children:a})]}):(0,q.jsxs)(`div`,{className:`artifact-image-preview`,"data-original":s,children:[(0,q.jsxs)(`div`,{className:`file-preview-toolbar`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":!s,onClick:()=>c(!1),children:n(`filesFitImage`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":s,onClick:()=>c(!0),children:n(`filesOriginalImage`)})]}),!r?.loaded&&(0,q.jsx)(`p`,{role:`status`,children:n(`readingFile`)}),(0,q.jsx)(`div`,{className:`file-media-viewport`,children:r&&(0,q.jsx)(`img`,{src:r.url,alt:e.name,hidden:!r.loaded,onLoad:()=>i(e=>e?{...e,loaded:!0}:null),onError:()=>o(n(`artifactImagePreviewFailed`))})})]})}var FD=(0,K.forwardRef)(function({sessionId:e,sessionPath:t,children:n,disabled:r=!1,embedded:i=!1,active:a=!0,onOpen:o,onClose:s},c){let{t:l}=W(),u=(0,K.useMemo)(()=>new de,[]),d=be(),f=i?d?.artifact:void 0,[p,m]=(0,K.useState)(()=>f?{sessionId:e,sessionPath:t,reference:f.reference}:null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(f?.source??!1),[y,b]=(0,K.useState)(f?.editing??!1),[x,S]=(0,K.useState)(null),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(null),[k,A]=(0,K.useState)(!1),[M,N]=(0,K.useState)(!1),P=(0,K.useRef)(null),F=(0,K.useRef)(null),I=(0,K.useRef)(0),ee=(0,K.useRef)(null),L=(0,K.useRef)(null),R=(0,K.useRef)(null),te=(0,K.useRef)(null),B=(0,K.useRef)(f?.scroll??0),ne=(0,K.useRef)(!!f);(0,K.useLayoutEffect)(()=>{!i||!d||(d.artifact=p?{reference:h?.artifact.path?encodeURI(h.artifact.path):p.reference,source:_,editing:y,scroll:B.current,document:d.artifact?.document}:void 0)},[i,d,p,h?.artifact.path,_,y]);let re=(0,K.useRef)(null),ie=(0,K.useRef)(new Set),ae=(0,K.useRef)(void 0),oe=(0,K.useRef)(!1),se=(0,K.useRef)(null),ce=JSON.stringify([e,t,r]),le=(0,K.useRef)(ce);le.current=ce;let H=!!(p&&!r&&p.sessionId===e&&p.sessionPath===t);(0,K.useEffect)(()=>()=>{se.current!==null&&(window.cancelAnimationFrame(se.current),se.current=null)},[ce]);let ue=(0,K.useCallback)((n,i,a)=>{if(r)return;let s=document.activeElement,c=a??(s instanceof HTMLElement?s:null),l=!!(i||c?.closest(`.artifact-panel`));l||(F.current=c),o?.(l),se.current!==null&&(window.cancelAnimationFrame(se.current),se.current=null),oe.current=!0,I.current++,g(null),v(!1),b(!1),B.current=0,ne.current=!1,S(null),w(!1),O(null),A(!1),ae.current=i,m({reference:n,parent:i,sessionId:e,sessionPath:t})},[r,o,e,t]),fe=(0,K.useCallback)(({restoreFocus:e=!0}={})=>{if(!p)return;let t=++I.current,n=F.current,r=document.activeElement,i=H?`user`:`context`;if(F.current=null,oe.current=!1,ae.current=void 0,m(null),g(null),O(null),P.current?.abort(),s?.(i),se.current!==null&&window.cancelAnimationFrame(se.current),i===`context`||!e){se.current=null;return}se.current=window.requestAnimationFrame(()=>{se.current=null,t===I.current&&le.current===ce&&(document.activeElement===document.body||document.activeElement===r||document.activeElement===n)&&n?.isConnected&&n.checkVisibility({visibilityProperty:!0})&&n.focus()})},[s,p,H,ce]);j({isActive:H&&a,onDismiss:fe,getContainer:()=>ee.current,isPresent:()=>ee.current?.contains(document.activeElement)??!1}),(0,K.useImperativeHandle)(c,()=>({close:fe}),[fe]),(0,K.useLayoutEffect)(()=>{y?R.current?.focus({preventScroll:!0}):te.current&&(te.current.scrollTop=B.current)},[y]),(0,K.useLayoutEffect)(()=>{!a||!h||!ne.current||!te.current||(te.current.scrollTop=B.current,ne.current=!1)},[a,h]),(0,K.useEffect)(()=>{!p||H||(I.current++,m(null),g(null),O(null),oe.current=!1,F.current=null,ae.current=void 0,s?.(`context`))},[p,H,s]),(0,K.useEffect)(()=>{if(!p||!e||!H||!a)return;let t=new AbortController,n,r=p.parent,i,o=!1,s,c=!1,l=2e3;oe.current&&(oe.current=!1,L.current?.focus());let d=async()=>{if(document.visibilityState===`hidden`){i=setTimeout(d,2e3);return}try{if(n||=(await(p.external?u.authorizeArtifact(e,p.reference,t.signal):u.resolveArtifact(e,p.reference,r,t.signal))).handle,r&&=(u.releaseArtifact(e,r).catch(()=>void 0),void 0),o){u.releaseArtifact(e,n).catch(()=>void 0);return}if(s){if((await u.artifactMetadata(e,n,t.signal)).identity===s){o||S(null),l=Math.min(l*2,3e4);return}if(c){o||A(!0),l=3e4;return}}let i=await u.artifactPreview(e,n,t.signal);o||(s=i.identity,c=i.text!==void 0,l=2e3,g(e=>e?.artifact.path===i.artifact.path&&e.artifact.revision===i.artifact.revision?{...i,text:e.text,truncated:e.truncated,nextOffset:e.nextOffset}:i),S(null))}catch(e){let t=e instanceof ge&&[401,403,410].includes(e.status);!o&&t&&(g(null),re.current?.abort()),o||w(e instanceof ge&&e.code===`ARTIFACT_DENIED`),l=Math.min(l*2,3e4),o||S(e instanceof Error?e.message:`Unable to read file`),t&&(o=!0)}finally{o||(i=setTimeout(d,l))}};return d(),()=>{o=!0,t.abort(),clearTimeout(i),re.current?.abort(),P.current?.abort(),N(!1),E(!1),n&&n!==ae.current&&u.releaseArtifact(e,n).catch(()=>void 0),r&&u.releaseArtifact(e,r).catch(()=>void 0);for(let e of ie.current)URL.revokeObjectURL(e);ie.current.clear()}},[u,p,H,e,a]);let pe=(0,K.useMemo)(()=>({open:ue,disabled:r}),[ue,r]),_e=h?.artifact.path??p?.reference??``,ve=h?.artifact.name??_e.split(/[\\/]/u).at(-1)??_e,ye=ND(h,t,u,(e,t)=>{g(n=>n&&{...n,text:e,truncated:!1,nextOffset:void 0,artifact:{...n.artifact,revision:t,bytes:new TextEncoder().encode(e).length}}),A(!1),m(e=>e&&{...e})}),xe=async()=>{if(!h||T)return;let e=new AbortController;re.current=e,E(!0);try{let t=await u.downloadArtifact(h.artifact,e.signal);if(e.signal.aborted)return;let n=URL.createObjectURL(t);ie.current.add(n);let r=document.createElement(`a`);r.href=n,r.download=h.artifact.name,r.click(),setTimeout(()=>{URL.revokeObjectURL(n),ie.current.delete(n)},1e3)}catch(t){e.signal.aborted||S(t instanceof Error?t.message:`Download failed`)}finally{e.signal.aborted||E(!1)}},Se=async()=>{if(!h?.nextOffset||P.current)return;let e=h,t=new AbortController;P.current=t,N(!0);try{let n=await u.artifactPreview(e.artifact.sessionId,e.artifact.handle,t.signal,{offset:e.nextOffset,revision:e.artifact.revision});t.signal.aborted||g(t=>t?.artifact.handle===e.artifact.handle&&t.artifact.revision===n.artifact.revision?{...n,text:(t.text??``)+(n.text??``)}:t)}catch(e){t.signal.aborted||S(e instanceof Error?e.message:l(`filesReadFailed`))}finally{P.current===t&&(P.current=null,N(!1))}};return(0,q.jsxs)($E.Provider,{value:pe,children:[n,p&&H&&(0,q.jsx)(z,{children:(0,q.jsxs)(`aside`,{ref:ee,className:`artifact-panel${i?` artifact-panel-embedded`:``}`,"aria-label":l(`filePreview`),onKeyDown:e=>{if(i&&(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`){e.preventDefault(),e.stopPropagation(),ye.save();return}},children:[(0,q.jsxs)(`header`,{children:[(0,q.jsxs)(`div`,{className:`artifact-title`,children:[(0,q.jsx)(`small`,{title:_e,children:i?_e.split(/[\\/]/u).slice(0,-1).at(-1)||l(`files`):`${l(`filePreview`)} · ${l(`artifactReadOnly`)}`}),i&&(0,q.jsx)(os,{"aria-hidden":`true`}),(0,q.jsx)(`h2`,{title:_e,children:ve}),ye.dirty&&(0,q.jsx)(`span`,{className:`file-unsaved`,role:`img`,title:l(`filesUnsaved`),"aria-label":l(`filesUnsaved`),children:`●`})]}),(0,q.jsxs)(`div`,{className:`artifact-header-actions`,children:[i&&h?.text!==void 0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`fieldset`,{className:`file-mode-switch`,"aria-label":l(`filesMode`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":!y,onClick:()=>b(!1),children:l(`filesPreview`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":y,disabled:!ye.canEdit,title:l(h.truncated?`filesEditLoadFirst`:h.artifact.editable?`filesEdit`:`filesEditUnavailable`),onClick:()=>{B.current=te.current?.scrollTop??0,b(!0)},children:l(`filesEdit`)})]}),(y||ye.dirty||ye.saving)&&(0,q.jsxs)(`button`,{type:`button`,className:`file-save-button`,title:`${l(`filesSave`)} (Cmd/Ctrl+S)`,disabled:!ye.dirty||ye.saving||!ye.canEdit,onClick:()=>void ye.save(),children:[(0,q.jsx)(Tc,{"aria-hidden":`true`}),l(ye.saving?`filesSaving`:ye.dirty?`filesSave`:`filesSaved`)]}),ye.dirty&&(0,q.jsx)(`button`,{type:`button`,title:l(`filesDiscard`),"aria-label":l(`filesDiscard`),disabled:ye.saving,onClick:()=>{window.confirm(l(`filesDiscardConfirm`))&&ye.discard()},children:(0,q.jsx)(he,{"aria-hidden":`true`})})]}),!i&&h?.text!==void 0&&AD(ve)&&(0,q.jsxs)(`button`,{type:`button`,className:`file-source-toggle`,"aria-pressed":_,onClick:()=>v(e=>!e),children:[_?(0,q.jsx)(As,{"aria-hidden":`true`}):(0,q.jsx)(bs,{"aria-hidden":`true`}),l(_?`filesPreview`:`filesSource`)]}),(0,q.jsx)(V,{content:l(`copyFilePath`),placement:`below`,children:(0,q.jsx)(`button`,{className:`artifact-icon-button`,type:`button`,"aria-label":l(`copyFilePath`),onClick:()=>{let e=++I.current;td(_e).then(t=>{e===I.current&&O(t?`copied`:`failed`)})},children:D===`copied`?(0,q.jsx)(rs,{"aria-hidden":`true`}):(0,q.jsx)(_s,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:l(`refreshFile`),placement:`below`,children:(0,q.jsxs)(`button`,{className:`artifact-icon-button`,type:`button`,"aria-label":l(`refreshFile`),onClick:()=>{I.current++,O(null),S(null),w(!1),A(!1),ae.current=void 0,m(n=>n?{sessionId:e,sessionPath:t,reference:h?encodeURI(h.artifact.path):n.reference,...n.external?{external:!0}:{},...h?{}:{parent:n.parent}}:null)},children:[(0,q.jsx)(me,{"aria-hidden":`true`}),` `,l(`refreshFile`)]})}),(0,q.jsx)(V,{content:l(`downloadFile`),placement:`below`,children:(0,q.jsxs)(`button`,{className:`artifact-icon-button`,type:`button`,"aria-label":l(T?`downloadingFile`:`downloadFile`),disabled:!h||T,onClick:()=>void xe(),children:[(0,q.jsx)(Ts,{"aria-hidden":`true`}),` `,l(T?`downloadingFile`:`downloadFile`)]})}),(0,q.jsx)(V,{content:l(`closePreview`),placement:`below`,children:(0,q.jsx)(`button`,{className:`artifact-icon-button`,ref:L,type:`button`,"aria-label":l(`closePreview`),onClick:()=>fe(),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]})]}),(0,q.jsxs)(`div`,{className:`artifact-panel-body`,ref:te,onScroll:e=>{ne.current||(B.current=e.currentTarget.scrollTop,i&&d?.artifact&&(d.artifact.scroll=B.current))},children:[!i&&(0,q.jsx)(`div`,{className:`artifact-source`,children:(0,q.jsx)(`code`,{title:_e,children:_e})}),D&&(0,q.jsx)(`p`,{role:`status`,children:l(D===`copied`?`filePathCopied`:`copyFailed`)}),x&&(0,q.jsxs)(`p`,{role:`status`,className:`evidence-warning`,children:[h?l(`artifactOlderPreview`):``,x]}),k&&(0,q.jsx)(`p`,{className:`evidence-warning`,role:`status`,children:l(`filesContentChanged`)}),ye.message&&(0,q.jsx)(`p`,{role:`status`,className:ye.message.error?`evidence-warning`:`file-save-status`,children:ye.message.text}),ye.conflict&&(0,q.jsxs)(`div`,{className:`file-conflict`,children:[(0,q.jsx)(`p`,{children:l(`filesSaveConflict`)}),(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:l(`filesDiskVersion`)}),(0,q.jsx)(`pre`,{children:h?.text})]}),(0,q.jsx)(`button`,{type:`button`,disabled:!ye.canEdit||ye.saving,onClick:ye.reconcile,children:l(`filesReconcile`)})]}),C&&!p.external&&/^(?:\/(?!\/)|[a-z]:[\\/])/iu.test(p.reference)&&(0,q.jsxs)(`div`,{className:`artifact-external-access`,children:[(0,q.jsx)(`p`,{children:l(`artifactExternalAccess`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{oe.current=!0,S(null),w(!1),m({...p,parent:void 0,external:!0})},children:l(`artifactAuthorizeFile`)})]}),!h&&!x&&(0,q.jsx)(`p`,{role:`status`,children:l(`readingFile`)}),h&&(0,q.jsxs)(q.Fragment,{children:[h.truncated&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:l(`artifactPreviewTruncated`)}),/\.(?:png|jpe?g|gif|webp)$/iu.test(h.artifact.name)?(0,q.jsx)(PD,{artifact:h.artifact,client:u},JSON.stringify([h.artifact.sessionId,h.artifact.path,h.artifact.handle,h.artifact.revision])):(0,q.jsxs)($E.Provider,{value:{open:ue,disabled:r,parent:h.artifact.handle,sessionId:e},children:[i&&ye.canEdit&&(0,q.jsx)(`textarea`,{ref:R,hidden:!y,className:`file-editor`,"aria-label":l(`filesEditor`),spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:1048576,value:ye.text,disabled:ye.saving,onChange:e=>ye.change(e.currentTarget.value)}),!(i&&y&&ye.canEdit)&&(0,q.jsx)(kD,{preview:ye.dirty?{...h,text:ye.text}:h,client:u,source:_},`${h.artifact.path}:${h.artifact.revision}`)]}),h.nextOffset!==void 0&&(0,q.jsx)(`button`,{type:`button`,className:`file-read-more`,disabled:M||k,onClick:()=>void Se(),children:l(M?`readingFile`:`filesReadMore`)}),(0,q.jsxs)(`details`,{className:`artifact-file-details`,children:[(0,q.jsx)(`summary`,{children:l(`artifactFileDetails`)}),(0,q.jsx)(`p`,{className:`artifact-session`,children:l(`artifactSession`,{sessionId:e})}),(0,q.jsxs)(`p`,{className:`artifact-revision`,children:[l(`artifactVersion`),`:`,` `,(0,q.jsx)(`code`,{children:h.artifact.revision}),` ·`,` `,l(`artifactBytes`,{count:h.artifact.bytes})]})]})]})]})]})})]})});function ID(e,t){let n=e.name?.trim();if(n)return n;let r=e.firstMessage?.trim();return r&&r!==`(no messages)`?r:t}function LD(e){return e.split(/[\\/]/u).filter(Boolean).at(-1)||e}function RD(e,t=2){let n=e.split(/[\\/]/u).filter(Boolean);return n.length<=t?e:`…/${n.slice(-t).join(`/`)}`}function zD(e,t=96){let n=String(e??``).replace(/\s+/gu,` `).trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function BD(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:`${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}`}function VD(e,t=Date.now()){if(typeof e!=`number`)return``;let n=Math.max(0,Math.round((t-e)/1e3)),r=Math.floor(n/60),i=n%60;return r>0?`${r}m${String(i).padStart(2,`0`)}s`:`${i}s`}function HD(e,t=e?.selectedSession){if(!e||!t||t.id!==e.currentSessionId)return!1;let n=e.currentSessionPath??e.sessions.find(t=>t.id===e.currentSessionId&&t.controller===`web`)?.path??e.runtime.activeTurn?.sessionPath;return!!(n&&n===t.path)}function UD(e,t=[],n=[]){return t.find(t=>t.id===e)?.title||n.find(t=>t.id===e)?.title||e}function WD(e){return e&&typeof e==`object`?e:{}}function GD(e){let t=new Map;for(let n of e){let e=n.role===`toolResult`&&n.toolName===`subagent_spawn`,r=n.role===`toolResult`&&n.toolName===`subagent_send`,i=n.customType===`subagent-finished`,a=n.role===`toolResult`&&[`subagent_wait`,`subagent_check`].includes(n.toolName??``)||n.customType===`subagent-result`||i;if(!e&&!r&&!a||n.isError)continue;let o=WD(n.details);for(let a of Array.isArray(o.results)?o.results:[o]){let s=WD(a);if(typeof s.id!=`string`||!s.id||s.id.length>160||/[\u0000-\u001f\u007f]/u.test(s.id))continue;let c=t.get(s.id),l={...c,id:s.id,title:typeof s.title==`string`?s.title:c?.title??s.id};typeof s.model==`string`&&(l.model=s.model),e?l.receipt=n.content:r?(l.state=s.status===`running`?`running`:void 0,l.result=void 0):(i||(l.result=typeof o.displayContent==`string`?o.displayContent:n.content),l.state=s.outcome===`uncertain`?void 0:s.outcome===`interrupted`?`interrupted`:s.status===`done`||s.status===`error`||s.status===`running`?s.status:void 0),t.delete(s.id),t.set(s.id,l)}}return[...t.values()].slice(-32)}function KD(e,t,n=[],r=!0){let i=new Set(e.map(e=>e.id));return[...e.map(e=>({kind:`subagents`,id:e.id,title:e.title,taskPreview:e.taskPreview,state:e.outcome===`interrupted`?`interrupted`:e.status===`unknown`||!r&&e.status===`running`?void 0:e.status,timestamp:e.settledAt??e.createdAt,createdAt:e.createdAt,saved:!1})),...n.flatMap(e=>(e.children?.items??[]).map(e=>({kind:`workflows`,id:e.id,title:e.title,taskPreview:e.taskPreview,state:e.outcome===`interrupted`?`interrupted`:e.status===`unknown`||!r&&e.status===`running`?void 0:e.status,timestamp:e.settledAt??e.createdAt,createdAt:e.createdAt,saved:!1}))),...t.filter(e=>!i.has(e.id)).map(e=>({kind:`subagents`,id:e.id,title:e.title,taskPreview:void 0,state:e.state===`running`?void 0:e.state,timestamp:void 0,createdAt:void 0,saved:!0}))].sort((e,t)=>(t.timestamp??0)-(e.timestamp??0))}function qD(e){return e===`interrupted`?`interrupted`:e===`running`?`running`:e===`done`||e===`completed`?`done`:[`error`,`failed`,`aborted`,`killed`,`timed_out`].includes(e)?`error`:e===`uncertain`?`warn`:`unknown`}function JD({kind:e,label:t,status:n,elapsed:r,onClick:i}){return(0,q.jsxs)(i?`button`:`span`,{className:`activity-chip ${e} ${n}`,type:i?`button`:void 0,onClick:i,children:[n===`running`?(0,q.jsx)(`i`,{className:`activity-chip-dot`}):n===`done`?(0,q.jsx)(rs,{}):n===`error`?(0,q.jsx)(je,{}):n===`interrupted`?(0,q.jsx)(ps,{}):(0,q.jsx)(`span`,{className:`activity-chip-glyph`,children:`?`}),(0,q.jsx)(`span`,{className:`activity-chip-text`,title:t,children:t},`${n}:${t}`),r&&(0,q.jsx)(`span`,{className:`activity-chip-elapsed`,children:r})]})}function YD({snapshot:e,onInspectSubagent:t,observed:n=!0,expanded:r,onExpandedChange:i}){let{t:a}=W(),o=(0,K.useRef)(null),[,s]=(0,K.useState)(0),c=e?.runtime.capabilities,l=(0,K.useMemo)(()=>GD((e?.selectedSession?.entries??[]).flatMap(e=>e.message?[e.message]:[])),[e?.selectedSession?.entries]),u=c?.subagents,d=c?.workflows?.items??[],f=d.flatMap(e=>e.children?.items??[]),p=new Set([...(u?.items??[]).map(e=>`subagents:${e.id}`),...l.map(e=>`subagents:${e.id}`),...f.map(e=>`workflows:${e.id}`)]).size,m=Math.max(p,(u?.items.length??0)+(u?.omitted??0)+f.length+d.reduce((e,t)=>e+(t.children?.omitted??0),0)),h=KD(u?.items??[],l,d,n),g=h.filter(e=>e.state===`running`).length,_=h.filter(e=>e.state===`done`).length,v=h.filter(e=>e.state===`error`||e.state===`interrupted`).length,y=Math.max(0,m-g-_-v),b=[a(`subagentProgress`,{running:g,completed:_}),v?a(`subagentSummaryOther`,{count:v}):``,y?a(`subagentSummaryUnknown`,{count:y}):``].filter(Boolean).join(` · `),x=u?.childExecutionAdmission,S=(c?.workflows?.items??[]).some(e=>e.status===`running`);(0,K.useEffect)(()=>{if(!S)return;let e=window.setInterval(()=>s(e=>e+1),1e3);return()=>window.clearInterval(e)},[S]);let C=[];for(let e of c?.workflows?.items??[]){let t=e.agents.done+e.agents.error,n=e.agents.total?` · ${a(`activityAgentProgress`,{completed:t,total:e.agents.total})}`:``,r=e.status===`running`&&e.currentPhase?` · ${e.currentPhase}`:``,i=VD(e.startedAt,e.finishedAt);C.push({key:`workflow-${e.runId}`,kind:`workflow`,label:`${e.name||e.runId}${r}${n}`,elapsed:i,status:qD(e.status)})}C.sort((e,t)=>Number(t.status===`running`)-Number(e.status===`running`));let w=c?.workflows?.omitted??0;if(!C.length&&!w&&!(t&&m)&&!x?.enabled)return null;let T=C.filter(e=>e.status===`running`).length+g,E=C.filter(e=>e.status===`error`).length+h.filter(e=>e.state===`error`).length,D=[n&&T>0?a(`runtimeActivityRunning`,{count:T}):a(`runtimeActivityCount`,{count:C.length+m+w}),E>0?a(`processFailureCount`,{count:E}):``].filter(Boolean).join(` · `);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`details`,{className:`activity-summary`,open:r,onToggle:e=>{e.currentTarget.open!==r&&i?.(e.currentTarget.open)},children:[(0,q.jsxs)(`summary`,{ref:o,children:[n&&T>0?(0,q.jsx)(`i`,{className:`activity-chip-dot`,"aria-hidden":`true`}):(0,q.jsx)(Uo,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a(`runtimeActivities`)}),(0,q.jsx)(is,{className:`activity-summary-chevron`,"aria-hidden":`true`})]}),(0,q.jsxs)(`div`,{className:`activity-bar composer-status-details`,hidden:r===!1,role:`status`,"aria-label":a(`runtimeActivities`),children:[t&&m>0&&(0,q.jsx)(`button`,{className:`activity-chip subagent-list-trigger`,type:`button`,onClick:()=>t(),children:b}),x?.enabled&&x.limit!==void 0&&(0,q.jsx)(`span`,{className:`activity-chip subagent-list-trigger`,children:a(`activityCapacity`,{running:x.held,limit:x.limit,queued:x.queued})}),C.map(({key:e,...t})=>(0,q.jsx)(JD,{...t},e)),w>0&&(0,q.jsxs)(`span`,{className:`activity-chip more`,children:[`+`,w]})]})]}),(0,q.jsx)(V,{anchorRef:o,focusTrigger:`always`,content:D,placement:`above`})]})}var XD={count:32,textBytes:1048576,imageBytes:134217728};function ZD(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function QD(e){if(e.length>8192)return!1;try{let t=JSON.parse(e);return Array.isArray(t)&&(t.length===3&&t[0]===`session`&&typeof t[1]==`string`&&t[1].length>0&&t[1].length<=1024&&typeof t[2]==`string`&&t[2].length>0&&t[2].length<=4096||t.length===2&&t[0]===`workspace`&&(t[1]===null||typeof t[1]==`string`&&t[1].length<=4096))}catch{return!1}}function $D(e,t){if(!QD(e)||!ZD(t)||typeof t.prompt!=`string`||t.prompt.length*2>XD.textBytes||!Array.isArray(t.images))return null;let n=[],r=[],i=!1,a=typeof t.caret==`number`&&Number.isSafeInteger(t.caret)&&t.caret>=0&&t.caret<=t.prompt.length?t.caret:t.prompt.length;a!==t.caret&&(i=!0);let o=0;for(let e of t.images){if(!ZD(e)||typeof e.name!=`string`||e.name.length>1024||typeof e.data!=`string`||typeof e.size!=`number`||!Number.isSafeInteger(e.size)||e.size<=0||e.size>10485760||e.data.length!==Math.ceil(e.size/3)*4||!/^[A-Za-z0-9+/]*={0,2}$/u.test(e.data)){i=!0;continue}try{let t=atob(e.data);if(t.length!==e.size){i=!0;continue}let r=xd(Uint8Array.from(t.slice(0,12),e=>e.charCodeAt(0)));if(!r||r!==e.mimeType||n.length>=8||o+e.size>33554432){i=!0;continue}o+=e.size,n.push({id:typeof e.id==`string`&&e.id.length<=1024?e.id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${n.length}-${e.name}`,name:e.name,size:e.size,data:e.data,mimeType:r,previewUrl:`data:${r};base64,${e.data}`})}catch{i=!0}}let s=0;for(let e of Array.isArray(t.files)?t.files:[]){if(!ZD(e)||typeof e.name!=`string`||!e.name||e.name.length>1024||/[\u0000-\u001f\u007f]/u.test(e.name)||typeof e.mimeType!=`string`||e.mimeType.length>256||typeof e.data!=`string`||typeof e.size!=`number`||!Number.isSafeInteger(e.size)||e.size<0||e.size>52428800||e.data.length!==Math.ceil(e.size/3)*4||!/^[A-Za-z0-9+/]*={0,2}$/u.test(e.data)||r.length+n.length>=8||s+e.size>52428800||e.text!==void 0&&(typeof e.text!=`string`||new TextEncoder().encode(e.text).length>1048576)){i=!0;continue}try{if(atob(e.data).length!==e.size){i=!0;continue}s+=e.size,r.push({id:typeof e.id==`string`&&e.id.length<=1024?e.id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${r.length}`,name:e.name,mimeType:e.mimeType,size:e.size,data:e.data,...typeof e.text==`string`?{text:e.text}:{},extraction:e.extraction===`text`||e.extraction===`truncated`?e.extraction:`unavailable`,...e.extraction===`unavailable`&&(e.extractionError===`encoding`||e.extractionError===`document`)?{extractionError:e.extractionError}:{}})}catch{i=!0}}return t.files!==void 0&&!Array.isArray(t.files)&&(i=!0),{draft:{prompt:t.prompt,caret:a,images:n,...r.length?{files:r}:{},revision:0},invalid:i}}var eO=`openpi.composer-drafts`,tO=`drafts`;function nO(){let e=()=>new Promise((e,t)=>{let n;try{n=window.indexedDB.open(eO,1)}catch(e){t(e);return}n.onupgradeneeded=()=>{n.result.createObjectStore(tO,{keyPath:`key`}).createIndex(`usage`,[`textBytes`,`imageBytes`])},n.onerror=()=>t(n.error),n.onblocked=()=>{n.onsuccess=()=>n.result.close(),t(Error(`draft-storage-blocked`))},n.onsuccess=()=>{n.result.onversionchange=()=>n.result.close(),e(n.result)}});return{async read(){let t=await e();try{return await new Promise((e,n)=>{let r=t.transaction(tO,`readonly`),i=r.objectStore(tO).getAll(void 0,XD.count+1),a=[];i.onsuccess=()=>{a=i.result},r.oncomplete=()=>e(a),i.onerror=()=>n(i.error),r.onabort=()=>n(r.error)})}finally{t.close()}},async write(t){let n=await e();try{await new Promise((e,r)=>{let i=n.transaction(tO,`readwrite`),a=i.objectStore(tO),o=new Set(t.map(({key:e})=>e)),s=0,c=0,l=0,u=a.index(`usage`).openKeyCursor();u.onsuccess=()=>{let e=u.result;if(e){if(!o.has(String(e.primaryKey))){let t=e.key;s+=1,c+=t[0],l+=t[1]}e.continue();return}for(let{draft:e}of t)e&&(s+=1,c+=e.prompt.length*2,l+=e.images.reduce((e,t)=>e+t.size,0)+(e.files??[]).reduce((e,t)=>e+t.size+(t.text?.length??0)*2,0));if(s>XD.count||c>XD.textBytes||l>XD.imageBytes){i.abort();return}for(let{key:e,draft:n}of t)n?a.put({key:e,draft:{prompt:n.prompt,caret:n.caret,images:n.images.map(({previewUrl:e,...t})=>t),...n.files?.length?{files:n.files}:{}},textBytes:n.prompt.length*2,imageBytes:n.images.reduce((e,t)=>e+t.size,0)+(n.files??[]).reduce((e,t)=>e+t.size+(t.text?.length??0)*2,0)}):a.delete(e)},i.oncomplete=()=>e(),i.onerror=()=>r(i.error),i.onabort=()=>r(i.error??Error(`draft-storage-limit`))})}finally{n.close()}}}}function rO(e){let t=new Map,n=new Set,r=new Map,i=new Set,a={status:e?`loading`:`saved`,invalid:!1},o=!1,s=!!e,c=0,l=()=>({prompt:``,images:[],caret:0,revision:c,files:void 0}),u=e=>e.prompt.length>0||e.images.length>0||!!e.files?.length,d=e=>e.images.reduce((e,t)=>e+t.size,0)+(e.files??[]).reduce((e,t)=>e+t.size+(t.text?.length??0)*2,0),f=(e={})=>{a={...a,...e};for(let e of i)e()},p=(e,n)=>{let r=0,i=0,a=0;for(let[n,o]of t)n!==e&&(r+=1,i+=o.prompt.length*2,a+=d(o));return u(n)&&(r+=1),i+=n.prompt.length*2,a+=d(n),r<=XD.count&&i<=XD.textBytes&&a<=XD.imageBytes},m=async()=>{if(!e||s||o||r.size===0)return;o=!0,f({status:`pending`});let t=Array.from(r,([e,t])=>({key:e,draft:t}));r.clear();try{await e.write(t),o=!1,f({status:r.size>0?`pending`:`saved`}),r.size>0&&m()}catch{for(let{key:e,draft:n}of t)r.has(e)||r.set(e,n);o=!1,f({status:`failed`})}},h=(t,i)=>{s&&n.add(t),e&&(r.set(t,i),s||f({status:`pending`}),Promise.resolve().then(m))},g=()=>e?e.read().then(e=>{let i=!1;for(let r of e){if(typeof r!=`object`||!r||!(`key`in r)||typeof r.key!=`string`||!(`draft`in r)){i=!0;continue}if(n.has(r.key))continue;let e=$D(r.key,r.draft);if(!e||!u(e.draft)||!p(r.key,e.draft)){i=!0;continue}i||=e.invalid,t.set(r.key,{...e.draft,revision:++c})}n.clear(),s=!1,f({status:r.size>0?`pending`:`saved`,invalid:i}),m()}).catch(()=>{f({status:`failed`})}):Promise.resolve();return{ready:g(),storageState:()=>a,subscribe(e){return i.add(e),()=>i.delete(e)},hasContent:()=>t.size>0,hasUnsavedChanges:()=>r.size>0||o,retryStorage(){return s?(f({status:`loading`}),g()):m()},read(e){return t.get(e)??l()},edit(e,n,r){let i={...n,...r};if(i.caret=Math.min(Math.max(i.caret,0),i.prompt.length),i.prompt!==n.prompt||i.images!==n.images||i.files!==n.files){if(!p(e,i))return null;i.revision=++c}return u(i)?t.set(e,i):t.delete(e),(i.prompt!==n.prompt||i.images!==n.images||i.files!==n.files||i.caret!==n.caret)&&h(e,u(i)?i:null),i},clear(e,n){return t.get(e)?.revision===n?(t.delete(e),c+=1,h(e,null),l()):null},move(e,n){if(t.has(n))return!1;let r=t.get(e);return r&&(t.delete(e),t.set(n,r),h(e,null),h(n,r)),!0}}}var iO=(0,K.createContext)(null);iO.displayName=`LayoutDividerContext`;var aO=(0,K.lazy)(async()=>Ee(()=>import(`./app-Tooltip.js`).then(e=>e.n).then(e=>({default:e.Tooltip})),__vite__mapDeps([0,1,2]))),oO={1:`h1`,2:`h2`,3:`h3`,4:`h4`,5:`h5`,6:`h6`};function sO({level:e,type:t,accessibilityLevel:n,color:r=`primary`,display:i=`block`,maxLines:a=0,hasTruncateTooltip:o=!0,wordBreak:s,textWrap:c,justify:l=`start`,hasCapsize:u=!1,hasStrikethrough:d=!1,xstyle:f,className:p,style:m,children:h,ref:g,..._}){let v=oO[e],y=n&&n!==e?{"aria-level":n}:{},b=s??(a===1?`break-all`:`break-word`),x=a>0||u?`block`:i,S=dt({maxLines:a}),C=typeof o==`string`?o:`above`,T=a>0&&o!==!1&&S.isTruncated,E=(0,K.useRef)(null),D=we(g,S.ref,E),k=a>1?{WebkitLineClamp:a}:void 0;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(v,{ref:D,...H(O(`heading`,{level:e,color:r,...t&&{type:t}}),w(Ge[At(r)],t?Je[t]:Xe[e],t&&qe[t],a===1?Qe.singleLine:a>1?Qe.multiLine:Ze[x],a>0&&$e[b],c&&et[c],l!==`start`&&it[l],u&&tt.enabled,d&&nt.strikethrough,f),p,{...m,...k}),...y,..._,children:h}),T&&(0,q.jsx)(K.Suspense,{fallback:null,children:(0,q.jsx)(aO,{anchorRef:E,content:(0,q.jsx)(`span`,{...w(at.content),children:S.fullText}),placement:C})})]})}sO.displayName=`Heading`;var cO={scale:1,x:0,y:0};function lO({children:e,original:t,disabled:n=!1}){let{t:r}=W(),i=(0,K.useRef)(null),a=(0,K.useRef)(null),o=(0,K.useRef)(void 0),s=(0,K.useRef)(cO),[c,l]=(0,K.useState)(cO),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(2),[m,h]=(0,K.useState)(!1),g=(0,K.useRef)(null),_=(0,K.useCallback)((e,t=!1)=>{let n=a.current,r=n&&t?getComputedStyle(n).transform:`none`;o.current?.cancel(),s.current=e,l(e),n?.animate&&t&&!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches&&(o.current=n.animate([{transform:r},{transform:`translate(${e.x}px, ${e.y}px) scale(${e.scale})`}],{duration:160,easing:`cubic-bezier(.16, 1, .3, 1)`}))},[]),v=(0,K.useCallback)(()=>{if(o.current?.playState!==`running`||!a.current)return;let e=new DOMMatrixReadOnly(getComputedStyle(a.current).transform);_({scale:e.a,x:e.e,y:e.f})},[_]);(0,K.useEffect)(()=>()=>o.current?.cancel(),[]);let y=(0,K.useCallback)(e=>{let t=a.current?.querySelector(`img`);if(!t||!a.current)return cO;let n=Math.max(0,(t.offsetWidth*e.scale-a.current.clientWidth)/2),r=Math.max(0,(t.offsetHeight*e.scale-a.current.clientHeight)/2);return{scale:e.scale,x:Math.max(-n,Math.min(n,e.x)),y:Math.max(-r,Math.min(r,e.y))}},[]),b=(0,K.useCallback)((e,t,n=!0)=>{let r=a.current?.querySelector(`img`),o=i.current?.getBoundingClientRect();if(!r?.offsetWidth||!o)return;let c=Math.min(8,Math.max(2,r.naturalWidth/r.offsetWidth));p(c);let l=Math.max(1,Math.min(c,e)),u=l/s.current.scale,d=t?t.x-o.left-o.width/2:0,f=t?t.y-o.top-o.height/2:0;_(y({scale:l,x:d-(d-s.current.x)*u,y:f-(f-s.current.y)*u}),n)},[y,_]),x=(0,K.useCallback)((e=!1)=>{let t=g.current;g.current=null,h(!1),t&&(e&&_(t.view),i.current?.hasPointerCapture(t.pointerId)&&i.current.releasePointerCapture(t.pointerId))},[_]);return(0,K.useEffect)(()=>{x(),_(cO);let e=i.current;if(!e||t)return;let n=t=>{if(a.current?.querySelector(`img`)?.complete){if(v(),t.ctrlKey)t.preventDefault(),b(s.current.scale*Math.exp(-t.deltaY*.01),{x:t.clientX,y:t.clientY},!1);else if(s.current.scale>1){t.preventDefault();let n=t.deltaMode===1?16:t.deltaMode===2?e.clientHeight:1;_(y({...s.current,x:s.current.x-t.deltaX*n,y:s.current.y-t.deltaY*n}))}}},r=()=>{x(),_(cO)};return e.addEventListener(`wheel`,n,{passive:!1}),window.addEventListener(`resize`,r),()=>{e.removeEventListener(`wheel`,n),window.removeEventListener(`resize`,r)}},[t,y,x,v,_,b]),(0,q.jsxs)(`section`,{ref:i,className:`draft-image-preview-body`,"aria-label":r(`imageViewMode`),"data-mode":t?`original`:`fit`,"data-zoomed":!t&&c.scale>1||void 0,"data-dragging":m||void 0,tabIndex:!n&&(t||u)?0:void 0,onLoadCapture:()=>{d(!0),_(cO)},onErrorCapture:()=>{d(!1),_(cO)},onDoubleClick:e=>{t||!(e.target instanceof HTMLImageElement)||b(c.scale>1?1:2,{x:e.clientX,y:e.clientY})},onPointerDown:e=>{t||g.current||e.button!==0||c.scale<=1||!(e.target instanceof Node)||!a.current?.contains(e.target)||(e.preventDefault(),e.currentTarget.focus({preventScroll:!0}),v(),g.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,view:s.current},e.currentTarget.setPointerCapture(e.pointerId))},onPointerMove:e=>{let t=g.current;if(!t||t.pointerId!==e.pointerId)return;let n=e.clientX-t.x,r=e.clientY-t.y;!m&&Math.hypot(n,r)<4||(h(!0),_(y({...t.view,x:t.view.x+n,y:t.view.y+r})))},onPointerUp:e=>{g.current?.pointerId===e.pointerId&&x()},onPointerCancel:e=>{g.current?.pointerId===e.pointerId&&x(!0)},onLostPointerCapture:()=>x(!0),onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||t||e.target!==e.currentTarget)){if(e.key===`+`||e.key===`=`)b(c.scale*1.25);else if(e.key===`-`)b(c.scale/1.25);else if(e.key===`0`)b(1);else if(e.key===`Escape`&&g.current)x(!0);else if(c.scale>1&&[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`].includes(e.key))_(y({...c,x:c.x+(e.key===`ArrowLeft`?40:e.key===`ArrowRight`?-40:0),y:c.y+(e.key===`ArrowUp`?40:e.key===`ArrowDown`?-40:0)}),!0);else return;e.preventDefault(),e.stopPropagation()}},children:[(0,q.jsx)(`div`,{ref:a,className:`image-zoom-layer`,style:t?void 0:{transform:`translate(${c.x}px, ${c.y}px) scale(${c.scale})`},children:e}),!t&&u&&(0,q.jsxs)(`fieldset`,{className:`image-zoom-controls`,"aria-label":r(`imageZoom`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`zoomOut`),disabled:c.scale<=1,onClick:()=>b(c.scale/1.25),children:(0,q.jsx)(Qc,{"aria-hidden":`true`})}),(0,q.jsxs)(`output`,{"aria-label":r(`imageZoom`),title:r(`imageZoomHelp`),children:[Math.round(c.scale*100),`%`]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`zoomIn`),disabled:c.scale>=f,onClick:()=>b(c.scale*1.25),children:(0,q.jsx)(Zc,{"aria-hidden":`true`})})]})]})}function uO(e,t,n){if(!e.animate||!e.showPopover||!e.complete||!e.naturalWidth||!t.isConnected||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect();if(!r.width||!r.height||!i.width||!i.height)return;let a=Math.max(i.width/r.width,i.height/r.height),o=i.left+i.width/2-r.left-r.width/2,s=i.top+i.height/2-r.top-r.height/2,c=Math.max(0,(1-i.width/(r.width*a))*50),l=Math.max(0,(1-i.height/(r.height*a))*50),u=Number.parseFloat(getComputedStyle(t).borderRadius)||0,d=e.closest(`.draft-image-preview-body`)?.getBoundingClientRect(),f=!n&&d?[Math.max(0,d.top-r.top)/r.height*100,Math.max(0,r.right-d.right)/r.width*100,Math.max(0,r.bottom-d.bottom)/r.height*100,Math.max(0,d.left-r.left)/r.width*100]:[0,0,0,0],p={transform:`translate(${o}px, ${s}px) scale(${a})`,clipPath:`inset(${l}% ${c}% round ${u/a}px)`},m={transform:`translate(0, 0) scale(1)`,clipPath:`inset(${f.map(e=>`${e}%`).join(` `)} round 0px)`},h=document.createElement(`img`);h.src=e.currentSrc||e.src,h.alt=``,h.popover=`manual`,h.inert=!0,h.setAttribute(`aria-hidden`,`true`),h.className=`image-preview-flight`,Object.assign(h.style,{position:`fixed`,inset:`auto`,left:`${r.left}px`,top:`${r.top}px`,width:`${r.width}px`,height:`${r.height}px`,maxWidth:`none`,maxHeight:`none`,margin:`0`,padding:`0`,border:`0`,background:`transparent`,pointerEvents:`none`,objectFit:`fill`,transformOrigin:`center`,overflow:`visible`}),document.body.append(h),h.showPopover();let g=e.style.visibility,_=t.style.visibility;e.style.visibility=t.style.visibility=`hidden`;let v=h.animate(n?[p,m]:[m,p],{duration:n?260:180,easing:n?`cubic-bezier(.16, 1, .3, 1)`:`cubic-bezier(.4, 0, .2, 1)`,fill:`both`}),y=e.closest(`dialog`),b=()=>{v.onfinish=v.oncancel=null,v.cancel(),h.remove(),e.style.visibility=g,t.style.visibility=_,window.removeEventListener(`resize`,b),y?.removeEventListener(`pointerdown`,b)};return v.onfinish=v.oncancel=b,window.addEventListener(`resize`,b),y?.addEventListener(`pointerdown`,b),b}function dO({ownerKey:e,images:t,onRemove:n}){let{t:r}=W(),i=(0,K.useRef)(null),a=(0,K.useRef)(new Map),o=(0,K.useRef)(null),s=(0,K.useRef)(null),[c,l]=(0,K.useState)(null),u=(0,K.useRef)(null),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(`fit`),h=c?.ownerKey===e?t.find(e=>e.id===c.id):void 0,g=c?JSON.stringify([c.ownerKey,c.id]):``,_=!!(h&&c?.open);(0,K.useLayoutEffect)(()=>{let n=o.current;n&&(n.owner!==e||!t.some(e=>e.id===n.id))&&(n.stop(),o.current=null)},[e,t]),(0,K.useLayoutEffect)(()=>()=>o.current?.stop(),[]),(0,K.useEffect)(()=>{if(!_){s.current=null;return}o.current?.stop();let t=s.current!==null;s.current=g;let n=i.current?.querySelector(`.image-zoom-layer img`),r=h&&a.current.get(h.id);if(!n||!r||!h)return;let c=0,l,u=()=>{cancelAnimationFrame(c),c=requestAnimationFrame(()=>{if(!i.current?.open)return;if(t){window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||(l=n.animate?.([{opacity:0},{opacity:1}],{duration:160,easing:`ease-out`}));return}let a=uO(n,r,!0);a&&(o.current={owner:e,id:h.id,stop:a})})};return n.complete?u():n.addEventListener(`load`,u,{once:!0}),()=>{cancelAnimationFrame(c),n.removeEventListener(`load`,u),l?.cancel()}},[_,g,e,h]);let v=t.findIndex(e=>e.id===h?.id),y=e=>{let n=t[v+e];!c||!n||(f(null),m(`fit`),l({...c,id:n.id}))},b=()=>{if(!_)return;o.current?.stop(),o.current=null;let t=i.current?.querySelector(`.image-zoom-layer img`),n=h&&a.current.get(h.id);if(t&&n&&h){let r=uO(t,n,!1);r&&(o.current={owner:e,id:h.id,stop:r})}u.current=c,l(e=>e&&{...e,open:!1})};return(0,K.useEffect)(()=>{if(c&&!h){u.current=null,l(null);return}if(_||!u.current)return;let n=u.current;u.current=null;let r=document.activeElement;n.ownerKey===e&&t.some(e=>e.id===n.id)&&n.trigger.isConnected&&(r===document.body||i.current?.contains(r))&&n.trigger.focus()},[c,h,_,e,t]),(0,q.jsxs)(q.Fragment,{children:[t.length>0&&(0,q.jsx)(`section`,{className:`composer-attachment-group`,"aria-label":r(`imageAttachments`),children:t.map(t=>(0,q.jsxs)(`div`,{className:`composer-attachment`,children:[(0,q.jsx)(V,{content:r(`previewAttachment`),placement:`above`,children:(0,q.jsxs)(`button`,{type:`button`,className:`composer-attachment-preview`,"aria-label":`${r(`previewAttachment`)} ${t.name}`,onClick:n=>{n.currentTarget.focus(),n.currentTarget.blur(),u.current=null,f(null),m(`fit`),l({ownerKey:e,id:t.id,trigger:n.currentTarget,open:!0})},children:[(0,q.jsx)(`img`,{ref:e=>{e?a.current.set(t.id,e):a.current.delete(t.id)},src:t.previewUrl,alt:``}),(0,q.jsxs)(`span`,{title:t.name,children:[t.name,(0,q.jsxs)(`small`,{children:[(t.size/1024).toFixed(1),` KB`]})]})]})}),(0,q.jsx)(V,{content:r(`removeAttachment`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-attachment-remove`,"aria-label":`${r(`removeAttachment`)} ${t.name}`,onClick:()=>n(t.id),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},t.id))}),(0,q.jsx)(Se,{ref:i,className:`draft-image-dialog`,isOpen:_,onOpenChange:e=>!e&&b(),purpose:`info`,width:800,maxHeight:`calc(100dvh - 32px)`,padding:0,"aria-label":`${r(`previewAttachment`)} ${h?.name??``}`.trim(),children:h&&(0,q.jsxs)(`section`,{className:`draft-image-preview`,inert:!_,"aria-label":r(`imageAttachments`),onKeyDown:e=>{p===`original`||e.defaultPrevented||e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||e.altKey||e.ctrlKey||e.metaKey||!(e.target instanceof HTMLElement)||!e.target.classList.contains(`draft-image-preview-body`)||(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&(e.preventDefault(),y(e.key===`ArrowLeft`?-1:1))},children:[(0,q.jsxs)(`header`,{children:[(0,q.jsx)(`strong`,{title:h.name,children:h.name}),t.length>1&&(0,q.jsxs)(`div`,{className:`image-gallery-navigation`,children:[(0,q.jsx)(V,{content:r(`previousImage`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`previousImage`),disabled:v<=0,onClick:()=>y(-1),children:(0,q.jsx)(as,{"aria-hidden":`true`})})}),(0,q.jsxs)(`output`,{"aria-label":r(`imagePosition`,{current:v+1,total:t.length}),children:[v+1,` / `,t.length]}),(0,q.jsx)(V,{content:r(`nextImage`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`nextImage`),disabled:v>=t.length-1,onClick:()=>y(1),children:(0,q.jsx)(os,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`fieldset`,{className:`draft-image-preview-modes`,"aria-label":r(`imageViewMode`),children:[(0,q.jsx)(V,{content:r(`fitImage`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`fitImage`),"aria-pressed":p===`fit`,disabled:d===g,onClick:()=>m(`fit`),children:(0,q.jsx)(Ec,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:r(`originalImageSize`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":r(`originalImageSize`),"aria-pressed":p===`original`,disabled:d===g,onClick:()=>m(`original`),children:(0,q.jsx)(ac,{"aria-hidden":`true`})})})]}),(0,q.jsx)(V,{content:r(`closeImagePreview`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,"aria-label":r(`closeImagePreview`),onClick:b,children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]}),(0,q.jsx)(lO,{original:p===`original`,disabled:d===g,children:d===g?(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`alert`,children:r(`imagePreviewFailed`)}):(0,q.jsx)(`img`,{src:h.previewUrl,alt:h.name,draggable:!1,onError:()=>f(g)},g)},g)]})})]})}function fO({ownerKey:e,files:t,onRemove:n}){let{t:r}=W(),i=(0,K.useRef)(null),[a,o]=(0,K.useState)(null),s=(0,K.useRef)(null),c=a?.ownerKey===e?t.find(e=>e.id===a.id):void 0,l=!!(c&&a?.open),u=()=>{l&&(s.current=a,o(e=>e&&{...e,open:!1}))};(0,K.useEffect)(()=>{if(a&&!c){s.current=null,o(null);return}if(l||!s.current)return;let n=s.current;s.current=null;let r=document.activeElement;n.ownerKey===e&&t.some(e=>e.id===n.id)&&n.trigger.isConnected&&(r===document.body||i.current?.contains(r))&&n.trigger.focus()},[a,c,l,e,t]);let d=e=>r(e.extractionError?`fileAttachmentExtractionFailed`:e.extraction===`truncated`?`fileAttachmentTextTruncated`:e.extraction===`text`?`fileAttachmentTextReady`:`fileAttachmentOriginalReady`);return(0,q.jsxs)(q.Fragment,{children:[t.length>0&&(0,q.jsx)(`section`,{className:`composer-attachment-group`,"aria-label":r(`fileAttachments`),children:t.map(t=>(0,q.jsxs)(`div`,{className:`composer-attachment composer-file-attachment`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`composer-attachment-preview`,"aria-label":`${r(`previewFileAttachment`)} ${t.name}`,onClick:n=>{n.currentTarget.focus(),n.currentTarget.blur(),s.current=null,o({ownerKey:e,id:t.id,trigger:n.currentTarget,open:!0})},children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{title:t.name,children:[t.name,(0,q.jsxs)(`small`,{children:[(t.size/1024).toFixed(1),` KB ·`,` `,d(t)]})]})]}),(0,q.jsx)(V,{content:`${r(`removeAttachment`)} ${t.name}`,placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-attachment-remove`,"aria-label":`${r(`removeAttachment`)} ${t.name}`,onClick:()=>n(t.id),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},t.id))}),(0,q.jsx)(Se,{ref:i,isOpen:l,onOpenChange:e=>!e&&u(),purpose:`info`,width:720,maxHeight:`calc(100dvh - 32px)`,padding:0,"aria-label":`${r(`previewFileAttachment`)} ${c?.name??``}`.trim(),children:c&&(0,q.jsxs)(`div`,{className:`draft-file-preview`,inert:!l,children:[(0,q.jsxs)(`header`,{children:[(0,q.jsxs)(`div`,{className:`draft-preview-heading`,children:[(0,q.jsx)(`strong`,{title:c.name,children:c.name}),(0,q.jsxs)(`p`,{children:[d(c),` · `,(c.size/1024).toFixed(1),` KB`]})]}),(0,q.jsx)(V,{content:r(`closePreview`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,"aria-label":r(`closePreview`),onClick:u,children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`div`,{className:`draft-file-preview-content`,children:[c.extractionError&&(0,q.jsx)(`p`,{children:r(c.extractionError===`encoding`?`fileAttachmentEncodingUnavailable`:`fileAttachmentDocumentUnavailable`)}),c.text===void 0?(0,q.jsx)(`p`,{children:r(`fileAttachmentNoText`)}):(0,q.jsxs)(`pre`,{children:[c.text.slice(0,2e4),c.text.length>2e4?`\n${r(`fileAttachmentPreviewTruncated`)}`:``]})]})]})})]})}var pO=new Set(`txt md markdown csv tsv json jsonl ndjson xml html htm css scss sass less yaml yml toml ini cfg conf config log rst tex diff patch sql graphql gql py ipynb js mjs cjs jsx ts mts cts tsx java kt kts scala c cc cpp cxx h hpp cs go rs rb php swift sh bash zsh fish ps1 bat cmd r lua pl proto vue svelte astro svg srt vtt env gitignore dockerignore editorconfig properties lock`.split(` `));function mO(e,t,n){let r=e.split(`.`).at(-1)?.toLowerCase()||``;return new TextDecoder(`ascii`).decode(n.subarray(0,5))===`%PDF-`?`pdf`:[`pdf`,`docx`,`xlsx`,`pptx`].includes(r)?r:pO.has(r)||/^(?:readme|license|licence|changelog|dockerfile|makefile|gemfile)$/iu.test(e)||t.startsWith(`text/`)||/^application\/(?:json|(?:[^;]+\+)?xml|javascript|x-yaml)(?:;|$)/iu.test(t)?`text`:`binary`}var hO=15e3;function gO(e,t){return new Promise((n,r)=>{let i=new FileReader,a=e=>{clearTimeout(s),t?.removeEventListener(`abort`,o),e?r(e):i.result instanceof ArrayBuffer?n(i.result):r(Error(`file-read`))},o=()=>{i.abort(),a(new DOMException(`File staging cancelled.`,`AbortError`))},s=setTimeout(()=>{i.abort(),a(Error(`file-timeout`))},hO);i.onload=()=>a(),i.onerror=()=>a(Error(`file-read`)),t?.addEventListener(`abort`,o,{once:!0}),t?.aborted?o():i.readAsArrayBuffer(e)})}function _O(e,t,n){return new Promise((r,i)=>{let a=new Worker(new URL(`/app-file-text-worker-DegOHoqE.js`,``+import.meta.url),{type:`module`}),o=(e,t)=>{clearTimeout(c),n?.removeEventListener(`abort`,s),a.terminate(),t?i(t):e?r(e):i(Error(`file-document-invalid`))},s=()=>o(void 0,new DOMException(`File staging cancelled.`,`AbortError`)),c=setTimeout(()=>o(void 0,Error(`file-timeout`)),hO);a.onmessage=e=>{!e.data||!(`result`in e.data||`error`in e.data)||(e.data.error?o(void 0,Error(e.data.error)):o(e.data.result))},a.onerror=()=>o(void 0,Error(`file-document-invalid`)),n?.addEventListener(`abort`,s,{once:!0}),n?.aborted?s():a.postMessage({data:e,kind:t},[e])})}async function vO(e,t){if(e.size>52428800)throw Error(`file-size`);let n=await gO(e,t),r=new Uint8Array(n),i=mO(e.name,e.type,r),a=r.length,o=await _O(n,i,t);return t?.throwIfAborted(),{id:globalThis.crypto?.randomUUID?.()??`${Date.now()}-${e.name}`,name:e.name||`file`,size:a,mimeType:e.type||`application/octet-stream`,...o}}var yO=!1;typeof window<`u`&&requestAnimationFrame(()=>{yO=!0});var bO={slideDown:{kKVMdj:`x1srr2gu x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},slideUp:{kKVMdj:`x1dvww92 x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},fadeIn:{kKVMdj:`xqcmdr3 x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0},scaleIn:{kKVMdj:`x97zbip x1aquc0h`,k44tkh:`x9uej1z`,kyAemX:`x128ha8g`,kWV6AL:`xskzprw`,$$css:!0}};function xO(e=`slideDown`){let[t]=(0,K.useState)(()=>yO);return t?bO[e]:null}var SO=new Set([`text`,`password`,`email`,`number`,`search`,`tel`,`url`,`date`,`datetime-local`,`month`,`time`,`week`]),CO=new Set([`true`,`menu`,`listbox`,`tree`,`grid`,`dialog`]);function wO(e){if(e.getAttribute(`role`)===`combobox`)return!0;let t=e.getAttribute(`aria-haspopup`);return t!=null&&CO.has(t)}function TO({containerRef:e,inputRef:t,disabled:n=!1}){return Oa({containerRef:e,interactiveRef:t,onClick:(0,K.useCallback)(()=>{let e=t.current;e!=null&&(e instanceof HTMLElement&&wO(e)?e.click():e instanceof HTMLInputElement&&SO.has(e.type)||e instanceof HTMLTextAreaElement?e.focus():e instanceof HTMLElement?e.click():`focus`in e&&e.focus())},[t]),disabled:n})}var EO={warning:`warning`,error:`error`,success:`success`},DO={warning:`@astryx.input.statusButton.warning`,error:`@astryx.input.statusButton.error`,success:`@astryx.input.statusButton.success`},OO={statusButton:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kfzvcC:`x67bb7w`,kaIpWk:`xjspbzw`,kInvED:`x7s97pk`,$$css:!0}};function kO({status:e,statusVariant:t=`attached`,isInGroup:n=!1,size:r=`md`}){let i=jr(),a=t===`tooltip`&&!!e?.message,[o,s]=(0,K.useState)(void 0),c=F({placement:`above`,isEnabled:a,isOpen:o}),l=(0,K.useCallback)(()=>{s(void 0)},[]),u=(0,K.useCallback)(()=>{typeof window>`u`||typeof window.matchMedia!=`function`||!window.matchMedia(`(hover: none)`).matches||s(e=>e!==!0)},[]);if((0,K.useEffect)(()=>{if(o!==!0)return;let e=e=>{e.key===`Escape`&&s(void 0)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[o]),!(e&&!n&&t!==`detached`))return{statusIcon:null,describedBy:void 0};let d=(0,q.jsx)(ya,{icon:EO[e.type],size:r,color:e.type,...O(`input-status-icon`,{size:r,status:e.type})});return a?{statusIcon:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{type:`button`,ref:c.ref,"aria-label":i(DO[e.type]),"aria-describedby":c.describedBy,onClick:u,onBlur:l,...w(fe.focusVisible,OO.statusButton),children:d}),c.renderTooltip(e.message)]}),describedBy:c.describedBy}:{statusIcon:d,describedBy:void 0}}var AO=(0,K.createContext)({direction:`vertical`});AO.displayName=`FormLayoutContext`;var jO={label:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`xzye2dw`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kLWn49:`x1kq96og`,k63SB2:`x1e4wzip`,kMwMTN:`xv1l7n4`,kkrTdU:`x1ypdohk x16khyan`,$$css:!0},labelDisabled:{kMwMTN:`xnbbluu`,kkrTdU:`xt0e3qv`,$$css:!0},srOnly:{ksu8eU:`xng3xce`,kMcinP:`xzpqnlu`,kZKoxP:`xjm9jq1`,kLqNvP:`x1o0tod`,kogj98:`xkdpibf`,kVQacm:`xb3r6kr`,kmVPX3:`x1717udv`,kfzvcC:`x47corl`,kVAEAm:`x10l6tqk`,k87sOh:`x13vifvy`,kfSwDN:`x87ps6o`,khDVqt:`xuxw1ft`,kzqmXN:`x1i1rx1s`,$$css:!0}};function MO({label:e,inputID:t,labelID:n,isGroupLabel:r=!1,isLabelHidden:i=!1,isDisabled:a=!1,isOptional:o=!1,isRequired:s=!1,labelIcon:c,labelTooltip:l,description:u,descriptionID:d,className:f,style:p,xstyle:m,ref:h,...g}){let _=jr(),{defaultOptionality:v}=(0,K.use)(AO),y=o&&v!==`optional`?_(`@astryx.field.optional`):s&&v!==`required`?_(`@astryx.field.required`):null,b=r?`span`:`label`,x=!r&&t!=null,S=(0,K.useRef)(null),C=TO({containerRef:S,inputRef:(0,K.useMemo)(()=>({get current(){return t==null?null:S.current?.ownerDocument.getElementById(t)??null},set current(e){}}),[t]),disabled:!x}),T=(0,q.jsxs)(q.Fragment,{children:[c&&xa(c,{size:`sm`,color:`inherit`}),e,y&&(0,q.jsxs)(`span`,{className:`x1sodnla x141an7d x1ltkj2j xv1l7n4`,children:[(0,q.jsx)(`span`,{"aria-hidden":`true`,children:` ∙ `}),y]}),l&&(0,q.jsx)(V,{content:l,placement:`above`,children:(0,q.jsx)(ya,{icon:`info`,size:`sm`,color:`inherit`})})]});return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(b,{ref:h,id:n,htmlFor:r?void 0:t,...g,...H(O(`field-label`),w(jO.label,a&&jO.labelDisabled,i&&jO.srOnly,m),f,p),children:T}),u&&(0,q.jsx)(`span`,{ref:x?S:void 0,id:d,...x?C:void 0,...{0:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4`},2:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk x16khyan`},1:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s`},3:{className:`x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk x16khyan xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s`}}[!!x<<1|!!i<<0],children:u})]})}MO.displayName=`FieldLabel`;var NO={warning:`warning`,error:`error`,success:`success`},PO={base:{kMv6JI:`x9ynric`,kGuDYH:`x141an7d`,kLWn49:`x1ltkj2j`,$$css:!0},attached:{keoZOQ:`x1c40v9y`,kLKAdn:`x1ak3mig`,kGO01o:`x1wesfrj`,kg3NbH:`xf314gf`,kVL7Gh:`xquck67`,kT0f0o:`x14i3lts`,$$css:!0},detached:{keoZOQ:`xcsaf9d`,k8WAf4:`xce4md1`,kg3NbH:`xf314gf`,kaIpWk:`xh6dtrn`,$$css:!0}},FO={warning:{kWkggS:`x24i8r5`,kMwMTN:`xdhq94a`,$$css:!0},error:{kWkggS:`x1pritpl`,kMwMTN:`x1joocv1`,$$css:!0},success:{kWkggS:`xu13z74`,kMwMTN:`xltfdvo`,$$css:!0}};function IO({ref:e,type:t,message:n,id:r,variant:i=`attached`,xstyle:a,className:o,style:s,...c}){let l=xO(`slideDown`),u=vu();return(0,K.useEffect)(()=>{n&&u(n,t===`error`?`assertive`:`polite`)},[u,n,t]),(0,q.jsx)(`div`,{ref:e,id:r,...c,...H(O(`field-status`,{type:t,variant:i}),w(PO.base,l,i===`attached`?PO.attached:PO.detached,FO[t],a),o,s),children:i===`detached`?(0,q.jsxs)(`span`,{className:`x78zum5 x1cy8zhl xzye2dw`,children:[(0,q.jsx)(`span`,{className:`x3nfvp2 x6s0dn4 x14o5nre x2lah0s`,children:(0,q.jsx)(ya,{icon:NO[t],size:`sm`,color:`inherit`,...O(`field-status-icon`,{type:t})})}),(0,q.jsx)(`span`,{children:n})]}):n})}IO.displayName=`FieldStatus`;var LO={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,$$css:!0},containerGap:{kOIVth:`xzye2dw`,$$css:!0},horizontalLabels:{k1xSpc:`xjp7ctv`,$$css:!0}},RO={width:e=>[{kzqmXN:e==null?e:`x5lhr3w`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function zO({label:e,isLabelHidden:t=!1,description:n,inputID:r,labelID:i,isGroupLabel:a=!1,descriptionID:o,isOptional:s=!1,isRequired:c=!1,isDisabled:l=!1,labelIcon:u,status:d,labelTooltip:f,statusVariant:p=`attached`,width:m,xstyle:h,children:g,className:_,style:v,ref:y,...b}){let{direction:x}=(0,K.use)(AO),S=x===`horizontal-labels`,C=o??(n?`${r}-desc`:void 0),T=d?.messageID??(d?.message?`${r}-status`:void 0);Vr(`Field`,`isOptional and isRequired are mutually exclusive. isOptional takes precedence.`,s&&c);let E=(0,q.jsx)(MO,{label:e,inputID:r,labelID:i,isGroupLabel:a,isLabelHidden:t,isDisabled:l,isOptional:s,isRequired:c,labelIcon:u,labelTooltip:f,description:S?void 0:n,descriptionID:S?void 0:C}),D=d?.message&&p!==`tooltip`?(0,q.jsx)(IO,{type:d.type,message:d.message,id:T,variant:p}):null;return S?(0,q.jsxs)(`div`,{ref:y,...H(O(`field`,{layout:`horizontal-labels`}),w(LO.horizontalLabels,h),_,v),...b,children:[(0,q.jsx)(`div`,{className:`x1enrzb7`,children:E}),(0,q.jsxs)(`div`,{className:`x78zum5 xdt5ytf xc8icb0`,children:[n&&(0,q.jsx)(jt,{type:`supporting`,display:`block`,id:C,children:n}),g,D]})]}):(0,q.jsxs)(`div`,{ref:y,...H(O(`field`),w(LO.container,!t&&LO.containerGap,m!=null&&RO.width(m),h),_,v),...b,children:[E,p===`attached`?(0,q.jsxs)(`div`,{className:`x78zum5 xdt5ytf xc8icb0`,children:[g,D]}):(0,q.jsxs)(q.Fragment,{children:[g,D]})]})}zO.displayName=`Field`;var BO={base:{kB7OPa:`x9f619`,kVAEAm:`x1n2onr6`,kY2c9j:`x1vjfegm`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,kMzoRj:`x1litavf`,ksu8eU:`x1y0btm7`,kVAM5u:`xvy26l8 x6q1khz`,"--_field-radius":`x1832zxr`,kaIpWk:`xvdfih8`,kWkggS:`x10xzikg`,k1ekBW:`x12zzom9`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kGVxlE:`x1gnnqk1 x1xqjsvb xuihb5h`,kI3sdo:`x1a2a7pz`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,kSiTet:`xbyyjgo`,kVAM5u:`xvy26l8`,kGVxlE:`x1gnnqk1`,$$css:!0}},VO={warning:{kVAM5u:`x8wg1ba`,$$css:!0},error:{kVAM5u:`x1ofxpqo`,$$css:!0},success:{kVAM5u:`x16m2moy`,$$css:!0}},HO={warning:{kGVxlE:`x1gnnqk1 x9156jc`,$$css:!0},error:{kGVxlE:`x1gnnqk1 x1bgmis8`,$$css:!0},success:{kGVxlE:`x1gnnqk1 x8wp45d`,$$css:!0}},UO={warning:{kVAM5u:`x8wg1ba xa1yw2k`,$$css:!0},error:{kVAM5u:`x1ofxpqo xk2sxw7`,$$css:!0},success:{kVAM5u:`x16m2moy xyq33ac`,$$css:!0}},WO={button:{kZKoxP:`x1qx5ct2`,kmuXW:`x2lah0s`,kVAEAm:`x1n2onr6`,"--_input-clear-hit-inset":`xtoycft x181bpwf`,"--_input-clear-hit-content":`xqxtgf4 xp8r40j`,k5JduY:`xh3pasq`,kwXMNM:`x1j6awrg`,kv0HGH:`xht581f`,$$css:!0}};function GO({label:e,onClick:t,onPointerDown:n,onClickCapture:r,xstyle:i,iconClassName:a}){let{className:o}=O(`input-clear-icon`),{className:s}=O(`input-clear-button`);return(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:e,className:s,icon:(0,q.jsx)(ya,{icon:`close`,size:`sm`,color:`secondary`,className:a==null?o:`${o} ${a}`}),onClick:t,onPointerDown:n,onClickCapture:r,isIconOnly:!0,xstyle:[WO.button,i]})}function KO(e){return GO(e)}function qO(e){return GO(e)}KO.displayName=`InputClearButton`;var JO={inGroup:{kUk6DE:`x98rzlu`,k7Eaqz:`xeuugli`,kZKoxP:`x5yr21d`,keTefX:`xd10s4z x1pwwqoy`,krdFHd:`x15mokao x8eehn2`,kVL7Gh:`xbiv7yw x1xrp5p4`,kfmiAY:`x1ga7v0g x1tzxhge`,kT0f0o:`x16uus16 x1rmb4wm`,kXnDq0:`x1rm9qnc`,$$css:!0}};function YO({isRequired:e=!1,isOptional:t=!1}){let{defaultOptionality:n}=(0,K.use)(AO);return!t&&(e||n===`required`)}var XO=(0,K.createContext)(null);XO.displayName=`InputGroupContext`;function ZO(){return(0,K.use)(XO)}var QO={sm:{kZKoxP:`x6k0iem`,$$css:!0},md:{kZKoxP:`x1ueg155`,$$css:!0},lg:{kZKoxP:`xssyfek`,$$css:!0}};function $O({type:e=`text`,label:t,isLabelHidden:n=!1,description:r,isOptional:i=!1,isRequired:a=!1,isDisabled:o=!1,isReadOnly:s=!1,disabledMessage:c,startIcon:l,status:u,statusVariant:d=`attached`,size:f,onChange:p,changeAction:m,isLoading:h=!1,value:g,placeholder:_,labelTooltip:v,hasClear:y=!1,hasAutoFocus:b=!1,htmlName:x,onEnter:S,onKeyDown:C,width:T,xstyle:E,className:D,style:k,ref:A,...j}){let M=jr(),N=YO({isRequired:a,isOptional:i}),P=Zt(f,`md`),I=(0,K.useId)(),ee=(0,K.useId)(),L=(0,K.useId)(),R=(0,K.useId)(),te=(0,K.useRef)(null),z=(0,K.useRef)(null),B=ZO(),[,ne]=(0,K.useTransition)(),[re,V]=(0,K.useOptimistic)(g),ie=h||re!==g,ae=o&&!!c,oe=F({placement:`above`,focusTrigger:`always`,isEnabled:ae}),{statusIcon:se,describedBy:ce}=kO({status:u,statusVariant:d,isInGroup:!!B}),{ariaLabelledBy:le,ariaDescribedBy:ue}=gt(ee,[r?L:null,!B&&d!==`tooltip`&&u?.message?R:null,ce,ae?oe.describedBy:null],B),de=e=>{if(o||s)return;let t=e.target.value;p?.(t,e),m&&!e.defaultPrevented&&ne(async()=>{V(t),await m(t,e)})},fe=(0,K.useCallback)(()=>{p?.(``,null),te.current?.focus()},[p]),{onClick:pe,onMouseUp:me}=TO({containerRef:z,inputRef:te,disabled:o}),he=(0,q.jsxs)(`div`,{ref:e=>{z.current=e,oe.ref(e)},onClick:pe,onMouseUp:me,...H(O(`text-input`,{size:P,status:u?.type??null,disabled:o?`disabled`:null,readonly:s?`readonly`:null}),w(BO.base,QO[P],o&&BO.disabled,u&&VO[u.type],u&&!o&&HO[u.type],u&&UO[u.type],B&&JO.inGroup,E),D,k),children:[l&&xa(l,{size:`sm`,color:`secondary`}),B&&(0,q.jsx)(Kt,{id:ee,children:t}),(0,q.jsx)(`input`,{...j,ref:we(A,te),id:I,name:o?void 0:x,type:e,value:re,onChange:de,onKeyDown:S||C?e=>{e.key===`Enter`&&S?.(),C?.(e)}:void 0,placeholder:_,disabled:o&&!ae,"aria-disabled":ae?`true`:void 0,readOnly:s||ae||void 0,autoFocus:b,"data-autofocus":b||void 0,"aria-describedby":ue,"aria-required":N?`true`:void 0,"aria-invalid":u?.type===`error`?`true`:void 0,"aria-busy":ie||void 0,"aria-labelledby":le,...{0:{className:`x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5`},1:{className:`x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5 xt0e3qv`}}[!!o<<0]}),y&&g!==``&&!o&&!s&&(0,q.jsx)(KO,{label:M(`@astryx.textInput.clearLabel`,{label:t}),onClick:fe}),ie&&(0,q.jsx)(Gt,{size:`sm`}),se]});return B?(0,q.jsxs)(q.Fragment,{children:[he,ae&&oe.renderTooltip(c)]}):(0,q.jsxs)(zO,{label:t,isLabelHidden:n,description:r,inputID:I,descriptionID:r?L:void 0,isOptional:i,isRequired:a,isDisabled:o,status:u?{type:u.type,message:u.message,messageID:u.message?R:void 0}:void 0,statusVariant:d,labelTooltip:v,width:T,children:[he,ae&&oe.renderTooltip(c)]})}$O.displayName=`TextInput`;var ek={ARTIFACT_DENIED:`fileReferenceDenied`,ARTIFACT_MISSING:`fileReferenceMissing`,ARTIFACT_UNSUPPORTED:`fileReferenceUnsupported`,ARTIFACT_EXPIRED:`fileReferenceExpired`,ARTIFACT_LIMIT:`fileReferenceBusy`,ARTIFACT_BUSY:`fileReferenceBusy`};function tk({open:e,sessionId:t,onClose:n,onInsert:r}){let{t:i}=W(),a=(0,K.useMemo)(()=>new de,[]),o=(0,K.useRef)(null),[s,c]=(0,K.useState)(``),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(null);(0,K.useEffect)(()=>(c(``),u(!1),f(null),()=>{o.current?.abort(),o.current=null}),[e,t]);let p=()=>{o.current?.abort(),o.current=null,n()},m=async()=>{let e=s.trim();if(!e||o.current)return;if(f(null),!t){let t=r(e);if(t){f(t);return}n();return}let c=new AbortController;o.current=c,u(!0);let l;try{if(l=(await a.resolveArtifact(t,encodeURI(e),void 0,c.signal)).handle,c.signal.aborted||(await a.artifactMetadata(t,l,c.signal),c.signal.aborted))return;let i=r(e);if(i){f(i);return}n()}catch(e){if(!c.signal.aborted){let t=e instanceof ge&&e.code?ek[e.code]:void 0;f(t?i(t):e instanceof Error?e.message:i(`fileReferenceFailed`))}}finally{o.current===c&&(o.current=null),l&&a.releaseArtifact(t,l).catch(()=>void 0),c.signal.aborted||u(!1)}};return(0,q.jsx)(Se,{isOpen:e,onOpenChange:e=>!e&&p(),purpose:`form`,width:460,"aria-label":i(`fileReferenceTitle`),children:(0,q.jsxs)(`form`,{className:`openpi-dialog file-reference-dialog`,onSubmit:e=>{e.preventDefault(),m()},children:[(0,q.jsxs)(`div`,{className:`file-reference-heading`,children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:i(`fileReferenceTitle`)}),(0,q.jsx)(`p`,{children:i(`fileReferenceDetail`)})]})]}),(0,q.jsx)($O,{label:i(`fileReferenceLabel`),value:s,placeholder:i(`fileReferencePlaceholder`),description:i(t?`fileReferenceValidatedHint`:`fileReferenceDraftHint`),hasAutoFocus:!0,hasClear:!0,isDisabled:l,onChange:e=>{c(e.slice(0,4096)),f(null)}}),d&&(0,q.jsx)(`p`,{className:`file-reference-error`,role:`alert`,children:d}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:p,children:i(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,className:`primary`,disabled:l||!s.trim(),children:i(l?`fileReferenceChecking`:`insertReference`)})]})]})})}function nk(e,t=e.split(/[\\/]/u).at(-1)||e){let n=encodeURI(e).replace(/[<>]/gu,encodeURIComponent);return`[${t.replace(/[\\[\]]/gu,`\\$&`)}](<${n}>)`}function rk(e){return[...e.matchAll(/(?\r\n]+)>\)/gu)].slice(0,100).flatMap(e=>{let t=e[2];return t.length>4096||!_e(t)?[]:[{name:e[1].replace(/\\([\\[\]])/gu,`$1`),reference:t,start:e.index,end:e.index+e[0].length}]})}function ik({items:e,onClose:t,open:n=!0,viewKey:r}){let i=(0,K.useRef)(null),a=(0,K.useRef)(e);(0,K.useLayoutEffect)(()=>{n&&(a.current=e)},[n,e]);let o=n?e:a.current,s=(0,K.useRef)(t);return s.current=t,(0,K.useEffect)(()=>{if(!n)return;i.current?.querySelector(`button:not(:disabled)`)?.focus();let e=e=>{!(e.target instanceof Element)||i.current?.contains(e.target)||e.target.closest(`.composer-context-trigger`)||s.current()};return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[n,r]),(0,K.useLayoutEffect)(()=>{if(!n)return;let e=i.current,t=e?.closest(`form`);if(!e||!t)return;let r=()=>{let n=window.visualViewport,r=n?.offsetTop??0,i=r+(n?.height??window.innerHeight),a=t.getBoundingClientRect(),o=Math.max(0,a.top-r-16),s=Math.max(0,i-a.bottom-16),c=o<180&&s>o;e.dataset.placement=c?`below`:`above`,e.style.maxHeight=`${Math.min(400,c?s:o)}px`};r();let a=typeof ResizeObserver>`u`?null:new ResizeObserver(r);return a?.observe(t),window.addEventListener(`resize`,r),window.visualViewport?.addEventListener(`resize`,r),window.visualViewport?.addEventListener(`scroll`,r),()=>{a?.disconnect(),window.removeEventListener(`resize`,r),window.visualViewport?.removeEventListener(`resize`,r),window.visualViewport?.removeEventListener(`scroll`,r)}},[n,r]),(0,q.jsx)(`div`,{ref:i,id:`composer-action-menu`,className:`composer-action-menu`,role:`menu`,hidden:!n,inert:!n,onKeyDown:e=>{if(!e.nativeEvent.isComposing){if(e.key===`Escape`||e.key===`Tab`)e.key===`Escape`&&e.preventDefault(),t(!0);else if([`ArrowDown`,`ArrowUp`,`Home`,`End`].includes(e.key)){e.preventDefault();let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled)`)],n=t.indexOf(document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowUp`?-1:1)+t.length)%t.length]?.focus()}}},children:o.map((e,t)=>(0,q.jsxs)(`div`,{role:`none`,children:[o[t-1]?.section!==e.section&&(0,q.jsx)(`div`,{className:`composer-action-section`,role:`presentation`,children:e.section}),(0,q.jsxs)(`button`,{type:`button`,role:`menuitem`,"aria-label":[e.label,e.alias].filter(Boolean).join(` `),"aria-description":e.description,disabled:e.disabled,onClick:e.onClick,title:e.description,children:[e.icon,(0,q.jsx)(`span`,{children:e.label}),e.alias&&(0,q.jsx)(`small`,{children:e.alias}),(0,q.jsx)(`span`,{className:`composer-action-description`,children:e.description})]})]},e.id))})}var ak={triggerContainer:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib xdk3u5w`,kLWn49:`x1kq96og`,kMwMTN:`x1tgivj0`,kkrTdU:`x1ypdohk x16khyan`,$$css:!0},trigger:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzQI83:`x1iyjqo2`,kmuXW:`xs83m0k`,kCS8Yb:`x1r8uery`,k7Eaqz:`xeuugli`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kWkggS:`xjbqb8w`,kMv6JI:`xjb2p0i`,kGuDYH:`x1qlqyl8`,kLWn49:`x15bjb6t`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kI3sdo:`x1a2a7pz`,kaIpWk:`xh6dtrn`,$$css:!0},triggerText:{kzQI83:`x1iyjqo2`,k7Eaqz:`xeuugli`,kVQacm:`xb3r6kr`,kg5iWk:`xlyipyv`,khDVqt:`xuxw1ft`,k9WMMc:`x1yc453h`,$$css:!0},placeholder:{kMwMTN:`xv1l7n4`,$$css:!0},triggerGhost:{kzqmXN:`x14atkfc`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kGVxlE:`x1gnnqk1 x1s17dad x15ysqaf`,k63SB2:`x1e4wzip`,k1ekBW:`xrafxwg`,k3aq6I:`x3oybdh xk4oym4`,$$css:!0},triggerGhostDisabled:{kKwaWg:`x18o3ruo`,k3aq6I:`x1c071of x1pdlv7q`,$$css:!0},triggerIcon:{kmuXW:`x2lah0s`,$$css:!0},triggerIconRotation:{k1ekBW:`x11xpdln`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,k3nNDw:`x1g0ag68`,$$css:!0},triggerIconOpen:{k3aq6I:`x19jd1h0`,$$css:!0},popover:{k7Eaqz:`xrzjruh`,$$css:!0},content:{kB7OPa:`x9f619`,kskxy:`xpnbb6b`,kVQacm:`xysyzu8`,kmVPX3:`x1b2ylru`,$$css:!0},sm:{kZKoxP:`x6k0iem`,$$css:!0},md:{kZKoxP:`x1ueg155`,$$css:!0},lg:{kZKoxP:`xssyfek`,$$css:!0},disabled:{kkrTdU:`xt0e3qv`,$$css:!0}};function ok({label:e,value:t,onChange:n,changeAction:r,children:i,triggerLabel:a,placeholder:o,isLabelHidden:s=!1,description:c,isOptional:l=!1,isRequired:u=!1,isDisabled:d=!1,isLoading:f=!1,status:m,statusVariant:h=`attached`,labelTooltip:g,size:_=`md`,variant:v=`input`,startIcon:y,width:b,placement:x=`below`,alignment:S=`start`,handleRef:C,onOpenChange:T,contentXstyle:E,xstyle:D,className:k,style:A,"data-testid":j,onClick:M,...N}){let P=jr(),F=YO({isRequired:u,isOptional:l}),I=o??P(`@astryx.selector.placeholder`),ee=v===`ghost`&&h===`attached`?`detached`:h,L=(0,K.useId)(),te=(0,K.useId)(),z=(0,K.useId)(),B=(0,K.useId)(),ne=(0,K.useId)(),re=[c?B:null,m?.message?ne:null].filter(e=>e!=null).join(` `)||void 0,V=(0,K.useRef)(null),[ie,ae]=(0,K.useTransition)(),[oe,se]=(0,K.useOptimistic)(t),ce=f||ie,le=Wr({dialogLabel:e,hasCloseButton:!1,hasAutoFocus:!0,surfaceTarget:`complex-selector-popup`,onShow:(0,K.useCallback)(()=>{T?.(!0)},[T]),onHide:(0,K.useCallback)(()=>{V.current?.focus(),T?.(!1)},[T])}),ue=le.isOpen,de=(0,K.useCallback)(()=>{d||(le.isOpen?le.hide():le.show())},[d,le]),pe=(0,K.useCallback)(()=>{le.hide()},[le]);(0,K.useImperativeHandle)(C,()=>({open:()=>{d||le.show()},close:()=>le.hide(),toggle:()=>{d||(le.isOpen?le.hide():le.show())},isOpen:()=>le.isOpen}),[d,le]);let me=(0,K.useCallback)(e=>{n?.(e),r&&ae(async()=>{se(e),await r(e)})},[r,n,se,ae]),he=a??I,ge=xa(y,{size:`sm`,color:`secondary`}),_e=(0,q.jsx)(`div`,{id:z,...w(ak.content,E),children:i(oe,me,pe,{isOpen:ue,isBusy:ce,triggerId:L,contentId:z})}),ve=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{ref:le.triggerRef,"data-testid":j,...N,onClick:pt(M,de),...H(O(`complex-selector`,{variant:v,size:_,status:m?.type??null}),w(BO.base,ak.triggerContainer,ak[_],fe.focusWithin,v===`ghost`&&ak.triggerGhost,v===`ghost`&&rn.backgroundImage,d&&BO.disabled,v===`ghost`&&d&&ak.triggerGhostDisabled,d&&ak.disabled,a==null&&ak.placeholder,D),k,A),children:[mt(ge)&&ge,(0,q.jsx)(`button`,{ref:V,id:L,type:`button`,"aria-haspopup":`dialog`,"aria-expanded":ue,"aria-controls":z,"aria-describedby":re,"aria-labelledby":te,"aria-required":F?`true`:void 0,"aria-invalid":m?.type===`error`?`true`:void 0,"aria-busy":ce||void 0,disabled:d,onKeyDown:e=>{e.key===`ArrowDown`&&!ue&&!d&&(e.preventDefault(),le.show())},className:`x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x16khyan x1a2a7pz xh6dtrn`,children:(0,q.jsx)(`span`,{className:`x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h`,children:he})}),ce&&(0,q.jsx)(Gt,{size:`sm`}),(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`secondary`,xstyle:[ak.triggerIcon,ak.triggerIconRotation,ue&&ak.triggerIconOpen],...O(`complex-selector-indicator-icon`,{state:ue?`expanded`:`collapsed`})})]}),le.render(_e,{placement:x,alignment:S,offset:p[`--spacing-1`],xstyle:[ak.popover,R[x]]})]});return(0,q.jsx)(zO,{label:e,isLabelHidden:s,description:c,inputID:L,descriptionID:c?B:void 0,labelID:te,isOptional:l,isRequired:u,isDisabled:d,status:m?{type:m.type,message:m.message,messageID:m.message?ne:void 0}:void 0,statusVariant:ee,labelTooltip:g,width:b,children:ve})}ok.displayName=`ComplexSelector`;function sk(e){let t=`${e.provider}/${e.id}`;return e.label===t?t:`${e.label} (${t})`}var ck=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37.9998%2023.021C33.7998%2025.2889%2029.5698%2027.3649%2024.8614%2028.3069C23.8114%2028.5154%2022.6474%2028.5154%2021.5809%2028.3714C20.5639%2028.2439%2020.0554%2027.3484%2020.4169%2026.4064C20.7619%2025.5289%2021.2209%2024.635%2021.8119%2023.9C23.0899%2022.3025%2024.5329%2020.849%2025.8289%2019.268C26.6203%2018.2991%2027.3335%2017.2689%2027.9618%2016.187C28.4208%2015.4205%2028.2078%2014.4935%2027.4038%2014.111C26.0584%2013.4556%2024.6154%2012.9936%2023.1889%2012.4986C23.0239%2012.4341%2022.7779%2012.6096%2022.4509%2012.7221C22.8604%2013.0881%2023.1559%2013.3596%2023.5654%2013.727C19.3339%2014.447%2015.3305%2015.467%2011.4455%2016.874C11.4275%2016.9535%2011.396%2017.0165%2011.411%2017.0495C11.9855%2017.927%2011.723%2018.5975%2010.886%2019.1405C10.5611%2019.3531%2010.2732%2019.6176%2010.034%2019.9235C12.593%2020.6735%2014.873%2020.243%2017.0539%2018.821C16.9234%2018.6305%2016.7914%2018.455%2016.6609%2018.263C17.4799%2018.407%2017.9719%2018.854%2018.0379%2019.556C18.0544%2019.7165%2017.9569%2019.8755%2017.9074%2020.036C17.7919%2019.907%2017.6449%2019.781%2017.5474%2019.6355C17.4799%2019.5395%2017.4634%2019.4285%2017.4154%2019.268C14.8235%2020.993%2012.035%2021.425%208.96751%2020.531C8.96751%2021.137%208.93451%2021.6485%208.98401%2022.1435C9.01701%2022.574%208.83701%2022.766%208.44401%2022.9895C7.55752%2023.5325%206.63803%2024.092%205.90003%2024.8105C5.01504%2025.6879%205.34354%2026.7589%206.54053%2027.2059C7.90102%2027.7159%209.329%2027.7309%2010.7555%2027.5569C12.4445%2027.3484%2014.1005%2027.0769%2015.9394%2026.8219C13.79%2027.8269%2011.6735%2028.5319%209.4445%2028.8169C7.88452%2029.0269%206.32753%2029.1379%204.78554%2028.6909C2.57156%2028.0684%201.58607%2026.4394%202.16057%2024.251C2.70206%2022.2065%204.01455%2020.5775%205.42454%2019.076C10.133%2014.078%2016.0864%2011.5401%2022.9744%2011.0286C24.5824%2010.9176%2026.2069%2011.1246%2027.7143%2011.7951C29.8308%2012.7536%2030.7173%2014.78%2029.6838%2016.826C29.0118%2018.1835%2028.0758%2019.4285%2027.1413%2020.6585C26.2234%2021.872%2025.1899%2022.9895%2024.2224%2024.155C23.9434%2024.506%2023.6809%2024.875%2023.4679%2025.2724C23.0569%2026.0224%2023.3359%2026.5174%2024.2059%2026.4394C26.0254%2026.2624%2027.8808%2026.1199%2029.6358%2025.6729C32.2098%2025.0174%2034.7193%2024.092%2037.2618%2023.2775C37.5243%2023.213%2037.7703%2023.117%2037.9998%2023.0225V23.021Z'%20fill='currentColor'/%3e%3c/svg%3e`,lk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.5835%2024.7904H25.7835C26.0754%2024.7904%2026.314%2025.0318%2026.314%2025.3277V27.8096C26.8199%2027.9343%2027.2691%2028.2255%2027.5896%2028.6362C27.9102%2029.047%2028.0833%2029.5536%2028.0813%2030.0746C28.0813%2031.3605%2027.0517%2032.4037%2025.7835%2032.4037C24.514%2032.4037%2023.4844%2031.3605%2023.4844%2030.0746C23.4844%2028.9741%2024.2399%2028.0509%2025.2531%2027.8082V25.865H21.5849V32.2237C21.5852%2032.3161%2021.5618%2032.407%2021.5169%2032.4877C21.4721%2032.5684%2021.4072%2032.6362%2021.3285%2032.6846L17.6603%2034.9224C17.577%2034.9733%2017.4813%2035%2017.3837%2034.9995C17.2862%2034.999%2017.1907%2034.9714%2017.108%2034.9197L10.3906%2030.7114C10.3131%2030.6628%2010.2493%2030.5952%2010.2052%2030.515C10.161%2030.4348%2010.138%2030.3447%2010.1384%2030.2532V25.8636L6.78241%2023.9136C6.70609%2023.8694%206.64181%2023.8071%206.59521%2023.7322C6.5486%2023.6573%206.52111%2023.5721%206.51514%2023.4841V23.4472V16.4626C6.51514%2016.2717%206.61468%2016.0944%206.77696%2015.999L10.1384%2014.0053V9.70163C10.1384%209.52572%2010.2229%209.36208%2010.3634%209.26253L10.392%209.24344L17.1107%205.07885C17.194%205.027%2017.2901%204.99951%2017.3882%204.99951C17.4863%204.99951%2017.5824%205.027%2017.6657%205.07885L21.3339%207.36296C21.4115%207.41162%2021.4753%207.47921%2021.5194%207.55938C21.5636%207.63955%2021.5866%207.72964%2021.5862%207.82115V13.9999H26.8445V11.3857C26.3384%2011.2609%2025.8889%2010.9696%2025.5684%2010.5585C25.2479%2010.1475%2025.0749%209.6406%2025.0772%209.11935C25.0772%207.83342%2026.1067%206.79023%2027.3749%206.79023C28.6445%206.79023%2029.6727%207.83342%2029.6727%209.11935C29.6727%2010.2198%2028.9186%2011.143%2027.9054%2011.3857V14.5371C27.9059%2014.6073%2027.8926%2014.6768%2027.8662%2014.7418C27.8399%2014.8068%2027.8009%2014.8659%2027.7516%2014.9158C27.7024%2014.9658%2027.6437%2015.0055%2027.5791%2015.0327C27.5144%2015.0599%2027.4451%2015.0741%2027.3749%2015.0744H21.5862V17.5372H30.6191C30.7351%2017.0302%2031.0192%2016.5773%2031.4252%2016.2522C31.8313%2015.9271%2032.3353%2015.749%2032.8554%2015.7467C34.1236%2015.7467%2035.1532%2016.7885%2035.1532%2018.0745C35.1532%2019.3604%2034.125%2020.4036%2032.8554%2020.4036C32.3351%2020.4012%2031.8309%2020.2229%2031.4249%2019.8975C31.0188%2019.5722%2030.7348%2019.119%2030.6191%2018.6117H21.5835V21.2531H28.3377L29.5854%2022.8622C29.9329%2022.659%2030.3283%2022.5522%2030.7309%2022.5527C32.0004%2022.5527%2033.0286%2023.5945%2033.0286%2024.8804C33.0286%2026.1664%2032.0004%2027.2096%2030.7309%2027.2096C29.4627%2027.2096%2028.4331%2026.1664%2028.4331%2024.8804C28.4331%2024.4086%2028.5722%2023.9695%2028.8095%2023.6027L27.8222%2022.3277H21.5835V24.7904ZM17.3875%206.16704L14.6016%207.89342V11.9407H13.5407V8.55071L11.1993%2010.003V14.019L14.0766%2015.8735L17.0316%2014.0135V10.9098H18.0925V14.3135C18.0925%2014.499%2017.9971%2014.6721%2017.8416%2014.7703L14.6466%2016.779V19.6167L16.5857%2020.9927L15.9775%2021.8736L14.0602%2020.5127L11.9738%2021.8831L11.397%2020.9831L13.5857%2019.5445V16.8308L10.6579%2014.9408L7.57606%2016.7681V19.0536L10.2652%2017.4322L10.8079%2018.3554L7.57606%2020.304V23.1363L10.5297%2024.8518L13.6252%2022.9863L14.1666%2023.9095L11.1993%2025.6973V29.9546L13.7575%2031.5569L16.9825%2029.6123L17.5253%2030.5369L14.7748%2032.1951L17.3903%2033.8328L20.5239%2031.9196V24.0377L14.0357%2027.9828L13.4902%2027.0623L20.5239%2022.7859V8.12115L17.3875%206.16704ZM25.7835%2028.8228C25.6198%2028.8237%2025.4579%2028.8568%2025.307%2028.9204C25.1561%2028.984%2025.0192%2029.0767%2024.9042%2029.1932C24.7892%2029.3097%2024.6983%2029.4478%2024.6367%2029.5995C24.5751%2029.7512%2024.5441%2029.9136%2024.5453%2030.0773C24.5453%2030.7687%2025.099%2031.3292%2025.7835%2031.3292C25.947%2031.3281%2026.1087%2031.2948%2026.2594%2031.2313C26.41%2031.1677%2026.5467%2031.0751%2026.6615%2030.9587C26.7764%2030.8424%2026.8672%2030.7045%2026.9287%2030.553C26.9903%2030.4016%2027.0215%2030.2395%2027.0204%2030.076C27.0216%2029.9123%2026.9906%2029.7501%2026.9291%2029.5985C26.8676%2029.4468%2026.7769%2029.3088%2026.662%2029.1923C26.5471%2029.0758%2026.4104%2028.9831%2026.2597%2028.9194C26.109%2028.8558%2025.9472%2028.8238%2025.7835%2028.8228ZM30.7336%2023.6272C30.5699%2023.6281%2030.4079%2023.6613%2030.257%2023.7249C30.1062%2023.7884%2029.9693%2023.8811%2029.8543%2023.9977C29.7393%2024.1142%2029.6484%2024.2523%2029.5868%2024.404C29.5252%2024.5557%2029.4942%2024.7181%2029.4954%2024.8818C29.4954%2025.5745%2030.0491%2026.1364%2030.7322%2026.1364C30.896%2026.1355%2031.0579%2026.1023%2031.2088%2026.0387C31.3597%2025.9752%2031.4966%2025.8825%2031.6116%2025.7659C31.7266%2025.6494%2031.8175%2025.5113%2031.8791%2025.3596C31.9406%2025.2079%2031.9717%2025.0455%2031.9704%2024.8818C31.9717%2024.7181%2031.9406%2024.5557%2031.8791%2024.404C31.8175%2024.2523%2031.7266%2024.1142%2031.6116%2023.9977C31.4966%2023.8811%2031.3597%2023.7884%2031.2088%2023.7249C31.0579%2023.6613%2030.8973%2023.6281%2030.7336%2023.6272ZM32.8541%2016.8226C32.6904%2016.8235%2032.5284%2016.8567%2032.3775%2016.9203C32.2266%2016.9838%2032.0898%2017.0765%2031.9747%2017.1931C31.8597%2017.3096%2031.7688%2017.4477%2031.7073%2017.5994C31.6457%2017.7511%2031.6146%2017.9135%2031.6159%2018.0772C31.6159%2018.7686%2032.1709%2019.329%2032.8541%2019.329C33.0176%2019.3279%2033.1793%2019.2947%2033.3299%2019.2311C33.4806%2019.1676%2033.6172%2019.075%2033.7321%2018.9586C33.8469%2018.8422%2033.9377%2018.7044%2033.9993%2018.5529C34.0609%2018.4014%2034.092%2018.2393%2034.0909%2018.0758C34.0922%2017.9122%2034.0612%2017.7499%2033.9997%2017.5983C33.9382%2017.4467%2033.8474%2017.3087%2033.7325%2017.1922C33.6177%2017.0757%2033.481%2016.9829%2033.3302%2016.9193C33.1795%2016.8556%2033.0177%2016.8223%2032.8541%2016.8213V16.8226ZM27.3736%207.86342C27.2099%207.86449%2027.0482%207.8978%2026.8974%207.96145C26.7467%208.02509%2026.61%208.11783%2026.4951%208.23434C26.3802%208.35086%2026.2895%208.48887%2026.228%208.64049C26.1665%208.79212%2026.1355%208.95437%2026.1367%209.11798C26.1367%209.81072%2026.6904%2010.3725%2027.3736%2010.3725C27.5373%2010.3717%2027.6992%2010.3385%2027.8501%2010.2749C28.001%2010.2113%2028.1379%2010.1186%2028.2529%2010.0021C28.3679%209.88558%2028.4588%209.7475%2028.5204%209.59579C28.582%209.44408%2028.613%209.28171%2028.6118%209.11798C28.613%208.95426%2028.582%208.79189%2028.5204%208.64018C28.4588%208.48847%2028.3679%208.35039%2028.2529%208.23386C28.1379%208.11733%2028.001%208.02462%2027.8501%207.96106C27.6992%207.89749%2027.5373%207.86432%2027.3736%207.86342Z'%20fill='currentColor'/%3e%3c/svg%3e`,uk=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAANh0lEQVR42u2b2XMcVxXGv+7p0YxH1jKW5UiRZEtWbGcldpwYDCEhJHFCMCEUVRRQ/An8QbzwAlW8hK0KCCQkOKuXxFlsS4mDjXdbkW1JtpbRjDQzzUN+Nzq59IxmZFlVFHRV12zd996zfec75/YEcRzrFo9AUsiZ4rMkVczZ6DhuLEmqct7WI1gFBfxXH+EazRE06AErvXfFR7RK46QkZSStk5SWFEual1SQVPaErOVyMb+neV1cixCIVhjzgVlcJGmTpAck7ZLUK6ko6bikI5JOe4oq1/GUTkmDjH9e0nXv92qNtTgFxmupAHe0SXpI0rOSHpO0Bcu/LWlG0lkDhIH36hacQXH3S7qX749IOoTC4hqhsCKhV0MBoRGqS9JTnEOSWiS1S/qqpBHOS0YQG9vOGzolPS7p+5LulLTAOFN4woy5N/AUUM8718QD2iV9RdIO77oeSQ9KGgUPPjMCu7TpPq+X9DUUEHL9JUknuG/GCFVPwKY9ImxC4EbR2IFXWtJ9kh6VtNVbWMqbOwRH3HfreB/jDUmcwx0thFDUYGZpWgGxp1lfyzMA3kXCIm3G7ZO0W9LdkrJ1skHKm3MWy1+RNGcwIGaOWFIrIfcA5xB4dNswIPAs5xY0Iel1SRsk7ZN0h2GCWT5vkdQv6bKkkhFCKCzP6yLfzUsaN9hhM4i7r1/SdxBckk5J+ojXqQTPiVdDAb4HBJJugNbtkrYZBYRGCZux0oKkMSOoJOXIAK2GQ4RY/rrnJY4etwGyPzXY8x5YUgV3Frx1xisNgTRnFQssGku4RY1LOob2b/K7W2wOD7gfQQOjxIhF540xAjDAeVHgWX+LpB9I+q6knSi+nfR5t6QBxmwIC8JlgCNgcX014itt4neclHdS0rQR0JGbe1l8xszRwrjreZ+0tsAUWhslPSnp55KeYX53ZFF21vu+aQwIvQquFzRvAZRmJV0z6ckC13FishdMkOEKg1in1dznOEMHixeuewWsSLEW5/a74BuPGA9xGaeVzzfBkFVRQAAxeRo0X8TShyW9DFuTWfgoGPAgcW/jvA/lDKA8N1cOZbWZrHKMeaw3Dkt6jtiXKZltBrkq6QIgqDqEaVkF2GMTsfaA+W4D17VKOsfEs6TCDyS9T+7vxOVTWHkrpOkSSigS25EJgaKkMzDAMi7dixG+iSLLxvIBAn9CFrhoMkCwHDmKmgBBe9yNQI+Cvn+R9A4TnZV0gN/3SrrLsL1tkr6Bi7+Bq5Y8rr8Ahowby/9Y0n5J21Fo2TRf5iS9hUe+Y6wfrFQBPs38DEq6nnBII1wHiugnNOap/AomJW0E+Bw5cvR4RNJRrJ01IBgTAiUW30G8v0AW8TPDolH4X/HGuJkeQlSD+dn3o5L+hhBPJ3jDZknfI4YPIPwUKfE0oXOnCRlHiroRwoFjG9a/hmIGUeDjeIGfqRYQ/m0w6bxXbFVWqoCqp4CzvLabktVZNE3O3okAjpP/k3tOkxnSCJPC2r2EwxTK2MC9MxClOdLmHkkP85u1vFDUIUn/kPQvQ6BCj7avWAGWPV0kzlKAzWYEGDT39RHzLYb2XmaRrcS+q/23cu0YQFk27j2BAh6W9ARZJTTsMcT6n+KZhyVNGq4QewVc4DVZq82CYMDCTrOwEbxgL8J0M3kLmJDHpY/jCdNkiZIBLlckneP7OQQM8aQ+AG/IWDJlSugzKPYwxnFgXW62jdZMLTBLOFwDxS9iwV0QpS4AbQu5PY8nFACzaYTP8tuQceWY67KM14+H2VB06XkatH+Le227rOkeYrRMGawEYLkB27rAeZnfdxky041C7mLBC5yLCOmUUMBzclgvA57EXn/Bkp0REP8Imcc1SIJlmq4NKyCV0ACxrSZXlMxK+thw9TGwYQALhgiZR2llk0FcRugFA0KE9ztOlpFOkFleItvcSOAreZTZAjjnAd0YwHW49AWeRA1YPql1LdP6HkUZI2DAQ6SuPnNfq0HowIBhi3HbMAGMU8b6Y/QdDno1iMgwAxigi/k2EI6bUP5JSW9SYjsFpBohQvWOKgD2MYA3yvvz9Pi24Q3pGooMErpBFdP5yZjvp8CdGHLkBF2HsD0ofQMh1snnjfCKPOuyawlXa2NEaPkcFPYyi30OXOhocpMlyfNSpMQ9YMs9hFCWUE57pXDGeFVYqzCKTMnpbhpCcy0m3mPeL5C2SgZ4XBenRCjMkvaOYZ0SabOHeEzV6C36uBN6v/VL+hbz7fDKbf8o4pkzYMVZGOopZHBgWY1QQsWUrd+m2dDNQDHCFkD/KYPsgdF4kckmuLYCQyvyeS/jpxIAtpFmzQCUup7XXkL5N1HAVTjDCPXMlKkzYknlyFtARMxsNyzPdXCKCD5rGpuBAbYqSimg+UkWEGCtlhVudFZNCi0BvDdR9g1+m2O+MQwwyzomCMcLHrY55caR98MCGnuPwdsBkxwLqBDTPcb1y6a741tn3iiqxfD0oI71/WqujOUu4FFjnGcA3hktPYdQQoYyZ2UZjvMl93dufIyF95s8njOac03MrNm4iIn3DtPQdDGd4Z6MVrYdH5qmrPMsZ/0prC1TB6RRdsowxAVkWvQVEMRxHHhsr5UF51i03XUJDdqmjIsGZodGpntcJW4fgxsMJrh3WMdKQUIavE4o3sTFF7l2Ebe32OQI1KfgwIRf50QeEjstz6xSakzTANluQs02MsMG0+siZxsh6fJ/ymBLBe+Y470rnK5I+hBC9CFc4AsmeLsekWmjibFT0tdhh7tY6CRK7zSe5W+92VTp4t31+rohWJvwxMwyADqL15yR9EdJvzFts0zUwO5vUMdFq8bSrvM7yAJ3a+l5AVfUTGpp67vquXlYg4kWySaf0p7LQms3MecmuEunV8dEZve6HeY46u0/1GWCSYoITVW44LXFHuYcJu63GbJyDXBN8X3OEKuslz1CDx/yEB+X109QDrsNlS6U3Guq0C7m7sQ4BUjQRW9brhrV2Q2uh8q229INydmPxXvNOCWsdgQ2tgOBWlHKPPdHCaDo1pA39ywy3vuAoNtKv4N5+/FC99pjKtWjFFJ206QSNZiGrGtWsdp9WHyA/t0jRngRc2/iulUsvw1BnFeUEK6CdQtYr8PrB6QJrSdN2+wgXjRPDTKBhduxfh4PcBnkHIC40KwC/MO1vvazO7sZJdmxTkh6hcbFDTxjDwWMIDWnsN4wQp5GCfeiAEeaHNtz5e1zhFIn5fG0IV0FhPT7gbHBnC91vaNlLG/bTJGx9l5qhu3ePcdxz3c5p2mLP2IEPYE7XmIs1/A8T5h0G0VVTav8GkJv5LmADoxxEKHLK0lXjSjAHf1sTO7Dmt3e9Wfo0r6I25fYR/gZrptDOb/j1T1PEME7LtJLGCBtrjcZZoFudIGttd2MOc9vBwx3ifTlBzCaVoC/nZQl1Twh6UcwOlcB3kDwC6D8a1hXxOw3ud7F9Ch9/DM0TBwAzhGjo1y7C+9ax5mhqDmOJ3QRhk+x3pwBWlubhJ7rN9QWt8/iuBJ5Bwve43VUTrInd0BLD0cEAOQ+9gKc8Nex8CnG7iMsUlj2MsVNGSu30vhwHZ8c131k+ohD+vxBiW7m+b3pFFdMsXZLm6NV0+xwpeVV4u4E7elD5vo7aVw8jyUjrPsq3jENmA2jhMBQ2RLe8QabJ4NaesjiHhR8iDC7JOknzLHPsMKDjDHptdSrze4NhqbnN4JFpljEMSw64+3FZ3DNPcaKC4TGL0D6Kulyi0mJgaG0JTY8HmSszbjzQ+DQhKRfMZbr/Q0Rbv1c90sMUzGVYtMKkEdhD2P9GV79oxPu/ywKyANSJ7Do++baDkhKYDY7ZFLfZXoSwwjZg5t3M/brAO2rhMhuPGEr4PkBZyGh7RY3uzEiA3gFj0raYwvx+DwLETH9EkrwcabThNh5PCk2+HMUutuFAtyxE/7xKl7wazjHC/r84akMntBL6JW9/YUVKSA0WODc1QJlD1XfM6B3GS95jfMKlnQPNrQDajEhdkVLD1a5VrnbWN1OUzXPvMOSfoghXAv+E9ZWRPAx0w+o2+pvlAnGCe/dRuQ64m6fITCnJP3JWH/OpCaH/i7+J8GVUgJru8D+/2bI1zbm6zMe5I5PCLn1jDee0BKLb0UB9j89boERFtoPMQkhNK9I+oMnvNsh6jFt94CwqiYo2THEUUl/xqIbCIkceNADGLutuo+aMGTTu8P+k6IpUt7jxH0bRORFaoART3iHxo7cBAnKtXNFZJBxyt/1WP0xFDkMTzhP+Kw6FV6uCdJi6vFFQPLvkn6L5Yv6zz9GZLX0SFy6QYUvghGHyB5ZhJ80bK/sNVbiRrf4oiaF9wnSFOlxns9HsXzR69Q6F89jNZfb53HdYo14tajtyNQ4Sr9J3BcTdrZjNfjfgVtRQJnmxMvEvBJi2f/OPRfgNjBdm3vKE0QJBU3RbL6qRi+xfLtDoNHuUarG9+4hqGnDHGeg1vM1FG7/onPL/xFabQXUOio1POcqDG07bayS6dQUauwJxGr836drrgBHWlKmoKkYAIoTPOAkWeI6171LYVNaJuTsHzZsxVq9Fa9YrX2BoFaerREeObOFVtDSM8PNzLc6C///f4f/x49ojeezuzYpE8cVrcH/hJOOfwP7YXRCmlwoyAAAAABJRU5ErkJggg==`,dk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2040'%3e%3cpath%20fill='currentColor'%20d='M33.0017%2034.7292C34.7884%2036.1587%2037.4682%2035.2056%2035.0115%2032.5854C27.6419%2024.9626%2029.2053%204%2020.049%204C10.8927%204%2012.456%2024.9626%205.08629%2032.5854C2.40641%2035.4438%205.3096%2036.1587%207.09621%2034.7292C14.0192%2029.7269%2013.5726%2020.913%2020.049%2020.913C26.5253%2020.913%2026.0787%2029.7269%2033.0017%2034.7292Z'/%3e%3c/svg%3e`,fk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.68%207.58398L11.296%2029.68L4%2029.6L12.144%2015.584L21.68%207.58398ZM22.8%209.32798L36%2032.416H11.584L26.464%2029.76L18.672%2020.496L22.8%209.32798Z'%20fill='currentColor'/%3e%3c/svg%3e`,pk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCerebras%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M14.121%202.701a9.299%209.299%200%20000%2018.598V22.7c-5.91%200-10.7-4.791-10.7-10.701S8.21%201.299%2014.12%201.299V2.7zm4.752%203.677A7.353%207.353%200%20109.42%2017.643l-.901%201.074a8.754%208.754%200%2001-1.08-12.334%208.755%208.755%200%200112.335-1.08l-.901%201.075zm-2.255.844a5.407%205.407%200%2000-5.048%209.563l-.656%201.24a6.81%206.81%200%20016.358-12.043l-.654%201.24zM14.12%208.539a3.46%203.46%200%20100%206.922v1.402a4.863%204.863%200%20010-9.726v1.402z'%20fill='%23F15A29'%20fill-rule='evenodd'%3e%3c/path%3e%3cpath%20d='M15.407%2010.836a2.24%202.24%200%2000-.51-.409%201.084%201.084%200%2000-.544-.152c-.255%200-.483.047-.684.14a1.58%201.58%200%2000-.84.912c-.074.203-.11.416-.11.631%200%20.218.036.43.11.631a1.594%201.594%200%2000.84.913c.2.093.43.14.684.14.216%200%20.417-.046.602-.135.188-.09.35-.225.475-.392l.928%201.006c-.14.14-.3.261-.482.363a3.367%203.367%200%2001-1.083.38c-.17.026-.317.04-.44.04a3.315%203.315%200%2001-1.182-.21%202.825%202.825%200%2001-.961-.597%202.816%202.816%200%2001-.644-.929%202.987%202.987%200%2001-.238-1.21c0-.444.08-.847.238-1.21.15-.35.368-.666.643-.929.278-.261.605-.464.962-.596a3.315%203.315%200%20011.182-.21c.355%200%20.712.068%201.072.204.361.138.685.36.944.649l-.962.97z'%3e%3c/path%3e%3c/svg%3e`,mk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCloudflare%3c/title%3e%3cpath%20d='M16.493%2017.4c.135-.52.08-.983-.161-1.338-.215-.328-.592-.519-1.05-.519l-8.663-.109a.148.148%200%2001-.135-.082c-.027-.054-.027-.109-.027-.163.027-.082.108-.164.189-.164l8.744-.11c1.05-.054%202.153-.9%202.556-1.937l.511-1.31c.027-.055.027-.11.027-.164C17.92%208.91%2015.66%207%2012.942%207c-2.503%200-4.628%201.638-5.381%203.903a2.432%202.432%200%2000-1.803-.491c-1.21.109-2.153%201.092-2.287%202.32-.027.328%200%20.628.054.9C1.56%2013.688%200%2015.326%200%2017.319c0%20.19.027.355.027.545%200%20.082.08.137.161.137h15.983c.08%200%20.188-.055.215-.164l.107-.437'%20fill='%23F38020'%3e%3c/path%3e%3cpath%20d='M19.238%2011.75h-.242c-.054%200-.108.054-.135.109l-.35%201.2c-.134.52-.08.983.162%201.338.215.328.592.518%201.05.518l1.855.11c.054%200%20.108.027.135.082.027.054.027.109.027.163-.027.082-.108.164-.188.164l-1.91.11c-1.05.054-2.153.9-2.557%201.937l-.134.355c-.027.055.026.137.107.137h6.592c.081%200%20.162-.055.162-.137.107-.41.188-.846.188-1.31-.027-2.62-2.153-4.777-4.762-4.777'%20fill='%23FCAD32'%3e%3c/path%3e%3c/svg%3e`,hk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M9.14882%2013.5552C9.58082%2013.5552%2010.4448%2013.5336%2011.6544%2013.0368C13.0584%2012.4536%2015.8232%2011.4168%2017.832%2010.3368C19.236%209.5808%2019.8408%208.5872%2019.8408%207.248C19.8408%205.412%2018.3504%203.9%2016.4928%203.9H8.71682C6.06002%203.9%203.90002%206.06%203.90002%208.7168C3.90002%2011.3736%205.93042%2013.5552%209.14882%2013.5552Z'%20fill='currentColor'/%3e%3cpath%20d='M10.4664%2016.86C10.4664%2015.564%2011.244%2014.376%2012.4536%2013.8792L14.8944%2012.864C17.3784%2011.8488%2020.1%2013.6632%2020.1%2016.3416C20.1%2018.4152%2018.4152%2020.1%2016.3416%2020.1H13.6848C11.9136%2020.1%2010.4664%2018.6528%2010.4664%2016.86Z'%20fill='currentColor'/%3e%3cpath%20d='M6.68642%2014.1816C5.15282%2014.1816%203.90002%2015.4344%203.90002%2016.968V17.3352C3.90002%2018.8472%205.15282%2020.1%206.68642%2020.1C8.22003%2020.1%209.47283%2018.8472%209.47283%2017.3136V16.9464C9.45123%2015.4344%208.22003%2014.1816%206.68642%2014.1816Z'%20fill='currentColor'/%3e%3c/svg%3e`,gk=`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2040'%3e%3cpath%20fill='currentColor'%20d='M29.6214%2014.2072L20.9502%209.12249C20.6718%208.95917%2020.3282%208.95917%2020.0498%209.12249L11.3786%2014.2072C11.1445%2014.3445%2011%2014.5984%2011%2014.8733V25.1267C11%2025.4012%2011.1445%2025.6555%2011.3786%2025.7928L20.0498%2030.8775C20.3282%2031.0408%2020.6718%2031.0408%2020.9502%2030.8775L29.6214%2025.7928C29.8555%2025.6555%2030%2025.4016%2030%2025.1267V14.8733C30%2014.5988%2029.8555%2014.3445%2029.6214%2014.2072ZM29.0767%2015.2843L20.706%2030.0101C20.6494%2030.1093%2020.5%2030.0688%2020.5%2029.9538V20.3115C20.5%2020.1189%2020.3986%2019.9407%2020.2342%2019.8439L12.0124%2015.0226C11.9147%2014.9651%2011.9546%2014.8134%2012.0678%2014.8134H28.8093C29.047%2014.8134%2029.1956%2015.0751%2029.0767%2015.2843Z'/%3e%3c/svg%3e`,_k=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eDeepInfra%3c/title%3e%3cpath%20d='M3.294%207.821A2.297%202.297%200%20011%205.527a2.297%202.297%200%20012.294-2.295A2.297%202.297%200%20015.59%205.527%202.297%202.297%200%20013.294%207.82zm0-3.688a1.396%201.396%200%20000%202.79%201.396%201.396%200%20000-2.79zM3.294%2014.293A2.297%202.297%200%20011%2011.998a2.297%202.297%200%20012.294-2.294%202.297%202.297%200%20012.295%202.294%202.297%202.297%200%2001-2.295%202.295zm0-3.688a1.395%201.395%200%20000%202.788%201.395%201.395%200%20100-2.788zM3.294%2020.761A2.297%202.297%200%20011%2018.467a2.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.295%202.294zm0-3.688a1.396%201.396%200%20000%202.79%201.396%201.396%200%20000-2.79zM20.738%207.821a2.297%202.297%200%2001-2.295-2.294%202.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.294%202.294zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM20.738%2014.293a2.297%202.297%200%2001-2.295-2.295%202.297%202.297%200%20012.294-2.294%202.297%202.297%200%20012.295%202.294%202.297%202.297%200%2001-2.294%202.295zm0-3.688c-.769%200-1.395.625-1.395%201.393a1.396%201.396%200%20002.79%200c0-.77-.626-1.393-1.395-1.393zM20.738%2020.761a2.297%202.297%200%2001-2.295-2.294%202.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.294%202.294zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM12.016%2011.057a2.297%202.297%200%2001-2.294-2.294%202.297%202.297%200%20012.294-2.295%202.297%202.297%200%20012.295%202.295%202.297%202.297%200%2001-2.295%202.294zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.625-1.395-1.395-1.395zM12.017%204.589a2.297%202.297%200%2001-2.295-2.295A2.297%202.297%200%200112.017%200a2.297%202.297%200%20012.294%202.294%202.297%202.297%200%2001-2.294%202.295zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM12.017%2017.529a2.297%202.297%200%2001-2.295-2.295%202.297%202.297%200%20012.295-2.294%202.297%202.297%200%20012.294%202.294%202.297%202.297%200%2001-2.294%202.295zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.626-1.395-1.395-1.395zM12.016%2024a2.297%202.297%200%2001-2.294-2.295%202.297%202.297%200%20012.294-2.294%202.297%202.297%200%20012.295%202.294A2.297%202.297%200%200112.016%2024zm0-3.688a1.396%201.396%200%20101.395%201.395c0-.77-.625-1.395-1.395-1.395z'%20fill='%232A3275'%3e%3c/path%3e%3cpath%20d='M8.363%208.222a.742.742%200%2001-.277-.053l-1.494-.596a.75.75%200%2011.557-1.392l1.493.595a.75.75%200%2001-.278%201.446h-.001zM8.363%2014.566a.743.743%200%2001-.277-.053l-1.494-.595a.75.75%200%2011.557-1.393l1.493.596a.75.75%200%2001-.278%201.445h-.001zM17.124%2011.397a.741.741%200%2001-.277-.054l-1.493-.595a.75.75%200%2011.555-1.392l1.493.595a.75.75%200%2001-.278%201.446zM17.124%205.05a.744.744%200%2001-.277-.054L15.354%204.4a.75.75%200%2001.555-1.392l1.493.596a.75.75%200%2001-.278%201.445zM17.124%2017.739a.743.743%200%2001-.277-.053l-1.494-.596a.75.75%200%2011.556-1.392l1.493.596a.75.75%200%2001-.278%201.445zM6.91%2017.966a.75.75%200%2001-.279-1.445l1.494-.595a.749.749%200%2011.556%201.392l-1.493.595a.743.743%200%2001-.277.053H6.91zM6.91%2011.66a.75.75%200%2001-.279-1.446l1.494-.595a.75.75%200%2001.556%201.392l-1.493.595a.743.743%200%2001-.277.053H6.91zM6.91%205.033a.75.75%200%2001-.279-1.446l1.494-.595a.75.75%200%2001.556%201.392l-1.493.596a.744.744%200%2001-.277.053H6.91zM8.363%2021.364a.743.743%200%2001-.277-.053l-1.494-.596a.75.75%200%2001.555-1.392l1.494.595a.75.75%200%2001-.278%201.446zM15.63%208.223a.75.75%200%2001-.278-1.447l1.494-.595a.75.75%200%2001.556%201.393l-1.494.595a.744.744%200%2001-.276.054h-.002zM15.63%2014.567a.75.75%200%2001-.278-1.446l1.494-.596a.75.75%200%2001.556%201.394l-1.494.595a.743.743%200%2001-.276.053h-.002zM15.63%2021.363a.749.749%200%2001-.278-1.445l1.494-.595a.75.75%200%2011.555%201.392l-1.494.595a.741.741%200%2001-.277.053z'%20fill='%235699DB'%3e%3c/path%3e%3c/svg%3e`,vk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.6638%209.91965C35.3251%209.75432%2035.1785%2010.0703%2034.9811%2010.2316C34.9131%2010.2836%2034.8558%2010.3516%2034.7985%2010.413C34.3025%2010.9423%2033.7238%2011.289%2032.9678%2011.2476C31.8625%2011.1863%2030.9186%2011.533%2030.0839%2012.3783C29.9066%2011.3356%2029.3173%2010.7143%2028.4213%2010.3143C27.9519%2010.1063%2027.4773%209.89965%2027.148%209.44766C26.9186%209.12633%2026.856%208.76767%2026.7413%208.41568C26.668%208.20235%2026.5946%207.98502%2026.3506%207.94902C26.084%207.90769%2025.98%208.13035%2025.876%208.31702C25.4587%209.07967%2025.2973%209.91965%2025.3133%2010.7703C25.3493%2012.6849%2026.1573%2014.2102%2027.764%2015.2942C27.9466%2015.4182%2027.9933%2015.5435%2027.9359%2015.7249C27.8266%2016.0982%2027.696%2016.4609%2027.5813%2016.8355C27.508%2017.0742%2027.3986%2017.1248%2027.1426%2017.0222C26.2777%2016.6504%2025.4919%2016.1164%2024.828%2015.4489C23.6854%2014.3449%2022.6534%2013.1263%2021.3654%2012.1716C21.067%2011.9511%2020.7606%2011.7416%2020.4468%2011.5436C19.1335%2010.2676%2020.6201%209.21967%2020.9641%209.09567C21.3241%208.965%2021.0881%208.51968%2019.9254%208.52501C18.7628%208.53035%2017.6988%208.91834%2016.3428%209.43699C16.1413%209.51421%2015.934%209.57529%2015.7229%209.61966C14.4557%209.38091%2013.1598%209.33506%2011.8789%209.48366C9.36565%209.76365%207.35902%2010.953%205.88305%2012.9809C4.10975%2015.4182%203.69243%2018.1888%204.20308%2021.0768C4.74041%2024.122%206.29504%2026.6433%208.683%2028.6139C11.1603%2030.6579%2014.0122%2031.6592%2017.2668%2031.4672C19.2428%2031.3539%2021.4441%2031.0886%2023.9254%2028.9873C24.552%2029.2993%2025.208%2029.4233%2026.2986%2029.5166C27.1386%2029.5953%2027.9466%2029.4766%2028.5719%2029.3459C29.5519%2029.1379%2029.4839%2028.23%2029.1306%2028.0646C26.2573%2026.726%2026.888%2027.2713%2026.3133%2026.83C27.7746%2025.102%2029.9746%2023.3074%2030.8359%2017.4928C30.9026%2017.0302%2030.8452%2016.7395%2030.8359%2016.3662C30.8306%2016.1395%2030.8826%2016.0502%2031.1426%2016.0249C31.8639%2015.95%2032.5637%2015.7349%2033.2025%2015.3915C35.0638%2014.3742%2035.8158%2012.7049%2035.9931%2010.7023C36.0198%2010.3956%2035.9878%2010.081%2035.6638%209.91965ZM19.4414%2027.9433C16.6562%2025.754%2015.3055%2025.0327%2014.7482%2025.0634C14.2256%2025.0954%2014.3202%2025.6913%2014.4349%2026.0807C14.5549%2026.4647%2014.7109%2026.7286%2014.9295%2027.066C15.0815%2027.2886%2015.1855%2027.6206%2014.7789%2027.87C13.8816%2028.4246%2012.3229%2027.6833%2012.2496%2027.6473C10.435%2026.578%208.91632%2025.1673%207.84834%2023.2381C6.81637%2021.3808%206.21638%2019.3888%206.11771%2017.2622C6.09105%2016.7475%206.24171%2016.5662%206.7537%2016.4729C7.42583%2016.3442%208.11451%2016.3267%208.79233%2016.4209C11.6349%2016.8368%2014.0536%2018.1075%2016.0828%2020.1194C17.2402%2021.2661%2018.1161%2022.6354%2019.0188%2023.974C19.9788%2025.3953%2021.0108%2026.75%2022.3254%2027.8593C22.7894%2028.2486%2023.1587%2028.5446%2023.5134%2028.7619C22.4441%2028.8819%2020.6601%2028.9086%2019.4414%2027.9433ZM20.7748%2019.3568C20.7745%2019.2906%2020.7904%2019.2253%2020.8211%2019.1666C20.8517%2019.1078%2020.8962%2019.0575%2020.9507%2019.0198C21.0052%2018.9821%2021.068%2018.9583%2021.1337%2018.9503C21.1995%2018.9424%2021.2662%2018.9505%2021.3281%2018.9741C21.407%2019.0024%2021.475%2019.0546%2021.5228%2019.1235C21.5706%2019.1923%2021.5958%2019.2743%2021.5947%2019.3581C21.5949%2019.4123%2021.5843%2019.4659%2021.5636%2019.5159C21.5428%2019.5659%2021.5123%2019.6113%2021.4738%2019.6494C21.4354%2019.6875%2021.3897%2019.7176%2021.3395%2019.7378C21.2893%2019.7581%2021.2356%2019.7682%2021.1814%2019.7675C21.1277%2019.7676%2021.0745%2019.7571%2021.0248%2019.7365C20.9752%2019.7158%2020.9302%2019.6855%2020.8925%2019.6473C20.8548%2019.609%2020.825%2019.5636%2020.805%2019.5138C20.785%2019.4639%2020.7739%2019.4105%2020.7748%2019.3568ZM24.9213%2021.4848C24.6547%2021.5928%2024.3893%2021.6861%2024.1347%2021.6981C23.7516%2021.7114%2023.3756%2021.5918%2023.0707%2021.3594C22.7054%2021.0528%2022.4441%2020.8821%2022.3347%2020.3488C22.297%2020.0881%2022.3042%2019.823%2022.3561%2019.5648C22.4494%2019.1288%2022.3454%2018.8488%2022.0374%2018.5955C21.7881%2018.3875%2021.4694%2018.3302%2021.1201%2018.3302C21.0005%2018.3232%2020.8843%2018.2875%2020.7814%2018.2262C20.6348%2018.1542%2020.5148%2017.9728%2020.6294%2017.7488C20.6668%2017.6768%2020.8428%2017.5008%2020.8854%2017.4688C21.3601%2017.1995%2021.9081%2017.2875%2022.4134%2017.4902C22.8827%2017.6822%2023.2374%2018.0342%2023.748%2018.5328C24.2694%2019.1341%2024.364%2019.3008%2024.6613%2019.7515C24.896%2020.1048%2025.1093%2020.4674%2025.2547%2020.8821C25.344%2021.1421%2025.2293%2021.3541%2024.9213%2021.4848Z'%20fill='currentColor'/%3e%3c/svg%3e`,yk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14.45%205.74999L11.9991%2011.6956L9.54562%205.74999H7.97237L10.6604%2012.2495C10.7678%2012.5138%2010.9515%2012.7402%2011.1882%2012.8996C11.4248%2013.059%2011.7036%2013.1442%2011.9889%2013.1444C12.2742%2013.1446%2012.5531%2013.0597%2012.79%2012.9006C13.0268%2012.7415%2013.2109%2012.5154%2013.3186%2012.2512L16.0232%205.74999H14.45ZM15.4965%2014.808L19.98%2010.2195L19.3684%208.75911L14.4719%2013.7807C14.272%2013.9856%2014.1369%2014.2448%2014.0835%2014.5261C14.0301%2014.8073%2014.0608%2015.098%2014.1718%2015.3619C14.2807%2015.624%2014.4648%2015.848%2014.7008%2016.0056C14.9369%2016.1632%2015.2144%2016.2473%2015.4983%2016.2474L15.5%2016.25L22.5%2016.2325L21.8884%2014.7721L15.4983%2014.808H15.4965ZM4.02%2010.216L4.63162%208.75561L9.52813%2013.7772C9.93763%2014.1964%2010.0557%2014.8176%209.82825%2015.3584C9.71925%2015.6204%209.53511%2015.8443%209.29905%2016.0019C9.06299%2016.1595%208.78557%2016.2437%208.50175%2016.2439L1.50175%2016.2281L1.5%2016.2299L2.11163%2014.7695L8.50175%2014.8062L4.02%2010.216Z'%20fill='currentColor'/%3e%3c/svg%3e`,bk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M35.3993%2026.4544C34.2871%2028.3855%2027.8314%2032.9425%2020%2032.9425C12.1686%2032.9425%205.71288%2028.3855%204.60075%2026.4544C4.5427%2026.3532%204.50826%2026.2401%204.5%2026.1237V22.418C4.51199%2022.3209%204.53496%2022.2256%204.56846%2022.1338C5.04896%2020.9261%206.30833%2019.1733%207.93325%2018.7031C8.14896%2018.149%208.468%2017.3404%208.76508%2016.7437C8.71727%2016.2776%208.69485%2015.8094%208.69792%2015.3409C8.69792%2013.6217%209.06217%2012.113%2010.1601%2010.9906C10.6729%2010.4662%2011.3097%2010.0644%2012.064%209.76091C13.871%208.29357%2016.4453%207.05745%2019.9716%207.05745C23.4978%207.05745%2026.129%208.29357%2027.936%209.76091C28.6903%2010.0644%2029.3271%2010.4662%2029.8399%2010.9906C30.9378%2012.113%2031.3021%2013.6217%2031.3021%2015.3409C31.3021%2015.8162%2031.284%2016.2877%2031.2349%2016.7437C31.532%2017.3404%2031.851%2018.149%2032.0667%2018.7031C33.6917%2019.1733%2034.951%2020.9261%2035.4315%2022.1338C35.4677%2022.2248%2035.4908%2022.3205%2035.5%2022.418V26.1237C35.4917%2026.2401%2035.4573%2026.3532%2035.3993%2026.4544ZM20.2222%2018.7147H19.7778C19.6422%2018.945%2019.4889%2019.1644%2019.3193%2019.3709C18.3247%2020.5941%2016.8419%2021.2981%2014.7881%2021.2981C12.56%2021.2981%2010.9273%2020.8344%209.90304%2019.6719C9.86495%2019.6283%209.82833%2019.5835%209.79325%2019.5375L9.66667%2019.6719V28.1775C11.5202%2029.1837%2015.4972%2030.992%2020%2030.992C24.5028%2030.992%2028.4798%2029.1837%2030.3333%2028.1775V19.6719L30.2067%2019.5375C30.2067%2019.5375%2030.1641%2019.5957%2030.097%2019.6719C29.0727%2020.8344%2027.44%2021.2981%2025.2119%2021.2981C23.1581%2021.2981%2021.6753%2020.5941%2020.6807%2019.3709C20.5111%2019.1644%2020.3578%2018.945%2020.2222%2018.7147ZM23.2292%2022.9127C23.9383%2022.9127%2024.5208%2023.4952%2024.5208%2024.2043V26.7877C24.5208%2027.4968%2023.9383%2028.0793%2023.2292%2028.0793C22.52%2028.0793%2021.9375%2027.4968%2021.9375%2026.7877V24.2043C21.9375%2023.4952%2022.52%2022.9127%2023.2292%2022.9127ZM16.7708%2022.9127C17.48%2022.9127%2018.0625%2023.4952%2018.0625%2024.2043V26.7877C18.0625%2027.4968%2017.48%2028.0793%2016.7708%2028.0793C16.0617%2028.0793%2015.4792%2027.4968%2015.4792%2026.7877V24.2043C15.4792%2023.4952%2016.0617%2022.9127%2016.7708%2022.9127ZM21.0501%2014.9237C21.2258%2016.289%2021.5707%2017.3947%2022.1842%2018.149C22.7551%2018.8517%2023.649%2019.3606%2025.2119%2019.3606C27.2437%2019.3606%2028.1724%2018.9253%2028.6438%2018.3905C29.1398%2017.8287%2029.3646%2016.9051%2029.3646%2015.3409C29.3646%2013.8684%2029.0507%2012.9552%2028.454%2012.3455C27.8378%2011.7152%2026.7502%2011.2321%2024.8063%2011.0216C22.8856%2010.8136%2021.975%2011.1998%2021.5345%2011.7049C21.187%2012.1014%2020.97%2012.7485%2020.9688%2013.7431V13.7702C20.9688%2014.1121%2020.9959%2014.4966%2021.0501%2014.9237ZM18.9499%2014.9237C19.0041%2014.4966%2019.0312%2014.1117%2019.0312%2013.7689V13.7431C19.03%2012.7485%2018.813%2012.1014%2018.4655%2011.7049C18.025%2011.1998%2017.1144%2010.8136%2015.1937%2011.0216C13.2498%2011.2321%2012.1622%2011.7152%2011.546%2012.3455C10.9493%2012.9552%2010.6354%2013.8684%2010.6354%2015.3409C10.6354%2016.9051%2010.8615%2017.8287%2011.3562%2018.3905C11.8276%2018.9253%2012.7563%2019.3606%2014.7881%2019.3606C16.351%2019.3606%2017.2449%2018.8517%2017.8158%2018.149C18.4293%2017.3947%2018.7742%2016.289%2018.9499%2014.9237Z'%20fill='currentColor'/%3e%3c/svg%3e`,xk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M37%2020.034C27.8809%2020.5837%2020.5808%2027.8809%2020.0326%2037H19.966C19.4163%2027.8809%2012.1177%2020.5837%203%2020.034V19.9674C12.1191%2019.4163%2019.4163%2012.1191%2019.966%203H20.0326C20.5822%2012.1191%2027.8809%2019.4163%2037%2019.9674V20.034Z'%20fill='currentColor'/%3e%3c/svg%3e`,Sk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.056%204.50022C14.0839%204.44597%209.20616%209.15015%209.15036%2015.0106C9.09611%2020.8726%2013.8855%2025.6621%2019.8576%2025.7163H23.6085V21.7391H20.056C16.3252%2021.7825%2013.2671%2018.8468%2013.2237%2015.1827C13.1787%2011.5216%2016.1702%208.52086%2019.901%208.47746H20.056C23.7868%208.47746%2026.8108%2011.4457%2026.8216%2015.1083V24.8809C26.8216%2028.5109%2023.8085%2031.4683%2020.1211%2031.5132C18.3617%2031.5007%2016.6759%2030.8049%2015.42%2029.5726L12.551%2032.3905C14.5529%2034.3571%2017.239%2035.4715%2020.0451%2035.4998H20.1877C26.0823%2035.413%2030.8175%2030.7212%2030.85%2024.9351V14.8603C30.7059%209.0928%2025.9165%204.50022%2020.056%204.50022Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ck=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M26.7365%207.70867C30.9594%2010.1097%2033.562%2014.5441%2033.562%2019.3448C33.562%2020.7468%2033.3436%2022.0995%2032.9378%2023.3705C33.2276%2023.3346%2033.5219%2023.3669%2033.7971%2023.4647C34.0723%2023.5626%2034.3208%2023.7233%2034.523%2023.9341C34.8338%2024.2495%2035.0303%2024.6597%2035.0814%2025.0996C35.1324%2025.5394%2035.0351%2025.9837%2034.8048%2026.3619C35.0922%2026.5944%2035.3008%2026.9044%2035.4079%2027.2525L35.4318%2027.3398C35.5164%2027.6526%2035.6009%2028.3121%2035.15%2028.9828C35.4938%2029.5042%2035.5431%2030.1608%2035.2811%2030.7244C34.9217%2031.5276%2034.0228%2032.1588%2032.2826%2032.838L31.9979%2032.9479L31.8133%2033.0156C31.1398%2033.2593%2030.5593%2033.4312%2030.3183%2033.5017L30.1971%2033.5355C28.9431%2033.8779%2027.6495%2034.0639%2026.3476%2034.0907C24.4876%2034.0907%2023.1067%2033.5834%2022.2289%2032.5872C20.7465%2032.8382%2019.2331%2032.8468%2017.748%2032.6126C16.8688%2033.5933%2015.4935%2034.0907%2013.6504%2034.0907C12.4424%2034.0666%2011.2411%2033.9044%2010.07%2033.6074L9.75858%2033.5228L9.37391%2033.4101C8.81508%2033.2406%208.26281%2033.0503%207.71825%2032.8394C5.97523%2032.1588%205.07625%2031.529%204.71693%2030.7244C4.45485%2030.1608%204.50416%2029.5028%204.84798%2028.9828C4.68566%2028.7453%204.57646%2028.4756%204.52782%2028.1921C4.47919%2027.9085%204.49227%2027.6178%204.56616%2027.3398C4.66339%2026.9552%204.88461%2026.6127%205.19602%2026.3619C4.96607%2025.9839%204.86892%2025.5399%204.91997%2025.1003C4.97102%2024.6607%205.16735%2024.2508%205.47783%2023.9355C5.80614%2023.5861%206.26268%2023.3846%206.76995%2023.362L6.87985%2023.3606C6.46754%2022.0619%206.2584%2020.7073%206.25986%2019.3448C6.25986%2014.5441%208.86242%2010.1097%2013.0854%207.70867C15.1666%206.52898%2017.518%205.90889%2019.9102%205.90889C22.3025%205.90889%2024.6553%206.52898%2026.7365%207.70867ZM8.99205%2023.8862C9.16818%2024.8542%2012.3132%2027.1975%2012.0075%2027.7006C11.7397%2028.1444%2010.8858%2027.3638%2010.6717%2027.1566L10.6139%2027.1003L10.3772%2026.8932C9.58668%2026.2182%207.13067%2024.2159%206.51631%2024.8754C5.91041%2025.5235%206.68399%2026.0858%208.00288%2026.8762L9.10759%2027.5343L9.29923%2027.6512C10.7717%2028.5573%2010.8774%2028.8349%2010.6378%2029.2195C10.3729%2029.6352%206.312%2026.2605%205.93155%2027.6935C5.5511%2029.1181%2010.077%2029.5309%209.79804%2030.5201C9.51622%2031.5064%206.60649%2028.6545%206.01469%2029.7634C5.41583%2030.8766%2010.1193%2032.1842%2010.1574%2032.1941L10.3828%2032.2504L10.6294%2032.3096C12.3583%2032.7098%2015.6527%2033.2255%2016.8786%2031.4585C17.8269%2030.0875%2017.7804%2029.0504%2016.5292%2027.7809L16.4488%2027.7006C15.1173%2026.3929%2014.3423%2024.4766%2014.3423%2024.4766L14.3183%2024.3949L14.2831%2024.2934C14.1676%2023.9834%2013.8829%2023.393%2013.3954%2023.4705C12.7472%2023.5734%2012.271%2025.1755%2013.5645%2026.1943L13.6349%2026.2478C15.0116%2027.2637%2013.3602%2027.9528%2012.8275%2027.0002L12.7458%2026.8537L12.5443%2026.5014C11.8919%2025.3756%2010.7379%2023.5269%2010.0939%2023.1239C9.34432%2022.6561%208.81592%2022.9154%208.99205%2023.8862ZM29.9055%2023.1239C29.1544%2023.5959%2027.7031%2026.0463%2027.1719%2027.0002C27.0805%2027.1684%2026.9358%2027.3014%2026.7606%2027.3785C26.5854%2027.4555%2026.3895%2027.4721%2026.2038%2027.4258C26.1115%2027.3997%2026.0266%2027.3525%2025.9558%2027.2877C25.9293%2027.2626%2025.9061%2027.2342%2025.8868%2027.2031L25.8671%2027.1637L25.8558%2027.1355L25.8459%2027.1087L25.8417%2027.0904L25.8375%2027.0665C25.8337%2027.0441%2025.8318%2027.0215%2025.8318%2026.9988C25.8318%2026.8297%2025.9319%2026.624%2026.1841%2026.3972C26.2207%2026.3633%2026.2602%2026.3309%2026.3025%2026.2985L26.3687%2026.2478C26.3997%2026.2253%2026.4293%2026.2027%2026.4575%2026.1788C27.7017%2025.1783%2027.2649%2023.6283%2026.6421%2023.4776L26.5984%2023.4691L26.5195%2023.4635C26.4902%2023.4638%2026.4609%2023.4667%2026.4321%2023.4719L26.3927%2023.479L26.3335%2023.4987L26.2785%2023.5227L26.2391%2023.5438L26.1996%2023.5706L26.1489%2023.6086L26.1165%2023.6368C25.8727%2023.8594%2025.7318%2024.2399%2025.6797%2024.4005L25.6571%2024.4766C25.6571%2024.4766%2024.9103%2026.3211%2023.6295%2027.6245L23.5534%2027.7006C23.0391%2028.205%2022.7136%2028.6728%2022.5642%2029.135C22.3627%2029.7507%2022.4712%2030.3581%2022.8601%2031.0415C22.9376%2031.1781%2023.025%2031.3162%2023.1236%2031.4585C24.3664%2033.2551%2027.7482%2032.6929%2029.456%2032.2899L29.859%2032.1913L30.2112%2032.087C30.6001%2031.9686%2031.2483%2031.7587%2031.9021%2031.4952L32.167%2031.3867L32.2586%2031.3472L32.3488%2031.3078L32.5235%2031.2289L32.6376%2031.1753C33.383%2030.8202%2033.996%2030.4102%2034.0383%2030.01L34.0397%2029.9593C34.0385%2029.8907%2034.0206%2029.8235%2033.9875%2029.7634C33.8551%2029.5154%2033.6057%2029.4647%2033.2957%2029.5267L33.2323%2029.5408C33.1703%2029.5549%2033.1055%2029.5746%2033.0406%2029.5972L32.904%2029.6465L32.8279%2029.6775C32.0402%2030.0016%2031.0834%2030.6709%2030.5635%2030.7272H30.572C30.5486%2030.7299%2030.525%2030.7314%2030.5015%2030.7315H30.4677L30.4339%2030.7272L30.4015%2030.7202C30.3056%2030.6976%2030.238%2030.6356%2030.2042%2030.5201C30.191%2030.4743%2030.1886%2030.4261%2030.1971%2030.3792C30.2845%2029.8931%2031.547%2029.5408%2032.6109%2029.0969L32.7039%2029.0575C33.4479%2028.7419%2034.0707%2028.3769%2034.0918%2027.8851V27.8288C34.0892%2027.7821%2034.0816%2027.7358%2034.0693%2027.6907C34.0016%2027.4371%2033.8227%2027.337%2033.562%2027.337C32.4559%2027.337%2029.9689%2029.2533%2029.4475%2029.2533C29.4123%2029.2533%2029.3799%2029.2435%2029.3658%2029.2195C29.3408%2029.1801%2029.3191%2029.1386%2029.301%2029.0955C29.1601%2028.7602%2029.3968%2028.4445%2030.7946%2027.5935L31.0891%2027.4159C31.8472%2026.965%2032.5122%2026.5874%2032.9786%2026.245C33.3873%2025.9463%2033.648%2025.6729%2033.6874%2025.3995L33.6916%2025.3601C33.7029%2025.2009%2033.6381%2025.0402%2033.4845%2024.8754C33.4561%2024.8447%2033.4228%2024.819%2033.3859%2024.7993L33.338%2024.7781L33.3196%2024.7711C33.2605%2024.7517%2033.1987%2024.7422%2033.1365%2024.7429C32.9082%2024.7429%2032.6165%2024.8415%2032.2981%2024.9965C31.4005%2025.4376%2030.2817%2026.338%2029.7251%2026.8072L29.3742%2027.1101L29.3277%2027.1566C29.215%2027.2666%2028.9219%2027.5371%2028.6331%2027.7006L28.533%2027.7527L28.4753%2027.7795C28.4202%2027.8031%2028.3625%2027.8202%2028.3034%2027.8302H28.3104C28.2959%2027.8322%2028.2813%2027.8337%2028.2667%2027.8344L28.2808%2027.833L28.2625%2027.8344C28.1512%2027.8415%2028.0582%2027.8048%2027.9948%2027.7006C27.9792%2027.6727%2027.9723%2027.6408%2027.975%2027.609C28.0131%2026.9537%2030.8411%2024.8035%2031.0074%2023.8862L31.02%2023.8186C31.1609%2022.9027%2030.6382%2022.6674%2029.9055%2023.1239ZM19.9123%207.29581C13.1516%207.29581%207.67034%2012.6911%207.67034%2019.3434C7.67034%2020.3184%207.7873%2021.2653%208.00852%2022.1728L8.01979%2022.1601C8.37488%2021.7402%208.88214%2021.5119%209.45282%2021.5119C9.95304%2021.5232%2010.4378%2021.6768%2010.852%2021.9515C11.162%2022.1488%2011.5072%2022.4926%2011.8595%2022.9294C12.2273%2022.4053%2012.8318%2022.0868%2013.4799%2022.077C14.6805%2022.077%2015.4061%2023.1028%2015.6809%2024.0257L15.7471%2024.1736L15.8317%2024.3526C16.1022%2024.9106%2016.6701%2025.9575%2017.4422%2026.7198C18.9359%2028.1853%2019.3078%2029.7%2018.5695%2031.3219C19.5178%2031.4242%2020.4747%2031.4176%2021.4215%2031.3021C20.7099%2029.724%2021.0551%2028.2444%2022.4642%2026.8128L22.5572%2026.7198C23.5365%2025.756%2024.1875%2024.3385%2024.3213%2024.0257C24.5961%2023.1028%2025.3189%2022.077%2026.5195%2022.077C27.1676%2022.0868%2027.7721%2022.4053%2028.1399%2022.9294C28.4922%2022.4926%2028.8374%2022.1502%2029.1516%2021.9515C29.5658%2021.6763%2030.0494%2021.5239%2030.5466%2021.5119C31.0496%2021.5119%2031.5076%2021.6895%2031.85%2022.0192C32.0472%2021.1596%2032.1529%2020.2649%2032.1529%2019.3448C32.1529%2012.6911%2026.6716%207.29581%2019.9123%207.29581ZM22.529%2019.8732L23.1476%2019.5744C23.9268%2019.2025%2024.4016%2019.0348%2024.4016%2019.7886C24.4016%2021.3287%2023.3152%2024.3089%2019.956%2024.385H19.6968C16.4207%2024.3117%2015.3061%2021.4823%2015.2497%2019.9112L15.2483%2019.7886C15.2483%2018.2288%2017.2943%2020.6143%2019.8278%2020.6143C20.8367%2020.6143%2021.7709%2020.2311%2022.529%2019.8732ZM28.1892%2015.4445C28.8233%2015.4445%2029.3348%2015.9489%2029.3348%2016.5717C29.3348%2017.1931%2028.8219%2017.699%2028.1892%2017.699C28.0401%2017.7001%2027.8922%2017.6718%2027.754%2017.6158C27.6157%2017.5597%2027.4899%2017.477%2027.3837%2017.3723C27.2774%2017.2676%2027.1928%2017.1431%2027.1347%2017.0057C27.0766%2016.8683%2027.0462%2016.7209%2027.0451%2016.5717C27.0451%2015.9489%2027.558%2015.4445%2028.1892%2015.4445ZM11.8102%2015.4445C12.4415%2015.4445%2012.9544%2015.9489%2012.9544%2016.5717C12.9544%2017.1931%2012.4415%2017.699%2011.8102%2017.699C11.6609%2017.7003%2011.5129%2017.6721%2011.3745%2017.6162C11.2361%2017.5602%2011.1101%2017.4775%2011.0037%2017.3728C10.8973%2017.2681%2010.8126%2017.1435%2010.7544%2017.006C10.6962%2016.8686%2010.6657%2016.721%2010.6646%2016.5717C10.6646%2015.9489%2011.1775%2015.4445%2011.8102%2015.4445ZM22.7868%2014.2594C23.2377%2013.7184%2023.9789%2013.4985%2024.6609%2013.7043C25.3415%2013.91%2025.8304%2014.499%2025.8981%2015.1979C25.9657%2015.8954%2025.5993%2016.5647%2024.9695%2016.893C24.5158%2017.1297%2024.3396%2016.2209%2023.8887%2016.0687L23.8916%2016.0645C23.4872%2015.9264%2022.8038%2016.5745%2022.5882%2016.1758C22.425%2015.8734%2022.3565%2015.529%2022.3917%2015.1872C22.4269%2014.8455%2022.5655%2014.5222%2022.7868%2014.2594ZM16.6954%2014.2594C17.1492%2014.8005%2017.2267%2015.5558%2016.8927%2016.1758C16.6785%2016.5745%2015.9909%2015.9264%2015.5893%2016.0645L15.5935%2016.0687C15.4414%2016.1194%2015.3202%2016.2575%2015.2089%2016.4069L15.0426%2016.6394C14.8876%2016.8507%2014.7326%2017.0085%2014.5114%2016.893C14.2053%2016.7349%2013.9535%2016.4889%2013.7882%2016.1866C13.623%2015.8843%2013.552%2015.5395%2013.5842%2015.1965C13.6518%2014.499%2014.1408%2013.91%2014.8214%2013.7043C15.1538%2013.6037%2015.5085%2013.6026%2015.8415%2013.7013C16.1746%2013.7999%2016.4714%2013.994%2016.6954%2014.2594Z'%20fill='currentColor'/%3e%3c/svg%3e`,wk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eHunyuan%3c/title%3e%3ccircle%20cx='12'%20cy='12'%20fill='%230055E9'%20r='12'%3e%3c/circle%3e%3cpath%20d='M12%200c.518%200%201.028.033%201.528.096A6.188%206.188%200%200112.12%2012.28l-.12.001c-2.99%200-5.242%202.179-5.554%205.11-.223%202.086.353%204.412%202.242%206.146C3.672%2022.1%200%2017.479%200%2012%200%205.373%205.373%200%2012%200z'%20fill='%23A8DFF5'%3e%3c/path%3e%3cpath%20d='M5.286%205a2.438%202.438%200%2001.682%203.38c-3.962%205.966-3.215%2010.743%202.648%2015.136C3.636%2022.056%200%2017.452%200%2012c0-1.787.39-3.482%201.09-5.006.253-.435.525-.872.817-1.311A2.438%202.438%200%20015.286%205z'%20fill='%230055E9'%3e%3c/path%3e%3cpath%20d='M12.98.04c.272.021.543.053.81.093.583.106%201.117.254%201.538.44%206.638%202.927%208.07%2010.052%201.748%2015.642a4.125%204.125%200%2001-5.822-.358c-1.51-1.706-1.3-4.184.357-5.822.858-.848%203.108-1.223%204.045-2.441%201.257-1.634%202.122-6.009-2.523-7.506L12.98.039z'%20fill='%2300BCFF'%3e%3c/path%3e%3cpath%20d='M13.528.096A6.187%206.187%200%200112%2012.281a5.75%205.75%200%2000-1.71.255c.147-.905.595-1.784%201.321-2.501.858-.848%203.108-1.223%204.045-2.441%201.27-1.651%202.14-6.104-2.676-7.554.184.014.367.033.548.056z'%20fill='%23ECECEE'%3e%3c/path%3e%3c/svg%3e`,Tk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.51531%2015.81L10.908%2017.7878C10.8981%2018.3134%2010.9136%2018.8392%2010.9545%2019.3633L15.5704%2020.5979C14.2013%2021.163%2012.7171%2021.3928%2011.2413%2021.2683L11.1018%2021.2559L11.0677%2021.2528L11.0026%2021.2458L10.9297%2021.238C10.8891%2021.2332%2010.8486%2021.228%2010.808%2021.2225L10.7251%2021.2117L10.6399%2021.1993C10.557%2021.1872%2010.4743%2021.1741%2010.3919%2021.1598L10.3593%2021.1536L10.3012%2021.1435L10.2183%2021.128L10.164%2021.1164L10.0919%2021.1016L10.0338%2021.0892L9.96019%2021.0737L9.88501%2021.0559L9.81216%2021.0389L9.75946%2021.0257L9.69126%2021.0086L9.62151%2020.99L9.54789%2020.9707L9.48434%2020.9528L9.39986%2020.9296L9.35181%2020.9141L9.28671%2020.8947L9.21464%2020.873L9.13326%2020.8467L9.08831%2020.8319L9.02631%2020.8118L8.95656%2020.7878L8.90541%2020.7692C8.89403%2020.7653%208.88267%2020.7615%208.87131%2020.7575L8.81861%2020.7382L8.74034%2020.7095L8.69617%2020.6924L8.63417%2020.6692L8.56674%2020.6421L8.49854%2020.6149L8.43732%2020.5901L8.36369%2020.5591L8.31487%2020.5374L8.26604%2020.5165C8.25543%2020.5119%208.24484%2020.5073%208.23427%2020.5026L8.18312%2020.4793L8.10329%2020.4429L8.06299%2020.4243L7.98859%2020.3886L7.94054%2020.3654L7.87544%2020.3344L7.80879%2020.3003L7.73672%2020.2639L7.69642%2020.2429L7.61659%2020.2003L7.57242%2020.1771L7.52747%2020.1523C7.51556%2020.1456%207.50367%2020.1389%207.49182%2020.1321L7.41897%2020.091L7.37247%2020.0647L7.33294%2020.0414L7.27714%2020.0097L7.21359%2019.9709L7.14152%2019.9275L7.10122%2019.9027L7.03612%2019.8616L6.98885%2019.8314L6.92762%2019.7927L6.87337%2019.7562L6.8323%2019.7291C6.81831%2019.7199%206.80436%2019.7106%206.79045%2019.7012L6.75635%2019.678L6.72225%2019.6547C6.71188%2019.6475%206.70155%2019.6403%206.69125%2019.633L6.64707%2019.602L6.58817%2019.5602L6.5347%2019.5214L6.47735%2019.4796L6.43395%2019.447L6.37505%2019.4028L6.31615%2019.3571L6.2495%2019.3052L6.21462%2019.2781L6.16502%2019.2378L6.10767%2019.1913L6.0387%2019.1347L6.00305%2019.1045L5.9674%2019.0742C5.95625%2019.0647%205.94515%2019.0552%205.93407%2019.0456L5.8992%2019.0146L5.85192%2018.9735L5.79767%2018.9255L5.74497%2018.8789L5.69692%2018.834L5.645%2018.786L5.60392%2018.7472L5.53572%2018.6821C5.51002%2018.6572%205.48444%2018.6321%205.459%2018.6069L5.43653%2018.5852L5.40475%2018.5527L5.35128%2018.4984L5.31253%2018.4589L5.27378%2018.4178C5.2295%2018.3724%205.18609%2018.3262%205.14358%2018.2791L5.08158%2018.2109L5.03353%2018.1567L4.9785%2018.0947L4.94595%2018.0567L4.90488%2018.0086L4.85993%2017.9559L4.82428%2017.9125C4.81728%2017.904%204.8103%2017.8955%204.80335%2017.887L4.76848%2017.8443L4.71733%2017.7808L4.68555%2017.7405L4.6468%2017.6909L4.6313%2017.6715C4.18786%2017.0967%203.81331%2016.4719%203.51531%2015.81ZM2.72481%2011.3196L11.5234%2013.6733C11.3761%2014.1864%2011.2547%2014.7065%2011.1599%2015.2318L19.543%2017.4747C19.1266%2018.0449%2018.6469%2018.5662%2018.1132%2019.0285L3.20918%2015.0404L3.19678%2015.0047L3.16966%2014.9241C3.15647%2014.8847%203.14356%2014.8452%203.13091%2014.8056L3.12548%2014.7877C3.06583%2014.5981%203.01233%2014.4066%202.96506%2014.2135L2.94181%2014.1158L2.92786%2014.0538L2.91158%2013.9786L2.89763%2013.9159L2.88368%2013.8461L2.87051%2013.781L2.85656%2013.7082C2.83641%2013.5989%202.81781%2013.4888%202.80153%2013.378L2.78836%2013.2866L2.77983%2013.2222L2.76976%2013.1432C2.76457%2013.1016%202.75966%2013.06%202.75503%2013.0184L2.75116%2012.982C2.69326%2012.4297%202.68444%2011.8734%202.72481%2011.3196ZM3.95938%207.32839L13.2191%209.80528C12.9339%2010.2742%2012.6727%2010.7593%2012.4363%2011.2584L21.1899%2013.6004C21.0799%2014.2359%2020.9047%2014.8497%2020.6722%2015.4333L11.721%2013.0386L2.79611%2010.6516L2.80773%2010.5741L2.81393%2010.5361L2.82168%2010.4842L2.83331%2010.4168L2.84726%2010.3408C2.86741%2010.2261%202.89066%2010.1122%202.91546%209.99825L2.93716%209.90215L2.95266%209.83628L2.97126%209.7611C2.98831%209.69135%203.00613%209.6216%203.02551%209.5534L3.04721%209.47435L3.06503%209.41003L3.08828%209.33253L3.10766%209.26898L3.13091%209.19458L3.15106%209.13103L3.17508%209.05741C3.37577%208.45541%203.63808%207.87573%203.95783%207.32761L3.95938%207.32839ZM7.40192%203.9184L16.1478%206.25734C15.6862%206.67623%2015.2494%207.12157%2014.8396%207.59111L20.9024%209.21318C21.1093%209.87348%2021.2449%2010.5648%2021.3%2011.2785L4.33215%206.74016L4.36703%206.68979L4.38795%206.65879L4.41895%206.61616L4.4546%206.56579L4.49723%206.50689L4.53908%206.45109L4.58868%206.38444L4.62743%206.33406L4.6716%206.27749L4.71423%206.22324L4.76073%206.16589L4.80335%206.11241L4.85373%206.05274L4.89558%206.00159L4.94673%205.94192L4.9878%205.89542L5.0436%205.83187L5.08468%205.78537L5.1366%205.72802L5.17845%205.68307L5.23503%205.62262L5.27998%205.57612L5.3288%205.52419L5.459%205.39244L5.5365%205.31649L5.58222%205.27309L5.64112%205.21807C6.17525%204.71752%206.76621%204.28132%207.40192%203.9184ZM12.0132%202.7001H12.0883L12.1519%202.70088L12.2054%202.70165L12.2472%202.7032L12.2999%202.70475L12.3356%202.70553L12.3945%202.70785L12.4309%202.7094L12.4774%202.71173L12.5192%202.71328L12.5867%202.71715L12.668%202.72258L12.7796%202.7311L12.8478%202.73653L12.8819%202.73963L12.9416%202.74583L13.0052%202.75203L13.0416%202.7559L13.1206%202.7652L13.1594%202.76985L13.2431%202.7807L13.3059%202.78845L13.3384%202.7931L13.3888%202.80085L13.5492%202.82565L13.6035%202.83495L13.6538%202.84348L13.7623%202.86363L13.8336%202.87758L13.9189%202.89462L13.9545%202.90237L14.0126%202.91477L14.0444%202.92252L14.0925%202.9326L14.125%202.94035L14.1754%202.95197L14.2134%202.96127L14.2684%202.97445L14.3428%202.99305L14.4296%203.0163L14.5172%203.03955L14.6047%203.06435L14.6435%203.07597L14.6977%203.09147L14.7582%203.11007L14.8148%203.1279L14.8535%203.1403L14.8923%203.1527L14.9512%203.17207L15.0279%203.19765L15.1069%203.22555L15.1441%203.23872L15.1937%203.25655L15.2658%203.2829L15.3511%203.31467L15.441%203.34955L15.5185%203.38055L15.5549%203.39605L15.6014%203.41465L15.6332%203.4286L15.682%203.44875L15.713%203.4627L15.7572%203.48207L15.8424%203.51927L15.9199%203.55492L15.9773%203.58205L16.0354%203.60995L16.0819%203.63165L16.1532%203.6673L16.2237%203.70217L16.3028%203.74247L16.3438%203.76417L16.3818%203.78432L16.4175%203.80292L16.464%203.8285L16.4957%203.84555L16.536%203.86802L16.6042%203.90677L16.6864%203.95327L16.7538%203.9928L16.798%204.01915L16.8391%204.04395L16.9135%204.08967L16.9817%204.1323L17.0576%204.18035L17.0855%204.19895L17.1351%204.23072L17.2002%204.27412L17.2312%204.29505L17.2793%204.3276L17.3273%204.36092L17.3451%204.3741C17.387%204.40277%2017.4288%204.43222%2017.4699%204.46244L17.5342%204.50894L17.5846%204.54614L17.628%204.57947L17.6947%204.62984L17.7582%204.67944L17.7892%204.70269L17.828%204.73447L17.8946%204.78794L17.9558%204.83832L18.0217%204.89334C18.5735%205.35834%2019.0703%205.88767%2019.5012%206.46736L8.29704%203.47045L8.34509%203.44952L8.39547%203.42782L8.45824%203.40147L8.52489%203.37435C8.61247%203.33947%208.70082%203.3046%208.78916%203.27282L8.86356%203.2457L8.93564%203.22012L9.00074%203.19687L9.07514%203.17285C9.14256%203.1496%209.21154%203.1279%209.27974%203.10697L9.35026%203.08605L9.41691%203.06667L9.49596%203.04342L9.56184%203.0256L9.63934%203.00545L9.70599%202.98685L9.77574%202.96902L9.84626%202.95197L9.91989%202.93492L9.98964%202.91942L10.0656%202.90315L10.1361%202.88765L10.2097%202.8737L10.281%202.85975L10.3585%202.8458L10.4291%202.8334L10.505%202.82023L10.5763%202.80938L10.6515%202.79775L10.7228%202.78768L10.8018%202.7776L10.8724%202.7683L10.9537%202.759L11.0235%202.75125L11.1049%202.7435C11.1769%202.73575%2011.249%202.72955%2011.3219%202.7249L11.404%202.7187L11.4738%202.71483L11.559%202.71018L11.6311%202.70708L11.7086%202.70398L11.7838%202.70243L11.8605%202.70088L12.0132%202.69933V2.7001Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ek=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M27.1942%209.03509C24.4881%209.03509%2022.3726%2011.0731%2020.4574%2013.6623C17.8258%2010.3114%2015.6255%209.03509%2012.9925%209.03509C7.62404%209.03509%203.51001%2016.0234%203.51001%2023.4181C3.51001%2028.0453%205.74831%2030.9649%209.49831%2030.9649C12.1971%2030.9649%2014.1387%2029.693%2017.5904%2023.6594C17.5904%2023.6594%2019.029%2021.1199%2020.0173%2019.3699C20.3643%2019.9293%2020.7298%2020.5327%2021.1138%2021.1798L22.7322%2023.902C25.8843%2029.1769%2027.6416%2030.9649%2030.8229%2030.9649C34.4778%2030.9649%2036.51%2028.0058%2036.51%2023.2822C36.51%2015.538%2032.3039%209.03509%2027.1942%209.03509ZM14.9574%2022.0263C12.1606%2026.4123%2011.1928%2027.3962%209.63574%2027.3962C8.03194%2027.3962%207.07872%2025.9883%207.07872%2023.4781C7.07872%2018.1096%209.75562%2012.6199%2012.9471%2012.6199C14.6752%2012.6199%2016.1197%2013.617%2018.3316%2016.7836C16.2308%2020.0058%2014.9574%2022.0263%2014.9574%2022.0263ZM25.5202%2021.4751L23.5831%2018.2456C23.0969%2017.4514%2022.5938%2016.6676%2022.0743%2015.8947C23.8185%2013.2032%2025.2556%2011.8611%2026.9676%2011.8611C30.5202%2011.8611%2033.3638%2017.095%2033.3638%2023.5219C33.3638%2025.9722%2032.5612%2027.3947%2030.8989%2027.3947C29.3053%2027.3947%2028.5451%2026.3421%2025.5188%2021.4737'%20fill='currentColor'/%3e%3c/svg%3e`,Dk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eLM%20Studio%3c/title%3e%3cpath%20d='M2.84%202a1.273%201.273%200%20100%202.547h14.107a1.273%201.273%200%20100-2.547H2.84zM7.935%205.33a1.273%201.273%200%20000%202.548H22.04a1.274%201.274%200%20000-2.547H7.935zM3.624%209.935c0-.704.57-1.274%201.274-1.274h14.106a1.274%201.274%200%20010%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM1.273%2012.188a1.273%201.273%200%20100%202.547H15.38a1.274%201.274%200%20000-2.547H1.273zM3.624%2016.792c0-.704.57-1.274%201.274-1.274h14.106a1.273%201.273%200%20110%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM13.029%2018.849a1.273%201.273%200%20100%202.547h9.698a1.273%201.273%200%20100-2.547h-9.698z'%20fill-opacity='.3'%3e%3c/path%3e%3cpath%20d='M2.84%202a1.273%201.273%200%20100%202.547h10.287a1.274%201.274%200%20000-2.547H2.84zM7.935%205.33a1.273%201.273%200%20000%202.548H18.22a1.274%201.274%200%20000-2.547H7.935zM3.624%209.935c0-.704.57-1.274%201.274-1.274h10.286a1.273%201.273%200%20010%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM1.273%2012.188a1.273%201.273%200%20100%202.547H11.56a1.274%201.274%200%20000-2.547H1.273zM3.624%2016.792c0-.704.57-1.274%201.274-1.274h10.286a1.273%201.273%200%20110%202.547H4.898c-.703%200-1.274-.57-1.274-1.273zM13.029%2018.849a1.273%201.273%200%20100%202.547h5.78a1.273%201.273%200%20100-2.547h-5.78z'%3e%3c/path%3e%3c/svg%3e`,Ok=`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20version='1.0'%20width='1024pt'%20height='1024pt'%20viewBox='0%200%201024%201024'%20preserveAspectRatio='xMidYMid'%20id='svg12'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs12'%20/%3e%3cg%20transform='matrix(0.17799229,0,0,-0.17799229,-413.52,1737.5728)'%20fill='%23000000'%20stroke='none'%20id='g12'%3e%3cpath%20d='M%200,5120%20V%200%20h%205120%205120%20v%205120%205120%20H%205120%200%20Z%20m%203596,4831%20c%2061,-37%20155,-176%20204,-304%2035,-89%2075,-244%2090,-342%2014,-101%2012,-297%20-5,-454%20-16,-148%20-23,-301%20-15,-301%203,0%2014,14%2025,32%2010,18%2055,80%2099,138%20179,236%20317,380%20416,434%20l%2053,29%20-6,-32%20c%20-10,-49%20-56,-159%20-98,-233%20-20,-37%20-40,-76%20-44,-87%20-6,-21%20-6,-21%2027,-2%2056,33%20195,71%20281,77%2080,6%20290,-18%20310,-35%204,-4%20-55,-39%20-131,-78%20l%20-138,-71%2060,-12%20c%20267,-50%20496,-159%20627,-297%2025,-26%2063,-69%2084,-95%20l%2037,-48%20h%20-65%20c%20-60,0%20-74,5%20-169,54%20-94,50%20-255,113%20-264,103%20-2,-2%2017,-19%2044,-37%2026,-18%2070,-55%2099,-82%20l%2052,-48%20h%20-628%20-627%20l%20-149,-60%20c%20-82,-33%20-149,-59%20-149,-57%20-8,24%20-69,129%20-135,232%20-106,163%20-163,270%20-191,360%20-32,99%20-40,344%20-15,465%2028,139%20257,770%20279,770%206,0%2025,-9%2042,-19%20z%20m%201998,-306%20c%20-1,-239%20-33,-372%20-136,-580%20-71,-142%20-234,-374%20-263,-375%20-5,0%20-48,16%20-95,35%20-47,19%20-79,34%20-73,35%2033,1%20249,158%20236,171%20-13,13%20-204,58%20-301,71%20l%20-92,12%2078,81%20c%20180,184%20327,357%20464,544%2055,75%20114,148%20131,163%2029,26%2032,27%2042,10%206,-10%2010,-79%209,-167%20z%20M%203433,8105%20c%20-6,-39%20-5,-40%2031,-24%2016,8%2023,17%2019,28%20-4,11%20-1,10%209,-3%2015,-19%2013,-21%20-35,-43%20-27,-13%20-51,-22%20-53,-20%20-4,4%2026,97%2031,97%202,0%201,-16%20-2,-35%20z%20m%202699,3%20c%2020,-37%2019,-247%20-2,-353%20-25,-124%20-39,-175%20-50,-175%20-5,0%20-20,10%20-35,23%20l%20-25,22%2025,99%20c%2014,54%2025,118%2025,142%200,29%204,44%2013,44%207,0%208,3%202,8%20-5,4%20-10,31%20-10,61%20-1,40%20-6,57%20-20,67%20-29,22%20-2025,21%20-2025,-1%200,-34%2070,-414%2084,-452%2024,-67%2044,-91%20104,-120%2056,-28%2060,-28%20278,-31%20243,-4%20321,7%20393,53%2058,36%2085,92%20127,258%2020,82%2045,158%2055,170%2016,20%2026,22%20111,22%20123,-1%20168,-10%20168,-35%200,-43%20-8,-47%20-66,-37%20-64,11%20-114,3%20-143,-21%20-13,-11%20-31,-56%20-51,-132%20-59,-218%20-112,-291%20-242,-332%20-67,-21%20-91,-23%20-303,-23%20-210,0%20-236,2%20-301,22%20-160,51%20-230,168%20-269,450%20-20,141%20-21,143%20-55,143%20-36,0%20-384,-113%20-588,-192%20-215,-82%20-198,-79%20-173,-31%2030,59%2095,91%20651,317%20l%20135,55%201087,1%20h%201087%20z%20m%20-1516,-350%20-115,-223%20-55,-3%20c%20-31,-2%20-56,0%20-56,3%200,3%2052,104%20116,225%20l%20116,220%20h%2055%2054%20z%20m%20294,218%20c%200,-2%20-47,-100%20-105,-217%20-60,-123%20-112,-217%20-122,-221%20-10,-3%20-31,-7%20-46,-7%20-37,-1%20-36,1%2076,219%20116,225%20120,230%20163,230%2019,0%2034,-2%2034,-4%20z%20m%201028,-4%20c%20-1,-4%20-25,-63%20-52,-130%20l%20-50,-123%20-30,7%20c%20-17,3%20-33,8%20-35,10%20-2,2%2018,57%2045,124%20l%2049,120%20h%2038%20c%2021,0%2037,-3%2035,-8%20z%20m%20-507,-241%20c%20275,-69%20471,-147%20551,-219%2079,-71%2091,-136%2046,-242%20-33,-76%20-34,-76%20-97,-17%20-32,29%20-88,68%20-127,87%20-63,32%20-76,35%20-159,35%20-99,0%20-134,-12%20-192,-68%20-37,-35%20-40,-52%20-17,-86%2014,-19%2022,-22%2048,-16%2090,20%20116,22%20171,14%2067,-11%20164,-53%20229,-99%20128,-92%20119,-270%20-17,-343%20-36,-19%20-57,-22%20-152,-22%20-129,1%20-224,24%20-352,86%20-88,42%20-127,81%20-144,143%20-13,45%20-36,47%20-83,6%20-44,-39%20-68,-101%20-64,-165%203,-55%2018,-67%2038,-30%207,14%2018,25%2024,25%206,0%2041,-20%2078,-45%20147,-98%20254,-139%20417,-157%20130,-14%20245,-3%20354,33%2076,26%2093,20%2082,-29%20-11,-52%20-70,-108%20-158,-152%20-171,-83%20-335,-79%20-672,16%20-66,19%20-159,41%20-205,49%20-99,17%20-326,20%20-420,4%20-36,-6%20-120,-11%20-187,-12%20-68,-1%20-123,-3%20-123,-4%200,-1%2026,-26%2058,-56%2031,-29%2077,-73%20102,-96%20l%2045,-42%20-60,6%20c%20-76,9%20-212,48%20-274,79%20-51,27%20-134,88%20-193,144%20-21,20%20-38,34%20-38,32%200,-3%2017,-56%2038,-117%20l%2038,-113%20-25,17%20c%20-180,116%20-370,347%20-421,511%20-26,81%20-34,49%20-28,-111%207,-186%2077,-470%2078,-317%20l%201,55%2062,-120%20c%20119,-229%20216,-361%20418,-566%20232,-235%20430,-395%20604,-489%2060,-32%2060,-32%2020,-26%20-64,10%20-308,36%20-335,36%20-66,-1%20414,-266%20565,-313%2044,-14%20125,-32%20180,-41%20104,-16%20255,-26%20255,-16%200,3%20-16,12%20-36,19%20-34,12%20-268,163%20-278,179%20-2,4%2081,6%20185,4%20121,-2%20189,0%20189,6%200,6%20-4,12%20-9,14%20-31,11%20-275,438%20-259,453%202,2%2038,-14%2081,-36%2042,-22%2077,-38%2077,-36%200,3%20-11,29%20-24,58%20-57,130%20-113,351%20-130,519%20-5,51%20-3,46%2037,-65%20124,-346%20259,-568%20422,-698%20l%2050,-40%20-55,7%20c%20-30,4%20-75,11%20-100,16%20-25,5%20-63,12%20-84,15%20l%20-39,6%2041,-49%20c%2054,-64%20159,-162%20214,-200%2041,-28%20224,-123%20258,-134%208,-3%20-30,-3%20-85,-1%20-55,3%20-111,1%20-124,-4%20-22,-9%20-20,-12%2040,-51%2095,-61%20228,-120%20337,-149%2089,-23%20118,-26%20357,-29%20150,-2%20252,0%20240,5%20-11,4%20-74,25%20-140,46%20-104,33%20-266,97%20-287,114%20-7,6%20101,4%201095,-14%20409,-8%20428,-9%20423,-27%20-3,-10%20-9,-26%20-12,-37%20-5,-15%202,-19%2048,-24%2029,-4%20118,-7%20198,-8%2097,0%20136,-4%20117,-9%20-16,-5%20-35,-6%20-43,-3%20-8,3%20-14,0%20-14,-6%200,-8%2060,-11%20198,-11%20109,0%20201,-2%20204,-5%203,-3%20-4,-23%20-14,-45%20l%20-20,-40%20-87,-1%20c%20-47,-1%20-135,-3%20-196,-5%20-60,-3%20-315,-9%20-565,-14%20-250,-4%20-637,-14%20-860,-20%20-235,-7%20-554,-10%20-760,-6%20-195,3%20-512,7%20-703,8%20l%20-348,1%20-20,-29%20c%20-10,-16%20-19,-32%20-19,-35%200,-7%20171,-14%20690,-30%20206,-6%20383,-15%20393,-20%209,-6%2017,-19%2017,-29%200,-19%209,-20%20363,-22%20340,-1%20326,-2%20-228,-10%20-324,-4%20-606,-12%20-625,-16%20-26,-6%20-39,-17%20-54,-45%20l%20-20,-37%20h%20-136%20-136%20l%20-20,-44%20-21,-44%20201,-6%20c%20479,-16%20978,-24%201336,-22%20212,2%20257,1%20101,-1%20-177,-2%20-289,-7%20-297,-14%20-7,-5%20-20,-31%20-29,-57%20l%20-17,-47%20h%20-797%20-796%20l%20-5,-62%20-5,-62%20-45,31%20c%20-70,48%20-174,134%20-219,183%20-23,25%20-43,45%20-44,45%20-10,0%2019,-148%2044,-227%2055,-170%20126,-302%20226,-421%20l%2045,-52%20-59,21%20c%20-218,80%20-429,215%20-575,367%20-96,99%20-85,98%2015,-1%2093,-94%20196,-173%20312,-240%2077,-45%20236,-117%20257,-117%206,0%20-5,19%20-24,43%20-19,23%20-54,74%20-79,114%20-25,40%20-53,74%20-65,77%20-24,6%20-217,178%20-290,259%20-122,133%20-220,289%20-315,498%20-34,74%20-67,150%20-74,169%20-13,34%20-14,33%20-14,-44%20-1,-72%2022,-373%2034,-456%20l%205,-35%20-25,40%20c%20-67,104%20-186,363%20-240,520%20-53,158%20-145,603%20-145,704%200,58%20-8,31%20-29,-99%20-47,-290%20-54,-374%20-48,-620%205,-225%2013,-294%2052,-455%205,-16%205,-27%201,-24%20-3,3%20-15,46%20-26,95%20-63,290%20-56,624%2020,1061%2011,61%2020,114%2020,118%200,4%20-37,-44%20-81,-107%20-45,-62%20-111,-151%20-148,-197%20-36,-47%20-71,-94%20-78,-105%20-12,-21%20-12,-21%20-13,2%200,39%2029,312%2046,417%2023,155%20125,718%20130,727%2012,18%20-11,3%20-130,-88%20-69,-52%20-126,-92%20-126,-88%200,4%2013,50%2030,103%2041,134%20112,431%20155,651%2020,102%2044,218%2054,258%2011,39%2017,72%2016,72%20-4,0%20-102,-63%20-201,-130%20l%20-72,-48%2040,87%20c%2087,188%20191,397%20206,414%208,9%2047,27%2086,38%2039,12%20140,43%20223,70%2084,27%20159,49%20165,48%2013,0%20-196,-69%20-375,-125%20l%20-88,-27%20-30,-59%20c%20-17,-33%20-28,-63%20-25,-66%205,-4%20332,63%20401,83%2017,5%2025,-3%2044,-42%2073,-151%20172,-256%20305,-323%20105,-52%20170,-64%20331,-57%20148,6%20239,27%20372,84%2076,32%2084,38%2063,44%20l%20-25,7%2025,1%20c%2052,2%20163,66%20221,128%2075,79%20120,168%20159,320%2012,47%2033,73%2059,73%209,0%2087,-18%20172,-39%20z%20m%20-1571,-13%20c%200,-41%2037,-166%2067,-231%2038,-79%2082,-130%20156,-178%2072,-47%20137,-69%20230,-79%2066,-7%2068,-7%2022,-9%20-154,-4%20-330,100%20-402,236%20-48,91%20-104,283%20-82,283%205,0%209,-10%209,-22%20z%20m%202400,-483%20c%20102,-205%2063,-418%20-80,-441%20-19,-3%20-47,-1%20-62,5%20-28,10%20-28,12%20-28,97%200,48%20-5,116%20-11,150%20-10,57%20-9,66%209,91%2032,46%2070,128%2083,178%20l%2012,48%2019,-24%20c%2010,-13%2036,-60%2058,-104%20z%20m%20-1530,-6%20c%20-25,-4%20-76,-7%20-115,-6%20l%20-70,1%2080,6%20c%2044,3%2096,7%20115,7%2031,0%2029,0%20-10,-8%20z%20m%20-222,-16%20c%20-21,-2%20-55,-2%20-75,0%20-21,2%20-4,4%2037,4%2041,0%2058,-2%2038,-4%20z%20m%202793,-545%20-18,-33%20-114,1%20c%20-63,1%20-155,2%20-206,3%20l%20-92,1%2010,30%2011,30%20h%20214%20214%20z%20m%20801,-315%2026,-5%20-16,-44%20-16,-44%20h%20-251%20c%20-137,-1%20-373,-2%20-522,-3%20-306,-2%20-280,-10%20-247,70%20l%2015,34%20492,-1%20c%20271,-1%20504,-4%20519,-7%20z%20M%204015,6098%20c%2075,-113%20349,-363%20515,-470%20l%2075,-48%20h%20-112%20c%20-61,0%20-114,3%20-116,8%20-3,4%2040,6%2095,4%20l%20101,-3%20-84,56%20c%20-130,88%20-206,154%20-352,304%20l%20-134,138%2023,-90%20c%2012,-49%2019,-86%2015,-81%20-11,12%20-65,224%20-58,224%203,0%2017,-19%2032,-42%20z%20m%20-1073,-40%20c%20-8,-8%20-9,-4%20-5,13%204,13%208,18%2011,10%202,-7%20-1,-18%20-6,-23%20z%20m%204346,-32%20-22,-46%20-780,2%20-781,3%20779,5%20780,5%2013,33%2013,32%20h%20-770%20-771%20l%20-11,-31%20c%20-6,-16%20-12,-28%20-14,-26%20-2,2%201,18%207,35%20l%2011,32%20781,2%20c%20430,2%20783,2%20785,2%202,-1%20-7,-22%20-20,-48%20z%20m%20-4398,-1%20c%20-7,-9%20-15,-13%20-19,-10%20-3,3%201,10%209,15%2021,14%2024,12%2010,-5%20z%20m%203760,-322%20c%20-368,-7%20-690,-7%20-690,0%200,4%20188,6%20418,5%20229,-1%20352,-4%20272,-5%20z%20m%20223,0%20c%20-13,-2%20-35,-2%20-50,0%20-16,2%20-5,4%2022,4%2028,0%2040,-2%2028,-4%20z%20m%20170,0%20c%20-7,-2%20-21,-2%20-30,0%20-10,3%20-4,5%2012,5%2017,0%2024,-2%2018,-5%20z%20m%20155,0%20c%20-16,-2%20-40,-2%20-55,0%20-16,2%20-3,4%2027,4%2030,0%2043,-2%2028,-4%20z%20m%20605,0%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20M%206173,5603%20c%20-46,-2%20-120,-2%20-165,0%20-46,1%20-9,3%2082,3%2091,0%20128,-2%2083,-3%20z%20m%20114,1%20c%20-3,-3%20-12,-4%20-19,-1%20-8,3%20-5,6%206,6%2011,1%2017,-2%2013,-5%20z%20m%20211,-1%20c%20-38,-2%20-98,-2%20-135,0%20-38,2%20-7,3%2067,3%2074,0%20105,-1%2068,-3%20z%20m%20190,0%20c%20-21,-2%20-55,-2%20-75,0%20-21,2%20-4,4%2037,4%2041,0%2058,-2%2038,-4%20z%20m%202292,-121%20c%200,-4%20-7,-26%20-16,-49%20l%20-17,-44%20-585,1%20c%20-321,1%20-586,-1%20-588,-3%20-2,-2%20-12,-30%20-22,-63%20l%20-18,-59%20-754,3%20c%20-414,1%20-755,4%20-757,5%20-1,2%207,27%2019,55%20l%2022,52%20h%20420%20421%20l%2027,50%2027,49%20-27,4%20c%20-15,2%20395,4%20911,4%20515,0%20937,-2%20937,-5%20z%20m%20-765,-395%20c%2083,-1%20-223,-4%20-678,-5%20-735,-2%20-828,-4%20-834,-17%20-3,-9%20-3,-19%201,-22%203,-4%20100,-10%20214,-14%20l%20207,-7%20-222,2%20c%20-123,0%20-223,1%20-223,2%200,1%205,15%2011,32%20l%2011,32%20286,2%20c%20289,3%20949,0%201227,-5%20z%20M%207115,4980%20c%20-9,-16%20-18,-30%20-21,-30%20-2,0%202,14%2011,30%209,17%2018,30%2021,30%202,0%20-2,-13%20-11,-30%20z%20M%203625,4539%20c%2013,-46%2022,-85%2020,-87%20-3,-4%20-55,159%20-55,174%200,20%2013,-11%2035,-87%20z%20m%20-58,44%20c%20-3,-10%20-5,-4%20-5,12%200,17%202,24%205,18%202,-7%202,-21%200,-30%20z%20m%20-13,-87%20c%20-4,-31%20-9,-54%20-12,-52%20-2,3%20-1,30%203,61%203,31%209,55%2011,52%203,-2%202,-30%20-2,-61%20z%20m%20143,-163%20c%20-3,-2%20-12,15%20-22,39%20-28,69%20-27,78%200,19%2014,-29%2024,-55%2022,-58%20z%20m%20-163,0%20c%20-6,-76%20-8,-83%20-16,-55%20-5,20%20-5,39%202,51%205,11%2010,39%2010,62%200,23%203,40%206,36%203,-3%203,-45%20-2,-94%20z%20m%202254,50%20c%20-65,-2%20-171,-2%20-235,0%20-65,1%20-12,3%20117,3%20129,0%20182,-2%20118,-3%20z%20M%203877,4011%20c%2031,-47%2084,-120%20119,-162%2063,-76%20171,-176%20180,-167%202,3%20-5,27%20-16,54%20-29,67%20-70,240%20-69,289%201,33%203,30%209,-20%2016,-120%2062,-270%20107,-350%2015,-26%2011,-25%20-47,20%20-96,76%20-194,187%20-280,317%20-71,108%20-180,304%20-180,325%200,4%2028,-43%2061,-106%2033,-63%2085,-153%20116,-200%20z%20m%202666,172%20c%20-13,-2%20-33,-2%20-45,0%20-13,2%20-3,4%2022,4%2025,0%2035,-2%2023,-4%20z%20m%2080,0%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20m%2074,1%20c%20-3,-3%20-12,-4%20-19,-1%20-8,3%20-5,6%206,6%2011,1%2017,-2%2013,-5%20z%20m%2081,-1%20c%20-10,-2%20-28,-2%20-40,0%20-13,2%20-5,4%2017,4%2022,1%2032,-1%2023,-4%20z%20m%20944,-10%20c%20-95,-2%20-248,-2%20-340,0%20-92,1%20-14,3%20173,3%20187,0%20262,-2%20167,-3%20z%20m%201027,-29%20c%203,-2%20-3,-20%20-12,-39%20l%20-17,-35%20h%20-436%20c%20-411,0%20-436,1%20-429,18%204,9%2012,30%2017,46%20l%2011,28%20431,-7%20c%20237,-4%20433,-9%20435,-11%20z%20m%20-2735,-81%20-612,-3%20-27,-65%20c%20-16,-36%20-30,-63%20-32,-61%20-2,2%209,34%2026,70%20l%2030,66%20613,-2%20613,-3%20z%20M%204719,3961%20c%2056,-34%20134,-78%20174,-98%20l%2072,-38%20455,-5%20455,-5%20-451,-3%20-451,-2%20-112,60%20c%20-124,67%20-291,168%20-291,177%200,3%2011,-2%2023,-10%2013,-9%2070,-43%20126,-76%20z%20m%20674,-58%20c%20-7,-2%20-21,-2%20-30,0%20-10,3%20-4,5%2012,5%2017,0%2024,-2%2018,-5%20z%20m%20290,-10%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20m%20495,0%20c%20-81,-2%20-216,-2%20-300,0%20-84,1%20-18,3%20147,3%20165,0%20234,-2%20153,-3%20z%20m%20365,-10%20c%20-13,-2%20-35,-2%20-50,0%20-16,2%20-5,4%2022,4%2028,0%2040,-2%2028,-4%20z%20m%20100,0%20c%20-7,-2%20-19,-2%20-25,0%20-7,3%20-2,5%2012,5%2014,0%2019,-2%2013,-5%20z%20m%20455,0%20c%20-82,-2%20-214,-2%20-295,0%20-82,1%20-15,3%20147,3%20162,0%20229,-2%20148,-3%20z%20m%20-725,-70%20c%20-18,-2%20-48,-2%20-65,0%20-18,2%20-4,4%2032,4%2036,0%2050,-2%2033,-4%20z%20m%20-385,-10%20c%20-10,-2%20-28,-2%20-40,0%20-13,2%20-5,4%2017,4%2022,1%2032,-1%2023,-4%20z%20m%2080,0%20c%20-10,-2%20-28,-2%20-40,0%20-13,2%20-5,4%2017,4%2022,1%2032,-1%2023,-4%20z%20m%20139,0%20c%20-20,-2%20-52,-2%20-70,0%20-17,2%200,4%2038,4%2039,0%2053,-2%2032,-4%20z%20m%20-235,-153%20-404,-5%20-13,-32%20-14,-33%20392,-3%20392,-2%20-402,-3%20-402,-2%2014,28%20c%208,15%2016,35%2019,45%205,16%2032,17%20413,15%20l%20408,-3%20z%20m%201578,-32%20-19,-43%20-319,-3%20-319,-2%2015,45%2014,45%20h%20324%20323%20z%20m%201217,-388%20c%2018,-10%2040,-31%2050,-47%2017,-26%2018,-82%2018,-1088%200,-997%20-1,-1063%20-18,-1088%20-9,-15%20-29,-35%20-44,-44%20-26,-17%20-207,-18%20-3673,-18%20-3497,0%20-3647,1%20-3673,18%20-16,10%20-37,32%20-48,50%20-19,31%20-19,55%20-17,1094%20l%203,1062%2030,31%20c%2017,18%2039,36%2050,40%2011,5%201656,9%203655,9%203586,1%203635,1%203667,-19%20z'%20id='path1'%20/%3e%3cpath%20d='m%203552,9557%20c%20-72,-188%20-131,-385%20-143,-476%20-23,-171%204,-313%2091,-486%2050,-101%20158,-252%20175,-248%206,2%2020,53%2033,115%2071,355%2070,721%20-4,975%20-27,93%20-88,233%20-101,233%20-4,0%20-27,-51%20-51,-113%20z'%20id='path2'%20/%3e%3cpath%20d='m%206896,6674%20c%20-3,-9%20-6,-18%20-6,-20%200,-2%2089,-4%20199,-4%20190,0%20199,1%20204,20%205,20%200,20%20-193,20%20-171,0%20-199,-2%20-204,-16%20z'%20id='path3'%20/%3e%3cpath%20d='m%207313,5393%20c%209,-2%2023,-2%2030,0%206,3%20-1,5%20-18,5%20-16,0%20-22,-2%20-12,-5%20z'%20id='path4'%20/%3e%3cpath%20d='m%207463,5393%20c%2015,-2%2039,-2%2055,0%2015,2%202,4%20-28,4%20-30,0%20-43,-2%20-27,-4%20z'%20id='path5'%20/%3e%3cpath%20d='m%207618,5383%20c%2012,-2%2032,-2%2045,0%2012,2%202,4%20-23,4%20-25,0%20-35,-2%20-22,-4%20z'%20id='path6'%20/%3e%3cpath%20d='m%207323,5283%20c%209,-2%2023,-2%2030,0%206,3%20-1,5%20-18,5%20-16,0%20-22,-2%20-12,-5%20z'%20id='path7'%20/%3e%3cpath%20d='m%207428,5283%20c%207,-3%2016,-2%2019,1%204,3%20-2,6%20-13,5%20-11,0%20-14,-3%20-6,-6%20z'%20id='path8'%20/%3e%3cpath%20d='m%201507,3112%20c%20-16,-17%20-17,-102%20-17,-1011%200,-665%203,-999%2010,-1012%2011,-19%2062,-19%203598,-19%202777,0%203591,3%203600,12%209,9%2012,249%2012,1020%200,986%200,1008%20-19,1018%20-14,7%20-1149,10%20-3594,10%20-3450,0%20-3574,-1%20-3590,-18%20z%20m%20653,-892%20v%20-640%20h%20205%20205%20v%20-135%20-135%20h%20-355%20-355%20v%20775%20775%20h%20150%20150%20z%20m%201258,626%20c%2067,-18%20114,-49%20150,-101%2056,-79%2056,-71%2059,-602%201,-271%20-2,-529%20-7,-574%20-14,-118%20-54,-181%20-150,-231%20-43,-22%20-55,-23%20-293,-26%20-280,-3%20-313,2%20-384,63%20-22,19%20-51,58%20-64,87%20l%20-24,53%20v%20570%20570%20l%2028,57%20c%2031,64%2079,105%20152,130%2067,23%20450,26%20533,4%20z%20m%201144,-15%20c%2026,-12%2065,-42%2087,-66%2058,-63%2071,-118%2071,-297%20v%20-148%20h%20-147%20-148%20l%203,92%20c%204,102%20-9,164%20-36,172%20-9,3%20-63,6%20-119,7%20-158,3%20-143,56%20-143,-508%200,-567%20-16,-513%20148,-513%20144,0%20146,2%20149,149%20l%202,106%20146,3%20145,3%20v%20-130%20c%200,-72%20-5,-153%20-11,-181%20-15,-72%20-64,-137%20-129,-174%20l%20-55,-31%20h%20-255%20c%20-291,0%20-301,2%20-377,89%20-68,77%20-67,64%20-70,649%20-4,568%20-1,612%2045,687%2029,47%20111,105%20161,113%2014,3%20130,4%20256,3%20219,-1%20232,-2%20277,-25%20z%20m%201109,-416%20c%2048,-242%20115,-579%20149,-750%2033,-170%2063,-320%2065,-332%20l%205,-23%20h%20-158%20-159%20l%20-22,133%20c%20-13,72%20-25,142%20-28,155%20-5,22%20-8,22%20-163,22%20h%20-158%20l%20-10,-47%20c%20-6,-27%20-18,-96%20-28,-155%20l%20-17,-108%20h%20-148%20c%20-94,0%20-149,4%20-149,10%200,10%20174,957%20245,1339%2019,101%2035,187%2035,192%200,6%2095,8%20227,7%20l%20227,-3%20z%20m%20689,-195%20v%20-640%20h%20215%20215%20v%20-135%20-135%20h%20-360%20-360%20v%20775%20775%20h%20145%20145%20z%20m%201315,618%20c%203,-13%2052,-264%20110,-558%2057,-294%20124,-633%20148,-753%20l%2043,-217%20-155,2%20-155,3%20-26,150%20-26,150%20-161,3%20c%20-160,2%20-161,2%20-166,-20%20-3,-13%20-16,-83%20-28,-155%20l%20-23,-133%20h%20-153%20c%20-142,0%20-154,1%20-149,18%203,9%2048,247%20100,527%2053,281%20117,621%20143,758%20l%2047,247%20h%20223%20223%20z%20m%20765,-753%20v%20-775%20h%20-150%20-150%20v%20775%20775%20h%20150%20150%20z'%20id='path9'%20/%3e%3cpath%20d='m%203110,2593%20c%20-108,-7%20-100,36%20-100,-513%200,-432%202,-479%2017,-491%2017,-15%20194,-26%20238,-15%2057,14%2055,-3%2055,506%200,539%206,507%20-90,513%20-30,3%20-84,2%20-120,0%20z'%20id='path10'%20/%3e%3cpath%20d='m%205297,2207%20c%20-32,-177%20-57,-326%20-57,-332%200,-9%20240,-16%20240,-7%200,2%20-25,142%20-55,311%20-30,170%20-55,318%20-55,330%200,11%20-3,21%20-7,21%20-5,0%20-34,-145%20-66,-323%20z'%20id='path11'%20/%3e%3cpath%20d='m%207386,2208%20c%20-32,-178%20-59,-327%20-60,-332%200,-5%2053,-10%20121,-10%2068,-1%20123,1%20123,2%200,2%20-25,140%20-55,307%20-30,166%20-55,314%20-55,329%200,80%20-22,-8%20-74,-296%20z'%20id='path12'%20/%3e%3c/g%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.3033,1032.2948%20c%20-20.71096,-17.301%20-45.27669,-43.2443%20-58.38474,-61.6589%20-11.072,-15.55418%20-33.46614,-57.80895%20-43.39625,-81.88298%20-3.01819,-7.31707%20-6.03272,-13.31332%20-6.69897,-13.32487%20-1.95247,-0.0337%20-1.40079,24.75105%201.29348,58.11165%201.37766,17.05815%202.27248,31.71195%201.98848,32.56395%20-0.78972,2.36917%20-12.80508,-19.62698%20-23.53365,-43.08218%20-12.96414,-28.3428%20-20.79049,-49.58497%20-26.46888,-71.84167%20-6.76534,-26.517%20-17.37487,-80.62553%20-18.56152,-94.66365%20-0.55492,-6.56464%20-1.64295,-11.93571%20-2.41786,-11.93571%20-0.7749,0%20-0.95287,-1.81703%20-0.39547,-4.03785%200.55739,-2.22083%200.38953,-4.02758%20-0.37302,-4.01502%20-0.76254,0.0126%20-13.37888,16.07913%20-28.03629,35.70348%20-17.629,23.60295%20-26.84316,34.7169%20-27.22097,32.83357%20-2.07325,-10.33507%2016.05308,-129.48461%2029.82122,-196.0234%201.51659,-7.32942%200.54523,-6.88403%20-22.72283,10.41915%20-10.36333,7.70663%20-19.26074,13.59374%20-19.77203,13.08245%20-0.5113,-0.51129%201.34431,-8.76373%204.12356,-18.33874%207.20702,-24.82946%2018.19753,-71.30929%2026.84032,-113.51007%204.09344,-19.98738%208.54196,-40.58853%209.88557,-45.78031%201.34361,-5.19179%202.20068,-10.16637%201.9046,-11.05463%20-0.29609,-0.88827%20-10.58825,5.03694%20-22.87147,13.16714%20-12.28321,8.13019%20-22.54778,14.5584%20-22.81014,14.28492%20-0.26236,-0.27349%206.30687,-14.67012%2014.5983,-31.99252%2012.34638,-25.79398%2015.62741,-31.41282%2018.1252,-31.03978%202.43485,0.36363%2030.81942,-5.14402%2070.03777,-13.58991%203.88554,-0.83677%204.75341,0.0873%2011.05023,11.76616%2015.48867,28.72712%2037.4065,48.23215%2065.33311,58.14095%2017.84309,6.33101%2059.21525,5.86977%2085.06634,-0.94835%2017.00919,-4.48612%2040.63194,-14.58061%2039.71468,-16.97092%20-0.4457,-1.16146%201.92757,-2.64588%205.9613,-3.72864%209.68831,-2.6006%2024.78351,-12.94263%2034.59881,-23.70435%209.65005,-10.58055%2019.42214,-29.62875%2024.37971,-47.52203%203.57011,-12.88552%207.16307,-19.62079%2010.46681,-19.62079%204.94171,0%2055.72594,13.36116%2073.98866,19.46617%2027.39258,9.15701%2044.55449,17.67808%2055.1997,27.40721%2013.86553,12.6723%2015.66214,23.71167%206.95446,42.73176%20-4.83371,10.55823%20-2.91266,10.82459%20-19.71904,-2.7342%20-5.19131,-4.18817%20-13.92002,-9.82098%20-19.39712,-12.51735%20-9.17362,-4.51615%20-11.2792,-4.89969%20-26.71917,-4.86702%20-19.82745,0.0419%20-26.52849,2.42277%20-35.81817,12.72582%20-4.62627,5.13094%20-5.88342,7.67706%20-5.10887,10.34708%201.37858,4.75209%207.04231,9.44926%2010.25887,8.50808%2010.37842,-3.03675%2023.66238,-4.16161%2031.66841,-2.68161%2012.32864,2.27907%2030.83972,10.32378%2040.26674,17.49949%2019.48079,14.82849%2020.97723,40.36687%203.22283,55.00154%20-8.74622,7.20937%20-17.39143,9.0287%20-37.52362,7.89659%20-19.39093,-1.09041%20-35.54676,-5.10624%20-53.01853,-13.17868%20-16.48419,-7.61618%20-22.87535,-12.98468%20-27.86253,-23.40428%20-5.67119,-11.84865%20-9.24734,-12.42612%20-18.66024,-3.01323%20-4.1907,4.19071%20-7.71185,9.58078%20-8.78569,13.44887%20-2.22444,8.01268%20-2.29783,20.18785%20-0.14115,23.41423%201.36972,2.04906%202.2258,1.73769%205.55079,-2.01893%202.16222,-2.4429%204.26363,-4.44164%204.66981,-4.44164%200.40618,0%208.37729,4.63204%2017.71361,10.2934%2031.79671,19.28098%2053.71653,25.60268%2089.10978,25.69939%2015.8895,0.0434%2022.53493,-0.74238%2036.88209,-4.3612%2019.15027,-4.83033%2022.90386,-4.64154%2021.21735,1.06707%20-3.76546,12.74559%20-18.65751,24.68116%20-40.02737,32.08087%20-26.82557,9.28885%20-44.41195,8.10049%20-104.48216,-7.06012%20l%20-39.57098,-9.98699%20-36.34069,0.0103%20c%20-39.16468,0.0111%20-93.64111,2.20926%20-93.73748,3.78243%20-0.0326,0.53184%207.41726,8.03383%2016.5552,16.67111%20l%2016.61445,15.70414%20-5.65299,0.0394%20c%20-7.36152,0.0513%20-34.00998,-7.1066%20-44.76909,-12.02524%20-10.65065,-4.86904%20-20.5517,-11.6761%20-34.71958,-23.87003%20-6.14204,-5.2863%20-11.47485,-9.30396%20-11.85068,-8.92814%20-0.37582,0.37583%201.93006,8.48762%205.12418,18.0262%203.19413,9.53857%205.38473,17.76564%204.86802,18.28234%20-1.52017,1.52017%20-18.65497,-12.14789%20-31.49364,-25.12178%20-19.95379,-20.16396%20-37.90692,-46.94999%20-43.78482,-65.32687%20-1.08022,-3.37724%20-2.80376,-5.85118%20-3.8301,-5.49765%20-2.77839,0.95704%20-1.95736,39.13313%201.24026,57.66961%205.2136,30.22295%2010.63706,42.34657%2011.94479,26.70143%200.50135,-5.99789%200.82627,-5.58332%2012.40171,15.82377%2021.71999,40.16799%2034.95735,57.79704%2070.97771,94.52557%2038.10485,38.85401%2068.36531,64.34063%2097.74168,82.32211%2015.62967,9.56707%2015.73868,9.5223%20-14.46874,5.9394%20-23.29329,-2.76278%20-32.30284,-3.02873%20-32.30284,-0.95348%200,3.91973%2051.50471,33.42368%2082.46175,47.23733%2010.90841,4.86757%2025.03298,9.64455%2035.29454,11.93685%2024.66343,5.50942%2063.13961,9.10432%2063.13961,5.89927%200,-0.7113%20-3.31382,-2.90325%20-7.36405,-4.87102%20-4.05022,-1.96778%20-16.57503,-9.56243%20-27.83293,-16.87703%20l%20-20.46889,-13.29937%2033.72447,-0.80753%2033.72448,-0.8076%20-4.30958,-5.118%20c%20-8.24182,-9.78787%20-44.62176,-72.56733%20-44.62176,-77.002%200,-0.60272%205.88972,1.86546%2013.08827,5.48481%207.19853,3.61936%2013.48438,6.18453%2013.96854,5.70037%200.48415,-0.48415%20-1.34899,-6.52629%20-4.07367,-13.42698%20-9.51018,-24.08618%20-21.52674,-71.06893%20-21.30298,-83.29114%200.0358,-1.95365%204.27231,6.98671%209.41452,19.86747%2012.46275,31.218%2017.65562,42.27397%2028.23379,60.11167%2011.10164,18.7204%2025.15989,36.3228%2037.24697,46.6371%2011.00484,9.39083%2010.77186,9.4566%20-16.71887,4.72358%20-10.16278,-1.74975%20-18.80674,-2.8524%20-19.20878,-2.45033%20-1.26564,1.26563%2017.48825,21.61853%2030.42073,33.01448%2011.32802,9.98212%2034.4235,24.3873%2051.98071,32.42152%20l%206.96969,3.18938%20-11.50992,-1.01183%20c%20-13.36877,-1.17525%20-26.45213,0.38295%20-26.43178,3.1479%200.0271,3.67793%2026.07377,18.5391%2048.47533,27.65798%2024.26104,9.87585%2030.84393,10.81252%2082.33703,11.71515%2030.00174,0.5259%2047.04857,0.26902%2046.03157,-0.69375%20-0.88838,-0.8409%20-12.8808,-5.35905%20-26.64983,-10.04033%20-13.76912,-4.68135%20-29.39562,-10.54695%20-34.72558,-13.0347%20l%20-9.69086,-4.52325%2033.71054,-0.1389%20c%2043.38588,-0.1788%20207.14335,2.7951%20220.04178,3.996%20l%209.8658,0.9186%20-0.17498,5.95275%20-0.17497,5.95268%208.88322,1.05165%20c%204.8858,0.5784%2017.10285,1.1235%2027.14898,1.21132%2010.2975,0.0901%2017.8758,0.7905%2017.3721,1.60568%20-1.7218,2.78587%204.4406,3.39967%2034.3492,3.42157%2016.5835,0.012%2031.7621,0.45375%2033.7301,0.98138%20l%203.5782,0.95925%20-3.1003,6.07725%20-3.1005,6.07717%20-27.1276,1.07903%20c%20-107.15948,4.26225%20-251.50605,6.52717%20-418.46093,6.5661%20l%20-181.36473,0.042%20-3.3876,5.34982%20c%20-1.96333,3.10065%20-2.78481,5.94293%20-1.95388,6.76043%200.78854,0.7758%2021.7845,2.17372%2046.65769,3.1065%2024.87318,0.93285%2067.02661,2.50395%2093.67428,3.4914%2026.64765,0.98745%2049.724,2.4771%2051.28075,3.3102%201.55675,0.83317%202.83046,2.5017%202.83046,3.70792%200,3.20363%203.63309,4.12185%2017.49487,4.42178%206.81188,0.14737%20-12.46619,0.7854%20-42.8402,1.41787%20-30.37399,0.63248%20-57.82445,1.63755%20-61.00103,2.2335%20-4.38686,0.82298%20-6.73788,2.6079%20-9.7777,7.42328%20l%20-4.00211,6.33975%20-24.35067,0.44587%20-24.3507,0.44588%20-3.33807,7.71607%20c%20-1.83594,4.24388%20-3.03186,8.0223%20-2.65762,8.39655%201.03876,1.03875%2095.9203,3.86655%20170.97465,5.09565%20l%2067.02838,1.09763%20-4.53321,9.4401%20-4.53322,9.44017%20H%20583.14747%20c%20-127.13881,0%20-141.1573,0.25208%20-142.04091,2.5548%20-0.53922,1.40513%20-0.98038,6.12946%20-0.98038,10.49851%200,4.3689%20-0.4804,7.9436%20-1.06757,7.9436%20-2.61387,0%20-26.83991,-19.54048%20-39.5428,-31.8947%20-7.71687,-7.50511%20-14.41947,-12.83483%20-14.98669,-11.91698%20-2.56171,4.14487%207.69271,42.95998%2017.42865,65.97118%202.33773,5.5252%204.25043,10.4313%204.25043,10.9022%200,2.4087%20-4.04289,-0.2661%20-17.9049,-11.8458%20z'%20id='path13'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20355.05406,421.62226%20c%20-22.15321,-2.54868%20-39.59314,-14.30198%20-48.63897,-32.77926%20-6.04069,-12.33888%20-8.90612,-23.2277%20-13.2547,-50.36877%20-1.8413,-11.49217%20-4.20443,-21.92702%20-5.25141,-23.18855%20-1.3313,-1.60412%20-3.86472,-2.02278%20-8.42679,-1.39258%20-9.07,1.25293%20-66.08936,19.96806%20-102.09803,33.51102%20-16.50454,6.2074%20-30.38086,10.91358%20-30.83627,10.45818%20-0.4554,-0.4554%201.14955,-3.42072%203.56656,-6.58958%205.6722,-7.43663%2027.9304,-18.20839%2091.38694,-44.22631%20l%2047.68436,-19.55115%20h%20191.56267%20c%20176.44971,0%20191.73756,0.21135%20193.77937,2.67882%201.70083,2.05542%202.19749,9.29085%202.13414,31.09149%20-0.0698,24.0326%20-0.65966,30.77805%20-3.82618,43.75651%20-4.99915,20.48989%20-5.04441,20.55596%20-10.72962,15.66574%20l%20-4.65695,-4.00572%203.63151,-15.11708%20c%201.99732,-8.31439%204.08768,-19.11455%204.64526,-24.00035%200.55759,-4.88581%201.52545,-9.24669%202.15082,-9.69085%201.28209,-0.91062%20-1.28033,-20.49609%20-3.1697,-24.22713%20-2.02842,-4.00562%20-50.45784,-5.0313%20-212.00487,-4.49001%20-104.31393,0.34951%20-148.65237,1.01809%20-149.89452,2.26024%20-1.95456,1.95456%20-0.1876,14.10347%208.31122,57.14459%205.72718,29.00448%209.56249,37.55882%2019.72081,43.98545%2011.16735,7.065%2019.81401,8.04705%2064.50501,7.32622%2044.97684,-0.72543%2051.97729,-1.97508%2063.2868,-11.29734%207.94205,-6.5465%2011.01861,-13.2364%2019.40745,-42.20073%208.6857,-29.9893%2010.04722,-33.16113%2014.74023,-34.33899%202.00472,-0.50316%2011.58278,-0.66744%2021.28458,-0.36507%2018.803,0.58602%2023.28604,2.22616%2021.78405,7.96975%20-0.78929,3.01829%20-1.77745,3.19583%20-13.15817,2.36422%20-22.65981,-1.6558%20-24.72434,0.30701%20-34.02158,32.34549%20-9.8321,33.88156%20-20.16489,47.26471%20-41.74556,54.06934%20-9.31197,2.93616%20-15.71318,3.49474%20-45.55974,3.97559%20-19.09906,0.30769%20-39.93798,-0.0402%20-46.30872,-0.77318%20z'%20id='path14'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.72518,277.27438%20c%20-1.83613,-3.70595%20-11.08035,-19.09394%20-20.54272,-34.19552%20-30.90205,-49.3185%20-36.66484,-64.15935%20-38.88444,-100.1388%20-1.36409,-22.11159%200.95113,-42.06571%207.39908,-63.770308%2010.014,-33.708396%2039.335,-112.759581%2043.29126,-116.715842%202.6544,-2.654398%2011.12175,3.275841%2019.60242,13.728864%2016.14315,19.897551%2029.01876,50.591928%2037.43022,89.230475%204.41311,20.271851%204.72573,61.869291%200.78293,104.176651%20-2.98872,32.06993%20-3.31457,44.11879%20-1.17206,43.33964%200.81424,-0.2961%206.73431,-7.80651%2013.15571,-16.68979%2020.26686,-28.03693%2035.48538,-46.25999%2054.72634,-65.53079%2020.32182,-20.35334%2035.62173,-31.421643%2035.62173,-25.7696%200,4.77523%20-5.52652,18.092%20-16.57515,39.93971%20-5.48094,10.83806%20-9.55955,20.11136%20-9.06357,20.60734%200.49598,0.49598%205.55908,-1.19341%2011.25132,-3.75422%2018.99804,-8.54675%2030.57629,-10.7267%2056.38109,-10.61544%2012.88076,0.0555%2027.73652,1.04419%2033.01282,2.197%20l%209.59325,2.09603%20-6.36296,3.94899%20c%20-3.49965,2.17195%20-14.35794,8.00914%20-24.12955,12.97153%20-20.38921,10.35438%20-21.07058,9.11777%208.94537,16.2351%2023.86774,5.65947%2048.53884,15.21447%2066.77706,25.86243%2013.00859,7.59477%2037.74481,30.20897%2046.13841,42.18039%20l%203.82376,5.45364%20-10.35019,-0.6642%20c%20-8.6108,-0.55259%20-14.15019,-2.45143%20-32.96217,-11.2991%20-42.19276,-19.84412%20-52.3725,-21.02598%20-30.46774,-3.53728%207.96216,6.357%2015.4381,12.71661%2016.61318,14.1325%201.95153,2.35145%20-7.43168,2.57436%20-108.3648,2.57436%20H%20280.89447%20l%20-18.50402,7.44437%20c%20-10.1772,4.09441%20-21.83916,8.76188%20-25.91544,10.37218%20l%20-7.41141,2.9278%20z%20m%2017.75927,-39.97998%20c%205.80406,-21.27448%209.54882,-53.13015%2010.43996,-88.81001%201.27526,-51.05987%20-2.84802,-80.48948%20-15.88225,-113.358388%20-6.67457,-16.831506%20-9.48275,-22.204866%20-11.60453,-22.204866%20-3.40199,0%20-22.32968,50.984152%20-31.47985,84.794954%20-3.87095,14.30358%20-4.36042,18.92317%20-4.27836,40.37854%200.0844,22.05107%200.49901,25.46023%204.61666,37.95584%207.72944,23.45617%2023.16073,51.61548%2036.79482,67.14385%202.73301,3.11273%205.77824,5.39119%206.76718,5.06325%200.98893,-0.32792%203.0708,-5.26135%204.62637,-10.96317%20z'%20id='path15'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20223.79996,274.00911%20c%20-3.01576,-5.46337%20-12.75571,-21.56243%20-21.64431,-35.77568%20-28.04556,-44.84602%20-33.66712,-59.7856%20-35.85763,-95.29337%20-1.98877,-32.23755%202.29585,-52.57337%2023.79181,-112.921479%2011.38913,-31.9740576%2024.7091,-65.375246%2026.97404,-67.640184%202.58513,-2.585125%2011.61189,3.853342%2020.00366,14.267891%2015.68739,19.4687319%2028.64184,50.586973%2036.95347,88.766962%204.41311,20.27185%204.72573,61.86929%200.78293,104.17665%20-2.95821,31.74252%20-3.30272,43.60883%20-1.26604,43.60883%200.76256,0%203.9281,-3.81576%207.03454,-8.47949%2023.23829,-34.88781%2070.26618,-87.12279%2088.08372,-97.83664%207.74948,-4.65983%208.4795,-4.82713%208.4795,-1.94324%200,4.64121%20-5.39199,17.70136%20-16.5211,40.01643%20-5.42626,10.88027%20-9.45223,20.19601%20-8.94659,20.70167%200.50565,0.50563%204.44399,-0.86181%208.75189,-3.03879%204.30787,-2.17696%2013.64703,-5.67819%2020.75365,-7.7805%2011.15619,-3.30029%2016.2304,-3.81098%2037.14827,-3.73878%2023.70739,0.0818%2044.54283,2.88307%2041.76258,5.61483%20-0.76122,0.74794%20-10.64101,6.18477%20-21.95508,12.08183%20-11.31409,5.89708%20-20.99043,11.40052%20-21.50302,12.22988%20-1.08667,1.75826%20-2.36785,1.34931%2023.56202,7.52117%2023.91072,5.69127%2048.58686,15.25725%2066.76129,25.88073%2013.07073,7.64022%2038.16434,30.54687%2046.20744,42.18039%20l%203.7705,5.45364%20-10.35019,-0.66047%20c%20-8.57332,-0.54708%20-14.01024,-2.39464%20-31.66988,-10.762%20-28.16171,-13.34337%20-45.48451,-19.30117%20-43.82435,-15.07244%200.2961,0.75424%207.4431,7.11386%2015.88222,14.13249%20l%2015.34385,12.76112%20-112.25237,0.80758%20-112.25236,0.80757%20-17.76657,7.39031%20c%20-9.7716,4.06468%20-20.68889,8.5347%20-24.26062,9.93339%20l%20-6.49406,2.5431%20z%20m%2019.6856,-36.71471%20c%207.1393,-26.15828%209.90784,-53.62125%2010.00034,-99.19977%200.0961,-47.373242%20-1.29745,-59.76127%20-9.74534,-86.629243%20-5.06182,-16.098753%20-15.04248,-38.544251%20-17.13918,-38.544251%20-3.57865,0%20-20.62976,45.580498%20-30.81445,82.372237%20-4.75575,17.179957%20-5.13519,20.392637%20-5.05509,42.801257%200.0788,22.04739%200.49306,25.46233%204.60422,37.95584%202.48469,7.55079%207.42999,19.54322%2010.98955,26.64985%2011.64717,23.25347%2028.52359,46.88658%2032.53247,45.55726%200.98893,-0.32793%203.07131,-5.26136%204.62748,-10.96318%20z'%20id='path16'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20392.38996,1035.8999%20c%20-15.13576,-12.2758%20-39.30543,-36.04348%20-50.69893,-49.8557%20-18.02207,-21.84802%20-33.09611,-48.27817%20-56.65212,-99.33128%20l%20-5.58923,-12.11355%20-0.51588,12.11355%20c%20-0.28374,6.66248%200.67245,27.26168%202.12485,45.77595%201.45241,18.51435%202.33964,33.96353%201.97165,34.33155%20-1.21618,1.21613%20-16.98653,-28.86262%20-26.75772,-51.03494%20-11.69211,-26.53118%20-18.37169,-45.23176%20-23.78746,-66.59686%20-6.21694,-24.52567%20-16.80633,-79.21537%20-17.94387,-92.67247%20-0.55492,-6.56464%20-1.64295,-11.93571%20-2.41786,-11.93571%20-0.7749,0%20-0.95287,-1.81703%20-0.39547,-4.03785%200.55739,-2.22082%200.38953,-4.02758%20-0.37302,-4.01502%20-0.76254,0.0126%20-13.37888,16.07913%20-28.03629,35.70348%20-17.629,23.60295%20-26.84316,34.7169%20-27.22097,32.83357%20-2.07325,-10.33507%2016.05308,-129.48461%2029.82122,-196.0234%201.51659,-7.32942%200.54523,-6.88403%20-22.72283,10.41915%20-10.36333,7.70663%20-19.26074,13.59374%20-19.77203,13.08245%20-0.5113,-0.51129%201.33793,-8.76373%204.10939,-18.33873%207.63584,-26.3808%2015.54565,-59.7204%2025.39746,-107.04951%204.90013,-23.5407%209.53249,-45.34512%2010.29414,-48.45426%203.23432,-13.20281%203.37321,-14.53628%201.51412,-14.53628%20-1.02924,0%20-11.30073,6.2168%20-22.82555,13.81511%20-11.52482,7.59831%20-21.16054,13.59453%20-21.4127,13.32492%20-0.25217,-0.26961%206.23357,-14.54891%2014.41274,-31.73178%20l%2014.87123,-31.24161%207.17067,-0.49381%20c%203.94388,-0.27161%2020.90912,-3.47471%2037.70055,-7.11803%2016.79143,-3.64331%2031.08287,-6.6242%2031.75876,-6.6242%200.67588,0%204.23751,5.57781%207.91473,12.39513%2016.42326,30.44767%2040.20957,50.6062%2070.39843,59.66158%2011.23677,3.37056%2047.78551,3.76315%2065.32881,0.70174%2020.85026,-3.63849%2055.71674,-16.65451%2054.32541,-20.28024%20-0.49141,-1.28058%201.06907,-2.42398%204.14875,-3.03992%208.68328,-1.73665%2022.77758,-10.93761%2033.80463,-22.06813%2012.16239,-12.27651%2020.02605,-26.6277%2026.43602,-48.24578%204.34839,-14.66532%207.72696,-21.11807%2011.05712,-21.11807%204.9417,0%2055.72593,13.36116%2073.98865,19.46617%2027.39258,9.15702%2044.55449,17.67808%2055.1997,27.40721%2013.86553,12.6723%2015.66214,23.71168%206.95446,42.73176%20-4.83138,10.55314%20-2.9355,10.80829%20-19.59561,-2.63733%20-5.12344,-4.13489%20-13.92937,-9.7677%20-19.56873,-12.51735%20-9.38836,-4.57757%20-11.62329,-4.99936%20-26.49069,-4.99936%20-18.36975,0%20-25.17485,2.05931%20-33.62887,10.1765%20-7.90467,7.58973%20-8.84921,10.00947%20-6.03298,15.45546%201.32662,2.56536%203.37321,5.03313%204.548,5.48395%201.17481,0.45081%207.56131,-0.21992%2014.19224,-1.49051%2014.65778,-2.80868%2024.98421,-1.38909%2042.19869,5.8011%2023.79945,9.94061%2035.27078,22.94875%2035.27078,39.99598%200,10.58582%20-4.10341,19.30789%20-12.23835,26.01339%20-8.74379,7.2074%20-17.39175,9.0281%20-37.52362,7.90011%20-19.28268,-1.08041%20-30.47972,-3.64169%20-48.23683,-11.03398%20-19.00042,-7.90991%20-26.41727,-13.63891%20-32.1233,-24.81304%20-6.4261,-12.58429%20-9.70757,-13.22628%20-19.18116,-3.75268%20-4.1907,4.1907%20-7.71186,9.58077%20-8.7857,13.44886%20-2.22444,8.01269%20-2.29783,20.18786%20-0.14115,23.41423%201.36972,2.04907%202.2258,1.7377%205.5508,-2.01893%202.16222,-2.4429%204.33752,-4.44164%204.83402,-4.44164%200.49649,0%206.58259,3.55967%2013.52466,7.91036%2033.75854,21.15693%2056.26604,27.94005%2093.13452,28.06809%2015.92178,0.0553%2022.50579,-0.72069%2036.88209,-4.34686%2019.15026,-4.83032%2022.90386,-4.64153%2021.21734,1.06708%20-3.76546,12.74558%20-18.6575,24.68115%20-40.02737,32.08086%20-26.82474,9.28856%20-44.45504,8.09993%20-104.48216,-7.04419%20l%20-39.57098,-9.9833%20-36.34069,4.8e-4%20c%20-39.1111,5e-4%20-93.6479,2.1957%20-93.72632,3.77262%20-0.0265,0.53184%207.4234,8.02699%2016.55521,16.6559%20l%2016.60329,15.68893%20-5.653,0.0547%20c%20-7.41168,0.0716%20-34.01594,-7.09405%20-45.02513,-12.12723%20-10.18732,-4.65744%20-25.00056,-14.97123%20-37.00626,-25.76581%20-4.69833,-4.22437%20-8.86842,-7.35468%20-9.26685,-6.95625%20-0.39843,0.39843%201.88895,8.52872%205.08308,18.0673%203.19412,9.53858%205.38473,17.76564%204.86801,18.28234%20-1.51834,1.51836%20-18.66372,-12.05161%20-31.23915,-24.72469%20-19.73199,-19.88524%20-38.17955,-47.39844%20-44.0117,-65.64032%20-1.06504,-3.33123%20-2.57395,-6.05678%20-3.35313,-6.05678%20-6.6031,0%200.16413,73.95258%208.12912,88.83531%202.50187,4.67477%204.84409,2.49057%204.84409,-4.51727%200,-5.39068%201.13295,-3.86338%2012.26636,16.53594%2023.19887,42.50643%2040.95007,65.32331%2082.43132,105.95488%2035.3382,34.61437%2056.53258,52.02502%2085.37209,70.13107%2016.21502,10.18005%2016.57434,10.01917%20-14.51772,6.50212%20-24.41149,-2.76127%20-31.49527,-2.97232%20-31.49527,-0.9381%200,3.9078%2051.50139,33.36645%2081.79682,46.78748%2019.36821,8.58022%2030.12457,11.84362%2050.64482,15.36525%2018.26703,3.135%2048.45426,5.0919%2048.45426,3.14115%200,-0.83258%20-3.31382,-3.12368%20-7.36405,-5.09145%20-4.05022,-1.96778%20-16.57395,-9.56243%20-27.83051,-16.87703%20l%20-20.46644,-13.29937%2032.67592,-0.43718%20c%2021.22249,-0.28402%2032.67594,-1.02487%2032.67594,-2.11365%200,-0.92205%20-2.11767,-4.35937%20-4.70593,-7.63852%20-8.46669,-10.72665%20-42.13319,-69.49345%20-42.13319,-73.54583%200,-0.60272%205.88972,1.86546%2013.08827,5.48481%207.19853,3.61936%2013.48438,6.18453%2013.96854,5.70038%200.48415,-0.48416%20-1.34899,-6.52629%20-4.07367,-13.42699%20-9.52451,-24.12245%20-21.55152,-71.17052%20-21.29193,-83.29114%200.0418,-1.95364%204.07765,6.62331%208.96845,19.0599%2018.431,46.86727%2037.37385,79.10213%2059.15526,100.66389%206.57339,6.50715%2012.99641,12.49223%2014.27339,13.3002%203.74235,2.36798%20-3.70055,1.8507%20-24.23174,-1.68412%20-10.16278,-1.74975%20-18.79221,-2.86688%20-19.17648,-2.48265%20-1.23748,1.2375%2017.91062,21.9978%2030.08509,32.61817%2013.97623,12.19215%2019.10427,15.54173%2041.06791,26.8248%20l%2016.57069,8.51265%20-17.22347,-0.0435%20c%20-9.47291,-0.024%20-17.83127,0.5724%20-18.57413,1.32525%20-3.41057,3.45668%2026.83353,21.31148%2051.94902,30.66848%2023.14963,8.6247%2029.25022,9.41677%2079.14196,10.2756%2029.34012,0.50505%2046.23566,0.23782%2045.22399,-0.71535%20-0.88838,-0.83693%20-12.8808,-5.35185%20-26.64983,-10.03313%20-13.76912,-4.68135%20-29.39562,-10.54695%20-34.72558,-13.0347%20l%20-9.69085,-4.52325%2034.72555,-0.1392%20c%2043.93558,-0.1761%20205.90206,2.78138%20219.02676,3.99938%20l%209.8658,0.91552%20-0.17498,5.95275%20-0.17497,5.95268%208.88322,1.05165%20c%204.8858,0.5784%2017.10285,1.1235%2027.14898,1.21132%2010.2975,0.0901%2017.8758,0.7905%2017.3721,1.60568%20-1.7218,2.78587%204.4406,3.39967%2034.3492,3.42157%2016.5835,0.012%2031.7621,0.45375%2033.7301,0.98138%20l%203.5782,0.95925%20-3.1003,6.07725%20-3.1005,6.07717%20-27.1276,1.08863%20c%20-105.1158,4.218%20-251.54753,6.5112%20-418.46093,6.55312%20l%20-181.36473,0.0457%20-3.3876,5.34983%20c%20-1.96333,3.10065%20-2.78481,5.94292%20-1.95388,6.76042%200.78854,0.7758%2021.7845,2.16668%2046.65769,3.09083%2024.87318,0.92415%2067.02839,2.49682%2093.67823,3.49485%2026.64985,0.99802%2049.72618,2.49465%2051.28076,3.32587%201.55457,0.8313%202.8265,2.49825%202.8265,3.70448%200,3.2043%203.63481,4.1223%2017.49487,4.4184%206.81188,0.1455%20-12.54446,0.7983%20-43.01412,1.45057%20-30.46965,0.65228%20-57.92012,1.65885%20-61.00103,2.2368%20-4.20322,0.78855%20-6.60742,2.64413%20-9.63035,7.43273%20l%20-4.0287,6.3819%20h%20-23.93078%20-23.93079%20l%20-3.78025,8.07097%20c%20-2.07914,4.4391%20-3.45206,8.39925%20-3.05094,8.80035%201.08129,1.08128%2094.49883,3.8913%20171.02351,5.14448%20l%2067.02838,1.09762%20-4.53321,9.4401%20-4.53322,9.44018%20H%20584.10526%20c%20-106.81527,0%20-140.56323,0.46042%20-142.04091,1.93815%20-1.06599,1.06597%20-1.93817,5.7903%20-1.93817,10.49844%200,4.7081%20-0.50023,8.5603%20-1.1116,8.5603%20-2.49359,0%20-31.09499,-23.11362%20-40.83543,-33.00027%20-12.50813,-12.69585%20-15.04354,-13.39492%20-13.5804,-3.7443%202.13579,14.08733%208.68935,37.18447%2015.04676,53.03047%203.60949,8.9967%206.56269,16.6443%206.56269,16.9948%200,1.9897%20-3.81094,-0.3435%20-13.81824,-8.4598%20z'%20id='path17'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20394.09464,1037.4132%20c%20-13.65598,-10.6837%20-43.23456,-39.68543%20-53.39888,-52.35743%20-17.78879,-22.17765%20-35.32089,-52.9929%20-52.68596,-92.6034%20-3.52579,-8.04247%20-7.1756,-15.3495%20-8.1107,-16.23787%20-1.98377,-1.88453%20-0.82412,36.88785%202.04301,68.307%200.9879,10.82572%201.49677,20.58142%201.13083,21.6792%20-1.58289,4.7487%20-30.79746,-56.22983%20-41.45412,-86.5257%20-2.7677,-7.86833%20-6.87787,-21.58718%20-9.1337,-30.48638%20-6.21694,-24.52567%20-16.80633,-79.21537%20-17.94387,-92.67247%20-0.55492,-6.56464%20-1.70789,-11.93571%20-2.56218,-11.93571%20-0.8637,0%20-1.08826,-1.8526%20-0.50583,-4.17319%200.66494,-2.64933%200.44832,-3.80292%20-0.59323,-3.15922%20-0.90235,0.55768%20-13.01601,16.06337%20-26.91924,34.45712%20-13.90323,18.39367%20-26.00178,34.16992%20-26.88567,35.05822%20-5.19086,5.217%208.02058,-89.05832%2024.76257,-176.70276%202.61389,-13.68371%204.42166,-25.21032%204.01729,-25.6147%20-0.8178,-0.81779%20-4.55164,1.70658%20-26.46861,17.89483%20-8.27694,6.1135%20-15.4493,10.71513%20-15.93857,10.22586%20-0.48927,-0.48926%201.70768,-10.19168%204.8821,-21.56091%2010.04728,-35.98442%2015.28685,-58.52268%2029.34974,-126.24951%204.12582,-19.86991%207.887,-37.13174%208.35818,-38.35962%201.72783,-4.50267%20-3.62451,-1.93288%20-24.12424,11.58258%20-11.52482,7.59831%20-21.15552,13.59453%20-21.40156,13.32493%20-0.24605,-0.26961%206.19588,-14.5504%2014.31539,-31.73509%20l%2014.76274,-31.24488%207.5451,-0.59451%20c%204.1498,-0.32697%2021.15886,-3.5286%2037.79789,-7.11473%2016.63905,-3.58612%2030.85669,-6.52022%2031.59478,-6.52022%200.73808,0%203.27187,3.81577%205.63063,8.47949%2019.09144,37.74746%2051.36686,62.13846%2087.10368,65.82554%2028.70167,2.96124%2064.23496,-2.43718%2091.67921,-13.92841%2011.32151,-4.74046%2014.38365,-6.8135%2013.10951,-8.87509%20-0.48681,-0.78767%200.34052,-1.43213%201.83851,-1.43213%206.34249,0%2024.21361,-10.81383%2034.56954,-20.91806%2013.0815,-12.76357%2020.58471,-25.87563%2027.62404,-48.27381%202.88663,-9.18486%206.48846,-18.23112%208.00405,-20.10281%20l%202.75564,-3.40306%2025.6512,6.17674%20c%2051.80879,12.47543%2088.48308,26.85809%20103.95431,40.76807%2013.3994,12.04721%2015.86207,21.70357%209.72101,38.11703%20-5.85319,15.64403%20-5.79777,15.62892%20-18.63383,5.08429%20-6.18484,-5.08076%20-16.31236,-11.67284%20-22.50561,-14.64906%20-10.49246,-5.04227%20-12.36506,-5.4089%20-27.45742,-5.37585%20-18.49061,0.0405%20-25.78905,2.48724%20-34.23511,11.47708%20-6.8963,7.3403%20-7.55004,12.1611%20-2.35384,17.35731%202.8567,2.85669%203.77399,2.89869%2016.25056,0.74404%2015.76439,-2.72244%2024.96391,-1.45364%2042.46606,5.85692%2023.6903,9.89531%2035.16431,22.93143%2035.16431,39.95166%200,10.58582%20-4.10341,19.30789%20-12.23835,26.01339%20-8.74379,7.2074%20-17.39175,9.0281%20-37.52362,7.90011%20-19.28268,-1.08041%20-30.47972,-3.64169%20-48.23683,-11.03398%20-19.04748,-7.9295%20-26.37741,-13.61454%20-32.513,-25.21683%20-3.97732,-7.52103%20-6.20974,-10.09464%20-8.75637,-10.09464%20-4.77681,0%20-16.85074,13.10218%20-18.91108,20.5216%20-2.14602,7.72796%20-2.17287,19.91276%20-0.0508,23.08724%201.36403,2.04054%202.28306,1.67159%205.82594,-2.33879%204.80057,-5.43403%201.88709,-6.38023%2026.22029,8.51538%2026.83357,16.42621%2051.20604,23.06305%2084.69442,23.06305%2017.24619,0%2023.7186,-0.73763%2037.63336,-4.28888%2018.42319,-4.70184%2022.46482,-4.45133%2020.76942,1.28733%20-3.82729,12.95484%20-20.42749,26.01813%20-41.61179,32.74578%20-26.83251,8.52138%20-43.51029,7.2723%20-102.89774,-7.70647%20l%20-39.57098,-9.98066%20-35.53312,-0.0431%20c%20-35.44056,-0.043%20-88.27613,1.90619%20-92.87066,3.42622%20-1.66805,0.55185%202.85992,5.77421%2014.53628,16.76554%2016.81566,15.82911%2016.91349,15.96453%2011.57509,16.02275%20-6.34417,0.0691%20-27.32434,-5.09783%20-40.34248,-9.93557%20-10.69031,-3.97268%20-23.15962,-12.10434%20-39.333,-25.65039%20-6.33321,-5.3044%20-11.76272,-9.39654%20-12.06559,-9.09366%20-0.30288,0.30288%202.06269,8.35497%205.25681,17.89356%203.19412,9.53857%205.38473,17.76564%204.86802,18.28233%20-1.51835,1.51836%20-18.66373,-12.0516%20-31.23915,-24.72468%20-19.732,-19.88525%20-38.17956,-47.39844%20-44.01171,-65.64033%20-4.48967,-14.04283%20-7.43023,-2.47181%20-5.75952,22.66353%201.3293,19.99901%206.34527,49.84625%209.74384,57.98016%202.85531,6.83371%205.63576,5.65308%205.63576,-2.39307%200,-5.44858%200.95057,-4.20574%2011.28218,14.75121%2021.97155,40.31446%2036.98155,60.47689%2071.01882,95.39723%2035.99592,36.92982%2067.54236,63.55951%2097.63,82.41376%2016.36274,10.25363%2016.72024,10.0902%20-14.37895,6.5724%20-25.48879,-2.88315%20-31.9648,-3.00832%20-31.16282,-0.6024%201.68201,5.046%2069.64909,42.78638%2092.53822,51.38408%2015.77247,5.92455%2032.63699,9.75097%2054.09735,12.27427%2022.54471,2.6508%2033.92788,3.01298%2033.92788,1.0794%200,-0.7113%20-3.31382,-2.90325%20-7.36404,-4.87102%20-4.05023,-1.96778%20-16.57396,-9.56243%20-27.83052,-16.87703%20l%20-20.46644,-13.29937%2032.67592,-0.43718%20c%2022.14397,-0.29632%2032.67594,-1.00207%2032.67594,-2.18955%200,-0.96382%20-1.83866,-3.9375%20-4.08591,-6.60817%20-7.66763,-9.11243%20-42.75321,-70.44371%20-42.75321,-74.73461%200,-0.4738%205.88973,2.09985%2013.08827,5.7192%207.19854,3.61935%2013.4483,6.22061%2013.88834,5.78056%200.44005,-0.44005%20-1.39209,-6.48458%20-4.07142,-13.43233%20-9.69429,-25.13811%20-21.49335,-71.52996%20-21.20288,-83.36598%200.0479,-1.95365%204.25696,6.98671%209.35339,19.86747%2018.78666,47.48173%2035.73076,76.09394%2059.05725,99.72546%2017.02383,17.24648%2017.38791,16.8603%20-11.02636,11.69543%20-9.69794,-1.76273%20-17.91153,-2.92613%20-18.25241,-2.58525%20-1.1472,1.1472%2018.61407,22.93845%2028.91061,31.8804%2014.43456,12.53565%2018.97986,15.51667%2040.4003,26.4969%20l%2018.99445,9.73657%20-16.83761,-0.0457%20c%20-20.76244,-0.0562%20-23.48492,1.62038%20-13.90186,8.56238%2021.24342,15.38865%2059.70125,30.08625%2085.2177,32.568%2018.83242,1.83165%2084.49577,2.15175%2084.49577,0.4119%200,-0.66735%20-10.35713,-4.7085%20-23.01578,-8.98043%20-12.65865,-4.27192%20-28.83025,-10.23142%20-35.93688,-13.24342%20l%20-12.92113,-5.4762%2035.53312,-0.0799%20c%2046.35422,-0.10418%20207.07449,2.87385%20220.00067,4.07647%20l%2010.03222,0.93338%20-0.3414,5.9349%20-0.34132,5.9349%208.88322,1.05165%20c%204.8858,0.5784%2016.98225,1.1235%2026.88073,1.21132%2014.4042,0.12788%2018.1833,0.6435%2018.9273,2.58248%200.7834,2.0415%205.9998,2.42272%2033.1511,2.42272%2017.7218,0%2033.3503,0.4332%2034.7299,0.96263%202.2137,0.84945%202.1435,1.6782%20-0.5963,7.04872%20l%20-3.1049,6.08618%20-26.3252,1.04647%20c%20-14.4788,0.57563%20-56.8513,1.7463%20-94.16105,2.60153%20-37.30973,0.85522%20-104.17665,2.41155%20-148.593,3.45847%20-52.35428,1.23405%20-129.42927,1.54455%20-219.14527,0.8829%20l%20-138.38818,-1.0206%20-3.5738,5.78258%20c%20-3.87466,6.26932%20-2.71935,8.60782%204.27817,8.6595%201.84116,0.0135%2021.82855,0.73065%2044.41641,1.59345%2022.58784,0.86272%2062.87322,2.38867%2089.52306,3.3909%2026.64985,1.00222%2049.72619,2.5023%2051.28077,3.33352%201.55457,0.8313%202.82649,2.49825%202.82649,3.70448%200,3.20512%203.63671,4.12282%2017.49488,4.41472%206.81188,0.14348%20-13.31682,0.816%20-44.73042,1.49453%20-37.52817,0.8106%20-58.69506,1.88782%20-61.72105,3.1413%20-2.53296,1.04917%20-6.06066,4.37407%20-7.83932,7.3887%20l%20-3.23395,5.48115%20h%20-24.00551%20-24.00552%20l%20-3.78026,8.07097%20c%20-2.07913,4.4391%20-3.46585,8.38545%20-3.08159,8.76968%201.06716,1.06717%2097.70641,3.98932%20171.86173,5.19675%20l%2066.22082,1.0782%20-4.53322,9.43905%20-4.53322,9.43905%20H%20585.2912%20c%20-92.67016,0%20-139.95684,0.55657%20-142.04092,1.6719%20-2.50362,1.33995%20-3.1241,3.42502%20-3.1241,10.49842%200,4.8546%20-0.54511,8.8189%20-1.21135,8.8097%20-2.29843,-0.032%20-27.72605,-20.36795%20-39.9669,-31.96407%20-6.75096,-6.3954%20-12.99978,-11.628%20-13.88628,-11.628%20-3.36735,0%205.94588,38.51397%2014.06033,58.14517%209.54702,23.0969%209.51399,23.1744%20-5.02734,11.798%20z'%20id='path18'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20712.52876,795.05752%20c%20-14.22324,-0.3813%20-18.9297,-1.01722%20-18.34756,-2.4792%200.43063,-1.0815%202.03186,-5.05529%203.55827,-8.83072%20l%202.77531,-6.8643%20h%2074.91494%2074.91488%20l%205.01345,-8.8833%205.01338,-8.8833%20h%20160.55247%20c%20109.289,0%20160.5525,0.53228%20160.5525,1.66703%200,0.91687%20-1.0532,4.18755%20-2.3404,7.26817%20l%20-2.3402,5.60108%20h%20-95.1389%20c%20-52.3264,0%20-99.54405,0.46042%20-104.92815,1.02322%20l%20-9.78923,1.02315%20-2.94487,10.2828%20-2.94488,10.2828%20-114.69524,-0.34725%20c%20-63.08235,-0.19102%20-123.30397,-0.5781%20-133.82577,-0.86018%20z%20m%20180.24094,-1.47735%20c%20-1.11038,-0.44805%20-2.9274,-0.44805%20-4.03785,0%20-1.11038,0.44805%20-0.2019,0.81465%202.01892,0.81465%202.22083,0%203.12938,-0.3666%202.01893,-0.81465%20z%20m%2017.68582,-0.8685%20c%20-1.5075,-1.5075%20-2.36887,-1.5075%20-3.87637,0%20-1.50743,1.50743%20-1.0767,1.93815%201.93822,1.93815%203.01493,0%203.44558,-0.43072%201.93815,-1.93815%20z%20m%2038.05546,-16.93815%20c%20-1.54426,-0.40425%20-4.45148,-0.41887%20-6.46058,-0.0322%20-2.0091,0.38633%20-0.74565,0.71708%202.80762,0.735%203.55336,0.018%205.19713,-0.29819%203.65296,-0.70245%20z%20m%20-57.28148,-2.28787%20c%20-1.27747,-1.27748%20-2.6274,-1.29143%20-4.76467,-0.0487%20-2.61435,1.51957%20-2.39446,1.73947%201.78252,1.78252%203.47468,0.036%204.28205,-0.4335%202.98215,-1.7334%20z%20m%2030.61275,0.6426%20c%20-1.99875,-0.38498%20-5.26935,-0.38498%20-7.2681,0%20-1.99875,0.38497%20-0.36345,0.69997%203.63405,0.69997%203.9975,0%205.6328,-0.315%203.63405,-0.69997%20z'%20id='path19'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20844.1121,618.7574%20c%20-1.85663,-1.17601%20-1.73813,-2.67552%200.72015,-9.11237%20l%202.94247,-7.70474%2090.4764,1.13704%20c%2049.76198,0.62537%2090.73498,1.39565%2091.05108,1.71173%200.3161,0.31608%20-0.2832,3.43824%20-1.3319,6.93816%20l%20-1.9065,6.36347%20-41.26865,1.06191%20c%20-58.24943,1.49885%20-138.04673,1.27469%20-140.68305,-0.3952%20z'%20id='path20'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20844.04265,618.71448%20c%20-1.95263,-1.23587%20-1.85865,-2.58475%200.63472,-9.11345%20l%202.92643,-7.66288%2090.5619,1.13811%20c%2049.809,0.62596%2090.8204,1.39672%2091.1365,1.7128%200.3161,0.31608%20-0.2833,3.43846%20-1.332,6.93863%20l%20-1.9067,6.36395%20-39.79513,1.05794%20c%20-57.09225,1.51776%20-139.53892,1.26555%20-142.22572,-0.4351%20z'%20id='path21'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.9003,1033.0855%20c%20-22.94087,-19.2606%20-48.68452,-46.98408%20-61.73949,-66.48768%20-10.63267,-15.88477%20-26.43984,-45.84285%20-42.15069,-79.8849%20l%20-5.59056,-12.11355%20-0.49344,10.49843%20c%20-0.2714,5.7741%200.6813,26.38357%202.1171,45.79875%201.43579,19.41525%202.27032,35.6406%201.85451,36.0564%20-2.33955,2.33955%20-31.15773,-58.60523%20-41.37888,-87.50813%20-8.75708,-24.76297%20-24.27113,-94.77352%20-26.84316,-121.13565%20-0.60669,-6.21832%20-1.79235,-12.17967%20-2.63481,-13.24743%20-0.84246,-1.06778%20-1.00344,-3.60593%20-0.35775,-5.64034%201.01411,-3.19518%200.83621,-3.41857%20-1.30636,-1.6404%20-1.36419,1.13219%20-14.00657,17.39198%20-28.09418,36.1329%20-17.20368,22.88633%20-25.80135,33.12705%20-26.18495,31.18905%20-0.79005,-3.99142%202.34475,-33.423%207.04845,-66.17551%203.54804,-24.70548%2020.33665,-121.25258%2022.77185,-130.95517%200.53963,-2.15005%200.35724,-3.89786%20-0.40531,-3.88403%20-0.76254,0.0138%20-10.35183,6.61438%20-21.30951,14.66789%20-10.95768,8.05352%20-20.31818,14.24764%20-20.8011,13.76471%20-0.48293,-0.48293%202.11434,-11.62607%205.77169,-24.76253%208.5737,-30.79499%2012.73519,-48.5922%2025.41229,-108.67944%205.71626,-27.09402%2010.79535,-50.53376%2011.28688,-52.08834%200.49154,-1.55457%200.36347,-2.82649%20-0.2846,-2.82649%20-1.81871,0%20-14.53577,7.63371%20-30.26692,18.16843%20-7.8477,5.2554%20-14.50762,9.31365%20-14.79983,9.01833%20-0.29222,-0.2953%206.12863,-14.60042%2014.26854,-31.78914%20l%2014.79983,-31.25223%207.3612,-0.57267%20c%204.04865,-0.31496%2019.31174,-3.18697%2033.91798,-6.38222%2014.60623,-3.19525%2028.7895,-6.20997%2031.51839,-6.69938%204.81271,-0.86313%205.20038,-0.4608%2012.91884,13.40731%2015.50042,27.85038%2043.15257,50.90756%2069.48614,57.9396%2012.66126,3.38104%2050.10863,3.39589%2067.67011,0.0269%2021.82881,-4.1877%2052.08349,-15.68752%2051.4047,-19.53895%20-0.16323,-0.92615%202.74402,-2.58396%206.46056,-3.68402%2010.12426,-2.99671%2028.40741,-16.22327%2036.79043,-26.61526%208.97022,-11.11993%2015.77509,-24.72529%2021.55336,-43.0929%204.87125,-15.48446%207.90827,-20.99684%2011.5681,-20.99684%204.97264,0%2055.15198,13.19908%2073.66187,19.37589%2025.84713,8.62526%2044.33787,17.7557%2054.54664,26.93427%2013.3994,12.04721%2015.86207,21.70357%209.72101,38.11703%20-5.8104,15.52968%20-5.73267,15.50788%20-18.60188,5.21637%20-6.20242,-4.96007%20-16.28077,-11.5325%20-22.39635,-14.60539%20-10.25796,-5.15431%20-12.2596,-5.58637%20-25.84227,-5.57806%20-18.89143,0.0115%20-25.53015,1.95048%20-34.27386,10.01016%20-7.59076,6.99692%20-9.06397,12.5185%20-4.87024,18.25377%202.08885,2.85666%203.14004,2.92675%2016.73843,1.11625%2017.10548,-2.27743%2025.69676,-1.05289%2042.83373,6.10525%2023.63212,9.87118%2035.10756,22.92226%2035.10756,39.92804%200,10.58582%20-4.10341,19.30789%20-12.23835,26.01339%20-8.74379,7.2074%20-17.39175,9.0281%20-37.52362,7.90011%20-19.28268,-1.08041%20-30.47972,-3.64169%20-48.23683,-11.03398%20-17.81272,-7.41548%20-26.45406,-13.78388%20-31.47735,-23.1979%20-7.85341,-14.71783%20-10.14111,-15.3165%20-19.84173,-5.19237%20-9.57657,9.99466%20-13.89481,28.30827%20-8.43543,35.77444%202.03071,2.77716%202.32461,2.70711%205.48167,-1.30644%201.83475,-2.33251%203.78226,-4.24093%204.32779,-4.24093%200.54555,0%209.23023,4.96117%2019.29931,11.02481%2032.43869,19.53473%2054.57524,25.32365%2092.284,24.13319%2017.18858,-0.54263%2026.01834,-1.64484%2036.71216,-4.58271%2017.50572,-4.8093%2019.5631,-3.72982%2014.16074,7.42995%20-6.54956,13.5296%20-26.42273,25.36248%20-51.66062,30.75977%20-20.87598,4.46446%20-36.26193,2.5924%20-90.44795,-11.00511%20l%20-39.57098,-9.93%20-33.11041,-0.0916%20c%20-44.59465,-0.12338%20-95.28686,2.32581%20-95.31565,4.60518%20-0.0122,0.97008%207.0742,8.45334%2015.74764,16.62948%2015.73091,14.82894%2015.75659,14.86588%2010.38601,14.94006%20-2.96114,0.0409%20-11.18218,-1.40607%20-18.26897,-3.21549%20-27.03978,-6.90387%20-37.38269,-12.25511%20-59.37181,-30.71796%20-6.45795,-5.42234%20-12.18831,-9.41221%20-12.73413,-8.86641%20-0.54581,0.54583%201.3999,8.29097%204.32382,17.21141%202.92392,8.92046%204.90653,16.6287%204.4058,17.12943%20-1.49294,1.49295%20-18.73751,-12.18428%20-31.21011,-24.75374%20-20.13338,-20.28973%20-37.85772,-46.74058%20-43.98464,-65.64032%20-4.47673,-13.80938%20-7.5036,-2.41919%20-5.82349,21.91396%201.40007,20.27733%206.45074,50.75988%209.69824,58.53224%202.92851,7.00892%205.71321,5.93668%205.73209,-2.20714%200.0127,-5.46378%200.96738,-4.20862%2011.4362,15.03539%2023.16972,42.59104%2043.99271,69.32866%2085.11015,109.28511%2033.01014,32.07807%2056.96565,51.63927%2084.1784,68.73695%2015.49924,9.73807%2015.84613,9.59902%20-15.18652,6.08873%20-11.54827,-1.30628%20-23.54069,-2.361%20-26.64984,-2.34383%20l%20-5.653,0.0315%205.11806,4.6581%20c%2011.72409,10.67055%2074.04588,43.76722%2095.82831,50.89072%2024.88283,8.13743%2080.7571,15.6783%2080.7571,10.89916%200,-0.7113%20-3.31382,-2.90326%20-7.36405,-4.87103%20-4.05022,-1.96778%20-16.57408,-9.56242%20-27.83082,-16.87702%20l%20-20.46676,-13.29938%2031.42026,-0.43987%20c%2017.28115,-0.24195%2032.0692,-1.08885%2032.86237,-1.88205%200.84604,-0.84608%20-0.58478,-4.00208%20-3.46176,-7.63583%20-8.84142,-11.16682%20-42.3075,-69.47636%20-42.3075,-73.71428%200,-0.55369%205.94285,1.8672%2013.20635,5.37975%207.26349,3.51254%2013.49653,6.09627%2013.85119,5.7416%200.35465,-0.35465%20-1.92755,-7.51288%20-5.07159,-15.90715%20-9.85407,-26.30956%20-20.54166,-68.85771%20-20.29857,-80.81025%200.0397,-1.95364%204.34334,7.13853%209.56357,20.20485%2019.33432,48.39404%2038.66669,80.27862%2062.71541,103.43548%2013.33202,12.8376%2013.27151,12.86865%20-14.9779,7.6785%20-9.65046,-1.773%20-17.82255,-2.94742%20-18.16018,-2.60985%20-1.11863,1.1187%2018.37865,22.65495%2028.02235,30.95288%2015.4575,13.3005%2020.47362,16.63875%2040.7911,27.14662%20l%2019.34804,10.00658%20-16.76271,-0.045%20c%20-20.88255,-0.0555%20-23.4105,1.60455%20-13.48108,8.85412%209.94766,7.26293%2040.1198,21.53783%2055.98815,26.48888%207.94771,2.47972%2020.77559,4.83592%2031.49527,5.78482%2023.50382,2.08065%2083.05948,2.15535%2080.99585,0.10163%20-0.8439,-0.83985%20-12.21727,-5.21535%20-25.27405,-9.7233%20-13.05681,-4.50795%20-28.6833,-10.33605%20-34.72555,-12.95138%20l%20-10.9859,-4.755%2035.53311,-0.057%20c%2047.29527,-0.0759%20207.32509,2.89793%20220.00069,4.08825%20l%2010.03223,0.94215%20-0.3414,5.9349%20-0.34133,5.9349%209.69083,1.03613%20c%205.32995,0.56977%2017.42632,1.11487%2026.88087,1.21132%2013.6759,0.13943%2017.38,0.67058%2018.1197,2.598%200.7833,2.0415%205.9997,2.42273%2033.151,2.42273%2017.7218,0%2033.3503,0.4332%2034.73,0.96262%202.214,0.8496%202.1446,1.6761%20-0.5911,7.03845%20l%20-3.0996,6.07575%20-23.9078,1.03418%20c%20-13.1492,0.5688%20-56.9777,1.74922%20-97.39662,2.62312%20-40.41893,0.87383%20-86.5716,2.11628%20-102.56153,2.76098%20-15.98992,0.64462%20-113.29665,1.20292%20-216.23722,1.24072%20l%20-187.16468,0.0683%20-3.0022,5.59778%20c%20-2.31408,4.31475%20-2.53761,5.8578%20-0.97516,6.73215%201.11488,0.62392%2023.09377,1.91925%2048.84196,2.87857%20117.81893,4.38945%20139.06039,5.4117%20141.70449,6.8196%201.55457,0.82778%202.8265,2.48498%202.8265,3.68258%200,2.89627%204.93207,4.06687%2018.57413,4.40827%206.2183,0.15563%20-14.39607,0.83805%20-45.80968,1.51658%20-36.49158,0.78817%20-58.73046,1.90252%20-61.58763,3.08602%20-2.45959,1.0188%20-5.81367,4.3437%20-7.45353,7.3887%20l%20-2.98153,5.53643%20h%20-24.39133%20-24.39133%20l%20-3.78025,8.07097%20c%20-2.07914,4.4391%20-3.4753,8.36483%20-3.10259,8.72393%201.08885,1.04902%20100.00524,4.062%20171.88273,5.23545%20l%2066.22082,1.08105%20-4.53322,9.44115%20-4.53322,9.44115%20H%20586.3101%20c%20-85.68995,0%20-139.46645,0.59632%20-142.04092,1.57515%20-3.75724,1.42845%20-4.143,2.406%20-4.143,10.49842%200,4.9078%20-0.54511,8.9169%20-1.21135,8.9092%20-1.91579,-0.023%20-28.00791,-20.7118%20-41.22965,-32.6926%20-6.61728,-5.99617%20-12.44869,-10.90222%20-12.95865,-10.90222%20-2.9546,0%206.78692,39.32172%2014.29677,57.70892%2010.03787,24.5769%209.87975,24.7003%20-10.12299,7.9066%20z'%20id='path22'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20989.67825,1008.2953%20c%20-5.9727,-0.7412%20-5.95268,-0.6902%20-3.23033,-8.2362%20l%202.01893,-5.59615%2075.10405,1.15612%20c%2041.3073,0.63593%2075.5968,1.64895%2076.199,2.2512%200.6021,0.60226%200.092,3.45723%20-1.1334,6.34423%20l%20-2.2282,5.2492%20-70.7404,-0.2584%20c%20-38.9072,-0.1422%20-73.1026,-0.5517%20-75.98965,-0.91%20z'%20id='path23'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.9003,1033.0855%20c%20-23.62422,-19.8343%20-48.77192,-47.04835%20-62.23647,-67.35033%20-11.51858,-17.3679%20-30.43833,-53.37907%20-40.88068,-77.81085%20-2.56283,-5.99625%20-5.33765,-10.90222%20-6.16628,-10.90222%20-1.68049,0%20-0.38383,36.19717%202.38266,66.51337%200.94973,10.40753%201.45937,20.23215%201.13253,21.83243%20-1.21992,5.97315%20-26.18805,-44.60438%20-39.1838,-79.37393%20-10.33034,-27.6384%20-24.30253,-87.80655%20-28.44794,-122.50477%20-0.97715,-8.17905%20-2.47441,-16.18829%20-3.32724,-17.79843%20-0.85283,-1.61014%20-1.07479,-4.4267%20-0.49322,-6.25904%201.99316,-6.27989%20-2.26226,-1.37279%20-25.87404,29.83644%20-12.91385,17.06903%20-24.98798,32.85173%20-26.83138,35.07255%20l%20-3.35165,4.03785%201.01889,-14.53627%20c%202.15778,-30.78412%2013.74528,-105.70093%2026.62785,-172.15732%201.77043,-9.13304%202.90415,-16.92033%202.51937,-17.30511%20-0.38478,-0.38479%20-9.8878,5.98095%20-21.11784,14.14609%20-11.23003,8.16512%20-20.80989,14.45404%20-21.28856,13.97537%20-0.47867,-0.47868%202.05326,-11.26788%205.62652,-23.97599%208.53344,-30.34871%2038.06924,-162.50392%2036.67265,-164.08837%20-0.76058,-0.86289%20-6.8658,2.69868%20-26.38127,15.38992%20-10.10087,6.56876%20-18.57783,11.72806%20-18.83769,11.4651%20-0.25986,-0.26296%206.24792,-14.65098%2014.46174,-31.97338%2010.62571,-22.4089%2015.64529,-31.37341%2017.39891,-31.0729%201.35558,0.2323%2016.9216,-2.59149%2034.59116,-6.27509%2017.66957,-3.68358%2034.0013,-7.02691%2036.29273,-7.42961%203.7863,-0.6654%204.88847,0.55466%2012.08586,13.37851%2014.01038,24.96284%2035.72855,44.72456%2060.55867,55.10332%209.32057,3.8959%2012.89969,4.42165%2034.2875,5.03659%2027.92575,0.80291%2044.71108,-1.2316%2064.52757,-7.82125%2015.75798,-5.24007%2031.14906,-12.53793%2029.63514,-14.05187%20-0.54497,-0.54495%202.09117,-2.03264%205.85807,-3.30598%2026.06508,-8.81088%2047.81093,-34.78484%2058.43517,-69.7969%204.66256,-15.36546%207.89149,-20.98248%2012.06171,-20.98248%205.08353,0%2053.91495,12.91386%2073.24464,19.37013%2046.08831,15.39385%2067.49905,31.50006%2067.49905,50.77608%200,5.87321%20-4.95973,20.8621%20-8.50949,25.71667%20-1.86791,2.55453%20-3.03167,2.0113%20-13.32379,-6.21932%20-6.20242,-4.96007%20-16.28077,-11.53249%20-22.39635,-14.60539%20-10.21973,-5.13511%20-12.29506,-5.58707%20-25.65488,-5.58707%20-18.46439,0%20-25.9976,2.30116%20-34.6391,10.58117%20-7.35738,7.04961%20-8.71554,12.18978%20-4.67932,17.70963%202.11018,2.88585%203.08258,2.94815%2016.55521,1.06064%2016.88394,-2.36543%2025.62279,-1.11711%2043.00388,6.143%2023.63212,9.87119%2035.10756,22.92227%2035.10756,39.92804%200,10.67036%20-4.10937,19.30899%20-12.47048,26.21509%20-8.70437,7.18967%20-16.11853,8.73487%20-36.79135,7.66779%20-19.67864,-1.01576%20-30.74984,-3.51532%20-48.73697,-11.00336%20-17.89127,-7.44816%20-26.31477,-13.72953%20-31.98006,-23.84738%20-6.47849,-11.57018%20-9.12987,-13.14108%20-14.92194,-8.84091%20-7.72567,5.73573%20-13.92704,17.5155%20-14.62761,27.7858%20-0.42942,6.29518%200.10384,10.13405%201.7042,12.26852%202.2579,3.01145%202.41576,2.97438%205.15835,-1.21135%201.55604,-2.37485%203.48231,-4.31788%204.28059,-4.31788%200.79828,0%209.47025,4.81516%2019.27107,10.70036%2021.83688,13.11267%2036.9795,19.13598%2056.69317,22.55103%2021.01494,3.64046%2051.92948,2.51653%2072.01857,-2.61831%2018.36554,-4.6943%2020.29454,-3.74083%2014.91482,7.37217%20-6.54957,13.52959%20-26.42274,25.36248%20-51.66063,30.75976%20-20.80669,4.44964%20-39.57181,2.12369%20-93.67823,-11.61153%20l%20-36.34069,-9.22527%20-29.07255,-0.14076%20c%20-38.68621,-0.18731%20-97.57836,2.36754%20-98.76311,4.28452%20-0.52098,0.84296%206.2245,8.41057%2014.98996,16.8169%20l%2015.93718,15.28425%20-8.88328,-0.78728%20c%20-11.04869,-0.97919%20-34.85867,-7.86503%20-45.84146,-13.25733%20-4.54619,-2.23206%20-15.52545,-9.86438%20-24.39835,-16.96072%20-8.87291,-7.09632%20-16.383,-12.15108%20-16.6891,-11.23279%20-0.3061,0.91829%201.75938,8.6212%204.58996,17.11759%202.83057,8.49638%204.75893,15.83553%204.28525,16.30921%20-3.29673,3.29673%20-37.41275,-28.71173%20-52.78009,-49.51953%20-9.37914,-12.69961%20-22.60469,-36.86734%20-22.60469,-41.3067%200,-1.04863%20-1.03875,-2.76868%20-2.30833,-3.82234%20-1.92565,-1.59815%20-2.49182,-0.69215%20-3.41515,5.4651%20-1.33456,8.89948%201.53615,43.24251%205.0275,60.14522%204.71194,22.81199%209.04896,30.40346%2010.09314,17.66699%200.50779,-6.19375%200.64801,-6.02427%2011.81485,14.27989%206.21553,11.3014%2014.41997,25.38769%2018.23211,31.30284%2030.74274,47.70241%20101.21326,115.91838%20152.716,147.83018%2014.17341,8.78205%2014.02849,8.82338%20-17.72479,5.0571%20-11.1041,-1.317%20-22.64042,-2.4009%20-25.63625,-2.40862%20-4.89072,-0.0127%20-5.2206,0.2601%20-3.23028,2.6703%203.54076,4.28782%2022.04931,15.6207%2047.79733,29.2665%2032.51053,17.22975%2048.93746,24.02565%2069.07048,28.57485%2018.33575,4.14315%2050.30458,7.98412%2058.18753,6.99112%20l%204.82696,-0.60802%20-5.45156,-3.17048%20c%20-7.22918,-4.20435%20-42.45131,-26.6586%20-47.27717,-30.13942%20-3.62656,-2.61578%20-2.33976,-2.74568%2028.00249,-2.82653%2017.49205,-0.0465%2032.18526,-0.702%2032.65156,-1.4565%200.46631,-0.7545%20-1.22952,-4.2069%20-3.76853,-7.67197%20-10.17345,-13.884%20-42.11263,-69.93081%20-42.11263,-73.89912%200,-0.5968%205.06956,1.46788%2011.26569,4.58821%2016.61088,8.36511%2017.01081,8.09058%2011.14751,-7.65163%20-9.77847,-26.25387%20-20.90041,-70.29915%20-20.74921,-82.17138%200.0269,-2.10921%204.96218,8.15751%2010.96741,22.81492%2019.60246,47.84531%2034.34861,72.53611%2057.62728,96.49055%2016.76328,17.24992%2017.21565,16.77495%20-11.30599,11.87055%20-9.77162,-1.68023%20-17.98652,-2.84693%20-18.25532,-2.5926%20-0.97831,0.92557%2020.6189,24.44512%2029.01366,31.59622%2014.82231,12.62625%2020.0133,16.04505%2040.2694,26.5212%20l%2019.68676,10.1817%20-17.10586,-0.21997%20c%20-20.21597,-0.25988%20-23.55658,1.3626%20-15.38565,7.4724%208.15024,6.09442%2028.0784,16.51335%2042.39003,22.16264%2025.33192,9.99938%2034.70247,11.40788%2082.9201,12.46373%2029.4483,0.64477%2044.01262,0.41895%2044.01262,-0.68243%200,-0.9054%20-10.80682,-5.36452%20-24.01515,-9.90922%20-13.20835,-4.54463%20-29.01655,-10.4925%20-35.12935,-13.21748%20l%20-11.11418,-4.95457%2086.41008,0.90683%20c%2097.42448,1.02247%20154.236,2.2008%20169.33868,3.51232%20l%2010.24725,0.8898%20-0.99818,5.32073%20c%20-0.77887,4.15147%20-0.38377,5.55645%201.79775,6.3936%201.53773,0.5901%2013.71923,1.52129%2027.07005,2.06932%2016.95828,0.69615%2024.92388,1.64617%2026.42998,3.15232%201.6493,1.64926%209.5,2.15596%2033.4037,2.15596%2017.1864,0%2032.3767,0.4332%2033.7563,0.96262%203.9885,1.53053%20-2.6874,13.57275%20-7.5263,13.57635%20-1.9807,0%20-25.7691,0.70935%20-52.8631,1.57297%20-154.16965,4.91445%20-295.75547,6.8937%20-430.86762,6.02318%20l%20-139.33455,-0.89768%20-3.17238,6.2184%20-3.17238,6.21833%204.41228,0.88177%20c%202.42676,0.48495%2024.03627,1.62045%2048.02112,2.5233%2023.98486,0.90285%2064.66863,2.44013%2090.40836,3.4161%2025.73975,0.97598%2048.08928,2.46473%2049.66562,3.3084%201.57635,0.8436%202.86609,2.5656%202.86609,3.82658%200,2.59117%205.77464,3.86737%2020.18927,4.46205%205.32997,0.21982%20-15.93237,0.90667%20-47.24963,1.52617%20-61.92579,1.22513%20-63.28967,1.43318%20-69.01272,10.52956%20l%20-3.25815,5.1786%20-24.43203,0.0622%20-24.43201,0.0623%20-3.54154,8.23252%20c%20-1.94786,4.5279%20-3.30928,8.4519%20-3.0254,8.72003%200.89474,0.8451%20107.68868,3.9615%20174.19937,5.08342%20l%2063.85358,1.07708%20-3.63903,7.4214%20c%20-2.00147,4.08172%20-3.66176,8.307%20-3.68954,9.38947%20-0.0392,1.52858%20-31.63216,2.0697%20-141.4348,2.42272%20-158.32425,0.50903%20-144.4269,-0.73875%20-144.4711,12.97193%20-0.0136,4.2196%20-0.50513,7.672%20-1.0923,7.672%20-2.01997,0%20-25.50191,-18.394%20-39.46907,-30.91698%20-7.69395,-6.8985%20-14.32845,-12.20325%20-14.74332,-11.78842%20-2.50198,2.502%206.71909,37.9009%2015.80452,60.6721%203.0566,7.661%205.55746,14.384%205.55746,14.9401%200,2.7255%20-4.31622,0.01%20-17.3079,-10.9003%20z'%20id='path25'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.9003,1033.0855%20c%20-23.73218,-19.9249%20-48.77297,-47.04303%20-62.1911,-67.35033%20-12.151,-18.38962%20-20.23469,-33.34927%20-37.90083,-70.13895%20l%20-9.30695,-19.38172%20-0.56324,8.0757%20c%20-0.30978,4.44165%200.64179,24.67042%202.11459,44.95282%201.4728,20.2824%202.3192,37.2357%201.8809,37.674%20-2.19311,2.19308%20-28.11571,-51.57322%20-39.05852,-81.01162%20-6.77153,-18.2169%20-14.69251,-48.0417%20-21.01879,-79.14203%20-4.14753,-20.38942%20-10.45365,-57.65166%20-11.00196,-65.00943%20-0.14894,-1.99874%20-0.75381,-3.63407%20-1.34414,-3.63407%20-0.59033,0%20-11.85595,14.23588%20-25.0347,31.6352%20-33.11344,43.71833%20-29.5355,39.73035%20-29.57845,32.96835%20-0.0682,-10.7355%206.26007,-60.6731%2012.0756,-95.29125%206.1887,-36.83958%2016.35717,-93.13257%2018.01901,-99.75384%200.9187,-3.66039%200.72496,-3.8187%20-2.53686,-2.07302%20-1.94234,1.0395%20-11.55156,7.718%20-21.35384,14.84112%20-9.80227,7.1231%20-18.20229,12.57113%20-18.6667,12.10671%20-0.46441,-0.46441%201.76854,-10.51702%204.96212,-22.33914%208.51078,-31.5056%2015.79657,-62.59951%2026.79757,-114.36542%205.38031,-25.31735%2010.18517,-47.30347%2010.67748,-48.85805%200.4923,-1.55457%200.23601,-2.82649%20-0.56953,-2.82649%20-0.80554,0%20-11.11628,6.21268%20-22.91276,13.80597%20-11.79647,7.59328%20-21.66396,13.5895%20-21.92775,13.32492%20-0.26378,-0.26458%206.18221,-14.56203%2014.32443,-31.77212%20l%2014.80402,-31.29107%206.80732,-0.59976%20c%203.74403,-0.32987%2019.00712,-3.18729%2033.91798,-6.34983%2014.91087,-3.16254%2029.3667,-6.15137%2032.12408,-6.64186%204.79552,-0.85302%205.28089,-0.41041%2011.16705,10.18349%2016.08057,28.94173%2038.22468,49.12839%2065.00112,59.25527%208.34624,3.15655%2012.31359,3.49934%2039.95406,3.45212%2028.28187,-0.0483%2031.92651,-0.39465%2046.48943,-4.41772%2018.51982,-5.11619%2040.6295,-14.88066%2039.14245,-17.28678%20-0.56516,-0.91445%200.008,-1.66263%201.27347,-1.66263%201.26556,0%207.3707,-2.53625%2013.56695,-5.63612%2020.67558,-10.34356%2037.53588,-31.05708%2046.54758,-57.18544%207.39711,-21.44702%209.58213,-26.44028%2012.32324,-28.16142%203.27666,-2.0574%2041.51381,7.05367%2073.34357,17.47617%2048.22454,15.79087%2070.15243,31.91659%2070.15243,51.58993%200,5.89557%20-4.96391,20.86782%20-8.53995,25.75834%20-1.91192,2.61472%20-2.90368,2.17995%20-12.46855,-5.46592%20-5.71528,-4.56863%20-15.08913,-10.93371%20-20.83078,-14.14462%20-9.14498,-5.11417%20-12.12922,-5.92673%20-24.06821,-6.55336%20-19.54589,-1.0259%20-29.54249,1.59756%20-38.3899,10.07486%20-7.6878,7.36621%20-9.19865,13.19588%20-4.60932,17.7852%202.99983,2.99985%205.95732,3.12208%2019.30399,0.79786%2016.45121,-2.86486%2036.59633,2.45055%2055.4357,14.62702%2013.10187,8.46814%2018.50371,16.80342%2019.33331,29.83206%200.77146,12.11546%20-2.86453,20.54585%20-12.17305,28.22437%20-7.70637,6.35692%20-14.29376,8.18153%20-29.52321,8.17752%20-23.67737,-0.006%20-44.57697,-5.17176%20-66.45936,-16.42602%20-13.69463,-7.04325%20-16.43699,-9.53471%20-22.35444,-20.30919%20-5.62226,-10.23698%20-8.10064,-11.44852%20-14.33642,-7.00826%20-11.1426,7.93424%20-18.72865,31.6014%20-12.69398,39.60306%202.272,3.01256%202.42842,2.97593%205.17203,-1.21135%201.55604,-2.37485%203.59311,-4.31788%204.52679,-4.31788%200.93367,0%206.84629,3.20675%2013.13916,7.12612%2018.20577,11.33906%2036.57742,19.90391%2051.1951,23.8671%2011.49242,3.11585%2017.5865,3.67718%2040.19598,3.7025%2022.97063,0.0257%2028.82448,-0.51591%2042.40161,-3.92313%2019.22796,-4.82534%2021.13254,-3.94902%2015.71958,7.23265%20-6.54957,13.5296%20-26.42274,25.36248%20-51.66063,30.75977%20-20.53254,4.391%20-38.87322,2.18308%20-92.87066,-11.18016%20-19.54321,-4.83653%20-41.19388,-9.26575%20-48.11259,-9.84269%20-13.73659,-1.14549%20-107.883,1.91047%20-113.88268,3.69659%20-3.42727,1.02032%20-2.50004,2.32193%2012.11356,17.0044%20l%2015.82493,15.89949%20-8.88328,-0.87205%20c%20-10.55529,-1.03619%20-34.12477,-7.73631%20-44.69828,-12.70644%20-4.14516,-1.94846%20-15.22607,-9.53974%20-24.62424,-16.86951%20-9.39816,-7.32976%20-17.29754,-12.73953%20-17.55416,-12.0217%20-0.25663,0.71783%201.79735,8.37269%204.56438,17.01081%202.76704,8.63812%204.6255,16.11115%204.12991,16.60673%20-1.63052,1.63053%20-14.31045,-8.23033%20-28.53482,-22.19079%20-18.45951,-18.11703%20-32.48856,-37.36001%20-42.39056,-58.14512%20-7.80744,-16.38845%20-8.12746,-16.79598%20-9.51251,-12.11356%20-4.02669,13.61292%206.57116,87.80897%2012.27531,85.94013%200.98437,-0.3225%202.0235,-2.97264%202.30916,-5.88921%200.47606,-4.86034%201.58474,-3.39981%2013.28697,17.50387%2024.11919,43.08405%2037.62443,60.59807%2077.38814,100.35946%2032.35132,32.34942%2057.07091,53.14652%2084.7394,71.29292%2021.99509,14.42557%2022.45862,14.00317%20-11.18942,10.197%20-11.54827,-1.30628%20-23.10823,-2.38231%20-25.68882,-2.39116%20-4.5829,-0.0158%20-4.62431,0.0585%20-1.78154,3.1998%208.10837,8.95965%2079.55082,46.77915%20100.95931,53.44493%2021.49952,6.69405%2075.91168,13.7193%2075.91168,9.80107%200,-0.98482%20-3.08896,-3.36375%20-6.86435,-5.28637%20-3.7754,-1.9227%20-15.938,-9.3873%20-27.028,-16.58805%20l%20-20.16366,-13.0923%2031.74332,-0.80753%20c%2017.45883,-0.44415%2032.12894,-1.1952%2032.60025,-1.66897%200.47132,-0.47378%20-2.41768,-5.56148%20-6.42001,-11.30603%20-10.85736,-15.5835%20-39.40068,-66.35565%20-39.40068,-70.0849%200,-0.42256%205.47854,1.83346%2012.17451,5.01337%206.69597,3.1799%2012.67316,5.28296%2013.28265,4.67347%200.60951,-0.60949%20-0.94502,-6.69943%20-3.45447,-13.53318%20-9.61977,-26.19656%20-20.4705,-69.32444%20-20.3387,-80.83929%200.0286,-2.50046%204.59241,6.76635%2011.02325,22.38274%2019.88191,48.28039%2034.75027,73.07857%2058.34658,97.31322%2015.8845,16.31422%2016.29817,15.91987%20-11.67735,11.13022%20-9.54953,-1.63492%20-17.36277,-2.40165%20-17.36277,-1.70377%200,2.11672%2016.34265,20.11162%2026.64984,29.34412%2012.89487,11.55045%2022.33194,17.8401%2043.60883,29.06438%20l%2017.76656,9.37245%20-10.49842,-0.2676%20c%20-21.47428,-0.54743%20-26.12199,-0.0345%20-25.55691,2.82195%201.44676,7.3131%2049.80084,30.14617%2074.81874,35.32987%2014.91483,3.0903%2097.71609,5.62673%2097.71609,2.99325%200,-0.8352%20-8.17665,-4.33087%20-18.17032,-7.76812%20-20.41352,-7.02105%20-50.05155,-18.48203%20-51.28079,-19.83015%20-1.56582,-1.7172%20231.46431,1.75597%20254.94119,3.7998%20l%2010.24725,0.89205%20-0.99818,5.32072%20c%20-0.77887,4.15148%20-0.38377,5.55645%201.79775,6.3936%201.53773,0.5901%2013.72898,1.51058%2027.09165,2.04563%2014.84428,0.5943%2024.74298,1.6635%2025.44548,2.74852%200.7542,1.1649%2011.8681,1.9206%2032.3029,2.19645%2017.1342,0.2313%2032.7952,0.792%2034.8023,1.24598%20l%203.6493,0.8253%20-3.171,6.21562%20-3.171,6.21555%20-23.8978,0.99578%20c%20-13.1438,0.54772%20-39.161,1.39755%20-57.8159,1.8885%20-18.65485,0.49102%20-62.62713,1.7235%20-97.71603,2.73885%20-35.08897,1.01535%20-150.19492,1.92472%20-255.79107,2.0208%20l%20-191.99294,0.17475%20-3.03639,5.91855%20-3.0364,5.91855%205.25015,0.88035%20c%204.21623,0.70695%20168.59236,7.34212%20181.89016,7.34212%201.98143,0%205.45201,1.99875%207.71243,4.44165%203.64502,3.9393%205.60007,4.5477%2017.28566,5.37968%208.81942,0.62797%201.42731,1.0653%20-22.35733,1.32285%20-19.54322,0.21157%20-46.24707,0.9285%20-59.3419,1.59315%20-21.86374,1.10977%20-24.13757,1.5174%20-27.83344,4.98945%20-2.21356,2.07952%20-4.44953,5.11965%20-4.96883,6.75577%20-0.86297,2.71898%20-3.07029,2.97488%20-25.66412,2.97488%20h%20-24.71996%20l%20-3.3338,7.6719%20c%20-1.83361,4.21957%20-2.83478,8.16075%20-2.22484,8.7582%200.60994,0.59745%2029.0913,1.86487%2063.29193,2.81655%2034.20063,0.9516%2074.53881,2.09227%2089.64039,2.53477%2015.10157,0.4425%2040.29273,0.81038%2055.98035,0.8175%20l%2028.52295,0.0127%20-3.89204,8.06775%20c%20-2.14061,4.4373%20-3.89202,8.75145%20-3.89202,9.58695%200,0.9333%20-54.10138,1.71503%20-140.27016,2.02688%20-115.96037,0.4197%20-140.73285,0.89182%20-142.94006,2.72437%20-1.81521,1.50713%20-2.66991,4.73858%20-2.66991,10.09468%200,4.3329%20-0.4804,7.878%20-1.06757,7.878%20-2.01997,0%20-25.50191,-18.39403%20-39.46907,-30.917%20-7.69395,-6.8985%20-14.3473,-12.18443%20-14.7852,-11.7465%20-2.52978,2.52975%209.30945,46.3824%2017.56819,65.0727%206.7598,15.2979%205.17193,15.2505%20-13.47223,-0.4026%20z'%20id='path26'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20388.90674,1033.135%20c%20-7.8066,-6.524%20-22.25104,-20.2057%20-32.09877,-30.4037%20-26.52842,-27.47188%20-41.45268,-51.15927%20-69.53606,-110.3654%20-6.81568,-14.36895%20-7.73277,-15.61665%20-8.31024,-11.30595%20-0.56367,4.2078%200.9974,34.55212%203.86374,75.1041%200.81032,11.46405%200.71198,11.94037%20-1.83403,8.8833%20-4.15246,-4.98608%20-27.0801,-52.90725%20-34.38926,-71.87723%20-11.71701,-30.41002%20-22.61203,-74.36265%20-30.22656,-121.93987%20-6.19684,-38.71917%20-2.31858,-38.9243%20-33.10372,1.75103%20-23.58993,31.1685%20-26.66329,34.63642%20-27.13477,30.618%20-1.4012,-11.94233%2012.42671,-106.09146%2025.50009,-173.62054%202.65399,-13.70885%204.57641,-25.17422%204.27206,-25.47856%20-0.30435,-0.30436%20-9.79544,6.07332%20-21.09133,14.1726%20-11.29588,8.09929%20-20.91138,14.35256%20-21.36778,13.89617%20-0.45639,-0.45642%202.50821,-13.41656%206.58801,-28.80033%208.8226,-33.26751%2015.57383,-62.55191%2026.74168,-115.99575%204.5479,-21.76404%208.6147,-40.56042%209.03732,-41.76973%201.16304,-3.32799%20-2.07401,-1.65126%20-24.44534,12.66217%20-11.13746,7.12588%20-20.53056,12.95614%20-20.87355,12.95614%20-0.99523,0%203.21213,-9.45646%2016.94845,-38.0933%207.35481,-15.33296%2013.54247,-26.33734%2014.48256,-25.75634%200.90275,0.55793%2016.37219,-2.03025%2034.37656,-5.7515%2018.00436,-3.72126%2034.57956,-7.0867%2036.83377,-7.47876%203.68765,-0.64137%204.97831,0.77341%2012.87357,14.11157%2019.09755,32.26317%2046.23377,53.21617%2075.52672,58.31732%2015.81538,2.75413%2052.79915,1.00323%2070.63049,-3.34382%2015.84174,-3.862%2042.48172,-14.68738%2041.18612,-16.73631%20-0.44417,-0.70243%203.4334,-3.00081%208.61682,-5.1075%2012.55357,-5.10215%2020.32174,-10.67873%2031.41565,-22.55252%2011.10349,-11.88404%2017.99929,-24.39789%2024.62807,-44.69264%205.66786,-17.3528%208.51669,-22.4367%2012.57267,-22.4367%205.26651,0%2053.17207,12.63006%2072.81097,19.19625%2046.6359,15.59252%2067.99998,31.59987%2067.99998,50.94996%200,5.87573%20-4.9602,20.86274%20-8.51291,25.72137%20-1.87507,2.56429%20-3.01274,2.0578%20-13.32381,-5.93168%20-6.20053,-4.80446%20-15.63457,-11.1973%20-20.96454,-14.20631%20-9.45692,-5.33885%20-10.13921,-5.47092%20-28.26499,-5.47092%20-17.35306,0%20-19.07072,0.29192%20-26.12792,4.4405%20-13.36546,7.85688%20-17.72678,16.94767%20-11.03572,23.003%202.96363,2.68204%204.32476,2.75037%2017.4141,0.87421%2012.33785,-1.76844%2015.56867,-1.69141%2024.64629,0.58763%2012.57708,3.15763%2030.86129,11.91382%2038.97085,18.66289%2016.86241,14.0335%2016.9539,39.42828%200.19189,53.25512%20-7.70637,6.35692%20-14.29376,8.18153%20-29.5232,8.17753%20-23.65665,-0.006%20-44.57757,-5.17232%20-66.40464,-16.39757%20-13.73121,-7.06168%20-17.24539,-10.24759%20-22.70439,-20.5835%20-5.25744,-9.95426%20-7.82324,-11.18998%20-14.0412,-6.76241%20-9.87478,7.03147%20-16.92684,25.2012%20-14.12063,36.38202%201.24325,4.95351%205.03236,5.42304%207.4412,0.9221%200.95084,-1.77666%202.51081,-3.23029%203.4666,-3.23029%200.95577,0%207.82283,3.67555%2015.26013,8.16789%2018.62973,11.25289%2037.95432,19.94175%2052.33951,23.53328%2019.05577,4.75764%2058.68842,4.29182%2079.54989,-0.93498%2019.53945,-4.89557%2021.77319,-3.8436%2015.78938,7.43599%20-7.16056,13.49777%20-27.1821,25.48628%20-50.66392,30.33658%20-22.29678,4.60553%20-38.70991,2.66794%20-94.74475,-11.18469%20l%20-36.34069,-8.98396%20-27.45741,-0.13076%20c%20-37.39344,-0.17808%20-95.3135,1.95784%20-97.96965,3.61286%20-1.60151,0.99787%201.83782,5.37944%2013.1428,16.74338%20l%2015.31194,15.3918%20h%20-5.38796%20c%20-6.53725,0%20-21.01807,-3.52407%20-37.44865,-9.11354%20-11.67772,-3.97261%20-22.59773,-10.70576%20-42.56024,-26.24218%20-5.01093,-3.89991%20-9.44737,-6.75414%20-9.85877,-6.34273%20-0.4114,0.4114%201.47327,7.85418%204.18815,16.53951%202.71488,8.68533%204.53754,16.19011%204.05034,16.67729%20-1.73681,1.73683%20-14.89753,-8.71508%20-30.01029,-23.83339%20-18.42648,-18.43326%20-32.75867,-38.28676%20-41.25072,-57.14211%20-3.4461,-7.65157%20-6.76066,-13.91194%20-7.36569,-13.91194%20-5.7758,0%200.21852,66.18446%207.59279,83.83357%202.5509,6.10514%204.90416,5.351%205.76344,-1.84699%200.44296,-3.71066%202.27818,-1.21173%2011.38798,15.50646%205.97295,10.9615%2015.10916,26.39814%2020.30268,34.30364%2030.03839,45.72409%2093.8346,107.78153%20145.12152,141.16625%2019.83202,12.90945%2020.59075,12.47587%20-15.15369,8.65957%20-13.61242,-1.45327%20-25.2727,-2.115%20-25.91175,-1.4703%20-2.81076,2.83538%2023.53185,19.05855%2062.63621,38.57475%2014.65741,7.3152%2031.73754,14.93483%2037.95583,16.93245%2021.30064,6.84285%2076.71925,14.31023%2076.71925,10.33755%200,-0.92137%20-4.67758,-4.24635%20-10.39462,-7.38885%20-5.71704,-3.1425%20-17.89117,-10.659%20-27.05363,-16.70347%20l%20-16.65901,-10.98983%2032.30284,-0.9279%20c%2017.76656,-0.51037%2032.50669,-1.05547%2032.75584,-1.21132%200.24916,-0.15593%20-3.08889,-5.55285%20-7.41791,-11.99325%20-12.10443,-18.0081%20-39.06663,-66.11874%20-39.06663,-69.70947%200,-0.40854%205.5189,1.8071%2012.26422,4.92363%206.74534,3.11652%2012.69848,5.23218%2013.22921,4.70145%200.53073,-0.53073%20-0.71994,-5.49006%20-2.77926,-11.02073%20-9.47474,-25.44606%20-21.20331,-71.73674%20-21.02718,-82.99085%200.0479,-3.05516%203.02501,2.70487%208.89671,17.21269%2019.88198,49.12443%2037.03146,78.10646%2060.45011,102.15865%2015.6678,16.09163%2015.79408,15.9078%20-8.04328,11.70885%20-18.30781,-3.22492%20-21.58527,-3.18735%20-19.67543,0.22538%202.91803,5.21422%2030.35863,31.76392%2039.8647,38.57047%205.32998,3.81638%2018.04922,11.35448%2028.26499,16.75125%20l%2018.57413,9.81248%20-18.17034,0.027%20c%20-20.54908,0.0308%20-22.60803,1.5063%20-11.94513,8.56267%2019.21989,12.7191%2053.72859,26.9868%2072.91674,30.14753%2016.36296,2.69542%2094.93546,4.20202%2092.66604,1.7769%20-1.00088,-1.06958%20-10.8129,-5.08695%20-21.80445,-8.92755%20-20.58161,-7.19145%20-45.28114,-16.7358%20-46.53901,-17.9835%20-1.80846,-1.79385%20233.9217,1.41262%20254.60281,3.4632%20l%2010.00417,0.99187%200.49425,5.9379%200.49418,5.9379%2010.49842,1.02263%20c%205.7741,0.56242%2017.52428,1.10752%2026.11145,1.21132%2010.9152,0.132%2015.815,0.79628%2016.2843,2.2077%200.4994,1.5024%208.696,2.13045%2032.0336,2.4546%2017.2493,0.23955%2033.0046,0.80025%2035.0117,1.2459%20l%203.6493,0.8103%20-3.1903,6.25335%20-3.1902,6.25335%20-24.6862,1.02623%20c%20-112.03955,4.65727%20-323.62096,7.86487%20-465.35126,7.05472%20-112.32978,-0.64207%20-135.7751,-0.40222%20-137.58505,1.40775%20-2.70468,2.70465%20-4.6481,8.52195%20-3.29802,9.87203%201.15391,1.15387%2029.71501,2.79607%2075.2012,4.3239%2017.3224,0.58185%2047.12177,1.73947%2066.22083,2.57265%2019.09905,0.8331%2037.48581,1.52167%2040.85945,1.53007%204.58675,0.0113%207.15975,1.1223%2010.201,4.40385%203.5788,3.8616%205.65408,4.5102%2017.28565,5.40293%209.51868,0.7305%203.72491,1.10527%20-20.69942,1.33882%20-18.65489,0.17843%20-45.39718,0.921%20-59.42732,1.65023%20-23.39411,1.21597%20-25.836,1.63275%20-29.44859,5.02657%20-2.16657,2.03543%20-4.3641,5.0394%20-4.8834,6.67553%20-0.86294,2.7189%20-3.07003,2.97487%20-25.65469,2.97487%20h%20-24.71052%20l%20-3.3429,8.04383%20c%20-1.83858,4.42417%20-2.844,8.34367%20-2.23425,8.71005%200.60972,0.36637%2030.90798,1.4709%2067.32943,2.45437%2036.42145,0.98355%2076.39622,2.14658%2088.83281,2.58458%2012.43659,0.43792%2035.81072,0.80145%2051.9425,0.80775%20l%2029.33052,0.0113%20-3.89204,8.06775%20c%20-2.14061,4.4373%20-3.89202,8.745%20-3.89202,9.57262%200,0.91403%20-54.69327,1.70978%20-139.30599,2.02688%20-109.74758,0.41122%20-140.07708,0.96247%20-142.94006,2.59777%20-3.00198,1.71465%20-3.63408,3.47055%20-3.63408,10.0946%200,4.4104%20-0.5451,8.0119%20-1.21135,8.0034%20-2.07255,-0.026%20-22.27357,-15.74675%20-37.47353,-29.16147%20-7.98729,-7.04918%20-14.90656,-12.81668%20-15.37614,-12.81668%20-3.57895,0%203.95039,32.10655%2013.02636,55.54705%207.52138,19.4255%207.78659,20.3645%205.75123,20.3645%20-0.95822,0%20-8.12942,-5.3378%20-15.93601,-11.8618%20z'%20id='path27'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20394.64346,1038.305%20c%20-4.7435,-3.6806%20-19.18924,-17.3083%20-32.10166,-30.2839%20-31.75892,-31.9144%20-46.73839,-54.48453%20-71.1309,-107.1757%20-5.65451,-12.2145%20-10.84748,-22.20818%20-11.53993,-22.20818%20-1.79586,0%20-1.50125,12.36465%201.17375,49.2618%201.28805,17.7666%202.33472,34.1199%202.32594,36.34073%20-0.0157,3.9633%20-0.0626,3.97822%20-2.54276,0.8076%20-3.89211,-4.9758%20-26.99195,-53.05965%20-33.75276,-70.25873%20-11.29309,-28.72875%20-23.15712,-76.1793%20-29.88365,-119.52045%20-4.19241,-27.01302%20-6.04745,-34.30107%20-8.53001,-33.51261%20-1.05782,0.33594%20-13.18893,15.40169%20-26.95801,33.47939%20-22.53804,29.59065%20-25.08882,32.4066%20-25.57742,28.23645%20-1.37104,-11.70195%2012.4518,-105.46727%2026.1823,-177.60389%202.02902,-10.65994%203.06964,-19.62955%202.3125,-19.93248%20-0.75714,-0.30293%20-10.12385,5.77222%20-20.81491,13.50032%20-10.69106,7.72811%20-19.83995,13.64945%20-20.33087,13.15855%20-0.49092,-0.49093%202.0778,-12.01718%205.70827,-25.6139%208.76787,-32.83726%2014.43756,-57.10197%2024.45737,-104.67085%204.58434,-21.76404%209.31322,-43.8084%2010.50862,-48.98747%202.65356,-11.49649%204.02897,-11.8204%20-22.67234,5.33937%20-11.0918,7.12822%20-20.48989,12.9604%20-20.88465,12.9604%20-1.08908,0%202.78698,-8.76761%2016.605,-37.56033%20l%2012.59186,-26.23778%205.98744,-0.4052%20c%203.29308,-0.22285%2018.51133,-2.99545%2033.81833,-6.16132%2015.30699,-3.16586%2030.03314,-6.14163%2032.72477,-6.61281%204.71369,-0.82516%205.21915,-0.30255%2013.72871,14.19473%2012.97643,22.10725%2030.54794,39.21318%2050.23933,48.90817%2017.68471,8.70702%2026.58487,10.64426%2048.90248,10.64426%2030.01418,0%2049.86573,-3.85409%2076.45643,-14.84366%206.44038,-2.66172%2011.70978,-5.74684%2011.70978,-6.85582%200,-1.10899%202.78135,-2.84965%206.18077,-3.86815%2016.02206,-4.80032%2038.70489,-25.2189%2048.37305,-43.54435%202.67607,-5.07232%207.12404,-16.07504%209.88438,-24.45047%205.83551,-17.70615%208.72575,-22.72777%2013.08121,-22.72777%205.3466,0%2052.57536,12.52681%2073.25738,19.43057%2027.132,9.05678%2045.15088,18.09103%2055.38212,27.76732%2013.35092,12.62675%2015.03271,23.67357%206.45614,42.40725%20-3.92609,8.57574%20-4.50148,9.13657%20-7.28013,7.09617%20-35.65917,-26.18505%20-39.57589,-27.88692%20-61.8195,-26.86131%20-13.17449,0.60745%20-16.70685,1.38088%20-22.91022,5.0163%20-12.62298,7.39756%20-17.2236,17.02438%20-10.87959,22.76563%202.8452,2.57486%204.4113,2.65361%2017.4204,0.87583%2012.3547,-1.68836%2015.71076,-1.59258%2024.73494,0.70588%2013.65264,3.47733%2029.56041,10.9755%2038.0583,17.93889%2017.76072,14.55357%2018.27412,39.77118%201.09815,53.93949%20-7.70637,6.35692%20-14.29376,8.18153%20-29.52321,8.17752%20-22.34001,-0.006%20-43.82109,-5.02919%20-63.79811,-14.91904%20-14.20609,-7.03291%20-19.71976,-11.73419%20-25.24606,-21.52622%20-2.7183,-4.81657%20-5.57847,-9.15054%20-6.35592,-9.63103%20-2.59506,-1.60384%20-10.5538,3.80633%20-14.96653,10.1739%20-7.56368,10.9144%20-9.91319,32.69332%20-3.52694,32.69332%201.28431,0%203.11307,-1.45363%204.06391,-3.23028%200.95083,-1.77666%202.5108,-3.23029%203.4666,-3.23029%200.95577,0%207.73457,3.62223%2015.06399,8.0494%2034.9299,21.09867%2052.24549,26.2626%2088.87635,26.50508%2022.06143,0.14604%2028.27243,-0.39982%2042.45252,-3.73098%2020.40771,-4.79416%2022.50707,-3.85796%2016.54605,7.37868%20-7.16056,13.49777%20-27.1821,25.48627%20-50.66392,30.33658%20-22.6708,4.68278%20-37.21016,2.96845%20-94.68125,-11.16384%20l%20-36.27723,-8.92066%20-39.63444,0.12085%20c%20-45.20353,0.13782%20-84.87837,1.7834%20-86.69061,3.59564%20-0.67752,0.67752%205.63548,8.19975%2014.02887,16.71609%20l%2015.2607,15.48424%20-9.79073,-0.94289%20c%20-5.38492,-0.51859%20-17.74075,-3.54292%20-27.45742,-6.72072%20-17.7747,-5.81314%20-26.41375,-10.83384%20-48.31263,-28.07753%20-4.95395,-3.90086%20-9.32259,-6.77705%20-9.70809,-6.39155%20-0.3855,0.38548%201.50437,7.82307%204.19971,16.52793%202.69534,8.70486%204.49603,16.23162%204.00153,16.72613%20-1.74935,1.74934%20-14.86698,-8.65793%20-30.0236,-23.8201%20-18.42648,-18.43326%20-32.75866,-38.28676%20-41.25071,-57.14211%20-3.4461,-7.65157%20-6.74865,-13.91194%20-7.33902,-13.91194%20-5.64699,0%200.29111,66.42203%207.47525,83.61609%202.68685,6.43053%205.55881,5.53881%205.61353,-1.74297%200.0352,-4.69205%200.6348,-4.06839%206.6905,6.95968%2023.32739,42.48166%2037.07501,61.97819%2065.59423,93.02401%2032.05969,34.89999%2069.10716,67.21681%20102.73751,89.61871%2022.10679,14.72588%2022.83439,14.19765%20-14.05448,10.20398%20-13.16,-1.42478%20-24.42561,-2.08755%20-25.0347,-1.47285%20-4.14562,4.18372%2072.40468,46.17225%20100.1664,54.94215%2021.98,6.9435%2077.19935,14.83065%2077.19935,11.02665%200,-0.80423%20-4.906,-4.27478%20-10.90221,-7.71233%20-5.99621,-3.43755%20-18.17035,-11.04225%20-27.05363,-16.89922%20l%20-16.15142,-10.6491%2032.30284,-0.96075%20c%2017.76656,-0.52838%2032.50669,-1.07355%2032.75584,-1.21133%200.24915,-0.13785%20-3.08704,-5.52%20-7.41375,-11.9604%20-13.28218,-19.77075%20-39.0708,-65.70951%20-39.0708,-69.59913%200,-0.46922%205.51891,1.69677%2012.26423,4.81329%206.74533,3.11653%2012.63151,5.29917%2013.08037,4.85029%200.44888,-0.44888%20-2.21172,-9.74389%20-5.91247,-20.65558%20-8.07961,-23.82292%20-15.6985,-54.29993%20-17.01589,-68.0668%20l%20-0.95978,-10.02976%209.04995,21.80442%20c%2020.87798,50.30218%2036.80965,77.1847%2060.24898,101.662%2015.9925,16.70062%2016.26843,16.31647%20-8.6671,12.06607%20-23.18276,-3.95167%20-23.25882,-3.71647%20-4.89233,15.1272%2019.38873,19.89248%2029.11617,27.17273%2053.85477,40.30628%20l%2018.9682,10.07002%20-17.26745,0.0248%20c%20-26.0784,0.0367%20-25.31144,2.77718%205.15389,18.4128%2020.2039,10.36913%2036.94083,16.59293%2052.92135,19.67925%2014.75334,2.84933%2094.05659,5.20148%2094.05659,2.7897%200,-0.90847%20-6.72308,-4.02217%20-14.94008,-6.91935%20-8.21704,-2.89717%20-23.66184,-8.62942%20-34.32177,-12.73837%20l%20-19.38171,-7.47075%2029.88013,-0.51803%20c%2035.1584,-0.6096%20220.94368,2.64165%20229.75393,4.02068%205.58945,0.87495%206.05677,1.36095%206.05677,6.29932%200,2.94323%200.58793,5.71463%201.3065,6.1587%200.71858,0.44408%2012.52928,1.31993%2026.2461,1.94625%2015.20098,0.69405%2025.38918,1.83503%2026.09118,2.92193%200.7511,1.16302%2012.9231,2.064%2035.0001,2.59072%2018.6167,0.44415%2034.1989,1.17098%2034.6272,1.61513%200.4283,0.44415%20-0.4269,3.35145%20-1.9005,6.46057%20l%20-2.6791,5.65298%20-16.1407,1.04745%20c%20-17.8686,1.15957%20-119.67913,3.8643%20-234.99238,6.24292%20-41.3073,0.85208%20-142.83829,1.55903%20-225.62453,1.57103%20l%20-150.52039,0.0217%20-2.5143,3.58965%20c%20-3.96019,5.65395%20-3.03588,7.4481%204.35006,8.44372%203.77539,0.50895%2036.66372,1.9992%2073.08517,3.3117%20111.61634,4.0221%20108.97615,3.82065%20113.45983,8.6586%203.32682,3.58973%205.64895,4.293%2017.06924,5.16945%209.80166,0.75218%205.07729,1.08578%20-18.2767,1.29053%20-33.46061,0.2934%20-64.84046,1.41667%20-78.65488,2.81565%20-8.87728,0.89902%20-15.74845,4.98082%20-17.45945,10.37167%20-0.94933,2.99108%20-2.53924,3.18818%20-25.72239,3.18818%20h%20-24.71052%20l%20-3.35299,8.06812%20-3.35299,8.0682%203.54143,0.7488%20c%204.38094,0.92625%20100.29216,3.71363%20177.36605,5.1546%20l%2057.53441,1.07565%20-4.23472,9.38573%20-4.23471,9.3858%20-110.78209,0.0533%20c%20-128.79092,0.0622%20-168.64271,1.09687%20-172.01252,4.4667%20-1.27467,1.2747%20-2.27795,5.42827%20-2.27795,9.43065%200,3.9341%20-0.54511,7.1458%20-1.21135,7.1373%20-2.07255,-0.026%20-22.27357,-15.7467%20-37.47353,-29.16143%20-7.9873,-7.04917%20-14.90656,-12.81667%20-15.37615,-12.81667%20-3.59614,0%205.27094,36.4268%2014.34465,58.9292%203.18912,7.9089%205.7984,14.9654%205.7984,15.6811%200,2.6144%20-3.1254,1.1576%20-11.56474,-5.3906%20z'%20id='path28'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20503.11672,187.27227%20c%20-1.77666,-0.8144%20-6.78374,-2.96315%20-11.12684,-4.775%20l%20-7.89655,-3.2943%2014.35712,-9.60149%20c%2019.54034,-13.06783%2025.59224,-18.37411%2024.42505,-21.41575%20-0.96653,-2.51874%20-24.72686,-8.89173%20-46.40862,-12.4477%20-5.77413,-0.947%20-12.90745,-2.11783%20-15.85181,-2.60183%20l%20-5.35338,-0.88002%2019.08209,-19.74506%20c%2025.66613,-26.55785%2046.37215,-50.869471%2072.32345,-84.917308%2022.60993,-29.6640009%2030.6859,-38.695279%2032.7481,-36.6218328%200.67551,0.6791993%201.19223,14.7990829%201.14825,31.3775198%20-0.11293,42.575415%20-3.88296,59.355876%20-21.64977,96.363431%20-9.22505,19.21544%20-25.63038,45.4558%20-38.624,61.77918%20-6.90117,8.66968%20-10.2052,9.97415%20-17.17309,6.78016%20z'%20id='path29'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20503.11672,187.27227%20c%20-1.77666,-0.8144%20-6.77642,-2.96003%20-11.11058,-4.76804%20l%20-7.88029,-3.28731%2013.70567,-9.25515%20c%2019.06463,-12.87393%2026.09762,-19.03029%2025.00195,-21.88557%20-0.92122,-2.40067%20-25.25316,-8.87541%20-46.36659,-12.33817%20-5.77413,-0.947%20-12.89745,-2.11595%20-15.8296,-2.59767%20l%20-5.33117,-0.87584%2019.7232,-20.5045%20c%2024.83789,-25.821803%2048.95643,-54.254427%2073.8009,-87.00169%2020.31146,-26.7723387%2028.53003,-35.851556%2030.58512,-33.7879767%202.09801,2.1066846%201.25978,59.0228027%20-1.06068,72.0201827%20-6.12617,34.314014%20-29.50356,81.621134%20-58.06484,117.501574%20-6.90117,8.66968%20-10.2052,9.97415%20-17.17309,6.78016%20z'%20id='path30'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20228.27904,282.11436%20c%20-1.44814,-2.81463%20-11.22728,-19.08539%20-21.73142,-36.15725%20-30.88963,-50.20341%20-35.29103,-60.83016%20-38.63721,-93.2857%20-3.58807,-34.80175%200.36444,-57.80064%2019.21411,-111.803153%2013.59443,-38.9467823%2029.25103,-78.016522%2031.26393,-78.016522%208.56988,0%2025.15062,20.268363%2037.65657,46.0315455%2020.89258,43.0402645%2026.98583,87.5520715%2021.03345,153.6514395%20-1.50938,16.7611%20-2.50862,34.83562%20-2.22054,40.1656%20l%200.52377,9.69084%2013.83153,-18.57413%20c%2020.54491,-27.58942%2036.09656,-45.50827%2057.47258,-66.22081%2018.52345,-17.94851%2029.64227,-26.42877%2029.64227,-22.60799%200,0.99098%200.72681,1.35258%201.61514,0.80357%200.88833,-0.54902%201.61514,-0.2451%201.61514,0.67537%200,3.6675%20-8.67123,24.48838%20-17.01804,40.86275%20-4.85333,9.52104%20-8.82423,17.65647%20-8.82423,18.07874%200,0.42226%205.2694,-1.42751%2011.70978,-4.11062%2016.75389,-6.97979%2030.08651,-9.42211%2051.28075,-9.39381%2023.17104,0.031%2039.5261,2.0662%2042.78403,5.32413%202.81125,2.81127%202.64872,2.92491%20-26.35088,18.42527%20l%20-15.06213,8.05072%2015.06213,3.6831%20c%2020.25559,4.953%2049.32928,15.03395%2062.47051,21.66087%2012.56936,6.33853%2028.30084,17.64079%2040.15513,28.84939%208.17772,7.7323%2021.45856,23.77646%2021.45856,25.92341%200,0.58419%20-3.77122,1.06216%20-8.38052,1.06216%20-6.7759,0%20-11.95579,-1.67929%20-27.05362,-8.77066%20-25.24224,-11.85612%20-43.36088,-18.99042%20-46.63012,-18.36084%20-1.89362,0.36469%200.43987,3.10488%207.78066,9.1367%205.76702,4.73869%2012.81059,11.08947%2015.65237,14.11285%20l%205.16685,5.49709%20H%20393.19179%20282.62396%20l%20-25.85596,10.36673%20-25.85596,10.36671%20z%20m%2015.48382,-43.86107%20c%207.19769,-23.30343%209.00686,-43.4218%209.00686,-100.15866%200,-46.384187%20-0.39193,-54.976157%20-3.02068,-66.220813%20-5.74607,-24.579125%20-18.6037,-56.589984%20-22.24295,-55.376901%20-3.98574,1.328581%20-23.71626,56.299694%20-31.56252,87.936154%20-3.57235,14.40391%20-4.31775,20.9484%20-4.20183,36.89185%200.16898,23.24349%203.55217,37.73915%2013.91266,59.61037%2011.15909,23.55707%2027.70312,47.79657%2032.62227,47.79657%201.35907,0%203.53097,-4.14831%205.48619,-10.47857%20z'%20id='path31'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.95185,278.2245%20c%20-2.89803,-5.11685%20-12.69915,-21.35978%20-21.78024,-36.09542%20-28.13589,-45.6553%20-32.97681,-57.60144%20-36.26473,-89.49196%20-4.12031,-39.96407%201.38247,-65.625413%2030.82635,-143.7538395%2016.19008,-42.9598705%2017.61266,-46.0315455%2021.31863,-46.0315455%204.76041,0%2020.42614,17.207768%2028.44076,31.2402954%2014.11699,24.7169966%2022.73403,49.8284516%2028.56481,83.2425616%203.08144,17.658593%203.01958,53.735568%20-0.14983,87.388018%20-1.38158,14.66945%20-2.2901,31.396%20-2.01893,37.17014%20l%200.49303,10.49841%2013.8308,-18.57413%20c%2020.34702,-27.32512%2035.96513,-45.36145%2057.48694,-66.38791%2018.11296,-17.69605%2029.62864,-26.39871%2029.62864,-22.39105%200,0.96357%200.72681,1.30274%201.61514,0.75373%200.88833,-0.54902%201.61514,-0.13692%201.61514,0.91578%200,3.62703%20-11.77655,31.41629%20-18.94807,44.71197%20-3.95301,7.32871%20-6.37262,13.32493%20-5.37694,13.32493%200.9957,0%206.28514,-1.88341%2011.7543,-4.18535%2014.86544,-6.25677%2028.9799,-8.68019%2050.52654,-8.67527%2023.0616,0.005%2038.63215,2.00021%2042.015,5.38305%202.77698,2.77699%201.9899,3.32688%20-26.37859,18.42977%20l%20-15.0513,8.01304%2015.0513,3.68039%20c%2020.24572,4.95057%2049.32097,15.03255%2062.45968,21.65821%2012.56936,6.33853%2028.30084,17.64079%2040.15513,28.84939%208.17772,7.7323%2021.45856,23.77646%2021.45856,25.92341%200,0.58419%20-3.77122,1.06216%20-8.38052,1.06216%20-6.7759,0%20-11.95579,-1.67929%20-27.05362,-8.77066%20-25.04872,-11.76522%20-43.35484,-18.99159%20-46.55101,-18.37607%20-1.76197,0.33933%201.59447,4.09943%2010.20337,11.43043%2023.09925,19.67041%2035.48347,17.33144%20-91.76552,17.33144%20H%20282.86385%20l%20-24.73792,9.85413%20c%20-13.60585,5.41975%20-25.22549,10.15138%20-25.82141,10.51472%20-0.59593,0.36333%20-3.45462,-3.52592%20-6.35267,-8.64277%20z%20m%2014.3691,-31.51157%20c%202.18088,-2.62791%207.698,-24.57044%2010.05109,-39.97476%201.01772,-6.66246%202.22089,-33.55458%202.67371,-59.76025%200.91233,-52.79793%20-0.49195,-68.42364%20-8.41887,-93.678236%20-5.10453,-16.262673%20-14.43467,-37.148264%20-16.5951,-37.148264%20-3.78003,0%20-24.03027,55.922973%20-32.16721,88.83281%20-5.44881,22.03769%20-5.68252,49.08675%20-0.59105,68.40801%205.55177,21.0681%2020.94346,50.91666%2035.30992,68.47527%206.05096,7.39544%207.16234,7.94848%209.73751,4.84542%20z'%20id='path32'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.91966,278.2245%20c%20-2.91576,-5.11685%20-12.68703,-21.29579%20-21.71396,-35.95321%20-27.81868,-45.17041%20-32.84227,-57.43972%20-36.28026,-88.60866%20-4.31068,-39.08084%200.57744,-62.955935%2028.31901,-138.318781%2015.76612,-42.830301%2020.13128,-52.492114%2023.7157,-52.492114%201.69579,0%206.64633,3.563068%2011.00119,7.917929%2020.81909,20.8190882%2038.37067,61.168896%2046.00293,105.757358%203.17123,18.52665%203.14815,53.352918%20-0.0588,88.787408%20-1.38276,15.27838%20-2.29128,32.07057%20-2.01893,37.31596%20l%200.49518,9.53709%2013.97873,-18.62793%20c%2020.87748,-27.82113%2036.03158,-45.29341%2057.33901,-66.11043%2018.11297,-17.69605%2029.62864,-26.39871%2029.62864,-22.39105%200,0.96357%200.72681,1.30274%201.61514,0.75373%200.88833,-0.54902%201.61514,-0.2451%201.61514,0.67537%200,3.5727%20-8.55377,24.31355%20-16.51909,40.05479%20-4.59292,9.07666%20-7.96509,16.8887%20-7.49371,17.3601%200.47139,0.47138%205.50311,-1.0308%2011.18161,-3.33818%2015.53151,-6.31102%2029.33609,-8.66493%2050.78702,-8.66002%2023.0616,0.005%2038.63215,2.00021%2042.015,5.38305%202.7988,2.79879%201.22108,3.90331%20-26.37726,18.46611%20l%20-15.04995,7.94141%2014.24239,3.52446%20c%2048.11451,11.90659%2076.14711,25.49562%20102.03285,49.46125%208.92089,8.25918%2022.84676,24.81471%2022.84676,27.16098%200,0.58419%20-3.72581,1.06216%20-8.27957,1.06216%20-6.78677,0%20-12.68376,-1.99932%20-32.70663,-11.08888%20-29.65475,-13.46207%20-39.47294,-17.20799%20-41.01825,-15.64965%20-0.64645,0.65189%202.45871,4.20919%206.90035,7.9051%204.44164,3.69593%2011.34637,9.79198%2015.34384,13.54678%20l%207.26814,6.82691%20-110.91295,0.0374%20-110.91297,0.0374%20-24.75896,9.8784%20c%20-13.61743,5.43311%20-25.24654,10.16474%20-25.84246,10.51472%20-0.59593,0.34997%20-3.46911,-3.55019%20-6.38486,-8.66704%20z%20m%2015.83841,-34.45733%20c%203.20315,-6.57343%208.51482,-35.71998%2010.1865,-55.89606%202.13052,-25.71405%202.04064,-83.52177%20-0.15776,-101.461015%20-0.97975,-7.994955%20-3.48805,-20.427851%20-5.57398,-27.628662%20-4.64536,-16.036115%20-15.38883,-41.362255%20-17.89247,-42.178871%20-3.51689,-1.147102%20-22.00549,48.803883%20-31.5175,85.151378%20-11.30787,43.20988%20-4.33173,82.06315%2022.08718,123.01339%2010.49573,16.26878%2016.96286,24.2168%2019.13132,23.51217%201.00497,-0.32656%202.68649,-2.35711%203.73671,-4.51233%20z'%20id='path33'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20213.9434,258.721%20c%20-41.11641,-67.34973%20-44.85892,-76.77368%20-46.9419,-118.20365%20-1.64492,-32.71712%204.70636,-59.582765%2030.35582,-128.403785%2014.76011,-39.603368%2019.05321,-49.26183%2021.89646,-49.26183%2012.89751,0%2039.99838,43.8880295%2050.36621,81.564669%2010.44501,37.957078%2012.11915,65.889846%207.28275,121.511276%20-1.38426,15.9197%20-2.29278,32.83697%20-2.01894,37.59395%20l%200.4979,8.64906%2014.40394,-19.27146%20c%2019.74057,-26.41152%2036.02655,-45.10811%2057.742,-66.28887%2018.98709,-18.51957%2026.60988,-23.97819%2030.29999,-21.69756%203.01588,1.8639%20-1.11522,13.86272%20-13.23729,38.44788%20-5.37011,10.89127%20-9.4092,20.15694%20-8.97576,20.59038%200.43342,0.43344%205.43409,-1.0998%2011.11259,-3.40718%2015.53151,-6.31102%2029.33609,-8.66493%2050.78702,-8.66002%2022.90253,0.005%2038.62837,1.99641%2041.94266,5.3107%202.90905,2.90905%202.6267,3.11654%20-22.44054,16.49026%20-20.25918,10.80856%20-21.08847,9.29673%209.57358,17.45321%2035.07759,9.33107%2058.42868,20.66613%2080.24658,38.95322%2011.46606,9.61048%2030.38751,30.54031%2030.38751,33.61291%200,0.90718%20-4.20717,1.25873%20-10.09464,0.84353%20-7.85826,-0.55419%20-13.85175,-2.50383%20-27.05363,-8.80033%20-24.10549,-11.49689%20-43.34219,-19.12652%20-44.72853,-17.74017%20-0.65373,0.65371%202.41974,4.2346%206.82991,7.9575%204.41017,3.7229%2011.28915,9.84915%2015.28663,13.61388%20l%207.26814,6.84497%20-110.70734,0.0374%20-110.70733,0.0374%20-18.50403,7.44437%20c%20-10.1772,4.09442%20-21.86284,8.77122%20-25.96807,10.39292%20l%20-7.46406,2.94856%20z%20m%2027.40139,-14.60459%20c%201.31271,-2.5385%203.86923,-11.89015%205.68116,-20.78145%207.72113,-37.88822%208.76702,-123.708148%201.8725,-153.647239%20-4.93556,-21.432402%20-17.55455,-53.536302%20-21.04337,-53.536302%20-3.67405,0%20-27.92793,69.078191%20-33.19355,94.539571%20-5.91022,28.57824%20-2.61229,58.65362%209.50505,86.68086%208.38508,19.39456%2029.44608,51.36001%2033.83943,51.36001%200.52362,0%202.02607,-2.07695%203.33878,-4.61545%20z'%20id='path34'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20218.40499,266.03407%20c%20-7.01141,-11.73703%20-16.99395,-28.24479%20-22.18343,-36.68391%20-13.50569,-21.96294%20-22.7646,-42.4852%20-25.74296,-57.05896%20-4.08742,-20.00063%20-4.90289,-49.26185%20-1.88342,-67.58275%203.63007,-22.02584%2025.06482,-86.641794%2042.90516,-129.339365%205.96937,-14.286602%207.60738,-15.028009%2016.67984,-7.549726%2020.24257,16.685633%2041.57802,64.241259%2048.85707,108.899881%203.06914,18.82986%203.01885,51.9801%20-0.13619,89.78968%20-1.38518,16.59971%20-2.2937,33.66516%20-2.01893,37.92324%20l%200.49957,7.74196%2014.40394,-19.27318%20c%2019.73725,-26.40941%2036.0237,-45.10704%2057.742,-66.29058%2018.98709,-18.51957%2026.60988,-23.97819%2030.29999,-21.69756%202.94712,1.82142%20-0.97853,13.38079%20-13.00807,38.30319%20-5.21858,10.8117%20-9.48833,20.01486%20-9.48833,20.45148%200,0.4366%207.44984,-1.81117%2016.5552,-4.99509%2015.2567,-5.33489%2018.32878,-5.84352%2039.16719,-6.48484%2024.71817,-0.7607%2045.19989,1.34221%2048.87591,5.01823%202.05404,2.05406%200.96106,3.15715%20-8.72763,8.80842%20-6.09165,3.55317%20-15.2549,8.50653%20-20.36278,11.00747%20-5.10789,2.50095%20-9.28707,5.0662%20-9.28707,5.70059%200,1.34251%204.59383,2.84798%2026.51752,8.69022%2040.06448,10.67642%2070.76821,27.78235%2093.05193,51.84191%208.52148,9.20059%2016.10247,18.97346%2016.10247,20.75816%200,0.68587%20-4.54258,0.92053%20-10.09464,0.52145%20-8.11143,-0.58306%20-14.3707,-2.72431%20-31.86018,-10.89913%20-23.37486,-10.92572%20-38.77204,-16.7776%20-40.25157,-15.29808%20-0.50559,0.5056%202.33921,3.58396%206.32179,6.84081%203.98258,3.25686%2010.87514,9.37071%2015.31678,13.58635%20l%208.07571,7.66481%20-110.70734,0.0348%20-110.70733,0.0348%20-18.50403,7.44436%20c%20-10.1772,4.09442%20-21.91414,8.79145%20-26.08209,10.43787%20l%20-7.57806,2.99349%20z%20m%2025.37895,-29.46418%20c%206.61272,-21.4095%208.74982,-45.13157%208.87153,-98.47526%200.096,-42.057138%20-0.34117,-52.178245%20-2.73173,-63.24782%20-3.68983,-17.085913%20-9.49783,-34.758778%20-15.82198,-48.143869%20-4.0694,-8.612884%20-5.48383,-10.339363%20-7.26176,-8.863813%20-4.8433,4.019587%20-27.44034,69.560457%20-32.36864,93.882632%20-3.7172,18.34517%20-2.46943,50.90481%202.55811,66.75143%205.18096,16.33018%2014.70574,35.55615%2025.92312,52.3263%209.3499,13.97826%2013.78336,18.5494%2016.41389,16.92365%200.66112,-0.4086%202.64897,-5.42756%204.41746,-11.15325%20z'%20id='path35'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20226.63084,279.7824%20c%20-2.43246,-4.19705%20-12.01412,-19.98682%20-21.29258,-35.08839%20-21.2355,-34.5628%20-31.51457,-55.94693%20-34.937,-72.68139%20-4.07527,-19.92665%20-4.85006,-48.81854%20-1.80488,-67.30417%203.62781,-22.022442%2025.06106,-86.63565%2042.90396,-129.339365%206.51736,-15.598117%208.4567,-15.887875%2020.8444,-3.114389%2020.51758,21.1565375%2037.73813,61.561499%2044.81358,105.147066%202.95555,18.206535%202.85935,52.437898%20-0.25171,89.568468%20-1.38212,16.49562%20-2.29064,33.40783%20-2.01892,37.58267%20l%200.49401,7.59061%2013.72871,-18.44772%20c%2025.74433,-34.59355%2069.08728,-81.03407%2081.73161,-87.5727%2011.87622,-6.141438%2010.44711,2.75931%20-6.01342,37.45253%20-5.22356,11.0095%20-9.49737,20.179%20-9.49737,20.37667%200,0.19767%207.44984,-2.26878%2016.5552,-5.48099%20l%2016.55521,-5.84038%20h%2031.49527%20c%2024.78569,0%2032.51783,0.51611%2036.29529,2.42271%202.64,1.33249%204.76265,3.14952%204.71699,4.03785%20-0.0457,0.88833%20-6.92996,5.38316%20-15.29843,9.98851%20-8.36849,4.60533%20-17.31261,9.53402%20-19.87583,10.95263%20-2.56323,1.4186%20-4.2907,2.94899%20-3.83883,3.40086%200.45187,0.45185%2010.90741,3.65486%2023.23454,7.11775%2045.52284,12.78818%2071.90058,27.18743%2095.15333,51.94292%208.72669,9.29068%2016.9,19.60656%2016.9,21.33023%200,0.58241%20-3.81577,1.05538%20-8.47949,1.05108%20-6.6553,-0.006%20-11.95414,-1.60894%20-24.63091,-7.45042%20-21.59185,-9.94957%20-47.77077,-20.41348%20-48.7132,-19.47106%20-0.41836,0.41838%202.35308,3.55965%206.15876,6.98064%203.80566,3.42098%2010.5764,9.65664%2015.04606,13.85704%20l%208.12667,7.63709%20-110.70734,0.0348%20-110.70733,0.0348%20-18.50403,7.44436%20c%20-10.1772,4.09442%20-21.93654,8.80028%20-26.13185,10.45748%20l%20-7.62784,3.01311%20z%20m%2018.71441,-50.21208%20c%205.79604,-24.82386%207.2104,-42.93561%207.26953,-93.09083%200.0397,-33.65637%20-0.58729,-51.66046%20-2.05295,-58.952673%20-4.73522,-23.559447%20-19.6022,-62.56075%20-23.03817,-60.4372%20-3.85959,2.385358%20-21.76817,51.205422%20-30.10378,82.065025%20-3.89137,14.406408%20-4.40728,19.179228%20-4.38378,40.555138%200.0294,26.70907%201.78412,35.92833%2010.70868,56.26214%206.66935,15.1955%2021.14452,39.2553%2028.34784,47.11815%205.3417,5.8308%205.87894,6.05921%207.86455,3.3437%201.17216,-1.60301%203.59679,-9.19158%205.38808,-16.86345%20z'%20id='path36'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20225.62903,278.16428%20c%20-2.99175,-5.08374%20-12.579,-20.87217%20-21.30501,-35.08542%20-31.65212,-51.55615%20-37.03952,-67.63715%20-37.06525,-110.63722%20-0.0136,-22.69921%200.53814,-28.76672%203.72176,-40.929685%206.69216,-25.567348%2026.87563,-83.4061905%2040.52926,-116.14287%206.50458,-15.595717%208.4448,-15.886699%2020.83495,-3.12469%2020.32853,20.9386335%2036.85737,59.362785%2044.69588,103.903278%203.10013,17.615782%203.04377,53.827917%20-0.14322,92.020257%20-1.3872,16.62383%20-2.29571,33.31864%20-2.01893,37.09959%20l%200.50323,6.87445%2013.66748,-18.41389%20c%2018.51739,-24.94809%2038.08992,-47.38734%2059.2581,-67.93745%2018.41861,-17.88082%2025.86886,-23.13458%2029.56625,-20.84948%202.97953,1.84146%20-0.76272,12.99748%20-12.88206,38.4027%20-5.19117,10.88202%20-8.7034,19.78549%20-7.80496,19.78549%200.89845,0%207.935,-2.34514%2015.63677,-5.2114%20l%2014.00321,-5.21141%2032.30285,-0.0378%20c%2025.56094,-0.0299%2033.30464,0.46783%2037.10286,2.38491%202.64,1.33249%204.76265,3.14952%204.71699,4.03785%20-0.0457,0.88833%20-6.92996,5.38316%20-15.29843,9.98851%20-8.36849,4.60533%20-17.31261,9.53402%20-19.87583,10.95263%20-2.56323,1.4186%20-4.2995,2.94018%20-3.85841,3.38128%200.44111,0.4411%209.87073,3.28772%2020.95474,6.32582%2036.63048,10.04035%2059.69202,20.57599%2078.99705,36.08976%2015.52668,12.47746%2035.35566,33.54417%2035.35566,37.56258%200,0.82017%20-3.81577,1.48235%20-8.47949,1.4715%20-6.23187,-0.0145%20-11.90446,-1.55925%20-21.40063,-5.82782%20-22.92654,-10.30556%20-45.11919,-19.64345%20-49.26183,-20.72768%20-2.8511,-0.7462%200.4718,3.22416%2011.30599,13.50895%20l%2015.34385,14.56573%20-110.70734,0.0578%20-110.70733,0.0578%20-18.50403,7.44436%20c%20-10.1772,4.09443%20-21.93315,8.79894%20-26.1243,10.45452%20l%20-7.6203,3.01014%20z%20m%2019.71622,-48.59396%20c%205.7349,-24.56201%207.12948,-42.87236%207.15165,-93.8984%200.0177,-40.803828%20-0.45837,-51.434358%20-2.77286,-61.915277%20-5.36527,-24.296051%20-18.53258,-56.856413%20-22.47444,-55.575155%20-4.437,1.442199%20-27.13245,67.292307%20-32.75344,95.033032%20-3.26392,16.10812%20-2.41936,46.64595%201.71546,62.02838%205.2069,19.37075%2025.11234,56.2798%2037.35506,69.26444%204.07564,4.32264%204.54153,4.45505%206.45713,1.8353%201.13551,-1.55289%203.53015,-9.10045%205.32144,-16.77232%20z'%20id='path37'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20209.20699,251.20123%20c%20-37.55583,-61.85066%20-41.92156,-74.2105%20-41.94822,-118.75959%20-0.0136,-22.74713%200.5371,-28.7786%203.7605,-41.186118%206.88563,-26.504141%2026.05728,-81.3912962%2040.47822,-115.886437%206.59543,-15.776365%208.73335,-16.089713%2021.03992,-3.083761%2020.41708,21.5773675%2036.71682,59.617987%2044.50321,103.862348%202.67928,15.224438%203.11659,56.436388%200.85441,80.521098%20-2.87208,30.57821%20-3.78667,53.72615%20-2.09798,53.09928%200.8996,-0.33395%207.06721,-7.92292%2013.7058,-16.8644%2017.04993,-22.96446%2038.24303,-47.15197%2058.80443,-67.11302%2018.41862,-17.88083%2025.86886,-23.13458%2029.56625,-20.84948%202.92603,1.8084%20-0.68457,12.71566%20-12.45115,37.61355%20-4.93766,10.44798%20-8.57564,19.39823%20-8.08445,19.88944%200.49122,0.4912%207.32708,-1.43618%2015.19083,-4.28306%2013.08418,-4.73681%2016.35576,-5.24125%2038.54483,-5.94302%2025.5095,-0.80679%2045.03408,1.16585%2048.79854,4.93032%202.91703,2.91703%202.21473,3.45636%20-19.32896,14.84321%20-9.54228,5.04354%20-17.74087,9.80317%20-18.2191,10.57695%20-0.47821,0.7738%202.2414,2.19115%206.0436,3.14968%2060.74588,15.3142%2092.82006,32.99996%20121.02167,66.73157%204.30906,5.154%207.83463,10.05999%207.83463,10.90221%200,0.8422%20-3.81577,1.52241%20-8.47949,1.51156%20-6.19641,-0.0144%20-11.95848,-1.56985%20-21.40063,-5.77702%20-32.62862,-14.5384%20-46.04702,-20.04185%20-48.75546,-19.99666%20-1.94186,0.0324%201.97024,4.63785%2011.60719,13.66428%20l%2014.53628,13.61537%20-110.47978,0.0644%20-110.47978,0.0644%20-20.34672,8.28357%20c%20-11.19069,4.55594%20-23.0366,9.23541%20-26.32423,10.3988%20l%20-5.97752,2.11525%20z%20m%2036.10025,-21.63091%20c%205.42438,-23.50644%207.01224,-44.30186%207.10806,-93.09083%200.10205,-51.95887%20-1.2125,-63.2578%20-10.38669,-89.276779%20-5.64816,-16.018793%20-12.07719,-29.436149%20-14.10456,-29.436149%20-3.33357,0%20-22.10078,50.760285%20-31.12743,84.191378%20-4.83851,17.91991%20-5.25399,56.17148%20-0.78724,72.47739%205.67382,20.71234%2024.41849,55.56244%2037.17254,69.11119%204.49054,4.77036%205.20089,5.04033%206.95395,2.64288%201.07387,-1.46862%203.40099,-8.94721%205.17137,-16.61908%20z'%20id='path38'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20209.20699,251.20123%20c%20-37.57833,-61.88772%20-41.84301,-73.87399%20-41.96706,-117.95202%20-0.0555,-19.71154%200.64106,-28.90764%202.93606,-38.763408%205.29525,-22.740176%2027.26863,-86.2175448%2040.95399,-118.309146%207.09086,-16.627759%209.02348,-16.979061%2021.40743,-3.891333%2017.1845,18.1610877%2031.1968,47.29833%2040.5305,84.279285%204.45169,17.637985%205.18697,23.683997%205.88854,48.419622%200.52194,18.40275%20-0.10274,39.86963%20-1.79033,61.52374%20-2.91755,37.43613%20-3.10989,43.48324%20-1.38063,43.40725%200.66624,-0.0293%205.57224,-6.02461%2010.9022,-13.32293%2016.36447,-22.40786%2039.8825,-49.51662%2060.00206,-69.16317%2019.81784,-19.35191%2027.40502,-24.82336%2031.18378,-22.48797%202.92603,1.8084%20-0.68457,12.71566%20-12.45115,37.61355%20-4.93766,10.44798%20-8.62627,19.34761%20-8.19693,19.77695%200.42934,0.42934%207.2652,-1.54674%2015.19083,-4.39128%2014.35961,-5.15372%2014.52367,-5.17214%2046.71306,-5.24067%2025.60777,-0.0545%2033.29768,0.43335%2037.10286,2.35393%202.64,1.33249%204.82044,3.12704%204.84543,3.98788%200.0412,1.41972%20-6.5548,5.41925%20-31.79109,19.2768%20l%20-8.54206,4.69055%206.46057,2.01657%20c%203.55331,1.1091%2015.54573,4.67292%2026.64984,7.91961%2023.24105,6.79532%2049.99161,19.00051%2062.92892,28.71189%2016.56825,12.43695%2040.44016,37.08574%2040.44016,41.75625%200,0.80856%20-3.81577,1.46123%20-8.47949,1.45038%20-6.21211,-0.0144%20-11.93456,-1.56519%20-21.40063,-5.79939%20-29.70048,-13.28513%20-47.75532,-20.45292%20-48.82477,-19.38345%20-0.62662,0.62659%205.01493,6.88196%2012.53674,13.9008%20l%2013.67604,12.76151%20-110.207,0.0777%20-110.20699,0.0777%20-20.6195,8.25851%20c%20-11.34073,4.5422%20-23.30939,9.22166%20-26.59702,10.39882%20l%20-5.97753,2.14029%20z%20m%2033.65096,-12.564%20c%206.99835,-24.41061%207.97673,-34.70222%208.71041,-91.62504%200.502,-38.9483%200.13156,-59.339755%20-1.23232,-67.835958%20-3.36436,-20.95798%20-18.14374,-61.40967%20-22.43656,-61.40967%20-3.40425,0%20-22.56382,52.350279%20-31.03395,84.794958%20-4.91461,18.82534%20-5.32389,55.22043%20-0.80826,71.87381%206.89482,25.42763%2034.43758,72.68139%2042.36374,72.68139%201.10326,0%203.09988,-3.81578%204.43694,-8.47949%20z'%20id='path39'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20228.88105,283.98786%20c%20-21.45876,-34.71428%20-42.95674,-71.76478%20-48.80995,-84.12104%20-8.98551,-18.9686%20-11.79707,-31.33217%20-13.14638,-57.80994%20-1.73596,-34.0655%203.12851,-55.84603%2027.21137,-121.83807%2016.82771,-46.111433%2021.86687,-57.367075%2025.68326,-57.367075%207.49646,0%2024.26119,20.796338%2036.00898,44.6684745%207.90834,16.0701615%2011.90143,27.6122885%2018.07288,52.2400425%205.7432,22.918713%206.90762,61.581768%203.26361,108.362858%20-2.93635,37.69632%20-3.07399,41.86658%20-1.37933,41.79211%200.66624,-0.0293%205.57224,-6.02461%2010.9022,-13.32293%2016.36447,-22.40786%2039.8825,-49.51662%2060.00206,-69.16317%2019.81784,-19.35191%2027.40502,-24.82336%2031.18378,-22.48797%202.91756,1.80315%20-0.63369,12.62318%20-12.36726,37.68087%20-4.90973,10.48502%20-8.61052,19.37993%20-8.22398,19.76646%200.38654,0.38656%207.19211,-1.65077%2015.12351,-4.52738%20l%2014.42069,-5.23018%20h%2032.30285%20c%2025.50352,0%2033.31317,0.50994%2037.10286,2.42271%202.64,1.33249%204.76008,3.14952%204.71129,4.03785%20-0.0883,1.60733%20-7.37834,6.11359%20-28.85306,17.83521%20l%20-11.26603,6.14937%206.42061,1.98297%20c%203.53133,1.09062%2015.50577,4.63932%2026.60988,7.88601%2024.17331,7.06791%2049.76154,18.92364%2064.40565,29.84095%2015.20856,11.33809%2038.96343,36.26639%2038.96343,40.88811%200,0.94469%20-4.08,1.29535%20-10.09464,0.86764%20-7.79347,-0.5542%20-14.32874,-2.66133%20-28.66876,-9.24347%20-23.15113,-10.62648%20-38.88287,-16.67618%20-40.12775,-15.43129%20-0.52416,0.52416%205.20119,6.6957%2012.723,13.71454%20l%2013.67604,12.76151%20-110.21112,0.0777%20-110.21112,0.0777%20-24.65324,9.86997%20c%20-13.55927,5.42848%20-25.50764,10.20977%20-26.55193,10.62509%20-1.04428,0.41531%20-2.94481,-0.93721%20-4.2234,-3.00562%20z%20m%2012.81092,-42.8213%20c%201.36738,-3.27258%204.0165,-13.26627%205.88694,-22.20819%203.10612,-14.84926%203.40838,-21.64633%203.48823,-78.44102%20l%200.0874,-62.182962%20-4.29914,-15.35616%20C%20241.94302,45.431437%20231.04714,19.107063%20228.33,18.22092%20c%20-2.47235,-0.806316%20-11.51063,21.247162%20-22.14707,54.039058%20-11.66196,35.953512%20-12.97587,42.756462%20-13.02721,67.449802%20-0.0506,24.33765%201.9567,34.99518%2010.19089,54.10725%209.92444,23.03524%2029.39346,53.29969%2034.28753,53.29969%200.86443,0%202.69046,-2.67757%204.05783,-5.95016%20z'%20id='path40'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20357.75394,424.70212%20c%20-29.25045,-3.2514%20-45.90713,-17.12433%20-55.01312,-45.81904%20-2.23213,-7.03386%20-5.90917,-23.37271%20-8.1712,-36.30854%20-2.26203,-12.93583%20-4.45863,-24.07927%20-4.88132,-24.7632%20-1.55674,-2.51887%20-9.78534,-1.08498%20-31.16755,5.4312%20-24.17414,7.36701%20-50.1017,16.35405%20-85.78587,29.7352%20-24.32528,9.1217%20-27.66028,10.07132%20-24.59106,7.0021%200.99657,-0.99657%201.46879,-2.70622%201.04937,-3.79922%20-1.29442,-3.37318%209.99251,-11.72682%2026.46665,-19.58838%208.65397,-4.12974%2038.26571,-16.94474%2065.80388,-28.4778%20l%2050.0694,-20.96919%20188.24231,0.89879%20c%20121.40704,0.57968%20189.7755,1.48171%20192.56057,2.54059%205.97157,2.2704%206.86199,6.8367%206.64146,34.0589%20-0.15401,19.00909%20-0.98664,26.89849%20-4.42134,41.89264%20-2.32738,10.16019%20-4.78586,19.00941%20-5.46326,19.66493%20-0.67741,0.65552%20-3.37167,-0.52917%20-5.98725,-2.63266%20l%20-4.75558,-3.82452%205.36978,-27.35562%20c%205.73883,-29.23567%205.90144,-42.98485%200.56078,-47.41723%20-2.07677,-1.72358%20-30.59748,-2.22067%20-148.89474,-2.59511%20-80.47925,-0.25475%20-160.86219,0.10866%20-178.62875,0.80757%20l%20-32.30284,1.27073%20-0.46803,4.03785%20c%20-0.53807,4.64205%209.83863,62.87785%2013.43518,75.40048%202.89595,10.08328%208.55951,17.18948%2017.51993,21.98265%206.43671,3.44317%208.26677,3.56324%2054.30787,3.56324%2053.9595,0%2058.78288,-0.73446%2070.06974,-10.66953%208.03791,-7.07526%2010.71931,-12.96636%2020.46285,-44.95745%203.63655,-11.93995%207.6677,-23.75068%208.95811,-26.24606%20l%202.3462,-4.53705%2018.93644,0.0238%20c%2021.32096,0.0268%2027.01215,1.73332%2027.01215,8.0996%200,3.93886%20-0.15865,3.98374%20-12.34075,3.49091%20-14.62233,-0.59154%20-22.69085,2.14248%20-26.12207,8.8515%20-1.28517,2.51289%20-5.04902,13.29065%20-8.36412,23.95058%20-15.9672,51.34376%20-29.00221,59.23905%20-96.9207,58.70469%20-13.32492,-0.10484%20-29.31482,-0.75615%20-35.53311,-1.44735%20z'%20id='path41'%20/%3e%3cpath%20style='fill:%23ffffff;stroke-width:1.61514'%20d='m%20402.48347,1045.818%20c%20-2.93694,-2.0266%20-13.90227,-11.3518%20-24.36742,-20.7226%20-37.57978,-33.64993%20-58.07181,-62.87743%20-85.9297,-122.56048%20-5.68221,-12.17362%20-10.90847,-21.55665%20-11.61392,-20.8512%20-1.34286,1.34288%201.12461,49.2453%203.7533,72.8652%200.84034,7.55078%201.53386,14.8059%201.54114,16.12253%200.0399,7.20787%20-25.31907,-42.34035%20-38.01048,-74.2677%20-11.58422,-29.142%20-23.95591,-78.6789%20-32.27012,-129.21135%20-3.55763,-21.62262%20-4.22283,-24.42941%20-5.66265,-23.89338%20-0.70003,0.26062%20-12.68024,15.7369%20-26.62271,34.3918%20-13.94246,18.6549%20-25.73547,34.28145%20-26.20668,34.7256%20-1.96983,1.8567%201.28602,-40.0272%205.14769,-66.22084%204.89215,-33.18335%2013.65058,-85.54627%2019.42723,-116.14717%202.24901,-11.91373%203.89574,-21.8547%203.65942,-22.09103%20-0.23633,-0.23633%20-9.50702,6.3842%20-20.60153,14.71228%20-18.9791,14.24661%20-20.20205,14.90829%20-20.68275,11.19034%20-0.28101,-2.17336%204.26169,-23.03113%2010.09489,-46.35058%2010.49846,-41.96984%2031.84034,-138.80015%2030.81764,-139.82284%20-0.29161,-0.29162%20-9.84247,5.6893%20-21.22413,13.29093%20-16.14623,10.7838%20-20.97611,13.31691%20-21.97794,11.52673%20-0.83205,-1.48679%203.7344,-12.98896%2012.9729,-32.67675%2011.73177,-25.00109%2014.95419,-30.56783%2018.19366,-31.42958%209.75651,-2.59539%2072.97939,-14.24725%2073.9731,-13.63309%200.61097,0.3776%205.45352,7.72992%2010.76122,16.3385%2018.42853,29.8893%2046.64679,51.12032%2074.18985,55.81942%2017.3177,2.95455%2053.01405,1.01504%2072.13201,-3.9192%2015.84011,-4.08824%2040.18655,-14.26641%2040.18655,-16.80021%200,-0.77064%203.45236,-2.64692%207.67192,-4.1695%2016.18808,-5.84131%2038.00652,-26.49102%2047.19533,-44.66726%201.58338,-3.13206%205.58394,-13.32619%208.89012,-22.65363%208.99277,-25.37047%207.09785,-24.48669%2036.74661,-17.13843%2067.29717,16.67916%20104.77954,34.45776%20115.37234,54.72326%204.66249,8.92001%202.24509,26.53546%20-5.20107,37.89973%20l%20-2.4005,3.66363%20-10.86293,-8.96967%20c%20-5.97461,-4.93332%20-15.86657,-11.47605%20-21.98215,-14.5394%20-10.57063,-5.29494%20-11.95987,-5.56972%20-28.15882,-5.56972%20-13.92516,0%20-18.3007,0.61048%20-23.93915,3.34%20-7.8576,3.8038%20-16.73233,13.09379%20-16.73233,17.51528%200,6.02394%203.8028,7.08674%2018.96003,5.29889%2019.58289,-2.30988%2031.84778,0.32678%2052.3488,11.25371%2030.30393,16.15182%2035.74323,50.19556%2010.62246,66.48417%20-8.16321,5.29311%20-17.25407,6.65695%20-35.77518,5.36712%20-20.4443,-1.42379%20-33.08183,-4.79355%20-51.80911,-13.81475%20-17.0689,-8.22233%20-22.22802,-12.59722%20-28.74818,-24.37818%20-4.87857,-8.81485%20-8.62627,-9.71541%20-15.69132,-3.77057%20-8.52556,7.17379%20-15.50838,28.22957%20-11.41352,34.41595%201.33616,2.01861%202.18896,1.80418%205.61125,-1.41089%20l%204.03561,-3.79127%2017.0384,9.95898%20c%2035.53906,20.77267%2050.20896,24.91652%2088.12044,24.89171%2021.68151,-0.0142%2029.46948,-0.67615%2041.77416,-3.55068%2011.55495,-2.6994%2015.6526,-3.09482%2017.36277,-1.67548%207.80954,6.48134%20-5.45307,23.88294%20-26.0955,34.23936%20-15.54474,7.79888%20-25.84954,9.95598%20-46.77014,9.79037%20-20.50822,-0.16233%20-32.78631,-2.33502%20-72.01608,-12.74372%20-38.39515,-10.18725%20-45.0297,-10.93994%20-85.46026,-9.69539%20-19.98738,0.61525%20-46.15268,1.60747%20-58.1451,2.20491%20l%20-21.80442,1.08625%2016.81692,17.37475%20c%2016.13273,16.66785%2016.59273,17.33625%2011.30599,16.42897%20-38.55791,-6.61705%20-56.23502,-14.53105%20-82.23017,-36.81424%20-5.77413,-4.94961%20-10.67573,-8.47753%20-10.89243,-7.83981%20-0.21671,0.63771%202.11177,9.12752%205.17441,18.86625%203.06263,9.73872%205.39598,17.87922%205.18521,18.08997%20-0.21076,0.21076%20-5.16903,-3.20085%20-11.01836,-7.58138%20-23.99942,-17.97298%20-50.87912,-51.3133%20-62.78794,-77.87922%20-3.08573,-6.88357%20-6.25733,-12.51637%20-7.04801,-12.51734%20-2.57733,-0.003%200.25811,51.33472%203.74023,67.71958%203.27039,15.38867%208.19579,24.94396%208.19579,15.89988%200,-2.35875%200.58419,-4.64969%201.2982,-5.09096%200.71402,-0.44129%205.91806,7.6459%2011.56454,17.97152%2022.79368,41.68244%2043.09309,67.60239%2085.06758,108.62124%2030.0072,29.32403%2048.72337,45.0041%2075.86378,63.55715%209.86311,6.74243%2018.85557,13.37063%2019.98326,14.7294%202.59563,3.12758%203.2057,3.12878%20-25.69067,-0.0518%20-31.98572,-3.5208%20-32.75936,-3.20145%20-17.07092,7.04648%2014.99028,9.79185%2065.54726,35.8452%2080.331,41.39662%2017.09691,6.42015%2068.19689,15.18458%2078.8953,13.5318%203.51235,-0.54262%203.18015,-0.9831%20-3.3187,-4.40062%20-13.43333,-7.06403%20-42.11686,-26.33505%20-43.75572,-29.3973%20-1.56417,-2.92275%20-0.52874,-3.0489%2026.28972,-3.20355%2015.35491,-0.0885%2029.54933,-0.63368%2031.54314,-1.21133%20l%203.62512,-1.05037%20-4.92114,-7.26818%20c%20-14.35339,-21.19882%20-41.61423,-70.2753%20-39.9569,-71.93264%200.44776,-0.44777%205.82655,1.33176%2011.95282,3.9545%208.48005,3.63042%2011.25764,4.24609%2011.63704,2.57944%200.27407,-1.20404%20-2.06396,-9.69482%20-5.19565,-18.86841%20-8.14715,-23.86531%20-15.4785,-53.60811%20-16.453,-66.74863%20l%20-0.83846,-11.306%206.34011,16.15142%20c%2021.1348,53.84095%2035.95589,79.16085%2063.81197,109.01435%2016.79881,18.00345%2016.79895,18.0033%20-10.37978,13.0389%20-9.9861,-1.824%20-18.4495,-3.02348%20-18.80757,-2.66535%20-1.13898,1.13895%2029.11997,30.87067%2038.36158,37.69312%204.88581,3.6069%2017.60505,11.33835%2028.26499,17.181%2010.65994,5.84273%2018.65488,10.6452%2017.76656,10.67213%20-0.88833,0.027%20-0.5791,0.70477%200.68721,1.50615%201.42055,0.8991%20-2.60029,1.13085%20-10.49842,0.6051%20-7.04044,-0.4686%20-15.34463,-0.16853%20-18.45378,0.6669%20l%20-5.65299,1.51882%209.69085,6.26325%20c%2012.57209,8.12543%2040.74455,20.70203%2055.90216,24.95565%2013.86981,3.8922%2055.93511,6.8904%2086.23033,6.14603%20l%2019.38173,-0.47618%20-16.15148,-5.46637%20c%20-25.70755,-8.7006%20-49.26519,-18.2562%20-48.41178,-19.63703%200.43189,-0.69877%20-0.12779,-1.69792%20-1.24374,-2.2203%20-2.52525,-1.18215%20168.04865,0.47033%20221.41047,2.14493%2042.3804,1.3299%2042.17678,1.28055%2042.22665,10.2387%200.0232,4.12192%200.51885,4.45207%206.88913,4.58625%2015.25672,0.3213%2044.4526,2.86552%2051.2807,4.4688%203.9975,0.93855%2019.3904,1.73812%2034.2064,1.77682%2022.2703,0.0585%2027.3781,0.51015%2029.4763,2.60843%203.1012,3.10117%203.1058,2.62245%20-0.09,9.32302%20l%20-2.6276,5.51018%20-26.8487,1.0671%20c%20-106.9313,4.24987%20-251.40793,6.51345%20-418.25928,6.5532%20l%20-181.44209,0.0427%20-3.20577,3.95857%20c%20-3.08903,3.81443%20-3.09691,3.99893%20-0.21644,5.06445%201.64411,0.60818%2034.9489,2.3244%2074.01063,3.81383%20105.85054,4.03605%20111.43863,4.45192%20115.88072,8.62507%202.03601,1.91273%206.58503,4.1529%2010.10891,4.97813%20l%206.40708,1.50045%20-5.653,0.4584%20c%20-3.10915,0.25215%200.16151,0.8703%207.26814,1.37362%207.49448,0.53085%20-11.37367,1.37505%20-44.92613,2.01023%20-63.17235,1.1958%20-62.52707,1.09215%20-68.36896,10.98165%20l%20-2.88404,4.88227%20-24.28268,0.0165%20-24.28267,0.0165%20-2.82301,6.71685%20c%20-1.55265,3.69428%20-2.64287,6.87345%20-2.42271,7.06493%200.71213,0.61935%20116.63886,3.92347%20176.43025,5.0286%2045.16648,0.83482%2058.605,1.55467%2060.27941,3.22912%201.18514,1.18515%201.44557,2.15483%200.57872,2.15483%20-0.86684,0%20-3.23295,3.99742%20-5.25799,8.88322%20l%20-3.68193,8.8833%20H%20584.38418%20442.54889%20l%20-0.19108,6.05678%20c%20-0.10511,3.3313%20-0.65022,8.1128%20-1.21136,10.6258%20l%20-1.02027,4.569%20-13.24252,-9.8667%20c%20-7.28337,-5.4268%20-19.01383,-15.29605%20-26.06769,-21.93183%20-7.05384,-6.63577%20-13.36249,-12.06502%20-14.01919,-12.06502%20-3.63929,0%204.52756,33.24505%2014.63388,59.57055%203.9203,10.2119%206.96242,18.7166%206.76026,18.8995%20-0.20217,0.1828%20-2.77052,-1.3257%20-5.70745,-3.3524%20z'%20id='path42'%20/%3e%3c/svg%3e`,kk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M17.8758%209.20865C17.8758%208.59461%2017.3777%208.09634%2016.7663%208.09634C16.155%208.09634%2015.6567%208.59575%2015.6567%209.20865V27.6446C15.6567%2029.0714%2014.4985%2030.2324%2013.0755%2030.2324C11.6523%2030.2324%2010.4941%2029.0714%2010.4941%2027.6446V15.8167C10.4941%2015.2027%209.99591%2014.7044%209.38453%2014.7044C8.77316%2014.7044%208.275%2015.2038%208.275%2015.8167V20.8301C8.275%2022.2567%207.11678%2023.4179%205.69364%2023.4179C4.2705%2023.4179%203.1123%2022.2567%203.1123%2020.8301V19.0129C3.1123%2018.6054%203.44177%2018.2752%203.84822%2018.2752C4.25467%2018.2752%204.58413%2018.6054%204.58413%2019.0129V20.8301C4.58413%2021.4441%205.08227%2021.9424%205.69364%2021.9424C6.30502%2021.9424%206.80317%2021.443%206.80317%2020.8301V15.8167C6.80317%2014.39%207.96139%2013.2289%209.38453%2013.2289C10.8077%2013.2289%2011.9659%2014.39%2011.9659%2015.8167V27.6446C11.9659%2028.2587%2012.4641%2028.7569%2013.0755%2028.7569C13.6868%2028.7569%2014.1849%2028.2575%2014.1849%2027.6446V20.4123V9.20865C14.1849%207.78194%2015.3431%206.62082%2016.7663%206.62082C18.1894%206.62082%2019.3476%207.78194%2019.3476%209.20865V24.4746C19.3476%2024.8821%2019.0182%2025.2123%2018.6117%2025.2123C18.2053%2025.2123%2017.8758%2024.8821%2017.8758%2024.4746V9.20865ZM31.531%2013.2289C30.1079%2013.2289%2028.9496%2014.39%2028.9496%2015.8167V25.6969C28.9496%2026.311%2028.4515%2026.8093%2027.8401%2026.8093C27.2287%2026.8093%2026.7306%2026.3099%2026.7306%2025.6969V9.20865C26.7306%207.78194%2025.5723%206.62082%2024.1492%206.62082C22.7261%206.62082%2021.5679%207.78194%2021.5679%209.20865V30.1383C21.5679%2030.7523%2021.0697%2031.2506%2020.4583%2031.2506C19.8469%2031.2506%2019.3488%2030.7511%2019.3488%2030.1383V27.5471C19.3488%2027.1396%2019.0194%2026.8093%2018.6129%2026.8093C18.2065%2026.8093%2017.877%2027.1396%2017.877%2027.5471V30.1383C17.877%2031.565%2019.0352%2032.7261%2020.4583%2032.7261C21.8815%2032.7261%2023.0397%2031.565%2023.0397%2030.1383V9.20865C23.0397%208.59461%2023.5378%208.09634%2024.1492%208.09634C24.7605%208.09634%2025.2587%208.59575%2025.2587%209.20865V25.6969C25.2587%2027.1237%2026.417%2028.2848%2027.8401%2028.2848C29.2632%2028.2848%2030.4215%2027.1237%2030.4215%2025.6969V15.8167C30.4215%2015.2027%2030.9196%2014.7044%2031.531%2014.7044C32.1424%2014.7044%2032.6405%2015.2038%2032.6405%2015.8167V24.4746C32.6405%2024.8821%2032.97%2025.2123%2033.3764%2025.2123C33.7829%2025.2123%2034.1123%2024.8821%2034.1123%2024.4746V15.8167C34.1123%2014.39%2032.9541%2013.2289%2031.531%2013.2289Z'%20fill='currentColor'/%3e%3c/svg%3e`,Ak=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.92783%208.88101H13.357V13.3088H17.7861V17.738H17.7835H22.2152V13.3088H26.6418V8.88101H31.0722V26.5949H35.5V31.0241H22.2139V26.5962H17.7861V22.1671H13.3557V26.5949L17.7861%2026.5962V31.0241H4.5V26.5949H8.92783V8.88101ZM22.2139%2026.5962H26.6418V22.1671H22.2152V26.5962H22.2139Z'%20fill='currentColor'/%3e%3c/svg%3e`,jk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.85893%2026.3499L18.1801%2029.6463C18.1635%2030.5223%2018.1894%2031.3987%2018.2576%2032.2722L25.9507%2034.3298C23.669%2035.2716%2021.1952%2035.6547%2018.7355%2035.4471L18.503%2035.4265L18.4462%2035.4213L18.3377%2035.4097L18.2163%2035.3968C18.1486%2035.3886%2018.081%2035.38%2018.0135%2035.3709L17.8753%2035.3528L17.7332%2035.3322C17.5951%2035.3121%2017.4573%2035.2901%2017.3198%2035.2663L17.2656%2035.256L17.1687%2035.2392L17.0305%2035.2133L16.9401%2035.194L16.82%2035.1694L16.7231%2035.1488L16.6004%2035.1229L16.4751%2035.0932L16.3537%2035.0648L16.2659%2035.0428L16.1522%2035.0144L16.0359%2034.9834L15.9132%2034.9511L15.8073%2034.9214L15.6665%2034.8827L15.5864%2034.8568L15.4779%2034.8245L15.3578%2034.7884L15.2222%2034.7445L15.1473%2034.7199L15.0439%2034.6863L14.9277%2034.6463L14.8424%2034.6153C14.8235%2034.6089%2014.8045%2034.6025%2014.7856%2034.5959L14.6978%2034.5636L14.5673%2034.5158L14.4937%2034.4874L14.3904%2034.4487L14.278%2034.4035L14.1643%2034.3583L14.0623%2034.3169L13.9396%2034.2653L13.8582%2034.2291L13.7768%2034.1942C13.7591%2034.1865%2013.7415%2034.1788%2013.7239%2034.171L13.6386%2034.1322L13.5056%2034.0715L13.4384%2034.0405L13.3144%2033.9811L13.2343%2033.9423L13.1258%2033.8907L13.0147%2033.8338L12.8946%2033.7731L12.8274%2033.7383L12.6944%2033.6672L12.6208%2033.6285L12.5459%2033.5871C12.526%2033.576%2012.5062%2033.5648%2012.4864%2033.5536L12.365%2033.4851L12.2875%2033.4412L12.2217%2033.4024L12.1287%2033.3495L12.0227%2033.2849L11.9026%2033.2126L11.8354%2033.1712L11.7269%2033.1028L11.6482%2033.0524L11.5461%2032.9878L11.4557%2032.9271L11.3872%2032.8819C11.3639%2032.8665%2011.3407%2032.851%2011.3175%2032.8354L11.2607%2032.7966L11.2038%2032.7579C11.1866%2032.7459%2011.1693%2032.7338%2011.1522%2032.7217L11.0785%2032.6701L10.9804%2032.6003L10.8912%2032.5357L10.7957%2032.466L10.7233%2032.4117L10.6252%2032.3381L10.527%2032.2619L10.4159%2032.1753L10.3578%2032.1301L10.2751%2032.063L10.1795%2031.9855L10.0646%2031.8912L10.0052%2031.8408L9.94575%2031.7904C9.92717%2031.7746%209.90866%2031.7586%209.8902%2031.7426L9.83208%2031.691L9.75329%2031.6225L9.66287%2031.5424L9.57504%2031.4649L9.49496%2031.39L9.40841%2031.3099L9.33996%2031.2453L9.22629%2031.1368C9.18345%2031.0953%209.14082%2031.0535%209.09842%2031.0116L9.06096%2030.9754L9.008%2030.9211L8.91887%2030.8307L8.85429%2030.7648L8.78971%2030.6964C8.71592%2030.6207%208.64357%2030.5436%208.57271%2030.4652L8.46938%2030.3515L8.38929%2030.2611L8.29758%2030.1578L8.24333%2030.0945L8.17488%2030.0144L8.09996%2029.9266L8.04054%2029.8542C8.02888%2029.8401%208.01725%2029.8258%208.00567%2029.8116L7.94754%2029.7406L7.86229%2029.6346L7.80934%2029.5675L7.74475%2029.4848L7.71892%2029.4525C6.97985%2028.4945%206.3556%2027.4532%205.85893%2026.3499ZM4.54143%2018.8661L19.2057%2022.7888C18.9602%2023.6439%2018.758%2024.5109%2018.5999%2025.3864L32.5718%2029.1244C31.8777%2030.0748%2031.0782%2030.9436%2030.1887%2031.7142L5.34872%2025.0673L5.32805%2025.0079L5.28284%2024.8736C5.26087%2024.8078%205.23934%2024.742%205.21826%2024.676L5.20922%2024.6462C5.1098%2024.3302%205.02063%2024.011%204.94184%2023.6891L4.90309%2023.5264L4.87984%2023.423L4.85272%2023.2978L4.82947%2023.1931L4.80622%2023.0769L4.78426%2022.9684L4.76101%2022.847C4.72743%2022.6648%204.69643%2022.4814%204.6693%2022.2967L4.64735%2022.1443L4.63314%2022.0371L4.61635%2021.9053C4.6077%2021.8361%204.59952%2021.7668%204.5918%2021.6974L4.58535%2021.6367C4.48884%2020.7162%204.47414%2019.7891%204.54143%2018.8661ZM6.59905%2012.214L22.0318%2016.3421C21.5565%2017.1236%2021.1212%2017.9322%2020.7273%2018.764L35.3166%2022.6674C35.1332%2023.7266%2034.8413%2024.7496%2034.4538%2025.7222L19.5351%2021.731L4.66026%2017.7526L4.67964%2017.6235L4.68997%2017.5602L4.70289%2017.4736L4.72226%2017.3613L4.74551%2017.2347C4.7791%2017.0435%204.81785%2016.8536%204.85918%2016.6638L4.89534%2016.5036L4.92118%2016.3938L4.95218%2016.2685C4.98059%2016.1523%205.0103%2016.036%205.04259%2015.9224L5.07876%2015.7906L5.10847%2015.6834L5.14722%2015.5542L5.17951%2015.4483L5.21826%2015.3243L5.25184%2015.2184L5.29189%2015.0957C5.62637%2014.0924%206.06355%2013.1262%206.59646%2012.2127L6.59905%2012.214ZM12.3366%206.53068L26.913%2010.4289C26.1438%2011.1271%2025.4158%2011.8693%2024.7327%2012.6519L34.8374%2015.3553C35.1823%2016.4558%2035.4083%2017.608%2035.5%2018.7976L7.22034%2011.2336L7.27846%2011.1497L7.31334%2011.098L7.365%2011.027L7.42442%2010.943L7.49546%2010.8448L7.56521%2010.7518L7.64788%2010.6407L7.71246%2010.5568L7.78609%2010.4625L7.85713%2010.3721L7.93463%2010.2765L8.00567%2010.1874L8.08963%2010.0879L8.15938%2010.0027L8.24463%209.90321L8.31308%209.82571L8.40608%209.71979L8.47454%209.64229L8.56108%209.54671L8.63083%209.47179L8.72512%209.37104L8.80004%209.29354L8.88142%209.207L9.09842%208.98742L9.22758%208.86084L9.30379%208.7885L9.40196%208.69679C10.2922%207.86254%2011.2771%207.13554%2012.3366%206.53068ZM20.022%204.50018H20.1473L20.2532%204.50147L20.3423%204.50277L20.4121%204.50535L20.4999%204.50793L20.5593%204.50922L20.6575%204.5131L20.7182%204.51568L20.7957%204.51956L20.8655%204.52214L20.9778%204.5286L21.1135%204.53764L21.2995%204.55185L21.4131%204.56089L21.47%204.56606L21.5694%204.57639L21.6753%204.58672L21.736%204.59318L21.8678%204.60868L21.9324%204.61643L22.0719%204.63452L22.1765%204.64743L22.2308%204.65518L22.3147%204.6681L22.5821%204.70943L22.6725%204.72493L22.7565%204.73914L22.9373%204.77272L23.0561%204.79597L23.1982%204.82439L23.2576%204.83731L23.3545%204.85797L23.4075%204.87089L23.4875%204.88768L23.5418%204.9006L23.6257%204.91997L23.689%204.93547L23.7807%204.95743L23.9047%204.98843L24.0494%205.02718L24.1954%205.06593L24.3413%205.10726L24.4059%205.12664L24.4963%205.15247L24.5971%205.18347L24.6914%205.21318L24.756%205.23385L24.8205%205.25451L24.9187%205.28681L25.0466%205.32943L25.1783%205.37593L25.2403%205.39789L25.323%205.4276L25.4431%205.47151L25.5852%205.52447L25.735%205.5826L25.8642%205.63426L25.9249%205.6601L26.0024%205.6911L26.0554%205.71435L26.1367%205.74793L26.1884%205.77118L26.262%205.80347L26.4041%205.86547L26.5333%205.92489L26.6289%205.97009L26.7257%206.01659L26.8032%206.05276L26.9221%206.11218L27.0396%206.1703L27.1714%206.23747L27.2398%206.27364L27.3031%206.30722L27.3625%206.33822L27.44%206.38084L27.493%206.40926L27.5602%206.44672L27.6738%206.5113L27.8107%206.5888L27.9231%206.65468L27.9967%206.69859L28.0652%206.73993L28.1892%206.81613L28.3029%206.88718L28.4294%206.96726L28.4759%206.99826L28.5586%207.05122L28.6671%207.12355L28.7188%207.15842L28.7989%207.21267L28.8789%207.26822L28.9086%207.29017C28.9784%207.33797%2029.0481%207.38705%2029.1166%207.43742L29.2238%207.51492L29.3078%207.57692L29.3801%207.63246L29.4912%207.71642L29.5971%207.79909L29.6488%207.83784L29.7134%207.8908L29.8244%207.97992L29.9265%208.06388L30.0363%208.15559C30.9559%208.93059%2031.7839%209.81279%2032.5021%2010.779L13.8285%205.7841L13.9086%205.74922L13.9925%205.71305L14.0971%205.66914L14.2082%205.62393C14.3542%205.5658%2014.5014%205.50768%2014.6487%205.45472L14.7727%205.40951L14.8928%205.36689L15.0013%205.32814L15.1253%205.2881C15.2377%205.24935%2015.3526%205.21318%2015.4663%205.17831L15.5839%205.14343L15.6949%205.11114L15.8267%205.07239L15.9365%205.04268L16.0656%205.0091L16.1767%204.9781L16.293%204.94839L16.4105%204.91997L16.5332%204.89156L16.6495%204.86572L16.7761%204.8386L16.8936%204.81276L17.0163%204.78951L17.1351%204.76627L17.2643%204.74302L17.3818%204.72235L17.5084%204.70039L17.6273%204.68231L17.7526%204.66293L17.8714%204.64614L18.0031%204.62935L18.1207%204.61385L18.2563%204.59835L18.3726%204.58543L18.5082%204.57252C18.6283%204.5596%2018.7484%204.54927%2018.8698%204.54152L19.0068%204.53118L19.123%204.52472L19.2651%204.51697L19.3852%204.51181L19.5144%204.50664L19.6397%204.50406L19.7675%204.50147L20.022%204.49889V4.50018Z'%20fill='currentColor'/%3e%3c/svg%3e`,Mk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M16.1801%2015.8791V14.0283C16.3472%2014.0155%2016.5271%2014.0026%2016.7199%2014.0026C21.7966%2013.8356%2025.1254%2018.3596%2025.1254%2018.3596C25.1254%2018.3596%2021.5267%2023.3463%2017.671%2023.3463C17.1569%2023.3463%2016.6557%2023.2692%2016.1801%2023.1021V17.4728C18.1465%2017.7298%2018.545%2018.591%2019.7274%2020.5702L22.375%2018.3468C22.375%2018.3468%2020.4343%2015.8277%2017.1955%2015.8277C16.8356%2015.8277%2016.5014%2015.8405%2016.1801%2015.8791ZM16.1801%209.75492V12.5246C16.3472%2012.5118%2016.5271%2012.4989%2016.7199%2012.4861C23.763%2012.2547%2028.377%2018.2696%2028.377%2018.2696C28.377%2018.2696%2023.0819%2024.683%2017.5939%2024.683C17.0798%2024.683%2016.6171%2024.6444%2016.1801%2024.5545V26.2767C16.5528%2026.3152%2016.9384%2026.341%2017.3625%2026.341C22.4649%2026.341%2026.1664%2023.7448%2029.7523%2020.6473C30.3435%2021.1229%2032.7597%2022.2796%2033.261%2022.7937C29.8679%2025.6341%2021.9251%2027.9346%2017.4396%2027.9346C17.0155%2027.9346%2016.5914%2027.9089%2016.1801%2027.8704V30.2866H35.6001V9.75492H16.1801ZM16.1801%2023.1021V24.5545C11.4376%2023.7191%2010.1266%2018.7966%2010.1266%2018.7966C10.1266%2018.7966%2012.4015%2016.2775%2016.1801%2015.8791V17.4728H16.1673C14.188%2017.2414%2012.6329%2019.0922%2012.6329%2019.0922C12.6329%2019.0922%2013.5068%2022.2025%2016.1801%2023.1021ZM7.77464%2018.591C7.77464%2018.591%2010.5765%2014.4525%2016.1801%2014.0283V12.5246C9.9724%2013.0259%204.6001%2018.2696%204.6001%2018.2696C4.6001%2018.2696%207.64612%2027.0735%2016.1801%2027.8575V26.2767C9.90814%2025.4798%207.77464%2018.591%207.77464%2018.591Z'%20fill='currentColor'/%3e%3c/svg%3e`,Nk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOllama%3c/title%3e%3cpath%20d='M7.905%201.09c.216.085.411.225.588.41.295.306.544.744.734%201.263.191.522.315%201.1.362%201.68a5.054%205.054%200%20012.049-.636l.051-.004c.87-.07%201.73.087%202.48.474.101.053.2.11.297.17.05-.569.172-1.134.36-1.644.19-.52.439-.957.733-1.264a1.67%201.67%200%2001.589-.41c.257-.1.53-.118.796-.042.401.114.745.368%201.016.737.248.337.434.769.561%201.287.23.934.27%202.163.115%203.645l.053.04.026.019c.757.576%201.284%201.397%201.563%202.35.435%201.487.216%203.155-.534%204.088l-.018.021.002.003c.417.762.67%201.567.724%202.4l.002.03c.064%201.065-.2%202.137-.814%203.19l-.007.01.01.024c.472%201.157.62%202.322.438%203.486l-.006.039a.651.651%200%2001-.747.536.648.648%200%2001-.54-.742c.167-1.033.01-2.069-.48-3.123a.643.643%200%2001.04-.617l.004-.006c.604-.924.854-1.83.8-2.72-.046-.779-.325-1.544-.8-2.273a.644.644%200%2001.18-.886l.009-.006c.243-.159.467-.565.58-1.12a4.229%204.229%200%2000-.095-1.974c-.205-.7-.58-1.284-1.105-1.683-.595-.454-1.383-.673-2.38-.61a.653.653%200%2001-.632-.371c-.314-.665-.772-1.141-1.343-1.436a3.288%203.288%200%2000-1.772-.332c-1.245.099-2.343.801-2.67%201.686a.652.652%200%2001-.61.425c-1.067.002-1.893.252-2.497.703-.522.39-.878.935-1.066%201.588a4.07%204.07%200%2000-.068%201.886c.112.558.331%201.02.582%201.269l.008.007c.212.207.257.53.109.785-.36.622-.629%201.549-.673%202.44-.05%201.018.186%201.902.719%202.536l.016.019a.643.643%200%2001.095.69c-.576%201.236-.753%202.252-.562%203.052a.652.652%200%2001-1.269.298c-.243-1.018-.078-2.184.473-3.498l.014-.035-.008-.012a4.339%204.339%200%2001-.598-1.309l-.005-.019a5.764%205.764%200%2001-.177-1.785c.044-.91.278-1.842.622-2.59l.012-.026-.002-.002c-.293-.418-.51-.953-.63-1.545l-.005-.024a5.352%205.352%200%2001.093-2.49c.262-.915.777-1.701%201.536-2.269.06-.045.123-.09.186-.132-.159-1.493-.119-2.73.112-3.67.127-.518.314-.95.562-1.287.27-.368.614-.622%201.015-.737.266-.076.54-.059.797.042zm4.116%209.09c.936%200%201.8.313%202.446.855.63.527%201.005%201.235%201.005%201.94%200%20.888-.406%201.58-1.133%202.022-.62.375-1.451.557-2.403.557-1.009%200-1.871-.259-2.493-.734-.617-.47-.963-1.13-.963-1.845%200-.707.398-1.417%201.056-1.946.668-.537%201.55-.849%202.485-.849zm0%20.896a3.07%203.07%200%2000-1.916.65c-.461.37-.722.835-.722%201.25%200%20.428.21.829.61%201.134.455.347%201.124.548%201.943.548.799%200%201.473-.147%201.932-.426.463-.28.7-.686.7-1.257%200-.423-.246-.89-.683-1.256-.484-.405-1.14-.643-1.864-.643zm.662%201.21l.004.004c.12.151.095.37-.056.49l-.292.23v.446a.375.375%200%2001-.376.373.375.375%200%2001-.376-.373v-.46l-.271-.218a.347.347%200%2001-.052-.49.353.353%200%2001.494-.051l.215.172.22-.174a.353.353%200%2001.49.051zm-5.04-1.919c.478%200%20.867.39.867.871a.87.87%200%2001-.868.871.87.87%200%2001-.867-.87.87.87%200%2001.867-.872zm8.706%200c.48%200%20.868.39.868.871a.87.87%200%2001-.868.871.87.87%200%2001-.867-.87.87.87%200%2001.867-.872zM7.44%202.3l-.003.002a.659.659%200%2000-.285.238l-.005.006c-.138.189-.258.467-.348.832-.17.692-.216%201.631-.124%202.782.43-.128.899-.208%201.404-.237l.01-.001.019-.034c.046-.082.095-.161.148-.239.123-.771.022-1.692-.253-2.444-.134-.364-.297-.65-.453-.813a.628.628%200%2000-.107-.09L7.44%202.3zm9.174.04l-.002.001a.628.628%200%2000-.107.09c-.156.163-.32.45-.453.814-.29.794-.387%201.776-.23%202.572l.058.097.008.014h.03a5.184%205.184%200%20011.466.212c.086-1.124.038-2.043-.128-2.722-.09-.365-.21-.643-.349-.832l-.004-.006a.659.659%200%2000-.285-.239h-.004z'%3e%3c/path%3e%3c/svg%3e`,Pk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M32.8377%2017.282C33.2127%2016.25%2033.3072%2015.218%2033.2127%2014.1875C33.1197%2013.1571%2032.7447%2012.1251%2032.2752%2011.1876C31.4322%209.78209%2030.2127%208.6571%2028.8072%208.0001C27.3072%207.34461%2025.7127%207.15711%2024.1197%207.53211C23.3698%206.78212%2022.5253%206.12512%2021.5878%205.65713C20.6503%205.18913%2019.5253%205.00013%2018.4948%205.00013C16.8851%204.99074%2015.3125%205.48246%2013.9948%206.40712C12.6824%207.34311%2011.7449%208.6571%2011.2754%2010.1571C10.1504%2010.4376%209.21289%2010.9071%208.27539%2011.4696C7.4324%2012.1251%206.77541%2012.9696%206.21291%2013.8126C5.36992%2015.2195%205.08792%2016.8125%205.27542%2018.407C5.46399%2019.9968%206.11605%2021.496%207.1504%2022.718C6.79608%2023.7086%206.66795%2024.7659%206.77541%2025.8124C6.86991%2026.8444%207.2449%2027.8749%207.7129%2028.8124C8.55739%2030.2194%209.77538%2031.3444%2011.1824%2031.9999C12.6824%2032.6569%2014.2753%2032.8444%2015.8698%2032.4694C16.6198%2033.2194%2017.4628%2033.8749%2018.4003%2034.3444C19.3378%2034.8139%2020.4628%2034.9999%2021.4948%2034.9999C23.1043%2035.0097%2024.6769%2034.5185%2025.9947%2033.5944C27.3072%2032.6569%2028.2447%2031.3444%2028.7127%2029.8444C29.7719%2029.6432%2030.7682%2029.1934%2031.6197%2028.5319C32.4627%2027.8749%2033.2127%2027.1249%2033.6822%2026.1874C34.5251%2024.7819%2034.8071%2023.1875%2034.6196%2021.5945C34.4322%2020%2033.8697%2018.5015%2032.8377%2017.282ZM21.5878%2033.0304C20.0878%2033.0304%2018.9628%2032.5609%2017.9323%2031.7179C17.9323%2031.7179%2018.0253%2031.6234%2018.1198%2031.6234L24.1197%2028.1554C24.2862%2028.0803%2024.4196%2027.9469%2024.4947%2027.7804C24.5698%2027.636%2024.6021%2027.4731%2024.5877%2027.3109V18.875L27.1197%2020.375V27.3124C27.1455%2028.0547%2027.0215%2028.7945%2026.755%2029.4878C26.4885%2030.181%2026.085%2030.8134%2025.5687%2031.3473C25.0523%2031.8811%2024.4337%2032.3054%2023.7497%2032.5949C23.0658%2032.8843%2022.3305%2033.0314%2021.5878%2033.0304ZM9.49488%2027.8749C8.83789%2026.7499%208.55739%2025.4374%208.83789%2024.125C8.83789%2024.125%208.93239%2024.2195%209.02539%2024.2195L15.0253%2027.6874C15.1693%2027.7638%2015.3325%2027.7966%2015.4948%2027.7819C15.6823%2027.7819%2015.8698%2027.7819%2015.9628%2027.6874L23.2753%2023.4695V26.3749L17.1823%2029.9374C16.5506%2030.3042%2015.8527%2030.5427%2015.1287%2030.6393C14.4046%2030.7358%2013.6686%2030.6884%2012.9629%2030.4999C11.4629%2030.1249%2010.2449%2029.1874%209.49488%2027.8749ZM7.9004%2014.8445C8.56239%2013.7234%209.58826%2012.8627%2010.8074%2012.4056V19.532C10.8074%2019.718%2010.8074%2019.907%2010.9004%2020C10.9755%2020.1665%2011.1089%2020.2998%2011.2754%2020.375L18.5878%2024.5944L16.0573%2026.0944L10.0574%2022.625C9.41842%2022.2639%208.85742%2021.7797%208.40684%2021.2004C7.95627%2020.6211%207.62506%2019.9582%207.4324%2019.25C7.05741%2017.8445%207.1504%2016.157%207.9004%2014.8445ZM28.6197%2019.625L21.3073%2015.407L23.8377%2013.9071L29.8377%2017.375C30.7752%2017.9375%2031.5252%2018.6875%2031.9947%2019.625C32.4642%2020.5625%2032.7447%2021.5945%2032.6502%2022.7195C32.5603%2023.7755%2032.1699%2024.7837%2031.5252%2025.6249C30.8697%2026.4694%2030.0252%2027.1249%2028.9947%2027.4999V20.375C28.9947%2020.1875%2028.9947%2020%2028.9002%2019.907C28.9002%2019.907%2028.8072%2019.718%2028.6197%2019.625ZM31.1502%2015.875C31.1502%2015.875%2031.0572%2015.782%2030.9627%2015.782L24.9627%2012.3126C24.7752%2012.2196%2024.6822%2012.2196%2024.4947%2012.2196C24.3072%2012.2196%2024.1197%2012.2196%2024.0252%2012.3126L16.7128%2016.532V13.6251L22.8073%2010.0626C23.7448%209.50009%2024.7752%209.31259%2025.9002%209.31259C26.9322%209.31259%2027.9627%209.68759%2028.9002%2010.3446C29.7447%2011.0001%2030.4947%2011.8446%2030.8697%2012.7821C31.2447%2013.7196%2031.3377%2014.8445%2031.1502%2015.875ZM15.4003%2021.125L12.8699%2019.625V12.5946C12.8699%2011.5626%2013.1503%2010.4376%2013.7128%209.59459C14.2753%208.6571%2015.1198%208.0001%2016.0573%207.53211C17.0127%207.05249%2018.0956%206.88812%2019.1503%207.06261C20.1823%207.15711%2021.2128%207.62511%2022.0573%208.2821C22.0573%208.2821%2021.9628%208.3751%2021.8698%208.3751L15.8698%2011.8446C15.7033%2011.9197%2015.57%2012.0531%2015.4948%2012.2196C15.4003%2012.4071%2015.4003%2012.5001%2015.4003%2012.6876V21.125ZM16.7128%2018.125L19.9948%2016.25L23.2753%2018.125V21.875L19.9948%2023.75L16.7128%2021.875V18.125Z'%20fill='currentColor'/%3e%3c/svg%3e`,Fk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eopencode%3c/title%3e%3cpath%20d='M16%206H8v12h8V6zm4%2016H4V2h16v20z'%3e%3c/path%3e%3c/svg%3e`,Ik=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M728.039%20234C819.325%20234%20893.323%20308.62%20893.323%20400.668C893.323%20492.716%20819.325%20567.336%20728.039%20567.336L891.984%20732.656C912.81%20753.655%20898.061%20789.56%20868.613%20789.56H397.472C245.333%20789.56%20122%20665.193%20122%20511.78C122%20358.367%20245.333%20234%20397.472%20234H728.039ZM397.472%20345.112C306.189%20345.112%20232.189%20419.732%20232.189%20511.78C232.189%20603.828%20306.189%20678.448%20397.472%20678.448C488.756%20678.448%20562.756%20603.828%20562.756%20511.78C562.756%20419.732%20488.756%20345.112%20397.472%20345.112Z'%20fill='currentColor'%20transform='scale(0.0234375)'/%3e%3c/svg%3e`,Lk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eSiliconCloud%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M22.956%206.521H12.522c-.577%200-1.044.468-1.044%201.044v3.13c0%20.577-.466%201.044-1.043%201.044H1.044c-.577%200-1.044.467-1.044%201.044v4.174C0%2017.533.467%2018%201.044%2018h10.434c.577%200%201.044-.467%201.044-1.043v-3.13c0-.578.466-1.044%201.043-1.044h9.391c.577%200%201.044-.467%201.044-1.044V7.565c0-.576-.467-1.044-1.044-1.044z'%3e%3c/path%3e%3c/svg%3e`,Rk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eStepfun%3c/title%3e%3cpath%20d='M22.012%200h1.032v.927H24v.968h-.956V3.78h-1.032V1.896h-1.878v-.97h1.878V0zM2.6%2012.371V1.87h.969v10.502h-.97zm10.423.66h10.95v.918h-6.208v9.579h-4.742V13.03zM5.629%203.333v12.356H0v4.51h10.386V8L20.859%208l-.003-4.668-15.227.001z'%20fill='url(%23lobe-icons-stepfun-_R_0_)'%20fill-rule='evenodd'%3e%3c/path%3e%3cdefs%3e%3clinearGradient%20gradientUnits='userSpaceOnUse'%20id='lobe-icons-stepfun-_R_0_'%20x1='1.646'%20x2='18.342'%20y1='1.916'%20y2='22.091'%3e%3cstop%20stop-color='%2301A9FF'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%230160FF'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e`,zk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eTencentCloud%3c/title%3e%3cpath%20d='M20.0483%2017.1416C19.6945%2017.4914%2018.987%2018.0161%2017.7488%2018.0161C17.2182%2018.0161%2016.5991%2018.0161%2016.3338%2018.0161C15.98%2018.0161%2013.3268%2018.0161%2010.143%2018.0161C12.4424%2015.8298%2014.3881%2013.9932%2014.565%2013.8183C14.7419%2013.6434%2015.1841%2013.2061%2015.6263%2012.8563C16.5107%2012.0692%2017.2182%2011.9817%2017.8373%2011.9817C18.7217%2011.9817%2019.4292%2012.3316%2020.0483%2012.8563C21.2864%2013.9932%2021.2864%2016.0047%2020.0483%2017.1416ZM21.5518%2011.457C20.6674%2010.495%2019.3408%209.88281%2017.9257%209.88281C16.6875%209.88281%2015.6263%2010.3201%2014.6534%2011.0197C14.2997%2011.3695%2013.769%2011.7194%2013.3268%2012.2441C12.9731%2012.5939%205.36719%2019.9401%205.36719%2019.9401C5.80939%2020.0276%206.34003%2020.0276%206.78223%2020.0276C7.22443%2020.0276%2016.0685%2020.0276%2016.4222%2020.0276C17.1298%2020.0276%2017.6604%2020.0276%2018.191%2019.9401C19.3408%2019.8527%2020.4905%2019.4154%2021.4633%2018.5409C23.4975%2016.6168%2023.4975%2013.381%2021.5518%2011.457Z'%20fill='%2300A3FF'%3e%3c/path%3e%3cpath%20d='M9.1701%2010.9323C8.19726%2010.2326%207.22442%209.88281%206.07469%209.88281C4.65965%209.88281%203.33304%2010.495%202.44864%2011.457C0.502952%2013.4685%200.502952%2016.6168%202.53708%2018.6283C3.42148%2019.4154%204.30589%2019.8527%205.36717%2019.9401L7.4013%2018.0161C7.04754%2018.0161%206.60533%2018.0161%206.25157%2018.0161C5.10185%2017.9287%204.39433%2017.5789%203.95212%2017.1416C2.71396%2015.9172%202.71396%2013.9932%203.86368%2012.7688C4.48277%2012.1566%205.19029%2011.8943%206.07469%2011.8943C6.60533%2011.8943%207.4013%2011.9817%208.19726%2012.7688C8.55102%2013.1186%209.52386%2013.8183%209.87763%2014.1681H9.96607L11.2927%2012.8563V12.7688C10.6736%2012.1566%209.70075%2011.3695%209.1701%2010.9323Z'%20fill='%2300C8DC'%3e%3c/path%3e%3cpath%20d='M18.4564%208.74536C17.4836%206.12171%2014.9188%204.28516%2012.0003%204.28516C8.5511%204.28516%205.80945%206.82135%205.27881%209.96973C5.54413%209.96973%205.80945%209.88228%206.16321%209.88228C6.51697%209.88228%206.95917%209.96973%207.31294%209.96973C7.75514%207.78336%209.70082%206.20917%2012.0003%206.20917C13.946%206.20917%2015.6263%207.34608%2016.4223%209.00773C16.4223%209.00773%2016.5107%209.09518%2016.5107%209.00773C17.1298%208.92027%2017.8373%208.74536%2018.4564%208.74536C18.4564%208.83282%2018.4564%208.83282%2018.4564%208.74536Z'%20fill='%23006EFF'%3e%3c/path%3e%3c/svg%3e`,Bk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.25'%20d='M27.539%2018.922C29.2526%2018.922%2030.8959%2018.2413%2032.1076%2017.0296C33.3193%2015.8179%2034%2014.1746%2034%2012.461C34%2010.7474%2033.3193%209.10406%2032.1076%207.89238C30.8959%206.68071%2029.2526%206%2027.539%206C25.8254%206%2024.1821%206.68071%2022.9704%207.89238C21.7587%209.10406%2021.078%2010.7474%2021.078%2012.461C21.078%2014.1746%2021.7587%2015.8179%2022.9704%2017.0296C24.1821%2018.2413%2025.8254%2018.922%2027.539%2018.922ZM27.539%2034C29.2526%2034%2030.8959%2033.3193%2032.1076%2032.1076C33.3193%2030.8959%2034%2029.2526%2034%2027.539C34%2025.8254%2033.3193%2024.1821%2032.1076%2022.9704C30.8959%2021.7587%2029.2526%2021.078%2027.539%2021.078C25.8254%2021.078%2024.1821%2021.7587%2022.9704%2022.9704C21.7587%2024.1821%2021.078%2025.8254%2021.078%2027.539C21.078%2029.2526%2021.7587%2030.8959%2022.9704%2032.1076C24.1821%2033.3193%2025.8254%2034%2027.539%2034ZM12.461%2034C14.1746%2034%2015.8179%2033.3193%2017.0296%2032.1076C18.2413%2030.8959%2018.922%2029.2526%2018.922%2027.539C18.922%2025.8254%2018.2413%2024.1821%2017.0296%2022.9704C15.8179%2021.7587%2014.1746%2021.078%2012.461%2021.078C10.7474%2021.078%209.10406%2021.7587%207.89238%2022.9704C6.68071%2024.1821%206%2025.8254%206%2027.539C6%2029.2526%206.68071%2030.8959%207.89238%2032.1076C9.10406%2033.3193%2010.7474%2034%2012.461%2034Z'%20fill='currentColor'/%3e%3cpath%20d='M12.461%2018.922C16.0293%2018.922%2018.922%2016.0293%2018.922%2012.461C18.922%208.89269%2016.0293%206%2012.461%206C8.89269%206%206%208.89269%206%2012.461C6%2016.0293%208.89269%2018.922%2012.461%2018.922Z'%20fill='currentColor'/%3e%3c/svg%3e`,Vk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eVercel%3c/title%3e%3cpath%20d='M12%200l12%2020.785H0L12%200z'%3e%3c/path%3e%3c/svg%3e`,Hk=`data:image/svg+xml,%3csvg%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eVolcengine%3c/title%3e%3cpath%20d='M19.44%2010.153l-2.936%2011.586a.215.215%200%2000.214.261h5.87a.215.215%200%2000.214-.261l-2.95-11.586a.214.214%200%2000-.412%200zM3.28%2012.778l-2.275%208.96A.214.214%200%20001.22%2022h4.532a.212.212%200%2000.214-.165.214.214%200%20000-.097l-2.276-8.96a.214.214%200%2000-.41%200z'%20fill='%2300E5E5'%3e%3c/path%3e%3cpath%20d='M7.29%205.359L3.148%2021.738a.215.215%200%2000.203.261h8.29a.214.214%200%2000.215-.261L7.7%205.358a.214.214%200%2000-.41%200z'%20fill='%23006EFF'%3e%3c/path%3e%3cpath%20d='M14.44.15a.214.214%200%2000-.41%200L8.366%2021.739a.214.214%200%2000.214.261H19.9a.216.216%200%2000.171-.078.214.214%200%2000.044-.183L14.439.15z'%20fill='%23006EFF'%3e%3c/path%3e%3cpath%20d='M10.278%207.741L6.685%2021.736a.214.214%200%2000.214.264h7.17a.215.215%200%2000.214-.264L10.688%207.741a.214.214%200%2000-.41%200z'%20fill='%2300E5E5'%3e%3c/path%3e%3c/svg%3e`,Uk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.4579%2015.6036L26.1529%2035H20.0656L6.37059%2015.6036H12.4579ZM12.4524%2026.3764L15.4974%2030.6909L12.4551%2035H6.36377L12.4524%2026.3764ZM33.6365%207.15727V35H28.647V14.2236L33.6365%207.15727ZM33.6365%205L20.0656%2024.2205L17.0206%2019.9073L27.5451%205H33.6365Z'%20fill='currentColor'/%3e%3c/svg%3e`,Wk=`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eXiaomiMiMo%3c/title%3e%3cpath%20d='M.958%2015.936a.459.459%200%2001.459.44v2.729a.46.46%200%2001-.918%200v-2.729a.459.459%200%2001.459-.44zm4.814-2.035a.46.46%200%2001.553.45v4.754a.458.458%200%2011-.918%200V15.48L3.74%2017.202a.462.462%200%2001-.655.016.462.462%200%2001-.065-.082L.628%2014.67a.459.459%200%2001.658-.637l2.124%202.187%202.127-2.188a.46.46%200%2001.235-.13zm2.068.004a.46.46%200%2001.458.445v4.755a.46.46%200%2001-.458.458.459.459%200%2001-.458-.458V14.35a.459.459%200%2001.458-.445zm1.973%202.014a.46.46%200%2001.46.457v2.729a.46.46%200%2001-.784.324.46.46%200%2001-.134-.324v-2.729a.46.46%200%2001.458-.458zm.002-2.045a.458.458%200%2001.328.157l2.127%202.19%202.125-2.19a.459.459%200%2001.784.318v4.756a.46.46%200%2001-.455.458.46.46%200%2001-.458-.458V15.48l-1.667%201.723a.46.46%200%2001-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46%200%2001-.008-.667.461.461%200%2001.338-.128zm6.797%201.206a.46.46%200%2001.53.651A1.966%201.966%200%200019.81%2018.4a.462.462%200%2001.623.18.46.46%200%2001-.181.624%202.863%202.863%200%2001-1.38.353l-.142-.004a2.88%202.88%200%2001-2.393-4.263.461.461%200%2001.274-.21zm.864-.931a2.884%202.884%200%20013.915%203.914.46.46%200%2001-.402.24l-.057-.004a.458.458%200%2001-.164-.055.46.46%200%2001-.182-.622%201.967%201.967%200%2000-2.669-2.67.459.459%200%2011-.441-.803zM9.59%206.368c1.481%200%201.696%201.202%201.696%201.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133%200-1.289-.03-1.384-1.136-.082-.932.675-1.61%202.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379%201.012-.567%201.764-.567zm4.427.1c1.263%200%202.082.97%202.083%202.15%200%201.181-.824%202.154-2.083%202.154-1.26%200-2.084-.972-2.084-2.152%200-1.18.82-2.153%202.084-2.153zm6.801.015c.68%200%201.202.465%201.197%201.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628%200-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22%201.22%200%2001.947-.516c.398%200%20.76.193.982.686a1.321%201.321%200%20011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311%208.07l2.14%202.602H4.24L2.725%208.796%201.21%2010.672H0L2.138%208.07.13%205.583h1.138l1.458%201.772zm4.149%203.317h-.916V6.644h.916v4.028zm16.99%200h-.916V6.644h.916v4.028zM9.925%208.71c-1.055%200-1.359.412-1.326.742.032.329.324.537.757.537a1.013%201.013%200%20001.014-.968l.002-.31h-.447zM14.018%207.3c-.663%200-1.184.487-1.184%201.32%200%20.832.52%201.32%201.184%201.32.662%200%201.182-.49%201.182-1.32%200-.832-.52-1.32-1.182-1.32zM6.417%205.001a.568.568%200%2001.587.582.588.588%200%2001-1.175%200A.57.57%200%20016.417%205zm16.991%200a.57.57%200%2001.592.582.588.588%200%2001-1.174%200%20.57.57%200%2001.357-.542.572.572%200%2001.225-.04z'%3e%3c/path%3e%3c/svg%3e`,Gk=`data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M20.1312%207.50002L17.4088%2011.1913H5.81625L8.5375%207.50002H20.1325H20.1312ZM34.0675%2028.81L31.3475%2032.5H19.795L22.5125%2028.81H34.0675ZM35%207.50002L16.58%2032.5H5L23.42%207.50002H35Z'%20fill='currentColor'/%3e%3c/svg%3e`,Kk={alibaba:ck,"alibaba-cn":ck,"alibaba-coding-plan":ck,"alibaba-coding-plan-cn":ck,"alibaba-token-plan":ck,"alibaba-token-plan-cn":ck,"amazon-bedrock":lk,anthropic:uk,"claude-subscription":uk,"google-antigravity":dk,azure:fk,"azure-openai-responses":fk,cerebras:pk,cloudflare:mk,"cloudflare-workers-ai":mk,cohere:hk,cursor:gk,deepinfra:_k,deepseek:vk,fireworks:yk,"fireworks-ai":yk,"github-copilot":bk,google:xk,"google-gemini-cli":xk,"google-vertex":xk,groq:Sk,huggingface:Ck,hunyuan:wk,kimi:Tk,"kimi-code":Tk,"kimi-coding":Tk,"kimi-coding-plan":Tk,"kimi-for-coding":Tk,meta:Ek,minimax:kk,"minimax-cn":kk,"minimax-coding-plan":kk,mistral:Ak,moonshot:jk,"moonshot-global":jk,moonshotai:jk,nvidia:Mk,ollama:Nk,"ollama-cloud":Nk,openai:Pk,"openai-codex":Pk,opencode:Fk,"opencode-free":Fk,"opencode-go":Fk,openrouter:Ik,siliconcloud:Lk,siliconflow:Lk,stepfun:Rk,"stepfun-ai":Rk,"stepfun-ai-step-plan":Rk,"stepfun-step-plan":Rk,tencent:zk,"tencent-coding-plan":zk,"tencent-token-plan":zk,"tencent-tokenhub":wk,"lm-studio":Dk,lmstudio:Dk,localai:Ok,"local-ai":Ok,together:Bk,togetherai:Bk,vercel:Vk,volcengine:Hk,"volcengine-agent-plan":Hk,"volcengine-ark":Hk,"volcengine-coding-plan":Hk,xai:Uk,"xai-oauth":Uk,xiaomi:Wk,xiaomimimo:Wk,"xiaomi-token-plan-ams":Wk,"xiaomi-token-plan-cn":Wk,"xiaomi-token-plan-sgp":Wk,zai:Gk,"z-ai":Gk,"zai-coding-plan":Gk,zenmux:`data:image/svg+xml,%3csvg%20fill='currentColor'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eZenMux%3c/title%3e%3cg%20transform='scale(0.15)'%3e%3cpath%20clip-rule='evenodd'%20d='M76.5655%2012.5465C83.6841%2012.273%2098.0909%2013.2144%20109.616%2023.5631C119.071%2032.0522%20122.328%2047.7904%20120.125%2059.9938C118.105%2071.1802%20113.346%2080.3327%20115.21%2088.8073C117.074%2097.2819%20121.818%20101.46%20125.854%20103.215C129.752%20104.909%20133.52%20104.401%20132.803%20107.621C132.085%20110.841%20127.21%20112.028%20123.65%20112.028C121.698%20112.028%20115.795%20111.519%20113.176%20109.824C110.081%20107.821%20109.391%20106.026%20108.213%20104.583C108.013%20104.338%20107.66%20104.509%20107.707%20104.821C108.244%20108.371%20109.724%20114.394%20112.125%20118.13C114.068%20121.152%20114.871%20123.356%20119.322%20127.085C123.774%20130.813%20125.853%20134.203%20121.525%20136.604C117.68%20138.736%20109.322%20134.373%20104.407%20128.977C99.9829%20124.12%2096.9028%20118.129%2095.6846%20114.231C95.0335%20112.147%2094.3811%20108.562%2093.7296%20105.63C93.644%20105.244%2093.116%20105.306%2093.1046%20105.701C92.8883%20113.164%2091.7152%20120.291%2090.0001%20127.932C88.7652%20133.433%2085.7626%20140.135%2083.0508%20144.203C79.7442%20149.163%2074.8354%20150.711%2071.1866%20149.355C68.2684%20148.27%2070.3392%20144.582%2071.1866%20141.389C72.034%20138.197%2073.7294%20131.519%2074.8712%20124.203C75.9046%20117.581%2076.1781%20111.026%2075.7178%20104.815C75.6893%20104.436%2075.1073%20104.378%2074.9893%20104.739C74.0382%20107.652%2072.2455%20112.481%2070.9376%20115.418C68.2097%20121.543%2066.1909%20124.231%2060.5977%20130.672C55.5676%20136.464%2041.1004%20144.655%2039.2422%20136.604C38.7338%20134.401%2041.3978%20133.436%2043.8546%20131.519C47.5476%20128.638%2050.6336%20123.525%2053.5596%20117.282C56.1869%20111.676%2057.5223%20106.253%2057.7266%20102.791C57.746%20102.457%2057.3268%20102.331%2057.1387%20102.607C55.9225%20104.391%2054.1317%20106.805%2052.1592%20108.807C48.8643%20112.152%2045.2098%20115.595%2040.9717%20117.282C34.1576%20119.994%2027.2089%20118.129%2027.7169%20113.215C28.1415%20109.109%2032.725%20109.959%2038.4307%20103.734C44.0239%2097.6323%2045.8876%2092.8857%2046.2266%2087.6315C46.4975%2083.428%2042.3854%2073.4513%2040.295%2068.9879C36.9616%2061.8693%2034.4984%2041.666%2044.5323%2028.6491C57.0743%2012.3784%2072.1582%2012.7159%2076.5655%2012.5465ZM57.0001%2040.9997C52.3335%2040.9997%2050.0002%2044.5815%2050.0001%2048.9997C50.0001%2053.4179%2052.5927%2056.9997%2057.0001%2056.9997C61.4074%2056.9996%2064.0001%2053.4179%2064.0001%2048.9997C63.9999%2044.5816%2061.6666%2040.9997%2057.0001%2040.9997ZM95.0001%2040.9997C90.3335%2040.9997%2088.0002%2044.5815%2088.0001%2048.9997C88.0001%2053.4179%2090.5927%2056.9997%2095.0001%2056.9997C99.4074%2056.9996%20102%2053.4179%20102%2048.9997C102%2044.5816%2099.6666%2040.9997%2095.0001%2040.9997Z'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/svg%3e`},qk=[[/deepseek/i,`deepseek`],[/(?:xiaomi|mimo)/i,`xiaomimimo`],[/kimi/i,`kimi`],[/moonshot/i,`moonshot`],[/(?:claude|anthropic)/i,`anthropic`],[/gemini/i,`google`],[/qwen/i,`alibaba`],[/llama/i,`meta`],[/minimax/i,`minimax`],[/(?:mistral|mixtral)/i,`mistral`],[/grok/i,`xai`],[/(?:openai|chatgpt|gpt[-_.:0-9])/i,`openai`],[/(?:^|[^a-z0-9])o[134](?:[^a-z0-9]|$)/i,`openai`],[/(?:^|[^a-z0-9])glm[-_.:0-9]/i,`zai`],[/doubao/i,`volcengine`],[/hunyuan/i,`hunyuan`],[/(?:stepfun|(?:^|[/_.:-])step-[0-9])/i,`stepfun`],[/(?:cohere|command[-_.:0-9])/i,`cohere`]],Jk={anthropic:`#d8765b`,deepseek:`#4d6bfe`,google:`#4285f4`,"google-gemini-cli":`#4285f4`,"google-vertex":`#4285f4`,"google-antigravity":`#6387ed`,meta:`#1685f8`,azure:`#168cda`,"azure-openai-responses":`#168cda`,"amazon-bedrock":`#e99b32`,alibaba:`#ed7d31`,"alibaba-cn":`#ed7d31`,mistral:`#ef8b31`,nvidia:`#76b900`,cohere:`#659a81`,groq:`#ef6847`};function Yk({id:e,modelId:t,modelName:n}){let r=e.trim().toLowerCase(),i=`${t??``} ${n??``}`,a=Object.hasOwn(Kk,r)?r:qk.find(([e])=>e.test(i))?.[1],o=a?Kk[a]:void 0;return(0,q.jsx)(`span`,{className:`models-provider-icon${o?``:` models-provider-connection`}`,"aria-hidden":`true`,style:o?{maskImage:`url("${o}")`,color:Jk[r]??(a?Jk[a]:void 0)}:void 0,children:!o&&(0,q.jsx)(Oc,{strokeWidth:1.75})})}function Xk({snapshot:e,model:t,pending:n,disabled:r,actions:i,onChooseModel:a,onClose:o,active:s=!0}){let{t:c}=W(),l=e?.thinking,u=n??l?.level??``,d=e?.preferences.hiddenThinkingLevels??[],f=(l?.available??[]).filter(e=>!d.some(t=>t===e)||e===u||e===l?.level),[p]=(0,K.useState)(l?.level??``),[m,h]=(0,K.useState)(null),g=(0,K.useRef)(null),_=(0,K.useRef)(null),v=(0,K.useId)(),y=e=>e?e[0].toUpperCase()+e.slice(1):c(`unknownState`),b=()=>{g.current=null,h(null)};(0,K.useEffect)(()=>(s&&_.current?.focus(),()=>{g.current=null}),[s]);let x=()=>{let e=g.current;if(b(),e===null||r||!l?.supported)return;let t=f[e];t&&t!==u&&i.selectThinking(t)},S=m??Math.max(0,f.indexOf(u)),C=m===null?u:f[S]??u;return(0,q.jsxs)(`div`,{className:`thinking-controls`,children:[(0,q.jsxs)(`div`,{className:`thinking-strength`,"aria-live":`polite`,children:[(0,q.jsx)(`small`,{children:c(`thinkingLevel`)}),(0,q.jsx)(`span`,{children:y(C)})]}),(0,q.jsxs)(`div`,{className:`thinking-slider`,style:{"--thinking-position":f.length>1?S/(f.length-1):0},children:[(0,q.jsx)(`div`,{className:`thinking-slider-dots`,"aria-hidden":`true`,children:f.map((e,t)=>(0,q.jsx)(`span`,{"data-filled":t<=S},e))}),(0,q.jsx)(`input`,{ref:_,type:`range`,"aria-label":c(`thinkingLevel`),"aria-valuetext":y(C),"aria-describedby":v,min:0,max:Math.max(0,f.length-1),step:1,value:S,disabled:r||!l?.supported||f.length<2,onChange:e=>{g.current=Number(e.target.value),h(g.current)},onPointerUp:x,onPointerCancel:b,onBlur:x,onKeyUp:e=>{[`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`].includes(e.key)&&x()},onKeyDown:e=>{e.key===`Escape`&&(b(),o(),e.preventDefault(),e.stopPropagation())}})]}),(0,q.jsx)(`p`,{className:`thinking-available-levels`,id:v,children:c(`thinkingAvailableLevels`,{levels:f.map(y).join(` · `)})}),(0,q.jsx)(V,{content:`${t?sk(t):c(`selectModel`)} · ${c(`selectModel`)}`,placement:`above`,children:(0,q.jsxs)(`button`,{type:`button`,className:`thinking-model-link`,disabled:n!==null,onClick:a,children:[t&&(0,q.jsx)(Yk,{id:t.provider,modelId:t.id,modelName:t.name}),(0,q.jsx)(`span`,{children:t?.name||t?.id||c(`selectModel`)}),(0,q.jsx)(os,{"aria-hidden":`true`})]})}),(0,q.jsx)(V,{content:c(`resetThinking`,{level:y(p)}),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,className:`thinking-reset`,"aria-label":c(`resetThinking`,{level:y(p)}),disabled:r||!f.includes(p)||u===p,onClick:()=>{b(),i.selectThinking(p)},children:(0,q.jsx)(he,{"aria-hidden":`true`})})}),l&&!f.includes(l.level)&&(0,q.jsx)(`p`,{className:`thinking-control-notice`,role:`status`,children:c(`thinkingLevelMismatch`)})]})}var Zk=250;function Qk(e){let{t}=W(),[n,r]=(0,K.useState)(``),[i,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(!1),c=(0,K.useRef)(e.modelSearch);(0,K.useEffect)(()=>{o&&(c.current=e.modelSearch)},[o,e.modelSearch]);let l=o?e.modelSearch:c.current,u=(0,K.useRef)(!1),d=(0,K.useRef)(null),f=(0,K.useRef)(null),p=(0,K.useRef)(null),m=(0,K.useId)(),h=(0,K.useRef)([]),g=e.draftModel??e.currentModel,_=e.thinkingDisabledReason===`thinkingInactiveHint`?void 0:e.snapshot?.thinking,v=_?.supported===!0,y=e.thinkingPendingLevel??_?.level??`off`,b=(i??(v?`thinking`:`models`))===`thinking`,x=e.snapshot?.models??[],S=(e.snapshot?.truncation.modelsOmitted??0)>0,C=x.length>0||S,w=n.trim(),T=l.query===w,E=S&&!!w&&(!T||l.status===`loading`),D=w?S?T?l.models:[]:x.filter(e=>[e.provider,e.id,e.name,e.label].some(e=>e.toLocaleLowerCase().includes(w.toLocaleLowerCase()))):x,O=new Map;for(let e of D){let t=O.get(e.provider);t?t.push(e):O.set(e.provider,[e])}let k=[...O.values()].flat(),A=e.actions.searchModels,j=e.modelSearch.query,M=e.modelSearch.status;(0,K.useEffect)(()=>{if(!o||!S||!w||j===w&&M!==`idle`)return;let e=window.setTimeout(()=>{A(w)},Zk);return()=>window.clearTimeout(e)},[o,S,w,A,j,M]);let N=(t,n)=>{e.actions.selectModel(`${t.provider}/${t.id}`),n()},P=g?sk(g):t(e.snapshot?C?`selectModel`:`configureModels`:`loadingModels`),F=!e.snapshot||e.sessionSwitching||e.modelSelectionPending||e.promptAdmissionPending||!e.workspaceDraft&&!!e.snapshot?.selectedSession&&!HD(e.snapshot)||e.liveRunning;(0,K.useEffect)(()=>{if(!o){u.current=!1;return}e.thinkingNeedsSession&&(g||b)&&!u.current&&(u.current=!0,e.actions.prepareSession())},[o,b,g,e.thinkingNeedsSession,e.actions]),(0,K.useEffect)(()=>{if(!o||b)return;let e=requestAnimationFrame(()=>p.current?.focus());return()=>cancelAnimationFrame(e)},[o,b]),(0,K.useEffect)(()=>{if(!o)return;let e=e=>{let t=e.target;d.current=t instanceof Element&&!t.closest(`.astryx-complex-selector-popup, .model-picker`)?t.closest(`button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex], [contenteditable='true']`):null};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[o]);let I=JSON.stringify([e.snapshot?.currentSessionId,e.snapshot?.currentSessionPath,g?.provider,g?.id]),ee=(0,K.useRef)(I);(0,K.useEffect)(()=>{ee.current!==I&&a(null),b&&ee.current!==I&&!u.current&&f.current?.close(),ee.current=I,e.thinkingNeedsSession||(u.current=!1)},[I,b,e.thinkingNeedsSession]),(0,K.useEffect)(()=>{F&&!u.current&&f.current?.close()},[F]);let L=(0,K.useRef)(e.openRequest);return(0,K.useEffect)(()=>{e.openRequest!==L.current&&(L.current=e.openRequest,e.openRequest&&!F&&(a(`models`),f.current?.open()))},[e.openRequest,F]),(0,q.jsx)(ok,{className:`model-selector model-picker${o?` is-open`:``}`,label:v?`${P}, ${t(`thinkingLevel`)}: ${y}`:P,isLabelHidden:!0,value:g?`${g.provider}/${g.id}`:``,triggerLabel:(0,q.jsxs)(`span`,{className:`model-thinking-label`,title:P,children:[g&&(0,q.jsx)(Yk,{id:g.provider,modelId:g.id,modelName:g.name}),(0,q.jsx)(`span`,{className:`model-picker-label`,children:g?.name||g?.id||P}),v&&(0,q.jsx)(`span`,{className:`model-picker-thinking`,children:y[0].toUpperCase()+y.slice(1)})]}),variant:`ghost`,size:`sm`,placement:`above`,alignment:`end`,isDisabled:F,isLoading:e.modelSelectionPending,handleRef:f,onOpenChange:t=>{s(t),t&&r(``),t||(e.actions.clearModelSearch(),d.current?.isConnected&&d.current.focus({preventScroll:!0}),d.current=null)},children:(i,s,c)=>e.thinkingNeedsSession&&(g||b)?(0,q.jsx)(`p`,{className:`thinking-preparing`,role:`status`,children:t(`switchingSession`)}):b?(0,q.jsx)(Xk,{active:o,snapshot:e.snapshot,model:g,pending:e.thinkingPendingLevel??null,disabled:F||!!e.thinkingDisabledReason,actions:e.actions,onClose:c,onChooseModel:()=>a(`models`)},JSON.stringify([I,o])):(0,q.jsxs)(`div`,{className:`model-search-panel ${S?`searchable`:``}`,children:[v&&(0,q.jsxs)(`button`,{type:`button`,className:`model-thinking-back`,onClick:()=>a(`thinking`),children:[(0,q.jsx)(Ko,{"aria-hidden":`true`}),t(`thinkingLevel`)]}),S&&(0,q.jsx)(`p`,{className:`model-search-truncation`,role:`status`,children:t(`modelsTruncated`,{shown:x.length,omitted:e.snapshot?.truncation.modelsOmitted??0})}),e.snapshot&&!C&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`noModels`)}),C&&(0,q.jsxs)(`label`,{className:`model-search-input`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:t(`searchModels`)}),(0,q.jsx)(`input`,{ref:p,name:`model-search`,autoComplete:`off`,spellCheck:!1,"aria-controls":m,value:n,placeholder:t(`searchModelsPlaceholder`),onChange:t=>{let n=t.currentTarget.value;r(n),n.trim()||e.actions.clearModelSearch()},onKeyDown:e=>{e.nativeEvent.isComposing||e.keyCode===229||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),c()):e.key===`ArrowDown`&&k.length&&(e.preventDefault(),e.stopPropagation(),h.current[0]?.focus()))}})]}),E&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`searchingModels`)}),S&&w&&T&&l.status===`error`&&(0,q.jsxs)(`p`,{className:`model-search-status model-search-error`,role:`alert`,children:[l.error??t(`modelSearchFailed`),(0,q.jsx)(V,{content:t(`retryModelSearch`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,className:`model-search-retry`,"aria-label":t(`retryModelSearch`),onClick:()=>void A(w),children:(0,q.jsx)(he,{"aria-hidden":`true`})})})]}),C&&w&&(!S||T&&l.status===`ready`)&&k.length===0&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`noMatchingModels`)}),S&&w&&T&&l.status===`ready`&&l.matchesOmitted>0&&(0,q.jsx)(`p`,{className:`model-search-status`,role:`status`,children:t(`modelSearchTruncated`,{omitted:l.matchesOmitted})}),C&&(0,q.jsx)(`div`,{className:`model-search-options`,id:m,role:`listbox`,"aria-label":t(`selectModel`),"aria-busy":E,children:k.map((t,n)=>{let r=g?.provider===t.provider&&g.id===t.id;return(0,q.jsxs)(K.Fragment,{children:[(n===0||k[n-1]?.provider!==t.provider)&&(0,q.jsx)(`div`,{className:`model-provider-heading`,"aria-hidden":`true`,children:t.provider}),(0,q.jsxs)(`button`,{className:`model-search-option`,type:`button`,disabled:e.thinkingPendingLevel!=null,role:`option`,"aria-selected":r,"aria-label":sk(t),title:sk(t),ref:e=>{h.current[n]=e},onClick:()=>N(t,c),onKeyDownCapture:e=>{if(e.nativeEvent.isComposing||e.keyCode===229)return;if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),c();return}if(e.key===`ArrowUp`&&n===0){e.preventDefault(),e.stopPropagation(),p.current?.focus();return}let t=e.key===`ArrowDown`?Math.min(n+1,k.length-1):e.key===`ArrowUp`?Math.max(n-1,0):e.key===`Home`?0:e.key===`End`?k.length-1:null;t!==null&&t!==n&&(e.preventDefault(),e.stopPropagation(),h.current[t]?.focus())},children:[(0,q.jsx)(`span`,{className:`model-option-icon`,"aria-hidden":`true`,children:(0,q.jsx)(Yk,{id:t.provider,modelId:t.id,modelName:t.name})}),(0,q.jsxs)(`span`,{className:`model-menu-item-text`,children:[(0,q.jsx)(`span`,{className:`model-menu-item-label`,children:t.name||t.id}),t.name&&t.name!==t.id&&(0,q.jsx)(`span`,{className:`model-menu-item-sub`,children:t.id})]}),r&&(0,q.jsx)(rs,{className:`model-option-check`,"aria-hidden":`true`})]})]},`${t.provider}/${t.id}`)})}),e.onOpenProviders&&(0,q.jsxs)(q.Fragment,{children:[g&&_&&!v&&(0,q.jsx)(`p`,{className:`model-search-status`,children:t(`modelThinkingNotEnabled`)}),(0,q.jsxs)(`button`,{className:`model-settings-command`,type:`button`,onClick:()=>{c(),e.onOpenProviders?.()},children:[(0,q.jsx)(kc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:t(`openModelSettings`)}),(0,q.jsx)(os,{className:`model-settings-chevron`,"aria-hidden":`true`})]})]})]})})}var $k=`openpi-slash-command-list`;function eA(e){return`openpi-slash-command-${e}`}function tA(e,t){let n=t.trim().toLocaleLowerCase(),r=n?e.filter(e=>e.name.toLocaleLowerCase().includes(n)):[],i=n?r.length>0?r:e.filter(e=>[e.description,e.source].some(e=>e?.toLocaleLowerCase().includes(n))):[...e];return[...i.filter(e=>e.availability===`available`),...i.filter(e=>e.availability===`unsupported`)]}function nA({source:e}){return e===`extension`?(0,q.jsx)(Cc,{}):e===`prompt`?(0,q.jsx)(Fs,{}):(0,q.jsx)(Pc,{})}function rA(e){let{t}=W(),n=(0,K.useRef)(null),r=e.open!==!1,i=(0,K.useRef)(e);(0,K.useLayoutEffect)(()=>{r&&(i.current=e)},[r,e]);let a=r?e:i.current,o={hidden:!r,inert:!r};(0,K.useLayoutEffect)(()=>{let e=n.current,t=e?.parentElement;if(!r||!e||!t||!a.preferBelow)return;let i=()=>{let n=window.visualViewport,r=n?.offsetTop??0,i=n?.height??window.innerHeight,a=r+i,o=t.getBoundingClientRect(),s=Math.max(0,a-o.bottom-8-12),c=Math.max(0,o.top-r-8-12),l=s>=Math.min(e.scrollHeight,224,i*.32)||s>=c?`below`:`above`,u=l===`below`?s:c;e.dataset.placement=l,e.style.setProperty(`--slash-command-available-height`,`${Math.floor(u)}px`)};i();let o=new ResizeObserver(i);return o.observe(e),o.observe(t),window.addEventListener(`resize`,i),window.visualViewport?.addEventListener(`resize`,i),window.visualViewport?.addEventListener(`scroll`,i),()=>{o.disconnect(),window.removeEventListener(`resize`,i),window.visualViewport?.removeEventListener(`resize`,i),window.visualViewport?.removeEventListener(`scroll`,i)}},[r,a.preferBelow]);let s=a.commands[a.activeIndex];return(0,K.useEffect)(()=>{!r||!s||(n.current?.querySelector(`[data-command-index="${a.activeIndex}"]`))?.scrollIntoView?.({block:`nearest`,inline:`nearest`})},[r,s,a.activeIndex]),a.draft?(0,q.jsx)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`status`,children:t(`commandSessionRequired`)}):a.commandDiscovery.status===`idle`||a.commandDiscovery.status===`loading`?(0,q.jsx)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`status`,children:t(`commandsLoading`)}):a.commandDiscovery.status===`error`?(0,q.jsxs)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`alert`,children:[(0,q.jsx)(`strong`,{children:t(`commandsUnavailable`)}),(0,q.jsx)(`span`,{children:a.commandDiscovery.error})]}):a.commandDiscovery.status===`ready`&&a.commands.length===0?(0,q.jsx)(`div`,{...o,ref:n,className:`slash-command-menu slash-command-state`,role:`status`,children:t(`commandsNoMatch`)}):(0,q.jsxs)(`div`,{...o,ref:n,className:`slash-command-menu`,children:[(0,q.jsx)(`div`,{id:$k,role:`listbox`,"aria-label":t(`commands`),children:a.commands.map((e,n)=>{let r=e.availability===`unsupported`;return(0,q.jsxs)(`button`,{id:eA(n),"data-command-index":n,className:`slash-command-option`,type:`button`,role:`option`,"aria-selected":n===a.activeIndex,"aria-disabled":r,disabled:r,onMouseEnter:()=>a.onSelect(n),onMouseDown:e=>e.preventDefault(),onClick:()=>a.onComplete(e),children:[(0,q.jsx)(`span`,{className:`slash-command-icon`,children:(0,q.jsx)(nA,{source:e.source})}),(0,q.jsxs)(`span`,{className:`slash-command-copy`,children:[(0,q.jsxs)(`span`,{className:`slash-command-heading`,children:[(0,q.jsxs)(`strong`,{children:[`/`,e.name]}),(0,q.jsx)(`span`,{children:t(`commandSource_${e.source}`)})]}),e.description&&(0,q.jsx)(`span`,{children:e.description}),r&&(0,q.jsx)(`span`,{children:t(`commandUnavailable_${e.unavailableReason??`not_integrated`}`)}),e.support&&(0,q.jsx)(`span`,{children:t(`commandSupport_${e.support}`)})]}),(0,q.jsx)(`span`,{className:`slash-command-support`,children:r?t(`commandUnsupported`):e.action?t(`commandOpensPanel`):e.argumentHint?t(`commandAcceptsArguments`):null})]},`${e.source}:${e.name}`)})}),a.commandDiscovery.commandsOmitted>0&&(0,q.jsx)(`div`,{className:`slash-command-bounded`,role:`status`,children:t(`commandsBounded`,{count:a.commandDiscovery.commandsOmitted})})]})}function iA(e){return{key:JSON.stringify([`workspace`,e]),kind:`workspace`,workspacePath:e}}function aA(e){return{key:JSON.stringify([`session`,e.id,e.path]),kind:`session`,workspacePath:e.cwd,sessionId:e.id,sessionPath:e.path}}function oA(e){let{t}=W(),n=e.snapshot?.selectedSession,r=e.selectedPath===void 0?n?.path??null:e.selectedPath,i=n?.path===r?n.path:null,a=!e.workspaceDraft&&!e.sessionSwitching&&n&&i?aA(n):null,[o]=(0,K.useState)(()=>rO(nO())),s=(0,K.useSyncExternalStore)(o.subscribe,o.storageState),c=(0,K.useRef)(a??iA(e.selectedWorkspace)),l=e.workspaceDraft||!n&&!e.snapshot?.currentSessionId?iA(e.selectedWorkspace):a??c.current,[u,d]=(0,K.useState)(()=>o.read(c.current.key)),f=(0,K.useRef)(u);f.current=u;let{prompt:p,images:m,files:h=[],caret:g}=u,_=p.trim().length,v=_>Ce,y=l.key,b=(0,K.useRef)(new Map),x=(0,K.useRef)(null),S=(0,K.useRef)(!1),C=e.modelSearch??{query:``,status:`idle`,models:[],totalMatches:0,matchesOmitted:0,error:null},[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(0),[A,j]=(0,K.useState)(!1),[M,N]=(0,K.useState)(null),[P,F]=(0,K.useState)(null),[I,ee]=(0,K.useState)(0),L=(0,K.useMemo)(()=>new de,[]),R=(0,K.useRef)(null),te=(0,K.useRef)(y);(0,K.useEffect)(()=>{te.current!==y&&(te.current=y,N(null))},[y]);let[z,B]=(0,K.useState)(!1),[ne,re]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(null),[oe,se]=(0,K.useState)(!1),[ce,le]=(0,K.useState)(null),[H,ue]=(0,K.useState)(null),fe=H?.owner===y?H.panel:null,pe=fe===`queue`,me=e=>ue(fe===e?null:{owner:y,panel:e}),[he,ge]=(0,K.useState)(null),_e=he===y,ve=(0,K.useId)(),ye=(0,K.useId)(),be=(0,K.useRef)(null),xe=(0,K.useRef)(null),[Se,we]=(0,K.useState)(null),Te=(0,K.useRef)(null),Ee=(0,K.useRef)(null),U=(0,K.useRef)(null),De=(0,K.useRef)(null),Oe=(0,K.useRef)(null),ke=(0,K.useRef)(null),G=(0,K.useRef)(null),je=(0,K.useRef)(!1),Me=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=!0;return o.ready.then(()=>{if(!e)return;let t=o.read(c.current.key);f.current=t,S.current=!0,d(t)}),()=>{e=!1}},[o]),(0,K.useEffect)(()=>{let e=e=>{!G.current&&!Array.from(b.current.values()).some(e=>e.pending)&&!(o.storageState().status!==`saved`&&(o.hasContent()||o.hasUnsavedChanges()))||(e.preventDefault(),e.returnValue=``)};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[o]),(0,K.useLayoutEffect)(()=>{let e=Te.current;if(!e)return;let t=De.current,n=e.getBoundingClientRect().height;t?.animation?.cancel(),e.style.height=`auto`,e.style.height=_e?`min(420px, 50dvh)`:`${Math.min(e.scrollHeight,220)}px`;let r=e.getBoundingClientRect().height;e.style.overflowY=_e||e.scrollHeight>220?`auto`:`hidden`;let i=xe.current;i&&(e.focus({preventScroll:!0}),e.setSelectionRange(i.start,i.end,i.direction),e.scrollTop=i.scrollTop,xe.current=null),De.current={owner:y,height:r},t?.owner===y&&n>0&&Math.abs(n-r)>1&&e.animate&&!window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches&&(De.current.animation=e.animate([{height:`${n}px`},{height:`${r}px`}],{duration:180,easing:`cubic-bezier(.16, 1, .3, 1)`}))},[p,y,_e]),(0,K.useLayoutEffect)(()=>{let e=Te.current;e&&S.current&&(S.current=!1,e.setSelectionRange(g,g))},[p,g,y]),(0,K.useEffect)(()=>()=>De.current?.animation?.cancel(),[]),(0,K.useLayoutEffect)(()=>{let e=Ee.current;if(!e)return;let t=U.current,n=e.getBoundingClientRect().height,r=new Map(Array.from(t?.positions.keys()??[]).map(e=>{let t=getComputedStyle(e).translate.split(` `).map(Number.parseFloat);return[e,{x:t[0]||0,y:t[1]||0}]}));t?.animations.forEach(e=>{e.cancel()});let i=e.getBoundingClientRect(),a=i.height,o=new Map(Array.from(e.querySelectorAll(`.composer-attachment`)).map(e=>{let t=e.getBoundingClientRect();return[e,{left:t.left-i.left,top:t.top-i.top}]})),s=[];if(U.current={owner:y,height:a,positions:o,animations:s},!e.animate||t?.owner!==y||window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches)return;let c={duration:220,easing:`cubic-bezier(.16, 1, .3, 1)`};t.height!==a&&s.push(e.animate([{height:`${n===a?t.height:n}px`},{height:`${a}px`}],c));for(let[e,n]of o){let i=t.positions.get(e);if(!i)continue;let a=r.get(e),o=i.left+(a?.x??0)-n.left,l=i.top+(a?.y??0)-n.top;Math.abs(o)+Math.abs(l)>1&&s.push(e.animate([{translate:`${o}px ${l}px`},{translate:`0 0`}],c))}},[m,h,y]),(0,K.useEffect)(()=>()=>U.current?.animations.forEach(e=>{e.cancel()}),[]),(0,K.useEffect)(()=>{if(A||!je.current)return;je.current=!1;let e=window.setTimeout(()=>{Te.current?.focus(),Te.current?.setSelectionRange(g,g)},0);return()=>window.clearTimeout(e)},[g,A]);let Ne=(0,K.useRef)(null),Pe=(0,K.useRef)(!1);(0,K.useLayoutEffect)(()=>{let n=c.current;if(n.key===l.key)return;Oe.current=null;let r=o.read(l.key),i=!1;if(n.kind===`workspace`&&l.kind===`session`&&n.workspacePath===l.workspacePath&&e.createdSession?.sessionId===l.sessionId&&e.createdSession.sessionPath===l.sessionPath&&e.createdSession.workspacePath===l.workspacePath&&o.move(n.key,l.key)){r=f.current;let e=G.current;e?.ownerKey===n.key&&(e.ownerKey=l.key);let t=b.current.get(n.key);t&&(b.current.delete(n.key),t.owner=l,b.current.set(l.key,t))}else{if(n.kind===`session`&&l.kind===`workspace`&&n.workspacePath===l.workspacePath&&e.workspaceDraft&&e.sessionSwitching&&!r.prompt&&r.images.length===0&&!r.files?.length){let{prompt:e,images:t,files:n,caret:a}=f.current,s=o.edit(l.key,r,{prompt:e,images:t,files:n,caret:a});s?r=s:i=!0}G.current?.controller.abort(),G.current=null,B(!1)}c.current=l,f.current=r,S.current=!0,je.current=!1,d(r),re(i?t(`draftLimit`):null),ae(null),we(null),se(!1),j(!1),D(!0)},[o,l,e.workspaceDraft,e.sessionSwitching,e.createdSession,t]),(0,K.useLayoutEffect)(()=>()=>{G.current?.controller.abort(),G.current=null},[]);let Fe=(0,K.useCallback)((e,n=y)=>{if(c.current.key!==n)return!1;let r=f.current,i=o.edit(n,r,e);return i?(i.revision!==r.revision&&(b.current.get(n)?.pending||b.current.delete(n),re(e=>e===t(`draftLimit`)?null:e)),e.prompt!==void 0&&(!e.prompt.trim()||e.prompt.startsWith(`/`))&&(Oe.current=null),f.current=i,d(i),!0):(re(t(`draftLimit`)),!1)},[o,y,t]);(0,K.useEffect)(()=>{let t=Oe.current;t&&(e.workspaceDraft||e.snapshot?.runtime.plan!==`ready`||e.snapshot.runtime.planRevision!==t.planRevision||e.snapshot.currentSessionId!==t.sessionId||e.snapshot.selectedSession?.path!==t.sessionPath||r!==t.sessionPath)&&(Oe.current=null)},[e.snapshot?.runtime.plan,e.snapshot?.runtime.planRevision,e.snapshot?.currentSessionId,e.snapshot?.selectedSession?.path,e.workspaceDraft,r]);let Ie=!!(!e.workspaceDraft&&n?.id&&HD(e.snapshot,n)&&r===n.path),Le=!!(e.selectedWorkspace&&(e.workspaceDraft||!n&&!e.snapshot?.currentSessionId)),Re=!!(!e.workspaceDraft&&n&&r===n.path),ze=Re||Le,Be=Ie&&e.snapshot?.selectedExecution?.sessionId===n?.id&&e.snapshot?.selectedExecution?.sessionPath===n?.path&&e.snapshot?.selectedExecution?.compaction?.state===`running`,Ve=!e.workspaceDraft&&(Ie?e.snapshot?.runtime.status===`running`||e.liveRunning:e.snapshot?.selectedExecution?.sessionId===n?.id&&e.snapshot?.selectedExecution?.sessionPath===n?.path&&e.snapshot?.selectedExecution?.status===`running`),He=Ie&&Ve&&!!(e.activeTurn??e.snapshot?.runtime.activeTurn),Ue=e.activeTurn??e.snapshot?.runtime.activeTurn,We=Ie&&Ve&&!Be&&!e.turnCancellationPending&&Ue?.sessionId===n?.id&&!!Ue?.commandId,Ge=Se?.ownerKey===y&&Se.expectedTurnCommandId===Ue?.commandId?Se.mode:e.snapshot?.preferences.followUpBehavior??`followUp`,Ke=We&&Ge===`steer`&&Ue?Ue:null,qe=e.sessionSwitching||!!e.planSelectionPending||!ze&&!!e.selectedWorkspace,Je=e.commandDiscovery??{sessionId:null,status:`idle`,commands:[],totalAvailable:0,commandsOmitted:0,error:null},Ye=/^\/[^\s/]*$/u.test(p)&&g>0,Xe=w&&Ye&&!E&&ze&&!e.sessionSwitching,Ze=Ie?n?.id:null,Qe=Ye?p.slice(1):``,$e=(0,K.useMemo)(()=>tA(Je.commands,Qe),[Qe,Je.commands]),et=Xe&&!e.workspaceDraft&&Je.status===`ready`&&$e.length>0,tt=ze&&!!e.selectedWorkspace&&!e.sessionSwitching&&!e.planSelectionPending,nt=(0,K.useRef)(e.addSourcesRequest?.revision??0);(0,K.useEffect)(()=>{let r=e.addSourcesRequest;if(!(!r||r.revision===nt.current)&&(nt.current=r.revision,!(!tt||n?.id!==r.sessionId||n.path!==r.path))){if(r.feedback){let{filePath:e,side:n,line:i,code:a}=r.feedback,o=`${nk(e)} — ${t(n===`new`?`sourceFeedbackNew`:`sourceFeedbackOld`,{path:e,line:i})}\n> ${a.split(` `).join(` > `)}`,s=f.current.prompt,l=`${s}${s?` -`:``}${o}`;if(!Fe({prompt:l,caret:l.length}))return;N(null),D(!0),queueMicrotask(()=>{c.current.key===y&&(Te.current?.focus(),Te.current?.setSelectionRange(l.length,l.length))});return}R.current?.focus(),N(`files`)}},[e.addSourcesRequest,tt,n?.id,n?.path,y,t,Fe]),(0,K.useEffect)(()=>{tt||(je.current=!1,j(!1))},[tt]);let rt=async e=>{if(!tt||c.current.key!==y)return;let n=[...e];if(n.length===0)return;let r=G.current;if(f.current.images.length+(f.current.files?.length??0)+(r?.files.length??0)+n.length>8){re(t(`fileAttachmentCount`,{count:8}));return}if(r){r.files.push(...n);return}let i={ownerKey:c.current.key,files:n,staged:[],stagedFiles:[],controller:new AbortController};G.current=i,B(!0),re(null);try{for(let e of i.files){let n=/^image\/(?:png|jpeg|gif|webp)$/iu.test(e.type);try{if(n||=!!gd(new Uint8Array(await e.slice(0,12).arrayBuffer())),!n){let t=await pO(e,i.controller.signal);if(G.current!==i||c.current.key!==i.ownerKey)return;if([...f.current.files??[],...i.stagedFiles].reduce((e,t)=>e+t.size,t.size)>52428800)throw Error(`file-total-size`);i.stagedFiles.push(t);continue}if(f.current.images.length+i.staged.length>=8)throw Error(`image-count`);let t=await vd(e);if(G.current!==i||c.current.key!==i.ownerKey)return;if([...f.current.images,...i.staged].reduce((e,t)=>e+t.size,t.size)>33554432)throw Error(`image-total-size`);i.staged.push(t)}catch(r){if(G.current!==i)return;let a=r instanceof Error?r.message:`image-type`,o=a===`file-size`||a===`file-total-size`?t(`fileAttachmentTooLarge`):a===`image-count`?t(`imageAttachmentCount`,{count:8}):t(n?a===`image-size`?`imageAttachmentTooLarge`:a===`image-total-size`?`imageAttachmentTotalTooLarge`:a===`image-read`?`imageAttachmentReadFailed`:`imageAttachmentUnsupported`:`fileAttachmentReadFailed`);re(`${e.name||t(`attachedImage`)}: ${o}`)}}(i.staged.length>0||i.stagedFiles.length>0)&&Fe({images:[...f.current.images,...i.staged],files:[...f.current.files??[],...i.stagedFiles]},i.ownerKey)}finally{G.current===i&&(G.current=null,B(!1),ke.current&&(ke.current.value=``))}};(0,K.useEffect)(()=>{let t=Xe&&!Pe.current;Pe.current=Xe,!(!Xe||e.workspaceDraft||!Ze||Je.status!==`idle`&&!(t&&Je.status===`error`))&&e.actions.discoverCommands()},[Je.status,Xe,e.actions,e.workspaceDraft,Ze]),(0,K.useEffect)(()=>{let e=$e.findIndex(e=>e.availability===`available`);k(e)},[$e]),(0,K.useEffect)(()=>{let n=e.promptAdmissionRecovery??e.restoredPromptDraft;if(!n||Ne.current===n.commandId)return;Ne.current=n.commandId,x.current=null;let r=JSON.stringify([`session`,n.sessionId,n.sessionPath]),i=b.current.get(r),a=n.images??[];if(i?.content.trim()===n.content&&i.images.length===a.length&&i.images.every((e,t)=>e.data===a[t]?.data&&e.mimeType===a[t]?.mimeType&&e.name===a[t]?.name)){x.current={commandId:n.commandId,key:r,revision:i.revision};return}let s=c.current.key===r?f.current:o.read(r);if(s.prompt||s.images.length>0||s.files?.length)return;let l=(n.images??[]).map(e=>({...e,id:globalThis.crypto?.randomUUID?.()??`${n.commandId}-${e.name}`,name:e.name??t(`attachedImage`),size:atob(e.data).length,previewUrl:`data:${e.mimeType};base64,${e.data}`})),u=o.edit(r,s,{prompt:n.content,images:l,caret:n.content.length});if(!u){c.current.key===r&&re(t(`draftLimit`));return}x.current={commandId:n.commandId,key:r,revision:u.revision},c.current.key===r&&(f.current=u,d(u)),e.restoredPromptDraft?.commandId===n.commandId&&e.actions.acknowledgeRestoredPromptDraft(n.commandId)},[o,e.actions,e.promptAdmissionRecovery,e.restoredPromptDraft,t]),(0,K.useEffect)(()=>{let t=e.promptAdmissionResolution;if(!t)return;let n=x.current,r=JSON.stringify([`session`,t.sessionId,t.sessionPath]),i=b.current.get(r),a=t.images??[],s=i?.content.trim()===t.content&&i.images.length===a.length&&i.images.every((e,t)=>e.data===a[t]?.data&&e.mimeType===a[t]?.mimeType&&e.name===a[t]?.name),l=n?.key===r&&n.commandId===t.commandId?n.revision:s?i.revision:void 0;if(l!==void 0){let e=o.clear(r,l);e&&c.current.key===r&&(f.current=e,d(e))}n?.commandId===t.commandId&&(x.current=null),e.actions.acknowledgePromptAdmissionResolution(t.commandId)},[o,e.actions,e.promptAdmissionResolution]);let it=async(n,r=!1,i,a)=>{if(b.current.get(c.current.key)?.pending||G.current||e.planSelectionPending)return;if(!e.selectedWorkspace){await e.actions.chooseWorkspace();return}if(y!==c.current.key)return;let s=f.current,l={revision:s.revision,owner:c.current,pending:!0,content:s.prompt,images:s.images};b.current.set(l.owner.key,l);let u=!1,p=!1;try{let m=s.prompt,h=null;if(Re&&!Ie&&(h=await e.actions.prepareSession(),!h||l.owner.kind!==`session`||h.sessionId!==l.owner.sessionId||h.sessionPath!==l.owner.sessionPath||c.current.key!==l.owner.key))return;if(s.files?.length){if(p=!0,B(!0),re(null),h??=await e.actions.prepareSession(),!h?.sessionPath)return;let n=await L.uploadPromptFiles(h.sessionId,h.sessionPath,s.files.map(({name:e,data:t,mimeType:n,text:r})=>({name:e,data:t,mimeType:n,...r===void 0?{}:{text:r}})));if(n.sessionId!==h.sessionId||n.sessionPath!==h.sessionPath||c.current.key!==l.owner.key||n.files.length!==s.files.length||n.files.some((e,t)=>e.name!==s.files?.[t]?.name||e.size!==s.files?.[t]?.size))return;let r=n.files.map((e,n)=>`${JSON.stringify(e.name)}: ${ZO(e.path,e.path)}${e.textPath?`\n ${t(`fileAttachmentExtractedContent`)}${s.files?.[n]?.extraction===`truncated`?` (${t(`fileAttachmentTextTruncated`)})`:``}: ${ZO(e.textPath,e.textPath)}`:``}`).join(` +`:``}${o}`;if(!Fe({prompt:l,caret:l.length}))return;N(null),D(!0),queueMicrotask(()=>{c.current.key===y&&(Te.current?.focus(),Te.current?.setSelectionRange(l.length,l.length))});return}R.current?.focus(),N(`files`)}},[e.addSourcesRequest,tt,n?.id,n?.path,y,t,Fe]),(0,K.useEffect)(()=>{tt||(je.current=!1,j(!1))},[tt]);let rt=async e=>{if(!tt||c.current.key!==y)return;let n=[...e];if(n.length===0)return;let r=G.current;if(f.current.images.length+(f.current.files?.length??0)+(r?.files.length??0)+n.length>8){re(t(`fileAttachmentCount`,{count:8}));return}if(r){r.files.push(...n);return}let i={ownerKey:c.current.key,files:n,staged:[],stagedFiles:[],controller:new AbortController};G.current=i,B(!0),re(null);try{for(let e of i.files){let n=/^image\/(?:png|jpeg|gif|webp)$/iu.test(e.type);try{if(n||=!!xd(new Uint8Array(await e.slice(0,12).arrayBuffer())),!n){let t=await vO(e,i.controller.signal);if(G.current!==i||c.current.key!==i.ownerKey)return;if([...f.current.files??[],...i.stagedFiles].reduce((e,t)=>e+t.size,t.size)>52428800)throw Error(`file-total-size`);i.stagedFiles.push(t);continue}if(f.current.images.length+i.staged.length>=8)throw Error(`image-count`);let t=await Cd(e);if(G.current!==i||c.current.key!==i.ownerKey)return;if([...f.current.images,...i.staged].reduce((e,t)=>e+t.size,t.size)>33554432)throw Error(`image-total-size`);i.staged.push(t)}catch(r){if(G.current!==i)return;let a=r instanceof Error?r.message:`image-type`,o=a===`file-size`||a===`file-total-size`?t(`fileAttachmentTooLarge`):a===`image-count`?t(`imageAttachmentCount`,{count:8}):t(n?a===`image-size`?`imageAttachmentTooLarge`:a===`image-total-size`?`imageAttachmentTotalTooLarge`:a===`image-read`?`imageAttachmentReadFailed`:`imageAttachmentUnsupported`:`fileAttachmentReadFailed`);re(`${e.name||t(`attachedImage`)}: ${o}`)}}(i.staged.length>0||i.stagedFiles.length>0)&&Fe({images:[...f.current.images,...i.staged],files:[...f.current.files??[],...i.stagedFiles]},i.ownerKey)}finally{G.current===i&&(G.current=null,B(!1),ke.current&&(ke.current.value=``))}};(0,K.useEffect)(()=>{let t=Xe&&!Pe.current;Pe.current=Xe,!(!Xe||e.workspaceDraft||!Ze||Je.status!==`idle`&&!(t&&Je.status===`error`))&&e.actions.discoverCommands()},[Je.status,Xe,e.actions,e.workspaceDraft,Ze]),(0,K.useEffect)(()=>{let e=$e.findIndex(e=>e.availability===`available`);k(e)},[$e]),(0,K.useEffect)(()=>{let n=e.promptAdmissionRecovery??e.restoredPromptDraft;if(!n||Ne.current===n.commandId)return;Ne.current=n.commandId,x.current=null;let r=JSON.stringify([`session`,n.sessionId,n.sessionPath]),i=b.current.get(r),a=n.images??[];if(i?.content.trim()===n.content&&i.images.length===a.length&&i.images.every((e,t)=>e.data===a[t]?.data&&e.mimeType===a[t]?.mimeType&&e.name===a[t]?.name)){x.current={commandId:n.commandId,key:r,revision:i.revision};return}let s=c.current.key===r?f.current:o.read(r);if(s.prompt||s.images.length>0||s.files?.length)return;let l=(n.images??[]).map(e=>({...e,id:globalThis.crypto?.randomUUID?.()??`${n.commandId}-${e.name}`,name:e.name??t(`attachedImage`),size:atob(e.data).length,previewUrl:`data:${e.mimeType};base64,${e.data}`})),u=o.edit(r,s,{prompt:n.content,images:l,caret:n.content.length});if(!u){c.current.key===r&&re(t(`draftLimit`));return}x.current={commandId:n.commandId,key:r,revision:u.revision},c.current.key===r&&(f.current=u,d(u)),e.restoredPromptDraft?.commandId===n.commandId&&e.actions.acknowledgeRestoredPromptDraft(n.commandId)},[o,e.actions,e.promptAdmissionRecovery,e.restoredPromptDraft,t]),(0,K.useEffect)(()=>{let t=e.promptAdmissionResolution;if(!t)return;let n=x.current,r=JSON.stringify([`session`,t.sessionId,t.sessionPath]),i=b.current.get(r),a=t.images??[],s=i?.content.trim()===t.content&&i.images.length===a.length&&i.images.every((e,t)=>e.data===a[t]?.data&&e.mimeType===a[t]?.mimeType&&e.name===a[t]?.name),l=n?.key===r&&n.commandId===t.commandId?n.revision:s?i.revision:void 0;if(l!==void 0){let e=o.clear(r,l);e&&c.current.key===r&&(f.current=e,d(e))}n?.commandId===t.commandId&&(x.current=null),e.actions.acknowledgePromptAdmissionResolution(t.commandId)},[o,e.actions,e.promptAdmissionResolution]);let it=async(n,r=!1,i,a)=>{if(b.current.get(c.current.key)?.pending||G.current||e.planSelectionPending)return;if(!e.selectedWorkspace){await e.actions.chooseWorkspace();return}if(y!==c.current.key)return;let s=f.current,l={revision:s.revision,owner:c.current,pending:!0,content:s.prompt,images:s.images};b.current.set(l.owner.key,l);let u=!1,p=!1;try{let m=s.prompt,h=null;if(Re&&!Ie&&(h=await e.actions.prepareSession(),!h||l.owner.kind!==`session`||h.sessionId!==l.owner.sessionId||h.sessionPath!==l.owner.sessionPath||c.current.key!==l.owner.key))return;if(s.files?.length){if(p=!0,B(!0),re(null),h??=await e.actions.prepareSession(),!h?.sessionPath)return;let n=await L.uploadPromptFiles(h.sessionId,h.sessionPath,s.files.map(({name:e,data:t,mimeType:n,text:r})=>({name:e,data:t,mimeType:n,...r===void 0?{}:{text:r}})));if(n.sessionId!==h.sessionId||n.sessionPath!==h.sessionPath||c.current.key!==l.owner.key||n.files.length!==s.files.length||n.files.some((e,t)=>e.name!==s.files?.[t]?.name||e.size!==s.files?.[t]?.size))return;let r=n.files.map((e,n)=>`${JSON.stringify(e.name)}: ${nk(e.path,e.path)}${e.textPath?`\n ${t(`fileAttachmentExtractedContent`)}${s.files?.[n]?.extraction===`truncated`?` (${t(`fileAttachmentTextTruncated`)})`:``}: ${nk(e.textPath,e.textPath)}`:``}`).join(` `);if(m=`${m.trim()}${m.trim()?` -`:``}${t(`fileAttachmentPromptLabel`)}\n${r}`,m.length>12e3){re(t(`fileAttachmentPromptTooLong`));return}l.content=m}if(u=h?await n(m,s.images,i,a,h):a?await n(m,s.images,i,a):i?await n(m,s.images.length>0||r?s.images:void 0,i):r||s.images.length>0?await n(m,s.images):await n(m),u){we(null),i===Oe.current&&(Oe.current=null);let e=o.clear(l.owner.key,l.revision);e&&c.current.key===l.owner.key&&(f.current=e,d(e),re(null))}}catch(e){c.current.key===l.owner.key&&re(e instanceof Error?e.message:t(`fileAttachmentReadFailed`))}finally{p&&c.current.key===l.owner.key&&!G.current&&B(!1),l.pending=!1;let e=o.read(l.owner.key);(u||!e.prompt&&e.images.length===0&&!e.files?.length)&&b.current.get(l.owner.key)===l&&b.current.delete(l.owner.key)}},at=async(n,r=!1)=>{if(n?.preventDefault(),!ze||e.sessionSwitching||e.modelSelectionPending||e.planSelectionPending||e.thinkingPendingLevel!==null||e.promptAdmissionPending||e.promptAdmissionRecovery||e.promptAdmissionResolution||v||!p.trim()&&m.length===0&&h.length===0||G.current)return;let i=We&&(r?!Ke:Ke);if(i&&Oe.current){ae(t(`steerStaleTurn`));return}let a=/^\/([^\s/]+)/u.exec(p.trim())?.[1],o=Je.commands.find(e=>e.name===a);if(o?.availability===`unsupported`){ae(`/${o.name}: ${t(`commandUnavailable_${o.unavailableReason??`not_integrated`}`)}`);return}if(o?.action){if(p.trim()!==`/${o.name}`||m.length>0||h.length>0){ae(t(`commandPanelArguments`));return}if(e.onCommandAction?.(o.action)!==!0){ae(t(`commandPanelUnavailable`));return}Fe({prompt:``,caret:0}),ae(null);return}ae(null),await it(e.actions.sendPrompt,!1,Oe.current??void 0,i&&Ue?{streamingBehavior:`steer`,expectedTurnCommandId:Ue.commandId}:void 0)},ot=()=>{if(!(!Ie||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||v))return it(e.actions.sendPromptAsNew,!0)},st=e=>{if(e.availability!==`available`)return;let t=`/${e.name} `;Fe({prompt:t,caret:t.length})&&(ae(null),D(!0),queueMicrotask(()=>{c.current.key===y&&(Te.current?.focus(),Te.current?.setSelectionRange(t.length,t.length))}))},ct=e=>{if(!$e.length)return;let t=O;for(let n=0;n<$e.length;n++)if(t=(t+e+$e.length)%$e.length,$e[t]?.availability===`available`){k(t);return}},lt=e=>{let n=Me.current,r=f.current;if(!n||n.ownerKey!==y||n.ownerKey!==c.current.key||n.revision!==r.revision)return t(`fileReferenceDraftChanged`);let i=r.prompt.slice(0,n.start),a=r.prompt.slice(n.end),o=ZO(e),s=i&&!/\s$/u.test(i)?` `:``,l=`${i}${s}${o}${a&&!/^\s/u.test(a)?` `:``}${a}`,u=i.length+s.length+o.length;if(!Fe({prompt:l,caret:u}))return t(`draftLimit`);je.current=!0},ut=()=>{let e=f.current,t=Te.current,n=Math.min(Math.max(t?.selectionStart??e.caret,0),e.prompt.length);Me.current={ownerKey:y,revision:e.revision,start:n,end:Math.min(Math.max(t?.selectionEnd??n,n),e.prompt.length)},j(!0)},dt=[...(e.snapshot?.workspaces??[]).map(t=>({id:t.path,label:t.name,icon:(0,q.jsx)(Vs,{}),endContent:t.path===e.selectedWorkspace?(0,q.jsx)(rs,{}):void 0,onClick:()=>e.actions.setWorkspace(t.path)})),{type:`divider`},{id:`add`,label:t(`addWorkspaceMenu`),icon:(0,q.jsx)(Ae,{}),onClick:()=>void e.actions.chooseWorkspace()}],ft=e.draftModel??e.snapshot?.models.find(e=>e.current),pt=e.snapshot?.workspaces.find(t=>t.path===e.selectedWorkspace)?.name??(e.selectedWorkspace?MD(e.selectedWorkspace):t(`selectWorkspace`)),mt=e.snapshot?.sessions.find(e=>e.path===i),ht=Ie?jD(mt??{},n?.id??t(`untitledSession`)):Le?t(`newSession`):n?jD(mt??{},n.id):t(`newSession`),gt=e.sessionSwitching?e.workspaceDraft?t(`promptTask`):t(`switchingSession`):e.selectedWorkspace?Ie&&e.snapshot?.runtime.planHasPrompt&&[`planning`,`ready`].includes(e.snapshot.runtime.plan??``)?t(`promptPlanMessage`):e.landing?t(`promptTask`):t(Re?`promptMessage`:`promptReadonly`):t(`promptStart`),_t=e.snapshot?.thinking,vt=_t?.level??null,yt=e.thinkingPendingLevel??null,bt=_t?.supported??!1,xt=!!e.selectedWorkspace&&!Ie&&(Le||!n),St=_t?!_t.available.includes(vt??``):!1,Ct=_t?!bt&&!xt?`thinkingUnsupportedHint`:!Ie&&!xt?`thinkingInactiveHint`:Ve?`thinkingLockedRunning`:e.modelSelectionPending?`thinkingModelPendingHint`:null:null,wt=e.snapshot?.selectedExecution,Tt=n&&wt&&wt.sessionId===n.id&&wt.sessionPath===n.path?wt.pendingFollowUps:void 0,Et=Tt??(Ie?e.pendingFollowUpsReceipt:null),Dt=n&&wt?.sessionId===n.id&&wt.sessionPath===n.path?wt.pendingSteering:void 0,Ot=Dt??(Ie?e.pendingSteeringReceipt:null),kt=Dt===void 0?[]:wt?.steeringMessages??[],At=!e.workspaceDraft&&!e.sessionSwitching&&kt.length>0,jt=Tt===void 0?[]:wt?.queuedMessages??[],Mt=new Map,Nt=jt.map(e=>{let t=Mt.get(e)??0;return Mt.set(e,t+1),{message:e,key:`${e}:${t}`}}),Pt=!e.workspaceDraft&&!e.sessionSwitching&&Tt!==void 0&&jt.length>0,Ft=Be?t(`compactionDraftHelp`):e.promptAdmissionPending&&!He?t(`promptPending`):e.modelSelectionPending?t(`thinkingModelPendingHint`):e.thinkingPendingLevel===null?e.workspaceDraft?t(`enterHint`):e.turnCancellationPending?t(`stoppingTurn`):e.turnTerminalStatus===`cancelled`?t(`stoppedTurn`):!At&&(Ot??0)>0?t(`pendingSteeringHint`,{count:Ot}):!Pt&&(Ie&&e.pendingFollowUpsReceipt!==null||(Et??0)>0)?(Et??0)>0?t(`pendingFollowUpsHint`,{count:Et??0}):t(`acceptedHint`):t(ze?Ve?Ke?`steeringHint`:`queuedHint`:`enterHint`:`activeOnlyHint`):t(`thinkingPendingHint`),It=ze&&(Be||e.promptAdmissionPending&&!He||e.modelSelectionPending||e.thinkingPendingLevel!==null||e.turnCancellationPending||e.turnTerminalStatus===`cancelled`||!Pt&&Ie&&e.pendingFollowUpsReceipt!==null||!Pt&&(Et??0)>0||!At&&(Ot??0)>0||Ve&&!!(p.trim()||m.length||h.length)),Lt=P===y,Rt=(e=!1)=>{N(null),e&&R.current?.focus()},zt=e=>()=>{N(null),e()},Bt=async r=>{if(!(!Ie||!n||Lt||e.sessionSwitching)){F(y),ae(null);try{if(r===`compact`)await L.compactSession(n.id,n.path);else if((await L.updatePromptQueue(n.id,n.path,r)).sessionId!==n.id)throw Error(t(`queueUpdateFailed`));!await e.actions.refreshSnapshot()&&r!==`compact`&&c.current.key===y&&ae(t(`queueStatusUnconfirmed`))}catch(e){c.current.key===y&&ae(r===`compact`?e instanceof Error?e.message:t(`commandPanelUnavailable`):t(`queueUpdateFailed`))}finally{F(e=>e===y?null:e)}}},Vt=M===`files`?[{id:`back`,section:t(`composerAdd`),label:t(`composerBack`),icon:(0,q.jsx)(Cs,{}),onClick:()=>N(`main`)},{id:`file-upload`,section:t(`composerAdd`),label:t(`addFiles`),description:t(`fileAttachmentDescription`),icon:(0,q.jsx)(Fs,{}),disabled:z||m.length+h.length>=8,onClick:zt(()=>{ke.current&&(ke.current.accept=``,ke.current.click())})},{id:`image`,section:t(`composerAdd`),label:t(`addImages`),description:t(`imageAttachmentDescription`),icon:(0,q.jsx)(Ks,{}),disabled:z||m.length>=8,onClick:zt(()=>{ke.current&&(ke.current.accept=`image/png,image/jpeg,image/gif,image/webp`,ke.current.click())})},{id:`workspace-file`,section:t(`composerAdd`),label:t(`fileReference`),icon:(0,q.jsx)(Fs,{}),onClick:zt(ut)}]:[{id:`file`,section:t(`composerAdd`),label:t(`composerFile`),alias:`file`,icon:(0,q.jsx)(Fs,{}),onClick:()=>N(`files`)},{id:`plan`,section:t(`composerAdd`),label:t(`composerPlan`),alias:`plan`,description:t(`composerPlanDescription`),icon:(0,q.jsx)($s,{}),disabled:!Ie||Ve||e.planSelectionPending||e.promptAdmissionPending,onClick:zt(()=>void e.actions.selectPlanMode(e.snapshot?.runtime.plan===`inactive`))},{id:`compact`,section:t(`composerCommands`),label:t(`composerCompact`),alias:`compact`,description:t(`composerCompactDescription`),icon:(0,q.jsx)(fc,{}),disabled:!Ie||Ve||Lt||e.promptAdmissionPending||(Et??0)>0,onClick:zt(()=>void Bt(`compact`))},{id:`model`,section:t(`composerCommands`),label:t(`composerModel`),alias:`model`,description:t(`composerModelDescription`),icon:(0,q.jsx)(ws,{}),disabled:!Ie&&!Le||Ve||e.modelSelectionPending,onClick:zt(()=>ee(e=>e+1))}];return(0,q.jsxs)(`div`,{className:`composer-dock`,children:[Ie&&e.snapshot?.runtime.plan===`ready`&&!e.sessionSwitching&&(0,q.jsx)(`div`,{className:`plan-mode-bar`,children:(0,q.jsx)(`button`,{type:`button`,disabled:Ve||z||!!G.current||e.planSelectionPending||e.promptAdmissionPending||!!e.promptAdmissionRecovery,onClick:()=>{if((p.trim()||m.length>0||h.length>0)&&!window.confirm(t(`planImplementationReplaceDraft`)))return;let n=f.current.revision,r=c.current.key;e.actions.preparePlanImplementation().then(e=>{!e||f.current.revision!==n||c.current.key!==r||Fe({prompt:e.prompt,images:[],caret:e.prompt.length},r)&&(Oe.current={sessionId:e.sessionId,sessionPath:e.sessionPath,planRevision:e.planRevision},re(null),Te.current?.focus())})},children:t(`planModeImplement`)})}),!Ie&&!e.workspaceDraft&&!e.sessionSwitching&&n&&r===n.path&&(0,q.jsxs)(`div`,{className:`composer-session-notice`,children:[(0,q.jsx)(`span`,{children:t(`activateViewedSessionHint`)}),(0,q.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>void e.actions.selectSession(n.path),children:t(`activateViewedSession`)})]}),e.accessory,e.promptAdmissionRecovery&&(0,q.jsxs)(`section`,{className:`prompt-recovery`,role:`alert`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:t(`promptAdmissionUnknown`)}),(0,q.jsx)(`span`,{children:e.promptAdmissionRecovery.phase===`checking`?t(`promptAdmissionCheckingDetail`):e.promptAdmissionRecovery.phase===`verification-failed`?t(`promptAdmissionVerificationFailedDetail`):t(`promptAdmissionUnknownDetail`)})]}),(0,q.jsxs)(`div`,{className:`prompt-recovery-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:e.promptAdmissionRecovery.phase===`submitting`,onClick:e.actions.abandonPromptAdmission,children:t(`abandonAdmission`)}),e.promptAdmissionRecovery.phase===`verification-failed`&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>void e.actions.checkPromptAdmissionRecovery(),children:t(`retryAdmissionCheck`)}),e.promptAdmissionRecovery.retryable&&(0,q.jsx)(`button`,{type:`button`,disabled:!Ie||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||e.promptAdmissionRecovery.phase!==`ready`,onClick:()=>void e.actions.retryPromptAdmission(),children:t(`retryOriginalAdmission`)}),(0,q.jsx)(`button`,{type:`button`,className:`primary`,disabled:z||!Ie||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||v||e.promptAdmissionRecovery.phase!==`ready`||!p.trim()&&m.length===0&&h.length===0,onClick:()=>void ot(),children:e.promptAdmissionRecovery.phase===`submitting`?t(`sendingAsNew`):t(`sendAsNew`)})]})]}),(0,q.jsxs)(`div`,{className:`composer-status-strip`,children:[Ie&&(0,q.jsx)(WD,{snapshot:e.snapshot,observed:e.activityObserved,onInspectSubagent:e.onInspectSubagent,expanded:fe===`activity`,onExpandedChange:e=>ue(t=>e?{owner:y,panel:`activity`}:t?.panel===`activity`?null:t)}),(Pt||At)&&(0,q.jsxs)(`section`,{className:`composer-queue`,"data-state":wt?.promptQueueBlocked?`blocked`:`waiting`,"aria-label":Pt?t(`pendingFollowUpsHint`,{count:Tt}):t(`steeringMessagesTitle`),"aria-busy":Lt,children:[(0,q.jsxs)(`div`,{className:`composer-queue-status`,role:`status`,children:[(0,q.jsx)(vs,{"aria-hidden":`true`}),(0,q.jsxs)(`button`,{type:`button`,className:`composer-queue-toggle`,"aria-expanded":pe,"aria-controls":ye,"aria-label":Pt?t(`pendingFollowUpsHint`,{count:Tt}):t(`pendingSteeringHint`,{count:Ot}),onClick:()=>me(`queue`),children:[[Pt?t(`composerQueuedCount`,{count:Tt}):``,At?t(`composerSteeringCount`,{count:Ot}):``].filter(Boolean).join(` · `),(0,q.jsx)(is,{"aria-hidden":`true`})]}),Ie&&(0,q.jsxs)(`span`,{children:[wt?.promptQueueBlocked&&(0,q.jsx)(`button`,{type:`button`,disabled:Lt||Be,onClick:()=>void Bt(`retry`),children:t(`retryPrompt`)}),(0,q.jsx)(`button`,{type:`button`,disabled:Lt,onClick:()=>void Bt(`clear`),children:t(`clearPromptQueue`)})]})]}),(0,q.jsxs)(`div`,{id:ye,className:`composer-queue-details composer-status-details`,hidden:!pe,children:[(wt?.promptQueueBlocked||Be)&&(0,q.jsx)(`p`,{className:`composer-queue-help`,children:t(wt?.promptQueueBlocked?`compactionQueueBlocked`:`compactionQueueWaiting`)}),Pt&&(0,q.jsx)(`ul`,{children:Nt.map(({message:e,key:r})=>{let i=`${n?.id}\0${n?.path}\0${r}`,a=ce===i,o=e||t(`queuedImage`),s=t(a?`queuedMessageCollapse`:`queuedMessageExpand`);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,className:`composer-queue-row ${a?`expanded`:``}`,"aria-expanded":a,"aria-label":`${s}: ${a?o:PD(o,80)}`,title:s,onClick:()=>le(a?null:i),children:[(0,q.jsx)(Cs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o})]})},r)})}),Tt!==void 0&&Tt>jt.length&&(0,q.jsx)(`small`,{children:t(`queuedMore`,{count:Tt-jt.length})}),At&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`composer-queue-help`,children:t(`pendingSteeringHint`,{count:Ot})}),(0,q.jsx)(`ul`,{children:kt.map((e,r)=>{let i=`${n?.id}\0${n?.path}\0steer:${r}:${e}`,a=ce===i,o=e||t(`queuedImage`),s=t(a?`queuedMessageCollapse`:`queuedMessageExpand`);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,className:`composer-queue-row ${a?`expanded`:``}`,"aria-expanded":a,"aria-label":`${s}: ${a?o:PD(o,80)}`,title:s,onClick:()=>le(a?null:i),children:[(0,q.jsx)(Cs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o})]})},i)})}),(Ot??0)>kt.length&&(0,q.jsx)(`small`,{children:t(`queuedMore`,{count:(Ot??0)-kt.length})})]})]}),wt?.promptQueueBlocked&&!pe&&(0,q.jsx)(`p`,{className:`composer-queue-blocked`,role:`status`,children:t(`compactionQueueBlocked`)})]})]}),(0,q.jsxs)(`form`,{"data-editor-expanded":_e||void 0,className:`composer composer-m02 ${e.selectedWorkspace?``:`dormant`} ${oe?`is-dragging`:``}`,onSubmit:e=>void at(e),onDragEnter:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),tt&&se(!0))},onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),tt&&(e.dataTransfer.dropEffect=`copy`,se(!0)))},onDragLeave:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||se(!1)},onDrop:e=>{se(!1),e.dataTransfer.files.length!==0&&(e.preventDefault(),tt&&rt(e.dataTransfer.files))},children:[(0,q.jsx)($O,{open:!!M,viewKey:M??void 0,items:Vt,onClose:Rt},`actions:${y}`),!e.selectedWorkspace&&(0,q.jsxs)(`div`,{className:`composer-dormant-cta`,"aria-hidden":`true`,children:[(0,q.jsx)(Vs,{}),(0,q.jsx)(`span`,{children:gt})]}),!e.selectedWorkspace&&!e.landing&&(0,q.jsx)(`button`,{className:`dormant-overlay`,type:`button`,"aria-label":t(`selectWorkspace`),onClick:()=>void e.actions.chooseWorkspace()}),(0,q.jsx)(`input`,{ref:ke,className:`sr-only`,type:`file`,multiple:!0,tabIndex:-1,"aria-hidden":`true`,onChange:e=>{e.currentTarget.files&&rt(e.currentTarget.files)}}),(0,q.jsxs)(`div`,{className:`composer-attachments`,ref:Ee,children:[(0,q.jsx)(oO,{ownerKey:y,images:m,onRemove:e=>{Fe({images:f.current.images.filter(t=>t.id!==e)})&&re(null)}}),(0,q.jsx)(sO,{ownerKey:y,files:h,onRemove:e=>{Fe({files:(f.current.files??[]).filter(t=>t.id!==e)})&&re(null)}})]}),ne&&(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`alert`,children:ne}),s.status===`failed`&&(0,q.jsxs)(`p`,{className:`composer-attachment-error`,role:`status`,children:[t(`draftStorageUnavailable`),` `,(0,q.jsx)(`button`,{type:`button`,onClick:()=>{o.retryStorage().then(()=>{let e=o.read(c.current.key);f.current=e,S.current=!0,d(e)})},children:t(`draftStorageRetry`)})]}),s.invalid&&(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`status`,children:t(`draftStorageInvalid`)}),z&&(0,q.jsx)(`p`,{role:`status`,children:t(`imageAttachmentsLoading`)}),ie&&(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`alert`,children:ie}),v&&(0,q.jsx)(`p`,{id:`composer-prompt-length-error`,className:`composer-attachment-error`,role:`alert`,children:t(`promptTooLong`,{count:_,limit:12e3})}),oe&&(0,q.jsxs)(`div`,{className:`composer-drop-overlay`,"aria-hidden":`true`,children:[(0,q.jsx)(Ks,{}),(0,q.jsx)(`span`,{children:t(`dropImagesHere`)})]}),(0,q.jsxs)(`div`,{className:`composer-editor`,children:[(0,q.jsx)(`textarea`,{id:ve,ref:Te,value:p,rows:1,disabled:qe,readOnly:!e.selectedWorkspace,"aria-label":t(`describeTask`),"aria-invalid":v||void 0,"aria-describedby":v?`composer-prompt-length-error`:void 0,"aria-autocomplete":`list`,"aria-controls":et?Jk:void 0,"aria-activedescendant":et&&$e[O]?Yk(O):void 0,placeholder:gt,onChange:e=>{Fe({prompt:e.target.value,caret:e.target.selectionStart})&&(ae(null),D(!1))},onClick:e=>Fe({caret:e.currentTarget.selectionStart}),onSelect:e=>Fe({caret:e.currentTarget.selectionStart}),onFocus:()=>{T(!0),D(!1)},onBlur:()=>T(!1),onPaste:e=>{if(!tt)return;let t=Array.from(e.clipboardData.files);if(t.length===0)for(let n of Array.from(e.clipboardData.items??[])){let e=n.kind===`file`?n.getAsFile():null;e&&t.push(e)}t.length!==0&&(e.clipboardData.getData(`text/plain`)||e.preventDefault(),rt(t))},onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)){if(Xe){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),ct(e.key===`ArrowDown`?1:-1);return}if(e.key===`Escape`){e.preventDefault(),D(!0);return}if(e.key===`Tab`){let t=$e[O];!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&t?.availability===`available`&&(e.preventDefault(),st(t));return}if(e.key===`Enter`&&!e.shiftKey){let t=$e[O];if(t){e.preventDefault(),st(t);return}if($e.length>0){e.preventDefault();return}}}e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),at(void 0,e.metaKey||e.ctrlKey))}}}),e.selectedWorkspace&&(0,q.jsx)(V,{content:t(_e?`collapseInput`:`expandInput`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-expand-button icon-button`,"aria-label":t(_e?`collapseInput`:`expandInput`),"aria-expanded":_e,"aria-controls":ve,disabled:qe,onPointerDown:e=>e.preventDefault(),onClick:()=>{let e=Te.current;if(e){be.current?.owner!==y&&(be.current={owner:y});let t=be.current;t[_e?`expanded`:`compact`]=e.scrollTop,xe.current={start:e.selectionStart,end:e.selectionEnd,direction:e.selectionDirection,scrollTop:t[_e?`compact`:`expanded`]??e.scrollTop}}ge(_e?null:y)},children:_e?(0,q.jsx)(fc,{"aria-hidden":`true`}):(0,q.jsx)(ac,{"aria-hidden":`true`})})})]}),(0,q.jsx)(Qk,{open:Xe,activeIndex:O,commandDiscovery:Je,commands:$e,draft:!!e.workspaceDraft,preferBelow:e.landing,onComplete:st,onSelect:k},`commands:${y}`),(0,q.jsxs)(`div`,{className:`composer-toolbar`,children:[(0,q.jsxs)(`div`,{className:`composer-toolbar-context`,children:[tt&&(0,q.jsx)(V,{content:t(`addContext`),placement:`above`,children:(0,q.jsx)(`button`,{ref:R,type:`button`,className:`composer-context-trigger icon-button`,"aria-label":t(`addContext`),"aria-haspopup":`menu`,"aria-expanded":M!==null,"aria-controls":M?`composer-action-menu`:void 0,onClick:()=>{D(!0),N(M?null:`main`)},children:(0,q.jsx)(Ae,{})})}),e.landing?(0,q.jsx)(yo,{className:`workspace-picker-menu`,button:{label:e.selectedWorkspace?MD(e.selectedWorkspace):t(`selectWorkspace`),icon:(0,q.jsx)(Vs,{}),size:`sm`,variant:`ghost`,className:`workspace-picker`},items:dt,menuWidth:240,placement:`above`,alignment:`start`,hasChevron:!0}):(0,q.jsxs)(`span`,{className:`composer-workspace-label`,title:`${pt} / ${ht}`,children:[(0,q.jsx)(Vs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:pt})]}),Ie&&e.snapshot?.runtime.plan&&e.snapshot.runtime.plan!==`inactive`&&(0,q.jsx)(`span`,{className:`composer-plan-chip`,children:t(`planMode_${e.snapshot.runtime.plan}`)})]}),(0,q.jsxs)(`div`,{className:`composer-toolbar-controls`,children:[We&&(0,q.jsx)(yo,{button:{className:`composer-delivery-trigger`,label:t(Ke?`steerCurrentTurn`:`sendNextTurn`),children:(0,q.jsx)(`span`,{className:`composer-delivery-label`,children:t(Ke?`steerCurrentTurn`:`sendNextTurn`)}),"aria-label":t(Ke?`steerCurrentTurn`:`sendNextTurn`),tooltip:t(Ke?`steerCurrentTurn`:`sendNextTurn`),icon:Ke?(0,q.jsx)(Bc,{"aria-hidden":`true`}):(0,q.jsx)(Cs,{"aria-hidden":`true`}),variant:`ghost`,size:`sm`,isDisabled:e.promptAdmissionPending||!!e.promptAdmissionRecovery},items:[{id:`followUp`,label:t(`sendNextTurn`),onClick:()=>{Ue&&(we({ownerKey:y,expectedTurnCommandId:Ue.commandId,mode:`followUp`}),ae(null))}},{id:`steer`,label:t(`steerCurrentTurn`),isDisabled:!We,onClick:()=>{!We||!Ue||(we({ownerKey:y,expectedTurnCommandId:Ue.commandId,mode:`steer`}),ae(null))}}],placement:`above`,alignment:`end`,hasChevron:!0}),(0,q.jsx)(`div`,{className:`model-picker-wrap`,hidden:!!(n&&!Ie&&!e.workspaceDraft),title:Ct?t(Ct):void 0,"data-level":vt??`none`,"data-pending":yt!==null,"data-warning":St,children:(0,q.jsx)(qk,{snapshot:e.snapshot,openRequest:I,currentModel:ft,draftModel:e.draftModel,modelSearch:C,modelSelectionPending:!!e.modelSelectionPending,promptAdmissionPending:e.promptAdmissionPending,sessionSwitching:e.sessionSwitching,liveRunning:Ve,workspaceDraft:!!e.workspaceDraft,thinkingPendingLevel:yt,thinkingNeedsSession:xt,thinkingDisabledReason:Ct,onOpenProviders:e.onOpenProviders,actions:e.actions})}),He&&(0,q.jsx)(V,{content:t(`stopTurn`),placement:`above`,children:(0,q.jsx)(`button`,{className:`send-button stop-button`,type:`button`,"aria-label":t(`stopTurn`),disabled:e.turnCancellationPending||e.sessionSwitching,onClick:()=>void e.actions.cancelActiveTurn(),children:(0,q.jsx)(Rc,{"aria-hidden":`true`})})}),(!He||!!(p.trim()||m.length||h.length))&&(0,q.jsx)(V,{content:t(Be?`compactionDraftHelp`:`send`),placement:`above`,children:(0,q.jsx)(`button`,{className:`send-button`,type:`submit`,"aria-label":t(`send`),disabled:z||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||!ze||!e.selectedWorkspace||e.promptAdmissionPending||v||e.planSelectionPending||!!e.promptAdmissionRecovery||!!e.promptAdmissionResolution||!p.trim()&&m.length===0&&h.length===0,children:e.sessionSwitching&&e.workspaceDraft?(0,q.jsx)(rc,{className:`send-spinner`}):(0,q.jsx)(Xo,{})})})]})]}),(0,q.jsx)(`div`,{className:`composer-hint`,"data-visible":It,"aria-live":`polite`,children:ze?Ft:null})]}),(0,q.jsx)(XO,{open:A,sessionId:Ie?n?.id:void 0,onClose:()=>j(!1),onInsert:lt})]})}function nA({target:e,onClose:t,onOpenProviders:n}){let{t:r}=W(),i=(0,K.useMemo)(()=>new de,[]),[a,o]=(0,K.useState)(0),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),p=e=>{f(null),td(e).then(e=>f(e?`copied`:`failed`))};(0,K.useEffect)(()=>{let t=new AbortController;return c(null),u(null),f(null),(async()=>{let n={errors:[]},[a,o]=await Promise.allSettled([i.thinking(e.sessionId,t.signal),i.trust(e.sessionId,t.signal)]);a.status===`fulfilled`&&a.value.sessionId===e.sessionId?n.thinking=a.value:n.errors.push(r(`thinkingUnavailable`)),o.status===`fulfilled`&&(o.value.workspace===void 0||o.value.workspace===e.cwd)?n.trust=o.value:n.errors.push(r(`trustUnavailable`)),!t.signal.aborted&&(c(n),u(new Date().toLocaleTimeString()))})(),()=>t.abort()},[i,e,a,r]);let m=r(`runtimeStatus`);return(0,q.jsx)(Se,{isOpen:!0,onOpenChange:e=>!e&&t(),width:640,"aria-label":m,children:(0,q.jsxs)(`section`,{className:`inspection-panel`,children:[(0,q.jsxs)(`header`,{className:`inspection-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:m}),(0,q.jsx)(`p`,{className:`inspection-subtitle`,children:e.cwd})]}),(0,q.jsxs)(`div`,{className:`inspection-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":r(`refreshStatus`),disabled:!s,onClick:()=>o(e=>e+1),children:(0,q.jsx)(me,{})}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":r(`close`),onClick:t,children:(0,q.jsx)(je,{})})]})]}),d&&(0,q.jsx)(`p`,{role:`status`,children:r(d===`copied`?`copiedMessage`:`copyFailed`)}),s?(0,q.jsxs)(q.Fragment,{children:[s.errors.map(e=>(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:e},e)),(0,q.jsxs)(`section`,{className:`inspection-section`,children:[(0,q.jsx)(`h3`,{children:r(`modelAndThinking`)}),(0,q.jsxs)(`dl`,{children:[(0,q.jsx)(`dt`,{children:r(`selectedModel`)}),(0,q.jsx)(`dd`,{children:e.model||r(`noModels`)}),(0,q.jsx)(`dt`,{children:r(`thinkingLevel`)}),(0,q.jsx)(`dd`,{children:s.thinking?.supported===!1?r(`thinkingUnsupported`):s.thinking?.level??r(`unknownState`)}),!!s.thinking?.available.length&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`availableThinking`)}),(0,q.jsx)(`dd`,{children:s.thinking?.available.join(` · `)})]})]}),s.thinking?.supported===!1&&(0,q.jsx)(`p`,{className:`inspection-note`,children:r(`thinkingUnsupportedHint`)}),s.thinking&&s.thinking.supported!==!1&&!s.thinking.available.includes(s.thinking.level)&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`status`,children:r(`thinkingLevelMismatch`)})]}),(0,q.jsxs)(`section`,{className:`inspection-section`,children:[(0,q.jsx)(`h3`,{children:r(`projectTrust`)}),(0,q.jsx)(`p`,{children:r(`trust_${s.trust?.state??`unknown`}`)}),(0,q.jsxs)(`dl`,{children:[(0,q.jsx)(`dt`,{children:r(`savedTrustDecision`)}),(0,q.jsx)(`dd`,{children:r(`trustDecision_${s.trust?.decision??`unknown`}`)}),(0,q.jsx)(`dt`,{children:r(`activeSessionTrust`)}),(0,q.jsx)(`dd`,{children:s.trust?.sessionTrusted===!0?r(`trustActiveYes`):s.trust?.sessionTrusted===!1?r(`trustActiveNo`):r(`unknownState`)})]}),s.trust?.refreshRequired===!0&&(0,q.jsx)(`p`,{className:`inspection-warning`,children:r(`trustRefreshNeeded`)})]}),n&&(0,q.jsxs)(`button`,{type:`button`,className:`inspection-provider-link`,"aria-label":r(`openProviderSettings`),onClick:n,children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:r(`providerAvailability`)}),(0,q.jsx)(`small`,{children:r(`authNotVerified`)})]}),r(`openProviderSettings`)]}),(0,q.jsxs)(`div`,{className:`inspection-setup`,children:[(0,q.jsx)(`p`,{className:`inspection-note`,children:r(`configurationViaPi`)}),(0,q.jsx)(`code`,{children:`/openpi-setup`}),(0,q.jsx)(`button`,{type:`button`,className:`inspection-copy`,"aria-label":r(`copySetupCommand`),title:r(`copySetupCommand`),onClick:()=>p(`/openpi-setup`),children:(0,q.jsx)(_s,{"aria-hidden":`true`})})]}),(0,q.jsx)(`p`,{className:`inspection-updated`,children:r(`statusCaptured`,{time:l})})]}):(0,q.jsx)(`p`,{role:`status`,children:r(`inspectionLoading`)})]})})}var rA=32,iA=1048576;function aA(e){return e.drafts.reduce((e,t)=>e+id(t.custom)+Object.values(t.notes).reduce((e,t)=>e+id(t),0),0)}function oA(e,t,n){if(!(n.submission||n.drafts.some(e=>e.choice!==null||e.custom||Object.values(e.notes).some(Boolean))))return e.delete(t),!0;let r=e.get(t);if(!r&&e.size>=rA)return!1;let i=r?aA(r):0,a=aA(n),o=Array.from(e.values()).reduce((e,t)=>e+aA(t),0);return a>i&&o-i+a>iA?!1:(e.set(t,n),!0)}function sA(e,t,n,r){for(let[i,a]of e)a.sessionId===t&&a.sessionPath===n&&a.requestId!==r&&e.delete(i)}function cA({request:e,answer:t,onSettled:n,connected:r=!0,sessionPath:i=``,workingCache:a}){let{t:o}=W(),s=(0,K.useId)(),c=(0,K.useMemo)(()=>new Map,[]),l=a??c,u=JSON.stringify([e.sessionId,i,e.requestId]),[d,f]=(0,K.useState)(()=>l.get(u)??{sessionId:e.sessionId,sessionPath:i,requestId:e.requestId,drafts:e.questions.map(()=>({choice:null,custom:``,notes:{}})),index:0,review:!1,submission:null}),p=(0,K.useRef)(d),{drafts:m,index:h,review:g,submission:_}=d,[v,y]=(0,K.useState)(!!d.submission),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(!1),w=(0,K.useRef)(!1),T=!!_,E=(0,K.useRef)(null),D=(0,K.useRef)(null),O=e.questions[h],k=m[h],A=S||T||!r,j=m.some(e=>e.choice===`custom`?!ad(e.custom):typeof e.choice==`number`&&!ad(e.notes[e.choice]??``)),M=m.every(e=>e.choice!==null)&&!j,N=(t,n)=>e.handoff?o(n===0?`handoffDone`:`handoffUnable`):t;(0,K.useEffect)(()=>()=>E.current?.abort(),[]);let P=e=>oA(l,u,e)?(p.current=e,f(e),x(!1),!0):(x(!0),!1),F=(e,t=!1)=>{P({...p.current,index:e,review:t}),requestAnimationFrame(()=>D.current?.focus())},I=e=>{let t=p.current;P({...t,drafts:t.drafts.map((n,r)=>r===t.index?{...n,...e}:n)})},ee=()=>e.questions.map((e,t)=>{let n=m[t];if(n.choice===`custom`)return n.custom.trim()?{id:e.id,custom:n.custom}:{id:e.id,rephrase:!0};let r=typeof n.choice==`number`?e.options[n.choice]?.label:void 0;return{id:e.id,selected:r,...typeof n.choice==`number`&&n.notes[n.choice]?.trim()?{note:n.notes[n.choice]}:{}}}),L=async(i=!1)=>{if(w.current||!r||!i&&!T&&!M)return;let a=p.current.submission??{answers:i?null:ee()};if(!P({...p.current,submission:a}))return;w.current=!0,C(!0),y(!1);let o=new AbortController;E.current=o;try{let r=await t(e,a.answers,o.signal);o.signal.aborted||(l.delete(u),n(r))}catch{o.signal.aborted||y(!0)}finally{o.signal.aborted||(w.current=!1,C(!1))}};return(0,q.jsxs)(`section`,{className:`question-card`,"aria-labelledby":`${s}-title`,"aria-busy":S,children:[(0,q.jsxs)(`header`,{className:`question-card-header`,children:[(0,q.jsxs)(`span`,{className:`question-status`,children:[(0,q.jsx)(lc,{"aria-hidden":`true`}),o(e.handoff?`handoffWaiting`:`questionWaiting`)]}),(0,q.jsx)(`span`,{className:`question-count`,children:g?o(e.handoff?`handoffReview`:`questionReview`):o(`questionProgress`,{current:h+1,total:e.questions.length})}),(0,q.jsx)(`button`,{type:`button`,className:`question-icon`,"aria-label":o(`questionDismiss`),title:o(`questionDismiss`),disabled:A,onClick:()=>void L(!0),children:(0,q.jsx)(je,{})})]}),(0,q.jsxs)(`div`,{className:`question-card-body`,children:[(0,q.jsx)(`h2`,{id:`${s}-title`,ref:D,tabIndex:-1,children:g?o(`questionReviewTitle`):O.question}),e.handoff&&(0,q.jsxs)(`div`,{className:`handoff-instructions`,children:[(0,q.jsx)(`p`,{children:e.handoff.instructions}),(0,q.jsxs)(`p`,{className:`question-help`,children:[o(`handoffSignal`),` `,e.handoff.completionSignal]}),(0,q.jsx)(`p`,{className:`question-help`,children:o(`handoffVerify`)})]}),g?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`question-help`,children:o(`questionReviewHelp`)}),(0,q.jsx)(`ol`,{className:`question-review-list`,children:e.questions.map((e,t)=>{let n=m[t];return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`question-review-label`,children:e.header}),(0,q.jsx)(`p`,{children:typeof n.choice==`number`?N(e.options[n.choice]?.label,n.choice):n.custom.trim()||o(`questionRephrase`)}),typeof n.choice==`number`&&n.notes[n.choice]?.trim()&&(0,q.jsx)(`p`,{className:`question-help`,children:n.notes[n.choice]})]}),(0,q.jsx)(`button`,{type:`button`,className:`question-icon`,"aria-label":o(`questionEdit`,{question:e.header}),disabled:A,onClick:()=>F(t),children:(0,q.jsx)(yc,{})})]},e.id)})})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`fieldset`,{disabled:A,className:`question-choices`,children:[(0,q.jsx)(`legend`,{className:`sr-only`,children:O.header}),O.options.map((t,n)=>(0,q.jsxs)(`label`,{className:`question-choice ${k.choice===n?`is-selected`:``}`,children:[(0,q.jsx)(`input`,{className:`question-radio`,type:`radio`,name:`${s}-${O.id}`,checked:k.choice===n,onChange:()=>I({choice:n})}),(0,q.jsx)(`span`,{className:`question-choice-number`,"aria-hidden":`true`,children:k.choice===n?(0,q.jsx)(rs,{"aria-hidden":`true`}):n+1}),(0,q.jsxs)(`span`,{className:`question-choice-copy`,children:[(0,q.jsx)(`strong`,{children:N(t.label,n)}),(0,q.jsx)(`span`,{children:e.handoff?o(n===0?`handoffDoneHelp`:`handoffUnableHelp`):t.description})]})]},t.label))]}),typeof k.choice==`number`&&(0,q.jsxs)(`div`,{className:`question-extras`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`question-note-toggle`,disabled:A,"aria-expanded":!!k.notesExpanded,"aria-controls":k.notesExpanded?`${s}-notes`:void 0,onClick:()=>I({notesExpanded:!k.notesExpanded}),children:[(0,q.jsx)(yc,{"aria-hidden":`true`}),o(`questionNotes`)]}),typeof k.choice==`number`&&O.options[k.choice]?.preview&&(0,q.jsxs)(`details`,{className:`question-preview-disclosure`,children:[(0,q.jsx)(`summary`,{children:o(`questionPreview`)}),(0,q.jsx)(`pre`,{className:`question-preview`,children:O.options[k.choice].preview})]},`${O.id}-${k.choice}`)]}),(k.choice===`custom`||typeof k.choice==`number`&&k.notesExpanded)&&(0,q.jsxs)(`label`,{className:`question-notes`,id:`${s}-notes`,children:[(0,q.jsx)(`span`,{className:`sr-only`,id:`${s}-answer-label`,children:k.choice===`custom`?o(`questionYourAnswer`):o(`questionNotes`)}),(0,q.jsx)(`textarea`,{rows:1,disabled:A,value:k.choice===`custom`?k.custom:k.notes[k.choice]??``,onChange:e=>k.choice===`custom`?I({custom:e.target.value}):typeof k.choice==`number`&&I({notes:{...k.notes,[k.choice]:e.target.value}}),"aria-invalid":j,"aria-labelledby":`${s}-answer-label`,"aria-describedby":[j?`${s}-limit`:``,k.choice===`custom`?`${s}-custom-help`:``].filter(Boolean).join(` `)||void 0,placeholder:k.choice===`custom`?o(`questionCustomPlaceholder`):o(`questionNotesPlaceholder`)}),k.choice===`custom`&&(0,q.jsx)(`span`,{className:`question-help`,id:`${s}-custom-help`,children:o(`questionCustomHelp`)})]})]}),j&&(0,q.jsx)(`p`,{className:`question-error`,id:`${s}-limit`,role:`alert`,children:o(`questionLimit`,{count:8e3})}),b&&(0,q.jsx)(`p`,{className:`question-error`,role:`alert`,children:o(`questionDraftLimit`)}),!r&&(0,q.jsx)(`p`,{className:`question-help`,role:`status`,children:o(`questionDisconnected`)}),v&&(0,q.jsx)(`p`,{className:`question-error`,role:`alert`,children:o(`questionUncertain`)})]},`${h}:${g}`),(0,q.jsxs)(`footer`,{className:`question-card-footer`,children:[!g&&!e.handoff&&(0,q.jsxs)(`label`,{className:`question-custom ${k.choice===`custom`?`is-selected`:``} ${A?`is-disabled`:``}`,children:[(0,q.jsx)(`input`,{className:`question-radio`,type:`radio`,name:`${s}-${O.id}`,checked:k.choice===`custom`,disabled:A,onChange:()=>I({choice:`custom`})}),(0,q.jsx)(`span`,{className:`question-choice-number`,"aria-hidden":`true`,children:(0,q.jsx)(yc,{})}),(0,q.jsx)(`span`,{children:o(`questionCustom`)})]}),(0,q.jsxs)(`div`,{className:`question-actions`,children:[(g||h>0)&&(0,q.jsxs)(`button`,{type:`button`,className:`question-secondary`,disabled:A||!g&&h===0,onClick:()=>F(g?e.questions.length-1:h-1),children:[(0,q.jsx)(Ko,{}),o(`questionBack`)]}),!T&&(0,q.jsx)(`button`,{type:`button`,className:`question-secondary question-skip`,disabled:A,title:o(`questionDismiss`),onClick:()=>void L(!0),children:o(`questionSkip`)}),T?(0,q.jsxs)(`button`,{type:`button`,className:`question-primary`,disabled:S||!r,onClick:()=>void L(),children:[(0,q.jsx)(he,{}),o(S?`questionSubmitting`:`questionRetry`)]}):g?(0,q.jsxs)(`button`,{type:`button`,className:`question-primary`,disabled:A||!M,onClick:()=>void L(),children:[(0,q.jsx)(rs,{}),o(e.handoff?`handoffSubmit`:`questionSubmit`)]}):(0,q.jsxs)(`button`,{type:`button`,className:`question-primary`,disabled:A||k.choice===null||j,onClick:()=>F(hnew de,[]),s=(0,K.useMemo)(()=>new Map,[]),c=i??s,[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(0),_=(0,K.useRef)(null),v=(0,K.useRef)(null);return(0,K.useEffect)(()=>{let t=new AbortController;return o.pendingQuestions(e,t.signal).then(({pending:n})=>{if(t.signal.aborted)return;let i=n?.requestId===_.current?null:n;v.current=i?.requestId??null,m(!1),sA(c,e,r,n?.requestId),u(i),n&&n.requestId!==_.current&&f(null)},()=>{t.signal.aborted||m(!0)}),()=>t.abort()},[o,e,r,c,t,h]),!l&&!d&&!p?null:(0,q.jsx)(`div`,{className:`question-panel`,children:l?(0,q.jsx)(cA,{request:l,connected:n,sessionPath:r,workingCache:c,answer:(e,t,n)=>o.answerQuestions(e,t,n),onSettled:e=>{v.current===l.requestId&&(v.current=null,_.current=l.requestId,u(null),f(e.state===`answered`?null:e),g(e=>e+1))}},l.requestId):d?(0,q.jsxs)(`div`,{className:`question-receipt`,role:`status`,children:[(0,q.jsx)(rs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a(`questionState_${d.state}`)}),(0,q.jsx)(`button`,{type:`button`,className:`question-icon`,"aria-label":a(`questionCloseReceipt`),onClick:()=>f(null),children:(0,q.jsx)(je,{})})]}):(0,q.jsxs)(`div`,{className:`question-receipt`,role:`alert`,children:[(0,q.jsx)(`span`,{children:a(`questionLoadFailed`)}),(0,q.jsx)(`button`,{type:`button`,className:`question-secondary`,onClick:()=>g(e=>e+1),children:a(`questionRetryLoad`)})]})})}function uA(e,t,{active:n=!0,running:r=!1,initialSource:i=`unstaged`,initialBaseRef:a}={}){let{t:o}=W(),s=(0,K.useMemo)(()=>new de,[]),c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(!1),d=(0,K.useRef)({active:n,running:r});d.current={active:n,running:r};let[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)(null),v=e?.id,y=e?.path,[b,x]=(0,K.useState)({sessionId:v,sessionPath:y,source:i,baseRef:a}),S=b.sessionId===v&&b.sessionPath===y?b.source:i,C=b.sessionId===v&&b.sessionPath===y?b.baseRef:a,w=(0,K.useCallback)(e=>{x({sessionId:v,sessionPath:y,source:e,baseRef:C})},[v,y,C]),T=(0,K.useCallback)(e=>{x({sessionId:v,sessionPath:y,source:`branch`,baseRef:e})},[v,y]);(0,K.useLayoutEffect)(()=>{p(null),_(null),h(!!v)},[v,y,S,C]);let E=(0,K.useCallback)((e,t)=>{if(!(e.signal.aborted||c.current!==e)&&(c.current=null,h(!1),u.current)){u.current=!1;let e=d.current;(e.active||!e.running)&&l.current===null&&(l.current=window.setTimeout(()=>{l.current=null,t()},e.active?200:2e3))}},[]),D=(0,K.useCallback)(async()=>{if(!v||!y||document.visibilityState===`hidden`)return;if(c.current){u.current=!0;return}let e=new AbortController;c.current=e,h(!0),_(null);try{let t=await s.gitReview(v,y,e.signal,{source:S,offset:`0`,...S===`branch`&&C?{baseRef:C}:{}});e.signal.aborted||(t.ok||_(o(t.reason===`not_git_repository`?`gitReviewNotRepository`:t.reason===`baseline_unavailable`?`gitReviewBaselineUnavailable`:t.reason===`base_branch_unavailable`?`gitReviewBaseUnavailable`:t.reason===`invalid_base_branch`?`gitReviewBaseInvalid`:`gitReviewFailed`)),p(e=>!t.ok&&e?.ok?t.branches?{...e,branches:t.branches}:e:t.ok&&e?.ok&&t.snapshot.revision===e.snapshot.revision?JSON.stringify(t.branches)===JSON.stringify(e.branches)?e:{...e,branches:t.branches}:t))}catch(t){e.signal.aborted||_(t instanceof Error?t.message:`Git review unavailable`)}finally{E(e,D)}},[s,v,y,S,C,o,E]),O=(0,K.useCallback)(async()=>{if(!v||!y||!f?.ok||f.snapshot.nextOffset===void 0||c.current)return;let e=f.snapshot,t=new AbortController;c.current=t,h(!0),_(null);try{let n=await s.gitReview(v,y,t.signal,{source:S,offset:String(e.nextOffset),revision:e.revision,...S===`branch`&&C?{baseRef:C}:{}});if(t.signal.aborted)return;if(!n.ok||n.snapshot.revision!==e.revision)throw Error(o(!n.ok&&n.reason===`revision_changed`?`gitReviewChanged`:`gitReviewFailed`));p({...n,snapshot:{...n.snapshot,files:[...e.files,...n.snapshot.files],additions:e.additions+n.snapshot.additions,deletions:e.deletions+n.snapshot.deletions}})}catch(e){t.signal.aborted||_(e instanceof Error?e.message:o(`gitReviewFailed`))}finally{E(t,D)}},[s,v,y,S,C,f,o,E,D]),k=(0,K.useCallback)(async(e,t,n)=>{if(!v||!y)return;let r=await s.gitReview(v,y,t,{source:S,file:e,revision:n,...S===`branch`&&C?{baseRef:C}:{}});if(!r.ok||r.summaryRevision!==n)throw(r.ok||r.reason===`revision_changed`)&&!t.aborted&&D(),Error(o(!r.ok&&r.reason!==`revision_changed`?`gitReviewFailed`:`gitReviewChanged`));return r.snapshot.files.find(t=>t.path===e)},[s,v,y,S,C,D,o]);return(0,K.useEffect)(()=>{if(v)return l.current=window.setTimeout(()=>{l.current=null,D()},200),()=>{l.current!==null&&window.clearTimeout(l.current),l.current=null,u.current=!1,c.current?.abort(),c.current=null}},[D,v]),(0,K.useEffect)(()=>{n&&l.current!==null&&(window.clearTimeout(l.current),l.current=null)},[n]),(0,K.useEffect)(()=>{if(!n&&r){l.current!==null&&window.clearTimeout(l.current),l.current=null,u.current=!1;return}!v||l.current!==null||(l.current=window.setTimeout(()=>{l.current=null,D()},n?200:2e3))},[D,t,n,r,v]),(0,K.useEffect)(()=>{if(!v)return;let e=()=>{let e=d.current;(e.active||!e.running)&&D()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[D,v]),(0,K.useMemo)(()=>({result:f,loading:m,error:g,refresh:D,source:S,setSource:w,baseRef:C,setBaseRef:T,readFile:k,loadMore:O}),[f,m,g,D,S,w,C,T,k,O])}function dA({notice:e,actions:t}){let{t:n}=W(),r=(0,K.useRef)(!1),[i,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(!1),c=()=>t.dismissArchiveNotice(e.key),l=async n=>{if(!r.current){r.current=!0,a(n),s(!1);try{(n===`undo`?await t.unarchiveSession(e.path):await t.selectSession(e.path,e.sessionId))===!1?s(!0):c()}catch{s(!0)}finally{r.current=!1,a(null)}}};return(0,q.jsx)(`div`,{className:`archive-notification`,"data-session-path":e.path,children:(0,q.jsx)(Gu,{type:`info`,body:n(`archiveNoticeTitle`),isAutoHide:!i&&!o,autoHideDuration:8e3,onDismiss:c,renderContent:()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Go,{className:`archive-notification-icon`,"aria-hidden":`true`}),(0,q.jsxs)(`div`,{className:`archive-notification-copy`,children:[(0,q.jsx)(`strong`,{children:n(`archiveNoticeTitle`)}),(0,q.jsx)(`span`,{title:e.title,children:e.title}),o&&(0,q.jsx)(`span`,{className:`archive-notification-error`,role:`alert`,children:n(`archiveNoticeFailed`)})]}),(0,q.jsx)(`button`,{type:`button`,disabled:i!==null,onClick:()=>void l(`view`),children:n(`archiveNoticeView`)}),(0,q.jsxs)(`button`,{type:`button`,className:`archive-notification-undo`,disabled:i!==null,onClick:()=>void l(`undo`),children:[i===`undo`&&(0,q.jsx)(rc,{className:`archive-notification-spinner`,"aria-hidden":`true`}),n(`archiveNoticeUndo`)]}),(0,q.jsx)(`button`,{type:`button`,className:`archive-notification-close`,"aria-label":n(`close`),onClick:c,children:(0,q.jsx)(je,{"aria-hidden":`true`})})]})})})}function fA({notices:e,actions:t}){return e.length?(0,q.jsx)(`div`,{className:`archive-notifications`,children:e.map(e=>(0,q.jsx)(dA,{notice:e,actions:t},e.key))}):null}function pA(e){let t=e?.closest(`.session-row, .workspace-group`),n=e?.closest(`.session-sidebar`),r=t?.dataset.sessionKey,i=Array.from(n?.querySelectorAll(`.session, .workspace-label, .workspace-heading-label`)??[]),a=i.findIndex(e=>t?.contains(e)),o=a<0?i:[...i.slice(a+1),...i.slice(0,a).reverse()];return()=>requestAnimationFrame(()=>{!n?.isConnected||document.querySelector(`dialog[open]`)||[e,r==null?null:Array.from(n.querySelectorAll(`.session-row`)).find(e=>e.dataset.sessionKey===r)?.querySelector(`.menu-action-button`),...o,n.querySelector(`.new-session-button`)].find(e=>e?.isConnected&&!e.closest(`[hidden], [inert]`)&&e.checkVisibility?.()!==!1)?.focus({preventScroll:!0})})}function mA({session:e,archived:t,connected:n,pinSaving:r,restoring:i,movementItems:a,client:o,actions:s,onRename:c,onPin:l,onRead:u,onArchive:d,onNotice:f}){let{t:p}=W(),m=(0,K.useRef)(null),h=(0,K.useRef)(!0),g=(0,K.useRef)(0),_=(0,K.useRef)(!1),[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(null),[S,C]=(0,K.useState)(!1),[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(null),[O,k]=(0,K.useState)(!1),[A,j]=(0,K.useState)(null),[M,N]=(0,K.useState)(!1),[P,F]=(0,K.useState)(!1),I=e.execution?.status===`running`||e.execution?.waitingForInput,ee=(e.execution?.pendingFollowUps??0)+(e.execution?.pendingSteering??0)>0,L=n?I||ee?p(`sidebarActionRunning`):void 0:p(`sidebarActionDisconnected`),R=t?p(`sidebarForkArchived`):n?E?.local===!1?p(`sidebarForkUnavailable`):void 0:p(`sidebarActionDisconnected`),te=A!==null&&(A.path!==e.path||A.id!==e.id),z=e.pinOrder!==void 0,B=()=>pA(m.current?.querySelector(`button`)??null),ne=()=>{let t=new URL(`/`,window.location.origin);return t.searchParams.set(`sessionPath`,e.path),t.searchParams.set(`sessionId`,e.id),t.href};(0,K.useEffect)(()=>(h.current=!0,()=>{h.current=!1,g.current++}),[]);let re=(0,K.useRef)({id:e.id,path:e.path});(0,K.useEffect)(()=>{(re.current.id!==e.id||re.current.path!==e.path)&&(re.current={id:e.id,path:e.path},y(!1),x(null),D(null))},[e.id,e.path]),(0,K.useEffect)(()=>{if(!v||!e.cwd||!n)return;let t=++g.current;return x(null),C(!1),o.sessionOpenTargets(e.path,e.id).then(e=>{h.current&&g.current===t&&x(e.targets)}).catch(()=>{h.current&&g.current===t&&C(!0)}),()=>{g.current++}},[o,n,v,e.cwd,e.id,e.path]),(0,K.useEffect)(()=>{if(!v||t||!n)return;let r=!1;return D(null),k(!1),Promise.resolve().then(()=>o.sessionForkOptions(e.path,e.id)).then(e=>{r||D(e)}).catch(()=>{r||k(!0)}),()=>{r=!0}},[t,o,n,v,e.id,e.path]);let V=()=>{y(!1),queueMicrotask(c)},ie=()=>{let e=B();l().then(e,e)},ae=()=>{let e=B();d().then(e,e)},oe=async t=>{try{let n=await td(t===`link`?ne():t===`cwd`?e.cwd:(await o.sessionMarkdown(e.path,e.id)).markdown);f(p(n?`sidebarCopied`:`sidebarCopyFailed`),!n)}catch{f(p(`sidebarCopyFailed`),!0)}},se=async(t=`local`)=>{if(!(w||R)&&!(t===`worktree`&&!E?.worktree)){T(!0);try{t===`worktree`?await s.forkConversation(e.path,e.id,t):await s.forkConversation(e.path,e.id)}catch{f(p(`sidebarForkFailed`),!0)}finally{h.current&&T(!1)}}},ce=()=>{if(_.current)return;let e=A?.restoreFocus;j(null),e?.()},le=async()=>{if(!(!A||_.current||L||te)){_.current=!0,N(!0),F(!1);try{await s.deleteSession(A.path,A.id,A.commandId)?(h.current&&j(null),A.restoreFocus()):h.current&&F(!0)}catch{h.current&&F(!0)}finally{_.current=!1,h.current&&N(!1)}}},H=[{id:`rename`,label:p(`sidebarRename`),icon:(0,q.jsx)(yc,{}),isDisabled:!n,onClick:V},...t?[]:[{id:`pin`,label:p(z?`sidebarUnpin`:`sidebarPin`),icon:z?(0,q.jsx)(bc,{}):(0,q.jsx)(xc,{}),isDisabled:r||!n,onClick:ie},{id:`read`,label:p(e.unread?`markConversationRead`:`markConversationUnread`),icon:(0,q.jsx)(As,{}),isDisabled:!e.readRevision||!n,onClick:()=>void u()}],...a.length?[{type:`divider`},...a]:[],...t?[]:[{type:`divider`},{id:`fork`,label:R?(0,q.jsxs)(`span`,{className:`sidebar-menu-unavailable`,children:[(0,q.jsx)(`span`,{children:p(`sidebarFork`)}),(0,q.jsx)(`small`,{children:R})]}):p(`sidebarFork`),icon:(0,q.jsx)(Ws,{}),isDisabled:!!R||w,items:[{id:`fork-local`,label:p(w?`forkSessionPending`:e.worktree?`sidebarForkSameWorktree`:`sidebarForkLocal`),icon:(0,q.jsx)(pc,{}),onClick:()=>void se()},...E?.worktree?[{id:`fork-worktree`,label:p(`sidebarForkWorktree`),icon:(0,q.jsx)(Gc,{className:`sidebar-worktree-icon`}),onClick:()=>void se(`worktree`)}]:E===null?[{id:`fork-worktree-loading`,label:p(O?`sidebarForkOptionsFailed`:`sidebarForkOptionsLoading`),isDisabled:!0}]:[]]}],{type:`divider`},{id:`copy`,label:p(`sidebarCopy`),icon:(0,q.jsx)(Ss,{}),items:[{id:`copy-link`,label:p(`sidebarCopyLink`),onClick:()=>void oe(`link`)},{id:`copy-markdown`,label:p(`sidebarCopyMarkdown`),isDisabled:!n,onClick:()=>void oe(`markdown`)},{id:`copy-cwd`,label:p(`sidebarCopyCwd`),isDisabled:!e.cwd,onClick:()=>void oe(`cwd`)}]},{type:`divider`},{id:`new-window`,label:p(`sidebarNewWindow`),icon:(0,q.jsx)(Fc,{}),onClick:()=>{window.open(ne(),`_blank`,`noopener,noreferrer`)}},...e.cwd&&n&&(b==null||b.length>0)?[{id:`open-in`,label:p(`sidebarOpenIn`),icon:(0,q.jsx)(Yo,{}),items:b?.map(t=>({id:t.id,label:t.label,onClick:()=>{o.openSessionIn(e.path,e.id,t.id).catch(()=>f(p(`sidebarOpenFailed`),!0))}}))??[{id:`open-in-loading`,label:p(S?`sidebarAppsFailed`:`sidebarAppsLoading`),isDisabled:!0}]}]:[],{type:`divider`},{id:t?`restore`:`archive`,label:p(i?`restoringConversation`:t?`sidebarRestore`:`sidebarArchive`),icon:t?(0,q.jsx)(Wo,{}):(0,q.jsx)(Go,{}),isDisabled:i||!!L,description:L,onClick:ae},{id:`delete`,label:p(`sidebarDelete`),icon:(0,q.jsx)(Uc,{}),isDisabled:!!L,description:L,onClick:()=>{let t=B();queueMicrotask(()=>{h.current&&(F(!1),j({commandId:crypto.randomUUID(),path:e.path,id:e.id,name:jD(e,p(`untitledSession`)),restoreFocus:t}))})}}];return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`astryx-menu-trigger`,ref:m,children:(0,q.jsx)(yo,{className:`sidebar-action-menu sidebar-conversation-menu`,button:{label:p(`conversationOptions`),icon:(0,q.jsx)(Ds,{}),isIconOnly:!0,size:`sm`,variant:`ghost`,className:`menu-action-button`},items:v?H:[],menuWidth:248,placement:`below`,alignment:`start`,hasChevron:!1,isMenuOpen:v,onOpenChange:y})}),A&&(0,q.jsx)(Se,{isOpen:A!==null,onOpenChange:e=>{e||ce()},purpose:`form`,width:420,"aria-label":p(`sidebarDeleteTitle`),children:(0,q.jsxs)(`form`,{className:`openpi-dialog sidebar-delete-dialog`,onSubmit:e=>{e.preventDefault(),le()},children:[(0,q.jsx)(`strong`,{children:p(`sidebarDeleteTitle`)}),(0,q.jsx)(`p`,{children:p(`sidebarDeleteDescription`,{name:A?.name})}),(P||te)&&(0,q.jsx)(`p`,{className:`sidebar-dialog-error`,role:`alert`,children:p(te?`sessionLinkUnavailable`:`sidebarDeleteFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,disabled:M,onClick:ce,children:p(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,className:`danger`,disabled:M||!!L||te,children:p(M?`sidebarDeleting`:`sidebarDeleteConfirm`)})]})]})})]})}var hA=e=>JSON.stringify([`session`,e.id,e.path]),gA=e=>JSON.stringify([`message`,e.sessionId,e.sessionPath,e.messageId,e.source,e.lineOffset]);function _A({open:e,initialQuery:t,initialIncludeArchived:n,sessions:r,workspaces:i,onClose:a,onCreateSession:o,onOpenSession:s,onOpenMessage:c}){let{t:l}=W(),u=(0,K.useMemo)(()=>new de,[]),[d,f]=(0,K.useState)(t),p=n,[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(!1),[v,y]=(0,K.useState)(0),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(null),[E,D]=(0,K.useState)(null),O=(0,K.useRef)(null),k=(0,K.useId)(),A=(0,K.useRef)(null);(0,K.useEffect)(()=>(e&&(f(t),h(null),x(!1),C(null),T(null)),()=>{A.current?.abort(),A.current=null}),[e,t]);let j=d.trim(),M=(0,K.useMemo)(()=>new Map(i?.map(e=>[e.path,e.name])),[i]),N=(0,K.useMemo)(()=>{if(!e||!s)return[];let t=j.toLocaleLowerCase();return(r??[]).filter(e=>e.archived&&!p?!1:!t||`${jD(e,l(`untitledSession`))} ${e.cwd} ${M.get(e.cwd)??``}`.toLocaleLowerCase().includes(t)).sort((e,t)=>t.modified.localeCompare(e.modified)||e.path.localeCompare(t.path))},[e,r,M,j,p,s,l]),P=j?[{name:`transcriptSearchSessions`,sessions:N.slice(0,9)}]:[{name:`pinnedConversations`,sessions:N.filter(e=>e.pinOrder!==void 0).sort((e,t)=>(e.pinOrder??0)-(t.pinOrder??0))},{name:`transcriptSearchRecent`,sessions:N.filter(e=>e.pinOrder===void 0).slice(0,10)}];(0,K.useLayoutEffect)(()=>{A.current?.abort(),A.current=null,T(null),C(null),D(null)},[e,j,p,v]),(0,K.useEffect)(()=>{if(!e||!j){_(!1),x(!1);return}let t=new AbortController;_(!0),x(!1);let n=window.setTimeout(()=>{u.searchTranscripts(j,{includeArchived:p,signal:t.signal}).then(e=>{t.signal.aborted||h({query:j,revision:v,includeArchived:p,response:e})}).catch(()=>{t.signal.aborted||x(!0)}).finally(()=>{t.signal.aborted||_(!1)})},250);return()=>{window.clearTimeout(n),t.abort()}},[u,e,j,p,v]);let F=m?.query===j&&m.revision===v&&m.includeArchived===p?m.response:null,I=[...P.flatMap(e=>e.sessions.map(hA)),...j?F?.matches.map(gA)??[]:[]],ee=E!==null&&I.includes(E)?E:I[0],L=e=>`${k}-${encodeURIComponent(e)}`,R=ee?L(ee):void 0;(0,K.useLayoutEffect)(()=>{e&&R&&document.getElementById(R)?.scrollIntoView?.({block:`nearest`})},[e,R]);let te=async(e,t,n)=>{if(A.current)return;D(e),O.current?.focus({preventScroll:!0});let r=new AbortController;A.current=r,T(e),C(null);try{let e=await t(r.signal);if(r.signal.aborted)return;e===!1?C(n):a()}catch{r.signal.aborted||C(n)}finally{A.current===r&&(A.current=null,T(null))}};return(0,q.jsx)(Se,{isOpen:e,onOpenChange:e=>!e&&a(),purpose:`info`,width:`min(700px, 92vw)`,maxHeight:`calc(var(--transcript-search-list-height) + 64px)`,padding:0,className:`transcript-search-modal`,"aria-label":l(`transcriptSearch`),children:e&&(0,q.jsxs)(`div`,{className:`transcript-search-dialog`,children:[(0,q.jsx)(`h2`,{className:`transcript-search-sr-only`,children:l(`transcriptSearch`)}),(0,q.jsx)(`input`,{ref:O,className:`transcript-search-input`,"data-autofocus":!0,type:`search`,maxLength:200,value:d,"aria-label":l(`transcriptSearch`),"aria-autocomplete":`list`,"aria-controls":k,"aria-activedescendant":R,placeholder:l(`transcriptSearchPlaceholder`),autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,onChange:e=>f(e.target.value),onKeyDown:e=>{if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||![`ArrowDown`,`ArrowUp`,`Home`,`End`,`Enter`].includes(e.key)||w!==null)return;if(!ee||!R){e.key===`Enter`&&!j&&o&&(e.preventDefault(),a(),o());return}e.preventDefault();let t=I.indexOf(ee);if(e.key===`Enter`){document.getElementById(R)?.click();return}let n=e.key===`Home`?0:e.key===`End`?I.length-1:e.key===`ArrowDown`?Math.min(t+1,I.length-1):Math.max(t-1,0);D(I[n]??null)}}),(0,q.jsx)(`span`,{className:`transcript-search-sr-only`,role:`status`,children:g?l(`transcriptSearching`):null}),(0,q.jsxs)(`div`,{className:`transcript-search-groups`,children:[(0,q.jsx)(`div`,{id:k,role:`listbox`,"aria-label":l(`transcriptSearch`),children:P.filter(e=>e.sessions.length>0||j&&F?.matches.length).map(e=>(0,q.jsxs)(`fieldset`,{"aria-label":l(e.name),children:[(0,q.jsxs)(`h3`,{children:[l(e.name),g&&(0,q.jsx)(rc,{className:`is-spinning`,"aria-hidden":`true`})]}),(0,q.jsxs)(`ul`,{className:`transcript-search-results`,role:`presentation`,children:[s&&e.sessions.map(e=>{let t=jD(e,l(`untitledSession`)),n=hA(e),r=e.ungrouped?l(`ungrouped`):M.get(e.cwd)||MD(e.cwd);return(0,q.jsx)(`li`,{role:`presentation`,children:(0,q.jsxs)(`button`,{id:L(n),role:`option`,"aria-selected":n===ee,tabIndex:-1,type:`button`,disabled:w!==null,"aria-label":l(`transcriptSearchSessionResult`,{session:t}),onPointerMove:()=>D(n),onMouseDown:e=>e.preventDefault(),onClick:()=>void te(n,t=>s(e.path,t),`transcriptSearchSessionOpenFailed`),children:[(0,q.jsx)(`span`,{className:`transcript-search-accessory`,"aria-hidden":`true`,children:w===n?(0,q.jsx)(rc,{className:`is-spinning`}):e.unread?(0,q.jsx)(hs,{className:`transcript-search-unread`}):null}),(0,q.jsx)(`span`,{className:`transcript-search-result-body`,children:(0,q.jsxs)(`span`,{className:`transcript-search-result-line`,children:[(0,q.jsx)(`span`,{className:`transcript-search-title`,title:t,children:t}),(0,q.jsx)(`span`,{className:`transcript-search-project`,title:e.cwd,children:r})]})})]})},n)}),j&&F?.matches.map(e=>{let t=e.sessionName||l(`untitledSession`),n=l(`transcriptSearchSource_${e.source}`),r=gA(e);return(0,q.jsx)(`li`,{role:`presentation`,children:(0,q.jsxs)(`button`,{id:L(r),role:`option`,"aria-selected":r===ee,tabIndex:-1,type:`button`,disabled:w!==null,"aria-label":l(`transcriptSearchResult`,{session:t,source:n}),onPointerMove:()=>D(r),onMouseDown:e=>e.preventDefault(),onClick:()=>void te(r,t=>c({sessionId:e.sessionId,sessionPath:e.sessionPath,entryId:e.messageId},t),`transcriptSearchOpenFailed`),children:[(0,q.jsx)(`span`,{className:`transcript-search-accessory`,"aria-hidden":`true`,children:w===r&&(0,q.jsx)(rc,{className:`is-spinning`})}),(0,q.jsxs)(`span`,{className:`transcript-search-result-body`,children:[(0,q.jsxs)(`span`,{className:`transcript-search-result-line`,children:[(0,q.jsx)(`span`,{className:`transcript-search-title`,title:t,children:t}),(0,q.jsx)(`span`,{className:`transcript-search-project`,title:e.workspace??n,children:e.workspace?M.get(e.workspace)||MD(e.workspace):n})]}),(0,q.jsx)(`span`,{className:`transcript-search-snippet`,children:e.snippet})]})]})},r)})]})]},e.name))}),!j&&!N.length&&(0,q.jsxs)(`div`,{className:`transcript-search-empty-history`,children:[(0,q.jsx)(`p`,{children:l(`noConversations`)}),o&&(0,q.jsx)(`button`,{className:`transcript-search-create`,type:`button`,onClick:()=>{a(),o()},children:l(`newSession`)})]}),j&&!N.length&&!F?.matches.length&&(g?(0,q.jsx)(`div`,{className:`transcript-search-feedback`,"aria-hidden":`true`,children:(0,q.jsx)(rc,{className:`is-spinning`})}):F&&!b?(0,q.jsx)(`div`,{className:`transcript-search-feedback`,role:`status`,children:l(`transcriptSearchEmpty`)}):null),b&&(0,q.jsxs)(`p`,{className:`transcript-search-error`,role:`alert`,children:[l(`transcriptSearchFailed`),(0,q.jsx)(`button`,{type:`button`,onClick:()=>y(e=>e+1),children:l(`transcriptSearchRetry`)})]}),S&&(0,q.jsx)(`p`,{className:`transcript-search-error`,role:`alert`,children:l(S)}),F?.partial&&(0,q.jsx)(`p`,{className:`transcript-search-partial`,children:l(`transcriptSearchPartial`)})]})]})})}function vA({workspace:e,client:t,actions:n,connected:r,onClose:i}){let{t:a}=W(),[o,s]=(0,K.useState)([]),[c,l]=(0,K.useState)(),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(0),[g,_]=(0,K.useState)(null),[v,y]=(0,K.useState)(null),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(!1),w=(0,K.useRef)(0),T=(0,K.useRef)(null),E=(0,K.useRef)(!1),D=(0,K.useRef)(!0),O=(0,K.useCallback)(async n=>{let r=++w.current;d(!0),p(null);try{let i=await t.workspaceWorktrees(e,n);if(!D.current||r!==w.current)return;if(i.truncated&&!i.nextCursor)throw Error(`Missing worktree continuation`);s(e=>{let t=n?[...e]:[];for(let e of i.worktrees)t.some(t=>t.worktreePath===e.worktreePath&&t.sessionId===e.sessionId&&t.sessionPath===e.sessionPath)||t.push(e);return t}),l(i.nextCursor),h(e=>(n?e:0)+i.unavailable)}catch(e){D.current&&r===w.current&&p(e instanceof ge&&e.code===`WORKTREE_LIST_CHANGED`?`changed`:`failed`)}finally{D.current&&r===w.current&&d(!1)}},[t,e]);(0,K.useEffect)(()=>(D.current=!0,O(),()=>{D.current=!1,w.current++}),[O]);let k=async()=>{if(!(!g||E.current||!r)){E.current=!0,C(!0);try{let e=await n.releaseSessionWorktree(g);if(!D.current)return;y(e),x(!1),e.state===`removed`&&s(e=>e.filter(e=>e.worktreePath!==g.worktreePath||e.sessionId!==g.sessionId||e.sessionPath!==g.sessionPath))}catch{D.current&&(x(!0),y(null))}finally{E.current=!1,D.current&&C(!1)}}};(0,K.useEffect)(()=>{g&&!S&&T.current?.focus()},[g,S]);let A=()=>{E.current||i()};return(0,q.jsx)(Se,{isOpen:!0,onOpenChange:e=>{e||A()},purpose:`form`,width:560,"aria-label":a(`managedWorktrees`),children:(0,q.jsxs)(`div`,{className:`openpi-dialog`,children:[(0,q.jsx)(`strong`,{children:a(`managedWorktrees`)}),(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:e}),(0,q.jsx)(`p`,{children:a(`managedWorktreesDescription`)}),g?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:g.worktreePath}),(0,q.jsx)(`p`,{children:a(`managedWorktreeConfirm`)}),(v||b)&&(0,q.jsxs)(`p`,{role:`status`,className:v?.state===`removed`?void 0:`sidebar-dialog-error`,children:[a(v?.state===`removed`?`managedWorktreeRemoved`:v?.state===`preserved`?`managedWorktreePreserved`:v?.state===`uncertain`?`managedWorktreeUncertainTerminal`:`managedWorktreeUncertain`),v?.reason&&(0,q.jsxs)(q.Fragment,{children:[` `,v.reason]})]}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,ref:T,disabled:S,onClick:()=>{_(null),y(null),x(!1)},children:a(`managedWorktreesBack`)}),v?.state!==`removed`&&v?.state!==`uncertain`&&(0,q.jsx)(`button`,{type:`button`,className:`danger`,disabled:S||!r,onClick:()=>void k(),children:a(S?`managedWorktreeRemoving`:v||b?`managedWorktreesRetry`:`managedWorktreeRemove`)})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`managed-worktrees-list`,children:o.map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:e.worktreePath}),(0,q.jsx)(`button`,{type:`button`,disabled:!r||u||!!f,onClick:()=>{_(e),y(null),x(!1)},children:a(`managedWorktreeReview`)})]},JSON.stringify([e.worktreePath,e.sessionId,e.sessionPath])))}),!u&&!f&&!o.length&&(0,q.jsx)(`p`,{children:a(`managedWorktreesEmpty`)}),m>0&&(0,q.jsx)(`p`,{children:a(`managedWorktreesUnavailable`,{count:m})}),f&&(0,q.jsx)(`p`,{role:`alert`,children:a(f===`changed`?`managedWorktreesChanged`:`managedWorktreesLoadFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,onClick:A,children:a(`close`)}),f&&(0,q.jsx)(`button`,{type:`button`,disabled:u||!r,onClick:()=>void O(f===`changed`?void 0:c),children:a(f===`changed`?`managedWorktreesRefresh`:`managedWorktreesRetry`)}),c&&!f&&(0,q.jsx)(`button`,{type:`button`,disabled:u||!r,onClick:()=>void O(c),children:a(`managedWorktreesMore`)}),u&&(0,q.jsx)(`span`,{role:`status`,children:a(`loading`)})]})]})]})})}function yA(e){return e.workspacePath??e.cwd}function bA(e,t,n){return e[t+(n?2:-1)]??null}function xA(e,t,n){return e[t+ +!!n]??null}function SA(e,t){return e>t.top+t.height/2}function CA(e){let t=e.execution?.lastTurn;return JSON.stringify(t?[e.path,e.id,t.commandId,t.finishedAt]:[e.path,e.id])}function wA(e){return e.firstUnread?.type===`turn`?e.firstUnread.finishedAt:e.execution?.lastTurn?.finishedAt??Date.parse(e.modified)}function TA(e){return JSON.stringify([e.path,e.id])}function EA(e,t=!0){return t&&e.execution?.waitingForInput?0:e.unread?1:t&&e.execution?.status===`running`?2:3}function DA({items:e,label:t,alignment:n=`start`}){return(0,q.jsx)(`span`,{className:`astryx-menu-trigger`,children:(0,q.jsx)(yo,{className:`sidebar-action-menu`,button:{label:t,icon:(0,q.jsx)(Ds,{}),isIconOnly:!0,size:`sm`,variant:`ghost`,className:`menu-action-button`},items:e,menuWidth:240,placement:`below`,alignment:n,hasChevron:!1})})}function OA(e){let{t,i18n:n}=W(),[r,i]=(0,K.useState)(null),a=(0,K.useRef)(null),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(10),[g,_]=(0,K.useState)(!0),[v,y]=(0,K.useState)(new Set),b=(0,K.useRef)(null),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(new Set),[k,A]=(0,K.useState)(10),[j,M]=(0,K.useState)(!1),[N,P]=(0,K.useState)(null),[F,I]=(0,K.useState)(!1),ee=(0,K.useRef)(new Set),L=(0,K.useRef)(null),R=(0,K.useRef)(null),te=(0,K.useRef)(e.connected),[z,B]=(0,K.useState)(null),[ne,re]=(0,K.useState)(``),[ie,ae]=(0,K.useState)(!1),oe=(0,K.useRef)(null),se=(0,K.useRef)(null),ce=(0,K.useRef)(null),le=(0,K.useRef)(null),H=(0,K.useRef)(null),fe=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!N)return;let e=window.setTimeout(()=>P(null),5e3);return()=>window.clearTimeout(e)},[N]);let pe=e.snapshot,he=pe?.selectedSession?.path===e.selectedPath?e.selectedPath:null,_e=pe?.sessions.find(e=>e.path===pe.selectedSession?.path&&e.id===pe.selectedSession?.id),ve=CA(_e??{id:``,path:``});(0,K.useLayoutEffect)(()=>{e.selectedPath,L.current=null,R.current=null,M(!1)},[ve,e.selectedPath]),(0,K.useEffect)(()=>{let t=te.current===!1&&e.connected!==!1;if(te.current=e.connected,R.current&&_e?.readRevision&&R.current.revision!==_e.readRevision&&(R.current=null,L.current=ve,M(!1)),!e.sessionViewVisible||!_e||e.selectedPath!==_e.path||L.current===ve||e.connected===!1)return;let n=(t=!1)=>{if(document.visibilityState!==`visible`||!document.hasFocus()||document.querySelector(`dialog[open]`)||L.current===ve)return;if(!_e.unread||!_e.readRevision){L.current=ve,R.current=null;return}if(R.current?.state===`pending`||R.current?.state===`failed`&&!t)return;let n={state:`pending`,revision:_e.readRevision};R.current=n,M(!1),e.actions.setSessionRead(_e.path,_e.id,!0,_e.readRevision).then(()=>{!$e.current||R.current!==n||(R.current=null,L.current=ve)}).catch(()=>{!$e.current||R.current!==n||(n.state=`failed`,M(!0))})},r=()=>n(!0);return n(t),document.addEventListener(`visibilitychange`,r),window.addEventListener(`focus`,r),document.addEventListener(`close`,r,!0),()=>{document.removeEventListener(`visibilitychange`,r),window.removeEventListener(`focus`,r),document.removeEventListener(`close`,r,!0)}},[ve,_e,e.sessionViewVisible,e.selectedPath,e.connected,e.actions]);let ye=(0,K.useMemo)(()=>new de,[]),[be,xe]=(0,K.useState)(!1),[Ce,we]=(0,K.useState)(!1),[Te,Ee]=(0,K.useState)(!1),U=(0,K.useRef)(!1),De=(0,K.useRef)(null),Oe=(0,K.useRef)(!1),[ke,G]=(0,K.useState)(!1),Me=(0,K.useRef)(null),[Ne,Pe]=(0,K.useState)(null),[Fe,Ie]=(0,K.useState)(null),[Le,Re]=(0,K.useState)(!1),[ze,Be]=(0,K.useState)(!1),Ve=pe?.preferences.pinnedSort??`manual`,He=pe?.preferences.sidebarGrouping??`project`,Ue=pe?.preferences.chatsSort??`updated`,We=(pe?.sessions??[]).filter(e=>e.pinOrder!==void 0&&!e.archived).sort((e,t)=>(Ve===`updated`?t.modified.localeCompare(e.modified):0)||e.pinOrder-t.pinOrder).filter(n=>{let r=pe?.workspaces.find(e=>e.path===yA(n));return`${jD(n,t(`untitledSession`))} ${n.cwd} ${r?.name??``}`.toLowerCase().includes(e.query.trim().toLowerCase())}),Ge=async e=>{if(!U.current){U.current=!0,Ee(!0),Be(!1);try{await e()}catch{Be(!0)}finally{U.current=!1,Ee(!1)}}},Ke=(t,n,r)=>Ge(()=>e.actions.setSessionPin(t.path,t.id,n,r)),qe=(t,n,r)=>Ge(()=>e.actions.setSidebarPin(t,n,r)),Je=t=>Ge(async()=>{await ye.savePreferences(t),await e.actions.refreshSnapshot()}),Ye=async(t,n)=>{if(!t.readRevision)return;let r=CA(t);if(!ee.current.has(r)){t.path===e.selectedPath&&(R.current=null,L.current=r),ee.current.add(r),M(!1);try{await e.actions.setSessionRead(t.path,t.id,n,t.readRevision)}catch{M(!0)}finally{ee.current.delete(r)}}},Xe=e.query.trim(),Ze=JSON.stringify([be,Xe]),Qe=(0,K.useRef)({key:Ze});Qe.current.key!==Ze&&(Qe.current={key:Ze});let $e=(0,K.useRef)(!1),[et,tt]=(0,K.useState)(null),[nt,rt]=(0,K.useState)(!1),[it,at]=(0,K.useState)(null),ot=(0,K.useRef)(null),st=et?.query===Xe?et:null,ct=it?.query===Xe?it:null,lt=(0,K.useCallback)(async(e,t)=>{if(!be)return;ot.current?.abort();let n=new AbortController;ot.current=n,rt(!0),at(null);try{let r=await ye.listArchivedSessions({query:Xe,...e?{cursor:e}:{},limit:25},n.signal);if(n.signal.aborted||ot.current!==n)return;let i=[...r.sessions];for(;!e&&t!==void 0&&i.length!i.some(t=>t.path===e.path));if(i.push(...e),!e.length)break}tt(t=>({...r,query:Xe,sessions:e&&t?.query===Xe?[...t.sessions,...i.filter(e=>!t.sessions.some(t=>t.path===e.path))]:i}))}catch(r){!n.signal.aborted&&ot.current===n&&at({query:Xe,kind:r instanceof ge&&r.code===`ARCHIVED_SESSION_CURSOR_STALE`?`stale`:`failed`,...e?{cursor:e}:{},...t===void 0?{}:{retainedCount:t}})}finally{ot.current===n&&(ot.current=null,rt(!1))}},[Xe,be,ye]),[ut,dt]=(0,K.useState)(new Set),[ft,pt]=(0,K.useState)(new Set),mt=(0,K.useRef)(new Set),[ht,gt]=(0,K.useState)(!1),[_t,vt]=(0,K.useState)(!1),yt=(0,K.useRef)(!1),[bt,xt]=(0,K.useState)(!1),St=(0,K.useRef)(!1),[Ct,wt]=(0,K.useState)(!1),[Tt,Et]=(0,K.useState)(!1),Dt=(0,K.useRef)(!1),Ot=async t=>{if(mt.current.has(t))return;mt.current.add(t),pt(new Set(mt.current)),gt(!1);let n=Qe.current;try{let r=await e.actions.unarchiveSession(t);if(!$e.current||Qe.current!==n)return;r?(tt(e=>e?{...e,sessions:e.sessions.filter(e=>e.path!==t)}:null),await lt()):gt(!0)}finally{mt.current.delete(t),$e.current&&pt(new Set(mt.current))}};(0,K.useEffect)(()=>($e.current=!0,()=>{$e.current=!1}),[]),(0,K.useEffect)(()=>(gt(!1),at(null),be&&(tt(e=>e?.query===Xe?e:null),lt()),()=>{ot.current?.abort(),ot.current=null}),[Xe,be,lt]),(0,K.useEffect)(()=>{if(e.searchOpen)return oe.current?.focus(),()=>se.current?.focus()},[e.searchOpen]),(0,K.useEffect)(()=>{if(e.mobileOpen)return H.current?.focus(),()=>{let t=e.returnFocusRef?.current;t?.checkVisibility()&&t.focus()}},[e.mobileOpen,e.returnFocusRef]),(0,K.useEffect)(()=>{e.mobileOpen&&document.activeElement===document.body&&!document.querySelector(`dialog:modal`)&&H.current?.focus()}),(0,K.useEffect)(()=>{c&&(ce.current?.focus(),ce.current?.select())},[c]);let kt=(0,K.useMemo)(()=>{let n=e.query.trim().toLowerCase(),r=be?st?.sessions??[]:pe?.sessions??[],i=(e,i)=>r.filter(r=>!!r.archived===be&&(be||r.pinOrder===void 0)&&(e===`__ungrouped__`?r.ungrouped:yA(r)===e&&!r.ungrouped)&&(!n||be||i||`${jD(r,t(`untitledSession`))} ${r.cwd}`.toLowerCase().includes(n))),a=[...pe?.workspaces??[]];for(let e of r)!e.ungrouped&&!a.some(t=>t.path===yA(e))&&a.push({path:yA(e),name:yA(e),current:!1});return[...a.map(e=>{let t=!!n&&`${e.name} ${e.path}`.toLowerCase().includes(n);return{...e,showPath:a.some(t=>t.path!==e.path&&t.name===e.name),sessions:i(e.path,t),ungrouped:!1,matches:t}}),{path:`__ungrouped__`,name:t(`ungrouped`),current:!1,sessions:i(`__ungrouped__`,!1),ungrouped:!0,pinOrder:void 0,showPath:!1,matches:!1}].filter(e=>e.sessions.length>0||!be&&!e.ungrouped&&(!n||e.matches))},[be,e.query,st,pe,t]),At=e=>[...e].sort((e,t)=>(Ue===`manual`?(e.order??2**53-1)-(t.order??2**53-1):0)||t.modified.localeCompare(e.modified)||e.path.localeCompare(t.path)),jt=(e,t)=>{if(e.length<=t+1)return e;let n=e.slice(0,t),r=e.find(e=>e.path===he&&e.id===pe?.selectedSession?.id);return r&&!n.includes(r)&&n.push(r),n},Mt=kt.filter(e=>!e.ungrouped),Nt=Mt.filter(e=>e.pinOrder!==void 0),Pt=[...We.map(e=>({kind:`session`,session:e,pinOrder:e.pinOrder})),...Nt.map(e=>({kind:`workspace`,project:e,pinOrder:e.pinOrder}))].sort((e,t)=>{let n=e=>e.kind===`session`?e.session.modified:e.project.sessions.reduce((e,t)=>t.modified>e?t.modified:e,``);return(Ve===`updated`?n(t).localeCompare(n(e)):0)||e.pinOrder-t.pinOrder}),Ft=e=>e.kind===`session`?{kind:`session`,path:e.session.path,id:e.session.id}:{kind:`workspace`,path:e.project.path},It=Mt.filter(e=>e.pinOrder===void 0),Lt=x||e.query.trim()||be||It.length<=6?It:It.slice(0,5),Rt=It.find(e=>_e?.path===he&&e.path===(_e?yA(_e):void 0));Rt&&!Lt.includes(Rt)&&Lt.push(Rt);let zt=At((pe?.sessions??[]).filter(n=>!n.archived&&n.pinOrder===void 0&&!pe?.workspaces.some(e=>e.pinOrder!==void 0&&e.path===yA(n))&&(He===`list`||pe?.preferences.projectsInRecents!==!1||n.ungrouped||!Mt.some(e=>e.path===yA(n)))&&(!e.query.trim()||`${jD(n,t(`untitledSession`))} ${n.cwd} ${pe?.workspaces.find(e=>e.path===yA(n))?.name??``}`.toLowerCase().includes(e.query.trim().toLowerCase())))),Bt=e.query.trim()?zt:jt(zt,k),Vt=t=>EA(t,e.connected)<3,Ht=new Date;Ht.setHours(0,0,0,0),Ht.setDate(Ht.getDate()-6);let Ut=(pe?.sessions??[]).filter(e=>!e.archived&&(Vt(e)||v.has(TA(e))||[`completed`,`failed`].includes(e.execution?.lastTurn?.outcome??``)&&(e.execution?.lastTurn?.finishedAt??0)>=Ht.getTime())),Wt=new Map([...v].map((e,t)=>[e,t])),Gt=Ut.filter(e=>Vt(e)||v.has(TA(e))).sort((t,n)=>(Wt.get(TA(t))??1/0)-(Wt.get(TA(n))??1/0)||EA(t,e.connected)-EA(n,e.connected)||n.modified.localeCompare(t.modified)),Kt=new Set(Gt.map(e=>e.path)),qt=Ut.filter(e=>!g||!Kt.has(e.path)).sort((e,t)=>wA(t)-wA(e)),Jt=g?Gt.slice(0,m):[],Yt=qt.slice(0,Math.max(0,m-Jt.length)),Xt=Ut.length>Jt.length+Yt.length;(0,K.useEffect)(()=>{let e=fe.current;if(!f||!Xt||!e||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&(t.disconnect(),h(m+10))},{root:e.closest(`.sidebar-navigation`)});return t.observe(e),()=>t.disconnect()},[f,Xt,m]),(0,K.useEffect)(()=>{if(!f){b.current=null,y(e=>e.size?new Set:e),h(10);return}let t=b.current??{openedAt:Date.now(),sessions:new Set((pe?.sessions??[]).map(TA))},n=(pe?.sessions??[]).filter(t=>!t.archived&&EA(t,e.connected)<3).sort((t,n)=>EA(t,e.connected)-EA(n,e.connected)||n.modified.localeCompare(t.modified)),r=n.filter(e=>!t.sessions.has(TA(e))&&Date.parse(e.created)>=t.openedAt);for(let e of pe?.sessions??[])t.sessions.add(TA(e));b.current=t,y(e=>{let t=new Set([...r.map(TA),...e,...n.map(TA)]);return t.size===e.size?e:t})},[f,pe?.sessions,e.connected]);let Zt=(pe?.sessions??[]).filter(e=>!e.archived&&e.unread),Qt=Zt.filter(e=>e.readRevision),$t=g?Gt.filter(e=>e.unread&&e.readRevision):[],en=async e=>{if(!F){I(!0);try{await Promise.all(e.map(e=>Ye(e,!0)))}finally{I(!1)}}},tn=he?_e?yA(_e):pe?.selectedSession?.cwd:null,nn=!!(pe?.truncation.sessionsOmitted||pe?.truncation.workspacesOmitted),rn=e=>{yt.current||(re(e.name),ae(!1),l(e))},an=async()=>{let t=ne.trim();if(!c||!t||t===c.name||yt.current)return;let n=c,r=Qe.current,i=st?.sessions.length??25;yt.current=!0,vt(!0),ae(!1);try{if(n.kind===`workspace`?await e.actions.renameWorkspace(n.path,t):await e.actions.renameSession(n.path,t),!$e.current)return;l(null),n.kind===`session`&&be&&Qe.current===r&<(void 0,i)}catch{$e.current&&ae(!0)}finally{yt.current=!1,$e.current&&vt(!1)}},on=async()=>{if(!z||St.current)return;let t=z;St.current=!0,xt(!0),wt(!1);try{let n=await e.actions.removeWorkspace(t.path);if(!$e.current)return;n?B(null):wt(!0)}catch{$e.current&&wt(!0)}finally{St.current=!1,$e.current&&xt(!1)}},sn=async t=>{if(Dt.current)return;let n=Qe.current;Dt.current=!0,Et(!0);try{if(!t){await e.actions.chooseWorkspace();return}let r=await e.actions.createSession(t);if(!$e.current||Qe.current!==n||!r?.sessionId||!r.sessionPath||r.workspacePath!==t)return;xe(!1),p(!1),e.actions.setQuery(``)}catch{}finally{Dt.current=!1,$e.current&&Et(!1)}},cn=(0,K.useCallback)(()=>{(De.current||Me.current)&&(Oe.current=!0),De.current=null,Me.current=null,G(!1),Ie(null),Pe(null)},[]);(0,K.useEffect)(()=>{let e=e=>{e.key!==`Escape`||!De.current&&!Me.current||(e.preventDefault(),cn())},t=()=>{(De.current||Me.current)&&cn()};return window.addEventListener(`keydown`,e,!0),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e,!0),window.removeEventListener(`blur`,t)}},[cn]);let ln=(e,t)=>{let n=Pt[e];if(!n)return;let r=bA(Pt,e,t);qe(Ft(n),!0,r?Ft(r):null)},un=e=>Ve===`manual`?[{id:`move-up`,label:t(`movePinUp`),icon:(0,q.jsx)(Xo,{}),isDisabled:Te||e<=0,onClick:()=>ln(e,!1)},{id:`move-down`,label:t(`movePinDown`),icon:(0,q.jsx)(ue,{}),isDisabled:Te||e===Pt.length-1,onClick:()=>ln(e,!0)}]:[],dn=[{id:`updated`,label:t(`pinnedRecentlyUpdated`),endContent:Ue===`updated`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({chatsSort:`updated`})},{id:`manual`,label:t(`pinnedManualOrder`),endContent:Ue===`manual`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({chatsSort:`manual`})}],fn=[{id:`updated`,label:t(`pinnedRecentlyUpdated`),endContent:Ve===`updated`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({pinnedSort:`updated`})},{id:`manual`,label:t(`pinnedManualOrder`),endContent:Ve===`manual`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({pinnedSort:`manual`})}],pn=[{label:t(`sidebarGroupBy`),items:[{label:t(`sidebarByProject`),endContent:He===`project`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({sidebarGrouping:`project`})},{label:t(`sidebarFlatList`),endContent:He===`list`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({sidebarGrouping:`list`})}]},{label:t(`sidebarChatSort`),items:dn}],mn=[...pn,...He===`project`?[{label:t(`sidebarShow`),items:[{label:t(`sidebarProjectsInRecents`),endContent:pe?.preferences.projectsInRecents===!1?void 0:(0,q.jsx)(rs,{size:16}),isDisabled:Te,onClick:()=>void Je({projectsInRecents:pe?.preferences.projectsInRecents===!1})}]}]:[]],hn=(0,q.jsxs)(`div`,{className:`sidebar-section-actions is-always-visible`,children:[(0,q.jsx)(DA,{label:t(`sidebarActivityOptions`),items:[{type:`section`,title:t(`sidebarShow`),items:[{label:t(`sidebarPriority`),endContent:g?(0,q.jsx)(rs,{size:16}):void 0,onClick:()=>_(e=>!e)}]},{type:`divider`},{label:t(`sidebarMarkAllRead`),icon:(0,q.jsx)(ic,{}),isDisabled:F||!$t.length,onClick:()=>void en($t)}]}),g&&Gt.some(e=>!Vt(e))&&(0,q.jsx)(V,{content:t(`sidebarClearRead`),children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":t(`sidebarClearRead`),onClick:()=>y(new Set(Gt.filter(Vt).map(TA))),children:(0,q.jsx)(es,{"aria-hidden":`true`})})})]}),gn=(a,o=!1,s)=>{let c=JSON.stringify([a.path,a.id,o,s?.key]),l=Pt.findIndex(e=>e.kind===`session`&&e.session.path===a.path&&e.session.id===a.id),u={kind:`session`,path:a.path,id:a.id},d=a.pinOrder!==void 0,p=e.connected!==!1&&a.execution?.status===`running`,m=e.connected!==!1&&a.execution?.waitingForInput,h=a.firstUnread?.type===`turn`?a.firstUnread.outcome:a.execution?.lastTurn?.outcome,g=m?`attention`:p?`running`:a.unread?h===`failed`?`attention`:h===`completed`?`completed`:`unread`:void 0,_=g===`running`?rc:g===`attention`?ls:hs,v=e.connected===!1?0:a.execution?.pendingFollowUps??0,y=a.path===he&&a.id===pe?.selectedSession?.id,b=g===`attention`?m?`waiting`:`failed`:g===`running`&&a.execution?.compacting?`compacting`:g,x=[...b?[t(`sidebarState_`+b)]:[],...v>0?[t(`pendingFollowUpsHint`,{count:v})]:[]].join(` · `),S=s?.sessions.findIndex(e=>e.path===a.path&&e.id===a.id)??-1,C=!be&&!o&&Ue===`manual`&&!!s,w=t=>Ge(()=>e.actions.setSessionOrder(a.path,a.id,t?{path:t.path,id:t.id}:null)),T=o?un(l):C&&s?[{id:`move-up`,label:t(`movePinUp`),icon:(0,q.jsx)(Xo,{}),isDisabled:Te||S<=0,onClick:()=>void w(bA(s.sessions,S,!1))},{id:`move-down`,label:t(`movePinDown`),icon:(0,q.jsx)(ue,{}),isDisabled:Te||S===s.sessions.length-1,onClick:()=>void w(bA(s.sessions,S,!0))}]:[];return(0,q.jsxs)(`li`,{className:`session-row `+(a.unread?`is-unread `:``)+(Fe===a.path?Le?`is-pin-drop-after`:`is-pin-drop-target`:``),"aria-label":jD(a,t(`untitledSession`)),"data-session-key":JSON.stringify([a.path,a.id]),"data-dragging":ke&&(De.current?.kind===`session`&&De.current.path===a.path&&De.current.id===a.id||Me.current?.path===a.path&&Me.current.id===a.id)||void 0,draggable:!Te&&!e.query.trim()&&(o?Ve===`manual`:C),onDragStart:e=>{if(e.stopPropagation(),o&&Ve===`manual`)De.current=u;else if(C&&s)Me.current={path:a.path,id:a.id,scope:s.key};else{e.preventDefault();return}G(!0),Oe.current=!0,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,a.id)},onDragOver:e=>{if(!(o&&Ve===`manual`&&De.current)&&!(C&&Me.current?.scope===s?.key))return;e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,Ie(a.path),Pe(null);let t=e.currentTarget.getBoundingClientRect();Re(SA(e.clientY,t))},onDragEnd:cn,onDrop:t=>{let n=t.currentTarget.getBoundingClientRect(),r=SA(t.clientY,n);if(o&&Ve===`manual`&&De.current){t.preventDefault(),t.stopPropagation();let e=Pt[l+1];qe(De.current,!0,r?e?Ft(e):null:u)}else if(C&&s&&Me.current?.scope===s.key){t.preventDefault(),t.stopPropagation();let n=Me.current,i=xA(s.sessions,S,r);Ge(()=>e.actions.setSessionOrder(n.path,n.id,i?{path:i.path,id:i.id}:null))}else return;cn()},children:[(0,q.jsx)(V,{placement:`end`,delay:450,onOpenChange:e=>i(t=>e?c:t===c?null:t),content:r===c?(0,q.jsxs)(`span`,{className:`session-hover-preview`,children:[(0,q.jsx)(`strong`,{children:jD(a,t(`untitledSession`))}),a.name&&a.firstMessage&&a.firstMessage!==`(no messages)`&&a.firstMessage!==a.name&&(0,q.jsx)(`span`,{children:a.firstMessage}),(0,q.jsx)(`time`,{dateTime:a.modified,children:new Date(a.modified).toLocaleString(n.resolvedLanguage,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})})]}):null,children:(0,q.jsxs)(`button`,{className:`session `+(y?`active`:``),type:`button`,"aria-current":y?`page`:void 0,"aria-label":[jD(a,t(`untitledSession`)),a.path,x].filter(Boolean).join(` · `),onClick:()=>{y&&a.unread&&e.sessionViewVisible&&e.connected!==!1&&Ye(a,!0),e.actions.selectSession(a.path)},onDoubleClick:n=>{y&&e.connected!==!1&&n.target instanceof Element&&n.target.closest(`.session-title`)&&rn({kind:`session`,path:a.path,name:jD(a,t(`untitledSession`))})},children:[(0,q.jsxs)(`span`,{className:`session-copy`,children:[(0,q.jsx)(`span`,{className:`session-title`,children:jD(a,t(`untitledSession`))}),f&&(0,q.jsxs)(`span`,{className:`session-project`,children:[(0,q.jsx)(Vs,{"aria-hidden":`true`}),pe?.workspaces.find(e=>e.path===yA(a))?.name??ND(yA(a))]})]}),x&&(0,q.jsx)(V,{content:x,children:(0,q.jsxs)(`span`,{className:`session-status`,"aria-hidden":`true`,children:[g&&(0,q.jsx)(_,{className:`session-state session-state-`+g}),v>0&&(0,q.jsxs)(`span`,{className:`session-queue`,children:[(0,q.jsx)(ec,{}),(0,q.jsx)(`span`,{children:v>99?`99+`:v})]})]})})]})}),!be&&(0,q.jsx)(V,{content:t(d?`unpinConversation`:`pinConversation`),children:(0,q.jsx)(`button`,{type:`button`,className:`session-pin-button`,"aria-label":t(d?`unpinConversation`:`pinConversation`),disabled:Te,onClick:e=>{let t=pA(e.currentTarget);Ke(a,!d).finally(t)},children:(0,q.jsx)(xc,{"aria-hidden":`true`,fill:d?`currentColor`:`none`})})}),(0,q.jsx)(mA,{session:a,archived:be,connected:e.connected!==!1,pinSaving:Te,restoring:ft.has(a.path),movementItems:T,client:ye,actions:e.actions,onRename:()=>rn({kind:`session`,path:a.path,name:jD(a,t(`untitledSession`))}),onPin:()=>Ke(a,!d),onRead:()=>Ye(a,!!a.unread),onArchive:()=>be?Ot(a.path):e.actions.archiveSession(a.path),onNotice:(e,t=!1)=>P({message:e,error:t})})]},a.path)},_n=(n,r=!1)=>{let i=(be?ut:e.collapsed).has(n.path)&&!e.query.trim(),o=!n.ungrouped&&tn===n.path,c=Pt.findIndex(e=>e.kind===`workspace`&&e.project.path===n.path),l=It.findIndex(e=>e.path===n.path),u=!be&&!n.ungrouped&&!Te&&!e.query.trim(),d=t=>Ge(()=>e.actions.setWorkspaceOrder(n.path,bA(It,l,t)?.path??null)),f={kind:`workspace`,path:n.path},p=At(n.sessions),m=Qt.filter(e=>!e.ungrouped&&yA(e)===n.path),h=be||!!e.query.trim()||D.has(n.path)||p.length<=6,g=[...be?[]:[{id:`pin`,label:t(r?`unpinWorkspace`:`pinWorkspace`),icon:(0,q.jsx)(xc,{}),isDisabled:Te,onClick:()=>void qe(f,!r)},{id:`mark-read`,label:t(`sidebarMarkAllRead`),icon:(0,q.jsx)(ic,{}),isDisabled:F||!m.length,onClick:()=>void en(m)}],...r?un(c):be?[]:[{id:`move-up`,label:t(`movePinUp`),icon:(0,q.jsx)(Xo,{}),isDisabled:!u||l<=0,onClick:()=>void d(!1)},{id:`move-down`,label:t(`movePinDown`),icon:(0,q.jsx)(ue,{}),isDisabled:!u||l===It.length-1,onClick:()=>void d(!0)}],...n.ungrouped?[]:[{id:`managed-worktrees`,label:t(`managedWorktrees`),icon:(0,q.jsx)(Vs,{}),isDisabled:e.connected===!1,onClick:()=>{let e=Array.from(le.current?.querySelectorAll(`.workspace-group`)??[]).find(e=>e.dataset.workspaceKey===n.path);a.current=pA(e?.querySelector(`.workspace-row-actions .menu-action-button`)??null),queueMicrotask(()=>s(n.path))}}],{id:`rename`,label:t(`renameWorkspace`),icon:(0,q.jsx)(Ic,{}),onClick:()=>rn({kind:`workspace`,path:n.path,name:n.name})},{id:`remove`,label:t(`removeWorkspace`),icon:(0,q.jsx)(Uc,{}),variant:`destructive`,onClick:()=>{wt(!1),B({path:n.path,name:n.name})}}];return(0,q.jsxs)(`section`,{className:`workspace-group `+(i?`collapsed `:``)+(o?`is-active-workspace `:``)+(Ne===n.path?Le?`is-pin-drop-after`:`is-pin-drop-target`:``),"data-workspace-key":n.path,"aria-label":n.name,onDragOver:e=>{if(!u||!De.current||(r?Ve!==`manual`:De.current.kind!==`workspace`))return;e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,Pe(n.path),Ie(null);let t=e.currentTarget.getBoundingClientRect();Re(SA(e.clientY,t))},onDragEnd:cn,onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&Pe(null)},onDrop:t=>{if(!u||!De.current||(r?Ve!==`manual`:De.current.kind!==`workspace`))return;t.preventDefault(),t.stopPropagation();let i=t.currentTarget.getBoundingClientRect(),a=SA(t.clientY,i),o=De.current;if(o.kind!==`workspace`||o.path!==n.path)if(r){let e=Pt[c+1];qe(o,!0,a?e?Ft(e):null:f)}else Ge(()=>e.actions.setWorkspaceOrder(o.path,a?It[l+1]?.path??null:n.path));cn()},children:[(0,q.jsxs)(`div`,{className:`workspace-button`,draggable:u&&(!r||Ve===`manual`),onDragStart:e=>{if(!u||r&&Ve!==`manual`||e.target instanceof Element&&e.target.closest(`.workspace-row-actions`)){e.preventDefault();return}De.current=f,requestAnimationFrame(()=>{$e.current&&De.current===f&&G(!0)}),Oe.current=!0,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,n.path)},children:[(0,q.jsxs)(`button`,{className:`workspace-label`,type:`button`,"aria-expanded":!i,"aria-current":o?`location`:void 0,disabled:!!e.query.trim(),title:n.ungrouped?void 0:n.path,onClick:()=>{be?dt(e=>{let t=new Set(e);return t.has(n.path)?t.delete(n.path):t.add(n.path),t}):e.actions.toggleWorkspace(n.path)},children:[(0,q.jsx)(`span`,{className:`workspace-toggle`,"aria-hidden":`true`,children:i?(0,q.jsx)(Vs,{className:`workspace-folder`}):(0,q.jsx)(zs,{className:`workspace-folder`})}),(0,q.jsxs)(`span`,{className:`workspace-identity`,children:[(0,q.jsx)(`strong`,{children:n.name}),n.showPath&&(0,q.jsx)(`small`,{children:ND(n.path)})]})]}),!n.ungrouped&&(0,q.jsxs)(`span`,{className:`workspace-row-actions`,children:[(0,q.jsx)(DA,{label:t(`workspaceOptions`),items:g}),(0,q.jsx)(V,{content:t(`newSession`),children:(0,q.jsx)(`button`,{className:`workspace-action`,type:`button`,"aria-label":t(`newSession`)+` `+n.name,disabled:Tt,"aria-busy":Tt||void 0,onClick:()=>void sn(n.path),children:(0,q.jsx)(Ic,{})})})]})]}),!i&&!p.length&&!be&&!e.query.trim()&&!nn&&(0,q.jsx)(`p`,{className:`workspace-empty`,children:t(`noConversations`)}),!i&&p.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ul`,{className:`workspace-sessions`,children:(h?p:jt(p,5)).map(e=>gn(e,!1,{key:n.path,sessions:p}))}),!be&&!e.query.trim()&&p.length>6&&(0,q.jsx)(`button`,{className:`sidebar-show-more is-indented`,type:`button`,"aria-expanded":D.has(n.path),onClick:()=>O(e=>{let t=new Set(e);return t.has(n.path)?t.delete(n.path):t.add(n.path),t}),children:t(D.has(n.path)?`sidebarShowLess`:`sidebarShowMore`)})]})]},n.path)},vn=new Map,yn=new Date,bn=new Date(yn);bn.setDate(yn.getDate()-1);for(let e of Yt){let n=new Date(wA(e)),r=n.toDateString()===yn.toDateString()?t(`sidebarToday`):n.toDateString()===bn.toDateString()?t(`sidebarYesterday`):Number.isFinite(n.getTime())?n.toLocaleDateString(void 0,{weekday:`long`}):t(`sidebarEarlier`);vn.set(r,[...vn.get(r)??[],e])}return(0,q.jsxs)(`div`,{ref:le,id:`session-sidebar`,className:`session-sidebar`,role:e.mobileOpen?`dialog`:`complementary`,"aria-modal":e.mobileOpen||void 0,"aria-label":`Session navigation`,tabIndex:e.mobileOpen?-1:void 0,onPointerDownCapture:()=>{!De.current&&!Me.current&&(Oe.current=!1)},onClickCapture:e=>{e.detail!==0&&Oe.current&&(e.preventDefault(),e.stopPropagation(),Oe.current=!1)},onKeyDown:t=>{if(!e.mobileOpen||t.defaultPrevented||t.target instanceof Element&&(t.target.closest(`dialog`)||t.key!==`Tab`&&t.target.closest(`[role="menu"]`))||t.key===`Escape`&&le.current?.querySelector(`[aria-haspopup="menu"][aria-expanded="true"]`)||(t.key===`Escape`&&!t.nativeEvent.isComposing&&(t.preventDefault(),e.actions.closeMobileSidebar()),t.key!==`Tab`))return;let n=Array.from(le.current?.querySelectorAll(`button, input, select, textarea, a[href], [tabindex]`)??[]).filter(e=>e.tabIndex>=0&&!e.matches(`:disabled`)&&e.checkVisibility({visibilityProperty:!0})),r=t.shiftKey?n.at(-1):n[0],i=t.shiftKey?n[0]:n.at(-1);(document.activeElement===le.current||document.activeElement===i)&&(t.preventDefault(),r?.focus())},children:[(0,q.jsxs)(`div`,{className:`sidebar-brand`,children:[(0,q.jsx)(`span`,{className:`sidebar-brand-title`,children:`OpenPI`}),(0,q.jsxs)(`div`,{className:`sidebar-header-actions`,children:[(0,q.jsx)(V,{content:t(f?`sidebarViewChats`:`sidebarViewActivity`),children:(0,q.jsxs)(`button`,{className:`icon-button sidebar-activity-toggle`,type:`button`,"aria-label":t(f?`sidebarViewChats`:`sidebarViewActivity`),"aria-pressed":f,onClick:()=>{xe(!1),p(e=>!e)},children:[(0,q.jsx)(Zo,{"aria-hidden":`true`}),Zt.length>0&&(0,q.jsx)(`span`,{className:`sidebar-unread-dot`})]})}),(0,q.jsx)(V,{content:t(`searchConversations`),children:(0,q.jsx)(`button`,{ref:se,className:`icon-button`,type:`button`,"aria-label":t(`searchConversations`),onClick:()=>d(!0),children:(0,q.jsx)(Dc,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:t(`collapseSidebar`),placement:`end`,children:(0,q.jsx)(`button`,{ref:H,className:`collapse-button sidebar-mobile-close`,type:`button`,"aria-label":t(`collapseSidebar`),onClick:()=>e.mobileOpen?e.actions.closeMobileSidebar():e.actions.toggleSidebar(!1),children:(0,q.jsx)(hc,{})})})]})]}),(0,q.jsx)(V,{content:t(`newSession`),placement:`end`,children:(0,q.jsxs)(`button`,{className:`new-session-button`,type:`button`,"aria-label":t(`newSession`),disabled:Tt,"aria-busy":Tt||void 0,onClick:()=>void sn(e.selectedWorkspace),children:[Tt?(0,q.jsx)(rc,{className:`new-session-spinner`}):(0,q.jsx)(Ae,{}),(0,q.jsx)(`span`,{children:t(`newSession`)})]})}),(0,q.jsx)(_A,{open:u,initialQuery:e.query,initialIncludeArchived:be,sessions:pe?.sessions??[],workspaces:pe?.workspaces??[],onClose:()=>d(!1),onOpenMessage:e.actions.navigateToMessage,onOpenSession:t=>e.actions.selectSession(t),onCreateSession:()=>void sn(e.selectedWorkspace)}),(0,q.jsxs)(`div`,{className:`sidebar-navigation`,children:[N&&(0,q.jsx)(`p`,{className:`sidebar-scope-note sidebar-action-feedback`,role:N.error?`alert`:`status`,children:N.message}),ze&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,role:`alert`,children:t(`sidebarSaveFailed`)}),j&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,role:`alert`,children:t(`sidebarReadFailed`)}),f?(0,q.jsxs)(`section`,{className:`sidebar-activity`,"aria-label":t(`sidebarActivity`),children:[g&&(0,q.jsxs)(`section`,{"aria-label":t(`sidebarPriority`),children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsx)(`h2`,{className:`sidebar-section-label`,children:t(`sidebarPriority`)}),hn]}),(0,q.jsx)(`ul`,{className:`sidebar-activity-sessions`,children:Jt.map(e=>gn(e))}),!Jt.length&&(0,q.jsx)(`p`,{className:`sidebar-activity-empty`,children:t(`sidebarActivityEmpty`)})]}),[...vn].map(([e,t],n)=>(0,q.jsxs)(`section`,{"aria-label":e,children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsx)(`h2`,{className:`sidebar-section-label`,children:e}),!g&&n===0&&hn]}),(0,q.jsx)(`ul`,{className:`sidebar-activity-sessions`,children:t.map(e=>gn(e))})]},e)),!g&&!vn.size&&(0,q.jsxs)(`section`,{"aria-label":t(`sidebarToday`),children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsx)(`h2`,{className:`sidebar-section-label`,children:t(`sidebarToday`)}),hn]}),(0,q.jsx)(`p`,{className:`sidebar-activity-empty`,children:t(`sidebarActivityEmpty`)})]}),Xt&&(0,q.jsx)(`div`,{ref:fe,className:`sidebar-activity-tail`,role:`status`,"aria-label":t(`loading`),children:(0,q.jsx)(rc,{"aria-hidden":`true`})})]}):(0,q.jsxs)(q.Fragment,{children:[!be&&(Pt.length>0||ke&&De.current&&Ve===`manual`)&&(0,q.jsxs)(`section`,{className:`pinned-section `+(Ne===`pinned-tail`?`is-pin-drop-after`:``),"aria-label":t(`pinnedConversations`),onDragOver:t=>{Te||Ve!==`manual`||!De.current||e.query.trim()||(t.preventDefault(),t.dataTransfer.dropEffect=`move`,Pe(`pinned-tail`),Ie(null))},onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&Pe(null)},onDrop:t=>{Te||Ve!==`manual`||!De.current||e.query.trim()||(t.preventDefault(),t.stopPropagation(),qe(De.current,!0,null),cn())},children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`workspace-heading-label`,"aria-expanded":!Ce||!!e.query.trim(),onClick:()=>we(e=>!e),children:[t(`pinnedConversations`),(0,q.jsx)(is,{className:Ce&&!e.query.trim()?`is-collapsed`:``,"aria-hidden":`true`})]}),(0,q.jsx)(`div`,{className:`sidebar-section-actions`,children:(0,q.jsx)(DA,{label:t(`pinnedOptions`),items:fn,alignment:`end`})})]}),ke&&Ve===`manual`&&(Pt.length===0||Ce)&&(0,q.jsx)(`p`,{className:`sidebar-drop-hint`,children:t(`sidebarDropPin`)}),(!Ce||!!e.query.trim())&&(0,q.jsx)(`ul`,{className:`pinned-sessions`,children:Pt.map(e=>e.kind===`session`?gn(e.session,!0):(0,q.jsx)(`li`,{className:`pinned-workspace`,children:_n(e.project,!0)},e.project.path))})]}),(be||He===`project`||e.searchOpen)&&(0,q.jsxs)(`div`,{className:`workspace-heading sidebar-section-heading `+(e.searchOpen?`is-searching`:``),children:[(0,q.jsxs)(`button`,{type:`button`,className:`workspace-heading-label`,"aria-label":t(be?`currentConversations`:`sidebarProjects`),"aria-expanded":be?void 0:!C||!!e.query.trim(),onClick:()=>be?xe(!1):w(e=>!e),children:[be&&(0,q.jsx)(Ko,{"aria-hidden":`true`}),t(be?`archivedConversations`:`sidebarProjects`),!be&&(0,q.jsx)(is,{className:C&&!e.query.trim()?`is-collapsed`:``,"aria-hidden":`true`})]}),(0,q.jsxs)(`div`,{className:`session-search`,children:[(0,q.jsx)(Dc,{}),(0,q.jsx)(`input`,{ref:oe,type:`search`,value:e.query,placeholder:t(`searchPlaceholder`),maxLength:be?160:void 0,"aria-label":t(`searchConversations`),onChange:t=>e.actions.setQuery(t.target.value)}),(0,q.jsx)(`button`,{type:`button`,"aria-label":t(`closeSearch`),onClick:()=>e.actions.setSearchOpen(!1),children:(0,q.jsx)(je,{})})]}),(0,q.jsxs)(`div`,{className:`workspace-actions sidebar-section-actions`,children:[!be&&(0,q.jsx)(DA,{label:t(`sidebarProjectOptions`),items:pn}),be&&(0,q.jsx)(V,{content:t(`sidebarFilterList`),children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":t(`sidebarFilterList`),onClick:()=>e.actions.setSearchOpen(!0),children:(0,q.jsx)(Dc,{})})}),!be&&(0,q.jsx)(V,{content:t(`addWorkspace`),children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":t(`addWorkspace`),onClick:()=>void e.actions.chooseWorkspace(),children:(0,q.jsx)(Ae,{})})})]})]}),e.searchOpen&&(0,q.jsxs)(`button`,{type:`button`,className:`sidebar-content-search`,onClick:()=>d(!0),children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),t(`transcriptSearch`)]}),be&&(0,q.jsxs)(`div`,{className:`sidebar-archive-actions`,children:[(0,q.jsx)(V,{content:t(`refreshArchives`),placement:`end`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":t(`refreshArchives`),disabled:nt,onClick:()=>void lt(),children:(0,q.jsx)(me,{"aria-hidden":`true`})})}),nt&&(0,q.jsx)(`span`,{role:`status`,children:t(`loadingArchives`)})]}),be&&ct&&(0,q.jsxs)(`div`,{className:`sidebar-scope-note`,role:`alert`,children:[(0,q.jsx)(`p`,{children:t(ct.kind===`stale`?`archiveCursorStale`:`archiveLoadFailed`)}),(0,q.jsx)(`button`,{type:`button`,disabled:nt,onClick:()=>void lt(ct.kind===`stale`?void 0:ct.cursor,ct.retainedCount),children:t(ct.kind===`stale`?`refreshArchives`:`retryArchives`)})]}),be&&!!st?.truncation.recordsUnscanned&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,children:t(`archiveScanBounded`,{count:st?.truncation.recordsUnscanned})}),!be&&nn&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,children:t(`loadedHistoryBounded`,{sessions:pe?.truncation.sessionsOmitted,workspaces:pe?.truncation.workspacesOmitted})}),be&&ht&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,role:`alert`,children:t(`restoreFailed`)}),(0,q.jsxs)(`div`,{className:`workspace-tree`,children:[(be?kt:He===`project`&&(!C||e.query.trim())?Lt:[]).map(e=>_n(e)),!be&&He===`project`&&ke&&De.current?.kind===`workspace`&&!e.query.trim()&&(0,q.jsx)(`section`,{className:`sidebar-project-tail `+(Ne===`project-tail`?`is-pin-drop-target`:``),"aria-label":t(`sidebarDropProjectLast`),onDragOver:e=>{Te||De.current?.kind!==`workspace`||(e.preventDefault(),e.dataTransfer.dropEffect=`move`,Pe(`project-tail`),Ie(null))},onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&Pe(null)},onDrop:t=>{if(Te||De.current?.kind!==`workspace`)return;t.preventDefault();let n=De.current;Ge(()=>e.actions.setWorkspaceOrder(n.path,null)),cn()},children:t(`sidebarDropProjectLast`)}),!be&&He===`project`&&!C&&!e.query.trim()&&It.length>6&&(0,q.jsx)(`button`,{className:`sidebar-show-more`,type:`button`,"aria-expanded":x,onClick:()=>S(e=>!e),children:t(x?`sidebarShowLess`:`sidebarShowMore`)}),!be&&(0,q.jsxs)(`section`,{className:`sidebar-recents`,"aria-label":t(`sidebarRecent`),children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`workspace-heading-label`,"aria-expanded":!T||!!e.query.trim(),onClick:()=>E(e=>!e),children:[t(`sidebarRecent`),(0,q.jsx)(is,{className:T&&!e.query.trim()?`is-collapsed`:``,"aria-hidden":`true`})]}),(0,q.jsx)(`div`,{className:`sidebar-section-actions`,children:(0,q.jsx)(DA,{label:t(`sidebarRecentOptions`),items:mn})})]}),(!T||!!e.query.trim())&&(0,q.jsx)(`ul`,{className:`recent-sessions`,children:Bt.map(e=>gn(e,!1,{key:`recent`,sessions:zt}))}),!T&&Bt.lengthA(e=>e+10),children:t(`sidebarShowMore`)})]}),(be?!kt.length:!Pt.length&&!zt.length&&(He===`list`||!It.length))&&(0,q.jsx)(`div`,{className:`empty`,hidden:be&&(nt||!!ct),children:e.query.trim()?t(be&&st?.truncation.recordsUnscanned?`noMatchingScannedArchives`:!be&&nn?`noMatchingLoaded`:`noMatching`):t(be?st?.truncation.recordsUnscanned?`noScannedArchives`:`noArchivedSessions`:`noSessions`)}),be&&st?.nextCursor&&ct?.kind!==`stale`&&(0,q.jsx)(`button`,{type:`button`,className:`sidebar-archive-more`,disabled:nt,onClick:()=>void lt(st.nextCursor),children:t(`moreArchives`)})]})]})]}),(0,q.jsx)(`div`,{className:`sidebar-footer`,children:(0,q.jsx)(V,{content:t(`settings`),placement:`above`,children:(0,q.jsxs)(`button`,{className:`sidebar-settings-button`,type:`button`,"aria-label":t(`settings`),"data-provider-settings-trigger":!0,disabled:e.settingsDisabled,onClick:e.onOpenSettings,children:[(0,q.jsx)(Ac,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:t(`settings`)})]})})}),(0,q.jsx)(Se,{isOpen:!!c,onOpenChange:e=>!e&&!yt.current&&l(null),purpose:`form`,width:400,"aria-label":c?.kind===`workspace`?t(`renameWorkspace`):t(`renameConversation`),children:(0,q.jsxs)(`form`,{className:`openpi-dialog`,onSubmit:e=>{e.preventDefault(),an()},children:[(0,q.jsx)(`strong`,{children:c?.kind===`workspace`?t(`renameWorkspace`):t(`renameConversation`)}),(0,q.jsx)(`input`,{ref:ce,value:ne,maxLength:80,disabled:_t,"aria-label":c?.kind===`workspace`?t(`workspaceName`):t(`conversationName`),onChange:e=>re(e.target.value)}),ie&&(0,q.jsx)(`p`,{className:`sidebar-dialog-error`,role:`alert`,children:t(`renameFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:_t,onClick:()=>{yt.current||l(null)},children:t(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,className:`primary`,disabled:_t||!ne.trim()||ne.trim()===c?.name,children:t(_t?`savingName`:`save`)})]})]})}),o&&(0,q.jsx)(vA,{workspace:o,client:ye,actions:e.actions,connected:e.connected!==!1,onClose:()=>{s(null),a.current?.()}},o),(0,q.jsx)(Se,{isOpen:!!z,onOpenChange:e=>!e&&!St.current&&B(null),purpose:`form`,width:440,"aria-label":t(`removeWorkspace`),children:(0,q.jsxs)(`div`,{className:`openpi-dialog`,children:[(0,q.jsx)(`strong`,{children:t(`removeWorkspace`)}),(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:z?.path}),(0,q.jsxs)(`p`,{children:[z?.name,`:`,t(`workspaceDeleteConfirm`)]}),Ct&&(0,q.jsx)(`p`,{className:`sidebar-dialog-error`,role:`alert`,children:t(`workspaceRemoveFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:bt,onClick:()=>{St.current||B(null)},children:t(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`danger`,disabled:bt,onClick:()=>void on(),children:t(bt?`removingWorkspace`:`removeWorkspace`)})]})]})})]})}var kA=(0,K.createContext)(null);kA.displayName=`LayoutAreaContext`;var AA=(0,K.createContext)({hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1});AA.displayName=`LayoutSlotsContext`;var jA={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},MA={start:{kjj79g:`x1nhvcw1`,$$css:!0},center:{kjj79g:`xl56j7k`,$$css:!0},end:{kjj79g:`x13a6bvl`,$$css:!0},between:{kjj79g:`x1qughib`,$$css:!0},around:{kjj79g:`x1l1ennw`,$$css:!0},evenly:{kjj79g:`xaw8158`,$$css:!0}},NA={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},PA={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},FA={stack:{k1xSpc:`x78zum5`,$$css:!0}},IA={0:{k1C7PZ:`x1o57wo1`,khm7nJ:`x6yxi7o`,$$css:!0},1:{k1C7PZ:`x1lfs0n9`,khm7nJ:`x1ngg2t4`,$$css:!0},2:{k1C7PZ:`xak3so`,khm7nJ:`x1x7z4sm`,$$css:!0},3:{k1C7PZ:`xewh9hi`,khm7nJ:`x4olc9o`,$$css:!0},4:{k1C7PZ:`xty4p9g`,khm7nJ:`xtx9w7w`,$$css:!0},5:{k1C7PZ:`x1eqhezk`,khm7nJ:`x1iu6piu`,$$css:!0},6:{k1C7PZ:`x3qlgwd`,khm7nJ:`xczp1bk`,$$css:!0},8:{k1C7PZ:`xicv188`,khm7nJ:`xgx0vcf`,$$css:!0},10:{k1C7PZ:`x1p37tyl`,khm7nJ:`x1xpicb7`,$$css:!0},"0.5":{k1C7PZ:`x1kihgfc`,khm7nJ:`x1tw44j4`,$$css:!0},"1.5":{k1C7PZ:`x1thn6ci`,khm7nJ:`xhq53yo`,$$css:!0}};function LA({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[FA.stack,NA[t],n!=null&&IA[n],e!=null&&jA[e],r!=null&&MA[r],i!=null&&PA[i]]}var RA={reset:{kAzted:`x2lwn1j`,k7Eaqz:`xeuugli`,$$css:!0}},zA={center:{kSGwAc:`xamitd3`,$$css:!0},end:{kSGwAc:`xpvyfi4`,$$css:!0},start:{kSGwAc:`xqcrz7y`,$$css:!0},stretch:{kSGwAc:`xkh2ocl`,$$css:!0}},BA={fill:{kzQI83:`x1iyjqo2`,$$css:!0},static:{kzQI83:`x1c4vz4f`,kmuXW:`x2lah0s`,$$css:!0}};function VA({crossAlignSelf:e,size:t}={}){return[RA.reset,BA[t??`static`],e!=null&&zA[e]]}var HA={layoutOuter:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,$$css:!0},layoutInner:{"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},fill:{kZKoxP:`x12qplqi`,kskxy:`xenllk4`,$$css:!0},auto:{kAzted:`x1us19tq`,$$css:!0},middle:{kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,$$css:!0},fullBleed:{"--layout-padding-outer-x":`x1wbjvqu`,"--layout-padding-outer-y":`xzxxx64`,$$css:!0}},UA={kzqmXN:`xh8yej3`,kUOVxO:`xvueqy4`,$$css:!0},WA={contentWidthVar:e=>[{"--layout-content-width":(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x4906uf`,$$css:!0},{"--x---layout-content-width":(typeof e==`number`?`${e}px`:e)==null?void 0:typeof e==`number`?`${e}px`:e}],contentWidth:e=>[UA,{ks0D6T:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xf68679`,$$css:!0},{"--x-maxWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]};function GA({area:e,children:t}){return t==null?null:(0,q.jsx)(kA,{value:e,children:t})}var KA={"x-default-marker":`x-default-marker`,$$css:!0};function qA({children:e,content:t,contentWidth:n,defaultHasDividers:r,end:i,footer:a,header:o,height:s=`fill`,padding:c,ref:l,start:u,xstyle:d,className:f,style:p}){let m=s===`fill`,h=t??e,g=(0,K.useMemo)(()=>r==null?null:{defaultHasDividers:r},[r]),_=o!=null,v=a!=null,y=u!=null,x=i!=null,S=(0,K.useMemo)(()=>({hasHeader:_,hasFooter:v,hasStart:y,hasEnd:x}),[_,v,y,x]),C=(0,q.jsx)(AA,{value:S,children:(0,q.jsx)(`div`,{ref:l,...H(O(`layout`,{height:s}),w(HA.layoutOuter,m?HA.fill:HA.auto,d),f,p),children:(0,q.jsxs)(`div`,{...w(KA,HA.layoutInner,...LA({direction:`vertical`}),m?HA.fill:HA.auto,c===0&&HA.fullBleed,c!=null&&oe[c],c!=null&&b[c],n!=null&&WA.contentWidthVar(n)),children:[(0,q.jsx)(GA,{area:`header`,children:o}),(0,q.jsxs)(`div`,{...w(...LA({direction:`horizontal`}),HA.middle,n!=null&&WA.contentWidth(n)),children:[(0,q.jsx)(GA,{area:`start`,children:u}),(0,q.jsx)(`div`,{...w(...VA({size:`fill`})),children:(0,q.jsx)(GA,{area:`content`,children:h})}),(0,q.jsx)(GA,{area:`end`,children:i})]}),(0,q.jsx)(GA,{area:`footer`,children:a})]})})});return g==null?C:(0,q.jsx)($D,{value:g,children:C})}qA.displayName=`Layout`;var JA={content:{kB7OPa:`x9f619`,kZKoxP:`x5yr21d`,kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,kVQacm:`x7giv3`,kZCmMZ:`xwjyata`,kwRFfy:`x1peupej`,kLKAdn:`xqty4a x1ioh5az`,kGO01o:`xg476vw xsg11nj`,"--container-padding-inline-start":`x408pgh`,"--container-padding-inline-end":`xikqloz`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`xi9ns85`,$$css:!0},noStart:{kZCmMZ:`x139j0dd`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,$$css:!0},noEnd:{kwRFfy:`xpc6k2p`,$$css:!0},noHeader:{kLKAdn:`x81pis9`,"--container-padding-block-start":`xzz8v79`,$$css:!0},noFooter:{kGO01o:`xon7vh3`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},scrollable:{kVQacm:`xysyzu8`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0}};function YA({children:e,isScrollable:t=!0,padding:n,label:r,role:i,xstyle:a,className:s,style:c,ref:l,...u}){let{hasHeader:d,hasFooter:f,hasStart:p,hasEnd:m}=(0,K.use)(AA),h=n===0;return(0,q.jsx)(`div`,{ref:l,role:i,"aria-label":r,...H(O(`layout-content`),w(JA.content,!p&&!h&&n==null&&JA.noStart,!m&&!h&&n==null&&JA.noEnd,!d&&!h&&n==null&&JA.noHeader,!f&&!h&&n==null&&JA.noFooter,t&&JA.scrollable,h&&JA.fullBleed,n!=null&&I[n],n!=null&&o[n],n!=null&&y[n],n!=null&&se[n],a),s,c),...u,children:e})}YA.displayName=`LayoutContent`;var XA={footer:{kmuXW:`x2lah0s`,$$css:!0},inner:{kB7OPa:`x9f619`,ks0D6T:`xjl2t3p`,kUOVxO:`xvueqy4`,kZCmMZ:`x139j0dd`,kwRFfy:`xpc6k2p`,kLKAdn:`xqty4a`,kGO01o:`xon7vh3`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},divider:{kEafiO:`x178xt8z`,kPef9Z:`x13fuv20`,kLZC3w:`x1pc3f07`,$$css:!0}},ZA={sizing:e=>[{kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function QA({children:e,hasDivider:t,height:n,label:r,padding:i,role:a,xstyle:s,className:c,style:l,ref:u,...d}){let f=(0,K.use)($D),p=t??f?.defaultHasDividers??!1,m=i===0;return(0,q.jsx)(`div`,{ref:u,role:a,"aria-label":r,"data-divider":p||void 0,...H(O(`layout-footer`),w(XA.footer,ZA.sizing(n??null),p&&XA.divider,s),c,l),...d,children:(0,q.jsx)(`div`,{...w(XA.inner,m&&XA.fullBleed,i!=null&&I[i],i!=null&&o[i],i!=null&&y[i],i!=null&&se[i]),children:e})})}QA.displayName=`LayoutFooter`;var $A={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function ej({direction:e=`vertical`,hAlign:t,vAlign:n,justify:r,align:i,gap:o,padding:c,paddingInline:l,paddingInlineStart:u,paddingInlineEnd:d,paddingBlock:f,paddingBlockStart:p,paddingBlockEnd:m,isScrollable:h,width:_,height:v,maxWidth:y,minHeight:b,wrap:x,as:S=`div`,xstyle:C,className:T,style:E,children:D,ref:k,...A}){let j=t??(e===`horizontal`?r:i),M=n??(e===`horizontal`?i:r),N=e===`horizontal`?j:M,P=e===`horizontal`?M:j,F=u??l??c,I=d??l??c,L=p??f??c,R=m??f??c,te=w(...LA({direction:e,crossAlign:P,mainAlign:N,gap:o,wrap:x}),F!=null&&a[F],I!=null&&ee[I],L!=null&&g[L],R!=null&&s[R],h&&$A.scrollable,C),z={..._!=null&&{width:typeof _==`number`?`${_}px`:_},...v!=null&&{height:typeof v==`number`?`${v}px`:v},...y!=null&&{maxWidth:typeof y==`number`?`${y}px`:y},...b!=null&&{minHeight:typeof b==`number`?`${b}px`:b}};return(0,K.createElement)(S,{ref:k,...H(O(`stack`,{direction:e,gap:o,wrap:x}),te,T,{...E,...z}),...A},D)}ej.displayName=`Stack`;function tj({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,q.jsx)(ej,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}tj.displayName=`HStack`;function nj({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,q.jsx)(ej,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}nj.displayName=`VStack`;var rj=`(max-width: 640px)`,ij={action:{ks0D6T:`x193iq5w`,k7Eaqz:`xeuugli`,$$css:!0},stackedAction:{kzqmXN:`xh8yej3`,$$css:!0}};function aj({ref:e,isOpen:t,isInline:n,onOpenChange:r,title:i,description:a,cancelLabel:o,actionLabel:s,actionVariant:c=`destructive`,isActionLoading:l,onAction:u,width:d=400,xstyle:f,className:p,style:m,"data-testid":h,...g}){let _=jr(),v=o??_(`@astryx.alertDialog.cancel`),y=(0,K.useId)(),b=(0,K.useId)(),x=Hi(rj),S=(0,K.useCallback)(()=>{r(!1)},[r]),C=[ij.action,x&&ij.stackedAction],w=(0,q.jsx)(Br,{variant:`ghost`,label:v,onClick:S,xstyle:C,"data-autofocus":!0},`cancel`),T=(0,q.jsx)(Br,{variant:c,label:s,onClick:u,isLoading:l,xstyle:C},`action`);return(0,q.jsx)(Se,{...g,ref:e,isOpen:t,isInline:n,onOpenChange:r,width:d,purpose:`form`,role:n?`group`:`alertdialog`,"aria-labelledby":y,"aria-describedby":b,...H(O(`alert-dialog`),{className:p,style:m}),xstyle:f,"data-testid":h,children:(0,q.jsx)(qA,{content:(0,q.jsxs)(YA,{children:[(0,q.jsx)(nO,{level:2,id:y,children:i}),(0,q.jsx)(jt,{type:`body`,color:`secondary`,id:b,children:a})]}),footer:(0,q.jsx)(QA,{children:(0,q.jsx)(ej,{direction:x?`vertical`:`horizontal`,gap:2,hAlign:x?`stretch`:`end`,wrap:x?`nowrap`:`wrap`,children:x?[T,w]:[w,T]})})})})}aj.displayName=`AlertDialog`;var oj={x1iwu4tg:`x1iwu4tg`,$$css:!0},sj={sm:{kzqmXN:`x1td3qas`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`x100vrsf`,kZKoxP:`xxk0z11`,$$css:!0}},cj={sm:{kzqmXN:`x1td3qas`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`x100vrsf`,kZKoxP:`xxk0z11`,$$css:!0}},lj={sm:{kzqmXN:`x1td3qas`,kZKoxP:`x1qx5ct2`,kmVPX3:`x1i3ajwb`,$$css:!0},md:{kzqmXN:`x100vrsf`,kZKoxP:`xxk0z11`,kmVPX3:`xfawy5m`,$$css:!0}},uj={sm:{kzqmXN:`x6jxa94`,kZKoxP:`x1v9usgg`,k3aq6I:`xbryuvx`,$$css:!0},md:{kzqmXN:`x1kky2od`,kZKoxP:`xlup9mm`,k3aq6I:`xbryuvx`,$$css:!0}},dj={sm:{kzqmXN:`x1kky2od`,kZKoxP:`xlup9mm`,k3aq6I:`xv5t66b xi9aj42`,$$css:!0},md:{kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,k3aq6I:`x15481yp x12xz5k6`,$$css:!0}},fj={sm:{kAzted:`xisnujt`,$$css:!0},md:{kAzted:`xjwf9q1`,$$css:!0}},pj={container:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,$$css:!0},containerLabelHidden:{kOIVth:`xxhr3t`,$$css:!0},containerSpread:{kjj79g:`x1qughib`,kzqmXN:`xh8yej3`,$$css:!0},statusGap:{keoZOQ:`xtbrsbv`,$$css:!0},switchWrapper:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kmuXW:`x2lah0s`,kHBbk8:`xc8icb0`,$$css:!0},input:{kVAEAm:`x10l6tqk`,kogj98:`x1ghz6dp`,kmVPX3:`x1717udv`,kSiTet:`xg01cxk`,kkrTdU:`x1ypdohk x16khyan`,kY2c9j:`x1vjfegm`,k7Eaqz:`xkagaj0`,kAzted:`x80b3aj`,k87sOh:`xijlfn0`,kLqNvP:`x1hsn8va`,k3aq6I:`x8i4i9p`,$$css:!0},inputDisabled:{kkrTdU:`xt0e3qv`,$$css:!0},inputBusy:{kfzvcC:`x47corl`,$$css:!0},track:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kaIpWk:`xjspbzw`,k1ekBW:`x15406qy`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kB7OPa:`x9f619`,kMzoRj:`xc342km x13rsnn2`,ksu8eU:`xng3xce xx61lck`,kVAM5u:`x1w1tqly`,$$css:!0},trackFocus:{kI3sdo:`x1a2a7pz xafswnp`,kInvED:`xwz5zln`,$$css:!0},trackOff:{kWkggS:`xspzpui x1a8ae7b x9yvj25`,$$css:!0},trackOn:{kWkggS:`x1ewilqj xcgwt1n x1jzqe4`,$$css:!0},trackDisabled:{kSiTet:`xbyyjgo`,kVAM5u:`xmnqt3w`,$$css:!0},trackDisabledOff:{kWkggS:`xspzpui`,$$css:!0},thumb:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kaIpWk:`xjspbzw`,k1ekBW:`xh3q6i0`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},thumbOff:{kWkggS:`x10xzikg xwvh9j7`,$$css:!0},thumbOn:{kWkggS:`x10xzikg x1sir5s4`,$$css:!0},labelWrapper:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kjj79g:`xl56j7k`,$$css:!0}},mj={width:e=>[{kzqmXN:e==null?e:`x5lhr3w`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function hj({label:e,isLabelHidden:t=!1,description:n,onChange:r,changeAction:i,isLoading:a=!1,value:o,isDisabled:s=!1,htmlName:c,disabledMessage:l,isOptional:u=!1,isRequired:d=!1,onFocus:f,onBlur:p,labelIcon:m,labelTooltip:h,labelPosition:g=`end`,labelSpacing:_=`hug`,status:v,size:y=`md`,width:b,xstyle:x,className:S,style:C,ref:T,...E}){let D=(0,K.useId)(),k=(0,K.useId)(),A=(0,K.useId)(),j=WO({isRequired:d,isOptional:u}),[,M]=(0,K.useTransition)(),[N,P]=(0,K.useOptimistic)(o),I=a||N!==o,ee=N===!0,L=s&&!!l,R=F({placement:`above`,focusTrigger:`always`,isEnabled:L}),te=[];n&&te.push(k),v?.message&&te.push(A),L&&te.push(R.describedBy);let z=te.length>0?te.join(` `):void 0,B=(0,q.jsxs)(`div`,{...w(pj.switchWrapper,sj[y]),children:[(0,q.jsx)(`input`,{ref:we(T,R.positionRef),id:D,type:`checkbox`,role:`switch`,name:s?void 0:c,checked:ee,disabled:s&&!L,"aria-disabled":L?`true`:void 0,form:L?``:void 0,required:d,"aria-required":j?`true`:void 0,onChange:e=>{if(s||I)return;let t=e.target.checked;r?.(t,e),i&&!e.defaultPrevented&&M(async()=>{P(t),await i(t,e)})},onFocus:f,onBlur:p,"aria-describedby":z,"aria-invalid":v?.type===`error`||void 0,"aria-busy":I||void 0,...w(pj.input,cj[y],s&&pj.inputDisabled,I&&pj.inputBusy)}),(0,q.jsx)(`div`,{"aria-hidden":`true`,...H(O(`switch`,{checked:ee?`checked`:null,disabled:s?`disabled`:null,size:y}),w(pj.track,lj[y],ee?pj.trackOn:pj.trackOff,!s&&pj.trackFocus,s&&pj.trackDisabled,s&&!ee&&pj.trackDisabledOff)),children:(0,q.jsx)(`div`,{...H(O(`switch-thumb`,{checked:ee?`checked`:null,size:y}),w(pj.thumb,ee?dj[y]:uj[y],ee?pj.thumbOn:pj.thumbOff)),children:I&&(0,q.jsx)(Gt,{size:`sm`})})}),I&&(0,q.jsx)(Kt,{role:`status`,children:`Loading`})]}),ne=(0,q.jsx)(`div`,{...w(pj.labelWrapper,fj[y]),children:(0,q.jsx)(DO,{...O(`switch-label`),label:e,inputID:D,isLabelHidden:t,isDisabled:s,isOptional:u,isRequired:d,labelIcon:m,labelTooltip:h,description:n,descriptionID:k})});return(0,q.jsxs)(`div`,{...H(O(`switch-field`,{labelPosition:g===`end`?void 0:g,labelSpacing:_===`hug`?void 0:_}),w(b!=null&&mj.width(b),x),S,C),...E,children:[(0,q.jsxs)(`div`,{ref:e=>{R.interactionRef(e)},...w(pj.container,t&&pj.containerLabelHidden,_===`spread`&&pj.containerSpread,!s&&oj),children:[` `,g===`start`?(0,q.jsxs)(q.Fragment,{children:[ne,B]}):(0,q.jsxs)(q.Fragment,{children:[B,ne]})]}),v?.message&&(0,q.jsx)(jO,{type:v.type,message:v.message,id:A,variant:`detached`,xstyle:pj.statusGap}),L&&R.renderTooltip(l)]})}hj.displayName=`Switch`;var gj=[`chrome`,`edge`,`brave`,`chromium`,`safari`,`firefox`],_j=[`embedded`,...gj],vj=e=>gj.some(t=>t===e);function yj(){let[e,t]=(0,K.useState)(),n=(0,K.useRef)(void 0),r=(0,K.useRef)(!1),i=(0,K.useRef)(!0),a=(0,K.useRef)(void 0),o=(0,K.useCallback)(()=>{a.current?.(),a.current=void 0,n.current?.close(),n.current=void 0,i.current&&t(void 0)},[]);return(0,K.useEffect)(()=>(i.current=!0,window.addEventListener(`pagehide`,o),()=>{i.current=!1,window.removeEventListener(`pagehide`,o),o()}),[o]),{container:e,open:async()=>{if(n.current&&!n.current.closed)return n.current.focus(),!0;if(r.current)return!1;r.current=!0;try{let e=window.documentPictureInPicture,r=e?await e.requestWindow({width:460,height:740}):window.open(`about:blank`,`_blank`,`popup,width=460,height=740`);if(!r)return!1;if(!i.current)return r.close(),!1;n.current=r,r.document.title=`OpenPI Browser Bridge`;let o=()=>{r.document.documentElement.lang=document.documentElement.lang,r.document.documentElement.dataset.theme=document.documentElement.dataset.theme,r.document.documentElement.style.cssText=document.documentElement.style.cssText};o(),r.document.documentElement.classList.add(`browser-guide-window`);for(let e of document.styleSheets)try{let t=r.document.createElement(`style`);t.textContent=[...e.cssRules].map(e=>e.cssText).join(` -`),r.document.head.append(t)}catch{if(!e.href)continue;let t=r.document.createElement(`link`);t.rel=`stylesheet`,t.href=e.href,r.document.head.append(t)}let s=r.document.createElement(`main`);s.className=`browser-settings browser-settings-detached`,r.document.body.append(s);let c=new MutationObserver(o);c.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`style`,`lang`]});let l=()=>{c.disconnect(),n.current===r&&(n.current=void 0,a.current=void 0,i.current&&t(void 0))};return r.addEventListener(`pagehide`,l,{once:!0}),a.current=()=>{c.disconnect(),r.removeEventListener(`pagehide`,l)},t(s),!0}catch{return o(),!1}finally{r.current=!1}},close:o,isOpen:()=>!!(n.current&&!n.current.closed)}}function bj({id:e,name:t,label:n,value:r,options:i,disabled:a=!1,onChange:o,className:s,menuWidth:c=`min(300px, calc(100vw - 32px))`}){let l=i.find(e=>e.value===r);return(0,q.jsx)(yo,{button:{id:e,name:t,label:l?.label??r,"aria-label":n,variant:`secondary`,size:`sm`,className:`settings-select-menu-trigger${s?` ${s}`:``}`,isDisabled:a},className:`settings-select-menu`,menuWidth:c,alignment:`end`,children:(0,q.jsx)(Bo,{value:r,label:n,onChange:e=>{e!==r&&o(e)},children:i.map(e=>(0,q.jsx)(Ho,{value:e.value,label:e.label,isDisabled:a||e.disabled,description:e.description?(0,q.jsx)(`span`,{className:`settings-select-option-description`,children:e.description}):void 0},e.value))})})}var xj={chrome:`Chrome`,edge:`Microsoft Edge`,brave:`Brave`,chromium:`Chromium`,safari:`Safari`,firefox:`Firefox`};function Sj({browser:e}){return(0,q.jsx)(`span`,{className:`browser-settings-mark ${e}`,"aria-hidden":`true`,children:e===`chrome`||e===`chromium`?(0,q.jsx)(`i`,{}):(0,q.jsx)(Es,{})})}function Cj({onConfigure:e,setupPending:t=!1}){let{t:n}=W(),r=yj(),i=(0,K.useRef)(r.isOpen);i.current=r.isOpen;let[a,o]=(0,K.useState)(),[s,c]=(0,K.useState)(),[l,u]=(0,K.useState)(!1),d=l||t,[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(),[g,_]=(0,K.useState)(`chrome`),[v,y]=(0,K.useState)(1),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(),w=(0,K.useRef)(0),T=(0,K.useRef)(null),E=(0,K.useRef)(null),D=(0,K.useRef)(!0);(0,K.useEffect)(()=>{m&&(T.current?.scrollIntoView?.({block:`start`}),E.current?.focus({preventScroll:!0}))},[m,v,r.container]);let O=(0,K.useCallback)(async()=>{let e=++w.current;try{let t=await new de().request(`/api/settings/browser`);return D.current&&e===w.current&&(o(t),c(void 0)),t}catch(t){D.current&&e===w.current&&c(t instanceof Error?t.message:String(t));return}},[]);(0,K.useEffect)(()=>{D.current=!0,O();let e=setInterval(()=>{(document.visibilityState===`visible`||i.current())&&O()},3e3),t=()=>void O();return window.addEventListener(`focus`,t),()=>{D.current=!1,clearInterval(e),window.removeEventListener(`focus`,t)}},[O]);let k=async t=>{u(!0),c(void 0),C(void 0),++w.current;try{let r=await e(`Configure browser access: ${[t.control===void 0?void 0:`browser_control=${t.control}`,t.embedded===void 0?void 0:`browser_embedded=${t.embedded}`,t.defaultBrowser===void 0?void 0:`browser_default=${JSON.stringify(t.defaultBrowser)}`,t.externalBrowsers===void 0?void 0:`browser_external=${JSON.stringify(t.externalBrowsers)}`].filter(e=>e!==void 0).join(`, `)}. Preserve all other settings.`);if(!D.current)return;if(!r)throw Error(n(`setupRequestFailed`));C(n(`setupRequestAccepted`))}catch(e){await O(),D.current&&c(e instanceof Error?e.message:String(e))}finally{D.current&&u(!1)}},A=async(e,t)=>{u(!0),c(void 0),C(void 0);try{if(await new de().request(`/api/settings/browser/action`,{method:`POST`,body:JSON.stringify({browser:e,action:t})}),D.current)return!0}catch(e){D.current&&c(e instanceof Error?e.message:String(e))}finally{D.current&&u(!1)}return!1},j=e=>e===`embedded`?n(`browserEmbedded`):xj[e];if(!a)return(0,q.jsxs)(`div`,{className:`browser-settings-load`,role:s?`alert`:`status`,children:[(0,q.jsx)(Es,{}),(0,q.jsx)(`p`,{children:s||n(`browserLoading`)}),s&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>void O(),children:n(`browserCheck`)})]});let{config:M}=a,N=a.profiles.find(e=>e.current&&e.connected&&e.version===a.extensionVersion),P=e=>a.profiles.filter(t=>t.connected&&t.version===a.extensionVersion&&(e===`embedded`?t.current&&![`safari`,`firefox`].includes(t.browser):t.browser===e)),F=e=>e===`embedded`?M.embedded:M.externalBrowsers.includes(e),I=(e,t)=>e===`embedded`?{embedded:t}:{externalBrowsers:t?[...new Set([...M.externalBrowsers,e])]:M.externalBrowsers.filter(t=>t!==e)},ee=e=>{h(e),y(1),C(void 0),x(!1),_(e===`embedded`?N&&![`safari`,`firefox`].includes(N.browser)?N.browser:`chrome`:e)},L=e=>{let t=P(e).length>0,r=e===`embedded`||a.browsers.some(t=>t.id===e&&t.installed),i=a.profiles.some(t=>t.connected&&t.version!==a.extensionVersion&&(e===`embedded`?t.current&&![`safari`,`firefox`].includes(t.browser):t.browser===e));return(0,q.jsxs)(`div`,{className:`browser-settings-row`,children:[(0,q.jsx)(Sj,{browser:e}),(0,q.jsxs)(`div`,{className:`browser-settings-description`,children:[(0,q.jsx)(`strong`,{children:j(e)}),(0,q.jsx)(`span`,{className:t?`connected`:``,children:t?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`i`,{}),n(`browserConnected`)]}):n(i?`browserUpdateNeeded`:r?`browserNeedsSetup`:`browserNotFound`)})]}),(0,q.jsx)(`button`,{className:`browser-settings-button`,type:`button`,disabled:l,"aria-label":n(t?`browserManageNamed`:`browserSetupNamed`,{browser:j(e)}),onClick:()=>ee(e),children:n(t?`browserManage`:`browserSetUp`)}),(0,q.jsx)(hj,{label:n(`browserAllowNamed`,{browser:j(e)}),isLabelHidden:!0,size:`sm`,value:F(e),isDisabled:d,onChange:t=>void k(I(e,t))})]},e)},R=m!==void 0&&P(m).length>0,te=a.browsers.some(e=>e.id===g&&e.installed),z=g===`safari`||g===`firefox`,B=z?a.portableExtensionPath??a.extensionPath:a.extensionPath,ne=g===`firefox`?`${B.replace(/[\\/]+$/,``)}/manifest.json`:B,re=z?`browser-extension-portable`:`browser-extension`,V=g===`safari`?n(`browserSafariSettings`):g===`firefox`?`about:debugging#/runtime/this-firefox`:`${g===`edge`?`edge`:g===`brave`?`brave`:`chrome`}://extensions/`,ie=n(g===`safari`?`browserSafariDeveloper`:g===`firefox`?`browserFirefoxThis`:`browserDeveloperMode`),ae=n(g===`safari`?`browserSafariTemporary`:g===`firefox`?`browserFirefoxTemporary`:`browserLoadUnpacked`),oe=[n(`browserStepOpen`),ie,n(`browserStepAdd`),n(`browserStepConnect`)];return(0,q.jsxs)(`div`,{className:`settings-content-page browser-settings`,children:[(0,q.jsxs)(`header`,{className:`browser-settings-heading`,children:[(0,q.jsx)(`h1`,{children:n(`browserSettings`)}),(0,q.jsx)(`p`,{children:n(`browserSettingsIntro`)})]}),(0,q.jsxs)(`div`,{className:`browser-settings-card browser-settings-main-card`,children:[(0,q.jsxs)(`div`,{className:`browser-settings-control`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:n(`browserControl`)}),(0,q.jsx)(`p`,{children:n(`browserControlHint`)})]}),(0,q.jsx)(hj,{label:n(`browserControl`),isLabelHidden:!0,size:`sm`,value:M.control,isDisabled:d,onChange:e=>void k({control:e})})]}),(0,q.jsxs)(`div`,{className:`browser-settings-default`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`browser-default`,children:n(`browserDefault`)}),(0,q.jsx)(`p`,{children:n(`browserDefaultHint`)})]}),(0,q.jsx)(bj,{id:`browser-default`,label:n(`browserDefault`),value:M.defaultBrowser,disabled:d,onChange:e=>{let t=_j.find(t=>t===e);t&&k({defaultBrowser:t})},options:_j.map(e=>({value:e,label:`${j(e)}${F(e)?``:` · ${n(`browserBlocked`)}`}`,disabled:!F(e)}))})]})]}),!F(M.defaultBrowser)&&(0,q.jsx)(`p`,{className:`browser-settings-warning`,role:`status`,children:n(`browserDefaultBlocked`)}),(0,q.jsxs)(`div`,{className:`browser-settings-section-heading`,children:[(0,q.jsx)(`h2`,{children:n(`browserAllowedTitle`)}),(0,q.jsx)(`span`,{children:!M.control&&n(`browserOffHint`)})]}),(0,q.jsxs)(`div`,{className:`browser-settings-card`,children:[L(`embedded`),L(`chrome`),(0,q.jsxs)(`details`,{className:`browser-settings-more`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(os,{}),n(`browserMore`)]}),gj.filter(e=>e!==`chrome`).map(L)]})]}),(0,q.jsx)(`p`,{className:`browser-settings-example`,children:n(`browserSpeakHint`)}),r.container&&(0,q.jsxs)(`div`,{className:`browser-settings-guide-placeholder`,role:`status`,children:[(0,q.jsx)(`p`,{children:n(`browserGuideDetached`)}),(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-button`,onClick:()=>void r.open(),children:n(`browserShowGuide`)}),(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-text-button`,onClick:r.close,children:n(`browserGuideInline`)})]}),m!==void 0&&(e=>r.container?(0,$c.createPortal)(e,r.container):e)((0,q.jsxs)(`section`,{ref:T,className:`browser-settings-guide`,"aria-label":n(`browserGuideTitle`,{browser:j(m)}),children:[(0,q.jsxs)(`div`,{className:`browser-settings-guide-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{children:n(R?`browserConnectionTitle`:`browserGuideEyebrow`)}),(0,q.jsx)(`h3`,{children:n(`browserGuideTitle`,{browser:j(m)})})]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:l,"aria-label":n(`browserCloseGuide`),onClick:()=>{r.close(),h(void 0)},children:(0,q.jsx)(je,{})})]}),!r.container&&!R&&(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,onClick:async()=>{await r.open()||C(n(`browserGuideBlocked`))},children:[(0,q.jsx)(Os,{}),n(`browserGuidePopout`)]}),R?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`browser-settings-ready`,children:[(0,q.jsx)(ds,{}),n(`browserConnectionReady`)]}),(0,q.jsx)(`p`,{children:m===`embedded`?n(`browserEmbeddedDetail`):n(`browserExternalDetail`,{browser:j(m)})}),(0,q.jsxs)(`div`,{className:`browser-settings-guide-actions`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-button`,disabled:l,onClick:()=>void A(m===`embedded`?N.browser:m,`manage`),children:[n(`browserManageExtension`),(0,q.jsx)(Os,{})]}),(!F(m)||!M.control)&&(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-primary`,disabled:d,onClick:()=>void k({control:!0,...I(m,!0)}),children:n(`browserAllowUse`)}),F(m)&&M.defaultBrowser!==m&&(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-button`,disabled:d,onClick:()=>void k({defaultBrowser:m}),children:n(`browserMakeDefault`)})]})]}):(0,q.jsxs)(q.Fragment,{children:[m===`embedded`&&(0,q.jsxs)(`label`,{className:`browser-settings-install-browser`,htmlFor:`browser-install-target`,children:[n(`browserInstallIn`),(0,q.jsx)(bj,{id:`browser-install-target`,label:n(`browserInstallIn`),value:g,disabled:l,onChange:e=>{let t=gj.find(t=>t===e);t&&(_(t),y(1),x(!1),C(void 0))},options:gj.filter(e=>![`safari`,`firefox`].includes(e)).map(e=>({value:e,label:xj[e]}))})]}),(0,q.jsx)(`ol`,{className:`browser-settings-progress`,"aria-label":n(`browserSetupSteps`),children:oe.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,"aria-current":v===t+1?`step`:void 0,"aria-label":n(`browserStepLabel`,{step:t+1,label:e}),disabled:l,onClick:()=>{y(t+1),C(void 0)},children:[(0,q.jsx)(`span`,{children:t+1}),e]})},e))}),(0,q.jsxs)(`div`,{className:`browser-settings-wizard`,"aria-live":`polite`,children:[(0,q.jsx)(`span`,{className:`browser-settings-step-count`,children:n(`browserStepCount`,{step:v,total:oe.length})}),(0,q.jsx)(`h4`,{ref:E,tabIndex:-1,children:n(v===1?`browserOpenManagerTitle`:v===2?g===`safari`?`browserSafariDeveloperTitle`:g===`firefox`?`browserFirefoxDeveloperTitle`:`browserDeveloperTitle`:v===3?`browserInstallTitle`:`browserConnectTitle`,{browser:xj[g]})}),(0,q.jsx)(`p`,{children:n(v===1?g===`safari`?`browserSafariOpenHint`:`browserOpenManagerHint`:v===2?g===`safari`?`browserSafariDeveloperHint`:g===`firefox`?`browserFirefoxDeveloperHint`:`browserDeveloperHint`:v===3?g===`safari`?`browserSafariLoadHint`:g===`firefox`?`browserFirefoxLoadHint`:`browserLoadHint`:`browserConnectHint`,{browser:xj[g],loadLabel:ae})}),v===1&&(0,q.jsxs)(`div`,{className:`browser-settings-address`,children:[(0,q.jsx)(Sj,{browser:g}),(0,q.jsx)(`code`,{children:V})]}),v===2&&(0,q.jsxs)(`figure`,{className:`browser-settings-illustration ${g}`,children:[(0,q.jsx)(`figcaption`,{children:n(`browserIllustration`,{browser:xj[g]})}),(0,q.jsxs)(`div`,{className:`browser-settings-demo`,"aria-hidden":`true`,children:[(0,q.jsxs)(`div`,{className:`browser-settings-demo-bar`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`code`,{children:V})]}),(0,q.jsxs)(`div`,{className:`browser-settings-demo-heading`,children:[(0,q.jsx)(`span`,{children:n(`browserExtensions`)}),(0,q.jsxs)(`span`,{className:`browser-settings-demo-toggle highlight`,children:[ie,g!==`firefox`&&(0,q.jsx)(`i`,{})]})]}),(0,q.jsxs)(`div`,{className:`browser-settings-demo-toolbar`,children:[(0,q.jsx)(`span`,{children:ae}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]})]})]}),v===3&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`ol`,{className:`browser-settings-install-steps`,children:[(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{className:`browser-settings-install-label`,children:[(0,q.jsx)(`strong`,{children:n(g===`firefox`?`browserLocateManifest`:`browserLocateTarget`)}),(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-button`,disabled:l,onClick:()=>void A(g,`folder`),children:n(g===`firefox`?`browserRevealManifest`:`browserRevealTarget`)})]}),(0,q.jsxs)(`div`,{className:`browser-settings-selection`,children:[(0,q.jsx)(zs,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:g===`firefox`?`manifest.json`:re}),(0,q.jsx)(`p`,{children:n(g===`firefox`?`browserSelectManifestHint`:`browserSelectFolderHint`)})]})]})]}),(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`strong`,{children:n(z?`browserLoadInBrowser`:`browserDragToBrowser`,{browser:xj[g],loadLabel:ae})}),(0,q.jsx)(`p`,{children:n(z?`browserSelectLocatedTarget`:`browserDragFolderHint`,{browser:xj[g],folder:re})}),(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l||!te,onClick:()=>void A(g,`manage`),children:[n(`browserOpenManager`,{browser:xj[g]}),(0,q.jsx)(Os,{})]})]})]}),(0,q.jsxs)(`details`,{className:`browser-settings-picker-help`,children:[(0,q.jsx)(`summary`,{children:n(z?`browserManualSelection`:`browserManualInstall`)}),(0,q.jsxs)(`div`,{className:`browser-settings-install-label`,children:[(0,q.jsx)(`strong`,{children:n(`browserCopyLocation`)}),(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-button`,onClick:async e=>{let t=await td(ne,e.currentTarget.ownerDocument);x(t),C(t?void 0:n(`browserCopyFailed`))},children:[b?(0,q.jsx)(rs,{}):(0,q.jsx)(Ss,{}),n(b?`browserPathCopied`:`browserCopyPath`)]})]}),(0,q.jsx)(`code`,{className:`browser-settings-install-path`,children:ne}),(0,q.jsx)(`p`,{children:n(`browserLoadInBrowser`,{browser:xj[g],loadLabel:ae})}),!z&&(0,q.jsx)(`p`,{children:n(`browserLoadAlternate`)}),(0,q.jsx)(`p`,{children:n(navigator.userAgent.includes(`Mac`)?`browserChooseFolderMac`:`browserChooseFolderOther`,{confirm:n(g===`firefox`?`browserConfirmFile`:`browserConfirmFolder`)})})]}),(0,q.jsx)(`p`,{className:`browser-settings-install-checkpoint`,children:n(`browserInstallCheckpoint`)})]}),v===4&&(0,q.jsxs)(`div`,{className:`browser-settings-waiting`,role:`status`,children:[(0,q.jsx)(me,{}),(0,q.jsx)(`span`,{children:n(`browserWaiting`)})]}),!te&&(0,q.jsx)(`p`,{className:`browser-settings-warning`,children:n(`browserInstallBrowserFirst`,{browser:xj[g]})}),(0,q.jsxs)(`div`,{className:`browser-settings-wizard-actions`,children:[v>1&&(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-button`,disabled:l,onClick:()=>{y(v-1),C(void 0)},children:[(0,q.jsx)(Ko,{}),n(`browserPreviousStep`)]}),v===1&&(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l,onClick:()=>y(4),children:n(`browserAlreadyInstalled`)}),v<4?(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-primary`,disabled:l||!te,onClick:async()=>{(v===2||await A(g,v===1?`manage`:`connect`))&&y(v+1)},children:[n(l?`browserOpening`:v===1?`browserOpenManager`:v===2?g===`firefox`?`browserFirefoxDone`:`browserDeveloperDone`:`browserInstalledConnect`,{browser:xj[g]}),v===2?(0,q.jsx)(qo,{}):(0,q.jsx)(Os,{})]}):(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-primary`,disabled:l||f,onClick:async()=>{p(!0);let e=await O();if(D.current){p(!1);let t=e?.profiles.some(t=>t.connected&&t.version===e.extensionVersion&&(m===`embedded`?t.current&&![`safari`,`firefox`].includes(t.browser):t.browser===m));C(n(t?`browserConnectionReady`:`browserNotConnectedYet`))}},children:[(0,q.jsx)(me,{className:f?`settings-spin`:``}),n(`browserCheck`)]})]}),v===4?(0,q.jsxs)(`div`,{className:`browser-settings-connect-help`,children:[(0,q.jsx)(`p`,{children:n(`browserAllowHint`)}),(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l||!te,onClick:()=>void A(g,`connect`),children:[n(`browserOpenIn`,{browser:xj[g]}),(0,q.jsx)(Os,{})]})]}):v===2&&(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l||!te,onClick:()=>void A(g,`manage`),children:[n(`browserReopenManager`),(0,q.jsx)(Os,{})]})]})]}),(0,q.jsxs)(`details`,{className:`browser-settings-help`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(is,{}),n(`browserHelp`)]}),(0,q.jsx)(`p`,{children:n(`browserReloadHint`)}),(0,q.jsx)(`p`,{children:n(`browserSupportedHint`)})]}),s&&(0,q.jsx)(`div`,{className:`browser-settings-error`,role:`alert`,children:s}),(0,q.jsx)(`div`,{className:`browser-settings-feedback`,role:`status`,"aria-live":`polite`,children:l?n(`browserSaving`):S})]})),!m&&s&&(0,q.jsxs)(`div`,{className:`browser-settings-error`,role:`alert`,children:[s,(0,q.jsx)(`button`,{type:`button`,onClick:()=>void O(),children:n(`browserCheck`)})]}),(0,q.jsx)(`div`,{className:`browser-settings-feedback`,role:`status`,"aria-live":`polite`,children:!m&&(l?n(`browserSaving`):S)})]})}function wj({label:e,value:t,options:n,disabled:r,onChange:i}){return(0,q.jsx)(yo,{button:{label:n.find(e=>e.value===t)?.label??t,"aria-label":e,variant:`secondary`,size:`sm`,className:`configuration-menu-trigger`,isDisabled:r},className:`configuration-menu`,menuWidth:`min(360px, calc(100vw - 32px))`,alignment:`end`,items:n.map(e=>({id:e.value,label:e.label,isDisabled:r,description:e.description?(0,q.jsx)(`span`,{className:`configuration-option-description`,children:e.description}):void 0,endContent:t===e.value?(0,q.jsx)(`span`,{className:`settings-select-check`,"aria-hidden":`true`,children:(0,q.jsx)(rs,{})}):void 0,onClick:()=>{e.value!==t&&i(e.value)}}))})}function Tj({catalog:e,error:t,pending:n,preferencePending:r,onConfigure:i,onUpdatePreferences:a,onRefresh:o,onOpenRuntimeStatus:s}){let{t:c}=W(),l=e?.setupWritable===!1||!!e?.resources.diagnostics.settingsErrors,u=n||r||!!t||!!e?.resources.diagnostics.settingsErrors,d=e?.setup.ui.webHiddenThinkingLevels??[],f=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],p=e?.setup.response?.verbosity??`default`,m=e?.setup.response?.reasoningSummary??`default`;return(0,q.jsxs)(`section`,{className:`settings-content-page settings-configuration-panel`,children:[(0,q.jsxs)(`header`,{className:`settings-page-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:c(`configurationSettings`)}),(0,q.jsx)(`p`,{children:c(`configurationIntro`)})]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":c(`refreshStatus`),onClick:o,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]}),t&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:t}),!e&&!t&&(0,q.jsx)(`p`,{role:`status`,children:c(`settingsCatalogLoading`)}),l&&(0,q.jsxs)(`p`,{className:`inspection-warning`,role:`alert`,children:[c(`configurationReadFailure`),e?.setupDiagnostics?.map(e=>(0,q.jsxs)(`span`,{children:[e.path,`: `,e.message]},`${e.path}:${e.message}`))]}),e&&!l&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`configuration-scope`,children:[(0,q.jsxs)(`span`,{className:`configuration-scope-label`,children:[(0,q.jsx)(qc,{"aria-hidden":`true`}),c(`configurationUserScope`)]}),(0,q.jsx)(`span`,{children:c(`configurationSetupHint`)})]}),(0,q.jsxs)(`div`,{className:`configuration-group`,children:[(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationApproval`)}),(0,q.jsx)(`p`,{children:c(`configurationApprovalDetail`)})]}),(0,q.jsx)(`span`,{className:`configuration-readonly`,children:c(`configurationPiPermissions`)})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationSandbox`)}),(0,q.jsx)(`p`,{children:c(`configurationSandboxDetail`)})]}),(0,q.jsx)(`span`,{className:`configuration-readonly`,children:c(`configurationSandboxUnavailable`)})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`webSearchSettings`)}),(0,q.jsx)(`p`,{children:c(`configurationSearchDetail`)}),e.webSearch?.available!==!0&&(0,q.jsx)(`p`,{children:c(`webSearchUnsupported`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(wj,{label:c(`webSearchSettings`),value:e.setup.webSearch?.enabled===!0?`on`:`off`,options:[{value:`off`,label:c(`disabled`),description:c(`configurationSearchOff`)},{value:`on`,label:c(`enabled`),description:c(`configurationSearchOn`)}],disabled:u,onChange:e=>{i(c(e===`on`?`webSearchNativeRequest`:`webSearchDisableRequest`))}})})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationVerbosity`)}),(0,q.jsx)(`p`,{children:c(`configurationVerbosityDetail`)}),e.responseSupport?.verbosity!==!0&&(0,q.jsx)(`p`,{children:c(`configurationResponsesUnavailable`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(wj,{label:c(`configurationVerbosity`),value:p,options:[`default`,`low`,`medium`,`high`].map(e=>({value:e,label:c(`configurationVerbosity_${e}`),description:e==="default"?void 0:c(`configurationVerbosityHelp_${e}`)})),disabled:u||e.responseSupport?.verbosity!==!0,onChange:e=>{i(c(`configurationVerbosityRequest`,{value:e}))}})})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationSummary`)}),(0,q.jsx)(`p`,{children:c(`configurationSummaryDetail`)}),e.responseSupport?.reasoningSummary!==!0&&(0,q.jsx)(`p`,{children:c(`configurationSummaryUnavailable`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(wj,{label:c(`configurationSummary`),value:m,options:[`default`,`auto`,`concise`,`detailed`,`none`].map(e=>({value:e,label:c(`configurationSummary_${e}`),description:e==="default"?void 0:c(`configurationSummaryHelp_${e}`)})),disabled:u||e.responseSupport?.reasoningSummary!==!0,onChange:e=>{i(c(`configurationSummaryRequest`,{value:e}))}})})]})]}),(0,q.jsxs)(`section`,{className:`configuration-section`,children:[(0,q.jsx)(`h2`,{children:c(`configurationModelFeatures`)}),(0,q.jsx)(`div`,{className:`configuration-group`,children:(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationReasoningLevels`)}),(0,q.jsx)(`p`,{children:c(`configurationReasoningDetail`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(yo,{button:{label:c(`configurationReasoningCount`,{count:f.filter(e=>!d.includes(e)).length}),"aria-label":c(`configurationReasoningLevels`),variant:`secondary`,size:`sm`,className:`configuration-menu-trigger`,isDisabled:u},className:`configuration-level-menu`,menuWidth:`min(240px, calc(100vw - 32px))`,alignment:`end`,children:f.map(e=>(0,q.jsx)(Ro,{label:e,value:!d.includes(e),isDisabled:u,endContent:(0,q.jsx)(`span`,{className:`configuration-check`,children:!d.includes(e)&&(0,q.jsx)(rs,{"aria-hidden":`true`})}),onChange:t=>{a({thinkingLevelVisibility:{level:e,visible:t}})}},e))})})]})})]}),(0,q.jsxs)(`section`,{className:`configuration-section`,children:[(0,q.jsx)(`h2`,{children:c(`configurationDependencies`)}),(0,q.jsx)(`div`,{className:`configuration-group`,children:(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationEnvironment`)}),(0,q.jsx)(`p`,{children:c(`configurationEnvironmentDetail`)})]}),(0,q.jsxs)(`button`,{type:`button`,className:`configuration-runtime-button`,onClick:s,children:[c(`configurationRuntimeStatus`),(0,q.jsx)(Yo,{"aria-hidden":`true`})]})]})})]})]})]})}function Ej({catalog:e,error:t,pending:n,onConfigure:r,onRefresh:i}){let{t:a}=W(),o=e?.setup.webSearch?.enabled===!0,s=e?.webSearch?.available===!0,c=n||!e||!!t||!!e?.resources.diagnostics.settingsErrors;return(0,q.jsxs)(`section`,{className:`settings-content-page settings-web-search-panel`,children:[(0,q.jsxs)(`header`,{className:`settings-page-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:a(`webSearchSettings`)}),(0,q.jsx)(`p`,{children:a(`webSearchIntro`)})]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button settings-heading-refresh`,"aria-label":a(`refreshStatus`),onClick:i,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]}),t&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:t}),!e&&!t&&(0,q.jsx)(`p`,{role:`status`,children:a(`settingsCatalogLoading`)}),(0,q.jsxs)(`section`,{className:`settings-control-group`,children:[(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsxs)(`div`,{className:`settings-control-copy`,children:[(0,q.jsx)(`h2`,{children:a(`webSearchCurrentModel`)}),(0,q.jsx)(`p`,{children:a(`webSearchNativeDetail`)})]}),(0,q.jsx)(Br,{label:a(o?`webSearchDisable`:`webSearchEnable`),variant:`secondary`,size:`sm`,isDisabled:c,isLoading:n,onClick:()=>void r(a(o?`webSearchDisableRequest`:`webSearchNativeRequest`))})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(`div`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:a(`model`)})}),(0,q.jsx)(`span`,{className:`settings-control-value`,children:e?.webSearch?.model?`${e.webSearch.provider} / ${e.webSearch.model}`:a(`unavailable`)})]})]}),(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:a(`webSearchDefaultOff`)}),(0,q.jsx)(`p`,{role:`status`,className:`settings-resource-caption`,children:a(s?`webSearchSupported`:`webSearchUnsupported`)})]})}var Dj={wrapper:{k8WAf4:`xu0wf1k`,kg3NbH:`x7a5moj`,$$css:!0},icon:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kmuXW:`x2lah0s`,$$css:!0}};function Oj({ref:e,label:t,clearLabel:n,placeholder:r,value:i,onValueChange:a,onKeyDown:o,onFocus:s,onBlur:c,onContainerKeyDown:l,xstyle:u,className:d,style:f,...p}){let[m,h]=(0,K.useState)(!1);(0,K.useEffect)(()=>{D()},[]);let g=(0,K.useCallback)(e=>{h(N()===`keyboard`),s?.(e)},[s]),_=(0,K.useCallback)(e=>{h(!1),c?.(e)},[c]),v=(0,K.useCallback)(()=>{a(``),typeof e==`object`&&e?.current&&e.current.focus()},[a,e]);return(0,q.jsx)(`div`,{onKeyDown:l,...H(w(Dj.wrapper,u),d,f),children:(0,q.jsxs)(`div`,{"data-keyboard-focus":m?`true`:void 0,...{0:{className:`x9f619 x78zum5 x6s0dn4 x1txdalj xh8yej3 x1vofgu7 xf314gf xh6dtrn xkdsq27 xuedmi6 x12w9bfk xlr8y92`},1:{className:`x9f619 x78zum5 x6s0dn4 x1txdalj xh8yej3 x1vofgu7 xf314gf xh6dtrn xkdsq27 xuedmi6 x12w9bfk xlr8y92 x1gnnqk1 x1btxeh5`}}[!!m<<0],children:[(0,q.jsx)(ya,{icon:`search`,size:`sm`,color:`secondary`,xstyle:Dj.icon}),(0,q.jsx)(`input`,{ref:e,type:`text`,"aria-label":t,placeholder:r,value:i,onChange:e=>a(e.target.value),onKeyDown:o,onFocus:g,onBlur:_,className:`x1iyjqo2 xs83m0k xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1tgivj0 x9ynric xcr08ib xdk3u5w x1kq96og x1a2a7pz xeyghm5`,...p}),i!==``&&(0,q.jsx)(VO,{label:n,onClick:v})]})})}Oj.displayName=`PanelSearchInput`;function kj(e){return typeof e==`string`||!(`type`in e)}function Aj(e){return typeof e==`object`&&`type`in e&&e.type===`divider`}function jj(e){return typeof e==`object`&&`type`in e&&e.type===`section`}function Mj(e){return typeof e==`string`?{value:e,label:e}:{...e,label:e.label??e.value}}function Nj(e){let t=[];for(let n of e)if(kj(n))t.push(Mj(n));else if(jj(n))for(let e of n.options)t.push(Mj(e));return t}var Pj=1;function Fj(e){let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t}function Ij({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:r,anchorRef:i}){let[a,o]=(0,K.useState)(0),[s,c]=(0,K.useState)(!1),l=(0,K.useCallback)((e,t)=>{o(e),c(t)},[]);return ne(()=>{if(!e){l(0,!1);return}if(!r.current||!i.current){l(0,!0);return}let a=`${n}-item-${t>=0?t:0}`,o=document.getElementById(a);if(!o){l(0,!0);return}let s=r.current,c=i.current.getBoundingClientRect(),u=s.offsetHeight;if(u<=0){l(0,!0);return}let d=Fj(o)-Fj(s)-s.scrollTop+o.offsetHeight/2,f=c.top+c.height/2-d-Pj,p=window.innerHeight,m=Math.max(0,p-u),h=Math.min(Math.max(f,0),m),g=Math.max(0,c.bottom-h);l(g,!0)},[e,t,n,r,i,l]),{offset:a,isPositioned:s}}function Lj({selectableItems:e,value:t,isDisabled:n=!1,isOpen:r,hasSearch:i=!1,onOpen:a,onClose:o,onSelect:s,onClear:c,onSearchSeed:l,wasJustDismissed:u,listboxId:d}){let[f,p]=(0,K.useState)(-1),m=(0,K.useCallback)(e=>`${d}-item-${e}`,[d]),h=(0,K.useCallback)(()=>e.map((e,t)=>e.disabled?-1:t).filter(e=>e>=0),[e]),g=(0,K.useCallback)(()=>e.findIndex(e=>e.value===t),[e,t]),_=(0,K.useCallback)(()=>{p(-1),o()},[o]),v=(0,K.useCallback)(e=>{e.disabled||(s?.(e.value),_())},[s,_]),y=(0,K.useCallback)(()=>{if(!(n||u?.())){if(r)_();else if(a(),!i){let e=g();p(e>=0?e:0)}}},[n,u,r,a,_,g,i]),b=(0,K.useCallback)((e,t)=>{e.disabled||p(t)},[]);return{highlightedIndex:f,setHighlightedIndex:p,getItemId:m,onTriggerClick:y,onKeyDown:(0,K.useCallback)(o=>{if(n)return;let s=h();switch(o.key){case`ArrowDown`:if(o.preventDefault(),!r)a(),p(0);else{let e=s.indexOf(f),t=Math.min(e+1,s.length-1);p(s[t]??f)}break;case`ArrowUp`:if(o.preventDefault(),!r)a(),p(e.length-1);else{let e=s.indexOf(f),t=Math.max(e-1,0);p(s[t]??f)}break;case` `:if(i)break;case`Enter`:if(o.preventDefault(),r&&f>=0){let t=e[f];t&&!t.disabled&&v(t)}else if(!r&&(a(),!i)){let e=g();p(e>=0?e:0)}break;case`Escape`:r&&(o.preventDefault(),_());break;case`Tab`:r&&_();break;case`Home`:o.preventDefault(),r&&s.length>0&&p(s[0]);break;case`End`:o.preventDefault(),r&&s.length>0&&p(s[s.length-1]);break;case`PageUp`:o.preventDefault(),r&&s.length>0&&p(s[0]);break;case`PageDown`:o.preventDefault(),r&&s.length>0&&p(s[s.length-1]);break;case`Delete`:case`Backspace`:!i&&!r&&c!=null&&t!=null&&(o.preventDefault(),c());break;default:i&&l&&o.key.length===1&&!o.ctrlKey&&!o.metaKey&&(r||a(),l(o.key))}},[n,r,a,_,e,f,v,g,h,i,c,l,t]),onItemSelect:v,onItemMouseEnter:b}}var Rj=(0,K.createContext)(`stacked`);Rj.displayName=`SelectorRowLayoutContext`;function zj(){return(0,K.use)(Rj)}var Bj={root:{k8WAf4:`xt970qd`,kg3NbH:`xnjsko4`,kaIpWk:`x2u8bby`,$$css:!0}};function Vj({icon:e,label:t,description:n,layout:r,endContent:i,xstyle:a,className:o,style:s}){let c=zj();return(0,q.jsx)(Na,{startContent:e?xa(e,{size:`sm`,color:`secondary`}):void 0,label:t,description:n,layout:c===`inline`?`inline`:r,endContent:i,xstyle:[Bj.root,a],...H(O(`selector-option`),{className:o,style:s})})}Vj.displayName=`SelectorOption`;var Hj={triggerContainer:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib xdk3u5w`,kLWn49:`x7acx1w`,kMwMTN:`x1tgivj0`,kkrTdU:`x1ypdohk x16khyan`,$$css:!0},triggerPlaceholder:{kMwMTN:`xv1l7n4`,$$css:!0},triggerInGroup:{kAzted:`x2lwn1j`,k8WAf4:`xt970qd`,$$css:!0},triggerIcon:{kmuXW:`x2lah0s`,$$css:!0},triggerIconRotation:{k1ekBW:`x11xpdln`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,k3nNDw:`x1g0ag68`,$$css:!0},triggerIconOpen:{k3aq6I:`x19jd1h0`,$$css:!0},triggerGhost:{kzqmXN:`x14atkfc`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kGVxlE:`x1gnnqk1 x1s17dad x15ysqaf`,k63SB2:`x1e4wzip`,k1ekBW:`xrafxwg`,k3aq6I:`x3oybdh xk4oym4`,$$css:!0},triggerGhostDisabled:{kKwaWg:`x18o3ruo`,k3aq6I:`x1c071of x1pdlv7q`,$$css:!0},statusButton:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kWkggS:`xjbqb8w`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kaIpWk:`xh6dtrn`,$$css:!0},searchRowInput:{kg3NbH:`x2hg6jq`,$$css:!0},popover:{k7Eaqz:`xrzjruh`,$$css:!0},divider:{kqGvvJ:`xsq74q5`,$$css:!0},item:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,kmVPX3:`xlsj2fj`,kaIpWk:`xh6dtrn`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},itemHighlighted:{kWkggS:`x1lmrjuc`,$$css:!0},itemSelected:{k63SB2:`x1e4wzip`,$$css:!0},itemDisabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0}},Uj={sm:{kAzted:`x1gdqauq`,k8WAf4:`x1ecmfrv`,$$css:!0},md:{kAzted:`x1uogy3y`,k8WAf4:`x1ioay2v`,$$css:!0},lg:{kAzted:`x1xf4nls`,k8WAf4:`x1vn5h1t`,$$css:!0}},Wj={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}},Gj={warning:`warning`,error:`error`,success:`success`},Kj={warning:`warning`,error:`error`,success:`success`},qj={warning:`@astryx.input.statusButton.warning`,error:`@astryx.input.statusButton.error`,success:`@astryx.input.statusButton.success`};function Jj({option:e}){return(0,q.jsx)(Vj,{icon:e.icon,label:e.label??e.value,description:e.description})}function Yj(e,t){return!t||(e.label??e.value).toLowerCase().includes(t.toLowerCase())}function Xj(e,t){return t?e.filter(e=>Yj(e,t)):e}function Zj(e){let t=jr(),{label:n,isLabelHidden:r=!1,description:i,isOptional:a=!1,isRequired:o=!1,isDisabled:s=!1,disabledMessage:c,options:l,value:u,onChange:d,changeAction:f,isLoading:m=!1,placeholder:h,size:g,variant:_=`input`,status:v,statusVariant:y=`attached`,labelTooltip:b,startIcon:x,htmlName:S,renderOption:C,renderValue:T,indicatorPosition:E=`end`,hasSearch:D=!1,searchPlaceholder:k,emptyText:A,emptySearchText:j,placement:N,isDefaultOpen:P=!1,"data-testid":I,width:ee,xstyle:L,className:te,style:z,hasClear:B,id:ne,...re}=e,V=WO({isRequired:o,isOptional:a}),oe=h??t(`@astryx.selector.placeholder`),se=k??t(`@astryx.selector.searchPlaceholder`),ce=A??t(`@astryx.selector.empty`),le=j??t(`@astryx.selector.emptySearchResults`),ue=B===!0,de=Zt(g,`md`),pe=_===`ghost`&&y===`attached`?`detached`:y,me=u===null?void 0:u,he=(0,K.useId)(),ge=ne??he,_e=(0,K.useId)(),ve=(0,K.useId)(),ye=(0,K.useId)(),be=(0,K.useId)(),xe=(0,K.useId)(),Se=(0,K.useRef)(null),Ce=(0,K.useRef)(null),we=(0,K.useRef)(null),Te=KO(),[Ee,U]=(0,K.useState)(``),De=(0,K.useRef)(``),Oe=Ee.length>0,[,ke]=(0,K.useTransition)(),[W,Ae]=(0,K.useOptimistic)(me),G=m||W!==me,je=vu(),Me=typeof ce==`string`?ce:t(`@astryx.selector.empty`),Ne=typeof le==`string`?le:t(`@astryx.selector.emptySearchResults`),Pe=s&&!!c,Fe=F({placement:`above`,focusTrigger:`always`,isEnabled:Pe}),Ie=F({placement:`above`,isEnabled:pe===`tooltip`&&!!v?.message}),{ariaLabelledBy:Le,ariaDescribedBy:Re}=gt(be,[i?ve:null,!Te&&pe!==`tooltip`&&v?.message?ye:null,pe===`tooltip`&&v?.message?Ie.describedBy:null,Pe?Fe.describedBy:null],Te),ze=(0,K.useMemo)(()=>Nj(l),[l]),Be=(0,K.useMemo)(()=>Xj(ze,Ee),[ze,Ee]),Ve=(0,K.useMemo)(()=>ze.findIndex(e=>e.value===W),[ze,W]),He=(0,K.useMemo)(()=>Ve>=0?ze[Ve]:void 0,[ze,Ve]),Ue=(0,K.useRef)(null),We=(0,K.useRef)(()=>{}),Ge=Gr({onHide:(0,K.useCallback)(()=>{U(``),De.current=``,We.current(),je(``),Ce.current?.focus()},[je]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:`none`,surfaceTarget:`selector-popup`}),Ke=ae(Ge.id,Ge.isOpen);(0,K.useEffect)(()=>{P&&Ge.show()},[]);let qe=(0,K.useCallback)(e=>{if(e.length===0){je(``);return}if(m){je(``);return}let n=Xj(ze,e).length;je(n===0?Ne:t(`@astryx.selector.resultCount`,{count:n}))},[je,m,ze,Ne,t]),Je=(0,K.useCallback)(e=>{U(e),De.current=e,qe(e)},[qe]),Ye=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!(Ge.isOpen&&!m&&Ee===``&&ze.length===0)){Ye.current=null;return}Ye.current!==Me&&(Ye.current=Me,je(Me))},[Ge.isOpen,m,Ee,ze.length,Me,je]);let Xe=N==null&&!D,{offset:Ze,isPositioned:Qe}=Ij({isOpen:Ge.isOpen&&Xe,selectedItemIndex:Ve,listboxId:_e,listboxRef:Ue,anchorRef:Se}),$e=Xe?Ze:0,et=!Xe||Qe,tt=N??`below`,nt=$e>0?{marginBlockStart:`-${$e}px`}:void 0,rt=(0,K.useCallback)(()=>{We.current(),d?.(null),f&&ke(async()=>{Ae(void 0),await f(null)})},[d,f,ke,Ae]),it=(0,K.useCallback)(e=>{let t=De.current+e;De.current=t,U(t),qe(t)},[qe]),at=(0,K.useCallback)(e=>{d?.(e),f&&ke(async()=>{Ae(e),await f(e)})},[d,f,ke,Ae]),{highlightedIndex:ot,setHighlightedIndex:st,getItemId:ct,onTriggerClick:lt,onKeyDown:ut,onItemSelect:dt,onItemMouseEnter:ft}=Lj({selectableItems:Be,wasJustDismissed:Ge.wasJustDismissed,value:W,isDisabled:s,isOpen:Ge.isOpen,hasSearch:D,onOpen:(0,K.useCallback)(()=>{Ge.show(),D&&requestAnimationFrame(()=>{let e=we.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))})},[Ge,D]),onClose:Ge.hide,onSelect:at,onClear:ue?rt:void 0,onSearchSeed:it,listboxId:_e}),pt=io({getItemLabels:()=>ze.map(e=>e.label??e.value),isDisabled:e=>ze[e]?.disabled===!0,getCurrentIndex:()=>Ge.isOpen?ot:Ve,onMatch:e=>{let t=ze[e];Ge.isOpen?st(e):t.value!==W&&(at(t.value),je(t.label??t.value))}});We.current=pt.reset;let mt=(0,K.useCallback)(e=>{if(!s&&!D&&pt.onKeyDown(e)){e.preventDefault();return}ut(e)},[s,D,pt,ut]);(0,K.useEffect)(()=>{!Ge.isOpen||ot<0||document.getElementById(ct(ot))?.scrollIntoView?.({block:`nearest`})},[Ge.isOpen,ot,ct]);let ht=(0,K.useCallback)(e=>{e.stopPropagation(),rt()},[rt]),_t=(0,K.useCallback)(()=>D?(0,q.jsx)(Oj,{ref:we,id:xe,label:t(`@astryx.selector.searchOptions`),clearLabel:t(`@astryx.textInput.clearLabel`,{label:t(`@astryx.selector.searchOptions`)}),...O(`selector-search`),xstyle:_!==`ghost`&&Hj.searchRowInput,role:`combobox`,"aria-expanded":Ge.isOpen,"aria-controls":_e,"aria-autocomplete":`list`,"aria-activedescendant":Ge.isOpen&&ot>=0?ct(ot):void 0,value:Ee,onValueChange:Je,onContainerKeyDown:e=>{e.target!==we.current&&e.key===`Tab`&&!e.shiftKey&&ut(e)},onKeyDown:e=>{if(!M(e.nativeEvent)){if(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`PageUp`||e.key===`PageDown`||e.key===`Enter`||e.key===`Escape`){ut(e);return}e.key===`Tab`&&(e.shiftKey||!Oe)&&ut(e)}},placeholder:se}):null,[D,xe,_e,Ee,Oe,se,Je,ut,Ge.isOpen,ot,ct,_,t]),vt=Io(`check`),yt=(0,K.useCallback)((e,t)=>{let n=t===ot,r=e.value===me,i=(0,q.jsx)(`span`,{className:`x3nfvp2 x6s0dn4 xl56j7k x2lah0s xgomdpo`,children:(0,q.jsx)(vt,{state:r?`checked`:`unchecked`,size:`sm`,isDisabled:e.disabled??!1,...O(`selector-check`)})}),a=(0,q.jsx)(`span`,{className:`x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli`,children:C?C(e):(0,q.jsx)(Jj,{option:e})}),o=E===`start`?(0,q.jsxs)(q.Fragment,{children:[i,a]}):(0,q.jsxs)(q.Fragment,{children:[a,i]});return(0,q.jsx)(`div`,{id:ct(t),role:`option`,"aria-selected":r,"aria-disabled":e.disabled,onClick:()=>dt(e),onMouseEnter:()=>ft(e,t),...H(O(`selector-option-row`,{size:de,selected:r?`selected`:null,disabled:e.disabled?`disabled`:null}),w(Hj.item,Wj[de],n&&Hj.itemHighlighted,r&&Hj.itemSelected,e.disabled&&Hj.itemDisabled)),children:o},e.value)},[C,E,ot,de,me,ct,dt,ft,vt]),bt=(0,K.useCallback)(()=>{let e=D&&!!Ee;if(Be.length===0&&!m)return[(0,q.jsx)(`div`,{role:`presentation`,...H(O(`selector-empty-state`),{className:`x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib`}),children:e?le:ce},`empty`)];let t=0,n=[];for(let r=0;r{Se.current=e,Ge.triggerRef(e),Fe.ref(e)},onClick:lt,"data-testid":I,...H(O(`selector`,{variant:_,size:de,status:v?.type??null,disabled:s?`disabled`:null}),w(FO.base,Hj.triggerContainer,Uj[de],_===`ghost`&&Hj.triggerGhost,_===`ghost`&&rn.backgroundImage,_===`ghost`&&fe.focusWithin,s&&FO.disabled,_===`ghost`&&s&&Hj.triggerGhostDisabled,!He&&Hj.triggerPlaceholder,_!==`ghost`&&v&&IO[v.type],_!==`ghost`&&v&&!s&&LO[v.type],_!==`ghost`&&Te&&UO.inGroup,Te&&Hj.triggerInGroup,L),te,z),children:[x&&xa(x,{size:`sm`,color:`secondary`}),Te&&(0,q.jsx)(Kt,{id:be,children:n}),(0,q.jsx)(`button`,{ref:Ce,id:ge,type:`button`,role:D?void 0:`combobox`,...re,"aria-haspopup":`listbox`,"aria-expanded":Ge.isOpen,"aria-controls":_e,"aria-activedescendant":!D&&Ge.isOpen&&ot>=0?ct(ot):void 0,"aria-describedby":Re,"aria-labelledby":Le,"aria-required":V?`true`:void 0,"aria-invalid":v?.type===`error`?`true`:void 0,"aria-busy":G||void 0,disabled:s&&!Pe,"aria-disabled":Pe?`true`:void 0,onKeyDown:mt,tabIndex:s&&!Pe?-1:0,...{0:{className:`x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x16khyan x1a2a7pz`},1:{className:`x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x16khyan x1a2a7pz xkh2ocl`}}[!!Te<<0],children:Ct}),S!=null&&(0,q.jsx)(`input`,{type:`hidden`,name:S,value:u??``,disabled:s}),G&&(0,q.jsx)(Gt,{size:`sm`}),ue&&u!=null&&!s&&(0,q.jsx)(HO,{...Ke,label:t(`@astryx.selector.clearLabel`,{label:n}),onClick:ht,iconClassName:ie(`selector-clear-icon`)}),xt?St?(0,q.jsx)(`button`,{ref:Ie.ref,type:`button`,"aria-label":t(qj[v.type]),"aria-describedby":Ie.describedBy,...Ke,onClick:e=>e.stopPropagation(),...w(fe.focusVisible,Hj.statusButton),children:(0,q.jsx)(ya,{icon:Gj[v.type],size:`sm`,color:Kj[v.type],xstyle:Hj.triggerIcon})}):(0,q.jsx)(ya,{icon:Gj[v.type],size:`sm`,color:Kj[v.type],xstyle:Hj.triggerIcon}):(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`secondary`,xstyle:[Hj.triggerIcon,Hj.triggerIconRotation,Ge.isOpen&&Hj.triggerIconOpen],...O(`selector-indicator-icon`,{state:Ge.isOpen?`expanded`:`collapsed`})})]}),Ge.render(D?(0,q.jsxs)(`div`,{children:[_t(),(0,q.jsx)(Ga,{}),(0,q.jsx)(`div`,{ref:Ue,id:_e,role:`listbox`,"aria-labelledby":ge,...{0:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x7a5moj x1hc1fzr x1ey1afo`},1:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x1hc1fzr x1ey1afo x2hg6jq`}}[(_!==`ghost`)<<0],children:bt()})]}):(0,q.jsx)(`div`,{ref:Ue,id:_e,role:`listbox`,"aria-labelledby":ge,...{0:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x7a5moj x1hc1fzr x1ey1afo`},2:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x1hc1fzr x1ey1afo x2hg6jq`},1:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x7a5moj xg01cxk xq2gx43`},3:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x2hg6jq xg01cxk xq2gx43`}}[(_!==`ghost`)<<1|!et<<0],children:bt()}),{placement:tt,alignment:`start`,offset:Xe?void 0:p[`--spacing-1`],xstyle:[Hj.popover,R[tt]],style:nt}),St&&Ie.renderTooltip(v?.message??``),Pe&&Fe.renderTooltip(c)]});return Te?wt:(0,q.jsx)(PO,{label:n,isLabelHidden:r,description:i,inputID:ge,descriptionID:i?ve:void 0,isOptional:a,isRequired:o,isDisabled:s,status:v?{type:v.type,message:v.message,messageID:v.message?ye:void 0}:void 0,statusVariant:pe,labelTooltip:b,width:ee,children:wt})}Zj.displayName=`Selector`;function Qj(e){return e?.status===`running`||e?.status===`cancelling`}function $j({sessionId:e,auth:t,busy:n,onSaving:r,onAuthenticated:i,onReload:a}){let{t:o}=W(),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(!1),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(0),[_,v]=(0,K.useState)(``),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!1),T=(0,K.useRef)(!1),E=(0,K.useRef)(null),D=(0,K.useRef)(!1),O=(0,K.useRef)(0),k=(0,K.useRef)(null),A=(0,K.useRef)({onSaving:r,onAuthenticated:i});A.current={onSaving:r,onAuthenticated:i};let j=Qj(s),M=t.id,N=`${e}:${M}`,P=(0,K.useRef)({key:N});P.current.key!==N&&(P.current={key:N});let F=P.current,I=(0,K.useCallback)((t,n)=>{if(t&&(t.sessionId!==e||t.provider!==M||n&&t.id!==n))throw Error(`Login ownership changed`);if(n&&!t)throw Error(`Login status unavailable`);if(!T.current||P.current!==F){t&&Qj(t)&&new de().cancelProviderLogin(e,t.id).catch(()=>void 0);return}E.current=t,c(t),m(!1),t?.status===`succeeded`&&!t.refreshRequired&&k.current!==t.id&&(k.current=t.id,A.current.onAuthenticated())},[e,M,F]);(0,K.useEffect)(()=>{T.current=!0,E.current=null,D.current=!1,k.current=null,c(null),u(!1),f(!1),m(!1),b(!1),w(!1);let t=new AbortController,n=O.current;return new de().providerLogin(e,void 0,t.signal).then(e=>{!t.signal.aborted&&n===O.current&&!D.current&&e?.provider===M&&Qj(e)&&I(e)}).catch(()=>void 0),()=>{T.current=!1,t.abort();let n=E.current;n&&Qj(n)&&new de().cancelProviderLogin(e,n.id).catch(()=>void 0),A.current.onSaving(!1)}},[e,M,I]),(0,K.useEffect)(()=>{A.current.onSaving(j||l)},[j,l]);let ee=s?.prompt?.id;(0,K.useEffect)(()=>{v(``)},[ee]);let L=s?.id;(0,K.useEffect)(()=>{b(!1)},[L]),(0,K.useEffect)(()=>{if(l||D.current||!j||!L)return;let t=new AbortController,n=O.current,r=0,i=async()=>{try{let a=await new de().providerLogin(e,L,t.signal);if(t.signal.aborted||n!==O.current||D.current)return;I(a,L),Qj(a)&&(r=window.setTimeout(()=>void i(),900))}catch{!t.signal.aborted&&n===O.current&&!D.current&&m(!0)}};return i(),()=>{t.abort(),clearTimeout(r)}},[e,I,L,j,l,h]);let R=async(e,t)=>{if(!D.current){D.current=!0,O.current++,u(!0),f(!1);try{I(await e(),t)}catch{T.current&&P.current===F&&f(!0)}finally{P.current===F&&(D.current=!1,O.current++,T.current&&(u(!1),g(e=>e+1)))}}},te=()=>{n||j||R(()=>new de().startProviderLogin(e,M))},z=t=>{let n=s?.prompt;if(!s||!n)return;let r=s.id;R(()=>new de().respondProviderLogin(e,r,n.id,t))},B=()=>{let t=s?.id;return R(()=>new de().providerLogin(e,t),t)},ne=s?.prompt,re=s?.auth||s?.device,V=ne&&ne.type!==`select`&&(0,q.jsxs)(`div`,{className:`models-login-input`,children:[(0,q.jsxs)(`label`,{className:`models-field`,children:[ne.type===`manual_code`?o(`accountLoginPaste`):ne.message,(0,q.jsx)(`input`,{type:ne.type===`secret`||ne.type===`manual_code`?`password`:`text`,autoComplete:`off`,spellCheck:!1,value:_,maxLength:8192,placeholder:ne.placeholder,disabled:l||s.status!==`running`,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.nativeEvent.isComposing||(e.preventDefault(),(ne.type===`text`||_.trim())&&z(_))}})]}),(0,q.jsx)(`button`,{type:`button`,className:`models-button primary`,disabled:l||ne.type!==`text`&&!_.trim()||s.status!==`running`,onClick:()=>z(_),children:o(`accountLoginContinue`)})]});return(0,q.jsxs)(`div`,{className:`models-account-login`,children:[!j&&!C&&(!s||[`failed`,`expired`,`cancelled`].includes(s.status))&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`models-login-intro`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:M===`openai`?o(`accountLoginChatGPT`):M===`anthropic`?o(`accountLoginClaude`):t.loginLabel||t.name}),(0,q.jsx)(`p`,{className:`models-hint`,children:o(t.subscription?`accountLoginExisting`:`accountLoginIntro`)})]})}),(0,q.jsxs)(`div`,{className:`models-login-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`models-button primary`,disabled:n||l||d,onClick:te,children:o(t.subscription?`accountLoginAgain`:`accountLoginStart`)}),t.subscription&&(0,q.jsx)(`button`,{type:`button`,className:`models-link`,disabled:n||l,onClick:()=>S(!0),children:o(`accountLogout`)})]})]}),j&&(0,q.jsxs)(`div`,{className:`models-login-flow`,children:[(0,q.jsxs)(`div`,{className:`models-login-status`,role:`status`,children:[(0,q.jsx)(rc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o(s?.status===`cancelling`?`accountLoginCancelling`:re?`accountLoginWaiting`:ne?`accountLoginChoose`:`accountLoginStarting`)})]}),re&&(0,q.jsx)(`p`,{className:`models-hint`,children:o(s?.device?`accountLoginDeviceHelp`:`accountLoginBrowserHelp`)}),s?.device&&(0,q.jsxs)(`div`,{className:`models-device-code`,children:[(0,q.jsx)(`code`,{children:s.device.code}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon`,"aria-label":o(`accountLoginCopyCode`),onClick:()=>{s.device&&navigator.clipboard.writeText(s.device.code).then(()=>{T.current&&P.current===F&&b(!0)}).catch(()=>{T.current&&P.current===F&&b(!1)})},children:y?(0,q.jsx)(rs,{}):(0,q.jsx)(Ss,{})})]}),re&&(0,q.jsxs)(`a`,{className:`models-button primary models-login-open`,href:s?.device?.url||s?.auth?.url,target:`_blank`,rel:`noopener noreferrer`,children:[o(`accountLoginOpen`),(0,q.jsx)(Yo,{"aria-hidden":`true`})]}),ne?.type===`select`&&(0,q.jsx)(`fieldset`,{className:`models-login-options`,"aria-label":ne.message,children:ne.options?.map(e=>{let t=[`openai`,`openai-codex`].includes(M)&&[`browser`,`device_code`].includes(e.id);return(0,q.jsxs)(`button`,{type:`button`,className:`models-login-option`,disabled:l||s?.status!==`running`,onClick:()=>z(e.id),children:[(0,q.jsx)(`strong`,{children:t?o(e.id===`browser`?`accountLoginBrowser`:`accountLoginDevice`):e.label}),(t||e.description)&&(0,q.jsx)(`span`,{children:t?o(e.id===`browser`?`accountLoginBrowserOption`:`accountLoginDeviceOption`):e.description})]},e.id)})}),ne?.type===`manual_code`&&re?(0,q.jsxs)(`details`,{className:`models-login-fallback`,children:[(0,q.jsx)(`summary`,{children:o(`accountLoginFallback`)}),(0,q.jsx)(`p`,{className:`models-hint`,children:o(`accountLoginRemoteHelp`)}),V]}):V,s?.messages.map(e=>(0,q.jsxs)(`div`,{className:`models-hint`,children:[(0,q.jsx)(`p`,{children:e.message}),e.links?.map(e=>(0,q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:[e.label,(0,q.jsx)(Yo,{"aria-hidden":`true`})]},e.url))]},e.id)),(0,q.jsx)(`button`,{type:`button`,className:`models-link models-login-cancel`,disabled:l||s?.status===`cancelling`,onClick:()=>{s&&R(()=>new de().cancelProviderLogin(e,s.id))},children:o(`accountLoginCancel`)})]}),s?.status===`succeeded`&&s.refreshRequired&&(0,q.jsxs)(`p`,{className:`models-hint`,role:`status`,children:[o(`accountLoginRefreshRequired`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:a,children:o(`refreshStatus`)})]}),C&&(0,q.jsxs)(`p`,{className:`models-hint`,role:`status`,children:[o(`accountLogoutRefreshRequired`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:a,children:o(`refreshStatus`)})]}),s&&[`failed`,`expired`,`cancelled`].includes(s.status)&&(0,q.jsx)(`p`,{className:s.status===`failed`?`models-error`:`models-hint`,role:`status`,children:o(`accountLogin_${s.status}`)}),d&&(0,q.jsxs)(`p`,{className:`models-error`,role:`alert`,children:[o(`accountLoginRequestFailed`),(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:()=>void B(),children:o(`refreshStatus`)})]}),p&&(0,q.jsxs)(`p`,{className:`models-error`,role:`alert`,children:[o(`accountLoginStatusUnknown`),(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:()=>g(e=>e+1),children:o(`refreshStatus`)})]}),x&&(0,q.jsx)(aj,{isOpen:!0,title:o(`accountLogoutTitle`,{provider:t.name}),description:o(`accountLogoutDetail`),cancelLabel:o(`cancel`),actionLabel:o(`accountLogout`),isActionLoading:l,onOpenChange:e=>{!e&&!l&&S(!1)},onAction:()=>{D.current||n||(D.current=!0,O.current++,u(!0),f(!1),new de().logoutProvider(e,M).then(e=>{!T.current||P.current!==F||(S(!1),e.refreshRequired?w(!0):a())}).catch(()=>{T.current&&P.current===F&&(S(!1),f(!0))}).finally(()=>{P.current===F&&(D.current=!1,O.current++,T.current&&(u(!1),g(e=>e+1)))}))}})]})}var eM={assign:0,create:0,clone:0,discard:0,update:0};function tM(e){return Array.isArray(e)}function nM(e){return lM(typeof e,`bigint`)}function rM(e){return lM(typeof e,`boolean`)}function iM(e){return lM(e,null)}function aM(e){return Number.isFinite(e)}function oM(e){return sM(e)&&!tM(e)}function sM(e){return lM(typeof e,`object`)&&!iM(e)}function cM(e){return lM(typeof e,`string`)}function lM(e,t){return e===t}function uM(e,t){return e>t}function dM(e,t){return eLM(e))}function NM(e){return e.slice()}function PM(e){return new RegExp(e.source,e.flags)}function FM(e){return new Map(LM([...e.entries()]))}function IM(e){return new Set(LM([...e.values()]))}function LM(e){return yM(e)?NM(e):bM(e)?PM(e):SM(e)?FM(e):xM(e)?IM(e):tM(e)?MM(e):sM(e)?jM(e):e}function RM(e){return eM.clone+=1,LM(e)}function zM(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function BM(e,t){return{...e,...t}}function VM(e,t,n={}){eM.create+=1;let r=BM(t,n);return TM(wM().enumerableKind?BM(r,e):zM(r,e))}function HM(e,t){eM.discard+=1;let n={};for(let r of gM(e)){if(t.includes(r))continue;let i=Object.getOwnPropertyDescriptor(e,r);i.value=RM(i.value),Object.defineProperty(n,r,i)}return TM(n)}function UM(e,t,n){eM.update+=1;let r=wM(),i=RM(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return TM(i)}function WM(e,t){return sM(e)&&hM(e,`~kind`)&&lM(e[`~kind`],t)}function GM(e){return sM(e)}function KM(e,t,n){return VM({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function qM(e){return WM(e,`Deferred`)}function JM(e){return UM(e,{"~readonly":!0},{})}function YM(e,t){return UM(JM(e),{},t)}function XM(e,t,n,r){return YM(FU(e,t,n),r)}function ZM(e){return UM(e,{"~optional":!0},{})}function QM(e,t){return UM(ZM(e),{},t)}function $M(e,t,n,r){return QM(FU(e,t,n),r)}function eN(e,t){return VM({"~kind":`Array`},{type:`array`,items:e},t)}function tN(e){return WM(e,`Array`)}function nN(e){return HM(e,[`~kind`,`type`,`items`])}function rN(e,t,n={}){return VM({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function iN(e){return WM(e,`Constructor`)}function aN(e){return HM(e,[`~kind`,`type`,`parameters`,`instanceType`])}function oN(e,t,n={}){return VM({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function sN(e){return WM(e,`Function`)}function cN(e){return HM(e,[`~kind`,`type`,`parameters`,`returnType`])}function lN(e,t){return VM({"~kind":`Ref`},{$ref:e},t)}function uN(e){return WM(e,`Ref`)}function dN(e,t){return VM({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function fN(e){return WM(e,`Generic`)}function pN(e){return VM({"~kind":`Any`},{},e)}function mN(e){return WM(e,`Any`)}var hN=`(?!)`;function gN(e){return VM({"~kind":`Never`},{not:{}},e)}function _N(e){return WM(e,`Never`)}function vN(e,t={}){return QM(e,t)}function yN(e){return vN(e)}function bN(e){return GM(e)&&hM(e,`~optional`)}function xN(e){return gM(e).filter(t=>!bN(e[t]))}function SN(e){return gM(e)}function CN(e){return vM(e)}function wN(e,t={}){let n=xN(e);return VM({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function TN(e){return WM(e,`Object`)}function EN(e){return HM(e,[`~kind`,`type`,`properties`,`required`])}function DN(e){return VM({"~kind":`Unknown`},{},e)}function ON(e){return WM(e,`Unknown`)}function kN(e,t,n){return VM({"~kind":`Cyclic`},{$defs:gM(e).reduce((t,n)=>({...t,[n]:UM(e[n],{},{$id:n})}),{}),$ref:t},n)}function AN(e){return WM(e,`Cyclic`)}function jN(e){return oM(e)&&hM(e,`~unsafe`)&&iM(e[`~unsafe`])}function MN(e){return WM(e,`Infer`)}function NN(e,t,n,r={}){return VM({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function PN(e){return WM(e,`Dependent`)}function FN(e){return HM(e,[`~kind`,`if`,`then`,`else`])}function IN(e){return oM(e)}function LN(e){return gM(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function RN(e,t){return VM({"~kind":`Enum`},{enum:IN(e)?LN(e):e},t)}function zN(e){return WM(e,`Enum`)}function BN(e,t={}){return VM({"~kind":`Intersect`},{allOf:e},t)}function VN(e){return WM(e,`Intersect`)}function HN(e){return HM(e,[`~kind`,`allOf`])}function UN(){throw Error(`Unreachable`)}var WN;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(WN||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var GN=new Float64Array(1);new DataView(GN.buffer),new Uint8Array(GN.buffer),new TextEncoder;function KN(e){return GM(e)&&hM(e,`~immutable`)}function qN(e,t={}){return YM(e,t)}function JN(e){return GM(e)&&hM(e,`~readonly`)}var YN=`-?(?:0|[1-9][0-9]*)n`;function XN(e){return VM({"~kind":`BigInt`},{type:`bigint`},e)}function ZN(e){return WM(e,`BigInt`)}function QN(e){return WM(e,`Boolean`)}var $N=`-?(?:0|[1-9][0-9]*)`;function eP(e){return VM({"~kind":`Integer`},{type:`integer`},e)}function tP(e){return WM(e,`Integer`)}var nP=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function rP(e){return nM(e)?`bigint`:rM(e)?`boolean`:aM(e)?`number`:cM(e)?`string`:(()=>{throw new nP(e)})()}function iP(e,t){return VM({"~kind":`Literal`},{type:rP(e),const:e},t)}function aP(e){return nM(e)||rM(e)||aM(e)||cM(e)}function oP(e){return cP(e)&&aM(e.const)}function sP(e){return cP(e)&&cM(e.const)}function cP(e){return WM(e,`Literal`)}function lP(e){return VM({"~kind":`Null`},{type:`null`},e)}function uP(e){return WM(e,`Null`)}var dP=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function fP(e){return VM({"~kind":`Number`},{type:`number`},e)}function pP(e){return WM(e,`Number`)}function mP(e){return VM({"~kind":`Symbol`},{type:`symbol`},e)}function hP(e){return WM(e,`Symbol`)}function gP(e){return VM({"~kind":`String`},{type:`string`},e)}function _P(e){return WM(e,`String`)}function vP(e,t={}){return VM({"~kind":`Union`},{anyOf:e},t)}function yP(e){return WM(e,`Union`)}function bP(e){return HM(e,[`~kind`,`anyOf`])}function xP(e){let t=ZI(e);return lM(t.length,2)?t[0]:[]}function SP(e){return!0}function CP(e){return pM(e,(e,t)=>TP(e)?CP(t):!1,()=>!0)}function wP(e){return!lM(e.length,0)&&CP(e)}function TP(e){return yP(e)?wP(e.anyOf):cP(e)?SP(e.const):!1}function EP(e){return wP(e)}function DP(e){return VM({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function OP(e,t,n=[]){return pM(e,(e,r)=>OP(r,t,[...n,`${e}${t}`]),()=>n)}function kP(e,t){return lM(e.length,0)?[`${t}`]:OP(e,t)}function AP(e,t,n=[]){return pM(t,(t,r)=>AP(e,r,[...n,...jP(e,t)]),()=>n)}function jP(e,t){return yP(t)?AP(e,t.anyOf):cP(t)?kP(e,t.const):UN()}function MP(e,t){return pM(t,(t,n)=>MP(jP(e,t),n),()=>e)}function NP(e){return e.map(e=>iP(e))}function PP(e){return vP(NP(MP([],e)))}function FP(e){return lM(e.length,0)?UN():lM(e.length,1)&&cP(e[0])?e[0]:PP(e)}function IP(e){let t=xP(e);return lM(t.length,0)?gP():EP(t)?FP(t):DP(e)}function LP(e){let t=IP(e);return vL(t)?gP():t}function RP(e,t){return VM({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function zP(e){return RP(GF,e)}function BP(e){return wN({true:e,false:e})}function VP(e,t={}){let[n,r,i]=[e,e.length,!1];return VM({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function HP(e){return WM(e,`Tuple`)}function UP(e){return HM(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function WP(e){return HM(e,[`~readonly`])}function GP(e,t){return UM(WP(e),{},t)}function KP(e,t,n,r){return GP(FU(e,t,n),r)}function qP(e,t={}){return GP(e,t)}function JP(e){return HM(e,[`~optional`])}function YP(e,t){return UM(JP(e),{},t)}function XP(e,t,n,r){return YP(FU(e,t,n),r)}function ZP(e,t={}){return YP(e,t)}function QP(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function $P(e){return wN(QP(e.items))}function eF(e){return TN(e)||HP(e)}function tF(e,t){return JN(e)?!!JN(t):!1}function nF(e,t){return bN(e)?!!bN(t):!1}function rF(e,t){let n=tF(e,t),r=nF(e,t),i=qP(ZP(xF([e,t])));return n&&r?qN(vN(i)):n&&!r?qN(i):!n&&r?vN(i):i}function iF(e,t,n){return n in e?n in t?rF(e[n],t[n]):e[n]:n in t?t[n]:gN()}function aF(e,t){return[...new Set([...gM(e),...gM(t)])].reduce((n,r)=>({...n,[r]:iF(e,t,r)}),{})}function oF(e){return TN(e)?e.properties:HP(e)?QP(e.items):{}}function sF(e,t){return wN(aF(oF(e),oF(t)))}function cF(e,t){let n=Sz(e,t);return lM(n,2)?e:lM(n,3)||lM(n,0)?t:gN()}function lF(e,t){let n=eF(e),r=eF(t);return n&&r?sF(e,t):n&&!r?e:!n&&r?t:cF(e,t)}function uF(e,t){return _N(e)||mN(e)?e:ON(e)||_N(t)||mN(t)?t:ON(t)?e:lF(e,t)}function dF(e,t){return yP(e)||yP(t)}function fF(e,t){let n=wF(e),r=wF(t);return dF(n,r)?xF([n,r]):uF(n,r)}function pF(e,t,n=[]){return pM(t,(t,r)=>pF(e,r,[...n,fF(t,e)]),()=>lM(n.length,0)?[e]:n)}function mF(e,t,n=[]){return pM(e,(e,r)=>mF(r,t,[...n,...hF([e],t)]),()=>n)}function hF(e,t=[]){return pM(e,(e,n)=>yP(e)?hF(n,mF(e.anyOf,t)):hF(n,pF(e,t)),()=>t)}function gF(e,t){return TL(xz({},e,t))?[]:[e]}function _F(e,t,n=[]){return pM(e,(e,r)=>_F(r,t,[...n,...gF(e,t)]),()=>n)}function vF(e,t){let n=wF(e);return CF(_F(yP(n)?n.anyOf:[n],t))}function yF(e,t,n){return CF([xF([e,t]),vF(n,e)])}function bF(e,t=[]){return pM(e,(e,n)=>bF(n,[...t,iP(e)]),()=>CF(t))}function xF(e){return CF(Ez(hF(e)))}function SF(e){return wF(LP(e))}function CF(e){return TF(Ez(e))}function wF(e){return PN(e)?yF(e.if,e.then,e.else):zN(e)?bF(e.enum):VN(e)?xF(e.allOf):vL(e)?SF(e.pattern):yP(e)?CF(e.anyOf):e}function TF(e){return lM(e.length,1)?e[0]:lM(e.length,0)?gN():vP(e)}function EF(e,t){return BF(bF(e),t)}function DF(e,t){return RP(UF,t)}function OF(e,t){return BF(xF(e),t)}function kF(e,t){return cM(e)||aM(e)?wN({[e]:t}):lM(e,!1)?wN({false:t}):lM(e,!0)?wN({true:t}):wN({})}function AF(e,t){return RP(WF,t)}function jF(e,t){return hM(e,`pattern`)&&(cM(e.pattern)||e.pattern instanceof RegExp)?RP(e.pattern.toString(),t):RP(GF,t)}function MF(e,t){return EP(xP(e))?BF(SF(e),t):RP(e,t)}function NF(e){return yP(e)?PF(e.anyOf):[e]}function PF(e,t=[]){return pM(e,(e,n)=>PF(n,[...t,...NF(e)]),()=>t)}function FF(e){return e.some(e=>_P(e)||pP(e)||tP(e))}function IF(e,t){return lM(FF(e),!0)?RP(GF,t):void 0}function LF(e,t){return e.reduce((e,n)=>cP(n)&&(cM(n.const)||aM(n.const))?{...e,[n.const]:t}:e,{})}function RF(e,t){return wN(LF(e,t))}function zF(e,t){let n=PF(e),r=IF(n,t);return GM(r)?r:RF(n,t)}function BF(e,t){return mN(e)?zP(t):QN(e)?BP(t):zN(e)?EF(e.enum,t):tP(e)?DF(e,t):VN(e)?OF(e.allOf,t):cP(e)?kF(e.const,t):pP(e)?AF(e,t):yP(e)?zF(e.anyOf,t):_P(e)?jF(e,t):vL(e)?MF(e.pattern,t):wN({})}function VF(e,t,n){return OU([e])?UM(BF(e,t),{},n):KF(e,t,n)}function HF(e,t,n,r,i){return VF(FU(e,t,n),FU(e,t,r),i)}var UF=`^${$N}$`,WF=`^${dP}$`,GF=`^.*$`;function KF(e,t,n={}){return KM(`Record`,[e,t],n)}function qF(e,t,n={}){return VF(e,t,n)}function JF(e,t){return RP(e,t)}function YF(e){return lM(e,GF)?gP():lM(e,UF)?eP():lM(e,WF)?fP():IP(e)}function XF(e){return gM(e.patternProperties)[0]}function ZF(e){return YF(XF(e))}function QF(e){return e.patternProperties[XF(e)]}function $F(e){return WM(e,`Record`)}function eI(e){return VM({"~kind":`Rest`},{type:`rest`,items:e},{})}function tI(e){return WM(e,`Rest`)}function nI(e){return WM(e,`This`)}function rI(e){return VM({"~kind":`Undefined`},{type:`undefined`},e)}function iI(e){return WM(e,`Undefined`)}function aI(e){return WM(e,`Void`)}function oI(e){return XN()}function sI(e){return gP()}function cI(e){return fP()}function lI(e){return eP()}function uI(e){return gN()}function dI(e){return iP(e)}function fI(e){return e}function pI(e){return vP(e[1])}function mI(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function hI(e){return[e[0],...e[1]]}function gI(e){return e}function _I(e){return e[1]}function vI(e){return lM(e.length,2)}function yI(e,t,n){return vI(e)?t(e[0],e[1]):n()}function bI(e,t){return lM(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function xI(e,t){for(let n=0;nString.fromCharCode(e+n))}var CI=[...SI(97,122),...SI(65,90)],wI=[`0`,...SI(49,57)],TI=`//`,EI=`/*`,DI=`*/`;function OI(e){let t=e.indexOf(DI);return lM(t,-1)?``:e.slice(t+2)}function kI(e){let t=e.indexOf(` -`);return lM(t,-1)?``:e.slice(t)}function AI(e){return e.replace(/^[ \t\r\f\v]+/,``)}function jI(e){let t=AI(e);return t.startsWith(EI)?jI(OI(t.slice(2))):t.startsWith(TI)?jI(kI(t.slice(2))):t}function MI(e){let t=e.trimStart();return t.startsWith(EI)?MI(OI(t.slice(2))):t.startsWith(TI)?MI(kI(t.slice(2))):t}[...wI];function NI(e,t){return xI([e],t)}function PI(e,t){return lM(e,``)?[``,t]:e.startsWith(` -`)?NI(e,jI(t)):e.startsWith(` `)?NI(e,t):NI(e,MI(t))}[...CI,...wI],[...wI];function FI(e){return lM(e,``)?[]:[e.slice(0,1),e.slice(1)]}function II(e,t){return pM(e,(e,n)=>t.startsWith(e)?!0:II(n,t),()=>!1)}function LI(e,t,n=``){return yI(FI(t),(r,i)=>II(e,t)?[n,t]:LI(e,i,`${n}${r}`),()=>[])}function RI(e,t){return yI(LI(e,t),(e,t)=>lM(e,``)?[]:[e,t],()=>[])}var zI=(e,t,n=()=>[])=>e.length===2?t(e):n(),BI=e=>zI(PI(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[oI(e),t]),VI=e=>zI(PI(`.*`,e),([e,t])=>[sI(e),t]),HI=e=>zI(PI(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[cI(e),t]),UI=e=>zI(PI(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[lI(e),t]),WI=e=>zI(PI(`(?!)`,e),([e,t])=>[uI(e),t]),GI=e=>zI(RI([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[dI(e),t]),KI=e=>zI(zI(BI(e),([e,t])=>[e,t],()=>zI(VI(e),([e,t])=>[e,t],()=>zI(HI(e),([e,t])=>[e,t],()=>zI(UI(e),([e,t])=>[e,t],()=>zI(WI(e),([e,t])=>[e,t],()=>zI(qI(e),([e,t])=>[e,t],()=>zI(GI(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[fI(e),t]),qI=e=>zI(zI(PI(`(`,e),([e,t])=>zI(XI(t),([t,n])=>zI(PI(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[pI(e),t]),JI=e=>zI(zI(zI(YI(e),([e,t])=>zI(PI(`|`,t),([t,n])=>zI(JI(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>zI(zI(YI(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>zI([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[mI(e),t]),YI=e=>zI(zI(KI(e),([e,t])=>zI(XI(t),([t,n])=>[[e,t],n])),([e,t])=>[hI(e),t]),XI=e=>zI(zI(JI(e),([e,t])=>[e,t],()=>zI(YI(e),([e,t])=>[e,t],()=>[])),([e,t])=>[gI(e),t]),ZI=e=>zI(zI(PI(`^`,e),([e,t])=>zI(XI(t),([t,n])=>zI(PI(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[_I(e),t]);function QI(e){return e.join(`|`)}function $I(e){return e.slice(1,e.length-1)}function eL(e,t,n){return dL(t,`${n}${e}`)}function tL(e,t){return dL(e,`${t}${YN}`)}function nL(e,t){return dL(e,`${t}${$N}`)}function rL(e,t){return dL(e,`${t}${dP}`)}function iL(e,t){return uL(vP([iP(`false`),iP(`true`)]),e,t)}function aL(e,t){return dL(e,`${t}.*`)}function oL(e,t,n){return dL(t,`${n}${$I(e)}`)}function sL(e,t,n){return uL(mL(e,{}),t,n)}function cL(e,t,n){return uL(bF(e),t,n)}function lL(e,t,n,r=[]){return pM(e,(e,i)=>lL(i,t,n,[...r,uL(e,[],``)]),()=>dL(t,`${n}(${QI(r)})`))}function uL(e,t,n){return zN(e)?cL(e.enum,t,n):tP(e)?nL(t,n):cP(e)?eL(e.const,t,n):ZN(e)?tL(t,n):QN(e)?iL(t,n):pP(e)?rL(t,n):_P(e)?aL(t,n):vL(e)?oL(e.pattern,t,n):_L(e)?sL(e.parameters[0],t,n):yP(e)?lL(e.anyOf,t,n):hN}function dL(e,t){return pM(e,(e,n)=>uL(e,n,t),()=>t)}function fL(e){return`^${dL(e,``)}$`}function pL(e){return DP(fL(e))}function mL(e,t){return OU(e)?UM(pL(e),{},t):gL(e,t)}function hL(e,t,n,r){return mL(jU(e,t,n),r)}function gL(e,t={}){return KM(`TemplateLiteral`,[e],t)}function _L(e){return GM(e)&&hM(e,`action`)&&lM(e.action,`TemplateLiteral`)}function vL(e){return WM(e,`TemplateLiteral`)}function yL(e){return VM({"~kind":`ExtendsUnion`},{inferred:e})}function bL(e){return sM(e)&&hM(e,`~kind`)&&hM(e,`inferred`)&&lM(e[`~kind`],`ExtendsUnion`)&&sM(e.inferred)}function xL(e){return VM({"~kind":`ExtendsTrue`},{inferred:e})}function SL(e){return sM(e)&&hM(e,`~kind`)&&hM(e,`inferred`)&&lM(e[`~kind`],`ExtendsTrue`)&&sM(e.inferred)}function CL(){return VM({"~kind":`ExtendsFalse`},{})}function wL(e){return sM(e)&&hM(e,`~kind`)&&lM(e[`~kind`],`ExtendsFalse`)}function TL(e){return bL(e)||SL(e)}function EL(e,t,n){return TL(e)?t(e.inferred):n()}function DL(e,t,n,r){return EL(GR(e,n,r),r=>xL(EM(EM(e,r),{[t]:n})),()=>CL())}function OL(e,t){return xL(e)}function kL(e,t,n,r,i){return EL(GR(e,t,n),e=>EL(GR(e,t,r),e=>xL(e),()=>CL()),()=>EL(GR(e,t,i),e=>xL(e),()=>CL()))}function AL(e,t,n){return GR(e,t,bF(n))}function jL(e,t,n){return pM(n,(n,r)=>EL(GR(e,t,n),e=>jL(e,t,r),()=>CL()),()=>xL(e))}function ML(e,t,n){return GR(e,t,SF(n))}function NL(e,t,n){return pM(n,(n,r)=>EL(GR(e,t,n),e=>xL(e),()=>NL(e,t,r)),()=>CL())}function PL(e,t,n){return mN(n)?OL(e,t):PN(n)?kL(e,t,n.if,n.then,n.else):zN(n)?AL(e,t,n.enum):MN(n)?DL(e,n.name,t,n.extends):VN(n)?jL(e,t,n.allOf):vL(n)?ML(e,t,n.pattern):yP(n)?NL(e,t,n.anyOf):ON(n)?xL(e):CL()}function FL(e,t,n){return MN(n)?PL(e,t,n):mN(n)||ON(n)?xL(e):yL(e)}function IL(e,t){let n=KN(e),r=KN(t);return n&&r||!n&&r?!0:!(n&&!r)}function LL(e,t,n,r){return tN(r)?IL(t,r)?GR(e,n,r.items):CL():PL(e,t,r)}function RL(e,t,n){return ZN(n)?xL(e):PL(e,t,n)}function zL(e,t,n){return QN(n)?xL(e):PL(e,t,n)}function BL(e,t,n,r,i){let a=MN(r)?t:r,o=MN(r)?r:t,s=bN(t),c=bN(r);return!s&&c?CL():EL(GR(e,a,o),e=>UL(e,n,i),()=>CL())}function VL(e,t,n,r){return pM(r,(r,i)=>BL(e,t,n,r,i),()=>bN(t)?xL(e):CL())}function HL(e,t,n){return pM(t,(t,r)=>VL(e,t,r,n),()=>xL(e))}function UL(e,t,n){return HL(e,t,n)}function WL(e,t,n){return aI(n)?xL(e):GR(e,t,n)}function GL(e,t,n,r){return mN(r)||ON(r)?xL(e):iN(r)?EL(UL(e,t,r.parameters),e=>WL(e,n,r.instanceType),()=>CL()):CL()}function KL(e,t,n,r,i){return EL(GR(e,t,i),()=>GR(e,n,i),()=>GR(e,r,i))}function qL(e,t,n){return GR(e,bF(t),n)}function JL(e,t,n,r){return mN(r)||ON(r)?xL(e):sN(r)?EL(UL(e,t,r.parameters),e=>WL(e,n,r.returnType),()=>CL()):CL()}function YL(e,t,n){return tP(n)||pP(n)?xL(e):PL(e,t,n)}function XL(e,t,n){return GR(e,xF(t),n)}function ZL(e,t,n){return t===n?xL(e):CL()}function QL(e,t,n){return cP(n)?ZL(e,t,n.const):ZN(n)?xL(e):PL(e,iP(t),n)}function $L(e,t,n){return cP(n)?ZL(e,t,n.const):QN(n)?xL(e):PL(e,iP(t),n)}function eR(e,t,n){return cP(n)?ZL(e,t,n.const):pP(n)?xL(e):PL(e,iP(t),n)}function tR(e,t,n){return cP(n)?ZL(e,t,n.const):_P(n)?xL(e):PL(e,iP(t),n)}function nR(e,t,n){return nM(t.const)?QL(e,t.const,n):rM(t.const)?$L(e,t.const,n):aM(t.const)?eR(e,t.const,n):cM(t.const)?tR(e,t.const,n):UN()}function rR(e,t,n){return MN(n)?PL(e,t,n):xL(e)}function iR(e,t,n){return uP(n)?xL(e):PL(e,t,n)}function aR(e,t,n){return pP(n)?xL(e):PL(e,t,n)}function oR(e,t,n){return bN(t)?bN(n)?xL(e):CL():xL(e)}function sR(e,t,n){return MN(n)&&_N(n.extends)?CL():EL(GR(e,t,n),e=>oR(e,t,n),()=>CL())}function cR(e,t){return e.reduce((e,n)=>n in t&&TL(t[n])?{...e,...t[n].inferred}:UN(),{})}function lR(e,t,n){let r={};for(let i of gM(n))r[i]=i in t?sR({},t[i],n[i]):bN(n[i])?MN(n[i])?xL(EM(e,{[n[i].name]:n[i].extends})):xL(e):CL();let i=vM(r).every(e=>TL(e)),a=i?cR(gM(r),r):{};return i?xL(a):CL()}function uR(e,t,n){let r=lR(e,t,n);return TL(r)?xL(EM(e,r.inferred)):CL()}function dR(e,t,n){return uR(e,t,n)}function fR(e,t){return gM(t).reduce((n,r)=>({...n,[r]:hM(e,r)?yP(n[r])?vP([...n[r].anyOf,t[r]]):vP([e[r],t[r]]):t[r]}),e)}function pR(e,t,n,r){return pM(t,(t,i)=>EL(GR({},e[t],n),t=>pR(e,i,n,fR(r,t)),()=>CL()),()=>xL(r))}function mR(e,t,n,r){return pR(t,gM(t),r,e)}function hR(e,t,n){return $F(n)?mR(e,t,XF(n),QF(n)):TN(n)?dR(e,t,n.properties):PL(e,wN(t),n)}function gR(e,t){return lM(gM(t).length,0)?xL(e):CL()}function _R(e,t,n,r,i){return GR(e,n,i)}function vR(e,t,n,r){return $F(r)?_R(e,YF(t),n,YF(XF(r)),QF(r)):TN(r)?gR(e,r.properties):mN(r)||ON(r)?xL(e):CL()}function yR(e,t,n){return _P(n)?xL(e):PL(e,t,n)}function bR(e,t,n){return hP(n)?xL(e):PL(e,t,n)}function xR(e,t,n){return GR(e,SF(t),n)}function SR(e,t){return VM({"~kind":`Inferrable`},{name:e,type:t},{})}function CR(e){return sM(e)&&hM(e,`~kind`)&&hM(e,`name`)&&hM(e,`type`)&&lM(e[`~kind`],`Inferrable`)&&cM(e.name)&&sM(e.type)}function wR(e){return tI(e)?MN(e.items)?tN(e.items.extends)?SR(e.items.name,e.items.extends.items):ON(e.items.extends)?SR(e.items.name,e.items.extends):void 0:UN():void 0}function TR(e){return MN(e)?SR(e.name,e.extends):void 0}function ER(e,t,n=[]){return pM(e,(e,r)=>EL(GR({},e,t),()=>ER(r,t,[...n,e]),()=>void 0),()=>n)}function DR(e,t,n,r){let i=ER(n,r);return tM(i)?xL(EM(e,{[t]:VP(i)})):CL()}function OR(e,t,n,r){let i=ER(n,r);return tM(i)?xL(EM(e,{[t]:vP(i)})):CL()}function kR(e){return[...e].reverse()}function AR(e,t){return t?kR(e):e}function jR(e){let t=e.length>0?e[0]:void 0;return GM(GM(t)?wR(t):void 0)}function MR(e,t,n,r,i,a){return EL(GR(e,n,i),e=>FR(e,t,r,a),()=>CL())}function NR(e,t,n,r,i){let a=wR(r);return CR(a)?DR(e,a.name,AR(n,t),a.type):pM(n,(n,a)=>MR(e,t,n,a,r,i),()=>CL())}function PR(e,t,n,r){return pM(r,(r,i)=>NR(e,t,n,r,i),()=>lM(n.length,0)?xL(e):CL())}function FR(e,t,n,r){return PR(e,t,n,r)}function IR(e,t,n){let r=AU(e,DU([],[]),n),i=jR(r);return FR(e,i,AR(t,i),AR(r,i))}function LR(e,t,n){let r=TR(n);return CR(r)?OR(e,r.name,t,r.type):pM(t,(t,r)=>EL(GR(e,t,n),e=>LR(e,r,n),()=>CL()),()=>xL(e))}function RR(e,t,n){let r=AU(e,DU([],[]),t);return HP(n)?IR(e,r,n.items):tN(n)?LR(e,r,n.items):PL(e,VP(r),n)}function zR(e,t,n){return aI(n)||iI(n)?xL(e):PL(e,t,n)}function BR(e,t,n){return pM(n,(n,r)=>EL(GR(e,t,n),e=>xL(e),()=>BR(e,t,r)),()=>CL())}function VR(e,t,n){return pM(t,(t,r)=>EL(BR(e,t,n),e=>VR(e,r,n),()=>CL()),()=>xL(e))}function HR(e,t,n){let r=TR(n);return CR(r)?OR(e,r.name,t,r.type):yP(n)?VR(e,t,n.anyOf):VR(e,t,[n])}function UR(e,t,n){return MN(n)?PL(e,t,n):mN(n)||ON(n)?xL(e):CL()}function WR(e,t,n){return aI(n)?xL(e):PL(e,t,n)}function GR(e,t,n){return mN(t)?FL(e,t,n):tN(t)?LL(e,t,t.items,n):ZN(t)?RL(e,t,n):QN(t)?zL(e,t,n):iN(t)?GL(e,t.parameters,t.instanceType,n):PN(t)?KL(e,t.if,t.then,t.else,n):zN(t)?qL(e,t.enum,n):sN(t)?JL(e,t.parameters,t.returnType,n):tP(t)?YL(e,t,n):VN(t)?XL(e,t.allOf,n):cP(t)?nR(e,t,n):_N(t)?rR(e,t,n):uP(t)?iR(e,t,n):pP(t)?aR(e,t,n):TN(t)?hR(e,t.properties,n):$F(t)?vR(e,XF(t),QF(t),n):_P(t)?yR(e,t,n):hP(t)?bR(e,t,n):vL(t)?xR(e,t.pattern,n):HP(t)?RR(e,t.items,n):iI(t)?zR(e,t,n):yP(t)?HR(e,t.anyOf,n):ON(t)?UR(e,t,n):aI(t)?WR(e,t,n):CL()}function KR(e,t){return xF([...e,wN(t)])}function qR(e,t,n){return OU(e)?UM(KR(e,t),{},n):YR(e,t,n)}function JR(e,t,n,r,i){return qR(jU(e,t,n),kU(e,t,r),i)}function YR(e,t,n={}){return KM(`Interface`,[e,t],n)}function XR(e){return GM(e)&&hM(e,`action`)&&lM(e.action,`Interface`)}function ZR(e,t,n){return e.includes(n)?!0:ez([...e,n],t,t[n])}function QR(e,t,n){return $R(e,t,CN(n))}function $R(e,t,n){return pM(n,(n,r)=>ez(e,t,n)?!0:$R(e,t,r),()=>!1)}function ez(e,t,n){return uN(n)?ZR(e,t,n.$ref):tN(n)?ez(e,t,n.items):iN(n)?$R(e,t,[...n.parameters,n.instanceType]):sN(n)?$R(e,t,[...n.parameters,n.returnType]):XR(n)?QR(e,t,n.parameters[1]):VN(n)?$R(e,t,n.allOf):TN(n)?QR(e,t,n.properties):yP(n)?$R(e,t,n.anyOf):HP(n)?$R(e,t,n.items):$F(n)?ez(e,t,QF(n)):!1}function tz(e,t,n){return ez(e,t,n)}function nz(e,t){return t.reduce((t,n)=>tz([n],e,e[n])?[...t,n]:t,[])}function rz(e){return nz(e,SN(e))}function iz(e,t,n){return n.includes(t)?n:t in e?sz(e,e[t],[...n,t]):UN()}function az(e,t,n){return oz(e,CN(t),n)}function oz(e,t,n){return t.reduce((t,n)=>sz(e,n,t),n)}function sz(e,t,n){return uN(t)?iz(e,t.$ref,n):tN(t)?sz(e,t.items,n):iN(t)?oz(e,[...t.parameters,t.instanceType],n):sN(t)?oz(e,[...t.parameters,t.returnType],n):XR(t)?az(e,t.parameters[1],n):VN(t)?oz(e,t.allOf,n):TN(t)?az(e,t.properties,n):yP(t)?oz(e,t.anyOf,n):HP(t)?oz(e,t.items,n):$F(t)?sz(e,QF(t),n):n}function cz(e,t,n){return sz(e,n,[t])}function lz(e){return pN()}function uz(e){return gM(e).reduce((t,n)=>({...t,[n]:fz(e[n])}),{})}function dz(e){return e.reduce((e,t)=>[...e,fz(t)],[])}function fz(e){return uN(e)?lz(e.$ref):tN(e)?eN(fz(e.items),nN(e)):iN(e)?rN(dz(e.parameters),fz(e.instanceType)):sN(e)?oN(dz(e.parameters),fz(e.returnType)):VN(e)?BN(dz(e.allOf)):TN(e)?wN(uz(e.properties)):$F(e)?qF(ZF(e),fz(QF(e))):yP(e)?vP(dz(e.anyOf)):HP(e)?VP(dz(e.items)):e}function pz(e,t){return t in e?fz(e[t]):DN()}function mz(e){return pz(e.$defs,e.$ref)}function hz(e,t,n){let r=jU(e,DU([],[]),t),i=kU({},DU([],[]),n);return xF([...r,wN(i)])}function gz(e,t){return gM(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=XR(r)?hz(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function _z(e,t,n){return kN(gz(e,cz(e,t,n)),t)}function vz(e,t){return t in e?uN(e[t])?vz(e,e[t].$ref):e[t]:gN()}function yz(e,t){return vz(e,t)}function bz(e){return AN(e)?mz(e):jN(e)?DN():e}function xz(e,t,n){return GR(e,bz(t),bz(n))}function Sz(e,t){let n=[xz({},e,t),xz({},t,e)];return TL(n[0])&&TL(n[1])?0:TL(n[0])&&wL(n[1])?2:wL(n[0])&&TL(n[1])?3:1}function Cz(e,t,n=[],r=t){return pM(t,(t,i)=>{let a=Sz(e,t);return lM(a,2)||lM(a,0)?r:lM(a,1)?Cz(e,i,[...n,t],r):Cz(e,i,n,r)},()=>[...n,e])}function wz(e,t,n){let r=wF(e);return mN(r)||ON(r)?[r]:_N(r)?Tz(t,n):TN(r)?Tz(t,[...n,r]):Tz(t,Cz(r,n))}function Tz(e,t=[]){return pM(e,(e,n)=>wz(e,n,t),()=>t)}function Ez(e){return PF(Tz(e))}function Dz(e,t){return UM(wF(e),{},t)}function Oz(e,t,n,r){return Dz(FU(e,t,n),r)}function kz(e,t=[]){return qM(e)&&lM(e.action,`Conditional`)?uN(e.parameters[0])?kz(e.parameters[2],kz(e.parameters[3],[...t,e.parameters[0].$ref])):kz(e.parameters[2],kz(e.parameters[3],t)):qM(e)&&lM(e.action,`Mapped`)&&qM(e.parameters[1])&&lM(e.parameters[1].action,`KeyOf`)&&uN(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function Az(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function jz(e,t,n=[]){return pM(e,(e,r)=>pM(t,(t,i)=>jz(r,i,[...n,[t,e]]),()=>n),()=>n)}function Mz(e){return vL(e)?SF(e.pattern):zN(e)?bF(e.enum):e}function Nz(e){let t=Mz(e);return yP(t)?[...t.anyOf]:[t]}function Pz(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function Fz(e,t){return t.reduce((t,n)=>[...t,...Pz(e,n)],[])}function Iz(e){return e.reduce((e,t)=>lM(t[0],!0)?Fz(e,Nz(t[1])):Fz(e,[t[1]]),[[]])}function Lz(e,t,n){let r=jz(t,Az(e,kz(n)));return qM(n)&&lM(n.action,`Conditional`)||qM(n)&&lM(n.action,`Mapped`)?Iz(r):[t]}function Rz(){return[`(not-resolvable)`,gN()]}function zz(){return[`(not-generic)`,gN()]}function Bz(e,t,n){return[e,dN(t,n)]}function Vz(e,t,n){return t in e?Hz(e,t,e[t],n):Rz()}function Hz(e,t,n,r){return fN(n)?Bz(t,n.parameters,n.expression):uN(n)?Vz(e,n.$ref,r):zz()}function Uz(e,t,n){return Hz(e,`(anonymous)`,t,n)}function Wz(e,t,n){if(MN(t)||sB(t)||TL(xz({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Gz(e,t,n,r,i){let a=FU(e,t,i);return Wz(n,a,r),EM(e,{[n]:a})}function Kz(e,t,n,r,i){let a=FU(e,t,n.extends),o=FU(e,t,n.equals);return pM(i,(i,o)=>qz(Gz(e,t,n.name,a,i),t,r,o),()=>qz(Gz(e,t,n.name,a,o),t,r,[]))}function qz(e,t,n,r){return pM(n,(n,i)=>Kz(e,t,n,i,r),()=>e)}function Jz(e,t,n,r){return qz(e,t,n,r)}var Yz=0,Xz=0;function Zz(){if(!dM(Xz,wM().maxInstantiationCount))throw Error(`Type instantiation is excessively deep and possibly infinite`)}function Qz(){Zz(),Xz++,Yz++}function $z(){Yz--,lM(Yz,0)&&(Xz=0)}function eB(e){return uM(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function tB(e,t){return lM(eB(e),t)}function nB(e,t,n,r,i,a){Qz();try{let o=Jz(e,t,r,a),s=FU(o,DU([...t.callstack,n.$ref],t.visited),i);return FU(o,DU([],[]),s)}finally{$z()}}function rB(e,t,n,r,i,a){return a.reduce((a,o)=>{let s=nB(e,t,n,r,i,o);return[...a,s]},[])}function iB(e,t,n,r,i,a){let o=rB(e,t,n,r,i,Lz(r,a,i));return lM(o.length,1)?o[0]:CF(o)}function aB(e,t,n,r){let i=jU(e,t,r),a=Uz(e,n,r),o=a[0],s=a[1];return fN(s)?tB(t,o)?oB(lN(o),i):iB(e,t,lN(o),s.parameters,s.expression,i):oB(n,i)}function oB(e,t){return VM({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function sB(e){return WM(e,`Call`)}function cB(e){return HM(e,[`~immutable`])}function lB(e,t){return UM(cB(e),{},t)}function uB(e,t,n,r){return lB(FU(e,t,n),r)}function dB(e,t){return e(t)}function fB(e,t){return cM(t)?iP(dB(e,t)):iP(t)}function pB(e,t){return hB(e,SF(t))}function mB(e,t){return vP(t.map(t=>hB(e,t)))}function hB(e,t){return cP(t)?fB(e,t.const):vL(t)?pB(e,t.pattern):yP(t)?mB(e,t.anyOf):t}function gB(e,t={}){return KM(`Capitalize`,[e],t)}function _B(e,t={}){return KM(`Lowercase`,[e],t)}function vB(e,t={}){return KM(`Uncapitalize`,[e],t)}function yB(e,t={}){return KM(`Uppercase`,[e],t)}var bB=e=>e[0].toUpperCase()+e.slice(1),xB=e=>e.toLowerCase(),SB=e=>e[0].toLowerCase()+e.slice(1),CB=e=>e.toUpperCase();function wB(e,t){return OU([e])?UM(hB(bB,e),{},t):gB(e,t)}function TB(e,t){return OU([e])?UM(hB(xB,e),{},t):_B(e,t)}function EB(e,t){return OU([e])?UM(hB(SB,e),{},t):vB(e,t)}function DB(e,t){return OU([e])?UM(hB(CB,e),{},t):yB(e,t)}function OB(e,t,n,r){return wB(FU(e,t,n),r)}function kB(e,t,n,r){return TB(FU(e,t,n),r)}function AB(e,t,n,r){return EB(FU(e,t,n),r)}function jB(e,t,n,r){return DB(FU(e,t,n),r)}function MB(e,t,n,r,i={}){return KM(`Conditional`,[e,t,n,r],i)}function NB(e,t,n,r,i,a){let o=xz(e,n,r);return bL(o)?vP([FU(o.inferred,t,i),FU(e,t,a)]):SL(o)?FU(o.inferred,t,i):FU(e,t,a)}function PB(e,t,n,r,i,a,o){return OU([n,r])?UM(NB(e,t,n,r,i,a),{},o):MB(n,r,i,a,o)}function FB(e,t,n,r,i,a,o){return PB(e,t,FU(e,t,n),FU(e,t,r),i,a,o)}function IB(e,t={}){return KM(`ConstructorParameters`,[e],t)}function LB(e){let t=iN(e)?e.parameters:[];return VP(AU({},DU([],[]),t))}function RB(e,t){return OU([e])?UM(LB(e),{},t):IB(e,t)}function zB(e,t,n,r){return RB(FU(e,t,n),r)}function BB(e,t,n={}){return KM(`Exclude`,[e,t],n)}function VB(e,t,n){return OU([e,t])?UM(vF(e,t),{},n):BB(e,t,n)}function HB(e,t,n,r,i){return VB(FU(e,t,n),FU(e,t,r),i)}function UB(e,t,n={}){return KM(`Extract`,[e,t],n)}function WB(e,t){return TL(xz({},e,t))?[e]:[]}function GB(e,t,n=[]){return pM(e,(e,r)=>GB(r,t,[...n,...WB(e,t)]),()=>n)}function KB(e,t){let n=wF(e);return CF(GB(yP(n)?n.anyOf:[n],t))}function qB(e,t,n){return OU([e,t])?UM(KB(e,t),{},n):UB(e,t,n)}function JB(e,t,n,r,i){return qB(FU(e,t,n),FU(e,t,r),i)}function YB(e,t,n={}){return KM(`Index`,[e,t],n)}function XB(e,t){return aV(yz(e,t))}function ZB(e,t,n){return aV(yF(e,t,n))}function QB(e,t){let n=gM(e).filter(e=>!hM(t,e)),r=gM(t).filter(t=>!hM(e,t)),i=gM(e).filter(e=>hM(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:xF([e[r],t[r]])}),{});return EM(EM(a,o),s)}function $B(e){return e.reduce((e,t)=>QB(e,aV(t)),{})}function eV(e){return e}function tV(e){return aV($P(VP(e)))}function nV(e,t){return gM(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:CF([e[r],t[r]])}),{})}function rV(e,t){return pM(e,(e,n)=>rV(n,nV(t,aV(e))),()=>t)}function iV(e){return pM(e,(e,t)=>rV(t,aV(e)),()=>UN())}function aV(e){return AN(e)?XB(e.$defs,e.$ref):PN(e)?ZB(e.if,e.then,e.else):VN(e)?$B(e.allOf):yP(e)?iV(e.anyOf):HP(e)?tV(e.items):TN(e)?eV(e.properties):{}}function oV(e){return wN(aV(e))}var sV=RegExp(`^(?:0|[1-9][0-9]*)$`);function cV(e){let t=`${e}`;return sV.test(t)?parseInt(t):e}function lV(e){return iP(cV(e))}function uV(e){return e.map(e=>dV(e))}function dV(e){return VN(e)?BN(uV(e.allOf)):yP(e)?vP(uV(e.anyOf)):cP(e)?lV(e.const):e}function fV(e,t){return TL(xz({},dV(t),fP()))?e:cP(t)&&lM(t.const,`length`)?fP():gN()}function pV(e,t){return bV(yz(e,t))}function mV(e,t,n){return bV(yF(e,t,n))}function hV(e){return bV(bF(e))}function gV(e){return bV(xF(e))}function _V(e){return[`${e}`]}function vV(e){return bV(SF(e))}function yV(e){return e.reduce((e,t)=>[...e,...bV(t)],[])}function bV(e){return AN(e)?pV(e.$defs,e.$ref):PN(e)?mV(e.if,e.then,e.else):zN(e)?hV(e.enum):VN(e)?gV(e.allOf):cP(e)?_V(e.const):vL(e)?vV(e.pattern):yP(e)?yV(e.anyOf):[]}function xV(e){return bV(e)}function SV(e,t){return t.map(t=>CV(e,t))}function CV(e,t){return tN(t)?eN(CV(e,t.items)):iN(t)?rN(SV(e,t.parameters),CV(e,t.instanceType)):sN(t)?oN(SV(e,t.parameters),CV(e,t.returnType)):HP(t)?VP(SV(e,t.items)):yP(t)?vP(SV(e,t.anyOf)):VN(t)?BN(SV(e,t.allOf)):nI(t)?wN(e):t}function wV(e,t){return CV(e,t)}function TV(e,t){return wV(e,t in e?e[t]:gN())}function EV(e,t){return t.reduce((t,n)=>[...t,TV(e,n)],[])}function DV(e,t){return CF(EV(e,xV(t)))}var OV=new RegExp(UF);function kV(e){return e.filter(e=>OV.test(e))}function AV(e){return CF(EV(e,kV(SN(e))))}function jV(e,t){return pP(t)?AV(e):DV(e,t)}function MV(e){return iP(cV(e))}function NV(e){return e.map(e=>PV(e))}function PV(e){return VN(e)?BN(NV(e.allOf)):yP(e)?vP(NV(e.anyOf)):cP(e)?MV(e.const):e}function FV(e,t){return e.reduceRight((e,n,r)=>TL(xz({},iP(r),t))?[n,...e]:e,[])}function IV(e,t){return TF(FV(e,PV(t)))}function LV(e){return TF(e)}function RV(e,t){return cP(t)&&lM(t.const,`length`)?iP(e.length):pP(t)||tP(t)?LV(e):IV(e,t)}function zV(e,t){return tN(e)?fV(e.items,t):TN(e)?jV(e.properties,t):HP(e)?RV(e.items,t):gN()}function BV(e){return AN(e)||PN(e)||VN(e)||yP(e)?oV(e):e}function VV(e,t,n){return OU([e,t])?UM(zV(BV(e),t),{},n):YB(e,t,n)}function HV(e,t,n,r,i){return VV(FU(e,t,n),FU(e,t,r),i)}function UV(e,t={}){return KM(`InstanceType`,[e],t)}function WV(e){return iN(e)?e.instanceType:gN()}function GV(e,t){return OU([e])?UM(WV(e),{},t):UV(e,t)}function KV(e,t,n,r={}){return GV(FU(e,t,n),r)}function qV(e,t={}){return KM(`KeyOf`,[e],t)}function JV(){return vP([fP(),gP(),mP()])}function YV(e){return fP()}function XV(e){return e.reduce((e,t)=>aP(t)?[...e,iP(cV(t))]:UN(),[])}function ZV(e){return TF(XV(gM(e)))}function QV(e){return ZF(e)}function $V(e){return TF(e.map((e,t)=>iP(t)))}function eH(e){return mN(e)?JV():tN(e)?YV(e.items):TN(e)?ZV(e.properties):$F(e)?QV(e):HP(e)?$V(e.items):gN()}function tH(e){return AN(e)||PN(e)||VN(e)||yP(e)?oV(e):e}function nH(e,t){return OU([e])?UM(eH(tH(e)),{},t):qV(e,t)}function rH(e,t,n,r){return nH(FU(e,t,n),r)}function iH(e,t,n,r,i={}){return KM(`Mapped`,[e,t,n,r],i)}function aH(e){return lH(SF(e))}function oH(e){return e.reduce((e,t)=>[...e,...lH(t)],[])}function sH(e){return lH(bF(e))}function cH(e){return aM(e)?[iP(`${e}`)]:[iP(e)]}function lH(e){return zN(e)?sH(e.enum):cP(e)?cH(e.const):vL(e)?aH(e.pattern):yP(e)?oH(e.anyOf):[e]}function uH(e){return lH(e)}function dH(e){return vL(e)?SF(e.pattern):e}function fH(e,t,n,r,i,a){let o=EM(e,{[n.name]:r}),s=dH(FU(o,t,i)),c=FU(o,t,a);return oP(s)||sP(s)?{[s.const]:c}:{}}function pH(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,fH(e,t,n,o,i,a)],[])}function mH(e){return e.reduce((e,t)=>[...e,wN(t)],[])}function hH(e,t,n,r,i,a){return xF(mH(pH(e,t,n,uH(r),i,a)))}function gH(e,t,n,r,i,a,o){return OU([r])?UM(hH(e,t,n,r,i,a),{},o):iH(n,r,i,a,o)}function _H(e,t,n,r,i,a,o){return gH(e,t,n,FU(e,t,r),i,a,o)}function vH(e,t,n){let r=EM(e,t);return gM(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:_z(r,n,t[n])}),{})}function yH(e,t,n){let r=EM(e,t);return gM(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:FU(r,DU([],[]),t[n])}),{})}function bH(e,t,n){let r=rz(t),i=vH(e,t,r),a=yH(e,t,r);return UM({...i,...a},{},n)}function xH(e,t,n,r){return bH(e,n,r)}function SH(e,t={}){return KM(`NonNullable`,[e],t)}function CH(e){return VB(e,vP([lP(),rI()]),{})}function wH(e,t){return OU([e])?UM(CH(e),{},t):SH(e,t)}function TH(e,t,n,r){return wH(FU(e,t,n),r)}function EH(e,t,n={}){return KM(`Omit`,[e,t],n)}function DH(e){let t=oV(e);return TN(t)?t.properties:UN()}function OH(e,t){return gM(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function kH(e,t){return wN(OH(DH(e),xV(t)))}function AH(e,t,n){return OU([e,t])?UM(kH(e,t),{},n):EH(e,t,n)}function jH(e,t,n,r,i){return AH(FU(e,t,n),FU(e,t,r),i)}function MH(e,t={}){return KM(`Parameters`,[e],t)}function NH(e){let t=sN(e)?e.parameters:[];return VP(AU({},DU([],[]),t))}function PH(e,t){return OU([e])?UM(NH(e),{},t):MH(e,t)}function FH(e,t,n,r){return PH(FU(e,t,n),r)}function IH(e,t={}){return KM(`Partial`,[e],t)}function LH(e,t={}){return WH(e,t)}function RH(e,t){let n=UH(yz(e,t));return kN(EM(e,{[t]:n}),t)}function zH(e,t,n){return UH(yF(e,t,n))}function BH(e){return UH(xF(e))}function VH(e){return vP(e.map(e=>UH(e)))}function HH(e){return wN(gM(e).reduce((t,n)=>({...t,[n]:vN(e[n])}),{}))}function UH(e){return AN(e)?RH(e.$defs,e.$ref):PN(e)?zH(e.if,e.then,e.else):VN(e)?BH(e.allOf):yP(e)?VH(e.anyOf):TN(e)?HH(e.properties):wN({})}function WH(e,t){return OU([e])?UM(UH(e),{},t):IH(e,t)}function GH(e,t,n,r){return WH(FU(e,t,n),r)}function KH(e,t,n={}){return KM(`Pick`,[e,t],n)}function qH(e,t){return gM(e).reduce((n,r)=>t.includes(r)?EM(n,{[r]:e[r]}):n,{})}function JH(e,t){return wN(qH(DH(e),xV(t)))}function YH(e,t,n){return OU([e,t])?UM(JH(e,t),{},n):KH(e,t,n)}function XH(e,t,n,r,i){return YH(FU(e,t,n),FU(e,t,r),i)}function ZH(e,t={}){return KM(`ReadonlyObject`,[e],t)}function QH(e){return zU(eN(e))}function $H(e,t){let n=aU(yz(e,t));return kN(EM(e,{[t]:n}),t)}function eU(e,t,n){return aU(yF(e,t,n))}function tU(e){return aU(xF(e))}function nU(e){return wN(gM(e).reduce((t,n)=>({...t,[n]:qN(e[n])}),{}))}function rU(e){return zU(VP(e))}function iU(e){return vP(e.map(e=>aU(e)))}function aU(e){return tN(e)?QH(e.items):AN(e)?$H(e.$defs,e.$ref):PN(e)?eU(e.if,e.then,e.else):VN(e)?tU(e.allOf):TN(e)?nU(e.properties):HP(e)?rU(e.items):yP(e)?iU(e.anyOf):e}function oU(e,t){return OU([e])?UM(aU(e),{},t):ZH(e)}function sU(e,t,n,r){return oU(FU(e,t,n),r)}function cU(e,t,n,r){return t.visited.includes(r)?n:r in e?FU(e,DU(t.callstack,[...t.visited,r]),e[r]):n}function lU(e,t){let n=mU(yz(e,t));return kN(EM(e,{[t]:n}),t)}function uU(e,t,n){return mU(yF(e,t,n))}function dU(e){return mU(xF(e))}function fU(e){return vP(e.map(e=>mU(e)))}function pU(e){return wN(gM(e).reduce((t,n)=>({...t,[n]:ZP(e[n])}),{}))}function mU(e){return AN(e)?lU(e.$defs,e.$ref):PN(e)?uU(e.if,e.then,e.else):VN(e)?dU(e.allOf):yP(e)?fU(e.anyOf):TN(e)?pU(e.properties):wN({})}function hU(e,t={}){return KM(`Required`,[e],t)}function gU(e,t){return OU([e])?UM(mU(e),{},t):hU(e,t)}function _U(e,t,n,r){return gU(FU(e,t,n),r)}function vU(e,t={}){return KM(`ReturnType`,[e],t)}function yU(e){return sN(e)?e.returnType:gN()}function bU(e,t){return OU([e])?UM(yU(e),{},t):vU(e,t)}function xU(e,t,n,r={}){return bU(FU(e,t,n),r)}function SU(e,t){return KM(`With`,[e,t],{})}function CU(e,t){return OU([e])?UM(e,{},t):SU(e,t)}function wU(e,t,n,r){return CU(FU(e,t,n),r)}function TU(e){return tI(e)?HP(e.items)?EU(e.items.items):MN(e.items)||uN(e.items)?[e]:[gN()]:[e]}function EU(e){return e.reduce((e,t)=>[...e,...TU(t)],[])}function DU(e,t){return{callstack:e,visited:t}}function OU(e){return pM(e,(e,t)=>!uN(e)&&OU(t),()=>!0)}function kU(e,t,n){return gM(n).reduce((r,i)=>({...r,[i]:FU(e,t,n[i])}),{})}function AU(e,t,n){return EU(jU(e,t,n))}function jU(e,t,n){return n.map(n=>FU(e,t,n))}function MU(e,t){let n=bN(e)?QM(t,{}):t,r=JN(e)?YM(n,{}):n;return KN(e)?LU(r,{}):r}function NU(e,t,n,r,i){return lM(n,`AddImmutable`)?RU(e,t,r[0],i):lM(n,`RemoveImmutable`)?uB(e,t,r[0],i):lM(n,`AddReadonly`)?XM(e,t,r[0],i):lM(n,`RemoveReadonly`)?KP(e,t,r[0],i):lM(n,`AddOptional`)?$M(e,t,r[0],i):lM(n,`RemoveOptional`)?XP(e,t,r[0],i):lM(n,`Capitalize`)?OB(e,t,r[0],i):lM(n,`Conditional`)?FB(e,t,r[0],r[1],r[2],r[3],i):lM(n,`ConstructorParameters`)?zB(e,t,r[0],i):lM(n,`Evaluate`)?Oz(e,t,r[0],i):lM(n,`Exclude`)?HB(e,t,r[0],r[1],i):lM(n,`Extract`)?JB(e,t,r[0],r[1],i):lM(n,`Index`)?HV(e,t,r[0],r[1],i):lM(n,`InstanceType`)?KV(e,t,r[0],i):lM(n,`Interface`)?JR(e,t,r[0],r[1],i):lM(n,`KeyOf`)?rH(e,t,r[0],i):lM(n,`Lowercase`)?kB(e,t,r[0],i):lM(n,`Mapped`)?_H(e,t,r[0],r[1],r[2],r[3],i):lM(n,`Module`)?xH(e,t,r[0],i):lM(n,`NonNullable`)?TH(e,t,r[0],i):lM(n,`Pick`)?XH(e,t,r[0],r[1],i):lM(n,`Parameters`)?FH(e,t,r[0],i):lM(n,`Partial`)?GH(e,t,r[0],i):lM(n,`Omit`)?jH(e,t,r[0],r[1],i):lM(n,`ReadonlyObject`)?sU(e,t,r[0],i):lM(n,`Record`)?HF(e,t,r[0],r[1],i):lM(n,`Required`)?_U(e,t,r[0],i):lM(n,`ReturnType`)?xU(e,t,r[0],i):lM(n,`TemplateLiteral`)?hL(e,t,r[0],i):lM(n,`Uncapitalize`)?AB(e,t,r[0],i):lM(n,`Uppercase`)?jB(e,t,r[0],i):lM(n,`With`)?wU(e,t,r[0],r[1]):KM(n,r,i)}function PU(e,t,n){return MU(n,uN(n)?cU(e,t,n,n.$ref):tN(n)?eN(FU(e,t,n.items),nN(n)):sB(n)?aB(e,t,n.target,n.arguments):iN(n)?rN(jU(e,t,n.parameters),FU(e,t,n.instanceType),aN(n)):sN(n)?oN(jU(e,t,n.parameters),FU(e,t,n.returnType),cN(n)):PN(n)?NN(FU(e,t,n.if),FU(e,t,n.then),FU(e,t,n.else),FN(n)):VN(n)?BN(jU(e,t,n.allOf),HN(n)):TN(n)?wN(kU(e,t,n.properties),EN(n)):$F(n)?JF(XF(n),FU(e,t,QF(n))):tI(n)?eI(FU(e,t,n.items)):HP(n)?VP(AU(e,t,n.items),UP(n)):yP(n)?vP(jU(e,t,n.anyOf),bP(n)):n)}function FU(e,t,n){return qM(n)?NU(e,t,n.action,n.parameters,n.options):PU(e,t,n)}function IU(e){return UM(e,{"~immutable":!0},{})}function LU(e,t){return UM(IU(e),{},t)}function RU(e,t,n,r){return LU(FU(e,t,n),r)}function zU(e,t={}){return LU(e,t)}var BU=[`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],VU=[`off`,...BU],HU=[`text`,`image`],UU=[`none`,`short`,`long`],WU=[`short`,`long`];RN(BU);var GU=RN(VU);RN(HU),RN(UU),LH(qF(GU,vP([gP(),lP()]))),LH(qF(RN(WU),fP({exclusiveMinimum:0})),{description:`Best-effort prompt cache lifetime in seconds for each retention tier. A missing tier means the lifetime is unknown, so Pi does not warm it.`});var KU={input:fP({description:`Input cost in USD per million tokens.`}),output:fP({description:`Output cost in USD per million tokens.`}),cacheRead:fP({description:`Cache-read cost in USD per million tokens.`}),cacheWrite:fP({description:`Cache-write cost in USD per million tokens.`})};wN(KU);var qU=wN({inputTokensAbove:fP({description:`Use this tier when total request input exceeds this token count.`}),...KU});wN({...KU,tiers:yN(eN(qU,{description:`Request-wide pricing tiers. The highest matching input threshold applies to the full request.`}))});function JU(e){return wN({maxWidth:yN(eP({minimum:1})),maxHeight:yN(eP({minimum:1})),maxBytes:yN(eP({minimum:1,description:`Maximum base64-encoded payload size in bytes.`})),jpegQuality:yN(eP({minimum:1,maximum:100}))},e)}JU();var YU=wN({resize:yN(JU({description:`Cache-safe resize profile applied before a new image enters conversation history.`})),maxPerMessage:yN(eP({minimum:1,description:`Maximum images accepted in one provider message.`})),maxPerRequest:yN(eP({minimum:1,description:`Maximum images accepted across one provider request.`}))});wN({maxRequestBytes:yN(eP({minimum:1,description:`Maximum serialized provider request size in bytes.`})),images:yN(YU)});function XU({sessionId:e,template:t,existingIds:n,apiKey:r,onClose:i,onAdd:a}){let{t:o}=W(),[s,c]=(0,K.useState)([]),[l,u]=(0,K.useState)(new Set),[d,f]=(0,K.useState)(``),[p,m]=(0,K.useState)(!0),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(0),x=(0,K.useRef)({template:t,apiKey:r,existingIds:n}),S=new Set(n),C=Math.max(0,100-S.size),w=s.filter(e=>`${e.id} ${e.name}`.toLowerCase().includes(d.trim().toLowerCase())),T=w.filter(e=>!S.has(e.id)),E=T.length>0&&T.every(e=>l.has(e.id));return(0,K.useEffect)(()=>{let t=new AbortController,{template:n,apiKey:r,existingIds:i}=x.current;return m(!0),v(!1),new de().discoverProviderModels(e,{provider:n.provider,baseUrl:n.baseUrl,api:n.api,...r.trim()?{apiKey:r.trim()}:{}},t.signal).then(e=>{t.signal.aborted||(c(e.models),g(e.truncated),m(!1),u(new Set(e.models.filter(e=>!i.includes(e.id)).slice(0,Math.max(0,100-i.length)).map(e=>e.id))))},()=>{t.signal.aborted||(v(!0),m(!1))}),()=>t.abort()},[e,y]),(0,q.jsx)(Se,{isOpen:!0,width:380,padding:0,className:`models-picker-dialog`,"aria-label":o(`providerPickerTitle`),onOpenChange:e=>!e&&i(),children:(0,q.jsxs)(`div`,{className:`models-picker`,children:[(0,q.jsxs)(`header`,{children:[(0,q.jsx)(`h2`,{children:o(`providerPickerTitle`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon`,"aria-label":o(`close`),onClick:i,children:(0,q.jsx)(je,{})})]}),(0,q.jsx)(`p`,{children:o(`providerPickerIntro`)}),(0,q.jsxs)(`div`,{className:`models-picker-toolbar`,children:[(0,q.jsx)(`input`,{"data-autofocus":!0,type:`search`,"aria-label":o(`providerPickerSearch`),placeholder:o(`providerPickerSearch`),value:d,onKeyDown:e=>{e.key===`Enter`&&e.preventDefault()},onChange:e=>f(e.target.value)}),(0,q.jsx)(`button`,{type:`button`,className:`models-link`,disabled:p||!T.length,onClick:()=>u(e=>{let t=new Set(e);for(let e of T)E?t.delete(e.id):t.size(0,q.jsxs)(`label`,{className:`models-picker-row`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:S.has(e.id)||l.has(e.id),disabled:S.has(e.id)||!l.has(e.id)&&l.size>=C,onChange:t=>u(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}),(0,q.jsx)(`span`,{title:e.name,children:e.id}),S.has(e.id)&&(0,q.jsx)(`small`,{children:o(`providerPickerAdded`)})]},e.id)),!p&&!_&&!w.length&&(0,q.jsx)(`p`,{className:`models-picker-empty`,children:o(d?`providerPickerNoMatch`:`providerPickerEmpty`)}),_&&(0,q.jsxs)(`div`,{className:`models-error`,role:`alert`,children:[(0,q.jsx)(`p`,{children:o(`providerPickerError_load`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:()=>b(e=>e+1),children:o(`retryAdmissionCheck`)})]})]}),h&&(0,q.jsx)(`p`,{className:`models-hint`,children:o(`providerPickerBounded`)}),(0,q.jsxs)(`footer`,{children:[(0,q.jsx)(`span`,{className:`models-hint`,"aria-live":`polite`,children:l.size>0&&o(`providerPickerSelected`,{count:l.size})}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:i,children:o(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:!l.size||p||_,onClick:()=>a(s.filter(e=>l.has(e.id))),children:o(`providerPickerSave`)})]})]})})}function ZU(e){let t=e.trim();if(!t)return;let n=/^(\d+(?:\.\d+)?)([km])?$/i.exec(t);if(!n)return NaN;let r=n[2]?.toLowerCase()===`m`?1e6:n[2]?.toLowerCase()===`k`?1e3:1,i=Number(n[1])*r,a=Math.round(i),o=Math.abs(i-a)<1e-6?a:i;return Number.isSafeInteger(o)&&o>0&&o<=1e8?o:NaN}function QU(e){if(e===void 0)return``;if(Number.isInteger(e)&&e>0){if(e%1e6==0)return`${e/1e6}M`;if(e%1e3==0)return`${e/1e3}K`}return String(e)}function $U({sessionId:e,providerId:t,configuration:n,auth:r,isNew:i,custom:a,taken:o,currentModel:s,availableModels:c,busy:l,onDirty:u,onSaving:d,onClose:f,onReload:p}){let{t:m}=W(),[h]=(0,K.useState)(()=>{let e=n.providers?.find(e=>e.provider===t),i=n.models.filter(e=>e.provider===t).map(e=>({...e,rowKey:crypto.randomUUID()}));return{provider:t,name:e?.name||r?.name||t,baseUrl:e?.baseUrl||i[0]?.baseUrl||r?.baseUrl||``,api:e?.api||i[0]?.api||r?.api||`openai-completions`,models:i}}),[g]=(0,K.useState)(n.revision),[_,v]=(0,K.useState)(h),[y,b]=(0,K.useState)(``),x=!i&&!!r?.authMethods.includes(`oauth`),S=a||!!r?.authMethods.includes(`api_key`),[C,w]=(0,K.useState)(x&&(!r?.configured||r?.subscription||!S)?`oauth`:`api_key`),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),k=(0,K.useRef)(null),A=(0,K.useRef)(!1),[j,M]=(0,K.useState)(new Set),[N,P]=(0,K.useState)({}),[F,I]=(0,K.useState)(!1),[ee,L]=(0,K.useState)(null),[R,te]=(0,K.useState)(!1),z=(0,K.useRef)(null),B=(0,K.useRef)({onDirty:u,onSaving:d});B.current={onDirty:u,onSaving:d};let ne=JSON.stringify(_)!==JSON.stringify(h),re=ne||y.length>0;(0,K.useEffect)(()=>{B.current.onDirty(re)},[re]),(0,K.useEffect)(()=>{B.current.onSaving(F||T)},[F,T]),(0,K.useEffect)(()=>{D?A.current=!0:A.current&&(A.current=!1,k.current?.focus({preventScroll:!0}))},[D]),(0,K.useEffect)(()=>()=>{z.current?.abort(),B.current.onSaving(!1),B.current.onDirty(!1)},[]);let V=n.providers?.find(e=>e.provider===t)?.editable!==!1,ie=l||F||T,ae=ie||R||!V,oe=!/^[a-zA-Z0-9._-]+$/.test(_.provider)||[`__proto__`,`constructor`,`prototype`].includes(_.provider)||i&&a&&o.includes(_.provider),se=_.models.findIndex(e=>!e.id.trim()||[e.contextWindow,e.maxTokens].some(e=>e!==void 0&&!Number.isFinite(e))||_.models.some(t=>t.rowKey!==e.rowKey&&t.id.trim()===e.id.trim())),ce=se!==-1,le=i&&a||ne,H=!oe&&!/[\r\n\u0000]/u.test(y)&&(R||!le||(!a||_.models.length>0)&&!ce&&!!_.baseUrl)&&(le||y.trim().length>0),ue=e=>{v(t=>({...t,...e})),ee!==`conflict`&&L(null)},fe=(e,t)=>ue({models:_.models.map((n,r)=>r===e?{...n,...t}:n)}),pe=_.models.map(e=>n.thinkingDefaults?.[`${e.provider}/${e.id}`]),me=_.models.map((e,t)=>{let n=e.thinkingLevelMap??pe[t];return VU.filter(e=>n?.[e]!==null&&(e!==`xhigh`&&e!==`max`||n?.[e]!==void 0))}),he={id:``,name:``,reasoning:!1,provider:_.provider,baseUrl:_.baseUrl,api:_.api},_e=async()=>{if(ie||D||!H||ee===`conflict`)return;let t=new AbortController;z.current=t,I(!0),L(null);let n=R,r=new de;try{if(le&&!n){if(await r.changeProviderConfiguration(e,g,{action:`save`,configuration:{..._,name:_.name.trim()||_.provider,models:_.models.map(({rowKey:e,...t})=>({...t,id:t.id.trim(),name:t.name.trim()||t.id.trim(),provider:_.provider,baseUrl:_.baseUrl===h.baseUrl&&t.baseUrl||_.baseUrl,api:_.api===h.api?t.api:_.api}))}},t.signal),t.signal.aborted)return;n=!0,te(!0)}if(y.trim()&&await r.saveProviderKey(e,_.provider,y.trim(),t.signal),t.signal.aborted)return;b(``),B.current.onDirty(!1),f(_.name||_.provider,_.provider)}catch(e){t.signal.aborted||L(e instanceof ge&&e.code===`MODEL_CONFIGURATION_CONFLICT`?`conflict`:e instanceof ge&&e.code===`MODEL_NOT_AVAILABLE`?`current`:n?`key`:`failed`)}finally{t.signal.aborted||I(!1)}},ve=e=>(0,q.jsxs)(`label`,{className:`models-field`,children:[m(e===`name`?`providerDisplayName`:`modelConfig_${e}`),(0,q.jsx)(`input`,{type:e===`baseUrl`?`url`:`text`,value:_[e],maxLength:e===`baseUrl`?2048:160,autoComplete:`off`,disabled:ae,required:e===`provider`||e===`baseUrl`&&le,"aria-invalid":e===`provider`&&_.provider.length>0&&oe,placeholder:e===`provider`?`my-provider`:e===`name`?_.provider:`https://api.example.com/v1`,onChange:t=>ue({[e]:t.target.value})})]}),ye=(0,q.jsxs)(`label`,{className:`models-field`,htmlFor:`provider-api-${t||`custom`}`,children:[m(`modelConfig_api`),(0,q.jsx)(bj,{id:`provider-api-${t||`custom`}`,label:m(`modelConfig_api`),value:_.api,disabled:ae,onChange:e=>{(e===`openai-responses`||e===`openai-completions`||e===`anthropic-messages`)&&ue({api:e})},options:[{value:`openai-completions`,label:`OpenAI Chat Completions`},{value:`openai-responses`,label:`OpenAI Responses`},{value:`anthropic-messages`,label:`Anthropic Messages`}]})]}),be=(0,q.jsxs)(`div`,{className:`models-catalog`,children:[(0,q.jsxs)(`div`,{className:`models-list-head`,children:[(0,q.jsx)(`span`,{children:m(`modelSettings`)}),(0,q.jsx)(`button`,{type:`button`,ref:k,className:`models-link`,disabled:ae||oe||!_.baseUrl,onClick:()=>O(!0),children:m(`providerFetchModels`)})]}),!V&&(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerModelsReadOnly`)}),_.models.length===0&&(0,q.jsx)(`p`,{className:`models-empty`,children:m(a?`providerModelsEmpty`:`providerModelsInherited`,{count:c.length})}),(0,q.jsxs)(`div`,{className:`models-entry-list`,children:[s&&(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerCurrentSessionModel`,{model:`${s.provider} / ${s.id}`})}),_.models.map((e,t)=>(0,q.jsxs)(`div`,{className:`models-entry`,children:[s?.provider===_.provider&&s.id===e.id&&(0,q.jsx)(`p`,{className:`models-current-label`,children:m(`currentModel`)}),(0,q.jsxs)(`div`,{className:`models-entry-row`,children:[(0,q.jsx)(`input`,{"aria-label":m(`providerModelId`,{number:t+1}),placeholder:m(`modelConfig_id`),value:e.id,maxLength:256,required:!0,disabled:ae||s?.provider===_.provider&&s.id===e.id,onChange:e=>fe(t,{id:e.target.value})}),(0,q.jsx)(`input`,{"aria-label":m(`providerModelName`,{number:t+1}),placeholder:m(`modelConfig_name`),value:e.name,maxLength:256,disabled:ae,onChange:e=>fe(t,{name:e.target.value})}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon`,"aria-label":m(`providerModelDetails`,{model:e.name||e.id||t+1}),"aria-expanded":j.has(e.rowKey),title:m(`providerModelOptions`),onClick:()=>M(t=>{let n=new Set(t);return n.delete(e.rowKey)||n.add(e.rowKey),n}),children:(0,q.jsx)(os,{})}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon danger`,"aria-label":m(`providerRemoveModel`,{model:e.name||e.id||t+1}),disabled:ae||s?.provider===_.provider&&s.id===e.id,title:s?.provider===_.provider&&s.id===e.id?m(`providerCurrentRemoval`):m(`providerRemoveModel`,{model:e.name||e.id||t+1}),onClick:()=>{ue({models:_.models.filter((e,n)=>n!==t)}),M(t=>new Set([...t].filter(t=>t!==e.rowKey))),P(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.rowKey)))},children:(0,q.jsx)(Uc,{})})]}),j.has(e.rowKey)&&(0,q.jsxs)(`div`,{className:`models-entry-details`,children:[[`contextWindow`,`maxTokens`].map(n=>(0,q.jsxs)(`label`,{className:`models-field models-capacity`,children:[m(`modelConfig_${n}`),(0,q.jsx)(`input`,{type:`text`,inputMode:`numeric`,autoComplete:`off`,spellCheck:!1,"aria-label":m(`providerCapacityLabel`,{field:m(`modelConfig_${n}`),number:t+1}),"aria-invalid":e[n]!==void 0&&!Number.isFinite(e[n]),placeholder:n===`contextWindow`?`256K`:`32K`,value:N[e.rowKey]?.[n]??QU(e[n]),disabled:ae,onChange:r=>{let i=r.target.value;P(t=>({...t,[e.rowKey]:{...t[e.rowKey],[n]:i}})),fe(t,{[n]:ZU(i)})}})]},n)),(0,q.jsxs)(`fieldset`,{className:`models-input-types`,"aria-label":m(`providerCapacityLabel`,{field:m(`providerInputTypes`),number:t+1}),children:[(0,q.jsx)(`legend`,{children:m(`providerInputTypes`)}),(0,q.jsx)(`div`,{children:[`text`,`image`].map(n=>{let r=e.input??[`text`];return(0,q.jsxs)(`label`,{className:`models-checkbox`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:r.includes(n),disabled:ae||r.length===1&&r.includes(n),onChange:e=>fe(t,{input:[`text`,`image`].filter(t=>t===n?e.target.checked:r.includes(t))})}),m(n===`text`?`providerInputText`:`providerInputImage`)]},n)})})]}),(0,q.jsx)(`p`,{className:`models-hint models-capability-hint`,children:m(`providerImageHint`)}),(0,q.jsxs)(`label`,{className:`models-checkbox models-reasoning`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:e.reasoning,disabled:ae,onChange:e=>fe(t,{reasoning:e.target.checked})}),m(`modelConfig_reasoning`)]}),(0,q.jsx)(`p`,{className:`models-hint models-capability-hint`,children:m(`providerReasoningHint`)}),e.reasoning&&(0,q.jsxs)(`div`,{className:`models-thinking-levels`,children:[(0,q.jsxs)(`div`,{className:`models-thinking-copy`,children:[(0,q.jsx)(`strong`,{children:m(`providerThinkingLevels`)}),(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerThinkingLevelsHint`)})]}),(0,q.jsx)(yo,{button:{label:e.thinkingLevelMap==null?m(`providerThinkingAutomatic`):m(`providerThinkingSelected`,{count:me[t].length}),"aria-label":m(`providerCapacityLabel`,{field:m(`providerThinkingLevels`),number:t+1}),variant:`secondary`,size:`sm`,className:`models-thinking-trigger`,isDisabled:ae},className:`configuration-level-menu`,menuWidth:`min(240px, calc(100vw - 32px))`,alignment:`end`,children:VU.map(n=>{let r=me[t],i=r.includes(n);return(0,q.jsx)(Ro,{label:n,value:i,isDisabled:ae||i&&r.length===1,endContent:(0,q.jsx)(`span`,{className:`configuration-check`,children:i&&(0,q.jsx)(rs,{"aria-hidden":`true`})}),onChange:i=>{fe(t,{thinkingLevelMap:Object.fromEntries(VU.map(a=>{let o=a===n?i:r.includes(a),s=h.models.find(t=>t.rowKey===e.rowKey)?.thinkingLevelMap?.[a];return[a,o?e.thinkingLevelMap?.[a]??s??pe[t]?.[a]??(a===`off`?`none`:a):null]}))})}},n)})}),e.thinkingLevelMap!=null&&(0,q.jsx)(`button`,{type:`button`,className:`models-link models-thinking-reset`,disabled:ae,onClick:()=>fe(t,{thinkingLevelMap:null}),children:m(`providerThinkingReset`)})]})]})]},e.rowKey))]}),(0,q.jsxs)(`button`,{type:`button`,className:`models-button models-add-model`,disabled:ae||_.models.length>=100,onClick:()=>{ue({models:[..._.models,{...he,rowKey:crypto.randomUUID()}]})},children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),m(`addModel`)]}),ce&&(0,q.jsx)(`p`,{className:`models-error`,role:`alert`,children:m(`providerModelInvalid`,{number:se+1})})]});return(0,q.jsxs)(`form`,{className:`models-editor`,onSubmit:e=>{e.preventDefault(),_e()},children:[!i&&a&&(0,q.jsxs)(`div`,{className:`models-editor-heading`,children:[(0,q.jsx)(`span`,{children:_.name||_.provider}),_.name!==_.provider&&(0,q.jsx)(`small`,{children:_.provider})]}),i&&a&&(0,q.jsxs)(q.Fragment,{children:[ve(`provider`),_.provider&&oe&&(0,q.jsx)(`p`,{className:`models-error`,children:m(`providerIdInvalid`)}),ve(`name`),ve(`baseUrl`),ye]}),x&&S&&(0,q.jsxs)(`fieldset`,{className:`models-add-modes`,"aria-label":m(`accountLoginMethod`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":C===`oauth`,disabled:ie,onClick:()=>w(`oauth`),children:m(`accountLoginTab`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":C===`api_key`,disabled:ie,onClick:()=>w(`api_key`),children:m(`accountLoginKeyTab`)})]}),x&&C===`oauth`&&r&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)($j,{sessionId:e,auth:r,busy:l||F||re,onSaving:E,onAuthenticated:()=>f(_.name||_.provider,_.provider),onReload:p}),re&&(0,q.jsx)(`p`,{className:`models-hint`,children:m(`accountLoginUnsaved`)})]}),S&&C===`api_key`?(0,q.jsxs)(`label`,{className:`models-field`,children:[m(`providerApiKey`),(0,q.jsx)(`input`,{type:`password`,autoComplete:`new-password`,spellCheck:!1,maxLength:8192,value:y,placeholder:m(r?.configured?`providerKeyKeep`:`providerKeyOptional`),disabled:ie,onChange:e=>{b(e.target.value),ee!==`conflict`&&L(null)}})]}):x?null:(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerNativeAuth`)}),i&&a?be:(0,q.jsxs)(`details`,{className:`models-customized`,children:[(0,q.jsx)(`summary`,{children:m(`providerCustomSettings`)}),(0,q.jsxs)(`div`,{children:[a&&ve(`name`),ve(`baseUrl`),a&&ye,be]})]}),ee&&(0,q.jsx)(`p`,{className:`models-error`,role:`alert`,children:m(ee===`conflict`?`modelConfigurationConflict`:ee===`key`?`providerProfileSavedKeyFailed`:ee===`current`?`providerCurrentRemoval`:`providerConfigurationFailed`)}),ee===`conflict`&&(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:p,children:m(`providerReload`)}),!T&&(0,q.jsxs)(`div`,{className:`models-editor-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:F,onClick:()=>R?p():f(),children:m(`cancel`)}),(C===`api_key`||ne)&&(0,q.jsx)(`button`,{type:`submit`,className:`models-button primary`,disabled:ie||!H||ee===`conflict`,"aria-busy":F,children:m(F?`savingSettings`:`providerSave`)})]}),D&&(0,q.jsx)(XU,{sessionId:e,template:he,existingIds:_.models.map(e=>e.id),apiKey:y,onClose:()=>O(!1),onAdd:e=>{ue({models:[..._.models,...e.map(e=>({...he,...e,rowKey:crypto.randomUUID()}))]}),O(!1)}})]})}function eW({sessionId:e,sessionPath:t,provider:n,purpose:r,initialModel:i,busy:a,onSelectModel:o,onDefaultSaved:s,onSaving:c,onClose:l}){let{t:u}=W(),[d,f]=(0,K.useState)(``),[p,m]=(0,K.useState)([]),[h,g]=(0,K.useState)(i?`${i.provider}/${i.id}`:``),[_,v]=(0,K.useState)(!0),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(0),[C,w]=(0,K.useState)(0),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),[k,A]=(0,K.useState)(null);(0,K.useEffect)(()=>{let t=new AbortController;v(!0),b(!1);let r=window.setTimeout(()=>{new de().searchModels(d.trim(),e,t.signal,n).then(e=>{t.signal.aborted||(m(e.models),S(e.truncation.matchesOmitted),v(!1))},()=>{t.signal.aborted||(b(!0),v(!1))})},d?200:0);return()=>{t.abort(),window.clearTimeout(r)}},[e,n,d,C]);let j=p.find(e=>`${e.provider}/${e.id}`===h)??p[0],M=new Map;for(let e of p){let t=M.get(e.provider);t?t.push(e):M.set(e.provider,[e])}let N=async()=>{if(!j||_||D||a||!t)return;O(!0),c(!0),A(null);let n=!1;try{if(r===`use`){if(!await o(`${j.provider}/${j.id}`))throw Error(`selection failed`);n=!0}(r==="default"||T)&&s(await new de().saveModelDefault(j.provider,j.id,e,t)),l()}catch{A(n?`modelDefaultPartial`:r==="default"?`modelDefaultSaveFailed`:`modelConnectionUseFailed`)}finally{O(!1),c(!1)}};return(0,q.jsxs)(`div`,{className:`models-connection-choice`,children:[(0,q.jsx)(`p`,{className:`models-hint`,children:u(r==="default"?`modelDefaultHint`:`modelConnectionNextHint`)}),(p.length>8||x>0||d)&&(0,q.jsx)(`input`,{type:`search`,"aria-label":u(`modelConnectionSearch`),placeholder:u(`modelConnectionSearch`),maxLength:200,value:d,disabled:D,onChange:e=>f(e.target.value)}),y?(0,q.jsxs)(`p`,{className:`models-error`,role:`alert`,children:[u(`modelConnectionLoadFailed`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:()=>w(e=>e+1),children:u(`retryAdmissionCheck`)})]}):_?(0,q.jsx)(`p`,{className:`models-hint`,role:`status`,children:u(`loadingModels`)}):p.length?(0,q.jsx)(Zj,{label:u(`selectModel`),className:`models-provider-picker`,placement:`below`,value:j?`${j.provider}/${j.id}`:``,isDisabled:D,options:[...M].map(([e,t])=>({type:`section`,title:e,options:t.map(e=>({value:`${e.provider}/${e.id}`,label:e.name||e.id,description:`${e.provider} · ${e.id}`,icon:(0,q.jsx)(Wk,{id:e.provider})}))})),onChange:e=>g(e)}):(0,q.jsx)(`p`,{className:`models-hint`,children:u(d?`modelConnectionNoMatch`:`modelConnectionNoModels`)}),x>0&&!_&&(0,q.jsx)(`p`,{className:`models-hint`,children:u(`modelConnectionMore`,{count:x})}),r===`use`&&(0,q.jsxs)(`label`,{className:`models-checkbox`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:T,disabled:D,onChange:e=>E(e.target.checked)}),u(`modelMakeDefault`)]}),k&&(0,q.jsx)(`p`,{className:`models-error`,role:`alert`,children:u(k)}),(0,q.jsxs)(`div`,{className:`models-editor-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:D,onClick:l,children:u(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button primary`,disabled:D||a||_||y||!j||!t,onClick:()=>void N(),children:u(D?`providerSaving`:r==="default"?`modelDefaultSave`:`modelConnectionUse`)})]})]})}function tW({sessionId:e,sessionPath:t,models:n,currentModel:r,busy:i,focusCredentials:a,onSaved:o,onSelectModel:s,onDraftChange:c,onSavingChange:l}){let{t:u}=W(),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(0),[h,g]=(0,K.useState)(!0),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(null),[x,S]=(0,K.useState)([]),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(`account`),[D,O]=(0,K.useState)(``),[k,A]=(0,K.useState)(``),[j,M]=(0,K.useState)({}),[N,P]=(0,K.useState)(!1),[F,I]=(0,K.useState)({}),[ee,L]=(0,K.useState)(!1),R=N||ee||Object.values(F).some(Boolean),[te,z]=(0,K.useState)(null),[B,ne]=(0,K.useState)(!1),[re,V]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(null),[oe,se]=(0,K.useState)(null),[ce,le]=(0,K.useState)(null),H=(0,K.useRef)(null),ue=(0,K.useRef)(a),fe=(0,K.useRef)(null),pe=(0,K.useRef)(new Map),me=(0,K.useRef)(null),he=(0,K.useRef)(null),_e=(0,K.useRef)({onDraftChange:c,onSavingChange:l});_e.current={onDraftChange:c,onSavingChange:l},(0,K.useEffect)(()=>{c(Object.values(j).some(Boolean))},[j,c]),(0,K.useEffect)(()=>{l(R)},[R,l]),(0,K.useEffect)(()=>{!re&&!R&&he.current&&(he.current.focus({preventScroll:!0}),he.current=null)},[re,R]),(0,K.useEffect)(()=>{if(!fe.current)return;let e=fe.current;fe.current=null,(pe.current.get(e)??me.current)?.focus({preventScroll:!0})}),(0,K.useEffect)(()=>()=>{H.current?.abort(),_e.current.onDraftChange(!1),_e.current.onSavingChange(!1)},[]),(0,K.useEffect)(()=>{let t=new AbortController;g(!0),v(!1);let n=new de;return Promise.all([n.modelConfigurations(e,t.signal),n.providerAuth(e,t.signal)]).then(([e,n])=>{if(!t.signal.aborted&&(f({configuration:e,auth:n}),g(!1),ue.current)){ue.current=!1;let e=r?.provider||n.providers.find(e=>e.configured)?.id;e&&(b(e),S([e]))}},()=>{t.signal.aborted||(v(!0),g(!1))}),()=>t.abort()},[e,p,r?.provider]),(0,K.useEffect)(()=>{let t=new AbortController;return ne(!1),new de().modelDefaults(e,t.signal).then(e=>{t.signal.aborted||z(e)},()=>{t.signal.aborted||ne(!0)}),()=>t.abort()},[e,p]);let ve=d?.configuration,ye=new Set([...ve?.providers?.map(e=>e.provider)??[],...ve?.models.map(e=>e.provider)??[]]),be=new Set([...ye,...d?.auth.providers.filter(e=>e.configured).map(e=>e.id)??[],...n.map(e=>e.provider),...x.filter(e=>!e.startsWith(`add:`))]),xe=[...be].map(e=>{let t=d?.auth.providers.find(t=>t.id===e);return{id:e,name:ve?.providers?.find(t=>t.provider===e)?.name||t?.name||e,auth:t}}),Se=d?.auth.providers.filter(e=>e.authMethods.includes(`api_key`)&&!be.has(e.id))??[],Ce=d?.auth.providers.filter(e=>e.authMethods.includes(`oauth`)&&!e.subscription)??[],we=Ce.find(e=>e.id===D)??Ce[0],Te=Se.find(e=>e.id===k)??Se[0],Ee=[{id:`account`,label:`accountLoginTab`,hint:`providerAccountHint`,available:Ce.length>0},{id:`catalog`,label:`providerAddCatalog`,hint:`providerCatalogHint`,available:Se.length>0},{id:`custom`,label:`providerAddCustom`,hint:`providerCustomHint`,available:!0}],U=e=>{E(e);let t=e===`custom`?`add:custom`:e===`account`?we&&`add:account:${we.id}`:Te&&`add:${Te.id}`;t&&S(e=>e.includes(t)?e:[...e,t])},De=e=>{he.current=null,V(null),ae(null),w(!1),b(y===e?null:e),S(t=>t.includes(e)?t:[...t,e])},Oe=(e,t,n)=>{he.current=null,fe.current=e;let r=t=>e.startsWith(`add:`)?t.startsWith(`add:`):t===e;S(e=>e.filter(e=>!r(e))),M(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!r(e)))),e.startsWith(`add:`)?w(!1):b(null),t&&(ae(t),V({purpose:`use`,provider:n??e}),m(e=>e+1),o().catch(()=>!1))},ke=(t,a,s,c)=>{if(!ve)return null;let l=d?.auth.providers.find(e=>e.id===a),f=e=>I(n=>n[t]===e?n:{...n,[t]:e}),p=()=>{Oe(t),m(e=>e+1),o().catch(()=>!1)};return t.startsWith(`add:account:`)?l&&(0,q.jsxs)(`div`,{className:`models-editor`,children:[(0,q.jsx)($j,{sessionId:e,auth:l,busy:i,onSaving:f,onAuthenticated:()=>Oe(t,l.name||l.id,l.id),onReload:p}),!F[t]&&(0,q.jsx)(`div`,{className:`models-editor-actions`,children:(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:()=>Oe(t),children:u(`cancel`)})})]}):(0,q.jsx)($U,{sessionId:e,providerId:a,configuration:ve,auth:l,isNew:s,custom:c,taken:[...d?.auth.providers.map(e=>e.id)??[],...ye],currentModel:r,availableModels:n.filter(e=>e.provider===a),busy:i,onDirty:e=>M(n=>n[t]===e?n:{...n,[t]:e}),onSaving:f,onClose:(e,n)=>Oe(t,e,n),onReload:p},t)},G=e=>xe.find(t=>t.id===e)?.name??e,je=e=>n.find(t=>t.provider===e.provider&&t.id===e.id)?.name||e.id,Me=(e,t,n)=>{he.current=t,V({purpose:e,provider:n}),b(null),w(!1)},Ne=(n,a)=>(0,q.jsx)(eW,{sessionId:e,sessionPath:t,provider:a,purpose:n,initialModel:n==="default"?te?.model:r,busy:i,onSelectModel:s,onDefaultSaved:e=>{z(e),ne(!1),o().catch(()=>!1)},onSaving:L,onClose:()=>{V(null)}},`${n}:${a??`all`}`);return(0,q.jsxs)(`div`,{className:`settings-content-page models-page`,children:[(0,q.jsxs)(`div`,{className:`models-section`,children:[(0,q.jsx)(`header`,{className:`settings-page-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:u(`modelSettings`)}),(0,q.jsx)(`p`,{children:u(`modelsIntro`)})]})}),ie&&(0,q.jsxs)(`p`,{className:`models-saved`,role:`status`,children:[u(`providerSaved`,{provider:ie}),r&&(0,q.jsxs)(`span`,{children:[` `,u(`providerCurrentSessionModel`,{model:`${r.provider} / ${r.id}`})]})]}),_&&(0,q.jsxs)(`div`,{className:`models-error`,role:`alert`,children:[u(`providerLoadFailed`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:h,onClick:()=>m(e=>e+1),children:u(`retryAdmissionCheck`)})]}),ce&&!oe&&(0,q.jsxs)(`div`,{className:`models-error`,role:`alert`,children:[ce,` `,(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:h,onClick:()=>{le(null),m(e=>e+1)},children:u(`refreshStatus`)})]}),!d&&h&&(0,q.jsx)(`p`,{className:`models-hint`,role:`status`,children:u(`providerLoading`)}),(0,q.jsxs)(`div`,{className:`models-default-card`,children:[(0,q.jsxs)(`div`,{className:`models-default-row`,children:[(0,q.jsxs)(`div`,{className:`models-default-copy`,children:[(0,q.jsx)(`span`,{className:`models-default-title`,children:u(`modelDefaultTitle`)}),B?(0,q.jsx)(`span`,{className:`models-hint`,children:u(`modelDefaultReadFailed`)}):te?.model?(0,q.jsxs)(`span`,{className:`models-default-value`,children:[(0,q.jsx)(`span`,{className:`models-default-avatar`,"aria-hidden":`true`,children:(0,q.jsx)(Wk,{id:te.model.provider,modelId:te.model.id})}),(0,q.jsxs)(`span`,{children:[je(te.model),(0,q.jsx)(`small`,{children:G(te.model.provider)})]})]}):(0,q.jsx)(`span`,{className:`models-hint`,children:u(te?`modelDefaultNotSet`:`loadingModels`)})]}),(0,q.jsxs)(`button`,{type:`button`,className:`models-button primary models-default-choose`,disabled:R||i||Object.values(j).some(Boolean)||!t,"aria-expanded":re?.purpose==="default",onClick:e=>B?m(e=>e+1):re?.purpose==="default"?V(null):Me(`default`,e.currentTarget),children:[(0,q.jsx)(`span`,{children:u(B?`refreshStatus`:`modelDefaultChoose`)}),!B&&(0,q.jsx)(os,{"aria-hidden":`true`})]})]}),te?.projectOverride&&(0,q.jsx)(`p`,{className:`models-hint`,children:u(`modelDefaultProjectOverride`,{model:`${G(te.projectOverride.provider)} / ${je(te.projectOverride)}`})}),re?.purpose==="default"&&Ne(`default`)]}),(0,q.jsxs)(`div`,{className:`models-connections-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:u(`modelConnectionsTitle`)}),(0,q.jsx)(`p`,{children:u(`modelConnectionsIntro`)})]}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:xe.length})]}),(0,q.jsx)(`ul`,{className:`models-provider-list`,children:xe.map(e=>{let n=!C&&y===e.id,a=e.auth?.custom??ye.has(e.id);return(0,q.jsxs)(`li`,{className:`models-provider-card`,children:[(0,q.jsxs)(`div`,{className:`models-provider-head`,children:[(0,q.jsxs)(`div`,{className:`models-provider-identity`,children:[(0,q.jsx)(`span`,{className:`models-provider-avatar`,"aria-hidden":`true`,children:(0,q.jsx)(Wk,{id:e.id})}),(0,q.jsxs)(`div`,{className:`models-provider-label`,children:[(0,q.jsx)(`span`,{className:`models-provider-name`,children:e.name}),a&&(0,q.jsx)(`span`,{className:`models-provider-tag`,children:u(`providerCustomTag`)}),te?.model?.provider===e.id&&(0,q.jsx)(`span`,{className:`models-provider-tag is-default`,children:u(`modelDefaultBadge`)}),r?.provider===e.id&&(0,q.jsx)(`span`,{className:`models-provider-tag is-current`,children:u(`modelCurrentBadge`)}),e.auth&&(0,q.jsxs)(`span`,{className:`models-provider-status`,children:[(0,q.jsx)(`span`,{className:`models-credential-dot ${e.auth.configured?`configured`:`missing`}`,role:`img`,"aria-label":u(e.auth.configured?`credentialConfigured`:`credentialMissing`),title:u(e.auth.configured?`credentialConfigured`:`credentialMissing`)}),u(e.auth.subscription?`accountLoginConfigured`:e.auth.configured?`credentialConfigured`:`credentialMissing`)]})]})]}),(0,q.jsxs)(`div`,{className:`models-provider-actions`,children:[e.auth?.configured&&(0,q.jsx)(`button`,{type:`button`,className:`models-button models-select-connection`,disabled:R||i||Object.values(j).some(Boolean)||!t,"aria-label":u(`modelConnectionChooseProvider`,{provider:e.name}),"aria-expanded":re?.purpose===`use`&&re.provider===e.id,onClick:t=>re?.purpose===`use`&&re.provider===e.id?V(null):Me(`use`,t.currentTarget,e.id),children:u(`selectModel`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,"aria-label":u(`editProvider`,{provider:e.name}),ref:t=>{t?pe.current.set(e.id,t):pe.current.delete(e.id)},"aria-expanded":n,disabled:R,onClick:()=>De(e.id),children:u(e.auth?.authMethods.includes(`oauth`)&&!e.auth.configured?`accountLoginStart`:`providerEdit`)}),ye.has(e.id)&&(0,q.jsx)(`button`,{type:`button`,className:`models-button danger`,"aria-label":u(`removeProvider`,{provider:e.name}),disabled:R||i||r?.provider===e.id,title:r?.provider===e.id?u(`providerCurrentRemoval`):void 0,onClick:()=>{se(e.id),le(null)},children:u(`providerRemove`)})]})]}),re?.purpose===`use`&&re.provider===e.id&&Ne(`use`,e.id),x.includes(e.id)&&(0,q.jsx)(`div`,{hidden:!n,children:ke(e.id,e.id,!1,a)})]},e.id)})}),ve&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{hidden:!C,className:`models-add-card`,children:[(0,q.jsx)(`fieldset`,{className:`models-add-modes`,"aria-label":u(`providerAddMode`),onKeyDown:e=>{if(R||![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=Ee.filter(e=>e.available),n=t.findIndex(e=>e.id===T),r=t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowRight`?1:-1)+t.length)%t.length].id;U(r),e.currentTarget.querySelectorAll(`button`)[Ee.findIndex(e=>e.id===r)]?.focus()},children:Ee.map(e=>(0,q.jsx)(`button`,{type:`button`,"aria-pressed":T===e.id,disabled:R||!e.available,onClick:()=>U(e.id),children:u(e.label)},e.id))}),(0,q.jsx)(`p`,{className:`models-hint`,children:u(Ee.find(e=>e.id===T)?.hint??`providerCustomHint`)}),(0,q.jsxs)(`div`,{hidden:T!==`account`,children:[we&&(0,q.jsx)(`div`,{className:`models-provider-select`,children:(0,q.jsx)(Zj,{label:u(`provider`),className:`models-provider-picker`,options:Ce.map(e=>({value:e.id,label:e.name||e.id,icon:(0,q.jsx)(Wk,{id:e.id})})),value:we.id,isDisabled:R,placement:`below`,onChange:e=>{O(e);let t=`add:account:${e}`;S(e=>e.includes(t)?e:[...e,t])}})}),x.filter(e=>e.startsWith(`add:account:`)).map(e=>(0,q.jsx)(`div`,{hidden:e!==`add:account:${we?.id}`,children:ke(e,e.slice(12),!0,!1)},e))]}),(0,q.jsxs)(`div`,{hidden:T!==`catalog`,children:[Te&&(0,q.jsx)(`div`,{className:`models-provider-select`,children:(0,q.jsx)(Zj,{label:u(`provider`),className:`models-provider-picker`,options:Se.map(e=>({value:e.id,label:e.name||e.id,icon:(0,q.jsx)(Wk,{id:e.id})})),value:Te.id,isDisabled:R,placement:`below`,onChange:e=>{A(e);let t=`add:${e}`;S(e=>e.includes(t)?e:[...e,t])}})}),x.filter(e=>e.startsWith(`add:`)&&e!==`add:custom`&&!e.startsWith(`add:account:`)).map(e=>(0,q.jsx)(`div`,{hidden:e!==`add:${Te?.id}`,children:ke(e,e.slice(4),!0,!1)},e))]}),x.includes(`add:custom`)&&(0,q.jsx)(`div`,{hidden:T!==`custom`,children:ke(`add:custom`,``,!0,!0)})]}),!C&&(0,q.jsxs)(`button`,{type:`button`,className:`models-add-button`,ref:me,disabled:R,onClick:()=>{he.current=null,V(null),w(!0),b(null),ae(null),U(Ee.find(e=>e.id===T)?.available?T:Ee.find(e=>e.available).id)},children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),u(`providerAdd`)]})]}),i&&(0,q.jsx)(`p`,{className:`models-hint`,role:`status`,children:u(`modelSelectionBusy`)})]}),oe&&(0,q.jsx)(aj,{isOpen:!0,title:u(`removeProvider`,{provider:xe.find(e=>e.id===oe)?.name||oe}),description:ce||u(`providerRemoveDetail`),isActionLoading:R,cancelLabel:u(`cancel`),actionLabel:u(R?`savingSettings`:`providerRemove`),onOpenChange:e=>{!e&&!R&&se(null)},onAction:()=>{if(R||i||!ve)return;let t=new AbortController;H.current=t,P(!0),le(null),new de().changeProviderConfiguration(e,ve.revision,{action:`remove`,provider:oe},t.signal).then(()=>{t.signal.aborted||(Oe(oe),se(null),m(e=>e+1),o().catch(()=>!1))},e=>{t.signal.aborted||le(u(e instanceof ge&&e.code===`MODEL_CONFIGURATION_CONFLICT`?`modelConfigurationConflict`:`providerConfigurationFailed`))}).finally(()=>{t.signal.aborted||P(!1)})}})]})}function nW(){let e={version:`1.1.0`,id:`ca6c5cf98bde186a0e1dcc7f6e173729cd0d6361cce5ef6c9c56b2c4cec4261a`,mode:`production`},{t}=W(),[n,r]=(0,K.useState)(null),[i,a]=(0,K.useState)(`loading`),[o,s]=(0,K.useState)(0);(0,K.useEffect)(()=>{let e=new AbortController,t=new de;return a(`loading`),r(null),t.request(`/api/diagnostics`,{signal:e.signal}).then(t=>{e.signal.aborted||(r(t.openpi??null),a(`ready`))},()=>{e.signal.aborted||a(`error`)}),()=>e.abort()},[o]);let c=t(`notReported`),l=e?.id&&n?.frontendAtStartup?.id&&e.id!==n.frontendAtStartup.id;return(0,q.jsxs)(`section`,{className:`settings-section-block`,"aria-label":t(`runtimeIdentity`),children:[(0,q.jsx)(`h2`,{children:t(`runtimeIdentity`)}),(0,q.jsx)(`p`,{children:t(`runtimeIdentityHint`)}),i===`loading`&&(0,q.jsx)(`p`,{role:`status`,children:t(`settingsCatalogLoading`)}),i===`error`&&(0,q.jsx)(`p`,{role:`alert`,children:t(`runtimeIdentityFailed`)}),(0,q.jsxs)(`dl`,{className:`settings-summary-list runtime-identity-list`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeBackendVersion`)}),(0,q.jsx)(`dd`,{children:n?.version??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimePackageRoot`)}),(0,q.jsx)(`dd`,{children:n?.packageRoot??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeStartedAt`)}),(0,q.jsx)(`dd`,{children:n?new Date(n.startedAt).toLocaleString():c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeGitRevision`)}),(0,q.jsx)(`dd`,{children:n?.git?.revision??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeGitState`)}),(0,q.jsx)(`dd`,{children:n?.git?.dirty==null?c:t(n.git.dirty?`runtimeGitDirty`:`runtimeGitClean`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeFrontendVersion`)}),(0,q.jsx)(`dd`,{children:e?.version??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeFrontendBuild`)}),(0,q.jsx)(`dd`,{children:e?.mode===`development`?t(`runtimeDevelopmentBuild`):e?.id??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeStartupBuild`)}),(0,q.jsx)(`dd`,{children:n?.frontendAtStartup?.id??c})]})]}),l&&(0,q.jsx)(`p`,{role:`status`,children:t(`runtimeBuildMismatch`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>s(e=>e+1),disabled:i===`loading`,children:t(`refreshStatus`)})]})}var rW=20,iW={track:{kVAEAm:`x10l6tqk`,kWkggS:`xdsb6cv`,kaIpWk:`xjspbzw`,$$css:!0},trackHorizontal:{kLqNvP:`x1o0tod`,kt4wiu:`xtijo5x`,kZKoxP:`xqu0tyb`,k87sOh:`xwa60dl`,k3aq6I:`x1cb1t30`,$$css:!0},trackVertical:{k87sOh:`x13vifvy`,krVfgx:`x1ey2m1c`,kzqmXN:`x51ohtg`,$$css:!0},filledTrack:{kVAEAm:`x10l6tqk`,kWkggS:`x1ewilqj`,kaIpWk:`xjspbzw`,$$css:!0},filledTrackHorizontal:{kZKoxP:`xqu0tyb`,k87sOh:`xwa60dl`,k3aq6I:`x1cb1t30`,$$css:!0},filledTrackVertical:{kzqmXN:`x51ohtg`,$$css:!0},thumb:{kVAEAm:`x10l6tqk`,kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,kaIpWk:`xjspbzw`,kWkggS:`x1ewilqj`,k3aq6I:`x11lhmoz`,k1ekBW:`x106061f`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kI3sdo:`x1a2a7pz`,kkrTdU:`x1jm3nie x16khyan`,kY2c9j:`x1vjfegm`,$$css:!0},thumbHorizontal:{k87sOh:`xwa60dl`,k3aq6I:`x11lhmoz xoffwj3`,$$css:!0},thumbHover:{kWkggS:`x1ewilqj xvxo0qp`,$$css:!0},thumbDisabled:{kWkggS:`xwmxj5m`,kkrTdU:`xt0e3qv`,$$css:!0}};function aW(e,t,n){return Math.min(Math.max(e,t),n)}function oW(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`);if(t.length===2)return(t[0].split(`.`)[1]?.length??0)+parseInt(t[1],10)}let t=String(e).split(`.`)[1];return t?t.length:0}function sW(e,t,n){if(n<=0)return e;let r=t+Math.round((e-t)/n)*n,i=Math.min(Math.max(oW(t),oW(n)),20);return Number(r.toFixed(i))}function cW(e,t,n){return n===t?0:(e-t)/(n-t)*100}var lW=rW/2;function uW(e){return pW(e,lW-e/100*rW)}function dW(e,t){let n=t-e;return pW(n,-(n/100)*rW)}function fW(e,t){let n=t-rW;return n>0?(e-lW)/n:t>0?e/t:0}function pW(e,t){let n=e=>Number(e.toFixed(3));return`calc(${n(e)}% ${t<0?`-`:`+`} ${Math.abs(n(t))}px)`}function mW({ref:e,...t}){let{label:n,isLabelHidden:r=!1,description:i,isDisabled:a=!1,disabledMessage:o,isOptional:s=!1,isRequired:c=!1,status:l,labelTooltip:u,min:d=0,max:f=100,step:p=1,orientation:m=`horizontal`,formatValue:h,htmlName:g,valueDisplay:_=`tooltip`,marks:v,width:y,xstyle:b,className:x,style:S,"data-testid":C,value:T,onChange:E,onChangeEnd:k}=t,A=Array.isArray(T),j=A&&`minStepsBetweenThumbs`in t?t.minStepsBetweenThumbs??0:0,M=m===`horizontal`,P=(0,K.useId)(),I=(0,K.useId)(),ee=(0,K.useId)(),L=(0,K.useId)(),R=(0,K.useId)(),te=(0,K.useRef)(null),z=(0,K.useRef)(null),[B,ne]=(0,K.useState)(null),[re,ie]=(0,K.useState)(null);(0,K.useEffect)(()=>{D()},[]);let ae=(0,K.useCallback)((e,t)=>{ie(!a&&N()===`keyboard`?e:null)},[a]),oe=(0,K.useCallback)(e=>{ie(null)},[]),se=a&&!!o,ce=F({placement:`above`,focusTrigger:`always`,isEnabled:se}),le=c&&!s,ue=[];i&&ue.push(ee),l?.message&&ue.push(L),le&&ue.push(R),se&&ue.push(ce.describedBy);let de=ue.length>0?ue.join(` `):void 0,pe=(0,K.useMemo)(()=>(Array.isArray(T)?T:[T??d]).map(e=>aW(e,d,f)),[T,d,f]),me=(0,K.useRef)(pe);me.current=pe;let he=(0,K.useCallback)((e,t)=>{let n=te.current;if(!n)return d;let r=n.getBoundingClientRect(),i;return i=M?fW(Ya(n)?r.right-e:e-r.left,r.width):1-fW(t-r.top,r.height),i=aW(i,0,1),aW(sW(d+i*(f-d),d,p),d,f)},[d,f,p,M]),ge=(0,K.useCallback)(e=>{if(!A)return 0;let[t,n]=pe;return Math.abs(e-t)<=Math.abs(e-n)?0:1},[A,pe]),_e=(0,K.useCallback)((e,t)=>{if(a)return;let n=aW(sW(t,d,p),d,f);if(A){let t=[...pe];t[e]=n;let r=j*p;e===0?t[0]=Math.min(t[0],t[1]-r):t[1]=Math.max(t[1],t[0]+r),t[0]=aW(t[0],d,f),t[1]=aW(t[1],d,f),E?.(t)}else E?.(n)},[a,A,pe,d,f,p,j,E]),ve=(0,K.useRef)(k);ve.current=k;let ye=(0,K.useCallback)(e=>{let t=e??me.current,n=ve.current;A?n?.(t):n?.(t[0])},[A]),be=(0,K.useCallback)(e=>{if(a)return;e.preventDefault();let t=e.target.closest(`[data-mark-value]`),n=t?Number(t.dataset.markValue):he(e.clientX,e.clientY),r=ge(n);z.current=r,ne(r),_e(r,n);let i=te.current;i&&i.querySelectorAll(`[role="slider"]`)[r]?.focus(),ie(null),typeof e.currentTarget.setPointerCapture==`function`&&e.currentTarget.setPointerCapture(e.pointerId)},[a,he,ge,_e]),xe=(0,K.useCallback)(e=>{if(z.current===null||a)return;let t=he(e.clientX,e.clientY);_e(z.current,t)},[a,he,_e]),Se=(0,K.useCallback)(e=>{z.current!==null&&(z.current=null,ne(null),ye())},[ye]),Ce=(0,K.useCallback)((e,t)=>{if(a)return;N()===`keyboard`&&ie(e);let n=pe[e],r;switch(t.key){case`ArrowRight`:case`ArrowUp`:r=n+p;break;case`ArrowLeft`:case`ArrowDown`:r=n-p;break;case`PageUp`:r=n+p*10;break;case`PageDown`:r=n-p*10;break;case`Home`:r=d;break;case`End`:r=f;break;default:return}t.preventDefault();let i=aW(sW(r,d,p),d,f);if(_e(e,r),A){let t=[...pe];t[e]=i;let n=j*p;e===0?t[0]=Math.min(t[0],t[1]-n):t[1]=Math.max(t[1],t[0]+n),t[0]=aW(t[0],d,f),t[1]=aW(t[1],d,f),ye(t)}else ye([i])},[a,A,pe,p,d,f,j,_e,ye]),Te=e=>h?h(e):String(e),Ee=e=>{let t=pe[e],n=cW(t,d,f),r=M?{insetInlineStart:uW(n)}:{bottom:uW(n),left:`50%`},i=A?e===0?`Minimum value`:`Maximum value`:void 0,o=j*p,s=A&&e===1?aW(pe[0]+o,d,f):d,c=A&&e===0?aW(pe[1]-o,d,f):f,u=_===`tooltip`&&!se,g=M?`above`:`start`,v=(0,q.jsx)(`div`,{id:A?void 0:P,role:`slider`,tabIndex:a&&!se?-1:0,"aria-valuemin":s,"aria-valuemax":c,"aria-valuenow":t,"aria-valuetext":h?h(t):void 0,"aria-orientation":m,"aria-disabled":a||void 0,"aria-invalid":l?.type===`error`||void 0,"aria-label":i,"aria-labelledby":A?void 0:I,"aria-describedby":de,onKeyDown:t=>Ce(e,t),onFocus:t=>ae(e,t),onBlur:oe,...H(O(`slider-thumb`,{orientation:m,disabled:a?`disabled`:null}),w(iW.thumb,M?iW.thumbHorizontal:Et.centerInline(`50%`),!a&&iW.thumbHover,!a&&re===e&&fe.focusVisible,a&&iW.thumbDisabled),void 0,r)},e);return u?(0,q.jsx)(V,{content:Te(t),placement:g,delay:0,focusTrigger:`always`,isOpen:B===e||void 0,children:v},e):v},U=(()=>{if(A){let[e,t]=pe,n=cW(e,d,f),r=cW(t,d,f);return M?{insetInlineStart:uW(n),width:dW(n,r)}:{bottom:uW(n),height:dW(n,r)}}let e=cW(pe[0],d,f);return M?{insetInlineStart:`0%`,width:uW(e)}:{bottom:`0%`,height:uW(e)}})(),De=_===`text`?(0,q.jsx)(`span`,{className:`x9ynric xcr08ib x1tgivj0 xuxw1ft x2lah0s`,children:A?`${Te(pe[0])} – ${Te(pe[1])}`:Te(pe[0])}):null;return(0,q.jsxs)(PO,{"data-testid":C,label:n,isLabelHidden:r,description:i,inputID:P,labelID:I,isGroupLabel:!0,descriptionID:i?ee:void 0,isOptional:s,isRequired:c,isDisabled:a,status:l?{type:l.type,message:l.message,messageID:l.message?L:void 0}:void 0,labelTooltip:u,statusVariant:`detached`,width:y,xstyle:b,className:x,style:S,children:[(0,q.jsxs)(`div`,{...H(O(`slider`,{orientation:m,disabled:a?`disabled`:null}),{className:`x78zum5 x6s0dn4 x1txdalj`}),children:[g!=null&&pe.map((e,t)=>(0,q.jsx)(`input`,{type:`hidden`,name:g,value:String(e),disabled:a},t===0?`start`:`end`)),(0,q.jsxs)(`div`,{ref:we(e,te,ce.ref),...A?{role:`group`,"aria-labelledby":I}:void 0,onPointerDown:be,onPointerMove:xe,onPointerUp:Se,onPointerCancel:Se,...{0:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 xw4jnvo x1ymw6g xkagaj0 xdt5ytf xl56j7k x1ypdohk x16khyan`},2:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 x1qx5ct2 x80b3aj xh8yej3 x1ypdohk x16khyan`},1:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 xw4jnvo x1ymw6g xkagaj0 xdt5ytf xl56j7k xbyyjgo xt0e3qv`},3:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 x1qx5ct2 x80b3aj xh8yej3 xbyyjgo xt0e3qv`}}[!!M<<1|!!a<<0],children:[(0,q.jsx)(`div`,{"aria-hidden":`true`,...H(O(`slider-track`,{orientation:m}),w(iW.track,M?iW.trackHorizontal:[iW.trackVertical,Et.centerInline(`0px`)]))}),(0,q.jsx)(`div`,{"aria-hidden":`true`,...H(w(iW.filledTrack,M?iW.filledTrackHorizontal:[iW.filledTrackVertical,Et.centerInline(`0px`)]),{style:U})}),v&&(0,q.jsx)(`div`,{"aria-hidden":`true`,...{0:{className:`x10l6tqk x13vifvy x1ey2m1c xbudbmw`},1:{className:`x10l6tqk x1o0tod xtijo5x xwa60dl`}}[!!M<<0],children:v.map(e=>{let t=cW(e.value,d,f),n=M?{insetInlineStart:uW(t)}:{bottom:uW(t)};return(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{"data-testid":`slider-mark`,"data-mark-value":e.value,...H({0:{className:`x10l6tqk x7njt3n xjspbzw x36qwtl x1xc55vz x1m9mm8y`},1:{className:`x10l6tqk x7njt3n xjspbzw xfo62xy xdk7pt x11lhmoz xoffwj3`}}[!!M<<0],{style:n})}),e.label&&(0,q.jsx)(`span`,{"data-testid":`slider-mark-label`,"data-mark-value":e.value,...H({0:{className:`x10l6tqk x9ynric x141an7d xv1l7n4 xuxw1ft x131p8rn x9p6ekw`},1:{className:`x10l6tqk x9ynric x141an7d xv1l7n4 xuxw1ft xuuh30 x1nyx83j xuivejd`}}[!!M<<0],{style:n}),children:e.label})]},e.value)})}),pe.map((e,t)=>Ee(t))]}),De]}),le&&(0,q.jsx)(Kt,{id:R,children:`Required`}),se&&ce.renderTooltip(o)]})}mW.displayName=`Slider`;var hW=[`explorer`,`implementer`,`reviewer`,`advisor`];function gW({catalog:e,error:t,onRefresh:n}){let{t:r}=W();return!t&&!e?(0,q.jsxs)(`div`,{className:`settings-load-state`,role:`status`,children:[(0,q.jsx)(me,{className:`settings-spin`,"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:r(`settingsCatalogLoading`)})]}):t?(0,q.jsxs)(`div`,{className:`settings-load-state error`,role:`alert`,children:[(0,q.jsx)(`strong`,{children:r(`settingsCatalogFailed`)}),(0,q.jsx)(`span`,{children:t}),(0,q.jsx)(`button`,{type:`button`,onClick:n,children:r(`retryAdmissionCheck`)})]}):null}function _W({icon:e,title:t,description:n,value:r,disabled:i,loading:a,onChange:o}){return(0,q.jsxs)(`div`,{className:`settings-inline-control settings-toggle-row`,children:[(0,q.jsx)(e,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`settings-inline-copy`,children:[(0,q.jsx)(`strong`,{children:t}),n&&(0,q.jsx)(`small`,{children:n})]}),(0,q.jsx)(hj,{label:t,isLabelHidden:!0,value:r,size:`sm`,isDisabled:i,isLoading:a,onChange:o})]})}function vW({isPending:e,isBlocked:t=!1,onConfigure:n,request:r,label:i}){return(0,q.jsx)(Br,{label:i,variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Xc,{"aria-hidden":`true`}),isDisabled:e||t,isLoading:e,onClick:()=>void n(r)})}function yW({pending:e,onConfigure:t,placeholder:n}){let{t:r}=W(),[i,a]=(0,K.useState)(``);return(0,q.jsxs)(`form`,{className:`settings-edit-form`,onSubmit:n=>{n.preventDefault(),!e&&i.trim()&&t(i.trim())},children:[(0,q.jsxs)(`label`,{className:`settings-form-field`,children:[r(`setupConfigurationRequest`),(0,q.jsx)(`textarea`,{required:!0,maxLength:2e3,value:i,disabled:e,placeholder:n,onChange:e=>a(e.target.value)})]}),(0,q.jsx)(`button`,{type:`submit`,disabled:e||!i.trim(),children:r(`configureViaSetup`)}),(0,q.jsx)(`small`,{children:r(`setupFormDetail`)})]})}function bW({catalog:e,error:t,currentModel:n,thinkingLevel:r,cwd:i,setupPending:a,setupBlocked:o=!1,preferencePending:s,setupBusy:c,setupBlockedReason:l,onConfigure:u,onUpdatePreferences:d,onOpenRuntimeStatus:f,onRefresh:p}){let{t:m}=W(),h=e?.setup,g=h?.workflows.concurrency??0,_=h?.workflows.maxAgentCalls??0,[v,y]=(0,K.useState)(g),[b,x]=(0,K.useState)(_);return(0,K.useEffect)(()=>y(g),[g]),(0,K.useEffect)(()=>x(_),[_]),(0,q.jsxs)(`section`,{className:`settings-content-page settings-general-panel`,children:[(0,q.jsxs)(`div`,{className:`settings-page-heading`,children:[(0,q.jsx)(`div`,{children:(0,q.jsx)(`h1`,{children:m(`generalSettings`)})}),(0,q.jsx)(vW,{isPending:a,isBlocked:o,onConfigure:u,request:m(`setupRequestReviewAll`),label:m(`configureOpenPi`)})]}),c&&(0,q.jsx)(`p`,{className:`settings-pending-hint`,role:`status`,children:l||m(`settingsSetupBusyHint`)}),(0,q.jsx)(gW,{catalog:e,error:t,onRefresh:p}),h&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`section`,{className:`settings-section-block`,children:(0,q.jsxs)(`div`,{className:`settings-follow-up-control`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:m(`followUpBehavior`)}),(0,q.jsx)(`p`,{children:m(`followUpBehaviorDetail`)})]}),(0,q.jsxs)(`fieldset`,{className:`settings-follow-up-choices`,disabled:s,children:[(0,q.jsx)(`legend`,{className:`sr-only`,children:m(`followUpBehavior`)}),[`followUp`,`steer`].map(e=>(0,q.jsxs)(`label`,{children:[(0,q.jsx)(`input`,{type:`radio`,name:`follow-up-behavior`,value:e,"aria-label":m(e===`steer`?`followUpSteer`:`followUpQueue`),checked:(h.ui.webFollowUpBehavior??`followUp`)===e,onChange:()=>void d({followUpBehavior:e})}),(0,q.jsxs)(`span`,{className:`settings-follow-up-option`,children:[e===`steer`?(0,q.jsx)(Cs,{"aria-hidden":`true`}):(0,q.jsx)(tc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`settings-follow-up-option-copy`,children:[(0,q.jsx)(`strong`,{children:m(e===`steer`?`followUpSteer`:`followUpQueue`)}),(0,q.jsx)(`small`,{children:m(e===`steer`?`followUpSteerDetail`:`followUpQueueDetail`)})]})]})]},e))]})]})}),(0,q.jsxs)(`section`,{className:`settings-section-block`,children:[(0,q.jsx)(`h2`,{children:m(`agentBehavior`)}),(0,q.jsxs)(`div`,{className:`settings-chat-controls`,children:[(0,q.jsxs)(`form`,{className:`settings-limits-control`,onSubmit:e=>{e.preventDefault(),!a&&!o&&u(m(`setupRequestLimits`,{concurrency:v,calls:b}))},children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(Us,{"aria-hidden":`true`}),m(`workflowLimits`)]}),(0,q.jsx)(`small`,{children:m(`workflowLimitsValue`,{concurrency:h.workflows.concurrency,calls:h.workflows.maxAgentCalls})}),(0,q.jsxs)(`label`,{children:[m(`workflowConcurrency`),(0,q.jsx)(`input`,{type:`number`,min:1,value:v,disabled:a||o,onChange:e=>y(Number(e.target.value)),required:!0})]}),(0,q.jsxs)(`label`,{children:[m(`workflowCalls`),(0,q.jsx)(`input`,{type:`number`,min:1,value:b,disabled:a||o,onChange:e=>x(Number(e.target.value)),required:!0})]}),(0,q.jsx)(`button`,{type:`submit`,disabled:a||o||v===h.workflows.concurrency&&b===h.workflows.maxAgentCalls,children:m(`configureViaSetup`)})]}),(0,q.jsx)(_W,{icon:Pc,title:m(`nextActionSuggestions`),description:m(`nextActionSuggestionsDetail`),value:h.suggestions.enabled,disabled:a||o,loading:a,onChange:e=>void u(m(e?`setupRequestEnableSuggestions`:`setupRequestDisableSuggestions`))}),h.suggestions.model&&(0,q.jsx)(`small`,{children:`${h.suggestions.model.provider}/${h.suggestions.model.model} · ${h.suggestions.model.reasoning}`}),(0,q.jsxs)(`div`,{className:`settings-inline-control`,children:[(0,q.jsx)(bs,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`settings-inline-copy`,children:[(0,q.jsxs)(`strong`,{children:[m(`postEditCommand`),(0,q.jsx)(`span`,{className:`settings-inline-status`,children:m(h.postEditConfigured?`configured`:`disabled`)})]}),(0,q.jsx)(`small`,{children:m(`postEditCommandDetail`)})]}),(0,q.jsx)(vW,{isPending:a,isBlocked:o,onConfigure:u,request:m(`setupRequestPostEdit`),label:m(`configurePostEdit`)})]}),(0,q.jsx)(`small`,{children:m(`agentSettingsSetupHint`)})]})]}),(0,q.jsxs)(`section`,{className:`settings-section-block`,children:[(0,q.jsx)(`h2`,{children:m(`resultDisplay`)}),(0,q.jsxs)(`div`,{className:`settings-chat-controls`,children:[[[`subagentResultDisplay`,`subagentResults`,ws],[`bashToolDisplay`,`bashOperations`,Vc],[`fileMutationDisplay`,`fileMutations`,Fs]].map(([e,t,n])=>(0,q.jsxs)(`label`,{className:`settings-inline-control`,htmlFor:`settings-${e}`,children:[(0,q.jsx)(n,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`settings-inline-copy`,children:(0,q.jsx)(`strong`,{children:m(t)})}),(0,q.jsx)(bj,{id:`settings-${e}`,className:`settings-select-control`,label:m(t),value:h.ui[e],disabled:s,onChange:t=>{(t===`full`||t===`compact`)&&d({[e]:t})},options:[{value:`compact`,label:m(`detailDisplay_compact`)},{value:`full`,label:m(`detailDisplay_full`)}]})]},e)),(0,q.jsx)(_W,{icon:mc,title:m(`terminalFooter`),value:h.ui.customFooter,disabled:s,loading:s,onChange:e=>void d({customFooter:e})}),(0,q.jsxs)(`label`,{className:`settings-inline-control`,htmlFor:`settings-footer-style`,children:[(0,q.jsx)(`span`,{children:m(`terminalFooterStyle`)}),(0,q.jsx)(bj,{id:`settings-footer-style`,className:`settings-select-control`,label:m(`terminalFooterStyle`),value:h.ui.footerStyle,disabled:s||!h.ui.customFooter,onChange:e=>{(e===`plain`||e===`powerline`||e===`powerline-mono`)&&d({footerStyle:e})},options:[{value:`plain`,label:`Plain`},{value:`powerline`,label:`Powerline`},{value:`powerline-mono`,label:`Powerline Mono`}]})]}),(0,q.jsx)(`small`,{children:m(`terminalFooterHint`)})]})]})]}),(0,q.jsx)(nW,{}),(0,q.jsxs)(`section`,{className:`settings-section-block`,children:[(0,q.jsx)(`h2`,{children:m(`sessionSettings`)}),(0,q.jsxs)(`dl`,{className:`settings-summary-list`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:m(`selectedModel`)}),(0,q.jsx)(`dd`,{children:n?.label??m(`noModels`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:m(`thinkingLevel`)}),(0,q.jsx)(`dd`,{children:r})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:m(`currentWorkspace`)}),(0,q.jsx)(`dd`,{title:i,children:i})]})]}),(0,q.jsx)(Br,{label:m(`openRuntimeDetails`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ls,{"aria-hidden":`true`}),className:`settings-runtime-action`,onClick:f})]})]})}function xW(e){return e.split(/[\\/]/u).filter(Boolean).at(-1)||e}function SW({kind:e,query:t,scope:n,onQuery:r,onScope:i,onAdd:a}){let{t:o}=W();return(0,q.jsxs)(`div`,{className:`settings-resource-toolbar`,children:[(0,q.jsxs)(`div`,{className:`settings-resource-toolbar-heading`,children:[(0,q.jsx)(`strong`,{children:o(`resources`)}),(0,q.jsx)(Br,{label:o(e===`skills`?`addSkill`:`addPlugin`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:a})]}),(0,q.jsxs)(`label`,{className:`settings-resource-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":o(`searchResources`),placeholder:o(`searchResources`),value:t,onChange:e=>r(e.target.value)})]}),(0,q.jsx)(bj,{label:o(`filterResourceScope`),value:n,onChange:i,options:[{value:`all`,label:o(`allResourceScopes`)},...[`project`,`user`,`temporary`].map(e=>({value:e,label:o(`resourceScope_${e}`)}))]})]})}function CW({kind:e,pending:t,onConfigure:n,onCancel:r}){let{t:i}=W(),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(`user`);return(0,q.jsxs)(`section`,{className:`settings-resource-install`,children:[(0,q.jsx)(`header`,{className:`settings-detail-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:i(e===`skills`?`addSkill`:`addPlugin`)}),(0,q.jsx)(`p`,{children:i(`resourceInstallIntro`)})]})}),(0,q.jsxs)(`form`,{className:`settings-edit-form`,onSubmit:r=>{r.preventDefault(),!t&&a.trim()&&n(i(`setupResourceInstallRequest`,{kind:i(e===`skills`?`skillsSettings`:`pluginsSettings`),source:JSON.stringify(a.trim()),scope:s}))},children:[(0,q.jsxs)(`label`,{className:`settings-form-field`,children:[i(`resourcePackageSource`),(0,q.jsx)(`input`,{required:!0,maxLength:1e3,value:a,placeholder:i(`resourcePackageSourcePlaceholder`),disabled:t,onChange:e=>{o(e.target.value)}})]}),(0,q.jsxs)(`label`,{className:`settings-form-field`,htmlFor:`resource-install-scope`,children:[i(`scope`),(0,q.jsx)(bj,{id:`resource-install-scope`,label:i(`scope`),value:s,disabled:t,onChange:c,options:[{value:`user`,label:i(`resourceScope_user`)},{value:`project`,label:i(`resourceScope_project`)}]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-actions`,children:[(0,q.jsx)(Br,{type:`submit`,label:i(`configureViaSetup`),variant:`secondary`,size:`sm`,isDisabled:t||!a.trim()}),(0,q.jsx)(Br,{label:i(`cancel`),variant:`ghost`,size:`sm`,onClick:r})]}),(0,q.jsx)(`small`,{children:i(`resourceInstallReview`)})]}),e===`skills`&&(0,q.jsxs)(`a`,{className:`settings-resource-link`,href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,children:[i(`browseSkills`),(0,q.jsx)(Os,{"aria-hidden":`true`})]})]})}function wW({catalog:e,pending:t,onReload:n,kind:r,onConfigure:i,children:a}){let{t:o}=W(),[s,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(null);return(0,q.jsxs)(`section`,{className:`settings-resource-management`,children:[a&&(0,q.jsx)(`div`,{className:`settings-resource-actions`,children:a}),(0,q.jsxs)(`div`,{className:`settings-resource-reload`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:o(`resourceSessionState`)}),(0,q.jsx)(`p`,{children:o(`resourcesReloadNote`)})]}),(0,q.jsx)(Br,{label:o(`reloadResources`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(me,{"aria-hidden":`true`}),isDisabled:t||l||!e?.sessionPath||!n,isLoading:l,onClick:()=>c(!0)})]}),d&&(0,q.jsx)(`p`,{className:`settings-resource-notice`,role:`status`,children:d}),(0,q.jsxs)(`details`,{className:`settings-resource-advanced`,children:[(0,q.jsx)(`summary`,{children:o(`advancedResourceConfiguration`)}),(0,q.jsx)(yW,{pending:t,onConfigure:i,placeholder:o(r===`skills`?`setupSkillsPlaceholder`:`setupPluginsPlaceholder`)})]}),s&&(0,q.jsx)(aj,{isOpen:!0,onOpenChange:c,title:o(`reloadResources`),description:o(`resourceReloadReview`),cancelLabel:o(`cancel`),actionLabel:o(`reloadResources`),onAction:()=>{c(!1),u(!0),f(null),n?.().then(()=>f(o(`resourceReloaded`)),e=>f(e instanceof Error?e.message:o(`resourceReloadFailed`))).finally(()=>u(!1))}})]})}function TW({catalog:e}){let{t}=W();if(!e)return null;let{diagnostics:n,truncation:r}=e.resources;return!n.settingsErrors&&!n.extensionErrors&&!n.skillErrors&&!r.truncated?null:(0,q.jsxs)(`p`,{className:`settings-resource-notice`,role:`status`,children:[t(`resourceDiagnostics`,n),n.settingsErrors?` ${t(`resourceConfigurationDiagnostics`,{count:n.settingsErrors})}`:``,r.truncated&&` ${t(`resourceCatalogTruncated`)}`]})}function EW({catalog:e,error:t,onRefresh:n,setupPending:r,onConfigure:i,onReload:a}){let{t:o}=W(),s=e?.resources.skills??[],[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(`all`),[f,p]=(0,K.useState)(!1),m=(0,K.useMemo)(()=>s.filter(e=>(u===`all`||e.scope===u)&&`${e.name} ${e.description} ${e.source}`.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())),[s,c,u]),h=(0,K.useMemo)(()=>[`project`,`user`,`temporary`].map(e=>({scope:e,skills:m.filter(t=>t.scope===e)})).filter(e=>e.skills.length>0),[m]),[g,_]=(0,K.useState)(``),[v,y]=(0,K.useState)(null),b=m.find(e=>e.id===g)??m[0],x=m.filter(e=>e.canManage!==!1),S=JSON.stringify(x.map(e=>e.filePath)),C=new TextEncoder().encode(S).length>12e3;(0,K.useEffect)(()=>{s.length&&!s.some(e=>e.id===g)&&_(s[0].id)},[g,s]);let w=e=>{y(null),td(`/skill:${e.name} `).then(e=>y(e?`copied`:`failed`))};return(0,q.jsxs)(`section`,{className:`settings-content-page settings-managed-panel`,children:[(0,q.jsx)(`header`,{className:`settings-page-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:o(`skillsSettings`)}),(0,q.jsx)(`p`,{children:o(`skillsEmptyIntro`)})]})}),(0,q.jsxs)(`aside`,{className:`settings-resource-sidebar`,children:[(0,q.jsx)(SW,{kind:`skills`,query:c,scope:u,onQuery:l,onScope:d,onAdd:()=>p(!0)}),(0,q.jsxs)(`div`,{className:`settings-resource-list`,children:[h.map(e=>(0,q.jsxs)(`section`,{className:`settings-resource-group`,children:[(0,q.jsx)(`span`,{className:`settings-sidebar-label`,children:o(`resourceScope_${e.scope}`)}),e.skills.map(e=>(0,q.jsxs)(`button`,{type:`button`,className:`settings-resource-item`,"aria-current":e.id===b?.id?`page`:void 0,onClick:()=>{_(e.id),y(null),p(!1)},children:[(0,q.jsx)(Pc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.name}),(0,q.jsx)(`small`,{children:o(e.disableModelInvocation?`explicitOnly`:`availableToModel`)})]})]},e.id))]},e.scope)),!e&&!t&&(0,q.jsx)(gW,{catalog:e,error:t,onRefresh:n}),e&&!m.length&&(0,q.jsx)(`p`,{className:`settings-resource-empty`,children:o(s.length?`noMatchingResources`:`noSkillsFound`)})]}),(0,q.jsxs)(`div`,{className:`settings-sidebar-footer`,children:[(0,q.jsx)(`span`,{children:o(`skillCount`,{count:s.length})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":o(`refreshStatus`),onClick:n,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-detail`,children:[(0,q.jsx)(TW,{catalog:e}),f?(0,q.jsx)(CW,{kind:`skills`,pending:r,onConfigure:i,onCancel:()=>p(!1)}):t?(0,q.jsx)(gW,{catalog:e,error:t,onRefresh:n}):b?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`header`,{className:`settings-detail-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:b.name}),(0,q.jsx)(`p`,{children:b.description})]}),(0,q.jsx)(Br,{label:o(v===`copied`?`copiedMessage`:`copySkillInvocation`),variant:`secondary`,size:`sm`,icon:v===`copied`?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{}),onClick:()=>w(b)})]}),(0,q.jsxs)(`dl`,{className:`settings-detail-metadata`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`source`)}),(0,q.jsx)(`dd`,{children:b.source===`auto`?o(`resourceSourceAuto`):b.source===`local`?o(`resourceSourceLocal`):b.source===`builtin`?o(`builtIn`):b.source})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`scope`)}),(0,q.jsx)(`dd`,{children:o(`resourceScope_${b.scope}`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`invocation`)}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`code`,{children:`/skill:${b.name}`})})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`modelInvocation`)}),(0,q.jsx)(`dd`,{children:o(b.disableModelInvocation?`explicitOnly`:`availableToModel`)})]})]}),(0,q.jsxs)(`section`,{className:`settings-path-block`,children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:o(`skillFile`)}),(0,q.jsx)(`code`,{children:b.filePath})]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-actions`,children:[(0,q.jsx)(vW,{isPending:r,isBlocked:b.canManage===!1,onConfigure:i,label:o(b.disableModelInvocation?`enableSkillInvocation`:`disableSkillInvocation`),request:o(`setupSkillInvocationRequest`,{path:b.filePath,disabled:!b.disableModelInvocation})}),(0,q.jsx)(vW,{isPending:r,isBlocked:b.canManage===!1,onConfigure:i,label:o(`updateResource`),request:o(`setupSkillManageRequest`,{action:`update`,path:JSON.stringify(b.filePath),source:JSON.stringify(b.source),scope:b.scope})}),(0,q.jsx)(vW,{isPending:r,isBlocked:b.canManage===!1,onConfigure:i,label:o(`removeResource`),request:o(`setupSkillManageRequest`,{action:`remove`,path:JSON.stringify(b.filePath),source:JSON.stringify(b.source),scope:b.scope})})]}),b.canManage===!1&&(0,q.jsx)(`p`,{className:`settings-resource-notice`,children:o(`resourceTargetTruncated`)}),v===`failed`&&(0,q.jsx)(`p`,{className:`inspection-warning`,children:o(`copyFailed`)})]}):(0,q.jsxs)(`div`,{className:`settings-empty-detail`,children:[(0,q.jsx)(Pc,{"aria-hidden":`true`}),(0,q.jsx)(`h2`,{children:o(s.length?`noMatchingResources`:`skillsEmptyTitle`)}),(0,q.jsx)(Br,{label:o(`addSkill`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:()=>p(!0)})]}),!f&&(0,q.jsxs)(wW,{catalog:e,pending:r,onReload:a,kind:`skills`,onConfigure:i,children:[x.length>1&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(vW,{isPending:r,isBlocked:C,onConfigure:i,label:o(`enableVisibleSkills`,{count:x.length}),request:o(`setupSkillsBulkRequest`,{paths:S,disabled:!1})}),(0,q.jsx)(vW,{isPending:r,isBlocked:C,onConfigure:i,label:o(`disableVisibleSkills`,{count:x.length}),request:o(`setupSkillsBulkRequest`,{paths:S,disabled:!0})})]}),C&&(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:o(`resourceBulkTooLarge`)})]})]})]})}function DW({catalog:e,error:t,currentModel:n,models:r,activity:i,setupPending:a,setupBlocked:o=!1,onConfigure:s,onRefresh:c}){let{t:l}=W(),[u,d]=(0,K.useState)(`explorer`),f=e?.setup.subagents.roleModels[u],[p,m]=(0,K.useState)(``),[h,g]=(0,K.useState)(1);(0,K.useEffect)(()=>{let t=e?.setup.subagents.roleModels[u];m(t?`${t.provider}/${t.model}`:``),g(e?.setup.workflows.concurrency??1)},[u,e]);let _=i?.items.filter(e=>e.status===`running`).length??0,v=i?.items.filter(e=>e.status!==`running`).length??0;return(0,q.jsxs)(`section`,{className:`settings-content-page settings-subagents-panel`,children:[(0,q.jsxs)(`header`,{className:`settings-page-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:l(`subagentsSettings`)}),(0,q.jsx)(`p`,{children:l(`subagentConfigurationIntro`)})]}),(0,q.jsx)(vW,{isPending:a,isBlocked:o,onConfigure:s,request:l(`setupRequestSubagents`),label:l(`configureRoles`)})]}),(0,q.jsx)(gW,{catalog:e,error:t,onRefresh:c}),(0,q.jsx)(`div`,{className:`settings-control-group`,children:(0,q.jsxs)(`label`,{className:`settings-control-row`,htmlFor:`subagent-role`,children:[(0,q.jsxs)(`span`,{className:`settings-control-copy`,children:[(0,q.jsx)(`strong`,{children:l(`builtInRoles`)}),(0,q.jsx)(`span`,{children:l(`subagentRoleShort_${u}`)})]}),(0,q.jsx)(bj,{id:`subagent-role`,name:`subagentRole`,label:l(`builtInRoles`),value:u,onChange:e=>{let t=hW.find(t=>t===e);t&&d(t)},options:hW.map(e=>({value:e,label:l(`subagentRole_${e}`)}))})]})}),(0,q.jsx)(`div`,{className:`settings-role-detail`,children:e&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`header`,{className:`settings-detail-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:l(`subagentRole_${u}`)}),(0,q.jsx)(`p`,{children:l(`subagentRoleDescription_${u}`)})]})}),(0,q.jsxs)(`form`,{className:`settings-edit-form settings-role-form`,onSubmit:e=>{e.preventDefault(),!(a||o)&&s(l(`setupRoleFormRequest`,{role:u,model:p||l(`inheritParentModel`),concurrency:h}))},children:[(0,q.jsxs)(`div`,{className:`settings-control-group`,children:[(0,q.jsxs)(`label`,{className:`settings-control-row`,htmlFor:`role-model`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`modelAssignment`)})}),(0,q.jsx)(bj,{id:`role-model`,name:`roleModel`,label:l(`modelAssignment`),value:p,disabled:a||o,onChange:m,menuWidth:`min(380px, calc(100vw - 32px))`,options:[{value:``,label:l(`inheritParentModel`)},...p&&!r.some(e=>`${e.provider}/${e.id}`===p)?[{value:p,label:p}]:[],...r.map(e=>({value:`${e.provider}/${e.id}`,label:e.label}))]})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`effectiveModel`)})}),(0,q.jsx)(`span`,{className:`settings-control-value`,children:f?`${f.provider}/${f.model}`:n?.label??l(`unknownState`)})]}),(0,q.jsxs)(`label`,{className:`settings-control-row`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`workflowConcurrencyLabel`)})}),(0,q.jsx)(`input`,{name:`concurrency`,type:`number`,autoComplete:`off`,min:1,max:64,required:!0,value:h,disabled:a||o,onChange:e=>g(Number(e.target.value))})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`workflowCallLimit`)})}),(0,q.jsx)(`span`,{className:`settings-control-value`,children:e.setup.workflows.maxAgentCalls})]})]}),(0,q.jsx)(`button`,{type:`submit`,disabled:a||o,children:l(`configureViaSetup`)}),(0,q.jsx)(`small`,{className:`settings-resource-caption`,children:l(`setupFormDetail`)})]}),(0,q.jsxs)(`section`,{className:`settings-role-principles`,children:[(0,q.jsx)(`h2`,{children:l(`runtimeBoundaries`)}),(0,q.jsxs)(`div`,{className:`settings-control-group`,children:[(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(Ys,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:l(`subagentAuthorityNote`)})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(ws,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:l(`subagentModelNote`)})]})]}),(0,q.jsxs)(`p`,{className:`settings-resource-caption`,children:[l(`subagentActiveCount`,{count:_}),` ·`,` `,l(`subagentCompletedCount`,{count:v})]})]})]})})]})}function OW(e){return e.extensions.length+e.skills.length+e.prompts.length+e.themes.length}function kW(e){return e.enabled===!1?`disabled`:e.configured&&!e.installed?`missing`:e.diagnostics?.length?`error`:OW(e)?`loaded`:e.installed?`installed`:`notLoaded`}function AW({catalog:e,error:t,onRefresh:n,setupPending:r,onConfigure:i,onReload:a}){let{t:o}=W(),s=e?.resources.plugins??[],[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(`all`),[f,p]=(0,K.useState)(!1),m=(0,K.useMemo)(()=>s.filter(e=>(u===`all`||e.scope===u)&&`${e.name??``} ${e.source}`.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())),[s,c,u]),[h,g]=(0,K.useState)(``),_=m.find(e=>e.id===h)??m[0],v=m.filter(e=>e.configured&&e.canManage!==!1),y=e=>e.name??(e.source===`auto`?o(`resourceSourceAuto`):e.source===`builtin`?o(`builtIn`):xW(e.source)),b=JSON.stringify(v.map(({source:e,scope:t,baseDir:n})=>({source:e,scope:t,path:n}))),x=new TextEncoder().encode(b).length>12e3;return(0,K.useEffect)(()=>{s.length&&!s.some(e=>e.id===h)&&g(s[0].id)},[s,h]),(0,q.jsxs)(`section`,{className:`settings-content-page settings-managed-panel`,children:[(0,q.jsx)(`header`,{className:`settings-page-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:o(`pluginsSettings`)}),(0,q.jsx)(`p`,{children:o(`pluginsEmptyIntro`)})]})}),(0,q.jsxs)(`aside`,{className:`settings-resource-sidebar`,children:[(0,q.jsx)(SW,{kind:`plugins`,query:c,scope:u,onQuery:l,onScope:d,onAdd:()=>p(!0)}),(0,q.jsxs)(`div`,{className:`settings-resource-list`,children:[m.map(e=>(0,q.jsxs)(`button`,{type:`button`,className:`settings-resource-item`,"aria-current":e.id===_?.id?`page`:void 0,onClick:()=>{g(e.id),p(!1)},children:[(0,q.jsx)(Sc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:y(e)}),(0,q.jsxs)(`small`,{children:[o(`resourceScope_${e.scope}`),` ·`,` `,o(`pluginState_${kW(e)}`)]})]})]},e.id)),!e&&!t&&(0,q.jsx)(gW,{catalog:e,error:t,onRefresh:n}),e&&!m.length&&(0,q.jsx)(`p`,{className:`settings-resource-empty`,children:o(s.length?`noMatchingResources`:`noPluginsFound`)})]}),(0,q.jsxs)(`div`,{className:`settings-sidebar-footer`,children:[(0,q.jsx)(`span`,{children:e?o(`pluginCount`,{count:s.length}):o(`settingsCatalogLoading`)}),(0,q.jsx)(`button`,{type:`button`,"aria-label":o(`refreshStatus`),onClick:n,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-detail`,children:[(0,q.jsx)(TW,{catalog:e}),f?(0,q.jsx)(CW,{kind:`plugins`,pending:r,onConfigure:i,onCancel:()=>p(!1)}):t?(0,q.jsx)(gW,{catalog:e,error:t,onRefresh:n}):_?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`header`,{className:`settings-detail-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:y(_)}),(0,q.jsx)(`code`,{children:_.source})]}),(0,q.jsx)(`span`,{className:`settings-status-badge ${kW(_)===`loaded`?`healthy`:``}`,children:o(`pluginState_${kW(_)}`)})]}),(0,q.jsxs)(`dl`,{className:`settings-detail-metadata settings-detail-metadata-wide`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`scope`)}),(0,q.jsx)(`dd`,{children:o(`resourceScope_${_.scope}`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`resourceOrigin`)}),(0,q.jsx)(`dd`,{children:o(`resourceOrigin_${_.origin}`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`installedVersion`)}),(0,q.jsx)(`dd`,{children:_.installedVersion??o(`notReported`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`configuredVersion`)}),(0,q.jsx)(`dd`,{children:_.configuredVersion??o(`resourceVersionUnpinned`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`resources`)}),(0,q.jsx)(`dd`,{children:o(`pluginResourceSummary`,{extensions:_.extensions.length,skills:_.skills.length,prompts:_.prompts.length,themes:_.themes.length})})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`baseDirectory`)}),(0,q.jsx)(`dd`,{title:_.baseDir,children:_.baseDir??o(`notReported`)})]})]}),[...new Set(_.diagnostics)].map(e=>(0,q.jsx)(`p`,{className:`settings-resource-notice`,role:`status`,children:e},e)),_.canManage===!1&&(0,q.jsx)(`p`,{className:`settings-resource-notice`,children:o(`resourceTargetTruncated`)}),_.configured&&_.canManage!==!1&&(0,q.jsx)(`div`,{className:`settings-resource-actions settings-resource-primary-actions`,children:[_.enabled===!1?`enable`:`disable`,`update`,`remove`].map(e=>(0,q.jsx)(vW,{isPending:r,onConfigure:i,label:o(`pluginAction_${e}`),request:o(`setupPluginOperationRequest`,{action:e,source:JSON.stringify(_.source),path:JSON.stringify(_.baseDir??null),scope:_.scope})},e))}),(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:o(`pluginLoadedResources`,{count:OW(_)})}),(0,q.jsxs)(`section`,{className:`settings-resource-groups`,children:[_.extensions.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`extensions`)}),(0,q.jsx)(`ul`,{children:_.extensions.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:e.name}),(0,q.jsx)(`code`,{children:e.path})]}),(0,q.jsx)(`span`,{children:o(`extensionSurfaceCount`,{tools:e.toolCount,commands:e.commandCount})})]},e.path))})]}),_.skills.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`skillsSettings`)}),(0,q.jsx)(`p`,{children:_.skills.join(` · `)})]}),_.prompts.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`prompts`)}),(0,q.jsx)(`p`,{children:_.prompts.join(` · `)})]}),_.themes.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`themes`)}),(0,q.jsx)(`p`,{children:_.themes.join(` · `)})]})]})]}):(0,q.jsxs)(`div`,{className:`settings-empty-detail`,children:[(0,q.jsx)(Sc,{"aria-hidden":`true`}),(0,q.jsx)(`h2`,{children:o(s.length?`noMatchingResources`:`pluginsEmptyTitle`)}),(0,q.jsx)(Br,{label:o(`addPlugin`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:()=>p(!0)})]}),!f&&(0,q.jsxs)(wW,{catalog:e,pending:r,onReload:a,kind:`plugins`,onConfigure:i,children:[v.length>1&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(vW,{isPending:r,isBlocked:x,onConfigure:i,label:o(`enableVisiblePlugins`,{count:v.length}),request:o(`setupPluginsBulkRequest`,{packages:b,disabled:!1})}),(0,q.jsx)(vW,{isPending:r,isBlocked:x,onConfigure:i,label:o(`disableVisiblePlugins`,{count:v.length}),request:o(`setupPluginsBulkRequest`,{packages:b,disabled:!0})})]}),x&&(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:o(`resourceBulkTooLarge`)})]})]})]})}function jW(e,t=``,n){let r=(0,K.useMemo)(()=>new de,[]),[i,a]=(0,K.useState)(0),o=JSON.stringify([e,t]),s=(0,K.useRef)(o);s.current=o;let c=(0,K.useRef)(0),[l,u]=(0,K.useState)(null),d=(0,K.useCallback)(()=>a(e=>e+1),[]);return(0,K.useEffect)(()=>{let t=new AbortController,n=++c.current;return u(e=>({owner:o,catalog:e?.owner===o?e.catalog:null,error:null})),r.settingsCatalog(e,t.signal).then(e=>{!t.signal.aborted&&c.current===n&&u({owner:o,catalog:e,error:null})},e=>{!t.signal.aborted&&c.current===n&&u(t=>({owner:o,catalog:t?.owner===o?t.catalog:null,error:e instanceof Error?e.message:String(e)}))}),()=>t.abort()},[r,i,e,o,n]),{catalog:l?.owner===o?l.catalog:null,error:l?.owner===o?l.error:null,refresh:d,updateSetup:e=>{s.current===o&&(c.current++,u(t=>t?.owner===o&&t.catalog?{...t,catalog:{...t.catalog,setup:e}}:t))}}}var MW=[`default`,`mist`,`rose`,`pine`],NW=[`codex`,`sans`,`serif`,`mono`],PW=[`system`,`light`,`dark`],FW={palette:`default`,accent:``,background:``,foreground:``,font:`codex`};function IW(e){return e===`pine`?`dark`:e===`mist`||e===`rose`?`light`:e}function LW(e,t){return e===`mist`||e===`rose`||e===`pine`?e:t.palette}function RW(e,t){switch(e){case`mist`:return t?{background:`#182126`,foreground:`#EDF3F5`,sidebar:`#1D292F`,accent:`#7BB5CA`}:{background:`#F8FBFC`,foreground:`#253239`,sidebar:`#EEF3F5`,accent:`#347991`};case`rose`:return t?{background:`#211A1C`,foreground:`#F4ECEC`,sidebar:`#2A2123`,accent:`#E09AA5`}:{background:`#FFF9F7`,foreground:`#342729`,sidebar:`#F6EDEA`,accent:`#B45562`};case`pine`:return t?{background:`#101A17`,foreground:`#EAF2EC`,sidebar:`#16241F`,accent:`#86C89E`}:{background:`#F4F8F5`,foreground:`#20352A`,sidebar:`#E9F1EB`,accent:`#32704A`};default:return t?{background:`#17191C`,foreground:`#EDF0F2`,sidebar:`#1D2024`,accent:`#74A9E6`}:{background:`#FFFFFF`,foreground:`#1A1C1F`,sidebar:`#F6F7F9`,accent:`#2563EB`}}}function zW(e){if(e.length>2e3)return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;if(Object.keys(n).sort().join(`,`)!==`appearance,theme,version`||n.version!==1)return null;let r=PW.find(e=>e===n.theme);if(!r||!n.appearance||typeof n.appearance!=`object`||Array.isArray(n.appearance))return null;let i=n.appearance;if(Object.keys(i).sort().join(`,`)!==`accent,background,font,foreground,palette`)return null;let a=MW.find(e=>e===i.palette),o=i.font===`system`?`codex`:NW.find(e=>e===i.font),{accent:s,background:c,foreground:l}=i;return!a||!o||typeof s!=`string`||typeof c!=`string`||typeof l!=`string`||![s,c,l].every(e=>e===``||/^#[0-9a-f]{6}$/iu.test(e))?null:{theme:r,appearance:{palette:a,font:o,accent:s,background:c,foreground:l}}}catch{return null}}var BW=[``,`#2563EB`,`#7C3AED`,`#DB2777`,`#D97706`,`#16A34A`];function VW({label:e,value:t,options:n,disabled:r,onSelect:i}){let a=n.find(e=>e.id===t);return(0,q.jsx)(yo,{className:`settings-select-menu`,button:{label:a?.label??t,"aria-label":e,variant:`secondary`,size:`sm`,className:`appearance-menu-trigger`,isDisabled:r,...a?.color?{icon:(0,q.jsx)(`span`,{className:`appearance-color-dot`,style:{background:a.color}})}:{}},menuWidth:200,alignment:`end`,items:n.map(e=>({id:e.id||`default`,label:e.label,isDisabled:r,...e.color?{icon:(0,q.jsx)(`span`,{className:`appearance-color-dot`,style:{background:e.color}})}:{},endContent:t===e.id?(0,q.jsx)(`span`,{className:`settings-select-check`,"aria-hidden":`true`,children:(0,q.jsx)(rs,{})}):void 0,onClick:()=>i(e.id)}))})}function HW({label:e,value:t,fallback:n,disabled:r,onSave:i}){let a=(t||n).toUpperCase(),o=(0,K.useRef)(a);o.current=a;let[s,c]=(0,K.useState)(a);(0,K.useEffect)(()=>c(a),[a]);let l=e=>{c(e),e!==a&&/^#[0-9a-f]{6}$/iu.test(e)&&i(e).then(e=>{e||c(o.current)})};return(0,q.jsxs)(`div`,{className:`appearance-color-input`,children:[(0,q.jsxs)(`label`,{className:`appearance-color-picker`,children:[(0,q.jsx)(`span`,{className:`appearance-color-dot`,style:{background:a}}),(0,q.jsx)(`input`,{"aria-label":`${e} — ${a}`,type:`color`,value:a,disabled:r,onChange:e=>l(e.target.value.toUpperCase())})]}),(0,q.jsx)(`input`,{className:`appearance-color-hex`,type:`text`,"aria-label":e,value:s,maxLength:7,spellCheck:!1,disabled:r,onChange:e=>l(e.target.value.toUpperCase()),onBlur:()=>c(a)})]})}function UW({catalog:e,theme:t,pending:n,error:r,onRefresh:i,onUpdatePreferences:a}){let{t:o}=W(),{mode:s}=sa(),c=e?.setup,l=c?.ui.webTheme??t,u=c?.ui.webAppearance??FW,d=LW(l,u),f=IW(l),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(``),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(null),[C,w]=(0,K.useState)(c?.ui.webChatWidth??820),[T,E]=(0,K.useState)(c?.ui.webChatFontSize??14),D=(0,K.useRef)({chatWidth:C,fontSize:T});c&&(D.current={chatWidth:c.ui.webChatWidth,fontSize:c.ui.webChatFontSize}),(0,K.useEffect)(()=>{c&&(w(c.ui.webChatWidth),E(c.ui.webChatFontSize))},[c]);let O=e?.setupWritable===!1||!!e?.resources.diagnostics.settingsErrors,k=n||!c||!!r||O,A=zW(_),j=e=>a({appearance:e}),M=()=>{n||(g(!1),v(``),b(!1))},N=f===`dark`||f===`system`&&s===`dark`,P=RW(d,N);return(0,q.jsxs)(`section`,{className:`settings-content-page settings-appearance-panel`,children:[(0,q.jsx)(`h1`,{children:o(`appearance`)}),(!c||r||O)&&(0,q.jsxs)(`div`,{className:`settings-load-state`,role:r||O?`alert`:`status`,children:[(0,q.jsx)(me,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o(O?`configurationReadFailure`:r?`settingsCatalogFailed`:`settingsCatalogLoading`)}),(r||O)&&(0,q.jsx)(`button`,{type:`button`,onClick:i,children:o(`retryAdmissionCheck`)})]}),(0,q.jsxs)(`section`,{className:`appearance-section`,"aria-labelledby":`appearance-visual-title`,children:[(0,q.jsx)(`h2`,{id:`appearance-visual-title`,children:o(`appearanceVisualStyle`)}),(0,q.jsxs)(`div`,{className:`appearance-card appearance-mode-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceMode`)}),(0,q.jsx)(`div`,{role:`radiogroup`,"aria-label":o(`appearanceMode`),className:`appearance-mode-options`,children:PW.map(e=>(0,q.jsx)(V,{content:o(e===`system`?`themeSystem`:e===`light`?`themeLight`:`themeDark`),children:(0,q.jsxs)(`label`,{className:`appearance-mode-option`,children:[(0,q.jsx)(`input`,{type:`radio`,name:`openpi-appearance-mode`,"aria-label":o(e===`system`?`themeSystem`:e===`light`?`themeLight`:`themeDark`),checked:f===e,disabled:k,onChange:()=>void a({theme:e})}),(0,q.jsxs)(`span`,{"aria-hidden":`true`,className:`appearance-mode-preview`,"data-mode":e,"data-selected":f===e,children:[(0,q.jsxs)(`span`,{className:`appearance-mini-window`,children:[(0,q.jsx)(`span`,{className:`appearance-mini-sidebar`}),(0,q.jsxs)(`span`,{className:`appearance-mini-chat`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`em`,{})]})]}),e===`system`&&(0,q.jsxs)(`span`,{className:`appearance-mini-window appearance-mini-dark`,children:[(0,q.jsx)(`span`,{className:`appearance-mini-sidebar`}),(0,q.jsxs)(`span`,{className:`appearance-mini-chat`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`em`,{})]})]})]}),(0,q.jsx)(`span`,{className:`appearance-mode-label`,children:o(e===`system`?`themeSystem`:e===`light`?`themeLight`:`themeDark`)})]})},e))})]}),(0,q.jsxs)(`div`,{className:`appearance-card`,children:[(0,q.jsxs)(`div`,{className:`appearance-row appearance-theme-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceTheme`)}),(0,q.jsxs)(`div`,{className:`appearance-theme-actions`,children:[(0,q.jsx)(V,{content:o(`appearanceImport`),children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":o(`appearanceImport`),disabled:k,onClick:()=>{b(!1),g(!0)},children:(0,q.jsx)(Ts,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:o(`appearanceCopy`),children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":o(`appearanceCopy`),disabled:k,onClick:()=>{td(JSON.stringify({version:1,theme:f,appearance:{...u,palette:d}})).then(e=>S(e?`saved`:`failed`))},children:(0,q.jsx)(Ss,{"aria-hidden":`true`})})})]})]}),(0,q.jsx)(`div`,{role:`radiogroup`,"aria-label":o(`appearanceTheme`),"aria-busy":n,className:`appearance-palette-options`,children:MW.map(e=>{let t=RW(e,N),n=e==="default"?`OpenPI`:o(`theme${e[0].toUpperCase()}${e.slice(1)}`);return(0,q.jsxs)(`label`,{className:`appearance-palette-option`,children:[(0,q.jsx)(`input`,{type:`radio`,name:`openpi-appearance-palette`,"aria-label":n,checked:d===e,disabled:k,onChange:()=>void j({palette:e})}),(0,q.jsxs)(`span`,{className:`appearance-palette-preview`,"aria-hidden":`true`,style:{background:t.background,color:t.foreground},children:[(0,q.jsxs)(`span`,{className:`appearance-palette-shell`,style:{background:t.sidebar},children:[(0,q.jsxs)(`span`,{className:`appearance-palette-sidebar`,children:[(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]}),(0,q.jsxs)(`span`,{className:`appearance-palette-canvas`,style:{background:t.background},children:[(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`em`,{style:{borderColor:t.accent},children:(0,q.jsx)(`span`,{className:`appearance-palette-send`,style:{background:t.accent}})})]})]}),(0,q.jsx)(`span`,{className:`appearance-palette-check`,children:(0,q.jsx)(rs,{})})]}),(0,q.jsx)(`span`,{className:`appearance-palette-label`,children:n})]},e)})}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceAccent`)}),(0,q.jsxs)(`div`,{className:`appearance-accent-controls`,children:[(0,q.jsx)(VW,{label:o(`appearanceAccent`),value:u.accent,options:BW.map((e,t)=>({id:e,label:o(`appearanceAccent${t}`),color:e||`var(--text)`})),disabled:k,onSelect:e=>void j({accent:e})}),(0,q.jsx)(HW,{label:o(`appearanceCustomAccent`),value:u.accent,fallback:`#2563EB`,disabled:k,onSave:e=>j({accent:e})})]})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceBackground`)}),(0,q.jsx)(HW,{label:o(`appearanceBackground`),value:u.background,fallback:P.background,disabled:k,onSave:e=>j({background:e})})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceForeground`)}),(0,q.jsx)(HW,{label:o(`appearanceForeground`),value:u.foreground,fallback:P.foreground,disabled:k,onSave:e=>j({foreground:e})})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceFont`)}),(0,q.jsx)(VW,{label:o(`appearanceFont`),value:u.font===`system`?`codex`:u.font,options:NW.map(e=>({id:e,label:o(`appearanceFont_${e}`)})),disabled:k,onSelect:e=>{let t=NW.find(t=>t===e);t&&j({font:t})}})]})]}),x&&(0,q.jsx)(`p`,{role:x===`failed`?`alert`:`status`,className:`appearance-share-status`,children:o(x===`saved`?`appearanceCopied`:`appearanceCopyFailed`)})]}),(0,q.jsxs)(`section`,{className:`appearance-section`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`appearance-advanced-toggle`,"aria-expanded":p,"aria-controls":`appearance-advanced`,onClick:()=>m(!p),children:[o(`appearanceAdvanced`),p?(0,q.jsx)(is,{"aria-hidden":`true`}):(0,q.jsx)(os,{"aria-hidden":`true`})]}),p&&c&&(0,q.jsxs)(`div`,{id:`appearance-advanced`,className:`appearance-card appearance-advanced-content`,children:[(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`expandThinkingByDefault`)}),(0,q.jsx)(hj,{label:o(`expandThinkingByDefault`),isLabelHidden:!0,value:c.ui.webExpandThinking,size:`sm`,isDisabled:k,onChange:e=>void a({expandThinking:e})})]}),(0,q.jsxs)(`div`,{className:`appearance-slider-row`,children:[(0,q.jsxs)(`div`,{className:`settings-slider-heading`,children:[(0,q.jsx)(`span`,{children:o(`chatContentWidth`)}),(0,q.jsxs)(`output`,{children:[C,`px`]}),(0,q.jsx)(`button`,{type:`button`,className:`settings-reset-button`,"aria-label":o(`resetChatContentWidth`),disabled:k||C===820,onClick:()=>{w(820),a({chatWidth:820}).then(e=>{e||w(D.current.chatWidth)})},children:(0,q.jsx)(he,{"aria-hidden":`true`})})]}),(0,q.jsx)(mW,{label:o(`chatContentWidth`),isLabelHidden:!0,value:C,min:820,max:2e3,step:10,width:`100%`,valueDisplay:`none`,isDisabled:k,onChange:e=>w(e),onChangeEnd:e=>{e!==c.ui.webChatWidth&&a({chatWidth:e}).then(e=>{e||w(D.current.chatWidth)})}})]}),(0,q.jsxs)(`div`,{className:`appearance-slider-row`,children:[(0,q.jsxs)(`div`,{className:`settings-slider-heading`,children:[(0,q.jsx)(`span`,{children:o(`chatFontSize`)}),(0,q.jsxs)(`output`,{children:[T,`px`]}),(0,q.jsx)(`button`,{type:`button`,className:`settings-reset-button`,"aria-label":o(`resetChatFontSize`),disabled:k||T===14,onClick:()=>{E(14),a({chatFontSize:14}).then(e=>{e||E(D.current.fontSize)})},children:(0,q.jsx)(he,{"aria-hidden":`true`})})]}),(0,q.jsx)(mW,{label:o(`chatFontSize`),isLabelHidden:!0,value:T,min:12,max:24,step:1,width:`100%`,valueDisplay:`none`,isDisabled:k,onChange:e=>E(e),onChangeEnd:e=>{e!==c.ui.webChatFontSize&&a({chatFontSize:e}).then(e=>{e||E(D.current.fontSize)})}})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceReset`)}),(0,q.jsxs)(`button`,{type:`button`,className:`appearance-reset`,disabled:k,onClick:()=>void a({theme:`system`,appearance:FW,chatWidth:820,chatFontSize:14,expandThinking:!1}),children:[(0,q.jsx)(he,{"aria-hidden":`true`}),o(`appearanceResetAction`)]})]})]})]}),(0,q.jsxs)(Se,{isOpen:h,onOpenChange:e=>{e||M()},"aria-label":o(`appearanceImport`),width:480,className:`appearance-import-dialog`,children:[(0,q.jsx)(`h2`,{className:`appearance-import-title`,children:o(`appearanceImport`)}),(0,q.jsxs)(`form`,{className:`appearance-import-form`,onSubmit:e=>{e.preventDefault(),!(!A||k)&&(b(!1),a(A).then(e=>{e?(g(!1),v(``)):b(!0)}))},children:[(0,q.jsxs)(`label`,{children:[o(`appearanceThemeValue`),(0,q.jsx)(`textarea`,{maxLength:2e3,value:_,disabled:n,placeholder:o(`appearanceImportPlaceholder`),onChange:e=>{b(!1),v(e.target.value)}})]}),_&&!A&&(0,q.jsx)(`p`,{role:`alert`,children:o(`appearanceImportInvalid`)}),y&&(0,q.jsx)(`p`,{role:`alert`,children:o(`settingsPreferencesSaveFailed`)}),(0,q.jsxs)(`div`,{className:`appearance-import-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:n,onClick:M,children:o(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,disabled:k||!A,children:o(n?`savingSettings`:`appearanceImportAction`)})]})]})]})]})}function WW({workspaces:e,onRestore:t}){let{t:n,i18n:r}=W(),i=(0,K.useMemo)(()=>new de,[]),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(``),[l,u]=(0,K.useState)(`updated`),[d,f]=(0,K.useState)(new Set),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(null),[x,S]=(0,K.useState)(new Set),C=(0,K.useRef)(new Set),w=(0,K.useRef)(null),T=(0,K.useRef)(!1),E=JSON.stringify([a.trim(),s,l]),D=(0,K.useRef)({key:E});D.current.key!==E&&(D.current={key:E});let O=p?.scope===E?p:null,k=_?.scope===E?_:null,A=(0,K.useCallback)(async(e,t=0)=>{w.current?.abort();let n=new AbortController;w.current=n,g(!0),v(null);let r={query:a.trim(),sort:l,...s?{cwd:s}:{},limit:25};try{let a=await i.listArchivedSessions({...r,...e?{cursor:e}:{}},n.signal);if(n.signal.aborted||w.current!==n)return;let o=[...a.sessions];for(;!e&&o.length!o.some(t=>t.path===e.path));if(o.push(...e),!e.length)break}m(t=>({...a,scope:E,sessions:e&&t?.scope===E?[...t.sessions,...o.filter(e=>!t.sessions.some(t=>t.path===e.path))]:o}))}catch(t){!n.signal.aborted&&w.current===n&&v({scope:E,stale:t instanceof ge&&t.code===`ARCHIVED_SESSION_CURSOR_STALE`,...e?{cursor:e}:{}})}finally{w.current===n&&(w.current=null,g(!1))}},[i,s,a,E,l]);(0,K.useEffect)(()=>(T.current=!0,()=>{T.current=!1}),[]),(0,K.useEffect)(()=>(b(null),A(),()=>{w.current?.abort(),w.current=null}),[A]);let j=async e=>{if(C.current.has(e))return;C.current.add(e),S(new Set(C.current)),b(null);let n=D.current;try{let r=await t(e);if(!T.current||D.current!==n)return;if(!r){b(e);return}let i=O?.sessions.length??0;m(t=>t?{...t,sessions:t.sessions.filter(t=>t.path!==e)}:null),await A(void 0,i)}catch{T.current&&D.current===n&&b(e)}finally{C.current.delete(e),T.current&&S(new Set(C.current))}},M=new Map;for(let e of O?.sessions??[]){let t=e.workspacePath??e.cwd,n=M.get(t)??[];n.push(e),M.set(t,n)}let N=t=>e.find(e=>e.path===t)?.name??t.split(/[\\/]/u).filter(Boolean).at(-1)??t,P=[...new Set([...e.map(e=>e.path),...M.keys(),...s?[s]:[]])];return(0,q.jsxs)(`section`,{className:`settings-content-page settings-archive-panel`,children:[(0,q.jsx)(`h1`,{children:n(`settingsArchivedChats`)}),(0,q.jsxs)(`div`,{className:`settings-archive-toolbar`,children:[(0,q.jsxs)(`label`,{className:`settings-archive-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":n(`searchArchivedChats`),placeholder:n(`searchArchivedChats`),maxLength:160,value:a,onChange:e=>o(e.target.value)}),a&&(0,q.jsx)(`button`,{type:`button`,"aria-label":n(`settingsClearSearch`),onClick:()=>o(``),children:(0,q.jsx)(je,{"aria-hidden":`true`})})]}),(0,q.jsx)(bj,{label:n(`archiveProjectFilter`),value:s,onChange:c,options:[{value:``,label:n(`archiveAllProjects`)},...P.map(e=>({value:e,label:N(e)}))]}),(0,q.jsx)(bj,{label:n(`archiveSort`),value:l,onChange:e=>u(e===`created`?`created`:`updated`),options:[{value:`updated`,label:n(`archiveSortUpdated`)},{value:`created`,label:n(`archiveSortCreated`)}]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":n(`refreshArchives`),disabled:h,onClick:()=>void A(void 0,O?.sessions.length),children:(0,q.jsx)(me,{"aria-hidden":`true`})})]}),k&&(0,q.jsxs)(`div`,{className:`settings-archive-error`,role:`alert`,children:[(0,q.jsx)(`span`,{children:n(k.stale?`archiveCursorStale`:`archiveLoadFailed`)}),(0,q.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>void A(k.stale?void 0:k.cursor),children:n(`retryAdmissionCheck`)})]}),y&&(0,q.jsx)(`div`,{className:`settings-archive-error`,role:`alert`,children:n(`restoreFailed`)}),h&&(0,q.jsx)(`p`,{role:`status`,className:`settings-archive-status`,children:n(`loadingArchives`)}),!h&&!k&&O?.sessions.length===0&&(0,q.jsxs)(`div`,{className:`settings-archive-empty`,children:[(0,q.jsx)(Go,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:n(a.trim()||s?`noMatchingScannedArchives`:O.truncation.truncated?`noScannedArchives`:`noArchivedSessions`)})]}),(0,q.jsx)(`div`,{className:`settings-archive-groups`,children:[...M].map(([e,t])=>(0,q.jsxs)(`section`,{className:`settings-archive-group`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`settings-archive-group-heading`,"aria-label":n(`archiveProjectGroup`,{project:N(e),count:t.length}),"aria-expanded":!d.has(e),"aria-controls":`archive-group-${encodeURIComponent(e)}`,onClick:()=>f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),children:[d.has(e)?(0,q.jsx)(os,{"aria-hidden":`true`}):(0,q.jsx)(is,{"aria-hidden":`true`}),(0,q.jsx)(Vs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{title:e,children:N(e)}),(0,q.jsx)(`small`,{children:t.length})]}),!d.has(e)&&(0,q.jsx)(`ul`,{id:`archive-group-${encodeURIComponent(e)}`,className:`settings-archive-list`,children:t.map(e=>{let t=e.name||e.firstMessage||n(`untitledSession`),i=new Date(l===`created`?e.created:e.modified);return(0,q.jsxs)(`li`,{className:`settings-archive-row`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`settings-archive-chat-title`,title:t,children:t}),(0,q.jsx)(`time`,{dateTime:Number.isNaN(i.getTime())?void 0:i.toISOString(),children:Number.isNaN(i.getTime())?n(`unknownState`):new Intl.DateTimeFormat(r.language,{dateStyle:`medium`}).format(i)})]}),(0,q.jsxs)(`button`,{type:`button`,"aria-label":n(`restoreArchivedChat`,{title:t}),disabled:x.has(e.path),onClick:()=>void j(e.path),children:[(0,q.jsx)(Wo,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:n(x.has(e.path)?`restoringConversation`:`restoreConversation`)})]})]},e.path)})})]},e))}),!!O?.truncation.recordsUnscanned&&(0,q.jsx)(`p`,{className:`settings-archive-status`,children:n(`archiveScanBounded`,{count:O.truncation.recordsUnscanned})}),O?.nextCursor&&(0,q.jsx)(`button`,{type:`button`,className:`settings-archive-more`,disabled:h,onClick:()=>void A(O.nextCursor),children:n(`moreArchives`)})]})}var GW=[{id:`general`,group:`settingsPersonal`,label:`generalSettings`,Icon:Nc,terms:[`agentBehavior`,`resultDisplay`,`workflowLimits`,`runtimeIdentity`,`runtimeBackendVersion`,`runtimePackageRoot`,`runtimeStartedAt`,`runtimeGitRevision`,`runtimeGitState`,`runtimeFrontendVersion`,`runtimeFrontendBuild`,`runtimeStartupBuild`]},{id:`appearance`,group:`settingsPersonal`,label:`appearance`,Icon:zc,terms:[`appearanceTheme`,`appearanceAccent`,`appearanceFont`,`chatContentWidth`,`chatFontSize`]},{id:`archived-chats`,group:`settingsPersonal`,label:`settingsArchivedChats`,Icon:Go,terms:[`restoreConversation`]},{id:`configuration`,group:`settingsPersonal`,label:`configurationSettings`,Icon:Mc,terms:[`configurationApproval`,`configurationSandbox`,`configurationVerbosity`,`configurationSummary`,`configurationReasoningLevels`,`configurationDependencies`]},{id:`models`,group:`settingsAgent`,label:`modelSettings`,Icon:ws,terms:[`modelDefaultTitle`]},{id:`subagents`,group:`settingsAgent`,label:`subagentsSettings`,Icon:$o,terms:[]},{id:`web-search`,group:`settingsAgent`,label:`webSearchSettings`,Icon:Dc,terms:[]},{id:`skills`,group:`settingsIntegrations`,label:`skillsSettings`,Icon:Xs,terms:[]},{id:`plugins`,group:`settingsIntegrations`,label:`pluginsSettings`,Icon:Sc,terms:[]},{id:`browser`,group:`settingsIntegrations`,label:`browserSettings`,Icon:Es,terms:[]}];function KW(e){return GW.find(({id:t})=>t===e)?.id}function qW({sessionId:e,sessionPath:t,cwd:n,entry:r=`general`,models:i,currentModel:a,thinkingLevel:o,theme:s,preferences:c,workspaces:l=[],onRestoreSession:u,capabilities:d,setupBusy:f,setupBlockedReason:p,plan:m,planSelectionPending:h=!1,onExitPlan:g,setupOutcome:_,onConfigureOpenPi:v,interaction:y,onPreferencesChanged:b,onSelectModel:x,onOpenRuntimeStatus:S,onClose:C}){let{t:w}=W(),T=f||!!p,E=(0,K.useRef)(null),D=(0,K.useRef)(null),[O,k]=(0,K.useState)(``),[A,j]=(0,K.useState)(r===`credentials`?`models`:r),[M,N]=(0,K.useState)(r===`credentials`||r===`models`),[P,F]=(0,K.useState)(!1),[I,ee]=(0,K.useState)(!1),[L,R]=(0,K.useState)(`general`),te=(0,K.useRef)(!1),z=(0,K.useRef)(!1),B=(0,K.useRef)(0),[ne,re]=(0,K.useState)(!1),V=(0,K.useRef)(!1),[ie,ae]=(0,K.useState)(!1),[oe,se]=(0,K.useState)(null),[ce,le]=(0,K.useState)(!1),[H,ue]=(0,K.useState)(!1),[fe,pe]=(0,K.useState)(null),me=H,he=(0,K.useRef)(void 0),ge=m!==void 0&&m!==`inactive`,_e=P||T||ge||h,ve=I&&L!==A||!I&&(A===`skills`||A===`plugins`||A===`web-search`)?void 0:!I||_?.requestId!==he.current?_:void 0,{catalog:ye,error:be,refresh:xe,updateSetup:Ce}=jW(e,a?`${a.provider}/${a.id}`:``,JSON.stringify(c)),we=ve!==void 0&&[`failed`,`cancelled`,`unconfirmed`].includes(ve.status);(0,K.useEffect)(()=>{E.current?.focus()},[]),(0,K.useEffect)(()=>{if(I){if(ve&&ve.status!==`pending`&&te.current){te.current=!1,z.current=!1,window.clearTimeout(B.current),xe(),b();return}if(T){z.current=!0;return}!z.current||!te.current||(te.current=!1,z.current=!1,window.clearTimeout(B.current),xe(),b())}},[b,xe,T,I,ve]),(0,K.useEffect)(()=>()=>window.clearTimeout(B.current),[]);let Te=async e=>{if(ae(!1),_e)return!1;he.current=_?.requestId,R(A),F(!0),ee(!1),te.current=!1,z.current=!1,window.clearTimeout(B.current),se(null);try{let t=await v(e);return t?(ee(!0),te.current=!0,B.current=window.setTimeout(()=>{!te.current||z.current||(te.current=!1,z.current=!1,xe(),b())},2e3)):se(w(`setupRequestFailed`)),t}catch(e){return F(!1),se(e instanceof Error?e.message:w(`setupRequestFailed`)),!1}finally{F(!1)}},Ee=async()=>{if(_e||!ye?.sessionPath)throw Error(w(`resourceReloadFailed`));F(!0);try{await new de().reloadSettingsResources(e,ye.sessionPath),xe(),b()}finally{F(!1)}},U=async e=>{if(V.current||!ye)return!1;V.current=!0,re(!0),ae(!1),se(null);try{let t=await new de().savePreferences(e);return Ce(t.setup),ae(!0),b(),!0}catch{return se(w(`settingsPreferencesSaveFailed`)),!1}finally{V.current=!1,re(!1)}},De=e=>{me||(j(e),k(``),e===`models`&&N(!0),se(null))};(0,K.useEffect)(()=>{let e=new URL(window.location.href);e.searchParams.set(`settings`,A),window.history.replaceState(window.history.state,``,e)},[A]);let Oe=GW.filter(({label:e,terms:t})=>[e,...t].some(e=>w(e).normalize(`NFKC`).toLocaleLowerCase().includes(O.trim().normalize(`NFKC`).toLocaleLowerCase()))),ke=(e,t=!1)=>{if(!me){if(ce&&!t){pe(e);return}pe(null),e.kind===`runtime`?S():C()}};return(0,q.jsxs)(Se,{isOpen:!0,purpose:`info`,padding:0,width:`calc(100vw - 32px)`,maxHeight:`calc(100dvh - 16px)`,className:`provider-settings-dialog`,"aria-label":w(`settings`),onOpenChange:e=>{!e&&!fe&&ke({kind:`close`})},children:[(0,q.jsxs)(`section`,{className:`provider-settings-surface`,children:[(0,q.jsxs)(`aside`,{className:`provider-settings-sidebar`,children:[(0,q.jsxs)(`header`,{className:`provider-settings-header`,children:[(0,q.jsx)(`strong`,{className:`provider-settings-title`,children:w(`settings`)}),(0,q.jsx)(`select`,{className:`provider-settings-mobile-picker`,"aria-label":w(`settingsNavigation`),disabled:me,value:A,onChange:e=>{let t=GW.find(({id:t})=>t===e.target.value);t&&De(t.id)},children:GW.map(({id:e,label:t})=>(0,q.jsx)(`option`,{value:e,children:w(t)},e))})]}),(0,q.jsxs)(`label`,{className:`provider-settings-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":w(`settingsSearch`),placeholder:w(`settingsSearch`),value:O,onChange:e=>k(e.target.value),disabled:me}),O&&(0,q.jsx)(`button`,{type:`button`,"aria-label":w(`settingsClearSearch`),onClick:()=>k(``),children:(0,q.jsx)(je,{"aria-hidden":`true`})})]}),(0,q.jsxs)(`div`,{className:`provider-settings-navigation`,ref:D,"aria-label":w(`settingsNavigation`),role:`tablist`,"aria-orientation":`vertical`,children:[[`settingsPersonal`,`settingsAgent`,`settingsIntegrations`].map(e=>(0,q.jsxs)(`div`,{className:`provider-settings-nav-group`,children:[Oe.some(t=>t.group===e)&&(0,q.jsx)(`p`,{children:w(e)}),Oe.filter(t=>t.group===e).map(({id:e,label:t,Icon:n})=>(0,q.jsxs)(`button`,{type:`button`,role:`tab`,disabled:me,id:`settings-tab-${e}`,tabIndex:A===e||!Oe.some(e=>e.id===A)&&Oe[0]?.id===e?0:-1,"aria-selected":A===e,"aria-controls":`settings-panel-${e}`,className:`provider-settings-tab`,title:w(t),onClick:()=>De(e),onKeyDown:t=>{if(t.altKey||t.ctrlKey||t.metaKey||t.nativeEvent.isComposing)return;let n=Oe.findIndex(t=>t.id===e),r=t.key===`Home`?0:t.key===`End`?Oe.length-1:t.key===`ArrowDown`||t.key===`ArrowRight`?(n+1)%Oe.length:t.key===`ArrowUp`||t.key===`ArrowLeft`?(n+Oe.length-1)%Oe.length:void 0;if(r===void 0)return;t.preventDefault();let i=Oe[r].id;De(i),D.current?.querySelector(`#settings-tab-${i}`)?.focus()},children:[(0,q.jsx)(n,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:w(t)})]},e))]},e)),Oe.length===0&&(0,q.jsx)(`p`,{className:`provider-settings-no-results`,role:`status`,children:w(`settingsNoResults`)})]}),(0,q.jsx)(`button`,{ref:E,type:`button`,className:`icon-button provider-settings-close`,"aria-label":w(`close`),disabled:me,title:w(me?`savingSettings`:`close`),onClick:()=>ke({kind:`close`}),children:(0,q.jsx)(je,{})})]}),(0,q.jsxs)(`div`,{className:`provider-settings-body`,children:[ge&&A!==`browser`&&(0,q.jsxs)(`div`,{className:`settings-plan-notice`,role:`status`,children:[(0,q.jsx)(`span`,{children:w(T?`setupPlanBusy`:`setupPlanBlocked`)}),(0,q.jsx)(Br,{label:w(`planModeExit`),variant:`secondary`,size:`sm`,isDisabled:T||h||!g,onClick:()=>void g?.()})]}),(0,q.jsxs)(`div`,{className:`provider-settings-main`,children:[(0,q.jsx)(`div`,{id:`settings-panel-configuration`,"aria-labelledby":`settings-tab-configuration`,"aria-label":w(`configurationSettings`),role:`tabpanel`,hidden:A!==`configuration`,children:A===`configuration`&&(0,q.jsx)(Tj,{catalog:ye,error:be,pending:_e||I&&L===`configuration`&&(!ve||ve.status===`pending`),preferencePending:ne,onConfigure:Te,onUpdatePreferences:U,onRefresh:xe,onOpenRuntimeStatus:()=>ke({kind:`runtime`})})}),(0,q.jsx)(`div`,{id:`settings-panel-appearance`,"aria-labelledby":`settings-tab-appearance`,"aria-label":w(`appearance`),role:`tabpanel`,hidden:A!==`appearance`,children:(0,q.jsx)(UW,{catalog:ye,theme:s,pending:ne,error:be,onRefresh:xe,onUpdatePreferences:U})}),(0,q.jsx)(`div`,{id:`settings-panel-archived-chats`,"aria-labelledby":`settings-tab-archived-chats`,"aria-label":w(`settingsArchivedChats`),role:`tabpanel`,hidden:A!==`archived-chats`,children:A===`archived-chats`&&(0,q.jsx)(WW,{workspaces:l,onRestore:u??(async()=>!1)})}),(0,q.jsx)(`div`,{id:`settings-panel-web-search`,"aria-labelledby":`settings-tab-web-search`,"aria-label":w(`webSearchSettings`),role:`tabpanel`,hidden:A!==`web-search`,children:A===`web-search`&&(0,q.jsx)(Ej,{catalog:ye,error:be,pending:_e,onConfigure:Te,onRefresh:xe})}),(0,q.jsx)(`div`,{id:`settings-panel-browser`,"aria-labelledby":`settings-tab-browser`,"aria-label":w(`browserSettings`),role:`tabpanel`,hidden:A!==`browser`,children:A===`browser`&&(0,q.jsx)(Cj,{onConfigure:Te,setupPending:_e})}),(0,q.jsx)(`div`,{id:`settings-panel-general`,"aria-labelledby":`settings-tab-general`,"aria-label":w(`generalSettings`),role:`tabpanel`,hidden:A!==`general`,children:(0,q.jsx)(bW,{catalog:ye,error:be,currentModel:a,thinkingLevel:o,cwd:n,setupPending:P||T,preferencePending:ne||!ye,setupBusy:T,setupBlockedReason:p,setupBlocked:ge||h,onConfigure:Te,onUpdatePreferences:U,onOpenRuntimeStatus:()=>ke({kind:`runtime`}),onRefresh:xe})}),(0,q.jsx)(`section`,{id:`settings-panel-models`,"aria-labelledby":`settings-tab-models`,"aria-label":w(`modelSettings`),className:`settings-models`,role:`tabpanel`,hidden:A!==`models`,children:M&&(0,q.jsx)(tW,{sessionId:e,sessionPath:t,models:i,currentModel:a,busy:T,focusCredentials:r===`credentials`,onSaved:async()=>(xe(),b()),onSelectModel:x,onDraftChange:le,onSavingChange:ue},e)}),(0,q.jsx)(`div`,{id:`settings-panel-skills`,"aria-labelledby":`settings-tab-skills`,"aria-label":w(`skillsSettings`),role:`tabpanel`,hidden:A!==`skills`,children:(0,q.jsx)(EW,{catalog:ye,error:be,onRefresh:xe,setupPending:_e,onConfigure:Te,onReload:Ee},e)}),(0,q.jsx)(`div`,{id:`settings-panel-subagents`,"aria-labelledby":`settings-tab-subagents`,"aria-label":w(`subagentsSettings`),role:`tabpanel`,hidden:A!==`subagents`,children:(0,q.jsx)(DW,{catalog:ye,error:be,currentModel:a,models:i,activity:d?.subagents,setupPending:P||T,setupBlocked:ge||h,onConfigure:Te,onRefresh:xe})}),(0,q.jsx)(`div`,{id:`settings-panel-plugins`,"aria-labelledby":`settings-tab-plugins`,"aria-label":w(`pluginsSettings`),role:`tabpanel`,hidden:A!==`plugins`,children:(0,q.jsx)(AW,{catalog:ye,error:be,onRefresh:xe,setupPending:_e,onConfigure:Te,onReload:Ee},e)})]}),y,oe&&(0,q.jsx)(`div`,{className:`settings-global-error`,role:`alert`,children:oe}),(ne||ie)&&!oe&&!we&&(0,q.jsx)(`div`,{className:`settings-global-status`,role:`status`,children:w(ne?`savingSettings`:`settingsPreferencesSaved`)}),!ne&&(!ie||we)&&(I&&L===A||ve)&&!oe&&(0,q.jsxs)(`div`,{className:ve?.status===`failed`?`settings-global-error`:`settings-global-status`,role:ve?.status===`failed`?`alert`:`status`,children:[w(ve?(A===`skills`||A===`plugins`||A===`web-search`)&&[`unconfirmed`,`saved`,`unchanged`].includes(ve.status)?`resourceRequestFinished`:`setupOutcome_${ve.status}`:T?`setupRequestRunning`:A===`skills`||A===`plugins`||A===`web-search`?`resourceRequestSubmitted`:`setupRequestAccepted`),ve?.error&&(0,q.jsx)(`p`,{children:ve.error})]})]})]}),fe&&(0,q.jsx)(aj,{isOpen:!0,onOpenChange:e=>{e||pe(null)},title:w(`unsavedSettingsTitle`),description:w(`unsavedSettingsDetail`),cancelLabel:w(`keepEditing`),actionLabel:w(`discardAndContinue`),onAction:()=>ke(fe,!0)})]})}function JW({identity:e}){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;let n=t%6;return(0,q.jsx)(`span`,{className:`subagent-avatar tone-${n}`,"aria-hidden":`true`,children:(0,q.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.3`,children:[(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,q.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,q.jsx)(`path`,{d:`M3 12h18M5 6.5c4 3 10 3 14 0M5 17.5c4-3 10-3 14 0`})]},`sphere`),(0,q.jsx)(`g`,{children:(0,q.jsx)(`path`,{d:`M4 20V4a16 16 0 0 1 16 16H4ZM4 4l16 16M4 9l11 11M4 14l6 6M10 5l-6 15M16 10L4 20`})},`fan`),(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{d:`m12 2 3 6 7-1-4 5 4 5-7-1-3 6-3-6-7 1 4-5-4-5 7 1Z`}),(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`})]},`rosette`),(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,q.jsx)(`path`,{d:`M3 12h18M12 3a9 9 0 0 0 0 18M12 6a6 6 0 0 0 0 12M12 9a3 3 0 0 0 0 6M12 3v18`})]},`arcs`),(0,q.jsx)(`g`,{children:(0,q.jsx)(`path`,{d:`m12 2 9 5v10l-9 5-9-5V7Zm0 0v20M3 7l18 10M21 7 3 17M3 7l9 5 9-5M3 17l9-5 9 5`})},`prism`),(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{d:`M12 12V2c6 0 10 4 10 10H12Zm0 0v10C6 22 2 18 2 12h10ZM12 12H2C2 6 6 2 12 2v10Zm0 0h10c0 6-4 10-10 10V12Z`}),(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`,fill:`currentColor`})]},`windmill`)][n]})})}function YW(e,t,n,r){let i=(0,K.useMemo)(()=>new de,[]),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(0),p=(0,K.useRef)(null);return(0,K.useEffect)(()=>{if(!n)return;let r=new AbortController;return p.current=r,c(!0),u(!1),i.sessionSources(e,t,r.signal).then(n=>{!r.signal.aborted&&n.sessionId===e&&n.path===t&&o(n)}).catch(()=>{r.signal.aborted||u(!0)}).finally(()=>{r.signal.aborted||(c(!1),p.current=null)}),()=>{r.abort(),p.current?.abort(),p.current=null}},[i,e,t,n,r,d]),{page:a?.sessionId===e&&a.path===t?a:null,loading:s,error:l,loadMore:async()=>{if(p.current||!a||a.nextOffset===void 0)return;let n=new AbortController;p.current=n,c(!0),u(!1);try{let r=await i.sessionSources(e,t,n.signal,a.nextOffset,a.revision);!n.signal.aborted&&r.sessionId===e&&r.path===t&&r.revision===a.revision&&o({...r,sources:[...a.sources,...r.sources]})}catch{n.signal.aborted||u(!0)}finally{n.signal.aborted||(c(!1),p.current=null)}},refresh:()=>f(e=>e+1)}}function XW({sessionId:e,path:t,source:n,thumbnail:r=!1,active:i=!0}){let{t:a}=W(),o=(0,K.useRef)(null),[s,c]=(0,K.useState)(!1),l=JSON.stringify([e,t,n.entryId,n.partIndex]),[u,d]=(0,K.useState)(null);(0,K.useEffect)(()=>{if(!r||!o.current||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(([e])=>c(!!e?.isIntersecting));return e.observe(o.current),()=>e.disconnect()},[r]),(0,K.useEffect)(()=>{if(!i||r&&!s){d(null);return}let a=new AbortController,o;return d({identity:l}),new de().sourceImage(e,t,n.entryId,n.partIndex,a.signal).then(e=>{if(a.signal.aborted)return;if(![`image/png`,`image/jpeg`,`image/gif`,`image/webp`].includes(e.mimeType)||e.data.length>xe)throw Error(`Invalid image`);let t=atob(e.data);if(t.length>10485760||btoa(t)!==e.data)throw Error(`Invalid image`);let n=Uint8Array.from(t,e=>e.charCodeAt(0));o=URL.createObjectURL(new Blob([n],{type:e.mimeType})),d({identity:l,url:o})}).catch(()=>{a.signal.aborted||d({identity:l,failed:!0})}),()=>{a.abort(),o&&URL.revokeObjectURL(o)}},[e,t,n.entryId,n.partIndex,l,i,r,s]);let f=i&&(!r||s)&&u?.identity===l?u:null;return(0,q.jsx)(`span`,{ref:o,className:`session-source-image`,"data-thumbnail":r||void 0,children:f?.url&&!f.failed?(0,q.jsx)(`img`,{src:f.url,draggable:!1,alt:r?``:n.name||a(`attachedImage`),onError:()=>d({identity:l,failed:!0})}):r?(0,q.jsx)(qs,{"aria-hidden":`true`}):(0,q.jsx)(`p`,{role:f?.failed?`alert`:`status`,children:a(f?.failed?`imagePreviewFailed`:`readingFile`)})})}function ZW({source:e,sessionId:t,path:n,onOpen:r,thumbnail:i=!0,detailed:a=!1}){let{t:o}=W();return(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row session-source-row${a?` source-detail-row`:``}`,title:e.reference||e.name||o(`attachedImage`),onClick:r,children:[(0,q.jsx)(`span`,{className:`session-source-icon`,children:e.kind===`image`?i?(0,q.jsx)(XW,{sessionId:t,path:n,source:e,thumbnail:!0}):(0,q.jsx)(qs,{"aria-hidden":`true`}):(0,q.jsx)(Fs,{"aria-hidden":`true`})}),a?(0,q.jsxs)(`span`,{className:`session-source-copy`,children:[(0,q.jsx)(`strong`,{children:e.name||o(`attachedImage`)}),e.reference&&(0,q.jsx)(`span`,{className:`source-detail-reference`,children:e.reference}),(0,q.jsx)(`span`,{className:`source-detail-status`,children:o(`sourceAttached`)})]}):(0,q.jsx)(`span`,{children:e.name||o(`attachedImage`)})]})}function QW({sessionId:e,path:t,data:n,onSelect:r}){let{t:i}=W(),a=be(),o=(0,K.useRef)(null),s=(0,K.useRef)(a?.sources?.scroll??0);return(0,K.useLayoutEffect)(()=>{n.page?.sources.length&&o.current&&(o.current.scrollTop=s.current)},[n.page?.sources.length]),(0,q.jsxs)(`div`,{className:`session-sources-list`,ref:o,onScroll:e=>{s.current=e.currentTarget.scrollTop,a&&(a.sources={scroll:s.current})},children:[!n.loading&&!n.error&&!n.page?.sources.length&&(0,q.jsx)(`p`,{children:i(`sourcesEmpty`)}),n.page?.sources.map(n=>(0,q.jsx)(ZW,{source:n,sessionId:e,path:t,onOpen:()=>r(n),detailed:!0},n.id)),n.error&&(0,q.jsxs)(`p`,{role:`alert`,children:[i(`sourcesFailed`),` `,(0,q.jsx)(`button`,{type:`button`,onClick:n.refresh,children:i(`gitReviewRetry`)})]}),n.loading&&(0,q.jsx)(`p`,{role:`status`,children:i(`readingFile`)}),n.page?.nextOffset!==void 0&&(0,q.jsx)(`button`,{className:`sources-load-more`,type:`button`,disabled:n.loading,onClick:()=>void n.loadMore(),children:i(`sourcesLoadMore`)}),n.page?.truncated&&(0,q.jsx)(`p`,{children:i(`sourcesPartial`)})]})}function $W({sessionId:e,path:t,revision:n}){let{t:r}=W(),i=YW(e,t,!0,n),a=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=requestAnimationFrame(()=>a.current?.focus({preventScroll:!0}));return()=>cancelAnimationFrame(e)},[]);let o=(0,K.useContext)(JE),[s,c]=(0,K.useState)(null),l=e=>{e?.kind===`file`&&e.reference?o?.open(e.reference,void 0,document.activeElement instanceof HTMLElement?document.activeElement:void 0):c(e)};return(0,q.jsxs)(`section`,{className:`session-sources-panel`,ref:a,tabIndex:-1,"aria-label":r(`sessionSources`),children:[(0,q.jsx)(QW,{sessionId:e,path:t,data:i,onSelect:l}),(0,q.jsx)(eG,{sessionId:e,path:t,open:!!s,source:s,data:i,onSelect:l,onClose:()=>c(null)})]})}function eG({sessionId:e,path:t,open:n,source:r,data:i,onSelect:a,onClose:o}){let{t:s}=W(),[c,l]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{r?.id,l(!1)},[e,t,r?.id]),(0,q.jsx)(Se,{isOpen:n,onOpenChange:e=>!e&&o(),purpose:`info`,width:800,maxHeight:`calc(100dvh - 32px)`,padding:0,"aria-label":s(`sessionSources`),children:n&&(0,q.jsxs)(`div`,{className:`session-sources-dialog draft-image-preview`,children:[(0,q.jsxs)(`header`,{children:[r&&i&&(0,q.jsx)(`button`,{type:`button`,"aria-label":s(`sourcesBack`),onClick:()=>a(null),children:(0,q.jsx)(Ko,{})}),(0,q.jsx)(`strong`,{title:r?.name,children:r?r.name||s(`attachedImage`):s(`sessionSources`)}),r&&(0,q.jsx)(`button`,{type:`button`,"aria-pressed":c,onClick:()=>l(e=>!e),children:s(c?`fitImage`:`originalImageSize`)}),(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,"aria-label":s(`close`),onClick:o,children:(0,q.jsx)(je,{})})]}),r?(0,q.jsx)(iO,{original:c,children:(0,q.jsx)(XW,{sessionId:e,path:t,source:r,active:n},JSON.stringify([e,t,r.id]))},JSON.stringify([e,t,r.id])):i?(0,q.jsx)(QW,{sessionId:e,path:t,data:i,onSelect:a}):null]})})}function tG({sessionId:e,workspace:t,agents:n,omitted:r,omittedWorkflows:i=0,review:a,onSubagents:o,onReview:s,onSources:c,sessionPath:l,revision:u,onAddSources:d,reviewLoading:f=!1,reviewError:p}){let{t:m}=W(),[h,g]=(0,K.useState)(!1),_=(0,K.useRef)(null),[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(!0),S=(0,K.useId)(),[C,w]=(0,K.useState)(null),T=YW(e,l??``,!!(l&&(h||v)),u),E=(0,K.useContext)(JE),D=a?.ok?a.snapshot.totals:void 0,O=e=>{!e&&c?(y(!1),w(null),P(c)):e?.kind===`file`&&e.reference?(y(!1),P(()=>E?.open(e.reference,void 0,_.current??void 0))):P(()=>{w(e),y(!0)})},k=n.filter(e=>e.state===`running`),A=n.filter(e=>e.state===`done`),j=n.length-k.length-A.length,M=[...k,...n.filter(e=>e.state!==`running`)].slice(0,4),N=[k.length?m(`subagentSummaryRunning`,{count:k.length}):``,A.length?m(`subagentSummaryDone`,{count:A.length}):``,j?m(`subagentSummaryOther`,{count:j}):``].filter(Boolean).join(` · `)||m(`subagentNoneYet`),P=e=>{g(!1),_.current?.focus(),e()};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Zu,{isOpen:h,onOpenChange:g,placement:`below`,alignment:`end`,width:`min(340px, calc(100vw - 24px))`,label:m(`sessionOverview`),closeButtonLabel:m(`close`),isModal:!1,content:(0,q.jsxs)(`div`,{className:`session-overview`,children:[(0,q.jsx)(`p`,{className:`session-overview-title`,children:t}),(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row`,title:m(`sessionOverviewChanges`),onClick:()=>P(s),children:[(0,q.jsx)(Ms,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:m(`overviewChanges`)}),D&&!p?(0,q.jsxs)(`span`,{className:`session-overview-diff`,title:m(D.complete?`overviewLineTotals`:`overviewPartialTotals`),children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,D.additions.toLocaleString()]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,D.deletions.toLocaleString()]}),!D.complete&&(0,q.jsx)(`span`,{className:`session-overview-note`,children:m(`gitReviewPartialLabel`)})]}):(0,q.jsx)(`span`,{className:`session-overview-note`,children:m(f?`overviewCounting`:a?.ok?`overviewCountsUnknown`:`overviewReviewUnavailable`)})]}),(0,q.jsxs)(`div`,{className:`session-overview-section`,children:[(0,q.jsx)(`p`,{children:m(`subagentDetails`)}),(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row session-overview-agents`,onClick:()=>P(o),"aria-label":`${m(`subagentDetails`)}: ${N}`,children:[M.length>0&&(0,q.jsx)(`span`,{className:`subagent-avatar-stack`,children:M.map(t=>(0,q.jsx)(JW,{identity:`${e}:${t.id}`},t.id))}),(0,q.jsx)(`span`,{className:`session-overview-agent-counts`,children:N.split(` · `).map(e=>(0,q.jsx)(`span`,{children:e},e))}),(0,q.jsx)(os,{"aria-hidden":`true`})]}),r>0&&(0,q.jsx)(`small`,{children:m(`subagentListTruncated`,{count:r})}),i>0&&(0,q.jsx)(`small`,{children:m(`subagentWorkflowsTruncated`,{count:i})})]}),l&&(0,q.jsxs)(`div`,{className:`session-overview-section`,children:[(0,q.jsxs)(`div`,{className:`session-overview-section-heading`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`session-sources-toggle`,"aria-expanded":b,"aria-controls":S,onClick:()=>x(e=>!e),children:[(0,q.jsx)(`span`,{children:m(`sessionSources`)}),T.page&&(T.page.total!==void 0||T.page.nextOffset===void 0)&&(0,q.jsxs)(`span`,{children:[`· `,T.page.total??T.page.sources.length,T.page.truncated?`+`:``]}),(0,q.jsx)(os,{"aria-hidden":`true`})]}),d&&(0,q.jsx)(V,{content:m(`sourcesAdd`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":m(`sourcesAdd`),onClick:()=>P(d),children:(0,q.jsx)(Ae,{})})})]}),(0,q.jsxs)(`div`,{id:S,hidden:!b,children:[T.page?.sources.slice(0,3).map(t=>(0,q.jsx)(ZW,{source:t,sessionId:e,path:l,onOpen:()=>O(t)},t.id)),T.error?(0,q.jsxs)(`p`,{role:`alert`,children:[m(`sourcesFailed`),` `,(0,q.jsx)(`button`,{type:`button`,onClick:T.refresh,children:m(`gitReviewRetry`)})]}):!T.page?.sources.length&&(0,q.jsx)(`p`,{children:m(T.loading?`readingFile`:`sourcesEmpty`)}),!!(T.page&&(T.page.sources.length>3||T.page.nextOffset!==void 0))&&(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row sources-view-all`,onClick:()=>O(null),children:[(0,q.jsx)(Qs,{}),(0,q.jsx)(`span`,{children:m(`sourcesViewAll`)}),(0,q.jsx)(os,{})]})]})]})]}),children:e=>(0,q.jsx)(V,{content:m(`sessionOverview`),placement:`below`,children:(0,q.jsx)(`button`,{...e,ref:t=>{e.ref(t),_.current=t},type:`button`,className:`task-tools-trigger`,"aria-label":m(`sessionOverview`),children:(0,q.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,q.jsx)(`circle`,{cx:`5.5`,cy:`7`,r:`2.8`}),(0,q.jsx)(`circle`,{cx:`5.5`,cy:`17`,r:`2.8`}),(0,q.jsx)(`path`,{d:`M12 7h8M12 17h8`})]})})})}),l&&(0,q.jsx)(eG,{sessionId:e,path:l,open:v,source:C,data:T,onSelect:O,onClose:()=>{y(!1),w(null)}})]})}function nG(e){return e<1e3?Math.round(e).toString():e<1e4?`${(e/1e3).toFixed(1)}k`:e<1e6?`${Math.round(e/1e3)}k`:`${(e/1e6).toFixed(1)}M`}function rG(e){if(!e)return;let{input:t,output:n,cacheRead:r,cacheWrite:i}=e;if(t===0&&n===0&&r===0&&i===0)return;let a=t+r+i,o=r>0?` (${nG(r)} cached)`:``;return`${nG(a)} in${o} · ${nG(n)} out`}function iG(e,t,n){if([`session_start`,`session_switched`,`session_created`].includes(t))return e.length===0?e:[];if([`agent_settled`,`turn_settled`].includes(t))return e.some(e=>e.state===`running`)?e.map(e=>e.state===`running`?{...e,state:`unknown`}:e):e;if(!t.startsWith(`tool_execution_`))return e;let r=n.toolCallId;if(typeof r!=`string`||r.length>500)return e;let i=e.find(e=>e.call.id===r);if(i&&i.state!==`running`&&(i.state!==`unknown`||t!==`tool_execution_end`))return e;let a=sd(n.call),o=a.type===`toolCall`&&typeof a.name==`string`&&typeof a.arguments==`string`?a:i?.call;if(!o||o.evidenceTruncated&&o.id?.includes(`[truncated]`))return e;let s=sd(n.result),c=typeof s.content==`string`?s:i?.result,l=typeof n.parentToolCallId==`string`&&n.parentToolCallId.length<=500?n.parentToolCallId:i?.parentToolCallId,u={call:o,result:c,...l?{parentToolCallId:l}:{},state:t===`tool_execution_end`?n.isError===!0?`failed`:`returned`:`running`},d=(i?e.map(e=>e.call.id===r?u:e):[...e,u]).slice(-32);for(;d.length>0&&new TextEncoder().encode(JSON.stringify(d)).byteLength>524288;)d.shift();return d}var aG={en:{translation:{quitOpenPI:`Quit OpenPI`,quittingOpenPI:`Quitting…`,quitConfirmHelp:`Quit this OpenPI Web application? All running tasks in this Web application will stop. Conversations are saved and will be available when you restart.`,quitTabHelp:`Closing this browser tab alone leaves OpenPI and its tasks running in the background.`,quitAccepted:`OpenPI is shutting down`,quitAcceptedHelp:`The quit request was accepted. Wait for the terminal to confirm that OpenPI has stopped, then you can close this tab.`,quitRestartHelp:`To restart, run openpi web in a terminal, or /web in Pi, then open the address it displays. Refreshing this page does not restart OpenPI.`,quitFailed:`Could not confirm shutdown. Check the terminal before trying again. You can also stop OpenPI with Ctrl+C in its terminal.`,promptPending:`Processing your request…`,commandFeedbackTruncated:`This is a limited command preview. Narrow the query or run it in the TUI for the full output.`,planMode_inactive:`Normal mode`,planMode_planning:`Planning · writes blocked`,planMode_ready:`Plan ready · awaiting review`,planMode_invalid:`Plan state invalid · writes blocked`,planModeEnter:`Plan`,promptPlanMessage:`This conversation uses Plan mode · discuss the plan; no implementation yet`,planModeUnconfirmed:`Could not confirm Plan mode. Refresh before continuing.`,planModeExit:`Exit planning`,planModeImplement:`Prepare implementation prompt`,planImplementationReplaceDraft:`Preparing this plan will replace the current draft and turn off Plan mode. The prompt will not be sent. Continue?`,commandSupport_plan:`Planning and same-session implementation prompts are available. Starting a fresh implementation session still requires the TUI.`,commandSupport_setup:`Configuration uses the active model; questions are answered in Web.`,handoffWaiting:`Manual action`,handoffDone:`Done`,handoffUnable:`Unable to complete`,handoffDoneHelp:`I performed the action. The agent still needs to verify it.`,handoffUnableHelp:`I could not finish. I can add a note about the blocker.`,handoffReview:`Review status`,handoffSubmit:`Submit status`,handoffSignal:`Expected result:`,handoffVerify:`Reporting Done lets the agent continue and verify; it is not proof of success.`,planCardLabel:`Development plan`,planCardReady:`Plan ready`,planCardResult:`Plan result`,planCardNotApproval:`This step produced a plan. It did not approve or start implementation.`,planCardCollapse:`Collapse`,planCardExpand:`Expand`,planCardCopy:`Copy plan`,planCardCopyPreview:`Copy visible preview`,planCardTruncated:`Only a bounded preview is displayed.`,planCardLoadFull:`Load full plan`,planCardLoadingFull:`Loading plan...`,planCardLoadFailed:`Could not load the full plan. Retry`,planCardEvidence:`Tool result · plan_ready`,questionWaiting:`Question`,questionPreview:`View preview`,questionSkip:`Skip`,questionProgress:`{{current}} of {{total}}`,questionReview:`Review answers`,questionReviewTitle:`Ready to send?`,questionReviewHelp:`Review your choices. Nothing is sent until you submit.`,questionEdit:`Edit answer: {{question}}`,questionDismiss:`Dismiss questions without answering`,questionCustom:`Or write your own reply`,questionCustomHelp:`Or leave it blank to ask for a clearer question.`,questionYourAnswer:`Your answer`,questionCustomPlaceholder:`Describe what you have in mind…`,questionNotes:`Additional context (optional)`,questionNotesPlaceholder:`Add a constraint or clarify your choice…`,questionRephrase:`Ask for a clearer or smaller question`,questionBack:`Back`,questionNext:`Next question`,questionSubmit:`Submit answers`,questionSubmitting:`Sending…`,questionRetry:`Check submission`,questionUncertain:`We could not confirm delivery. Your submitted answers are kept here. Check submission to recover the result without sending them twice.`,questionDisconnected:`Reconnecting… Your choices stay here; submitting is paused.`,questionLimit:`Keep each answer or note within {{count}} UTF-8 bytes.`,questionLoadFailed:`Could not check for questions awaiting your answer.`,questionDraftLimit:`Question drafts are full. Shorten or clear an existing answer before adding more text.`,questionRetryLoad:`Try again`,questionCloseReceipt:`Close question status`,questionState_dismissed:`Questions dismissed. No answers were submitted.`,questionState_cancelled:`Questions cancelled. No answers were submitted.`,questionState_expired:`Questions expired. No answers were submitted.`,questionState_stale:`This request is no longer active. Check the conversation for its result.`,conversationView:`Conversation view`,jumpToLatest:`Jump to latest`,historyLoading:`Loading history…`,historyOmitted:`{{count}} earlier entries · Scroll up to load automatically`,historyChanged:`The Session branch changed. History has been reset to the current branch.`,historyUnavailable:`Could not load history. Please retry.`,historyValidationUnavailable:`Could not verify the conversation history. Please retry.`,historyVerifying:`Checking conversation history…`,messageLoadFull:`Load full message`,messageLoadMore:`Load more`,messageLoadingFull:`Loading message…`,messageLoadFailed:`Could not load this message. Retry`,filePreview:`File preview`,changeEvidence:`Changes`,changeEvidenceScope:`Read-only Git snapshot of changes since this session started.`,turnLabel:`Turn {{number}}`,turnState_running:`Running`,turnState_complete:`Completed`,turnState_failed:`Failed`,turnState_interrupted:`Interrupted`,turnState_waiting:`Waiting for response`,turnState_forked:`Forked · Ready to continue`,turnChanges_one:`{{count}} file changed during this turn`,turnChanges_other:`{{count}} files changed during this turn`,turnChangesPartial:`At least {{count}} files changed during this turn`,turnChangesIncomplete:`This turn's change record is incomplete.`,turnChangesMore:`Show {{count}} more files`,turnChangesLess:`Show fewer files`,turnChangesReview:`Review turn changes`,turnChangesReviewButton:`Review`,turnChangesBack:`Back to turn changes`,turnChangesLoading:`Loading this turn's changes…`,turnChangesUnavailable:`This turn's saved diff is unavailable.`,messageCopyRequiresFull:`Load the full message before copying.`,filesChanged_one:`{{count}} file changed`,filesChanged_other:`{{count}} files changed`,reviewChanges:`Review changes`,workspaceChanges:`Workspace changes`,overviewChanges:`Changes`,overviewLineTotals:`Text lines added and removed across the current Git comparison`,overviewPartialTotals:`Known line counts only; some files could not be counted. Open Changes for details.`,overviewCounting:`Counting…`,overviewCountsUnknown:`Counts unavailable`,overviewReviewUnavailable:`Unavailable`,sessionSources:`Sources`,sourcesAdd:`Add source`,sourcesDescription:`Browse this conversation's attached images and files`,sourceAttached:`Attached to this conversation`,sourcesEmpty:`No sources yet`,sourcesFailed:`Could not load sources.`,sourcesViewAll:`View all`,sourcesLoadMore:`Load more sources`,sourcesBack:`Back to sources`,sourcesPartial:`This list has reached its display limit. Earlier sources remain in the conversation.`,turnChangesScope:`Saved workspace changes during this turn`,turnEdits_one:`Edited {{count}} file`,turnEdits_other:`Edited {{count}} files`,turnEditsPartial:`Recorded edits to {{count}} files`,turnEditsScope:`This turn's recorded file-tool writes · saved; shell and external edits are not included`,turnEditStatsUnknown:`Line counts unavailable`,turnEditReason_before_unavailable:`The write completed, but previous contents were not authorized for reading. A before/after diff is unavailable.`,turnEditReason_content_limit:`The write completed. Content exceeds the saved comparison limit, so exact line counts are unavailable.`,turnEditReason_concurrent_change:`The file changed between recorded operations. A reliable net diff for this turn is unavailable.`,gitReviewLoadedCount:`{{count}} files loaded`,gitReviewPartialLabel:`Partial`,gitReviewSearch:`Search file paths`,gitReviewExpand:`Expand review`,gitReviewSearchLoaded:`Search loaded files`,gitReviewMarkViewed:`Mark {{path}} as viewed`,gitReviewMarkCurrentViewed:`Mark current file {{path}} as viewed`,gitReviewViewedLabel:`Viewed`,gitReviewViewedProgress:`Viewed {{viewed}} / {{loaded}} loaded files`,gitReviewViewedLimit:`Up to {{count}} viewed marks are remembered for this comparison.`,gitReviewNoMatch:`No matching files.`,gitReviewNoLoadedMatch:`No matches in the loaded files.`,gitReviewLoadNext:`Load the next files`,gitReviewChanged:`The workspace changed. Refresh the list before loading more.`,gitReviewNewVersion:`New changes are available. You are reading the previous version.`,gitReviewShowLatest:`Show latest diff`,gitReviewBinary:`No text diff is available for this binary file.`,gitReviewBinaryShort:`Binary`,gitReviewPendingStats:`Not loaded`,gitReviewComparison:`{{current}} compared with {{base}}`,gitReviewWorkingTree:`Working tree compared with HEAD`,gitReviewSessionSnapshot:`Changes since this session started`,gitReviewDetached:`Detached HEAD`,gitReviewLoading:`Reading Git changes…`,gitReviewRetry:`Retry`,gitReviewRefresh:`Refresh changes`,gitReviewOlderResult:`Showing the previous result.`,gitReviewNotRepository:`This workspace is not a Git repository.`,gitReviewUnborn:`This repository has no readable HEAD yet.`,gitReviewFailed:`Git changes could not be read.`,gitReviewTruncated:`The change snapshot reached its file or diff size limit.`,gitReviewEmpty:`No changes in this comparison.`,gitReviewHiddenLines:`{{count}} more diff lines hidden.`,gitReviewDiffTruncated:`This file's diff was not loaded because the snapshot reached its size limit.`,gitReviewShowMore:`Show {{count}} more files`,gitReviewBackToFiles:`Back to changed files`,gitReviewFilePreview:`Diff for {{file}}`,gitReviewNoDiff:`No text diff is available for this file.`,changeDiff:`Change diff`,diffViewMode:`Diff view`,diffUnified:`Unified`,diffSplit:`Side by side`,diffBefore:`Before`,diffAfter:`After`,diffView:`Diff`,gitFileStatus_added:`Added`,gitFileStatus_modified:`Modified`,gitFileStatus_deleted:`Deleted`,gitFileStatus_renamed:`Renamed`,gitFileStatus_copied:`Copied`,gitFileStatus_untracked:`Untracked`,gitFileStatus_unknown:`Changed`,closePreview:`Close preview`,imageZoom:`Image zoom`,imageZoomHelp:`Zoom is relative to Fit. Use Ctrl + wheel to zoom, then drag to pan.`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,previousImage:`Previous image`,nextImage:`Next image`,imagePosition:`Image {{current}} of {{total}}`,artifactReadOnly:`Read-only`,artifactReferenceUnavailable:`File preview is unavailable in this view: {{path}}`,artifactSession:`Session {{sessionId}}`,copyFilePath:`Copy file path`,filePathCopied:`File path copied`,refreshFile:`Refresh file`,downloadFile:`Download file`,downloadingFile:`Downloading…`,artifactOlderPreview:`Showing an older preview. `,readingFile:`Reading file…`,artifactVersion:`Version`,artifactBytes:`{{count}} bytes`,artifactPreviewTruncated:`Preview truncated. Download the file for the complete content.`,artifactUnsupported:`This file type cannot be previewed. Use Download.`,filesLargeMarkdownSource:`This Markdown preview is large, so it is shown as source to keep scrolling responsive. All loaded text is included.`,chatView:`Chat`,trajectory:`Trajectory`,trajectoryScope:`Recorded Session messages in order, not execution durations or the complete model request.`,trajectoryRunning:`Work is active. This view updates as saved records arrive; in-flight text is available in Chat.`,trajectoryTruncated:`Loaded history is partial: {{entries}} entries omitted, {{parts}} parts omitted, {{messages}} messages truncated.`,trajectoryEmpty:`No saved records yet.`,trajectoryOrder:`Record order`,trajectoryOverview:`Overview`,trajectorySequenceHint:`Record order · widths are not elapsed time`,trajectoryClearRange:`Clear selection`,trajectoryContextLane:`Context`,trajectoryModelLane:`Model`,trajectoryToolLane:`Tools`,trajectorySelectRecord:`Select record {{number}}: {{name}}`,trajectoryTimingTab:`Timing`,trajectoryUsageTab:`Usage`,trajectoryDurationLabel:`Duration`,trajectoryTimingSource:`Source`,trajectoryTimingUnknown:`No execution duration was recorded. Record timestamps are not operation start times.`,trajectoryTimingNative:`Pi nested tool execution`,trajectoryTTFT:`Time to first output`,trajectoryGenerationTime:`Generation time`,trajectoryThroughput:`Output tokens / second`,trajectoryNotRecorded:`Not recorded`,trajectoryUsageUnknown:`This response has no reported token usage in the loaded records.`,trajectoryUsage_input:`Uncached input`,trajectoryUsage_cacheRead:`Cache read`,trajectoryUsage_cacheWrite:`Cache write`,trajectoryUsage_output:`Output`,trajectoryProvider:`Provider`,trajectoryModel:`Model`,trajectoryCode:`Code`,trajectoryWrap:`Wrap lines`,trajectoryCopy:`Copy source`,trajectoryCopied:`Copied`,trajectoryRawArguments:`Original JSON`,trajectoryFoldTurns:`Turns`,trajectoryFoldCalls:`Calls`,trajectoryMetrics:`Loaded execution summary`,trajectoryRequestCount:`{{count}} model responses`,trajectoryToolCount:`{{count}} tool calls`,trajectoryModelResponses:`Model responses`,trajectoryToolCalls:`Tool calls`,trajectoryLastTurn:`Latest recorded turn`,trajectoryEventColumn:`Event`,trajectoryContentColumn:`Content`,trajectoryTurn:`Turn {{number}}`,trajectoryLoadHistory:`Load earlier history`,trajectoryLatestRecords:`Jump to latest records`,trajectoryHistoryLoading:`Loading history…`,trajectoryNestedOutputMissing:`Pi recorded this nested call's status, but did not persist its result body. The outer script's output is separate.`,trajectoryRecordCount:`{{count}} records`,trajectoryMatches:`{{count}} matches`,trajectorySearch:`Search loaded records`,trajectoryNoMatches:`No matching records.`,trajectoryEarlierGroup:`Earlier context`,trajectoryEventCount:`{{count}} Session changes`,trajectorySummary:`Overview`,trajectoryInputTab:`Input`,trajectoryResultTab:`Result`,trajectoryConversationGroup:`Conversation`,trajectoryReasoningTitle:`Thinking`,trajectoryRecordNumber:`Record {{number}}`,trajectoryRecordInfo:`Record information`,trajectoryRecordId:`Record ID`,trajectoryCallId:`Tool call ID`,trajectoryEventType:`Event type`,trajectoryEvent_model_change:`Model changed`,trajectoryEvent_thinking_level_change:`Thinking level changed`,trajectoryEvent_compaction:`Context compacted`,trajectoryEvent_session_info:`Session information updated`,trajectoryEvent_custom:`Session record`,trajectoryEarlier:`Show earlier records ({{count}} remaining in loaded history)`,trajectoryDetails:`Record details`,trajectoryRecordedAt:`Record timestamp`,trajectoryEvidenceTruncated:`This evidence was truncated in the Session projection.`,trajectoryArguments:`Tool arguments`,trajectoryRecordedContent:`Recorded content`,trajectoryThinking:`Recorded model reasoning`,trajectoryOutput:`Tool result`,trajectoryMissingResult:`No unambiguous result is included in the loaded records. This does not imply the tool is still running.`,trajectoryStructured:`Structured result`,trajectoryEventOnly:`Only this event’s type and timestamp are available.`,trajectory_user:`User message`,trajectory_assistant:`Assistant`,trajectory_call:`Tool call`,trajectory_result:`Unpaired result`,trajectory_event:`Session event`,trajectoryRole_user:`User`,trajectoryRole_assistant:`Assistant`,trajectoryRole_call:`Tool`,trajectoryRole_result:`Result`,trajectoryRole_event:`Event`,trajectory_returned:`Tool returned a result.`,trajectory_error:`Tool returned an error`,trajectory_unknown:`Outcome not established`,runtimeStatus:`Runtime status`,runtimeIdentity:`OpenPI runtime information`,runtimeIdentityHint:`Backend information was captured at startup. It does not track later disk changes or Session reloads, and is not proof of every loaded module. Frontend identity describes this page build.`,runtimeIdentityFailed:`Could not read backend runtime information. Try again.`,runtimeBackendVersion:`Backend package version`,runtimePackageRoot:`Backend package directory`,runtimeStartedAt:`Process started`,runtimeGitRevision:`Git revision at startup`,runtimeGitState:`Working tree at startup`,runtimeGitDirty:`Local changes present`,runtimeGitClean:`Clean`,runtimeFrontendVersion:`Page package version`,runtimeFrontendBuild:`Page build ID`,runtimeStartupBuild:`Page build ID recorded at startup`,runtimeDevelopmentBuild:`Development server (no production build ID)`,runtimeBuildMismatch:`This page build differs from the build recorded when the backend started. Refresh the page or restart the service, then check again.`,refreshStatus:`Refresh status`,openTools:`Open tools`,openToolsUnavailable:`Select a chat to open tools`,sideConversation:`Side conversation`,sideConversationDescription:`Ask a focused question in a separate Pi session without interrupting the main task.`,workbarChangesDescription:`Inspect the current Git branch and working tree.`,terminal:`Terminal`,renameTerminal:`Rename terminal`,terminalName:`Terminal name`,workbarTerminalDescription:`Open an interactive shell for the current workspace.`,restartTerminal:`Restart terminal`,reconnectTerminal:`Reconnect terminal`,restartTerminalTitle:`Restart this terminal?`,restartTerminalDetail:`The current terminal will be closed. Running processes may be interrupted.`,terminalReconnecting:`Reconnecting terminal...`,terminalScrollToBottom:`Scroll to bottom`,terminalOutputResynced:`Terminal output resynchronized.`,terminalRestarting:`Restarting terminal...`,terminalConnecting:`Starting terminal…`,terminalExited:`Terminal exited.`,terminalExitCode:`Terminal exited with code {{code}}.`,terminalDisconnected:`Terminal connection ended unexpectedly.`,terminalError:`Terminal unavailable.`,terminalLoadError:`The terminal interface could not load. Refresh the page to try again.`,reloadPage:`Refresh page`,browser:`Browser`,sessionFileRecords:`Session file records`,gitReviewSource:`Changes`,gitReviewBaseBranch:`Compare against branch`,gitReviewChooseBase:`Choose comparison branch`,gitReviewSearchBranches:`Search branches`,gitReviewLocalBranch:`Local branch`,gitReviewRemoteBranch:`Remote branch`,gitReviewBranchesTruncated:`Showing a bounded list of branches. Some branches are omitted.`,gitReviewNoMatchingBranches:`No matching branches.`,gitReviewBaseUnavailable:`No default comparison branch is available. Choose a branch to review committed changes.`,gitReviewBaseInvalid:`The selected comparison branch is unavailable. Choose another branch.`,gitReviewUnstaged:`Unstaged changes`,gitReviewStaged:`Staged changes`,gitReviewBranch:`Branch changes`,gitReviewFileMissing:`This file no longer has changes in this view. Refresh the file list.`,artifactExternalAccess:`This file is in another working directory. You can authorize read-only access to this file for this session; other files remain inaccessible.`,artifactAuthorizeFile:`Open this file read-only`,sideConversationPending:`Preparing side conversation…`,resizeSidebar:`Resize sidebar`,resizePanes:`Resize panes`,resizeWorkbar:`Resize workbar`,browserPasteTooLarge:`Paste at most {{count}} characters at a time.`,browserInputTooLarge:`Enter at most {{count}} characters at a time.`,browserInputTargetChanged:`The input target changed or could not be confirmed. An input operation was not executed.`,workbarBrowserDescription:`Open and interact with a page inside the OpenPI workbar.`,browserReady:`Enter an address to start browsing`,browserStarting:`Starting the embedded browser…`,browserOpened:`Opened in the embedded browser`,browserOpenAgain:`Open again`,browserOpenFailed:`The embedded browser is unavailable.`,browserBack:`Back`,browserForward:`Forward`,browserReload:`Reload`,browserTabs:`Browser tabs`,browserNewTab:`New tab`,browserAddTab:`New browser tab`,browserCloseTab:`Close {{title}}`,browserTabLimit:`Up to {{count}} browser tabs`,browserPageTitle:`Web page: {{address}}`,browserEnteredAddress:`Last address opened from this toolbar`,browserAddressNotAllowed:`Enter an HTTP(S) address without embedded credentials, outside this application's origin.`,browserLocationUnknown:`This page navigated. Its new address is unavailable. Reload returns to the address you entered.`,browserDirectDescription:`Browse pages directly. Sites that refuse embedding can be opened in your external browser.`,browserDirectHint:`The address records toolbar navigation only. Page popups open in your external browser. Blank page? Use Open in external browser.`,browserEnhancedHint:`Browser enhancement is on: addresses sync and ordinary popup links open in these tabs. Some site policies, login popups and cross-site history still require an external browser.`,files:`Files`,filesExplorer:`Workspace files`,filesSearch:`Filter files…`,refreshFiles:`Refresh files`,filesWorkspaceActions:`Workspace file actions`,filesCreateMenu:`New`,filesImportMenu:`Import`,filesMoreMenu:`More`,filesNewFile:`New file`,filesNewDirectory:`New folder`,filesImport:`Import files`,filesImportFolder:`Import folder`,filesImportFolderChoose:`Choose a folder to import`,filesImportFolderLimit:`Import up to 2,000 files and folders at a time, with at most 64 nested levels.`,filesSelectMultiple:`Select multiple files`,filesSelectItem:`Select {{name}}`,filesSelectedCount:`{{count}} selected`,filesRename:`Rename`,filesNewName:`New name`,filesMove:`Move`,filesMoveDestination:`Destination folder (workspace relative path)`,filesTrashAction:`Move to trash`,filesTrash:`Workspace trash`,filesTrashDetail:`Removed files stay in this workspace and can be restored. Existing names are preserved.`,filesTrashEmpty:`No removed files`,filesTrashUnavailable:`{{count}} entries could not be verified. Their contents remain in .openpi-trash; automatic restore is unavailable.`,filesRestore:`Restore`,filesRestoreItem:`Restore {{name}}`,filesUndoTrash:`Undo removal`,filesOrganizationResults:`File operation results`,filesOperationDone:`Done`,filesRefreshBeforeOrganizing:`Refresh the file tree before organizing this item.`,filesImportChoose:`Choose files to import`,filesTargetDirectory:`Destination`,filesWorkspaceRoot:`Workspace root`,filesFileName:`File name`,filesDirectoryName:`Folder name`,filesCreate:`Create`,filesCreating:`Creating…`,filesCreated:`Created: {{path}}`,filesNameInvalid:`Enter one file or folder name without path separators.`,filesNameExists:`This name already exists. Choose a different name; the existing file was preserved.`,filesMutationFailed:`Could not write this file. Your input is preserved.`,filesWriteUnavailable:`Switch to this session to write workspace files.`,filesImportLimit:`Each file can be up to 50 MiB. Existing names are never overwritten.`,filesImportTooLarge:`This file exceeds the 50 MiB import limit.`,filesImportDirectoryUnsupported:`Folders cannot be imported. Choose the files inside the folder.`,filesImportResults:`File import results`,filesImportPending:`Waiting to import`,filesImporting:`Importing…`,filesImported:`Saved to the workspace`,filesImportedNoPreview:`Saved. Preview supports up to 20 MiB; copy the path to use this file in chat.`,filesClearImported:`Clear completed imports`,filesRetryImport:`Retry import`,filesPathActions:`Path actions for {{name}}`,filesCopyRelativePath:`Copy relative path`,filesCopyAbsolutePath:`Copy absolute path`,filesPathCopied:`Copied path: {{path}}`,filesReadFailed:`Unable to read files.`,filesRetryRead:`Try again`,filesErrorDetails:`Error details`,filesReadFailedDetail:`The file list could not be loaded. Check your connection and try again.`,filesReadDenied:`This session's workspace is currently unavailable or cannot be verified. Check the session and workspace, then try again.`,filesSymlink:`Symbolic link — not followed by the file browser`,filesTruncated:`The result is incomplete. Refine your search.`,filesNoMatches:`No matching files`,filesEmpty:`This folder is empty`,filesChoose:`Choose a file to preview`,filesChooseDetail:`Browse your workspace on the right. Files open here, keeping the explorer in place.`,filesHideTree:`Hide file tree`,filesShowTree:`Show file tree`,filesPreview:`Preview`,filesSource:`View source`,filesEdit:`Edit`,filesMode:`File view`,filesEditor:`File editor`,filesSave:`Save file`,filesSaving:`Saving…`,filesSaved:`Saved`,filesUnsaved:`Unsaved changes · draft kept in this window`,filesDiscard:`Discard draft`,filesDiscardConfirm:`Discard your unsaved changes to this file?`,filesSaveConflict:`The file changed on disk. Your draft is preserved. Refresh to inspect the current version, then reconcile your changes before saving.`,filesSaveFailed:`Could not save. Your draft is preserved; check the file and retry.`,filesEditLoadFirst:`Continue reading the complete file before editing.`,filesEditUnavailable:`Editing supports workspace UTF-8 text files up to 1 MiB. At most 16 unsaved drafts can be kept.`,filesOutline:`Document outline`,filesDiskVersion:`Inspect current disk version`,filesReconcile:`Reviewed · continue editing my draft against this version`,filesTable:`Table preview`,filesRow:`Row`,filesSheets:`Worksheets`,filesTableTruncated:`Showing a partial table preview. Download the original file for complete content.`,filesOfficeLayout:`Document content preview; pagination and typography may differ from Office.`,filesSlidesLayout:`Slide text and images; themes, charts and animations may differ from PowerPoint.`,filesPreviousPage:`Previous page`,filesNextPage:`Next page`,filesZoomOut:`Zoom out`,filesZoomIn:`Zoom in`,filesZoomReset:`Reset zoom`,filesPdfPage:`Page {{page}}`,filesDocumentLimit:`This document exceeds the preview limit. Download it to open locally.`,filesPreviewFailed:`Unable to preview this file. You can still download it.`,filesDiagram:`Mermaid diagram`,filesDiagramLoadError:`Unable to load diagram preview. The source is shown below. Refresh the page to try again.`,filesExpandDiagram:`Expand diagram`,filesFitImage:`Fit`,filesOriginalImage:`Original size`,filesLoadMore:`Load more`,filesLoaded:`{{count}} items loaded`,filesReadMore:`Continue reading`,filesContentChanged:`The file changed. Refresh when ready; your current reading position is preserved.`,workbarFilesDescription:`Browse workspace files with an inline preview and file tree.`,backToSideConversations:`Back to side conversations`,continueSideConversation:`Send a follow-up…`,startSideConversation:`Ask a side question…`,sideConversationModelInherited:`New side conversations use the main conversation’s model and thinking level.`,sideConversationModelFixed:`This is the model used by this side conversation.`,stop:`Stop`,start:`Start`,browserAddress:`Browser address`,browserGo:`Open address`,openExternalBrowser:`Open in external browser`,invalidBrowserAddress:`Enter a valid HTTP or HTTPS address.`,addImages:`Add images`,addFiles:`Add files`,fileAttachments:`File attachments`,previewFileAttachment:`Preview file`,fileAttachmentDescription:`Documents, spreadsheets, PDFs, text, code, and other files`,fileAttachmentCount:`Attach up to {{count}} items.`,fileAttachmentTooLarge:`Files must total 50 MB or less.`,fileAttachmentReadFailed:`Could not read this file. Check the format or whether it is password protected.`,fileAttachmentTextReady:`Text ready`,fileAttachmentTextTruncated:`Partial text · original retained`,fileAttachmentOriginalReady:`Original file ready`,fileAttachmentExtractionFailed:`Text unavailable · original retained`,fileAttachmentEncodingUnavailable:`The text encoding could not be read. The original bytes are preserved.`,fileAttachmentDocumentUnavailable:`Text could not be extracted. The document may be password protected or have an unsupported format. The original bytes are preserved.`,fileAttachmentNoText:`The original file will be attached for the agent to read with its tools. No text was extracted.`,fileAttachmentPreviewTruncated:`Preview shows the first 20,000 characters. The complete extracted text will be attached.`,fileAttachmentExtractedContent:`Extracted text`,fileAttachmentPromptLabel:`User-provided files:`,fileAttachmentPromptTooLong:`The message and file references exceed the input limit. Shorten the message or attach fewer files.`,imageAttachmentDescription:`PNG, JPEG, GIF, or WebP`,imageAttachments:`Image attachments`,imageAttachmentsLoading:`Preparing attachments…`,commandOpensPanel:`Open panel`,commandPanelArguments:`This command opens a panel and cannot include arguments or images. Remove them, or use the panel directly.`,commandPanelUnavailable:`The panel could not be opened. Your command is preserved.`,commandUnavailable_terminal_only:`Requires Pi's terminal interface.`,commandUnavailable_not_integrated:`This extension command is not connected to Web yet. Use it in Pi's terminal.`,artifactImagePreviewFailed:`Unable to preview this image. Refresh the file to retry, or download it.`,artifactFileDetails:`File details`,turnElapsedRunning:`Working for {{duration}}`,compactionElapsed:`Waiting {{duration}}`,compactionRunning:`Compacting context`,compactionCompleted:`Context automatically compacted`,compactionFailed:`Context compaction failed`,compactionInterrupted:`Compaction interrupted`,compactionUnchanged:`Compaction finished without a new summary`,compactionUnavailable:`Context compaction status unavailable`,compactionReconnectHelp:`Connection interrupted. The current status will be checked after reconnecting.`,compactionDraftHelp:`Compacting history. Messages you send will be queued.`,turnElapsedFinished:`Worked for {{duration}}`,composerAdd:`Add`,composerCommands:`Commands`,composerFile:`File`,composerPlan:`Plan`,composerCompact:`Compact`,composerModel:`Model`,composerBack:`Back`,composerPlanDescription:`Enter or leave Plan mode`,composerCompactDescription:`Summarize earlier conversation history`,composerModelDescription:`Select this Session's model`,compactionQueueWaiting:`Waiting for compaction to finish`,compactionQueueBlocked:`Messages retained. Retry when ready or clear the queue.`,clearPromptQueue:`Clear queue`,queueUpdateFailed:`Could not update the queue. Check the current session and try again.`,queueStatusUnconfirmed:`The request was received, but the latest queue state could not be verified. Refresh before trying again.`,turnElapsedOutcome_cancelled:`Stopped`,turnElapsedOutcome_failed:`Failed`,turnElapsedOutcome_uncertain:`Outcome unconfirmed`,settingsSetupBusyHint:`Agent configuration is available after this turn. Display settings can be changed now.`,resetChatContentWidth:`Reset chat content width`,resetChatFontSize:`Reset chat font size`,setupResolveAdmission:`Return to the conversation to resolve the pending message before applying settings.`,removeAttachment:`Remove attachment`,dropImagesHere:`Drop files or images here`,imageAttachmentCount:`Attach up to {{count}} images.`,imageAttachmentTooLarge:`Each image must be 10 MB or smaller.`,imageAttachmentTotalTooLarge:`The attached images must total 32 MB or less.`,imageAttachmentUnsupported:`Only valid PNG, JPEG, GIF, and WebP images are supported.`,imageAttachmentReadFailed:`Could not read this image. Add it again to retry; your message is preserved.`,attachedImage:`Attached image`,previewAttachment:`Preview image`,closeImagePreview:`Close image preview`,imagePreviewFailed:`Unable to display this image.`,fitImage:`Fit image`,originalImageSize:`Original size`,imageViewMode:`Image view`,sessionUsage:`Session token usage`,sessionInputTokens:`Input tokens`,sessionOutputTokens:`Output tokens`,sessionCacheTokens:`Cached tokens`,sessionContextUsage:`Context usage and context window`,usageContextLabel:`Context`,usageUnknown:`Unknown`,usageOpenDetails:`Input {{input}} · Output {{output}} · Context {{percent}} / {{capacity}} · View token usage`,usageContextHelp:`Estimated tokens in the current branch / model context limit.`,usageSessionTotals:`Session totals`,usageInputLabel:`Input`,usageOutputLabel:`Output`,usageCacheReadLabel:`Cache read`,usageCacheWriteLabel:`Cache write`,usageTotalLabel:`Total`,usageWorkspaceLabel:`Workspace`,usageSessionId:`Session ID`,usageTotalsHelp:`Session token totals include cache usage.`,subagentDetails:`Subagents`,sessionOverview:`Session overview`,sessionOverviewChanges:`Changes in the current review scope`,subagentSummaryRunning:`{{count}} running`,subagentSummaryDone:`{{count}} completed`,subagentSummaryOther:`{{count}} other`,subagentNoneYet:`No subagents yet`,subagentOtherGroup:`Failed / interrupted`,subagentShowMore:`Show {{count}} more`,backToSubagents:`Back to subagents`,subagentActiveGroup:`Active`,subagentFinishedGroup:`Completed`,subagentNoneRunning:`No subagents running.`,subagentNoneFinished:`Completed tasks will appear here.`,subagentProgress:`Subagents: {{running}} running · {{completed}} completed`,subagentSummaryUnknown:`{{count}} without confirmed status`,subagentTasks:`Subagent tasks`,inspectSubagent:`Open subagent: {{name}}`,subagentState_running:`Running`,subagentProcessing:`Working…`,subagentState_done:`Completed`,subagentState_error:`Failed`,subagentState_interrupted:`Interrupted`,subagentStarting:`Starting…`,subagentSpawnFailed:`Failed to start`,subagentStateUnavailable:`Started · state unavailable`,subagentSpawnReceipt:`Start receipt`,subagentSpawnReceiptHint:`This confirms the start request, not the subagent's final result.`,subagentTask:`Assigned task`,subagentTranscript:`Subagent conversation`,subagentResult:`Result`,subagentSpend:`Cumulative token spend`,subagentSaved:`Saved record`,subagentRecordedState:`Last recorded state`,subagentSavedHint:`From this parent session's saved receipts. A result may include other tasks from the same batch; this is not the child's full live conversation.`,subagentReadOnly:`Read-only view · closing this panel does not stop the task`,subagentUnavailable:`Live details are no longer available for this subagent in the current session. The start receipt is not evidence of completion.`,subagentStale:`Could not refresh. The details below are the last received snapshot.`,subagentNoMessages:`No messages received yet.`,subagentTranscriptUnavailable:`This view retains a task summary and cannot show the full child conversation.`,subagentWorkflowsTruncated:`{{count}} workflows are outside the loaded list; their task counts are unknown.`,subagentState_unknown:`Unconfirmed`,subagentUnconfirmedGroup:`Unconfirmed`,subagentTruncated:`Showing recent messages. {{count}} earlier messages are not included in this view.`,subagentTextTruncated:`Some long content is shown as an excerpt.`,subagentListTruncated:`{{count}} additional tasks are outside the loaded list.`,subagentThinkingRedacted:`Reasoning was redacted by the provider.`,inspectionChanged:`The active session changed. Reopen this panel.`,inspectionUnavailable:`Details are unavailable.`,inspectionLoading:`Loading status…`,thinkingUnavailable:`Thinking state is unavailable.`,trustUnavailable:`Project trust status is unavailable.`,copySetupCommand:`Copy setup command`,savedTrustDecision:`Saved decision`,activeSessionTrust:`Active Session trust`,trustDecision_trusted:`Trusted`,trustDecision_denied:`Denied`,trustDecision_undecided:`Undecided`,trustDecision_unknown:`Unknown`,trustActiveYes:`Trusted in this Session`,trustActiveNo:`Not trusted in this Session`,modelAndThinking:`Model and reasoning`,selectedModel:`Current model`,thinkingLevel:`Thinking level`,availableThinking:`Available levels`,unknownState:`Unknown`,projectTrust:`Project trust`,trust_trusted:`This session trusts the workspace.`,trust_untrusted:`Trust for this workspace has been denied.`,trust_restricted:`Project resources are restricted pending a trust decision.`,trust_unknown:`Trust state is not available.`,trustRefreshNeeded:`The saved decision and active session differ. Refresh the session through Pi to apply it.`,providerAvailability:`Provider credentials`,settings:`Settings`,settingsNavigation:`Settings navigation`,generalSettings:`General`,configurationSettings:`Configuration`,configurationIntro:`Permissions, web access and model responses.`,configurationReadFailure:`Configuration could not be read safely. Fix the settings file, then refresh.`,configurationUserScope:`User configuration`,configurationSetupHint:`Response and search changes use OpenPI setup`,configurationApproval:`Approval policy`,configurationApprovalDetail:`Tool approvals follow the installed Pi extensions.`,configurationPiPermissions:`Pi extensions`,configurationSandbox:`Sandbox`,configurationSandboxDetail:`Tools run with the host process permissions.`,configurationSandboxUnavailable:`No OS sandbox`,configurationSearchDetail:`Let the current Session model search the web when supported.`,configurationSearchOff:`Do not offer native search to the current model.`,configurationSearchOn:`Offer native search when the current connection supports it.`,configurationVerbosity:`Output verbosity`,configurationVerbosityDetail:`Choose how much detail the model includes in its response.`,configurationResponsesUnavailable:`The current connection does not use a supported Responses API.`,configurationVerbosity_default:`Model default`,configurationVerbosity_low:`Low`,configurationVerbosity_medium:`Medium`,configurationVerbosity_high:`High`,configurationVerbosityHelp_low:`Prefer short answers with fewer details.`,configurationVerbosityHelp_medium:`Include useful explanation and a moderate amount of detail.`,configurationVerbosityHelp_high:`Include more complete explanation and detail.`,configurationVerbosityRequest:`Set only response_verbosity to {{value}}; preserve the other OpenPI settings.`,configurationSummary:`Reasoning summary`,configurationSummaryDetail:`Choose the summary requested from a supported reasoning model.`,configurationSummaryUnavailable:`The current connection does not support reasoning summaries.`,configurationSummary_default:`Model default`,configurationSummary_auto:`Auto`,configurationSummary_concise:`Concise`,configurationSummary_detailed:`Detailed`,configurationSummary_none:`Off`,configurationSummaryHelp_auto:`Let the model choose the summary length.`,configurationSummaryHelp_concise:`Request a brief reasoning summary.`,configurationSummaryHelp_detailed:`Request a more detailed reasoning summary.`,configurationSummaryHelp_none:`Do not request a summary. Keep the current reasoning effort.`,configurationSummaryRequest:`Set only response_reasoning_summary to {{value}}; preserve the other OpenPI settings.`,configurationModelFeatures:`Model features`,configurationReasoningLevels:`Available reasoning efforts`,configurationReasoningDetail:`Choose which levels appear in model controls. Only levels supported by the current model are shown; the current level stays visible.`,configurationReasoningCount:`{{count}} selected`,configurationDependencies:`Workspace dependencies`,configurationEnvironment:`Local environment`,configurationEnvironmentDetail:`Node.js, Python and other tools come from your environment. OpenPI does not install a bundled workspace runtime.`,configurationRuntimeStatus:`Runtime status`,browserSettings:`Browser`,webSearchSettings:`Web search`,webSearchCurrentModel:`Current Session model`,webSearchNativeDetail:`Use your current model provider's native search with the existing connection and credentials.`,webSearchSupported:`This connection supports native search. When enabled, the model decides when to search.`,webSearchUnsupported:`Native search is unsupported or unconfirmed for this connection. No search tool is provided and no other provider is used.`,webSearchNativeRequest:`Enable native web search using the current Session model and existing Pi credentials. Do not switch model, connection protocol, or search provider. Unsupported or unknown connections must receive no search tool.`,webSearchIntro:`Let your model search current sources and read the original pages.`,webSearchPackageDetail:`Optional search, page reading, and PDF extraction through a Pi package.`,webSearchDefaultOff:`Off by default. This optional extension follows the current Session model; it needs no separate search key or plugin installation.`,webSearchLoaded:`Package loaded in this Session`,webSearchNotLoaded:`Package not loaded in this Session`,webSearchSource:`Review plugin source`,webSearchProfile:`Search setup`,webSearchExa:`Exa — no API key required`,webSearchExisting:`Keep my existing search preferences`,webSearchProfileHint:`Exa uses search queries with direct page reading. Existing preferences stay untouched. Other search services can be configured after installation.`,webSearchEnable:`Enable web search…`,webSearchDisable:`Disable web search…`,webSearchConfigure:`Change search service…`,webSearchExaRequest:`Enable optional web search with Pi Web Access and Exa, which needs no API key. Let me review the installation confirmation, preserve other preferences, and do not reload automatically.`,webSearchExistingRequest:`Enable optional web search with Pi Web Access and keep my existing search preferences unchanged. Let me review the installation confirmation, preserve other preferences, and do not reload automatically.`,webSearchDisableRequest:`Disable native web search. Preserve other settings and Session history.`,webSearchProviderRequest:`Help me change the search service for my installed Pi Web Access plugin. Explain available services and permissions, preserve unrelated preferences, keep credentials with the search plugin, and do not reload automatically.`,browserSettingsIntro:`Let OpenPI read pages, click, type and take screenshots.`,browserControl:`Browser control`,browserControlHint:`Requests a setup change. Access changes after the configuration is saved.`,browserDefault:`Default browser`,browserDefaultHint:`Requests a setup change for the browser used when none is named.`,browserEmbedded:`OpenPI browser`,browserAllowedTitle:`Allowed browsers`,browserOffHint:`Your choices take effect when browser control is on.`,browserConnected:`Connected`,browserNeedsSetup:`Extension setup needed`,browserNotFound:`Browser not detected`,browserUpdateNeeded:`Extension update needed`,browserBlocked:`Not allowed`,browserDefaultBlocked:`Your default browser is not allowed. Allow it or choose another default.`,browserSetUp:`Set up`,browserManage:`Manage`,browserSetupNamed:`Set up {{browser}}`,browserManageNamed:`Manage {{browser}}`,browserAllowNamed:`Allow {{browser}}`,browserMore:`More browsers`,browserSpeakHint:`Say “Use Chrome to…” to choose a different browser for a request.`,browserGuideTitle:`Connect {{browser}}`,browserGuideEyebrow:`One step at a time`,browserConnectionTitle:`Connection`,browserCloseGuide:`Close browser setup`,browserConnectionReady:`Connected. Choose whether OpenPI may use this browser.`,browserEmbeddedDetail:`Pages open inside OpenPI. Some websites require a regular browser to sign in or display correctly.`,browserExternalDetail:`OpenPI can use existing tabs and signed-in pages in your connected {{browser}} profile. Keep an OpenPI tab open in that profile.`,browserManageExtension:`Manage extension`,browserAllowUse:`Allow OpenPI to use it`,browserMakeDefault:`Use as default`,browserInstallIn:`Install in`,browserInstallTitle:`Install OpenPI Browser Bridge`,browserSetupSteps:`Setup steps`,browserGuidePopout:`Keep this guide in a separate window`,browserGuideDetached:`Your guide is open in a separate window. Follow it alongside the browser settings.`,browserShowGuide:`Show guide`,browserGuideInline:`Return guide here`,browserGuideBlocked:`The guide window could not open. Allow pop-ups and try again, or follow the steps here.`,browserSafariSettings:`Safari → Settings`,browserSafariDeveloper:`Developer settings`,browserSafariTemporary:`Add Temporary Extension…`,browserSafariOpenHint:`Open Safari, then choose Safari → Settings. Keep this guide alongside it. Requires Safari 26 or later on macOS.`,browserSafariDeveloperTitle:`Show Safari’s developer settings`,browserSafariDeveloperHint:`In Settings → Advanced, turn on Show features for web developers. Then select the Developer tab.`,browserSafariLoadHint:`In Developer, click Add Temporary Extension and select the folder below. Enable OpenPI Browser Bridge and allow the websites you want to control, including the local OpenPI page. Temporary extensions need reloading after Safari quits.`,browserFirefoxThis:`This Firefox`,browserFirefoxTemporary:`Load Temporary Add-on…`,browserFirefoxDeveloperTitle:`Select This Firefox`,browserFirefoxDeveloperHint:`On about:debugging, choose This Firefox in the left sidebar. Firefox does not need a Developer mode switch.`,browserFirefoxLoadHint:`Click Load Temporary Add-on and select manifest.json in the folder below. This development installation lasts until Firefox restarts; a permanent installation requires a Mozilla-signed package.`,browserFirefoxDone:`Selected. Next`,browserStepCount:`Step {{step}} of {{total}}`,browserStepLabel:`Step {{step}}: {{label}}`,browserStepOpen:`Open page`,browserStepAdd:`Add extension`,browserStepConnect:`Connect`,browserOpenManagerTitle:`Open {{browser}} extensions`,browserOpenManagerHint:`This opens {{browser}}. Complete the action on its extensions page, then return here to continue.`,browserOpenManager:`Open {{browser}} extensions`,browserReopenManager:`Open extensions page again`,browserAlreadyInstalled:`Already installed? Connect`,browserDeveloperMode:`Developer mode`,browserDeveloperTitle:`Turn on Developer mode`,browserDeveloperHint:`Turn on Developer mode on the extensions page. The {{loadLabel}} button will appear.`,browserDeveloperDone:`It’s on. Next`,browserIllustration:`Illustration · In {{browser}}`,browserExtensions:`Extensions`,browserLoadUnpacked:`Load unpacked`,browserLoadHint:`The extension is ready on this computer. Follow these steps in {{browser}} to load it.`,browserCopyLocation:`Copy the location below`,browserLocateTarget:`Find the extension on this computer`,browserRevealTarget:`Locate extension`,browserLocateManifest:`Find the extension’s manifest.json`,browserRevealManifest:`Locate manifest.json`,browserDragToBrowser:`Drag the folder onto {{browser}} extensions`,browserDragFolderHint:`Drag the entire {{folder}} folder from your file manager onto the extensions page, with Developer mode on.`,browserSelectLocatedTarget:`In the browser’s file picker, select the item located in the previous step.`,browserManualInstall:`Need another way? Select by path`,browserManualSelection:`Can’t find it? Select by path`,browserLoadInBrowser:`In {{browser}}, click “{{loadLabel}}”`,browserLoadAlternate:`The button appears when Developer mode is on.`,browserConfirmFolder:`Select`,browserConfirmFile:`Open`,browserSelectFolderHint:`Select this entire folder, not a .js file inside it.`,browserSelectManifestHint:`Select manifest.json, not one of the .js files.`,browserInstallCheckpoint:`Continue when OpenPI Browser Bridge appears in the extensions list.`,browserPathCopied:`Path copied`,browserCopyFailed:`Couldn’t copy. Select the path above and copy it manually.`,browserChooseFolderMac:`Press ⌘ ⇧ G, paste the copied path and press Return. Then click “{{confirm}}”.`,browserChooseFolderOther:`Paste the copied path into the location bar and press Enter. Then click “{{confirm}}”.`,browserInstalledConnect:`Added. Connect to OpenPI`,browserPreviousStep:`Back`,browserWaiting:`Waiting for OpenPI Browser Bridge… We’ll detect it automatically.`,browserInstallBrowserFirst:`Install {{browser}} first, or open this OpenPI address in your installed browser.`,browserConnectTitle:`Connect to OpenPI`,browserConnectHint:`Open OpenPI in {{browser}}. Use the profile where you installed the extension.`,browserOpenIn:`Open in {{browser}}`,browserAllowHint:`Once connected, you can allow OpenPI to use this browser. Installing the extension does not change your browser permissions.`,browserCheck:`Check connection`,browserNotConnectedYet:`No connection yet. Finish installation, refresh OpenPI in that browser and check again.`,browserHelp:`Setup help`,browserReloadHint:`Already installed? Reload OpenPI Browser Bridge in the extension manager and refresh OpenPI. Accept the browser’s permission prompt if shown.`,browserSupportedHint:`Chrome, Edge, Brave and Chromium 145+ support embedded and native pages. Safari 26+ on macOS and Firefox 128+ use the portable extension for native tabs; nested frames must be opened separately. Temporary Safari/Firefox installations need reloading after browser restart.`,browserCopyPath:`Copy path`,browserOpening:`Opening browser…`,browserLoading:`Checking browser connections…`,browserSaved:`Saved. Browser permissions take effect immediately.`,browserSaving:`Working…`,modelSettings:`Models`,skillsSettings:`Skills`,subagentsSettings:`Sub-agents`,pluginsSettings:`Plugins`,configureOpenPi:`Configure OpenPI`,setupRequestReviewAll:`review every OpenPI configuration area with me`,setupRequestSetTheme:`set only the OpenPI Web theme to {{value}} and preserve every other setting`,setupRequestSetChatWidth:`set only the OpenPI Web chat content width to {{value}}px and preserve every other setting`,setupRequestSetChatFontSize:`set only the OpenPI Web chat font size to {{value}}px and preserve every other setting`,setupRequestEnableExpandedThinking:`expand thinking blocks by default in OpenPI Web and preserve every other setting`,setupRequestDisableExpandedThinking:`collapse thinking blocks by default in OpenPI Web and preserve every other setting`,setupRequestSubagents:`review and configure Agent role models and workflow limits`,setupRequestFailed:`The OpenPI setup request was not accepted.`,setupRequestRunning:`Applying OpenPI settings…`,setupRequestAccepted:`Configuration request accepted.`,setupPlanBlocked:`Exit Plan mode before changing agent configuration. Display settings can be changed directly; exiting does not start implementation.`,setupPlanBusy:`Agent configuration requires an idle turn and leaving Plan mode. Display settings can be changed now.`,setupOutcome_pending:`Configuration request is awaiting a save receipt.`,toolCallArguments:`Tool arguments`,toolCallOutput:`Tool result`,setupOutcome_saved:`OpenPI configuration was saved and applied.`,setupOutcome_unchanged:`Configuration was saved; effective settings are unchanged.`,setupOutcome_failed:`The setup request failed. Review the error and current settings before retrying.`,setupOutcome_cancelled:`Setup was cancelled without a confirmed save.`,setupOutcome_unconfirmed:`No successful save was confirmed. Review current settings before retrying /openpi-setup.`,settingsUpdateFailed:`The Web preference could not be saved.`,settingsPreferencesSaved:`Preferences saved.`,settingsPreferencesSaveFailed:`Could not save display settings. Check configuration diagnostics and retry.`,settingsCatalogLoading:`Loading Pi resources…`,settingsCatalogFailed:`Could not load Pi settings resources.`,appearance:`Appearance`,settingsPersonal:`Personal`,settingsAgent:`Agent`,settingsIntegrations:`Integrations`,settingsArchivedChats:`Archived chats`,settingsSearch:`Search settings`,settingsClearSearch:`Clear search`,settingsNoResults:`No matching settings`,appearanceVisualStyle:`Visual style`,appearanceMode:`Mode`,appearanceTheme:`Theme`,appearanceAccent:`Accent color`,appearanceBackground:`Background`,appearanceForeground:`Foreground`,appearanceFont:`Font`,appearanceFont_codex:`Codex default`,appearanceFont_sans:`Sans serif`,appearanceFont_serif:`Serif`,appearanceFont_mono:`Monospace`,appearanceAccent0:`Default`,appearanceAccent1:`Blue`,appearanceAccent2:`Purple`,appearanceAccent3:`Pink`,appearanceAccent4:`Orange`,appearanceAccent5:`Green`,appearanceCustomAccent:`Custom accent color`,appearanceAdvanced:`Advanced`,appearanceReset:`Restore defaults`,appearanceResetAction:`Reset appearance`,appearanceImport:`Import theme`,appearanceCopy:`Copy theme`,appearanceCopied:`Theme copied`,appearanceCopyFailed:`Could not copy theme. Try again.`,appearanceThemeValue:`Theme data`,appearanceImportPlaceholder:`Paste an OpenPI theme…`,appearanceImportInvalid:`Enter valid OpenPI theme data.`,appearanceImportAction:`Import`,searchArchivedChats:`Search archived chats`,archiveProjectFilter:`Filter by project`,archiveAllProjects:`All projects`,archiveProjectGroup:`{{project}} · {{count}} archived chats`,archiveSort:`Sort archived chats`,archiveSortUpdated:`Last updated`,archiveSortCreated:`Date created`,restoreArchivedChat:`Restore {{title}}`,themeLight:`Light`,themeDark:`Dark`,themeMist:`Mist`,themeRose:`Rose`,themePine:`Pine`,themeSystem:`System`,conversationSettings:`Conversation`,expandThinkingByDefault:`Expand thinking by default`,chatContentWidth:`Chat content width`,chatFontSize:`Chat font size`,agentBehavior:`Agent behavior`,workflowLimits:`Workflow limits`,workflowConcurrency:`Workflow concurrency`,workflowCalls:`Total calls`,agentSettingsSetupHint:`Agent changes are applied through /openpi-setup in the current session.`,setupRequestLimits:`Set workflow concurrency to {{concurrency}} and total agent calls to {{calls}}. Preserve other settings.`,setupRequestEnableSuggestions:`Enable next-action suggestions. Help me choose a model if required; preserve other settings.`,setupRequestDisableSuggestions:`Disable next-action suggestions. Preserve other settings.`,setupRequestPostEdit:`Help me configure or disable the post-edit command. Show the current configuration and ask which command to use.`,configurePostEdit:`Configure post-edit command`,workflowLimitsValue:`{{concurrency}} concurrent · {{calls}} total calls`,nextActionSuggestions:`Next-action suggestions`,nextActionSuggestionsDetail:`Offer a few useful next actions when the current task finishes.`,enabled:`Enabled`,disabled:`Disabled`,configured:`Configured`,postEditCommand:`Post-edit command`,postEditCommandDetail:`Run a command after edits. Nothing runs while this is off.`,resultDisplay:`Default result display`,subagentResults:`Subagent results`,bashOperations:`Bash operations`,fileMutations:`Write / Edit operations`,footer:`Footer`,terminalFooter:`Pi terminal footer`,terminalFooterStyle:`Terminal footer style`,terminalFooterHint:`Applies to Pi's command-line interface. An already open Pi interface updates when restarted or when setup is applied.`,detailDisplay_full:`Full`,detailDisplay_compact:`Compact`,sessionSettings:`Session`,currentModel:`Current`,providerCurrentSessionModel:`This conversation uses {{model}}.`,useThisModel:`Use model`,model:`Model`,modelConnection:`Model connection`,provider:`Provider`,modelId:`Model ID`,providerStatusUnavailable:`This provider is not present in the bounded authentication snapshot.`,providerSettings:`Provider credentials`,providerSettingsIntro:`Inspect which Pi providers can authenticate the current Web session.`,openRuntimeDetails:`Open runtime details`,currentWorkspace:`Current workspace`,providerAuth_api_key:`API key`,providerAuth_oauth:`OAuth`,providerAuthUnknown:`Authentication method not reported`,authentication:`Authentication`,accessType:`Access`,providerAccessSubscription:`Subscription account`,providerAccessStandard:`Provider credentials`,configurationOwner:`Configuration owner`,providerLoading:`Loading provider status…`,providerLoadFailed:`Could not load provider status.`,providerReadOnly:`Managed by Pi`,selectProvider:`Select a provider`,gitReviewBaselineUnavailable:`No usable session baseline was retained (it may exceed the capture limit). Choose Unstaged, Staged or Branch to inspect Git changes, or open the session file records.`,modelsIntro:`Sign in with an account or add an API key. Your existing Pi connections are available here.`,modelConnectionsTitle:`Model connections`,modelConnectionsIntro:`Manage credentials and choose models for new and current chats.`,accountLoginMethod:`Connection method`,accountLoginTab:`Account`,accountLoginChatGPT:`ChatGPT account`,accountLoginClaude:`Claude account`,accountLoginKeyTab:`API key`,accountLoginConfigured:`Account signed in`,accountLoginIntro:`Continue in your browser. No API key needed.`,accountLoginExisting:`Your account credential is saved in Pi.`,accountLoginStart:`Sign in`,accountLoginAgain:`Sign in again`,accountLoginUnsaved:`Save or discard your other changes before signing in.`,accountLoginStarting:`Preparing sign-in…`,accountLoginWaiting:`Waiting for authorization`,accountLoginChoose:`Choose how to sign in`,accountLoginCancelling:`Cancelling sign-in…`,accountLoginBrowser:`Continue in browser`,accountLoginDevice:`Use a device code`,accountLoginBrowserOption:`Sign in on this computer. Returns here automatically.`,accountLoginDeviceOption:`For remote servers or when browser sign-in is unavailable.`,accountLoginBrowserHelp:`Open the sign-in page and approve access. This page updates automatically.`,accountLoginDeviceHelp:`Open the authorization page and enter this code. Keep this page open.`,accountLoginOpen:`Open sign-in page`,accountLoginCopyCode:`Copy device code`,accountLoginPaste:`Authorization code or callback URL`,accountLoginContinue:`Continue`,accountLoginFallback:`Signed in but still waiting?`,accountLoginRemoteHelp:`If automatic return does not work, copy the final callback URL from your browser and paste it here.`,accountLoginCancel:`Cancel sign-in`,accountLogin_failed:`Sign-in failed. Try again or choose another method.`,accountLogin_expired:`Sign-in expired. Start again to get a new authorization link.`,accountLogin_cancelled:`Sign-in cancelled.`,accountLoginRequestFailed:`The request did not complete. Refresh status before retrying.`,accountLoginStatusUnknown:`Cannot check sign-in status. Your authorization may still be in progress.`,accountLoginRefreshRequired:`The credential was saved, but Pi could not update its model list. Reload Pi before using this connection.`,accountLogout:`Sign out`,accountLogoutRefreshRequired:`The saved credential was removed, but Pi could not update its model list. Reload Pi to refresh the status.`,accountLogoutTitle:`Sign out of {{provider}}?`,accountLogoutDetail:`Removes this provider’s saved credential from Pi on this machine. Other Pi sessions using it will also need to sign in again. Environment credentials are unchanged.`,providerInputTypes:`Input types`,providerInputText:`Text`,providerInputImage:`Images`,providerCustomTag:`Custom`,providerEdit:`Edit`,providerRemove:`Delete`,providerSave:`Save`,editProvider:`Edit {{provider}}`,removeProvider:`Delete {{provider}}`,providerAdd:`Add model provider`,providerAddMode:`How to add`,providerAddCatalog:`Third-party providers`,providerAddCustom:`Custom model API`,providerAccountHint:`Use an existing account to connect. Choose a provider and continue in your browser.`,providerCatalogHint:`Choose a provider from the built-in catalog and enter its API key.`,providerCustomHint:`Connect a gateway or self-hosted service using an OpenAI or Anthropic compatible API.`,providerKeyKeep:`Leave blank to keep the existing key`,providerKeyOptional:`Enter an API key, or leave blank to use environment authentication`,providerDisplayName:`Provider name`,providerCustomSettings:`Custom settings`,providerSaved:`Saved {{provider}}.`,modelDefaultTitle:`Default for new chats`,modelDefaultChoose:`Choose model`,modelDefaultBadge:`Default`,modelCurrentBadge:`In use`,modelDefaultNotSet:`Not set · Pi chooses when a new chat starts`,modelDefaultHint:`Choose the model for future chats. Existing chats keep their own model. This also updates Pi's default.`,modelDefaultReadFailed:`Could not read the default model.`,modelDefaultProjectOverride:`This workspace has a Pi override: {{model}}.`,modelDefaultSave:`Save default`,modelMakeDefault:`Also make this the default for new chats`,modelDefaultSaveFailed:`The default was not confirmed. Refresh status and try again.`,modelDefaultPartial:`The chat model changed, but saving the default was not confirmed. Refresh status before retrying.`,modelConnectionNextHint:`Choose a model from this connection to use in the current chat.`,modelConnectionSearch:`Search models…`,modelConnectionChooseProvider:`Choose a model from {{provider}}`,modelConnectionUse:`Use in this chat`,modelConnectionUseFailed:`The model change was not confirmed. Refresh the model list and try again.`,modelConnectionLoadFailed:`Could not load models.`,modelConnectionNoModels:`No selectable models yet. Check the connection or add a model definition.`,modelConnectionNoMatch:`No matching models.`,modelConnectionMore:`{{count}} more models. Search to narrow the list.`,providerModelsEmpty:`No models yet. Fetch available models or add one manually.`,providerModelsInherited:`Uses the provider’s built-in model catalog.`,providerModelsReadOnly:`This provider contains model settings that must be edited in Pi’s configuration file.`,providerModelId:`Model {{number}} ID`,providerModelName:`Model {{number}} name`,providerModelDetails:`Model details: {{model}}`,providerRemoveModel:`Remove model: {{model}}`,providerIdInvalid:`Use a unique provider ID with letters, numbers, hyphens, dots or underscores.`,providerNativeAuth:`This provider uses Pi’s native sign-in.`,providerConfigurationFailed:`Could not save. Check the fields and retry when the session is idle.`,providerProfileSavedKeyFailed:`The provider was saved, but its API key was not. Retry saving the key.`,providerReload:`Discard draft and reload`,providerCurrentRemoval:`Select another model before removing the model currently in use.`,providerRemoveDetail:`Remove this provider’s configuration and custom models? Credentials managed by Pi are kept.`,providerPickerIntro:`Select the models you want to add from this provider.`,providerPickerSelected:`{{count}} selected`,providerApiKey:`API key`,providerKeyPlaceholder:`Paste a key to add or replace it`,saveProviderKey:`Save API key`,savingSettings:`Saving…`,keepEditing:`Keep editing`,discardAndContinue:`Discard and continue`,unsavedSettingsTitle:`Discard unsaved changes?`,unsavedSettingsDetail:`Unsaved model and credential changes will be lost.`,unsavedCredentialTitle:`Discard the unsaved credential?`,unsavedCredentialDetail:`The new key has not been saved and will be cleared.`,modelSelectionBusy:`This session is busy. Model changes are unavailable.`,providerKeySaved:`Saved to Pi credentials. Existing keys are never displayed.`,providerSaveFailed:`Credential save did not complete. Wait until the session is idle, refresh status and retry. Some providers need additional authentication settings.`,providerWriteDetail:`Save API keys here directly to Pi. Keys never enter a model conversation. For OAuth or additional provider fields, use Pi's native login.`,editModelConfiguration:`Add or edit a custom model`,modelConfigurationDetail:`Set up a provider connection, then choose available models or add one manually. Saving does not send a model request.`,configuredModels:`Custom model configuration`,addModel:`Add a model`,modelConfig_provider:`Provider ID`,modelConfig_id:`Model ID`,modelConfig_name:`Display name`,modelConfig_baseUrl:`API base URL`,modelConfig_api:`API format`,modelConfig_contextWindow:`Context window`,modelConfig_maxTokens:`Max output tokens`,providerCapacityLabel:`{{field}} {{number}}`,providerModelOptions:`Model options`,providerModelInvalid:`Model {{number}}: use a unique model ID and positive token counts, such as 128K or 1M. Leave capacities blank to use defaults.`,modelConfig_reasoning:`Supports reasoning`,saveModelConfiguration:`Save model`,reloadModelConfiguration:`Discard draft and load latest`,retryModelConfiguration:`Retry loading`,discardModelDraftTitle:`Discard this model draft?`,discardModelDraftDetail:`The latest configuration will replace this unsaved draft.`,discardAndReload:`Discard and reload`,modelConfigurationUnsaved:`Unsaved changes`,modelConfigurationConflict:`Model configuration changed elsewhere. Your draft is unchanged.`,modelConfigurationLoadFailed:`Could not load model configuration. Your draft is unchanged.`,modelConfigurationSaved:`Saved to Pi models.json. Configure the provider API key to make this model available.`,modelConfigurationFailed:`Model save did not complete. Your draft is unchanged.`,setupConfigurationRequest:`Configuration request`,configureViaSetup:`Apply via OpenPI setup`,setupFormDetail:`Uses /openpi-setup. Follow progress and any required confirmation in the conversation; submission does not mean the configuration is saved.`,setupSkillsPlaceholder:`Describe the skill to add or configure, including its source or local path`,setupPluginsPlaceholder:`Describe the Pi package to configure, including its exact package name or local path`,enableSkillInvocation:`Allow model invocation`,disableSkillInvocation:`Require explicit invocation`,setupSkillInvocationRequest:`Configure this Pi skill: {{path}}. Set its native disable-model-invocation field to {{disabled}}. Preserve other content and explain when the change takes effect.`,setupRoleFormRequest:`Configure the OpenPI {{role}} role to use {{model}} and set workflow concurrency to {{concurrency}}. Inherit parent thinking, validate the selection and preserve unrelated configuration.`,providerReadOnlyDetail:`This page is read-only and never receives credential values. Configure provider authentication through Pi, then refresh this status.`,openProviderSettings:`Open provider settings`,credentialConfigured:`Configured`,credentialMissing:`Not configured`,authNotVerified:`Configured credentials do not guarantee a successful model request.`,configurationViaPi:`Read-only status. Manage model credentials and trust through Pi; manage OpenPI options with /openpi-setup.`,noSkillsFound:`No skills are loaded for this Session.`,addSkill:`Add skill`,addPlugin:`Add plugin`,searchResources:`Search by name or source`,filterResourceScope:`Resource scope`,allResourceScopes:`All scopes`,noMatchingResources:`No matching resources`,resourceBulkTooLarge:`Filter the list further before submitting a bulk request.`,resourceManagement:`Pi resources`,resourceSourceAuto:`Pi automatic discovery`,resourceSourceLocal:`Local resource`,resourcePackageSource:`Package, repository or local path`,resourcePackageSourcePlaceholder:`npm:package@version · git:owner/repo · /path/to/skill`,resourceInstallIntro:`Choose a source and scope. OpenPI setup will review and apply the request in the conversation.`,resourceInstallReview:`Review the exact source and permissions in the conversation. Submitting this request does not mean it is installed or loaded.`,resourceRequestSubmitted:`Request submitted. Follow progress and confirmations in the conversation, then refresh this catalog.`,browseSkills:`Browse skills.sh`,resourceSessionState:`Apply to this Session`,resourcesReloadNote:`Refresh reads the catalog. Reload applies saved resources to this idle Session; changes are never reloaded automatically.`,reloadResources:`Reload resources`,resourceReloadReview:`Apply saved Pi skill and plugin configuration and restart extensions in the current Session? Wait for running work to finish first.`,resourceReloaded:`Resources reloaded. Review the refreshed catalog and diagnostics.`,resourceReloadFailed:`Could not reload resources. Wait for this Session to become idle and refresh before retrying.`,advancedResourceConfiguration:`Advanced configuration`,resourceDiagnostics:`Pi reports {{extensionErrors}} extension diagnostics and {{skillErrors}} skill diagnostics.`,resourceConfigurationDiagnostics:`{{count}} settings files could not be read. Review Pi configuration diagnostics.`,resourceCatalogTruncated:`This catalog is bounded; some resources are omitted.`,resourceTargetTruncated:`This source or path is truncated. Confirm the full target through Advanced configuration before making changes.`,updateResource:`Review update`,removeResource:`Review removal`,skillsEmptyTitle:`Add your first skill`,skillsEmptyIntro:`Skills give Pi reusable instructions. Add a package, repository or local skill; project skills follow Pi project trust.`,pluginsEmptyTitle:`Extend Pi with a plugin`,pluginsEmptyIntro:`Packages can include extensions, skills, prompts and themes. Add a source to review its installation through OpenPI setup.`,pluginCount:`{{count}} plugin sources`,installedVersion:`Installed version`,configuredVersion:`Configured version`,resourceVersionUnpinned:`Not pinned / local source`,pluginState_loaded:`Session resources loaded`,pluginState_installed:`Installed · not loaded`,pluginState_disabled:`Disabled in configuration`,pluginState_missing:`Package missing`,pluginState_error:`Load diagnostics`,pluginState_notLoaded:`Not loaded`,pluginLoadedResources:`{{count}} resources in this Session's catalog. Configuration changes require an explicit reload.`,pluginAction_enable:`Review enable`,pluginAction_disable:`Review disable`,pluginAction_update:`Review update`,pluginAction_remove:`Review removal`,enableVisibleSkills:`Allow model use ({{count}} shown)`,disableVisibleSkills:`Explicit use only ({{count}} shown)`,enableVisiblePlugins:`Enable {{count}} shown packages`,disableVisiblePlugins:`Disable {{count}} shown packages`,setupResourceInstallRequest:`Add these Pi {{kind}} from source {{source}} in scope {{scope}}. Inspect the source and resolve a fixed package identity, review required installation permissions with me using ask_user, then use Pi's native package/skill configuration. For a skill request, preserve unrelated extensions and other resources. Preserve existing preferences and project trust; do not reload this Session automatically. Report saved configuration and any remaining action separately. Do not change unrelated OpenPI settings.`,setupPluginOperationRequest:`Review Pi package action {{action}} for exactly configured source {{source}}, native root {{path}}, scope {{scope}}. Resolve relative sources against the native scope's settings directory. Use Pi's native package management. For updates, inspect available versions and review a fixed target identity and required permissions with me using ask_user before installing. Preserve resource filters and all unrelated preferences; if a toggle would destroy filters, stop and explain. Removal must not delete a local source directory. Do not reload automatically. Report persisted and active states separately; do not change unrelated OpenPI settings.`,setupSkillManageRequest:`Review Pi skill action {{action}} for exactly file {{path}}, source {{source}}, scope {{scope}}. Inspect native ownership first. Review the update/removal and required permissions with me using ask_user. Preserve unrelated skills and package resources; do not remove an entire shared package to remove one skill. Preserve project trust and do not reload automatically. Do not change unrelated OpenPI settings.`,setupSkillsBulkRequest:`For exactly these currently displayed Pi skill files {{paths}}, set native disable-model-invocation to {{disabled}}. Inspect ownership, preserve all other content and preferences, review necessary changes with me, and report any files that cannot be changed safely. Explicit /skill invocation remains available. Do not reload automatically or change unrelated OpenPI settings.`,setupPluginsBulkRequest:`For exactly these currently displayed Pi packages {{packages}}, set disabled to {{disabled}} through native Pi configuration. Preserve all other preferences and resource filters; skip and report entries whose filters cannot be preserved. Respect scope and project trust, review necessary changes with me, and do not reload automatically or change unrelated OpenPI settings.`,resourceRequestFinished:`The setup turn has ended. Refresh and inspect Pi's configuration and Session resources to confirm what changed.`,skillCount_one:`{{count}} skill`,skillCount_other:`{{count}} skills`,skill:`Skill`,copySkillInvocation:`Copy invocation`,source:`Source`,scope:`Scope`,invocation:`Invocation`,modelInvocation:`Model invocation`,resourceScope_user:`Global`,resourceScope_project:`Project`,resourceScope_temporary:`Temporary`,explicitOnly:`Explicit invocation only`,availableToModel:`Available to the model`,skillFile:`Skill file`,selectSkill:`Select a skill`,subagentConfiguration:`Pi-native subagent roles`,subagentConfigurationIntro:`Role models inherit from the parent unless OpenPI setup assigns an available model.`,subagentActiveCount_one:`{{count}} active`,subagentActiveCount_other:`{{count}} active`,subagentCompletedCount_one:`{{count}} recorded`,subagentCompletedCount_other:`{{count}} recorded`,subagentConcurrency:`Limit {{count}}`,builtInRoles:`Built-in roles`,subagentRole_explorer:`Explorer`,subagentRole_implementer:`Implementer`,subagentRole_reviewer:`Reviewer`,subagentRole_advisor:`Advisor`,subagentRoleShort_explorer:`Read-only investigation`,subagentRoleShort_implementer:`Focused implementation`,subagentRoleShort_reviewer:`Correctness review`,subagentRoleShort_advisor:`Technical analysis`,subagentRoleDescription_explorer:`Explores the codebase and reports evidence without modifying files.`,subagentRoleDescription_implementer:`Implements a bounded change and runs the relevant repository checks.`,subagentRoleDescription_reviewer:`Reviews correctness, safety, regressions, and missing validation.`,subagentRoleDescription_advisor:`Analyzes difficult technical questions and recommends a concrete next step.`,configureRoles:`Configure roles`,builtInRole:`Built-in role`,builtIn:`Built-in`,modelAssignment:`Model assignment`,inheritParentModel:`Inherit parent model`,effectiveModel:`Effective model`,workflowConcurrencyLabel:`Concurrent agents`,workflowCallLimit:`Total agent calls`,runtimeBoundaries:`Runtime boundaries`,subagentAuthorityNote:`Child authority is the fail-closed intersection of the parent Session and role capabilities.`,subagentModelNote:`No hardcoded provider is introduced; an unassigned role follows the parent model and thinking level.`,resourceCount_one:`{{count}} resource`,resourceCount_other:`{{count}} resources`,noPluginsFound:`No loaded plugin sources were reported.`,pluginCatalogTotals:`{{extensions}} ext · {{skills}} skills · {{prompts}} prompts · {{themes}} themes`,loaded:`Loaded`,resourceOrigin:`Origin`,resourceOrigin_package:`Package`,resourceOrigin_topLevel:`Top-level resource`,resources:`Resources`,baseDirectory:`Base directory`,notReported:`Not reported`,extensions:`Extensions`,extensionSurfaceCount:`{{tools}} tools · {{commands}} commands`,prompts:`Prompts`,themes:`Themes`,pluginResourceSummary:`{{extensions}} ext · {{skills}} skills · {{prompts}} prompts · {{themes}} themes`,pluginsManagedByPi:`These resources are loaded by Pi. Submit changes using the setup form above. Package changes follow native confirmation and take effect through Pi's reload lifecycle.`,selectPlugin:`Select a plugin source`,statusCaptured:`Snapshot at {{time}} · refresh for the latest state`,conversationViews:`Conversation views`,currentConversations:`Current`,archivedConversations:`Archived`,refreshArchives:`Refresh archived conversations`,loadingArchives:`Loading archived conversations...`,moreArchives:`Load more archived conversations`,retryArchives:`Retry archived conversations`,archiveLoadFailed:`Could not load archived conversations.`,archiveCursorStale:`Archived conversations changed. Refresh to continue.`,archiveScanBounded:`{{count}} older records have not been scanned.`,noArchivedSessions:`No archived conversations.`,noScannedArchives:`No archived conversations in the scanned history.`,noMatchingScannedArchives:`No matching archived conversations in the scanned history.`,draftLimit:`Draft storage is full. Send or clear an existing draft before adding more content.`,restoreConversation:`Restore conversation`,restoringConversation:`Restoring…`,loadedArchives:`Archived conversations in the loaded history`,loadedHistoryBounded:`{{sessions}} more sessions and {{workspaces}} workspace summaries are not loaded. Search covers the loaded list only.`,noLoadedArchives:`No archived conversations in this loaded list.`,restoreFailed:`Could not confirm restoration. Refresh and try again.`,execution_running:`Running`,execution_done:`Completed`,execution_killed:`Stopped`,execution_timed_out:`Timed out`,execution_failed:`Failed`,execution_uncertain:`Uncertain`,activeOnlyHint:`Only the active Web session accepts messages.`,acceptedHint:`Message accepted by OpenPI Web.`,promptAdmissionUnknown:`It is unclear whether the last message was received.`,promptAdmissionUnknownDetail:`Review the refreshed Session history and runtime status before deciding. Sending as a new message may create a duplicate message.`,promptAdmissionCheckingDetail:`Checking the latest Session history and runtime status before resend options are enabled.`,promptAdmissionVerificationFailedDetail:`Could not refresh the latest Session history and runtime status. Check again before sending as a new message.`,abandonAdmission:`Don't resend for now`,retryAdmissionCheck:`Check again`,retryOriginalAdmission:`Retry original message`,promptTooLong:`Message exceeds the send limit ({{count}} / {{limit}}).`,sendAsNew:`Send as new message`,sendingAsNew:`Sending…`,stopTurn:`Stop current turn`,stoppingTurn:`Stopping current turn…`,stoppedTurn:`Current turn stopped.`,pendingFollowUpsHint:`{{count}} messages queued`,sendNextTurn:`Send next turn`,followUpBehavior:`Follow-up behavior`,followUpBehaviorDetail:`While OpenPI is running, queue new messages for the next turn or guide the current turn. Press ⌘/Ctrl+Enter to use the other option once.`,followUpQueue:`Queue`,followUpQueueDetail:`Next turn`,followUpSteer:`Steer`,followUpSteerDetail:`Current turn`,steerCurrentTurn:`Steer current turn`,steeringHint:`Use this instruction after the current tool step finishes.`,pendingSteeringHint:`{{count}} instructions received; waiting for the current tool step`,steeringMessagesTitle:`Pending instructions for this turn`,steerStaleTurn:`That turn has ended or changed. Your draft is kept. Check the updated status and send again.`,sourceFeedbackNew:`{{path}} · new line {{line}}`,sourceFeedbackOld:`{{path}} · old line {{line}}`,forkMessage:`Fork from here`,forkMessageHint:`Create a new conversation from this message. Keep the original conversation; no message is sent.`,forkSessionPending:`Creating a fork…`,forkSessionCreated:`Fork created. The original conversation remains in the sidebar.`,forkSessionCancelled:`Fork cancelled. The original conversation is kept.`,forkSessionUncertain:`The fork could not be confirmed. Refresh and inspect your conversations before trying again.`,forkSessionUnavailable:`Switch to this conversation and let its current work and queued messages finish before forking.`,reviewQuoteLine:`Reference this line`,reviewSelectOldLine:`Select old line {{line}}`,reviewSelectNewLine:`Select new line {{line}}`,queuedMore:`{{count}} more queued`,queuedImage:`Image attachment`,queuedMessageExpand:`Expand queued message`,queuedMessageCollapse:`Collapse queued message`,backgroundSessionRunning:`This session is running in the background…`,observedSessionTools:`{{count}} active tools`,toolsRequireCurrentSession:`Switch to this session to use interactive tools.`,activateViewedSession:`Switch to this session`,activateViewedSessionHint:`Send a message to continue this conversation.`,addWorkspace:`Add workspace`,addWorkspaceMenu:`Add workspace...`,archiveConversation:`Archive conversation`,pinnedConversations:`Pinned`,sidebarOptions:`Sidebar options`,sidebarProjectOptions:`Project sidebar options`,sidebarRecentOptions:`Chat sidebar options`,sidebarActivityOptions:`Activity view options`,sidebarShow:`Show`,sidebarGroupBy:`Group conversations`,sidebarByProject:`By project`,sidebarFlatList:`All conversations`,sidebarChatSort:`Conversation order`,sidebarRecent:`Recent`,sidebarProjectsInRecents:`Show projects in Recent`,sidebarShowMore:`Show more`,sidebarShowLess:`Show less`,sidebarFilterList:`Filter this list`,sidebarSaveFailed:`Could not save the change. Please try again.`,pinWorkspace:`Pin project`,unpinWorkspace:`Unpin project`,markConversationRead:`Mark as read`,markConversationUnread:`Mark as unread`,sidebarState_unread:`Unread conversation`,sidebarActivity:`Activity`,sidebarViewActivity:`View activity`,sidebarViewChats:`View conversations`,sidebarPriority:`Priority`,sidebarActivityEmpty:`Nothing needs attention`,sidebarActivityEmptyHint:`Completed work and conversations needing your attention appear here.`,sidebarMarkAllRead:`Mark all as read`,sidebarClearRead:`Clear read chats from Priority`,sidebarReadFailed:`Could not update read status. Please try again.`,sidebarToday:`Today`,sidebarYesterday:`Yesterday`,sidebarEarlier:`Earlier`,sidebarActivityCompleted:`Completed`,sidebarActivityFailed:`Failed`,sidebarActivityRead:`Read`,modelAdvanced:`Advanced parameters`,providerConnectionHeading:`Provider connection`,providerFetchModels:`Get available models`,providerFetchHint:`Enter the provider and endpoint, then choose models in one step.`,providerPickerTitle:`Choose models to add`,providerPickerAccess:`Connection credentials`,providerPickerKey:`Access key (optional)`,providerPickerKeyHint:`Leave blank to use saved credentials for this endpoint. A key entered here is used for discovery only and is not saved.`,providerPickerSearch:`Search models`,providerPickerSelectAll:`Select all`,providerPickerClear:`Clear selection`,providerPickerLoading:`Reading available models…`,providerPickerAdded:`Added`,providerPickerNoMatch:`No matching models`,providerPickerEmpty:`No models returned. You can still add one manually.`,providerPickerBounded:`Showing the first 500 models. Add other IDs manually.`,providerPickerError_load:`Could not read the model list. Check the endpoint and credentials, then retry or add a model manually.`,providerPickerError_save:`Could not confirm the save. Your selection is kept; check the connection before retrying.`,providerPickerError_conflict:`Configuration changed elsewhere. Close this dialog and reload configuration before saving again.`,providerPickerDefaults:`New models use {{context}} context / {{output}} output tokens. You can adjust these per model after adding.`,providerPickerRetry:`Refresh list`,providerPickerCount:`{{count}} selected · up to 100`,providerPickerSave:`Add selected`,sidebarState_running:`Running`,sidebarState_compacting:`Organizing context`,sidebarState_waiting:`Waiting for your response`,sidebarState_completed:`Completed · unread result`,sidebarState_failed:`Failed · open conversation for details`,pinnedOptions:`Pinned options`,pinConversation:`Pin conversation`,unpinConversation:`Unpin conversation`,pinnedRecentlyUpdated:`Recently updated`,pinnedManualOrder:`Manual order`,movePinUp:`Move up`,movePinDown:`Move down`,pinSaveFailed:`Could not save pinned conversations. Please try again.`,cancel:`Cancel`,chooseWorkspaceHint:`Choose a workspace and describe the work`,close:`Close`,closeSearch:`Close search`,collapseSidebar:`Collapse sidebar`,confirmEdit:`Save and rerun`,editMessageHint:`Rerun from here in a new branch. Keep the original conversation, images and file references. Existing workspace changes are kept.`,regenerateMessage:`Regenerate response`,regenerateMessageHint:`Rerun this question in a new branch, keeping its original attachments and conversation.`,messageRerunStarted:`Rerun admitted in a new branch. The original conversation is kept.`,openOriginalConversation:`View original conversation`,messageRerunWorkspaceHint:`Existing workspace changes are kept.`,modelRequestRecovered:`Request recovered`,modelReconnecting:`Reconnecting`,modelReconnectUnknown:`Reconnection status unconfirmed`,modelEarlierAttempts:`Earlier request errors`,modelFailedAttempts:`Failed attempts ({{count}})`,draftStorageUnavailable:`Draft could not be saved on this device. Keep this page open or copy your message.`,draftStorageInvalid:`Some saved draft content could not be restored. Check your message and attachments.`,draftStorageRetry:`Retry saving draft`,workbarBackToChat:`Back to chat`,workbarCollapseTools:`Collapse tools`,workbarEndTerminal:`Close {{name}} and end its process`,workbarNewTerminal:`New terminal`,workbarContinueInChat:`Continue in chat`,transcriptSearch:`Search message contents`,transcriptSearchPlaceholder:`Search titles, projects, or messages…`,transcriptSearchRecent:`Recent conversations`,transcriptSearchSessions:`Conversations`,transcriptSearchMessages:`Message contents`,transcriptSearchSessionResult:`Open conversation {{session}}`,transcriptSearchSessionOpenFailed:`Could not open this conversation. Try again.`,transcriptSearchIncludeArchived:`Include archived conversations`,transcriptSearching:`Searching messages…`,transcriptSearchEmpty:`No matching messages found.`,transcriptSearchFailed:`Could not search messages. Try again.`,transcriptSearchRetry:`Retry search`,transcriptSearchPartial:`Some history could not be searched. Results may be incomplete.`,transcriptSearchOpenFailed:`This message could not be opened. It may have moved or belong to another branch.`,transcriptSearchResult:`Open message from {{source}} in {{session}}`,transcriptSearchSource_user:`you`,transcriptSearchSource_assistant:`assistant`,transcriptSearchSource_tool_call:`tool call`,transcriptSearchSource_tool_result:`tool output`,connected:`Connected`,connecting:`Connecting`,conversationName:`Conversation name`,conversationOptions:`Conversation options`,sidebarRename:`Rename`,sidebarPin:`Pin`,sidebarUnpin:`Unpin`,sidebarFork:`Fork`,sidebarForkLocal:`Fork chat`,sidebarForkSameWorktree:`Fork in same worktree`,archiveNoticeTitle:`Chat archived`,archiveNoticeView:`View`,archiveNoticeUndo:`Undo`,archiveNoticeFailed:`Could not complete this action. Try again.`,sidebarForkWorktree:`Fork chat in new worktree`,sidebarForkCancelling:`Requesting cancellation…`,sidebarForkFinishing:`Cancellation is no longer available. Confirming the result…`,sidebarForkCancelUnconfirmed:`Cancellation could not be confirmed. Waiting for the fork result.`,sidebarForkWorktreePreserved:`The worktree was kept at {{path}}. Inspect it before retrying.`,sidebarForkWorktreePending:`Creating a worktree and conversation…`,sidebarForkOptionsLoading:`Checking worktree availability…`,sidebarForkOptionsFailed:`Unable to check worktrees. Reopen menu to retry.`,sidebarForkUnavailable:`Send a message before forking this conversation.`,sidebarForkArchived:`Restore this conversation before forking.`,sidebarForkFailed:`Could not create the fork. The original conversation is unchanged.`,sidebarCopy:`Copy`,sidebarCopyLink:`Copy conversation link`,sidebarCopyMarkdown:`Copy as Markdown`,sidebarCopyCwd:`Copy working directory`,sidebarCopied:`Copied`,sidebarCopyFailed:`Could not copy. Try again.`,sidebarNewWindow:`Open in new window`,sidebarOpenIn:`Open in`,sidebarAppsLoading:`Loading available apps…`,sidebarAppsFailed:`Unable to load apps. Reopen menu to retry.`,sidebarOpenFailed:`Unable to open this project in the selected app.`,sidebarArchive:`Archive`,sidebarRestore:`Restore`,sidebarDelete:`Permanently delete`,managedWorktreeRecoveryFull:`Check earlier unfinished removal requests before starting another.`,managedWorktreesChanged:`The worktree list changed. Refresh it before reviewing a target.`,managedWorktreesRefresh:`Refresh worktrees`,managedWorktreesBack:`Back to worktrees`,managedWorktreesRetry:`Retry request`,managedWorktrees:`Retained worktrees`,managedWorktreesDescription:`Worktrees created by OpenPI are kept when a conversation is deleted. Review an exact path before requesting removal. Active, shared, changed or unverified worktrees stay in place.`,managedWorktreeConfirm:`Remove this managed worktree? The server rechecks ownership, active conversations and local changes before removal.`,managedWorktreeRemoved:`Worktree removed.`,managedWorktreePreserved:`Worktree kept:`,managedWorktreeUncertainTerminal:`Removal outcome is uncertain. Automatic removal cannot be repeated. Inspect the retained path before taking further action.`,managedWorktreeUncertain:`Removal outcome is unknown. Retry to check the original request.`,managedWorktreeRemoving:`Checking and removing…`,managedWorktreeRemove:`Remove worktree`,managedWorktreeReview:`Review removal`,managedWorktreesEmpty:`No managed worktrees were found on this page.`,managedWorktreesUnavailable:`{{count}} ownership records could not be verified.`,managedWorktreesLoadFailed:`Could not load retained worktrees. Retry without changing the target.`,managedWorktreesMore:`Load more worktrees`,managedWorktreeRetainedAfterDelete:`Conversation deleted. Worktree kept at {{path}}. Review retained worktrees in the project menu.`,sidebarDeleteTitle:`Delete conversation?`,sidebarDeleteDescription:`Permanently delete “{{name}}”? This cannot be undone.`,sidebarDeleteConfirm:`Delete`,sidebarDeleting:`Deleting…`,sidebarDeleteFailed:`Could not delete this conversation. Retry or cancel.`,sidebarActionRunning:`Let current work and queued messages finish first.`,sidebarActionDisconnected:`Reconnect before changing this conversation.`,sessionDeleteCancelled:`Deletion cancelled`,sessionDeleteUncertain:`Could not confirm whether the conversation was deleted. Refresh and try again.`,sessionDeleted:`Conversation permanently deleted`,sessionDeleteMetadataPending:`The conversation was deleted, but its sidebar records could not be fully cleared.`,sessionLinkUnavailable:`The linked conversation no longer exists or its identity has changed.`,sidebarDropPin:`Drop here to pin`,sidebarDropProjectLast:`Move project to the end`,conversationTurns:`Conversation turns`,conversationTurnPosition:`Go to turn {{position}}`,turnPreviewLoading:`Loading preview…`,turnPreviewUnavailable:`Preview unavailable. Try again.`,commands:`Slash commands`,addContext:`Add context`,fileReference:`Reference workspace file`,fileReferenceTitle:`Reference workspace file`,fileReferenceDetail:`Add a path reference to the prompt without uploading file contents.`,fileReferenceLabel:`Workspace file path`,fileReferencePlaceholder:`src/app.tsx`,fileReferenceValidatedHint:`The current Session verifies that this is a readable workspace file.`,fileReferenceDraftHint:`This path will be resolved by Pi after the new Session starts.`,fileReferenceChecking:`Checking…`,fileReferenceFailed:`Could not verify this file.`,fileReferenceDenied:`Choose a file inside the current Session workspace.`,fileReferenceMissing:`This workspace file no longer exists.`,fileReferenceUnsupported:`Only regular workspace files can be referenced.`,fileReferenceExpired:`The active Session changed. Reopen the file reference and try again.`,fileReferenceBusy:`File validation is busy. Try again shortly.`,insertReference:`Insert reference`,commandsSessionRequired:`Slash commands are available after the Session starts.`,commandsEmptyDraftOnly:`Slash commands can be inserted only into an empty draft.`,commandsLoading:`Loading commands...`,commandsUnavailable:`Commands are temporarily unavailable.`,commandsNoMatch:`No matching commands.`,commandsNoAvailable:`No discovered commands can run in Web. Type a command name to inspect its availability.`,commandsBounded:`{{count}} more commands are not shown.`,commandSessionRequired:`Commands require an active Web session.`,commandUnsupported:`Not adapted · manual commands still reach Pi`,commandAcceptsArguments:`Accepts arguments`,commandSource_extension:`Extension`,commandSource_prompt:`Prompt template`,commandSource_skill:`Skill`,copiedMessage:`Copied`,copyMessage:`Copy message`,copyFailed:`Copy failed. Please select and copy the message manually.`,copiedCode:`Code copied`,copyCode:`Copy code`,copyCodeFailed:`Could not copy this code. Select and copy it manually.`,codeBlock:`Code block`,wrapCode:`Wrap lines`,expandCode:`Show all {{count}} lines`,collapseCode:`Collapse code`,expandInput:`Expand input`,collapseInput:`Collapse input`,deleteWorkspace:`Delete workspace`,describeTask:`Describe a task`,editMessage:`Edit and rerun from here`,enterHint:`Enter to send, Shift+Enter for a new line.`,expandSidebar:`Expand sidebar`,importWorkspace:`Import workspace`,loadingModels:`Loading models...`,modelsTruncated:`Showing {{shown}} models. {{omitted}} more are available; search to find them.`,searchModels:`Search available models`,searchModelsPlaceholder:`Search provider, model name, or ID...`,searchingModels:`Searching models...`,noMatchingModels:`No matching models`,modelSearchFailed:`Could not search models. Try again.`,retryModelSearch:`Retry model search`,fileReferenceDraftChanged:`The draft changed. Reopen the file reference.`,modelSearchTruncated:`{{omitted}} matching models are not shown.`,modelPreparing:`Preparing task...`,modelRetrying:`Retrying model request...`,modelRunning:`Working…`,modelRequestFailed:`Model request failed`,modelRequestStopped:`Model request stopped`,modelFailureUnknown:`The provider did not return an error reason.`,retryPrompt:`Retry prompt`,retryingPrompt:`Retrying...`,newSession:`New session`,noConversations:`No conversations yet`,noMatching:`No matching conversations`,noMatchingLoaded:`No matching conversations in the loaded history`,noModels:`No models available`,noOutput:`no output`,noSessions:`No sessions`,openSidebar:`Open sidebar`,promptMessage:`Send a message or start a task, / for commands`,promptReadonly:`A non-active session cannot receive prompts`,promptStart:`Choose a workspace to begin.`,promptTask:`Describe what you want to build.`,queuedHint:`The message will be queued after the current turn.`,reconnecting:`Reconnecting`,removeWorkspace:`Remove from sidebar`,workspaceOptions:`Workspace options`,renameFailed:`Could not save the name. Your changes were kept.`,savingName:`Saving...`,workspaceRemoveFailed:`Could not remove the workspace. Try again.`,removingWorkspace:`Removing...`,renameConversation:`Rename conversation`,renameWorkspace:`Rename workspace`,save:`Save`,searchConversations:`Search conversations`,searchPlaceholder:`Filter titles and workspaces…`,selectModel:`Select model`,configureModels:`Configure models`,openModelSettings:`Model settings`,selectThinking:`Select thinking level`,thinkingAvailableLevels:`Available: {{levels}}`,resetThinking:`Restore the opening level ({{level}})`,modelThinkingNotEnabled:`Thinking is not enabled for this model. Enable reasoning support in model settings if your provider supports it.`,providerReasoningHint:`Enable only if the provider supports reasoning. Adjust the active level in the composer.`,providerThinkingLevels:`Supported thinking levels`,providerThinkingLevelsHint:`Choose the levels this model supports. Saving updates the conversation picker.`,providerThinkingAutomatic:`Automatic (Pi defaults)`,providerThinkingSelected_one:`{{count}} level selected`,providerThinkingSelected_other:`{{count}} levels selected`,providerThinkingReset:`Use Pi defaults`,providerImageHint:`When Image is unchecked, the model will not receive image attachments.`,selectWorkspace:`Select workspace`,send:`Send`,processDetails:`Execution details`,processRunning:`Working`,processThinkingCount_one:`{{count}} reasoning note`,processThinkingCount_other:`{{count}} reasoning notes`,processToolCount_one:`{{count}} tool call`,processToolCount_other:`{{count}} tool calls`,processFailureCount_one:`{{count}} failed`,processFailureCount_other:`{{count}} failed`,runtimeActivities:`Activity`,activityAgentProgress:`{{completed}}/{{total}} agents finished`,activityCapacity:`Concurrent tasks: {{running}}/{{limit}} · {{queued}} waiting`,composerQueuedCount:`Queued {{count}}`,composerSteeringCount:`Steering {{count}}`,runtimeActivityRunning_one:`{{count}} running`,runtimeActivityRunning_other:`{{count}} running`,runtimeActivityCount_one:`{{count}} activity`,runtimeActivityCount_other:`{{count}} activities`,processActivityCount_one:`{{count}} agent activity`,processActivityCount_other:`{{count}} agent activities`,switchingSession:`Switching session...`,thinkingActive:`Thinking...`,thinkingActiveLevel:`Thinking ({{level}})...`,thinkingDone:`Thinking`,thinkingLoadFull:`Load full thinking`,thinkingLoadingFull:`Loading thinking…`,thinkingLoadFailed:`Unable to load thinking. Retry`,thinkingPartialText:`Showing part of the saved thinking. More text can be loaded below.`,thinkingPreviewOnly:`Thinking preview reached its limit. The full saved text will be available when this message finishes.`,toolState_running:`Running`,toolState_returned:`Returned`,toolState_failed:`Failed`,toolState_cancelled:`Stopped`,toolState_timed_out:`Timed out`,toolState_unknown:`Unconfirmed`,toolSnapshotMissingResult:`No result at fork`,toolActivity_running:`{{action}}…`,toolActivity_failed:`{{action}} failed`,toolActivity_cancelled:`{{action}} stopped`,toolActivity_timed_out:`{{action}} timed out`,toolActivity_unknown:`{{action}}`,toolAction_read:`Read`,toolAction_write:`Write file`,toolAction_edit:`Edit file`,toolAction_command:`Run command`,toolAction_search:`Search`,toolAction_list:`List files`,toolAction_web:`Browse web`,toolAction_agent:`Agent activity`,subagentAction_spawn:`Start subagent`,subagentAction_send:`Send follow-up`,subagentAction_check:`Check subagent`,subagentAction_wait:`Wait for subagent`,subagentAction_cancel:`Stop subagent`,subagentActionDone_spawn:`Started subagent`,subagentActionDone_send:`Sent follow-up`,subagentActionDone_check:`Checked subagent`,subagentActionDone_wait:`Finished waiting`,subagentActionDone_cancel:`Stop request returned`,toolAction_workflow:`Workflow`,toolAction_plan:`Prepare plan`,toolAction_git:`Review changes`,toolAction_call:`Use tool`,toolActionDone_read:`Read`,toolActionDone_write:`Wrote file`,toolActionDone_edit:`Edited`,toolActionDone_command:`Ran command`,toolActionDone_search:`Searched`,toolActionDone_list:`Listed files`,toolActionDone_web:`Browsed web`,toolActionDone_agent:`Agent activity returned`,toolActionDone_workflow:`Workflow tool returned`,toolActionDone_plan:`Plan tool returned`,toolActionDone_git:`Reviewed changes`,toolActionDone_call:`Used tool`,toolActionGroup_read:`read files`,toolActionGroup_write:`write files`,toolActionGroup_edit:`edit files`,toolActionGroup_command:`run commands`,toolActionGroup_search:`search`,toolActionGroup_list:`list files`,toolActionGroup_web:`browse web`,toolActionGroup_agent:`agent activity`,toolActionGroup_workflow:`workflow activity`,toolActionGroup_plan:`planning`,toolActionGroup_git:`review changes`,toolActionGroup_call:`use tools`,toolGroup_done:`Activity · {{actions}}`,toolGroup_running:`Working · {{actions}}`,toolGroup_unknown:`Activity · {{actions}}`,toolGroupSeparator:`, `,toolSearchTarget:`“{{pattern}}” · {{path}}`,toolDiffStatsHelp:`Added and removed lines in the displayed diff`,toolRequestedFile:`File:`,toolWorkspace:`Workspace`,toolRawEvidence:`Arguments and original result`,toolCodemodeDetails:`Script and original result`,toolNestedOutputMissing:`This session records the call and its status, but not the nested tool output.`,toolNestedArgumentsMissing:`This session omits the full arguments and nested tool output.`,toolNestedIncomplete:`The nested-call record is incomplete; some calls, arguments or final states are unavailable.`,toolPartialEvidence:`Partial output: a byte, line or item limit was reached. The original result may also be truncated.`,toolFileChange_created:`File created`,toolFileChange_unchanged:`No content changes`,toolFileChange_overwritten:`File overwritten`,toolChangeUnavailable:`This result does not include a change comparison.`,toolTestResults:`Reported test results · {{format}}`,toolTestCounts:`{{tests}} tests · {{passed}} passed · {{failed}} failed · {{cancelled}} cancelled`,toolTestCountsHelp:`Counts come from command output. The execution status is shown separately.`,toolReadMore:`Read another range using the path and offset. The original result contains continuation details.`,toolFullOutputReference:`Full output:`,subagentBackgroundResult_one:`Background subagent result · {{count}}`,subagentBackgroundResult_other:`Background subagent results · {{count}}`,thinkingDraftHint:`Choose a workspace and create a session first.`,thinkingInactiveHint:`Only the active session can change its thinking level.`,thinkingLevelMismatch:`The confirmed thinking level is not offered by the current model. Choosing another level will correct it.`,thinkingLockedRunning:`Stop the current turn before changing the thinking level.`,thinkingModelPendingHint:`Wait for the model change to finish.`,thinkingNotConfirmed:`Thinking level was not confirmed. Please try again.`,thinkingPendingHint:`Applying the thinking level...`,thinkingUnsupported:`Thinking is unavailable`,thinkingUnsupportedHint:`No model is selected, or the current model does not support thinking.`,unavailable:`Unavailable`,ungrouped:`Ungrouped`,untitledSession:`New session`,workspaceDeleteConfirm:`The folder and conversation records will be kept. Its conversations will move to Ungrouped.`,workspaceName:`Workspace name`,workspaces:`Workspaces`,sidebarProjects:`Projects`}},zh:{translation:{quitOpenPI:`退出 OpenPI`,quittingOpenPI:`正在退出…`,quitConfirmHelp:`确定退出此 OpenPI Web 应用吗?此 Web 应用中所有正在运行的任务都会停止,对话会保存,重启后可继续查看。`,quitTabHelp:`仅关闭浏览器标签页会让 OpenPI 和任务继续在后台运行。`,quitAccepted:`OpenPI 正在关闭`,quitAcceptedHelp:`退出请求已接受。请等待终端确认 OpenPI 已停止,然后可以关闭此标签页。`,quitRestartHelp:`重新启动:在终端运行 openpi web,或在 Pi 中运行 /web,然后打开显示的地址。刷新此页面不会重启 OpenPI。`,quitFailed:`无法确认是否已关闭。请先检查终端,再重试。也可以在 OpenPI 所在终端按 Ctrl+C 停止应用。`,promptPending:`正在处理请求…`,commandFeedbackTruncated:`这里只显示部分命令结果。请缩小查询范围,或在 TUI 查看完整输出。`,planMode_inactive:`普通模式`,planMode_planning:`规划中 · 禁止写入`,planMode_ready:`计划就绪 · 等待审阅`,planMode_invalid:`计划状态异常 · 禁止写入`,planModeEnter:`进入规划`,promptPlanMessage:`本次对话使用 Plan 模式 · 继续讨论计划,暂不实施`,planModeUnconfirmed:`暂时无法确认 Plan 状态,请刷新后再继续。`,planModeExit:`退出规划`,planModeImplement:`准备实施提示`,planImplementationReplaceDraft:`准备实施会替换当前草稿并关闭规划模式,但不会发送提示词。是否继续?`,commandSupport_plan:`支持规划和准备当前会话的实施提示;新建实施会话仍需使用 TUI。`,commandSupport_setup:`通过当前模型配置,在 Web 回答问题。`,handoffWaiting:`需要你操作`,handoffDone:`已完成`,handoffUnable:`无法完成`,handoffDoneHelp:`已执行操作,接下来由模型验证结果。`,handoffUnableHelp:`未能完成,可以补充遇到的障碍。`,handoffReview:`复核状态`,handoffSubmit:`提交状态`,handoffSignal:`预期结果:`,handoffVerify:`提交完成后,模型仍需验证结果;你的反馈本身不代表验证成功。`,planCardLabel:`开发计划`,planCardReady:`计划已就绪`,planCardResult:`计划结果`,planCardNotApproval:`此步骤仅生成计划,不代表已批准或开始实施。`,planCardCollapse:`收起`,planCardExpand:`展开`,planCardCopy:`复制计划`,planCardCopyPreview:`复制可见预览`,planCardTruncated:`当前仅显示截断预览。`,planCardLoadFull:`加载完整计划`,planCardLoadingFull:`正在加载计划...`,planCardLoadFailed:`无法加载完整计划,重试`,planCardEvidence:`工具结果 · plan_ready`,questionWaiting:`问题`,questionPreview:`查看预览`,questionSkip:`跳过`,questionProgress:`{{current}} / {{total}}`,questionReview:`复核答案`,questionReviewTitle:`确认这些选择?`,questionReviewHelp:`可以返回修改,点击提交后才会发送给助手。`,questionEdit:`修改答案:{{question}}`,questionDismiss:`关闭提问,不提交答案`,questionCustom:`或自行撰写回复`,questionCustomHelp:`留空提交,表示希望助手把问题说清楚或拆小。`,questionYourAnswer:`你的答案`,questionCustomPlaceholder:`说说你的想法…`,questionNotes:`补充说明(选填)`,questionNotesPlaceholder:`补充限制条件,或解释你的选择…`,questionRephrase:`请助手把问题说清楚或拆小`,questionBack:`上一步`,questionNext:`下一题`,questionSubmit:`提交答案`,questionSubmitting:`正在提交…`,questionRetry:`核对提交结果`,questionUncertain:`暂时无法确认是否送达,已保留本次提交的答案。点击核对可恢复结果,不会重复提交。`,questionDisconnected:`正在重新连接… 已保留你的选择,暂时无法提交。`,questionLimit:`每项答案或补充说明不能超过 {{count}} 个 UTF-8 字节。`,questionLoadFailed:`暂时无法读取等待回答的问题。`,questionDraftLimit:`提问草稿已达上限,请缩短或清空已有答案后再添加内容。`,questionRetryLoad:`重试`,questionCloseReceipt:`关闭问答状态提示`,questionState_dismissed:`已关闭提问,没有提交答案。`,questionState_cancelled:`提问已取消,没有提交答案。`,questionState_expired:`提问已过期,没有提交答案。`,questionState_stale:`该提问已失效,请查看对话中的处理结果。`,conversationView:`会话视图`,jumpToLatest:`跳至最新`,historyLoading:`正在加载历史…`,historyOmitted:`还有 {{count}} 条较早记录 · 向上滚动自动加载`,historyChanged:`会话分支已更改,已切换到当前分支的历史。`,historyUnavailable:`历史记录加载失败,请重试。`,historyValidationUnavailable:`无法校验会话历史,请重试。`,historyVerifying:`正在校验会话历史…`,messageLoadFull:`加载完整消息`,messageLoadMore:`加载更多`,messageLoadingFull:`正在加载消息…`,messageLoadFailed:`无法加载这条消息,重试`,filePreview:`文件预览`,changeEvidence:`变更`,changeEvidenceScope:`按所选范围查看当前工作目录的只读 Git 变更。`,turnLabel:`第 {{number}} 轮`,turnState_running:`运行中`,turnState_complete:`已完成`,turnState_failed:`失败`,turnState_interrupted:`已中断`,turnState_waiting:`等待回复`,turnState_forked:`已分叉,可继续对话`,turnChanges:`本轮更改 {{count}} 个文件`,turnChangesPartial:`本轮已记录 {{count}} 个文件`,turnChangesIncomplete:`这一轮的变更记录不完整。`,turnChangesMore:`再显示 {{count}} 个文件`,turnChangesLess:`收起文件`,turnChangesReview:`审阅本轮变更`,turnChangesReviewButton:`审阅`,turnChangesBack:`返回本轮变更`,turnChangesLoading:`正在加载本轮变更…`,turnChangesUnavailable:`无法读取本轮保存的差异。`,messageCopyRequiresFull:`加载完整消息后才能复制。`,filesChanged:`{{count}} 个文件已更改`,reviewChanges:`查看变更`,workspaceChanges:`工作区更改`,overviewChanges:`变更`,overviewLineTotals:`当前 Git 比较范围内的文本新增与删除行数`,overviewPartialTotals:`仅展示已核实的行数,部分文件尚无法统计。点击变更查看详情。`,overviewCounting:`统计中…`,overviewCountsUnknown:`行数未知`,overviewReviewUnavailable:`暂不可用`,sessionSources:`来源`,sourcesAdd:`添加来源`,sourcesDescription:`查看此对话附加的图片与文件`,sourceAttached:`已附加到对话`,sourcesEmpty:`暂无来源`,sourcesFailed:`来源加载失败。`,sourcesViewAll:`查看全部`,sourcesLoadMore:`加载更多来源`,sourcesBack:`返回来源列表`,sourcesPartial:`已达到列表展示上限,更早的来源仍可在对话中查看。`,turnChangesScope:`该轮开始至结束的工作区差异 · 已保存`,turnEdits:`已编辑 {{count}} 个文件`,turnEditsPartial:`已记录 {{count}} 个文件的编辑`,turnEditsScope:`本轮文件工具写入记录 · 已保存;不含命令行与外部修改`,turnEditStatsUnknown:`行数未知`,turnEditReason_before_unavailable:`文件已写入,但该操作未授权读取旧内容,无法提供可靠的前后差异。`,turnEditReason_content_limit:`文件已写入,内容超过已保存对比的大小限制,无法提供准确行数。`,turnEditReason_concurrent_change:`文件在已记录的操作之间发生了变化,无法确认本轮净增删行数。`,gitReviewLoadedCount:`已载入 {{count}} 个文件`,gitReviewPartialLabel:`部分`,gitReviewSearch:`搜索文件路径`,gitReviewExpand:`展开审阅`,gitReviewSearchLoaded:`搜索已载入文件`,gitReviewMarkViewed:`标记 {{path}} 为已查看`,gitReviewMarkCurrentViewed:`标记当前文件 {{path}} 为已查看`,gitReviewViewedLabel:`已查看`,gitReviewViewedProgress:`已查看 {{viewed}} / 已加载 {{loaded}} 个文件`,gitReviewViewedLimit:`本次对比最多保留 {{count}} 个已查看标记。`,gitReviewNoMatch:`没有匹配的文件。`,gitReviewNoLoadedMatch:`已载入文件中没有匹配项。`,gitReviewLoadNext:`载入下一批文件`,gitReviewChanged:`工作区已有变化,请刷新清单后继续载入。`,gitReviewNewVersion:`有新的更改,当前仍显示你正在阅读的版本。`,gitReviewShowLatest:`查看最新差异`,gitReviewBinary:`此二进制文件无法显示文本差异。`,gitReviewBinaryShort:`二进制`,gitReviewPendingStats:`待读取`,gitReviewComparison:`{{current}} 对比 {{base}}`,gitReviewWorkingTree:`工作区对比 HEAD`,gitReviewSessionSnapshot:`自本会话开始后的变更`,gitReviewDetached:`游离 HEAD`,gitReviewLoading:`正在读取 Git 变更…`,gitReviewRetry:`重试`,gitReviewRefresh:`刷新变更`,gitReviewOlderResult:`当前显示上一次读取结果。`,gitReviewNotRepository:`此工作区不是 Git 仓库。`,gitReviewUnborn:`此仓库还没有可读取的 HEAD。`,gitReviewFailed:`无法读取 Git 变更。`,gitReviewTruncated:`结果不完整,部分文件或差异未载入。`,gitReviewEmpty:`当前范围内没有文件变更。`,gitReviewHiddenLines:`另有 {{count}} 行 diff 未显示。`,gitReviewDiffTruncated:`快照已达到大小上限,未加载此文件的 diff。`,gitReviewShowMore:`再显示 {{count}} 个文件`,gitReviewBackToFiles:`返回变更文件`,gitReviewFilePreview:`{{file}} 的差异`,gitReviewNoDiff:`此文件没有可显示的文本差异。`,changeDiff:`变更差异`,diffViewMode:`差异视图`,diffUnified:`统一`,diffSplit:`并排`,diffBefore:`修改前`,diffAfter:`修改后`,diffView:`差异`,gitFileStatus_added:`已新增`,gitFileStatus_modified:`已修改`,gitFileStatus_deleted:`已删除`,gitFileStatus_renamed:`已重命名`,gitFileStatus_copied:`已复制`,gitFileStatus_untracked:`未跟踪`,gitFileStatus_unknown:`已变更`,closePreview:`关闭预览`,imageZoom:`图片缩放`,imageZoomHelp:`缩放相对于适应窗口。Ctrl + 滚轮缩放,放大后可拖动查看。`,zoomIn:`放大图片`,zoomOut:`缩小图片`,previousImage:`上一张图片`,nextImage:`下一张图片`,imagePosition:`第 {{current}} 张,共 {{total}} 张图片`,artifactReadOnly:`只读`,artifactReferenceUnavailable:`此视图无法打开文件预览:{{path}}`,artifactSession:`所属会话 {{sessionId}}`,copyFilePath:`复制文件路径`,filePathCopied:`已复制文件路径`,refreshFile:`刷新文件`,downloadFile:`下载文件`,downloadingFile:`正在下载…`,artifactOlderPreview:`当前显示旧版预览。`,readingFile:`正在读取文件…`,artifactVersion:`版本`,artifactBytes:`{{count}} 字节`,artifactPreviewTruncated:`预览已截断;下载文件可获取完整内容。`,artifactUnsupported:`此类型无法预览,请下载文件。`,filesLargeMarkdownSource:`Markdown 预览较大,已显示为源码以保持滚动流畅。已加载的文字全部保留。`,chatView:`对话`,trajectory:`执行轨迹`,trajectoryScope:`按记录顺序展示会话消息,不表示执行耗时,也不是完整模型请求。`,trajectoryRunning:`任务仍在进行。已保存记录到达后自动更新;实时生成内容可在“对话”中查看。`,trajectoryTruncated:`当前历史不完整:省略 {{entries}} 条记录、{{parts}} 个内容片段,{{messages}} 条消息被截断。`,trajectoryEmpty:`尚无已保存记录。`,trajectoryOrder:`记录顺序`,trajectoryOverview:`总览`,trajectorySequenceHint:`按记录顺序排列 · 宽度不表示执行耗时`,trajectoryClearRange:`清除选区`,trajectoryContextLane:`上下文`,trajectoryModelLane:`模型`,trajectoryToolLane:`工具`,trajectorySelectRecord:`选择记录 {{number}}:{{name}}`,trajectoryTimingTab:`时间`,trajectoryUsageTab:`用量`,trajectoryDurationLabel:`耗时`,trajectoryTimingSource:`数据来源`,trajectoryTimingUnknown:`尚未记录执行耗时。保存时间不等于操作开始时间。`,trajectoryTimingNative:`Pi 嵌套工具执行记录`,trajectoryTTFT:`首段输出等待`,trajectoryGenerationTime:`生成时间`,trajectoryThroughput:`每秒输出 tokens`,trajectoryNotRecorded:`未记录`,trajectoryUsageUnknown:`已加载记录中没有此响应的 token 用量。`,trajectoryUsage_input:`未缓存输入`,trajectoryUsage_cacheRead:`缓存读取`,trajectoryUsage_cacheWrite:`缓存写入`,trajectoryUsage_output:`输出`,trajectoryProvider:`提供商`,trajectoryModel:`模型`,trajectoryCode:`代码`,trajectoryWrap:`自动换行`,trajectoryCopy:`复制原文`,trajectoryCopied:`已复制`,trajectoryRawArguments:`原始 JSON`,trajectoryFoldTurns:`回合`,trajectoryFoldCalls:`工具调用`,trajectoryMetrics:`已加载执行摘要`,trajectoryRequestCount:`{{count}} 次模型响应`,trajectoryToolCount:`{{count}} 次工具调用`,trajectoryModelResponses:`模型响应`,trajectoryToolCalls:`工具调用`,trajectoryLastTurn:`最近已记录回合`,trajectoryEventColumn:`事件`,trajectoryContentColumn:`内容`,trajectoryTurn:`回合 {{number}}`,trajectoryLoadHistory:`加载更早历史`,trajectoryLatestRecords:`回到最新记录`,trajectoryHistoryLoading:`正在加载历史…`,trajectoryNestedOutputMissing:`Pi 已记录此嵌套调用的状态,但未保存其结果正文。外层脚本输出单独保留。`,trajectoryRecordCount:`{{count}} 条记录`,trajectoryMatches:`{{count}} 条匹配`,trajectorySearch:`搜索已加载记录`,trajectoryNoMatches:`没有匹配的记录。`,trajectoryEarlierGroup:`较早上下文`,trajectoryEventCount:`{{count}} 条会话变更`,trajectorySummary:`概览`,trajectoryInputTab:`输入`,trajectoryResultTab:`结果`,trajectoryConversationGroup:`本轮对话`,trajectoryReasoningTitle:`思考`,trajectoryRecordNumber:`记录 {{number}}`,trajectoryRecordInfo:`记录信息`,trajectoryRecordId:`记录 ID`,trajectoryCallId:`工具调用 ID`,trajectoryEventType:`事件类型`,trajectoryEvent_model_change:`切换模型`,trajectoryEvent_thinking_level_change:`调整思考级别`,trajectoryEvent_compaction:`压缩上下文`,trajectoryEvent_session_info:`更新会话信息`,trajectoryEvent_custom:`会话记录`,trajectoryEarlier:`显示更早记录(已加载历史中还有 {{count}} 条)`,trajectoryDetails:`记录详情`,trajectoryRecordedAt:`记录时间`,trajectoryEvidenceTruncated:`此证据在会话投影中已被截断。`,trajectoryArguments:`工具参数`,trajectoryRecordedContent:`已记录内容`,trajectoryThinking:`模型返回的推理内容`,trajectoryOutput:`工具结果`,trajectoryMissingResult:`当前记录中没有可明确配对的结果。这不表示工具仍在运行。`,trajectoryStructured:`结构化结果`,trajectoryEventOnly:`当前仅提供此事件的类型和记录时间。`,trajectory_user:`用户消息`,trajectory_assistant:`助手回复`,trajectory_call:`工具调用`,trajectory_result:`未配对结果`,trajectory_event:`会话事件`,trajectoryRole_user:`用户`,trajectoryRole_assistant:`助手`,trajectoryRole_call:`工具`,trajectoryRole_result:`结果`,trajectoryRole_event:`事件`,trajectory_returned:`工具已返回结果。`,trajectory_error:`工具返回错误`,trajectory_unknown:`尚无法确定结果`,runtimeStatus:`运行状态`,runtimeIdentity:`OpenPI 运行信息`,runtimeIdentityHint:`后端信息在启动时采样,不随之后的磁盘改动或会话重新加载更新,也不证明所有模块的加载版本。前端标识对应当前页面构建。`,runtimeIdentityFailed:`无法读取后端运行信息,请重试。`,runtimeBackendVersion:`后端包版本`,runtimePackageRoot:`后端包目录`,runtimeStartedAt:`进程启动时间`,runtimeGitRevision:`启动时 Git 提交`,runtimeGitState:`启动时工作区状态`,runtimeGitDirty:`存在本地改动`,runtimeGitClean:`干净`,runtimeFrontendVersion:`页面包版本`,runtimeFrontendBuild:`页面构建标识`,runtimeStartupBuild:`后端启动时记录的页面构建标识`,runtimeDevelopmentBuild:`开发服务器(无生产构建标识)`,runtimeBuildMismatch:`当前页面构建与后端启动时记录的构建不同。请刷新页面或重启服务后重新检查。`,refreshStatus:`刷新状态`,openTools:`打开工具`,openToolsUnavailable:`选择会话后可打开工具`,sideConversation:`侧边对话`,sideConversationDescription:`在独立 Pi 会话中追问具体问题,不打断当前主任务。`,workbarChangesDescription:`查看当前目录的未暂存、已暂存、分支或会话变更。`,terminal:`终端`,renameTerminal:`重命名终端`,terminalName:`终端名称`,workbarTerminalDescription:`打开当前工作区的交互式终端。`,restartTerminal:`重新启动终端`,reconnectTerminal:`重新连接终端`,restartTerminalTitle:`重新启动此终端?`,restartTerminalDetail:`当前终端会被关闭,其中运行的进程可能被中断。`,terminalReconnecting:`正在重新连接终端...`,terminalScrollToBottom:`回到底部`,terminalOutputResynced:`终端输出已重新同步`,terminalRestarting:`正在重新启动终端...`,terminalConnecting:`正在启动终端…`,terminalExited:`终端已退出。`,terminalExitCode:`终端已退出,状态码 {{code}}。`,terminalDisconnected:`终端连接意外中断。`,terminalError:`终端不可用。`,terminalLoadError:`终端界面加载失败,请刷新页面后重试。`,reloadPage:`刷新页面`,browser:`浏览器`,sessionFileRecords:`本会话文件记录`,gitReviewSource:`变更范围`,gitReviewBaseBranch:`对比分支`,gitReviewChooseBase:`选择对比分支`,gitReviewSearchBranches:`搜索分支`,gitReviewLocalBranch:`本地分支`,gitReviewRemoteBranch:`远程分支`,gitReviewBranchesTruncated:`显示有数量限制的分支列表,部分分支已省略。`,gitReviewNoMatchingBranches:`没有匹配的分支。`,gitReviewBaseUnavailable:`没有可用的默认对比分支。请选择分支以审阅已提交的变更。`,gitReviewBaseInvalid:`所选对比分支已不可用,请选择其他分支。`,gitReviewUnstaged:`未暂存(含未跟踪)`,gitReviewStaged:`已暂存变更`,gitReviewBranch:`分支变更`,gitReviewFileMissing:`此文件在当前范围内已无变更,请刷新文件列表。`,artifactExternalAccess:`此文件位于其他工作目录。可为当前会话授权只读打开这一个文件,不会开放其他文件的访问。`,artifactAuthorizeFile:`只读打开此文件`,sideConversationPending:`正在准备侧边会话…`,resizeSidebar:`调整侧边栏宽度`,resizePanes:`调整面板宽度`,resizeWorkbar:`调整工具栏宽度`,browserPasteTooLarge:`每次最多粘贴 {{count}} 个字符。`,browserInputTooLarge:`每次最多输入 {{count}} 个字符。`,browserInputTargetChanged:`输入目标已变化或无法确认,有输入操作未执行。`,workbarBrowserDescription:`在 OpenPI 工作栏内打开并操作网页。`,browserReady:`输入地址开始浏览`,browserStarting:`正在启动内嵌浏览器…`,browserOpened:`已在内嵌浏览器中打开`,browserOpenAgain:`再次打开`,browserOpenFailed:`内嵌浏览器暂不可用。`,browserBack:`后退`,browserForward:`前进`,browserReload:`重新加载`,browserTabs:`网页标签页`,browserNewTab:`新标签页`,browserAddTab:`新建网页标签页`,browserCloseTab:`关闭 {{title}}`,browserTabLimit:`最多打开 {{count}} 个网页标签页`,browserPageTitle:`网页:{{address}}`,browserEnteredAddress:`最近从此地址栏打开的地址`,browserAddressNotAllowed:`请输入不含用户名或密码、且不属于 OpenPI 自身地址的 HTTP(S) 网址。`,browserLocationUnknown:`网页已跳转,新地址无法读取。重新加载会返回你输入的地址。`,browserDirectDescription:`直接浏览网页。不允许嵌入的网站可在外部浏览器打开。`,browserDirectHint:`地址栏仅记录手动打开的地址。网页弹窗在外部浏览器打开;遇到空白页,可点击外部打开。`,browserEnhancedHint:`浏览增强已开启:地址自动同步,普通弹窗链接在内部标签页打开。部分站点限制、登录弹窗和跨站历史仍需外部浏览器。`,files:`文件`,filesExplorer:`工作区文件`,filesSearch:`筛选文件…`,refreshFiles:`刷新文件`,filesWorkspaceActions:`工作区文件操作`,filesCreateMenu:`新建`,filesImportMenu:`导入`,filesMoreMenu:`更多`,filesNewFile:`新建文件`,filesNewDirectory:`新建文件夹`,filesImport:`导入文件`,filesImportFolder:`导入文件夹`,filesImportFolderChoose:`选择要导入的文件夹`,filesImportFolderLimit:`每次最多导入 2,000 个文件和文件夹,目录层级最多 64 层。`,filesSelectMultiple:`多选文件`,filesSelectItem:`选择 {{name}}`,filesSelectedCount:`已选 {{count}} 项`,filesRename:`重命名`,filesNewName:`新名称`,filesMove:`移动`,filesMoveDestination:`目标文件夹(工作区内相对路径)`,filesTrashAction:`移入回收站`,filesTrash:`工作区回收站`,filesTrashDetail:`移除的文件保留在当前工作区,可恢复;不会覆盖同名文件。`,filesTrashEmpty:`暂无已移除文件`,filesTrashUnavailable:`{{count}} 项记录无法核验,内容仍保留在 .openpi-trash 中,暂不能自动恢复。`,filesRestore:`恢复`,filesRestoreItem:`恢复 {{name}}`,filesUndoTrash:`撤销移除`,filesOrganizationResults:`文件操作结果`,filesOperationDone:`完成`,filesRefreshBeforeOrganizing:`请先刷新文件树,再整理这项文件。`,filesImportChoose:`选择要导入的文件`,filesTargetDirectory:`目标目录`,filesWorkspaceRoot:`工作区根目录`,filesFileName:`文件名称`,filesDirectoryName:`文件夹名称`,filesCreate:`创建`,filesCreating:`创建中…`,filesCreated:`已创建:{{path}}`,filesNameInvalid:`请输入单个文件或文件夹名称,不要包含路径分隔符。`,filesNameExists:`此名称已存在,请更换名称;原有文件已保留。`,filesMutationFailed:`写入失败,输入已保留。`,filesWriteUnavailable:`请先切换到此会话,再修改工作区文件。`,filesImportLimit:`每个文件最多 50 MiB,同名文件不会覆盖。`,filesImportTooLarge:`此文件超过 50 MiB 导入上限。`,filesImportDirectoryUnsupported:`不支持导入整个文件夹,请选择其中的文件。`,filesImportResults:`文件导入结果`,filesImportPending:`等待导入`,filesImporting:`导入中…`,filesImported:`已保存到工作区`,filesImportedNoPreview:`已保存。预览上限为 20 MiB;可复制路径,在对话中引用此文件。`,filesClearImported:`清除已完成的导入`,filesRetryImport:`重试导入`,filesPathActions:`{{name}} 的路径操作`,filesCopyRelativePath:`复制相对路径`,filesCopyAbsolutePath:`复制绝对路径`,filesPathCopied:`已复制路径:{{path}}`,filesReadFailed:`无法读取文件。`,filesRetryRead:`重试读取`,filesErrorDetails:`错误详情`,filesReadFailedDetail:`文件列表未能加载,请检查连接后重试。`,filesReadDenied:`当前会话的工作区暂不可访问,或无法确认目录身份。请确认会话与工作区后重试。`,filesSymlink:`符号链接,文件浏览器不会自动跟随`,filesTruncated:`结果不完整,请缩小搜索范围。`,filesNoMatches:`没有匹配的文件`,filesEmpty:`此文件夹为空`,filesChoose:`选择文件进行预览`,filesChooseDetail:`从右侧浏览工作区文件,在这里直接预览。`,filesHideTree:`收起文件树`,filesShowTree:`显示文件树`,filesPreview:`预览`,filesSource:`查看源代码`,filesEdit:`编辑`,filesMode:`文件视图`,filesEditor:`文件编辑器`,filesSave:`保存文件`,filesSaving:`保存中…`,filesSaved:`已保存`,filesUnsaved:`未保存的修改 · 草稿保留在当前窗口`,filesDiscard:`放弃草稿`,filesDiscardConfirm:`放弃此文件尚未保存的修改?`,filesSaveConflict:`磁盘上的文件已改变,编辑草稿已保留。请刷新查看最新内容,核对修改后再保存。`,filesSaveFailed:`保存失败,编辑草稿已保留。请检查文件后重试。`,filesEditLoadFirst:`请先继续读取完整文件,再编辑。`,filesEditUnavailable:`支持编辑工作区内不超过 1 MiB 的 UTF-8 文本,最多保留 16 份未保存草稿。`,filesOutline:`章节目录`,filesDiskVersion:`查看当前磁盘版本`,filesReconcile:`已核对,保留草稿并基于此版本继续编辑`,filesTable:`表格预览`,filesRow:`行`,filesSheets:`工作表`,filesTableTruncated:`当前仅显示部分表格内容;下载原文件可查看完整内容。`,filesOfficeLayout:`文档内容预览;分页和排版可能与 Office 不同。`,filesSlidesLayout:`幻灯片文字与图片预览;主题、图表和动画可能与 PowerPoint 不同。`,filesPreviousPage:`上一页`,filesNextPage:`下一页`,filesZoomOut:`缩小`,filesZoomIn:`放大`,filesZoomReset:`重置缩放`,filesPdfPage:`第 {{page}} 页`,filesDocumentLimit:`此文档超出预览处理范围,请下载后在本地打开。`,filesPreviewFailed:`无法预览此文件,仍可下载后打开。`,filesDiagram:`Mermaid 图表`,filesDiagramLoadError:`图表预览加载失败,已显示源码。刷新页面后可重试。`,filesExpandDiagram:`放大图表`,filesFitImage:`适应宽度`,filesOriginalImage:`原始尺寸`,filesLoadMore:`加载更多`,filesLoaded:`已加载 {{count}} 项`,filesReadMore:`继续读取`,filesContentChanged:`文件已更新。当前阅读内容已保留,可在准备好后刷新。`,workbarFilesDescription:`浏览工作区文件,在文件树旁直接预览。`,backToSideConversations:`返回侧边对话`,continueSideConversation:`继续追问…`,startSideConversation:`提出一个侧边问题…`,sideConversationModelInherited:`新侧边对话使用主会话的模型与思考等级。`,sideConversationModelFixed:`这是当前侧边对话使用的模型。`,stop:`停止`,start:`开始`,browserAddress:`浏览器地址`,browserGo:`打开地址`,openExternalBrowser:`在外部浏览器打开`,invalidBrowserAddress:`请输入有效的 HTTP 或 HTTPS 地址。`,addImages:`添加图片`,addFiles:`添加文件`,fileAttachments:`文件附件`,previewFileAttachment:`预览文件`,fileAttachmentDescription:`文档、表格、PDF、文本、代码及其他文件`,fileAttachmentCount:`最多可添加 {{count}} 个附件。`,fileAttachmentTooLarge:`文件总大小不能超过 50 MB。`,fileAttachmentReadFailed:`无法读取此文件,请检查格式或是否有密码保护。`,fileAttachmentTextReady:`文本已就绪`,fileAttachmentTextTruncated:`部分文本 · 保留原文件`,fileAttachmentOriginalReady:`原文件已就绪`,fileAttachmentExtractionFailed:`未提取文本 · 原文件保留`,fileAttachmentEncodingUnavailable:`无法读取文本编码,原文件字节已保留。`,fileAttachmentDocumentUnavailable:`无法提取文本。文件可能受密码保护或格式暂不支持,原文件字节已保留。`,fileAttachmentNoText:`发送后,代理可通过工具读取原文件;此文件未提取出文本。`,fileAttachmentPreviewTruncated:`预览显示前 20,000 个字符,发送时会附上全部已提取文本。`,fileAttachmentExtractedContent:`已提取文本`,fileAttachmentPromptLabel:`用户提供的文件:`,fileAttachmentPromptTooLong:`消息和文件引用超过输入限制,请缩短消息或减少附件。`,imageAttachmentDescription:`支持 PNG、JPEG、GIF 或 WebP`,imageAttachments:`图片附件`,imageAttachmentsLoading:`正在准备附件…`,commandOpensPanel:`打开面板`,commandPanelArguments:`此命令用于打开面板,不能携带参数或图片。请移除后重试,或直接使用对应面板。`,commandPanelUnavailable:`未能打开面板,已保留命令。`,commandUnavailable_terminal_only:`需要在 Pi 终端界面中使用。`,commandUnavailable_not_integrated:`此扩展命令尚未接入 Web,请在 Pi 终端中使用。`,artifactImagePreviewFailed:`图片预览失败。请刷新文件重试,或下载后查看。`,artifactFileDetails:`文件信息`,turnElapsedRunning:`正在处理 · {{duration}}`,compactionElapsed:`已等待 {{duration}}`,compactionRunning:`正在压缩上下文`,compactionCompleted:`上下文已自动压缩`,compactionFailed:`上下文压缩失败`,compactionInterrupted:`压缩已中断`,compactionUnchanged:`压缩已结束,未生成新的摘要`,compactionUnavailable:`上下文压缩状态暂不可用`,compactionReconnectHelp:`连接已中断,恢复连接后将核实当前状态。`,compactionDraftHelp:`正在压缩上下文,发送的消息会排队等待。`,turnElapsedFinished:`用时 {{duration}}`,composerAdd:`添加`,composerCommands:`指令`,composerFile:`文件`,composerPlan:`计划`,composerCompact:`压缩`,composerModel:`模型`,composerBack:`返回`,composerPlanDescription:`进入或退出计划模式`,composerCompactDescription:`整理之前的对话,释放上下文空间`,composerModelDescription:`选择本会话使用的模型`,compactionQueueWaiting:`等待压缩完成`,compactionQueueBlocked:`消息已保留,可重试或清空队列。`,clearPromptQueue:`取消排队`,queueUpdateFailed:`未能更新队列,请确认当前会话后重试。`,queueStatusUnconfirmed:`请求已接收,但暂时无法确认最新队列状态。请刷新后再操作。`,turnElapsedOutcome_cancelled:`已停止`,turnElapsedOutcome_failed:`失败`,turnElapsedOutcome_uncertain:`结果待确认`,settingsSetupBusyHint:`Agent 配置需等待当前轮次结束;显示设置可直接调整。`,resetChatContentWidth:`恢复默认聊天宽度`,resetChatFontSize:`恢复默认字体大小`,setupResolveAdmission:`请先返回对话,处理尚未确认的消息,再应用设置。`,removeAttachment:`移除附件`,dropImagesHere:`将文件或图片拖到这里`,imageAttachmentCount:`最多可添加 {{count}} 张图片。`,imageAttachmentTooLarge:`单张图片不能超过 10 MB。`,imageAttachmentTotalTooLarge:`图片总大小不能超过 32 MB。`,imageAttachmentUnsupported:`仅支持有效的 PNG、JPEG、GIF 和 WebP 图片。`,imageAttachmentReadFailed:`无法读取此图片,请重新添加重试;消息内容已保留。`,attachedImage:`已附加图片`,previewAttachment:`预览图片`,closeImagePreview:`关闭图片预览`,imagePreviewFailed:`无法显示这张图片。`,fitImage:`适应窗口`,originalImageSize:`原始尺寸`,imageViewMode:`图片查看`,sessionUsage:`会话 Token 用量`,sessionInputTokens:`输入 Token`,sessionOutputTokens:`输出 Token`,sessionCacheTokens:`缓存 Token`,sessionContextUsage:`上下文占用与窗口大小`,usageContextLabel:`上下文`,usageUnknown:`未知`,usageOpenDetails:`输入 {{input}} · 输出 {{output}} · 上下文 {{percent}} / {{capacity}} · 查看会话用量`,usageContextHelp:`当前分支的估算占用 / 模型上下文容量上限。`,usageSessionTotals:`累计用量`,usageInputLabel:`输入`,usageOutputLabel:`输出`,usageCacheReadLabel:`缓存读取`,usageCacheWriteLabel:`缓存写入`,usageTotalLabel:`总计`,usageWorkspaceLabel:`工作区`,usageSessionId:`会话 ID`,usageTotalsHelp:`本会话累计 Token 用量,包含缓存。`,subagentDetails:`子代理`,sessionOverview:`会话概览`,sessionOverviewChanges:`当前审阅范围的更改`,subagentSummaryRunning:`{{count}} 运行中`,subagentSummaryDone:`{{count}} 完成`,subagentSummaryOther:`{{count}} 其他记录`,subagentNoneYet:`暂无子代理`,subagentOtherGroup:`失败 / 已中断`,subagentShowMore:`再显示 {{count}} 个`,backToSubagents:`返回子代理列表`,subagentActiveGroup:`已开启`,subagentFinishedGroup:`完成`,subagentNoneRunning:`暂无正在运行的子代理。`,subagentNoneFinished:`任务结束后会显示在这里。`,subagentProgress:`子代理:{{running}} 运行中 · {{completed}} 已完成`,subagentSummaryUnknown:`{{count}} 个状态未确认`,subagentTasks:`子代理任务列表`,inspectSubagent:`打开子代理:{{name}}`,subagentState_running:`运行中`,subagentProcessing:`处理中`,subagentState_done:`已完成`,subagentState_error:`失败`,subagentState_interrupted:`已中断`,subagentStarting:`正在启动…`,subagentSpawnFailed:`启动失败`,subagentStateUnavailable:`已启动 · 状态未保留`,subagentSpawnReceipt:`启动回执`,subagentSpawnReceiptHint:`此回执仅确认启动请求,不表示子代理任务已完成。`,subagentTask:`分配的任务`,subagentTranscript:`子代理对话`,subagentResult:`执行结果`,subagentSpend:`累计 token 消耗`,subagentSaved:`已保存记录`,subagentRecordedState:`最后记录的状态`,subagentSavedHint:`来自当前父会话已保存的回执;结果可能包含同批其他任务,并非子代理的完整实时对话。`,subagentReadOnly:`只读查看 · 关闭此面板不会停止任务`,subagentUnavailable:`当前会话已无法提供此子代理的实时详情。启动回执不代表任务已完成。`,subagentStale:`刷新失败,下方保留的是上次收到的状态。`,subagentNoMessages:`暂未收到消息。`,subagentTranscriptUnavailable:`此视图仅保留任务摘要,无法显示完整子代理对话。`,subagentWorkflowsTruncated:`另有 {{count}} 个 workflow 未包含在当前列表中,其任务数量未知。`,subagentState_unknown:`未确认`,subagentUnconfirmedGroup:`未确认`,subagentTruncated:`当前显示最近的消息,另有 {{count}} 条较早消息未包含在此视图中。`,subagentTextTruncated:`部分较长内容仅显示节选。`,subagentListTruncated:`另有 {{count}} 个任务未包含在当前列表中。`,subagentThinkingRedacted:`服务商已隐藏此段思考内容。`,inspectionChanged:`当前会话已切换,请重新打开详情。`,inspectionUnavailable:`暂时无法读取详情。`,inspectionLoading:`正在读取状态…`,thinkingUnavailable:`暂时无法读取思考等级。`,trustUnavailable:`暂时无法读取项目信任状态。`,copySetupCommand:`复制配置命令`,savedTrustDecision:`已保存决定`,activeSessionTrust:`当前会话信任`,trustDecision_trusted:`已信任`,trustDecision_denied:`已拒绝`,trustDecision_undecided:`未决定`,trustDecision_unknown:`未知`,trustActiveYes:`当前会话已信任`,trustActiveNo:`当前会话未信任`,modelAndThinking:`模型与思考`,selectedModel:`当前模型`,thinkingLevel:`思考等级`,availableThinking:`支持的等级`,unknownState:`未知`,projectTrust:`项目信任`,trust_trusted:`当前会话信任此工作区。`,trust_untrusted:`此工作区的信任已被拒绝。`,trust_restricted:`项目资源受到限制,等待信任决定。`,trust_unknown:`尚无法确定信任状态。`,trustRefreshNeeded:`保存的信任决定与当前会话不同,请通过 Pi 刷新会话后生效。`,providerAvailability:`服务商凭据`,settings:`设置`,settingsNavigation:`设置导航`,generalSettings:`常规`,configurationSettings:`配置`,configurationIntro:`配置工具权限、网络访问与模型响应。`,configurationReadFailure:`无法安全读取配置。请修复设置文件后刷新。`,configurationUserScope:`用户配置`,configurationSetupHint:`响应与搜索选项通过 OpenPI setup 应用`,configurationApproval:`批准策略`,configurationApprovalDetail:`工具审批沿用已安装 Pi 扩展的权限机制。`,configurationPiPermissions:`由 Pi 扩展管理`,configurationSandbox:`沙箱设置`,configurationSandboxDetail:`工具使用宿主进程的权限运行。`,configurationSandboxUnavailable:`未提供 OS 沙箱`,configurationSearchDetail:`允许当前会话模型在支持时访问网络。`,configurationSearchOff:`不向当前模型提供原生搜索。`,configurationSearchOn:`在当前连接支持时允许原生搜索。`,configurationVerbosity:`输出详细程度`,configurationVerbosityDetail:`选择模型回复包含细节的详细程度。`,configurationResponsesUnavailable:`当前连接未使用支持的 Responses 接口。`,configurationVerbosity_default:`模型默认`,configurationVerbosity_low:`简短`,configurationVerbosity_medium:`适中`,configurationVerbosity_high:`详细`,configurationVerbosityHelp_low:`简短直接地回答,减少额外细节。`,configurationVerbosityHelp_medium:`给出必要解释与适量细节。`,configurationVerbosityHelp_high:`提供更完整的解释与细节。`,configurationVerbosityRequest:`只把 response_verbosity 设为 {{value}},保留其他 OpenPI 配置。`,configurationSummary:`推理摘要`,configurationSummaryDetail:`选择向支持的推理模型请求哪种摘要。`,configurationSummaryUnavailable:`当前连接不支持推理摘要。`,configurationSummary_default:`模型默认`,configurationSummary_auto:`自动`,configurationSummary_concise:`简洁`,configurationSummary_detailed:`详细`,configurationSummary_none:`关闭`,configurationSummaryHelp_auto:`由模型自动选择摘要长度。`,configurationSummaryHelp_concise:`请求简洁的推理摘要。`,configurationSummaryHelp_detailed:`请求较详细的推理摘要。`,configurationSummaryHelp_none:`不请求推理摘要;保留当前推理强度。`,configurationSummaryRequest:`只把 response_reasoning_summary 设为 {{value}},保留其他 OpenPI 配置。`,configurationModelFeatures:`模型功能`,configurationReasoningLevels:`可用推理强度`,configurationReasoningDetail:`选择在模型控件中显示哪些级别。控件只显示当前模型支持的档位,当前档位始终保留。`,configurationReasoningCount:`已选择 {{count}} 个`,configurationDependencies:`工作空间依赖项`,configurationEnvironment:`本地运行环境`,configurationEnvironmentDetail:`Node.js、Python 等工具由当前环境提供。OpenPI 不安装捆绑的工作空间运行时。`,configurationRuntimeStatus:`运行状态`,browserSettings:`浏览器`,webSearchSettings:`联网搜索`,webSearchCurrentModel:`当前会话模型`,webSearchNativeDetail:`调用当前模型供应商的原生搜索,复用现有连接和凭据。`,webSearchSupported:`当前连接支持原生搜索。开启后,由模型决定何时联网。`,webSearchUnsupported:`当前连接不支持或尚未确认支持原生搜索,不提供搜索工具,也不会切换到其他供应商。`,webSearchNativeRequest:`开启联网搜索,使用当前会话模型的原生搜索和已有 Pi 凭据。不要切换模型、连接协议或搜索供应商;当前连接不支持或支持情况未知时,不提供搜索工具。`,webSearchIntro:`让模型搜索最新资料,并打开原始网页核实。`,webSearchPackageDetail:`通过可选 Pi 插件提供搜索、网页读取和 PDF 提取。`,webSearchDefaultOff:`默认关闭。可选扩展跟随当前会话模型,无需另填搜索密钥或安装插件。`,webSearchLoaded:`本会话已加载插件`,webSearchNotLoaded:`本会话尚未加载插件`,webSearchSource:`查看插件源码`,webSearchProfile:`搜索设置`,webSearchExa:`Exa — 无需 API 密钥`,webSearchExisting:`保留我已有的搜索偏好`,webSearchProfileHint:`Exa 提供搜索,网页由本机直接读取。已有偏好会原样保留;安装后也可更换搜索服务。`,webSearchEnable:`启用联网搜索…`,webSearchDisable:`关闭联网搜索…`,webSearchConfigure:`更换搜索服务…`,webSearchExaRequest:`启用可选联网搜索,使用 Pi Web Access 和无需 API 密钥的 Exa。让我审阅插件安装确认,保留其他偏好,不要自动重新加载。`,webSearchExistingRequest:`启用可选联网搜索,使用 Pi Web Access,原样保留我已有的搜索偏好。让我审阅插件安装确认,保留其他偏好,不要自动重新加载。`,webSearchDisableRequest:`关闭原生联网搜索。保留其他设置和会话记录。`,webSearchProviderRequest:`帮我更换已安装 Pi Web Access 插件的搜索服务。介绍可用服务与权限,保留无关偏好,密钥留在搜索插件中,不要自动重新加载。`,browserSettingsIntro:`让 OpenPI 阅读网页、点击、输入和截图。`,browserControl:`浏览器控制`,browserControlHint:`提交设置变更请求,保存配置后生效。`,browserDefault:`默认浏览器`,browserDefaultHint:`提交设置变更请求,选择未指定浏览器时使用的默认项。`,browserEmbedded:`OpenPI 内置浏览器`,browserAllowedTitle:`允许使用的浏览器`,browserOffHint:`下方选择将在开启浏览器控制后生效。`,browserConnected:`已连接`,browserNeedsSetup:`需要连接浏览器扩展`,browserNotFound:`未检测到此浏览器`,browserUpdateNeeded:`需要更新扩展`,browserBlocked:`未授权`,browserDefaultBlocked:`当前默认浏览器未获授权,请允许使用或更换默认值。`,browserSetUp:`设置`,browserManage:`管理`,browserSetupNamed:`设置 {{browser}}`,browserManageNamed:`管理 {{browser}}`,browserAllowNamed:`允许使用 {{browser}}`,browserMore:`更多浏览器`,browserSpeakHint:`对话中说“使用 Chrome …”,即可指定这次使用的浏览器。`,browserGuideTitle:`连接 {{browser}}`,browserGuideEyebrow:`跟着做,一次一步`,browserConnectionTitle:`连接状态`,browserCloseGuide:`收起浏览器设置引导`,browserConnectionReady:`连接正常,可选择是否允许 OpenPI 使用。`,browserEmbeddedDetail:`网页在 OpenPI 内打开。部分网站需要使用普通浏览器才能登录或正常显示。`,browserExternalDetail:`OpenPI 可以使用已连接的 {{browser}} 配置中的现有标签和登录状态。请在该配置中保留一个 OpenPI 标签页。`,browserManageExtension:`管理扩展`,browserAllowUse:`允许 OpenPI 使用`,browserMakeDefault:`设为默认`,browserInstallIn:`安装到`,browserInstallTitle:`安装 OpenPI Browser Bridge`,browserSetupSteps:`设置步骤`,browserGuidePopout:`在独立窗口中跟随操作`,browserGuideDetached:`引导已在独立窗口打开,可以对照浏览器设置逐步完成。`,browserShowGuide:`显示引导窗口`,browserGuideInline:`把引导放回这里`,browserGuideBlocked:`未能打开引导窗口。可允许弹出式窗口后重试,也可继续查看这里的步骤。`,browserSafariSettings:`Safari → 设置`,browserSafariDeveloper:`开发者设置`,browserSafariTemporary:`添加临时扩展…`,browserSafariOpenHint:`打开 Safari 后,在菜单栏选择「Safari → 设置」,对照此引导操作。需要 macOS 上的 Safari 26 或更新版本。`,browserSafariDeveloperTitle:`显示 Safari 开发者设置`,browserSafariDeveloperHint:`在「设置 → 高级」中开启「显示网页开发者功能」,再进入「开发者」标签。`,browserSafariLoadHint:`在「开发者」中点击「添加临时扩展」,选择下方文件夹。启用 OpenPI Browser Bridge,允许访问要控制的网站及本地 OpenPI 页面。退出 Safari 后需重新加载临时扩展。`,browserFirefoxThis:`此 Firefox`,browserFirefoxTemporary:`临时载入附加组件…`,browserFirefoxDeveloperTitle:`选择「此 Firefox」`,browserFirefoxDeveloperHint:`在 about:debugging 左侧选择「此 Firefox」。Firefox 不需要开启「开发者模式」开关。`,browserFirefoxLoadHint:`点击「临时载入附加组件」,选择下方文件夹中的 manifest.json。此安装在 Firefox 重启后失效;永久安装需要经过 Mozilla 签名的扩展包。`,browserFirefoxDone:`已选中,下一步`,browserStepCount:`第 {{step}} 步,共 {{total}} 步`,browserStepLabel:`第 {{step}} 步:{{label}}`,browserStepOpen:`打开扩展页`,browserStepAdd:`添加扩展`,browserStepConnect:`连接`,browserOpenManagerTitle:`打开 {{browser}} 扩展页`,browserOpenManagerHint:`接下来会打开 {{browser}}。在扩展页完成操作后,回到这里继续。`,browserOpenManager:`打开 {{browser}} 扩展页`,browserReopenManager:`重新打开扩展页`,browserAlreadyInstalled:`已经安装?直接连接`,browserDeveloperMode:`开发者模式`,browserDeveloperTitle:`开启「开发者模式」`,browserDeveloperHint:`在扩展页开启「开发者模式」,页面会出现「{{loadLabel}}」按钮。`,browserDeveloperDone:`已开启,下一步`,browserIllustration:`操作示意 · 在 {{browser}} 中完成`,browserExtensions:`扩展程序`,browserLoadUnpacked:`加载未打包的扩展程序`,browserLoadHint:`扩展已准备在本机,按下面的顺序在 {{browser}} 中载入。`,browserCopyLocation:`复制下面的路径`,browserLocateTarget:`找到本机的扩展文件夹`,browserRevealTarget:`定位扩展文件夹`,browserLocateManifest:`找到扩展中的 manifest.json`,browserRevealManifest:`定位 manifest.json`,browserDragToBrowser:`把文件夹拖到 {{browser}} 扩展页`,browserDragFolderHint:`将文件管理器中的 {{folder}} 整个文件夹拖到扩展页,保持「开发者模式」开启。`,browserSelectLocatedTarget:`在浏览器弹出的选择窗口中,选择上一步定位的项目。`,browserManualInstall:`无法拖入?使用路径选择`,browserManualSelection:`找不到?使用路径选择`,browserLoadInBrowser:`在 {{browser}} 点击「{{loadLabel}}」`,browserLoadAlternate:`部分版本显示为「加载已解压的扩展程序」或 Load unpacked。`,browserConfirmFolder:`选择`,browserConfirmFile:`打开`,browserSelectFolderHint:`选择整个文件夹,不要选择里面的 .js 文件。`,browserSelectManifestHint:`只选择 manifest.json,不要选择 .js 文件。`,browserInstallCheckpoint:`在扩展列表看到 OpenPI Browser Bridge 卡片后,再继续连接。`,browserPathCopied:`已复制路径`,browserCopyFailed:`未能复制,请选中上方路径手动复制。`,browserChooseFolderMac:`按 ⌘ ⇧ G,粘贴刚复制的路径并按回车定位,再点击「{{confirm}}」。`,browserChooseFolderOther:`在选择窗口的地址栏粘贴刚复制的路径并回车,再点击「{{confirm}}」。`,browserInstalledConnect:`已添加,连接 OpenPI`,browserPreviousStep:`上一步`,browserWaiting:`等待 OpenPI Browser Bridge 连接,连接后会自动进入下一步。`,browserInstallBrowserFirst:`请先安装 {{browser}},或在已安装的浏览器中打开当前 OpenPI 地址。`,browserConnectTitle:`连接 OpenPI`,browserConnectHint:`在 {{browser}} 中打开 OpenPI,使用刚安装扩展的浏览器配置。`,browserOpenIn:`在 {{browser}} 中打开`,browserAllowHint:`连接成功后,可以允许 OpenPI 使用此浏览器。安装扩展不会自动开启浏览器控制。`,browserCheck:`检查连接`,browserNotConnectedYet:`还未连接。请完成安装,在该浏览器中刷新 OpenPI 后再次检查。`,browserHelp:`设置帮助`,browserReloadHint:`已安装旧版?在扩展页重新加载 OpenPI Browser Bridge,再刷新 OpenPI。如浏览器提示权限,请完成其原生确认。`,browserSupportedHint:`Chrome、Edge、Brave、Chromium 145+ 可控制内置页面及普通标签。macOS Safari 26+、Firefox 128+ 通过兼容扩展控制普通标签,嵌套框架需单独打开。Safari、Firefox 的临时安装需在浏览器重启后重新加载。`,browserCopyPath:`复制路径`,browserOpening:`正在打开浏览器…`,browserLoading:`正在检查浏览器连接…`,browserSaved:`已保存,浏览器权限立即生效。`,browserSaving:`正在处理…`,modelSettings:`模型`,skillsSettings:`技能`,subagentsSettings:`子代理`,pluginsSettings:`插件`,configureOpenPi:`配置 OpenPI`,setupRequestReviewAll:`和我一起检查全部 OpenPI 配置项`,setupRequestSetTheme:`仅将 OpenPI Web 主题设置为 {{value}},其他配置保持不变`,setupRequestSetChatWidth:`仅将 OpenPI Web 聊天内容宽度设置为 {{value}}px,其他配置保持不变`,setupRequestSetChatFontSize:`仅将 OpenPI Web 聊天字体大小设置为 {{value}}px,其他配置保持不变`,setupRequestEnableExpandedThinking:`仅将 OpenPI Web 的思考块改为默认展开,其他配置保持不变`,setupRequestDisableExpandedThinking:`仅将 OpenPI Web 的思考块改为默认折叠,其他配置保持不变`,setupRequestSubagents:`检查并配置 Agent 角色模型和工作流上限`,setupRequestFailed:`OpenPI 配置请求未被接收。`,setupRequestRunning:`正在应用 OpenPI 设置…`,setupRequestAccepted:`配置请求已接收。`,setupPlanBlocked:`Agent 配置需先退出 Plan 模式;显示设置可直接调整。退出不会开始实施计划。`,setupPlanBusy:`Agent 配置需等待当前回合结束并退出 Plan 模式;显示设置可直接调整。`,setupOutcome_pending:`配置请求正在处理,尚未收到保存回执。`,toolCallArguments:`工具参数`,toolCallOutput:`工具结果`,setupOutcome_saved:`OpenPI 配置已保存并应用。`,setupOutcome_unchanged:`配置已保存,实际设置没有变化。`,setupOutcome_failed:`配置请求失败,请查看错误和当前设置后再重试。`,setupOutcome_cancelled:`配置过程已取消,未确认成功保存。`,setupOutcome_unconfirmed:`本次未确认成功保存,请核对当前设置后再运行 /openpi-setup。`,settingsUpdateFailed:`无法保存 Web 显示设置。`,settingsPreferencesSaved:`偏好设置已保存。`,settingsPreferencesSaveFailed:`无法保存显示设置,请检查配置诊断后重试。`,settingsCatalogLoading:`正在加载 Pi 资源…`,settingsCatalogFailed:`无法加载 Pi 设置资源。`,appearance:`外观`,settingsPersonal:`个人`,settingsAgent:`Agent`,settingsIntegrations:`集成`,settingsArchivedChats:`已归档聊天`,settingsSearch:`搜索设置`,settingsClearSearch:`清除搜索`,settingsNoResults:`没有匹配的设置`,appearanceVisualStyle:`视觉风格`,appearanceMode:`模式`,appearanceTheme:`主题`,appearanceAccent:`强调色`,appearanceBackground:`背景`,appearanceForeground:`前景`,appearanceFont:`字体`,appearanceFont_codex:`Codex 默认`,appearanceFont_sans:`无衬线`,appearanceFont_serif:`衬线`,appearanceFont_mono:`等宽`,appearanceAccent0:`默认`,appearanceAccent1:`蓝色`,appearanceAccent2:`紫色`,appearanceAccent3:`粉色`,appearanceAccent4:`橙色`,appearanceAccent5:`绿色`,appearanceCustomAccent:`自定义强调色`,appearanceAdvanced:`高级`,appearanceReset:`恢复默认设置`,appearanceResetAction:`重置外观`,appearanceImport:`导入主题`,appearanceCopy:`复制主题`,appearanceCopied:`主题已复制`,appearanceCopyFailed:`无法复制主题,请重试。`,appearanceThemeValue:`主题数据`,appearanceImportPlaceholder:`粘贴 OpenPI 主题…`,appearanceImportInvalid:`请输入有效的 OpenPI 主题数据。`,appearanceImportAction:`导入`,searchArchivedChats:`搜索已归档聊天`,archiveProjectFilter:`按项目筛选`,archiveAllProjects:`所有项目`,archiveProjectGroup:`{{project}} · {{count}} 条归档聊天`,archiveSort:`归档聊天排序`,archiveSortUpdated:`最近更新`,archiveSortCreated:`创建时间`,restoreArchivedChat:`恢复 {{title}}`,themeLight:`浅色`,themeDark:`深色`,themeMist:`雾青`,themeRose:`蔷薇`,themePine:`松夜`,themeSystem:`跟随系统`,conversationSettings:`对话`,expandThinkingByDefault:`默认展开思考块`,chatContentWidth:`聊天内容宽度`,chatFontSize:`聊天字体大小`,agentBehavior:`Agent 行为`,workflowLimits:`工作流上限`,workflowConcurrency:`工作流并行上限`,workflowCalls:`总调用次数`,agentSettingsSetupHint:`Agent 设置通过当前会话中的 /openpi-setup 生效。`,setupRequestLimits:`将工作流并行上限设置为 {{concurrency}},总子代理调用上限设置为 {{calls}},保留其他配置。`,setupRequestEnableSuggestions:`启用下一步建议。如需模型配置,请帮助我选择模型,保留其他配置。`,setupRequestDisableSuggestions:`关闭下一步建议,保留其他配置。`,setupRequestPostEdit:`帮我配置或关闭编辑后命令。先展示当前配置,再询问要使用的命令。`,configurePostEdit:`配置编辑后命令`,workflowLimitsValue:`并行 {{concurrency}} · 总调用 {{calls}}`,nextActionSuggestions:`下一步建议`,nextActionSuggestionsDetail:`当前任务结束后,提供几个可选择的下一步操作。`,enabled:`已启用`,disabled:`已关闭`,configured:`已配置`,postEditCommand:`编辑后命令`,postEditCommandDetail:`编辑完成后运行一个命令;关闭时不会执行任何命令。`,resultDisplay:`默认结果显示`,subagentResults:`子代理结果`,bashOperations:`Bash 操作`,fileMutations:`Write / Edit 操作`,footer:`页脚`,terminalFooter:`Pi 终端页脚`,terminalFooterStyle:`终端页脚样式`,terminalFooterHint:`影响 Pi 命令行界面的页脚;已打开的 Pi 界面在下次启动或配置应用后更新。`,detailDisplay_full:`完整`,detailDisplay_compact:`紧凑`,sessionSettings:`会话`,currentModel:`当前`,providerCurrentSessionModel:`当前会话使用 {{model}}。`,useThisModel:`使用此模型`,model:`模型`,modelConnection:`模型连接`,provider:`服务商`,modelId:`模型 ID`,providerStatusUnavailable:`此服务商不在当前有界认证快照中。`,providerSettings:`服务商凭据`,providerSettingsIntro:`查看当前 Web 会话可通过哪些 Pi 服务商完成认证。`,openRuntimeDetails:`打开运行详情`,currentWorkspace:`当前工作区`,providerAuth_api_key:`API 密钥`,providerAuth_oauth:`OAuth`,providerAuthUnknown:`未报告认证方式`,authentication:`认证方式`,accessType:`访问方式`,providerAccessSubscription:`订阅账户`,providerAccessStandard:`服务商凭据`,configurationOwner:`配置归属`,providerLoading:`正在加载服务商状态…`,providerLoadFailed:`无法加载服务商状态。`,providerReadOnly:`由 Pi 管理`,selectProvider:`选择服务商`,gitReviewBaselineUnavailable:`未保留可用的会话基线,可能超出了捕获限额。请切换到未暂存、已暂存或分支查看 Git 变更,也可打开本会话文件记录。`,modelsIntro:`登录账户或添加 API 密钥。已有的 Pi 连接也会显示在这里。`,modelConnectionsTitle:`模型连接`,modelConnectionsIntro:`管理连接凭据,选择新会话和当前会话使用的模型。`,accountLoginMethod:`连接方式`,accountLoginTab:`账户登录`,accountLoginChatGPT:`ChatGPT 账户`,accountLoginClaude:`Claude 账户`,accountLoginKeyTab:`API 密钥`,accountLoginConfigured:`账户已登录`,accountLoginIntro:`在浏览器中完成授权,无需填写 API 密钥。`,accountLoginExisting:`账户凭据已保存在 Pi 中。`,accountLoginStart:`登录`,accountLoginAgain:`重新登录`,accountLoginUnsaved:`请先保存或放弃其他修改,再登录账户。`,accountLoginStarting:`正在准备登录…`,accountLoginWaiting:`等待账户授权`,accountLoginChoose:`选择登录方式`,accountLoginCancelling:`正在取消登录…`,accountLoginBrowser:`在浏览器中继续`,accountLoginDevice:`使用设备码登录`,accountLoginBrowserOption:`在当前电脑上登录,完成后自动返回。`,accountLoginDeviceOption:`适合远程服务器,或无法自动返回的情况。`,accountLoginBrowserHelp:`打开登录页并完成授权,这里会自动更新。`,accountLoginDeviceHelp:`打开授权页并输入下方代码,请保持此页面打开。`,accountLoginOpen:`打开登录页`,accountLoginCopyCode:`复制设备码`,accountLoginPaste:`授权码或回调地址`,accountLoginContinue:`继续`,accountLoginFallback:`已登录,但这里没有更新?`,accountLoginRemoteHelp:`如果无法自动返回,请复制浏览器最后的回调地址,并粘贴到下方。`,accountLoginCancel:`取消登录`,accountLogin_failed:`登录未完成,请重试或选择其他登录方式。`,accountLogin_expired:`登录已过期,请重新开始获取新的授权链接。`,accountLogin_cancelled:`已取消登录。`,accountLoginRequestFailed:`请求未完成,请先刷新状态再重试。`,accountLoginStatusUnknown:`暂时无法查询登录状态,账户授权可能仍在进行。`,accountLoginRefreshRequired:`凭据已保存,但 Pi 未能更新模型列表。请重载 Pi 后使用此连接。`,accountLogout:`退出登录`,accountLogoutRefreshRequired:`已移除保存的凭据,但 Pi 未能更新模型列表。请重载 Pi 刷新状态。`,accountLogoutTitle:`退出 {{provider}}?`,accountLogoutDetail:`将移除此电脑上 Pi 保存的该服务凭据,其他使用它的 Pi 会话也需要重新登录。环境凭据不受影响。`,providerInputTypes:`输入类型`,providerInputText:`文本`,providerInputImage:`图片`,providerCustomTag:`自定义`,providerEdit:`编辑`,providerRemove:`删除`,providerSave:`保存`,editProvider:`编辑 {{provider}}`,removeProvider:`删除 {{provider}}`,providerAdd:`添加模型提供商`,providerAddMode:`添加方式`,providerAddCatalog:`第三方模型提供商`,providerAddCustom:`自定义模型 API`,providerAccountHint:`使用已有账户连接模型,选择服务商后前往浏览器授权。`,providerCatalogHint:`从内置目录中选择提供商,填入其 API 密钥即可使用。`,providerCustomHint:`连接中转站、自部署服务或其他兼容 OpenAI / Anthropic 协议的接口,需填写 API 地址、协议和模型。`,providerKeyKeep:`已配置密钥,留空保持不变`,providerKeyOptional:`输入 API 密钥,或留空使用环境认证`,providerDisplayName:`提供商名称`,providerCustomSettings:`自定义设置`,providerSaved:`已保存 {{provider}}。`,modelDefaultTitle:`新会话默认模型`,modelDefaultChoose:`选择模型`,modelDefaultBadge:`默认`,modelCurrentBadge:`当前使用`,modelDefaultNotSet:`未设置 · 新会话启动时由 Pi 选择`,modelDefaultHint:`选择以后新会话使用的模型,已有会话保留自己的选择。此设置也会更新 Pi 的默认模型。`,modelDefaultReadFailed:`暂时无法读取默认模型。`,modelDefaultProjectOverride:`此工作区有 Pi 独立设置:{{model}}。`,modelDefaultSave:`保存默认模型`,modelMakeDefault:`同时设为新会话默认模型`,modelDefaultSaveFailed:`默认模型保存尚未确认,请刷新状态后重试。`,modelDefaultPartial:`当前模型已切换,但默认模型保存尚未确认,请刷新状态后再试。`,modelConnectionNextHint:`从此连接选择一个模型,用于当前会话。`,modelConnectionSearch:`搜索模型…`,modelConnectionChooseProvider:`选择 {{provider}} 的模型`,modelConnectionUse:`用于当前会话`,modelConnectionUseFailed:`模型切换尚未确认,请刷新模型列表后重试。`,modelConnectionLoadFailed:`暂时无法读取模型列表。`,modelConnectionNoModels:`暂无可选模型,请检查连接或添加模型定义。`,modelConnectionNoMatch:`没有匹配的模型。`,modelConnectionMore:`还有 {{count}} 个模型,可搜索缩小范围。`,providerModelsEmpty:`还没有模型,获取可用模型或手动添加。`,providerModelsInherited:`使用提供商的内置模型目录。`,providerModelsReadOnly:`此提供商包含当前页面未支持的模型设置,请在 Pi 配置文件中编辑。`,providerModelId:`模型 {{number}} ID`,providerModelName:`模型 {{number}} 名称`,providerModelDetails:`模型参数:{{model}}`,providerRemoveModel:`删除模型:{{model}}`,providerIdInvalid:`请使用未被占用的提供商 ID,仅包含字母、数字、连字符、点或下划线。`,providerNativeAuth:`此提供商使用 Pi 原生登录。`,providerConfigurationFailed:`保存失败,请检查填写内容,并在会话空闲时重试。`,providerProfileSavedKeyFailed:`提供商配置已保存,但密钥保存失败。重试将只保存密钥。`,providerReload:`放弃草稿并重新加载`,providerCurrentRemoval:`请先切换当前使用的模型,再删除。`,providerRemoveDetail:`删除此提供商的配置和自定义模型?由 Pi 管理的凭据将保留。`,providerPickerIntro:`以下是模型提供商的可用模型,勾选要添加的模型。`,providerPickerSelected:`已选 {{count}} 个`,providerApiKey:`API 密钥`,providerKeyPlaceholder:`粘贴密钥以添加或替换`,saveProviderKey:`保存密钥`,savingSettings:`正在保存…`,keepEditing:`继续编辑`,discardAndContinue:`放弃更改并继续`,unsavedSettingsTitle:`放弃未保存的更改?`,unsavedSettingsDetail:`未保存的模型和凭据修改将被丢弃。`,unsavedCredentialTitle:`放弃未保存的凭据?`,unsavedCredentialDetail:`新密钥尚未保存,继续后将清空。`,modelSelectionBusy:`当前会话忙碌,暂不能切换模型。`,providerKeySaved:`已保存到 Pi 凭据存储。已有密钥不会回显。`,providerSaveFailed:`密钥保存未完成。请等待会话空闲,刷新状态后重试;部分服务商需要额外认证信息。`,providerWriteDetail:`在这里直接保存到 Pi 凭据存储,密钥不会进入模型对话。OAuth 或需要额外字段的认证请使用 Pi 原生登录。`,editModelConfiguration:`添加或编辑自定义模型`,modelConfigurationDetail:`先设置提供商连接,再获取模型列表或手动添加。保存配置不会调用模型。`,configuredModels:`自定义模型配置`,addModel:`添加模型`,modelConfig_provider:`服务商 ID`,modelConfig_id:`模型 ID`,modelConfig_name:`显示名称`,modelConfig_baseUrl:`API 地址`,modelConfig_api:`API 格式`,modelConfig_contextWindow:`上下文窗口`,modelConfig_maxTokens:`最大输出 token 数`,providerCapacityLabel:`{{field}} {{number}}`,providerModelOptions:`模型选项`,providerModelInvalid:`模型 {{number}}:模型 ID 不能为空或重复;容量需为正数,例如 128K 或 1M,留空使用默认值。`,modelConfig_reasoning:`支持推理`,saveModelConfiguration:`保存模型`,reloadModelConfiguration:`放弃草稿并载入最新配置`,retryModelConfiguration:`重试读取`,discardModelDraftTitle:`放弃这份模型草稿?`,discardModelDraftDetail:`最新配置将替换这份未保存的草稿。`,discardAndReload:`放弃并重新载入`,modelConfigurationUnsaved:`未保存的更改`,modelConfigurationConflict:`模型配置已在别处更改,当前草稿已保留。`,modelConfigurationLoadFailed:`无法读取模型配置,草稿已保留。`,modelConfigurationSaved:`已保存到 Pi models.json。配置服务商密钥后即可选择此模型。`,modelConfigurationFailed:`模型保存未完成,草稿已保留。`,setupConfigurationRequest:`配置需求`,configureViaSetup:`通过 OpenPI setup 应用`,setupFormDetail:`统一走 /openpi-setup。请在对话中查看进度及必要的确认;提交成功不等于配置已保存。`,setupSkillsPlaceholder:`填写要添加或调整的技能,以及来源或本地路径`,setupPluginsPlaceholder:`填写要配置的 Pi 插件,以及准确的包名或本地路径`,enableSkillInvocation:`允许模型调用`,disableSkillInvocation:`改为仅显式调用`,setupSkillInvocationRequest:`配置这个 Pi 技能:{{path}}。将原生 disable-model-invocation 字段设为 {{disabled}},保留其余内容,并说明何时生效。`,setupRoleFormRequest:`将 OpenPI 的 {{role}} 角色配置为使用 {{model}},工作流并发设为 {{concurrency}}。推理级别继承父会话,校验选择有效性,并保留其他配置。`,providerReadOnlyDetail:`此页面只读且不会接收凭据内容。请通过 Pi 配置服务商认证,然后刷新此状态。`,openProviderSettings:`打开服务商设置`,credentialConfigured:`已配置`,credentialMissing:`未配置`,authNotVerified:`凭据已配置不代表模型请求一定成功。`,configurationViaPi:`此处为只读状态。模型凭据与信任由 Pi 管理,OpenPI 选项通过 /openpi-setup 配置。`,noSkillsFound:`当前会话没有加载技能。`,addSkill:`添加技能`,addPlugin:`添加插件`,searchResources:`搜索名称或来源`,filterResourceScope:`资源范围`,allResourceScopes:`全部范围`,noMatchingResources:`没有匹配的资源`,resourceBulkTooLarge:`请进一步筛选列表后,再提交批量配置请求。`,resourceManagement:`Pi 资源`,resourceSourceAuto:`Pi 自动发现`,resourceSourceLocal:`本地资源`,resourcePackageSource:`软件包、仓库或本地路径`,resourcePackageSourcePlaceholder:`npm:包名@版本 · git:owner/repo · /path/to/skill`,resourceInstallIntro:`选择来源和范围,在对话中通过 OpenPI setup 审查并应用。`,resourceInstallReview:`请在对话中确认准确来源和权限。提交请求不代表已安装或已加载。`,resourceRequestSubmitted:`请求已提交。请在对话中查看进度和确认,完成后刷新此目录。`,browseSkills:`浏览 skills.sh 技能`,resourceSessionState:`应用到当前会话`,resourcesReloadNote:`刷新只读取目录;重新加载才会将已保存的资源应用到空闲会话。配置变更不会自动重新加载。`,reloadResources:`重新加载资源`,resourceReloadReview:`将已保存的 Pi 技能与插件配置应用到当前会话,并重新启动扩展?请先等待运行中的工作结束。`,resourceReloaded:`资源已重新加载,请查看更新后的目录和诊断。`,resourceReloadFailed:`无法重新加载资源。请等待当前会话空闲,刷新后重试。`,advancedResourceConfiguration:`高级配置`,resourceDiagnostics:`Pi 报告了 {{extensionErrors}} 项扩展诊断与 {{skillErrors}} 项技能诊断。`,resourceConfigurationDiagnostics:`{{count}} 项设置读取失败,请检查 Pi 配置诊断。`,resourceCatalogTruncated:`此目录有数量上限,部分资源未展示。`,resourceTargetTruncated:`此来源或路径已截断,请通过高级配置确认完整目标后再进行管理。`,updateResource:`检查更新`,removeResource:`审查移除`,skillsEmptyTitle:`添加你的第一个技能`,skillsEmptyIntro:`技能为 Pi 提供可复用的指引。可以添加软件包、仓库或本地技能;项目技能遵循 Pi 的项目信任。`,pluginsEmptyTitle:`用插件扩展 Pi`,pluginsEmptyIntro:`软件包可以包含扩展、技能、提示词和主题。添加来源后,通过 OpenPI setup 审查安装。`,pluginCount:`{{count}} 个插件来源`,installedVersion:`已安装版本`,configuredVersion:`配置版本`,resourceVersionUnpinned:`未固定版本 / 本地来源`,pluginState_loaded:`本会话资源已加载`,pluginState_installed:`已安装 · 未加载`,pluginState_disabled:`配置已禁用`,pluginState_missing:`软件包缺失`,pluginState_error:`加载诊断`,pluginState_notLoaded:`未加载`,pluginLoadedResources:`当前会话目录包含 {{count}} 项资源。配置变更需要明确重新加载后才会应用。`,pluginAction_enable:`审查启用`,pluginAction_disable:`审查禁用`,pluginAction_update:`检查更新`,pluginAction_remove:`审查移除`,enableVisibleSkills:`允许模型使用(当前 {{count}} 项)`,disableVisibleSkills:`仅显式调用(当前 {{count}} 项)`,enableVisiblePlugins:`启用当前 {{count}} 个软件包`,disableVisiblePlugins:`禁用当前 {{count}} 个软件包`,setupResourceInstallRequest:`添加 Pi {{kind}},来源为 {{source}},范围为 {{scope}}。先检查来源并确定固定的软件包身份,通过 ask_user 与我确认安装权限,再使用 Pi 原生的软件包或技能配置。添加技能时保留其他扩展和资源。保留现有偏好与项目信任,不要自动重新加载当前会话。分别报告已保存的配置与仍需执行的操作,不要改动无关的 OpenPI 设置。`,setupPluginOperationRequest:`审查 Pi 软件包操作 {{action}},只针对配置来源 {{source}}、原生安装目录 {{path}}、范围 {{scope}}。相对来源应以该范围的原生设置目录解析。使用 Pi 原生包管理;更新时检查可用版本,通过 ask_user 与我确认固定的目标身份和安装权限。保留资源过滤器及所有无关偏好;如果切换会破坏过滤器,停止并说明。移除时不得删除本地来源目录。不要自动重新加载,分别报告已持久化与当前会话状态,不要改动无关的 OpenPI 设置。`,setupSkillManageRequest:`审查 Pi 技能操作 {{action}},只针对文件 {{path}}、来源 {{source}}、范围 {{scope}}。先检查原生资源归属,通过 ask_user 与我确认更新或移除及所需权限。保留无关技能与软件包资源,不要为了移除一个技能删除整个共享软件包。保留项目信任,不要自动重新加载,也不要改动无关的 OpenPI 设置。`,setupSkillsBulkRequest:`只针对当前展示的 Pi 技能文件 {{paths}},将原生 disable-model-invocation 设为 {{disabled}}。检查资源归属,保留其余内容和偏好,与我审查必要变更,报告无法安全修改的文件。显式 /skill 调用仍应可用。不要自动重新加载,也不要改动无关的 OpenPI 设置。`,setupPluginsBulkRequest:`只针对当前展示的 Pi 软件包 {{packages}},通过 Pi 原生配置将 disabled 设为 {{disabled}}。保留其他偏好与资源过滤器;无法保留过滤器的条目应跳过并报告。遵循范围与项目信任,与我审查必要变更,不要自动重新加载,也不要改动无关的 OpenPI 设置。`,resourceRequestFinished:`配置回合已结束。请刷新并查看 Pi 原生配置与会话资源,确认实际变更。`,skillCount_one:`{{count}} 个技能`,skillCount_other:`{{count}} 个技能`,skill:`技能`,copySkillInvocation:`复制调用命令`,source:`来源`,scope:`范围`,invocation:`调用方式`,modelInvocation:`模型调用`,resourceScope_user:`全局`,resourceScope_project:`项目`,resourceScope_temporary:`临时`,explicitOnly:`仅允许明确调用`,availableToModel:`模型可按需使用`,skillFile:`技能文件`,selectSkill:`选择一个技能`,subagentConfiguration:`Pi 原生子代理角色`,subagentConfigurationIntro:`未在 OpenPI 配置中指定模型时,角色继承父会话模型。`,subagentActiveCount_one:`{{count}} 个运行中`,subagentActiveCount_other:`{{count}} 个运行中`,subagentCompletedCount_one:`{{count}} 条记录`,subagentCompletedCount_other:`{{count}} 条记录`,subagentConcurrency:`上限 {{count}}`,builtInRoles:`内置角色`,subagentRole_explorer:`探索者`,subagentRole_implementer:`实现者`,subagentRole_reviewer:`审查者`,subagentRole_advisor:`顾问`,subagentRoleShort_explorer:`只读调查`,subagentRoleShort_implementer:`聚焦实现`,subagentRoleShort_reviewer:`正确性审查`,subagentRoleShort_advisor:`技术分析`,subagentRoleDescription_explorer:`调查代码库并报告证据,不修改文件。`,subagentRoleDescription_implementer:`实现边界明确的改动并运行相关仓库检查。`,subagentRoleDescription_reviewer:`审查正确性、安全性、回归风险和缺失验证。`,subagentRoleDescription_advisor:`分析困难技术问题并提出具体下一步建议。`,configureRoles:`配置角色`,builtInRole:`内置角色`,builtIn:`内置`,modelAssignment:`模型分配`,inheritParentModel:`继承父会话模型`,effectiveModel:`实际模型`,workflowConcurrencyLabel:`并行 Agent`,workflowCallLimit:`Agent 总调用数`,runtimeBoundaries:`运行时边界`,subagentAuthorityNote:`子会话权限是父会话与角色能力的故障关闭交集,不会静默扩大权限。`,subagentModelNote:`不会硬编码服务商;未分配的角色继承父会话模型和思考等级。`,resourceCount_one:`{{count}} 项资源`,resourceCount_other:`{{count}} 项资源`,noPluginsFound:`Pi 未报告已加载的插件来源。`,pluginCatalogTotals:`{{extensions}} 扩展 · {{skills}} 技能 · {{prompts}} 提示词 · {{themes}} 主题`,loaded:`已加载`,resourceOrigin:`来源类型`,resourceOrigin_package:`软件包`,resourceOrigin_topLevel:`顶层资源`,resources:`资源`,baseDirectory:`基础目录`,notReported:`未报告`,extensions:`扩展`,extensionSurfaceCount:`{{tools}} 个工具 · {{commands}} 个命令`,prompts:`提示词`,themes:`主题`,pluginResourceSummary:`{{extensions}} 扩展 · {{skills}} 技能 · {{prompts}} 提示词 · {{themes}} 主题`,pluginsManagedByPi:`这些资源由 Pi 加载。可通过上方 setup 表单提交变更;软件包操作沿用原生确认,并通过 Pi 的重新加载流程生效。`,selectPlugin:`选择一个插件来源`,statusCaptured:`采集于 {{time}} · 刷新查看最新状态`,conversationViews:`会话视图`,currentConversations:`当前`,archivedConversations:`已归档`,refreshArchives:`刷新归档会话`,loadingArchives:`正在加载归档会话...`,moreArchives:`加载更多归档会话`,retryArchives:`重试读取归档会话`,archiveLoadFailed:`无法加载归档会话。`,archiveCursorStale:`归档会话已变化,请刷新后继续。`,archiveScanBounded:`还有 {{count}} 条更早记录未扫描。`,noArchivedSessions:`没有归档会话。`,noScannedArchives:`已扫描历史中没有归档会话。`,noMatchingScannedArchives:`已扫描历史中没有匹配的归档会话。`,draftLimit:`草稿暂存已满,请先发送或清空已有草稿。`,restoreConversation:`恢复会话`,restoringConversation:`正在恢复…`,loadedArchives:`已加载历史中的归档会话`,loadedHistoryBounded:`另有 {{sessions}} 个会话和 {{workspaces}} 个工作区摘要未加载。搜索仅覆盖已加载列表。`,noLoadedArchives:`已加载列表中没有归档会话。`,restoreFailed:`暂时无法确认恢复结果,请刷新后重试。`,execution_running:`运行中`,execution_done:`已完成`,execution_killed:`已停止`,execution_timed_out:`已超时`,execution_failed:`失败`,execution_uncertain:`状态不确定`,activeOnlyHint:`只有当前 Web 会话可以接收消息。`,stopTurn:`停止当前轮次`,stoppingTurn:`正在停止当前轮次…`,stoppedTurn:`当前轮次已停止。`,pendingFollowUpsHint:`{{count}} 条消息正在排队`,sendNextTurn:`下一轮发送`,followUpBehavior:`跟进处理方式`,followUpBehaviorDetail:`OpenPI 运行时,将后续消息排队到下一轮,或引导当前轮次。按 ⌘/Ctrl+Enter 可仅对这条消息使用另一种方式。`,followUpQueue:`排队`,followUpQueueDetail:`下一轮发送`,followUpSteer:`引导`,followUpSteerDetail:`加入当前轮次`,steerCurrentTurn:`当前执行纠偏`,steeringHint:`在当前工具步骤结束后加入这条指示。`,pendingSteeringHint:`已接收 {{count}} 条纠偏指示,等待当前工具步骤结束`,steeringMessagesTitle:`当前轮次待处理的纠偏指示`,steerStaleTurn:`目标轮次已结束或变化。草稿已保留,请确认更新后的状态并重新发送。`,sourceFeedbackNew:`{{path}} · 新版本第 {{line}} 行`,sourceFeedbackOld:`{{path}} · 旧版本第 {{line}} 行`,forkMessage:`从此处分叉`,forkMessageHint:`从此消息创建新聊天,保留原聊天;不会自动发送消息。`,forkSessionPending:`正在创建分叉会话…`,forkSessionCreated:`已创建分叉会话,原会话保留在侧栏。`,forkSessionCancelled:`分叉已取消,原会话已保留。`,forkSessionUncertain:`无法确认分叉结果。请先刷新并检查会话列表,再决定是否重试。`,forkSessionUnavailable:`切换到此会话并等待当前执行和排队消息结束后,可以从这里创建新会话。`,reviewQuoteLine:`引用此行`,reviewSelectOldLine:`选择旧版本第 {{line}} 行`,reviewSelectNewLine:`选择新版本第 {{line}} 行`,queuedMore:`还有 {{count}} 条排队消息`,queuedImage:`图片附件`,queuedMessageExpand:`展开排队消息`,queuedMessageCollapse:`收起排队消息`,backgroundSessionRunning:`此会话正在后台运行…`,observedSessionTools:`{{count}} 个正在执行的工具`,toolsRequireCurrentSession:`切换到此会话后可使用交互工具。`,activateViewedSession:`切换到此会话`,activateViewedSessionHint:`发送消息即可继续此会话。`,acceptedHint:`OpenPI Web 已接收消息。`,promptAdmissionUnknown:`无法确认上次发送的消息是否已被接收。`,promptAdmissionUnknownDetail:`请先核对已刷新的会话历史和运行状态,再决定下一步。作为新消息发送可能产生重复消息。`,promptAdmissionCheckingDetail:`正在核对最新的会话历史和运行状态,核对完成前不能作为新消息发送。`,promptAdmissionVerificationFailedDetail:`暂时无法刷新最新的会话历史和运行状态。请重新核对后再决定是否作为新消息发送。`,abandonAdmission:`暂不重新发送`,retryAdmissionCheck:`重新核对`,retryOriginalAdmission:`重试原消息`,promptTooLong:`文本超出发送上限({{count}} / {{limit}})。`,sendAsNew:`作为新消息发送`,sendingAsNew:`正在发送…`,addWorkspace:`添加工作区`,addWorkspaceMenu:`添加工作区...`,archiveConversation:`归档会话`,pinnedConversations:`置顶`,sidebarOptions:`侧栏选项`,sidebarProjectOptions:`项目侧栏选项`,sidebarRecentOptions:`会话侧栏选项`,sidebarActivityOptions:`动态视图选项`,sidebarShow:`显示`,sidebarGroupBy:`会话分组`,sidebarByProject:`按项目分组`,sidebarFlatList:`所有会话`,sidebarChatSort:`会话排序`,sidebarRecent:`最近`,sidebarProjectsInRecents:`在最近列表显示项目会话`,sidebarShowMore:`展开显示`,sidebarShowLess:`收起显示`,sidebarFilterList:`筛选当前列表`,sidebarSaveFailed:`更改未能保存,请重试。`,pinWorkspace:`置顶项目`,unpinWorkspace:`取消置顶项目`,markConversationRead:`标记为已读`,markConversationUnread:`标记为未读`,sidebarState_unread:`未读会话`,sidebarActivity:`动态`,sidebarViewActivity:`查看动态`,sidebarViewChats:`查看会话`,sidebarPriority:`优先关注`,sidebarActivityEmpty:`没有需要关注的会话`,sidebarActivityEmptyHint:`已完成的工作和需要你处理的会话会显示在这里。`,sidebarMarkAllRead:`全部标记为已读`,sidebarClearRead:`清除优先关注中的已读会话`,sidebarReadFailed:`未能更新已读状态,请重试。`,sidebarToday:`今天`,sidebarYesterday:`昨天`,sidebarEarlier:`更早`,sidebarActivityCompleted:`已完成`,sidebarActivityFailed:`执行失败`,sidebarActivityRead:`已读`,modelAdvanced:`高级参数`,providerConnectionHeading:`提供商连接`,providerFetchModels:`获取可用模型`,providerFetchHint:`填写提供商和端点后,可一次选择多个模型。`,providerPickerTitle:`选择要添加的模型`,providerPickerAccess:`连接凭据`,providerPickerKey:`访问密钥(可选)`,providerPickerKeyHint:`留空使用此端点已保存的凭据。此处输入的密钥仅用于获取列表,不会保存。`,providerPickerSearch:`搜索模型`,providerPickerSelectAll:`全选`,providerPickerClear:`清空选择`,providerPickerLoading:`正在获取可用模型…`,providerPickerAdded:`已添加`,providerPickerNoMatch:`没有匹配的模型`,providerPickerEmpty:`提供商没有返回模型,仍可手动添加。`,providerPickerBounded:`当前显示前 500 个模型,其他模型可手动填写 ID。`,providerPickerError_load:`未能获取模型列表,请检查端点和凭据后重试,也可以手动添加。`,providerPickerError_save:`尚未确认保存成功。已保留你的选择,请检查连接后重试。`,providerPickerError_conflict:`配置已在其他地方更新,请关闭弹窗、重新读取配置后再保存。`,providerPickerDefaults:`新模型使用 {{context}} 上下文 / {{output}} 输出 token,添加后可逐个调整。`,providerPickerRetry:`刷新列表`,providerPickerCount:`已选 {{count}} 个 · 最多 100 个`,providerPickerSave:`添加所选`,sidebarState_running:`执行中`,sidebarState_compacting:`正在整理上下文`,sidebarState_waiting:`等待你的回复`,sidebarState_completed:`已完成 · 结果未读`,sidebarState_failed:`执行失败 · 打开会话查看详情`,pinnedOptions:`置顶选项`,pinConversation:`置顶会话`,unpinConversation:`取消置顶`,pinnedRecentlyUpdated:`最近更新`,pinnedManualOrder:`手动排序`,movePinUp:`上移`,movePinDown:`下移`,pinSaveFailed:`置顶设置未能保存,请重试。`,cancel:`取消`,chooseWorkspaceHint:`选择工作区并描述任务`,close:`关闭`,closeSearch:`关闭搜索`,collapseSidebar:`收起侧边栏`,confirmEdit:`保存并重新运行`,editMessageHint:`从这里创建新分支并重新运行;保留原对话、图片和文件引用。已有工作区改动会保留。`,regenerateMessage:`重新生成回答`,regenerateMessageHint:`在新分支重新运行这条问题,保留原附件和原对话。`,messageRerunStarted:`已在新分支接收重跑消息,原对话已保留。`,openOriginalConversation:`查看原对话`,messageRerunWorkspaceHint:`已有工作区改动会保留。`,modelRequestRecovered:`请求已恢复`,modelReconnecting:`正在重新连接`,modelReconnectUnknown:`重连状态待确认`,modelEarlierAttempts:`先前请求错误`,modelFailedAttempts:`失败尝试({{count}} 次)`,draftStorageUnavailable:`草稿未能保存到此设备,请保持页面打开或复制消息。`,draftStorageInvalid:`部分保存的草稿内容无法恢复,请检查消息和附件。`,draftStorageRetry:`重试保存草稿`,workbarBackToChat:`返回聊天`,workbarCollapseTools:`收起工具栏`,workbarEndTerminal:`关闭 {{name}} 并结束进程`,workbarNewTerminal:`新建终端`,workbarContinueInChat:`继续追问`,transcriptSearch:`搜索消息内容`,transcriptSearchPlaceholder:`搜索标题、项目或消息…`,transcriptSearchRecent:`最近会话`,transcriptSearchSessions:`会话`,transcriptSearchMessages:`消息内容`,transcriptSearchSessionResult:`打开会话 {{session}}`,transcriptSearchSessionOpenFailed:`暂时无法打开此会话,请重试。`,transcriptSearchIncludeArchived:`包含归档会话`,transcriptSearching:`正在搜索消息…`,transcriptSearchEmpty:`没有匹配的消息。`,transcriptSearchFailed:`暂时无法搜索消息,请重试。`,transcriptSearchRetry:`重试搜索`,transcriptSearchPartial:`部分历史未能搜索,结果可能不完整。`,transcriptSearchOpenFailed:`无法打开这条消息,它可能已移动或位于其他分支。`,transcriptSearchResult:`打开 {{session}} 中来自{{source}}的消息`,transcriptSearchSource_user:`你`,transcriptSearchSource_assistant:`助手`,transcriptSearchSource_tool_call:`工具调用`,transcriptSearchSource_tool_result:`工具结果`,connected:`已连接`,connecting:`正在连接`,conversationName:`会话名称`,conversationOptions:`会话选项`,sidebarRename:`重命名`,sidebarPin:`置顶`,sidebarUnpin:`取消置顶`,sidebarFork:`分叉`,sidebarForkLocal:`创建聊天分支`,sidebarForkSameWorktree:`在同一工作树中分叉`,archiveNoticeTitle:`聊天已归档`,archiveNoticeView:`查看`,archiveNoticeUndo:`撤销`,archiveNoticeFailed:`操作未完成,请重试。`,sidebarForkWorktree:`在新工作树中创建聊天分支`,sidebarForkCancelling:`正在请求取消…`,sidebarForkFinishing:`无法再取消,正在确认创建结果…`,sidebarForkCancelUnconfirmed:`无法确认取消,正在等待分叉结果。`,sidebarForkWorktreePreserved:`工作树已保留在 {{path}},请检查后再重试。`,sidebarForkWorktreePending:`正在创建工作树和聊天分支…`,sidebarForkOptionsLoading:`正在检查工作树是否可用…`,sidebarForkOptionsFailed:`无法检查工作树,请重新打开菜单重试。`,sidebarForkUnavailable:`发送消息后才能创建此聊天的分支。`,sidebarForkArchived:`请先恢复此会话,再创建分叉。`,sidebarForkFailed:`未能创建分叉,原会话已保留。`,sidebarCopy:`复制`,sidebarCopyLink:`复制会话链接`,sidebarCopyMarkdown:`复制为 Markdown`,sidebarCopyCwd:`复制工作目录`,sidebarCopied:`已复制`,sidebarCopyFailed:`复制失败,请重试。`,sidebarNewWindow:`在新窗口中打开`,sidebarOpenIn:`打开方式`,sidebarAppsLoading:`正在加载可用应用…`,sidebarAppsFailed:`无法加载应用,请重新打开菜单重试。`,sidebarOpenFailed:`无法在所选应用中打开此项目。`,sidebarArchive:`归档`,sidebarRestore:`恢复`,sidebarDelete:`永久删除`,managedWorktreeRecoveryFull:`请先核对先前未确认的移除请求,再开始新的请求。`,managedWorktreesChanged:`工作树列表已变化,请刷新后重新核对目标。`,managedWorktreesRefresh:`刷新工作树列表`,managedWorktreesBack:`返回工作树列表`,managedWorktreesRetry:`重试请求`,managedWorktrees:`保留的工作树`,managedWorktreesDescription:`删除会话会保留 OpenPI 创建的工作树。请核对准确路径后再请求移除。使用中、共享、有改动或无法确认归属的工作树会保留。`,managedWorktreeConfirm:`移除此工作树?服务端会重新核对归属、使用中的会话及本地改动后再操作。`,managedWorktreeRemoved:`工作树已移除。`,managedWorktreePreserved:`工作树已保留:`,managedWorktreeUncertainTerminal:`移除结果无法确认,不能自动重复移除。请先检查保留路径,再决定后续操作。`,managedWorktreeUncertain:`尚不能确认移除结果。重试会核对原请求。`,managedWorktreeRemoving:`正在核对并移除…`,managedWorktreeRemove:`移除工作树`,managedWorktreeReview:`核对移除`,managedWorktreesEmpty:`这一页没有找到托管工作树。`,managedWorktreesUnavailable:`有 {{count}} 条归属记录无法确认。`,managedWorktreesLoadFailed:`无法加载保留的工作树。请重试,目标不会改变。`,managedWorktreesMore:`加载更多工作树`,managedWorktreeRetainedAfterDelete:`会话已删除,工作树保留在 {{path}}。可从项目菜单核对保留的工作树。`,sidebarDeleteTitle:`删除会话?`,sidebarDeleteDescription:`确定永久删除“{{name}}”?此操作无法撤销。`,sidebarDeleteConfirm:`删除`,sidebarDeleting:`正在删除…`,sidebarDeleteFailed:`未能删除此会话,请重试或取消。`,sidebarActionRunning:`请等待当前工作和排队消息结束。`,sidebarActionDisconnected:`请先恢复连接,再修改此会话。`,sessionDeleteCancelled:`删除已取消`,sessionDeleteUncertain:`无法确认会话是否删除,请刷新后重试`,sessionDeleted:`会话已永久删除`,sessionDeleteMetadataPending:`会话已删除,但侧栏记录未清理完成`,sessionLinkUnavailable:`链接中的会话已不存在或身份已变化`,sidebarDropPin:`拖到此处置顶`,sidebarDropProjectLast:`将项目移到最后`,conversationTurns:`会话轮次`,conversationTurnPosition:`前往第 {{position}} 轮`,turnPreviewLoading:`正在加载预览…`,turnPreviewUnavailable:`暂时无法读取,请重试。`,commands:`斜杠命令`,addContext:`添加上下文`,fileReference:`引用工作区文件`,fileReferenceTitle:`引用工作区文件`,fileReferenceDetail:`将路径引用加入提示词,不上传文件内容。`,fileReferenceLabel:`工作区文件路径`,fileReferencePlaceholder:`src/app.tsx`,fileReferenceValidatedHint:`当前会话会验证该路径是可读取的工作区文件。`,fileReferenceDraftHint:`新会话启动后,Pi 会按其工具权限解析该路径。`,fileReferenceChecking:`正在检查…`,fileReferenceFailed:`无法验证该文件。`,fileReferenceDenied:`请选择当前会话工作区内的文件。`,fileReferenceMissing:`该工作区文件已不存在。`,fileReferenceUnsupported:`只能引用工作区中的普通文件。`,fileReferenceExpired:`活动会话已变化,请重新打开文件引用后再试。`,fileReferenceBusy:`文件校验正忙,请稍后重试。`,insertReference:`插入引用`,commandsSessionRequired:`会话启动后才能插入斜杠命令。`,commandsEmptyDraftOnly:`只能在空白草稿中插入斜杠命令。`,commandsLoading:`正在加载命令…`,commandsUnavailable:`暂时无法读取命令。`,commandsNoMatch:`没有匹配的命令。`,commandsNoAvailable:`已发现的命令均不能在 Web 中运行。输入具体命令名可查看其可用性。`,commandsBounded:`另有 {{count}} 个命令未显示。`,commandSessionRequired:`命令仅在已创建的 Web 会话中可用。`,commandUnsupported:`尚未适配 · 手动命令仍交给 Pi`,commandAcceptsArguments:`可输入参数`,commandSource_extension:`扩展命令`,commandSource_prompt:`提示词模板`,commandSource_skill:`技能`,copiedMessage:`已复制`,copyMessage:`复制消息`,copyFailed:`复制失败,请选中消息后手动复制。`,copiedCode:`代码已复制`,copyCode:`复制代码`,copyCodeFailed:`无法复制代码,请选中后手动复制。`,codeBlock:`代码块`,wrapCode:`自动换行`,expandCode:`展开全部 {{count}} 行`,collapseCode:`收起代码`,expandInput:`展开输入框`,collapseInput:`收起输入框`,deleteWorkspace:`删除工作区`,describeTask:`描述任务`,editMessage:`修改并从这里重跑`,enterHint:`按 Enter 发送,Shift+Enter 换行。`,expandSidebar:`展开侧边栏`,importWorkspace:`导入工作区`,loadingModels:`正在加载模型...`,modelsTruncated:`当前显示 {{shown}} 个模型,还有 {{omitted}} 个可用;搜索即可查找。`,searchModels:`搜索可用模型`,searchModelsPlaceholder:`搜索服务商、模型名称或 ID...`,searchingModels:`正在搜索模型...`,noMatchingModels:`没有匹配的模型`,modelSearchFailed:`模型搜索失败,请重试。`,retryModelSearch:`重试模型搜索`,fileReferenceDraftChanged:`草稿已变化,请重新打开文件引用。`,modelSearchTruncated:`还有 {{omitted}} 个匹配模型未显示。`,modelPreparing:`正在准备任务...`,modelRetrying:`模型请求重试中...`,modelRunning:`正在运行…`,modelRequestFailed:`模型请求失败`,modelRequestStopped:`模型请求已停止`,modelFailureUnknown:`服务商没有返回具体失败原因。`,retryPrompt:`重试消息`,retryingPrompt:`正在重试…`,newSession:`新建会话`,noConversations:`暂无对话`,noMatching:`没有匹配的会话`,noMatchingLoaded:`已加载历史中没有匹配的会话`,noModels:`没有可用模型`,noOutput:`无输出`,noSessions:`暂无会话`,openSidebar:`打开侧边栏`,promptMessage:`发消息或创建任务,/ 调用指令`,promptReadonly:`非当前会话不能接收消息`,promptStart:`选择一个工作区开始`,promptTask:`描述你想要构建的任务`,queuedHint:`当前回合结束后将发送消息。`,reconnecting:`正在重连`,removeWorkspace:`从侧边栏移除`,workspaceOptions:`工作区选项`,renameFailed:`无法保存名称,已保留你的修改。`,savingName:`正在保存...`,workspaceRemoveFailed:`无法移出工作区,请重试。`,removingWorkspace:`正在移出...`,renameConversation:`重命名会话`,renameWorkspace:`重命名工作区`,save:`保存`,searchConversations:`搜索会话`,searchPlaceholder:`筛选标题与工作目录…`,selectModel:`选择模型`,configureModels:`配置模型`,openModelSettings:`模型设置`,selectThinking:`选择思考等级`,thinkingAvailableLevels:`可选等级:{{levels}}`,resetThinking:`恢复打开时的等级({{level}})`,modelThinkingNotEnabled:`此模型未启用思考。如提供商支持,可在模型设置中开启「支持推理」。`,providerReasoningHint:`按提供商能力开启,在聊天输入框调节当前思考等级。`,providerThinkingLevels:`支持的思考等级`,providerThinkingLevelsHint:`选择此模型支持的等级,保存后同步到会话选择器。`,providerThinkingAutomatic:`自动(Pi 默认)`,providerThinkingSelected:`已选 {{count}} 项`,providerThinkingReset:`使用 Pi 默认等级`,providerImageHint:`未勾选图片时,模型不会收到图片附件。`,selectWorkspace:`选择工作区`,send:`发送`,processDetails:`执行过程`,processRunning:`正在执行`,processThinkingCount:`{{count}} 段思考`,processToolCount:`{{count}} 次工具调用`,processFailureCount:`{{count}} 次失败`,runtimeActivities:`执行活动`,activityAgentProgress:`{{completed}}/{{total}} 个子代理已结束`,activityCapacity:`并行任务:{{running}}/{{limit}} · {{queued}} 个等待中`,composerQueuedCount:`排队 {{count}}`,composerSteeringCount:`引导 {{count}}`,runtimeActivityRunning:`{{count}} 项进行中`,runtimeActivityCount:`{{count}} 项活动`,processActivityCount:`{{count}} 项 Agent 活动`,switchingSession:`正在切换会话...`,thinkingActive:`思考中...`,thinkingActiveLevel:`思考中({{level}})...`,thinkingDone:`思考过程`,thinkingLoadFull:`查看完整思考`,thinkingLoadingFull:`正在加载思考…`,thinkingLoadFailed:`思考加载失败,点击重试`,thinkingPartialText:`当前显示部分已保存的思考,可继续加载下方内容。`,thinkingPreviewOnly:`思考预览已达到显示上限,此消息保存后可查看完整内容。`,toolState_running:`执行中`,toolState_returned:`已返回`,toolState_failed:`失败`,toolState_cancelled:`已停止`,toolState_timed_out:`超时`,toolState_unknown:`未确认`,toolSnapshotMissingResult:`分叉时尚无结果`,toolActivity_running:`正在{{action}}`,toolActivity_failed:`{{action}}失败`,toolActivity_cancelled:`{{action}}已停止`,toolActivity_timed_out:`{{action}}超时`,toolActivity_unknown:`{{action}}`,toolAction_read:`读取`,toolAction_write:`写入文件`,toolAction_edit:`编辑文件`,toolAction_command:`运行`,toolAction_search:`搜索`,toolAction_list:`列出文件`,toolAction_web:`浏览网页`,toolAction_agent:`使用子代理`,subagentAction_spawn:`启动子代理`,subagentAction_send:`发送补充消息`,subagentAction_check:`查询子代理`,subagentAction_wait:`等待子代理`,subagentAction_cancel:`停止子代理`,subagentActionDone_spawn:`已启动子代理`,subagentActionDone_send:`已发送补充消息`,subagentActionDone_check:`已查询子代理`,subagentActionDone_wait:`已结束等待`,subagentActionDone_cancel:`停止请求已返回`,toolAction_workflow:`调用工作流`,toolAction_plan:`准备计划`,toolAction_git:`查看变更`,toolAction_call:`调用工具`,toolActionDone_read:`已读取`,toolActionDone_write:`已写入`,toolActionDone_edit:`已编辑`,toolActionDone_command:`已运行`,toolActionDone_search:`已搜索`,toolActionDone_list:`已列出的文件`,toolActionDone_web:`已浏览网页`,toolActionDone_agent:`子代理工具已返回`,toolActionDone_workflow:`工作流工具已返回`,toolActionDone_plan:`计划工具已返回`,toolActionDone_git:`已查看变更`,toolActionDone_call:`已调用工具`,toolActionGroup_read:`读取文件`,toolActionGroup_write:`写入文件`,toolActionGroup_edit:`编辑文件`,toolActionGroup_command:`运行命令`,toolActionGroup_search:`搜索`,toolActionGroup_list:`列出文件`,toolActionGroup_web:`浏览网页`,toolActionGroup_agent:`子代理活动`,toolActionGroup_workflow:`工作流活动`,toolActionGroup_plan:`准备计划`,toolActionGroup_git:`查看变更`,toolActionGroup_call:`调用工具`,toolGroup_done:`{{actions}}`,toolGroup_running:`正在{{actions}}`,toolGroup_unknown:`{{actions}}`,toolGroupSeparator:`、`,toolSearchTarget:`“{{pattern}}” · {{path}}`,toolDiffStatsHelp:`当前显示差异中的新增和删除行数`,toolRequestedFile:`文件:`,toolWorkspace:`工作区`,toolRawEvidence:`参数与原始结果`,toolCodemodeDetails:`脚本与原始结果`,toolNestedOutputMissing:`会话记录保留了调用和状态,未保存此子工具的输出。`,toolNestedArgumentsMissing:`会话记录未保留完整参数和此子工具的输出。`,toolNestedIncomplete:`子调用记录不完整,部分调用、参数或最终状态不可用。`,toolPartialEvidence:`输出未完整显示:已达到字节、行数或条目上限。原始结果也可能被截断。`,toolFileChange_created:`已创建文件`,toolFileChange_unchanged:`文件内容未改变`,toolFileChange_overwritten:`已覆盖文件`,toolChangeUnavailable:`此工具结果未提供修改对比。`,toolTestResults:`测试结果摘要 · {{format}}`,toolTestCounts:`{{tests}} 项测试 · {{passed}} 通过 · {{failed}} 失败 · {{cancelled}} 取消`,toolTestCountsHelp:`数量来自命令输出,执行状态单独显示。`,toolReadMore:`可使用文件路径和 offset 继续读取,具体方式见原始结果。`,toolFullOutputReference:`完整输出:`,subagentBackgroundResult:`后台子代理结果 · {{count}}`,thinkingDraftHint:`请先选择工作区并创建会话。`,thinkingInactiveHint:`只有当前会话可以更改思考等级。`,thinkingLevelMismatch:`当前确认的思考等级不在此模型支持范围内;选择其它等级即可修正。`,thinkingLockedRunning:`请先停止当前轮次,再更改思考等级。`,thinkingModelPendingHint:`请等待模型切换完成。`,thinkingNotConfirmed:`思考等级未获确认,请重试。`,thinkingPendingHint:`正在应用思考等级...`,thinkingUnsupported:`暂不支持思考`,thinkingUnsupportedHint:`尚未选择模型,或当前模型不支持思考。`,unavailable:`不可用`,ungrouped:`未分组`,untitledSession:`新会话`,workspaceDeleteConfirm:`文件夹与会话记录会保留,其中的会话会被放到“未分组”;再次打开此目录时将是一个干净的工作区。`,workspaceName:`工作区名称`,workspaces:`工作区`,sidebarProjects:`项目`}}},oG=navigator.language?.toLowerCase().startsWith(`zh`)?`zh`:`en`;Xl.use(Zl).init({fallbackLng:`en`,initAsync:!1,interpolation:{escapeValue:!1},lng:oG,resources:aG}),document.documentElement.lang=oG===`zh`?`zh-CN`:`en`;var sG=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},cG=10,lG=13,uG=32,dG=6;function fG(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{maxBufferSize:t,onComment:n,onError:r,onEvent:i,onId:a,onRetry:o}=e,s=[],c=0,l=!0,u,d=``,f=0,p,m=!1,h=!1,g=!1;function _(e){if(m)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(l&&(l=!1,e.charCodeAt(0)===65279?e=e.slice(1):e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),(h||g)&&(e=v(e),!e))return;if(!s.length){let t=S(e);t!==``&&y(t),x();return}if(e.indexOf(` -`)===-1&&e.indexOf(`\r`)===-1){if(c12e3){re(t(`fileAttachmentPromptTooLong`));return}l.content=m}if(u=h?await n(m,s.images,i,a,h):a?await n(m,s.images,i,a):i?await n(m,s.images.length>0||r?s.images:void 0,i):r||s.images.length>0?await n(m,s.images):await n(m),u){we(null),i===Oe.current&&(Oe.current=null);let e=o.clear(l.owner.key,l.revision);e&&c.current.key===l.owner.key&&(f.current=e,d(e),re(null))}}catch(e){c.current.key===l.owner.key&&re(e instanceof Error?e.message:t(`fileAttachmentReadFailed`))}finally{p&&c.current.key===l.owner.key&&!G.current&&B(!1),l.pending=!1;let e=o.read(l.owner.key);(u||!e.prompt&&e.images.length===0&&!e.files?.length)&&b.current.get(l.owner.key)===l&&b.current.delete(l.owner.key)}},at=async(n,r=!1)=>{if(n?.preventDefault(),!ze||e.sessionSwitching||e.modelSelectionPending||e.planSelectionPending||e.thinkingPendingLevel!==null||e.promptAdmissionPending||e.promptAdmissionRecovery||e.promptAdmissionResolution||v||!p.trim()&&m.length===0&&h.length===0||G.current)return;let i=We&&(r?!Ke:Ke);if(i&&Oe.current){ae(t(`steerStaleTurn`));return}let a=/^\/([^\s/]+)/u.exec(p.trim())?.[1],o=Je.commands.find(e=>e.name===a);if(o?.availability===`unsupported`){ae(`/${o.name}: ${t(`commandUnavailable_${o.unavailableReason??`not_integrated`}`)}`);return}if(o?.action){if(p.trim()!==`/${o.name}`||m.length>0||h.length>0){ae(t(`commandPanelArguments`));return}if(e.onCommandAction?.(o.action)!==!0){ae(t(`commandPanelUnavailable`));return}Fe({prompt:``,caret:0}),ae(null);return}ae(null),await it(e.actions.sendPrompt,!1,Oe.current??void 0,i&&Ue?{streamingBehavior:`steer`,expectedTurnCommandId:Ue.commandId}:void 0)},ot=()=>{if(!(!Ie||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||v))return it(e.actions.sendPromptAsNew,!0)},st=e=>{if(e.availability!==`available`)return;let t=`/${e.name} `;Fe({prompt:t,caret:t.length})&&(ae(null),D(!0),queueMicrotask(()=>{c.current.key===y&&(Te.current?.focus(),Te.current?.setSelectionRange(t.length,t.length))}))},ct=e=>{if(!$e.length)return;let t=O;for(let n=0;n<$e.length;n++)if(t=(t+e+$e.length)%$e.length,$e[t]?.availability===`available`){k(t);return}},lt=e=>{let n=Me.current,r=f.current;if(!n||n.ownerKey!==y||n.ownerKey!==c.current.key||n.revision!==r.revision)return t(`fileReferenceDraftChanged`);let i=r.prompt.slice(0,n.start),a=r.prompt.slice(n.end),o=nk(e),s=i&&!/\s$/u.test(i)?` `:``,l=`${i}${s}${o}${a&&!/^\s/u.test(a)?` `:``}${a}`,u=i.length+s.length+o.length;if(!Fe({prompt:l,caret:u}))return t(`draftLimit`);je.current=!0},ut=()=>{let e=f.current,t=Te.current,n=Math.min(Math.max(t?.selectionStart??e.caret,0),e.prompt.length);Me.current={ownerKey:y,revision:e.revision,start:n,end:Math.min(Math.max(t?.selectionEnd??n,n),e.prompt.length)},j(!0)},dt=[...(e.snapshot?.workspaces??[]).map(t=>({id:t.path,label:t.name,icon:(0,q.jsx)(Vs,{}),endContent:t.path===e.selectedWorkspace?(0,q.jsx)(rs,{}):void 0,onClick:()=>e.actions.setWorkspace(t.path)})),{type:`divider`},{id:`add`,label:t(`addWorkspaceMenu`),icon:(0,q.jsx)(Ae,{}),onClick:()=>void e.actions.chooseWorkspace()}],ft=e.draftModel??e.snapshot?.models.find(e=>e.current),pt=e.snapshot?.workspaces.find(t=>t.path===e.selectedWorkspace)?.name??(e.selectedWorkspace?LD(e.selectedWorkspace):t(`selectWorkspace`)),mt=e.snapshot?.sessions.find(e=>e.path===i),ht=Ie?ID(mt??{},n?.id??t(`untitledSession`)):Le?t(`newSession`):n?ID(mt??{},n.id):t(`newSession`),gt=e.sessionSwitching?e.workspaceDraft?t(`promptTask`):t(`switchingSession`):e.selectedWorkspace?Ie&&e.snapshot?.runtime.planHasPrompt&&[`planning`,`ready`].includes(e.snapshot.runtime.plan??``)?t(`promptPlanMessage`):e.landing?t(`promptTask`):t(Re?`promptMessage`:`promptReadonly`):t(`promptStart`),_t=e.snapshot?.thinking,vt=_t?.level??null,yt=e.thinkingPendingLevel??null,bt=_t?.supported??!1,xt=!!e.selectedWorkspace&&!Ie&&(Le||!n),St=_t?!_t.available.includes(vt??``):!1,Ct=_t?!bt&&!xt?`thinkingUnsupportedHint`:!Ie&&!xt?`thinkingInactiveHint`:Ve?`thinkingLockedRunning`:e.modelSelectionPending?`thinkingModelPendingHint`:null:null,wt=e.snapshot?.selectedExecution,Tt=n&&wt&&wt.sessionId===n.id&&wt.sessionPath===n.path?wt.pendingFollowUps:void 0,Et=Tt??(Ie?e.pendingFollowUpsReceipt:null),Dt=n&&wt?.sessionId===n.id&&wt.sessionPath===n.path?wt.pendingSteering:void 0,Ot=Dt??(Ie?e.pendingSteeringReceipt:null),kt=Dt===void 0?[]:wt?.steeringMessages??[],At=!e.workspaceDraft&&!e.sessionSwitching&&kt.length>0,jt=Tt===void 0?[]:wt?.queuedMessages??[],Mt=new Map,Nt=jt.map(e=>{let t=Mt.get(e)??0;return Mt.set(e,t+1),{message:e,key:`${e}:${t}`}}),Pt=!e.workspaceDraft&&!e.sessionSwitching&&Tt!==void 0&&jt.length>0,Ft=Be?t(`compactionDraftHelp`):e.promptAdmissionPending&&!He?t(`promptPending`):e.modelSelectionPending?t(`thinkingModelPendingHint`):e.thinkingPendingLevel===null?e.workspaceDraft?t(`enterHint`):e.turnCancellationPending?t(`stoppingTurn`):e.turnTerminalStatus===`cancelled`?t(`stoppedTurn`):!At&&(Ot??0)>0?t(`pendingSteeringHint`,{count:Ot}):!Pt&&(Ie&&e.pendingFollowUpsReceipt!==null||(Et??0)>0)?(Et??0)>0?t(`pendingFollowUpsHint`,{count:Et??0}):t(`acceptedHint`):t(ze?Ve?Ke?`steeringHint`:`queuedHint`:`enterHint`:`activeOnlyHint`):t(`thinkingPendingHint`),It=ze&&(Be||e.promptAdmissionPending&&!He||e.modelSelectionPending||e.thinkingPendingLevel!==null||e.turnCancellationPending||e.turnTerminalStatus===`cancelled`||!Pt&&Ie&&e.pendingFollowUpsReceipt!==null||!Pt&&(Et??0)>0||!At&&(Ot??0)>0||Ve&&!!(p.trim()||m.length||h.length)),Lt=P===y,Rt=(e=!1)=>{N(null),e&&R.current?.focus()},zt=e=>()=>{N(null),e()},Bt=async r=>{if(!(!Ie||!n||Lt||e.sessionSwitching)){F(y),ae(null);try{if(r===`compact`)await L.compactSession(n.id,n.path);else if((await L.updatePromptQueue(n.id,n.path,r)).sessionId!==n.id)throw Error(t(`queueUpdateFailed`));!await e.actions.refreshSnapshot()&&r!==`compact`&&c.current.key===y&&ae(t(`queueStatusUnconfirmed`))}catch(e){c.current.key===y&&ae(r===`compact`?e instanceof Error?e.message:t(`commandPanelUnavailable`):t(`queueUpdateFailed`))}finally{F(e=>e===y?null:e)}}},Vt=M===`files`?[{id:`back`,section:t(`composerAdd`),label:t(`composerBack`),icon:(0,q.jsx)(Cs,{}),onClick:()=>N(`main`)},{id:`file-upload`,section:t(`composerAdd`),label:t(`addFiles`),description:t(`fileAttachmentDescription`),icon:(0,q.jsx)(Fs,{}),disabled:z||m.length+h.length>=8,onClick:zt(()=>{ke.current&&(ke.current.accept=``,ke.current.click())})},{id:`image`,section:t(`composerAdd`),label:t(`addImages`),description:t(`imageAttachmentDescription`),icon:(0,q.jsx)(Ks,{}),disabled:z||m.length>=8,onClick:zt(()=>{ke.current&&(ke.current.accept=`image/png,image/jpeg,image/gif,image/webp`,ke.current.click())})},{id:`workspace-file`,section:t(`composerAdd`),label:t(`fileReference`),icon:(0,q.jsx)(Fs,{}),onClick:zt(ut)}]:[{id:`file`,section:t(`composerAdd`),label:t(`composerFile`),alias:`file`,icon:(0,q.jsx)(Fs,{}),onClick:()=>N(`files`)},{id:`plan`,section:t(`composerAdd`),label:t(`composerPlan`),alias:`plan`,description:t(`composerPlanDescription`),icon:(0,q.jsx)($s,{}),disabled:!Ie||Ve||e.planSelectionPending||e.promptAdmissionPending,onClick:zt(()=>void e.actions.selectPlanMode(e.snapshot?.runtime.plan===`inactive`))},{id:`compact`,section:t(`composerCommands`),label:t(`composerCompact`),alias:`compact`,description:t(`composerCompactDescription`),icon:(0,q.jsx)(fc,{}),disabled:!Ie||Ve||Lt||e.promptAdmissionPending||(Et??0)>0,onClick:zt(()=>void Bt(`compact`))},{id:`model`,section:t(`composerCommands`),label:t(`composerModel`),alias:`model`,description:t(`composerModelDescription`),icon:(0,q.jsx)(ws,{}),disabled:!Ie&&!Le||Ve||e.modelSelectionPending,onClick:zt(()=>ee(e=>e+1))}];return(0,q.jsxs)(`div`,{className:`composer-dock`,children:[Ie&&e.snapshot?.runtime.plan===`ready`&&!e.sessionSwitching&&(0,q.jsx)(`div`,{className:`plan-mode-bar`,children:(0,q.jsx)(`button`,{type:`button`,disabled:Ve||z||!!G.current||e.planSelectionPending||e.promptAdmissionPending||!!e.promptAdmissionRecovery,onClick:()=>{if((p.trim()||m.length>0||h.length>0)&&!window.confirm(t(`planImplementationReplaceDraft`)))return;let n=f.current.revision,r=c.current.key;e.actions.preparePlanImplementation().then(e=>{!e||f.current.revision!==n||c.current.key!==r||Fe({prompt:e.prompt,images:[],caret:e.prompt.length},r)&&(Oe.current={sessionId:e.sessionId,sessionPath:e.sessionPath,planRevision:e.planRevision},re(null),Te.current?.focus())})},children:t(`planModeImplement`)})}),!Ie&&!e.workspaceDraft&&!e.sessionSwitching&&n&&r===n.path&&(0,q.jsxs)(`div`,{className:`composer-session-notice`,children:[(0,q.jsx)(`span`,{children:t(`activateViewedSessionHint`)}),(0,q.jsx)(`button`,{type:`button`,className:`secondary`,onClick:()=>void e.actions.selectSession(n.path),children:t(`activateViewedSession`)})]}),e.accessory,e.promptAdmissionRecovery&&(0,q.jsxs)(`section`,{className:`prompt-recovery`,role:`alert`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:t(`promptAdmissionUnknown`)}),(0,q.jsx)(`span`,{children:e.promptAdmissionRecovery.phase===`checking`?t(`promptAdmissionCheckingDetail`):e.promptAdmissionRecovery.phase===`verification-failed`?t(`promptAdmissionVerificationFailedDetail`):t(`promptAdmissionUnknownDetail`)})]}),(0,q.jsxs)(`div`,{className:`prompt-recovery-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:e.promptAdmissionRecovery.phase===`submitting`,onClick:e.actions.abandonPromptAdmission,children:t(`abandonAdmission`)}),e.promptAdmissionRecovery.phase===`verification-failed`&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>void e.actions.checkPromptAdmissionRecovery(),children:t(`retryAdmissionCheck`)}),e.promptAdmissionRecovery.retryable&&(0,q.jsx)(`button`,{type:`button`,disabled:!Ie||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||e.promptAdmissionRecovery.phase!==`ready`,onClick:()=>void e.actions.retryPromptAdmission(),children:t(`retryOriginalAdmission`)}),(0,q.jsx)(`button`,{type:`button`,className:`primary`,disabled:z||!Ie||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||v||e.promptAdmissionRecovery.phase!==`ready`||!p.trim()&&m.length===0&&h.length===0,onClick:()=>void ot(),children:e.promptAdmissionRecovery.phase===`submitting`?t(`sendingAsNew`):t(`sendAsNew`)})]})]}),(0,q.jsxs)(`div`,{className:`composer-status-strip`,children:[Ie&&(0,q.jsx)(YD,{snapshot:e.snapshot,observed:e.activityObserved,onInspectSubagent:e.onInspectSubagent,expanded:fe===`activity`,onExpandedChange:e=>ue(t=>e?{owner:y,panel:`activity`}:t?.panel===`activity`?null:t)}),(Pt||At)&&(0,q.jsxs)(`section`,{className:`composer-queue`,"data-state":wt?.promptQueueBlocked?`blocked`:`waiting`,"aria-label":Pt?t(`pendingFollowUpsHint`,{count:Tt}):t(`steeringMessagesTitle`),"aria-busy":Lt,children:[(0,q.jsxs)(`div`,{className:`composer-queue-status`,role:`status`,children:[(0,q.jsx)(vs,{"aria-hidden":`true`}),(0,q.jsxs)(`button`,{type:`button`,className:`composer-queue-toggle`,"aria-expanded":pe,"aria-controls":ye,"aria-label":Pt?t(`pendingFollowUpsHint`,{count:Tt}):t(`pendingSteeringHint`,{count:Ot}),onClick:()=>me(`queue`),children:[[Pt?t(`composerQueuedCount`,{count:Tt}):``,At?t(`composerSteeringCount`,{count:Ot}):``].filter(Boolean).join(` · `),(0,q.jsx)(is,{"aria-hidden":`true`})]}),Ie&&(0,q.jsxs)(`span`,{children:[wt?.promptQueueBlocked&&(0,q.jsx)(`button`,{type:`button`,disabled:Lt||Be,onClick:()=>void Bt(`retry`),children:t(`retryPrompt`)}),(0,q.jsx)(`button`,{type:`button`,disabled:Lt,onClick:()=>void Bt(`clear`),children:t(`clearPromptQueue`)})]})]}),(0,q.jsxs)(`div`,{id:ye,className:`composer-queue-details composer-status-details`,hidden:!pe,children:[(wt?.promptQueueBlocked||Be)&&(0,q.jsx)(`p`,{className:`composer-queue-help`,children:t(wt?.promptQueueBlocked?`compactionQueueBlocked`:`compactionQueueWaiting`)}),Pt&&(0,q.jsx)(`ul`,{children:Nt.map(({message:e,key:r})=>{let i=`${n?.id}\0${n?.path}\0${r}`,a=ce===i,o=e||t(`queuedImage`),s=t(a?`queuedMessageCollapse`:`queuedMessageExpand`);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,className:`composer-queue-row ${a?`expanded`:``}`,"aria-expanded":a,"aria-label":`${s}: ${a?o:zD(o,80)}`,title:s,onClick:()=>le(a?null:i),children:[(0,q.jsx)(Cs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o})]})},r)})}),Tt!==void 0&&Tt>jt.length&&(0,q.jsx)(`small`,{children:t(`queuedMore`,{count:Tt-jt.length})}),At&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`composer-queue-help`,children:t(`pendingSteeringHint`,{count:Ot})}),(0,q.jsx)(`ul`,{children:kt.map((e,r)=>{let i=`${n?.id}\0${n?.path}\0steer:${r}:${e}`,a=ce===i,o=e||t(`queuedImage`),s=t(a?`queuedMessageCollapse`:`queuedMessageExpand`);return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,className:`composer-queue-row ${a?`expanded`:``}`,"aria-expanded":a,"aria-label":`${s}: ${a?o:zD(o,80)}`,title:s,onClick:()=>le(a?null:i),children:[(0,q.jsx)(Cs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o})]})},i)})}),(Ot??0)>kt.length&&(0,q.jsx)(`small`,{children:t(`queuedMore`,{count:(Ot??0)-kt.length})})]})]}),wt?.promptQueueBlocked&&!pe&&(0,q.jsx)(`p`,{className:`composer-queue-blocked`,role:`status`,children:t(`compactionQueueBlocked`)})]})]}),(0,q.jsxs)(`form`,{"data-editor-expanded":_e||void 0,className:`composer composer-m02 ${e.selectedWorkspace?``:`dormant`} ${oe?`is-dragging`:``}`,onSubmit:e=>void at(e),onDragEnter:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),tt&&se(!0))},onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),tt&&(e.dataTransfer.dropEffect=`copy`,se(!0)))},onDragLeave:e=>{let t=e.relatedTarget;t instanceof Node&&e.currentTarget.contains(t)||se(!1)},onDrop:e=>{se(!1),e.dataTransfer.files.length!==0&&(e.preventDefault(),tt&&rt(e.dataTransfer.files))},children:[(0,q.jsx)(ik,{open:!!M,viewKey:M??void 0,items:Vt,onClose:Rt},`actions:${y}`),!e.selectedWorkspace&&(0,q.jsxs)(`div`,{className:`composer-dormant-cta`,"aria-hidden":`true`,children:[(0,q.jsx)(Vs,{}),(0,q.jsx)(`span`,{children:gt})]}),!e.selectedWorkspace&&!e.landing&&(0,q.jsx)(`button`,{className:`dormant-overlay`,type:`button`,"aria-label":t(`selectWorkspace`),onClick:()=>void e.actions.chooseWorkspace()}),(0,q.jsx)(`input`,{ref:ke,className:`sr-only`,type:`file`,multiple:!0,tabIndex:-1,"aria-hidden":`true`,onChange:e=>{e.currentTarget.files&&rt(e.currentTarget.files)}}),(0,q.jsxs)(`div`,{className:`composer-attachments`,ref:Ee,children:[(0,q.jsx)(dO,{ownerKey:y,images:m,onRemove:e=>{Fe({images:f.current.images.filter(t=>t.id!==e)})&&re(null)}}),(0,q.jsx)(fO,{ownerKey:y,files:h,onRemove:e=>{Fe({files:(f.current.files??[]).filter(t=>t.id!==e)})&&re(null)}})]}),ne&&(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`alert`,children:ne}),s.status===`failed`&&(0,q.jsxs)(`p`,{className:`composer-attachment-error`,role:`status`,children:[t(`draftStorageUnavailable`),` `,(0,q.jsx)(`button`,{type:`button`,onClick:()=>{o.retryStorage().then(()=>{let e=o.read(c.current.key);f.current=e,S.current=!0,d(e)})},children:t(`draftStorageRetry`)})]}),s.invalid&&(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`status`,children:t(`draftStorageInvalid`)}),z&&(0,q.jsx)(`p`,{role:`status`,children:t(`imageAttachmentsLoading`)}),ie&&(0,q.jsx)(`p`,{className:`composer-attachment-error`,role:`alert`,children:ie}),v&&(0,q.jsx)(`p`,{id:`composer-prompt-length-error`,className:`composer-attachment-error`,role:`alert`,children:t(`promptTooLong`,{count:_,limit:12e3})}),oe&&(0,q.jsxs)(`div`,{className:`composer-drop-overlay`,"aria-hidden":`true`,children:[(0,q.jsx)(Ks,{}),(0,q.jsx)(`span`,{children:t(`dropImagesHere`)})]}),(0,q.jsxs)(`div`,{className:`composer-editor`,children:[(0,q.jsx)(`textarea`,{id:ve,ref:Te,value:p,rows:1,disabled:qe,readOnly:!e.selectedWorkspace,"aria-label":t(`describeTask`),"aria-invalid":v||void 0,"aria-describedby":v?`composer-prompt-length-error`:void 0,"aria-autocomplete":`list`,"aria-controls":et?$k:void 0,"aria-activedescendant":et&&$e[O]?eA(O):void 0,placeholder:gt,onChange:e=>{Fe({prompt:e.target.value,caret:e.target.selectionStart})&&(ae(null),D(!1))},onClick:e=>Fe({caret:e.currentTarget.selectionStart}),onSelect:e=>Fe({caret:e.currentTarget.selectionStart}),onFocus:()=>{T(!0),D(!1)},onBlur:()=>T(!1),onPaste:e=>{if(!tt)return;let t=Array.from(e.clipboardData.files);if(t.length===0)for(let n of Array.from(e.clipboardData.items??[])){let e=n.kind===`file`?n.getAsFile():null;e&&t.push(e)}t.length!==0&&(e.clipboardData.getData(`text/plain`)||e.preventDefault(),rt(t))},onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)){if(Xe){if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),ct(e.key===`ArrowDown`?1:-1);return}if(e.key===`Escape`){e.preventDefault(),D(!0);return}if(e.key===`Tab`){let t=$e[O];!e.shiftKey&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&t?.availability===`available`&&(e.preventDefault(),st(t));return}if(e.key===`Enter`&&!e.shiftKey){let t=$e[O];if(t){e.preventDefault(),st(t);return}if($e.length>0){e.preventDefault();return}}}e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),at(void 0,e.metaKey||e.ctrlKey))}}}),e.selectedWorkspace&&(0,q.jsx)(V,{content:t(_e?`collapseInput`:`expandInput`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-expand-button icon-button`,"aria-label":t(_e?`collapseInput`:`expandInput`),"aria-expanded":_e,"aria-controls":ve,disabled:qe,onPointerDown:e=>e.preventDefault(),onClick:()=>{let e=Te.current;if(e){be.current?.owner!==y&&(be.current={owner:y});let t=be.current;t[_e?`expanded`:`compact`]=e.scrollTop,xe.current={start:e.selectionStart,end:e.selectionEnd,direction:e.selectionDirection,scrollTop:t[_e?`compact`:`expanded`]??e.scrollTop}}ge(_e?null:y)},children:_e?(0,q.jsx)(fc,{"aria-hidden":`true`}):(0,q.jsx)(ac,{"aria-hidden":`true`})})})]}),(0,q.jsx)(rA,{open:Xe,activeIndex:O,commandDiscovery:Je,commands:$e,draft:!!e.workspaceDraft,preferBelow:e.landing,onComplete:st,onSelect:k},`commands:${y}`),(0,q.jsxs)(`div`,{className:`composer-toolbar`,children:[(0,q.jsxs)(`div`,{className:`composer-toolbar-context`,children:[tt&&(0,q.jsx)(V,{content:t(`addContext`),placement:`above`,children:(0,q.jsx)(`button`,{ref:R,type:`button`,className:`composer-context-trigger icon-button`,"aria-label":t(`addContext`),"aria-haspopup":`menu`,"aria-expanded":M!==null,"aria-controls":M?`composer-action-menu`:void 0,onClick:()=>{D(!0),N(M?null:`main`)},children:(0,q.jsx)(Ae,{})})}),e.landing?(0,q.jsx)(yo,{className:`workspace-picker-menu`,button:{label:e.selectedWorkspace?LD(e.selectedWorkspace):t(`selectWorkspace`),icon:(0,q.jsx)(Vs,{}),size:`sm`,variant:`ghost`,className:`workspace-picker`},items:dt,menuWidth:240,placement:`above`,alignment:`start`,hasChevron:!0}):(0,q.jsxs)(`span`,{className:`composer-workspace-label`,title:`${pt} / ${ht}`,children:[(0,q.jsx)(Vs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:pt})]}),Ie&&e.snapshot?.runtime.plan&&e.snapshot.runtime.plan!==`inactive`&&(0,q.jsx)(`span`,{className:`composer-plan-chip`,children:t(`planMode_${e.snapshot.runtime.plan}`)})]}),(0,q.jsxs)(`div`,{className:`composer-toolbar-controls`,children:[We&&(0,q.jsx)(yo,{button:{className:`composer-delivery-trigger`,label:t(Ke?`steerCurrentTurn`:`sendNextTurn`),children:(0,q.jsx)(`span`,{className:`composer-delivery-label`,children:t(Ke?`steerCurrentTurn`:`sendNextTurn`)}),"aria-label":t(Ke?`steerCurrentTurn`:`sendNextTurn`),tooltip:t(Ke?`steerCurrentTurn`:`sendNextTurn`),icon:Ke?(0,q.jsx)(Bc,{"aria-hidden":`true`}):(0,q.jsx)(Cs,{"aria-hidden":`true`}),variant:`ghost`,size:`sm`,isDisabled:e.promptAdmissionPending||!!e.promptAdmissionRecovery},items:[{id:`followUp`,label:t(`sendNextTurn`),onClick:()=>{Ue&&(we({ownerKey:y,expectedTurnCommandId:Ue.commandId,mode:`followUp`}),ae(null))}},{id:`steer`,label:t(`steerCurrentTurn`),isDisabled:!We,onClick:()=>{!We||!Ue||(we({ownerKey:y,expectedTurnCommandId:Ue.commandId,mode:`steer`}),ae(null))}}],placement:`above`,alignment:`end`,hasChevron:!0}),(0,q.jsx)(`div`,{className:`model-picker-wrap`,hidden:!!(n&&!Ie&&!e.workspaceDraft),title:Ct?t(Ct):void 0,"data-level":vt??`none`,"data-pending":yt!==null,"data-warning":St,children:(0,q.jsx)(Qk,{snapshot:e.snapshot,openRequest:I,currentModel:ft,draftModel:e.draftModel,modelSearch:C,modelSelectionPending:!!e.modelSelectionPending,promptAdmissionPending:e.promptAdmissionPending,sessionSwitching:e.sessionSwitching,liveRunning:Ve,workspaceDraft:!!e.workspaceDraft,thinkingPendingLevel:yt,thinkingNeedsSession:xt,thinkingDisabledReason:Ct,onOpenProviders:e.onOpenProviders,actions:e.actions})}),He&&(0,q.jsx)(V,{content:t(`stopTurn`),placement:`above`,children:(0,q.jsx)(`button`,{className:`send-button stop-button`,type:`button`,"aria-label":t(`stopTurn`),disabled:e.turnCancellationPending||e.sessionSwitching,onClick:()=>void e.actions.cancelActiveTurn(),children:(0,q.jsx)(Rc,{"aria-hidden":`true`})})}),(!He||!!(p.trim()||m.length||h.length))&&(0,q.jsx)(V,{content:t(Be?`compactionDraftHelp`:`send`),placement:`above`,children:(0,q.jsx)(`button`,{className:`send-button`,type:`submit`,"aria-label":t(`send`),disabled:z||e.sessionSwitching||e.modelSelectionPending||e.thinkingPendingLevel!==null||!ze||!e.selectedWorkspace||e.promptAdmissionPending||v||e.planSelectionPending||!!e.promptAdmissionRecovery||!!e.promptAdmissionResolution||!p.trim()&&m.length===0&&h.length===0,children:e.sessionSwitching&&e.workspaceDraft?(0,q.jsx)(rc,{className:`send-spinner`}):(0,q.jsx)(Xo,{})})})]})]}),(0,q.jsx)(`div`,{className:`composer-hint`,"data-visible":It,"aria-live":`polite`,children:ze?Ft:null})]}),(0,q.jsx)(tk,{open:A,sessionId:Ie?n?.id:void 0,onClose:()=>j(!1),onInsert:lt})]})}function sA({target:e,onClose:t,onOpenProviders:n}){let{t:r}=W(),i=(0,K.useMemo)(()=>new de,[]),[a,o]=(0,K.useState)(0),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),p=e=>{f(null),td(e).then(e=>f(e?`copied`:`failed`))};(0,K.useEffect)(()=>{let t=new AbortController;return c(null),u(null),f(null),(async()=>{let n={errors:[]},[a,o]=await Promise.allSettled([i.thinking(e.sessionId,t.signal),i.trust(e.sessionId,t.signal)]);a.status===`fulfilled`&&a.value.sessionId===e.sessionId?n.thinking=a.value:n.errors.push(r(`thinkingUnavailable`)),o.status===`fulfilled`&&(o.value.workspace===void 0||o.value.workspace===e.cwd)?n.trust=o.value:n.errors.push(r(`trustUnavailable`)),!t.signal.aborted&&(c(n),u(new Date().toLocaleTimeString()))})(),()=>t.abort()},[i,e,a,r]);let m=r(`runtimeStatus`);return(0,q.jsx)(Se,{isOpen:!0,onOpenChange:e=>!e&&t(),width:640,"aria-label":m,children:(0,q.jsxs)(`section`,{className:`inspection-panel`,children:[(0,q.jsxs)(`header`,{className:`inspection-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:m}),(0,q.jsx)(`p`,{className:`inspection-subtitle`,children:e.cwd})]}),(0,q.jsxs)(`div`,{className:`inspection-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":r(`refreshStatus`),disabled:!s,onClick:()=>o(e=>e+1),children:(0,q.jsx)(me,{})}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":r(`close`),onClick:t,children:(0,q.jsx)(je,{})})]})]}),d&&(0,q.jsx)(`p`,{role:`status`,children:r(d===`copied`?`copiedMessage`:`copyFailed`)}),s?(0,q.jsxs)(q.Fragment,{children:[s.errors.map(e=>(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:e},e)),(0,q.jsxs)(`section`,{className:`inspection-section`,children:[(0,q.jsx)(`h3`,{children:r(`modelAndThinking`)}),(0,q.jsxs)(`dl`,{children:[(0,q.jsx)(`dt`,{children:r(`selectedModel`)}),(0,q.jsx)(`dd`,{children:e.model||r(`noModels`)}),(0,q.jsx)(`dt`,{children:r(`thinkingLevel`)}),(0,q.jsx)(`dd`,{children:s.thinking?.supported===!1?r(`thinkingUnsupported`):s.thinking?.level??r(`unknownState`)}),!!s.thinking?.available.length&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`availableThinking`)}),(0,q.jsx)(`dd`,{children:s.thinking?.available.join(` · `)})]})]}),s.thinking?.supported===!1&&(0,q.jsx)(`p`,{className:`inspection-note`,children:r(`thinkingUnsupportedHint`)}),s.thinking&&s.thinking.supported!==!1&&!s.thinking.available.includes(s.thinking.level)&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`status`,children:r(`thinkingLevelMismatch`)})]}),(0,q.jsxs)(`section`,{className:`inspection-section`,children:[(0,q.jsx)(`h3`,{children:r(`projectTrust`)}),(0,q.jsx)(`p`,{children:r(`trust_${s.trust?.state??`unknown`}`)}),(0,q.jsxs)(`dl`,{children:[(0,q.jsx)(`dt`,{children:r(`savedTrustDecision`)}),(0,q.jsx)(`dd`,{children:r(`trustDecision_${s.trust?.decision??`unknown`}`)}),(0,q.jsx)(`dt`,{children:r(`activeSessionTrust`)}),(0,q.jsx)(`dd`,{children:s.trust?.sessionTrusted===!0?r(`trustActiveYes`):s.trust?.sessionTrusted===!1?r(`trustActiveNo`):r(`unknownState`)})]}),s.trust?.refreshRequired===!0&&(0,q.jsx)(`p`,{className:`inspection-warning`,children:r(`trustRefreshNeeded`)})]}),n&&(0,q.jsxs)(`button`,{type:`button`,className:`inspection-provider-link`,"aria-label":r(`openProviderSettings`),onClick:n,children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:r(`providerAvailability`)}),(0,q.jsx)(`small`,{children:r(`authNotVerified`)})]}),r(`openProviderSettings`)]}),(0,q.jsxs)(`div`,{className:`inspection-setup`,children:[(0,q.jsx)(`p`,{className:`inspection-note`,children:r(`configurationViaPi`)}),(0,q.jsx)(`code`,{children:`/openpi-setup`}),(0,q.jsx)(`button`,{type:`button`,className:`inspection-copy`,"aria-label":r(`copySetupCommand`),title:r(`copySetupCommand`),onClick:()=>p(`/openpi-setup`),children:(0,q.jsx)(_s,{"aria-hidden":`true`})})]}),(0,q.jsx)(`p`,{className:`inspection-updated`,children:r(`statusCaptured`,{time:l})})]}):(0,q.jsx)(`p`,{role:`status`,children:r(`inspectionLoading`)})]})})}var cA=32,lA=1048576;function uA(e){return e.drafts.reduce((e,t)=>e+sd(t.custom)+Object.values(t.notes).reduce((e,t)=>e+sd(t),0),0)}function dA(e,t,n){if(!(n.submission||n.drafts.some(e=>e.choice!==null||e.custom||Object.values(e.notes).some(Boolean))))return e.delete(t),!0;let r=e.get(t);if(!r&&e.size>=cA)return!1;let i=r?uA(r):0,a=uA(n),o=Array.from(e.values()).reduce((e,t)=>e+uA(t),0);return a>i&&o-i+a>lA?!1:(e.set(t,n),!0)}function fA(e,t,n,r){for(let[i,a]of e)a.sessionId===t&&a.sessionPath===n&&a.requestId!==r&&e.delete(i)}function pA({request:e,answer:t,onSettled:n,connected:r=!0,sessionPath:i=``,workingCache:a}){let{t:o}=W(),s=(0,K.useId)(),c=(0,K.useMemo)(()=>new Map,[]),l=a??c,u=JSON.stringify([e.sessionId,i,e.requestId]),[d,f]=(0,K.useState)(()=>l.get(u)??{sessionId:e.sessionId,sessionPath:i,requestId:e.requestId,drafts:e.questions.map(()=>({choice:null,custom:``,notes:{}})),index:0,review:!1,submission:null}),p=(0,K.useRef)(d),{drafts:m,index:h,review:g,submission:_}=d,[v,y]=(0,K.useState)(!!d.submission),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(!1),w=(0,K.useRef)(!1),T=!!_,E=(0,K.useRef)(null),D=(0,K.useRef)(null),O=e.questions[h],k=m[h],A=S||T||!r,j=m.some(e=>e.choice===`custom`?!cd(e.custom):typeof e.choice==`number`&&!cd(e.notes[e.choice]??``)),M=m.every(e=>e.choice!==null)&&!j,N=(t,n)=>e.handoff?o(n===0?`handoffDone`:`handoffUnable`):t;(0,K.useEffect)(()=>()=>E.current?.abort(),[]);let P=e=>dA(l,u,e)?(p.current=e,f(e),x(!1),!0):(x(!0),!1),F=(e,t=!1)=>{P({...p.current,index:e,review:t}),requestAnimationFrame(()=>D.current?.focus())},I=e=>{let t=p.current;P({...t,drafts:t.drafts.map((n,r)=>r===t.index?{...n,...e}:n)})},ee=()=>e.questions.map((e,t)=>{let n=m[t];if(n.choice===`custom`)return n.custom.trim()?{id:e.id,custom:n.custom}:{id:e.id,rephrase:!0};let r=typeof n.choice==`number`?e.options[n.choice]?.label:void 0;return{id:e.id,selected:r,...typeof n.choice==`number`&&n.notes[n.choice]?.trim()?{note:n.notes[n.choice]}:{}}}),L=async(i=!1)=>{if(w.current||!r||!i&&!T&&!M)return;let a=p.current.submission??{answers:i?null:ee()};if(!P({...p.current,submission:a}))return;w.current=!0,C(!0),y(!1);let o=new AbortController;E.current=o;try{let r=await t(e,a.answers,o.signal);o.signal.aborted||(l.delete(u),n(r))}catch{o.signal.aborted||y(!0)}finally{o.signal.aborted||(w.current=!1,C(!1))}};return(0,q.jsxs)(`section`,{className:`question-card`,"aria-labelledby":`${s}-title`,"aria-busy":S,children:[(0,q.jsxs)(`header`,{className:`question-card-header`,children:[(0,q.jsxs)(`span`,{className:`question-status`,children:[(0,q.jsx)(lc,{"aria-hidden":`true`}),o(e.handoff?`handoffWaiting`:`questionWaiting`)]}),(0,q.jsx)(`span`,{className:`question-count`,children:g?o(e.handoff?`handoffReview`:`questionReview`):o(`questionProgress`,{current:h+1,total:e.questions.length})}),(0,q.jsx)(`button`,{type:`button`,className:`question-icon`,"aria-label":o(`questionDismiss`),title:o(`questionDismiss`),disabled:A,onClick:()=>void L(!0),children:(0,q.jsx)(je,{})})]}),(0,q.jsxs)(`div`,{className:`question-card-body`,children:[(0,q.jsx)(`h2`,{id:`${s}-title`,ref:D,tabIndex:-1,children:g?o(`questionReviewTitle`):O.question}),e.handoff&&(0,q.jsxs)(`div`,{className:`handoff-instructions`,children:[(0,q.jsx)(`p`,{children:e.handoff.instructions}),(0,q.jsxs)(`p`,{className:`question-help`,children:[o(`handoffSignal`),` `,e.handoff.completionSignal]}),(0,q.jsx)(`p`,{className:`question-help`,children:o(`handoffVerify`)})]}),g?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`question-help`,children:o(`questionReviewHelp`)}),(0,q.jsx)(`ol`,{className:`question-review-list`,children:e.questions.map((e,t)=>{let n=m[t];return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`question-review-label`,children:e.header}),(0,q.jsx)(`p`,{children:typeof n.choice==`number`?N(e.options[n.choice]?.label,n.choice):n.custom.trim()||o(`questionRephrase`)}),typeof n.choice==`number`&&n.notes[n.choice]?.trim()&&(0,q.jsx)(`p`,{className:`question-help`,children:n.notes[n.choice]})]}),(0,q.jsx)(`button`,{type:`button`,className:`question-icon`,"aria-label":o(`questionEdit`,{question:e.header}),disabled:A,onClick:()=>F(t),children:(0,q.jsx)(yc,{})})]},e.id)})})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`fieldset`,{disabled:A,className:`question-choices`,children:[(0,q.jsx)(`legend`,{className:`sr-only`,children:O.header}),O.options.map((t,n)=>(0,q.jsxs)(`label`,{className:`question-choice ${k.choice===n?`is-selected`:``}`,children:[(0,q.jsx)(`input`,{className:`question-radio`,type:`radio`,name:`${s}-${O.id}`,checked:k.choice===n,onChange:()=>I({choice:n})}),(0,q.jsx)(`span`,{className:`question-choice-number`,"aria-hidden":`true`,children:k.choice===n?(0,q.jsx)(rs,{"aria-hidden":`true`}):n+1}),(0,q.jsxs)(`span`,{className:`question-choice-copy`,children:[(0,q.jsx)(`strong`,{children:N(t.label,n)}),(0,q.jsx)(`span`,{children:e.handoff?o(n===0?`handoffDoneHelp`:`handoffUnableHelp`):t.description})]})]},t.label))]}),typeof k.choice==`number`&&(0,q.jsxs)(`div`,{className:`question-extras`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`question-note-toggle`,disabled:A,"aria-expanded":!!k.notesExpanded,"aria-controls":k.notesExpanded?`${s}-notes`:void 0,onClick:()=>I({notesExpanded:!k.notesExpanded}),children:[(0,q.jsx)(yc,{"aria-hidden":`true`}),o(`questionNotes`)]}),typeof k.choice==`number`&&O.options[k.choice]?.preview&&(0,q.jsxs)(`details`,{className:`question-preview-disclosure`,children:[(0,q.jsx)(`summary`,{children:o(`questionPreview`)}),(0,q.jsx)(`pre`,{className:`question-preview`,children:O.options[k.choice].preview})]},`${O.id}-${k.choice}`)]}),(k.choice===`custom`||typeof k.choice==`number`&&k.notesExpanded)&&(0,q.jsxs)(`label`,{className:`question-notes`,id:`${s}-notes`,children:[(0,q.jsx)(`span`,{className:`sr-only`,id:`${s}-answer-label`,children:k.choice===`custom`?o(`questionYourAnswer`):o(`questionNotes`)}),(0,q.jsx)(`textarea`,{rows:1,disabled:A,value:k.choice===`custom`?k.custom:k.notes[k.choice]??``,onChange:e=>k.choice===`custom`?I({custom:e.target.value}):typeof k.choice==`number`&&I({notes:{...k.notes,[k.choice]:e.target.value}}),"aria-invalid":j,"aria-labelledby":`${s}-answer-label`,"aria-describedby":[j?`${s}-limit`:``,k.choice===`custom`?`${s}-custom-help`:``].filter(Boolean).join(` `)||void 0,placeholder:k.choice===`custom`?o(`questionCustomPlaceholder`):o(`questionNotesPlaceholder`)}),k.choice===`custom`&&(0,q.jsx)(`span`,{className:`question-help`,id:`${s}-custom-help`,children:o(`questionCustomHelp`)})]})]}),j&&(0,q.jsx)(`p`,{className:`question-error`,id:`${s}-limit`,role:`alert`,children:o(`questionLimit`,{count:8e3})}),b&&(0,q.jsx)(`p`,{className:`question-error`,role:`alert`,children:o(`questionDraftLimit`)}),!r&&(0,q.jsx)(`p`,{className:`question-help`,role:`status`,children:o(`questionDisconnected`)}),v&&(0,q.jsx)(`p`,{className:`question-error`,role:`alert`,children:o(`questionUncertain`)})]},`${h}:${g}`),(0,q.jsxs)(`footer`,{className:`question-card-footer`,children:[!g&&!e.handoff&&(0,q.jsxs)(`label`,{className:`question-custom ${k.choice===`custom`?`is-selected`:``} ${A?`is-disabled`:``}`,children:[(0,q.jsx)(`input`,{className:`question-radio`,type:`radio`,name:`${s}-${O.id}`,checked:k.choice===`custom`,disabled:A,onChange:()=>I({choice:`custom`})}),(0,q.jsx)(`span`,{className:`question-choice-number`,"aria-hidden":`true`,children:(0,q.jsx)(yc,{})}),(0,q.jsx)(`span`,{children:o(`questionCustom`)})]}),(0,q.jsxs)(`div`,{className:`question-actions`,children:[(g||h>0)&&(0,q.jsxs)(`button`,{type:`button`,className:`question-secondary`,disabled:A||!g&&h===0,onClick:()=>F(g?e.questions.length-1:h-1),children:[(0,q.jsx)(Ko,{}),o(`questionBack`)]}),!T&&(0,q.jsx)(`button`,{type:`button`,className:`question-secondary question-skip`,disabled:A,title:o(`questionDismiss`),onClick:()=>void L(!0),children:o(`questionSkip`)}),T?(0,q.jsxs)(`button`,{type:`button`,className:`question-primary`,disabled:S||!r,onClick:()=>void L(),children:[(0,q.jsx)(he,{}),o(S?`questionSubmitting`:`questionRetry`)]}):g?(0,q.jsxs)(`button`,{type:`button`,className:`question-primary`,disabled:A||!M,onClick:()=>void L(),children:[(0,q.jsx)(rs,{}),o(e.handoff?`handoffSubmit`:`questionSubmit`)]}):(0,q.jsxs)(`button`,{type:`button`,className:`question-primary`,disabled:A||k.choice===null||j,onClick:()=>F(hnew de,[]),s=(0,K.useMemo)(()=>new Map,[]),c=i??s,[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(0),_=(0,K.useRef)(null),v=(0,K.useRef)(null);return(0,K.useEffect)(()=>{let t=new AbortController;return o.pendingQuestions(e,t.signal).then(({pending:n})=>{if(t.signal.aborted)return;let i=n?.requestId===_.current?null:n;v.current=i?.requestId??null,m(!1),fA(c,e,r,n?.requestId),u(i),n&&n.requestId!==_.current&&f(null)},()=>{t.signal.aborted||m(!0)}),()=>t.abort()},[o,e,r,c,t,h]),!l&&!d&&!p?null:(0,q.jsx)(`div`,{className:`question-panel`,children:l?(0,q.jsx)(pA,{request:l,connected:n,sessionPath:r,workingCache:c,answer:(e,t,n)=>o.answerQuestions(e,t,n),onSettled:e=>{v.current===l.requestId&&(v.current=null,_.current=l.requestId,u(null),f(e.state===`answered`?null:e),g(e=>e+1))}},l.requestId):d?(0,q.jsxs)(`div`,{className:`question-receipt`,role:`status`,children:[(0,q.jsx)(rs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a(`questionState_${d.state}`)}),(0,q.jsx)(`button`,{type:`button`,className:`question-icon`,"aria-label":a(`questionCloseReceipt`),onClick:()=>f(null),children:(0,q.jsx)(je,{})})]}):(0,q.jsxs)(`div`,{className:`question-receipt`,role:`alert`,children:[(0,q.jsx)(`span`,{children:a(`questionLoadFailed`)}),(0,q.jsx)(`button`,{type:`button`,className:`question-secondary`,onClick:()=>g(e=>e+1),children:a(`questionRetryLoad`)})]})})}function hA(e,t,{active:n=!0,running:r=!1,initialSource:i=`unstaged`,initialBaseRef:a}={}){let{t:o}=W(),s=(0,K.useMemo)(()=>new de,[]),c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(!1),d=(0,K.useRef)({active:n,running:r});d.current={active:n,running:r};let[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)(null),v=e?.id,y=e?.path,[b,x]=(0,K.useState)({sessionId:v,sessionPath:y,source:i,baseRef:a}),S=b.sessionId===v&&b.sessionPath===y?b.source:i,C=b.sessionId===v&&b.sessionPath===y?b.baseRef:a,w=(0,K.useCallback)(e=>{x({sessionId:v,sessionPath:y,source:e,baseRef:C})},[v,y,C]),T=(0,K.useCallback)(e=>{x({sessionId:v,sessionPath:y,source:`branch`,baseRef:e})},[v,y]);(0,K.useLayoutEffect)(()=>{p(null),_(null),h(!!v)},[v,y,S,C]);let E=(0,K.useCallback)((e,t)=>{if(!(e.signal.aborted||c.current!==e)&&(c.current=null,h(!1),u.current)){u.current=!1;let e=d.current;(e.active||!e.running)&&l.current===null&&(l.current=window.setTimeout(()=>{l.current=null,t()},e.active?200:2e3))}},[]),D=(0,K.useCallback)(async()=>{if(!v||!y||document.visibilityState===`hidden`)return;if(c.current){u.current=!0;return}let e=new AbortController;c.current=e,h(!0),_(null);try{let t=await s.gitReview(v,y,e.signal,{source:S,offset:`0`,...S===`branch`&&C?{baseRef:C}:{}});e.signal.aborted||(t.ok||_(o(t.reason===`not_git_repository`?`gitReviewNotRepository`:t.reason===`baseline_unavailable`?`gitReviewBaselineUnavailable`:t.reason===`base_branch_unavailable`?`gitReviewBaseUnavailable`:t.reason===`invalid_base_branch`?`gitReviewBaseInvalid`:`gitReviewFailed`)),p(e=>!t.ok&&e?.ok?t.branches?{...e,branches:t.branches}:e:t.ok&&e?.ok&&t.snapshot.revision===e.snapshot.revision?JSON.stringify(t.branches)===JSON.stringify(e.branches)?e:{...e,branches:t.branches}:t))}catch(t){e.signal.aborted||_(t instanceof Error?t.message:`Git review unavailable`)}finally{E(e,D)}},[s,v,y,S,C,o,E]),O=(0,K.useCallback)(async()=>{if(!v||!y||!f?.ok||f.snapshot.nextOffset===void 0||c.current)return;let e=f.snapshot,t=new AbortController;c.current=t,h(!0),_(null);try{let n=await s.gitReview(v,y,t.signal,{source:S,offset:String(e.nextOffset),revision:e.revision,...S===`branch`&&C?{baseRef:C}:{}});if(t.signal.aborted)return;if(!n.ok||n.snapshot.revision!==e.revision)throw Error(o(!n.ok&&n.reason===`revision_changed`?`gitReviewChanged`:`gitReviewFailed`));p({...n,snapshot:{...n.snapshot,files:[...e.files,...n.snapshot.files],additions:e.additions+n.snapshot.additions,deletions:e.deletions+n.snapshot.deletions}})}catch(e){t.signal.aborted||_(e instanceof Error?e.message:o(`gitReviewFailed`))}finally{E(t,D)}},[s,v,y,S,C,f,o,E,D]),k=(0,K.useCallback)(async(e,t,n)=>{if(!v||!y)return;let r=await s.gitReview(v,y,t,{source:S,file:e,revision:n,...S===`branch`&&C?{baseRef:C}:{}});if(!r.ok||r.summaryRevision!==n)throw(r.ok||r.reason===`revision_changed`)&&!t.aborted&&D(),Error(o(!r.ok&&r.reason!==`revision_changed`?`gitReviewFailed`:`gitReviewChanged`));return r.snapshot.files.find(t=>t.path===e)},[s,v,y,S,C,D,o]);return(0,K.useEffect)(()=>{if(v)return l.current=window.setTimeout(()=>{l.current=null,D()},200),()=>{l.current!==null&&window.clearTimeout(l.current),l.current=null,u.current=!1,c.current?.abort(),c.current=null}},[D,v]),(0,K.useEffect)(()=>{n&&l.current!==null&&(window.clearTimeout(l.current),l.current=null)},[n]),(0,K.useEffect)(()=>{if(!n&&r){l.current!==null&&window.clearTimeout(l.current),l.current=null,u.current=!1;return}!v||l.current!==null||(l.current=window.setTimeout(()=>{l.current=null,D()},n?200:2e3))},[D,t,n,r,v]),(0,K.useEffect)(()=>{if(!v)return;let e=()=>{let e=d.current;(e.active||!e.running)&&D()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}},[D,v]),(0,K.useMemo)(()=>({result:f,loading:m,error:g,refresh:D,source:S,setSource:w,baseRef:C,setBaseRef:T,readFile:k,loadMore:O}),[f,m,g,D,S,w,C,T,k,O])}function gA({notice:e,actions:t}){let{t:n}=W(),r=(0,K.useRef)(!1),[i,a]=(0,K.useState)(null),[o,s]=(0,K.useState)(!1),c=()=>t.dismissArchiveNotice(e.key),l=async n=>{if(!r.current){r.current=!0,a(n),s(!1);try{(n===`undo`?await t.unarchiveSession(e.path):await t.selectSession(e.path,e.sessionId))===!1?s(!0):c()}catch{s(!0)}finally{r.current=!1,a(null)}}};return(0,q.jsx)(`div`,{className:`archive-notification`,"data-session-path":e.path,children:(0,q.jsx)(Gu,{type:`info`,body:n(`archiveNoticeTitle`),isAutoHide:!i&&!o,autoHideDuration:8e3,onDismiss:c,renderContent:()=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Go,{className:`archive-notification-icon`,"aria-hidden":`true`}),(0,q.jsxs)(`div`,{className:`archive-notification-copy`,children:[(0,q.jsx)(`strong`,{children:n(`archiveNoticeTitle`)}),(0,q.jsx)(`span`,{title:e.title,children:e.title}),o&&(0,q.jsx)(`span`,{className:`archive-notification-error`,role:`alert`,children:n(`archiveNoticeFailed`)})]}),(0,q.jsx)(`button`,{type:`button`,disabled:i!==null,onClick:()=>void l(`view`),children:n(`archiveNoticeView`)}),(0,q.jsxs)(`button`,{type:`button`,className:`archive-notification-undo`,disabled:i!==null,onClick:()=>void l(`undo`),children:[i===`undo`&&(0,q.jsx)(rc,{className:`archive-notification-spinner`,"aria-hidden":`true`}),n(`archiveNoticeUndo`)]}),(0,q.jsx)(`button`,{type:`button`,className:`archive-notification-close`,"aria-label":n(`close`),onClick:c,children:(0,q.jsx)(je,{"aria-hidden":`true`})})]})})})}function _A({notices:e,actions:t}){return e.length?(0,q.jsx)(`div`,{className:`archive-notifications`,children:e.map(e=>(0,q.jsx)(gA,{notice:e,actions:t},e.key))}):null}function vA(e){let t=e?.closest(`.session-row, .workspace-group`),n=e?.closest(`.session-sidebar`),r=t?.dataset.sessionKey,i=Array.from(n?.querySelectorAll(`.session, .workspace-label, .workspace-heading-label`)??[]),a=i.findIndex(e=>t?.contains(e)),o=a<0?i:[...i.slice(a+1),...i.slice(0,a).reverse()];return()=>requestAnimationFrame(()=>{!n?.isConnected||document.querySelector(`dialog[open]`)||[e,r==null?null:Array.from(n.querySelectorAll(`.session-row`)).find(e=>e.dataset.sessionKey===r)?.querySelector(`.menu-action-button`),...o,n.querySelector(`.new-session-button`)].find(e=>e?.isConnected&&!e.closest(`[hidden], [inert]`)&&e.checkVisibility?.()!==!1)?.focus({preventScroll:!0})})}function yA({session:e,archived:t,connected:n,pinSaving:r,restoring:i,movementItems:a,client:o,actions:s,onRename:c,onPin:l,onRead:u,onArchive:d,onNotice:f}){let{t:p}=W(),m=(0,K.useRef)(null),h=(0,K.useRef)(!0),g=(0,K.useRef)(0),_=(0,K.useRef)(!1),[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(null),[S,C]=(0,K.useState)(!1),[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(null),[O,k]=(0,K.useState)(!1),[A,j]=(0,K.useState)(null),[M,N]=(0,K.useState)(!1),[P,F]=(0,K.useState)(!1),I=e.execution?.status===`running`||e.execution?.waitingForInput,ee=(e.execution?.pendingFollowUps??0)+(e.execution?.pendingSteering??0)>0,L=n?I||ee?p(`sidebarActionRunning`):void 0:p(`sidebarActionDisconnected`),R=t?p(`sidebarForkArchived`):n?E?.local===!1?p(`sidebarForkUnavailable`):void 0:p(`sidebarActionDisconnected`),te=A!==null&&(A.path!==e.path||A.id!==e.id),z=e.pinOrder!==void 0,B=()=>vA(m.current?.querySelector(`button`)??null),ne=()=>{let t=new URL(`/`,window.location.origin);return t.searchParams.set(`sessionPath`,e.path),t.searchParams.set(`sessionId`,e.id),t.href};(0,K.useEffect)(()=>(h.current=!0,()=>{h.current=!1,g.current++}),[]);let re=(0,K.useRef)({id:e.id,path:e.path});(0,K.useEffect)(()=>{(re.current.id!==e.id||re.current.path!==e.path)&&(re.current={id:e.id,path:e.path},y(!1),x(null),D(null))},[e.id,e.path]),(0,K.useEffect)(()=>{if(!v||!e.cwd||!n)return;let t=++g.current;return x(null),C(!1),o.sessionOpenTargets(e.path,e.id).then(e=>{h.current&&g.current===t&&x(e.targets)}).catch(()=>{h.current&&g.current===t&&C(!0)}),()=>{g.current++}},[o,n,v,e.cwd,e.id,e.path]),(0,K.useEffect)(()=>{if(!v||t||!n)return;let r=!1;return D(null),k(!1),Promise.resolve().then(()=>o.sessionForkOptions(e.path,e.id)).then(e=>{r||D(e)}).catch(()=>{r||k(!0)}),()=>{r=!0}},[t,o,n,v,e.id,e.path]);let V=()=>{y(!1),queueMicrotask(c)},ie=()=>{let e=B();l().then(e,e)},ae=()=>{let e=B();d().then(e,e)},oe=async t=>{try{let n=await td(t===`link`?ne():t===`cwd`?e.cwd:(await o.sessionMarkdown(e.path,e.id)).markdown);f(p(n?`sidebarCopied`:`sidebarCopyFailed`),!n)}catch{f(p(`sidebarCopyFailed`),!0)}},se=async(t=`local`)=>{if(!(w||R)&&!(t===`worktree`&&!E?.worktree)){T(!0);try{t===`worktree`?await s.forkConversation(e.path,e.id,t):await s.forkConversation(e.path,e.id)}catch{f(p(`sidebarForkFailed`),!0)}finally{h.current&&T(!1)}}},ce=()=>{if(_.current)return;let e=A?.restoreFocus;j(null),e?.()},le=async()=>{if(!(!A||_.current||L||te)){_.current=!0,N(!0),F(!1);try{await s.deleteSession(A.path,A.id,A.commandId)?(h.current&&j(null),A.restoreFocus()):h.current&&F(!0)}catch{h.current&&F(!0)}finally{_.current=!1,h.current&&N(!1)}}},H=[{id:`rename`,label:p(`sidebarRename`),icon:(0,q.jsx)(yc,{}),isDisabled:!n,onClick:V},...t?[]:[{id:`pin`,label:p(z?`sidebarUnpin`:`sidebarPin`),icon:z?(0,q.jsx)(bc,{}):(0,q.jsx)(xc,{}),isDisabled:r||!n,onClick:ie},{id:`read`,label:p(e.unread?`markConversationRead`:`markConversationUnread`),icon:(0,q.jsx)(As,{}),isDisabled:!e.readRevision||!n,onClick:()=>void u()}],...a.length?[{type:`divider`},...a]:[],...t?[]:[{type:`divider`},{id:`fork`,label:R?(0,q.jsxs)(`span`,{className:`sidebar-menu-unavailable`,children:[(0,q.jsx)(`span`,{children:p(`sidebarFork`)}),(0,q.jsx)(`small`,{children:R})]}):p(`sidebarFork`),icon:(0,q.jsx)(Ws,{}),isDisabled:!!R||w,items:[{id:`fork-local`,label:p(w?`forkSessionPending`:e.worktree?`sidebarForkSameWorktree`:`sidebarForkLocal`),icon:(0,q.jsx)(pc,{}),onClick:()=>void se()},...E?.worktree?[{id:`fork-worktree`,label:p(`sidebarForkWorktree`),icon:(0,q.jsx)(Gc,{className:`sidebar-worktree-icon`}),onClick:()=>void se(`worktree`)}]:E===null?[{id:`fork-worktree-loading`,label:p(O?`sidebarForkOptionsFailed`:`sidebarForkOptionsLoading`),isDisabled:!0}]:[]]}],{type:`divider`},{id:`copy`,label:p(`sidebarCopy`),icon:(0,q.jsx)(Ss,{}),items:[{id:`copy-link`,label:p(`sidebarCopyLink`),onClick:()=>void oe(`link`)},{id:`copy-markdown`,label:p(`sidebarCopyMarkdown`),isDisabled:!n,onClick:()=>void oe(`markdown`)},{id:`copy-cwd`,label:p(`sidebarCopyCwd`),isDisabled:!e.cwd,onClick:()=>void oe(`cwd`)}]},{type:`divider`},{id:`new-window`,label:p(`sidebarNewWindow`),icon:(0,q.jsx)(Fc,{}),onClick:()=>{window.open(ne(),`_blank`,`noopener,noreferrer`)}},...e.cwd&&n&&(b==null||b.length>0)?[{id:`open-in`,label:p(`sidebarOpenIn`),icon:(0,q.jsx)(Yo,{}),items:b?.map(t=>({id:t.id,label:t.label,onClick:()=>{o.openSessionIn(e.path,e.id,t.id).catch(()=>f(p(`sidebarOpenFailed`),!0))}}))??[{id:`open-in-loading`,label:p(S?`sidebarAppsFailed`:`sidebarAppsLoading`),isDisabled:!0}]}]:[],{type:`divider`},{id:t?`restore`:`archive`,label:p(i?`restoringConversation`:t?`sidebarRestore`:`sidebarArchive`),icon:t?(0,q.jsx)(Wo,{}):(0,q.jsx)(Go,{}),isDisabled:i||!!L,description:L,onClick:ae},{id:`delete`,label:p(`sidebarDelete`),icon:(0,q.jsx)(Uc,{}),isDisabled:!!L,description:L,onClick:()=>{let t=B();queueMicrotask(()=>{h.current&&(F(!1),j({commandId:crypto.randomUUID(),path:e.path,id:e.id,name:ID(e,p(`untitledSession`)),restoreFocus:t}))})}}];return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`astryx-menu-trigger`,ref:m,children:(0,q.jsx)(yo,{className:`sidebar-action-menu sidebar-conversation-menu`,button:{label:p(`conversationOptions`),icon:(0,q.jsx)(Ds,{}),isIconOnly:!0,size:`sm`,variant:`ghost`,className:`menu-action-button`},items:v?H:[],menuWidth:248,placement:`below`,alignment:`start`,hasChevron:!1,isMenuOpen:v,onOpenChange:y})}),A&&(0,q.jsx)(Se,{isOpen:A!==null,onOpenChange:e=>{e||ce()},purpose:`form`,width:420,"aria-label":p(`sidebarDeleteTitle`),children:(0,q.jsxs)(`form`,{className:`openpi-dialog sidebar-delete-dialog`,onSubmit:e=>{e.preventDefault(),le()},children:[(0,q.jsx)(`strong`,{children:p(`sidebarDeleteTitle`)}),(0,q.jsx)(`p`,{children:p(`sidebarDeleteDescription`,{name:A?.name})}),(P||te)&&(0,q.jsx)(`p`,{className:`sidebar-dialog-error`,role:`alert`,children:p(te?`sessionLinkUnavailable`:`sidebarDeleteFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,disabled:M,onClick:ce,children:p(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,className:`danger`,disabled:M||!!L||te,children:p(M?`sidebarDeleting`:`sidebarDeleteConfirm`)})]})]})})]})}var bA=e=>JSON.stringify([`session`,e.id,e.path]),xA=e=>JSON.stringify([`message`,e.sessionId,e.sessionPath,e.messageId,e.source,e.lineOffset]);function SA({open:e,initialQuery:t,initialIncludeArchived:n,sessions:r,workspaces:i,onClose:a,onCreateSession:o,onOpenSession:s,onOpenMessage:c}){let{t:l}=W(),u=(0,K.useMemo)(()=>new de,[]),[d,f]=(0,K.useState)(t),p=n,[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(!1),[v,y]=(0,K.useState)(0),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(null),[E,D]=(0,K.useState)(null),O=(0,K.useRef)(null),k=(0,K.useId)(),A=(0,K.useRef)(null);(0,K.useEffect)(()=>(e&&(f(t),h(null),x(!1),C(null),T(null)),()=>{A.current?.abort(),A.current=null}),[e,t]);let j=d.trim(),M=(0,K.useMemo)(()=>new Map(i?.map(e=>[e.path,e.name])),[i]),N=(0,K.useMemo)(()=>{if(!e||!s)return[];let t=j.toLocaleLowerCase();return(r??[]).filter(e=>e.archived&&!p?!1:!t||`${ID(e,l(`untitledSession`))} ${e.cwd} ${M.get(e.cwd)??``}`.toLocaleLowerCase().includes(t)).sort((e,t)=>t.modified.localeCompare(e.modified)||e.path.localeCompare(t.path))},[e,r,M,j,p,s,l]),P=j?[{name:`transcriptSearchSessions`,sessions:N.slice(0,9)}]:[{name:`pinnedConversations`,sessions:N.filter(e=>e.pinOrder!==void 0).sort((e,t)=>(e.pinOrder??0)-(t.pinOrder??0))},{name:`transcriptSearchRecent`,sessions:N.filter(e=>e.pinOrder===void 0).slice(0,10)}];(0,K.useLayoutEffect)(()=>{A.current?.abort(),A.current=null,T(null),C(null),D(null)},[e,j,p,v]),(0,K.useEffect)(()=>{if(!e||!j){_(!1),x(!1);return}let t=new AbortController;_(!0),x(!1);let n=window.setTimeout(()=>{u.searchTranscripts(j,{includeArchived:p,signal:t.signal}).then(e=>{t.signal.aborted||h({query:j,revision:v,includeArchived:p,response:e})}).catch(()=>{t.signal.aborted||x(!0)}).finally(()=>{t.signal.aborted||_(!1)})},250);return()=>{window.clearTimeout(n),t.abort()}},[u,e,j,p,v]);let F=m?.query===j&&m.revision===v&&m.includeArchived===p?m.response:null,I=[...P.flatMap(e=>e.sessions.map(bA)),...j?F?.matches.map(xA)??[]:[]],ee=E!==null&&I.includes(E)?E:I[0],L=e=>`${k}-${encodeURIComponent(e)}`,R=ee?L(ee):void 0;(0,K.useLayoutEffect)(()=>{e&&R&&document.getElementById(R)?.scrollIntoView?.({block:`nearest`})},[e,R]);let te=async(e,t,n)=>{if(A.current)return;D(e),O.current?.focus({preventScroll:!0});let r=new AbortController;A.current=r,T(e),C(null);try{let e=await t(r.signal);if(r.signal.aborted)return;e===!1?C(n):a()}catch{r.signal.aborted||C(n)}finally{A.current===r&&(A.current=null,T(null))}};return(0,q.jsx)(Se,{isOpen:e,onOpenChange:e=>!e&&a(),purpose:`info`,width:`min(700px, 92vw)`,maxHeight:`calc(var(--transcript-search-list-height) + 64px)`,padding:0,className:`transcript-search-modal`,"aria-label":l(`transcriptSearch`),children:e&&(0,q.jsxs)(`div`,{className:`transcript-search-dialog`,children:[(0,q.jsx)(`h2`,{className:`transcript-search-sr-only`,children:l(`transcriptSearch`)}),(0,q.jsx)(`input`,{ref:O,className:`transcript-search-input`,"data-autofocus":!0,type:`search`,maxLength:200,value:d,"aria-label":l(`transcriptSearch`),"aria-autocomplete":`list`,"aria-controls":k,"aria-activedescendant":R,placeholder:l(`transcriptSearchPlaceholder`),autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,onChange:e=>f(e.target.value),onKeyDown:e=>{if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229||![`ArrowDown`,`ArrowUp`,`Home`,`End`,`Enter`].includes(e.key)||w!==null)return;if(!ee||!R){e.key===`Enter`&&!j&&o&&(e.preventDefault(),a(),o());return}e.preventDefault();let t=I.indexOf(ee);if(e.key===`Enter`){document.getElementById(R)?.click();return}let n=e.key===`Home`?0:e.key===`End`?I.length-1:e.key===`ArrowDown`?Math.min(t+1,I.length-1):Math.max(t-1,0);D(I[n]??null)}}),(0,q.jsx)(`span`,{className:`transcript-search-sr-only`,role:`status`,children:g?l(`transcriptSearching`):null}),(0,q.jsxs)(`div`,{className:`transcript-search-groups`,children:[(0,q.jsx)(`div`,{id:k,role:`listbox`,"aria-label":l(`transcriptSearch`),children:P.filter(e=>e.sessions.length>0||j&&F?.matches.length).map(e=>(0,q.jsxs)(`fieldset`,{"aria-label":l(e.name),children:[(0,q.jsxs)(`h3`,{children:[l(e.name),g&&(0,q.jsx)(rc,{className:`is-spinning`,"aria-hidden":`true`})]}),(0,q.jsxs)(`ul`,{className:`transcript-search-results`,role:`presentation`,children:[s&&e.sessions.map(e=>{let t=ID(e,l(`untitledSession`)),n=bA(e),r=e.ungrouped?l(`ungrouped`):M.get(e.cwd)||LD(e.cwd);return(0,q.jsx)(`li`,{role:`presentation`,children:(0,q.jsxs)(`button`,{id:L(n),role:`option`,"aria-selected":n===ee,tabIndex:-1,type:`button`,disabled:w!==null,"aria-label":l(`transcriptSearchSessionResult`,{session:t}),onPointerMove:()=>D(n),onMouseDown:e=>e.preventDefault(),onClick:()=>void te(n,t=>s(e.path,t),`transcriptSearchSessionOpenFailed`),children:[(0,q.jsx)(`span`,{className:`transcript-search-accessory`,"aria-hidden":`true`,children:w===n?(0,q.jsx)(rc,{className:`is-spinning`}):e.unread?(0,q.jsx)(hs,{className:`transcript-search-unread`}):null}),(0,q.jsx)(`span`,{className:`transcript-search-result-body`,children:(0,q.jsxs)(`span`,{className:`transcript-search-result-line`,children:[(0,q.jsx)(`span`,{className:`transcript-search-title`,title:t,children:t}),(0,q.jsx)(`span`,{className:`transcript-search-project`,title:e.cwd,children:r})]})})]})},n)}),j&&F?.matches.map(e=>{let t=e.sessionName||l(`untitledSession`),n=l(`transcriptSearchSource_${e.source}`),r=xA(e);return(0,q.jsx)(`li`,{role:`presentation`,children:(0,q.jsxs)(`button`,{id:L(r),role:`option`,"aria-selected":r===ee,tabIndex:-1,type:`button`,disabled:w!==null,"aria-label":l(`transcriptSearchResult`,{session:t,source:n}),onPointerMove:()=>D(r),onMouseDown:e=>e.preventDefault(),onClick:()=>void te(r,t=>c({sessionId:e.sessionId,sessionPath:e.sessionPath,entryId:e.messageId},t),`transcriptSearchOpenFailed`),children:[(0,q.jsx)(`span`,{className:`transcript-search-accessory`,"aria-hidden":`true`,children:w===r&&(0,q.jsx)(rc,{className:`is-spinning`})}),(0,q.jsxs)(`span`,{className:`transcript-search-result-body`,children:[(0,q.jsxs)(`span`,{className:`transcript-search-result-line`,children:[(0,q.jsx)(`span`,{className:`transcript-search-title`,title:t,children:t}),(0,q.jsx)(`span`,{className:`transcript-search-project`,title:e.workspace??n,children:e.workspace?M.get(e.workspace)||LD(e.workspace):n})]}),(0,q.jsx)(`span`,{className:`transcript-search-snippet`,children:e.snippet})]})]})},r)})]})]},e.name))}),!j&&!N.length&&(0,q.jsxs)(`div`,{className:`transcript-search-empty-history`,children:[(0,q.jsx)(`p`,{children:l(`noConversations`)}),o&&(0,q.jsx)(`button`,{className:`transcript-search-create`,type:`button`,onClick:()=>{a(),o()},children:l(`newSession`)})]}),j&&!N.length&&!F?.matches.length&&(g?(0,q.jsx)(`div`,{className:`transcript-search-feedback`,"aria-hidden":`true`,children:(0,q.jsx)(rc,{className:`is-spinning`})}):F&&!b?(0,q.jsx)(`div`,{className:`transcript-search-feedback`,role:`status`,children:l(`transcriptSearchEmpty`)}):null),b&&(0,q.jsxs)(`p`,{className:`transcript-search-error`,role:`alert`,children:[l(`transcriptSearchFailed`),(0,q.jsx)(`button`,{type:`button`,onClick:()=>y(e=>e+1),children:l(`transcriptSearchRetry`)})]}),S&&(0,q.jsx)(`p`,{className:`transcript-search-error`,role:`alert`,children:l(S)}),F?.partial&&(0,q.jsx)(`p`,{className:`transcript-search-partial`,children:l(`transcriptSearchPartial`)})]})]})})}function CA({workspace:e,client:t,actions:n,connected:r,onClose:i}){let{t:a}=W(),[o,s]=(0,K.useState)([]),[c,l]=(0,K.useState)(),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(0),[g,_]=(0,K.useState)(null),[v,y]=(0,K.useState)(null),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(!1),w=(0,K.useRef)(0),T=(0,K.useRef)(null),E=(0,K.useRef)(!1),D=(0,K.useRef)(!0),O=(0,K.useCallback)(async n=>{let r=++w.current;d(!0),p(null);try{let i=await t.workspaceWorktrees(e,n);if(!D.current||r!==w.current)return;if(i.truncated&&!i.nextCursor)throw Error(`Missing worktree continuation`);s(e=>{let t=n?[...e]:[];for(let e of i.worktrees)t.some(t=>t.worktreePath===e.worktreePath&&t.sessionId===e.sessionId&&t.sessionPath===e.sessionPath)||t.push(e);return t}),l(i.nextCursor),h(e=>(n?e:0)+i.unavailable)}catch(e){D.current&&r===w.current&&p(e instanceof ge&&e.code===`WORKTREE_LIST_CHANGED`?`changed`:`failed`)}finally{D.current&&r===w.current&&d(!1)}},[t,e]);(0,K.useEffect)(()=>(D.current=!0,O(),()=>{D.current=!1,w.current++}),[O]);let k=async()=>{if(!(!g||E.current||!r)){E.current=!0,C(!0);try{let e=await n.releaseSessionWorktree(g);if(!D.current)return;y(e),x(!1),e.state===`removed`&&s(e=>e.filter(e=>e.worktreePath!==g.worktreePath||e.sessionId!==g.sessionId||e.sessionPath!==g.sessionPath))}catch{D.current&&(x(!0),y(null))}finally{E.current=!1,D.current&&C(!1)}}};(0,K.useEffect)(()=>{g&&!S&&T.current?.focus()},[g,S]);let A=()=>{E.current||i()};return(0,q.jsx)(Se,{isOpen:!0,onOpenChange:e=>{e||A()},purpose:`form`,width:560,"aria-label":a(`managedWorktrees`),children:(0,q.jsxs)(`div`,{className:`openpi-dialog`,children:[(0,q.jsx)(`strong`,{children:a(`managedWorktrees`)}),(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:e}),(0,q.jsx)(`p`,{children:a(`managedWorktreesDescription`)}),g?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:g.worktreePath}),(0,q.jsx)(`p`,{children:a(`managedWorktreeConfirm`)}),(v||b)&&(0,q.jsxs)(`p`,{role:`status`,className:v?.state===`removed`?void 0:`sidebar-dialog-error`,children:[a(v?.state===`removed`?`managedWorktreeRemoved`:v?.state===`preserved`?`managedWorktreePreserved`:v?.state===`uncertain`?`managedWorktreeUncertainTerminal`:`managedWorktreeUncertain`),v?.reason&&(0,q.jsxs)(q.Fragment,{children:[` `,v.reason]})]}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,ref:T,disabled:S,onClick:()=>{_(null),y(null),x(!1)},children:a(`managedWorktreesBack`)}),v?.state!==`removed`&&v?.state!==`uncertain`&&(0,q.jsx)(`button`,{type:`button`,className:`danger`,disabled:S||!r,onClick:()=>void k(),children:a(S?`managedWorktreeRemoving`:v||b?`managedWorktreesRetry`:`managedWorktreeRemove`)})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`managed-worktrees-list`,children:o.map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:e.worktreePath}),(0,q.jsx)(`button`,{type:`button`,disabled:!r||u||!!f,onClick:()=>{_(e),y(null),x(!1)},children:a(`managedWorktreeReview`)})]},JSON.stringify([e.worktreePath,e.sessionId,e.sessionPath])))}),!u&&!f&&!o.length&&(0,q.jsx)(`p`,{children:a(`managedWorktreesEmpty`)}),m>0&&(0,q.jsx)(`p`,{children:a(`managedWorktreesUnavailable`,{count:m})}),f&&(0,q.jsx)(`p`,{role:`alert`,children:a(f===`changed`?`managedWorktreesChanged`:`managedWorktreesLoadFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,onClick:A,children:a(`close`)}),f&&(0,q.jsx)(`button`,{type:`button`,disabled:u||!r,onClick:()=>void O(f===`changed`?void 0:c),children:a(f===`changed`?`managedWorktreesRefresh`:`managedWorktreesRetry`)}),c&&!f&&(0,q.jsx)(`button`,{type:`button`,disabled:u||!r,onClick:()=>void O(c),children:a(`managedWorktreesMore`)}),u&&(0,q.jsx)(`span`,{role:`status`,children:a(`loading`)})]})]})]})})}function wA(e){return e.workspacePath??e.cwd}function TA(e,t,n){return e[t+(n?2:-1)]??null}function EA(e,t,n){return e[t+ +!!n]??null}function DA(e,t){return e>t.top+t.height/2}function OA(e){let t=e.execution?.lastTurn;return JSON.stringify(t?[e.path,e.id,t.commandId,t.finishedAt]:[e.path,e.id])}function kA(e){return e.firstUnread?.type===`turn`?e.firstUnread.finishedAt:e.execution?.lastTurn?.finishedAt??Date.parse(e.modified)}function AA(e){return JSON.stringify([e.path,e.id])}function jA(e,t=!0){return t&&e.execution?.waitingForInput?0:e.unread?1:t&&e.execution?.status===`running`?2:3}function MA({items:e,label:t,alignment:n=`start`}){return(0,q.jsx)(`span`,{className:`astryx-menu-trigger`,children:(0,q.jsx)(yo,{className:`sidebar-action-menu`,button:{label:t,icon:(0,q.jsx)(Ds,{}),isIconOnly:!0,size:`sm`,variant:`ghost`,className:`menu-action-button`},items:e,menuWidth:240,placement:`below`,alignment:n,hasChevron:!1})})}function NA(e){let{t,i18n:n}=W(),[r,i]=(0,K.useState)(null),a=(0,K.useRef)(null),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(10),[g,_]=(0,K.useState)(!0),[v,y]=(0,K.useState)(new Set),b=(0,K.useRef)(null),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(new Set),[k,A]=(0,K.useState)(10),[j,M]=(0,K.useState)(!1),[N,P]=(0,K.useState)(null),[F,I]=(0,K.useState)(!1),ee=(0,K.useRef)(new Set),L=(0,K.useRef)(null),R=(0,K.useRef)(null),te=(0,K.useRef)(e.connected),[z,B]=(0,K.useState)(null),[ne,re]=(0,K.useState)(``),[ie,ae]=(0,K.useState)(!1),oe=(0,K.useRef)(null),se=(0,K.useRef)(null),ce=(0,K.useRef)(null),le=(0,K.useRef)(null),H=(0,K.useRef)(null),fe=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!N)return;let e=window.setTimeout(()=>P(null),5e3);return()=>window.clearTimeout(e)},[N]);let pe=e.snapshot,he=pe?.selectedSession?.path===e.selectedPath?e.selectedPath:null,_e=pe?.sessions.find(e=>e.path===pe.selectedSession?.path&&e.id===pe.selectedSession?.id),ve=OA(_e??{id:``,path:``});(0,K.useLayoutEffect)(()=>{e.selectedPath,L.current=null,R.current=null,M(!1)},[ve,e.selectedPath]),(0,K.useEffect)(()=>{let t=te.current===!1&&e.connected!==!1;if(te.current=e.connected,R.current&&_e?.readRevision&&R.current.revision!==_e.readRevision&&(R.current=null,L.current=ve,M(!1)),!e.sessionViewVisible||!_e||e.selectedPath!==_e.path||L.current===ve||e.connected===!1)return;let n=(t=!1)=>{if(document.visibilityState!==`visible`||!document.hasFocus()||document.querySelector(`dialog[open]`)||L.current===ve)return;if(!_e.unread||!_e.readRevision){L.current=ve,R.current=null;return}if(R.current?.state===`pending`||R.current?.state===`failed`&&!t)return;let n={state:`pending`,revision:_e.readRevision};R.current=n,M(!1),e.actions.setSessionRead(_e.path,_e.id,!0,_e.readRevision).then(()=>{!$e.current||R.current!==n||(R.current=null,L.current=ve)}).catch(()=>{!$e.current||R.current!==n||(n.state=`failed`,M(!0))})},r=()=>n(!0);return n(t),document.addEventListener(`visibilitychange`,r),window.addEventListener(`focus`,r),document.addEventListener(`close`,r,!0),()=>{document.removeEventListener(`visibilitychange`,r),window.removeEventListener(`focus`,r),document.removeEventListener(`close`,r,!0)}},[ve,_e,e.sessionViewVisible,e.selectedPath,e.connected,e.actions]);let ye=(0,K.useMemo)(()=>new de,[]),[be,xe]=(0,K.useState)(!1),[Ce,we]=(0,K.useState)(!1),[Te,Ee]=(0,K.useState)(!1),U=(0,K.useRef)(!1),De=(0,K.useRef)(null),Oe=(0,K.useRef)(!1),[ke,G]=(0,K.useState)(!1),Me=(0,K.useRef)(null),[Ne,Pe]=(0,K.useState)(null),[Fe,Ie]=(0,K.useState)(null),[Le,Re]=(0,K.useState)(!1),[ze,Be]=(0,K.useState)(!1),Ve=pe?.preferences.pinnedSort??`manual`,He=pe?.preferences.sidebarGrouping??`project`,Ue=pe?.preferences.chatsSort??`updated`,We=(pe?.sessions??[]).filter(e=>e.pinOrder!==void 0&&!e.archived).sort((e,t)=>(Ve===`updated`?t.modified.localeCompare(e.modified):0)||e.pinOrder-t.pinOrder).filter(n=>{let r=pe?.workspaces.find(e=>e.path===wA(n));return`${ID(n,t(`untitledSession`))} ${n.cwd} ${r?.name??``}`.toLowerCase().includes(e.query.trim().toLowerCase())}),Ge=async e=>{if(!U.current){U.current=!0,Ee(!0),Be(!1);try{await e()}catch{Be(!0)}finally{U.current=!1,Ee(!1)}}},Ke=(t,n,r)=>Ge(()=>e.actions.setSessionPin(t.path,t.id,n,r)),qe=(t,n,r)=>Ge(()=>e.actions.setSidebarPin(t,n,r)),Je=t=>Ge(async()=>{await ye.savePreferences(t),await e.actions.refreshSnapshot()}),Ye=async(t,n)=>{if(!t.readRevision)return;let r=OA(t);if(!ee.current.has(r)){t.path===e.selectedPath&&(R.current=null,L.current=r),ee.current.add(r),M(!1);try{await e.actions.setSessionRead(t.path,t.id,n,t.readRevision)}catch{M(!0)}finally{ee.current.delete(r)}}},Xe=e.query.trim(),Ze=JSON.stringify([be,Xe]),Qe=(0,K.useRef)({key:Ze});Qe.current.key!==Ze&&(Qe.current={key:Ze});let $e=(0,K.useRef)(!1),[et,tt]=(0,K.useState)(null),[nt,rt]=(0,K.useState)(!1),[it,at]=(0,K.useState)(null),ot=(0,K.useRef)(null),st=et?.query===Xe?et:null,ct=it?.query===Xe?it:null,lt=(0,K.useCallback)(async(e,t)=>{if(!be)return;ot.current?.abort();let n=new AbortController;ot.current=n,rt(!0),at(null);try{let r=await ye.listArchivedSessions({query:Xe,...e?{cursor:e}:{},limit:25},n.signal);if(n.signal.aborted||ot.current!==n)return;let i=[...r.sessions];for(;!e&&t!==void 0&&i.length!i.some(t=>t.path===e.path));if(i.push(...e),!e.length)break}tt(t=>({...r,query:Xe,sessions:e&&t?.query===Xe?[...t.sessions,...i.filter(e=>!t.sessions.some(t=>t.path===e.path))]:i}))}catch(r){!n.signal.aborted&&ot.current===n&&at({query:Xe,kind:r instanceof ge&&r.code===`ARCHIVED_SESSION_CURSOR_STALE`?`stale`:`failed`,...e?{cursor:e}:{},...t===void 0?{}:{retainedCount:t}})}finally{ot.current===n&&(ot.current=null,rt(!1))}},[Xe,be,ye]),[ut,dt]=(0,K.useState)(new Set),[ft,pt]=(0,K.useState)(new Set),mt=(0,K.useRef)(new Set),[ht,gt]=(0,K.useState)(!1),[_t,vt]=(0,K.useState)(!1),yt=(0,K.useRef)(!1),[bt,xt]=(0,K.useState)(!1),St=(0,K.useRef)(!1),[Ct,wt]=(0,K.useState)(!1),[Tt,Et]=(0,K.useState)(!1),Dt=(0,K.useRef)(!1),Ot=async t=>{if(mt.current.has(t))return;mt.current.add(t),pt(new Set(mt.current)),gt(!1);let n=Qe.current;try{let r=await e.actions.unarchiveSession(t);if(!$e.current||Qe.current!==n)return;r?(tt(e=>e?{...e,sessions:e.sessions.filter(e=>e.path!==t)}:null),await lt()):gt(!0)}finally{mt.current.delete(t),$e.current&&pt(new Set(mt.current))}};(0,K.useEffect)(()=>($e.current=!0,()=>{$e.current=!1}),[]),(0,K.useEffect)(()=>(gt(!1),at(null),be&&(tt(e=>e?.query===Xe?e:null),lt()),()=>{ot.current?.abort(),ot.current=null}),[Xe,be,lt]),(0,K.useEffect)(()=>{if(e.searchOpen)return oe.current?.focus(),()=>se.current?.focus()},[e.searchOpen]),(0,K.useEffect)(()=>{if(e.mobileOpen)return H.current?.focus(),()=>{let t=e.returnFocusRef?.current;t?.checkVisibility()&&t.focus()}},[e.mobileOpen,e.returnFocusRef]),(0,K.useEffect)(()=>{e.mobileOpen&&document.activeElement===document.body&&!document.querySelector(`dialog:modal`)&&H.current?.focus()}),(0,K.useEffect)(()=>{c&&(ce.current?.focus(),ce.current?.select())},[c]);let kt=(0,K.useMemo)(()=>{let n=e.query.trim().toLowerCase(),r=be?st?.sessions??[]:pe?.sessions??[],i=(e,i)=>r.filter(r=>!!r.archived===be&&(be||r.pinOrder===void 0)&&(e===`__ungrouped__`?r.ungrouped:wA(r)===e&&!r.ungrouped)&&(!n||be||i||`${ID(r,t(`untitledSession`))} ${r.cwd}`.toLowerCase().includes(n))),a=[...pe?.workspaces??[]];for(let e of r)!e.ungrouped&&!a.some(t=>t.path===wA(e))&&a.push({path:wA(e),name:wA(e),current:!1});return[...a.map(e=>{let t=!!n&&`${e.name} ${e.path}`.toLowerCase().includes(n);return{...e,showPath:a.some(t=>t.path!==e.path&&t.name===e.name),sessions:i(e.path,t),ungrouped:!1,matches:t}}),{path:`__ungrouped__`,name:t(`ungrouped`),current:!1,sessions:i(`__ungrouped__`,!1),ungrouped:!0,pinOrder:void 0,showPath:!1,matches:!1}].filter(e=>e.sessions.length>0||!be&&!e.ungrouped&&(!n||e.matches))},[be,e.query,st,pe,t]),At=e=>[...e].sort((e,t)=>(Ue===`manual`?(e.order??2**53-1)-(t.order??2**53-1):0)||t.modified.localeCompare(e.modified)||e.path.localeCompare(t.path)),jt=(e,t)=>{if(e.length<=t+1)return e;let n=e.slice(0,t),r=e.find(e=>e.path===he&&e.id===pe?.selectedSession?.id);return r&&!n.includes(r)&&n.push(r),n},Mt=kt.filter(e=>!e.ungrouped),Nt=Mt.filter(e=>e.pinOrder!==void 0),Pt=[...We.map(e=>({kind:`session`,session:e,pinOrder:e.pinOrder})),...Nt.map(e=>({kind:`workspace`,project:e,pinOrder:e.pinOrder}))].sort((e,t)=>{let n=e=>e.kind===`session`?e.session.modified:e.project.sessions.reduce((e,t)=>t.modified>e?t.modified:e,``);return(Ve===`updated`?n(t).localeCompare(n(e)):0)||e.pinOrder-t.pinOrder}),Ft=e=>e.kind===`session`?{kind:`session`,path:e.session.path,id:e.session.id}:{kind:`workspace`,path:e.project.path},It=Mt.filter(e=>e.pinOrder===void 0),Lt=x||e.query.trim()||be||It.length<=6?It:It.slice(0,5),Rt=It.find(e=>_e?.path===he&&e.path===(_e?wA(_e):void 0));Rt&&!Lt.includes(Rt)&&Lt.push(Rt);let zt=At((pe?.sessions??[]).filter(n=>!n.archived&&n.pinOrder===void 0&&!pe?.workspaces.some(e=>e.pinOrder!==void 0&&e.path===wA(n))&&(He===`list`||pe?.preferences.projectsInRecents!==!1||n.ungrouped||!Mt.some(e=>e.path===wA(n)))&&(!e.query.trim()||`${ID(n,t(`untitledSession`))} ${n.cwd} ${pe?.workspaces.find(e=>e.path===wA(n))?.name??``}`.toLowerCase().includes(e.query.trim().toLowerCase())))),Bt=e.query.trim()?zt:jt(zt,k),Vt=t=>jA(t,e.connected)<3,Ht=new Date;Ht.setHours(0,0,0,0),Ht.setDate(Ht.getDate()-6);let Ut=(pe?.sessions??[]).filter(e=>!e.archived&&(Vt(e)||v.has(AA(e))||[`completed`,`failed`].includes(e.execution?.lastTurn?.outcome??``)&&(e.execution?.lastTurn?.finishedAt??0)>=Ht.getTime())),Wt=new Map([...v].map((e,t)=>[e,t])),Gt=Ut.filter(e=>Vt(e)||v.has(AA(e))).sort((t,n)=>(Wt.get(AA(t))??1/0)-(Wt.get(AA(n))??1/0)||jA(t,e.connected)-jA(n,e.connected)||n.modified.localeCompare(t.modified)),Kt=new Set(Gt.map(e=>e.path)),qt=Ut.filter(e=>!g||!Kt.has(e.path)).sort((e,t)=>kA(t)-kA(e)),Jt=g?Gt.slice(0,m):[],Yt=qt.slice(0,Math.max(0,m-Jt.length)),Xt=Ut.length>Jt.length+Yt.length;(0,K.useEffect)(()=>{let e=fe.current;if(!f||!Xt||!e||typeof IntersectionObserver>`u`)return;let t=new IntersectionObserver(([e])=>{e?.isIntersecting&&(t.disconnect(),h(m+10))},{root:e.closest(`.sidebar-navigation`)});return t.observe(e),()=>t.disconnect()},[f,Xt,m]),(0,K.useEffect)(()=>{if(!f){b.current=null,y(e=>e.size?new Set:e),h(10);return}let t=b.current??{openedAt:Date.now(),sessions:new Set((pe?.sessions??[]).map(AA))},n=(pe?.sessions??[]).filter(t=>!t.archived&&jA(t,e.connected)<3).sort((t,n)=>jA(t,e.connected)-jA(n,e.connected)||n.modified.localeCompare(t.modified)),r=n.filter(e=>!t.sessions.has(AA(e))&&Date.parse(e.created)>=t.openedAt);for(let e of pe?.sessions??[])t.sessions.add(AA(e));b.current=t,y(e=>{let t=new Set([...r.map(AA),...e,...n.map(AA)]);return t.size===e.size?e:t})},[f,pe?.sessions,e.connected]);let Zt=(pe?.sessions??[]).filter(e=>!e.archived&&e.unread),Qt=Zt.filter(e=>e.readRevision),$t=g?Gt.filter(e=>e.unread&&e.readRevision):[],en=async e=>{if(!F){I(!0);try{await Promise.all(e.map(e=>Ye(e,!0)))}finally{I(!1)}}},tn=he?_e?wA(_e):pe?.selectedSession?.cwd:null,nn=!!(pe?.truncation.sessionsOmitted||pe?.truncation.workspacesOmitted),rn=e=>{yt.current||(re(e.name),ae(!1),l(e))},an=async()=>{let t=ne.trim();if(!c||!t||t===c.name||yt.current)return;let n=c,r=Qe.current,i=st?.sessions.length??25;yt.current=!0,vt(!0),ae(!1);try{if(n.kind===`workspace`?await e.actions.renameWorkspace(n.path,t):await e.actions.renameSession(n.path,t),!$e.current)return;l(null),n.kind===`session`&&be&&Qe.current===r&<(void 0,i)}catch{$e.current&&ae(!0)}finally{yt.current=!1,$e.current&&vt(!1)}},on=async()=>{if(!z||St.current)return;let t=z;St.current=!0,xt(!0),wt(!1);try{let n=await e.actions.removeWorkspace(t.path);if(!$e.current)return;n?B(null):wt(!0)}catch{$e.current&&wt(!0)}finally{St.current=!1,$e.current&&xt(!1)}},sn=async t=>{if(Dt.current)return;let n=Qe.current;Dt.current=!0,Et(!0);try{if(!t){await e.actions.chooseWorkspace();return}let r=await e.actions.createSession(t);if(!$e.current||Qe.current!==n||!r?.sessionId||!r.sessionPath||r.workspacePath!==t)return;xe(!1),p(!1),e.actions.setQuery(``)}catch{}finally{Dt.current=!1,$e.current&&Et(!1)}},cn=(0,K.useCallback)(()=>{(De.current||Me.current)&&(Oe.current=!0),De.current=null,Me.current=null,G(!1),Ie(null),Pe(null)},[]);(0,K.useEffect)(()=>{let e=e=>{e.key!==`Escape`||!De.current&&!Me.current||(e.preventDefault(),cn())},t=()=>{(De.current||Me.current)&&cn()};return window.addEventListener(`keydown`,e,!0),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e,!0),window.removeEventListener(`blur`,t)}},[cn]);let ln=(e,t)=>{let n=Pt[e];if(!n)return;let r=TA(Pt,e,t);qe(Ft(n),!0,r?Ft(r):null)},un=e=>Ve===`manual`?[{id:`move-up`,label:t(`movePinUp`),icon:(0,q.jsx)(Xo,{}),isDisabled:Te||e<=0,onClick:()=>ln(e,!1)},{id:`move-down`,label:t(`movePinDown`),icon:(0,q.jsx)(ue,{}),isDisabled:Te||e===Pt.length-1,onClick:()=>ln(e,!0)}]:[],dn=[{id:`updated`,label:t(`pinnedRecentlyUpdated`),endContent:Ue===`updated`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({chatsSort:`updated`})},{id:`manual`,label:t(`pinnedManualOrder`),endContent:Ue===`manual`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({chatsSort:`manual`})}],fn=[{id:`updated`,label:t(`pinnedRecentlyUpdated`),endContent:Ve===`updated`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({pinnedSort:`updated`})},{id:`manual`,label:t(`pinnedManualOrder`),endContent:Ve===`manual`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({pinnedSort:`manual`})}],pn=[{label:t(`sidebarGroupBy`),items:[{label:t(`sidebarByProject`),endContent:He===`project`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({sidebarGrouping:`project`})},{label:t(`sidebarFlatList`),endContent:He===`list`?(0,q.jsx)(rs,{size:16}):void 0,isDisabled:Te,onClick:()=>void Je({sidebarGrouping:`list`})}]},{label:t(`sidebarChatSort`),items:dn}],mn=[...pn,...He===`project`?[{label:t(`sidebarShow`),items:[{label:t(`sidebarProjectsInRecents`),endContent:pe?.preferences.projectsInRecents===!1?void 0:(0,q.jsx)(rs,{size:16}),isDisabled:Te,onClick:()=>void Je({projectsInRecents:pe?.preferences.projectsInRecents===!1})}]}]:[]],hn=(0,q.jsxs)(`div`,{className:`sidebar-section-actions is-always-visible`,children:[(0,q.jsx)(MA,{label:t(`sidebarActivityOptions`),items:[{type:`section`,title:t(`sidebarShow`),items:[{label:t(`sidebarPriority`),endContent:g?(0,q.jsx)(rs,{size:16}):void 0,onClick:()=>_(e=>!e)}]},{type:`divider`},{label:t(`sidebarMarkAllRead`),icon:(0,q.jsx)(ic,{}),isDisabled:F||!$t.length,onClick:()=>void en($t)}]}),g&&Gt.some(e=>!Vt(e))&&(0,q.jsx)(V,{content:t(`sidebarClearRead`),children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":t(`sidebarClearRead`),onClick:()=>y(new Set(Gt.filter(Vt).map(AA))),children:(0,q.jsx)(es,{"aria-hidden":`true`})})})]}),gn=(a,o=!1,s)=>{let c=JSON.stringify([a.path,a.id,o,s?.key]),l=Pt.findIndex(e=>e.kind===`session`&&e.session.path===a.path&&e.session.id===a.id),u={kind:`session`,path:a.path,id:a.id},d=a.pinOrder!==void 0,p=e.connected!==!1&&a.execution?.status===`running`,m=e.connected!==!1&&a.execution?.waitingForInput,h=a.firstUnread?.type===`turn`?a.firstUnread.outcome:a.execution?.lastTurn?.outcome,g=m?`attention`:p?`running`:a.unread?h===`failed`?`attention`:h===`completed`?`completed`:`unread`:void 0,_=g===`running`?rc:g===`attention`?ls:hs,v=e.connected===!1?0:a.execution?.pendingFollowUps??0,y=a.path===he&&a.id===pe?.selectedSession?.id,b=g===`attention`?m?`waiting`:`failed`:g===`running`&&a.execution?.compacting?`compacting`:g,x=[...b?[t(`sidebarState_`+b)]:[],...v>0?[t(`pendingFollowUpsHint`,{count:v})]:[]].join(` · `),S=s?.sessions.findIndex(e=>e.path===a.path&&e.id===a.id)??-1,C=!be&&!o&&Ue===`manual`&&!!s,w=t=>Ge(()=>e.actions.setSessionOrder(a.path,a.id,t?{path:t.path,id:t.id}:null)),T=o?un(l):C&&s?[{id:`move-up`,label:t(`movePinUp`),icon:(0,q.jsx)(Xo,{}),isDisabled:Te||S<=0,onClick:()=>void w(TA(s.sessions,S,!1))},{id:`move-down`,label:t(`movePinDown`),icon:(0,q.jsx)(ue,{}),isDisabled:Te||S===s.sessions.length-1,onClick:()=>void w(TA(s.sessions,S,!0))}]:[];return(0,q.jsxs)(`li`,{className:`session-row `+(a.unread?`is-unread `:``)+(Fe===a.path?Le?`is-pin-drop-after`:`is-pin-drop-target`:``),"aria-label":ID(a,t(`untitledSession`)),"data-session-key":JSON.stringify([a.path,a.id]),"data-dragging":ke&&(De.current?.kind===`session`&&De.current.path===a.path&&De.current.id===a.id||Me.current?.path===a.path&&Me.current.id===a.id)||void 0,draggable:!Te&&!e.query.trim()&&(o?Ve===`manual`:C),onDragStart:e=>{if(e.stopPropagation(),o&&Ve===`manual`)De.current=u;else if(C&&s)Me.current={path:a.path,id:a.id,scope:s.key};else{e.preventDefault();return}G(!0),Oe.current=!0,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,a.id)},onDragOver:e=>{if(!(o&&Ve===`manual`&&De.current)&&!(C&&Me.current?.scope===s?.key))return;e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,Ie(a.path),Pe(null);let t=e.currentTarget.getBoundingClientRect();Re(DA(e.clientY,t))},onDragEnd:cn,onDrop:t=>{let n=t.currentTarget.getBoundingClientRect(),r=DA(t.clientY,n);if(o&&Ve===`manual`&&De.current){t.preventDefault(),t.stopPropagation();let e=Pt[l+1];qe(De.current,!0,r?e?Ft(e):null:u)}else if(C&&s&&Me.current?.scope===s.key){t.preventDefault(),t.stopPropagation();let n=Me.current,i=EA(s.sessions,S,r);Ge(()=>e.actions.setSessionOrder(n.path,n.id,i?{path:i.path,id:i.id}:null))}else return;cn()},children:[(0,q.jsx)(V,{placement:`end`,delay:450,onOpenChange:e=>i(t=>e?c:t===c?null:t),content:r===c?(0,q.jsxs)(`span`,{className:`session-hover-preview`,children:[(0,q.jsx)(`strong`,{children:ID(a,t(`untitledSession`))}),a.name&&a.firstMessage&&a.firstMessage!==`(no messages)`&&a.firstMessage!==a.name&&(0,q.jsx)(`span`,{children:a.firstMessage}),(0,q.jsx)(`time`,{dateTime:a.modified,children:new Date(a.modified).toLocaleString(n.resolvedLanguage,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})})]}):null,children:(0,q.jsxs)(`button`,{className:`session `+(y?`active`:``),type:`button`,"aria-current":y?`page`:void 0,"aria-label":[ID(a,t(`untitledSession`)),a.path,x].filter(Boolean).join(` · `),onClick:()=>{y&&a.unread&&e.sessionViewVisible&&e.connected!==!1&&Ye(a,!0),e.actions.selectSession(a.path)},onDoubleClick:n=>{y&&e.connected!==!1&&n.target instanceof Element&&n.target.closest(`.session-title`)&&rn({kind:`session`,path:a.path,name:ID(a,t(`untitledSession`))})},children:[(0,q.jsxs)(`span`,{className:`session-copy`,children:[(0,q.jsx)(`span`,{className:`session-title`,children:ID(a,t(`untitledSession`))}),f&&(0,q.jsxs)(`span`,{className:`session-project`,children:[(0,q.jsx)(Vs,{"aria-hidden":`true`}),pe?.workspaces.find(e=>e.path===wA(a))?.name??RD(wA(a))]})]}),x&&(0,q.jsx)(V,{content:x,children:(0,q.jsxs)(`span`,{className:`session-status`,"aria-hidden":`true`,children:[g&&(0,q.jsx)(_,{className:`session-state session-state-`+g}),v>0&&(0,q.jsxs)(`span`,{className:`session-queue`,children:[(0,q.jsx)(ec,{}),(0,q.jsx)(`span`,{children:v>99?`99+`:v})]})]})})]})}),!be&&(0,q.jsx)(V,{content:t(d?`unpinConversation`:`pinConversation`),children:(0,q.jsx)(`button`,{type:`button`,className:`session-pin-button`,"aria-label":t(d?`unpinConversation`:`pinConversation`),disabled:Te,onClick:e=>{let t=vA(e.currentTarget);Ke(a,!d).finally(t)},children:(0,q.jsx)(xc,{"aria-hidden":`true`,fill:d?`currentColor`:`none`})})}),(0,q.jsx)(yA,{session:a,archived:be,connected:e.connected!==!1,pinSaving:Te,restoring:ft.has(a.path),movementItems:T,client:ye,actions:e.actions,onRename:()=>rn({kind:`session`,path:a.path,name:ID(a,t(`untitledSession`))}),onPin:()=>Ke(a,!d),onRead:()=>Ye(a,!!a.unread),onArchive:()=>be?Ot(a.path):e.actions.archiveSession(a.path),onNotice:(e,t=!1)=>P({message:e,error:t})})]},a.path)},_n=(n,r=!1)=>{let i=(be?ut:e.collapsed).has(n.path)&&!e.query.trim(),o=!n.ungrouped&&tn===n.path,c=Pt.findIndex(e=>e.kind===`workspace`&&e.project.path===n.path),l=It.findIndex(e=>e.path===n.path),u=!be&&!n.ungrouped&&!Te&&!e.query.trim(),d=t=>Ge(()=>e.actions.setWorkspaceOrder(n.path,TA(It,l,t)?.path??null)),f={kind:`workspace`,path:n.path},p=At(n.sessions),m=Qt.filter(e=>!e.ungrouped&&wA(e)===n.path),h=be||!!e.query.trim()||D.has(n.path)||p.length<=6,g=[...be?[]:[{id:`pin`,label:t(r?`unpinWorkspace`:`pinWorkspace`),icon:(0,q.jsx)(xc,{}),isDisabled:Te,onClick:()=>void qe(f,!r)},{id:`mark-read`,label:t(`sidebarMarkAllRead`),icon:(0,q.jsx)(ic,{}),isDisabled:F||!m.length,onClick:()=>void en(m)}],...r?un(c):be?[]:[{id:`move-up`,label:t(`movePinUp`),icon:(0,q.jsx)(Xo,{}),isDisabled:!u||l<=0,onClick:()=>void d(!1)},{id:`move-down`,label:t(`movePinDown`),icon:(0,q.jsx)(ue,{}),isDisabled:!u||l===It.length-1,onClick:()=>void d(!0)}],...n.ungrouped?[]:[{id:`managed-worktrees`,label:t(`managedWorktrees`),icon:(0,q.jsx)(Vs,{}),isDisabled:e.connected===!1,onClick:()=>{let e=Array.from(le.current?.querySelectorAll(`.workspace-group`)??[]).find(e=>e.dataset.workspaceKey===n.path);a.current=vA(e?.querySelector(`.workspace-row-actions .menu-action-button`)??null),queueMicrotask(()=>s(n.path))}}],{id:`rename`,label:t(`renameWorkspace`),icon:(0,q.jsx)(Ic,{}),onClick:()=>rn({kind:`workspace`,path:n.path,name:n.name})},{id:`remove`,label:t(`removeWorkspace`),icon:(0,q.jsx)(Uc,{}),variant:`destructive`,onClick:()=>{wt(!1),B({path:n.path,name:n.name})}}];return(0,q.jsxs)(`section`,{className:`workspace-group `+(i?`collapsed `:``)+(o?`is-active-workspace `:``)+(Ne===n.path?Le?`is-pin-drop-after`:`is-pin-drop-target`:``),"data-workspace-key":n.path,"aria-label":n.name,onDragOver:e=>{if(!u||!De.current||(r?Ve!==`manual`:De.current.kind!==`workspace`))return;e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`move`,Pe(n.path),Ie(null);let t=e.currentTarget.getBoundingClientRect();Re(DA(e.clientY,t))},onDragEnd:cn,onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&Pe(null)},onDrop:t=>{if(!u||!De.current||(r?Ve!==`manual`:De.current.kind!==`workspace`))return;t.preventDefault(),t.stopPropagation();let i=t.currentTarget.getBoundingClientRect(),a=DA(t.clientY,i),o=De.current;if(o.kind!==`workspace`||o.path!==n.path)if(r){let e=Pt[c+1];qe(o,!0,a?e?Ft(e):null:f)}else Ge(()=>e.actions.setWorkspaceOrder(o.path,a?It[l+1]?.path??null:n.path));cn()},children:[(0,q.jsxs)(`div`,{className:`workspace-button`,draggable:u&&(!r||Ve===`manual`),onDragStart:e=>{if(!u||r&&Ve!==`manual`||e.target instanceof Element&&e.target.closest(`.workspace-row-actions`)){e.preventDefault();return}De.current=f,requestAnimationFrame(()=>{$e.current&&De.current===f&&G(!0)}),Oe.current=!0,e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,n.path)},children:[(0,q.jsxs)(`button`,{className:`workspace-label`,type:`button`,"aria-expanded":!i,"aria-current":o?`location`:void 0,disabled:!!e.query.trim(),title:n.ungrouped?void 0:n.path,onClick:()=>{be?dt(e=>{let t=new Set(e);return t.has(n.path)?t.delete(n.path):t.add(n.path),t}):e.actions.toggleWorkspace(n.path)},children:[(0,q.jsx)(`span`,{className:`workspace-toggle`,"aria-hidden":`true`,children:i?(0,q.jsx)(Vs,{className:`workspace-folder`}):(0,q.jsx)(zs,{className:`workspace-folder`})}),(0,q.jsxs)(`span`,{className:`workspace-identity`,children:[(0,q.jsx)(`strong`,{children:n.name}),n.showPath&&(0,q.jsx)(`small`,{children:RD(n.path)})]})]}),!n.ungrouped&&(0,q.jsxs)(`span`,{className:`workspace-row-actions`,children:[(0,q.jsx)(MA,{label:t(`workspaceOptions`),items:g}),(0,q.jsx)(V,{content:t(`newSession`),children:(0,q.jsx)(`button`,{className:`workspace-action`,type:`button`,"aria-label":t(`newSession`)+` `+n.name,disabled:Tt,"aria-busy":Tt||void 0,onClick:()=>void sn(n.path),children:(0,q.jsx)(Ic,{})})})]})]}),!i&&!p.length&&!be&&!e.query.trim()&&!nn&&(0,q.jsx)(`p`,{className:`workspace-empty`,children:t(`noConversations`)}),!i&&p.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ul`,{className:`workspace-sessions`,children:(h?p:jt(p,5)).map(e=>gn(e,!1,{key:n.path,sessions:p}))}),!be&&!e.query.trim()&&p.length>6&&(0,q.jsx)(`button`,{className:`sidebar-show-more is-indented`,type:`button`,"aria-expanded":D.has(n.path),onClick:()=>O(e=>{let t=new Set(e);return t.has(n.path)?t.delete(n.path):t.add(n.path),t}),children:t(D.has(n.path)?`sidebarShowLess`:`sidebarShowMore`)})]})]},n.path)},vn=new Map,yn=new Date,bn=new Date(yn);bn.setDate(yn.getDate()-1);for(let e of Yt){let n=new Date(kA(e)),r=n.toDateString()===yn.toDateString()?t(`sidebarToday`):n.toDateString()===bn.toDateString()?t(`sidebarYesterday`):Number.isFinite(n.getTime())?n.toLocaleDateString(void 0,{weekday:`long`}):t(`sidebarEarlier`);vn.set(r,[...vn.get(r)??[],e])}return(0,q.jsxs)(`div`,{ref:le,id:`session-sidebar`,className:`session-sidebar`,role:e.mobileOpen?`dialog`:`complementary`,"aria-modal":e.mobileOpen||void 0,"aria-label":`Session navigation`,tabIndex:e.mobileOpen?-1:void 0,onPointerDownCapture:()=>{!De.current&&!Me.current&&(Oe.current=!1)},onClickCapture:e=>{e.detail!==0&&Oe.current&&(e.preventDefault(),e.stopPropagation(),Oe.current=!1)},onKeyDown:t=>{if(!e.mobileOpen||t.defaultPrevented||t.target instanceof Element&&(t.target.closest(`dialog`)||t.key!==`Tab`&&t.target.closest(`[role="menu"]`))||t.key===`Escape`&&le.current?.querySelector(`[aria-haspopup="menu"][aria-expanded="true"]`)||(t.key===`Escape`&&!t.nativeEvent.isComposing&&(t.preventDefault(),e.actions.closeMobileSidebar()),t.key!==`Tab`))return;let n=Array.from(le.current?.querySelectorAll(`button, input, select, textarea, a[href], [tabindex]`)??[]).filter(e=>e.tabIndex>=0&&!e.matches(`:disabled`)&&e.checkVisibility({visibilityProperty:!0})),r=t.shiftKey?n.at(-1):n[0],i=t.shiftKey?n[0]:n.at(-1);(document.activeElement===le.current||document.activeElement===i)&&(t.preventDefault(),r?.focus())},children:[(0,q.jsxs)(`div`,{className:`sidebar-brand`,children:[(0,q.jsx)(`span`,{className:`sidebar-brand-title`,children:`OpenPI`}),(0,q.jsxs)(`div`,{className:`sidebar-header-actions`,children:[(0,q.jsx)(V,{content:t(f?`sidebarViewChats`:`sidebarViewActivity`),children:(0,q.jsxs)(`button`,{className:`icon-button sidebar-activity-toggle`,type:`button`,"aria-label":t(f?`sidebarViewChats`:`sidebarViewActivity`),"aria-pressed":f,onClick:()=>{xe(!1),p(e=>!e)},children:[(0,q.jsx)(Zo,{"aria-hidden":`true`}),Zt.length>0&&(0,q.jsx)(`span`,{className:`sidebar-unread-dot`})]})}),(0,q.jsx)(V,{content:t(`searchConversations`),children:(0,q.jsx)(`button`,{ref:se,className:`icon-button`,type:`button`,"aria-label":t(`searchConversations`),onClick:()=>d(!0),children:(0,q.jsx)(Dc,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:t(`collapseSidebar`),placement:`end`,children:(0,q.jsx)(`button`,{ref:H,className:`collapse-button sidebar-mobile-close`,type:`button`,"aria-label":t(`collapseSidebar`),onClick:()=>e.mobileOpen?e.actions.closeMobileSidebar():e.actions.toggleSidebar(!1),children:(0,q.jsx)(hc,{})})})]})]}),(0,q.jsx)(V,{content:t(`newSession`),placement:`end`,children:(0,q.jsxs)(`button`,{className:`new-session-button`,type:`button`,"aria-label":t(`newSession`),disabled:Tt,"aria-busy":Tt||void 0,onClick:()=>void sn(e.selectedWorkspace),children:[Tt?(0,q.jsx)(rc,{className:`new-session-spinner`}):(0,q.jsx)(Ae,{}),(0,q.jsx)(`span`,{children:t(`newSession`)})]})}),(0,q.jsx)(SA,{open:u,initialQuery:e.query,initialIncludeArchived:be,sessions:pe?.sessions??[],workspaces:pe?.workspaces??[],onClose:()=>d(!1),onOpenMessage:e.actions.navigateToMessage,onOpenSession:t=>e.actions.selectSession(t),onCreateSession:()=>void sn(e.selectedWorkspace)}),(0,q.jsxs)(`div`,{className:`sidebar-navigation`,children:[N&&(0,q.jsx)(`p`,{className:`sidebar-scope-note sidebar-action-feedback`,role:N.error?`alert`:`status`,children:N.message}),ze&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,role:`alert`,children:t(`sidebarSaveFailed`)}),j&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,role:`alert`,children:t(`sidebarReadFailed`)}),f?(0,q.jsxs)(`section`,{className:`sidebar-activity`,"aria-label":t(`sidebarActivity`),children:[g&&(0,q.jsxs)(`section`,{"aria-label":t(`sidebarPriority`),children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsx)(`h2`,{className:`sidebar-section-label`,children:t(`sidebarPriority`)}),hn]}),(0,q.jsx)(`ul`,{className:`sidebar-activity-sessions`,children:Jt.map(e=>gn(e))}),!Jt.length&&(0,q.jsx)(`p`,{className:`sidebar-activity-empty`,children:t(`sidebarActivityEmpty`)})]}),[...vn].map(([e,t],n)=>(0,q.jsxs)(`section`,{"aria-label":e,children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsx)(`h2`,{className:`sidebar-section-label`,children:e}),!g&&n===0&&hn]}),(0,q.jsx)(`ul`,{className:`sidebar-activity-sessions`,children:t.map(e=>gn(e))})]},e)),!g&&!vn.size&&(0,q.jsxs)(`section`,{"aria-label":t(`sidebarToday`),children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsx)(`h2`,{className:`sidebar-section-label`,children:t(`sidebarToday`)}),hn]}),(0,q.jsx)(`p`,{className:`sidebar-activity-empty`,children:t(`sidebarActivityEmpty`)})]}),Xt&&(0,q.jsx)(`div`,{ref:fe,className:`sidebar-activity-tail`,role:`status`,"aria-label":t(`loading`),children:(0,q.jsx)(rc,{"aria-hidden":`true`})})]}):(0,q.jsxs)(q.Fragment,{children:[!be&&(Pt.length>0||ke&&De.current&&Ve===`manual`)&&(0,q.jsxs)(`section`,{className:`pinned-section `+(Ne===`pinned-tail`?`is-pin-drop-after`:``),"aria-label":t(`pinnedConversations`),onDragOver:t=>{Te||Ve!==`manual`||!De.current||e.query.trim()||(t.preventDefault(),t.dataTransfer.dropEffect=`move`,Pe(`pinned-tail`),Ie(null))},onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&Pe(null)},onDrop:t=>{Te||Ve!==`manual`||!De.current||e.query.trim()||(t.preventDefault(),t.stopPropagation(),qe(De.current,!0,null),cn())},children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`workspace-heading-label`,"aria-expanded":!Ce||!!e.query.trim(),onClick:()=>we(e=>!e),children:[t(`pinnedConversations`),(0,q.jsx)(is,{className:Ce&&!e.query.trim()?`is-collapsed`:``,"aria-hidden":`true`})]}),(0,q.jsx)(`div`,{className:`sidebar-section-actions`,children:(0,q.jsx)(MA,{label:t(`pinnedOptions`),items:fn,alignment:`end`})})]}),ke&&Ve===`manual`&&(Pt.length===0||Ce)&&(0,q.jsx)(`p`,{className:`sidebar-drop-hint`,children:t(`sidebarDropPin`)}),(!Ce||!!e.query.trim())&&(0,q.jsx)(`ul`,{className:`pinned-sessions`,children:Pt.map(e=>e.kind===`session`?gn(e.session,!0):(0,q.jsx)(`li`,{className:`pinned-workspace`,children:_n(e.project,!0)},e.project.path))})]}),(be||He===`project`||e.searchOpen)&&(0,q.jsxs)(`div`,{className:`workspace-heading sidebar-section-heading `+(e.searchOpen?`is-searching`:``),children:[(0,q.jsxs)(`button`,{type:`button`,className:`workspace-heading-label`,"aria-label":t(be?`currentConversations`:`sidebarProjects`),"aria-expanded":be?void 0:!C||!!e.query.trim(),onClick:()=>be?xe(!1):w(e=>!e),children:[be&&(0,q.jsx)(Ko,{"aria-hidden":`true`}),t(be?`archivedConversations`:`sidebarProjects`),!be&&(0,q.jsx)(is,{className:C&&!e.query.trim()?`is-collapsed`:``,"aria-hidden":`true`})]}),(0,q.jsxs)(`div`,{className:`session-search`,children:[(0,q.jsx)(Dc,{}),(0,q.jsx)(`input`,{ref:oe,type:`search`,value:e.query,placeholder:t(`searchPlaceholder`),maxLength:be?160:void 0,"aria-label":t(`searchConversations`),onChange:t=>e.actions.setQuery(t.target.value)}),(0,q.jsx)(`button`,{type:`button`,"aria-label":t(`closeSearch`),onClick:()=>e.actions.setSearchOpen(!1),children:(0,q.jsx)(je,{})})]}),(0,q.jsxs)(`div`,{className:`workspace-actions sidebar-section-actions`,children:[!be&&(0,q.jsx)(MA,{label:t(`sidebarProjectOptions`),items:pn}),be&&(0,q.jsx)(V,{content:t(`sidebarFilterList`),children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":t(`sidebarFilterList`),onClick:()=>e.actions.setSearchOpen(!0),children:(0,q.jsx)(Dc,{})})}),!be&&(0,q.jsx)(V,{content:t(`addWorkspace`),children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":t(`addWorkspace`),onClick:()=>void e.actions.chooseWorkspace(),children:(0,q.jsx)(Ae,{})})})]})]}),e.searchOpen&&(0,q.jsxs)(`button`,{type:`button`,className:`sidebar-content-search`,onClick:()=>d(!0),children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),t(`transcriptSearch`)]}),be&&(0,q.jsxs)(`div`,{className:`sidebar-archive-actions`,children:[(0,q.jsx)(V,{content:t(`refreshArchives`),placement:`end`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":t(`refreshArchives`),disabled:nt,onClick:()=>void lt(),children:(0,q.jsx)(me,{"aria-hidden":`true`})})}),nt&&(0,q.jsx)(`span`,{role:`status`,children:t(`loadingArchives`)})]}),be&&ct&&(0,q.jsxs)(`div`,{className:`sidebar-scope-note`,role:`alert`,children:[(0,q.jsx)(`p`,{children:t(ct.kind===`stale`?`archiveCursorStale`:`archiveLoadFailed`)}),(0,q.jsx)(`button`,{type:`button`,disabled:nt,onClick:()=>void lt(ct.kind===`stale`?void 0:ct.cursor,ct.retainedCount),children:t(ct.kind===`stale`?`refreshArchives`:`retryArchives`)})]}),be&&!!st?.truncation.recordsUnscanned&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,children:t(`archiveScanBounded`,{count:st?.truncation.recordsUnscanned})}),!be&&nn&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,children:t(`loadedHistoryBounded`,{sessions:pe?.truncation.sessionsOmitted,workspaces:pe?.truncation.workspacesOmitted})}),be&&ht&&(0,q.jsx)(`p`,{className:`sidebar-scope-note`,role:`alert`,children:t(`restoreFailed`)}),(0,q.jsxs)(`div`,{className:`workspace-tree`,children:[(be?kt:He===`project`&&(!C||e.query.trim())?Lt:[]).map(e=>_n(e)),!be&&He===`project`&&ke&&De.current?.kind===`workspace`&&!e.query.trim()&&(0,q.jsx)(`section`,{className:`sidebar-project-tail `+(Ne===`project-tail`?`is-pin-drop-target`:``),"aria-label":t(`sidebarDropProjectLast`),onDragOver:e=>{Te||De.current?.kind!==`workspace`||(e.preventDefault(),e.dataTransfer.dropEffect=`move`,Pe(`project-tail`),Ie(null))},onDragLeave:e=>{(!(e.relatedTarget instanceof Node)||!e.currentTarget.contains(e.relatedTarget))&&Pe(null)},onDrop:t=>{if(Te||De.current?.kind!==`workspace`)return;t.preventDefault();let n=De.current;Ge(()=>e.actions.setWorkspaceOrder(n.path,null)),cn()},children:t(`sidebarDropProjectLast`)}),!be&&He===`project`&&!C&&!e.query.trim()&&It.length>6&&(0,q.jsx)(`button`,{className:`sidebar-show-more`,type:`button`,"aria-expanded":x,onClick:()=>S(e=>!e),children:t(x?`sidebarShowLess`:`sidebarShowMore`)}),!be&&(0,q.jsxs)(`section`,{className:`sidebar-recents`,"aria-label":t(`sidebarRecent`),children:[(0,q.jsxs)(`div`,{className:`sidebar-section-heading`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`workspace-heading-label`,"aria-expanded":!T||!!e.query.trim(),onClick:()=>E(e=>!e),children:[t(`sidebarRecent`),(0,q.jsx)(is,{className:T&&!e.query.trim()?`is-collapsed`:``,"aria-hidden":`true`})]}),(0,q.jsx)(`div`,{className:`sidebar-section-actions`,children:(0,q.jsx)(MA,{label:t(`sidebarRecentOptions`),items:mn})})]}),(!T||!!e.query.trim())&&(0,q.jsx)(`ul`,{className:`recent-sessions`,children:Bt.map(e=>gn(e,!1,{key:`recent`,sessions:zt}))}),!T&&Bt.lengthA(e=>e+10),children:t(`sidebarShowMore`)})]}),(be?!kt.length:!Pt.length&&!zt.length&&(He===`list`||!It.length))&&(0,q.jsx)(`div`,{className:`empty`,hidden:be&&(nt||!!ct),children:e.query.trim()?t(be&&st?.truncation.recordsUnscanned?`noMatchingScannedArchives`:!be&&nn?`noMatchingLoaded`:`noMatching`):t(be?st?.truncation.recordsUnscanned?`noScannedArchives`:`noArchivedSessions`:`noSessions`)}),be&&st?.nextCursor&&ct?.kind!==`stale`&&(0,q.jsx)(`button`,{type:`button`,className:`sidebar-archive-more`,disabled:nt,onClick:()=>void lt(st.nextCursor),children:t(`moreArchives`)})]})]})]}),(0,q.jsx)(`div`,{className:`sidebar-footer`,children:(0,q.jsx)(V,{content:t(`settings`),placement:`above`,children:(0,q.jsxs)(`button`,{className:`sidebar-settings-button`,type:`button`,"aria-label":t(`settings`),"data-provider-settings-trigger":!0,disabled:e.settingsDisabled,onClick:e.onOpenSettings,children:[(0,q.jsx)(Ac,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:t(`settings`)})]})})}),(0,q.jsx)(Se,{isOpen:!!c,onOpenChange:e=>!e&&!yt.current&&l(null),purpose:`form`,width:400,"aria-label":c?.kind===`workspace`?t(`renameWorkspace`):t(`renameConversation`),children:(0,q.jsxs)(`form`,{className:`openpi-dialog`,onSubmit:e=>{e.preventDefault(),an()},children:[(0,q.jsx)(`strong`,{children:c?.kind===`workspace`?t(`renameWorkspace`):t(`renameConversation`)}),(0,q.jsx)(`input`,{ref:ce,value:ne,maxLength:80,disabled:_t,"aria-label":c?.kind===`workspace`?t(`workspaceName`):t(`conversationName`),onChange:e=>re(e.target.value)}),ie&&(0,q.jsx)(`p`,{className:`sidebar-dialog-error`,role:`alert`,children:t(`renameFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:_t,onClick:()=>{yt.current||l(null)},children:t(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,className:`primary`,disabled:_t||!ne.trim()||ne.trim()===c?.name,children:t(_t?`savingName`:`save`)})]})]})}),o&&(0,q.jsx)(CA,{workspace:o,client:ye,actions:e.actions,connected:e.connected!==!1,onClose:()=>{s(null),a.current?.()}},o),(0,q.jsx)(Se,{isOpen:!!z,onOpenChange:e=>!e&&!St.current&&B(null),purpose:`form`,width:440,"aria-label":t(`removeWorkspace`),children:(0,q.jsxs)(`div`,{className:`openpi-dialog`,children:[(0,q.jsx)(`strong`,{children:t(`removeWorkspace`)}),(0,q.jsx)(`p`,{className:`sidebar-dialog-path`,children:z?.path}),(0,q.jsxs)(`p`,{children:[z?.name,`:`,t(`workspaceDeleteConfirm`)]}),Ct&&(0,q.jsx)(`p`,{className:`sidebar-dialog-error`,role:`alert`,children:t(`workspaceRemoveFailed`)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:bt,onClick:()=>{St.current||B(null)},children:t(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`danger`,disabled:bt,onClick:()=>void on(),children:t(bt?`removingWorkspace`:`removeWorkspace`)})]})]})})]})}var PA=(0,K.createContext)(null);PA.displayName=`LayoutAreaContext`;var FA=(0,K.createContext)({hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1});FA.displayName=`LayoutSlotsContext`;var IA={center:{kGNEyG:`x6s0dn4`,$$css:!0},end:{kGNEyG:`xuk3077`,$$css:!0},start:{kGNEyG:`x1cy8zhl`,$$css:!0},stretch:{kGNEyG:`x1qjc9v5`,$$css:!0}},LA={start:{kjj79g:`x1nhvcw1`,$$css:!0},center:{kjj79g:`xl56j7k`,$$css:!0},end:{kjj79g:`x13a6bvl`,$$css:!0},between:{kjj79g:`x1qughib`,$$css:!0},around:{kjj79g:`x1l1ennw`,$$css:!0},evenly:{kjj79g:`xaw8158`,$$css:!0}},RA={horizontal:{kXwgrk:`x1q0g3np`,$$css:!0},vertical:{kXwgrk:`xdt5ytf`,$$css:!0}},zA={nowrap:{kwnvtZ:`xozqiw3`,$$css:!0},wrap:{kwnvtZ:`x1a02dak`,$$css:!0},"wrap-reverse":{kwnvtZ:`x8hhl5t`,$$css:!0}},BA={stack:{k1xSpc:`x78zum5`,$$css:!0}},VA={0:{k1C7PZ:`x1o57wo1`,khm7nJ:`x6yxi7o`,$$css:!0},1:{k1C7PZ:`x1lfs0n9`,khm7nJ:`x1ngg2t4`,$$css:!0},2:{k1C7PZ:`xak3so`,khm7nJ:`x1x7z4sm`,$$css:!0},3:{k1C7PZ:`xewh9hi`,khm7nJ:`x4olc9o`,$$css:!0},4:{k1C7PZ:`xty4p9g`,khm7nJ:`xtx9w7w`,$$css:!0},5:{k1C7PZ:`x1eqhezk`,khm7nJ:`x1iu6piu`,$$css:!0},6:{k1C7PZ:`x3qlgwd`,khm7nJ:`xczp1bk`,$$css:!0},8:{k1C7PZ:`xicv188`,khm7nJ:`xgx0vcf`,$$css:!0},10:{k1C7PZ:`x1p37tyl`,khm7nJ:`x1xpicb7`,$$css:!0},"0.5":{k1C7PZ:`x1kihgfc`,khm7nJ:`x1tw44j4`,$$css:!0},"1.5":{k1C7PZ:`x1thn6ci`,khm7nJ:`xhq53yo`,$$css:!0}};function HA({crossAlign:e,direction:t,gap:n,mainAlign:r,wrap:i}){return[BA.stack,RA[t],n!=null&&VA[n],e!=null&&IA[e],r!=null&&LA[r],i!=null&&zA[i]]}var UA={reset:{kAzted:`x2lwn1j`,k7Eaqz:`xeuugli`,$$css:!0}},WA={center:{kSGwAc:`xamitd3`,$$css:!0},end:{kSGwAc:`xpvyfi4`,$$css:!0},start:{kSGwAc:`xqcrz7y`,$$css:!0},stretch:{kSGwAc:`xkh2ocl`,$$css:!0}},GA={fill:{kzQI83:`x1iyjqo2`,$$css:!0},static:{kzQI83:`x1c4vz4f`,kmuXW:`x2lah0s`,$$css:!0}};function KA({crossAlignSelf:e,size:t}={}){return[UA.reset,GA[t??`static`],e!=null&&WA[e]]}var qA={layoutOuter:{keTefX:`xojxgvx`,k71WvV:`x1fcf3bl`,keoZOQ:`x1sa9bsh`,k1K539:`x6h7pi7`,$$css:!0},layoutInner:{"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},fill:{kZKoxP:`x12qplqi`,kskxy:`xenllk4`,$$css:!0},auto:{kAzted:`x1us19tq`,$$css:!0},middle:{kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,$$css:!0},fullBleed:{"--layout-padding-outer-x":`x1wbjvqu`,"--layout-padding-outer-y":`xzxxx64`,$$css:!0}},JA={kzqmXN:`xh8yej3`,kUOVxO:`xvueqy4`,$$css:!0},YA={contentWidthVar:e=>[{"--layout-content-width":(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x4906uf`,$$css:!0},{"--x---layout-content-width":(typeof e==`number`?`${e}px`:e)==null?void 0:typeof e==`number`?`${e}px`:e}],contentWidth:e=>[JA,{ks0D6T:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`xf68679`,$$css:!0},{"--x-maxWidth":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e)}]};function XA({area:e,children:t}){return t==null?null:(0,q.jsx)(PA,{value:e,children:t})}var ZA={"x-default-marker":`x-default-marker`,$$css:!0};function QA({children:e,content:t,contentWidth:n,defaultHasDividers:r,end:i,footer:a,header:o,height:s=`fill`,padding:c,ref:l,start:u,xstyle:d,className:f,style:p}){let m=s===`fill`,h=t??e,g=(0,K.useMemo)(()=>r==null?null:{defaultHasDividers:r},[r]),_=o!=null,v=a!=null,y=u!=null,x=i!=null,S=(0,K.useMemo)(()=>({hasHeader:_,hasFooter:v,hasStart:y,hasEnd:x}),[_,v,y,x]),C=(0,q.jsx)(FA,{value:S,children:(0,q.jsx)(`div`,{ref:l,...H(O(`layout`,{height:s}),w(qA.layoutOuter,m?qA.fill:qA.auto,d),f,p),children:(0,q.jsxs)(`div`,{...w(ZA,qA.layoutInner,...HA({direction:`vertical`}),m?qA.fill:qA.auto,c===0&&qA.fullBleed,c!=null&&oe[c],c!=null&&b[c],n!=null&&YA.contentWidthVar(n)),children:[(0,q.jsx)(XA,{area:`header`,children:o}),(0,q.jsxs)(`div`,{...w(...HA({direction:`horizontal`}),qA.middle,n!=null&&YA.contentWidth(n)),children:[(0,q.jsx)(XA,{area:`start`,children:u}),(0,q.jsx)(`div`,{...w(...KA({size:`fill`})),children:(0,q.jsx)(XA,{area:`content`,children:h})}),(0,q.jsx)(XA,{area:`end`,children:i})]}),(0,q.jsx)(XA,{area:`footer`,children:a})]})})});return g==null?C:(0,q.jsx)(iO,{value:g,children:C})}QA.displayName=`Layout`;var $A={content:{kB7OPa:`x9f619`,kZKoxP:`x5yr21d`,kUk6DE:`x98rzlu`,kAzted:`x2lwn1j`,kVQacm:`x7giv3`,kZCmMZ:`xwjyata`,kwRFfy:`x1peupej`,kLKAdn:`xqty4a x1ioh5az`,kGO01o:`xg476vw xsg11nj`,"--container-padding-inline-start":`x408pgh`,"--container-padding-inline-end":`xikqloz`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`xi9ns85`,$$css:!0},noStart:{kZCmMZ:`x139j0dd`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,$$css:!0},noEnd:{kwRFfy:`xpc6k2p`,$$css:!0},noHeader:{kLKAdn:`x81pis9`,"--container-padding-block-start":`xzz8v79`,$$css:!0},noFooter:{kGO01o:`xon7vh3`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},scrollable:{kVQacm:`xysyzu8`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0}};function ej({children:e,isScrollable:t=!0,padding:n,label:r,role:i,xstyle:a,className:s,style:c,ref:l,...u}){let{hasHeader:d,hasFooter:f,hasStart:p,hasEnd:m}=(0,K.use)(FA),h=n===0;return(0,q.jsx)(`div`,{ref:l,role:i,"aria-label":r,...H(O(`layout-content`),w($A.content,!p&&!h&&n==null&&$A.noStart,!m&&!h&&n==null&&$A.noEnd,!d&&!h&&n==null&&$A.noHeader,!f&&!h&&n==null&&$A.noFooter,t&&$A.scrollable,h&&$A.fullBleed,n!=null&&I[n],n!=null&&o[n],n!=null&&y[n],n!=null&&se[n],a),s,c),...u,children:e})}ej.displayName=`LayoutContent`;var tj={footer:{kmuXW:`x2lah0s`,$$css:!0},inner:{kB7OPa:`x9f619`,ks0D6T:`xjl2t3p`,kUOVxO:`xvueqy4`,kZCmMZ:`x139j0dd`,kwRFfy:`xpc6k2p`,kLKAdn:`xqty4a`,kGO01o:`xon7vh3`,"--container-padding-inline-start":`xdvaxxn`,"--container-padding-inline-end":`xqpvj4r`,"--container-padding-block-start":`xjmgx01`,"--container-padding-block-end":`x1xjq73n`,$$css:!0},fullBleed:{kZCmMZ:`x1c1uobl`,kwRFfy:`xyri2b`,kLKAdn:`xexx8yu`,kGO01o:`x18d9i69`,"--container-padding-inline-start":`xrhngw9`,"--container-padding-inline-end":`xjsfl84`,"--container-padding-block-start":`x1047aw6`,"--container-padding-block-end":`xax9j7h`,$$css:!0},divider:{kEafiO:`x178xt8z`,kPef9Z:`x13fuv20`,kLZC3w:`x1pc3f07`,$$css:!0}},nj={sizing:e=>[{kZKoxP:e==null?e:`x16ye13r`,$$css:!0},{"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function rj({children:e,hasDivider:t,height:n,label:r,padding:i,role:a,xstyle:s,className:c,style:l,ref:u,...d}){let f=(0,K.use)(iO),p=t??f?.defaultHasDividers??!1,m=i===0;return(0,q.jsx)(`div`,{ref:u,role:a,"aria-label":r,"data-divider":p||void 0,...H(O(`layout-footer`),w(tj.footer,nj.sizing(n??null),p&&tj.divider,s),c,l),...d,children:(0,q.jsx)(`div`,{...w(tj.inner,m&&tj.fullBleed,i!=null&&I[i],i!=null&&o[i],i!=null&&y[i],i!=null&&se[i]),children:e})})}rj.displayName=`LayoutFooter`;var ij={scrollable:{kVQacm:`xysyzu8`,$$css:!0}};function aj({direction:e=`vertical`,hAlign:t,vAlign:n,justify:r,align:i,gap:o,padding:c,paddingInline:l,paddingInlineStart:u,paddingInlineEnd:d,paddingBlock:f,paddingBlockStart:p,paddingBlockEnd:m,isScrollable:h,width:_,height:v,maxWidth:y,minHeight:b,wrap:x,as:S=`div`,xstyle:C,className:T,style:E,children:D,ref:k,...A}){let j=t??(e===`horizontal`?r:i),M=n??(e===`horizontal`?i:r),N=e===`horizontal`?j:M,P=e===`horizontal`?M:j,F=u??l??c,I=d??l??c,L=p??f??c,R=m??f??c,te=w(...HA({direction:e,crossAlign:P,mainAlign:N,gap:o,wrap:x}),F!=null&&a[F],I!=null&&ee[I],L!=null&&g[L],R!=null&&s[R],h&&ij.scrollable,C),z={..._!=null&&{width:typeof _==`number`?`${_}px`:_},...v!=null&&{height:typeof v==`number`?`${v}px`:v},...y!=null&&{maxWidth:typeof y==`number`?`${y}px`:y},...b!=null&&{minHeight:typeof b==`number`?`${b}px`:b}};return(0,K.createElement)(S,{ref:k,...H(O(`stack`,{direction:e,gap:o,wrap:x}),te,T,{...E,...z}),...A},D)}aj.displayName=`Stack`;function oj({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,q.jsx)(aj,{...a,direction:`horizontal`,hAlign:r??t,vAlign:i??n,ref:e})}oj.displayName=`HStack`;function sj({ref:e,justify:t,align:n,hAlign:r,vAlign:i,...a}){return(0,q.jsx)(aj,{...a,direction:`vertical`,hAlign:r??n,vAlign:i??t,ref:e})}sj.displayName=`VStack`;var cj=`(max-width: 640px)`,lj={action:{ks0D6T:`x193iq5w`,k7Eaqz:`xeuugli`,$$css:!0},stackedAction:{kzqmXN:`xh8yej3`,$$css:!0}};function uj({ref:e,isOpen:t,isInline:n,onOpenChange:r,title:i,description:a,cancelLabel:o,actionLabel:s,actionVariant:c=`destructive`,isActionLoading:l,onAction:u,width:d=400,xstyle:f,className:p,style:m,"data-testid":h,...g}){let _=jr(),v=o??_(`@astryx.alertDialog.cancel`),y=(0,K.useId)(),b=(0,K.useId)(),x=Hi(cj),S=(0,K.useCallback)(()=>{r(!1)},[r]),C=[lj.action,x&&lj.stackedAction],w=(0,q.jsx)(Br,{variant:`ghost`,label:v,onClick:S,xstyle:C,"data-autofocus":!0},`cancel`),T=(0,q.jsx)(Br,{variant:c,label:s,onClick:u,isLoading:l,xstyle:C},`action`);return(0,q.jsx)(Se,{...g,ref:e,isOpen:t,isInline:n,onOpenChange:r,width:d,purpose:`form`,role:n?`group`:`alertdialog`,"aria-labelledby":y,"aria-describedby":b,...H(O(`alert-dialog`),{className:p,style:m}),xstyle:f,"data-testid":h,children:(0,q.jsx)(QA,{content:(0,q.jsxs)(ej,{children:[(0,q.jsx)(sO,{level:2,id:y,children:i}),(0,q.jsx)(jt,{type:`body`,color:`secondary`,id:b,children:a})]}),footer:(0,q.jsx)(rj,{children:(0,q.jsx)(aj,{direction:x?`vertical`:`horizontal`,gap:2,hAlign:x?`stretch`:`end`,wrap:x?`nowrap`:`wrap`,children:x?[T,w]:[w,T]})})})})}uj.displayName=`AlertDialog`;var dj={x1iwu4tg:`x1iwu4tg`,$$css:!0},fj={sm:{kzqmXN:`x1td3qas`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`x100vrsf`,kZKoxP:`xxk0z11`,$$css:!0}},pj={sm:{kzqmXN:`x1td3qas`,kZKoxP:`x1qx5ct2`,$$css:!0},md:{kzqmXN:`x100vrsf`,kZKoxP:`xxk0z11`,$$css:!0}},mj={sm:{kzqmXN:`x1td3qas`,kZKoxP:`x1qx5ct2`,kmVPX3:`x1i3ajwb`,$$css:!0},md:{kzqmXN:`x100vrsf`,kZKoxP:`xxk0z11`,kmVPX3:`xfawy5m`,$$css:!0}},hj={sm:{kzqmXN:`x6jxa94`,kZKoxP:`x1v9usgg`,k3aq6I:`xbryuvx`,$$css:!0},md:{kzqmXN:`x1kky2od`,kZKoxP:`xlup9mm`,k3aq6I:`xbryuvx`,$$css:!0}},gj={sm:{kzqmXN:`x1kky2od`,kZKoxP:`xlup9mm`,k3aq6I:`xv5t66b xi9aj42`,$$css:!0},md:{kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,k3aq6I:`x15481yp x12xz5k6`,$$css:!0}},_j={sm:{kAzted:`xisnujt`,$$css:!0},md:{kAzted:`xjwf9q1`,$$css:!0}},vj={container:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kOIVth:`x1txdalj`,$$css:!0},containerLabelHidden:{kOIVth:`xxhr3t`,$$css:!0},containerSpread:{kjj79g:`x1qughib`,kzqmXN:`xh8yej3`,$$css:!0},statusGap:{keoZOQ:`xtbrsbv`,$$css:!0},switchWrapper:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kmuXW:`x2lah0s`,kHBbk8:`xc8icb0`,$$css:!0},input:{kVAEAm:`x10l6tqk`,kogj98:`x1ghz6dp`,kmVPX3:`x1717udv`,kSiTet:`xg01cxk`,kkrTdU:`x1ypdohk x16khyan`,kY2c9j:`x1vjfegm`,k7Eaqz:`xkagaj0`,kAzted:`x80b3aj`,k87sOh:`xijlfn0`,kLqNvP:`x1hsn8va`,k3aq6I:`x8i4i9p`,$$css:!0},inputDisabled:{kkrTdU:`xt0e3qv`,$$css:!0},inputBusy:{kfzvcC:`x47corl`,$$css:!0},track:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kaIpWk:`xjspbzw`,k1ekBW:`x15406qy`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kB7OPa:`x9f619`,kMzoRj:`xc342km x13rsnn2`,ksu8eU:`xng3xce xx61lck`,kVAM5u:`x1w1tqly`,$$css:!0},trackFocus:{kI3sdo:`x1a2a7pz xafswnp`,kInvED:`xwz5zln`,$$css:!0},trackOff:{kWkggS:`xspzpui x1a8ae7b x9yvj25`,$$css:!0},trackOn:{kWkggS:`x1ewilqj xcgwt1n x1jzqe4`,$$css:!0},trackDisabled:{kSiTet:`xbyyjgo`,kVAM5u:`xmnqt3w`,$$css:!0},trackDisabledOff:{kWkggS:`xspzpui`,$$css:!0},thumb:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kaIpWk:`xjspbzw`,k1ekBW:`xh3q6i0`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},thumbOff:{kWkggS:`x10xzikg xwvh9j7`,$$css:!0},thumbOn:{kWkggS:`x10xzikg x1sir5s4`,$$css:!0},labelWrapper:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kOIVth:`x1lsbc85`,kjj79g:`xl56j7k`,$$css:!0}},yj={width:e=>[{kzqmXN:e==null?e:`x5lhr3w`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(e)}]};function bj({label:e,isLabelHidden:t=!1,description:n,onChange:r,changeAction:i,isLoading:a=!1,value:o,isDisabled:s=!1,htmlName:c,disabledMessage:l,isOptional:u=!1,isRequired:d=!1,onFocus:f,onBlur:p,labelIcon:m,labelTooltip:h,labelPosition:g=`end`,labelSpacing:_=`hug`,status:v,size:y=`md`,width:b,xstyle:x,className:S,style:C,ref:T,...E}){let D=(0,K.useId)(),k=(0,K.useId)(),A=(0,K.useId)(),j=YO({isRequired:d,isOptional:u}),[,M]=(0,K.useTransition)(),[N,P]=(0,K.useOptimistic)(o),I=a||N!==o,ee=N===!0,L=s&&!!l,R=F({placement:`above`,focusTrigger:`always`,isEnabled:L}),te=[];n&&te.push(k),v?.message&&te.push(A),L&&te.push(R.describedBy);let z=te.length>0?te.join(` `):void 0,B=(0,q.jsxs)(`div`,{...w(vj.switchWrapper,fj[y]),children:[(0,q.jsx)(`input`,{ref:we(T,R.positionRef),id:D,type:`checkbox`,role:`switch`,name:s?void 0:c,checked:ee,disabled:s&&!L,"aria-disabled":L?`true`:void 0,form:L?``:void 0,required:d,"aria-required":j?`true`:void 0,onChange:e=>{if(s||I)return;let t=e.target.checked;r?.(t,e),i&&!e.defaultPrevented&&M(async()=>{P(t),await i(t,e)})},onFocus:f,onBlur:p,"aria-describedby":z,"aria-invalid":v?.type===`error`||void 0,"aria-busy":I||void 0,...w(vj.input,pj[y],s&&vj.inputDisabled,I&&vj.inputBusy)}),(0,q.jsx)(`div`,{"aria-hidden":`true`,...H(O(`switch`,{checked:ee?`checked`:null,disabled:s?`disabled`:null,size:y}),w(vj.track,mj[y],ee?vj.trackOn:vj.trackOff,!s&&vj.trackFocus,s&&vj.trackDisabled,s&&!ee&&vj.trackDisabledOff)),children:(0,q.jsx)(`div`,{...H(O(`switch-thumb`,{checked:ee?`checked`:null,size:y}),w(vj.thumb,ee?gj[y]:hj[y],ee?vj.thumbOn:vj.thumbOff)),children:I&&(0,q.jsx)(Gt,{size:`sm`})})}),I&&(0,q.jsx)(Kt,{role:`status`,children:`Loading`})]}),ne=(0,q.jsx)(`div`,{...w(vj.labelWrapper,_j[y]),children:(0,q.jsx)(MO,{...O(`switch-label`),label:e,inputID:D,isLabelHidden:t,isDisabled:s,isOptional:u,isRequired:d,labelIcon:m,labelTooltip:h,description:n,descriptionID:k})});return(0,q.jsxs)(`div`,{...H(O(`switch-field`,{labelPosition:g===`end`?void 0:g,labelSpacing:_===`hug`?void 0:_}),w(b!=null&&yj.width(b),x),S,C),...E,children:[(0,q.jsxs)(`div`,{ref:e=>{R.interactionRef(e)},...w(vj.container,t&&vj.containerLabelHidden,_===`spread`&&vj.containerSpread,!s&&dj),children:[` `,g===`start`?(0,q.jsxs)(q.Fragment,{children:[ne,B]}):(0,q.jsxs)(q.Fragment,{children:[B,ne]})]}),v?.message&&(0,q.jsx)(IO,{type:v.type,message:v.message,id:A,variant:`detached`,xstyle:vj.statusGap}),L&&R.renderTooltip(l)]})}bj.displayName=`Switch`;var xj=[`chrome`,`edge`,`brave`,`chromium`,`safari`,`firefox`],Sj=[`embedded`,...xj],Cj=e=>xj.some(t=>t===e);function wj(){let[e,t]=(0,K.useState)(),n=(0,K.useRef)(void 0),r=(0,K.useRef)(!1),i=(0,K.useRef)(!0),a=(0,K.useRef)(void 0),o=(0,K.useCallback)(()=>{a.current?.(),a.current=void 0,n.current?.close(),n.current=void 0,i.current&&t(void 0)},[]);return(0,K.useEffect)(()=>(i.current=!0,window.addEventListener(`pagehide`,o),()=>{i.current=!1,window.removeEventListener(`pagehide`,o),o()}),[o]),{container:e,open:async()=>{if(n.current&&!n.current.closed)return n.current.focus(),!0;if(r.current)return!1;r.current=!0;try{let e=window.documentPictureInPicture,r=e?await e.requestWindow({width:460,height:740}):window.open(`about:blank`,`_blank`,`popup,width=460,height=740`);if(!r)return!1;if(!i.current)return r.close(),!1;n.current=r,r.document.title=`OpenPI Browser Bridge`;let o=()=>{r.document.documentElement.lang=document.documentElement.lang,r.document.documentElement.dataset.theme=document.documentElement.dataset.theme,r.document.documentElement.style.cssText=document.documentElement.style.cssText};o(),r.document.documentElement.classList.add(`browser-guide-window`);for(let e of document.styleSheets)try{let t=r.document.createElement(`style`);t.textContent=[...e.cssRules].map(e=>e.cssText).join(` +`),r.document.head.append(t)}catch{if(!e.href)continue;let t=r.document.createElement(`link`);t.rel=`stylesheet`,t.href=e.href,r.document.head.append(t)}let s=r.document.createElement(`main`);s.className=`browser-settings browser-settings-detached`,r.document.body.append(s);let c=new MutationObserver(o);c.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`,`style`,`lang`]});let l=()=>{c.disconnect(),n.current===r&&(n.current=void 0,a.current=void 0,i.current&&t(void 0))};return r.addEventListener(`pagehide`,l,{once:!0}),a.current=()=>{c.disconnect(),r.removeEventListener(`pagehide`,l)},t(s),!0}catch{return o(),!1}finally{r.current=!1}},close:o,isOpen:()=>!!(n.current&&!n.current.closed)}}function Tj({id:e,name:t,label:n,value:r,options:i,disabled:a=!1,onChange:o,className:s,menuWidth:c=`min(300px, calc(100vw - 32px))`}){let l=i.find(e=>e.value===r);return(0,q.jsx)(yo,{button:{id:e,name:t,label:l?.label??r,"aria-label":n,variant:`secondary`,size:`sm`,className:`settings-select-menu-trigger${s?` ${s}`:``}`,isDisabled:a},className:`settings-select-menu`,menuWidth:c,alignment:`end`,children:(0,q.jsx)(Bo,{value:r,label:n,onChange:e=>{e!==r&&o(e)},children:i.map(e=>(0,q.jsx)(Ho,{value:e.value,label:e.label,isDisabled:a||e.disabled,description:e.description?(0,q.jsx)(`span`,{className:`settings-select-option-description`,children:e.description}):void 0},e.value))})})}var Ej={chrome:`Chrome`,edge:`Microsoft Edge`,brave:`Brave`,chromium:`Chromium`,safari:`Safari`,firefox:`Firefox`};function Dj({browser:e}){return(0,q.jsx)(`span`,{className:`browser-settings-mark ${e}`,"aria-hidden":`true`,children:e===`chrome`||e===`chromium`?(0,q.jsx)(`i`,{}):(0,q.jsx)(Es,{})})}function Oj({onConfigure:e,setupPending:t=!1}){let{t:n}=W(),r=wj(),i=(0,K.useRef)(r.isOpen);i.current=r.isOpen;let[a,o]=(0,K.useState)(),[s,c]=(0,K.useState)(),[l,u]=(0,K.useState)(!1),d=l||t,[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(),[g,_]=(0,K.useState)(`chrome`),[v,y]=(0,K.useState)(1),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(),w=(0,K.useRef)(0),T=(0,K.useRef)(null),E=(0,K.useRef)(null),D=(0,K.useRef)(!0);(0,K.useEffect)(()=>{m&&(T.current?.scrollIntoView?.({block:`start`}),E.current?.focus({preventScroll:!0}))},[m,v,r.container]);let O=(0,K.useCallback)(async()=>{let e=++w.current;try{let t=await new de().request(`/api/settings/browser`);return D.current&&e===w.current&&(o(t),c(void 0)),t}catch(t){D.current&&e===w.current&&c(t instanceof Error?t.message:String(t));return}},[]);(0,K.useEffect)(()=>{D.current=!0,O();let e=setInterval(()=>{(document.visibilityState===`visible`||i.current())&&O()},3e3),t=()=>void O();return window.addEventListener(`focus`,t),()=>{D.current=!1,clearInterval(e),window.removeEventListener(`focus`,t)}},[O]);let k=async t=>{u(!0),c(void 0),C(void 0),++w.current;try{let r=await e(`Configure browser access: ${[t.control===void 0?void 0:`browser_control=${t.control}`,t.embedded===void 0?void 0:`browser_embedded=${t.embedded}`,t.defaultBrowser===void 0?void 0:`browser_default=${JSON.stringify(t.defaultBrowser)}`,t.externalBrowsers===void 0?void 0:`browser_external=${JSON.stringify(t.externalBrowsers)}`].filter(e=>e!==void 0).join(`, `)}. Preserve all other settings.`);if(!D.current)return;if(!r)throw Error(n(`setupRequestFailed`));C(n(`setupRequestAccepted`))}catch(e){await O(),D.current&&c(e instanceof Error?e.message:String(e))}finally{D.current&&u(!1)}},A=async(e,t)=>{u(!0),c(void 0),C(void 0);try{if(await new de().request(`/api/settings/browser/action`,{method:`POST`,body:JSON.stringify({browser:e,action:t})}),D.current)return!0}catch(e){D.current&&c(e instanceof Error?e.message:String(e))}finally{D.current&&u(!1)}return!1},j=e=>e===`embedded`?n(`browserEmbedded`):Ej[e];if(!a)return(0,q.jsxs)(`div`,{className:`browser-settings-load`,role:s?`alert`:`status`,children:[(0,q.jsx)(Es,{}),(0,q.jsx)(`p`,{children:s||n(`browserLoading`)}),s&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>void O(),children:n(`browserCheck`)})]});let{config:M}=a,N=a.profiles.find(e=>e.current&&e.connected&&e.version===a.extensionVersion),P=e=>a.profiles.filter(t=>t.connected&&t.version===a.extensionVersion&&(e===`embedded`?t.current&&![`safari`,`firefox`].includes(t.browser):t.browser===e)),F=e=>e===`embedded`?M.embedded:M.externalBrowsers.includes(e),I=(e,t)=>e===`embedded`?{embedded:t}:{externalBrowsers:t?[...new Set([...M.externalBrowsers,e])]:M.externalBrowsers.filter(t=>t!==e)},ee=e=>{h(e),y(1),C(void 0),x(!1),_(e===`embedded`?N&&![`safari`,`firefox`].includes(N.browser)?N.browser:`chrome`:e)},L=e=>{let t=P(e).length>0,r=e===`embedded`||a.browsers.some(t=>t.id===e&&t.installed),i=a.profiles.some(t=>t.connected&&t.version!==a.extensionVersion&&(e===`embedded`?t.current&&![`safari`,`firefox`].includes(t.browser):t.browser===e));return(0,q.jsxs)(`div`,{className:`browser-settings-row`,children:[(0,q.jsx)(Dj,{browser:e}),(0,q.jsxs)(`div`,{className:`browser-settings-description`,children:[(0,q.jsx)(`strong`,{children:j(e)}),(0,q.jsx)(`span`,{className:t?`connected`:``,children:t?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`i`,{}),n(`browserConnected`)]}):n(i?`browserUpdateNeeded`:r?`browserNeedsSetup`:`browserNotFound`)})]}),(0,q.jsx)(`button`,{className:`browser-settings-button`,type:`button`,disabled:l,"aria-label":n(t?`browserManageNamed`:`browserSetupNamed`,{browser:j(e)}),onClick:()=>ee(e),children:n(t?`browserManage`:`browserSetUp`)}),(0,q.jsx)(bj,{label:n(`browserAllowNamed`,{browser:j(e)}),isLabelHidden:!0,size:`sm`,value:F(e),isDisabled:d,onChange:t=>void k(I(e,t))})]},e)},R=m!==void 0&&P(m).length>0,te=a.browsers.some(e=>e.id===g&&e.installed),z=g===`safari`||g===`firefox`,B=z?a.portableExtensionPath??a.extensionPath:a.extensionPath,ne=g===`firefox`?`${B.replace(/[\\/]+$/,``)}/manifest.json`:B,re=z?`browser-extension-portable`:`browser-extension`,V=g===`safari`?n(`browserSafariSettings`):g===`firefox`?`about:debugging#/runtime/this-firefox`:`${g===`edge`?`edge`:g===`brave`?`brave`:`chrome`}://extensions/`,ie=n(g===`safari`?`browserSafariDeveloper`:g===`firefox`?`browserFirefoxThis`:`browserDeveloperMode`),ae=n(g===`safari`?`browserSafariTemporary`:g===`firefox`?`browserFirefoxTemporary`:`browserLoadUnpacked`),oe=[n(`browserStepOpen`),ie,n(`browserStepAdd`),n(`browserStepConnect`)];return(0,q.jsxs)(`div`,{className:`settings-content-page browser-settings`,children:[(0,q.jsxs)(`header`,{className:`browser-settings-heading`,children:[(0,q.jsx)(`h1`,{children:n(`browserSettings`)}),(0,q.jsx)(`p`,{children:n(`browserSettingsIntro`)})]}),(0,q.jsxs)(`div`,{className:`browser-settings-card browser-settings-main-card`,children:[(0,q.jsxs)(`div`,{className:`browser-settings-control`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:n(`browserControl`)}),(0,q.jsx)(`p`,{children:n(`browserControlHint`)})]}),(0,q.jsx)(bj,{label:n(`browserControl`),isLabelHidden:!0,size:`sm`,value:M.control,isDisabled:d,onChange:e=>void k({control:e})})]}),(0,q.jsxs)(`div`,{className:`browser-settings-default`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`browser-default`,children:n(`browserDefault`)}),(0,q.jsx)(`p`,{children:n(`browserDefaultHint`)})]}),(0,q.jsx)(Tj,{id:`browser-default`,label:n(`browserDefault`),value:M.defaultBrowser,disabled:d,onChange:e=>{let t=Sj.find(t=>t===e);t&&k({defaultBrowser:t})},options:Sj.map(e=>({value:e,label:`${j(e)}${F(e)?``:` · ${n(`browserBlocked`)}`}`,disabled:!F(e)}))})]})]}),!F(M.defaultBrowser)&&(0,q.jsx)(`p`,{className:`browser-settings-warning`,role:`status`,children:n(`browserDefaultBlocked`)}),(0,q.jsxs)(`div`,{className:`browser-settings-section-heading`,children:[(0,q.jsx)(`h2`,{children:n(`browserAllowedTitle`)}),(0,q.jsx)(`span`,{children:!M.control&&n(`browserOffHint`)})]}),(0,q.jsxs)(`div`,{className:`browser-settings-card`,children:[L(`embedded`),L(`chrome`),(0,q.jsxs)(`details`,{className:`browser-settings-more`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(os,{}),n(`browserMore`)]}),xj.filter(e=>e!==`chrome`).map(L)]})]}),(0,q.jsx)(`p`,{className:`browser-settings-example`,children:n(`browserSpeakHint`)}),r.container&&(0,q.jsxs)(`div`,{className:`browser-settings-guide-placeholder`,role:`status`,children:[(0,q.jsx)(`p`,{children:n(`browserGuideDetached`)}),(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-button`,onClick:()=>void r.open(),children:n(`browserShowGuide`)}),(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-text-button`,onClick:r.close,children:n(`browserGuideInline`)})]}),m!==void 0&&(e=>r.container?(0,$c.createPortal)(e,r.container):e)((0,q.jsxs)(`section`,{ref:T,className:`browser-settings-guide`,"aria-label":n(`browserGuideTitle`,{browser:j(m)}),children:[(0,q.jsxs)(`div`,{className:`browser-settings-guide-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{children:n(R?`browserConnectionTitle`:`browserGuideEyebrow`)}),(0,q.jsx)(`h3`,{children:n(`browserGuideTitle`,{browser:j(m)})})]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,disabled:l,"aria-label":n(`browserCloseGuide`),onClick:()=>{r.close(),h(void 0)},children:(0,q.jsx)(je,{})})]}),!r.container&&!R&&(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,onClick:async()=>{await r.open()||C(n(`browserGuideBlocked`))},children:[(0,q.jsx)(Os,{}),n(`browserGuidePopout`)]}),R?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`p`,{className:`browser-settings-ready`,children:[(0,q.jsx)(ds,{}),n(`browserConnectionReady`)]}),(0,q.jsx)(`p`,{children:m===`embedded`?n(`browserEmbeddedDetail`):n(`browserExternalDetail`,{browser:j(m)})}),(0,q.jsxs)(`div`,{className:`browser-settings-guide-actions`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-button`,disabled:l,onClick:()=>void A(m===`embedded`?N.browser:m,`manage`),children:[n(`browserManageExtension`),(0,q.jsx)(Os,{})]}),(!F(m)||!M.control)&&(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-primary`,disabled:d,onClick:()=>void k({control:!0,...I(m,!0)}),children:n(`browserAllowUse`)}),F(m)&&M.defaultBrowser!==m&&(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-button`,disabled:d,onClick:()=>void k({defaultBrowser:m}),children:n(`browserMakeDefault`)})]})]}):(0,q.jsxs)(q.Fragment,{children:[m===`embedded`&&(0,q.jsxs)(`label`,{className:`browser-settings-install-browser`,htmlFor:`browser-install-target`,children:[n(`browserInstallIn`),(0,q.jsx)(Tj,{id:`browser-install-target`,label:n(`browserInstallIn`),value:g,disabled:l,onChange:e=>{let t=xj.find(t=>t===e);t&&(_(t),y(1),x(!1),C(void 0))},options:xj.filter(e=>![`safari`,`firefox`].includes(e)).map(e=>({value:e,label:Ej[e]}))})]}),(0,q.jsx)(`ol`,{className:`browser-settings-progress`,"aria-label":n(`browserSetupSteps`),children:oe.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,"aria-current":v===t+1?`step`:void 0,"aria-label":n(`browserStepLabel`,{step:t+1,label:e}),disabled:l,onClick:()=>{y(t+1),C(void 0)},children:[(0,q.jsx)(`span`,{children:t+1}),e]})},e))}),(0,q.jsxs)(`div`,{className:`browser-settings-wizard`,"aria-live":`polite`,children:[(0,q.jsx)(`span`,{className:`browser-settings-step-count`,children:n(`browserStepCount`,{step:v,total:oe.length})}),(0,q.jsx)(`h4`,{ref:E,tabIndex:-1,children:n(v===1?`browserOpenManagerTitle`:v===2?g===`safari`?`browserSafariDeveloperTitle`:g===`firefox`?`browserFirefoxDeveloperTitle`:`browserDeveloperTitle`:v===3?`browserInstallTitle`:`browserConnectTitle`,{browser:Ej[g]})}),(0,q.jsx)(`p`,{children:n(v===1?g===`safari`?`browserSafariOpenHint`:`browserOpenManagerHint`:v===2?g===`safari`?`browserSafariDeveloperHint`:g===`firefox`?`browserFirefoxDeveloperHint`:`browserDeveloperHint`:v===3?g===`safari`?`browserSafariLoadHint`:g===`firefox`?`browserFirefoxLoadHint`:`browserLoadHint`:`browserConnectHint`,{browser:Ej[g],loadLabel:ae})}),v===1&&(0,q.jsxs)(`div`,{className:`browser-settings-address`,children:[(0,q.jsx)(Dj,{browser:g}),(0,q.jsx)(`code`,{children:V})]}),v===2&&(0,q.jsxs)(`figure`,{className:`browser-settings-illustration ${g}`,children:[(0,q.jsx)(`figcaption`,{children:n(`browserIllustration`,{browser:Ej[g]})}),(0,q.jsxs)(`div`,{className:`browser-settings-demo`,"aria-hidden":`true`,children:[(0,q.jsxs)(`div`,{className:`browser-settings-demo-bar`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`code`,{children:V})]}),(0,q.jsxs)(`div`,{className:`browser-settings-demo-heading`,children:[(0,q.jsx)(`span`,{children:n(`browserExtensions`)}),(0,q.jsxs)(`span`,{className:`browser-settings-demo-toggle highlight`,children:[ie,g!==`firefox`&&(0,q.jsx)(`i`,{})]})]}),(0,q.jsxs)(`div`,{className:`browser-settings-demo-toolbar`,children:[(0,q.jsx)(`span`,{children:ae}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]})]})]}),v===3&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`ol`,{className:`browser-settings-install-steps`,children:[(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{className:`browser-settings-install-label`,children:[(0,q.jsx)(`strong`,{children:n(g===`firefox`?`browserLocateManifest`:`browserLocateTarget`)}),(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-button`,disabled:l,onClick:()=>void A(g,`folder`),children:n(g===`firefox`?`browserRevealManifest`:`browserRevealTarget`)})]}),(0,q.jsxs)(`div`,{className:`browser-settings-selection`,children:[(0,q.jsx)(zs,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:g===`firefox`?`manifest.json`:re}),(0,q.jsx)(`p`,{children:n(g===`firefox`?`browserSelectManifestHint`:`browserSelectFolderHint`)})]})]})]}),(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`strong`,{children:n(z?`browserLoadInBrowser`:`browserDragToBrowser`,{browser:Ej[g],loadLabel:ae})}),(0,q.jsx)(`p`,{children:n(z?`browserSelectLocatedTarget`:`browserDragFolderHint`,{browser:Ej[g],folder:re})}),(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l||!te,onClick:()=>void A(g,`manage`),children:[n(`browserOpenManager`,{browser:Ej[g]}),(0,q.jsx)(Os,{})]})]})]}),(0,q.jsxs)(`details`,{className:`browser-settings-picker-help`,children:[(0,q.jsx)(`summary`,{children:n(z?`browserManualSelection`:`browserManualInstall`)}),(0,q.jsxs)(`div`,{className:`browser-settings-install-label`,children:[(0,q.jsx)(`strong`,{children:n(`browserCopyLocation`)}),(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-button`,onClick:async e=>{let t=await td(ne,e.currentTarget.ownerDocument);x(t),C(t?void 0:n(`browserCopyFailed`))},children:[b?(0,q.jsx)(rs,{}):(0,q.jsx)(Ss,{}),n(b?`browserPathCopied`:`browserCopyPath`)]})]}),(0,q.jsx)(`code`,{className:`browser-settings-install-path`,children:ne}),(0,q.jsx)(`p`,{children:n(`browserLoadInBrowser`,{browser:Ej[g],loadLabel:ae})}),!z&&(0,q.jsx)(`p`,{children:n(`browserLoadAlternate`)}),(0,q.jsx)(`p`,{children:n(navigator.userAgent.includes(`Mac`)?`browserChooseFolderMac`:`browserChooseFolderOther`,{confirm:n(g===`firefox`?`browserConfirmFile`:`browserConfirmFolder`)})})]}),(0,q.jsx)(`p`,{className:`browser-settings-install-checkpoint`,children:n(`browserInstallCheckpoint`)})]}),v===4&&(0,q.jsxs)(`div`,{className:`browser-settings-waiting`,role:`status`,children:[(0,q.jsx)(me,{}),(0,q.jsx)(`span`,{children:n(`browserWaiting`)})]}),!te&&(0,q.jsx)(`p`,{className:`browser-settings-warning`,children:n(`browserInstallBrowserFirst`,{browser:Ej[g]})}),(0,q.jsxs)(`div`,{className:`browser-settings-wizard-actions`,children:[v>1&&(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-button`,disabled:l,onClick:()=>{y(v-1),C(void 0)},children:[(0,q.jsx)(Ko,{}),n(`browserPreviousStep`)]}),v===1&&(0,q.jsx)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l,onClick:()=>y(4),children:n(`browserAlreadyInstalled`)}),v<4?(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-primary`,disabled:l||!te,onClick:async()=>{(v===2||await A(g,v===1?`manage`:`connect`))&&y(v+1)},children:[n(l?`browserOpening`:v===1?`browserOpenManager`:v===2?g===`firefox`?`browserFirefoxDone`:`browserDeveloperDone`:`browserInstalledConnect`,{browser:Ej[g]}),v===2?(0,q.jsx)(qo,{}):(0,q.jsx)(Os,{})]}):(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-primary`,disabled:l||f,onClick:async()=>{p(!0);let e=await O();if(D.current){p(!1);let t=e?.profiles.some(t=>t.connected&&t.version===e.extensionVersion&&(m===`embedded`?t.current&&![`safari`,`firefox`].includes(t.browser):t.browser===m));C(n(t?`browserConnectionReady`:`browserNotConnectedYet`))}},children:[(0,q.jsx)(me,{className:f?`settings-spin`:``}),n(`browserCheck`)]})]}),v===4?(0,q.jsxs)(`div`,{className:`browser-settings-connect-help`,children:[(0,q.jsx)(`p`,{children:n(`browserAllowHint`)}),(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l||!te,onClick:()=>void A(g,`connect`),children:[n(`browserOpenIn`,{browser:Ej[g]}),(0,q.jsx)(Os,{})]})]}):v===2&&(0,q.jsxs)(`button`,{type:`button`,className:`browser-settings-text-button`,disabled:l||!te,onClick:()=>void A(g,`manage`),children:[n(`browserReopenManager`),(0,q.jsx)(Os,{})]})]})]}),(0,q.jsxs)(`details`,{className:`browser-settings-help`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(is,{}),n(`browserHelp`)]}),(0,q.jsx)(`p`,{children:n(`browserReloadHint`)}),(0,q.jsx)(`p`,{children:n(`browserSupportedHint`)})]}),s&&(0,q.jsx)(`div`,{className:`browser-settings-error`,role:`alert`,children:s}),(0,q.jsx)(`div`,{className:`browser-settings-feedback`,role:`status`,"aria-live":`polite`,children:l?n(`browserSaving`):S})]})),!m&&s&&(0,q.jsxs)(`div`,{className:`browser-settings-error`,role:`alert`,children:[s,(0,q.jsx)(`button`,{type:`button`,onClick:()=>void O(),children:n(`browserCheck`)})]}),(0,q.jsx)(`div`,{className:`browser-settings-feedback`,role:`status`,"aria-live":`polite`,children:!m&&(l?n(`browserSaving`):S)})]})}function kj({label:e,value:t,options:n,disabled:r,onChange:i}){return(0,q.jsx)(yo,{button:{label:n.find(e=>e.value===t)?.label??t,"aria-label":e,variant:`secondary`,size:`sm`,className:`configuration-menu-trigger`,isDisabled:r},className:`configuration-menu`,menuWidth:`min(360px, calc(100vw - 32px))`,alignment:`end`,items:n.map(e=>({id:e.value,label:e.label,isDisabled:r,description:e.description?(0,q.jsx)(`span`,{className:`configuration-option-description`,children:e.description}):void 0,endContent:t===e.value?(0,q.jsx)(`span`,{className:`settings-select-check`,"aria-hidden":`true`,children:(0,q.jsx)(rs,{})}):void 0,onClick:()=>{e.value!==t&&i(e.value)}}))})}function Aj({catalog:e,error:t,pending:n,preferencePending:r,onConfigure:i,onUpdatePreferences:a,onRefresh:o,onOpenRuntimeStatus:s}){let{t:c}=W(),l=e?.setupWritable===!1||!!e?.resources.diagnostics.settingsErrors,u=n||r||!!t||!!e?.resources.diagnostics.settingsErrors,d=e?.setup.ui.webHiddenThinkingLevels??[],f=[`off`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],p=e?.setup.response?.verbosity??`default`,m=e?.setup.response?.reasoningSummary??`default`;return(0,q.jsxs)(`section`,{className:`settings-content-page settings-configuration-panel`,children:[(0,q.jsxs)(`header`,{className:`settings-page-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:c(`configurationSettings`)}),(0,q.jsx)(`p`,{children:c(`configurationIntro`)})]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":c(`refreshStatus`),onClick:o,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]}),t&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:t}),!e&&!t&&(0,q.jsx)(`p`,{role:`status`,children:c(`settingsCatalogLoading`)}),l&&(0,q.jsxs)(`p`,{className:`inspection-warning`,role:`alert`,children:[c(`configurationReadFailure`),e?.setupDiagnostics?.map(e=>(0,q.jsxs)(`span`,{children:[e.path,`: `,e.message]},`${e.path}:${e.message}`))]}),e&&!l&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`configuration-scope`,children:[(0,q.jsxs)(`span`,{className:`configuration-scope-label`,children:[(0,q.jsx)(qc,{"aria-hidden":`true`}),c(`configurationUserScope`)]}),(0,q.jsx)(`span`,{children:c(`configurationSetupHint`)})]}),(0,q.jsxs)(`div`,{className:`configuration-group`,children:[(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationApproval`)}),(0,q.jsx)(`p`,{children:c(`configurationApprovalDetail`)})]}),(0,q.jsx)(`span`,{className:`configuration-readonly`,children:c(`configurationPiPermissions`)})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationSandbox`)}),(0,q.jsx)(`p`,{children:c(`configurationSandboxDetail`)})]}),(0,q.jsx)(`span`,{className:`configuration-readonly`,children:c(`configurationSandboxUnavailable`)})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`webSearchSettings`)}),(0,q.jsx)(`p`,{children:c(`configurationSearchDetail`)}),e.webSearch?.available!==!0&&(0,q.jsx)(`p`,{children:c(`webSearchUnsupported`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(kj,{label:c(`webSearchSettings`),value:e.setup.webSearch?.enabled===!0?`on`:`off`,options:[{value:`off`,label:c(`disabled`),description:c(`configurationSearchOff`)},{value:`on`,label:c(`enabled`),description:c(`configurationSearchOn`)}],disabled:u,onChange:e=>{i(c(e===`on`?`webSearchNativeRequest`:`webSearchDisableRequest`))}})})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationVerbosity`)}),(0,q.jsx)(`p`,{children:c(`configurationVerbosityDetail`)}),e.responseSupport?.verbosity!==!0&&(0,q.jsx)(`p`,{children:c(`configurationResponsesUnavailable`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(kj,{label:c(`configurationVerbosity`),value:p,options:[`default`,`low`,`medium`,`high`].map(e=>({value:e,label:c(`configurationVerbosity_${e}`),description:e==="default"?void 0:c(`configurationVerbosityHelp_${e}`)})),disabled:u||e.responseSupport?.verbosity!==!0,onChange:e=>{i(c(`configurationVerbosityRequest`,{value:e}))}})})]}),(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationSummary`)}),(0,q.jsx)(`p`,{children:c(`configurationSummaryDetail`)}),e.responseSupport?.reasoningSummary!==!0&&(0,q.jsx)(`p`,{children:c(`configurationSummaryUnavailable`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(kj,{label:c(`configurationSummary`),value:m,options:[`default`,`auto`,`concise`,`detailed`,`none`].map(e=>({value:e,label:c(`configurationSummary_${e}`),description:e==="default"?void 0:c(`configurationSummaryHelp_${e}`)})),disabled:u||e.responseSupport?.reasoningSummary!==!0,onChange:e=>{i(c(`configurationSummaryRequest`,{value:e}))}})})]})]}),(0,q.jsxs)(`section`,{className:`configuration-section`,children:[(0,q.jsx)(`h2`,{children:c(`configurationModelFeatures`)}),(0,q.jsx)(`div`,{className:`configuration-group`,children:(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationReasoningLevels`)}),(0,q.jsx)(`p`,{children:c(`configurationReasoningDetail`)})]}),(0,q.jsx)(`div`,{className:`configuration-control`,children:(0,q.jsx)(yo,{button:{label:c(`configurationReasoningCount`,{count:f.filter(e=>!d.includes(e)).length}),"aria-label":c(`configurationReasoningLevels`),variant:`secondary`,size:`sm`,className:`configuration-menu-trigger`,isDisabled:u},className:`configuration-level-menu`,menuWidth:`min(240px, calc(100vw - 32px))`,alignment:`end`,children:f.map(e=>(0,q.jsx)(Ro,{label:e,value:!d.includes(e),isDisabled:u,endContent:(0,q.jsx)(`span`,{className:`configuration-check`,children:!d.includes(e)&&(0,q.jsx)(rs,{"aria-hidden":`true`})}),onChange:t=>{a({thinkingLevelVisibility:{level:e,visible:t}})}},e))})})]})})]}),(0,q.jsxs)(`section`,{className:`configuration-section`,children:[(0,q.jsx)(`h2`,{children:c(`configurationDependencies`)}),(0,q.jsx)(`div`,{className:`configuration-group`,children:(0,q.jsxs)(`div`,{className:`configuration-row`,children:[(0,q.jsxs)(`div`,{className:`configuration-copy`,children:[(0,q.jsx)(`strong`,{children:c(`configurationEnvironment`)}),(0,q.jsx)(`p`,{children:c(`configurationEnvironmentDetail`)})]}),(0,q.jsxs)(`button`,{type:`button`,className:`configuration-runtime-button`,onClick:s,children:[c(`configurationRuntimeStatus`),(0,q.jsx)(Yo,{"aria-hidden":`true`})]})]})})]})]})]})}function jj({catalog:e,error:t,pending:n,onConfigure:r,onRefresh:i}){let{t:a}=W(),o=e?.setup.webSearch?.enabled===!0,s=e?.webSearch?.available===!0,c=n||!e||!!t||!!e?.resources.diagnostics.settingsErrors;return(0,q.jsxs)(`section`,{className:`settings-content-page settings-web-search-panel`,children:[(0,q.jsxs)(`header`,{className:`settings-page-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:a(`webSearchSettings`)}),(0,q.jsx)(`p`,{children:a(`webSearchIntro`)})]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button settings-heading-refresh`,"aria-label":a(`refreshStatus`),onClick:i,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]}),t&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:t}),!e&&!t&&(0,q.jsx)(`p`,{role:`status`,children:a(`settingsCatalogLoading`)}),(0,q.jsxs)(`section`,{className:`settings-control-group`,children:[(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsxs)(`div`,{className:`settings-control-copy`,children:[(0,q.jsx)(`h2`,{children:a(`webSearchCurrentModel`)}),(0,q.jsx)(`p`,{children:a(`webSearchNativeDetail`)})]}),(0,q.jsx)(Br,{label:a(o?`webSearchDisable`:`webSearchEnable`),variant:`secondary`,size:`sm`,isDisabled:c,isLoading:n,onClick:()=>void r(a(o?`webSearchDisableRequest`:`webSearchNativeRequest`))})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(`div`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:a(`model`)})}),(0,q.jsx)(`span`,{className:`settings-control-value`,children:e?.webSearch?.model?`${e.webSearch.provider} / ${e.webSearch.model}`:a(`unavailable`)})]})]}),(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:a(`webSearchDefaultOff`)}),(0,q.jsx)(`p`,{role:`status`,className:`settings-resource-caption`,children:a(s?`webSearchSupported`:`webSearchUnsupported`)})]})}var Mj={wrapper:{k8WAf4:`xu0wf1k`,kg3NbH:`x7a5moj`,$$css:!0},icon:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kmuXW:`x2lah0s`,$$css:!0}};function Nj({ref:e,label:t,clearLabel:n,placeholder:r,value:i,onValueChange:a,onKeyDown:o,onFocus:s,onBlur:c,onContainerKeyDown:l,xstyle:u,className:d,style:f,...p}){let[m,h]=(0,K.useState)(!1);(0,K.useEffect)(()=>{D()},[]);let g=(0,K.useCallback)(e=>{h(N()===`keyboard`),s?.(e)},[s]),_=(0,K.useCallback)(e=>{h(!1),c?.(e)},[c]),v=(0,K.useCallback)(()=>{a(``),typeof e==`object`&&e?.current&&e.current.focus()},[a,e]);return(0,q.jsx)(`div`,{onKeyDown:l,...H(w(Mj.wrapper,u),d,f),children:(0,q.jsxs)(`div`,{"data-keyboard-focus":m?`true`:void 0,...{0:{className:`x9f619 x78zum5 x6s0dn4 x1txdalj xh8yej3 x1vofgu7 xf314gf xh6dtrn xkdsq27 xuedmi6 x12w9bfk xlr8y92`},1:{className:`x9f619 x78zum5 x6s0dn4 x1txdalj xh8yej3 x1vofgu7 xf314gf xh6dtrn xkdsq27 xuedmi6 x12w9bfk xlr8y92 x1gnnqk1 x1btxeh5`}}[!!m<<0],children:[(0,q.jsx)(ya,{icon:`search`,size:`sm`,color:`secondary`,xstyle:Mj.icon}),(0,q.jsx)(`input`,{ref:e,type:`text`,"aria-label":t,placeholder:r,value:i,onChange:e=>a(e.target.value),onKeyDown:o,onFocus:g,onBlur:_,className:`x1iyjqo2 xs83m0k xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1tgivj0 x9ynric xcr08ib xdk3u5w x1kq96og x1a2a7pz xeyghm5`,...p}),i!==``&&(0,q.jsx)(KO,{label:n,onClick:v})]})})}Nj.displayName=`PanelSearchInput`;function Pj(e){return typeof e==`string`||!(`type`in e)}function Fj(e){return typeof e==`object`&&`type`in e&&e.type===`divider`}function Ij(e){return typeof e==`object`&&`type`in e&&e.type===`section`}function Lj(e){return typeof e==`string`?{value:e,label:e}:{...e,label:e.label??e.value}}function Rj(e){let t=[];for(let n of e)if(Pj(n))t.push(Lj(n));else if(Ij(n))for(let e of n.options)t.push(Lj(e));return t}var zj=1;function Bj(e){let t=0,n=e;for(;n;)t+=n.offsetTop,n=n.offsetParent;return t}function Vj({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:r,anchorRef:i}){let[a,o]=(0,K.useState)(0),[s,c]=(0,K.useState)(!1),l=(0,K.useCallback)((e,t)=>{o(e),c(t)},[]);return ne(()=>{if(!e){l(0,!1);return}if(!r.current||!i.current){l(0,!0);return}let a=`${n}-item-${t>=0?t:0}`,o=document.getElementById(a);if(!o){l(0,!0);return}let s=r.current,c=i.current.getBoundingClientRect(),u=s.offsetHeight;if(u<=0){l(0,!0);return}let d=Bj(o)-Bj(s)-s.scrollTop+o.offsetHeight/2,f=c.top+c.height/2-d-zj,p=window.innerHeight,m=Math.max(0,p-u),h=Math.min(Math.max(f,0),m),g=Math.max(0,c.bottom-h);l(g,!0)},[e,t,n,r,i,l]),{offset:a,isPositioned:s}}function Hj({selectableItems:e,value:t,isDisabled:n=!1,isOpen:r,hasSearch:i=!1,onOpen:a,onClose:o,onSelect:s,onClear:c,onSearchSeed:l,wasJustDismissed:u,listboxId:d}){let[f,p]=(0,K.useState)(-1),m=(0,K.useCallback)(e=>`${d}-item-${e}`,[d]),h=(0,K.useCallback)(()=>e.map((e,t)=>e.disabled?-1:t).filter(e=>e>=0),[e]),g=(0,K.useCallback)(()=>e.findIndex(e=>e.value===t),[e,t]),_=(0,K.useCallback)(()=>{p(-1),o()},[o]),v=(0,K.useCallback)(e=>{e.disabled||(s?.(e.value),_())},[s,_]),y=(0,K.useCallback)(()=>{if(!(n||u?.())){if(r)_();else if(a(),!i){let e=g();p(e>=0?e:0)}}},[n,u,r,a,_,g,i]),b=(0,K.useCallback)((e,t)=>{e.disabled||p(t)},[]);return{highlightedIndex:f,setHighlightedIndex:p,getItemId:m,onTriggerClick:y,onKeyDown:(0,K.useCallback)(o=>{if(n)return;let s=h();switch(o.key){case`ArrowDown`:if(o.preventDefault(),!r)a(),p(0);else{let e=s.indexOf(f),t=Math.min(e+1,s.length-1);p(s[t]??f)}break;case`ArrowUp`:if(o.preventDefault(),!r)a(),p(e.length-1);else{let e=s.indexOf(f),t=Math.max(e-1,0);p(s[t]??f)}break;case` `:if(i)break;case`Enter`:if(o.preventDefault(),r&&f>=0){let t=e[f];t&&!t.disabled&&v(t)}else if(!r&&(a(),!i)){let e=g();p(e>=0?e:0)}break;case`Escape`:r&&(o.preventDefault(),_());break;case`Tab`:r&&_();break;case`Home`:o.preventDefault(),r&&s.length>0&&p(s[0]);break;case`End`:o.preventDefault(),r&&s.length>0&&p(s[s.length-1]);break;case`PageUp`:o.preventDefault(),r&&s.length>0&&p(s[0]);break;case`PageDown`:o.preventDefault(),r&&s.length>0&&p(s[s.length-1]);break;case`Delete`:case`Backspace`:!i&&!r&&c!=null&&t!=null&&(o.preventDefault(),c());break;default:i&&l&&o.key.length===1&&!o.ctrlKey&&!o.metaKey&&(r||a(),l(o.key))}},[n,r,a,_,e,f,v,g,h,i,c,l,t]),onItemSelect:v,onItemMouseEnter:b}}var Uj=(0,K.createContext)(`stacked`);Uj.displayName=`SelectorRowLayoutContext`;function Wj(){return(0,K.use)(Uj)}var Gj={root:{k8WAf4:`xt970qd`,kg3NbH:`xnjsko4`,kaIpWk:`x2u8bby`,$$css:!0}};function Kj({icon:e,label:t,description:n,layout:r,endContent:i,xstyle:a,className:o,style:s}){let c=Wj();return(0,q.jsx)(Na,{startContent:e?xa(e,{size:`sm`,color:`secondary`}):void 0,label:t,description:n,layout:c===`inline`?`inline`:r,endContent:i,xstyle:[Gj.root,a],...H(O(`selector-option`),{className:o,style:s})})}Kj.displayName=`SelectorOption`;var qj={triggerContainer:{kVAEAm:`x1n2onr6`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,k8WAf4:`xce4md1`,kg3NbH:`xrrkdod`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib xdk3u5w`,kLWn49:`x7acx1w`,kMwMTN:`x1tgivj0`,kkrTdU:`x1ypdohk x16khyan`,$$css:!0},triggerPlaceholder:{kMwMTN:`xv1l7n4`,$$css:!0},triggerInGroup:{kAzted:`x2lwn1j`,k8WAf4:`xt970qd`,$$css:!0},triggerIcon:{kmuXW:`x2lah0s`,$$css:!0},triggerIconRotation:{k1ekBW:`x11xpdln`,kIyJzY:`xuedmi6`,kAMwcw:`xlr8y92`,k3nNDw:`x1g0ag68`,$$css:!0},triggerIconOpen:{k3aq6I:`x19jd1h0`,$$css:!0},triggerGhost:{kzqmXN:`x14atkfc`,kMzoRj:`xc342km`,kWkggS:`xjbqb8w`,kGVxlE:`x1gnnqk1 x1s17dad x15ysqaf`,k63SB2:`x1e4wzip`,k1ekBW:`xrafxwg`,k3aq6I:`x3oybdh xk4oym4`,$$css:!0},triggerGhostDisabled:{kKwaWg:`x18o3ruo`,k3aq6I:`x1c071of x1pdlv7q`,$$css:!0},statusButton:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kmVPX3:`x1717udv`,kogj98:`x1ghz6dp`,kMzoRj:`xc342km`,ksu8eU:`xng3xce`,kWkggS:`xjbqb8w`,kMwMTN:`x1heor9g`,kkrTdU:`x1ypdohk x16khyan`,kaIpWk:`xh6dtrn`,$$css:!0},searchRowInput:{kg3NbH:`x2hg6jq`,$$css:!0},popover:{k7Eaqz:`xrzjruh`,$$css:!0},divider:{kqGvvJ:`xsq74q5`,$$css:!0},item:{kB7OPa:`x9f619`,k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kjj79g:`x1qughib`,kOIVth:`x1txdalj`,kzqmXN:`xh8yej3`,kmVPX3:`xlsj2fj`,kaIpWk:`xh6dtrn`,kMv6JI:`x9ynric`,kGuDYH:`xcr08ib`,kMwMTN:`x1tgivj0`,kWkggS:`xjbqb8w`,kkrTdU:`x1ypdohk x16khyan`,k9WMMc:`x1yc453h`,kI3sdo:`x1a2a7pz`,$$css:!0},itemHighlighted:{kWkggS:`x1lmrjuc`,$$css:!0},itemSelected:{k63SB2:`x1e4wzip`,$$css:!0},itemDisabled:{kSiTet:`xbyyjgo`,kkrTdU:`xt0e3qv`,$$css:!0}},Jj={sm:{kAzted:`x1gdqauq`,k8WAf4:`x1ecmfrv`,$$css:!0},md:{kAzted:`x1uogy3y`,k8WAf4:`x1ioay2v`,$$css:!0},lg:{kAzted:`x1xf4nls`,k8WAf4:`x1vn5h1t`,$$css:!0}},Yj={sm:{k8WAf4:`xu0wf1k`,kg3NbH:`xf314gf`,$$css:!0},md:{k8WAf4:`x1vofgu7`,$$css:!0},lg:{$$css:!0}},Xj={warning:`warning`,error:`error`,success:`success`},Zj={warning:`warning`,error:`error`,success:`success`},Qj={warning:`@astryx.input.statusButton.warning`,error:`@astryx.input.statusButton.error`,success:`@astryx.input.statusButton.success`};function $j({option:e}){return(0,q.jsx)(Kj,{icon:e.icon,label:e.label??e.value,description:e.description})}function eM(e,t){return!t||(e.label??e.value).toLowerCase().includes(t.toLowerCase())}function tM(e,t){return t?e.filter(e=>eM(e,t)):e}function nM(e){let t=jr(),{label:n,isLabelHidden:r=!1,description:i,isOptional:a=!1,isRequired:o=!1,isDisabled:s=!1,disabledMessage:c,options:l,value:u,onChange:d,changeAction:f,isLoading:m=!1,placeholder:h,size:g,variant:_=`input`,status:v,statusVariant:y=`attached`,labelTooltip:b,startIcon:x,htmlName:S,renderOption:C,renderValue:T,indicatorPosition:E=`end`,hasSearch:D=!1,searchPlaceholder:k,emptyText:A,emptySearchText:j,placement:N,isDefaultOpen:P=!1,"data-testid":I,width:ee,xstyle:L,className:te,style:z,hasClear:B,id:ne,...re}=e,V=YO({isRequired:o,isOptional:a}),oe=h??t(`@astryx.selector.placeholder`),se=k??t(`@astryx.selector.searchPlaceholder`),ce=A??t(`@astryx.selector.empty`),le=j??t(`@astryx.selector.emptySearchResults`),ue=B===!0,de=Zt(g,`md`),pe=_===`ghost`&&y===`attached`?`detached`:y,me=u===null?void 0:u,he=(0,K.useId)(),ge=ne??he,_e=(0,K.useId)(),ve=(0,K.useId)(),ye=(0,K.useId)(),be=(0,K.useId)(),xe=(0,K.useId)(),Se=(0,K.useRef)(null),Ce=(0,K.useRef)(null),we=(0,K.useRef)(null),Te=ZO(),[Ee,U]=(0,K.useState)(``),De=(0,K.useRef)(``),Oe=Ee.length>0,[,ke]=(0,K.useTransition)(),[W,Ae]=(0,K.useOptimistic)(me),G=m||W!==me,je=vu(),Me=typeof ce==`string`?ce:t(`@astryx.selector.empty`),Ne=typeof le==`string`?le:t(`@astryx.selector.emptySearchResults`),Pe=s&&!!c,Fe=F({placement:`above`,focusTrigger:`always`,isEnabled:Pe}),Ie=F({placement:`above`,isEnabled:pe===`tooltip`&&!!v?.message}),{ariaLabelledBy:Le,ariaDescribedBy:Re}=gt(be,[i?ve:null,!Te&&pe!==`tooltip`&&v?.message?ye:null,pe===`tooltip`&&v?.message?Ie.describedBy:null,Pe?Fe.describedBy:null],Te),ze=(0,K.useMemo)(()=>Rj(l),[l]),Be=(0,K.useMemo)(()=>tM(ze,Ee),[ze,Ee]),Ve=(0,K.useMemo)(()=>ze.findIndex(e=>e.value===W),[ze,W]),He=(0,K.useMemo)(()=>Ve>=0?ze[Ve]:void 0,[ze,Ve]),Ue=(0,K.useRef)(null),We=(0,K.useRef)(()=>{}),Ge=Gr({onHide:(0,K.useCallback)(()=>{U(``),De.current=``,We.current(),je(``),Ce.current?.focus()},[je]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:`none`,surfaceTarget:`selector-popup`}),Ke=ae(Ge.id,Ge.isOpen);(0,K.useEffect)(()=>{P&&Ge.show()},[]);let qe=(0,K.useCallback)(e=>{if(e.length===0){je(``);return}if(m){je(``);return}let n=tM(ze,e).length;je(n===0?Ne:t(`@astryx.selector.resultCount`,{count:n}))},[je,m,ze,Ne,t]),Je=(0,K.useCallback)(e=>{U(e),De.current=e,qe(e)},[qe]),Ye=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!(Ge.isOpen&&!m&&Ee===``&&ze.length===0)){Ye.current=null;return}Ye.current!==Me&&(Ye.current=Me,je(Me))},[Ge.isOpen,m,Ee,ze.length,Me,je]);let Xe=N==null&&!D,{offset:Ze,isPositioned:Qe}=Vj({isOpen:Ge.isOpen&&Xe,selectedItemIndex:Ve,listboxId:_e,listboxRef:Ue,anchorRef:Se}),$e=Xe?Ze:0,et=!Xe||Qe,tt=N??`below`,nt=$e>0?{marginBlockStart:`-${$e}px`}:void 0,rt=(0,K.useCallback)(()=>{We.current(),d?.(null),f&&ke(async()=>{Ae(void 0),await f(null)})},[d,f,ke,Ae]),it=(0,K.useCallback)(e=>{let t=De.current+e;De.current=t,U(t),qe(t)},[qe]),at=(0,K.useCallback)(e=>{d?.(e),f&&ke(async()=>{Ae(e),await f(e)})},[d,f,ke,Ae]),{highlightedIndex:ot,setHighlightedIndex:st,getItemId:ct,onTriggerClick:lt,onKeyDown:ut,onItemSelect:dt,onItemMouseEnter:ft}=Hj({selectableItems:Be,wasJustDismissed:Ge.wasJustDismissed,value:W,isDisabled:s,isOpen:Ge.isOpen,hasSearch:D,onOpen:(0,K.useCallback)(()=>{Ge.show(),D&&requestAnimationFrame(()=>{let e=we.current;e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))})},[Ge,D]),onClose:Ge.hide,onSelect:at,onClear:ue?rt:void 0,onSearchSeed:it,listboxId:_e}),pt=io({getItemLabels:()=>ze.map(e=>e.label??e.value),isDisabled:e=>ze[e]?.disabled===!0,getCurrentIndex:()=>Ge.isOpen?ot:Ve,onMatch:e=>{let t=ze[e];Ge.isOpen?st(e):t.value!==W&&(at(t.value),je(t.label??t.value))}});We.current=pt.reset;let mt=(0,K.useCallback)(e=>{if(!s&&!D&&pt.onKeyDown(e)){e.preventDefault();return}ut(e)},[s,D,pt,ut]);(0,K.useEffect)(()=>{!Ge.isOpen||ot<0||document.getElementById(ct(ot))?.scrollIntoView?.({block:`nearest`})},[Ge.isOpen,ot,ct]);let ht=(0,K.useCallback)(e=>{e.stopPropagation(),rt()},[rt]),_t=(0,K.useCallback)(()=>D?(0,q.jsx)(Nj,{ref:we,id:xe,label:t(`@astryx.selector.searchOptions`),clearLabel:t(`@astryx.textInput.clearLabel`,{label:t(`@astryx.selector.searchOptions`)}),...O(`selector-search`),xstyle:_!==`ghost`&&qj.searchRowInput,role:`combobox`,"aria-expanded":Ge.isOpen,"aria-controls":_e,"aria-autocomplete":`list`,"aria-activedescendant":Ge.isOpen&&ot>=0?ct(ot):void 0,value:Ee,onValueChange:Je,onContainerKeyDown:e=>{e.target!==we.current&&e.key===`Tab`&&!e.shiftKey&&ut(e)},onKeyDown:e=>{if(!M(e.nativeEvent)){if(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`PageUp`||e.key===`PageDown`||e.key===`Enter`||e.key===`Escape`){ut(e);return}e.key===`Tab`&&(e.shiftKey||!Oe)&&ut(e)}},placeholder:se}):null,[D,xe,_e,Ee,Oe,se,Je,ut,Ge.isOpen,ot,ct,_,t]),vt=Io(`check`),yt=(0,K.useCallback)((e,t)=>{let n=t===ot,r=e.value===me,i=(0,q.jsx)(`span`,{className:`x3nfvp2 x6s0dn4 xl56j7k x2lah0s xgomdpo`,children:(0,q.jsx)(vt,{state:r?`checked`:`unchecked`,size:`sm`,isDisabled:e.disabled??!1,...O(`selector-check`)})}),a=(0,q.jsx)(`span`,{className:`x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli`,children:C?C(e):(0,q.jsx)($j,{option:e})}),o=E===`start`?(0,q.jsxs)(q.Fragment,{children:[i,a]}):(0,q.jsxs)(q.Fragment,{children:[a,i]});return(0,q.jsx)(`div`,{id:ct(t),role:`option`,"aria-selected":r,"aria-disabled":e.disabled,onClick:()=>dt(e),onMouseEnter:()=>ft(e,t),...H(O(`selector-option-row`,{size:de,selected:r?`selected`:null,disabled:e.disabled?`disabled`:null}),w(qj.item,Yj[de],n&&qj.itemHighlighted,r&&qj.itemSelected,e.disabled&&qj.itemDisabled)),children:o},e.value)},[C,E,ot,de,me,ct,dt,ft,vt]),bt=(0,K.useCallback)(()=>{let e=D&&!!Ee;if(Be.length===0&&!m)return[(0,q.jsx)(`div`,{role:`presentation`,...H(O(`selector-empty-state`),{className:`x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib`}),children:e?le:ce},`empty`)];let t=0,n=[];for(let r=0;r{Se.current=e,Ge.triggerRef(e),Fe.ref(e)},onClick:lt,"data-testid":I,...H(O(`selector`,{variant:_,size:de,status:v?.type??null,disabled:s?`disabled`:null}),w(BO.base,qj.triggerContainer,Jj[de],_===`ghost`&&qj.triggerGhost,_===`ghost`&&rn.backgroundImage,_===`ghost`&&fe.focusWithin,s&&BO.disabled,_===`ghost`&&s&&qj.triggerGhostDisabled,!He&&qj.triggerPlaceholder,_!==`ghost`&&v&&VO[v.type],_!==`ghost`&&v&&!s&&HO[v.type],_!==`ghost`&&Te&&JO.inGroup,Te&&qj.triggerInGroup,L),te,z),children:[x&&xa(x,{size:`sm`,color:`secondary`}),Te&&(0,q.jsx)(Kt,{id:be,children:n}),(0,q.jsx)(`button`,{ref:Ce,id:ge,type:`button`,role:D?void 0:`combobox`,...re,"aria-haspopup":`listbox`,"aria-expanded":Ge.isOpen,"aria-controls":_e,"aria-activedescendant":!D&&Ge.isOpen&&ot>=0?ct(ot):void 0,"aria-describedby":Re,"aria-labelledby":Le,"aria-required":V?`true`:void 0,"aria-invalid":v?.type===`error`?`true`:void 0,"aria-busy":G||void 0,disabled:s&&!Pe,"aria-disabled":Pe?`true`:void 0,onKeyDown:mt,tabIndex:s&&!Pe?-1:0,...{0:{className:`x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x16khyan x1a2a7pz`},1:{className:`x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x16khyan x1a2a7pz xkh2ocl`}}[!!Te<<0],children:Ct}),S!=null&&(0,q.jsx)(`input`,{type:`hidden`,name:S,value:u??``,disabled:s}),G&&(0,q.jsx)(Gt,{size:`sm`}),ue&&u!=null&&!s&&(0,q.jsx)(qO,{...Ke,label:t(`@astryx.selector.clearLabel`,{label:n}),onClick:ht,iconClassName:ie(`selector-clear-icon`)}),xt?St?(0,q.jsx)(`button`,{ref:Ie.ref,type:`button`,"aria-label":t(Qj[v.type]),"aria-describedby":Ie.describedBy,...Ke,onClick:e=>e.stopPropagation(),...w(fe.focusVisible,qj.statusButton),children:(0,q.jsx)(ya,{icon:Xj[v.type],size:`sm`,color:Zj[v.type],xstyle:qj.triggerIcon})}):(0,q.jsx)(ya,{icon:Xj[v.type],size:`sm`,color:Zj[v.type],xstyle:qj.triggerIcon}):(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`secondary`,xstyle:[qj.triggerIcon,qj.triggerIconRotation,Ge.isOpen&&qj.triggerIconOpen],...O(`selector-indicator-icon`,{state:Ge.isOpen?`expanded`:`collapsed`})})]}),Ge.render(D?(0,q.jsxs)(`div`,{children:[_t(),(0,q.jsx)(Ga,{}),(0,q.jsx)(`div`,{ref:Ue,id:_e,role:`listbox`,"aria-labelledby":ge,...{0:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x7a5moj x1hc1fzr x1ey1afo`},1:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x1hc1fzr x1ey1afo x2hg6jq`}}[(_!==`ghost`)<<0],children:bt()})]}):(0,q.jsx)(`div`,{ref:Ue,id:_e,role:`listbox`,"aria-labelledby":ge,...{0:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x7a5moj x1hc1fzr x1ey1afo`},2:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x1hc1fzr x1ey1afo x2hg6jq`},1:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x7a5moj xg01cxk xq2gx43`},3:{className:`x9f619 xuyqlj2 x1odjw0f xu0wf1k x2hg6jq xg01cxk xq2gx43`}}[(_!==`ghost`)<<1|!et<<0],children:bt()}),{placement:tt,alignment:`start`,offset:Xe?void 0:p[`--spacing-1`],xstyle:[qj.popover,R[tt]],style:nt}),St&&Ie.renderTooltip(v?.message??``),Pe&&Fe.renderTooltip(c)]});return Te?wt:(0,q.jsx)(zO,{label:n,isLabelHidden:r,description:i,inputID:ge,descriptionID:i?ve:void 0,isOptional:a,isRequired:o,isDisabled:s,status:v?{type:v.type,message:v.message,messageID:v.message?ye:void 0}:void 0,statusVariant:pe,labelTooltip:b,width:ee,children:wt})}nM.displayName=`Selector`;function rM(e){return e?.status===`running`||e?.status===`cancelling`}function iM({sessionId:e,auth:t,busy:n,onSaving:r,onAuthenticated:i,onReload:a}){let{t:o}=W(),[s,c]=(0,K.useState)(null),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(!1),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(0),[_,v]=(0,K.useState)(``),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!1),T=(0,K.useRef)(!1),E=(0,K.useRef)(null),D=(0,K.useRef)(!1),O=(0,K.useRef)(0),k=(0,K.useRef)(null),A=(0,K.useRef)({onSaving:r,onAuthenticated:i});A.current={onSaving:r,onAuthenticated:i};let j=rM(s),M=t.id,N=`${e}:${M}`,P=(0,K.useRef)({key:N});P.current.key!==N&&(P.current={key:N});let F=P.current,I=(0,K.useCallback)((t,n)=>{if(t&&(t.sessionId!==e||t.provider!==M||n&&t.id!==n))throw Error(`Login ownership changed`);if(n&&!t)throw Error(`Login status unavailable`);if(!T.current||P.current!==F){t&&rM(t)&&new de().cancelProviderLogin(e,t.id).catch(()=>void 0);return}E.current=t,c(t),m(!1),t?.status===`succeeded`&&!t.refreshRequired&&k.current!==t.id&&(k.current=t.id,A.current.onAuthenticated())},[e,M,F]);(0,K.useEffect)(()=>{T.current=!0,E.current=null,D.current=!1,k.current=null,c(null),u(!1),f(!1),m(!1),b(!1),w(!1);let t=new AbortController,n=O.current;return new de().providerLogin(e,void 0,t.signal).then(e=>{!t.signal.aborted&&n===O.current&&!D.current&&e?.provider===M&&rM(e)&&I(e)}).catch(()=>void 0),()=>{T.current=!1,t.abort();let n=E.current;n&&rM(n)&&new de().cancelProviderLogin(e,n.id).catch(()=>void 0),A.current.onSaving(!1)}},[e,M,I]),(0,K.useEffect)(()=>{A.current.onSaving(j||l)},[j,l]);let ee=s?.prompt?.id;(0,K.useEffect)(()=>{v(``)},[ee]);let L=s?.id;(0,K.useEffect)(()=>{b(!1)},[L]),(0,K.useEffect)(()=>{if(l||D.current||!j||!L)return;let t=new AbortController,n=O.current,r=0,i=async()=>{try{let a=await new de().providerLogin(e,L,t.signal);if(t.signal.aborted||n!==O.current||D.current)return;I(a,L),rM(a)&&(r=window.setTimeout(()=>void i(),900))}catch{!t.signal.aborted&&n===O.current&&!D.current&&m(!0)}};return i(),()=>{t.abort(),clearTimeout(r)}},[e,I,L,j,l,h]);let R=async(e,t)=>{if(!D.current){D.current=!0,O.current++,u(!0),f(!1);try{I(await e(),t)}catch{T.current&&P.current===F&&f(!0)}finally{P.current===F&&(D.current=!1,O.current++,T.current&&(u(!1),g(e=>e+1)))}}},te=()=>{n||j||R(()=>new de().startProviderLogin(e,M))},z=t=>{let n=s?.prompt;if(!s||!n)return;let r=s.id;R(()=>new de().respondProviderLogin(e,r,n.id,t))},B=()=>{let t=s?.id;return R(()=>new de().providerLogin(e,t),t)},ne=s?.prompt,re=s?.auth||s?.device,V=ne&&ne.type!==`select`&&(0,q.jsxs)(`div`,{className:`models-login-input`,children:[(0,q.jsxs)(`label`,{className:`models-field`,children:[ne.type===`manual_code`?o(`accountLoginPaste`):ne.message,(0,q.jsx)(`input`,{type:ne.type===`secret`||ne.type===`manual_code`?`password`:`text`,autoComplete:`off`,spellCheck:!1,value:_,maxLength:8192,placeholder:ne.placeholder,disabled:l||s.status!==`running`,onChange:e=>v(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.nativeEvent.isComposing||(e.preventDefault(),(ne.type===`text`||_.trim())&&z(_))}})]}),(0,q.jsx)(`button`,{type:`button`,className:`models-button primary`,disabled:l||ne.type!==`text`&&!_.trim()||s.status!==`running`,onClick:()=>z(_),children:o(`accountLoginContinue`)})]});return(0,q.jsxs)(`div`,{className:`models-account-login`,children:[!j&&!C&&(!s||[`failed`,`expired`,`cancelled`].includes(s.status))&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{className:`models-login-intro`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:M===`openai`?o(`accountLoginChatGPT`):M===`anthropic`?o(`accountLoginClaude`):t.loginLabel||t.name}),(0,q.jsx)(`p`,{className:`models-hint`,children:o(t.subscription?`accountLoginExisting`:`accountLoginIntro`)})]})}),(0,q.jsxs)(`div`,{className:`models-login-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`models-button primary`,disabled:n||l||d,onClick:te,children:o(t.subscription?`accountLoginAgain`:`accountLoginStart`)}),t.subscription&&(0,q.jsx)(`button`,{type:`button`,className:`models-link`,disabled:n||l,onClick:()=>S(!0),children:o(`accountLogout`)})]})]}),j&&(0,q.jsxs)(`div`,{className:`models-login-flow`,children:[(0,q.jsxs)(`div`,{className:`models-login-status`,role:`status`,children:[(0,q.jsx)(rc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o(s?.status===`cancelling`?`accountLoginCancelling`:re?`accountLoginWaiting`:ne?`accountLoginChoose`:`accountLoginStarting`)})]}),re&&(0,q.jsx)(`p`,{className:`models-hint`,children:o(s?.device?`accountLoginDeviceHelp`:`accountLoginBrowserHelp`)}),s?.device&&(0,q.jsxs)(`div`,{className:`models-device-code`,children:[(0,q.jsx)(`code`,{children:s.device.code}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon`,"aria-label":o(`accountLoginCopyCode`),onClick:()=>{s.device&&navigator.clipboard.writeText(s.device.code).then(()=>{T.current&&P.current===F&&b(!0)}).catch(()=>{T.current&&P.current===F&&b(!1)})},children:y?(0,q.jsx)(rs,{}):(0,q.jsx)(Ss,{})})]}),re&&(0,q.jsxs)(`a`,{className:`models-button primary models-login-open`,href:s?.device?.url||s?.auth?.url,target:`_blank`,rel:`noopener noreferrer`,children:[o(`accountLoginOpen`),(0,q.jsx)(Yo,{"aria-hidden":`true`})]}),ne?.type===`select`&&(0,q.jsx)(`fieldset`,{className:`models-login-options`,"aria-label":ne.message,children:ne.options?.map(e=>{let t=[`openai`,`openai-codex`].includes(M)&&[`browser`,`device_code`].includes(e.id);return(0,q.jsxs)(`button`,{type:`button`,className:`models-login-option`,disabled:l||s?.status!==`running`,onClick:()=>z(e.id),children:[(0,q.jsx)(`strong`,{children:t?o(e.id===`browser`?`accountLoginBrowser`:`accountLoginDevice`):e.label}),(t||e.description)&&(0,q.jsx)(`span`,{children:t?o(e.id===`browser`?`accountLoginBrowserOption`:`accountLoginDeviceOption`):e.description})]},e.id)})}),ne?.type===`manual_code`&&re?(0,q.jsxs)(`details`,{className:`models-login-fallback`,children:[(0,q.jsx)(`summary`,{children:o(`accountLoginFallback`)}),(0,q.jsx)(`p`,{className:`models-hint`,children:o(`accountLoginRemoteHelp`)}),V]}):V,s?.messages.map(e=>(0,q.jsxs)(`div`,{className:`models-hint`,children:[(0,q.jsx)(`p`,{children:e.message}),e.links?.map(e=>(0,q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:[e.label,(0,q.jsx)(Yo,{"aria-hidden":`true`})]},e.url))]},e.id)),(0,q.jsx)(`button`,{type:`button`,className:`models-link models-login-cancel`,disabled:l||s?.status===`cancelling`,onClick:()=>{s&&R(()=>new de().cancelProviderLogin(e,s.id))},children:o(`accountLoginCancel`)})]}),s?.status===`succeeded`&&s.refreshRequired&&(0,q.jsxs)(`p`,{className:`models-hint`,role:`status`,children:[o(`accountLoginRefreshRequired`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:a,children:o(`refreshStatus`)})]}),C&&(0,q.jsxs)(`p`,{className:`models-hint`,role:`status`,children:[o(`accountLogoutRefreshRequired`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:a,children:o(`refreshStatus`)})]}),s&&[`failed`,`expired`,`cancelled`].includes(s.status)&&(0,q.jsx)(`p`,{className:s.status===`failed`?`models-error`:`models-hint`,role:`status`,children:o(`accountLogin_${s.status}`)}),d&&(0,q.jsxs)(`p`,{className:`models-error`,role:`alert`,children:[o(`accountLoginRequestFailed`),(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:()=>void B(),children:o(`refreshStatus`)})]}),p&&(0,q.jsxs)(`p`,{className:`models-error`,role:`alert`,children:[o(`accountLoginStatusUnknown`),(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:()=>g(e=>e+1),children:o(`refreshStatus`)})]}),x&&(0,q.jsx)(uj,{isOpen:!0,title:o(`accountLogoutTitle`,{provider:t.name}),description:o(`accountLogoutDetail`),cancelLabel:o(`cancel`),actionLabel:o(`accountLogout`),isActionLoading:l,onOpenChange:e=>{!e&&!l&&S(!1)},onAction:()=>{D.current||n||(D.current=!0,O.current++,u(!0),f(!1),new de().logoutProvider(e,M).then(e=>{!T.current||P.current!==F||(S(!1),e.refreshRequired?w(!0):a())}).catch(()=>{T.current&&P.current===F&&(S(!1),f(!0))}).finally(()=>{P.current===F&&(D.current=!1,O.current++,T.current&&(u(!1),g(e=>e+1)))}))}})]})}var aM={assign:0,create:0,clone:0,discard:0,update:0};function oM(e){return Array.isArray(e)}function sM(e){return mM(typeof e,`bigint`)}function cM(e){return mM(typeof e,`boolean`)}function lM(e){return mM(e,null)}function uM(e){return Number.isFinite(e)}function dM(e){return fM(e)&&!oM(e)}function fM(e){return mM(typeof e,`object`)&&!lM(e)}function pM(e){return mM(typeof e,`string`)}function mM(e,t){return e===t}function hM(e,t){return e>t}function gM(e,t){return eHM(e))}function RM(e){return e.slice()}function zM(e){return new RegExp(e.source,e.flags)}function BM(e){return new Map(HM([...e.entries()]))}function VM(e){return new Set(HM([...e.values()]))}function HM(e){return wM(e)?RM(e):TM(e)?zM(e):DM(e)?BM(e):EM(e)?VM(e):oM(e)?LM(e):fM(e)?IM(e):e}function UM(e){return aM.clone+=1,HM(e)}function WM(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function GM(e,t){return{...e,...t}}function KM(e,t,n={}){aM.create+=1;let r=GM(t,n);return AM(kM().enumerableKind?GM(r,e):WM(r,e))}function qM(e,t){aM.discard+=1;let n={};for(let r of xM(e)){if(t.includes(r))continue;let i=Object.getOwnPropertyDescriptor(e,r);i.value=UM(i.value),Object.defineProperty(n,r,i)}return AM(n)}function JM(e,t,n){aM.update+=1;let r=kM(),i=UM(e);for(let e of Object.keys(t))Object.defineProperty(i,e,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[e]});for(let e of Object.keys(n))Object.defineProperty(i,e,{configurable:!0,enumerable:!0,writable:!0,value:n[e]});return AM(i)}function YM(e,t){return fM(e)&&bM(e,`~kind`)&&mM(e[`~kind`],t)}function XM(e){return fM(e)}function ZM(e,t,n){return KM({"~kind":`Deferred`},{type:`deferred`,action:e,parameters:t,options:n},{})}function QM(e){return YM(e,`Deferred`)}function $M(e){return JM(e,{"~readonly":!0},{})}function eN(e,t){return JM($M(e),{},t)}function tN(e,t,n,r){return eN(BU(e,t,n),r)}function nN(e){return JM(e,{"~optional":!0},{})}function rN(e,t){return JM(nN(e),{},t)}function iN(e,t,n,r){return rN(BU(e,t,n),r)}function aN(e,t){return KM({"~kind":`Array`},{type:`array`,items:e},t)}function oN(e){return YM(e,`Array`)}function sN(e){return qM(e,[`~kind`,`type`,`items`])}function cN(e,t,n={}){return KM({"~kind":`Constructor`},{type:`constructor`,parameters:e,instanceType:t},n)}function lN(e){return YM(e,`Constructor`)}function uN(e){return qM(e,[`~kind`,`type`,`parameters`,`instanceType`])}function dN(e,t,n={}){return KM({"~kind":`Function`},{type:`function`,parameters:e,returnType:t},n)}function fN(e){return YM(e,`Function`)}function pN(e){return qM(e,[`~kind`,`type`,`parameters`,`returnType`])}function mN(e,t){return KM({"~kind":`Ref`},{$ref:e},t)}function hN(e){return YM(e,`Ref`)}function gN(e,t){return KM({"~kind":`Generic`},{type:`generic`,parameters:e,expression:t})}function _N(e){return YM(e,`Generic`)}function vN(e){return KM({"~kind":`Any`},{},e)}function yN(e){return YM(e,`Any`)}var bN=`(?!)`;function xN(e){return KM({"~kind":`Never`},{not:{}},e)}function SN(e){return YM(e,`Never`)}function CN(e,t={}){return rN(e,t)}function wN(e){return CN(e)}function TN(e){return XM(e)&&bM(e,`~optional`)}function EN(e){return xM(e).filter(t=>!TN(e[t]))}function DN(e){return xM(e)}function ON(e){return CM(e)}function kN(e,t={}){let n=EN(e);return KM({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}function AN(e){return YM(e,`Object`)}function jN(e){return qM(e,[`~kind`,`type`,`properties`,`required`])}function MN(e){return KM({"~kind":`Unknown`},{},e)}function NN(e){return YM(e,`Unknown`)}function PN(e,t,n){return KM({"~kind":`Cyclic`},{$defs:xM(e).reduce((t,n)=>({...t,[n]:JM(e[n],{},{$id:n})}),{}),$ref:t},n)}function FN(e){return YM(e,`Cyclic`)}function IN(e){return dM(e)&&bM(e,`~unsafe`)&&lM(e[`~unsafe`])}function LN(e){return YM(e,`Infer`)}function RN(e,t,n,r={}){return KM({"~kind":`Dependent`},{if:e,then:t,else:n},r)}function zN(e){return YM(e,`Dependent`)}function BN(e){return qM(e,[`~kind`,`if`,`then`,`else`])}function VN(e){return dM(e)}function HN(e){return xM(e).filter(e=>isNaN(e)).reduce((t,n)=>[...t,e[n]],[])}function UN(e,t){return KM({"~kind":`Enum`},{enum:VN(e)?HN(e):e},t)}function WN(e){return YM(e,`Enum`)}function GN(e,t={}){return KM({"~kind":`Intersect`},{allOf:e},t)}function KN(e){return YM(e,`Intersect`)}function qN(e){return qM(e,[`~kind`,`allOf`])}function JN(){throw Error(`Unreachable`)}var YN;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(YN||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var XN=new Float64Array(1);new DataView(XN.buffer),new Uint8Array(XN.buffer),new TextEncoder;function ZN(e){return XM(e)&&bM(e,`~immutable`)}function QN(e,t={}){return eN(e,t)}function $N(e){return XM(e)&&bM(e,`~readonly`)}var eP=`-?(?:0|[1-9][0-9]*)n`;function tP(e){return KM({"~kind":`BigInt`},{type:`bigint`},e)}function nP(e){return YM(e,`BigInt`)}function rP(e){return YM(e,`Boolean`)}var iP=`-?(?:0|[1-9][0-9]*)`;function aP(e){return KM({"~kind":`Integer`},{type:`integer`},e)}function oP(e){return YM(e,`Integer`)}var sP=class extends Error{constructor(e){super(`Invalid Literal value`),Object.defineProperty(this,"cause",{value:{value:e},writable:!1,configurable:!1,enumerable:!1})}};function cP(e){return sM(e)?`bigint`:cM(e)?`boolean`:uM(e)?`number`:pM(e)?`string`:(()=>{throw new sP(e)})()}function lP(e,t){return KM({"~kind":`Literal`},{type:cP(e),const:e},t)}function uP(e){return sM(e)||cM(e)||uM(e)||pM(e)}function dP(e){return pP(e)&&uM(e.const)}function fP(e){return pP(e)&&pM(e.const)}function pP(e){return YM(e,`Literal`)}function mP(e){return KM({"~kind":`Null`},{type:`null`},e)}function hP(e){return YM(e,`Null`)}var gP=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function _P(e){return KM({"~kind":`Number`},{type:`number`},e)}function vP(e){return YM(e,`Number`)}function yP(e){return KM({"~kind":`Symbol`},{type:`symbol`},e)}function bP(e){return YM(e,`Symbol`)}function xP(e){return KM({"~kind":`String`},{type:`string`},e)}function SP(e){return YM(e,`String`)}function CP(e,t={}){return KM({"~kind":`Union`},{anyOf:e},t)}function wP(e){return YM(e,`Union`)}function TP(e){return qM(e,[`~kind`,`anyOf`])}function EP(e){let t=nL(e);return mM(t.length,2)?t[0]:[]}function DP(e){return!0}function OP(e){return vM(e,(e,t)=>AP(e)?OP(t):!1,()=>!0)}function kP(e){return!mM(e.length,0)&&OP(e)}function AP(e){return wP(e)?kP(e.anyOf):pP(e)?DP(e.const):!1}function jP(e){return kP(e)}function MP(e){return KM({"~kind":`TemplateLiteral`},{type:`string`,pattern:e},{})}function NP(e,t,n=[]){return vM(e,(e,r)=>NP(r,t,[...n,`${e}${t}`]),()=>n)}function PP(e,t){return mM(e.length,0)?[`${t}`]:NP(e,t)}function FP(e,t,n=[]){return vM(t,(t,r)=>FP(e,r,[...n,...IP(e,t)]),()=>n)}function IP(e,t){return wP(t)?FP(e,t.anyOf):pP(t)?PP(e,t.const):JN()}function LP(e,t){return vM(t,(t,n)=>LP(IP(e,t),n),()=>e)}function RP(e){return e.map(e=>lP(e))}function zP(e){return CP(RP(LP([],e)))}function BP(e){return mM(e.length,0)?JN():mM(e.length,1)&&pP(e[0])?e[0]:zP(e)}function VP(e){let t=EP(e);return mM(t.length,0)?xP():jP(t)?BP(t):MP(e)}function HP(e){let t=VP(e);return CL(t)?xP():t}function UP(e,t){return KM({"~kind":`Record`},{type:`object`,patternProperties:{[e]:t}})}function WP(e){return UP(XF,e)}function GP(e){return kN({true:e,false:e})}function KP(e,t={}){let[n,r,i]=[e,e.length,!1];return KM({"~kind":`Tuple`},{type:`array`,additionalItems:i,items:n,minItems:r},t)}function qP(e){return YM(e,`Tuple`)}function JP(e){return qM(e,[`~kind`,`type`,`items`,`minItems`,`additionalItems`])}function YP(e){return qM(e,[`~readonly`])}function XP(e,t){return JM(YP(e),{},t)}function ZP(e,t,n,r){return XP(BU(e,t,n),r)}function QP(e,t={}){return XP(e,t)}function $P(e){return qM(e,[`~optional`])}function eF(e,t){return JM($P(e),{},t)}function tF(e,t,n,r){return eF(BU(e,t,n),r)}function nF(e,t={}){return eF(e,t)}function rF(e){return e.reduceRight((e,t,n)=>({[n]:t,...e}),{})}function iF(e){return kN(rF(e.items))}function aF(e){return AN(e)||qP(e)}function oF(e,t){return $N(e)?!!$N(t):!1}function sF(e,t){return TN(e)?!!TN(t):!1}function cF(e,t){let n=oF(e,t),r=sF(e,t),i=QP(nF(EF([e,t])));return n&&r?QN(CN(i)):n&&!r?QN(i):!n&&r?CN(i):i}function lF(e,t,n){return n in e?n in t?cF(e[n],t[n]):e[n]:n in t?t[n]:xN()}function uF(e,t){return[...new Set([...xM(e),...xM(t)])].reduce((n,r)=>({...n,[r]:lF(e,t,r)}),{})}function dF(e){return AN(e)?e.properties:qP(e)?rF(e.items):{}}function fF(e,t){return kN(uF(dF(e),dF(t)))}function pF(e,t){let n=Dz(e,t);return mM(n,2)?e:mM(n,3)||mM(n,0)?t:xN()}function mF(e,t){let n=aF(e),r=aF(t);return n&&r?fF(e,t):n&&!r?e:!n&&r?t:pF(e,t)}function hF(e,t){return SN(e)||yN(e)?e:NN(e)||SN(t)||yN(t)?t:NN(t)?e:mF(e,t)}function gF(e,t){return wP(e)||wP(t)}function _F(e,t){let n=kF(e),r=kF(t);return gF(n,r)?EF([n,r]):hF(n,r)}function vF(e,t,n=[]){return vM(t,(t,r)=>vF(e,r,[...n,_F(t,e)]),()=>mM(n.length,0)?[e]:n)}function yF(e,t,n=[]){return vM(e,(e,r)=>yF(r,t,[...n,...bF([e],t)]),()=>n)}function bF(e,t=[]){return vM(e,(e,n)=>wP(e)?bF(n,yF(e.anyOf,t)):bF(n,vF(e,t)),()=>t)}function xF(e,t){return AL(Ez({},e,t))?[]:[e]}function SF(e,t,n=[]){return vM(e,(e,r)=>SF(r,t,[...n,...xF(e,t)]),()=>n)}function CF(e,t){let n=kF(e);return OF(SF(wP(n)?n.anyOf:[n],t))}function wF(e,t,n){return OF([EF([e,t]),CF(n,e)])}function TF(e,t=[]){return vM(e,(e,n)=>TF(n,[...t,lP(e)]),()=>OF(t))}function EF(e){return OF(jz(bF(e)))}function DF(e){return kF(HP(e))}function OF(e){return AF(jz(e))}function kF(e){return zN(e)?wF(e.if,e.then,e.else):WN(e)?TF(e.enum):KN(e)?EF(e.allOf):CL(e)?DF(e.pattern):wP(e)?OF(e.anyOf):e}function AF(e){return mM(e.length,1)?e[0]:mM(e.length,0)?xN():CP(e)}function jF(e,t){return GF(TF(e),t)}function MF(e,t){return UP(JF,t)}function NF(e,t){return GF(EF(e),t)}function PF(e,t){return pM(e)||uM(e)?kN({[e]:t}):mM(e,!1)?kN({false:t}):mM(e,!0)?kN({true:t}):kN({})}function FF(e,t){return UP(YF,t)}function IF(e,t){return bM(e,`pattern`)&&(pM(e.pattern)||e.pattern instanceof RegExp)?UP(e.pattern.toString(),t):UP(XF,t)}function LF(e,t){return jP(EP(e))?GF(DF(e),t):UP(e,t)}function RF(e){return wP(e)?zF(e.anyOf):[e]}function zF(e,t=[]){return vM(e,(e,n)=>zF(n,[...t,...RF(e)]),()=>t)}function BF(e){return e.some(e=>SP(e)||vP(e)||oP(e))}function VF(e,t){return mM(BF(e),!0)?UP(XF,t):void 0}function HF(e,t){return e.reduce((e,n)=>pP(n)&&(pM(n.const)||uM(n.const))?{...e,[n.const]:t}:e,{})}function UF(e,t){return kN(HF(e,t))}function WF(e,t){let n=zF(e),r=VF(n,t);return XM(r)?r:UF(n,t)}function GF(e,t){return yN(e)?WP(t):rP(e)?GP(t):WN(e)?jF(e.enum,t):oP(e)?MF(e,t):KN(e)?NF(e.allOf,t):pP(e)?PF(e.const,t):vP(e)?FF(e,t):wP(e)?WF(e.anyOf,t):SP(e)?IF(e,t):CL(e)?LF(e.pattern,t):kN({})}function KF(e,t,n){return NU([e])?JM(GF(e,t),{},n):ZF(e,t,n)}function qF(e,t,n,r,i){return KF(BU(e,t,n),BU(e,t,r),i)}var JF=`^${iP}$`,YF=`^${gP}$`,XF=`^.*$`;function ZF(e,t,n={}){return ZM(`Record`,[e,t],n)}function QF(e,t,n={}){return KF(e,t,n)}function $F(e,t){return UP(e,t)}function eI(e){return mM(e,XF)?xP():mM(e,JF)?aP():mM(e,YF)?_P():VP(e)}function tI(e){return xM(e.patternProperties)[0]}function nI(e){return eI(tI(e))}function rI(e){return e.patternProperties[tI(e)]}function iI(e){return YM(e,`Record`)}function aI(e){return KM({"~kind":`Rest`},{type:`rest`,items:e},{})}function oI(e){return YM(e,`Rest`)}function sI(e){return YM(e,`This`)}function cI(e){return KM({"~kind":`Undefined`},{type:`undefined`},e)}function lI(e){return YM(e,`Undefined`)}function uI(e){return YM(e,`Void`)}function dI(e){return tP()}function fI(e){return xP()}function pI(e){return _P()}function mI(e){return aP()}function hI(e){return xN()}function gI(e){return lP(e)}function _I(e){return e}function vI(e){return CP(e[1])}function yI(e){return e.length===3?[...e[0],...e[2]]:e.length===1?[...e[0]]:[]}function bI(e){return[e[0],...e[1]]}function xI(e){return e}function SI(e){return e[1]}function CI(e){return mM(e.length,2)}function wI(e,t,n){return CI(e)?t(e[0],e[1]):n()}function TI(e,t){return mM(t.indexOf(e),0)?[e,t.slice(e.length)]:[]}function EI(e,t){for(let n=0;nString.fromCharCode(e+n))}var OI=[...DI(97,122),...DI(65,90)],kI=[`0`,...DI(49,57)],AI=`//`,jI=`/*`,MI=`*/`;function NI(e){let t=e.indexOf(MI);return mM(t,-1)?``:e.slice(t+2)}function PI(e){let t=e.indexOf(` +`);return mM(t,-1)?``:e.slice(t)}function FI(e){return e.replace(/^[ \t\r\f\v]+/,``)}function II(e){let t=FI(e);return t.startsWith(jI)?II(NI(t.slice(2))):t.startsWith(AI)?II(PI(t.slice(2))):t}function LI(e){let t=e.trimStart();return t.startsWith(jI)?LI(NI(t.slice(2))):t.startsWith(AI)?LI(PI(t.slice(2))):t}[...kI];function RI(e,t){return EI([e],t)}function zI(e,t){return mM(e,``)?[``,t]:e.startsWith(` +`)?RI(e,II(t)):e.startsWith(` `)?RI(e,t):RI(e,LI(t))}[...OI,...kI],[...kI];function BI(e){return mM(e,``)?[]:[e.slice(0,1),e.slice(1)]}function VI(e,t){return vM(e,(e,n)=>t.startsWith(e)?!0:VI(n,t),()=>!1)}function HI(e,t,n=``){return wI(BI(t),(r,i)=>VI(e,t)?[n,t]:HI(e,i,`${n}${r}`),()=>[])}function UI(e,t){return wI(HI(e,t),(e,t)=>mM(e,``)?[]:[e,t],()=>[])}var WI=(e,t,n=()=>[])=>e.length===2?t(e):n(),GI=e=>WI(zI(`-?(?:0|[1-9][0-9]*)n`,e),([e,t])=>[dI(e),t]),KI=e=>WI(zI(`.*`,e),([e,t])=>[fI(e),t]),qI=e=>WI(zI(`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,e),([e,t])=>[pI(e),t]),JI=e=>WI(zI(`-?(?:0|[1-9][0-9]*)`,e),([e,t])=>[mI(e),t]),YI=e=>WI(zI(`(?!)`,e),([e,t])=>[hI(e),t]),XI=e=>WI(UI([`-?(?:0|[1-9][0-9]*)n`,`.*`,`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`,`-?(?:0|[1-9][0-9]*)`,`(?!)`,`(`,`)`,`$`,`|`],e),([e,t])=>[gI(e),t]),ZI=e=>WI(WI(GI(e),([e,t])=>[e,t],()=>WI(KI(e),([e,t])=>[e,t],()=>WI(qI(e),([e,t])=>[e,t],()=>WI(JI(e),([e,t])=>[e,t],()=>WI(YI(e),([e,t])=>[e,t],()=>WI(QI(e),([e,t])=>[e,t],()=>WI(XI(e),([e,t])=>[e,t],()=>[]))))))),([e,t])=>[_I(e),t]),QI=e=>WI(WI(zI(`(`,e),([e,t])=>WI(tL(t),([t,n])=>WI(zI(`)`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[vI(e),t]),$I=e=>WI(WI(WI(eL(e),([e,t])=>WI(zI(`|`,t),([t,n])=>WI($I(n),([n,r])=>[[e,t,n],r]))),([e,t])=>[e,t],()=>WI(WI(eL(e),([e,t])=>[[e],t]),([e,t])=>[e,t],()=>WI([[],e],([e,t])=>[e,t],()=>[]))),([e,t])=>[yI(e),t]),eL=e=>WI(WI(ZI(e),([e,t])=>WI(tL(t),([t,n])=>[[e,t],n])),([e,t])=>[bI(e),t]),tL=e=>WI(WI($I(e),([e,t])=>[e,t],()=>WI(eL(e),([e,t])=>[e,t],()=>[])),([e,t])=>[xI(e),t]),nL=e=>WI(WI(zI(`^`,e),([e,t])=>WI(tL(t),([t,n])=>WI(zI(`$`,n),([n,r])=>[[e,t,n],r]))),([e,t])=>[SI(e),t]);function rL(e){return e.join(`|`)}function iL(e){return e.slice(1,e.length-1)}function aL(e,t,n){return gL(t,`${n}${e}`)}function oL(e,t){return gL(e,`${t}${eP}`)}function sL(e,t){return gL(e,`${t}${iP}`)}function cL(e,t){return gL(e,`${t}${gP}`)}function lL(e,t){return hL(CP([lP(`false`),lP(`true`)]),e,t)}function uL(e,t){return gL(e,`${t}.*`)}function dL(e,t,n){return gL(t,`${n}${iL(e)}`)}function fL(e,t,n){return hL(yL(e,{}),t,n)}function pL(e,t,n){return hL(TF(e),t,n)}function mL(e,t,n,r=[]){return vM(e,(e,i)=>mL(i,t,n,[...r,hL(e,[],``)]),()=>gL(t,`${n}(${rL(r)})`))}function hL(e,t,n){return WN(e)?pL(e.enum,t,n):oP(e)?sL(t,n):pP(e)?aL(e.const,t,n):nP(e)?oL(t,n):rP(e)?lL(t,n):vP(e)?cL(t,n):SP(e)?uL(t,n):CL(e)?dL(e.pattern,t,n):SL(e)?fL(e.parameters[0],t,n):wP(e)?mL(e.anyOf,t,n):bN}function gL(e,t){return vM(e,(e,n)=>hL(e,n,t),()=>t)}function _L(e){return`^${gL(e,``)}$`}function vL(e){return MP(_L(e))}function yL(e,t){return NU(e)?JM(vL(e),{},t):xL(e,t)}function bL(e,t,n,r){return yL(IU(e,t,n),r)}function xL(e,t={}){return ZM(`TemplateLiteral`,[e],t)}function SL(e){return XM(e)&&bM(e,`action`)&&mM(e.action,`TemplateLiteral`)}function CL(e){return YM(e,`TemplateLiteral`)}function wL(e){return KM({"~kind":`ExtendsUnion`},{inferred:e})}function TL(e){return fM(e)&&bM(e,`~kind`)&&bM(e,`inferred`)&&mM(e[`~kind`],`ExtendsUnion`)&&fM(e.inferred)}function EL(e){return KM({"~kind":`ExtendsTrue`},{inferred:e})}function DL(e){return fM(e)&&bM(e,`~kind`)&&bM(e,`inferred`)&&mM(e[`~kind`],`ExtendsTrue`)&&fM(e.inferred)}function OL(){return KM({"~kind":`ExtendsFalse`},{})}function kL(e){return fM(e)&&bM(e,`~kind`)&&mM(e[`~kind`],`ExtendsFalse`)}function AL(e){return TL(e)||DL(e)}function jL(e,t,n){return AL(e)?t(e.inferred):n()}function ML(e,t,n,r){return jL(XR(e,n,r),r=>EL(jM(jM(e,r),{[t]:n})),()=>OL())}function NL(e,t){return EL(e)}function PL(e,t,n,r,i){return jL(XR(e,t,n),e=>jL(XR(e,t,r),e=>EL(e),()=>OL()),()=>jL(XR(e,t,i),e=>EL(e),()=>OL()))}function FL(e,t,n){return XR(e,t,TF(n))}function IL(e,t,n){return vM(n,(n,r)=>jL(XR(e,t,n),e=>IL(e,t,r),()=>OL()),()=>EL(e))}function LL(e,t,n){return XR(e,t,DF(n))}function RL(e,t,n){return vM(n,(n,r)=>jL(XR(e,t,n),e=>EL(e),()=>RL(e,t,r)),()=>OL())}function zL(e,t,n){return yN(n)?NL(e,t):zN(n)?PL(e,t,n.if,n.then,n.else):WN(n)?FL(e,t,n.enum):LN(n)?ML(e,n.name,t,n.extends):KN(n)?IL(e,t,n.allOf):CL(n)?LL(e,t,n.pattern):wP(n)?RL(e,t,n.anyOf):NN(n)?EL(e):OL()}function BL(e,t,n){return LN(n)?zL(e,t,n):yN(n)||NN(n)?EL(e):wL(e)}function VL(e,t){let n=ZN(e),r=ZN(t);return n&&r||!n&&r?!0:!(n&&!r)}function HL(e,t,n,r){return oN(r)?VL(t,r)?XR(e,n,r.items):OL():zL(e,t,r)}function UL(e,t,n){return nP(n)?EL(e):zL(e,t,n)}function WL(e,t,n){return rP(n)?EL(e):zL(e,t,n)}function GL(e,t,n,r,i){let a=LN(r)?t:r,o=LN(r)?r:t,s=TN(t),c=TN(r);return!s&&c?OL():jL(XR(e,a,o),e=>JL(e,n,i),()=>OL())}function KL(e,t,n,r){return vM(r,(r,i)=>GL(e,t,n,r,i),()=>TN(t)?EL(e):OL())}function qL(e,t,n){return vM(t,(t,r)=>KL(e,t,r,n),()=>EL(e))}function JL(e,t,n){return qL(e,t,n)}function YL(e,t,n){return uI(n)?EL(e):XR(e,t,n)}function XL(e,t,n,r){return yN(r)||NN(r)?EL(e):lN(r)?jL(JL(e,t,r.parameters),e=>YL(e,n,r.instanceType),()=>OL()):OL()}function ZL(e,t,n,r,i){return jL(XR(e,t,i),()=>XR(e,n,i),()=>XR(e,r,i))}function QL(e,t,n){return XR(e,TF(t),n)}function $L(e,t,n,r){return yN(r)||NN(r)?EL(e):fN(r)?jL(JL(e,t,r.parameters),e=>YL(e,n,r.returnType),()=>OL()):OL()}function eR(e,t,n){return oP(n)||vP(n)?EL(e):zL(e,t,n)}function tR(e,t,n){return XR(e,EF(t),n)}function nR(e,t,n){return t===n?EL(e):OL()}function rR(e,t,n){return pP(n)?nR(e,t,n.const):nP(n)?EL(e):zL(e,lP(t),n)}function iR(e,t,n){return pP(n)?nR(e,t,n.const):rP(n)?EL(e):zL(e,lP(t),n)}function aR(e,t,n){return pP(n)?nR(e,t,n.const):vP(n)?EL(e):zL(e,lP(t),n)}function oR(e,t,n){return pP(n)?nR(e,t,n.const):SP(n)?EL(e):zL(e,lP(t),n)}function sR(e,t,n){return sM(t.const)?rR(e,t.const,n):cM(t.const)?iR(e,t.const,n):uM(t.const)?aR(e,t.const,n):pM(t.const)?oR(e,t.const,n):JN()}function cR(e,t,n){return LN(n)?zL(e,t,n):EL(e)}function lR(e,t,n){return hP(n)?EL(e):zL(e,t,n)}function uR(e,t,n){return vP(n)?EL(e):zL(e,t,n)}function dR(e,t,n){return TN(t)?TN(n)?EL(e):OL():EL(e)}function fR(e,t,n){return LN(n)&&SN(n.extends)?OL():jL(XR(e,t,n),e=>dR(e,t,n),()=>OL())}function pR(e,t){return e.reduce((e,n)=>n in t&&AL(t[n])?{...e,...t[n].inferred}:JN(),{})}function mR(e,t,n){let r={};for(let i of xM(n))r[i]=i in t?fR({},t[i],n[i]):TN(n[i])?LN(n[i])?EL(jM(e,{[n[i].name]:n[i].extends})):EL(e):OL();let i=CM(r).every(e=>AL(e)),a=i?pR(xM(r),r):{};return i?EL(a):OL()}function hR(e,t,n){let r=mR(e,t,n);return AL(r)?EL(jM(e,r.inferred)):OL()}function gR(e,t,n){return hR(e,t,n)}function _R(e,t){return xM(t).reduce((n,r)=>({...n,[r]:bM(e,r)?wP(n[r])?CP([...n[r].anyOf,t[r]]):CP([e[r],t[r]]):t[r]}),e)}function vR(e,t,n,r){return vM(t,(t,i)=>jL(XR({},e[t],n),t=>vR(e,i,n,_R(r,t)),()=>OL()),()=>EL(r))}function yR(e,t,n,r){return vR(t,xM(t),r,e)}function bR(e,t,n){return iI(n)?yR(e,t,tI(n),rI(n)):AN(n)?gR(e,t,n.properties):zL(e,kN(t),n)}function xR(e,t){return mM(xM(t).length,0)?EL(e):OL()}function SR(e,t,n,r,i){return XR(e,n,i)}function CR(e,t,n,r){return iI(r)?SR(e,eI(t),n,eI(tI(r)),rI(r)):AN(r)?xR(e,r.properties):yN(r)||NN(r)?EL(e):OL()}function wR(e,t,n){return SP(n)?EL(e):zL(e,t,n)}function TR(e,t,n){return bP(n)?EL(e):zL(e,t,n)}function ER(e,t,n){return XR(e,DF(t),n)}function DR(e,t){return KM({"~kind":`Inferrable`},{name:e,type:t},{})}function OR(e){return fM(e)&&bM(e,`~kind`)&&bM(e,`name`)&&bM(e,`type`)&&mM(e[`~kind`],`Inferrable`)&&pM(e.name)&&fM(e.type)}function kR(e){return oI(e)?LN(e.items)?oN(e.items.extends)?DR(e.items.name,e.items.extends.items):NN(e.items.extends)?DR(e.items.name,e.items.extends):void 0:JN():void 0}function AR(e){return LN(e)?DR(e.name,e.extends):void 0}function jR(e,t,n=[]){return vM(e,(e,r)=>jL(XR({},e,t),()=>jR(r,t,[...n,e]),()=>void 0),()=>n)}function MR(e,t,n,r){let i=jR(n,r);return oM(i)?EL(jM(e,{[t]:KP(i)})):OL()}function NR(e,t,n,r){let i=jR(n,r);return oM(i)?EL(jM(e,{[t]:CP(i)})):OL()}function PR(e){return[...e].reverse()}function FR(e,t){return t?PR(e):e}function IR(e){let t=e.length>0?e[0]:void 0;return XM(XM(t)?kR(t):void 0)}function LR(e,t,n,r,i,a){return jL(XR(e,n,i),e=>BR(e,t,r,a),()=>OL())}function RR(e,t,n,r,i){let a=kR(r);return OR(a)?MR(e,a.name,FR(n,t),a.type):vM(n,(n,a)=>LR(e,t,n,a,r,i),()=>OL())}function zR(e,t,n,r){return vM(r,(r,i)=>RR(e,t,n,r,i),()=>mM(n.length,0)?EL(e):OL())}function BR(e,t,n,r){return zR(e,t,n,r)}function VR(e,t,n){let r=FU(e,MU([],[]),n),i=IR(r);return BR(e,i,FR(t,i),FR(r,i))}function HR(e,t,n){let r=AR(n);return OR(r)?NR(e,r.name,t,r.type):vM(t,(t,r)=>jL(XR(e,t,n),e=>HR(e,r,n),()=>OL()),()=>EL(e))}function UR(e,t,n){let r=FU(e,MU([],[]),t);return qP(n)?VR(e,r,n.items):oN(n)?HR(e,r,n.items):zL(e,KP(r),n)}function WR(e,t,n){return uI(n)||lI(n)?EL(e):zL(e,t,n)}function GR(e,t,n){return vM(n,(n,r)=>jL(XR(e,t,n),e=>EL(e),()=>GR(e,t,r)),()=>OL())}function KR(e,t,n){return vM(t,(t,r)=>jL(GR(e,t,n),e=>KR(e,r,n),()=>OL()),()=>EL(e))}function qR(e,t,n){let r=AR(n);return OR(r)?NR(e,r.name,t,r.type):wP(n)?KR(e,t,n.anyOf):KR(e,t,[n])}function JR(e,t,n){return LN(n)?zL(e,t,n):yN(n)||NN(n)?EL(e):OL()}function YR(e,t,n){return uI(n)?EL(e):zL(e,t,n)}function XR(e,t,n){return yN(t)?BL(e,t,n):oN(t)?HL(e,t,t.items,n):nP(t)?UL(e,t,n):rP(t)?WL(e,t,n):lN(t)?XL(e,t.parameters,t.instanceType,n):zN(t)?ZL(e,t.if,t.then,t.else,n):WN(t)?QL(e,t.enum,n):fN(t)?$L(e,t.parameters,t.returnType,n):oP(t)?eR(e,t,n):KN(t)?tR(e,t.allOf,n):pP(t)?sR(e,t,n):SN(t)?cR(e,t,n):hP(t)?lR(e,t,n):vP(t)?uR(e,t,n):AN(t)?bR(e,t.properties,n):iI(t)?CR(e,tI(t),rI(t),n):SP(t)?wR(e,t,n):bP(t)?TR(e,t,n):CL(t)?ER(e,t.pattern,n):qP(t)?UR(e,t.items,n):lI(t)?WR(e,t,n):wP(t)?qR(e,t.anyOf,n):NN(t)?JR(e,t,n):uI(t)?YR(e,t,n):OL()}function ZR(e,t){return EF([...e,kN(t)])}function QR(e,t,n){return NU(e)?JM(ZR(e,t),{},n):ez(e,t,n)}function $R(e,t,n,r,i){return QR(IU(e,t,n),PU(e,t,r),i)}function ez(e,t,n={}){return ZM(`Interface`,[e,t],n)}function tz(e){return XM(e)&&bM(e,`action`)&&mM(e.action,`Interface`)}function nz(e,t,n){return e.includes(n)?!0:az([...e,n],t,t[n])}function rz(e,t,n){return iz(e,t,ON(n))}function iz(e,t,n){return vM(n,(n,r)=>az(e,t,n)?!0:iz(e,t,r),()=>!1)}function az(e,t,n){return hN(n)?nz(e,t,n.$ref):oN(n)?az(e,t,n.items):lN(n)?iz(e,t,[...n.parameters,n.instanceType]):fN(n)?iz(e,t,[...n.parameters,n.returnType]):tz(n)?rz(e,t,n.parameters[1]):KN(n)?iz(e,t,n.allOf):AN(n)?rz(e,t,n.properties):wP(n)?iz(e,t,n.anyOf):qP(n)?iz(e,t,n.items):iI(n)?az(e,t,rI(n)):!1}function oz(e,t,n){return az(e,t,n)}function sz(e,t){return t.reduce((t,n)=>oz([n],e,e[n])?[...t,n]:t,[])}function cz(e){return sz(e,DN(e))}function lz(e,t,n){return n.includes(t)?n:t in e?fz(e,e[t],[...n,t]):JN()}function uz(e,t,n){return dz(e,ON(t),n)}function dz(e,t,n){return t.reduce((t,n)=>fz(e,n,t),n)}function fz(e,t,n){return hN(t)?lz(e,t.$ref,n):oN(t)?fz(e,t.items,n):lN(t)?dz(e,[...t.parameters,t.instanceType],n):fN(t)?dz(e,[...t.parameters,t.returnType],n):tz(t)?uz(e,t.parameters[1],n):KN(t)?dz(e,t.allOf,n):AN(t)?uz(e,t.properties,n):wP(t)?dz(e,t.anyOf,n):qP(t)?dz(e,t.items,n):iI(t)?fz(e,rI(t),n):n}function pz(e,t,n){return fz(e,n,[t])}function mz(e){return vN()}function hz(e){return xM(e).reduce((t,n)=>({...t,[n]:_z(e[n])}),{})}function gz(e){return e.reduce((e,t)=>[...e,_z(t)],[])}function _z(e){return hN(e)?mz(e.$ref):oN(e)?aN(_z(e.items),sN(e)):lN(e)?cN(gz(e.parameters),_z(e.instanceType)):fN(e)?dN(gz(e.parameters),_z(e.returnType)):KN(e)?GN(gz(e.allOf)):AN(e)?kN(hz(e.properties)):iI(e)?QF(nI(e),_z(rI(e))):wP(e)?CP(gz(e.anyOf)):qP(e)?KP(gz(e.items)):e}function vz(e,t){return t in e?_z(e[t]):MN()}function yz(e){return vz(e.$defs,e.$ref)}function bz(e,t,n){let r=IU(e,MU([],[]),t),i=PU({},MU([],[]),n);return EF([...r,kN(i)])}function xz(e,t){return xM(e).filter(e=>t.includes(e)).reduce((t,n)=>{let r=e[n],i=tz(r)?bz(e,r.parameters[0],r.parameters[1]):r;return{...t,[n]:i}},{})}function Sz(e,t,n){return PN(xz(e,pz(e,t,n)),t)}function Cz(e,t){return t in e?hN(e[t])?Cz(e,e[t].$ref):e[t]:xN()}function wz(e,t){return Cz(e,t)}function Tz(e){return FN(e)?yz(e):IN(e)?MN():e}function Ez(e,t,n){return XR(e,Tz(t),Tz(n))}function Dz(e,t){let n=[Ez({},e,t),Ez({},t,e)];return AL(n[0])&&AL(n[1])?0:AL(n[0])&&kL(n[1])?2:kL(n[0])&&AL(n[1])?3:1}function Oz(e,t,n=[],r=t){return vM(t,(t,i)=>{let a=Dz(e,t);return mM(a,2)||mM(a,0)?r:mM(a,1)?Oz(e,i,[...n,t],r):Oz(e,i,n,r)},()=>[...n,e])}function kz(e,t,n){let r=kF(e);return yN(r)||NN(r)?[r]:SN(r)?Az(t,n):AN(r)?Az(t,[...n,r]):Az(t,Oz(r,n))}function Az(e,t=[]){return vM(e,(e,n)=>kz(e,n,t),()=>t)}function jz(e){return zF(Az(e))}function Mz(e,t){return JM(kF(e),{},t)}function Nz(e,t,n,r){return Mz(BU(e,t,n),r)}function Pz(e,t=[]){return QM(e)&&mM(e.action,`Conditional`)?hN(e.parameters[0])?Pz(e.parameters[2],Pz(e.parameters[3],[...t,e.parameters[0].$ref])):Pz(e.parameters[2],Pz(e.parameters[3],t)):QM(e)&&mM(e.action,`Mapped`)&&QM(e.parameters[1])&&mM(e.parameters[1].action,`KeyOf`)&&hN(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function Fz(e,t){return e.reduce((e,n)=>[...e,t.includes(n.name)],[])}function Iz(e,t,n=[]){return vM(e,(e,r)=>vM(t,(t,i)=>Iz(r,i,[...n,[t,e]]),()=>n),()=>n)}function Lz(e){return CL(e)?DF(e.pattern):WN(e)?TF(e.enum):e}function Rz(e){let t=Lz(e);return wP(t)?[...t.anyOf]:[t]}function zz(e,t){return e.reduce((e,n)=>[...e,[...n,t]],[])}function Bz(e,t){return t.reduce((t,n)=>[...t,...zz(e,n)],[])}function Vz(e){return e.reduce((e,t)=>mM(t[0],!0)?Bz(e,Rz(t[1])):Bz(e,[t[1]]),[[]])}function Hz(e,t,n){let r=Iz(t,Fz(e,Pz(n)));return QM(n)&&mM(n.action,`Conditional`)||QM(n)&&mM(n.action,`Mapped`)?Vz(r):[t]}function Uz(){return[`(not-resolvable)`,xN()]}function Wz(){return[`(not-generic)`,xN()]}function Gz(e,t,n){return[e,gN(t,n)]}function Kz(e,t,n){return t in e?qz(e,t,e[t],n):Uz()}function qz(e,t,n,r){return _N(n)?Gz(t,n.parameters,n.expression):hN(n)?Kz(e,n.$ref,r):Wz()}function Jz(e,t,n){return qz(e,`(anonymous)`,t,n)}function Yz(e,t,n){if(LN(t)||fB(t)||AL(Ez({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function Xz(e,t,n,r,i){let a=BU(e,t,i);return Yz(n,a,r),jM(e,{[n]:a})}function Zz(e,t,n,r,i){let a=BU(e,t,n.extends),o=BU(e,t,n.equals);return vM(i,(i,o)=>Qz(Xz(e,t,n.name,a,i),t,r,o),()=>Qz(Xz(e,t,n.name,a,o),t,r,[]))}function Qz(e,t,n,r){return vM(n,(n,i)=>Zz(e,t,n,i,r),()=>e)}function $z(e,t,n,r){return Qz(e,t,n,r)}var eB=0,tB=0;function nB(){if(!gM(tB,kM().maxInstantiationCount))throw Error(`Type instantiation is excessively deep and possibly infinite`)}function rB(){nB(),tB++,eB++}function iB(){eB--,mM(eB,0)&&(tB=0)}function aB(e){return hM(e.callstack.length,0)?e.callstack[e.callstack.length-1]:``}function oB(e,t){return mM(aB(e),t)}function sB(e,t,n,r,i,a){rB();try{let o=$z(e,t,r,a),s=BU(o,MU([...t.callstack,n.$ref],t.visited),i);return BU(o,MU([],[]),s)}finally{iB()}}function cB(e,t,n,r,i,a){return a.reduce((a,o)=>{let s=sB(e,t,n,r,i,o);return[...a,s]},[])}function lB(e,t,n,r,i,a){let o=cB(e,t,n,r,i,Hz(r,a,i));return mM(o.length,1)?o[0]:OF(o)}function uB(e,t,n,r){let i=IU(e,t,r),a=Jz(e,n,r),o=a[0],s=a[1];return _N(s)?oB(t,o)?dB(mN(o),i):lB(e,t,mN(o),s.parameters,s.expression,i):dB(n,i)}function dB(e,t){return KM({"~kind":`Call`},{type:`call`,target:e,arguments:t},{})}function fB(e){return YM(e,`Call`)}function pB(e){return qM(e,[`~immutable`])}function mB(e,t){return JM(pB(e),{},t)}function hB(e,t,n,r){return mB(BU(e,t,n),r)}function gB(e,t){return e(t)}function _B(e,t){return pM(t)?lP(gB(e,t)):lP(t)}function vB(e,t){return bB(e,DF(t))}function yB(e,t){return CP(t.map(t=>bB(e,t)))}function bB(e,t){return pP(t)?_B(e,t.const):CL(t)?vB(e,t.pattern):wP(t)?yB(e,t.anyOf):t}function xB(e,t={}){return ZM(`Capitalize`,[e],t)}function SB(e,t={}){return ZM(`Lowercase`,[e],t)}function CB(e,t={}){return ZM(`Uncapitalize`,[e],t)}function wB(e,t={}){return ZM(`Uppercase`,[e],t)}var TB=e=>e[0].toUpperCase()+e.slice(1),EB=e=>e.toLowerCase(),DB=e=>e[0].toLowerCase()+e.slice(1),OB=e=>e.toUpperCase();function kB(e,t){return NU([e])?JM(bB(TB,e),{},t):xB(e,t)}function AB(e,t){return NU([e])?JM(bB(EB,e),{},t):SB(e,t)}function jB(e,t){return NU([e])?JM(bB(DB,e),{},t):CB(e,t)}function MB(e,t){return NU([e])?JM(bB(OB,e),{},t):wB(e,t)}function NB(e,t,n,r){return kB(BU(e,t,n),r)}function PB(e,t,n,r){return AB(BU(e,t,n),r)}function FB(e,t,n,r){return jB(BU(e,t,n),r)}function IB(e,t,n,r){return MB(BU(e,t,n),r)}function LB(e,t,n,r,i={}){return ZM(`Conditional`,[e,t,n,r],i)}function RB(e,t,n,r,i,a){let o=Ez(e,n,r);return TL(o)?CP([BU(o.inferred,t,i),BU(e,t,a)]):DL(o)?BU(o.inferred,t,i):BU(e,t,a)}function zB(e,t,n,r,i,a,o){return NU([n,r])?JM(RB(e,t,n,r,i,a),{},o):LB(n,r,i,a,o)}function BB(e,t,n,r,i,a,o){return zB(e,t,BU(e,t,n),BU(e,t,r),i,a,o)}function VB(e,t={}){return ZM(`ConstructorParameters`,[e],t)}function HB(e){let t=lN(e)?e.parameters:[];return KP(FU({},MU([],[]),t))}function UB(e,t){return NU([e])?JM(HB(e),{},t):VB(e,t)}function WB(e,t,n,r){return UB(BU(e,t,n),r)}function GB(e,t,n={}){return ZM(`Exclude`,[e,t],n)}function KB(e,t,n){return NU([e,t])?JM(CF(e,t),{},n):GB(e,t,n)}function qB(e,t,n,r,i){return KB(BU(e,t,n),BU(e,t,r),i)}function JB(e,t,n={}){return ZM(`Extract`,[e,t],n)}function YB(e,t){return AL(Ez({},e,t))?[e]:[]}function XB(e,t,n=[]){return vM(e,(e,r)=>XB(r,t,[...n,...YB(e,t)]),()=>n)}function ZB(e,t){let n=kF(e);return OF(XB(wP(n)?n.anyOf:[n],t))}function QB(e,t,n){return NU([e,t])?JM(ZB(e,t),{},n):JB(e,t,n)}function $B(e,t,n,r,i){return QB(BU(e,t,n),BU(e,t,r),i)}function eV(e,t,n={}){return ZM(`Index`,[e,t],n)}function tV(e,t){return uV(wz(e,t))}function nV(e,t,n){return uV(wF(e,t,n))}function rV(e,t){let n=xM(e).filter(e=>!bM(t,e)),r=xM(t).filter(t=>!bM(e,t)),i=xM(e).filter(e=>bM(t,e)),a=n.reduce((t,n)=>({...t,[n]:e[n]}),{}),o=r.reduce((e,n)=>({...e,[n]:t[n]}),{}),s=i.reduce((n,r)=>({...n,[r]:EF([e[r],t[r]])}),{});return jM(jM(a,o),s)}function iV(e){return e.reduce((e,t)=>rV(e,uV(t)),{})}function aV(e){return e}function oV(e){return uV(iF(KP(e)))}function sV(e,t){return xM(e).filter(e=>e in t).reduce((n,r)=>({...n,[r]:OF([e[r],t[r]])}),{})}function cV(e,t){return vM(e,(e,n)=>cV(n,sV(t,uV(e))),()=>t)}function lV(e){return vM(e,(e,t)=>cV(t,uV(e)),()=>JN())}function uV(e){return FN(e)?tV(e.$defs,e.$ref):zN(e)?nV(e.if,e.then,e.else):KN(e)?iV(e.allOf):wP(e)?lV(e.anyOf):qP(e)?oV(e.items):AN(e)?aV(e.properties):{}}function dV(e){return kN(uV(e))}var fV=RegExp(`^(?:0|[1-9][0-9]*)$`);function pV(e){let t=`${e}`;return fV.test(t)?parseInt(t):e}function mV(e){return lP(pV(e))}function hV(e){return e.map(e=>gV(e))}function gV(e){return KN(e)?GN(hV(e.allOf)):wP(e)?CP(hV(e.anyOf)):pP(e)?mV(e.const):e}function _V(e,t){return AL(Ez({},gV(t),_P()))?e:pP(t)&&mM(t.const,`length`)?_P():xN()}function vV(e,t){return TV(wz(e,t))}function yV(e,t,n){return TV(wF(e,t,n))}function bV(e){return TV(TF(e))}function xV(e){return TV(EF(e))}function SV(e){return[`${e}`]}function CV(e){return TV(DF(e))}function wV(e){return e.reduce((e,t)=>[...e,...TV(t)],[])}function TV(e){return FN(e)?vV(e.$defs,e.$ref):zN(e)?yV(e.if,e.then,e.else):WN(e)?bV(e.enum):KN(e)?xV(e.allOf):pP(e)?SV(e.const):CL(e)?CV(e.pattern):wP(e)?wV(e.anyOf):[]}function EV(e){return TV(e)}function DV(e,t){return t.map(t=>OV(e,t))}function OV(e,t){return oN(t)?aN(OV(e,t.items)):lN(t)?cN(DV(e,t.parameters),OV(e,t.instanceType)):fN(t)?dN(DV(e,t.parameters),OV(e,t.returnType)):qP(t)?KP(DV(e,t.items)):wP(t)?CP(DV(e,t.anyOf)):KN(t)?GN(DV(e,t.allOf)):sI(t)?kN(e):t}function kV(e,t){return OV(e,t)}function AV(e,t){return kV(e,t in e?e[t]:xN())}function jV(e,t){return t.reduce((t,n)=>[...t,AV(e,n)],[])}function MV(e,t){return OF(jV(e,EV(t)))}var NV=new RegExp(JF);function PV(e){return e.filter(e=>NV.test(e))}function FV(e){return OF(jV(e,PV(DN(e))))}function IV(e,t){return vP(t)?FV(e):MV(e,t)}function LV(e){return lP(pV(e))}function RV(e){return e.map(e=>zV(e))}function zV(e){return KN(e)?GN(RV(e.allOf)):wP(e)?CP(RV(e.anyOf)):pP(e)?LV(e.const):e}function BV(e,t){return e.reduceRight((e,n,r)=>AL(Ez({},lP(r),t))?[n,...e]:e,[])}function VV(e,t){return AF(BV(e,zV(t)))}function HV(e){return AF(e)}function UV(e,t){return pP(t)&&mM(t.const,`length`)?lP(e.length):vP(t)||oP(t)?HV(e):VV(e,t)}function WV(e,t){return oN(e)?_V(e.items,t):AN(e)?IV(e.properties,t):qP(e)?UV(e.items,t):xN()}function GV(e){return FN(e)||zN(e)||KN(e)||wP(e)?dV(e):e}function KV(e,t,n){return NU([e,t])?JM(WV(GV(e),t),{},n):eV(e,t,n)}function qV(e,t,n,r,i){return KV(BU(e,t,n),BU(e,t,r),i)}function JV(e,t={}){return ZM(`InstanceType`,[e],t)}function YV(e){return lN(e)?e.instanceType:xN()}function XV(e,t){return NU([e])?JM(YV(e),{},t):JV(e,t)}function ZV(e,t,n,r={}){return XV(BU(e,t,n),r)}function QV(e,t={}){return ZM(`KeyOf`,[e],t)}function $V(){return CP([_P(),xP(),yP()])}function eH(e){return _P()}function tH(e){return e.reduce((e,t)=>uP(t)?[...e,lP(pV(t))]:JN(),[])}function nH(e){return AF(tH(xM(e)))}function rH(e){return nI(e)}function iH(e){return AF(e.map((e,t)=>lP(t)))}function aH(e){return yN(e)?$V():oN(e)?eH(e.items):AN(e)?nH(e.properties):iI(e)?rH(e):qP(e)?iH(e.items):xN()}function oH(e){return FN(e)||zN(e)||KN(e)||wP(e)?dV(e):e}function sH(e,t){return NU([e])?JM(aH(oH(e)),{},t):QV(e,t)}function cH(e,t,n,r){return sH(BU(e,t,n),r)}function lH(e,t,n,r,i={}){return ZM(`Mapped`,[e,t,n,r],i)}function uH(e){return mH(DF(e))}function dH(e){return e.reduce((e,t)=>[...e,...mH(t)],[])}function fH(e){return mH(TF(e))}function pH(e){return uM(e)?[lP(`${e}`)]:[lP(e)]}function mH(e){return WN(e)?fH(e.enum):pP(e)?pH(e.const):CL(e)?uH(e.pattern):wP(e)?dH(e.anyOf):[e]}function hH(e){return mH(e)}function gH(e){return CL(e)?DF(e.pattern):e}function _H(e,t,n,r,i,a){let o=jM(e,{[n.name]:r}),s=gH(BU(o,t,i)),c=BU(o,t,a);return dP(s)||fP(s)?{[s.const]:c}:{}}function vH(e,t,n,r,i,a){return r.reduce((r,o)=>[...r,_H(e,t,n,o,i,a)],[])}function yH(e){return e.reduce((e,t)=>[...e,kN(t)],[])}function bH(e,t,n,r,i,a){return EF(yH(vH(e,t,n,hH(r),i,a)))}function xH(e,t,n,r,i,a,o){return NU([r])?JM(bH(e,t,n,r,i,a),{},o):lH(n,r,i,a,o)}function SH(e,t,n,r,i,a,o){return xH(e,t,n,BU(e,t,r),i,a,o)}function CH(e,t,n){let r=jM(e,t);return xM(t).filter(e=>n.includes(e)).reduce((e,n)=>({...e,[n]:Sz(r,n,t[n])}),{})}function wH(e,t,n){let r=jM(e,t);return xM(t).filter(e=>!n.includes(e)).reduce((e,n)=>({...e,[n]:BU(r,MU([],[]),t[n])}),{})}function TH(e,t,n){let r=cz(t),i=CH(e,t,r),a=wH(e,t,r);return JM({...i,...a},{},n)}function EH(e,t,n,r){return TH(e,n,r)}function DH(e,t={}){return ZM(`NonNullable`,[e],t)}function OH(e){return KB(e,CP([mP(),cI()]),{})}function kH(e,t){return NU([e])?JM(OH(e),{},t):DH(e,t)}function AH(e,t,n,r){return kH(BU(e,t,n),r)}function jH(e,t,n={}){return ZM(`Omit`,[e,t],n)}function MH(e){let t=dV(e);return AN(t)?t.properties:JN()}function NH(e,t){return xM(e).reduce((n,r)=>t.includes(r)?n:{...n,[r]:e[r]},{})}function PH(e,t){return kN(NH(MH(e),EV(t)))}function FH(e,t,n){return NU([e,t])?JM(PH(e,t),{},n):jH(e,t,n)}function IH(e,t,n,r,i){return FH(BU(e,t,n),BU(e,t,r),i)}function LH(e,t={}){return ZM(`Parameters`,[e],t)}function RH(e){let t=fN(e)?e.parameters:[];return KP(FU({},MU([],[]),t))}function zH(e,t){return NU([e])?JM(RH(e),{},t):LH(e,t)}function BH(e,t,n,r){return zH(BU(e,t,n),r)}function VH(e,t={}){return ZM(`Partial`,[e],t)}function HH(e,t={}){return YH(e,t)}function UH(e,t){let n=JH(wz(e,t));return PN(jM(e,{[t]:n}),t)}function WH(e,t,n){return JH(wF(e,t,n))}function GH(e){return JH(EF(e))}function KH(e){return CP(e.map(e=>JH(e)))}function qH(e){return kN(xM(e).reduce((t,n)=>({...t,[n]:CN(e[n])}),{}))}function JH(e){return FN(e)?UH(e.$defs,e.$ref):zN(e)?WH(e.if,e.then,e.else):KN(e)?GH(e.allOf):wP(e)?KH(e.anyOf):AN(e)?qH(e.properties):kN({})}function YH(e,t){return NU([e])?JM(JH(e),{},t):VH(e,t)}function XH(e,t,n,r){return YH(BU(e,t,n),r)}function ZH(e,t,n={}){return ZM(`Pick`,[e,t],n)}function QH(e,t){return xM(e).reduce((n,r)=>t.includes(r)?jM(n,{[r]:e[r]}):n,{})}function $H(e,t){return kN(QH(MH(e),EV(t)))}function eU(e,t,n){return NU([e,t])?JM($H(e,t),{},n):ZH(e,t,n)}function tU(e,t,n,r,i){return eU(BU(e,t,n),BU(e,t,r),i)}function nU(e,t={}){return ZM(`ReadonlyObject`,[e],t)}function rU(e){return WU(aN(e))}function iU(e,t){let n=uU(wz(e,t));return PN(jM(e,{[t]:n}),t)}function aU(e,t,n){return uU(wF(e,t,n))}function oU(e){return uU(EF(e))}function sU(e){return kN(xM(e).reduce((t,n)=>({...t,[n]:QN(e[n])}),{}))}function cU(e){return WU(KP(e))}function lU(e){return CP(e.map(e=>uU(e)))}function uU(e){return oN(e)?rU(e.items):FN(e)?iU(e.$defs,e.$ref):zN(e)?aU(e.if,e.then,e.else):KN(e)?oU(e.allOf):AN(e)?sU(e.properties):qP(e)?cU(e.items):wP(e)?lU(e.anyOf):e}function dU(e,t){return NU([e])?JM(uU(e),{},t):nU(e)}function fU(e,t,n,r){return dU(BU(e,t,n),r)}function pU(e,t,n,r){return t.visited.includes(r)?n:r in e?BU(e,MU(t.callstack,[...t.visited,r]),e[r]):n}function mU(e,t){let n=yU(wz(e,t));return PN(jM(e,{[t]:n}),t)}function hU(e,t,n){return yU(wF(e,t,n))}function gU(e){return yU(EF(e))}function _U(e){return CP(e.map(e=>yU(e)))}function vU(e){return kN(xM(e).reduce((t,n)=>({...t,[n]:nF(e[n])}),{}))}function yU(e){return FN(e)?mU(e.$defs,e.$ref):zN(e)?hU(e.if,e.then,e.else):KN(e)?gU(e.allOf):wP(e)?_U(e.anyOf):AN(e)?vU(e.properties):kN({})}function bU(e,t={}){return ZM(`Required`,[e],t)}function xU(e,t){return NU([e])?JM(yU(e),{},t):bU(e,t)}function SU(e,t,n,r){return xU(BU(e,t,n),r)}function CU(e,t={}){return ZM(`ReturnType`,[e],t)}function wU(e){return fN(e)?e.returnType:xN()}function TU(e,t){return NU([e])?JM(wU(e),{},t):CU(e,t)}function EU(e,t,n,r={}){return TU(BU(e,t,n),r)}function DU(e,t){return ZM(`With`,[e,t],{})}function OU(e,t){return NU([e])?JM(e,{},t):DU(e,t)}function kU(e,t,n,r){return OU(BU(e,t,n),r)}function AU(e){return oI(e)?qP(e.items)?jU(e.items.items):LN(e.items)||hN(e.items)?[e]:[xN()]:[e]}function jU(e){return e.reduce((e,t)=>[...e,...AU(t)],[])}function MU(e,t){return{callstack:e,visited:t}}function NU(e){return vM(e,(e,t)=>!hN(e)&&NU(t),()=>!0)}function PU(e,t,n){return xM(n).reduce((r,i)=>({...r,[i]:BU(e,t,n[i])}),{})}function FU(e,t,n){return jU(IU(e,t,n))}function IU(e,t,n){return n.map(n=>BU(e,t,n))}function LU(e,t){let n=TN(e)?rN(t,{}):t,r=$N(e)?eN(n,{}):n;return ZN(e)?HU(r,{}):r}function RU(e,t,n,r,i){return mM(n,`AddImmutable`)?UU(e,t,r[0],i):mM(n,`RemoveImmutable`)?hB(e,t,r[0],i):mM(n,`AddReadonly`)?tN(e,t,r[0],i):mM(n,`RemoveReadonly`)?ZP(e,t,r[0],i):mM(n,`AddOptional`)?iN(e,t,r[0],i):mM(n,`RemoveOptional`)?tF(e,t,r[0],i):mM(n,`Capitalize`)?NB(e,t,r[0],i):mM(n,`Conditional`)?BB(e,t,r[0],r[1],r[2],r[3],i):mM(n,`ConstructorParameters`)?WB(e,t,r[0],i):mM(n,`Evaluate`)?Nz(e,t,r[0],i):mM(n,`Exclude`)?qB(e,t,r[0],r[1],i):mM(n,`Extract`)?$B(e,t,r[0],r[1],i):mM(n,`Index`)?qV(e,t,r[0],r[1],i):mM(n,`InstanceType`)?ZV(e,t,r[0],i):mM(n,`Interface`)?$R(e,t,r[0],r[1],i):mM(n,`KeyOf`)?cH(e,t,r[0],i):mM(n,`Lowercase`)?PB(e,t,r[0],i):mM(n,`Mapped`)?SH(e,t,r[0],r[1],r[2],r[3],i):mM(n,`Module`)?EH(e,t,r[0],i):mM(n,`NonNullable`)?AH(e,t,r[0],i):mM(n,`Pick`)?tU(e,t,r[0],r[1],i):mM(n,`Parameters`)?BH(e,t,r[0],i):mM(n,`Partial`)?XH(e,t,r[0],i):mM(n,`Omit`)?IH(e,t,r[0],r[1],i):mM(n,`ReadonlyObject`)?fU(e,t,r[0],i):mM(n,`Record`)?qF(e,t,r[0],r[1],i):mM(n,`Required`)?SU(e,t,r[0],i):mM(n,`ReturnType`)?EU(e,t,r[0],i):mM(n,`TemplateLiteral`)?bL(e,t,r[0],i):mM(n,`Uncapitalize`)?FB(e,t,r[0],i):mM(n,`Uppercase`)?IB(e,t,r[0],i):mM(n,`With`)?kU(e,t,r[0],r[1]):ZM(n,r,i)}function zU(e,t,n){return LU(n,hN(n)?pU(e,t,n,n.$ref):oN(n)?aN(BU(e,t,n.items),sN(n)):fB(n)?uB(e,t,n.target,n.arguments):lN(n)?cN(IU(e,t,n.parameters),BU(e,t,n.instanceType),uN(n)):fN(n)?dN(IU(e,t,n.parameters),BU(e,t,n.returnType),pN(n)):zN(n)?RN(BU(e,t,n.if),BU(e,t,n.then),BU(e,t,n.else),BN(n)):KN(n)?GN(IU(e,t,n.allOf),qN(n)):AN(n)?kN(PU(e,t,n.properties),jN(n)):iI(n)?$F(tI(n),BU(e,t,rI(n))):oI(n)?aI(BU(e,t,n.items)):qP(n)?KP(FU(e,t,n.items),JP(n)):wP(n)?CP(IU(e,t,n.anyOf),TP(n)):n)}function BU(e,t,n){return QM(n)?RU(e,t,n.action,n.parameters,n.options):zU(e,t,n)}function VU(e){return JM(e,{"~immutable":!0},{})}function HU(e,t){return JM(VU(e),{},t)}function UU(e,t,n,r){return HU(BU(e,t,n),r)}function WU(e,t={}){return HU(e,t)}var GU=[`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],KU=[`off`,...GU],qU=[`text`,`image`],JU=[`none`,`short`,`long`],YU=[`short`,`long`];UN(GU);var XU=UN(KU);UN(qU),UN(JU),HH(QF(XU,CP([xP(),mP()]))),HH(QF(UN(YU),_P({exclusiveMinimum:0})),{description:`Best-effort prompt cache lifetime in seconds for each retention tier. A missing tier means the lifetime is unknown, so Pi does not warm it.`});var ZU={input:_P({description:`Input cost in USD per million tokens.`}),output:_P({description:`Output cost in USD per million tokens.`}),cacheRead:_P({description:`Cache-read cost in USD per million tokens.`}),cacheWrite:_P({description:`Cache-write cost in USD per million tokens.`})};kN(ZU);var QU=kN({inputTokensAbove:_P({description:`Use this tier when total request input exceeds this token count.`}),...ZU});kN({...ZU,tiers:wN(aN(QU,{description:`Request-wide pricing tiers. The highest matching input threshold applies to the full request.`}))});function $U(e){return kN({maxWidth:wN(aP({minimum:1})),maxHeight:wN(aP({minimum:1})),maxBytes:wN(aP({minimum:1,description:`Maximum base64-encoded payload size in bytes.`})),jpegQuality:wN(aP({minimum:1,maximum:100}))},e)}$U();var eW=kN({resize:wN($U({description:`Cache-safe resize profile applied before a new image enters conversation history.`})),maxPerMessage:wN(aP({minimum:1,description:`Maximum images accepted in one provider message.`})),maxPerRequest:wN(aP({minimum:1,description:`Maximum images accepted across one provider request.`}))});kN({maxRequestBytes:wN(aP({minimum:1,description:`Maximum serialized provider request size in bytes.`})),images:wN(eW)});function tW({sessionId:e,template:t,existingIds:n,apiKey:r,onClose:i,onAdd:a}){let{t:o}=W(),[s,c]=(0,K.useState)([]),[l,u]=(0,K.useState)(new Set),[d,f]=(0,K.useState)(``),[p,m]=(0,K.useState)(!0),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(0),x=(0,K.useRef)({template:t,apiKey:r,existingIds:n}),S=new Set(n),C=Math.max(0,100-S.size),w=s.filter(e=>`${e.id} ${e.name}`.toLowerCase().includes(d.trim().toLowerCase())),T=w.filter(e=>!S.has(e.id)),E=T.length>0&&T.every(e=>l.has(e.id));return(0,K.useEffect)(()=>{let t=new AbortController,{template:n,apiKey:r,existingIds:i}=x.current;return m(!0),v(!1),new de().discoverProviderModels(e,{provider:n.provider,baseUrl:n.baseUrl,api:n.api,...r.trim()?{apiKey:r.trim()}:{}},t.signal).then(e=>{t.signal.aborted||(c(e.models),g(e.truncated),m(!1),u(new Set(e.models.filter(e=>!i.includes(e.id)).slice(0,Math.max(0,100-i.length)).map(e=>e.id))))},()=>{t.signal.aborted||(v(!0),m(!1))}),()=>t.abort()},[e,y]),(0,q.jsx)(Se,{isOpen:!0,width:380,padding:0,className:`models-picker-dialog`,"aria-label":o(`providerPickerTitle`),onOpenChange:e=>!e&&i(),children:(0,q.jsxs)(`div`,{className:`models-picker`,children:[(0,q.jsxs)(`header`,{children:[(0,q.jsx)(`h2`,{children:o(`providerPickerTitle`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon`,"aria-label":o(`close`),onClick:i,children:(0,q.jsx)(je,{})})]}),(0,q.jsx)(`p`,{children:o(`providerPickerIntro`)}),(0,q.jsxs)(`div`,{className:`models-picker-toolbar`,children:[(0,q.jsx)(`input`,{"data-autofocus":!0,type:`search`,"aria-label":o(`providerPickerSearch`),placeholder:o(`providerPickerSearch`),value:d,onKeyDown:e=>{e.key===`Enter`&&e.preventDefault()},onChange:e=>f(e.target.value)}),(0,q.jsx)(`button`,{type:`button`,className:`models-link`,disabled:p||!T.length,onClick:()=>u(e=>{let t=new Set(e);for(let e of T)E?t.delete(e.id):t.size(0,q.jsxs)(`label`,{className:`models-picker-row`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:S.has(e.id)||l.has(e.id),disabled:S.has(e.id)||!l.has(e.id)&&l.size>=C,onChange:t=>u(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}),(0,q.jsx)(`span`,{title:e.name,children:e.id}),S.has(e.id)&&(0,q.jsx)(`small`,{children:o(`providerPickerAdded`)})]},e.id)),!p&&!_&&!w.length&&(0,q.jsx)(`p`,{className:`models-picker-empty`,children:o(d?`providerPickerNoMatch`:`providerPickerEmpty`)}),_&&(0,q.jsxs)(`div`,{className:`models-error`,role:`alert`,children:[(0,q.jsx)(`p`,{children:o(`providerPickerError_load`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:()=>b(e=>e+1),children:o(`retryAdmissionCheck`)})]})]}),h&&(0,q.jsx)(`p`,{className:`models-hint`,children:o(`providerPickerBounded`)}),(0,q.jsxs)(`footer`,{children:[(0,q.jsx)(`span`,{className:`models-hint`,"aria-live":`polite`,children:l.size>0&&o(`providerPickerSelected`,{count:l.size})}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:i,children:o(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:!l.size||p||_,onClick:()=>a(s.filter(e=>l.has(e.id))),children:o(`providerPickerSave`)})]})]})})}function nW(e){let t=e.trim();if(!t)return;let n=/^(\d+(?:\.\d+)?)([km])?$/i.exec(t);if(!n)return NaN;let r=n[2]?.toLowerCase()===`m`?1e6:n[2]?.toLowerCase()===`k`?1e3:1,i=Number(n[1])*r,a=Math.round(i),o=Math.abs(i-a)<1e-6?a:i;return Number.isSafeInteger(o)&&o>0&&o<=1e8?o:NaN}function rW(e){if(e===void 0)return``;if(Number.isInteger(e)&&e>0){if(e%1e6==0)return`${e/1e6}M`;if(e%1e3==0)return`${e/1e3}K`}return String(e)}function iW({sessionId:e,providerId:t,configuration:n,auth:r,isNew:i,custom:a,taken:o,currentModel:s,availableModels:c,busy:l,onDirty:u,onSaving:d,onClose:f,onReload:p}){let{t:m}=W(),[h]=(0,K.useState)(()=>{let e=n.providers?.find(e=>e.provider===t),i=n.models.filter(e=>e.provider===t).map(e=>({...e,rowKey:crypto.randomUUID()}));return{provider:t,name:e?.name||r?.name||t,baseUrl:e?.baseUrl||i[0]?.baseUrl||r?.baseUrl||``,api:e?.api||i[0]?.api||r?.api||`openai-completions`,models:i}}),[g]=(0,K.useState)(n.revision),[_,v]=(0,K.useState)(h),[y,b]=(0,K.useState)(``),x=!i&&!!r?.authMethods.includes(`oauth`),S=a||!!r?.authMethods.includes(`api_key`),[C,w]=(0,K.useState)(x&&(!r?.configured||r?.subscription||!S)?`oauth`:`api_key`),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),k=(0,K.useRef)(null),A=(0,K.useRef)(!1),[j,M]=(0,K.useState)(new Set),[N,P]=(0,K.useState)({}),[F,I]=(0,K.useState)(!1),[ee,L]=(0,K.useState)(null),[R,te]=(0,K.useState)(!1),z=(0,K.useRef)(null),B=(0,K.useRef)({onDirty:u,onSaving:d});B.current={onDirty:u,onSaving:d};let ne=JSON.stringify(_)!==JSON.stringify(h),re=ne||y.length>0;(0,K.useEffect)(()=>{B.current.onDirty(re)},[re]),(0,K.useEffect)(()=>{B.current.onSaving(F||T)},[F,T]),(0,K.useEffect)(()=>{D?A.current=!0:A.current&&(A.current=!1,k.current?.focus({preventScroll:!0}))},[D]),(0,K.useEffect)(()=>()=>{z.current?.abort(),B.current.onSaving(!1),B.current.onDirty(!1)},[]);let V=n.providers?.find(e=>e.provider===t)?.editable!==!1,ie=l||F||T,ae=ie||R||!V,oe=!/^[a-zA-Z0-9._-]+$/.test(_.provider)||[`__proto__`,`constructor`,`prototype`].includes(_.provider)||i&&a&&o.includes(_.provider),se=_.models.findIndex(e=>!e.id.trim()||[e.contextWindow,e.maxTokens].some(e=>e!==void 0&&!Number.isFinite(e))||_.models.some(t=>t.rowKey!==e.rowKey&&t.id.trim()===e.id.trim())),ce=se!==-1,le=i&&a||ne,H=!oe&&!/[\r\n\u0000]/u.test(y)&&(R||!le||(!a||_.models.length>0)&&!ce&&!!_.baseUrl)&&(le||y.trim().length>0),ue=e=>{v(t=>({...t,...e})),ee!==`conflict`&&L(null)},fe=(e,t)=>ue({models:_.models.map((n,r)=>r===e?{...n,...t}:n)}),pe=_.models.map(e=>n.thinkingDefaults?.[`${e.provider}/${e.id}`]),me=_.models.map((e,t)=>{let n=e.thinkingLevelMap??pe[t];return KU.filter(e=>n?.[e]!==null&&(e!==`xhigh`&&e!==`max`||n?.[e]!==void 0))}),he={id:``,name:``,reasoning:!1,provider:_.provider,baseUrl:_.baseUrl,api:_.api},_e=async()=>{if(ie||D||!H||ee===`conflict`)return;let t=new AbortController;z.current=t,I(!0),L(null);let n=R,r=new de;try{if(le&&!n){if(await r.changeProviderConfiguration(e,g,{action:`save`,configuration:{..._,name:_.name.trim()||_.provider,models:_.models.map(({rowKey:e,...t})=>({...t,id:t.id.trim(),name:t.name.trim()||t.id.trim(),provider:_.provider,baseUrl:_.baseUrl===h.baseUrl&&t.baseUrl||_.baseUrl,api:_.api===h.api?t.api:_.api}))}},t.signal),t.signal.aborted)return;n=!0,te(!0)}if(y.trim()&&await r.saveProviderKey(e,_.provider,y.trim(),t.signal),t.signal.aborted)return;b(``),B.current.onDirty(!1),f(_.name||_.provider,_.provider)}catch(e){t.signal.aborted||L(e instanceof ge&&e.code===`MODEL_CONFIGURATION_CONFLICT`?`conflict`:e instanceof ge&&e.code===`MODEL_NOT_AVAILABLE`?`current`:n?`key`:`failed`)}finally{t.signal.aborted||I(!1)}},ve=e=>(0,q.jsxs)(`label`,{className:`models-field`,children:[m(e===`name`?`providerDisplayName`:`modelConfig_${e}`),(0,q.jsx)(`input`,{type:e===`baseUrl`?`url`:`text`,value:_[e],maxLength:e===`baseUrl`?2048:160,autoComplete:`off`,disabled:ae,required:e===`provider`||e===`baseUrl`&&le,"aria-invalid":e===`provider`&&_.provider.length>0&&oe,placeholder:e===`provider`?`my-provider`:e===`name`?_.provider:`https://api.example.com/v1`,onChange:t=>ue({[e]:t.target.value})})]}),ye=(0,q.jsxs)(`label`,{className:`models-field`,htmlFor:`provider-api-${t||`custom`}`,children:[m(`modelConfig_api`),(0,q.jsx)(Tj,{id:`provider-api-${t||`custom`}`,label:m(`modelConfig_api`),value:_.api,disabled:ae,onChange:e=>{(e===`openai-responses`||e===`openai-completions`||e===`anthropic-messages`)&&ue({api:e})},options:[{value:`openai-completions`,label:`OpenAI Chat Completions`},{value:`openai-responses`,label:`OpenAI Responses`},{value:`anthropic-messages`,label:`Anthropic Messages`}]})]}),be=(0,q.jsxs)(`div`,{className:`models-catalog`,children:[(0,q.jsxs)(`div`,{className:`models-list-head`,children:[(0,q.jsx)(`span`,{children:m(`modelSettings`)}),(0,q.jsx)(`button`,{type:`button`,ref:k,className:`models-link`,disabled:ae||oe||!_.baseUrl,onClick:()=>O(!0),children:m(`providerFetchModels`)})]}),!V&&(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerModelsReadOnly`)}),_.models.length===0&&(0,q.jsx)(`p`,{className:`models-empty`,children:m(a?`providerModelsEmpty`:`providerModelsInherited`,{count:c.length})}),(0,q.jsxs)(`div`,{className:`models-entry-list`,children:[s&&(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerCurrentSessionModel`,{model:`${s.provider} / ${s.id}`})}),_.models.map((e,t)=>(0,q.jsxs)(`div`,{className:`models-entry`,children:[s?.provider===_.provider&&s.id===e.id&&(0,q.jsx)(`p`,{className:`models-current-label`,children:m(`currentModel`)}),(0,q.jsxs)(`div`,{className:`models-entry-row`,children:[(0,q.jsx)(`input`,{"aria-label":m(`providerModelId`,{number:t+1}),placeholder:m(`modelConfig_id`),value:e.id,maxLength:256,required:!0,disabled:ae||s?.provider===_.provider&&s.id===e.id,onChange:e=>fe(t,{id:e.target.value})}),(0,q.jsx)(`input`,{"aria-label":m(`providerModelName`,{number:t+1}),placeholder:m(`modelConfig_name`),value:e.name,maxLength:256,disabled:ae,onChange:e=>fe(t,{name:e.target.value})}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon`,"aria-label":m(`providerModelDetails`,{model:e.name||e.id||t+1}),"aria-expanded":j.has(e.rowKey),title:m(`providerModelOptions`),onClick:()=>M(t=>{let n=new Set(t);return n.delete(e.rowKey)||n.add(e.rowKey),n}),children:(0,q.jsx)(os,{})}),(0,q.jsx)(`button`,{type:`button`,className:`models-icon danger`,"aria-label":m(`providerRemoveModel`,{model:e.name||e.id||t+1}),disabled:ae||s?.provider===_.provider&&s.id===e.id,title:s?.provider===_.provider&&s.id===e.id?m(`providerCurrentRemoval`):m(`providerRemoveModel`,{model:e.name||e.id||t+1}),onClick:()=>{ue({models:_.models.filter((e,n)=>n!==t)}),M(t=>new Set([...t].filter(t=>t!==e.rowKey))),P(t=>Object.fromEntries(Object.entries(t).filter(([t])=>t!==e.rowKey)))},children:(0,q.jsx)(Uc,{})})]}),j.has(e.rowKey)&&(0,q.jsxs)(`div`,{className:`models-entry-details`,children:[[`contextWindow`,`maxTokens`].map(n=>(0,q.jsxs)(`label`,{className:`models-field models-capacity`,children:[m(`modelConfig_${n}`),(0,q.jsx)(`input`,{type:`text`,inputMode:`numeric`,autoComplete:`off`,spellCheck:!1,"aria-label":m(`providerCapacityLabel`,{field:m(`modelConfig_${n}`),number:t+1}),"aria-invalid":e[n]!==void 0&&!Number.isFinite(e[n]),placeholder:n===`contextWindow`?`256K`:`32K`,value:N[e.rowKey]?.[n]??rW(e[n]),disabled:ae,onChange:r=>{let i=r.target.value;P(t=>({...t,[e.rowKey]:{...t[e.rowKey],[n]:i}})),fe(t,{[n]:nW(i)})}})]},n)),(0,q.jsxs)(`fieldset`,{className:`models-input-types`,"aria-label":m(`providerCapacityLabel`,{field:m(`providerInputTypes`),number:t+1}),children:[(0,q.jsx)(`legend`,{children:m(`providerInputTypes`)}),(0,q.jsx)(`div`,{children:[`text`,`image`].map(n=>{let r=e.input??[`text`];return(0,q.jsxs)(`label`,{className:`models-checkbox`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:r.includes(n),disabled:ae||r.length===1&&r.includes(n),onChange:e=>fe(t,{input:[`text`,`image`].filter(t=>t===n?e.target.checked:r.includes(t))})}),m(n===`text`?`providerInputText`:`providerInputImage`)]},n)})})]}),(0,q.jsx)(`p`,{className:`models-hint models-capability-hint`,children:m(`providerImageHint`)}),(0,q.jsxs)(`label`,{className:`models-checkbox models-reasoning`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:e.reasoning,disabled:ae,onChange:e=>fe(t,{reasoning:e.target.checked})}),m(`modelConfig_reasoning`)]}),(0,q.jsx)(`p`,{className:`models-hint models-capability-hint`,children:m(`providerReasoningHint`)}),e.reasoning&&(0,q.jsxs)(`div`,{className:`models-thinking-levels`,children:[(0,q.jsxs)(`div`,{className:`models-thinking-copy`,children:[(0,q.jsx)(`strong`,{children:m(`providerThinkingLevels`)}),(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerThinkingLevelsHint`)})]}),(0,q.jsx)(yo,{button:{label:e.thinkingLevelMap==null?m(`providerThinkingAutomatic`):m(`providerThinkingSelected`,{count:me[t].length}),"aria-label":m(`providerCapacityLabel`,{field:m(`providerThinkingLevels`),number:t+1}),variant:`secondary`,size:`sm`,className:`models-thinking-trigger`,isDisabled:ae},className:`configuration-level-menu`,menuWidth:`min(240px, calc(100vw - 32px))`,alignment:`end`,children:KU.map(n=>{let r=me[t],i=r.includes(n);return(0,q.jsx)(Ro,{label:n,value:i,isDisabled:ae||i&&r.length===1,endContent:(0,q.jsx)(`span`,{className:`configuration-check`,children:i&&(0,q.jsx)(rs,{"aria-hidden":`true`})}),onChange:i=>{fe(t,{thinkingLevelMap:Object.fromEntries(KU.map(a=>{let o=a===n?i:r.includes(a),s=h.models.find(t=>t.rowKey===e.rowKey)?.thinkingLevelMap?.[a];return[a,o?e.thinkingLevelMap?.[a]??s??pe[t]?.[a]??(a===`off`?`none`:a):null]}))})}},n)})}),e.thinkingLevelMap!=null&&(0,q.jsx)(`button`,{type:`button`,className:`models-link models-thinking-reset`,disabled:ae,onClick:()=>fe(t,{thinkingLevelMap:null}),children:m(`providerThinkingReset`)})]})]})]},e.rowKey))]}),(0,q.jsxs)(`button`,{type:`button`,className:`models-button models-add-model`,disabled:ae||_.models.length>=100,onClick:()=>{ue({models:[..._.models,{...he,rowKey:crypto.randomUUID()}]})},children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),m(`addModel`)]}),ce&&(0,q.jsx)(`p`,{className:`models-error`,role:`alert`,children:m(`providerModelInvalid`,{number:se+1})})]});return(0,q.jsxs)(`form`,{className:`models-editor`,onSubmit:e=>{e.preventDefault(),_e()},children:[!i&&a&&(0,q.jsxs)(`div`,{className:`models-editor-heading`,children:[(0,q.jsx)(`span`,{children:_.name||_.provider}),_.name!==_.provider&&(0,q.jsx)(`small`,{children:_.provider})]}),i&&a&&(0,q.jsxs)(q.Fragment,{children:[ve(`provider`),_.provider&&oe&&(0,q.jsx)(`p`,{className:`models-error`,children:m(`providerIdInvalid`)}),ve(`name`),ve(`baseUrl`),ye]}),x&&S&&(0,q.jsxs)(`fieldset`,{className:`models-add-modes`,"aria-label":m(`accountLoginMethod`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":C===`oauth`,disabled:ie,onClick:()=>w(`oauth`),children:m(`accountLoginTab`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":C===`api_key`,disabled:ie,onClick:()=>w(`api_key`),children:m(`accountLoginKeyTab`)})]}),x&&C===`oauth`&&r&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(iM,{sessionId:e,auth:r,busy:l||F||re,onSaving:E,onAuthenticated:()=>f(_.name||_.provider,_.provider),onReload:p}),re&&(0,q.jsx)(`p`,{className:`models-hint`,children:m(`accountLoginUnsaved`)})]}),S&&C===`api_key`?(0,q.jsxs)(`label`,{className:`models-field`,children:[m(`providerApiKey`),(0,q.jsx)(`input`,{type:`password`,autoComplete:`new-password`,spellCheck:!1,maxLength:8192,value:y,placeholder:m(r?.configured?`providerKeyKeep`:`providerKeyOptional`),disabled:ie,onChange:e=>{b(e.target.value),ee!==`conflict`&&L(null)}})]}):x?null:(0,q.jsx)(`p`,{className:`models-hint`,children:m(`providerNativeAuth`)}),i&&a?be:(0,q.jsxs)(`details`,{className:`models-customized`,children:[(0,q.jsx)(`summary`,{children:m(`providerCustomSettings`)}),(0,q.jsxs)(`div`,{children:[a&&ve(`name`),ve(`baseUrl`),a&&ye,be]})]}),ee&&(0,q.jsx)(`p`,{className:`models-error`,role:`alert`,children:m(ee===`conflict`?`modelConfigurationConflict`:ee===`key`?`providerProfileSavedKeyFailed`:ee===`current`?`providerCurrentRemoval`:`providerConfigurationFailed`)}),ee===`conflict`&&(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:p,children:m(`providerReload`)}),!T&&(0,q.jsxs)(`div`,{className:`models-editor-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:F,onClick:()=>R?p():f(),children:m(`cancel`)}),(C===`api_key`||ne)&&(0,q.jsx)(`button`,{type:`submit`,className:`models-button primary`,disabled:ie||!H||ee===`conflict`,"aria-busy":F,children:m(F?`savingSettings`:`providerSave`)})]}),D&&(0,q.jsx)(tW,{sessionId:e,template:he,existingIds:_.models.map(e=>e.id),apiKey:y,onClose:()=>O(!1),onAdd:e=>{ue({models:[..._.models,...e.map(e=>({...he,...e,rowKey:crypto.randomUUID()}))]}),O(!1)}})]})}function aW({sessionId:e,sessionPath:t,provider:n,purpose:r,initialModel:i,busy:a,onSelectModel:o,onDefaultSaved:s,onSaving:c,onClose:l}){let{t:u}=W(),[d,f]=(0,K.useState)(``),[p,m]=(0,K.useState)([]),[h,g]=(0,K.useState)(i?`${i.provider}/${i.id}`:``),[_,v]=(0,K.useState)(!0),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(0),[C,w]=(0,K.useState)(0),[T,E]=(0,K.useState)(!1),[D,O]=(0,K.useState)(!1),[k,A]=(0,K.useState)(null);(0,K.useEffect)(()=>{let t=new AbortController;v(!0),b(!1);let r=window.setTimeout(()=>{new de().searchModels(d.trim(),e,t.signal,n).then(e=>{t.signal.aborted||(m(e.models),S(e.truncation.matchesOmitted),v(!1))},()=>{t.signal.aborted||(b(!0),v(!1))})},d?200:0);return()=>{t.abort(),window.clearTimeout(r)}},[e,n,d,C]);let j=p.find(e=>`${e.provider}/${e.id}`===h)??p[0],M=new Map;for(let e of p){let t=M.get(e.provider);t?t.push(e):M.set(e.provider,[e])}let N=async()=>{if(!j||_||D||a||!t)return;O(!0),c(!0),A(null);let n=!1;try{if(r===`use`){if(!await o(`${j.provider}/${j.id}`))throw Error(`selection failed`);n=!0}(r==="default"||T)&&s(await new de().saveModelDefault(j.provider,j.id,e,t)),l()}catch{A(n?`modelDefaultPartial`:r==="default"?`modelDefaultSaveFailed`:`modelConnectionUseFailed`)}finally{O(!1),c(!1)}};return(0,q.jsxs)(`div`,{className:`models-connection-choice`,children:[(0,q.jsx)(`p`,{className:`models-hint`,children:u(r==="default"?`modelDefaultHint`:`modelConnectionNextHint`)}),(p.length>8||x>0||d)&&(0,q.jsx)(`input`,{type:`search`,"aria-label":u(`modelConnectionSearch`),placeholder:u(`modelConnectionSearch`),maxLength:200,value:d,disabled:D,onChange:e=>f(e.target.value)}),y?(0,q.jsxs)(`p`,{className:`models-error`,role:`alert`,children:[u(`modelConnectionLoadFailed`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-link`,onClick:()=>w(e=>e+1),children:u(`retryAdmissionCheck`)})]}):_?(0,q.jsx)(`p`,{className:`models-hint`,role:`status`,children:u(`loadingModels`)}):p.length?(0,q.jsx)(nM,{label:u(`selectModel`),className:`models-provider-picker`,placement:`below`,value:j?`${j.provider}/${j.id}`:``,isDisabled:D,options:[...M].map(([e,t])=>({type:`section`,title:e,options:t.map(e=>({value:`${e.provider}/${e.id}`,label:e.name||e.id,description:`${e.provider} · ${e.id}`,icon:(0,q.jsx)(Yk,{id:e.provider})}))})),onChange:e=>g(e)}):(0,q.jsx)(`p`,{className:`models-hint`,children:u(d?`modelConnectionNoMatch`:`modelConnectionNoModels`)}),x>0&&!_&&(0,q.jsx)(`p`,{className:`models-hint`,children:u(`modelConnectionMore`,{count:x})}),r===`use`&&(0,q.jsxs)(`label`,{className:`models-checkbox`,children:[(0,q.jsx)(`input`,{type:`checkbox`,checked:T,disabled:D,onChange:e=>E(e.target.checked)}),u(`modelMakeDefault`)]}),k&&(0,q.jsx)(`p`,{className:`models-error`,role:`alert`,children:u(k)}),(0,q.jsxs)(`div`,{className:`models-editor-actions`,children:[(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:D,onClick:l,children:u(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button primary`,disabled:D||a||_||y||!j||!t,onClick:()=>void N(),children:u(D?`providerSaving`:r==="default"?`modelDefaultSave`:`modelConnectionUse`)})]})]})}function oW({sessionId:e,sessionPath:t,models:n,currentModel:r,busy:i,focusCredentials:a,onSaved:o,onSelectModel:s,onDraftChange:c,onSavingChange:l}){let{t:u}=W(),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(0),[h,g]=(0,K.useState)(!0),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(null),[x,S]=(0,K.useState)([]),[C,w]=(0,K.useState)(!1),[T,E]=(0,K.useState)(`account`),[D,O]=(0,K.useState)(``),[k,A]=(0,K.useState)(``),[j,M]=(0,K.useState)({}),[N,P]=(0,K.useState)(!1),[F,I]=(0,K.useState)({}),[ee,L]=(0,K.useState)(!1),R=N||ee||Object.values(F).some(Boolean),[te,z]=(0,K.useState)(null),[B,ne]=(0,K.useState)(!1),[re,V]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(null),[oe,se]=(0,K.useState)(null),[ce,le]=(0,K.useState)(null),H=(0,K.useRef)(null),ue=(0,K.useRef)(a),fe=(0,K.useRef)(null),pe=(0,K.useRef)(new Map),me=(0,K.useRef)(null),he=(0,K.useRef)(null),_e=(0,K.useRef)({onDraftChange:c,onSavingChange:l});_e.current={onDraftChange:c,onSavingChange:l},(0,K.useEffect)(()=>{c(Object.values(j).some(Boolean))},[j,c]),(0,K.useEffect)(()=>{l(R)},[R,l]),(0,K.useEffect)(()=>{!re&&!R&&he.current&&(he.current.focus({preventScroll:!0}),he.current=null)},[re,R]),(0,K.useEffect)(()=>{if(!fe.current)return;let e=fe.current;fe.current=null,(pe.current.get(e)??me.current)?.focus({preventScroll:!0})}),(0,K.useEffect)(()=>()=>{H.current?.abort(),_e.current.onDraftChange(!1),_e.current.onSavingChange(!1)},[]),(0,K.useEffect)(()=>{let t=new AbortController;g(!0),v(!1);let n=new de;return Promise.all([n.modelConfigurations(e,t.signal),n.providerAuth(e,t.signal)]).then(([e,n])=>{if(!t.signal.aborted&&(f({configuration:e,auth:n}),g(!1),ue.current)){ue.current=!1;let e=r?.provider||n.providers.find(e=>e.configured)?.id;e&&(b(e),S([e]))}},()=>{t.signal.aborted||(v(!0),g(!1))}),()=>t.abort()},[e,p,r?.provider]),(0,K.useEffect)(()=>{let t=new AbortController;return ne(!1),new de().modelDefaults(e,t.signal).then(e=>{t.signal.aborted||z(e)},()=>{t.signal.aborted||ne(!0)}),()=>t.abort()},[e,p]);let ve=d?.configuration,ye=new Set([...ve?.providers?.map(e=>e.provider)??[],...ve?.models.map(e=>e.provider)??[]]),be=new Set([...ye,...d?.auth.providers.filter(e=>e.configured).map(e=>e.id)??[],...n.map(e=>e.provider),...x.filter(e=>!e.startsWith(`add:`))]),xe=[...be].map(e=>{let t=d?.auth.providers.find(t=>t.id===e);return{id:e,name:ve?.providers?.find(t=>t.provider===e)?.name||t?.name||e,auth:t}}),Se=d?.auth.providers.filter(e=>e.authMethods.includes(`api_key`)&&!be.has(e.id))??[],Ce=d?.auth.providers.filter(e=>e.authMethods.includes(`oauth`)&&!e.subscription)??[],we=Ce.find(e=>e.id===D)??Ce[0],Te=Se.find(e=>e.id===k)??Se[0],Ee=[{id:`account`,label:`accountLoginTab`,hint:`providerAccountHint`,available:Ce.length>0},{id:`catalog`,label:`providerAddCatalog`,hint:`providerCatalogHint`,available:Se.length>0},{id:`custom`,label:`providerAddCustom`,hint:`providerCustomHint`,available:!0}],U=e=>{E(e);let t=e===`custom`?`add:custom`:e===`account`?we&&`add:account:${we.id}`:Te&&`add:${Te.id}`;t&&S(e=>e.includes(t)?e:[...e,t])},De=e=>{he.current=null,V(null),ae(null),w(!1),b(y===e?null:e),S(t=>t.includes(e)?t:[...t,e])},Oe=(e,t,n)=>{he.current=null,fe.current=e;let r=t=>e.startsWith(`add:`)?t.startsWith(`add:`):t===e;S(e=>e.filter(e=>!r(e))),M(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!r(e)))),e.startsWith(`add:`)?w(!1):b(null),t&&(ae(t),V({purpose:`use`,provider:n??e}),m(e=>e+1),o().catch(()=>!1))},ke=(t,a,s,c)=>{if(!ve)return null;let l=d?.auth.providers.find(e=>e.id===a),f=e=>I(n=>n[t]===e?n:{...n,[t]:e}),p=()=>{Oe(t),m(e=>e+1),o().catch(()=>!1)};return t.startsWith(`add:account:`)?l&&(0,q.jsxs)(`div`,{className:`models-editor`,children:[(0,q.jsx)(iM,{sessionId:e,auth:l,busy:i,onSaving:f,onAuthenticated:()=>Oe(t,l.name||l.id,l.id),onReload:p}),!F[t]&&(0,q.jsx)(`div`,{className:`models-editor-actions`,children:(0,q.jsx)(`button`,{type:`button`,className:`models-button`,onClick:()=>Oe(t),children:u(`cancel`)})})]}):(0,q.jsx)(iW,{sessionId:e,providerId:a,configuration:ve,auth:l,isNew:s,custom:c,taken:[...d?.auth.providers.map(e=>e.id)??[],...ye],currentModel:r,availableModels:n.filter(e=>e.provider===a),busy:i,onDirty:e=>M(n=>n[t]===e?n:{...n,[t]:e}),onSaving:f,onClose:(e,n)=>Oe(t,e,n),onReload:p},t)},G=e=>xe.find(t=>t.id===e)?.name??e,je=e=>n.find(t=>t.provider===e.provider&&t.id===e.id)?.name||e.id,Me=(e,t,n)=>{he.current=t,V({purpose:e,provider:n}),b(null),w(!1)},Ne=(n,a)=>(0,q.jsx)(aW,{sessionId:e,sessionPath:t,provider:a,purpose:n,initialModel:n==="default"?te?.model:r,busy:i,onSelectModel:s,onDefaultSaved:e=>{z(e),ne(!1),o().catch(()=>!1)},onSaving:L,onClose:()=>{V(null)}},`${n}:${a??`all`}`);return(0,q.jsxs)(`div`,{className:`settings-content-page models-page`,children:[(0,q.jsxs)(`div`,{className:`models-section`,children:[(0,q.jsx)(`header`,{className:`settings-page-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:u(`modelSettings`)}),(0,q.jsx)(`p`,{children:u(`modelsIntro`)})]})}),ie&&(0,q.jsxs)(`p`,{className:`models-saved`,role:`status`,children:[u(`providerSaved`,{provider:ie}),r&&(0,q.jsxs)(`span`,{children:[` `,u(`providerCurrentSessionModel`,{model:`${r.provider} / ${r.id}`})]})]}),_&&(0,q.jsxs)(`div`,{className:`models-error`,role:`alert`,children:[u(`providerLoadFailed`),` `,(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:h,onClick:()=>m(e=>e+1),children:u(`retryAdmissionCheck`)})]}),ce&&!oe&&(0,q.jsxs)(`div`,{className:`models-error`,role:`alert`,children:[ce,` `,(0,q.jsx)(`button`,{type:`button`,className:`models-button`,disabled:h,onClick:()=>{le(null),m(e=>e+1)},children:u(`refreshStatus`)})]}),!d&&h&&(0,q.jsx)(`p`,{className:`models-hint`,role:`status`,children:u(`providerLoading`)}),(0,q.jsxs)(`div`,{className:`models-default-card`,children:[(0,q.jsxs)(`div`,{className:`models-default-row`,children:[(0,q.jsxs)(`div`,{className:`models-default-copy`,children:[(0,q.jsx)(`span`,{className:`models-default-title`,children:u(`modelDefaultTitle`)}),B?(0,q.jsx)(`span`,{className:`models-hint`,children:u(`modelDefaultReadFailed`)}):te?.model?(0,q.jsxs)(`span`,{className:`models-default-value`,children:[(0,q.jsx)(`span`,{className:`models-default-avatar`,"aria-hidden":`true`,children:(0,q.jsx)(Yk,{id:te.model.provider,modelId:te.model.id})}),(0,q.jsxs)(`span`,{children:[je(te.model),(0,q.jsx)(`small`,{children:G(te.model.provider)})]})]}):(0,q.jsx)(`span`,{className:`models-hint`,children:u(te?`modelDefaultNotSet`:`loadingModels`)})]}),(0,q.jsxs)(`button`,{type:`button`,className:`models-button primary models-default-choose`,disabled:R||i||Object.values(j).some(Boolean)||!t,"aria-expanded":re?.purpose==="default",onClick:e=>B?m(e=>e+1):re?.purpose==="default"?V(null):Me(`default`,e.currentTarget),children:[(0,q.jsx)(`span`,{children:u(B?`refreshStatus`:`modelDefaultChoose`)}),!B&&(0,q.jsx)(os,{"aria-hidden":`true`})]})]}),te?.projectOverride&&(0,q.jsx)(`p`,{className:`models-hint`,children:u(`modelDefaultProjectOverride`,{model:`${G(te.projectOverride.provider)} / ${je(te.projectOverride)}`})}),re?.purpose==="default"&&Ne(`default`)]}),(0,q.jsxs)(`div`,{className:`models-connections-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:u(`modelConnectionsTitle`)}),(0,q.jsx)(`p`,{children:u(`modelConnectionsIntro`)})]}),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:xe.length})]}),(0,q.jsx)(`ul`,{className:`models-provider-list`,children:xe.map(e=>{let n=!C&&y===e.id,a=e.auth?.custom??ye.has(e.id);return(0,q.jsxs)(`li`,{className:`models-provider-card`,children:[(0,q.jsxs)(`div`,{className:`models-provider-head`,children:[(0,q.jsxs)(`div`,{className:`models-provider-identity`,children:[(0,q.jsx)(`span`,{className:`models-provider-avatar`,"aria-hidden":`true`,children:(0,q.jsx)(Yk,{id:e.id})}),(0,q.jsxs)(`div`,{className:`models-provider-label`,children:[(0,q.jsx)(`span`,{className:`models-provider-name`,children:e.name}),a&&(0,q.jsx)(`span`,{className:`models-provider-tag`,children:u(`providerCustomTag`)}),te?.model?.provider===e.id&&(0,q.jsx)(`span`,{className:`models-provider-tag is-default`,children:u(`modelDefaultBadge`)}),r?.provider===e.id&&(0,q.jsx)(`span`,{className:`models-provider-tag is-current`,children:u(`modelCurrentBadge`)}),e.auth&&(0,q.jsxs)(`span`,{className:`models-provider-status`,children:[(0,q.jsx)(`span`,{className:`models-credential-dot ${e.auth.configured?`configured`:`missing`}`,role:`img`,"aria-label":u(e.auth.configured?`credentialConfigured`:`credentialMissing`),title:u(e.auth.configured?`credentialConfigured`:`credentialMissing`)}),u(e.auth.subscription?`accountLoginConfigured`:e.auth.configured?`credentialConfigured`:`credentialMissing`)]})]})]}),(0,q.jsxs)(`div`,{className:`models-provider-actions`,children:[e.auth?.configured&&(0,q.jsx)(`button`,{type:`button`,className:`models-button models-select-connection`,disabled:R||i||Object.values(j).some(Boolean)||!t,"aria-label":u(`modelConnectionChooseProvider`,{provider:e.name}),"aria-expanded":re?.purpose===`use`&&re.provider===e.id,onClick:t=>re?.purpose===`use`&&re.provider===e.id?V(null):Me(`use`,t.currentTarget,e.id),children:u(`selectModel`)}),(0,q.jsx)(`button`,{type:`button`,className:`models-button`,"aria-label":u(`editProvider`,{provider:e.name}),ref:t=>{t?pe.current.set(e.id,t):pe.current.delete(e.id)},"aria-expanded":n,disabled:R,onClick:()=>De(e.id),children:u(e.auth?.authMethods.includes(`oauth`)&&!e.auth.configured?`accountLoginStart`:`providerEdit`)}),ye.has(e.id)&&(0,q.jsx)(`button`,{type:`button`,className:`models-button danger`,"aria-label":u(`removeProvider`,{provider:e.name}),disabled:R||i||r?.provider===e.id,title:r?.provider===e.id?u(`providerCurrentRemoval`):void 0,onClick:()=>{se(e.id),le(null)},children:u(`providerRemove`)})]})]}),re?.purpose===`use`&&re.provider===e.id&&Ne(`use`,e.id),x.includes(e.id)&&(0,q.jsx)(`div`,{hidden:!n,children:ke(e.id,e.id,!1,a)})]},e.id)})}),ve&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{hidden:!C,className:`models-add-card`,children:[(0,q.jsx)(`fieldset`,{className:`models-add-modes`,"aria-label":u(`providerAddMode`),onKeyDown:e=>{if(R||![`ArrowLeft`,`ArrowRight`,`Home`,`End`].includes(e.key))return;e.preventDefault();let t=Ee.filter(e=>e.available),n=t.findIndex(e=>e.id===T),r=t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowRight`?1:-1)+t.length)%t.length].id;U(r),e.currentTarget.querySelectorAll(`button`)[Ee.findIndex(e=>e.id===r)]?.focus()},children:Ee.map(e=>(0,q.jsx)(`button`,{type:`button`,"aria-pressed":T===e.id,disabled:R||!e.available,onClick:()=>U(e.id),children:u(e.label)},e.id))}),(0,q.jsx)(`p`,{className:`models-hint`,children:u(Ee.find(e=>e.id===T)?.hint??`providerCustomHint`)}),(0,q.jsxs)(`div`,{hidden:T!==`account`,children:[we&&(0,q.jsx)(`div`,{className:`models-provider-select`,children:(0,q.jsx)(nM,{label:u(`provider`),className:`models-provider-picker`,options:Ce.map(e=>({value:e.id,label:e.name||e.id,icon:(0,q.jsx)(Yk,{id:e.id})})),value:we.id,isDisabled:R,placement:`below`,onChange:e=>{O(e);let t=`add:account:${e}`;S(e=>e.includes(t)?e:[...e,t])}})}),x.filter(e=>e.startsWith(`add:account:`)).map(e=>(0,q.jsx)(`div`,{hidden:e!==`add:account:${we?.id}`,children:ke(e,e.slice(12),!0,!1)},e))]}),(0,q.jsxs)(`div`,{hidden:T!==`catalog`,children:[Te&&(0,q.jsx)(`div`,{className:`models-provider-select`,children:(0,q.jsx)(nM,{label:u(`provider`),className:`models-provider-picker`,options:Se.map(e=>({value:e.id,label:e.name||e.id,icon:(0,q.jsx)(Yk,{id:e.id})})),value:Te.id,isDisabled:R,placement:`below`,onChange:e=>{A(e);let t=`add:${e}`;S(e=>e.includes(t)?e:[...e,t])}})}),x.filter(e=>e.startsWith(`add:`)&&e!==`add:custom`&&!e.startsWith(`add:account:`)).map(e=>(0,q.jsx)(`div`,{hidden:e!==`add:${Te?.id}`,children:ke(e,e.slice(4),!0,!1)},e))]}),x.includes(`add:custom`)&&(0,q.jsx)(`div`,{hidden:T!==`custom`,children:ke(`add:custom`,``,!0,!0)})]}),!C&&(0,q.jsxs)(`button`,{type:`button`,className:`models-add-button`,ref:me,disabled:R,onClick:()=>{he.current=null,V(null),w(!0),b(null),ae(null),U(Ee.find(e=>e.id===T)?.available?T:Ee.find(e=>e.available).id)},children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),u(`providerAdd`)]})]}),i&&(0,q.jsx)(`p`,{className:`models-hint`,role:`status`,children:u(`modelSelectionBusy`)})]}),oe&&(0,q.jsx)(uj,{isOpen:!0,title:u(`removeProvider`,{provider:xe.find(e=>e.id===oe)?.name||oe}),description:ce||u(`providerRemoveDetail`),isActionLoading:R,cancelLabel:u(`cancel`),actionLabel:u(R?`savingSettings`:`providerRemove`),onOpenChange:e=>{!e&&!R&&se(null)},onAction:()=>{if(R||i||!ve)return;let t=new AbortController;H.current=t,P(!0),le(null),new de().changeProviderConfiguration(e,ve.revision,{action:`remove`,provider:oe},t.signal).then(()=>{t.signal.aborted||(Oe(oe),se(null),m(e=>e+1),o().catch(()=>!1))},e=>{t.signal.aborted||le(u(e instanceof ge&&e.code===`MODEL_CONFIGURATION_CONFLICT`?`modelConfigurationConflict`:`providerConfigurationFailed`))}).finally(()=>{t.signal.aborted||P(!1)})}})]})}function sW(){let e={version:`1.1.0`,id:`55f1dad34a744f33e0bc00f0e88a1b082c0b642f2bbe360dcde22ef9071c7826`,mode:`production`},{t}=W(),[n,r]=(0,K.useState)(null),[i,a]=(0,K.useState)(`loading`),[o,s]=(0,K.useState)(0);(0,K.useEffect)(()=>{let e=new AbortController,t=new de;return a(`loading`),r(null),t.request(`/api/diagnostics`,{signal:e.signal}).then(t=>{e.signal.aborted||(r(t.openpi??null),a(`ready`))},()=>{e.signal.aborted||a(`error`)}),()=>e.abort()},[o]);let c=t(`notReported`),l=e?.id&&n?.frontendAtStartup?.id&&e.id!==n.frontendAtStartup.id;return(0,q.jsxs)(`section`,{className:`settings-section-block`,"aria-label":t(`runtimeIdentity`),children:[(0,q.jsx)(`h2`,{children:t(`runtimeIdentity`)}),(0,q.jsx)(`p`,{children:t(`runtimeIdentityHint`)}),i===`loading`&&(0,q.jsx)(`p`,{role:`status`,children:t(`settingsCatalogLoading`)}),i===`error`&&(0,q.jsx)(`p`,{role:`alert`,children:t(`runtimeIdentityFailed`)}),(0,q.jsxs)(`dl`,{className:`settings-summary-list runtime-identity-list`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeBackendVersion`)}),(0,q.jsx)(`dd`,{children:n?.version??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimePackageRoot`)}),(0,q.jsx)(`dd`,{children:n?.packageRoot??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeStartedAt`)}),(0,q.jsx)(`dd`,{children:n?new Date(n.startedAt).toLocaleString():c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeGitRevision`)}),(0,q.jsx)(`dd`,{children:n?.git?.revision??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeGitState`)}),(0,q.jsx)(`dd`,{children:n?.git?.dirty==null?c:t(n.git.dirty?`runtimeGitDirty`:`runtimeGitClean`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeFrontendVersion`)}),(0,q.jsx)(`dd`,{children:e?.version??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeFrontendBuild`)}),(0,q.jsx)(`dd`,{children:e?.mode===`development`?t(`runtimeDevelopmentBuild`):e?.id??c})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`runtimeStartupBuild`)}),(0,q.jsx)(`dd`,{children:n?.frontendAtStartup?.id??c})]})]}),l&&(0,q.jsx)(`p`,{role:`status`,children:t(`runtimeBuildMismatch`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>s(e=>e+1),disabled:i===`loading`,children:t(`refreshStatus`)})]})}var cW=20,lW={track:{kVAEAm:`x10l6tqk`,kWkggS:`xdsb6cv`,kaIpWk:`xjspbzw`,$$css:!0},trackHorizontal:{kLqNvP:`x1o0tod`,kt4wiu:`xtijo5x`,kZKoxP:`xqu0tyb`,k87sOh:`xwa60dl`,k3aq6I:`x1cb1t30`,$$css:!0},trackVertical:{k87sOh:`x13vifvy`,krVfgx:`x1ey2m1c`,kzqmXN:`x51ohtg`,$$css:!0},filledTrack:{kVAEAm:`x10l6tqk`,kWkggS:`x1ewilqj`,kaIpWk:`xjspbzw`,$$css:!0},filledTrackHorizontal:{kZKoxP:`xqu0tyb`,k87sOh:`xwa60dl`,k3aq6I:`x1cb1t30`,$$css:!0},filledTrackVertical:{kzqmXN:`x51ohtg`,$$css:!0},thumb:{kVAEAm:`x10l6tqk`,kzqmXN:`xw4jnvo`,kZKoxP:`x1qx5ct2`,kaIpWk:`xjspbzw`,kWkggS:`x1ewilqj`,k3aq6I:`x11lhmoz`,k1ekBW:`x106061f`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,kI3sdo:`x1a2a7pz`,kkrTdU:`x1jm3nie x16khyan`,kY2c9j:`x1vjfegm`,$$css:!0},thumbHorizontal:{k87sOh:`xwa60dl`,k3aq6I:`x11lhmoz xoffwj3`,$$css:!0},thumbHover:{kWkggS:`x1ewilqj xvxo0qp`,$$css:!0},thumbDisabled:{kWkggS:`xwmxj5m`,kkrTdU:`xt0e3qv`,$$css:!0}};function uW(e,t,n){return Math.min(Math.max(e,t),n)}function dW(e){if(Math.abs(e)<1){let t=e.toExponential().split(`e-`);if(t.length===2)return(t[0].split(`.`)[1]?.length??0)+parseInt(t[1],10)}let t=String(e).split(`.`)[1];return t?t.length:0}function fW(e,t,n){if(n<=0)return e;let r=t+Math.round((e-t)/n)*n,i=Math.min(Math.max(dW(t),dW(n)),20);return Number(r.toFixed(i))}function pW(e,t,n){return n===t?0:(e-t)/(n-t)*100}var mW=cW/2;function hW(e){return vW(e,mW-e/100*cW)}function gW(e,t){let n=t-e;return vW(n,-(n/100)*cW)}function _W(e,t){let n=t-cW;return n>0?(e-mW)/n:t>0?e/t:0}function vW(e,t){let n=e=>Number(e.toFixed(3));return`calc(${n(e)}% ${t<0?`-`:`+`} ${Math.abs(n(t))}px)`}function yW({ref:e,...t}){let{label:n,isLabelHidden:r=!1,description:i,isDisabled:a=!1,disabledMessage:o,isOptional:s=!1,isRequired:c=!1,status:l,labelTooltip:u,min:d=0,max:f=100,step:p=1,orientation:m=`horizontal`,formatValue:h,htmlName:g,valueDisplay:_=`tooltip`,marks:v,width:y,xstyle:b,className:x,style:S,"data-testid":C,value:T,onChange:E,onChangeEnd:k}=t,A=Array.isArray(T),j=A&&`minStepsBetweenThumbs`in t?t.minStepsBetweenThumbs??0:0,M=m===`horizontal`,P=(0,K.useId)(),I=(0,K.useId)(),ee=(0,K.useId)(),L=(0,K.useId)(),R=(0,K.useId)(),te=(0,K.useRef)(null),z=(0,K.useRef)(null),[B,ne]=(0,K.useState)(null),[re,ie]=(0,K.useState)(null);(0,K.useEffect)(()=>{D()},[]);let ae=(0,K.useCallback)((e,t)=>{ie(!a&&N()===`keyboard`?e:null)},[a]),oe=(0,K.useCallback)(e=>{ie(null)},[]),se=a&&!!o,ce=F({placement:`above`,focusTrigger:`always`,isEnabled:se}),le=c&&!s,ue=[];i&&ue.push(ee),l?.message&&ue.push(L),le&&ue.push(R),se&&ue.push(ce.describedBy);let de=ue.length>0?ue.join(` `):void 0,pe=(0,K.useMemo)(()=>(Array.isArray(T)?T:[T??d]).map(e=>uW(e,d,f)),[T,d,f]),me=(0,K.useRef)(pe);me.current=pe;let he=(0,K.useCallback)((e,t)=>{let n=te.current;if(!n)return d;let r=n.getBoundingClientRect(),i;return i=M?_W(Ya(n)?r.right-e:e-r.left,r.width):1-_W(t-r.top,r.height),i=uW(i,0,1),uW(fW(d+i*(f-d),d,p),d,f)},[d,f,p,M]),ge=(0,K.useCallback)(e=>{if(!A)return 0;let[t,n]=pe;return Math.abs(e-t)<=Math.abs(e-n)?0:1},[A,pe]),_e=(0,K.useCallback)((e,t)=>{if(a)return;let n=uW(fW(t,d,p),d,f);if(A){let t=[...pe];t[e]=n;let r=j*p;e===0?t[0]=Math.min(t[0],t[1]-r):t[1]=Math.max(t[1],t[0]+r),t[0]=uW(t[0],d,f),t[1]=uW(t[1],d,f),E?.(t)}else E?.(n)},[a,A,pe,d,f,p,j,E]),ve=(0,K.useRef)(k);ve.current=k;let ye=(0,K.useCallback)(e=>{let t=e??me.current,n=ve.current;A?n?.(t):n?.(t[0])},[A]),be=(0,K.useCallback)(e=>{if(a)return;e.preventDefault();let t=e.target.closest(`[data-mark-value]`),n=t?Number(t.dataset.markValue):he(e.clientX,e.clientY),r=ge(n);z.current=r,ne(r),_e(r,n);let i=te.current;i&&i.querySelectorAll(`[role="slider"]`)[r]?.focus(),ie(null),typeof e.currentTarget.setPointerCapture==`function`&&e.currentTarget.setPointerCapture(e.pointerId)},[a,he,ge,_e]),xe=(0,K.useCallback)(e=>{if(z.current===null||a)return;let t=he(e.clientX,e.clientY);_e(z.current,t)},[a,he,_e]),Se=(0,K.useCallback)(e=>{z.current!==null&&(z.current=null,ne(null),ye())},[ye]),Ce=(0,K.useCallback)((e,t)=>{if(a)return;N()===`keyboard`&&ie(e);let n=pe[e],r;switch(t.key){case`ArrowRight`:case`ArrowUp`:r=n+p;break;case`ArrowLeft`:case`ArrowDown`:r=n-p;break;case`PageUp`:r=n+p*10;break;case`PageDown`:r=n-p*10;break;case`Home`:r=d;break;case`End`:r=f;break;default:return}t.preventDefault();let i=uW(fW(r,d,p),d,f);if(_e(e,r),A){let t=[...pe];t[e]=i;let n=j*p;e===0?t[0]=Math.min(t[0],t[1]-n):t[1]=Math.max(t[1],t[0]+n),t[0]=uW(t[0],d,f),t[1]=uW(t[1],d,f),ye(t)}else ye([i])},[a,A,pe,p,d,f,j,_e,ye]),Te=e=>h?h(e):String(e),Ee=e=>{let t=pe[e],n=pW(t,d,f),r=M?{insetInlineStart:hW(n)}:{bottom:hW(n),left:`50%`},i=A?e===0?`Minimum value`:`Maximum value`:void 0,o=j*p,s=A&&e===1?uW(pe[0]+o,d,f):d,c=A&&e===0?uW(pe[1]-o,d,f):f,u=_===`tooltip`&&!se,g=M?`above`:`start`,v=(0,q.jsx)(`div`,{id:A?void 0:P,role:`slider`,tabIndex:a&&!se?-1:0,"aria-valuemin":s,"aria-valuemax":c,"aria-valuenow":t,"aria-valuetext":h?h(t):void 0,"aria-orientation":m,"aria-disabled":a||void 0,"aria-invalid":l?.type===`error`||void 0,"aria-label":i,"aria-labelledby":A?void 0:I,"aria-describedby":de,onKeyDown:t=>Ce(e,t),onFocus:t=>ae(e,t),onBlur:oe,...H(O(`slider-thumb`,{orientation:m,disabled:a?`disabled`:null}),w(lW.thumb,M?lW.thumbHorizontal:Et.centerInline(`50%`),!a&&lW.thumbHover,!a&&re===e&&fe.focusVisible,a&&lW.thumbDisabled),void 0,r)},e);return u?(0,q.jsx)(V,{content:Te(t),placement:g,delay:0,focusTrigger:`always`,isOpen:B===e||void 0,children:v},e):v},U=(()=>{if(A){let[e,t]=pe,n=pW(e,d,f),r=pW(t,d,f);return M?{insetInlineStart:hW(n),width:gW(n,r)}:{bottom:hW(n),height:gW(n,r)}}let e=pW(pe[0],d,f);return M?{insetInlineStart:`0%`,width:hW(e)}:{bottom:`0%`,height:hW(e)}})(),De=_===`text`?(0,q.jsx)(`span`,{className:`x9ynric xcr08ib x1tgivj0 xuxw1ft x2lah0s`,children:A?`${Te(pe[0])} – ${Te(pe[1])}`:Te(pe[0])}):null;return(0,q.jsxs)(zO,{"data-testid":C,label:n,isLabelHidden:r,description:i,inputID:P,labelID:I,isGroupLabel:!0,descriptionID:i?ee:void 0,isOptional:s,isRequired:c,isDisabled:a,status:l?{type:l.type,message:l.message,messageID:l.message?L:void 0}:void 0,labelTooltip:u,statusVariant:`detached`,width:y,xstyle:b,className:x,style:S,children:[(0,q.jsxs)(`div`,{...H(O(`slider`,{orientation:m,disabled:a?`disabled`:null}),{className:`x78zum5 x6s0dn4 x1txdalj`}),children:[g!=null&&pe.map((e,t)=>(0,q.jsx)(`input`,{type:`hidden`,name:g,value:String(e),disabled:a},t===0?`start`:`end`)),(0,q.jsxs)(`div`,{ref:we(e,te,ce.ref),...A?{role:`group`,"aria-labelledby":I}:void 0,onPointerDown:be,onPointerMove:xe,onPointerUp:Se,onPointerCancel:Se,...{0:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 xw4jnvo x1ymw6g xkagaj0 xdt5ytf xl56j7k x1ypdohk x16khyan`},2:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 x1qx5ct2 x80b3aj xh8yej3 x1ypdohk x16khyan`},1:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 xw4jnvo x1ymw6g xkagaj0 xdt5ytf xl56j7k xbyyjgo xt0e3qv`},3:{className:`x1n2onr6 x78zum5 x6s0dn4 x1iyjqo2 x5ve5x3 x87ps6o xc8icb0 x1qx5ct2 x80b3aj xh8yej3 xbyyjgo xt0e3qv`}}[!!M<<1|!!a<<0],children:[(0,q.jsx)(`div`,{"aria-hidden":`true`,...H(O(`slider-track`,{orientation:m}),w(lW.track,M?lW.trackHorizontal:[lW.trackVertical,Et.centerInline(`0px`)]))}),(0,q.jsx)(`div`,{"aria-hidden":`true`,...H(w(lW.filledTrack,M?lW.filledTrackHorizontal:[lW.filledTrackVertical,Et.centerInline(`0px`)]),{style:U})}),v&&(0,q.jsx)(`div`,{"aria-hidden":`true`,...{0:{className:`x10l6tqk x13vifvy x1ey2m1c xbudbmw`},1:{className:`x10l6tqk x1o0tod xtijo5x xwa60dl`}}[!!M<<0],children:v.map(e=>{let t=pW(e.value,d,f),n=M?{insetInlineStart:hW(t)}:{bottom:hW(t)};return(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{"data-testid":`slider-mark`,"data-mark-value":e.value,...H({0:{className:`x10l6tqk x7njt3n xjspbzw x36qwtl x1xc55vz x1m9mm8y`},1:{className:`x10l6tqk x7njt3n xjspbzw xfo62xy xdk7pt x11lhmoz xoffwj3`}}[!!M<<0],{style:n})}),e.label&&(0,q.jsx)(`span`,{"data-testid":`slider-mark-label`,"data-mark-value":e.value,...H({0:{className:`x10l6tqk x9ynric x141an7d xv1l7n4 xuxw1ft x131p8rn x9p6ekw`},1:{className:`x10l6tqk x9ynric x141an7d xv1l7n4 xuxw1ft xuuh30 x1nyx83j xuivejd`}}[!!M<<0],{style:n}),children:e.label})]},e.value)})}),pe.map((e,t)=>Ee(t))]}),De]}),le&&(0,q.jsx)(Kt,{id:R,children:`Required`}),se&&ce.renderTooltip(o)]})}yW.displayName=`Slider`;var bW=[`explorer`,`implementer`,`reviewer`,`advisor`];function xW({catalog:e,error:t,onRefresh:n}){let{t:r}=W();return!t&&!e?(0,q.jsxs)(`div`,{className:`settings-load-state`,role:`status`,children:[(0,q.jsx)(me,{className:`settings-spin`,"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:r(`settingsCatalogLoading`)})]}):t?(0,q.jsxs)(`div`,{className:`settings-load-state error`,role:`alert`,children:[(0,q.jsx)(`strong`,{children:r(`settingsCatalogFailed`)}),(0,q.jsx)(`span`,{children:t}),(0,q.jsx)(`button`,{type:`button`,onClick:n,children:r(`retryAdmissionCheck`)})]}):null}function SW({icon:e,title:t,description:n,value:r,disabled:i,loading:a,onChange:o}){return(0,q.jsxs)(`div`,{className:`settings-inline-control settings-toggle-row`,children:[(0,q.jsx)(e,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`settings-inline-copy`,children:[(0,q.jsx)(`strong`,{children:t}),n&&(0,q.jsx)(`small`,{children:n})]}),(0,q.jsx)(bj,{label:t,isLabelHidden:!0,value:r,size:`sm`,isDisabled:i,isLoading:a,onChange:o})]})}function CW({isPending:e,isBlocked:t=!1,onConfigure:n,request:r,label:i}){return(0,q.jsx)(Br,{label:i,variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Xc,{"aria-hidden":`true`}),isDisabled:e||t,isLoading:e,onClick:()=>void n(r)})}function wW({pending:e,onConfigure:t,placeholder:n}){let{t:r}=W(),[i,a]=(0,K.useState)(``);return(0,q.jsxs)(`form`,{className:`settings-edit-form`,onSubmit:n=>{n.preventDefault(),!e&&i.trim()&&t(i.trim())},children:[(0,q.jsxs)(`label`,{className:`settings-form-field`,children:[r(`setupConfigurationRequest`),(0,q.jsx)(`textarea`,{required:!0,maxLength:2e3,value:i,disabled:e,placeholder:n,onChange:e=>a(e.target.value)})]}),(0,q.jsx)(`button`,{type:`submit`,disabled:e||!i.trim(),children:r(`configureViaSetup`)}),(0,q.jsx)(`small`,{children:r(`setupFormDetail`)})]})}function TW({catalog:e,error:t,currentModel:n,thinkingLevel:r,cwd:i,setupPending:a,setupBlocked:o=!1,preferencePending:s,setupBusy:c,setupBlockedReason:l,onConfigure:u,onUpdatePreferences:d,onOpenRuntimeStatus:f,onRefresh:p}){let{t:m}=W(),h=e?.setup,g=h?.workflows.concurrency??0,_=h?.workflows.maxAgentCalls??0,[v,y]=(0,K.useState)(g),[b,x]=(0,K.useState)(_);return(0,K.useEffect)(()=>y(g),[g]),(0,K.useEffect)(()=>x(_),[_]),(0,q.jsxs)(`section`,{className:`settings-content-page settings-general-panel`,children:[(0,q.jsxs)(`div`,{className:`settings-page-heading`,children:[(0,q.jsx)(`div`,{children:(0,q.jsx)(`h1`,{children:m(`generalSettings`)})}),(0,q.jsx)(CW,{isPending:a,isBlocked:o,onConfigure:u,request:m(`setupRequestReviewAll`),label:m(`configureOpenPi`)})]}),c&&(0,q.jsx)(`p`,{className:`settings-pending-hint`,role:`status`,children:l||m(`settingsSetupBusyHint`)}),(0,q.jsx)(xW,{catalog:e,error:t,onRefresh:p}),h&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`section`,{className:`settings-section-block`,children:(0,q.jsxs)(`div`,{className:`settings-follow-up-control`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:m(`followUpBehavior`)}),(0,q.jsx)(`p`,{children:m(`followUpBehaviorDetail`)})]}),(0,q.jsxs)(`fieldset`,{className:`settings-follow-up-choices`,disabled:s,children:[(0,q.jsx)(`legend`,{className:`sr-only`,children:m(`followUpBehavior`)}),[`followUp`,`steer`].map(e=>(0,q.jsxs)(`label`,{children:[(0,q.jsx)(`input`,{type:`radio`,name:`follow-up-behavior`,value:e,"aria-label":m(e===`steer`?`followUpSteer`:`followUpQueue`),checked:(h.ui.webFollowUpBehavior??`followUp`)===e,onChange:()=>void d({followUpBehavior:e})}),(0,q.jsxs)(`span`,{className:`settings-follow-up-option`,children:[e===`steer`?(0,q.jsx)(Cs,{"aria-hidden":`true`}):(0,q.jsx)(tc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`settings-follow-up-option-copy`,children:[(0,q.jsx)(`strong`,{children:m(e===`steer`?`followUpSteer`:`followUpQueue`)}),(0,q.jsx)(`small`,{children:m(e===`steer`?`followUpSteerDetail`:`followUpQueueDetail`)})]})]})]},e))]})]})}),(0,q.jsxs)(`section`,{className:`settings-section-block`,children:[(0,q.jsx)(`h2`,{children:m(`agentBehavior`)}),(0,q.jsxs)(`div`,{className:`settings-chat-controls`,children:[(0,q.jsxs)(`form`,{className:`settings-limits-control`,onSubmit:e=>{e.preventDefault(),!a&&!o&&u(m(`setupRequestLimits`,{concurrency:v,calls:b}))},children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(Us,{"aria-hidden":`true`}),m(`workflowLimits`)]}),(0,q.jsx)(`small`,{children:m(`workflowLimitsValue`,{concurrency:h.workflows.concurrency,calls:h.workflows.maxAgentCalls})}),(0,q.jsxs)(`label`,{children:[m(`workflowConcurrency`),(0,q.jsx)(`input`,{type:`number`,min:1,value:v,disabled:a||o,onChange:e=>y(Number(e.target.value)),required:!0})]}),(0,q.jsxs)(`label`,{children:[m(`workflowCalls`),(0,q.jsx)(`input`,{type:`number`,min:1,value:b,disabled:a||o,onChange:e=>x(Number(e.target.value)),required:!0})]}),(0,q.jsx)(`button`,{type:`submit`,disabled:a||o||v===h.workflows.concurrency&&b===h.workflows.maxAgentCalls,children:m(`configureViaSetup`)})]}),(0,q.jsx)(SW,{icon:Pc,title:m(`nextActionSuggestions`),description:m(`nextActionSuggestionsDetail`),value:h.suggestions.enabled,disabled:a||o,loading:a,onChange:e=>void u(m(e?`setupRequestEnableSuggestions`:`setupRequestDisableSuggestions`))}),h.suggestions.model&&(0,q.jsx)(`small`,{children:`${h.suggestions.model.provider}/${h.suggestions.model.model} · ${h.suggestions.model.reasoning}`}),(0,q.jsxs)(`div`,{className:`settings-inline-control`,children:[(0,q.jsx)(bs,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`settings-inline-copy`,children:[(0,q.jsxs)(`strong`,{children:[m(`postEditCommand`),(0,q.jsx)(`span`,{className:`settings-inline-status`,children:m(h.postEditConfigured?`configured`:`disabled`)})]}),(0,q.jsx)(`small`,{children:m(`postEditCommandDetail`)})]}),(0,q.jsx)(CW,{isPending:a,isBlocked:o,onConfigure:u,request:m(`setupRequestPostEdit`),label:m(`configurePostEdit`)})]}),(0,q.jsx)(`small`,{children:m(`agentSettingsSetupHint`)})]})]}),(0,q.jsxs)(`section`,{className:`settings-section-block`,children:[(0,q.jsx)(`h2`,{children:m(`resultDisplay`)}),(0,q.jsxs)(`div`,{className:`settings-chat-controls`,children:[[[`subagentResultDisplay`,`subagentResults`,ws],[`bashToolDisplay`,`bashOperations`,Vc],[`fileMutationDisplay`,`fileMutations`,Fs]].map(([e,t,n])=>(0,q.jsxs)(`label`,{className:`settings-inline-control`,htmlFor:`settings-${e}`,children:[(0,q.jsx)(n,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`settings-inline-copy`,children:(0,q.jsx)(`strong`,{children:m(t)})}),(0,q.jsx)(Tj,{id:`settings-${e}`,className:`settings-select-control`,label:m(t),value:h.ui[e],disabled:s,onChange:t=>{(t===`full`||t===`compact`)&&d({[e]:t})},options:[{value:`compact`,label:m(`detailDisplay_compact`)},{value:`full`,label:m(`detailDisplay_full`)}]})]},e)),(0,q.jsx)(SW,{icon:mc,title:m(`terminalFooter`),value:h.ui.customFooter,disabled:s,loading:s,onChange:e=>void d({customFooter:e})}),(0,q.jsxs)(`label`,{className:`settings-inline-control`,htmlFor:`settings-footer-style`,children:[(0,q.jsx)(`span`,{children:m(`terminalFooterStyle`)}),(0,q.jsx)(Tj,{id:`settings-footer-style`,className:`settings-select-control`,label:m(`terminalFooterStyle`),value:h.ui.footerStyle,disabled:s||!h.ui.customFooter,onChange:e=>{(e===`plain`||e===`powerline`||e===`powerline-mono`)&&d({footerStyle:e})},options:[{value:`plain`,label:`Plain`},{value:`powerline`,label:`Powerline`},{value:`powerline-mono`,label:`Powerline Mono`}]})]}),(0,q.jsx)(`small`,{children:m(`terminalFooterHint`)})]})]})]}),(0,q.jsx)(sW,{}),(0,q.jsxs)(`section`,{className:`settings-section-block`,children:[(0,q.jsx)(`h2`,{children:m(`sessionSettings`)}),(0,q.jsxs)(`dl`,{className:`settings-summary-list`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:m(`selectedModel`)}),(0,q.jsx)(`dd`,{children:n?.label??m(`noModels`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:m(`thinkingLevel`)}),(0,q.jsx)(`dd`,{children:r})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:m(`currentWorkspace`)}),(0,q.jsx)(`dd`,{title:i,children:i})]})]}),(0,q.jsx)(Br,{label:m(`openRuntimeDetails`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ls,{"aria-hidden":`true`}),className:`settings-runtime-action`,onClick:f})]})]})}function EW(e){return e.split(/[\\/]/u).filter(Boolean).at(-1)||e}function DW({kind:e,query:t,scope:n,onQuery:r,onScope:i,onAdd:a}){let{t:o}=W();return(0,q.jsxs)(`div`,{className:`settings-resource-toolbar`,children:[(0,q.jsxs)(`div`,{className:`settings-resource-toolbar-heading`,children:[(0,q.jsx)(`strong`,{children:o(`resources`)}),(0,q.jsx)(Br,{label:o(e===`skills`?`addSkill`:`addPlugin`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:a})]}),(0,q.jsxs)(`label`,{className:`settings-resource-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":o(`searchResources`),placeholder:o(`searchResources`),value:t,onChange:e=>r(e.target.value)})]}),(0,q.jsx)(Tj,{label:o(`filterResourceScope`),value:n,onChange:i,options:[{value:`all`,label:o(`allResourceScopes`)},...[`project`,`user`,`temporary`].map(e=>({value:e,label:o(`resourceScope_${e}`)}))]})]})}function OW({kind:e,pending:t,onConfigure:n,onCancel:r}){let{t:i}=W(),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(`user`);return(0,q.jsxs)(`section`,{className:`settings-resource-install`,children:[(0,q.jsx)(`header`,{className:`settings-detail-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:i(e===`skills`?`addSkill`:`addPlugin`)}),(0,q.jsx)(`p`,{children:i(`resourceInstallIntro`)})]})}),(0,q.jsxs)(`form`,{className:`settings-edit-form`,onSubmit:r=>{r.preventDefault(),!t&&a.trim()&&n(i(`setupResourceInstallRequest`,{kind:i(e===`skills`?`skillsSettings`:`pluginsSettings`),source:JSON.stringify(a.trim()),scope:s}))},children:[(0,q.jsxs)(`label`,{className:`settings-form-field`,children:[i(`resourcePackageSource`),(0,q.jsx)(`input`,{required:!0,maxLength:1e3,value:a,placeholder:i(`resourcePackageSourcePlaceholder`),disabled:t,onChange:e=>{o(e.target.value)}})]}),(0,q.jsxs)(`label`,{className:`settings-form-field`,htmlFor:`resource-install-scope`,children:[i(`scope`),(0,q.jsx)(Tj,{id:`resource-install-scope`,label:i(`scope`),value:s,disabled:t,onChange:c,options:[{value:`user`,label:i(`resourceScope_user`)},{value:`project`,label:i(`resourceScope_project`)}]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-actions`,children:[(0,q.jsx)(Br,{type:`submit`,label:i(`configureViaSetup`),variant:`secondary`,size:`sm`,isDisabled:t||!a.trim()}),(0,q.jsx)(Br,{label:i(`cancel`),variant:`ghost`,size:`sm`,onClick:r})]}),(0,q.jsx)(`small`,{children:i(`resourceInstallReview`)})]}),e===`skills`&&(0,q.jsxs)(`a`,{className:`settings-resource-link`,href:`https://skills.sh`,target:`_blank`,rel:`noreferrer`,children:[i(`browseSkills`),(0,q.jsx)(Os,{"aria-hidden":`true`})]})]})}function kW({catalog:e,pending:t,onReload:n,kind:r,onConfigure:i,children:a}){let{t:o}=W(),[s,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(null);return(0,q.jsxs)(`section`,{className:`settings-resource-management`,children:[a&&(0,q.jsx)(`div`,{className:`settings-resource-actions`,children:a}),(0,q.jsxs)(`div`,{className:`settings-resource-reload`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:o(`resourceSessionState`)}),(0,q.jsx)(`p`,{children:o(`resourcesReloadNote`)})]}),(0,q.jsx)(Br,{label:o(`reloadResources`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(me,{"aria-hidden":`true`}),isDisabled:t||l||!e?.sessionPath||!n,isLoading:l,onClick:()=>c(!0)})]}),d&&(0,q.jsx)(`p`,{className:`settings-resource-notice`,role:`status`,children:d}),(0,q.jsxs)(`details`,{className:`settings-resource-advanced`,children:[(0,q.jsx)(`summary`,{children:o(`advancedResourceConfiguration`)}),(0,q.jsx)(wW,{pending:t,onConfigure:i,placeholder:o(r===`skills`?`setupSkillsPlaceholder`:`setupPluginsPlaceholder`)})]}),s&&(0,q.jsx)(uj,{isOpen:!0,onOpenChange:c,title:o(`reloadResources`),description:o(`resourceReloadReview`),cancelLabel:o(`cancel`),actionLabel:o(`reloadResources`),onAction:()=>{c(!1),u(!0),f(null),n?.().then(()=>f(o(`resourceReloaded`)),e=>f(e instanceof Error?e.message:o(`resourceReloadFailed`))).finally(()=>u(!1))}})]})}function AW({catalog:e}){let{t}=W();if(!e)return null;let{diagnostics:n,truncation:r}=e.resources;return!n.settingsErrors&&!n.extensionErrors&&!n.skillErrors&&!r.truncated?null:(0,q.jsxs)(`p`,{className:`settings-resource-notice`,role:`status`,children:[t(`resourceDiagnostics`,n),n.settingsErrors?` ${t(`resourceConfigurationDiagnostics`,{count:n.settingsErrors})}`:``,r.truncated&&` ${t(`resourceCatalogTruncated`)}`]})}function jW({catalog:e,error:t,onRefresh:n,setupPending:r,onConfigure:i,onReload:a}){let{t:o}=W(),s=e?.resources.skills??[],[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(`all`),[f,p]=(0,K.useState)(!1),m=(0,K.useMemo)(()=>s.filter(e=>(u===`all`||e.scope===u)&&`${e.name} ${e.description} ${e.source}`.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())),[s,c,u]),h=(0,K.useMemo)(()=>[`project`,`user`,`temporary`].map(e=>({scope:e,skills:m.filter(t=>t.scope===e)})).filter(e=>e.skills.length>0),[m]),[g,_]=(0,K.useState)(``),[v,y]=(0,K.useState)(null),b=m.find(e=>e.id===g)??m[0],x=m.filter(e=>e.canManage!==!1),S=JSON.stringify(x.map(e=>e.filePath)),C=new TextEncoder().encode(S).length>12e3;(0,K.useEffect)(()=>{s.length&&!s.some(e=>e.id===g)&&_(s[0].id)},[g,s]);let w=e=>{y(null),td(`/skill:${e.name} `).then(e=>y(e?`copied`:`failed`))};return(0,q.jsxs)(`section`,{className:`settings-content-page settings-managed-panel`,children:[(0,q.jsx)(`header`,{className:`settings-page-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:o(`skillsSettings`)}),(0,q.jsx)(`p`,{children:o(`skillsEmptyIntro`)})]})}),(0,q.jsxs)(`aside`,{className:`settings-resource-sidebar`,children:[(0,q.jsx)(DW,{kind:`skills`,query:c,scope:u,onQuery:l,onScope:d,onAdd:()=>p(!0)}),(0,q.jsxs)(`div`,{className:`settings-resource-list`,children:[h.map(e=>(0,q.jsxs)(`section`,{className:`settings-resource-group`,children:[(0,q.jsx)(`span`,{className:`settings-sidebar-label`,children:o(`resourceScope_${e.scope}`)}),e.skills.map(e=>(0,q.jsxs)(`button`,{type:`button`,className:`settings-resource-item`,"aria-current":e.id===b?.id?`page`:void 0,onClick:()=>{_(e.id),y(null),p(!1)},children:[(0,q.jsx)(Pc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.name}),(0,q.jsx)(`small`,{children:o(e.disableModelInvocation?`explicitOnly`:`availableToModel`)})]})]},e.id))]},e.scope)),!e&&!t&&(0,q.jsx)(xW,{catalog:e,error:t,onRefresh:n}),e&&!m.length&&(0,q.jsx)(`p`,{className:`settings-resource-empty`,children:o(s.length?`noMatchingResources`:`noSkillsFound`)})]}),(0,q.jsxs)(`div`,{className:`settings-sidebar-footer`,children:[(0,q.jsx)(`span`,{children:o(`skillCount`,{count:s.length})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":o(`refreshStatus`),onClick:n,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-detail`,children:[(0,q.jsx)(AW,{catalog:e}),f?(0,q.jsx)(OW,{kind:`skills`,pending:r,onConfigure:i,onCancel:()=>p(!1)}):t?(0,q.jsx)(xW,{catalog:e,error:t,onRefresh:n}):b?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`header`,{className:`settings-detail-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:b.name}),(0,q.jsx)(`p`,{children:b.description})]}),(0,q.jsx)(Br,{label:o(v===`copied`?`copiedMessage`:`copySkillInvocation`),variant:`secondary`,size:`sm`,icon:v===`copied`?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{}),onClick:()=>w(b)})]}),(0,q.jsxs)(`dl`,{className:`settings-detail-metadata`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`source`)}),(0,q.jsx)(`dd`,{children:b.source===`auto`?o(`resourceSourceAuto`):b.source===`local`?o(`resourceSourceLocal`):b.source===`builtin`?o(`builtIn`):b.source})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`scope`)}),(0,q.jsx)(`dd`,{children:o(`resourceScope_${b.scope}`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`invocation`)}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`code`,{children:`/skill:${b.name}`})})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`modelInvocation`)}),(0,q.jsx)(`dd`,{children:o(b.disableModelInvocation?`explicitOnly`:`availableToModel`)})]})]}),(0,q.jsxs)(`section`,{className:`settings-path-block`,children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:o(`skillFile`)}),(0,q.jsx)(`code`,{children:b.filePath})]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-actions`,children:[(0,q.jsx)(CW,{isPending:r,isBlocked:b.canManage===!1,onConfigure:i,label:o(b.disableModelInvocation?`enableSkillInvocation`:`disableSkillInvocation`),request:o(`setupSkillInvocationRequest`,{path:b.filePath,disabled:!b.disableModelInvocation})}),(0,q.jsx)(CW,{isPending:r,isBlocked:b.canManage===!1,onConfigure:i,label:o(`updateResource`),request:o(`setupSkillManageRequest`,{action:`update`,path:JSON.stringify(b.filePath),source:JSON.stringify(b.source),scope:b.scope})}),(0,q.jsx)(CW,{isPending:r,isBlocked:b.canManage===!1,onConfigure:i,label:o(`removeResource`),request:o(`setupSkillManageRequest`,{action:`remove`,path:JSON.stringify(b.filePath),source:JSON.stringify(b.source),scope:b.scope})})]}),b.canManage===!1&&(0,q.jsx)(`p`,{className:`settings-resource-notice`,children:o(`resourceTargetTruncated`)}),v===`failed`&&(0,q.jsx)(`p`,{className:`inspection-warning`,children:o(`copyFailed`)})]}):(0,q.jsxs)(`div`,{className:`settings-empty-detail`,children:[(0,q.jsx)(Pc,{"aria-hidden":`true`}),(0,q.jsx)(`h2`,{children:o(s.length?`noMatchingResources`:`skillsEmptyTitle`)}),(0,q.jsx)(Br,{label:o(`addSkill`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:()=>p(!0)})]}),!f&&(0,q.jsxs)(kW,{catalog:e,pending:r,onReload:a,kind:`skills`,onConfigure:i,children:[x.length>1&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(CW,{isPending:r,isBlocked:C,onConfigure:i,label:o(`enableVisibleSkills`,{count:x.length}),request:o(`setupSkillsBulkRequest`,{paths:S,disabled:!1})}),(0,q.jsx)(CW,{isPending:r,isBlocked:C,onConfigure:i,label:o(`disableVisibleSkills`,{count:x.length}),request:o(`setupSkillsBulkRequest`,{paths:S,disabled:!0})})]}),C&&(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:o(`resourceBulkTooLarge`)})]})]})]})}function MW({catalog:e,error:t,currentModel:n,models:r,activity:i,setupPending:a,setupBlocked:o=!1,onConfigure:s,onRefresh:c}){let{t:l}=W(),[u,d]=(0,K.useState)(`explorer`),f=e?.setup.subagents.roleModels[u],[p,m]=(0,K.useState)(``),[h,g]=(0,K.useState)(1);(0,K.useEffect)(()=>{let t=e?.setup.subagents.roleModels[u];m(t?`${t.provider}/${t.model}`:``),g(e?.setup.workflows.concurrency??1)},[u,e]);let _=i?.items.filter(e=>e.status===`running`).length??0,v=i?.items.filter(e=>e.status!==`running`).length??0;return(0,q.jsxs)(`section`,{className:`settings-content-page settings-subagents-panel`,children:[(0,q.jsxs)(`header`,{className:`settings-page-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:l(`subagentsSettings`)}),(0,q.jsx)(`p`,{children:l(`subagentConfigurationIntro`)})]}),(0,q.jsx)(CW,{isPending:a,isBlocked:o,onConfigure:s,request:l(`setupRequestSubagents`),label:l(`configureRoles`)})]}),(0,q.jsx)(xW,{catalog:e,error:t,onRefresh:c}),(0,q.jsx)(`div`,{className:`settings-control-group`,children:(0,q.jsxs)(`label`,{className:`settings-control-row`,htmlFor:`subagent-role`,children:[(0,q.jsxs)(`span`,{className:`settings-control-copy`,children:[(0,q.jsx)(`strong`,{children:l(`builtInRoles`)}),(0,q.jsx)(`span`,{children:l(`subagentRoleShort_${u}`)})]}),(0,q.jsx)(Tj,{id:`subagent-role`,name:`subagentRole`,label:l(`builtInRoles`),value:u,onChange:e=>{let t=bW.find(t=>t===e);t&&d(t)},options:bW.map(e=>({value:e,label:l(`subagentRole_${e}`)}))})]})}),(0,q.jsx)(`div`,{className:`settings-role-detail`,children:e&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`header`,{className:`settings-detail-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:l(`subagentRole_${u}`)}),(0,q.jsx)(`p`,{children:l(`subagentRoleDescription_${u}`)})]})}),(0,q.jsxs)(`form`,{className:`settings-edit-form settings-role-form`,onSubmit:e=>{e.preventDefault(),!(a||o)&&s(l(`setupRoleFormRequest`,{role:u,model:p||l(`inheritParentModel`),concurrency:h}))},children:[(0,q.jsxs)(`div`,{className:`settings-control-group`,children:[(0,q.jsxs)(`label`,{className:`settings-control-row`,htmlFor:`role-model`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`modelAssignment`)})}),(0,q.jsx)(Tj,{id:`role-model`,name:`roleModel`,label:l(`modelAssignment`),value:p,disabled:a||o,onChange:m,menuWidth:`min(380px, calc(100vw - 32px))`,options:[{value:``,label:l(`inheritParentModel`)},...p&&!r.some(e=>`${e.provider}/${e.id}`===p)?[{value:p,label:p}]:[],...r.map(e=>({value:`${e.provider}/${e.id}`,label:e.label}))]})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`effectiveModel`)})}),(0,q.jsx)(`span`,{className:`settings-control-value`,children:f?`${f.provider}/${f.model}`:n?.label??l(`unknownState`)})]}),(0,q.jsxs)(`label`,{className:`settings-control-row`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`workflowConcurrencyLabel`)})}),(0,q.jsx)(`input`,{name:`concurrency`,type:`number`,autoComplete:`off`,min:1,max:64,required:!0,value:h,disabled:a||o,onChange:e=>g(Number(e.target.value))})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(`span`,{className:`settings-control-copy`,children:(0,q.jsx)(`strong`,{children:l(`workflowCallLimit`)})}),(0,q.jsx)(`span`,{className:`settings-control-value`,children:e.setup.workflows.maxAgentCalls})]})]}),(0,q.jsx)(`button`,{type:`submit`,disabled:a||o,children:l(`configureViaSetup`)}),(0,q.jsx)(`small`,{className:`settings-resource-caption`,children:l(`setupFormDetail`)})]}),(0,q.jsxs)(`section`,{className:`settings-role-principles`,children:[(0,q.jsx)(`h2`,{children:l(`runtimeBoundaries`)}),(0,q.jsxs)(`div`,{className:`settings-control-group`,children:[(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(Ys,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:l(`subagentAuthorityNote`)})]}),(0,q.jsxs)(`div`,{className:`settings-control-row`,children:[(0,q.jsx)(ws,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:l(`subagentModelNote`)})]})]}),(0,q.jsxs)(`p`,{className:`settings-resource-caption`,children:[l(`subagentActiveCount`,{count:_}),` ·`,` `,l(`subagentCompletedCount`,{count:v})]})]})]})})]})}function NW(e){return e.extensions.length+e.skills.length+e.prompts.length+e.themes.length}function PW(e){return e.enabled===!1?`disabled`:e.configured&&!e.installed?`missing`:e.diagnostics?.length?`error`:NW(e)?`loaded`:e.installed?`installed`:`notLoaded`}function FW({catalog:e,error:t,onRefresh:n,setupPending:r,onConfigure:i,onReload:a}){let{t:o}=W(),s=e?.resources.plugins??[],[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)(`all`),[f,p]=(0,K.useState)(!1),m=(0,K.useMemo)(()=>s.filter(e=>(u===`all`||e.scope===u)&&`${e.name??``} ${e.source}`.toLocaleLowerCase().includes(c.trim().toLocaleLowerCase())),[s,c,u]),[h,g]=(0,K.useState)(``),_=m.find(e=>e.id===h)??m[0],v=m.filter(e=>e.configured&&e.canManage!==!1),y=e=>e.name??(e.source===`auto`?o(`resourceSourceAuto`):e.source===`builtin`?o(`builtIn`):EW(e.source)),b=JSON.stringify(v.map(({source:e,scope:t,baseDir:n})=>({source:e,scope:t,path:n}))),x=new TextEncoder().encode(b).length>12e3;return(0,K.useEffect)(()=>{s.length&&!s.some(e=>e.id===h)&&g(s[0].id)},[s,h]),(0,q.jsxs)(`section`,{className:`settings-content-page settings-managed-panel`,children:[(0,q.jsx)(`header`,{className:`settings-page-heading`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h1`,{children:o(`pluginsSettings`)}),(0,q.jsx)(`p`,{children:o(`pluginsEmptyIntro`)})]})}),(0,q.jsxs)(`aside`,{className:`settings-resource-sidebar`,children:[(0,q.jsx)(DW,{kind:`plugins`,query:c,scope:u,onQuery:l,onScope:d,onAdd:()=>p(!0)}),(0,q.jsxs)(`div`,{className:`settings-resource-list`,children:[m.map(e=>(0,q.jsxs)(`button`,{type:`button`,className:`settings-resource-item`,"aria-current":e.id===_?.id?`page`:void 0,onClick:()=>{g(e.id),p(!1)},children:[(0,q.jsx)(Sc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:y(e)}),(0,q.jsxs)(`small`,{children:[o(`resourceScope_${e.scope}`),` ·`,` `,o(`pluginState_${PW(e)}`)]})]})]},e.id)),!e&&!t&&(0,q.jsx)(xW,{catalog:e,error:t,onRefresh:n}),e&&!m.length&&(0,q.jsx)(`p`,{className:`settings-resource-empty`,children:o(s.length?`noMatchingResources`:`noPluginsFound`)})]}),(0,q.jsxs)(`div`,{className:`settings-sidebar-footer`,children:[(0,q.jsx)(`span`,{children:e?o(`pluginCount`,{count:s.length}):o(`settingsCatalogLoading`)}),(0,q.jsx)(`button`,{type:`button`,"aria-label":o(`refreshStatus`),onClick:n,children:(0,q.jsx)(me,{"aria-hidden":`true`})})]})]}),(0,q.jsxs)(`div`,{className:`settings-resource-detail`,children:[(0,q.jsx)(AW,{catalog:e}),f?(0,q.jsx)(OW,{kind:`plugins`,pending:r,onConfigure:i,onCancel:()=>p(!1)}):t?(0,q.jsx)(xW,{catalog:e,error:t,onRefresh:n}):_?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`header`,{className:`settings-detail-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:y(_)}),(0,q.jsx)(`code`,{children:_.source})]}),(0,q.jsx)(`span`,{className:`settings-status-badge ${PW(_)===`loaded`?`healthy`:``}`,children:o(`pluginState_${PW(_)}`)})]}),(0,q.jsxs)(`dl`,{className:`settings-detail-metadata settings-detail-metadata-wide`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`scope`)}),(0,q.jsx)(`dd`,{children:o(`resourceScope_${_.scope}`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`resourceOrigin`)}),(0,q.jsx)(`dd`,{children:o(`resourceOrigin_${_.origin}`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`installedVersion`)}),(0,q.jsx)(`dd`,{children:_.installedVersion??o(`notReported`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`configuredVersion`)}),(0,q.jsx)(`dd`,{children:_.configuredVersion??o(`resourceVersionUnpinned`)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`resources`)}),(0,q.jsx)(`dd`,{children:o(`pluginResourceSummary`,{extensions:_.extensions.length,skills:_.skills.length,prompts:_.prompts.length,themes:_.themes.length})})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:o(`baseDirectory`)}),(0,q.jsx)(`dd`,{title:_.baseDir,children:_.baseDir??o(`notReported`)})]})]}),[...new Set(_.diagnostics)].map(e=>(0,q.jsx)(`p`,{className:`settings-resource-notice`,role:`status`,children:e},e)),_.canManage===!1&&(0,q.jsx)(`p`,{className:`settings-resource-notice`,children:o(`resourceTargetTruncated`)}),_.configured&&_.canManage!==!1&&(0,q.jsx)(`div`,{className:`settings-resource-actions settings-resource-primary-actions`,children:[_.enabled===!1?`enable`:`disable`,`update`,`remove`].map(e=>(0,q.jsx)(CW,{isPending:r,onConfigure:i,label:o(`pluginAction_${e}`),request:o(`setupPluginOperationRequest`,{action:e,source:JSON.stringify(_.source),path:JSON.stringify(_.baseDir??null),scope:_.scope})},e))}),(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:o(`pluginLoadedResources`,{count:NW(_)})}),(0,q.jsxs)(`section`,{className:`settings-resource-groups`,children:[_.extensions.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`extensions`)}),(0,q.jsx)(`ul`,{children:_.extensions.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`strong`,{children:e.name}),(0,q.jsx)(`code`,{children:e.path})]}),(0,q.jsx)(`span`,{children:o(`extensionSurfaceCount`,{tools:e.toolCount,commands:e.commandCount})})]},e.path))})]}),_.skills.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`skillsSettings`)}),(0,q.jsx)(`p`,{children:_.skills.join(` · `)})]}),_.prompts.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`prompts`)}),(0,q.jsx)(`p`,{children:_.prompts.join(` · `)})]}),_.themes.length>0&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`h2`,{children:o(`themes`)}),(0,q.jsx)(`p`,{children:_.themes.join(` · `)})]})]})]}):(0,q.jsxs)(`div`,{className:`settings-empty-detail`,children:[(0,q.jsx)(Sc,{"aria-hidden":`true`}),(0,q.jsx)(`h2`,{children:o(s.length?`noMatchingResources`:`pluginsEmptyTitle`)}),(0,q.jsx)(Br,{label:o(`addPlugin`),variant:`secondary`,size:`sm`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:()=>p(!0)})]}),!f&&(0,q.jsxs)(kW,{catalog:e,pending:r,onReload:a,kind:`plugins`,onConfigure:i,children:[v.length>1&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(CW,{isPending:r,isBlocked:x,onConfigure:i,label:o(`enableVisiblePlugins`,{count:v.length}),request:o(`setupPluginsBulkRequest`,{packages:b,disabled:!1})}),(0,q.jsx)(CW,{isPending:r,isBlocked:x,onConfigure:i,label:o(`disableVisiblePlugins`,{count:v.length}),request:o(`setupPluginsBulkRequest`,{packages:b,disabled:!0})})]}),x&&(0,q.jsx)(`p`,{className:`settings-resource-caption`,children:o(`resourceBulkTooLarge`)})]})]})]})}function IW(e,t=``,n){let r=(0,K.useMemo)(()=>new de,[]),[i,a]=(0,K.useState)(0),o=JSON.stringify([e,t]),s=(0,K.useRef)(o);s.current=o;let c=(0,K.useRef)(0),[l,u]=(0,K.useState)(null),d=(0,K.useCallback)(()=>a(e=>e+1),[]);return(0,K.useEffect)(()=>{let t=new AbortController,n=++c.current;return u(e=>({owner:o,catalog:e?.owner===o?e.catalog:null,error:null})),r.settingsCatalog(e,t.signal).then(e=>{!t.signal.aborted&&c.current===n&&u({owner:o,catalog:e,error:null})},e=>{!t.signal.aborted&&c.current===n&&u(t=>({owner:o,catalog:t?.owner===o?t.catalog:null,error:e instanceof Error?e.message:String(e)}))}),()=>t.abort()},[r,i,e,o,n]),{catalog:l?.owner===o?l.catalog:null,error:l?.owner===o?l.error:null,refresh:d,updateSetup:e=>{s.current===o&&(c.current++,u(t=>t?.owner===o&&t.catalog?{...t,catalog:{...t.catalog,setup:e}}:t))}}}var LW=[`default`,`mist`,`rose`,`pine`],RW=[`codex`,`sans`,`serif`,`mono`],zW=[`system`,`light`,`dark`],BW={palette:`default`,accent:``,background:``,foreground:``,font:`codex`};function VW(e){return e===`pine`?`dark`:e===`mist`||e===`rose`?`light`:e}function HW(e,t){return e===`mist`||e===`rose`||e===`pine`?e:t.palette}function UW(e,t){switch(e){case`mist`:return t?{background:`#182126`,foreground:`#EDF3F5`,sidebar:`#1D292F`,accent:`#7BB5CA`}:{background:`#F8FBFC`,foreground:`#253239`,sidebar:`#EEF3F5`,accent:`#347991`};case`rose`:return t?{background:`#211A1C`,foreground:`#F4ECEC`,sidebar:`#2A2123`,accent:`#E09AA5`}:{background:`#FFF9F7`,foreground:`#342729`,sidebar:`#F6EDEA`,accent:`#B45562`};case`pine`:return t?{background:`#101A17`,foreground:`#EAF2EC`,sidebar:`#16241F`,accent:`#86C89E`}:{background:`#F4F8F5`,foreground:`#20352A`,sidebar:`#E9F1EB`,accent:`#32704A`};default:return t?{background:`#17191C`,foreground:`#EDF0F2`,sidebar:`#1D2024`,accent:`#74A9E6`}:{background:`#FFFFFF`,foreground:`#1A1C1F`,sidebar:`#F6F7F9`,accent:`#2563EB`}}}function WW(e){if(e.length>2e3)return null;try{let t=JSON.parse(e);if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;if(Object.keys(n).sort().join(`,`)!==`appearance,theme,version`||n.version!==1)return null;let r=zW.find(e=>e===n.theme);if(!r||!n.appearance||typeof n.appearance!=`object`||Array.isArray(n.appearance))return null;let i=n.appearance;if(Object.keys(i).sort().join(`,`)!==`accent,background,font,foreground,palette`)return null;let a=LW.find(e=>e===i.palette),o=i.font===`system`?`codex`:RW.find(e=>e===i.font),{accent:s,background:c,foreground:l}=i;return!a||!o||typeof s!=`string`||typeof c!=`string`||typeof l!=`string`||![s,c,l].every(e=>e===``||/^#[0-9a-f]{6}$/iu.test(e))?null:{theme:r,appearance:{palette:a,font:o,accent:s,background:c,foreground:l}}}catch{return null}}var GW=[``,`#2563EB`,`#7C3AED`,`#DB2777`,`#D97706`,`#16A34A`];function KW({label:e,value:t,options:n,disabled:r,onSelect:i}){let a=n.find(e=>e.id===t);return(0,q.jsx)(yo,{className:`settings-select-menu`,button:{label:a?.label??t,"aria-label":e,variant:`secondary`,size:`sm`,className:`appearance-menu-trigger`,isDisabled:r,...a?.color?{icon:(0,q.jsx)(`span`,{className:`appearance-color-dot`,style:{background:a.color}})}:{}},menuWidth:200,alignment:`end`,items:n.map(e=>({id:e.id||`default`,label:e.label,isDisabled:r,...e.color?{icon:(0,q.jsx)(`span`,{className:`appearance-color-dot`,style:{background:e.color}})}:{},endContent:t===e.id?(0,q.jsx)(`span`,{className:`settings-select-check`,"aria-hidden":`true`,children:(0,q.jsx)(rs,{})}):void 0,onClick:()=>i(e.id)}))})}function qW({label:e,value:t,fallback:n,disabled:r,onSave:i}){let a=(t||n).toUpperCase(),o=(0,K.useRef)(a);o.current=a;let[s,c]=(0,K.useState)(a);(0,K.useEffect)(()=>c(a),[a]);let l=e=>{c(e),e!==a&&/^#[0-9a-f]{6}$/iu.test(e)&&i(e).then(e=>{e||c(o.current)})};return(0,q.jsxs)(`div`,{className:`appearance-color-input`,children:[(0,q.jsxs)(`label`,{className:`appearance-color-picker`,children:[(0,q.jsx)(`span`,{className:`appearance-color-dot`,style:{background:a}}),(0,q.jsx)(`input`,{"aria-label":`${e} — ${a}`,type:`color`,value:a,disabled:r,onChange:e=>l(e.target.value.toUpperCase())})]}),(0,q.jsx)(`input`,{className:`appearance-color-hex`,type:`text`,"aria-label":e,value:s,maxLength:7,spellCheck:!1,disabled:r,onChange:e=>l(e.target.value.toUpperCase()),onBlur:()=>c(a)})]})}function JW({catalog:e,theme:t,pending:n,error:r,onRefresh:i,onUpdatePreferences:a}){let{t:o}=W(),{mode:s}=sa(),c=e?.setup,l=c?.ui.webTheme??t,u=c?.ui.webAppearance??BW,d=HW(l,u),f=VW(l),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(``),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(null),[C,w]=(0,K.useState)(c?.ui.webChatWidth??820),[T,E]=(0,K.useState)(c?.ui.webChatFontSize??14),D=(0,K.useRef)({chatWidth:C,fontSize:T});c&&(D.current={chatWidth:c.ui.webChatWidth,fontSize:c.ui.webChatFontSize}),(0,K.useEffect)(()=>{c&&(w(c.ui.webChatWidth),E(c.ui.webChatFontSize))},[c]);let O=e?.setupWritable===!1||!!e?.resources.diagnostics.settingsErrors,k=n||!c||!!r||O,A=WW(_),j=e=>a({appearance:e}),M=()=>{n||(g(!1),v(``),b(!1))},N=f===`dark`||f===`system`&&s===`dark`,P=UW(d,N);return(0,q.jsxs)(`section`,{className:`settings-content-page settings-appearance-panel`,children:[(0,q.jsx)(`h1`,{children:o(`appearance`)}),(!c||r||O)&&(0,q.jsxs)(`div`,{className:`settings-load-state`,role:r||O?`alert`:`status`,children:[(0,q.jsx)(me,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:o(O?`configurationReadFailure`:r?`settingsCatalogFailed`:`settingsCatalogLoading`)}),(r||O)&&(0,q.jsx)(`button`,{type:`button`,onClick:i,children:o(`retryAdmissionCheck`)})]}),(0,q.jsxs)(`section`,{className:`appearance-section`,"aria-labelledby":`appearance-visual-title`,children:[(0,q.jsx)(`h2`,{id:`appearance-visual-title`,children:o(`appearanceVisualStyle`)}),(0,q.jsxs)(`div`,{className:`appearance-card appearance-mode-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceMode`)}),(0,q.jsx)(`div`,{role:`radiogroup`,"aria-label":o(`appearanceMode`),className:`appearance-mode-options`,children:zW.map(e=>(0,q.jsx)(V,{content:o(e===`system`?`themeSystem`:e===`light`?`themeLight`:`themeDark`),children:(0,q.jsxs)(`label`,{className:`appearance-mode-option`,children:[(0,q.jsx)(`input`,{type:`radio`,name:`openpi-appearance-mode`,"aria-label":o(e===`system`?`themeSystem`:e===`light`?`themeLight`:`themeDark`),checked:f===e,disabled:k,onChange:()=>void a({theme:e})}),(0,q.jsxs)(`span`,{"aria-hidden":`true`,className:`appearance-mode-preview`,"data-mode":e,"data-selected":f===e,children:[(0,q.jsxs)(`span`,{className:`appearance-mini-window`,children:[(0,q.jsx)(`span`,{className:`appearance-mini-sidebar`}),(0,q.jsxs)(`span`,{className:`appearance-mini-chat`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`em`,{})]})]}),e===`system`&&(0,q.jsxs)(`span`,{className:`appearance-mini-window appearance-mini-dark`,children:[(0,q.jsx)(`span`,{className:`appearance-mini-sidebar`}),(0,q.jsxs)(`span`,{className:`appearance-mini-chat`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`b`,{}),(0,q.jsx)(`em`,{})]})]})]}),(0,q.jsx)(`span`,{className:`appearance-mode-label`,children:o(e===`system`?`themeSystem`:e===`light`?`themeLight`:`themeDark`)})]})},e))})]}),(0,q.jsxs)(`div`,{className:`appearance-card`,children:[(0,q.jsxs)(`div`,{className:`appearance-row appearance-theme-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceTheme`)}),(0,q.jsxs)(`div`,{className:`appearance-theme-actions`,children:[(0,q.jsx)(V,{content:o(`appearanceImport`),children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":o(`appearanceImport`),disabled:k,onClick:()=>{b(!1),g(!0)},children:(0,q.jsx)(Ts,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:o(`appearanceCopy`),children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":o(`appearanceCopy`),disabled:k,onClick:()=>{td(JSON.stringify({version:1,theme:f,appearance:{...u,palette:d}})).then(e=>S(e?`saved`:`failed`))},children:(0,q.jsx)(Ss,{"aria-hidden":`true`})})})]})]}),(0,q.jsx)(`div`,{role:`radiogroup`,"aria-label":o(`appearanceTheme`),"aria-busy":n,className:`appearance-palette-options`,children:LW.map(e=>{let t=UW(e,N),n=e==="default"?`OpenPI`:o(`theme${e[0].toUpperCase()}${e.slice(1)}`);return(0,q.jsxs)(`label`,{className:`appearance-palette-option`,children:[(0,q.jsx)(`input`,{type:`radio`,name:`openpi-appearance-palette`,"aria-label":n,checked:d===e,disabled:k,onChange:()=>void j({palette:e})}),(0,q.jsxs)(`span`,{className:`appearance-palette-preview`,"aria-hidden":`true`,style:{background:t.background,color:t.foreground},children:[(0,q.jsxs)(`span`,{className:`appearance-palette-shell`,style:{background:t.sidebar},children:[(0,q.jsxs)(`span`,{className:`appearance-palette-sidebar`,children:[(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]}),(0,q.jsxs)(`span`,{className:`appearance-palette-canvas`,style:{background:t.background},children:[(0,q.jsx)(`b`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`em`,{style:{borderColor:t.accent},children:(0,q.jsx)(`span`,{className:`appearance-palette-send`,style:{background:t.accent}})})]})]}),(0,q.jsx)(`span`,{className:`appearance-palette-check`,children:(0,q.jsx)(rs,{})})]}),(0,q.jsx)(`span`,{className:`appearance-palette-label`,children:n})]},e)})}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceAccent`)}),(0,q.jsxs)(`div`,{className:`appearance-accent-controls`,children:[(0,q.jsx)(KW,{label:o(`appearanceAccent`),value:u.accent,options:GW.map((e,t)=>({id:e,label:o(`appearanceAccent${t}`),color:e||`var(--text)`})),disabled:k,onSelect:e=>void j({accent:e})}),(0,q.jsx)(qW,{label:o(`appearanceCustomAccent`),value:u.accent,fallback:`#2563EB`,disabled:k,onSave:e=>j({accent:e})})]})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceBackground`)}),(0,q.jsx)(qW,{label:o(`appearanceBackground`),value:u.background,fallback:P.background,disabled:k,onSave:e=>j({background:e})})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceForeground`)}),(0,q.jsx)(qW,{label:o(`appearanceForeground`),value:u.foreground,fallback:P.foreground,disabled:k,onSave:e=>j({foreground:e})})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceFont`)}),(0,q.jsx)(KW,{label:o(`appearanceFont`),value:u.font===`system`?`codex`:u.font,options:RW.map(e=>({id:e,label:o(`appearanceFont_${e}`)})),disabled:k,onSelect:e=>{let t=RW.find(t=>t===e);t&&j({font:t})}})]})]}),x&&(0,q.jsx)(`p`,{role:x===`failed`?`alert`:`status`,className:`appearance-share-status`,children:o(x===`saved`?`appearanceCopied`:`appearanceCopyFailed`)})]}),(0,q.jsxs)(`section`,{className:`appearance-section`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`appearance-advanced-toggle`,"aria-expanded":p,"aria-controls":`appearance-advanced`,onClick:()=>m(!p),children:[o(`appearanceAdvanced`),p?(0,q.jsx)(is,{"aria-hidden":`true`}):(0,q.jsx)(os,{"aria-hidden":`true`})]}),p&&c&&(0,q.jsxs)(`div`,{id:`appearance-advanced`,className:`appearance-card appearance-advanced-content`,children:[(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`expandThinkingByDefault`)}),(0,q.jsx)(bj,{label:o(`expandThinkingByDefault`),isLabelHidden:!0,value:c.ui.webExpandThinking,size:`sm`,isDisabled:k,onChange:e=>void a({expandThinking:e})})]}),(0,q.jsxs)(`div`,{className:`appearance-slider-row`,children:[(0,q.jsxs)(`div`,{className:`settings-slider-heading`,children:[(0,q.jsx)(`span`,{children:o(`chatContentWidth`)}),(0,q.jsxs)(`output`,{children:[C,`px`]}),(0,q.jsx)(`button`,{type:`button`,className:`settings-reset-button`,"aria-label":o(`resetChatContentWidth`),disabled:k||C===820,onClick:()=>{w(820),a({chatWidth:820}).then(e=>{e||w(D.current.chatWidth)})},children:(0,q.jsx)(he,{"aria-hidden":`true`})})]}),(0,q.jsx)(yW,{label:o(`chatContentWidth`),isLabelHidden:!0,value:C,min:820,max:2e3,step:10,width:`100%`,valueDisplay:`none`,isDisabled:k,onChange:e=>w(e),onChangeEnd:e=>{e!==c.ui.webChatWidth&&a({chatWidth:e}).then(e=>{e||w(D.current.chatWidth)})}})]}),(0,q.jsxs)(`div`,{className:`appearance-slider-row`,children:[(0,q.jsxs)(`div`,{className:`settings-slider-heading`,children:[(0,q.jsx)(`span`,{children:o(`chatFontSize`)}),(0,q.jsxs)(`output`,{children:[T,`px`]}),(0,q.jsx)(`button`,{type:`button`,className:`settings-reset-button`,"aria-label":o(`resetChatFontSize`),disabled:k||T===14,onClick:()=>{E(14),a({chatFontSize:14}).then(e=>{e||E(D.current.fontSize)})},children:(0,q.jsx)(he,{"aria-hidden":`true`})})]}),(0,q.jsx)(yW,{label:o(`chatFontSize`),isLabelHidden:!0,value:T,min:12,max:24,step:1,width:`100%`,valueDisplay:`none`,isDisabled:k,onChange:e=>E(e),onChangeEnd:e=>{e!==c.ui.webChatFontSize&&a({chatFontSize:e}).then(e=>{e||E(D.current.fontSize)})}})]}),(0,q.jsxs)(`div`,{className:`appearance-row`,children:[(0,q.jsx)(`span`,{children:o(`appearanceReset`)}),(0,q.jsxs)(`button`,{type:`button`,className:`appearance-reset`,disabled:k,onClick:()=>void a({theme:`system`,appearance:BW,chatWidth:820,chatFontSize:14,expandThinking:!1}),children:[(0,q.jsx)(he,{"aria-hidden":`true`}),o(`appearanceResetAction`)]})]})]})]}),(0,q.jsxs)(Se,{isOpen:h,onOpenChange:e=>{e||M()},"aria-label":o(`appearanceImport`),width:480,className:`appearance-import-dialog`,children:[(0,q.jsx)(`h2`,{className:`appearance-import-title`,children:o(`appearanceImport`)}),(0,q.jsxs)(`form`,{className:`appearance-import-form`,onSubmit:e=>{e.preventDefault(),!(!A||k)&&(b(!1),a(A).then(e=>{e?(g(!1),v(``)):b(!0)}))},children:[(0,q.jsxs)(`label`,{children:[o(`appearanceThemeValue`),(0,q.jsx)(`textarea`,{maxLength:2e3,value:_,disabled:n,placeholder:o(`appearanceImportPlaceholder`),onChange:e=>{b(!1),v(e.target.value)}})]}),_&&!A&&(0,q.jsx)(`p`,{role:`alert`,children:o(`appearanceImportInvalid`)}),y&&(0,q.jsx)(`p`,{role:`alert`,children:o(`settingsPreferencesSaveFailed`)}),(0,q.jsxs)(`div`,{className:`appearance-import-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:n,onClick:M,children:o(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,disabled:k||!A,children:o(n?`savingSettings`:`appearanceImportAction`)})]})]})]})]})}function YW({workspaces:e,onRestore:t}){let{t:n,i18n:r}=W(),i=(0,K.useMemo)(()=>new de,[]),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(``),[l,u]=(0,K.useState)(`updated`),[d,f]=(0,K.useState)(new Set),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(null),[x,S]=(0,K.useState)(new Set),C=(0,K.useRef)(new Set),w=(0,K.useRef)(null),T=(0,K.useRef)(!1),E=JSON.stringify([a.trim(),s,l]),D=(0,K.useRef)({key:E});D.current.key!==E&&(D.current={key:E});let O=p?.scope===E?p:null,k=_?.scope===E?_:null,A=(0,K.useCallback)(async(e,t=0)=>{w.current?.abort();let n=new AbortController;w.current=n,g(!0),v(null);let r={query:a.trim(),sort:l,...s?{cwd:s}:{},limit:25};try{let a=await i.listArchivedSessions({...r,...e?{cursor:e}:{}},n.signal);if(n.signal.aborted||w.current!==n)return;let o=[...a.sessions];for(;!e&&o.length!o.some(t=>t.path===e.path));if(o.push(...e),!e.length)break}m(t=>({...a,scope:E,sessions:e&&t?.scope===E?[...t.sessions,...o.filter(e=>!t.sessions.some(t=>t.path===e.path))]:o}))}catch(t){!n.signal.aborted&&w.current===n&&v({scope:E,stale:t instanceof ge&&t.code===`ARCHIVED_SESSION_CURSOR_STALE`,...e?{cursor:e}:{}})}finally{w.current===n&&(w.current=null,g(!1))}},[i,s,a,E,l]);(0,K.useEffect)(()=>(T.current=!0,()=>{T.current=!1}),[]),(0,K.useEffect)(()=>(b(null),A(),()=>{w.current?.abort(),w.current=null}),[A]);let j=async e=>{if(C.current.has(e))return;C.current.add(e),S(new Set(C.current)),b(null);let n=D.current;try{let r=await t(e);if(!T.current||D.current!==n)return;if(!r){b(e);return}let i=O?.sessions.length??0;m(t=>t?{...t,sessions:t.sessions.filter(t=>t.path!==e)}:null),await A(void 0,i)}catch{T.current&&D.current===n&&b(e)}finally{C.current.delete(e),T.current&&S(new Set(C.current))}},M=new Map;for(let e of O?.sessions??[]){let t=e.workspacePath??e.cwd,n=M.get(t)??[];n.push(e),M.set(t,n)}let N=t=>e.find(e=>e.path===t)?.name??t.split(/[\\/]/u).filter(Boolean).at(-1)??t,P=[...new Set([...e.map(e=>e.path),...M.keys(),...s?[s]:[]])];return(0,q.jsxs)(`section`,{className:`settings-content-page settings-archive-panel`,children:[(0,q.jsx)(`h1`,{children:n(`settingsArchivedChats`)}),(0,q.jsxs)(`div`,{className:`settings-archive-toolbar`,children:[(0,q.jsxs)(`label`,{className:`settings-archive-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":n(`searchArchivedChats`),placeholder:n(`searchArchivedChats`),maxLength:160,value:a,onChange:e=>o(e.target.value)}),a&&(0,q.jsx)(`button`,{type:`button`,"aria-label":n(`settingsClearSearch`),onClick:()=>o(``),children:(0,q.jsx)(je,{"aria-hidden":`true`})})]}),(0,q.jsx)(Tj,{label:n(`archiveProjectFilter`),value:s,onChange:c,options:[{value:``,label:n(`archiveAllProjects`)},...P.map(e=>({value:e,label:N(e)}))]}),(0,q.jsx)(Tj,{label:n(`archiveSort`),value:l,onChange:e=>u(e===`created`?`created`:`updated`),options:[{value:`updated`,label:n(`archiveSortUpdated`)},{value:`created`,label:n(`archiveSortCreated`)}]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":n(`refreshArchives`),disabled:h,onClick:()=>void A(void 0,O?.sessions.length),children:(0,q.jsx)(me,{"aria-hidden":`true`})})]}),k&&(0,q.jsxs)(`div`,{className:`settings-archive-error`,role:`alert`,children:[(0,q.jsx)(`span`,{children:n(k.stale?`archiveCursorStale`:`archiveLoadFailed`)}),(0,q.jsx)(`button`,{type:`button`,disabled:h,onClick:()=>void A(k.stale?void 0:k.cursor),children:n(`retryAdmissionCheck`)})]}),y&&(0,q.jsx)(`div`,{className:`settings-archive-error`,role:`alert`,children:n(`restoreFailed`)}),h&&(0,q.jsx)(`p`,{role:`status`,className:`settings-archive-status`,children:n(`loadingArchives`)}),!h&&!k&&O?.sessions.length===0&&(0,q.jsxs)(`div`,{className:`settings-archive-empty`,children:[(0,q.jsx)(Go,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:n(a.trim()||s?`noMatchingScannedArchives`:O.truncation.truncated?`noScannedArchives`:`noArchivedSessions`)})]}),(0,q.jsx)(`div`,{className:`settings-archive-groups`,children:[...M].map(([e,t])=>(0,q.jsxs)(`section`,{className:`settings-archive-group`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`settings-archive-group-heading`,"aria-label":n(`archiveProjectGroup`,{project:N(e),count:t.length}),"aria-expanded":!d.has(e),"aria-controls":`archive-group-${encodeURIComponent(e)}`,onClick:()=>f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),children:[d.has(e)?(0,q.jsx)(os,{"aria-hidden":`true`}):(0,q.jsx)(is,{"aria-hidden":`true`}),(0,q.jsx)(Vs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{title:e,children:N(e)}),(0,q.jsx)(`small`,{children:t.length})]}),!d.has(e)&&(0,q.jsx)(`ul`,{id:`archive-group-${encodeURIComponent(e)}`,className:`settings-archive-list`,children:t.map(e=>{let t=e.name||e.firstMessage||n(`untitledSession`),i=new Date(l===`created`?e.created:e.modified);return(0,q.jsxs)(`li`,{className:`settings-archive-row`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`settings-archive-chat-title`,title:t,children:t}),(0,q.jsx)(`time`,{dateTime:Number.isNaN(i.getTime())?void 0:i.toISOString(),children:Number.isNaN(i.getTime())?n(`unknownState`):new Intl.DateTimeFormat(r.language,{dateStyle:`medium`}).format(i)})]}),(0,q.jsxs)(`button`,{type:`button`,"aria-label":n(`restoreArchivedChat`,{title:t}),disabled:x.has(e.path),onClick:()=>void j(e.path),children:[(0,q.jsx)(Wo,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:n(x.has(e.path)?`restoringConversation`:`restoreConversation`)})]})]},e.path)})})]},e))}),!!O?.truncation.recordsUnscanned&&(0,q.jsx)(`p`,{className:`settings-archive-status`,children:n(`archiveScanBounded`,{count:O.truncation.recordsUnscanned})}),O?.nextCursor&&(0,q.jsx)(`button`,{type:`button`,className:`settings-archive-more`,disabled:h,onClick:()=>void A(O.nextCursor),children:n(`moreArchives`)})]})}var XW=[{id:`general`,group:`settingsPersonal`,label:`generalSettings`,Icon:Nc,terms:[`agentBehavior`,`resultDisplay`,`workflowLimits`,`runtimeIdentity`,`runtimeBackendVersion`,`runtimePackageRoot`,`runtimeStartedAt`,`runtimeGitRevision`,`runtimeGitState`,`runtimeFrontendVersion`,`runtimeFrontendBuild`,`runtimeStartupBuild`]},{id:`appearance`,group:`settingsPersonal`,label:`appearance`,Icon:zc,terms:[`appearanceTheme`,`appearanceAccent`,`appearanceFont`,`chatContentWidth`,`chatFontSize`]},{id:`archived-chats`,group:`settingsPersonal`,label:`settingsArchivedChats`,Icon:Go,terms:[`restoreConversation`]},{id:`configuration`,group:`settingsPersonal`,label:`configurationSettings`,Icon:Mc,terms:[`configurationApproval`,`configurationSandbox`,`configurationVerbosity`,`configurationSummary`,`configurationReasoningLevels`,`configurationDependencies`]},{id:`models`,group:`settingsAgent`,label:`modelSettings`,Icon:ws,terms:[`modelDefaultTitle`]},{id:`subagents`,group:`settingsAgent`,label:`subagentsSettings`,Icon:$o,terms:[]},{id:`web-search`,group:`settingsAgent`,label:`webSearchSettings`,Icon:Dc,terms:[]},{id:`skills`,group:`settingsIntegrations`,label:`skillsSettings`,Icon:Xs,terms:[]},{id:`plugins`,group:`settingsIntegrations`,label:`pluginsSettings`,Icon:Sc,terms:[]},{id:`browser`,group:`settingsIntegrations`,label:`browserSettings`,Icon:Es,terms:[]}];function ZW(e){return XW.find(({id:t})=>t===e)?.id}function QW({sessionId:e,sessionPath:t,cwd:n,entry:r=`general`,models:i,currentModel:a,thinkingLevel:o,theme:s,preferences:c,workspaces:l=[],onRestoreSession:u,capabilities:d,setupBusy:f,setupBlockedReason:p,plan:m,planSelectionPending:h=!1,onExitPlan:g,setupOutcome:_,onConfigureOpenPi:v,interaction:y,onPreferencesChanged:b,onSelectModel:x,onOpenRuntimeStatus:S,onClose:C}){let{t:w}=W(),T=f||!!p,E=(0,K.useRef)(null),D=(0,K.useRef)(null),[O,k]=(0,K.useState)(``),[A,j]=(0,K.useState)(r===`credentials`?`models`:r),[M,N]=(0,K.useState)(r===`credentials`||r===`models`),[P,F]=(0,K.useState)(!1),[I,ee]=(0,K.useState)(!1),[L,R]=(0,K.useState)(`general`),te=(0,K.useRef)(!1),z=(0,K.useRef)(!1),B=(0,K.useRef)(0),[ne,re]=(0,K.useState)(!1),V=(0,K.useRef)(!1),[ie,ae]=(0,K.useState)(!1),[oe,se]=(0,K.useState)(null),[ce,le]=(0,K.useState)(!1),[H,ue]=(0,K.useState)(!1),[fe,pe]=(0,K.useState)(null),me=H,he=(0,K.useRef)(void 0),ge=m!==void 0&&m!==`inactive`,_e=P||T||ge||h,ve=I&&L!==A||!I&&(A===`skills`||A===`plugins`||A===`web-search`)?void 0:!I||_?.requestId!==he.current?_:void 0,{catalog:ye,error:be,refresh:xe,updateSetup:Ce}=IW(e,a?`${a.provider}/${a.id}`:``,JSON.stringify(c)),we=ve!==void 0&&[`failed`,`cancelled`,`unconfirmed`].includes(ve.status);(0,K.useEffect)(()=>{E.current?.focus()},[]),(0,K.useEffect)(()=>{if(I){if(ve&&ve.status!==`pending`&&te.current){te.current=!1,z.current=!1,window.clearTimeout(B.current),xe(),b();return}if(T){z.current=!0;return}!z.current||!te.current||(te.current=!1,z.current=!1,window.clearTimeout(B.current),xe(),b())}},[b,xe,T,I,ve]),(0,K.useEffect)(()=>()=>window.clearTimeout(B.current),[]);let Te=async e=>{if(ae(!1),_e)return!1;he.current=_?.requestId,R(A),F(!0),ee(!1),te.current=!1,z.current=!1,window.clearTimeout(B.current),se(null);try{let t=await v(e);return t?(ee(!0),te.current=!0,B.current=window.setTimeout(()=>{!te.current||z.current||(te.current=!1,z.current=!1,xe(),b())},2e3)):se(w(`setupRequestFailed`)),t}catch(e){return F(!1),se(e instanceof Error?e.message:w(`setupRequestFailed`)),!1}finally{F(!1)}},Ee=async()=>{if(_e||!ye?.sessionPath)throw Error(w(`resourceReloadFailed`));F(!0);try{await new de().reloadSettingsResources(e,ye.sessionPath),xe(),b()}finally{F(!1)}},U=async e=>{if(V.current||!ye)return!1;V.current=!0,re(!0),ae(!1),se(null);try{let t=await new de().savePreferences(e);return Ce(t.setup),ae(!0),b(),!0}catch{return se(w(`settingsPreferencesSaveFailed`)),!1}finally{V.current=!1,re(!1)}},De=e=>{me||(j(e),k(``),e===`models`&&N(!0),se(null))};(0,K.useEffect)(()=>{let e=new URL(window.location.href);e.searchParams.set(`settings`,A),window.history.replaceState(window.history.state,``,e)},[A]);let Oe=XW.filter(({label:e,terms:t})=>[e,...t].some(e=>w(e).normalize(`NFKC`).toLocaleLowerCase().includes(O.trim().normalize(`NFKC`).toLocaleLowerCase()))),ke=(e,t=!1)=>{if(!me){if(ce&&!t){pe(e);return}pe(null),e.kind===`runtime`?S():C()}};return(0,q.jsxs)(Se,{isOpen:!0,purpose:`info`,padding:0,width:`calc(100vw - 32px)`,maxHeight:`calc(100dvh - 16px)`,className:`provider-settings-dialog`,"aria-label":w(`settings`),onOpenChange:e=>{!e&&!fe&&ke({kind:`close`})},children:[(0,q.jsxs)(`section`,{className:`provider-settings-surface`,children:[(0,q.jsxs)(`aside`,{className:`provider-settings-sidebar`,children:[(0,q.jsxs)(`header`,{className:`provider-settings-header`,children:[(0,q.jsx)(`strong`,{className:`provider-settings-title`,children:w(`settings`)}),(0,q.jsx)(`select`,{className:`provider-settings-mobile-picker`,"aria-label":w(`settingsNavigation`),disabled:me,value:A,onChange:e=>{let t=XW.find(({id:t})=>t===e.target.value);t&&De(t.id)},children:XW.map(({id:e,label:t})=>(0,q.jsx)(`option`,{value:e,children:w(t)},e))})]}),(0,q.jsxs)(`label`,{className:`provider-settings-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":w(`settingsSearch`),placeholder:w(`settingsSearch`),value:O,onChange:e=>k(e.target.value),disabled:me}),O&&(0,q.jsx)(`button`,{type:`button`,"aria-label":w(`settingsClearSearch`),onClick:()=>k(``),children:(0,q.jsx)(je,{"aria-hidden":`true`})})]}),(0,q.jsxs)(`div`,{className:`provider-settings-navigation`,ref:D,"aria-label":w(`settingsNavigation`),role:`tablist`,"aria-orientation":`vertical`,children:[[`settingsPersonal`,`settingsAgent`,`settingsIntegrations`].map(e=>(0,q.jsxs)(`div`,{className:`provider-settings-nav-group`,children:[Oe.some(t=>t.group===e)&&(0,q.jsx)(`p`,{children:w(e)}),Oe.filter(t=>t.group===e).map(({id:e,label:t,Icon:n})=>(0,q.jsxs)(`button`,{type:`button`,role:`tab`,disabled:me,id:`settings-tab-${e}`,tabIndex:A===e||!Oe.some(e=>e.id===A)&&Oe[0]?.id===e?0:-1,"aria-selected":A===e,"aria-controls":`settings-panel-${e}`,className:`provider-settings-tab`,title:w(t),onClick:()=>De(e),onKeyDown:t=>{if(t.altKey||t.ctrlKey||t.metaKey||t.nativeEvent.isComposing)return;let n=Oe.findIndex(t=>t.id===e),r=t.key===`Home`?0:t.key===`End`?Oe.length-1:t.key===`ArrowDown`||t.key===`ArrowRight`?(n+1)%Oe.length:t.key===`ArrowUp`||t.key===`ArrowLeft`?(n+Oe.length-1)%Oe.length:void 0;if(r===void 0)return;t.preventDefault();let i=Oe[r].id;De(i),D.current?.querySelector(`#settings-tab-${i}`)?.focus()},children:[(0,q.jsx)(n,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:w(t)})]},e))]},e)),Oe.length===0&&(0,q.jsx)(`p`,{className:`provider-settings-no-results`,role:`status`,children:w(`settingsNoResults`)})]}),(0,q.jsx)(`button`,{ref:E,type:`button`,className:`icon-button provider-settings-close`,"aria-label":w(`close`),disabled:me,title:w(me?`savingSettings`:`close`),onClick:()=>ke({kind:`close`}),children:(0,q.jsx)(je,{})})]}),(0,q.jsxs)(`div`,{className:`provider-settings-body`,children:[ge&&A!==`browser`&&(0,q.jsxs)(`div`,{className:`settings-plan-notice`,role:`status`,children:[(0,q.jsx)(`span`,{children:w(T?`setupPlanBusy`:`setupPlanBlocked`)}),(0,q.jsx)(Br,{label:w(`planModeExit`),variant:`secondary`,size:`sm`,isDisabled:T||h||!g,onClick:()=>void g?.()})]}),(0,q.jsxs)(`div`,{className:`provider-settings-main`,children:[(0,q.jsx)(`div`,{id:`settings-panel-configuration`,"aria-labelledby":`settings-tab-configuration`,"aria-label":w(`configurationSettings`),role:`tabpanel`,hidden:A!==`configuration`,children:A===`configuration`&&(0,q.jsx)(Aj,{catalog:ye,error:be,pending:_e||I&&L===`configuration`&&(!ve||ve.status===`pending`),preferencePending:ne,onConfigure:Te,onUpdatePreferences:U,onRefresh:xe,onOpenRuntimeStatus:()=>ke({kind:`runtime`})})}),(0,q.jsx)(`div`,{id:`settings-panel-appearance`,"aria-labelledby":`settings-tab-appearance`,"aria-label":w(`appearance`),role:`tabpanel`,hidden:A!==`appearance`,children:(0,q.jsx)(JW,{catalog:ye,theme:s,pending:ne,error:be,onRefresh:xe,onUpdatePreferences:U})}),(0,q.jsx)(`div`,{id:`settings-panel-archived-chats`,"aria-labelledby":`settings-tab-archived-chats`,"aria-label":w(`settingsArchivedChats`),role:`tabpanel`,hidden:A!==`archived-chats`,children:A===`archived-chats`&&(0,q.jsx)(YW,{workspaces:l,onRestore:u??(async()=>!1)})}),(0,q.jsx)(`div`,{id:`settings-panel-web-search`,"aria-labelledby":`settings-tab-web-search`,"aria-label":w(`webSearchSettings`),role:`tabpanel`,hidden:A!==`web-search`,children:A===`web-search`&&(0,q.jsx)(jj,{catalog:ye,error:be,pending:_e,onConfigure:Te,onRefresh:xe})}),(0,q.jsx)(`div`,{id:`settings-panel-browser`,"aria-labelledby":`settings-tab-browser`,"aria-label":w(`browserSettings`),role:`tabpanel`,hidden:A!==`browser`,children:A===`browser`&&(0,q.jsx)(Oj,{onConfigure:Te,setupPending:_e})}),(0,q.jsx)(`div`,{id:`settings-panel-general`,"aria-labelledby":`settings-tab-general`,"aria-label":w(`generalSettings`),role:`tabpanel`,hidden:A!==`general`,children:(0,q.jsx)(TW,{catalog:ye,error:be,currentModel:a,thinkingLevel:o,cwd:n,setupPending:P||T,preferencePending:ne||!ye,setupBusy:T,setupBlockedReason:p,setupBlocked:ge||h,onConfigure:Te,onUpdatePreferences:U,onOpenRuntimeStatus:()=>ke({kind:`runtime`}),onRefresh:xe})}),(0,q.jsx)(`section`,{id:`settings-panel-models`,"aria-labelledby":`settings-tab-models`,"aria-label":w(`modelSettings`),className:`settings-models`,role:`tabpanel`,hidden:A!==`models`,children:M&&(0,q.jsx)(oW,{sessionId:e,sessionPath:t,models:i,currentModel:a,busy:T,focusCredentials:r===`credentials`,onSaved:async()=>(xe(),b()),onSelectModel:x,onDraftChange:le,onSavingChange:ue},e)}),(0,q.jsx)(`div`,{id:`settings-panel-skills`,"aria-labelledby":`settings-tab-skills`,"aria-label":w(`skillsSettings`),role:`tabpanel`,hidden:A!==`skills`,children:(0,q.jsx)(jW,{catalog:ye,error:be,onRefresh:xe,setupPending:_e,onConfigure:Te,onReload:Ee},e)}),(0,q.jsx)(`div`,{id:`settings-panel-subagents`,"aria-labelledby":`settings-tab-subagents`,"aria-label":w(`subagentsSettings`),role:`tabpanel`,hidden:A!==`subagents`,children:(0,q.jsx)(MW,{catalog:ye,error:be,currentModel:a,models:i,activity:d?.subagents,setupPending:P||T,setupBlocked:ge||h,onConfigure:Te,onRefresh:xe})}),(0,q.jsx)(`div`,{id:`settings-panel-plugins`,"aria-labelledby":`settings-tab-plugins`,"aria-label":w(`pluginsSettings`),role:`tabpanel`,hidden:A!==`plugins`,children:(0,q.jsx)(FW,{catalog:ye,error:be,onRefresh:xe,setupPending:_e,onConfigure:Te,onReload:Ee},e)})]}),y,oe&&(0,q.jsx)(`div`,{className:`settings-global-error`,role:`alert`,children:oe}),(ne||ie)&&!oe&&!we&&(0,q.jsx)(`div`,{className:`settings-global-status`,role:`status`,children:w(ne?`savingSettings`:`settingsPreferencesSaved`)}),!ne&&(!ie||we)&&(I&&L===A||ve)&&!oe&&(0,q.jsxs)(`div`,{className:ve?.status===`failed`?`settings-global-error`:`settings-global-status`,role:ve?.status===`failed`?`alert`:`status`,children:[w(ve?(A===`skills`||A===`plugins`||A===`web-search`)&&[`unconfirmed`,`saved`,`unchanged`].includes(ve.status)?`resourceRequestFinished`:`setupOutcome_${ve.status}`:T?`setupRequestRunning`:A===`skills`||A===`plugins`||A===`web-search`?`resourceRequestSubmitted`:`setupRequestAccepted`),ve?.error&&(0,q.jsx)(`p`,{children:ve.error})]})]})]}),fe&&(0,q.jsx)(uj,{isOpen:!0,onOpenChange:e=>{e||pe(null)},title:w(`unsavedSettingsTitle`),description:w(`unsavedSettingsDetail`),cancelLabel:w(`keepEditing`),actionLabel:w(`discardAndContinue`),onAction:()=>ke(fe,!0)})]})}function $W({identity:e}){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;let n=t%6;return(0,q.jsx)(`span`,{className:`subagent-avatar tone-${n}`,"aria-hidden":`true`,children:(0,q.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.3`,children:[(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,q.jsx)(`ellipse`,{cx:`12`,cy:`12`,rx:`4`,ry:`9`}),(0,q.jsx)(`path`,{d:`M3 12h18M5 6.5c4 3 10 3 14 0M5 17.5c4-3 10-3 14 0`})]},`sphere`),(0,q.jsx)(`g`,{children:(0,q.jsx)(`path`,{d:`M4 20V4a16 16 0 0 1 16 16H4ZM4 4l16 16M4 9l11 11M4 14l6 6M10 5l-6 15M16 10L4 20`})},`fan`),(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{d:`m12 2 3 6 7-1-4 5 4 5-7-1-3 6-3-6-7 1 4-5-4-5 7 1Z`}),(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`})]},`rosette`),(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`}),(0,q.jsx)(`path`,{d:`M3 12h18M12 3a9 9 0 0 0 0 18M12 6a6 6 0 0 0 0 12M12 9a3 3 0 0 0 0 6M12 3v18`})]},`arcs`),(0,q.jsx)(`g`,{children:(0,q.jsx)(`path`,{d:`m12 2 9 5v10l-9 5-9-5V7Zm0 0v20M3 7l18 10M21 7 3 17M3 7l9 5 9-5M3 17l9-5 9 5`})},`prism`),(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{d:`M12 12V2c6 0 10 4 10 10H12Zm0 0v10C6 22 2 18 2 12h10ZM12 12H2C2 6 6 2 12 2v10Zm0 0h10c0 6-4 10-10 10V12Z`}),(0,q.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2`,fill:`currentColor`})]},`windmill`)][n]})})}function eG(e,t,n,r){let i=(0,K.useMemo)(()=>new de,[]),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(!1),[l,u]=(0,K.useState)(!1),[d,f]=(0,K.useState)(0),p=(0,K.useRef)(null);return(0,K.useEffect)(()=>{if(!n)return;let r=new AbortController;return p.current=r,c(!0),u(!1),i.sessionSources(e,t,r.signal).then(n=>{!r.signal.aborted&&n.sessionId===e&&n.path===t&&o(n)}).catch(()=>{r.signal.aborted||u(!0)}).finally(()=>{r.signal.aborted||(c(!1),p.current=null)}),()=>{r.abort(),p.current?.abort(),p.current=null}},[i,e,t,n,r,d]),{page:a?.sessionId===e&&a.path===t?a:null,loading:s,error:l,loadMore:async()=>{if(p.current||!a||a.nextOffset===void 0)return;let n=new AbortController;p.current=n,c(!0),u(!1);try{let r=await i.sessionSources(e,t,n.signal,a.nextOffset,a.revision);!n.signal.aborted&&r.sessionId===e&&r.path===t&&r.revision===a.revision&&o({...r,sources:[...a.sources,...r.sources]})}catch{n.signal.aborted||u(!0)}finally{n.signal.aborted||(c(!1),p.current=null)}},refresh:()=>f(e=>e+1)}}function tG({sessionId:e,path:t,source:n,thumbnail:r=!1,active:i=!0}){let{t:a}=W(),o=(0,K.useRef)(null),[s,c]=(0,K.useState)(!1),l=JSON.stringify([e,t,n.entryId,n.partIndex]),[u,d]=(0,K.useState)(null);(0,K.useEffect)(()=>{if(!r||!o.current||typeof IntersectionObserver>`u`)return;let e=new IntersectionObserver(([e])=>c(!!e?.isIntersecting));return e.observe(o.current),()=>e.disconnect()},[r]),(0,K.useEffect)(()=>{if(!i||r&&!s){d(null);return}let a=new AbortController,o;return d({identity:l}),new de().sourceImage(e,t,n.entryId,n.partIndex,a.signal).then(e=>{if(a.signal.aborted)return;if(![`image/png`,`image/jpeg`,`image/gif`,`image/webp`].includes(e.mimeType)||e.data.length>xe)throw Error(`Invalid image`);let t=atob(e.data);if(t.length>10485760||btoa(t)!==e.data)throw Error(`Invalid image`);let n=Uint8Array.from(t,e=>e.charCodeAt(0));o=URL.createObjectURL(new Blob([n],{type:e.mimeType})),d({identity:l,url:o})}).catch(()=>{a.signal.aborted||d({identity:l,failed:!0})}),()=>{a.abort(),o&&URL.revokeObjectURL(o)}},[e,t,n.entryId,n.partIndex,l,i,r,s]);let f=i&&(!r||s)&&u?.identity===l?u:null;return(0,q.jsx)(`span`,{ref:o,className:`session-source-image`,"data-thumbnail":r||void 0,children:f?.url&&!f.failed?(0,q.jsx)(`img`,{src:f.url,draggable:!1,alt:r?``:n.name||a(`attachedImage`),onError:()=>d({identity:l,failed:!0})}):r?(0,q.jsx)(qs,{"aria-hidden":`true`}):(0,q.jsx)(`p`,{role:f?.failed?`alert`:`status`,children:a(f?.failed?`imagePreviewFailed`:`readingFile`)})})}function nG({source:e,sessionId:t,path:n,onOpen:r,thumbnail:i=!0,detailed:a=!1}){let{t:o}=W();return(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row session-source-row${a?` source-detail-row`:``}`,title:e.reference||e.name||o(`attachedImage`),onClick:r,children:[(0,q.jsx)(`span`,{className:`session-source-icon`,children:e.kind===`image`?i?(0,q.jsx)(tG,{sessionId:t,path:n,source:e,thumbnail:!0}):(0,q.jsx)(qs,{"aria-hidden":`true`}):(0,q.jsx)(Fs,{"aria-hidden":`true`})}),a?(0,q.jsxs)(`span`,{className:`session-source-copy`,children:[(0,q.jsx)(`strong`,{children:e.name||o(`attachedImage`)}),e.reference&&(0,q.jsx)(`span`,{className:`source-detail-reference`,children:e.reference}),(0,q.jsx)(`span`,{className:`source-detail-status`,children:o(`sourceAttached`)})]}):(0,q.jsx)(`span`,{children:e.name||o(`attachedImage`)})]})}function rG({sessionId:e,path:t,data:n,onSelect:r}){let{t:i}=W(),a=be(),o=(0,K.useRef)(null),s=(0,K.useRef)(a?.sources?.scroll??0);return(0,K.useLayoutEffect)(()=>{n.page?.sources.length&&o.current&&(o.current.scrollTop=s.current)},[n.page?.sources.length]),(0,q.jsxs)(`div`,{className:`session-sources-list`,ref:o,onScroll:e=>{s.current=e.currentTarget.scrollTop,a&&(a.sources={scroll:s.current})},children:[!n.loading&&!n.error&&!n.page?.sources.length&&(0,q.jsx)(`p`,{children:i(`sourcesEmpty`)}),n.page?.sources.map(n=>(0,q.jsx)(nG,{source:n,sessionId:e,path:t,onOpen:()=>r(n),detailed:!0},n.id)),n.error&&(0,q.jsxs)(`p`,{role:`alert`,children:[i(`sourcesFailed`),` `,(0,q.jsx)(`button`,{type:`button`,onClick:n.refresh,children:i(`gitReviewRetry`)})]}),n.loading&&(0,q.jsx)(`p`,{role:`status`,children:i(`readingFile`)}),n.page?.nextOffset!==void 0&&(0,q.jsx)(`button`,{className:`sources-load-more`,type:`button`,disabled:n.loading,onClick:()=>void n.loadMore(),children:i(`sourcesLoadMore`)}),n.page?.truncated&&(0,q.jsx)(`p`,{children:i(`sourcesPartial`)})]})}function iG({sessionId:e,path:t,revision:n}){let{t:r}=W(),i=eG(e,t,!0,n),a=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=requestAnimationFrame(()=>a.current?.focus({preventScroll:!0}));return()=>cancelAnimationFrame(e)},[]);let o=(0,K.useContext)($E),[s,c]=(0,K.useState)(null),l=e=>{e?.kind===`file`&&e.reference?o?.open(e.reference,void 0,document.activeElement instanceof HTMLElement?document.activeElement:void 0):c(e)};return(0,q.jsxs)(`section`,{className:`session-sources-panel`,ref:a,tabIndex:-1,"aria-label":r(`sessionSources`),children:[(0,q.jsx)(rG,{sessionId:e,path:t,data:i,onSelect:l}),(0,q.jsx)(aG,{sessionId:e,path:t,open:!!s,source:s,data:i,onSelect:l,onClose:()=>c(null)})]})}function aG({sessionId:e,path:t,open:n,source:r,data:i,onSelect:a,onClose:o}){let{t:s}=W(),[c,l]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{r?.id,l(!1)},[e,t,r?.id]),(0,q.jsx)(Se,{isOpen:n,onOpenChange:e=>!e&&o(),purpose:`info`,width:800,maxHeight:`calc(100dvh - 32px)`,padding:0,"aria-label":s(`sessionSources`),children:n&&(0,q.jsxs)(`div`,{className:`session-sources-dialog draft-image-preview`,children:[(0,q.jsxs)(`header`,{children:[r&&i&&(0,q.jsx)(`button`,{type:`button`,"aria-label":s(`sourcesBack`),onClick:()=>a(null),children:(0,q.jsx)(Ko,{})}),(0,q.jsx)(`strong`,{title:r?.name,children:r?r.name||s(`attachedImage`):s(`sessionSources`)}),r&&(0,q.jsx)(`button`,{type:`button`,"aria-pressed":c,onClick:()=>l(e=>!e),children:s(c?`fitImage`:`originalImageSize`)}),(0,q.jsx)(`button`,{type:`button`,"data-autofocus":!0,"aria-label":s(`close`),onClick:o,children:(0,q.jsx)(je,{})})]}),r?(0,q.jsx)(lO,{original:c,children:(0,q.jsx)(tG,{sessionId:e,path:t,source:r,active:n},JSON.stringify([e,t,r.id]))},JSON.stringify([e,t,r.id])):i?(0,q.jsx)(rG,{sessionId:e,path:t,data:i,onSelect:a}):null]})})}function oG({sessionId:e,workspace:t,agents:n,omitted:r,omittedWorkflows:i=0,review:a,onSubagents:o,onReview:s,onSources:c,sessionPath:l,revision:u,onAddSources:d,reviewLoading:f=!1,reviewError:p}){let{t:m}=W(),[h,g]=(0,K.useState)(!1),_=(0,K.useRef)(null),[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(!0),S=(0,K.useId)(),[C,w]=(0,K.useState)(null),T=eG(e,l??``,!!(l&&(h||v)),u),E=(0,K.useContext)($E),D=a?.ok?a.snapshot.totals:void 0,O=e=>{!e&&c?(y(!1),w(null),P(c)):e?.kind===`file`&&e.reference?(y(!1),P(()=>E?.open(e.reference,void 0,_.current??void 0))):P(()=>{w(e),y(!0)})},k=n.filter(e=>e.state===`running`),A=n.filter(e=>e.state===`done`),j=n.length-k.length-A.length,M=[...k,...n.filter(e=>e.state!==`running`)].slice(0,4),N=[k.length?m(`subagentSummaryRunning`,{count:k.length}):``,A.length?m(`subagentSummaryDone`,{count:A.length}):``,j?m(`subagentSummaryOther`,{count:j}):``].filter(Boolean).join(` · `)||m(`subagentNoneYet`),P=e=>{g(!1),_.current?.focus(),e()};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Zu,{isOpen:h,onOpenChange:g,placement:`below`,alignment:`end`,width:`min(340px, calc(100vw - 24px))`,label:m(`sessionOverview`),closeButtonLabel:m(`close`),isModal:!1,content:(0,q.jsxs)(`div`,{className:`session-overview`,children:[(0,q.jsx)(`p`,{className:`session-overview-title`,children:t}),(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row`,title:m(`sessionOverviewChanges`),onClick:()=>P(s),children:[(0,q.jsx)(Ms,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:m(`overviewChanges`)}),D&&!p?(0,q.jsxs)(`span`,{className:`session-overview-diff`,title:m(D.complete?`overviewLineTotals`:`overviewPartialTotals`),children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,D.additions.toLocaleString()]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,D.deletions.toLocaleString()]}),!D.complete&&(0,q.jsx)(`span`,{className:`session-overview-note`,children:m(`gitReviewPartialLabel`)})]}):(0,q.jsx)(`span`,{className:`session-overview-note`,children:m(f?`overviewCounting`:a?.ok?`overviewCountsUnknown`:`overviewReviewUnavailable`)})]}),(0,q.jsxs)(`div`,{className:`session-overview-section`,children:[(0,q.jsx)(`p`,{children:m(`subagentDetails`)}),(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row session-overview-agents`,onClick:()=>P(o),"aria-label":`${m(`subagentDetails`)}: ${N}`,children:[M.length>0&&(0,q.jsx)(`span`,{className:`subagent-avatar-stack`,children:M.map(t=>(0,q.jsx)($W,{identity:`${e}:${t.id}`},t.id))}),(0,q.jsx)(`span`,{className:`session-overview-agent-counts`,children:N.split(` · `).map(e=>(0,q.jsx)(`span`,{children:e},e))}),(0,q.jsx)(os,{"aria-hidden":`true`})]}),r>0&&(0,q.jsx)(`small`,{children:m(`subagentListTruncated`,{count:r})}),i>0&&(0,q.jsx)(`small`,{children:m(`subagentWorkflowsTruncated`,{count:i})})]}),l&&(0,q.jsxs)(`div`,{className:`session-overview-section`,children:[(0,q.jsxs)(`div`,{className:`session-overview-section-heading`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`session-sources-toggle`,"aria-expanded":b,"aria-controls":S,onClick:()=>x(e=>!e),children:[(0,q.jsx)(`span`,{children:m(`sessionSources`)}),T.page&&(T.page.total!==void 0||T.page.nextOffset===void 0)&&(0,q.jsxs)(`span`,{children:[`· `,T.page.total??T.page.sources.length,T.page.truncated?`+`:``]}),(0,q.jsx)(os,{"aria-hidden":`true`})]}),d&&(0,q.jsx)(V,{content:m(`sourcesAdd`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":m(`sourcesAdd`),onClick:()=>P(d),children:(0,q.jsx)(Ae,{})})})]}),(0,q.jsxs)(`div`,{id:S,hidden:!b,children:[T.page?.sources.slice(0,3).map(t=>(0,q.jsx)(nG,{source:t,sessionId:e,path:l,onOpen:()=>O(t)},t.id)),T.error?(0,q.jsxs)(`p`,{role:`alert`,children:[m(`sourcesFailed`),` `,(0,q.jsx)(`button`,{type:`button`,onClick:T.refresh,children:m(`gitReviewRetry`)})]}):!T.page?.sources.length&&(0,q.jsx)(`p`,{children:m(T.loading?`readingFile`:`sourcesEmpty`)}),!!(T.page&&(T.page.sources.length>3||T.page.nextOffset!==void 0))&&(0,q.jsxs)(`button`,{type:`button`,className:`session-overview-row sources-view-all`,onClick:()=>O(null),children:[(0,q.jsx)(Qs,{}),(0,q.jsx)(`span`,{children:m(`sourcesViewAll`)}),(0,q.jsx)(os,{})]})]})]})]}),children:e=>(0,q.jsx)(V,{content:m(`sessionOverview`),placement:`below`,children:(0,q.jsx)(`button`,{...e,ref:t=>{e.ref(t),_.current=t},type:`button`,className:`task-tools-trigger`,"aria-label":m(`sessionOverview`),children:(0,q.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,"aria-hidden":`true`,children:[(0,q.jsx)(`circle`,{cx:`5.5`,cy:`7`,r:`2.8`}),(0,q.jsx)(`circle`,{cx:`5.5`,cy:`17`,r:`2.8`}),(0,q.jsx)(`path`,{d:`M12 7h8M12 17h8`})]})})})}),l&&(0,q.jsx)(aG,{sessionId:e,path:l,open:v,source:C,data:T,onSelect:O,onClose:()=>{y(!1),w(null)}})]})}function sG(e){return e<1e3?Math.round(e).toString():e<1e4?`${(e/1e3).toFixed(1)}k`:e<1e6?`${Math.round(e/1e3)}k`:`${(e/1e6).toFixed(1)}M`}function cG(e){if(!e)return;let{input:t,output:n,cacheRead:r,cacheWrite:i}=e;if(t===0&&n===0&&r===0&&i===0)return;let a=t+r+i,o=r>0?` (${sG(r)} cached)`:``;return`${sG(a)} in${o} · ${sG(n)} out`}function lG(e,t,n){if([`session_start`,`session_switched`,`session_created`].includes(t))return e.length===0?e:[];if([`agent_settled`,`turn_settled`].includes(t))return e.some(e=>e.state===`running`)?e.map(e=>e.state===`running`?{...e,state:`unknown`}:e):e;if(!t.startsWith(`tool_execution_`))return e;let r=n.toolCallId;if(typeof r!=`string`||r.length>500)return e;let i=e.find(e=>e.call.id===r);if(i&&i.state!==`running`&&(i.state!==`unknown`||t!==`tool_execution_end`))return e;let a=dd(n.call),o=a.type===`toolCall`&&typeof a.name==`string`&&typeof a.arguments==`string`?a:i?.call;if(!o||o.evidenceTruncated&&o.id?.includes(`[truncated]`))return e;let s=dd(n.result),c=typeof s.content==`string`?s:i?.result,l=typeof n.parentToolCallId==`string`&&n.parentToolCallId.length<=500?n.parentToolCallId:i?.parentToolCallId,u={call:o,result:c,...l?{parentToolCallId:l}:{},state:t===`tool_execution_end`?n.isError===!0?`failed`:`returned`:`running`},d=(i?e.map(e=>e.call.id===r?u:e):[...e,u]).slice(-32);for(;d.length>0&&new TextEncoder().encode(JSON.stringify(d)).byteLength>524288;)d.shift();return d}var uG={en:{translation:{quitOpenPI:`Quit OpenPI`,quittingOpenPI:`Quitting…`,quitConfirmHelp:`Quit this OpenPI Web application? All running tasks in this Web application will stop. Conversations are saved and will be available when you restart.`,quitTabHelp:`Closing this browser tab alone leaves OpenPI and its tasks running in the background.`,quitAccepted:`OpenPI is shutting down`,quitAcceptedHelp:`The quit request was accepted. Wait for the terminal to confirm that OpenPI has stopped, then you can close this tab.`,quitRestartHelp:`To restart, run openpi web in a terminal, or /web in Pi, then open the address it displays. Refreshing this page does not restart OpenPI.`,quitFailed:`Could not confirm shutdown. Check the terminal before trying again. You can also stop OpenPI with Ctrl+C in its terminal.`,promptPending:`Processing your request…`,commandFeedbackTruncated:`This is a limited command preview. Narrow the query or run it in the TUI for the full output.`,planMode_inactive:`Normal mode`,planMode_planning:`Planning · writes blocked`,planMode_ready:`Plan ready · awaiting review`,planMode_invalid:`Plan state invalid · writes blocked`,planModeEnter:`Plan`,promptPlanMessage:`This conversation uses Plan mode · discuss the plan; no implementation yet`,planModeUnconfirmed:`Could not confirm Plan mode. Refresh before continuing.`,planModeExit:`Exit planning`,planModeImplement:`Prepare implementation prompt`,planImplementationReplaceDraft:`Preparing this plan will replace the current draft and turn off Plan mode. The prompt will not be sent. Continue?`,commandSupport_plan:`Planning and same-session implementation prompts are available. Starting a fresh implementation session still requires the TUI.`,commandSupport_setup:`Configuration uses the active model; questions are answered in Web.`,handoffWaiting:`Manual action`,handoffDone:`Done`,handoffUnable:`Unable to complete`,handoffDoneHelp:`I performed the action. The agent still needs to verify it.`,handoffUnableHelp:`I could not finish. I can add a note about the blocker.`,handoffReview:`Review status`,handoffSubmit:`Submit status`,handoffSignal:`Expected result:`,handoffVerify:`Reporting Done lets the agent continue and verify; it is not proof of success.`,planCardLabel:`Development plan`,planCardReady:`Plan ready`,planCardResult:`Plan result`,planCardNotApproval:`This step produced a plan. It did not approve or start implementation.`,planCardCollapse:`Collapse`,planCardExpand:`Expand`,planCardCopy:`Copy plan`,planCardCopyPreview:`Copy visible preview`,planCardTruncated:`Only a bounded preview is displayed.`,planCardLoadFull:`Load full plan`,planCardLoadingFull:`Loading plan...`,planCardLoadFailed:`Could not load the full plan. Retry`,planCardEvidence:`Tool result · plan_ready`,questionWaiting:`Question`,questionPreview:`View preview`,questionSkip:`Skip`,questionProgress:`{{current}} of {{total}}`,questionReview:`Review answers`,questionReviewTitle:`Ready to send?`,questionReviewHelp:`Review your choices. Nothing is sent until you submit.`,questionEdit:`Edit answer: {{question}}`,questionDismiss:`Dismiss questions without answering`,questionCustom:`Or write your own reply`,questionCustomHelp:`Or leave it blank to ask for a clearer question.`,questionYourAnswer:`Your answer`,questionCustomPlaceholder:`Describe what you have in mind…`,questionNotes:`Additional context (optional)`,questionNotesPlaceholder:`Add a constraint or clarify your choice…`,questionRephrase:`Ask for a clearer or smaller question`,questionBack:`Back`,questionNext:`Next question`,questionSubmit:`Submit answers`,questionSubmitting:`Sending…`,questionRetry:`Check submission`,questionUncertain:`We could not confirm delivery. Your submitted answers are kept here. Check submission to recover the result without sending them twice.`,questionDisconnected:`Reconnecting… Your choices stay here; submitting is paused.`,questionLimit:`Keep each answer or note within {{count}} UTF-8 bytes.`,questionLoadFailed:`Could not check for questions awaiting your answer.`,questionDraftLimit:`Question drafts are full. Shorten or clear an existing answer before adding more text.`,questionRetryLoad:`Try again`,questionCloseReceipt:`Close question status`,questionState_dismissed:`Questions dismissed. No answers were submitted.`,questionState_cancelled:`Questions cancelled. No answers were submitted.`,questionState_expired:`Questions expired. No answers were submitted.`,questionState_stale:`This request is no longer active. Check the conversation for its result.`,conversationView:`Conversation view`,jumpToLatest:`Jump to latest`,historyLoading:`Loading history…`,historyOmitted:`{{count}} earlier entries · Scroll up to load automatically`,historyChanged:`The Session branch changed. History has been reset to the current branch.`,historyUnavailable:`Could not load history. Please retry.`,historyValidationUnavailable:`Could not verify the conversation history. Please retry.`,historyVerifying:`Checking conversation history…`,messageLoadFull:`Load full message`,messageLoadMore:`Load more`,messageLoadingFull:`Loading message…`,messageLoadFailed:`Could not load this message. Retry`,filePreview:`File preview`,changeEvidence:`Changes`,changeEvidenceScope:`Read-only Git snapshot of changes since this session started.`,turnLabel:`Turn {{number}}`,turnState_running:`Running`,turnState_complete:`Completed`,turnState_failed:`Failed`,turnState_interrupted:`Interrupted`,turnState_waiting:`Waiting for response`,turnState_forked:`Forked · Ready to continue`,turnChanges_one:`{{count}} file changed during this turn`,turnChanges_other:`{{count}} files changed during this turn`,turnChangesPartial:`At least {{count}} files changed during this turn`,turnChangesIncomplete:`This turn's change record is incomplete.`,turnChangesMore:`Show {{count}} more files`,turnChangesLess:`Show fewer files`,turnChangesReview:`Review turn changes`,turnChangesReviewButton:`Review`,turnChangesBack:`Back to turn changes`,turnChangesLoading:`Loading this turn's changes…`,turnChangesUnavailable:`This turn's saved diff is unavailable.`,messageCopyRequiresFull:`Load the full message before copying.`,filesChanged_one:`{{count}} file changed`,filesChanged_other:`{{count}} files changed`,reviewChanges:`Review changes`,workspaceChanges:`Workspace changes`,overviewChanges:`Changes`,overviewLineTotals:`Text lines added and removed across the current Git comparison`,overviewPartialTotals:`Known line counts only; some files could not be counted. Open Changes for details.`,overviewCounting:`Counting…`,overviewCountsUnknown:`Counts unavailable`,overviewReviewUnavailable:`Unavailable`,sessionSources:`Sources`,sourcesAdd:`Add source`,sourcesDescription:`Browse this conversation's attached images and files`,sourceAttached:`Attached to this conversation`,sourcesEmpty:`No sources yet`,sourcesFailed:`Could not load sources.`,sourcesViewAll:`View all`,sourcesLoadMore:`Load more sources`,sourcesBack:`Back to sources`,sourcesPartial:`This list has reached its display limit. Earlier sources remain in the conversation.`,turnChangesScope:`Saved workspace changes during this turn`,turnEdits_one:`Edited {{count}} file`,turnEdits_other:`Edited {{count}} files`,turnEditsPartial:`Recorded edits to {{count}} files`,turnEditsScope:`This turn's recorded file-tool writes · saved; shell and external edits are not included`,turnEditStatsUnknown:`Line counts unavailable`,turnEditReason_before_unavailable:`The write completed, but previous contents were not authorized for reading. A before/after diff is unavailable.`,turnEditReason_content_limit:`The write completed. Content exceeds the saved comparison limit, so exact line counts are unavailable.`,turnEditReason_concurrent_change:`The file changed between recorded operations. A reliable net diff for this turn is unavailable.`,gitReviewLoadedCount:`{{count}} files loaded`,gitReviewPartialLabel:`Partial`,gitReviewSearch:`Search file paths`,gitReviewExpand:`Expand review`,gitReviewSearchLoaded:`Search loaded files`,gitReviewMarkViewed:`Mark {{path}} as viewed`,gitReviewMarkCurrentViewed:`Mark current file {{path}} as viewed`,gitReviewViewedLabel:`Viewed`,gitReviewViewedProgress:`Viewed {{viewed}} / {{loaded}} loaded files`,gitReviewViewedLimit:`Up to {{count}} viewed marks are remembered for this comparison.`,gitReviewNoMatch:`No matching files.`,gitReviewNoLoadedMatch:`No matches in the loaded files.`,gitReviewLoadNext:`Load the next files`,gitReviewChanged:`The workspace changed. Refresh the list before loading more.`,gitReviewNewVersion:`New changes are available. You are reading the previous version.`,gitReviewShowLatest:`Show latest diff`,gitReviewBinary:`No text diff is available for this binary file.`,gitReviewBinaryShort:`Binary`,gitReviewPendingStats:`Not loaded`,gitReviewComparison:`{{current}} compared with {{base}}`,gitReviewWorkingTree:`Working tree compared with HEAD`,gitReviewSessionSnapshot:`Changes since this session started`,gitReviewDetached:`Detached HEAD`,gitReviewLoading:`Reading Git changes…`,gitReviewRetry:`Retry`,gitReviewRefresh:`Refresh changes`,gitReviewOlderResult:`Showing the previous result.`,gitReviewNotRepository:`This workspace is not a Git repository.`,gitReviewUnborn:`This repository has no readable HEAD yet.`,gitReviewFailed:`Git changes could not be read.`,gitReviewTruncated:`The change snapshot reached its file or diff size limit.`,gitReviewEmpty:`No changes in this comparison.`,gitReviewHiddenLines:`{{count}} more diff lines hidden.`,gitReviewDiffTruncated:`This file's diff was not loaded because the snapshot reached its size limit.`,gitReviewShowMore:`Show {{count}} more files`,gitReviewBackToFiles:`Back to changed files`,gitReviewFilePreview:`Diff for {{file}}`,gitReviewNoDiff:`No text diff is available for this file.`,changeDiff:`Change diff`,diffViewMode:`Diff view`,diffUnified:`Unified`,diffSplit:`Side by side`,diffBefore:`Before`,diffAfter:`After`,diffView:`Diff`,gitFileStatus_added:`Added`,gitFileStatus_modified:`Modified`,gitFileStatus_deleted:`Deleted`,gitFileStatus_renamed:`Renamed`,gitFileStatus_copied:`Copied`,gitFileStatus_untracked:`Untracked`,gitFileStatus_unknown:`Changed`,closePreview:`Close preview`,imageZoom:`Image zoom`,imageZoomHelp:`Zoom is relative to Fit. Use Ctrl + wheel to zoom, then drag to pan.`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,previousImage:`Previous image`,nextImage:`Next image`,imagePosition:`Image {{current}} of {{total}}`,artifactReadOnly:`Read-only`,artifactReferenceUnavailable:`File preview is unavailable in this view: {{path}}`,artifactSession:`Session {{sessionId}}`,copyFilePath:`Copy file path`,filePathCopied:`File path copied`,refreshFile:`Refresh file`,downloadFile:`Download file`,downloadingFile:`Downloading…`,artifactOlderPreview:`Showing an older preview. `,readingFile:`Reading file…`,artifactVersion:`Version`,artifactBytes:`{{count}} bytes`,artifactPreviewTruncated:`Preview truncated. Download the file for the complete content.`,artifactUnsupported:`This file type cannot be previewed. Use Download.`,filesLargeMarkdownSource:`This Markdown preview is large, so it is shown as source to keep scrolling responsive. All loaded text is included.`,chatView:`Chat`,trajectory:`Trajectory`,trajectoryScope:`Recorded Session messages in order, not execution durations or the complete model request.`,trajectoryRunning:`Work is active. This view updates as saved records arrive; in-flight text is available in Chat.`,trajectoryTruncated:`Loaded history is partial: {{entries}} entries omitted, {{parts}} parts omitted, {{messages}} messages truncated.`,trajectoryEmpty:`No saved records yet.`,trajectoryOrder:`Record order`,trajectoryOverview:`Overview`,trajectorySequenceHint:`Record order · widths are not elapsed time`,trajectoryClearRange:`Clear selection`,trajectoryContextLane:`Context`,trajectoryModelLane:`Model`,trajectoryToolLane:`Tools`,trajectorySelectRecord:`Select record {{number}}: {{name}}`,trajectoryTimingTab:`Timing`,trajectoryUsageTab:`Usage`,trajectoryDurationLabel:`Duration`,trajectoryTimingSource:`Source`,trajectoryTimingUnknown:`No execution duration was recorded. Record timestamps are not operation start times.`,trajectoryTimingNative:`Pi nested tool execution`,trajectoryTTFT:`Time to first output`,trajectoryGenerationTime:`Generation time`,trajectoryThroughput:`Output tokens / second`,trajectoryNotRecorded:`Not recorded`,trajectoryUsageUnknown:`This response has no reported token usage in the loaded records.`,trajectoryUsage_input:`Uncached input`,trajectoryUsage_cacheRead:`Cache read`,trajectoryUsage_cacheWrite:`Cache write`,trajectoryUsage_output:`Output`,trajectoryProvider:`Provider`,trajectoryModel:`Model`,trajectoryCode:`Code`,trajectoryWrap:`Wrap lines`,trajectoryCopy:`Copy source`,trajectoryCopied:`Copied`,trajectoryRawArguments:`Original JSON`,trajectoryFoldTurns:`Turns`,trajectoryFoldCalls:`Calls`,trajectoryMetrics:`Loaded execution summary`,trajectoryRequestCount:`{{count}} model responses`,trajectoryToolCount:`{{count}} tool calls`,trajectoryModelResponses:`Model responses`,trajectoryToolCalls:`Tool calls`,trajectoryLastTurn:`Latest recorded turn`,trajectoryEventColumn:`Event`,trajectoryContentColumn:`Content`,trajectoryTurn:`Turn {{number}}`,trajectoryLoadHistory:`Load earlier history`,trajectoryLatestRecords:`Jump to latest records`,trajectoryHistoryLoading:`Loading history…`,trajectoryNestedOutputMissing:`Pi recorded this nested call's status, but did not persist its result body. The outer script's output is separate.`,trajectoryRecordCount:`{{count}} records`,trajectoryMatches:`{{count}} matches`,trajectorySearch:`Search loaded records`,trajectoryNoMatches:`No matching records.`,trajectoryEarlierGroup:`Earlier context`,trajectoryEventCount:`{{count}} Session changes`,trajectorySummary:`Overview`,trajectoryInputTab:`Input`,trajectoryResultTab:`Result`,trajectoryConversationGroup:`Conversation`,trajectoryReasoningTitle:`Thinking`,trajectoryRecordNumber:`Record {{number}}`,trajectoryRecordInfo:`Record information`,trajectoryRecordId:`Record ID`,trajectoryCallId:`Tool call ID`,trajectoryEventType:`Event type`,trajectoryEvent_model_change:`Model changed`,trajectoryEvent_thinking_level_change:`Thinking level changed`,trajectoryEvent_compaction:`Context compacted`,trajectoryEvent_session_info:`Session information updated`,trajectoryEvent_custom:`Session record`,trajectoryEarlier:`Show earlier records ({{count}} remaining in loaded history)`,trajectoryDetails:`Record details`,trajectoryRecordedAt:`Record timestamp`,trajectoryEvidenceTruncated:`This evidence was truncated in the Session projection.`,trajectoryArguments:`Tool arguments`,trajectoryRecordedContent:`Recorded content`,trajectoryThinking:`Recorded model reasoning`,trajectoryOutput:`Tool result`,trajectoryMissingResult:`No unambiguous result is included in the loaded records. This does not imply the tool is still running.`,trajectoryStructured:`Structured result`,trajectoryEventOnly:`Only this event’s type and timestamp are available.`,trajectory_user:`User message`,trajectory_assistant:`Assistant`,trajectory_call:`Tool call`,trajectory_result:`Unpaired result`,trajectory_event:`Session event`,trajectoryRole_user:`User`,trajectoryRole_assistant:`Assistant`,trajectoryRole_call:`Tool`,trajectoryRole_result:`Result`,trajectoryRole_event:`Event`,trajectory_returned:`Tool returned a result.`,trajectory_error:`Tool returned an error`,trajectory_unknown:`Outcome not established`,runtimeStatus:`Runtime status`,runtimeIdentity:`OpenPI runtime information`,runtimeIdentityHint:`Backend information was captured at startup. It does not track later disk changes or Session reloads, and is not proof of every loaded module. Frontend identity describes this page build.`,runtimeIdentityFailed:`Could not read backend runtime information. Try again.`,runtimeBackendVersion:`Backend package version`,runtimePackageRoot:`Backend package directory`,runtimeStartedAt:`Process started`,runtimeGitRevision:`Git revision at startup`,runtimeGitState:`Working tree at startup`,runtimeGitDirty:`Local changes present`,runtimeGitClean:`Clean`,runtimeFrontendVersion:`Page package version`,runtimeFrontendBuild:`Page build ID`,runtimeStartupBuild:`Page build ID recorded at startup`,runtimeDevelopmentBuild:`Development server (no production build ID)`,runtimeBuildMismatch:`This page build differs from the build recorded when the backend started. Refresh the page or restart the service, then check again.`,refreshStatus:`Refresh status`,openTools:`Open tools`,openToolsUnavailable:`Select a chat to open tools`,sideConversation:`Side conversation`,sideConversationDescription:`Ask a focused question in a separate Pi session without interrupting the main task.`,workbarChangesDescription:`Inspect the current Git branch and working tree.`,terminal:`Terminal`,renameTerminal:`Rename terminal`,terminalName:`Terminal name`,workbarTerminalDescription:`Open an interactive shell for the current workspace.`,restartTerminal:`Restart terminal`,reconnectTerminal:`Reconnect terminal`,restartTerminalTitle:`Restart this terminal?`,restartTerminalDetail:`The current terminal will be closed. Running processes may be interrupted.`,terminalReconnecting:`Reconnecting terminal...`,terminalScrollToBottom:`Scroll to bottom`,terminalOutputResynced:`Terminal output resynchronized.`,terminalRestarting:`Restarting terminal...`,terminalConnecting:`Starting terminal…`,terminalExited:`Terminal exited.`,terminalExitCode:`Terminal exited with code {{code}}.`,terminalDisconnected:`Terminal connection ended unexpectedly.`,terminalError:`Terminal unavailable.`,terminalLoadError:`The terminal interface could not load. Refresh the page to try again.`,reloadPage:`Refresh page`,browser:`Browser`,sessionFileRecords:`Session file records`,gitReviewSource:`Changes`,gitReviewBaseBranch:`Compare against branch`,gitReviewChooseBase:`Choose comparison branch`,gitReviewSearchBranches:`Search branches`,gitReviewLocalBranch:`Local branch`,gitReviewRemoteBranch:`Remote branch`,gitReviewBranchesTruncated:`Showing a bounded list of branches. Some branches are omitted.`,gitReviewNoMatchingBranches:`No matching branches.`,gitReviewBaseUnavailable:`No default comparison branch is available. Choose a branch to review committed changes.`,gitReviewBaseInvalid:`The selected comparison branch is unavailable. Choose another branch.`,gitReviewUnstaged:`Unstaged changes`,gitReviewStaged:`Staged changes`,gitReviewBranch:`Branch changes`,gitReviewFileMissing:`This file no longer has changes in this view. Refresh the file list.`,artifactExternalAccess:`This file is in another working directory. You can authorize read-only access to this file for this session; other files remain inaccessible.`,artifactAuthorizeFile:`Open this file read-only`,sideConversationPending:`Preparing side conversation…`,resizeSidebar:`Resize sidebar`,resizePanes:`Resize panes`,resizeWorkbar:`Resize workbar`,browserPasteTooLarge:`Paste at most {{count}} characters at a time.`,browserInputTooLarge:`Enter at most {{count}} characters at a time.`,browserInputTargetChanged:`The input target changed or could not be confirmed. An input operation was not executed.`,workbarBrowserDescription:`Open and interact with a page inside the OpenPI workbar.`,browserReady:`Enter an address to start browsing`,browserStarting:`Starting the embedded browser…`,browserOpened:`Opened in the embedded browser`,browserOpenAgain:`Open again`,browserOpenFailed:`The embedded browser is unavailable.`,browserBack:`Back`,browserForward:`Forward`,browserReload:`Reload`,browserTabs:`Browser tabs`,browserNewTab:`New tab`,browserAddTab:`New browser tab`,browserCloseTab:`Close {{title}}`,browserTabLimit:`Up to {{count}} browser tabs`,browserPageTitle:`Web page: {{address}}`,browserEnteredAddress:`Last address opened from this toolbar`,browserAddressNotAllowed:`Enter an HTTP(S) address without embedded credentials, outside this application's origin.`,browserLocationUnknown:`This page navigated. Its new address is unavailable. Reload returns to the address you entered.`,browserDirectDescription:`Browse pages directly. Sites that refuse embedding can be opened in your external browser.`,browserDirectHint:`The address records toolbar navigation only. Page popups open in your external browser. Blank page? Use Open in external browser.`,browserEnhancedHint:`Browser enhancement is on: addresses sync and ordinary popup links open in these tabs. Some site policies, login popups and cross-site history still require an external browser.`,files:`Files`,filesExplorer:`Workspace files`,filesSearch:`Filter files…`,refreshFiles:`Refresh files`,filesWorkspaceActions:`Workspace file actions`,filesCreateMenu:`New`,filesImportMenu:`Import`,filesMoreMenu:`More`,filesNewFile:`New file`,filesNewDirectory:`New folder`,filesImport:`Import files`,filesImportFolder:`Import folder`,filesImportFolderChoose:`Choose a folder to import`,filesImportFolderLimit:`Import up to 2,000 files and folders at a time, with at most 64 nested levels.`,filesSelectMultiple:`Select multiple files`,filesSelectItem:`Select {{name}}`,filesSelectedCount:`{{count}} selected`,filesRename:`Rename`,filesNewName:`New name`,filesMove:`Move`,filesMoveDestination:`Destination folder (workspace relative path)`,filesTrashAction:`Move to trash`,filesTrash:`Workspace trash`,filesTrashDetail:`Removed files stay in this workspace and can be restored. Existing names are preserved.`,filesTrashEmpty:`No removed files`,filesTrashUnavailable:`{{count}} entries could not be verified. Their contents remain in .openpi-trash; automatic restore is unavailable.`,filesRestore:`Restore`,filesRestoreItem:`Restore {{name}}`,filesUndoTrash:`Undo removal`,filesOrganizationResults:`File operation results`,filesOperationDone:`Done`,filesRefreshBeforeOrganizing:`Refresh the file tree before organizing this item.`,filesImportChoose:`Choose files to import`,filesTargetDirectory:`Destination`,filesWorkspaceRoot:`Workspace root`,filesFileName:`File name`,filesDirectoryName:`Folder name`,filesCreate:`Create`,filesCreating:`Creating…`,filesCreated:`Created: {{path}}`,filesNameInvalid:`Enter one file or folder name without path separators.`,filesNameExists:`This name already exists. Choose a different name; the existing file was preserved.`,filesMutationFailed:`Could not write this file. Your input is preserved.`,filesWriteUnavailable:`Switch to this session to write workspace files.`,filesImportLimit:`Each file can be up to 50 MiB. Existing names are never overwritten.`,filesImportTooLarge:`This file exceeds the 50 MiB import limit.`,filesImportDirectoryUnsupported:`Folders cannot be imported. Choose the files inside the folder.`,filesImportResults:`File import results`,filesImportPending:`Waiting to import`,filesImporting:`Importing…`,filesImported:`Saved to the workspace`,filesImportedNoPreview:`Saved. Preview supports up to 20 MiB; copy the path to use this file in chat.`,filesClearImported:`Clear completed imports`,filesRetryImport:`Retry import`,filesPathActions:`Path actions for {{name}}`,filesCopyRelativePath:`Copy relative path`,filesCopyAbsolutePath:`Copy absolute path`,filesPathCopied:`Copied path: {{path}}`,filesReadFailed:`Unable to read files.`,filesRetryRead:`Try again`,filesErrorDetails:`Error details`,filesReadFailedDetail:`The file list could not be loaded. Check your connection and try again.`,filesReadDenied:`This session's workspace is currently unavailable or cannot be verified. Check the session and workspace, then try again.`,filesSymlink:`Symbolic link — not followed by the file browser`,filesTruncated:`The result is incomplete. Refine your search.`,filesNoMatches:`No matching files`,filesEmpty:`This folder is empty`,filesChoose:`Choose a file to preview`,filesChooseDetail:`Browse your workspace on the right. Files open here, keeping the explorer in place.`,filesHideTree:`Hide file tree`,filesShowTree:`Show file tree`,filesPreview:`Preview`,filesSource:`View source`,filesEdit:`Edit`,filesMode:`File view`,filesEditor:`File editor`,filesSave:`Save file`,filesSaving:`Saving…`,filesSaved:`Saved`,filesUnsaved:`Unsaved changes · draft kept in this window`,filesDiscard:`Discard draft`,filesDiscardConfirm:`Discard your unsaved changes to this file?`,filesSaveConflict:`The file changed on disk. Your draft is preserved. Refresh to inspect the current version, then reconcile your changes before saving.`,filesSaveFailed:`Could not save. Your draft is preserved; check the file and retry.`,filesEditLoadFirst:`Continue reading the complete file before editing.`,filesEditUnavailable:`Editing supports workspace UTF-8 text files up to 1 MiB. At most 16 unsaved drafts can be kept.`,filesOutline:`Document outline`,filesDiskVersion:`Inspect current disk version`,filesReconcile:`Reviewed · continue editing my draft against this version`,filesTable:`Table preview`,filesRow:`Row`,filesSheets:`Worksheets`,filesTableTruncated:`Showing a partial table preview. Download the original file for complete content.`,filesOfficeLayout:`Document content preview; pagination and typography may differ from Office.`,filesSlidesLayout:`Slide text and images; themes, charts and animations may differ from PowerPoint.`,filesPreviousPage:`Previous page`,filesNextPage:`Next page`,filesZoomOut:`Zoom out`,filesZoomIn:`Zoom in`,filesZoomReset:`Reset zoom`,filesPdfPage:`Page {{page}}`,filesDocumentLimit:`This document exceeds the preview limit. Download it to open locally.`,filesPreviewFailed:`Unable to preview this file. You can still download it.`,filesDiagram:`Mermaid diagram`,filesDiagramLoadError:`Unable to load diagram preview. The source is shown below. Refresh the page to try again.`,filesExpandDiagram:`Expand diagram`,filesFitImage:`Fit`,filesOriginalImage:`Original size`,filesLoadMore:`Load more`,filesLoaded:`{{count}} items loaded`,filesReadMore:`Continue reading`,filesContentChanged:`The file changed. Refresh when ready; your current reading position is preserved.`,workbarFilesDescription:`Browse workspace files with an inline preview and file tree.`,backToSideConversations:`Back to side conversations`,continueSideConversation:`Send a follow-up…`,startSideConversation:`Ask a side question…`,sideConversationModelInherited:`New side conversations use the main conversation’s model and thinking level.`,sideConversationModelFixed:`This is the model used by this side conversation.`,stop:`Stop`,start:`Start`,browserAddress:`Browser address`,browserGo:`Open address`,openExternalBrowser:`Open in external browser`,invalidBrowserAddress:`Enter a valid HTTP or HTTPS address.`,addImages:`Add images`,addFiles:`Add files`,fileAttachments:`File attachments`,previewFileAttachment:`Preview file`,fileAttachmentDescription:`Documents, spreadsheets, PDFs, text, code, and other files`,fileAttachmentCount:`Attach up to {{count}} items.`,fileAttachmentTooLarge:`Files must total 50 MB or less.`,fileAttachmentReadFailed:`Could not read this file. Check the format or whether it is password protected.`,fileAttachmentTextReady:`Text ready`,fileAttachmentTextTruncated:`Partial text · original retained`,fileAttachmentOriginalReady:`Original file ready`,fileAttachmentExtractionFailed:`Text unavailable · original retained`,fileAttachmentEncodingUnavailable:`The text encoding could not be read. The original bytes are preserved.`,fileAttachmentDocumentUnavailable:`Text could not be extracted. The document may be password protected or have an unsupported format. The original bytes are preserved.`,fileAttachmentNoText:`The original file will be attached for the agent to read with its tools. No text was extracted.`,fileAttachmentPreviewTruncated:`Preview shows the first 20,000 characters. The complete extracted text will be attached.`,fileAttachmentExtractedContent:`Extracted text`,fileAttachmentPromptLabel:`User-provided files:`,fileAttachmentPromptTooLong:`The message and file references exceed the input limit. Shorten the message or attach fewer files.`,imageAttachmentDescription:`PNG, JPEG, GIF, or WebP`,imageAttachments:`Image attachments`,imageAttachmentsLoading:`Preparing attachments…`,commandOpensPanel:`Open panel`,commandPanelArguments:`This command opens a panel and cannot include arguments or images. Remove them, or use the panel directly.`,commandPanelUnavailable:`The panel could not be opened. Your command is preserved.`,commandUnavailable_terminal_only:`Requires Pi's terminal interface.`,commandUnavailable_not_integrated:`This extension command is not connected to Web yet. Use it in Pi's terminal.`,artifactImagePreviewFailed:`Unable to preview this image. Refresh the file to retry, or download it.`,artifactFileDetails:`File details`,turnElapsedRunning:`Working for {{duration}}`,compactionElapsed:`Waiting {{duration}}`,compactionRunning:`Compacting context`,compactionCompleted:`Context automatically compacted`,compactionFailed:`Context compaction failed`,compactionInterrupted:`Compaction interrupted`,compactionUnchanged:`Compaction finished without a new summary`,compactionUnavailable:`Context compaction status unavailable`,compactionReconnectHelp:`Connection interrupted. The current status will be checked after reconnecting.`,compactionDraftHelp:`Compacting history. Messages you send will be queued.`,turnElapsedFinished:`Worked for {{duration}}`,composerAdd:`Add`,composerCommands:`Commands`,composerFile:`File`,composerPlan:`Plan`,composerCompact:`Compact`,composerModel:`Model`,composerBack:`Back`,composerPlanDescription:`Enter or leave Plan mode`,composerCompactDescription:`Summarize earlier conversation history`,composerModelDescription:`Select this Session's model`,compactionQueueWaiting:`Waiting for compaction to finish`,compactionQueueBlocked:`Messages retained. Retry when ready or clear the queue.`,clearPromptQueue:`Clear queue`,queueUpdateFailed:`Could not update the queue. Check the current session and try again.`,queueStatusUnconfirmed:`The request was received, but the latest queue state could not be verified. Refresh before trying again.`,turnElapsedOutcome_cancelled:`Stopped`,turnElapsedOutcome_failed:`Failed`,turnElapsedOutcome_uncertain:`Outcome unconfirmed`,settingsSetupBusyHint:`Agent configuration is available after this turn. Display settings can be changed now.`,resetChatContentWidth:`Reset chat content width`,resetChatFontSize:`Reset chat font size`,setupResolveAdmission:`Return to the conversation to resolve the pending message before applying settings.`,removeAttachment:`Remove attachment`,dropImagesHere:`Drop files or images here`,imageAttachmentCount:`Attach up to {{count}} images.`,imageAttachmentTooLarge:`Each image must be 10 MB or smaller.`,imageAttachmentTotalTooLarge:`The attached images must total 32 MB or less.`,imageAttachmentUnsupported:`Only valid PNG, JPEG, GIF, and WebP images are supported.`,imageAttachmentReadFailed:`Could not read this image. Add it again to retry; your message is preserved.`,attachedImage:`Attached image`,previewAttachment:`Preview image`,closeImagePreview:`Close image preview`,imagePreviewFailed:`Unable to display this image.`,fitImage:`Fit image`,originalImageSize:`Original size`,imageViewMode:`Image view`,sessionUsage:`Session token usage`,sessionInputTokens:`Input tokens`,sessionOutputTokens:`Output tokens`,sessionCacheTokens:`Cached tokens`,sessionContextUsage:`Context usage and context window`,usageContextLabel:`Context`,usageUnknown:`Unknown`,usageOpenDetails:`Input {{input}} · Output {{output}} · Context {{percent}} / {{capacity}} · View token usage`,usageContextHelp:`Estimated tokens in the current branch / model context limit.`,usageSessionTotals:`Session totals`,usageInputLabel:`Input`,usageOutputLabel:`Output`,usageCacheReadLabel:`Cache read`,usageCacheWriteLabel:`Cache write`,usageTotalLabel:`Total`,usageWorkspaceLabel:`Workspace`,usageSessionId:`Session ID`,usageTotalsHelp:`Session token totals include cache usage.`,subagentDetails:`Subagents`,sessionOverview:`Session overview`,sessionOverviewChanges:`Changes in the current review scope`,subagentSummaryRunning:`{{count}} running`,subagentSummaryDone:`{{count}} completed`,subagentSummaryOther:`{{count}} other`,subagentNoneYet:`No subagents yet`,subagentOtherGroup:`Failed / interrupted`,subagentShowMore:`Show {{count}} more`,backToSubagents:`Back to subagents`,subagentActiveGroup:`Active`,subagentFinishedGroup:`Completed`,subagentNoneRunning:`No subagents running.`,subagentNoneFinished:`Completed tasks will appear here.`,subagentProgress:`Subagents: {{running}} running · {{completed}} completed`,subagentSummaryUnknown:`{{count}} without confirmed status`,subagentTasks:`Subagent tasks`,inspectSubagent:`Open subagent: {{name}}`,subagentState_running:`Running`,subagentProcessing:`Working…`,subagentState_done:`Completed`,subagentState_error:`Failed`,subagentState_interrupted:`Interrupted`,subagentStarting:`Starting…`,subagentSpawnFailed:`Failed to start`,subagentStateUnavailable:`Started · state unavailable`,subagentSpawnReceipt:`Start receipt`,subagentSpawnReceiptHint:`This confirms the start request, not the subagent's final result.`,subagentTask:`Assigned task`,subagentTranscript:`Subagent conversation`,subagentResult:`Result`,subagentSpend:`Cumulative token spend`,subagentSaved:`Saved record`,subagentRecordedState:`Last recorded state`,subagentSavedHint:`From this parent session's saved receipts. A result may include other tasks from the same batch; this is not the child's full live conversation.`,subagentReadOnly:`Read-only view · closing this panel does not stop the task`,subagentUnavailable:`Live details are no longer available for this subagent in the current session. The start receipt is not evidence of completion.`,subagentStale:`Could not refresh. The details below are the last received snapshot.`,subagentNoMessages:`No messages received yet.`,subagentTranscriptUnavailable:`This view retains a task summary and cannot show the full child conversation.`,subagentWorkflowsTruncated:`{{count}} workflows are outside the loaded list; their task counts are unknown.`,subagentState_unknown:`Unconfirmed`,subagentUnconfirmedGroup:`Unconfirmed`,subagentTruncated:`Showing recent messages. {{count}} earlier messages are not included in this view.`,subagentTextTruncated:`Some long content is shown as an excerpt.`,subagentListTruncated:`{{count}} additional tasks are outside the loaded list.`,subagentThinkingRedacted:`Reasoning was redacted by the provider.`,inspectionChanged:`The active session changed. Reopen this panel.`,inspectionUnavailable:`Details are unavailable.`,inspectionLoading:`Loading status…`,thinkingUnavailable:`Thinking state is unavailable.`,trustUnavailable:`Project trust status is unavailable.`,copySetupCommand:`Copy setup command`,savedTrustDecision:`Saved decision`,activeSessionTrust:`Active Session trust`,trustDecision_trusted:`Trusted`,trustDecision_denied:`Denied`,trustDecision_undecided:`Undecided`,trustDecision_unknown:`Unknown`,trustActiveYes:`Trusted in this Session`,trustActiveNo:`Not trusted in this Session`,modelAndThinking:`Model and reasoning`,selectedModel:`Current model`,thinkingLevel:`Thinking level`,availableThinking:`Available levels`,unknownState:`Unknown`,projectTrust:`Project trust`,trust_trusted:`This session trusts the workspace.`,trust_untrusted:`Trust for this workspace has been denied.`,trust_restricted:`Project resources are restricted pending a trust decision.`,trust_unknown:`Trust state is not available.`,trustRefreshNeeded:`The saved decision and active session differ. Refresh the session through Pi to apply it.`,providerAvailability:`Provider credentials`,settings:`Settings`,settingsNavigation:`Settings navigation`,generalSettings:`General`,configurationSettings:`Configuration`,configurationIntro:`Permissions, web access and model responses.`,configurationReadFailure:`Configuration could not be read safely. Fix the settings file, then refresh.`,configurationUserScope:`User configuration`,configurationSetupHint:`Response and search changes use OpenPI setup`,configurationApproval:`Approval policy`,configurationApprovalDetail:`Tool approvals follow the installed Pi extensions.`,configurationPiPermissions:`Pi extensions`,configurationSandbox:`Sandbox`,configurationSandboxDetail:`Tools run with the host process permissions.`,configurationSandboxUnavailable:`No OS sandbox`,configurationSearchDetail:`Let the current Session model search the web when supported.`,configurationSearchOff:`Do not offer native search to the current model.`,configurationSearchOn:`Offer native search when the current connection supports it.`,configurationVerbosity:`Output verbosity`,configurationVerbosityDetail:`Choose how much detail the model includes in its response.`,configurationResponsesUnavailable:`The current connection does not use a supported Responses API.`,configurationVerbosity_default:`Model default`,configurationVerbosity_low:`Low`,configurationVerbosity_medium:`Medium`,configurationVerbosity_high:`High`,configurationVerbosityHelp_low:`Prefer short answers with fewer details.`,configurationVerbosityHelp_medium:`Include useful explanation and a moderate amount of detail.`,configurationVerbosityHelp_high:`Include more complete explanation and detail.`,configurationVerbosityRequest:`Set only response_verbosity to {{value}}; preserve the other OpenPI settings.`,configurationSummary:`Reasoning summary`,configurationSummaryDetail:`Choose the summary requested from a supported reasoning model.`,configurationSummaryUnavailable:`The current connection does not support reasoning summaries.`,configurationSummary_default:`Model default`,configurationSummary_auto:`Auto`,configurationSummary_concise:`Concise`,configurationSummary_detailed:`Detailed`,configurationSummary_none:`Off`,configurationSummaryHelp_auto:`Let the model choose the summary length.`,configurationSummaryHelp_concise:`Request a brief reasoning summary.`,configurationSummaryHelp_detailed:`Request a more detailed reasoning summary.`,configurationSummaryHelp_none:`Do not request a summary. Keep the current reasoning effort.`,configurationSummaryRequest:`Set only response_reasoning_summary to {{value}}; preserve the other OpenPI settings.`,configurationModelFeatures:`Model features`,configurationReasoningLevels:`Available reasoning efforts`,configurationReasoningDetail:`Choose which levels appear in model controls. Only levels supported by the current model are shown; the current level stays visible.`,configurationReasoningCount:`{{count}} selected`,configurationDependencies:`Workspace dependencies`,configurationEnvironment:`Local environment`,configurationEnvironmentDetail:`Node.js, Python and other tools come from your environment. OpenPI does not install a bundled workspace runtime.`,configurationRuntimeStatus:`Runtime status`,browserSettings:`Browser`,webSearchSettings:`Web search`,webSearchCurrentModel:`Current Session model`,webSearchNativeDetail:`Use your current model provider's native search with the existing connection and credentials.`,webSearchSupported:`This connection supports native search. When enabled, the model decides when to search.`,webSearchUnsupported:`Native search is unsupported or unconfirmed for this connection. No search tool is provided and no other provider is used.`,webSearchNativeRequest:`Enable native web search using the current Session model and existing Pi credentials. Do not switch model, connection protocol, or search provider. Unsupported or unknown connections must receive no search tool.`,webSearchIntro:`Let your model search current sources and read the original pages.`,webSearchPackageDetail:`Optional search, page reading, and PDF extraction through a Pi package.`,webSearchDefaultOff:`Off by default. This optional extension follows the current Session model; it needs no separate search key or plugin installation.`,webSearchLoaded:`Package loaded in this Session`,webSearchNotLoaded:`Package not loaded in this Session`,webSearchSource:`Review plugin source`,webSearchProfile:`Search setup`,webSearchExa:`Exa — no API key required`,webSearchExisting:`Keep my existing search preferences`,webSearchProfileHint:`Exa uses search queries with direct page reading. Existing preferences stay untouched. Other search services can be configured after installation.`,webSearchEnable:`Enable web search…`,webSearchDisable:`Disable web search…`,webSearchConfigure:`Change search service…`,webSearchExaRequest:`Enable optional web search with Pi Web Access and Exa, which needs no API key. Let me review the installation confirmation, preserve other preferences, and do not reload automatically.`,webSearchExistingRequest:`Enable optional web search with Pi Web Access and keep my existing search preferences unchanged. Let me review the installation confirmation, preserve other preferences, and do not reload automatically.`,webSearchDisableRequest:`Disable native web search. Preserve other settings and Session history.`,webSearchProviderRequest:`Help me change the search service for my installed Pi Web Access plugin. Explain available services and permissions, preserve unrelated preferences, keep credentials with the search plugin, and do not reload automatically.`,browserSettingsIntro:`Let OpenPI read pages, click, type and take screenshots.`,browserControl:`Browser control`,browserControlHint:`Requests a setup change. Access changes after the configuration is saved.`,browserDefault:`Default browser`,browserDefaultHint:`Requests a setup change for the browser used when none is named.`,browserEmbedded:`OpenPI browser`,browserAllowedTitle:`Allowed browsers`,browserOffHint:`Your choices take effect when browser control is on.`,browserConnected:`Connected`,browserNeedsSetup:`Extension setup needed`,browserNotFound:`Browser not detected`,browserUpdateNeeded:`Extension update needed`,browserBlocked:`Not allowed`,browserDefaultBlocked:`Your default browser is not allowed. Allow it or choose another default.`,browserSetUp:`Set up`,browserManage:`Manage`,browserSetupNamed:`Set up {{browser}}`,browserManageNamed:`Manage {{browser}}`,browserAllowNamed:`Allow {{browser}}`,browserMore:`More browsers`,browserSpeakHint:`Say “Use Chrome to…” to choose a different browser for a request.`,browserGuideTitle:`Connect {{browser}}`,browserGuideEyebrow:`One step at a time`,browserConnectionTitle:`Connection`,browserCloseGuide:`Close browser setup`,browserConnectionReady:`Connected. Choose whether OpenPI may use this browser.`,browserEmbeddedDetail:`Pages open inside OpenPI. Some websites require a regular browser to sign in or display correctly.`,browserExternalDetail:`OpenPI can use existing tabs and signed-in pages in your connected {{browser}} profile. Keep an OpenPI tab open in that profile.`,browserManageExtension:`Manage extension`,browserAllowUse:`Allow OpenPI to use it`,browserMakeDefault:`Use as default`,browserInstallIn:`Install in`,browserInstallTitle:`Install OpenPI Browser Bridge`,browserSetupSteps:`Setup steps`,browserGuidePopout:`Keep this guide in a separate window`,browserGuideDetached:`Your guide is open in a separate window. Follow it alongside the browser settings.`,browserShowGuide:`Show guide`,browserGuideInline:`Return guide here`,browserGuideBlocked:`The guide window could not open. Allow pop-ups and try again, or follow the steps here.`,browserSafariSettings:`Safari → Settings`,browserSafariDeveloper:`Developer settings`,browserSafariTemporary:`Add Temporary Extension…`,browserSafariOpenHint:`Open Safari, then choose Safari → Settings. Keep this guide alongside it. Requires Safari 26 or later on macOS.`,browserSafariDeveloperTitle:`Show Safari’s developer settings`,browserSafariDeveloperHint:`In Settings → Advanced, turn on Show features for web developers. Then select the Developer tab.`,browserSafariLoadHint:`In Developer, click Add Temporary Extension and select the folder below. Enable OpenPI Browser Bridge and allow the websites you want to control, including the local OpenPI page. Temporary extensions need reloading after Safari quits.`,browserFirefoxThis:`This Firefox`,browserFirefoxTemporary:`Load Temporary Add-on…`,browserFirefoxDeveloperTitle:`Select This Firefox`,browserFirefoxDeveloperHint:`On about:debugging, choose This Firefox in the left sidebar. Firefox does not need a Developer mode switch.`,browserFirefoxLoadHint:`Click Load Temporary Add-on and select manifest.json in the folder below. This development installation lasts until Firefox restarts; a permanent installation requires a Mozilla-signed package.`,browserFirefoxDone:`Selected. Next`,browserStepCount:`Step {{step}} of {{total}}`,browserStepLabel:`Step {{step}}: {{label}}`,browserStepOpen:`Open page`,browserStepAdd:`Add extension`,browserStepConnect:`Connect`,browserOpenManagerTitle:`Open {{browser}} extensions`,browserOpenManagerHint:`This opens {{browser}}. Complete the action on its extensions page, then return here to continue.`,browserOpenManager:`Open {{browser}} extensions`,browserReopenManager:`Open extensions page again`,browserAlreadyInstalled:`Already installed? Connect`,browserDeveloperMode:`Developer mode`,browserDeveloperTitle:`Turn on Developer mode`,browserDeveloperHint:`Turn on Developer mode on the extensions page. The {{loadLabel}} button will appear.`,browserDeveloperDone:`It’s on. Next`,browserIllustration:`Illustration · In {{browser}}`,browserExtensions:`Extensions`,browserLoadUnpacked:`Load unpacked`,browserLoadHint:`The extension is ready on this computer. Follow these steps in {{browser}} to load it.`,browserCopyLocation:`Copy the location below`,browserLocateTarget:`Find the extension on this computer`,browserRevealTarget:`Locate extension`,browserLocateManifest:`Find the extension’s manifest.json`,browserRevealManifest:`Locate manifest.json`,browserDragToBrowser:`Drag the folder onto {{browser}} extensions`,browserDragFolderHint:`Drag the entire {{folder}} folder from your file manager onto the extensions page, with Developer mode on.`,browserSelectLocatedTarget:`In the browser’s file picker, select the item located in the previous step.`,browserManualInstall:`Need another way? Select by path`,browserManualSelection:`Can’t find it? Select by path`,browserLoadInBrowser:`In {{browser}}, click “{{loadLabel}}”`,browserLoadAlternate:`The button appears when Developer mode is on.`,browserConfirmFolder:`Select`,browserConfirmFile:`Open`,browserSelectFolderHint:`Select this entire folder, not a .js file inside it.`,browserSelectManifestHint:`Select manifest.json, not one of the .js files.`,browserInstallCheckpoint:`Continue when OpenPI Browser Bridge appears in the extensions list.`,browserPathCopied:`Path copied`,browserCopyFailed:`Couldn’t copy. Select the path above and copy it manually.`,browserChooseFolderMac:`Press ⌘ ⇧ G, paste the copied path and press Return. Then click “{{confirm}}”.`,browserChooseFolderOther:`Paste the copied path into the location bar and press Enter. Then click “{{confirm}}”.`,browserInstalledConnect:`Added. Connect to OpenPI`,browserPreviousStep:`Back`,browserWaiting:`Waiting for OpenPI Browser Bridge… We’ll detect it automatically.`,browserInstallBrowserFirst:`Install {{browser}} first, or open this OpenPI address in your installed browser.`,browserConnectTitle:`Connect to OpenPI`,browserConnectHint:`Open OpenPI in {{browser}}. Use the profile where you installed the extension.`,browserOpenIn:`Open in {{browser}}`,browserAllowHint:`Once connected, you can allow OpenPI to use this browser. Installing the extension does not change your browser permissions.`,browserCheck:`Check connection`,browserNotConnectedYet:`No connection yet. Finish installation, refresh OpenPI in that browser and check again.`,browserHelp:`Setup help`,browserReloadHint:`Already installed? Reload OpenPI Browser Bridge in the extension manager and refresh OpenPI. Accept the browser’s permission prompt if shown.`,browserSupportedHint:`Chrome, Edge, Brave and Chromium 145+ support embedded and native pages. Safari 26+ on macOS and Firefox 128+ use the portable extension for native tabs; nested frames must be opened separately. Temporary Safari/Firefox installations need reloading after browser restart.`,browserCopyPath:`Copy path`,browserOpening:`Opening browser…`,browserLoading:`Checking browser connections…`,browserSaved:`Saved. Browser permissions take effect immediately.`,browserSaving:`Working…`,modelSettings:`Models`,skillsSettings:`Skills`,subagentsSettings:`Sub-agents`,pluginsSettings:`Plugins`,configureOpenPi:`Configure OpenPI`,setupRequestReviewAll:`review every OpenPI configuration area with me`,setupRequestSetTheme:`set only the OpenPI Web theme to {{value}} and preserve every other setting`,setupRequestSetChatWidth:`set only the OpenPI Web chat content width to {{value}}px and preserve every other setting`,setupRequestSetChatFontSize:`set only the OpenPI Web chat font size to {{value}}px and preserve every other setting`,setupRequestEnableExpandedThinking:`expand thinking blocks by default in OpenPI Web and preserve every other setting`,setupRequestDisableExpandedThinking:`collapse thinking blocks by default in OpenPI Web and preserve every other setting`,setupRequestSubagents:`review and configure Agent role models and workflow limits`,setupRequestFailed:`The OpenPI setup request was not accepted.`,setupRequestRunning:`Applying OpenPI settings…`,setupRequestAccepted:`Configuration request accepted.`,setupPlanBlocked:`Exit Plan mode before changing agent configuration. Display settings can be changed directly; exiting does not start implementation.`,setupPlanBusy:`Agent configuration requires an idle turn and leaving Plan mode. Display settings can be changed now.`,setupOutcome_pending:`Configuration request is awaiting a save receipt.`,toolCallArguments:`Tool arguments`,toolCallOutput:`Tool result`,setupOutcome_saved:`OpenPI configuration was saved and applied.`,setupOutcome_unchanged:`Configuration was saved; effective settings are unchanged.`,setupOutcome_failed:`The setup request failed. Review the error and current settings before retrying.`,setupOutcome_cancelled:`Setup was cancelled without a confirmed save.`,setupOutcome_unconfirmed:`No successful save was confirmed. Review current settings before retrying /openpi-setup.`,settingsUpdateFailed:`The Web preference could not be saved.`,settingsPreferencesSaved:`Preferences saved.`,settingsPreferencesSaveFailed:`Could not save display settings. Check configuration diagnostics and retry.`,settingsCatalogLoading:`Loading Pi resources…`,settingsCatalogFailed:`Could not load Pi settings resources.`,appearance:`Appearance`,settingsPersonal:`Personal`,settingsAgent:`Agent`,settingsIntegrations:`Integrations`,settingsArchivedChats:`Archived chats`,settingsSearch:`Search settings`,settingsClearSearch:`Clear search`,settingsNoResults:`No matching settings`,appearanceVisualStyle:`Visual style`,appearanceMode:`Mode`,appearanceTheme:`Theme`,appearanceAccent:`Accent color`,appearanceBackground:`Background`,appearanceForeground:`Foreground`,appearanceFont:`Font`,appearanceFont_codex:`Codex default`,appearanceFont_sans:`Sans serif`,appearanceFont_serif:`Serif`,appearanceFont_mono:`Monospace`,appearanceAccent0:`Default`,appearanceAccent1:`Blue`,appearanceAccent2:`Purple`,appearanceAccent3:`Pink`,appearanceAccent4:`Orange`,appearanceAccent5:`Green`,appearanceCustomAccent:`Custom accent color`,appearanceAdvanced:`Advanced`,appearanceReset:`Restore defaults`,appearanceResetAction:`Reset appearance`,appearanceImport:`Import theme`,appearanceCopy:`Copy theme`,appearanceCopied:`Theme copied`,appearanceCopyFailed:`Could not copy theme. Try again.`,appearanceThemeValue:`Theme data`,appearanceImportPlaceholder:`Paste an OpenPI theme…`,appearanceImportInvalid:`Enter valid OpenPI theme data.`,appearanceImportAction:`Import`,searchArchivedChats:`Search archived chats`,archiveProjectFilter:`Filter by project`,archiveAllProjects:`All projects`,archiveProjectGroup:`{{project}} · {{count}} archived chats`,archiveSort:`Sort archived chats`,archiveSortUpdated:`Last updated`,archiveSortCreated:`Date created`,restoreArchivedChat:`Restore {{title}}`,themeLight:`Light`,themeDark:`Dark`,themeMist:`Mist`,themeRose:`Rose`,themePine:`Pine`,themeSystem:`System`,conversationSettings:`Conversation`,expandThinkingByDefault:`Expand thinking by default`,chatContentWidth:`Chat content width`,chatFontSize:`Chat font size`,agentBehavior:`Agent behavior`,workflowLimits:`Workflow limits`,workflowConcurrency:`Workflow concurrency`,workflowCalls:`Total calls`,agentSettingsSetupHint:`Agent changes are applied through /openpi-setup in the current session.`,setupRequestLimits:`Set workflow concurrency to {{concurrency}} and total agent calls to {{calls}}. Preserve other settings.`,setupRequestEnableSuggestions:`Enable next-action suggestions. Help me choose a model if required; preserve other settings.`,setupRequestDisableSuggestions:`Disable next-action suggestions. Preserve other settings.`,setupRequestPostEdit:`Help me configure or disable the post-edit command. Show the current configuration and ask which command to use.`,configurePostEdit:`Configure post-edit command`,workflowLimitsValue:`{{concurrency}} concurrent · {{calls}} total calls`,nextActionSuggestions:`Next-action suggestions`,nextActionSuggestionsDetail:`Offer a few useful next actions when the current task finishes.`,enabled:`Enabled`,disabled:`Disabled`,configured:`Configured`,postEditCommand:`Post-edit command`,postEditCommandDetail:`Run a command after edits. Nothing runs while this is off.`,resultDisplay:`Default result display`,subagentResults:`Subagent results`,bashOperations:`Bash operations`,fileMutations:`Write / Edit operations`,footer:`Footer`,terminalFooter:`Pi terminal footer`,terminalFooterStyle:`Terminal footer style`,terminalFooterHint:`Applies to Pi's command-line interface. An already open Pi interface updates when restarted or when setup is applied.`,detailDisplay_full:`Full`,detailDisplay_compact:`Compact`,sessionSettings:`Session`,currentModel:`Current`,providerCurrentSessionModel:`This conversation uses {{model}}.`,useThisModel:`Use model`,model:`Model`,modelConnection:`Model connection`,provider:`Provider`,modelId:`Model ID`,providerStatusUnavailable:`This provider is not present in the bounded authentication snapshot.`,providerSettings:`Provider credentials`,providerSettingsIntro:`Inspect which Pi providers can authenticate the current Web session.`,openRuntimeDetails:`Open runtime details`,currentWorkspace:`Current workspace`,providerAuth_api_key:`API key`,providerAuth_oauth:`OAuth`,providerAuthUnknown:`Authentication method not reported`,authentication:`Authentication`,accessType:`Access`,providerAccessSubscription:`Subscription account`,providerAccessStandard:`Provider credentials`,configurationOwner:`Configuration owner`,providerLoading:`Loading provider status…`,providerLoadFailed:`Could not load provider status.`,providerReadOnly:`Managed by Pi`,selectProvider:`Select a provider`,gitReviewBaselineUnavailable:`No usable session baseline was retained (it may exceed the capture limit). Choose Unstaged, Staged or Branch to inspect Git changes, or open the session file records.`,modelsIntro:`Sign in with an account or add an API key. Your existing Pi connections are available here.`,modelConnectionsTitle:`Model connections`,modelConnectionsIntro:`Manage credentials and choose models for new and current chats.`,accountLoginMethod:`Connection method`,accountLoginTab:`Account`,accountLoginChatGPT:`ChatGPT account`,accountLoginClaude:`Claude account`,accountLoginKeyTab:`API key`,accountLoginConfigured:`Account signed in`,accountLoginIntro:`Continue in your browser. No API key needed.`,accountLoginExisting:`Your account credential is saved in Pi.`,accountLoginStart:`Sign in`,accountLoginAgain:`Sign in again`,accountLoginUnsaved:`Save or discard your other changes before signing in.`,accountLoginStarting:`Preparing sign-in…`,accountLoginWaiting:`Waiting for authorization`,accountLoginChoose:`Choose how to sign in`,accountLoginCancelling:`Cancelling sign-in…`,accountLoginBrowser:`Continue in browser`,accountLoginDevice:`Use a device code`,accountLoginBrowserOption:`Sign in on this computer. Returns here automatically.`,accountLoginDeviceOption:`For remote servers or when browser sign-in is unavailable.`,accountLoginBrowserHelp:`Open the sign-in page and approve access. This page updates automatically.`,accountLoginDeviceHelp:`Open the authorization page and enter this code. Keep this page open.`,accountLoginOpen:`Open sign-in page`,accountLoginCopyCode:`Copy device code`,accountLoginPaste:`Authorization code or callback URL`,accountLoginContinue:`Continue`,accountLoginFallback:`Signed in but still waiting?`,accountLoginRemoteHelp:`If automatic return does not work, copy the final callback URL from your browser and paste it here.`,accountLoginCancel:`Cancel sign-in`,accountLogin_failed:`Sign-in failed. Try again or choose another method.`,accountLogin_expired:`Sign-in expired. Start again to get a new authorization link.`,accountLogin_cancelled:`Sign-in cancelled.`,accountLoginRequestFailed:`The request did not complete. Refresh status before retrying.`,accountLoginStatusUnknown:`Cannot check sign-in status. Your authorization may still be in progress.`,accountLoginRefreshRequired:`The credential was saved, but Pi could not update its model list. Reload Pi before using this connection.`,accountLogout:`Sign out`,accountLogoutRefreshRequired:`The saved credential was removed, but Pi could not update its model list. Reload Pi to refresh the status.`,accountLogoutTitle:`Sign out of {{provider}}?`,accountLogoutDetail:`Removes this provider’s saved credential from Pi on this machine. Other Pi sessions using it will also need to sign in again. Environment credentials are unchanged.`,providerInputTypes:`Input types`,providerInputText:`Text`,providerInputImage:`Images`,providerCustomTag:`Custom`,providerEdit:`Edit`,providerRemove:`Delete`,providerSave:`Save`,editProvider:`Edit {{provider}}`,removeProvider:`Delete {{provider}}`,providerAdd:`Add model provider`,providerAddMode:`How to add`,providerAddCatalog:`Third-party providers`,providerAddCustom:`Custom model API`,providerAccountHint:`Use an existing account to connect. Choose a provider and continue in your browser.`,providerCatalogHint:`Choose a provider from the built-in catalog and enter its API key.`,providerCustomHint:`Connect a gateway or self-hosted service using an OpenAI or Anthropic compatible API.`,providerKeyKeep:`Leave blank to keep the existing key`,providerKeyOptional:`Enter an API key, or leave blank to use environment authentication`,providerDisplayName:`Provider name`,providerCustomSettings:`Custom settings`,providerSaved:`Saved {{provider}}.`,modelDefaultTitle:`Default for new chats`,modelDefaultChoose:`Choose model`,modelDefaultBadge:`Default`,modelCurrentBadge:`In use`,modelDefaultNotSet:`Not set · Pi chooses when a new chat starts`,modelDefaultHint:`Choose the model for future chats. Existing chats keep their own model. This also updates Pi's default.`,modelDefaultReadFailed:`Could not read the default model.`,modelDefaultProjectOverride:`This workspace has a Pi override: {{model}}.`,modelDefaultSave:`Save default`,modelMakeDefault:`Also make this the default for new chats`,modelDefaultSaveFailed:`The default was not confirmed. Refresh status and try again.`,modelDefaultPartial:`The chat model changed, but saving the default was not confirmed. Refresh status before retrying.`,modelConnectionNextHint:`Choose a model from this connection to use in the current chat.`,modelConnectionSearch:`Search models…`,modelConnectionChooseProvider:`Choose a model from {{provider}}`,modelConnectionUse:`Use in this chat`,modelConnectionUseFailed:`The model change was not confirmed. Refresh the model list and try again.`,modelConnectionLoadFailed:`Could not load models.`,modelConnectionNoModels:`No selectable models yet. Check the connection or add a model definition.`,modelConnectionNoMatch:`No matching models.`,modelConnectionMore:`{{count}} more models. Search to narrow the list.`,providerModelsEmpty:`No models yet. Fetch available models or add one manually.`,providerModelsInherited:`Uses the provider’s built-in model catalog.`,providerModelsReadOnly:`This provider contains model settings that must be edited in Pi’s configuration file.`,providerModelId:`Model {{number}} ID`,providerModelName:`Model {{number}} name`,providerModelDetails:`Model details: {{model}}`,providerRemoveModel:`Remove model: {{model}}`,providerIdInvalid:`Use a unique provider ID with letters, numbers, hyphens, dots or underscores.`,providerNativeAuth:`This provider uses Pi’s native sign-in.`,providerConfigurationFailed:`Could not save. Check the fields and retry when the session is idle.`,providerProfileSavedKeyFailed:`The provider was saved, but its API key was not. Retry saving the key.`,providerReload:`Discard draft and reload`,providerCurrentRemoval:`Select another model before removing the model currently in use.`,providerRemoveDetail:`Remove this provider’s configuration and custom models? Credentials managed by Pi are kept.`,providerPickerIntro:`Select the models you want to add from this provider.`,providerPickerSelected:`{{count}} selected`,providerApiKey:`API key`,providerKeyPlaceholder:`Paste a key to add or replace it`,saveProviderKey:`Save API key`,savingSettings:`Saving…`,keepEditing:`Keep editing`,discardAndContinue:`Discard and continue`,unsavedSettingsTitle:`Discard unsaved changes?`,unsavedSettingsDetail:`Unsaved model and credential changes will be lost.`,unsavedCredentialTitle:`Discard the unsaved credential?`,unsavedCredentialDetail:`The new key has not been saved and will be cleared.`,modelSelectionBusy:`This session is busy. Model changes are unavailable.`,providerKeySaved:`Saved to Pi credentials. Existing keys are never displayed.`,providerSaveFailed:`Credential save did not complete. Wait until the session is idle, refresh status and retry. Some providers need additional authentication settings.`,providerWriteDetail:`Save API keys here directly to Pi. Keys never enter a model conversation. For OAuth or additional provider fields, use Pi's native login.`,editModelConfiguration:`Add or edit a custom model`,modelConfigurationDetail:`Set up a provider connection, then choose available models or add one manually. Saving does not send a model request.`,configuredModels:`Custom model configuration`,addModel:`Add a model`,modelConfig_provider:`Provider ID`,modelConfig_id:`Model ID`,modelConfig_name:`Display name`,modelConfig_baseUrl:`API base URL`,modelConfig_api:`API format`,modelConfig_contextWindow:`Context window`,modelConfig_maxTokens:`Max output tokens`,providerCapacityLabel:`{{field}} {{number}}`,providerModelOptions:`Model options`,providerModelInvalid:`Model {{number}}: use a unique model ID and positive token counts, such as 128K or 1M. Leave capacities blank to use defaults.`,modelConfig_reasoning:`Supports reasoning`,saveModelConfiguration:`Save model`,reloadModelConfiguration:`Discard draft and load latest`,retryModelConfiguration:`Retry loading`,discardModelDraftTitle:`Discard this model draft?`,discardModelDraftDetail:`The latest configuration will replace this unsaved draft.`,discardAndReload:`Discard and reload`,modelConfigurationUnsaved:`Unsaved changes`,modelConfigurationConflict:`Model configuration changed elsewhere. Your draft is unchanged.`,modelConfigurationLoadFailed:`Could not load model configuration. Your draft is unchanged.`,modelConfigurationSaved:`Saved to Pi models.json. Configure the provider API key to make this model available.`,modelConfigurationFailed:`Model save did not complete. Your draft is unchanged.`,setupConfigurationRequest:`Configuration request`,configureViaSetup:`Apply via OpenPI setup`,setupFormDetail:`Uses /openpi-setup. Follow progress and any required confirmation in the conversation; submission does not mean the configuration is saved.`,setupSkillsPlaceholder:`Describe the skill to add or configure, including its source or local path`,setupPluginsPlaceholder:`Describe the Pi package to configure, including its exact package name or local path`,enableSkillInvocation:`Allow model invocation`,disableSkillInvocation:`Require explicit invocation`,setupSkillInvocationRequest:`Configure this Pi skill: {{path}}. Set its native disable-model-invocation field to {{disabled}}. Preserve other content and explain when the change takes effect.`,setupRoleFormRequest:`Configure the OpenPI {{role}} role to use {{model}} and set workflow concurrency to {{concurrency}}. Inherit parent thinking, validate the selection and preserve unrelated configuration.`,providerReadOnlyDetail:`This page is read-only and never receives credential values. Configure provider authentication through Pi, then refresh this status.`,openProviderSettings:`Open provider settings`,credentialConfigured:`Configured`,credentialMissing:`Not configured`,authNotVerified:`Configured credentials do not guarantee a successful model request.`,configurationViaPi:`Read-only status. Manage model credentials and trust through Pi; manage OpenPI options with /openpi-setup.`,noSkillsFound:`No skills are loaded for this Session.`,addSkill:`Add skill`,addPlugin:`Add plugin`,searchResources:`Search by name or source`,filterResourceScope:`Resource scope`,allResourceScopes:`All scopes`,noMatchingResources:`No matching resources`,resourceBulkTooLarge:`Filter the list further before submitting a bulk request.`,resourceManagement:`Pi resources`,resourceSourceAuto:`Pi automatic discovery`,resourceSourceLocal:`Local resource`,resourcePackageSource:`Package, repository or local path`,resourcePackageSourcePlaceholder:`npm:package@version · git:owner/repo · /path/to/skill`,resourceInstallIntro:`Choose a source and scope. OpenPI setup will review and apply the request in the conversation.`,resourceInstallReview:`Review the exact source and permissions in the conversation. Submitting this request does not mean it is installed or loaded.`,resourceRequestSubmitted:`Request submitted. Follow progress and confirmations in the conversation, then refresh this catalog.`,browseSkills:`Browse skills.sh`,resourceSessionState:`Apply to this Session`,resourcesReloadNote:`Refresh reads the catalog. Reload applies saved resources to this idle Session; changes are never reloaded automatically.`,reloadResources:`Reload resources`,resourceReloadReview:`Apply saved Pi skill and plugin configuration and restart extensions in the current Session? Wait for running work to finish first.`,resourceReloaded:`Resources reloaded. Review the refreshed catalog and diagnostics.`,resourceReloadFailed:`Could not reload resources. Wait for this Session to become idle and refresh before retrying.`,advancedResourceConfiguration:`Advanced configuration`,resourceDiagnostics:`Pi reports {{extensionErrors}} extension diagnostics and {{skillErrors}} skill diagnostics.`,resourceConfigurationDiagnostics:`{{count}} settings files could not be read. Review Pi configuration diagnostics.`,resourceCatalogTruncated:`This catalog is bounded; some resources are omitted.`,resourceTargetTruncated:`This source or path is truncated. Confirm the full target through Advanced configuration before making changes.`,updateResource:`Review update`,removeResource:`Review removal`,skillsEmptyTitle:`Add your first skill`,skillsEmptyIntro:`Skills give Pi reusable instructions. Add a package, repository or local skill; project skills follow Pi project trust.`,pluginsEmptyTitle:`Extend Pi with a plugin`,pluginsEmptyIntro:`Packages can include extensions, skills, prompts and themes. Add a source to review its installation through OpenPI setup.`,pluginCount:`{{count}} plugin sources`,installedVersion:`Installed version`,configuredVersion:`Configured version`,resourceVersionUnpinned:`Not pinned / local source`,pluginState_loaded:`Session resources loaded`,pluginState_installed:`Installed · not loaded`,pluginState_disabled:`Disabled in configuration`,pluginState_missing:`Package missing`,pluginState_error:`Load diagnostics`,pluginState_notLoaded:`Not loaded`,pluginLoadedResources:`{{count}} resources in this Session's catalog. Configuration changes require an explicit reload.`,pluginAction_enable:`Review enable`,pluginAction_disable:`Review disable`,pluginAction_update:`Review update`,pluginAction_remove:`Review removal`,enableVisibleSkills:`Allow model use ({{count}} shown)`,disableVisibleSkills:`Explicit use only ({{count}} shown)`,enableVisiblePlugins:`Enable {{count}} shown packages`,disableVisiblePlugins:`Disable {{count}} shown packages`,setupResourceInstallRequest:`Add these Pi {{kind}} from source {{source}} in scope {{scope}}. Inspect the source and resolve a fixed package identity, review required installation permissions with me using ask_user, then use Pi's native package/skill configuration. For a skill request, preserve unrelated extensions and other resources. Preserve existing preferences and project trust; do not reload this Session automatically. Report saved configuration and any remaining action separately. Do not change unrelated OpenPI settings.`,setupPluginOperationRequest:`Review Pi package action {{action}} for exactly configured source {{source}}, native root {{path}}, scope {{scope}}. Resolve relative sources against the native scope's settings directory. Use Pi's native package management. For updates, inspect available versions and review a fixed target identity and required permissions with me using ask_user before installing. Preserve resource filters and all unrelated preferences; if a toggle would destroy filters, stop and explain. Removal must not delete a local source directory. Do not reload automatically. Report persisted and active states separately; do not change unrelated OpenPI settings.`,setupSkillManageRequest:`Review Pi skill action {{action}} for exactly file {{path}}, source {{source}}, scope {{scope}}. Inspect native ownership first. Review the update/removal and required permissions with me using ask_user. Preserve unrelated skills and package resources; do not remove an entire shared package to remove one skill. Preserve project trust and do not reload automatically. Do not change unrelated OpenPI settings.`,setupSkillsBulkRequest:`For exactly these currently displayed Pi skill files {{paths}}, set native disable-model-invocation to {{disabled}}. Inspect ownership, preserve all other content and preferences, review necessary changes with me, and report any files that cannot be changed safely. Explicit /skill invocation remains available. Do not reload automatically or change unrelated OpenPI settings.`,setupPluginsBulkRequest:`For exactly these currently displayed Pi packages {{packages}}, set disabled to {{disabled}} through native Pi configuration. Preserve all other preferences and resource filters; skip and report entries whose filters cannot be preserved. Respect scope and project trust, review necessary changes with me, and do not reload automatically or change unrelated OpenPI settings.`,resourceRequestFinished:`The setup turn has ended. Refresh and inspect Pi's configuration and Session resources to confirm what changed.`,skillCount_one:`{{count}} skill`,skillCount_other:`{{count}} skills`,skill:`Skill`,copySkillInvocation:`Copy invocation`,source:`Source`,scope:`Scope`,invocation:`Invocation`,modelInvocation:`Model invocation`,resourceScope_user:`Global`,resourceScope_project:`Project`,resourceScope_temporary:`Temporary`,explicitOnly:`Explicit invocation only`,availableToModel:`Available to the model`,skillFile:`Skill file`,selectSkill:`Select a skill`,subagentConfiguration:`Pi-native subagent roles`,subagentConfigurationIntro:`Role models inherit from the parent unless OpenPI setup assigns an available model.`,subagentActiveCount_one:`{{count}} active`,subagentActiveCount_other:`{{count}} active`,subagentCompletedCount_one:`{{count}} recorded`,subagentCompletedCount_other:`{{count}} recorded`,subagentConcurrency:`Limit {{count}}`,builtInRoles:`Built-in roles`,subagentRole_explorer:`Explorer`,subagentRole_implementer:`Implementer`,subagentRole_reviewer:`Reviewer`,subagentRole_advisor:`Advisor`,subagentRoleShort_explorer:`Read-only investigation`,subagentRoleShort_implementer:`Focused implementation`,subagentRoleShort_reviewer:`Correctness review`,subagentRoleShort_advisor:`Technical analysis`,subagentRoleDescription_explorer:`Explores the codebase and reports evidence without modifying files.`,subagentRoleDescription_implementer:`Implements a bounded change and runs the relevant repository checks.`,subagentRoleDescription_reviewer:`Reviews correctness, safety, regressions, and missing validation.`,subagentRoleDescription_advisor:`Analyzes difficult technical questions and recommends a concrete next step.`,configureRoles:`Configure roles`,builtInRole:`Built-in role`,builtIn:`Built-in`,modelAssignment:`Model assignment`,inheritParentModel:`Inherit parent model`,effectiveModel:`Effective model`,workflowConcurrencyLabel:`Concurrent agents`,workflowCallLimit:`Total agent calls`,runtimeBoundaries:`Runtime boundaries`,subagentAuthorityNote:`Child authority is the fail-closed intersection of the parent Session and role capabilities.`,subagentModelNote:`No hardcoded provider is introduced; an unassigned role follows the parent model and thinking level.`,resourceCount_one:`{{count}} resource`,resourceCount_other:`{{count}} resources`,noPluginsFound:`No loaded plugin sources were reported.`,pluginCatalogTotals:`{{extensions}} ext · {{skills}} skills · {{prompts}} prompts · {{themes}} themes`,loaded:`Loaded`,resourceOrigin:`Origin`,resourceOrigin_package:`Package`,resourceOrigin_topLevel:`Top-level resource`,resources:`Resources`,baseDirectory:`Base directory`,notReported:`Not reported`,extensions:`Extensions`,extensionSurfaceCount:`{{tools}} tools · {{commands}} commands`,prompts:`Prompts`,themes:`Themes`,pluginResourceSummary:`{{extensions}} ext · {{skills}} skills · {{prompts}} prompts · {{themes}} themes`,pluginsManagedByPi:`These resources are loaded by Pi. Submit changes using the setup form above. Package changes follow native confirmation and take effect through Pi's reload lifecycle.`,selectPlugin:`Select a plugin source`,statusCaptured:`Snapshot at {{time}} · refresh for the latest state`,conversationViews:`Conversation views`,currentConversations:`Current`,archivedConversations:`Archived`,refreshArchives:`Refresh archived conversations`,loadingArchives:`Loading archived conversations...`,moreArchives:`Load more archived conversations`,retryArchives:`Retry archived conversations`,archiveLoadFailed:`Could not load archived conversations.`,archiveCursorStale:`Archived conversations changed. Refresh to continue.`,archiveScanBounded:`{{count}} older records have not been scanned.`,noArchivedSessions:`No archived conversations.`,noScannedArchives:`No archived conversations in the scanned history.`,noMatchingScannedArchives:`No matching archived conversations in the scanned history.`,draftLimit:`Draft storage is full. Send or clear an existing draft before adding more content.`,restoreConversation:`Restore conversation`,restoringConversation:`Restoring…`,loadedArchives:`Archived conversations in the loaded history`,loadedHistoryBounded:`{{sessions}} more sessions and {{workspaces}} workspace summaries are not loaded. Search covers the loaded list only.`,noLoadedArchives:`No archived conversations in this loaded list.`,restoreFailed:`Could not confirm restoration. Refresh and try again.`,execution_running:`Running`,execution_done:`Completed`,execution_killed:`Stopped`,execution_timed_out:`Timed out`,execution_failed:`Failed`,execution_uncertain:`Uncertain`,activeOnlyHint:`Only the active Web session accepts messages.`,acceptedHint:`Message accepted by OpenPI Web.`,promptAdmissionUnknown:`It is unclear whether the last message was received.`,promptAdmissionUnknownDetail:`Review the refreshed Session history and runtime status before deciding. Sending as a new message may create a duplicate message.`,promptAdmissionCheckingDetail:`Checking the latest Session history and runtime status before resend options are enabled.`,promptAdmissionVerificationFailedDetail:`Could not refresh the latest Session history and runtime status. Check again before sending as a new message.`,abandonAdmission:`Don't resend for now`,retryAdmissionCheck:`Check again`,retryOriginalAdmission:`Retry original message`,promptTooLong:`Message exceeds the send limit ({{count}} / {{limit}}).`,sendAsNew:`Send as new message`,sendingAsNew:`Sending…`,stopTurn:`Stop current turn`,stoppingTurn:`Stopping current turn…`,stoppedTurn:`Current turn stopped.`,pendingFollowUpsHint:`{{count}} messages queued`,sendNextTurn:`Send next turn`,followUpBehavior:`Follow-up behavior`,followUpBehaviorDetail:`While OpenPI is running, queue new messages for the next turn or guide the current turn. Press ⌘/Ctrl+Enter to use the other option once.`,followUpQueue:`Queue`,followUpQueueDetail:`Next turn`,followUpSteer:`Steer`,followUpSteerDetail:`Current turn`,steerCurrentTurn:`Steer current turn`,steeringHint:`Use this instruction after the current tool step finishes.`,pendingSteeringHint:`{{count}} instructions received; waiting for the current tool step`,steeringMessagesTitle:`Pending instructions for this turn`,steerStaleTurn:`That turn has ended or changed. Your draft is kept. Check the updated status and send again.`,sourceFeedbackNew:`{{path}} · new line {{line}}`,sourceFeedbackOld:`{{path}} · old line {{line}}`,forkMessage:`Fork from here`,forkMessageHint:`Create a new conversation from this message. Keep the original conversation; no message is sent.`,forkSessionPending:`Creating a fork…`,forkSessionCreated:`Fork created. The original conversation remains in the sidebar.`,forkSessionCancelled:`Fork cancelled. The original conversation is kept.`,forkSessionUncertain:`The fork could not be confirmed. Refresh and inspect your conversations before trying again.`,forkSessionUnavailable:`Switch to this conversation and let its current work and queued messages finish before forking.`,reviewQuoteLine:`Reference this line`,reviewSelectOldLine:`Select old line {{line}}`,reviewSelectNewLine:`Select new line {{line}}`,queuedMore:`{{count}} more queued`,queuedImage:`Image attachment`,queuedMessageExpand:`Expand queued message`,queuedMessageCollapse:`Collapse queued message`,backgroundSessionRunning:`This session is running in the background…`,observedSessionTools:`{{count}} active tools`,toolsRequireCurrentSession:`Switch to this session to use interactive tools.`,activateViewedSession:`Switch to this session`,activateViewedSessionHint:`Send a message to continue this conversation.`,addWorkspace:`Add workspace`,addWorkspaceMenu:`Add workspace...`,archiveConversation:`Archive conversation`,pinnedConversations:`Pinned`,sidebarOptions:`Sidebar options`,sidebarProjectOptions:`Project sidebar options`,sidebarRecentOptions:`Chat sidebar options`,sidebarActivityOptions:`Activity view options`,sidebarShow:`Show`,sidebarGroupBy:`Group conversations`,sidebarByProject:`By project`,sidebarFlatList:`All conversations`,sidebarChatSort:`Conversation order`,sidebarRecent:`Recent`,sidebarProjectsInRecents:`Show projects in Recent`,sidebarShowMore:`Show more`,sidebarShowLess:`Show less`,sidebarFilterList:`Filter this list`,sidebarSaveFailed:`Could not save the change. Please try again.`,pinWorkspace:`Pin project`,unpinWorkspace:`Unpin project`,markConversationRead:`Mark as read`,markConversationUnread:`Mark as unread`,sidebarState_unread:`Unread conversation`,sidebarActivity:`Activity`,sidebarViewActivity:`View activity`,sidebarViewChats:`View conversations`,sidebarPriority:`Priority`,sidebarActivityEmpty:`Nothing needs attention`,sidebarActivityEmptyHint:`Completed work and conversations needing your attention appear here.`,sidebarMarkAllRead:`Mark all as read`,sidebarClearRead:`Clear read chats from Priority`,sidebarReadFailed:`Could not update read status. Please try again.`,sidebarToday:`Today`,sidebarYesterday:`Yesterday`,sidebarEarlier:`Earlier`,sidebarActivityCompleted:`Completed`,sidebarActivityFailed:`Failed`,sidebarActivityRead:`Read`,modelAdvanced:`Advanced parameters`,providerConnectionHeading:`Provider connection`,providerFetchModels:`Get available models`,providerFetchHint:`Enter the provider and endpoint, then choose models in one step.`,providerPickerTitle:`Choose models to add`,providerPickerAccess:`Connection credentials`,providerPickerKey:`Access key (optional)`,providerPickerKeyHint:`Leave blank to use saved credentials for this endpoint. A key entered here is used for discovery only and is not saved.`,providerPickerSearch:`Search models`,providerPickerSelectAll:`Select all`,providerPickerClear:`Clear selection`,providerPickerLoading:`Reading available models…`,providerPickerAdded:`Added`,providerPickerNoMatch:`No matching models`,providerPickerEmpty:`No models returned. You can still add one manually.`,providerPickerBounded:`Showing the first 500 models. Add other IDs manually.`,providerPickerError_load:`Could not read the model list. Check the endpoint and credentials, then retry or add a model manually.`,providerPickerError_save:`Could not confirm the save. Your selection is kept; check the connection before retrying.`,providerPickerError_conflict:`Configuration changed elsewhere. Close this dialog and reload configuration before saving again.`,providerPickerDefaults:`New models use {{context}} context / {{output}} output tokens. You can adjust these per model after adding.`,providerPickerRetry:`Refresh list`,providerPickerCount:`{{count}} selected · up to 100`,providerPickerSave:`Add selected`,sidebarState_running:`Running`,sidebarState_compacting:`Organizing context`,sidebarState_waiting:`Waiting for your response`,sidebarState_completed:`Completed · unread result`,sidebarState_failed:`Failed · open conversation for details`,pinnedOptions:`Pinned options`,pinConversation:`Pin conversation`,unpinConversation:`Unpin conversation`,pinnedRecentlyUpdated:`Recently updated`,pinnedManualOrder:`Manual order`,movePinUp:`Move up`,movePinDown:`Move down`,pinSaveFailed:`Could not save pinned conversations. Please try again.`,cancel:`Cancel`,chooseWorkspaceHint:`Choose a workspace and describe the work`,close:`Close`,closeSearch:`Close search`,collapseSidebar:`Collapse sidebar`,confirmEdit:`Save and rerun`,editMessageHint:`Rerun from here in a new branch. Keep the original conversation, images and file references. Existing workspace changes are kept.`,regenerateMessage:`Regenerate response`,regenerateMessageHint:`Rerun this question in a new branch, keeping its original attachments and conversation.`,messageRerunStarted:`Rerun admitted in a new branch. The original conversation is kept.`,openOriginalConversation:`View original conversation`,messageRerunWorkspaceHint:`Existing workspace changes are kept.`,modelRequestRecovered:`Request recovered`,modelReconnecting:`Reconnecting`,modelReconnectUnknown:`Reconnection status unconfirmed`,modelEarlierAttempts:`Earlier request errors`,modelFailedAttempts:`Failed attempts ({{count}})`,draftStorageUnavailable:`Draft could not be saved on this device. Keep this page open or copy your message.`,draftStorageInvalid:`Some saved draft content could not be restored. Check your message and attachments.`,draftStorageRetry:`Retry saving draft`,workbarBackToChat:`Back to chat`,workbarCollapseTools:`Collapse tools`,workbarEndTerminal:`Close {{name}} and end its process`,workbarNewTerminal:`New terminal`,workbarContinueInChat:`Continue in chat`,transcriptSearch:`Search message contents`,transcriptSearchPlaceholder:`Search titles, projects, or messages…`,transcriptSearchRecent:`Recent conversations`,transcriptSearchSessions:`Conversations`,transcriptSearchMessages:`Message contents`,transcriptSearchSessionResult:`Open conversation {{session}}`,transcriptSearchSessionOpenFailed:`Could not open this conversation. Try again.`,transcriptSearchIncludeArchived:`Include archived conversations`,transcriptSearching:`Searching messages…`,transcriptSearchEmpty:`No matching messages found.`,transcriptSearchFailed:`Could not search messages. Try again.`,transcriptSearchRetry:`Retry search`,transcriptSearchPartial:`Some history could not be searched. Results may be incomplete.`,transcriptSearchOpenFailed:`This message could not be opened. It may have moved or belong to another branch.`,transcriptSearchResult:`Open message from {{source}} in {{session}}`,transcriptSearchSource_user:`you`,transcriptSearchSource_assistant:`assistant`,transcriptSearchSource_tool_call:`tool call`,transcriptSearchSource_tool_result:`tool output`,connected:`Connected`,connecting:`Connecting`,conversationName:`Conversation name`,conversationOptions:`Conversation options`,sidebarRename:`Rename`,sidebarPin:`Pin`,sidebarUnpin:`Unpin`,sidebarFork:`Fork`,sidebarForkLocal:`Fork chat`,sidebarForkSameWorktree:`Fork in same worktree`,archiveNoticeTitle:`Chat archived`,archiveNoticeView:`View`,archiveNoticeUndo:`Undo`,archiveNoticeFailed:`Could not complete this action. Try again.`,sidebarForkWorktree:`Fork chat in new worktree`,sidebarForkCancelling:`Requesting cancellation…`,sidebarForkFinishing:`Cancellation is no longer available. Confirming the result…`,sidebarForkCancelUnconfirmed:`Cancellation could not be confirmed. Waiting for the fork result.`,sidebarForkWorktreePreserved:`The worktree was kept at {{path}}. Inspect it before retrying.`,sidebarForkWorktreePending:`Creating a worktree and conversation…`,sidebarForkOptionsLoading:`Checking worktree availability…`,sidebarForkOptionsFailed:`Unable to check worktrees. Reopen menu to retry.`,sidebarForkUnavailable:`Send a message before forking this conversation.`,sidebarForkArchived:`Restore this conversation before forking.`,sidebarForkFailed:`Could not create the fork. The original conversation is unchanged.`,sidebarCopy:`Copy`,sidebarCopyLink:`Copy conversation link`,sidebarCopyMarkdown:`Copy as Markdown`,sidebarCopyCwd:`Copy working directory`,sidebarCopied:`Copied`,sidebarCopyFailed:`Could not copy. Try again.`,sidebarNewWindow:`Open in new window`,sidebarOpenIn:`Open in`,sidebarAppsLoading:`Loading available apps…`,sidebarAppsFailed:`Unable to load apps. Reopen menu to retry.`,sidebarOpenFailed:`Unable to open this project in the selected app.`,sidebarArchive:`Archive`,sidebarRestore:`Restore`,sidebarDelete:`Permanently delete`,managedWorktreeRecoveryFull:`Check earlier unfinished removal requests before starting another.`,managedWorktreesChanged:`The worktree list changed. Refresh it before reviewing a target.`,managedWorktreesRefresh:`Refresh worktrees`,managedWorktreesBack:`Back to worktrees`,managedWorktreesRetry:`Retry request`,managedWorktrees:`Retained worktrees`,managedWorktreesDescription:`Worktrees created by OpenPI are kept when a conversation is deleted. Review an exact path before requesting removal. Active, shared, changed or unverified worktrees stay in place.`,managedWorktreeConfirm:`Remove this managed worktree? The server rechecks ownership, active conversations and local changes before removal.`,managedWorktreeRemoved:`Worktree removed.`,managedWorktreePreserved:`Worktree kept:`,managedWorktreeUncertainTerminal:`Removal outcome is uncertain. Automatic removal cannot be repeated. Inspect the retained path before taking further action.`,managedWorktreeUncertain:`Removal outcome is unknown. Retry to check the original request.`,managedWorktreeRemoving:`Checking and removing…`,managedWorktreeRemove:`Remove worktree`,managedWorktreeReview:`Review removal`,managedWorktreesEmpty:`No managed worktrees were found on this page.`,managedWorktreesUnavailable:`{{count}} ownership records could not be verified.`,managedWorktreesLoadFailed:`Could not load retained worktrees. Retry without changing the target.`,managedWorktreesMore:`Load more worktrees`,managedWorktreeRetainedAfterDelete:`Conversation deleted. Worktree kept at {{path}}. Review retained worktrees in the project menu.`,sidebarDeleteTitle:`Delete conversation?`,sidebarDeleteDescription:`Permanently delete “{{name}}”? This cannot be undone.`,sidebarDeleteConfirm:`Delete`,sidebarDeleting:`Deleting…`,sidebarDeleteFailed:`Could not delete this conversation. Retry or cancel.`,sidebarActionRunning:`Let current work and queued messages finish first.`,sidebarActionDisconnected:`Reconnect before changing this conversation.`,sessionDeleteCancelled:`Deletion cancelled`,sessionDeleteUncertain:`Could not confirm whether the conversation was deleted. Refresh and try again.`,sessionDeleted:`Conversation permanently deleted`,sessionDeleteMetadataPending:`The conversation was deleted, but its sidebar records could not be fully cleared.`,sessionLinkUnavailable:`The linked conversation no longer exists or its identity has changed.`,sidebarDropPin:`Drop here to pin`,sidebarDropProjectLast:`Move project to the end`,conversationTurns:`Conversation turns`,conversationTurnPosition:`Go to turn {{position}}`,turnPreviewLoading:`Loading preview…`,turnPreviewUnavailable:`Preview unavailable. Try again.`,commands:`Slash commands`,addContext:`Add context`,fileReference:`Reference workspace file`,fileReferenceTitle:`Reference workspace file`,fileReferenceDetail:`Add a path reference to the prompt without uploading file contents.`,fileReferenceLabel:`Workspace file path`,fileReferencePlaceholder:`src/app.tsx`,fileReferenceValidatedHint:`The current Session verifies that this is a readable workspace file.`,fileReferenceDraftHint:`This path will be resolved by Pi after the new Session starts.`,fileReferenceChecking:`Checking…`,fileReferenceFailed:`Could not verify this file.`,fileReferenceDenied:`Choose a file inside the current Session workspace.`,fileReferenceMissing:`This workspace file no longer exists.`,fileReferenceUnsupported:`Only regular workspace files can be referenced.`,fileReferenceExpired:`The active Session changed. Reopen the file reference and try again.`,fileReferenceBusy:`File validation is busy. Try again shortly.`,insertReference:`Insert reference`,commandsSessionRequired:`Slash commands are available after the Session starts.`,commandsEmptyDraftOnly:`Slash commands can be inserted only into an empty draft.`,commandsLoading:`Loading commands...`,commandsUnavailable:`Commands are temporarily unavailable.`,commandsNoMatch:`No matching commands.`,commandsNoAvailable:`No discovered commands can run in Web. Type a command name to inspect its availability.`,commandsBounded:`{{count}} more commands are not shown.`,commandSessionRequired:`Commands require an active Web session.`,commandUnsupported:`Not adapted · manual commands still reach Pi`,commandAcceptsArguments:`Accepts arguments`,commandSource_extension:`Extension`,commandSource_prompt:`Prompt template`,commandSource_skill:`Skill`,copiedMessage:`Copied`,copyMessage:`Copy message`,copyFailed:`Copy failed. Please select and copy the message manually.`,copiedCode:`Code copied`,copyCode:`Copy code`,copyCodeFailed:`Could not copy this code. Select and copy it manually.`,codeBlock:`Code block`,wrapCode:`Wrap lines`,expandCode:`Show all {{count}} lines`,collapseCode:`Collapse code`,expandInput:`Expand input`,collapseInput:`Collapse input`,deleteWorkspace:`Delete workspace`,describeTask:`Describe a task`,editMessage:`Edit and rerun from here`,enterHint:`Enter to send, Shift+Enter for a new line.`,expandSidebar:`Expand sidebar`,importWorkspace:`Import workspace`,loadingModels:`Loading models...`,modelsTruncated:`Showing {{shown}} models. {{omitted}} more are available; search to find them.`,searchModels:`Search available models`,searchModelsPlaceholder:`Search provider, model name, or ID...`,searchingModels:`Searching models...`,noMatchingModels:`No matching models`,modelSearchFailed:`Could not search models. Try again.`,retryModelSearch:`Retry model search`,fileReferenceDraftChanged:`The draft changed. Reopen the file reference.`,modelSearchTruncated:`{{omitted}} matching models are not shown.`,modelPreparing:`Preparing task...`,modelRetrying:`Retrying model request...`,modelRunning:`Working…`,modelRequestFailed:`Model request failed`,modelRequestStopped:`Model request stopped`,modelFailureUnknown:`The provider did not return an error reason.`,retryPrompt:`Retry prompt`,retryingPrompt:`Retrying...`,newSession:`New session`,noConversations:`No conversations yet`,noMatching:`No matching conversations`,noMatchingLoaded:`No matching conversations in the loaded history`,noModels:`No models available`,noOutput:`no output`,noSessions:`No sessions`,openSidebar:`Open sidebar`,promptMessage:`Send a message or start a task, / for commands`,promptReadonly:`A non-active session cannot receive prompts`,promptStart:`Choose a workspace to begin.`,promptTask:`Describe what you want to build.`,queuedHint:`The message will be queued after the current turn.`,reconnecting:`Reconnecting`,removeWorkspace:`Remove from sidebar`,workspaceOptions:`Workspace options`,renameFailed:`Could not save the name. Your changes were kept.`,savingName:`Saving...`,workspaceRemoveFailed:`Could not remove the workspace. Try again.`,removingWorkspace:`Removing...`,renameConversation:`Rename conversation`,renameWorkspace:`Rename workspace`,save:`Save`,searchConversations:`Search conversations`,searchPlaceholder:`Filter titles and workspaces…`,selectModel:`Select model`,configureModels:`Configure models`,openModelSettings:`Model settings`,selectThinking:`Select thinking level`,thinkingAvailableLevels:`Available: {{levels}}`,resetThinking:`Restore the opening level ({{level}})`,modelThinkingNotEnabled:`Thinking is not enabled for this model. Enable reasoning support in model settings if your provider supports it.`,providerReasoningHint:`Enable only if the provider supports reasoning. Adjust the active level in the composer.`,providerThinkingLevels:`Supported thinking levels`,providerThinkingLevelsHint:`Choose the levels this model supports. Saving updates the conversation picker.`,providerThinkingAutomatic:`Automatic (Pi defaults)`,providerThinkingSelected_one:`{{count}} level selected`,providerThinkingSelected_other:`{{count}} levels selected`,providerThinkingReset:`Use Pi defaults`,providerImageHint:`When Image is unchecked, the model will not receive image attachments.`,selectWorkspace:`Select workspace`,send:`Send`,processDetails:`Execution details`,processRunning:`Working`,processThinkingCount_one:`{{count}} reasoning note`,processThinkingCount_other:`{{count}} reasoning notes`,processToolCount_one:`{{count}} tool call`,processToolCount_other:`{{count}} tool calls`,processFailureCount_one:`{{count}} failed`,processFailureCount_other:`{{count}} failed`,runtimeActivities:`Activity`,activityAgentProgress:`{{completed}}/{{total}} agents finished`,activityCapacity:`Concurrent tasks: {{running}}/{{limit}} · {{queued}} waiting`,composerQueuedCount:`Queued {{count}}`,composerSteeringCount:`Steering {{count}}`,runtimeActivityRunning_one:`{{count}} running`,runtimeActivityRunning_other:`{{count}} running`,runtimeActivityCount_one:`{{count}} activity`,runtimeActivityCount_other:`{{count}} activities`,processActivityCount_one:`{{count}} agent activity`,processActivityCount_other:`{{count}} agent activities`,switchingSession:`Switching session...`,thinkingActive:`Thinking...`,thinkingActiveLevel:`Thinking ({{level}})...`,thinkingDone:`Thinking`,thinkingLoadFull:`Load full thinking`,thinkingLoadingFull:`Loading thinking…`,thinkingLoadFailed:`Unable to load thinking. Retry`,thinkingPartialText:`Showing part of the saved thinking. More text can be loaded below.`,thinkingPreviewOnly:`Thinking preview reached its limit. The full saved text will be available when this message finishes.`,toolState_running:`Running`,toolState_returned:`Returned`,toolState_failed:`Failed`,toolState_cancelled:`Stopped`,toolState_timed_out:`Timed out`,toolState_unknown:`Unconfirmed`,toolSnapshotMissingResult:`No result at fork`,toolActivity_running:`{{action}}…`,toolActivity_failed:`{{action}} failed`,toolActivity_cancelled:`{{action}} stopped`,toolActivity_timed_out:`{{action}} timed out`,toolActivity_unknown:`{{action}}`,toolAction_read:`Read`,toolAction_write:`Write file`,toolAction_edit:`Edit file`,toolAction_command:`Run command`,toolAction_search:`Search`,toolAction_list:`List files`,toolAction_web:`Browse web`,toolAction_agent:`Agent activity`,subagentAction_spawn:`Start subagent`,subagentAction_send:`Send follow-up`,subagentAction_check:`Check subagent`,subagentAction_wait:`Wait for subagent`,subagentAction_cancel:`Stop subagent`,subagentActionDone_spawn:`Started subagent`,subagentActionDone_send:`Sent follow-up`,subagentActionDone_check:`Checked subagent`,subagentActionDone_wait:`Finished waiting`,subagentActionDone_cancel:`Stop request returned`,toolAction_workflow:`Workflow`,toolAction_plan:`Prepare plan`,toolAction_git:`Review changes`,toolAction_call:`Use tool`,toolActionDone_read:`Read`,toolActionDone_write:`Wrote file`,toolActionDone_edit:`Edited`,toolActionDone_command:`Ran command`,toolActionDone_search:`Searched`,toolActionDone_list:`Listed files`,toolActionDone_web:`Browsed web`,toolActionDone_agent:`Agent activity returned`,toolActionDone_workflow:`Workflow tool returned`,toolActionDone_plan:`Plan tool returned`,toolActionDone_git:`Reviewed changes`,toolActionDone_call:`Used tool`,toolActionGroup_read:`read files`,toolActionGroup_write:`write files`,toolActionGroup_edit:`edit files`,toolActionGroup_command:`run commands`,toolActionGroup_search:`search`,toolActionGroup_list:`list files`,toolActionGroup_web:`browse web`,toolActionGroup_agent:`agent activity`,toolActionGroup_workflow:`workflow activity`,toolActionGroup_plan:`planning`,toolActionGroup_git:`review changes`,toolActionGroup_call:`use tools`,toolGroup_done:`Activity · {{actions}}`,toolGroup_running:`Working · {{actions}}`,toolGroup_unknown:`Activity · {{actions}}`,toolGroupSeparator:`, `,toolSearchTarget:`“{{pattern}}” · {{path}}`,toolDiffStatsHelp:`Added and removed lines in the displayed diff`,toolRequestedFile:`File:`,toolWorkspace:`Workspace`,toolRawEvidence:`Arguments and original result`,toolCodemodeDetails:`Script and original result`,toolNestedOutputMissing:`This session records the call and its status, but not the nested tool output.`,toolNestedArgumentsMissing:`This session omits the full arguments and nested tool output.`,toolNestedIncomplete:`The nested-call record is incomplete; some calls, arguments or final states are unavailable.`,toolPartialEvidence:`Partial output: a byte, line or item limit was reached. The original result may also be truncated.`,toolFileChange_created:`File created`,toolFileChange_unchanged:`No content changes`,toolFileChange_overwritten:`File overwritten`,toolChangeUnavailable:`This result does not include a change comparison.`,toolTestResults:`Reported test results · {{format}}`,toolTestCounts:`{{tests}} tests · {{passed}} passed · {{failed}} failed · {{cancelled}} cancelled`,toolTestCountsHelp:`Counts come from command output. The execution status is shown separately.`,toolReadMore:`Read another range using the path and offset. The original result contains continuation details.`,toolFullOutputReference:`Full output:`,subagentBackgroundResult_one:`Background subagent result · {{count}}`,subagentBackgroundResult_other:`Background subagent results · {{count}}`,thinkingDraftHint:`Choose a workspace and create a session first.`,thinkingInactiveHint:`Only the active session can change its thinking level.`,thinkingLevelMismatch:`The confirmed thinking level is not offered by the current model. Choosing another level will correct it.`,thinkingLockedRunning:`Stop the current turn before changing the thinking level.`,thinkingModelPendingHint:`Wait for the model change to finish.`,thinkingNotConfirmed:`Thinking level was not confirmed. Please try again.`,thinkingPendingHint:`Applying the thinking level...`,thinkingUnsupported:`Thinking is unavailable`,thinkingUnsupportedHint:`No model is selected, or the current model does not support thinking.`,unavailable:`Unavailable`,ungrouped:`Ungrouped`,untitledSession:`New session`,workspaceDeleteConfirm:`The folder and conversation records will be kept. Its conversations will move to Ungrouped.`,workspaceName:`Workspace name`,workspaces:`Workspaces`,sidebarProjects:`Projects`}},zh:{translation:{quitOpenPI:`退出 OpenPI`,quittingOpenPI:`正在退出…`,quitConfirmHelp:`确定退出此 OpenPI Web 应用吗?此 Web 应用中所有正在运行的任务都会停止,对话会保存,重启后可继续查看。`,quitTabHelp:`仅关闭浏览器标签页会让 OpenPI 和任务继续在后台运行。`,quitAccepted:`OpenPI 正在关闭`,quitAcceptedHelp:`退出请求已接受。请等待终端确认 OpenPI 已停止,然后可以关闭此标签页。`,quitRestartHelp:`重新启动:在终端运行 openpi web,或在 Pi 中运行 /web,然后打开显示的地址。刷新此页面不会重启 OpenPI。`,quitFailed:`无法确认是否已关闭。请先检查终端,再重试。也可以在 OpenPI 所在终端按 Ctrl+C 停止应用。`,promptPending:`正在处理请求…`,commandFeedbackTruncated:`这里只显示部分命令结果。请缩小查询范围,或在 TUI 查看完整输出。`,planMode_inactive:`普通模式`,planMode_planning:`规划中 · 禁止写入`,planMode_ready:`计划就绪 · 等待审阅`,planMode_invalid:`计划状态异常 · 禁止写入`,planModeEnter:`进入规划`,promptPlanMessage:`本次对话使用 Plan 模式 · 继续讨论计划,暂不实施`,planModeUnconfirmed:`暂时无法确认 Plan 状态,请刷新后再继续。`,planModeExit:`退出规划`,planModeImplement:`准备实施提示`,planImplementationReplaceDraft:`准备实施会替换当前草稿并关闭规划模式,但不会发送提示词。是否继续?`,commandSupport_plan:`支持规划和准备当前会话的实施提示;新建实施会话仍需使用 TUI。`,commandSupport_setup:`通过当前模型配置,在 Web 回答问题。`,handoffWaiting:`需要你操作`,handoffDone:`已完成`,handoffUnable:`无法完成`,handoffDoneHelp:`已执行操作,接下来由模型验证结果。`,handoffUnableHelp:`未能完成,可以补充遇到的障碍。`,handoffReview:`复核状态`,handoffSubmit:`提交状态`,handoffSignal:`预期结果:`,handoffVerify:`提交完成后,模型仍需验证结果;你的反馈本身不代表验证成功。`,planCardLabel:`开发计划`,planCardReady:`计划已就绪`,planCardResult:`计划结果`,planCardNotApproval:`此步骤仅生成计划,不代表已批准或开始实施。`,planCardCollapse:`收起`,planCardExpand:`展开`,planCardCopy:`复制计划`,planCardCopyPreview:`复制可见预览`,planCardTruncated:`当前仅显示截断预览。`,planCardLoadFull:`加载完整计划`,planCardLoadingFull:`正在加载计划...`,planCardLoadFailed:`无法加载完整计划,重试`,planCardEvidence:`工具结果 · plan_ready`,questionWaiting:`问题`,questionPreview:`查看预览`,questionSkip:`跳过`,questionProgress:`{{current}} / {{total}}`,questionReview:`复核答案`,questionReviewTitle:`确认这些选择?`,questionReviewHelp:`可以返回修改,点击提交后才会发送给助手。`,questionEdit:`修改答案:{{question}}`,questionDismiss:`关闭提问,不提交答案`,questionCustom:`或自行撰写回复`,questionCustomHelp:`留空提交,表示希望助手把问题说清楚或拆小。`,questionYourAnswer:`你的答案`,questionCustomPlaceholder:`说说你的想法…`,questionNotes:`补充说明(选填)`,questionNotesPlaceholder:`补充限制条件,或解释你的选择…`,questionRephrase:`请助手把问题说清楚或拆小`,questionBack:`上一步`,questionNext:`下一题`,questionSubmit:`提交答案`,questionSubmitting:`正在提交…`,questionRetry:`核对提交结果`,questionUncertain:`暂时无法确认是否送达,已保留本次提交的答案。点击核对可恢复结果,不会重复提交。`,questionDisconnected:`正在重新连接… 已保留你的选择,暂时无法提交。`,questionLimit:`每项答案或补充说明不能超过 {{count}} 个 UTF-8 字节。`,questionLoadFailed:`暂时无法读取等待回答的问题。`,questionDraftLimit:`提问草稿已达上限,请缩短或清空已有答案后再添加内容。`,questionRetryLoad:`重试`,questionCloseReceipt:`关闭问答状态提示`,questionState_dismissed:`已关闭提问,没有提交答案。`,questionState_cancelled:`提问已取消,没有提交答案。`,questionState_expired:`提问已过期,没有提交答案。`,questionState_stale:`该提问已失效,请查看对话中的处理结果。`,conversationView:`会话视图`,jumpToLatest:`跳至最新`,historyLoading:`正在加载历史…`,historyOmitted:`还有 {{count}} 条较早记录 · 向上滚动自动加载`,historyChanged:`会话分支已更改,已切换到当前分支的历史。`,historyUnavailable:`历史记录加载失败,请重试。`,historyValidationUnavailable:`无法校验会话历史,请重试。`,historyVerifying:`正在校验会话历史…`,messageLoadFull:`加载完整消息`,messageLoadMore:`加载更多`,messageLoadingFull:`正在加载消息…`,messageLoadFailed:`无法加载这条消息,重试`,filePreview:`文件预览`,changeEvidence:`变更`,changeEvidenceScope:`按所选范围查看当前工作目录的只读 Git 变更。`,turnLabel:`第 {{number}} 轮`,turnState_running:`运行中`,turnState_complete:`已完成`,turnState_failed:`失败`,turnState_interrupted:`已中断`,turnState_waiting:`等待回复`,turnState_forked:`已分叉,可继续对话`,turnChanges:`本轮更改 {{count}} 个文件`,turnChangesPartial:`本轮已记录 {{count}} 个文件`,turnChangesIncomplete:`这一轮的变更记录不完整。`,turnChangesMore:`再显示 {{count}} 个文件`,turnChangesLess:`收起文件`,turnChangesReview:`审阅本轮变更`,turnChangesReviewButton:`审阅`,turnChangesBack:`返回本轮变更`,turnChangesLoading:`正在加载本轮变更…`,turnChangesUnavailable:`无法读取本轮保存的差异。`,messageCopyRequiresFull:`加载完整消息后才能复制。`,filesChanged:`{{count}} 个文件已更改`,reviewChanges:`查看变更`,workspaceChanges:`工作区更改`,overviewChanges:`变更`,overviewLineTotals:`当前 Git 比较范围内的文本新增与删除行数`,overviewPartialTotals:`仅展示已核实的行数,部分文件尚无法统计。点击变更查看详情。`,overviewCounting:`统计中…`,overviewCountsUnknown:`行数未知`,overviewReviewUnavailable:`暂不可用`,sessionSources:`来源`,sourcesAdd:`添加来源`,sourcesDescription:`查看此对话附加的图片与文件`,sourceAttached:`已附加到对话`,sourcesEmpty:`暂无来源`,sourcesFailed:`来源加载失败。`,sourcesViewAll:`查看全部`,sourcesLoadMore:`加载更多来源`,sourcesBack:`返回来源列表`,sourcesPartial:`已达到列表展示上限,更早的来源仍可在对话中查看。`,turnChangesScope:`该轮开始至结束的工作区差异 · 已保存`,turnEdits:`已编辑 {{count}} 个文件`,turnEditsPartial:`已记录 {{count}} 个文件的编辑`,turnEditsScope:`本轮文件工具写入记录 · 已保存;不含命令行与外部修改`,turnEditStatsUnknown:`行数未知`,turnEditReason_before_unavailable:`文件已写入,但该操作未授权读取旧内容,无法提供可靠的前后差异。`,turnEditReason_content_limit:`文件已写入,内容超过已保存对比的大小限制,无法提供准确行数。`,turnEditReason_concurrent_change:`文件在已记录的操作之间发生了变化,无法确认本轮净增删行数。`,gitReviewLoadedCount:`已载入 {{count}} 个文件`,gitReviewPartialLabel:`部分`,gitReviewSearch:`搜索文件路径`,gitReviewExpand:`展开审阅`,gitReviewSearchLoaded:`搜索已载入文件`,gitReviewMarkViewed:`标记 {{path}} 为已查看`,gitReviewMarkCurrentViewed:`标记当前文件 {{path}} 为已查看`,gitReviewViewedLabel:`已查看`,gitReviewViewedProgress:`已查看 {{viewed}} / 已加载 {{loaded}} 个文件`,gitReviewViewedLimit:`本次对比最多保留 {{count}} 个已查看标记。`,gitReviewNoMatch:`没有匹配的文件。`,gitReviewNoLoadedMatch:`已载入文件中没有匹配项。`,gitReviewLoadNext:`载入下一批文件`,gitReviewChanged:`工作区已有变化,请刷新清单后继续载入。`,gitReviewNewVersion:`有新的更改,当前仍显示你正在阅读的版本。`,gitReviewShowLatest:`查看最新差异`,gitReviewBinary:`此二进制文件无法显示文本差异。`,gitReviewBinaryShort:`二进制`,gitReviewPendingStats:`待读取`,gitReviewComparison:`{{current}} 对比 {{base}}`,gitReviewWorkingTree:`工作区对比 HEAD`,gitReviewSessionSnapshot:`自本会话开始后的变更`,gitReviewDetached:`游离 HEAD`,gitReviewLoading:`正在读取 Git 变更…`,gitReviewRetry:`重试`,gitReviewRefresh:`刷新变更`,gitReviewOlderResult:`当前显示上一次读取结果。`,gitReviewNotRepository:`此工作区不是 Git 仓库。`,gitReviewUnborn:`此仓库还没有可读取的 HEAD。`,gitReviewFailed:`无法读取 Git 变更。`,gitReviewTruncated:`结果不完整,部分文件或差异未载入。`,gitReviewEmpty:`当前范围内没有文件变更。`,gitReviewHiddenLines:`另有 {{count}} 行 diff 未显示。`,gitReviewDiffTruncated:`快照已达到大小上限,未加载此文件的 diff。`,gitReviewShowMore:`再显示 {{count}} 个文件`,gitReviewBackToFiles:`返回变更文件`,gitReviewFilePreview:`{{file}} 的差异`,gitReviewNoDiff:`此文件没有可显示的文本差异。`,changeDiff:`变更差异`,diffViewMode:`差异视图`,diffUnified:`统一`,diffSplit:`并排`,diffBefore:`修改前`,diffAfter:`修改后`,diffView:`差异`,gitFileStatus_added:`已新增`,gitFileStatus_modified:`已修改`,gitFileStatus_deleted:`已删除`,gitFileStatus_renamed:`已重命名`,gitFileStatus_copied:`已复制`,gitFileStatus_untracked:`未跟踪`,gitFileStatus_unknown:`已变更`,closePreview:`关闭预览`,imageZoom:`图片缩放`,imageZoomHelp:`缩放相对于适应窗口。Ctrl + 滚轮缩放,放大后可拖动查看。`,zoomIn:`放大图片`,zoomOut:`缩小图片`,previousImage:`上一张图片`,nextImage:`下一张图片`,imagePosition:`第 {{current}} 张,共 {{total}} 张图片`,artifactReadOnly:`只读`,artifactReferenceUnavailable:`此视图无法打开文件预览:{{path}}`,artifactSession:`所属会话 {{sessionId}}`,copyFilePath:`复制文件路径`,filePathCopied:`已复制文件路径`,refreshFile:`刷新文件`,downloadFile:`下载文件`,downloadingFile:`正在下载…`,artifactOlderPreview:`当前显示旧版预览。`,readingFile:`正在读取文件…`,artifactVersion:`版本`,artifactBytes:`{{count}} 字节`,artifactPreviewTruncated:`预览已截断;下载文件可获取完整内容。`,artifactUnsupported:`此类型无法预览,请下载文件。`,filesLargeMarkdownSource:`Markdown 预览较大,已显示为源码以保持滚动流畅。已加载的文字全部保留。`,chatView:`对话`,trajectory:`执行轨迹`,trajectoryScope:`按记录顺序展示会话消息,不表示执行耗时,也不是完整模型请求。`,trajectoryRunning:`任务仍在进行。已保存记录到达后自动更新;实时生成内容可在“对话”中查看。`,trajectoryTruncated:`当前历史不完整:省略 {{entries}} 条记录、{{parts}} 个内容片段,{{messages}} 条消息被截断。`,trajectoryEmpty:`尚无已保存记录。`,trajectoryOrder:`记录顺序`,trajectoryOverview:`总览`,trajectorySequenceHint:`按记录顺序排列 · 宽度不表示执行耗时`,trajectoryClearRange:`清除选区`,trajectoryContextLane:`上下文`,trajectoryModelLane:`模型`,trajectoryToolLane:`工具`,trajectorySelectRecord:`选择记录 {{number}}:{{name}}`,trajectoryTimingTab:`时间`,trajectoryUsageTab:`用量`,trajectoryDurationLabel:`耗时`,trajectoryTimingSource:`数据来源`,trajectoryTimingUnknown:`尚未记录执行耗时。保存时间不等于操作开始时间。`,trajectoryTimingNative:`Pi 嵌套工具执行记录`,trajectoryTTFT:`首段输出等待`,trajectoryGenerationTime:`生成时间`,trajectoryThroughput:`每秒输出 tokens`,trajectoryNotRecorded:`未记录`,trajectoryUsageUnknown:`已加载记录中没有此响应的 token 用量。`,trajectoryUsage_input:`未缓存输入`,trajectoryUsage_cacheRead:`缓存读取`,trajectoryUsage_cacheWrite:`缓存写入`,trajectoryUsage_output:`输出`,trajectoryProvider:`提供商`,trajectoryModel:`模型`,trajectoryCode:`代码`,trajectoryWrap:`自动换行`,trajectoryCopy:`复制原文`,trajectoryCopied:`已复制`,trajectoryRawArguments:`原始 JSON`,trajectoryFoldTurns:`回合`,trajectoryFoldCalls:`工具调用`,trajectoryMetrics:`已加载执行摘要`,trajectoryRequestCount:`{{count}} 次模型响应`,trajectoryToolCount:`{{count}} 次工具调用`,trajectoryModelResponses:`模型响应`,trajectoryToolCalls:`工具调用`,trajectoryLastTurn:`最近已记录回合`,trajectoryEventColumn:`事件`,trajectoryContentColumn:`内容`,trajectoryTurn:`回合 {{number}}`,trajectoryLoadHistory:`加载更早历史`,trajectoryLatestRecords:`回到最新记录`,trajectoryHistoryLoading:`正在加载历史…`,trajectoryNestedOutputMissing:`Pi 已记录此嵌套调用的状态,但未保存其结果正文。外层脚本输出单独保留。`,trajectoryRecordCount:`{{count}} 条记录`,trajectoryMatches:`{{count}} 条匹配`,trajectorySearch:`搜索已加载记录`,trajectoryNoMatches:`没有匹配的记录。`,trajectoryEarlierGroup:`较早上下文`,trajectoryEventCount:`{{count}} 条会话变更`,trajectorySummary:`概览`,trajectoryInputTab:`输入`,trajectoryResultTab:`结果`,trajectoryConversationGroup:`本轮对话`,trajectoryReasoningTitle:`思考`,trajectoryRecordNumber:`记录 {{number}}`,trajectoryRecordInfo:`记录信息`,trajectoryRecordId:`记录 ID`,trajectoryCallId:`工具调用 ID`,trajectoryEventType:`事件类型`,trajectoryEvent_model_change:`切换模型`,trajectoryEvent_thinking_level_change:`调整思考级别`,trajectoryEvent_compaction:`压缩上下文`,trajectoryEvent_session_info:`更新会话信息`,trajectoryEvent_custom:`会话记录`,trajectoryEarlier:`显示更早记录(已加载历史中还有 {{count}} 条)`,trajectoryDetails:`记录详情`,trajectoryRecordedAt:`记录时间`,trajectoryEvidenceTruncated:`此证据在会话投影中已被截断。`,trajectoryArguments:`工具参数`,trajectoryRecordedContent:`已记录内容`,trajectoryThinking:`模型返回的推理内容`,trajectoryOutput:`工具结果`,trajectoryMissingResult:`当前记录中没有可明确配对的结果。这不表示工具仍在运行。`,trajectoryStructured:`结构化结果`,trajectoryEventOnly:`当前仅提供此事件的类型和记录时间。`,trajectory_user:`用户消息`,trajectory_assistant:`助手回复`,trajectory_call:`工具调用`,trajectory_result:`未配对结果`,trajectory_event:`会话事件`,trajectoryRole_user:`用户`,trajectoryRole_assistant:`助手`,trajectoryRole_call:`工具`,trajectoryRole_result:`结果`,trajectoryRole_event:`事件`,trajectory_returned:`工具已返回结果。`,trajectory_error:`工具返回错误`,trajectory_unknown:`尚无法确定结果`,runtimeStatus:`运行状态`,runtimeIdentity:`OpenPI 运行信息`,runtimeIdentityHint:`后端信息在启动时采样,不随之后的磁盘改动或会话重新加载更新,也不证明所有模块的加载版本。前端标识对应当前页面构建。`,runtimeIdentityFailed:`无法读取后端运行信息,请重试。`,runtimeBackendVersion:`后端包版本`,runtimePackageRoot:`后端包目录`,runtimeStartedAt:`进程启动时间`,runtimeGitRevision:`启动时 Git 提交`,runtimeGitState:`启动时工作区状态`,runtimeGitDirty:`存在本地改动`,runtimeGitClean:`干净`,runtimeFrontendVersion:`页面包版本`,runtimeFrontendBuild:`页面构建标识`,runtimeStartupBuild:`后端启动时记录的页面构建标识`,runtimeDevelopmentBuild:`开发服务器(无生产构建标识)`,runtimeBuildMismatch:`当前页面构建与后端启动时记录的构建不同。请刷新页面或重启服务后重新检查。`,refreshStatus:`刷新状态`,openTools:`打开工具`,openToolsUnavailable:`选择会话后可打开工具`,sideConversation:`侧边对话`,sideConversationDescription:`在独立 Pi 会话中追问具体问题,不打断当前主任务。`,workbarChangesDescription:`查看当前目录的未暂存、已暂存、分支或会话变更。`,terminal:`终端`,renameTerminal:`重命名终端`,terminalName:`终端名称`,workbarTerminalDescription:`打开当前工作区的交互式终端。`,restartTerminal:`重新启动终端`,reconnectTerminal:`重新连接终端`,restartTerminalTitle:`重新启动此终端?`,restartTerminalDetail:`当前终端会被关闭,其中运行的进程可能被中断。`,terminalReconnecting:`正在重新连接终端...`,terminalScrollToBottom:`回到底部`,terminalOutputResynced:`终端输出已重新同步`,terminalRestarting:`正在重新启动终端...`,terminalConnecting:`正在启动终端…`,terminalExited:`终端已退出。`,terminalExitCode:`终端已退出,状态码 {{code}}。`,terminalDisconnected:`终端连接意外中断。`,terminalError:`终端不可用。`,terminalLoadError:`终端界面加载失败,请刷新页面后重试。`,reloadPage:`刷新页面`,browser:`浏览器`,sessionFileRecords:`本会话文件记录`,gitReviewSource:`变更范围`,gitReviewBaseBranch:`对比分支`,gitReviewChooseBase:`选择对比分支`,gitReviewSearchBranches:`搜索分支`,gitReviewLocalBranch:`本地分支`,gitReviewRemoteBranch:`远程分支`,gitReviewBranchesTruncated:`显示有数量限制的分支列表,部分分支已省略。`,gitReviewNoMatchingBranches:`没有匹配的分支。`,gitReviewBaseUnavailable:`没有可用的默认对比分支。请选择分支以审阅已提交的变更。`,gitReviewBaseInvalid:`所选对比分支已不可用,请选择其他分支。`,gitReviewUnstaged:`未暂存(含未跟踪)`,gitReviewStaged:`已暂存变更`,gitReviewBranch:`分支变更`,gitReviewFileMissing:`此文件在当前范围内已无变更,请刷新文件列表。`,artifactExternalAccess:`此文件位于其他工作目录。可为当前会话授权只读打开这一个文件,不会开放其他文件的访问。`,artifactAuthorizeFile:`只读打开此文件`,sideConversationPending:`正在准备侧边会话…`,resizeSidebar:`调整侧边栏宽度`,resizePanes:`调整面板宽度`,resizeWorkbar:`调整工具栏宽度`,browserPasteTooLarge:`每次最多粘贴 {{count}} 个字符。`,browserInputTooLarge:`每次最多输入 {{count}} 个字符。`,browserInputTargetChanged:`输入目标已变化或无法确认,有输入操作未执行。`,workbarBrowserDescription:`在 OpenPI 工作栏内打开并操作网页。`,browserReady:`输入地址开始浏览`,browserStarting:`正在启动内嵌浏览器…`,browserOpened:`已在内嵌浏览器中打开`,browserOpenAgain:`再次打开`,browserOpenFailed:`内嵌浏览器暂不可用。`,browserBack:`后退`,browserForward:`前进`,browserReload:`重新加载`,browserTabs:`网页标签页`,browserNewTab:`新标签页`,browserAddTab:`新建网页标签页`,browserCloseTab:`关闭 {{title}}`,browserTabLimit:`最多打开 {{count}} 个网页标签页`,browserPageTitle:`网页:{{address}}`,browserEnteredAddress:`最近从此地址栏打开的地址`,browserAddressNotAllowed:`请输入不含用户名或密码、且不属于 OpenPI 自身地址的 HTTP(S) 网址。`,browserLocationUnknown:`网页已跳转,新地址无法读取。重新加载会返回你输入的地址。`,browserDirectDescription:`直接浏览网页。不允许嵌入的网站可在外部浏览器打开。`,browserDirectHint:`地址栏仅记录手动打开的地址。网页弹窗在外部浏览器打开;遇到空白页,可点击外部打开。`,browserEnhancedHint:`浏览增强已开启:地址自动同步,普通弹窗链接在内部标签页打开。部分站点限制、登录弹窗和跨站历史仍需外部浏览器。`,files:`文件`,filesExplorer:`工作区文件`,filesSearch:`筛选文件…`,refreshFiles:`刷新文件`,filesWorkspaceActions:`工作区文件操作`,filesCreateMenu:`新建`,filesImportMenu:`导入`,filesMoreMenu:`更多`,filesNewFile:`新建文件`,filesNewDirectory:`新建文件夹`,filesImport:`导入文件`,filesImportFolder:`导入文件夹`,filesImportFolderChoose:`选择要导入的文件夹`,filesImportFolderLimit:`每次最多导入 2,000 个文件和文件夹,目录层级最多 64 层。`,filesSelectMultiple:`多选文件`,filesSelectItem:`选择 {{name}}`,filesSelectedCount:`已选 {{count}} 项`,filesRename:`重命名`,filesNewName:`新名称`,filesMove:`移动`,filesMoveDestination:`目标文件夹(工作区内相对路径)`,filesTrashAction:`移入回收站`,filesTrash:`工作区回收站`,filesTrashDetail:`移除的文件保留在当前工作区,可恢复;不会覆盖同名文件。`,filesTrashEmpty:`暂无已移除文件`,filesTrashUnavailable:`{{count}} 项记录无法核验,内容仍保留在 .openpi-trash 中,暂不能自动恢复。`,filesRestore:`恢复`,filesRestoreItem:`恢复 {{name}}`,filesUndoTrash:`撤销移除`,filesOrganizationResults:`文件操作结果`,filesOperationDone:`完成`,filesRefreshBeforeOrganizing:`请先刷新文件树,再整理这项文件。`,filesImportChoose:`选择要导入的文件`,filesTargetDirectory:`目标目录`,filesWorkspaceRoot:`工作区根目录`,filesFileName:`文件名称`,filesDirectoryName:`文件夹名称`,filesCreate:`创建`,filesCreating:`创建中…`,filesCreated:`已创建:{{path}}`,filesNameInvalid:`请输入单个文件或文件夹名称,不要包含路径分隔符。`,filesNameExists:`此名称已存在,请更换名称;原有文件已保留。`,filesMutationFailed:`写入失败,输入已保留。`,filesWriteUnavailable:`请先切换到此会话,再修改工作区文件。`,filesImportLimit:`每个文件最多 50 MiB,同名文件不会覆盖。`,filesImportTooLarge:`此文件超过 50 MiB 导入上限。`,filesImportDirectoryUnsupported:`不支持导入整个文件夹,请选择其中的文件。`,filesImportResults:`文件导入结果`,filesImportPending:`等待导入`,filesImporting:`导入中…`,filesImported:`已保存到工作区`,filesImportedNoPreview:`已保存。预览上限为 20 MiB;可复制路径,在对话中引用此文件。`,filesClearImported:`清除已完成的导入`,filesRetryImport:`重试导入`,filesPathActions:`{{name}} 的路径操作`,filesCopyRelativePath:`复制相对路径`,filesCopyAbsolutePath:`复制绝对路径`,filesPathCopied:`已复制路径:{{path}}`,filesReadFailed:`无法读取文件。`,filesRetryRead:`重试读取`,filesErrorDetails:`错误详情`,filesReadFailedDetail:`文件列表未能加载,请检查连接后重试。`,filesReadDenied:`当前会话的工作区暂不可访问,或无法确认目录身份。请确认会话与工作区后重试。`,filesSymlink:`符号链接,文件浏览器不会自动跟随`,filesTruncated:`结果不完整,请缩小搜索范围。`,filesNoMatches:`没有匹配的文件`,filesEmpty:`此文件夹为空`,filesChoose:`选择文件进行预览`,filesChooseDetail:`从右侧浏览工作区文件,在这里直接预览。`,filesHideTree:`收起文件树`,filesShowTree:`显示文件树`,filesPreview:`预览`,filesSource:`查看源代码`,filesEdit:`编辑`,filesMode:`文件视图`,filesEditor:`文件编辑器`,filesSave:`保存文件`,filesSaving:`保存中…`,filesSaved:`已保存`,filesUnsaved:`未保存的修改 · 草稿保留在当前窗口`,filesDiscard:`放弃草稿`,filesDiscardConfirm:`放弃此文件尚未保存的修改?`,filesSaveConflict:`磁盘上的文件已改变,编辑草稿已保留。请刷新查看最新内容,核对修改后再保存。`,filesSaveFailed:`保存失败,编辑草稿已保留。请检查文件后重试。`,filesEditLoadFirst:`请先继续读取完整文件,再编辑。`,filesEditUnavailable:`支持编辑工作区内不超过 1 MiB 的 UTF-8 文本,最多保留 16 份未保存草稿。`,filesOutline:`章节目录`,filesDiskVersion:`查看当前磁盘版本`,filesReconcile:`已核对,保留草稿并基于此版本继续编辑`,filesTable:`表格预览`,filesRow:`行`,filesSheets:`工作表`,filesTableTruncated:`当前仅显示部分表格内容;下载原文件可查看完整内容。`,filesOfficeLayout:`文档内容预览;分页和排版可能与 Office 不同。`,filesSlidesLayout:`幻灯片文字与图片预览;主题、图表和动画可能与 PowerPoint 不同。`,filesPreviousPage:`上一页`,filesNextPage:`下一页`,filesZoomOut:`缩小`,filesZoomIn:`放大`,filesZoomReset:`重置缩放`,filesPdfPage:`第 {{page}} 页`,filesDocumentLimit:`此文档超出预览处理范围,请下载后在本地打开。`,filesPreviewFailed:`无法预览此文件,仍可下载后打开。`,filesDiagram:`Mermaid 图表`,filesDiagramLoadError:`图表预览加载失败,已显示源码。刷新页面后可重试。`,filesExpandDiagram:`放大图表`,filesFitImage:`适应宽度`,filesOriginalImage:`原始尺寸`,filesLoadMore:`加载更多`,filesLoaded:`已加载 {{count}} 项`,filesReadMore:`继续读取`,filesContentChanged:`文件已更新。当前阅读内容已保留,可在准备好后刷新。`,workbarFilesDescription:`浏览工作区文件,在文件树旁直接预览。`,backToSideConversations:`返回侧边对话`,continueSideConversation:`继续追问…`,startSideConversation:`提出一个侧边问题…`,sideConversationModelInherited:`新侧边对话使用主会话的模型与思考等级。`,sideConversationModelFixed:`这是当前侧边对话使用的模型。`,stop:`停止`,start:`开始`,browserAddress:`浏览器地址`,browserGo:`打开地址`,openExternalBrowser:`在外部浏览器打开`,invalidBrowserAddress:`请输入有效的 HTTP 或 HTTPS 地址。`,addImages:`添加图片`,addFiles:`添加文件`,fileAttachments:`文件附件`,previewFileAttachment:`预览文件`,fileAttachmentDescription:`文档、表格、PDF、文本、代码及其他文件`,fileAttachmentCount:`最多可添加 {{count}} 个附件。`,fileAttachmentTooLarge:`文件总大小不能超过 50 MB。`,fileAttachmentReadFailed:`无法读取此文件,请检查格式或是否有密码保护。`,fileAttachmentTextReady:`文本已就绪`,fileAttachmentTextTruncated:`部分文本 · 保留原文件`,fileAttachmentOriginalReady:`原文件已就绪`,fileAttachmentExtractionFailed:`未提取文本 · 原文件保留`,fileAttachmentEncodingUnavailable:`无法读取文本编码,原文件字节已保留。`,fileAttachmentDocumentUnavailable:`无法提取文本。文件可能受密码保护或格式暂不支持,原文件字节已保留。`,fileAttachmentNoText:`发送后,代理可通过工具读取原文件;此文件未提取出文本。`,fileAttachmentPreviewTruncated:`预览显示前 20,000 个字符,发送时会附上全部已提取文本。`,fileAttachmentExtractedContent:`已提取文本`,fileAttachmentPromptLabel:`用户提供的文件:`,fileAttachmentPromptTooLong:`消息和文件引用超过输入限制,请缩短消息或减少附件。`,imageAttachmentDescription:`支持 PNG、JPEG、GIF 或 WebP`,imageAttachments:`图片附件`,imageAttachmentsLoading:`正在准备附件…`,commandOpensPanel:`打开面板`,commandPanelArguments:`此命令用于打开面板,不能携带参数或图片。请移除后重试,或直接使用对应面板。`,commandPanelUnavailable:`未能打开面板,已保留命令。`,commandUnavailable_terminal_only:`需要在 Pi 终端界面中使用。`,commandUnavailable_not_integrated:`此扩展命令尚未接入 Web,请在 Pi 终端中使用。`,artifactImagePreviewFailed:`图片预览失败。请刷新文件重试,或下载后查看。`,artifactFileDetails:`文件信息`,turnElapsedRunning:`正在处理 · {{duration}}`,compactionElapsed:`已等待 {{duration}}`,compactionRunning:`正在压缩上下文`,compactionCompleted:`上下文已自动压缩`,compactionFailed:`上下文压缩失败`,compactionInterrupted:`压缩已中断`,compactionUnchanged:`压缩已结束,未生成新的摘要`,compactionUnavailable:`上下文压缩状态暂不可用`,compactionReconnectHelp:`连接已中断,恢复连接后将核实当前状态。`,compactionDraftHelp:`正在压缩上下文,发送的消息会排队等待。`,turnElapsedFinished:`用时 {{duration}}`,composerAdd:`添加`,composerCommands:`指令`,composerFile:`文件`,composerPlan:`计划`,composerCompact:`压缩`,composerModel:`模型`,composerBack:`返回`,composerPlanDescription:`进入或退出计划模式`,composerCompactDescription:`整理之前的对话,释放上下文空间`,composerModelDescription:`选择本会话使用的模型`,compactionQueueWaiting:`等待压缩完成`,compactionQueueBlocked:`消息已保留,可重试或清空队列。`,clearPromptQueue:`取消排队`,queueUpdateFailed:`未能更新队列,请确认当前会话后重试。`,queueStatusUnconfirmed:`请求已接收,但暂时无法确认最新队列状态。请刷新后再操作。`,turnElapsedOutcome_cancelled:`已停止`,turnElapsedOutcome_failed:`失败`,turnElapsedOutcome_uncertain:`结果待确认`,settingsSetupBusyHint:`Agent 配置需等待当前轮次结束;显示设置可直接调整。`,resetChatContentWidth:`恢复默认聊天宽度`,resetChatFontSize:`恢复默认字体大小`,setupResolveAdmission:`请先返回对话,处理尚未确认的消息,再应用设置。`,removeAttachment:`移除附件`,dropImagesHere:`将文件或图片拖到这里`,imageAttachmentCount:`最多可添加 {{count}} 张图片。`,imageAttachmentTooLarge:`单张图片不能超过 10 MB。`,imageAttachmentTotalTooLarge:`图片总大小不能超过 32 MB。`,imageAttachmentUnsupported:`仅支持有效的 PNG、JPEG、GIF 和 WebP 图片。`,imageAttachmentReadFailed:`无法读取此图片,请重新添加重试;消息内容已保留。`,attachedImage:`已附加图片`,previewAttachment:`预览图片`,closeImagePreview:`关闭图片预览`,imagePreviewFailed:`无法显示这张图片。`,fitImage:`适应窗口`,originalImageSize:`原始尺寸`,imageViewMode:`图片查看`,sessionUsage:`会话 Token 用量`,sessionInputTokens:`输入 Token`,sessionOutputTokens:`输出 Token`,sessionCacheTokens:`缓存 Token`,sessionContextUsage:`上下文占用与窗口大小`,usageContextLabel:`上下文`,usageUnknown:`未知`,usageOpenDetails:`输入 {{input}} · 输出 {{output}} · 上下文 {{percent}} / {{capacity}} · 查看会话用量`,usageContextHelp:`当前分支的估算占用 / 模型上下文容量上限。`,usageSessionTotals:`累计用量`,usageInputLabel:`输入`,usageOutputLabel:`输出`,usageCacheReadLabel:`缓存读取`,usageCacheWriteLabel:`缓存写入`,usageTotalLabel:`总计`,usageWorkspaceLabel:`工作区`,usageSessionId:`会话 ID`,usageTotalsHelp:`本会话累计 Token 用量,包含缓存。`,subagentDetails:`子代理`,sessionOverview:`会话概览`,sessionOverviewChanges:`当前审阅范围的更改`,subagentSummaryRunning:`{{count}} 运行中`,subagentSummaryDone:`{{count}} 完成`,subagentSummaryOther:`{{count}} 其他记录`,subagentNoneYet:`暂无子代理`,subagentOtherGroup:`失败 / 已中断`,subagentShowMore:`再显示 {{count}} 个`,backToSubagents:`返回子代理列表`,subagentActiveGroup:`已开启`,subagentFinishedGroup:`完成`,subagentNoneRunning:`暂无正在运行的子代理。`,subagentNoneFinished:`任务结束后会显示在这里。`,subagentProgress:`子代理:{{running}} 运行中 · {{completed}} 已完成`,subagentSummaryUnknown:`{{count}} 个状态未确认`,subagentTasks:`子代理任务列表`,inspectSubagent:`打开子代理:{{name}}`,subagentState_running:`运行中`,subagentProcessing:`处理中`,subagentState_done:`已完成`,subagentState_error:`失败`,subagentState_interrupted:`已中断`,subagentStarting:`正在启动…`,subagentSpawnFailed:`启动失败`,subagentStateUnavailable:`已启动 · 状态未保留`,subagentSpawnReceipt:`启动回执`,subagentSpawnReceiptHint:`此回执仅确认启动请求,不表示子代理任务已完成。`,subagentTask:`分配的任务`,subagentTranscript:`子代理对话`,subagentResult:`执行结果`,subagentSpend:`累计 token 消耗`,subagentSaved:`已保存记录`,subagentRecordedState:`最后记录的状态`,subagentSavedHint:`来自当前父会话已保存的回执;结果可能包含同批其他任务,并非子代理的完整实时对话。`,subagentReadOnly:`只读查看 · 关闭此面板不会停止任务`,subagentUnavailable:`当前会话已无法提供此子代理的实时详情。启动回执不代表任务已完成。`,subagentStale:`刷新失败,下方保留的是上次收到的状态。`,subagentNoMessages:`暂未收到消息。`,subagentTranscriptUnavailable:`此视图仅保留任务摘要,无法显示完整子代理对话。`,subagentWorkflowsTruncated:`另有 {{count}} 个 workflow 未包含在当前列表中,其任务数量未知。`,subagentState_unknown:`未确认`,subagentUnconfirmedGroup:`未确认`,subagentTruncated:`当前显示最近的消息,另有 {{count}} 条较早消息未包含在此视图中。`,subagentTextTruncated:`部分较长内容仅显示节选。`,subagentListTruncated:`另有 {{count}} 个任务未包含在当前列表中。`,subagentThinkingRedacted:`服务商已隐藏此段思考内容。`,inspectionChanged:`当前会话已切换,请重新打开详情。`,inspectionUnavailable:`暂时无法读取详情。`,inspectionLoading:`正在读取状态…`,thinkingUnavailable:`暂时无法读取思考等级。`,trustUnavailable:`暂时无法读取项目信任状态。`,copySetupCommand:`复制配置命令`,savedTrustDecision:`已保存决定`,activeSessionTrust:`当前会话信任`,trustDecision_trusted:`已信任`,trustDecision_denied:`已拒绝`,trustDecision_undecided:`未决定`,trustDecision_unknown:`未知`,trustActiveYes:`当前会话已信任`,trustActiveNo:`当前会话未信任`,modelAndThinking:`模型与思考`,selectedModel:`当前模型`,thinkingLevel:`思考等级`,availableThinking:`支持的等级`,unknownState:`未知`,projectTrust:`项目信任`,trust_trusted:`当前会话信任此工作区。`,trust_untrusted:`此工作区的信任已被拒绝。`,trust_restricted:`项目资源受到限制,等待信任决定。`,trust_unknown:`尚无法确定信任状态。`,trustRefreshNeeded:`保存的信任决定与当前会话不同,请通过 Pi 刷新会话后生效。`,providerAvailability:`服务商凭据`,settings:`设置`,settingsNavigation:`设置导航`,generalSettings:`常规`,configurationSettings:`配置`,configurationIntro:`配置工具权限、网络访问与模型响应。`,configurationReadFailure:`无法安全读取配置。请修复设置文件后刷新。`,configurationUserScope:`用户配置`,configurationSetupHint:`响应与搜索选项通过 OpenPI setup 应用`,configurationApproval:`批准策略`,configurationApprovalDetail:`工具审批沿用已安装 Pi 扩展的权限机制。`,configurationPiPermissions:`由 Pi 扩展管理`,configurationSandbox:`沙箱设置`,configurationSandboxDetail:`工具使用宿主进程的权限运行。`,configurationSandboxUnavailable:`未提供 OS 沙箱`,configurationSearchDetail:`允许当前会话模型在支持时访问网络。`,configurationSearchOff:`不向当前模型提供原生搜索。`,configurationSearchOn:`在当前连接支持时允许原生搜索。`,configurationVerbosity:`输出详细程度`,configurationVerbosityDetail:`选择模型回复包含细节的详细程度。`,configurationResponsesUnavailable:`当前连接未使用支持的 Responses 接口。`,configurationVerbosity_default:`模型默认`,configurationVerbosity_low:`简短`,configurationVerbosity_medium:`适中`,configurationVerbosity_high:`详细`,configurationVerbosityHelp_low:`简短直接地回答,减少额外细节。`,configurationVerbosityHelp_medium:`给出必要解释与适量细节。`,configurationVerbosityHelp_high:`提供更完整的解释与细节。`,configurationVerbosityRequest:`只把 response_verbosity 设为 {{value}},保留其他 OpenPI 配置。`,configurationSummary:`推理摘要`,configurationSummaryDetail:`选择向支持的推理模型请求哪种摘要。`,configurationSummaryUnavailable:`当前连接不支持推理摘要。`,configurationSummary_default:`模型默认`,configurationSummary_auto:`自动`,configurationSummary_concise:`简洁`,configurationSummary_detailed:`详细`,configurationSummary_none:`关闭`,configurationSummaryHelp_auto:`由模型自动选择摘要长度。`,configurationSummaryHelp_concise:`请求简洁的推理摘要。`,configurationSummaryHelp_detailed:`请求较详细的推理摘要。`,configurationSummaryHelp_none:`不请求推理摘要;保留当前推理强度。`,configurationSummaryRequest:`只把 response_reasoning_summary 设为 {{value}},保留其他 OpenPI 配置。`,configurationModelFeatures:`模型功能`,configurationReasoningLevels:`可用推理强度`,configurationReasoningDetail:`选择在模型控件中显示哪些级别。控件只显示当前模型支持的档位,当前档位始终保留。`,configurationReasoningCount:`已选择 {{count}} 个`,configurationDependencies:`工作空间依赖项`,configurationEnvironment:`本地运行环境`,configurationEnvironmentDetail:`Node.js、Python 等工具由当前环境提供。OpenPI 不安装捆绑的工作空间运行时。`,configurationRuntimeStatus:`运行状态`,browserSettings:`浏览器`,webSearchSettings:`联网搜索`,webSearchCurrentModel:`当前会话模型`,webSearchNativeDetail:`调用当前模型供应商的原生搜索,复用现有连接和凭据。`,webSearchSupported:`当前连接支持原生搜索。开启后,由模型决定何时联网。`,webSearchUnsupported:`当前连接不支持或尚未确认支持原生搜索,不提供搜索工具,也不会切换到其他供应商。`,webSearchNativeRequest:`开启联网搜索,使用当前会话模型的原生搜索和已有 Pi 凭据。不要切换模型、连接协议或搜索供应商;当前连接不支持或支持情况未知时,不提供搜索工具。`,webSearchIntro:`让模型搜索最新资料,并打开原始网页核实。`,webSearchPackageDetail:`通过可选 Pi 插件提供搜索、网页读取和 PDF 提取。`,webSearchDefaultOff:`默认关闭。可选扩展跟随当前会话模型,无需另填搜索密钥或安装插件。`,webSearchLoaded:`本会话已加载插件`,webSearchNotLoaded:`本会话尚未加载插件`,webSearchSource:`查看插件源码`,webSearchProfile:`搜索设置`,webSearchExa:`Exa — 无需 API 密钥`,webSearchExisting:`保留我已有的搜索偏好`,webSearchProfileHint:`Exa 提供搜索,网页由本机直接读取。已有偏好会原样保留;安装后也可更换搜索服务。`,webSearchEnable:`启用联网搜索…`,webSearchDisable:`关闭联网搜索…`,webSearchConfigure:`更换搜索服务…`,webSearchExaRequest:`启用可选联网搜索,使用 Pi Web Access 和无需 API 密钥的 Exa。让我审阅插件安装确认,保留其他偏好,不要自动重新加载。`,webSearchExistingRequest:`启用可选联网搜索,使用 Pi Web Access,原样保留我已有的搜索偏好。让我审阅插件安装确认,保留其他偏好,不要自动重新加载。`,webSearchDisableRequest:`关闭原生联网搜索。保留其他设置和会话记录。`,webSearchProviderRequest:`帮我更换已安装 Pi Web Access 插件的搜索服务。介绍可用服务与权限,保留无关偏好,密钥留在搜索插件中,不要自动重新加载。`,browserSettingsIntro:`让 OpenPI 阅读网页、点击、输入和截图。`,browserControl:`浏览器控制`,browserControlHint:`提交设置变更请求,保存配置后生效。`,browserDefault:`默认浏览器`,browserDefaultHint:`提交设置变更请求,选择未指定浏览器时使用的默认项。`,browserEmbedded:`OpenPI 内置浏览器`,browserAllowedTitle:`允许使用的浏览器`,browserOffHint:`下方选择将在开启浏览器控制后生效。`,browserConnected:`已连接`,browserNeedsSetup:`需要连接浏览器扩展`,browserNotFound:`未检测到此浏览器`,browserUpdateNeeded:`需要更新扩展`,browserBlocked:`未授权`,browserDefaultBlocked:`当前默认浏览器未获授权,请允许使用或更换默认值。`,browserSetUp:`设置`,browserManage:`管理`,browserSetupNamed:`设置 {{browser}}`,browserManageNamed:`管理 {{browser}}`,browserAllowNamed:`允许使用 {{browser}}`,browserMore:`更多浏览器`,browserSpeakHint:`对话中说“使用 Chrome …”,即可指定这次使用的浏览器。`,browserGuideTitle:`连接 {{browser}}`,browserGuideEyebrow:`跟着做,一次一步`,browserConnectionTitle:`连接状态`,browserCloseGuide:`收起浏览器设置引导`,browserConnectionReady:`连接正常,可选择是否允许 OpenPI 使用。`,browserEmbeddedDetail:`网页在 OpenPI 内打开。部分网站需要使用普通浏览器才能登录或正常显示。`,browserExternalDetail:`OpenPI 可以使用已连接的 {{browser}} 配置中的现有标签和登录状态。请在该配置中保留一个 OpenPI 标签页。`,browserManageExtension:`管理扩展`,browserAllowUse:`允许 OpenPI 使用`,browserMakeDefault:`设为默认`,browserInstallIn:`安装到`,browserInstallTitle:`安装 OpenPI Browser Bridge`,browserSetupSteps:`设置步骤`,browserGuidePopout:`在独立窗口中跟随操作`,browserGuideDetached:`引导已在独立窗口打开,可以对照浏览器设置逐步完成。`,browserShowGuide:`显示引导窗口`,browserGuideInline:`把引导放回这里`,browserGuideBlocked:`未能打开引导窗口。可允许弹出式窗口后重试,也可继续查看这里的步骤。`,browserSafariSettings:`Safari → 设置`,browserSafariDeveloper:`开发者设置`,browserSafariTemporary:`添加临时扩展…`,browserSafariOpenHint:`打开 Safari 后,在菜单栏选择「Safari → 设置」,对照此引导操作。需要 macOS 上的 Safari 26 或更新版本。`,browserSafariDeveloperTitle:`显示 Safari 开发者设置`,browserSafariDeveloperHint:`在「设置 → 高级」中开启「显示网页开发者功能」,再进入「开发者」标签。`,browserSafariLoadHint:`在「开发者」中点击「添加临时扩展」,选择下方文件夹。启用 OpenPI Browser Bridge,允许访问要控制的网站及本地 OpenPI 页面。退出 Safari 后需重新加载临时扩展。`,browserFirefoxThis:`此 Firefox`,browserFirefoxTemporary:`临时载入附加组件…`,browserFirefoxDeveloperTitle:`选择「此 Firefox」`,browserFirefoxDeveloperHint:`在 about:debugging 左侧选择「此 Firefox」。Firefox 不需要开启「开发者模式」开关。`,browserFirefoxLoadHint:`点击「临时载入附加组件」,选择下方文件夹中的 manifest.json。此安装在 Firefox 重启后失效;永久安装需要经过 Mozilla 签名的扩展包。`,browserFirefoxDone:`已选中,下一步`,browserStepCount:`第 {{step}} 步,共 {{total}} 步`,browserStepLabel:`第 {{step}} 步:{{label}}`,browserStepOpen:`打开扩展页`,browserStepAdd:`添加扩展`,browserStepConnect:`连接`,browserOpenManagerTitle:`打开 {{browser}} 扩展页`,browserOpenManagerHint:`接下来会打开 {{browser}}。在扩展页完成操作后,回到这里继续。`,browserOpenManager:`打开 {{browser}} 扩展页`,browserReopenManager:`重新打开扩展页`,browserAlreadyInstalled:`已经安装?直接连接`,browserDeveloperMode:`开发者模式`,browserDeveloperTitle:`开启「开发者模式」`,browserDeveloperHint:`在扩展页开启「开发者模式」,页面会出现「{{loadLabel}}」按钮。`,browserDeveloperDone:`已开启,下一步`,browserIllustration:`操作示意 · 在 {{browser}} 中完成`,browserExtensions:`扩展程序`,browserLoadUnpacked:`加载未打包的扩展程序`,browserLoadHint:`扩展已准备在本机,按下面的顺序在 {{browser}} 中载入。`,browserCopyLocation:`复制下面的路径`,browserLocateTarget:`找到本机的扩展文件夹`,browserRevealTarget:`定位扩展文件夹`,browserLocateManifest:`找到扩展中的 manifest.json`,browserRevealManifest:`定位 manifest.json`,browserDragToBrowser:`把文件夹拖到 {{browser}} 扩展页`,browserDragFolderHint:`将文件管理器中的 {{folder}} 整个文件夹拖到扩展页,保持「开发者模式」开启。`,browserSelectLocatedTarget:`在浏览器弹出的选择窗口中,选择上一步定位的项目。`,browserManualInstall:`无法拖入?使用路径选择`,browserManualSelection:`找不到?使用路径选择`,browserLoadInBrowser:`在 {{browser}} 点击「{{loadLabel}}」`,browserLoadAlternate:`部分版本显示为「加载已解压的扩展程序」或 Load unpacked。`,browserConfirmFolder:`选择`,browserConfirmFile:`打开`,browserSelectFolderHint:`选择整个文件夹,不要选择里面的 .js 文件。`,browserSelectManifestHint:`只选择 manifest.json,不要选择 .js 文件。`,browserInstallCheckpoint:`在扩展列表看到 OpenPI Browser Bridge 卡片后,再继续连接。`,browserPathCopied:`已复制路径`,browserCopyFailed:`未能复制,请选中上方路径手动复制。`,browserChooseFolderMac:`按 ⌘ ⇧ G,粘贴刚复制的路径并按回车定位,再点击「{{confirm}}」。`,browserChooseFolderOther:`在选择窗口的地址栏粘贴刚复制的路径并回车,再点击「{{confirm}}」。`,browserInstalledConnect:`已添加,连接 OpenPI`,browserPreviousStep:`上一步`,browserWaiting:`等待 OpenPI Browser Bridge 连接,连接后会自动进入下一步。`,browserInstallBrowserFirst:`请先安装 {{browser}},或在已安装的浏览器中打开当前 OpenPI 地址。`,browserConnectTitle:`连接 OpenPI`,browserConnectHint:`在 {{browser}} 中打开 OpenPI,使用刚安装扩展的浏览器配置。`,browserOpenIn:`在 {{browser}} 中打开`,browserAllowHint:`连接成功后,可以允许 OpenPI 使用此浏览器。安装扩展不会自动开启浏览器控制。`,browserCheck:`检查连接`,browserNotConnectedYet:`还未连接。请完成安装,在该浏览器中刷新 OpenPI 后再次检查。`,browserHelp:`设置帮助`,browserReloadHint:`已安装旧版?在扩展页重新加载 OpenPI Browser Bridge,再刷新 OpenPI。如浏览器提示权限,请完成其原生确认。`,browserSupportedHint:`Chrome、Edge、Brave、Chromium 145+ 可控制内置页面及普通标签。macOS Safari 26+、Firefox 128+ 通过兼容扩展控制普通标签,嵌套框架需单独打开。Safari、Firefox 的临时安装需在浏览器重启后重新加载。`,browserCopyPath:`复制路径`,browserOpening:`正在打开浏览器…`,browserLoading:`正在检查浏览器连接…`,browserSaved:`已保存,浏览器权限立即生效。`,browserSaving:`正在处理…`,modelSettings:`模型`,skillsSettings:`技能`,subagentsSettings:`子代理`,pluginsSettings:`插件`,configureOpenPi:`配置 OpenPI`,setupRequestReviewAll:`和我一起检查全部 OpenPI 配置项`,setupRequestSetTheme:`仅将 OpenPI Web 主题设置为 {{value}},其他配置保持不变`,setupRequestSetChatWidth:`仅将 OpenPI Web 聊天内容宽度设置为 {{value}}px,其他配置保持不变`,setupRequestSetChatFontSize:`仅将 OpenPI Web 聊天字体大小设置为 {{value}}px,其他配置保持不变`,setupRequestEnableExpandedThinking:`仅将 OpenPI Web 的思考块改为默认展开,其他配置保持不变`,setupRequestDisableExpandedThinking:`仅将 OpenPI Web 的思考块改为默认折叠,其他配置保持不变`,setupRequestSubagents:`检查并配置 Agent 角色模型和工作流上限`,setupRequestFailed:`OpenPI 配置请求未被接收。`,setupRequestRunning:`正在应用 OpenPI 设置…`,setupRequestAccepted:`配置请求已接收。`,setupPlanBlocked:`Agent 配置需先退出 Plan 模式;显示设置可直接调整。退出不会开始实施计划。`,setupPlanBusy:`Agent 配置需等待当前回合结束并退出 Plan 模式;显示设置可直接调整。`,setupOutcome_pending:`配置请求正在处理,尚未收到保存回执。`,toolCallArguments:`工具参数`,toolCallOutput:`工具结果`,setupOutcome_saved:`OpenPI 配置已保存并应用。`,setupOutcome_unchanged:`配置已保存,实际设置没有变化。`,setupOutcome_failed:`配置请求失败,请查看错误和当前设置后再重试。`,setupOutcome_cancelled:`配置过程已取消,未确认成功保存。`,setupOutcome_unconfirmed:`本次未确认成功保存,请核对当前设置后再运行 /openpi-setup。`,settingsUpdateFailed:`无法保存 Web 显示设置。`,settingsPreferencesSaved:`偏好设置已保存。`,settingsPreferencesSaveFailed:`无法保存显示设置,请检查配置诊断后重试。`,settingsCatalogLoading:`正在加载 Pi 资源…`,settingsCatalogFailed:`无法加载 Pi 设置资源。`,appearance:`外观`,settingsPersonal:`个人`,settingsAgent:`Agent`,settingsIntegrations:`集成`,settingsArchivedChats:`已归档聊天`,settingsSearch:`搜索设置`,settingsClearSearch:`清除搜索`,settingsNoResults:`没有匹配的设置`,appearanceVisualStyle:`视觉风格`,appearanceMode:`模式`,appearanceTheme:`主题`,appearanceAccent:`强调色`,appearanceBackground:`背景`,appearanceForeground:`前景`,appearanceFont:`字体`,appearanceFont_codex:`Codex 默认`,appearanceFont_sans:`无衬线`,appearanceFont_serif:`衬线`,appearanceFont_mono:`等宽`,appearanceAccent0:`默认`,appearanceAccent1:`蓝色`,appearanceAccent2:`紫色`,appearanceAccent3:`粉色`,appearanceAccent4:`橙色`,appearanceAccent5:`绿色`,appearanceCustomAccent:`自定义强调色`,appearanceAdvanced:`高级`,appearanceReset:`恢复默认设置`,appearanceResetAction:`重置外观`,appearanceImport:`导入主题`,appearanceCopy:`复制主题`,appearanceCopied:`主题已复制`,appearanceCopyFailed:`无法复制主题,请重试。`,appearanceThemeValue:`主题数据`,appearanceImportPlaceholder:`粘贴 OpenPI 主题…`,appearanceImportInvalid:`请输入有效的 OpenPI 主题数据。`,appearanceImportAction:`导入`,searchArchivedChats:`搜索已归档聊天`,archiveProjectFilter:`按项目筛选`,archiveAllProjects:`所有项目`,archiveProjectGroup:`{{project}} · {{count}} 条归档聊天`,archiveSort:`归档聊天排序`,archiveSortUpdated:`最近更新`,archiveSortCreated:`创建时间`,restoreArchivedChat:`恢复 {{title}}`,themeLight:`浅色`,themeDark:`深色`,themeMist:`雾青`,themeRose:`蔷薇`,themePine:`松夜`,themeSystem:`跟随系统`,conversationSettings:`对话`,expandThinkingByDefault:`默认展开思考块`,chatContentWidth:`聊天内容宽度`,chatFontSize:`聊天字体大小`,agentBehavior:`Agent 行为`,workflowLimits:`工作流上限`,workflowConcurrency:`工作流并行上限`,workflowCalls:`总调用次数`,agentSettingsSetupHint:`Agent 设置通过当前会话中的 /openpi-setup 生效。`,setupRequestLimits:`将工作流并行上限设置为 {{concurrency}},总子代理调用上限设置为 {{calls}},保留其他配置。`,setupRequestEnableSuggestions:`启用下一步建议。如需模型配置,请帮助我选择模型,保留其他配置。`,setupRequestDisableSuggestions:`关闭下一步建议,保留其他配置。`,setupRequestPostEdit:`帮我配置或关闭编辑后命令。先展示当前配置,再询问要使用的命令。`,configurePostEdit:`配置编辑后命令`,workflowLimitsValue:`并行 {{concurrency}} · 总调用 {{calls}}`,nextActionSuggestions:`下一步建议`,nextActionSuggestionsDetail:`当前任务结束后,提供几个可选择的下一步操作。`,enabled:`已启用`,disabled:`已关闭`,configured:`已配置`,postEditCommand:`编辑后命令`,postEditCommandDetail:`编辑完成后运行一个命令;关闭时不会执行任何命令。`,resultDisplay:`默认结果显示`,subagentResults:`子代理结果`,bashOperations:`Bash 操作`,fileMutations:`Write / Edit 操作`,footer:`页脚`,terminalFooter:`Pi 终端页脚`,terminalFooterStyle:`终端页脚样式`,terminalFooterHint:`影响 Pi 命令行界面的页脚;已打开的 Pi 界面在下次启动或配置应用后更新。`,detailDisplay_full:`完整`,detailDisplay_compact:`紧凑`,sessionSettings:`会话`,currentModel:`当前`,providerCurrentSessionModel:`当前会话使用 {{model}}。`,useThisModel:`使用此模型`,model:`模型`,modelConnection:`模型连接`,provider:`服务商`,modelId:`模型 ID`,providerStatusUnavailable:`此服务商不在当前有界认证快照中。`,providerSettings:`服务商凭据`,providerSettingsIntro:`查看当前 Web 会话可通过哪些 Pi 服务商完成认证。`,openRuntimeDetails:`打开运行详情`,currentWorkspace:`当前工作区`,providerAuth_api_key:`API 密钥`,providerAuth_oauth:`OAuth`,providerAuthUnknown:`未报告认证方式`,authentication:`认证方式`,accessType:`访问方式`,providerAccessSubscription:`订阅账户`,providerAccessStandard:`服务商凭据`,configurationOwner:`配置归属`,providerLoading:`正在加载服务商状态…`,providerLoadFailed:`无法加载服务商状态。`,providerReadOnly:`由 Pi 管理`,selectProvider:`选择服务商`,gitReviewBaselineUnavailable:`未保留可用的会话基线,可能超出了捕获限额。请切换到未暂存、已暂存或分支查看 Git 变更,也可打开本会话文件记录。`,modelsIntro:`登录账户或添加 API 密钥。已有的 Pi 连接也会显示在这里。`,modelConnectionsTitle:`模型连接`,modelConnectionsIntro:`管理连接凭据,选择新会话和当前会话使用的模型。`,accountLoginMethod:`连接方式`,accountLoginTab:`账户登录`,accountLoginChatGPT:`ChatGPT 账户`,accountLoginClaude:`Claude 账户`,accountLoginKeyTab:`API 密钥`,accountLoginConfigured:`账户已登录`,accountLoginIntro:`在浏览器中完成授权,无需填写 API 密钥。`,accountLoginExisting:`账户凭据已保存在 Pi 中。`,accountLoginStart:`登录`,accountLoginAgain:`重新登录`,accountLoginUnsaved:`请先保存或放弃其他修改,再登录账户。`,accountLoginStarting:`正在准备登录…`,accountLoginWaiting:`等待账户授权`,accountLoginChoose:`选择登录方式`,accountLoginCancelling:`正在取消登录…`,accountLoginBrowser:`在浏览器中继续`,accountLoginDevice:`使用设备码登录`,accountLoginBrowserOption:`在当前电脑上登录,完成后自动返回。`,accountLoginDeviceOption:`适合远程服务器,或无法自动返回的情况。`,accountLoginBrowserHelp:`打开登录页并完成授权,这里会自动更新。`,accountLoginDeviceHelp:`打开授权页并输入下方代码,请保持此页面打开。`,accountLoginOpen:`打开登录页`,accountLoginCopyCode:`复制设备码`,accountLoginPaste:`授权码或回调地址`,accountLoginContinue:`继续`,accountLoginFallback:`已登录,但这里没有更新?`,accountLoginRemoteHelp:`如果无法自动返回,请复制浏览器最后的回调地址,并粘贴到下方。`,accountLoginCancel:`取消登录`,accountLogin_failed:`登录未完成,请重试或选择其他登录方式。`,accountLogin_expired:`登录已过期,请重新开始获取新的授权链接。`,accountLogin_cancelled:`已取消登录。`,accountLoginRequestFailed:`请求未完成,请先刷新状态再重试。`,accountLoginStatusUnknown:`暂时无法查询登录状态,账户授权可能仍在进行。`,accountLoginRefreshRequired:`凭据已保存,但 Pi 未能更新模型列表。请重载 Pi 后使用此连接。`,accountLogout:`退出登录`,accountLogoutRefreshRequired:`已移除保存的凭据,但 Pi 未能更新模型列表。请重载 Pi 刷新状态。`,accountLogoutTitle:`退出 {{provider}}?`,accountLogoutDetail:`将移除此电脑上 Pi 保存的该服务凭据,其他使用它的 Pi 会话也需要重新登录。环境凭据不受影响。`,providerInputTypes:`输入类型`,providerInputText:`文本`,providerInputImage:`图片`,providerCustomTag:`自定义`,providerEdit:`编辑`,providerRemove:`删除`,providerSave:`保存`,editProvider:`编辑 {{provider}}`,removeProvider:`删除 {{provider}}`,providerAdd:`添加模型提供商`,providerAddMode:`添加方式`,providerAddCatalog:`第三方模型提供商`,providerAddCustom:`自定义模型 API`,providerAccountHint:`使用已有账户连接模型,选择服务商后前往浏览器授权。`,providerCatalogHint:`从内置目录中选择提供商,填入其 API 密钥即可使用。`,providerCustomHint:`连接中转站、自部署服务或其他兼容 OpenAI / Anthropic 协议的接口,需填写 API 地址、协议和模型。`,providerKeyKeep:`已配置密钥,留空保持不变`,providerKeyOptional:`输入 API 密钥,或留空使用环境认证`,providerDisplayName:`提供商名称`,providerCustomSettings:`自定义设置`,providerSaved:`已保存 {{provider}}。`,modelDefaultTitle:`新会话默认模型`,modelDefaultChoose:`选择模型`,modelDefaultBadge:`默认`,modelCurrentBadge:`当前使用`,modelDefaultNotSet:`未设置 · 新会话启动时由 Pi 选择`,modelDefaultHint:`选择以后新会话使用的模型,已有会话保留自己的选择。此设置也会更新 Pi 的默认模型。`,modelDefaultReadFailed:`暂时无法读取默认模型。`,modelDefaultProjectOverride:`此工作区有 Pi 独立设置:{{model}}。`,modelDefaultSave:`保存默认模型`,modelMakeDefault:`同时设为新会话默认模型`,modelDefaultSaveFailed:`默认模型保存尚未确认,请刷新状态后重试。`,modelDefaultPartial:`当前模型已切换,但默认模型保存尚未确认,请刷新状态后再试。`,modelConnectionNextHint:`从此连接选择一个模型,用于当前会话。`,modelConnectionSearch:`搜索模型…`,modelConnectionChooseProvider:`选择 {{provider}} 的模型`,modelConnectionUse:`用于当前会话`,modelConnectionUseFailed:`模型切换尚未确认,请刷新模型列表后重试。`,modelConnectionLoadFailed:`暂时无法读取模型列表。`,modelConnectionNoModels:`暂无可选模型,请检查连接或添加模型定义。`,modelConnectionNoMatch:`没有匹配的模型。`,modelConnectionMore:`还有 {{count}} 个模型,可搜索缩小范围。`,providerModelsEmpty:`还没有模型,获取可用模型或手动添加。`,providerModelsInherited:`使用提供商的内置模型目录。`,providerModelsReadOnly:`此提供商包含当前页面未支持的模型设置,请在 Pi 配置文件中编辑。`,providerModelId:`模型 {{number}} ID`,providerModelName:`模型 {{number}} 名称`,providerModelDetails:`模型参数:{{model}}`,providerRemoveModel:`删除模型:{{model}}`,providerIdInvalid:`请使用未被占用的提供商 ID,仅包含字母、数字、连字符、点或下划线。`,providerNativeAuth:`此提供商使用 Pi 原生登录。`,providerConfigurationFailed:`保存失败,请检查填写内容,并在会话空闲时重试。`,providerProfileSavedKeyFailed:`提供商配置已保存,但密钥保存失败。重试将只保存密钥。`,providerReload:`放弃草稿并重新加载`,providerCurrentRemoval:`请先切换当前使用的模型,再删除。`,providerRemoveDetail:`删除此提供商的配置和自定义模型?由 Pi 管理的凭据将保留。`,providerPickerIntro:`以下是模型提供商的可用模型,勾选要添加的模型。`,providerPickerSelected:`已选 {{count}} 个`,providerApiKey:`API 密钥`,providerKeyPlaceholder:`粘贴密钥以添加或替换`,saveProviderKey:`保存密钥`,savingSettings:`正在保存…`,keepEditing:`继续编辑`,discardAndContinue:`放弃更改并继续`,unsavedSettingsTitle:`放弃未保存的更改?`,unsavedSettingsDetail:`未保存的模型和凭据修改将被丢弃。`,unsavedCredentialTitle:`放弃未保存的凭据?`,unsavedCredentialDetail:`新密钥尚未保存,继续后将清空。`,modelSelectionBusy:`当前会话忙碌,暂不能切换模型。`,providerKeySaved:`已保存到 Pi 凭据存储。已有密钥不会回显。`,providerSaveFailed:`密钥保存未完成。请等待会话空闲,刷新状态后重试;部分服务商需要额外认证信息。`,providerWriteDetail:`在这里直接保存到 Pi 凭据存储,密钥不会进入模型对话。OAuth 或需要额外字段的认证请使用 Pi 原生登录。`,editModelConfiguration:`添加或编辑自定义模型`,modelConfigurationDetail:`先设置提供商连接,再获取模型列表或手动添加。保存配置不会调用模型。`,configuredModels:`自定义模型配置`,addModel:`添加模型`,modelConfig_provider:`服务商 ID`,modelConfig_id:`模型 ID`,modelConfig_name:`显示名称`,modelConfig_baseUrl:`API 地址`,modelConfig_api:`API 格式`,modelConfig_contextWindow:`上下文窗口`,modelConfig_maxTokens:`最大输出 token 数`,providerCapacityLabel:`{{field}} {{number}}`,providerModelOptions:`模型选项`,providerModelInvalid:`模型 {{number}}:模型 ID 不能为空或重复;容量需为正数,例如 128K 或 1M,留空使用默认值。`,modelConfig_reasoning:`支持推理`,saveModelConfiguration:`保存模型`,reloadModelConfiguration:`放弃草稿并载入最新配置`,retryModelConfiguration:`重试读取`,discardModelDraftTitle:`放弃这份模型草稿?`,discardModelDraftDetail:`最新配置将替换这份未保存的草稿。`,discardAndReload:`放弃并重新载入`,modelConfigurationUnsaved:`未保存的更改`,modelConfigurationConflict:`模型配置已在别处更改,当前草稿已保留。`,modelConfigurationLoadFailed:`无法读取模型配置,草稿已保留。`,modelConfigurationSaved:`已保存到 Pi models.json。配置服务商密钥后即可选择此模型。`,modelConfigurationFailed:`模型保存未完成,草稿已保留。`,setupConfigurationRequest:`配置需求`,configureViaSetup:`通过 OpenPI setup 应用`,setupFormDetail:`统一走 /openpi-setup。请在对话中查看进度及必要的确认;提交成功不等于配置已保存。`,setupSkillsPlaceholder:`填写要添加或调整的技能,以及来源或本地路径`,setupPluginsPlaceholder:`填写要配置的 Pi 插件,以及准确的包名或本地路径`,enableSkillInvocation:`允许模型调用`,disableSkillInvocation:`改为仅显式调用`,setupSkillInvocationRequest:`配置这个 Pi 技能:{{path}}。将原生 disable-model-invocation 字段设为 {{disabled}},保留其余内容,并说明何时生效。`,setupRoleFormRequest:`将 OpenPI 的 {{role}} 角色配置为使用 {{model}},工作流并发设为 {{concurrency}}。推理级别继承父会话,校验选择有效性,并保留其他配置。`,providerReadOnlyDetail:`此页面只读且不会接收凭据内容。请通过 Pi 配置服务商认证,然后刷新此状态。`,openProviderSettings:`打开服务商设置`,credentialConfigured:`已配置`,credentialMissing:`未配置`,authNotVerified:`凭据已配置不代表模型请求一定成功。`,configurationViaPi:`此处为只读状态。模型凭据与信任由 Pi 管理,OpenPI 选项通过 /openpi-setup 配置。`,noSkillsFound:`当前会话没有加载技能。`,addSkill:`添加技能`,addPlugin:`添加插件`,searchResources:`搜索名称或来源`,filterResourceScope:`资源范围`,allResourceScopes:`全部范围`,noMatchingResources:`没有匹配的资源`,resourceBulkTooLarge:`请进一步筛选列表后,再提交批量配置请求。`,resourceManagement:`Pi 资源`,resourceSourceAuto:`Pi 自动发现`,resourceSourceLocal:`本地资源`,resourcePackageSource:`软件包、仓库或本地路径`,resourcePackageSourcePlaceholder:`npm:包名@版本 · git:owner/repo · /path/to/skill`,resourceInstallIntro:`选择来源和范围,在对话中通过 OpenPI setup 审查并应用。`,resourceInstallReview:`请在对话中确认准确来源和权限。提交请求不代表已安装或已加载。`,resourceRequestSubmitted:`请求已提交。请在对话中查看进度和确认,完成后刷新此目录。`,browseSkills:`浏览 skills.sh 技能`,resourceSessionState:`应用到当前会话`,resourcesReloadNote:`刷新只读取目录;重新加载才会将已保存的资源应用到空闲会话。配置变更不会自动重新加载。`,reloadResources:`重新加载资源`,resourceReloadReview:`将已保存的 Pi 技能与插件配置应用到当前会话,并重新启动扩展?请先等待运行中的工作结束。`,resourceReloaded:`资源已重新加载,请查看更新后的目录和诊断。`,resourceReloadFailed:`无法重新加载资源。请等待当前会话空闲,刷新后重试。`,advancedResourceConfiguration:`高级配置`,resourceDiagnostics:`Pi 报告了 {{extensionErrors}} 项扩展诊断与 {{skillErrors}} 项技能诊断。`,resourceConfigurationDiagnostics:`{{count}} 项设置读取失败,请检查 Pi 配置诊断。`,resourceCatalogTruncated:`此目录有数量上限,部分资源未展示。`,resourceTargetTruncated:`此来源或路径已截断,请通过高级配置确认完整目标后再进行管理。`,updateResource:`检查更新`,removeResource:`审查移除`,skillsEmptyTitle:`添加你的第一个技能`,skillsEmptyIntro:`技能为 Pi 提供可复用的指引。可以添加软件包、仓库或本地技能;项目技能遵循 Pi 的项目信任。`,pluginsEmptyTitle:`用插件扩展 Pi`,pluginsEmptyIntro:`软件包可以包含扩展、技能、提示词和主题。添加来源后,通过 OpenPI setup 审查安装。`,pluginCount:`{{count}} 个插件来源`,installedVersion:`已安装版本`,configuredVersion:`配置版本`,resourceVersionUnpinned:`未固定版本 / 本地来源`,pluginState_loaded:`本会话资源已加载`,pluginState_installed:`已安装 · 未加载`,pluginState_disabled:`配置已禁用`,pluginState_missing:`软件包缺失`,pluginState_error:`加载诊断`,pluginState_notLoaded:`未加载`,pluginLoadedResources:`当前会话目录包含 {{count}} 项资源。配置变更需要明确重新加载后才会应用。`,pluginAction_enable:`审查启用`,pluginAction_disable:`审查禁用`,pluginAction_update:`检查更新`,pluginAction_remove:`审查移除`,enableVisibleSkills:`允许模型使用(当前 {{count}} 项)`,disableVisibleSkills:`仅显式调用(当前 {{count}} 项)`,enableVisiblePlugins:`启用当前 {{count}} 个软件包`,disableVisiblePlugins:`禁用当前 {{count}} 个软件包`,setupResourceInstallRequest:`添加 Pi {{kind}},来源为 {{source}},范围为 {{scope}}。先检查来源并确定固定的软件包身份,通过 ask_user 与我确认安装权限,再使用 Pi 原生的软件包或技能配置。添加技能时保留其他扩展和资源。保留现有偏好与项目信任,不要自动重新加载当前会话。分别报告已保存的配置与仍需执行的操作,不要改动无关的 OpenPI 设置。`,setupPluginOperationRequest:`审查 Pi 软件包操作 {{action}},只针对配置来源 {{source}}、原生安装目录 {{path}}、范围 {{scope}}。相对来源应以该范围的原生设置目录解析。使用 Pi 原生包管理;更新时检查可用版本,通过 ask_user 与我确认固定的目标身份和安装权限。保留资源过滤器及所有无关偏好;如果切换会破坏过滤器,停止并说明。移除时不得删除本地来源目录。不要自动重新加载,分别报告已持久化与当前会话状态,不要改动无关的 OpenPI 设置。`,setupSkillManageRequest:`审查 Pi 技能操作 {{action}},只针对文件 {{path}}、来源 {{source}}、范围 {{scope}}。先检查原生资源归属,通过 ask_user 与我确认更新或移除及所需权限。保留无关技能与软件包资源,不要为了移除一个技能删除整个共享软件包。保留项目信任,不要自动重新加载,也不要改动无关的 OpenPI 设置。`,setupSkillsBulkRequest:`只针对当前展示的 Pi 技能文件 {{paths}},将原生 disable-model-invocation 设为 {{disabled}}。检查资源归属,保留其余内容和偏好,与我审查必要变更,报告无法安全修改的文件。显式 /skill 调用仍应可用。不要自动重新加载,也不要改动无关的 OpenPI 设置。`,setupPluginsBulkRequest:`只针对当前展示的 Pi 软件包 {{packages}},通过 Pi 原生配置将 disabled 设为 {{disabled}}。保留其他偏好与资源过滤器;无法保留过滤器的条目应跳过并报告。遵循范围与项目信任,与我审查必要变更,不要自动重新加载,也不要改动无关的 OpenPI 设置。`,resourceRequestFinished:`配置回合已结束。请刷新并查看 Pi 原生配置与会话资源,确认实际变更。`,skillCount_one:`{{count}} 个技能`,skillCount_other:`{{count}} 个技能`,skill:`技能`,copySkillInvocation:`复制调用命令`,source:`来源`,scope:`范围`,invocation:`调用方式`,modelInvocation:`模型调用`,resourceScope_user:`全局`,resourceScope_project:`项目`,resourceScope_temporary:`临时`,explicitOnly:`仅允许明确调用`,availableToModel:`模型可按需使用`,skillFile:`技能文件`,selectSkill:`选择一个技能`,subagentConfiguration:`Pi 原生子代理角色`,subagentConfigurationIntro:`未在 OpenPI 配置中指定模型时,角色继承父会话模型。`,subagentActiveCount_one:`{{count}} 个运行中`,subagentActiveCount_other:`{{count}} 个运行中`,subagentCompletedCount_one:`{{count}} 条记录`,subagentCompletedCount_other:`{{count}} 条记录`,subagentConcurrency:`上限 {{count}}`,builtInRoles:`内置角色`,subagentRole_explorer:`探索者`,subagentRole_implementer:`实现者`,subagentRole_reviewer:`审查者`,subagentRole_advisor:`顾问`,subagentRoleShort_explorer:`只读调查`,subagentRoleShort_implementer:`聚焦实现`,subagentRoleShort_reviewer:`正确性审查`,subagentRoleShort_advisor:`技术分析`,subagentRoleDescription_explorer:`调查代码库并报告证据,不修改文件。`,subagentRoleDescription_implementer:`实现边界明确的改动并运行相关仓库检查。`,subagentRoleDescription_reviewer:`审查正确性、安全性、回归风险和缺失验证。`,subagentRoleDescription_advisor:`分析困难技术问题并提出具体下一步建议。`,configureRoles:`配置角色`,builtInRole:`内置角色`,builtIn:`内置`,modelAssignment:`模型分配`,inheritParentModel:`继承父会话模型`,effectiveModel:`实际模型`,workflowConcurrencyLabel:`并行 Agent`,workflowCallLimit:`Agent 总调用数`,runtimeBoundaries:`运行时边界`,subagentAuthorityNote:`子会话权限是父会话与角色能力的故障关闭交集,不会静默扩大权限。`,subagentModelNote:`不会硬编码服务商;未分配的角色继承父会话模型和思考等级。`,resourceCount_one:`{{count}} 项资源`,resourceCount_other:`{{count}} 项资源`,noPluginsFound:`Pi 未报告已加载的插件来源。`,pluginCatalogTotals:`{{extensions}} 扩展 · {{skills}} 技能 · {{prompts}} 提示词 · {{themes}} 主题`,loaded:`已加载`,resourceOrigin:`来源类型`,resourceOrigin_package:`软件包`,resourceOrigin_topLevel:`顶层资源`,resources:`资源`,baseDirectory:`基础目录`,notReported:`未报告`,extensions:`扩展`,extensionSurfaceCount:`{{tools}} 个工具 · {{commands}} 个命令`,prompts:`提示词`,themes:`主题`,pluginResourceSummary:`{{extensions}} 扩展 · {{skills}} 技能 · {{prompts}} 提示词 · {{themes}} 主题`,pluginsManagedByPi:`这些资源由 Pi 加载。可通过上方 setup 表单提交变更;软件包操作沿用原生确认,并通过 Pi 的重新加载流程生效。`,selectPlugin:`选择一个插件来源`,statusCaptured:`采集于 {{time}} · 刷新查看最新状态`,conversationViews:`会话视图`,currentConversations:`当前`,archivedConversations:`已归档`,refreshArchives:`刷新归档会话`,loadingArchives:`正在加载归档会话...`,moreArchives:`加载更多归档会话`,retryArchives:`重试读取归档会话`,archiveLoadFailed:`无法加载归档会话。`,archiveCursorStale:`归档会话已变化,请刷新后继续。`,archiveScanBounded:`还有 {{count}} 条更早记录未扫描。`,noArchivedSessions:`没有归档会话。`,noScannedArchives:`已扫描历史中没有归档会话。`,noMatchingScannedArchives:`已扫描历史中没有匹配的归档会话。`,draftLimit:`草稿暂存已满,请先发送或清空已有草稿。`,restoreConversation:`恢复会话`,restoringConversation:`正在恢复…`,loadedArchives:`已加载历史中的归档会话`,loadedHistoryBounded:`另有 {{sessions}} 个会话和 {{workspaces}} 个工作区摘要未加载。搜索仅覆盖已加载列表。`,noLoadedArchives:`已加载列表中没有归档会话。`,restoreFailed:`暂时无法确认恢复结果,请刷新后重试。`,execution_running:`运行中`,execution_done:`已完成`,execution_killed:`已停止`,execution_timed_out:`已超时`,execution_failed:`失败`,execution_uncertain:`状态不确定`,activeOnlyHint:`只有当前 Web 会话可以接收消息。`,stopTurn:`停止当前轮次`,stoppingTurn:`正在停止当前轮次…`,stoppedTurn:`当前轮次已停止。`,pendingFollowUpsHint:`{{count}} 条消息正在排队`,sendNextTurn:`下一轮发送`,followUpBehavior:`跟进处理方式`,followUpBehaviorDetail:`OpenPI 运行时,将后续消息排队到下一轮,或引导当前轮次。按 ⌘/Ctrl+Enter 可仅对这条消息使用另一种方式。`,followUpQueue:`排队`,followUpQueueDetail:`下一轮发送`,followUpSteer:`引导`,followUpSteerDetail:`加入当前轮次`,steerCurrentTurn:`当前执行纠偏`,steeringHint:`在当前工具步骤结束后加入这条指示。`,pendingSteeringHint:`已接收 {{count}} 条纠偏指示,等待当前工具步骤结束`,steeringMessagesTitle:`当前轮次待处理的纠偏指示`,steerStaleTurn:`目标轮次已结束或变化。草稿已保留,请确认更新后的状态并重新发送。`,sourceFeedbackNew:`{{path}} · 新版本第 {{line}} 行`,sourceFeedbackOld:`{{path}} · 旧版本第 {{line}} 行`,forkMessage:`从此处分叉`,forkMessageHint:`从此消息创建新聊天,保留原聊天;不会自动发送消息。`,forkSessionPending:`正在创建分叉会话…`,forkSessionCreated:`已创建分叉会话,原会话保留在侧栏。`,forkSessionCancelled:`分叉已取消,原会话已保留。`,forkSessionUncertain:`无法确认分叉结果。请先刷新并检查会话列表,再决定是否重试。`,forkSessionUnavailable:`切换到此会话并等待当前执行和排队消息结束后,可以从这里创建新会话。`,reviewQuoteLine:`引用此行`,reviewSelectOldLine:`选择旧版本第 {{line}} 行`,reviewSelectNewLine:`选择新版本第 {{line}} 行`,queuedMore:`还有 {{count}} 条排队消息`,queuedImage:`图片附件`,queuedMessageExpand:`展开排队消息`,queuedMessageCollapse:`收起排队消息`,backgroundSessionRunning:`此会话正在后台运行…`,observedSessionTools:`{{count}} 个正在执行的工具`,toolsRequireCurrentSession:`切换到此会话后可使用交互工具。`,activateViewedSession:`切换到此会话`,activateViewedSessionHint:`发送消息即可继续此会话。`,acceptedHint:`OpenPI Web 已接收消息。`,promptAdmissionUnknown:`无法确认上次发送的消息是否已被接收。`,promptAdmissionUnknownDetail:`请先核对已刷新的会话历史和运行状态,再决定下一步。作为新消息发送可能产生重复消息。`,promptAdmissionCheckingDetail:`正在核对最新的会话历史和运行状态,核对完成前不能作为新消息发送。`,promptAdmissionVerificationFailedDetail:`暂时无法刷新最新的会话历史和运行状态。请重新核对后再决定是否作为新消息发送。`,abandonAdmission:`暂不重新发送`,retryAdmissionCheck:`重新核对`,retryOriginalAdmission:`重试原消息`,promptTooLong:`文本超出发送上限({{count}} / {{limit}})。`,sendAsNew:`作为新消息发送`,sendingAsNew:`正在发送…`,addWorkspace:`添加工作区`,addWorkspaceMenu:`添加工作区...`,archiveConversation:`归档会话`,pinnedConversations:`置顶`,sidebarOptions:`侧栏选项`,sidebarProjectOptions:`项目侧栏选项`,sidebarRecentOptions:`会话侧栏选项`,sidebarActivityOptions:`动态视图选项`,sidebarShow:`显示`,sidebarGroupBy:`会话分组`,sidebarByProject:`按项目分组`,sidebarFlatList:`所有会话`,sidebarChatSort:`会话排序`,sidebarRecent:`最近`,sidebarProjectsInRecents:`在最近列表显示项目会话`,sidebarShowMore:`展开显示`,sidebarShowLess:`收起显示`,sidebarFilterList:`筛选当前列表`,sidebarSaveFailed:`更改未能保存,请重试。`,pinWorkspace:`置顶项目`,unpinWorkspace:`取消置顶项目`,markConversationRead:`标记为已读`,markConversationUnread:`标记为未读`,sidebarState_unread:`未读会话`,sidebarActivity:`动态`,sidebarViewActivity:`查看动态`,sidebarViewChats:`查看会话`,sidebarPriority:`优先关注`,sidebarActivityEmpty:`没有需要关注的会话`,sidebarActivityEmptyHint:`已完成的工作和需要你处理的会话会显示在这里。`,sidebarMarkAllRead:`全部标记为已读`,sidebarClearRead:`清除优先关注中的已读会话`,sidebarReadFailed:`未能更新已读状态,请重试。`,sidebarToday:`今天`,sidebarYesterday:`昨天`,sidebarEarlier:`更早`,sidebarActivityCompleted:`已完成`,sidebarActivityFailed:`执行失败`,sidebarActivityRead:`已读`,modelAdvanced:`高级参数`,providerConnectionHeading:`提供商连接`,providerFetchModels:`获取可用模型`,providerFetchHint:`填写提供商和端点后,可一次选择多个模型。`,providerPickerTitle:`选择要添加的模型`,providerPickerAccess:`连接凭据`,providerPickerKey:`访问密钥(可选)`,providerPickerKeyHint:`留空使用此端点已保存的凭据。此处输入的密钥仅用于获取列表,不会保存。`,providerPickerSearch:`搜索模型`,providerPickerSelectAll:`全选`,providerPickerClear:`清空选择`,providerPickerLoading:`正在获取可用模型…`,providerPickerAdded:`已添加`,providerPickerNoMatch:`没有匹配的模型`,providerPickerEmpty:`提供商没有返回模型,仍可手动添加。`,providerPickerBounded:`当前显示前 500 个模型,其他模型可手动填写 ID。`,providerPickerError_load:`未能获取模型列表,请检查端点和凭据后重试,也可以手动添加。`,providerPickerError_save:`尚未确认保存成功。已保留你的选择,请检查连接后重试。`,providerPickerError_conflict:`配置已在其他地方更新,请关闭弹窗、重新读取配置后再保存。`,providerPickerDefaults:`新模型使用 {{context}} 上下文 / {{output}} 输出 token,添加后可逐个调整。`,providerPickerRetry:`刷新列表`,providerPickerCount:`已选 {{count}} 个 · 最多 100 个`,providerPickerSave:`添加所选`,sidebarState_running:`执行中`,sidebarState_compacting:`正在整理上下文`,sidebarState_waiting:`等待你的回复`,sidebarState_completed:`已完成 · 结果未读`,sidebarState_failed:`执行失败 · 打开会话查看详情`,pinnedOptions:`置顶选项`,pinConversation:`置顶会话`,unpinConversation:`取消置顶`,pinnedRecentlyUpdated:`最近更新`,pinnedManualOrder:`手动排序`,movePinUp:`上移`,movePinDown:`下移`,pinSaveFailed:`置顶设置未能保存,请重试。`,cancel:`取消`,chooseWorkspaceHint:`选择工作区并描述任务`,close:`关闭`,closeSearch:`关闭搜索`,collapseSidebar:`收起侧边栏`,confirmEdit:`保存并重新运行`,editMessageHint:`从这里创建新分支并重新运行;保留原对话、图片和文件引用。已有工作区改动会保留。`,regenerateMessage:`重新生成回答`,regenerateMessageHint:`在新分支重新运行这条问题,保留原附件和原对话。`,messageRerunStarted:`已在新分支接收重跑消息,原对话已保留。`,openOriginalConversation:`查看原对话`,messageRerunWorkspaceHint:`已有工作区改动会保留。`,modelRequestRecovered:`请求已恢复`,modelReconnecting:`正在重新连接`,modelReconnectUnknown:`重连状态待确认`,modelEarlierAttempts:`先前请求错误`,modelFailedAttempts:`失败尝试({{count}} 次)`,draftStorageUnavailable:`草稿未能保存到此设备,请保持页面打开或复制消息。`,draftStorageInvalid:`部分保存的草稿内容无法恢复,请检查消息和附件。`,draftStorageRetry:`重试保存草稿`,workbarBackToChat:`返回聊天`,workbarCollapseTools:`收起工具栏`,workbarEndTerminal:`关闭 {{name}} 并结束进程`,workbarNewTerminal:`新建终端`,workbarContinueInChat:`继续追问`,transcriptSearch:`搜索消息内容`,transcriptSearchPlaceholder:`搜索标题、项目或消息…`,transcriptSearchRecent:`最近会话`,transcriptSearchSessions:`会话`,transcriptSearchMessages:`消息内容`,transcriptSearchSessionResult:`打开会话 {{session}}`,transcriptSearchSessionOpenFailed:`暂时无法打开此会话,请重试。`,transcriptSearchIncludeArchived:`包含归档会话`,transcriptSearching:`正在搜索消息…`,transcriptSearchEmpty:`没有匹配的消息。`,transcriptSearchFailed:`暂时无法搜索消息,请重试。`,transcriptSearchRetry:`重试搜索`,transcriptSearchPartial:`部分历史未能搜索,结果可能不完整。`,transcriptSearchOpenFailed:`无法打开这条消息,它可能已移动或位于其他分支。`,transcriptSearchResult:`打开 {{session}} 中来自{{source}}的消息`,transcriptSearchSource_user:`你`,transcriptSearchSource_assistant:`助手`,transcriptSearchSource_tool_call:`工具调用`,transcriptSearchSource_tool_result:`工具结果`,connected:`已连接`,connecting:`正在连接`,conversationName:`会话名称`,conversationOptions:`会话选项`,sidebarRename:`重命名`,sidebarPin:`置顶`,sidebarUnpin:`取消置顶`,sidebarFork:`分叉`,sidebarForkLocal:`创建聊天分支`,sidebarForkSameWorktree:`在同一工作树中分叉`,archiveNoticeTitle:`聊天已归档`,archiveNoticeView:`查看`,archiveNoticeUndo:`撤销`,archiveNoticeFailed:`操作未完成,请重试。`,sidebarForkWorktree:`在新工作树中创建聊天分支`,sidebarForkCancelling:`正在请求取消…`,sidebarForkFinishing:`无法再取消,正在确认创建结果…`,sidebarForkCancelUnconfirmed:`无法确认取消,正在等待分叉结果。`,sidebarForkWorktreePreserved:`工作树已保留在 {{path}},请检查后再重试。`,sidebarForkWorktreePending:`正在创建工作树和聊天分支…`,sidebarForkOptionsLoading:`正在检查工作树是否可用…`,sidebarForkOptionsFailed:`无法检查工作树,请重新打开菜单重试。`,sidebarForkUnavailable:`发送消息后才能创建此聊天的分支。`,sidebarForkArchived:`请先恢复此会话,再创建分叉。`,sidebarForkFailed:`未能创建分叉,原会话已保留。`,sidebarCopy:`复制`,sidebarCopyLink:`复制会话链接`,sidebarCopyMarkdown:`复制为 Markdown`,sidebarCopyCwd:`复制工作目录`,sidebarCopied:`已复制`,sidebarCopyFailed:`复制失败,请重试。`,sidebarNewWindow:`在新窗口中打开`,sidebarOpenIn:`打开方式`,sidebarAppsLoading:`正在加载可用应用…`,sidebarAppsFailed:`无法加载应用,请重新打开菜单重试。`,sidebarOpenFailed:`无法在所选应用中打开此项目。`,sidebarArchive:`归档`,sidebarRestore:`恢复`,sidebarDelete:`永久删除`,managedWorktreeRecoveryFull:`请先核对先前未确认的移除请求,再开始新的请求。`,managedWorktreesChanged:`工作树列表已变化,请刷新后重新核对目标。`,managedWorktreesRefresh:`刷新工作树列表`,managedWorktreesBack:`返回工作树列表`,managedWorktreesRetry:`重试请求`,managedWorktrees:`保留的工作树`,managedWorktreesDescription:`删除会话会保留 OpenPI 创建的工作树。请核对准确路径后再请求移除。使用中、共享、有改动或无法确认归属的工作树会保留。`,managedWorktreeConfirm:`移除此工作树?服务端会重新核对归属、使用中的会话及本地改动后再操作。`,managedWorktreeRemoved:`工作树已移除。`,managedWorktreePreserved:`工作树已保留:`,managedWorktreeUncertainTerminal:`移除结果无法确认,不能自动重复移除。请先检查保留路径,再决定后续操作。`,managedWorktreeUncertain:`尚不能确认移除结果。重试会核对原请求。`,managedWorktreeRemoving:`正在核对并移除…`,managedWorktreeRemove:`移除工作树`,managedWorktreeReview:`核对移除`,managedWorktreesEmpty:`这一页没有找到托管工作树。`,managedWorktreesUnavailable:`有 {{count}} 条归属记录无法确认。`,managedWorktreesLoadFailed:`无法加载保留的工作树。请重试,目标不会改变。`,managedWorktreesMore:`加载更多工作树`,managedWorktreeRetainedAfterDelete:`会话已删除,工作树保留在 {{path}}。可从项目菜单核对保留的工作树。`,sidebarDeleteTitle:`删除会话?`,sidebarDeleteDescription:`确定永久删除“{{name}}”?此操作无法撤销。`,sidebarDeleteConfirm:`删除`,sidebarDeleting:`正在删除…`,sidebarDeleteFailed:`未能删除此会话,请重试或取消。`,sidebarActionRunning:`请等待当前工作和排队消息结束。`,sidebarActionDisconnected:`请先恢复连接,再修改此会话。`,sessionDeleteCancelled:`删除已取消`,sessionDeleteUncertain:`无法确认会话是否删除,请刷新后重试`,sessionDeleted:`会话已永久删除`,sessionDeleteMetadataPending:`会话已删除,但侧栏记录未清理完成`,sessionLinkUnavailable:`链接中的会话已不存在或身份已变化`,sidebarDropPin:`拖到此处置顶`,sidebarDropProjectLast:`将项目移到最后`,conversationTurns:`会话轮次`,conversationTurnPosition:`前往第 {{position}} 轮`,turnPreviewLoading:`正在加载预览…`,turnPreviewUnavailable:`暂时无法读取,请重试。`,commands:`斜杠命令`,addContext:`添加上下文`,fileReference:`引用工作区文件`,fileReferenceTitle:`引用工作区文件`,fileReferenceDetail:`将路径引用加入提示词,不上传文件内容。`,fileReferenceLabel:`工作区文件路径`,fileReferencePlaceholder:`src/app.tsx`,fileReferenceValidatedHint:`当前会话会验证该路径是可读取的工作区文件。`,fileReferenceDraftHint:`新会话启动后,Pi 会按其工具权限解析该路径。`,fileReferenceChecking:`正在检查…`,fileReferenceFailed:`无法验证该文件。`,fileReferenceDenied:`请选择当前会话工作区内的文件。`,fileReferenceMissing:`该工作区文件已不存在。`,fileReferenceUnsupported:`只能引用工作区中的普通文件。`,fileReferenceExpired:`活动会话已变化,请重新打开文件引用后再试。`,fileReferenceBusy:`文件校验正忙,请稍后重试。`,insertReference:`插入引用`,commandsSessionRequired:`会话启动后才能插入斜杠命令。`,commandsEmptyDraftOnly:`只能在空白草稿中插入斜杠命令。`,commandsLoading:`正在加载命令…`,commandsUnavailable:`暂时无法读取命令。`,commandsNoMatch:`没有匹配的命令。`,commandsNoAvailable:`已发现的命令均不能在 Web 中运行。输入具体命令名可查看其可用性。`,commandsBounded:`另有 {{count}} 个命令未显示。`,commandSessionRequired:`命令仅在已创建的 Web 会话中可用。`,commandUnsupported:`尚未适配 · 手动命令仍交给 Pi`,commandAcceptsArguments:`可输入参数`,commandSource_extension:`扩展命令`,commandSource_prompt:`提示词模板`,commandSource_skill:`技能`,copiedMessage:`已复制`,copyMessage:`复制消息`,copyFailed:`复制失败,请选中消息后手动复制。`,copiedCode:`代码已复制`,copyCode:`复制代码`,copyCodeFailed:`无法复制代码,请选中后手动复制。`,codeBlock:`代码块`,wrapCode:`自动换行`,expandCode:`展开全部 {{count}} 行`,collapseCode:`收起代码`,expandInput:`展开输入框`,collapseInput:`收起输入框`,deleteWorkspace:`删除工作区`,describeTask:`描述任务`,editMessage:`修改并从这里重跑`,enterHint:`按 Enter 发送,Shift+Enter 换行。`,expandSidebar:`展开侧边栏`,importWorkspace:`导入工作区`,loadingModels:`正在加载模型...`,modelsTruncated:`当前显示 {{shown}} 个模型,还有 {{omitted}} 个可用;搜索即可查找。`,searchModels:`搜索可用模型`,searchModelsPlaceholder:`搜索服务商、模型名称或 ID...`,searchingModels:`正在搜索模型...`,noMatchingModels:`没有匹配的模型`,modelSearchFailed:`模型搜索失败,请重试。`,retryModelSearch:`重试模型搜索`,fileReferenceDraftChanged:`草稿已变化,请重新打开文件引用。`,modelSearchTruncated:`还有 {{omitted}} 个匹配模型未显示。`,modelPreparing:`正在准备任务...`,modelRetrying:`模型请求重试中...`,modelRunning:`正在运行…`,modelRequestFailed:`模型请求失败`,modelRequestStopped:`模型请求已停止`,modelFailureUnknown:`服务商没有返回具体失败原因。`,retryPrompt:`重试消息`,retryingPrompt:`正在重试…`,newSession:`新建会话`,noConversations:`暂无对话`,noMatching:`没有匹配的会话`,noMatchingLoaded:`已加载历史中没有匹配的会话`,noModels:`没有可用模型`,noOutput:`无输出`,noSessions:`暂无会话`,openSidebar:`打开侧边栏`,promptMessage:`发消息或创建任务,/ 调用指令`,promptReadonly:`非当前会话不能接收消息`,promptStart:`选择一个工作区开始`,promptTask:`描述你想要构建的任务`,queuedHint:`当前回合结束后将发送消息。`,reconnecting:`正在重连`,removeWorkspace:`从侧边栏移除`,workspaceOptions:`工作区选项`,renameFailed:`无法保存名称,已保留你的修改。`,savingName:`正在保存...`,workspaceRemoveFailed:`无法移出工作区,请重试。`,removingWorkspace:`正在移出...`,renameConversation:`重命名会话`,renameWorkspace:`重命名工作区`,save:`保存`,searchConversations:`搜索会话`,searchPlaceholder:`筛选标题与工作目录…`,selectModel:`选择模型`,configureModels:`配置模型`,openModelSettings:`模型设置`,selectThinking:`选择思考等级`,thinkingAvailableLevels:`可选等级:{{levels}}`,resetThinking:`恢复打开时的等级({{level}})`,modelThinkingNotEnabled:`此模型未启用思考。如提供商支持,可在模型设置中开启「支持推理」。`,providerReasoningHint:`按提供商能力开启,在聊天输入框调节当前思考等级。`,providerThinkingLevels:`支持的思考等级`,providerThinkingLevelsHint:`选择此模型支持的等级,保存后同步到会话选择器。`,providerThinkingAutomatic:`自动(Pi 默认)`,providerThinkingSelected:`已选 {{count}} 项`,providerThinkingReset:`使用 Pi 默认等级`,providerImageHint:`未勾选图片时,模型不会收到图片附件。`,selectWorkspace:`选择工作区`,send:`发送`,processDetails:`执行过程`,processRunning:`正在执行`,processThinkingCount:`{{count}} 段思考`,processToolCount:`{{count}} 次工具调用`,processFailureCount:`{{count}} 次失败`,runtimeActivities:`执行活动`,activityAgentProgress:`{{completed}}/{{total}} 个子代理已结束`,activityCapacity:`并行任务:{{running}}/{{limit}} · {{queued}} 个等待中`,composerQueuedCount:`排队 {{count}}`,composerSteeringCount:`引导 {{count}}`,runtimeActivityRunning:`{{count}} 项进行中`,runtimeActivityCount:`{{count}} 项活动`,processActivityCount:`{{count}} 项 Agent 活动`,switchingSession:`正在切换会话...`,thinkingActive:`思考中...`,thinkingActiveLevel:`思考中({{level}})...`,thinkingDone:`思考过程`,thinkingLoadFull:`查看完整思考`,thinkingLoadingFull:`正在加载思考…`,thinkingLoadFailed:`思考加载失败,点击重试`,thinkingPartialText:`当前显示部分已保存的思考,可继续加载下方内容。`,thinkingPreviewOnly:`思考预览已达到显示上限,此消息保存后可查看完整内容。`,toolState_running:`执行中`,toolState_returned:`已返回`,toolState_failed:`失败`,toolState_cancelled:`已停止`,toolState_timed_out:`超时`,toolState_unknown:`未确认`,toolSnapshotMissingResult:`分叉时尚无结果`,toolActivity_running:`正在{{action}}`,toolActivity_failed:`{{action}}失败`,toolActivity_cancelled:`{{action}}已停止`,toolActivity_timed_out:`{{action}}超时`,toolActivity_unknown:`{{action}}`,toolAction_read:`读取`,toolAction_write:`写入文件`,toolAction_edit:`编辑文件`,toolAction_command:`运行`,toolAction_search:`搜索`,toolAction_list:`列出文件`,toolAction_web:`浏览网页`,toolAction_agent:`使用子代理`,subagentAction_spawn:`启动子代理`,subagentAction_send:`发送补充消息`,subagentAction_check:`查询子代理`,subagentAction_wait:`等待子代理`,subagentAction_cancel:`停止子代理`,subagentActionDone_spawn:`已启动子代理`,subagentActionDone_send:`已发送补充消息`,subagentActionDone_check:`已查询子代理`,subagentActionDone_wait:`已结束等待`,subagentActionDone_cancel:`停止请求已返回`,toolAction_workflow:`调用工作流`,toolAction_plan:`准备计划`,toolAction_git:`查看变更`,toolAction_call:`调用工具`,toolActionDone_read:`已读取`,toolActionDone_write:`已写入`,toolActionDone_edit:`已编辑`,toolActionDone_command:`已运行`,toolActionDone_search:`已搜索`,toolActionDone_list:`已列出的文件`,toolActionDone_web:`已浏览网页`,toolActionDone_agent:`子代理工具已返回`,toolActionDone_workflow:`工作流工具已返回`,toolActionDone_plan:`计划工具已返回`,toolActionDone_git:`已查看变更`,toolActionDone_call:`已调用工具`,toolActionGroup_read:`读取文件`,toolActionGroup_write:`写入文件`,toolActionGroup_edit:`编辑文件`,toolActionGroup_command:`运行命令`,toolActionGroup_search:`搜索`,toolActionGroup_list:`列出文件`,toolActionGroup_web:`浏览网页`,toolActionGroup_agent:`子代理活动`,toolActionGroup_workflow:`工作流活动`,toolActionGroup_plan:`准备计划`,toolActionGroup_git:`查看变更`,toolActionGroup_call:`调用工具`,toolGroup_done:`{{actions}}`,toolGroup_running:`正在{{actions}}`,toolGroup_unknown:`{{actions}}`,toolGroupSeparator:`、`,toolSearchTarget:`“{{pattern}}” · {{path}}`,toolDiffStatsHelp:`当前显示差异中的新增和删除行数`,toolRequestedFile:`文件:`,toolWorkspace:`工作区`,toolRawEvidence:`参数与原始结果`,toolCodemodeDetails:`脚本与原始结果`,toolNestedOutputMissing:`会话记录保留了调用和状态,未保存此子工具的输出。`,toolNestedArgumentsMissing:`会话记录未保留完整参数和此子工具的输出。`,toolNestedIncomplete:`子调用记录不完整,部分调用、参数或最终状态不可用。`,toolPartialEvidence:`输出未完整显示:已达到字节、行数或条目上限。原始结果也可能被截断。`,toolFileChange_created:`已创建文件`,toolFileChange_unchanged:`文件内容未改变`,toolFileChange_overwritten:`已覆盖文件`,toolChangeUnavailable:`此工具结果未提供修改对比。`,toolTestResults:`测试结果摘要 · {{format}}`,toolTestCounts:`{{tests}} 项测试 · {{passed}} 通过 · {{failed}} 失败 · {{cancelled}} 取消`,toolTestCountsHelp:`数量来自命令输出,执行状态单独显示。`,toolReadMore:`可使用文件路径和 offset 继续读取,具体方式见原始结果。`,toolFullOutputReference:`完整输出:`,subagentBackgroundResult:`后台子代理结果 · {{count}}`,thinkingDraftHint:`请先选择工作区并创建会话。`,thinkingInactiveHint:`只有当前会话可以更改思考等级。`,thinkingLevelMismatch:`当前确认的思考等级不在此模型支持范围内;选择其它等级即可修正。`,thinkingLockedRunning:`请先停止当前轮次,再更改思考等级。`,thinkingModelPendingHint:`请等待模型切换完成。`,thinkingNotConfirmed:`思考等级未获确认,请重试。`,thinkingPendingHint:`正在应用思考等级...`,thinkingUnsupported:`暂不支持思考`,thinkingUnsupportedHint:`尚未选择模型,或当前模型不支持思考。`,unavailable:`不可用`,ungrouped:`未分组`,untitledSession:`新会话`,workspaceDeleteConfirm:`文件夹与会话记录会保留,其中的会话会被放到“未分组”;再次打开此目录时将是一个干净的工作区。`,workspaceName:`工作区名称`,workspaces:`工作区`,sidebarProjects:`项目`}}},dG=navigator.language?.toLowerCase().startsWith(`zh`)?`zh`:`en`;Xl.use(Zl).init({fallbackLng:`en`,initAsync:!1,interpolation:{escapeValue:!1},lng:dG,resources:uG}),document.documentElement.lang=dG===`zh`?`zh-CN`:`en`;var fG=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},pG=10,mG=13,hG=32,gG=6;function _G(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{maxBufferSize:t,onComment:n,onError:r,onEvent:i,onId:a,onRetry:o}=e,s=[],c=0,l=!0,u,d=``,f=0,p,m=!1,h=!1,g=!1;function _(e){if(m)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(l&&(l=!1,e.charCodeAt(0)===65279?e=e.slice(1):e.charCodeAt(0)===239&&e.charCodeAt(1)===187&&e.charCodeAt(2)===191&&(e=e.slice(3))),(h||g)&&(e=v(e),!e))return;if(!s.length){let t=S(e);t!==``&&y(t),x();return}if(e.indexOf(` +`)===-1&&e.indexOf(`\r`)===-1){if(c0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0,t=n+1,n=e.indexOf(` -`,t);continue}let r=e.charCodeAt(t);if(pG(e,t,r)){let r=e.charCodeAt(t+5)===uG?t+6:t+5,o=e.slice(r,n);if(f===0&&e.charCodeAt(n+1)===cG){u!==void 0&&a?.(u),i?.({id:u,event:p,data:o}),u=void 0,d=``,p=void 0,t=n+2,n=e.indexOf(` -`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else mG(e,t,r)?p=e.slice(e.charCodeAt(t+6)===uG?t+7:t+6,n)||void 0:C(e,t,n);t=n+1,n=e.indexOf(` +`,t);continue}let r=e.charCodeAt(t);if(vG(e,t,r)){let r=e.charCodeAt(t+5)===hG?t+6:t+5,o=e.slice(r,n);if(f===0&&e.charCodeAt(n+1)===pG){u!==void 0&&a?.(u),i?.({id:u,event:p,data:o}),u=void 0,d=``,p=void 0,t=n+2,n=e.indexOf(` +`,t);continue}d=f===0?o:`${d}\n${o}`,f++}else yG(e,t,r)?p=e.slice(e.charCodeAt(t+6)===hG?t+7:t+6,n)||void 0:C(e,t,n);t=n+1,n=e.indexOf(` `,t)}return e.slice(t)}for(;t20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function T(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function E(e={}){if(e.consume&&s.length>0){let e=s.join(``);C(e,0,e.length)}l=!0,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:E}}function pG(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function mG(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function hG(e,t){let n=1;for(;nt.abort();e.signal.addEventListener(`abort`,n,{once:!0}),e.signal.aborted&&n();let r=window.setTimeout(n,45e3),i=await fetch(`/events?cursor=${e.cursor}`,{headers:await e.client.headers(),signal:t.signal}).finally(()=>{window.clearTimeout(r),e.signal.removeEventListener(`abort`,n)});if(i.status===409)throw new gG(`event replay expired`);if(!i.ok||!i.body)throw Error(`event connection failed`);e.onConnected();let a=e.cursor,o=0,s=fG({onComment(t){t.trim()===`heartbeat`&&++o>=4&&(o=0,e.onHeartbeat?.())},onEvent(t){let n=JSON.parse(t.data);if(!Number.isSafeInteger(n.sequence))throw new gG(`invalid event cursor`);if(!(n.sequence<=a)){if(n.sequence!==a+1)throw new gG(`event cursor gap`);if(a=n.sequence,n.type===`state_invalidated`)throw new gG(`state invalidated`);e.onEvent(n)}}}),c=i.body.getReader(),l=new TextDecoder;try{for(;!e.signal.aborted;){let t,n,r=c.read(),i=new Promise((r,i)=>{n=()=>i(Error(`event stream aborted`)),e.signal.addEventListener(`abort`,n,{once:!0}),window.addEventListener(`offline`,n,{once:!0}),(e.signal.aborted||navigator.onLine===!1)&&n(),t=window.setTimeout(()=>i(Error(`event stream stalled`)),45e3)}),{done:a,value:o}=await Promise.race([r,i]).finally(()=>{window.clearTimeout(t),n&&(e.signal.removeEventListener(`abort`,n),window.removeEventListener(`offline`,n))});if(a)throw Error(`event connection closed`);s.feed(l.decode(o,{stream:!0}))}}finally{await c.cancel().catch(()=>void 0)}}function vG({client:e,get:t,set:n,getEpoch:r,showError:i,scheduleSnapshotRefresh:a}){let o=null,s=0,c=!1,l=0,u=0,d=0,f=null,p=-1,m=()=>{u++,f=null,d=0,p=-1},h=()=>{let e=t().snapshot;if(!e)return;f&&p!==r()&&m();let i=e.thinking;if(i){if(!f||i.revision>=d){f=i,d=i.revision,p=r();return}i!==f&&n({snapshot:{...e,thinking:f}})}},g=e=>{f&&p!==r()&&m(),e&&e.revision>=d&&(f=e,d=e.revision,p=r()),h()},_=()=>{o=null,s++,l++,c=!1,n({thinkingPendingLevel:null})},v=async()=>{let n=u,i=l,a=r(),o=t().snapshot?.selectedSession?.id,s=t().selectedPath;if(o)try{let c=await e.thinking(o,new AbortController().signal);if(n!==u||i!==l||a!==r()||s!==t().selectedPath||o!==t().snapshot?.selectedSession?.id)return;g(c)}catch{}},y=async()=>{if(c)return;c=!0;let d=++l;try{for(;o!==null;){let c=o,f=s,p=u,m=r(),h=t().snapshot?.selectedSession?.id,y=t().selectedPath;if(!h||!y||h!==t().snapshot?.currentSessionId||y!==t().snapshot?.selectedSession?.path||t().modelSelectionPending){_();return}let b;try{b=await e.setThinkingLevel(h,c,y)}catch(e){if(d!==l||m!==r()||y!==t().selectedPath||h!==t().snapshot?.selectedSession?.id)return;if(p!==u||f!==s)continue;_(),i(e),v();return}if(d!==l||m!==r()||y!==t().selectedPath||h!==t().snapshot?.selectedSession?.id)return;if(p===u&&f===s){if(b.level!==c){_(),i(Error(Xl.t(`thinkingNotConfirmed`)));return}g(b),o=null,n({thinkingPendingLevel:null}),a();return}}}finally{d===l&&(c=!1)}};return{select:e=>{let r=t(),i=r.snapshot?.thinking,a=r.snapshot?.selectedSession?.id;!e||!i?.supported||r.sessionSwitching||r.modelSelectionPending||r.workspaceDraft||!a||!LD(r.snapshot)||a!==r.snapshot?.currentSessionId||r.selectedPath!==r.snapshot?.selectedSession?.path||r.liveRunning||r.snapshot?.runtime.status===`running`||e!==(r.thinkingPendingLevel??i.level)&&(o=e,s++,n({thinkingPendingLevel:e}),y())},accept:g,resetPending:_,resetGate:m}}var yG=`openpi.collapsed-workspaces`,bG=`openpi.sidebar-collapsed`,xG=new Set(`agent_start.turn_started.turn_settled.agent_settled.prompt_settled.message_end.tool_execution_end.session_start.session_switched.session_progress.queue_update.prompt_failed.prompt_discarded.model_select.settings_changed.workspace_imported.workspace_removed.workspace_renamed.session_renamed.session_archived.session_unarchived.session_pins_changed.sidebar_pins_changed.workspace_order_changed.session_order_changed.session_read_state_changed.session_created.session_forked.session_deleted.prompt_accepted.runtime_changed.questions_changed.command_feedback.command_submitted.plan_mode_changed`.split(`.`));function SG(e){try{let t=JSON.parse(window.sessionStorage.getItem(e)||`[]`);return new Set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])}catch{return new Set}}function CG(e){try{return window.sessionStorage.getItem(e)===`true`}catch{return!1}}function wG(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch{}}function TG(e){let t=8,n=[];for(let r=e.length-1;r>=0;r--){let i=e[r];(i.optimistic||t-->0)&&n.push(i)}return n.reverse()}var EG=1e3,DG=new Set,OG=new WeakMap;function kG(e){if(e){if(e.role===`toolResult`&&e.toolCallId)return`tool-result-${e.toolCallId}`;if(e.timestamp!==void 0)return`message-${e.role}-${e.timestamp}`}}function AG(e){return e?.parts?.some(e=>e.type===`thinking`)===!0}function jG(e){if(!e)return DG;let t=OG.get(e);if(t)return t;let n=new Set;for(let t of e){if(!AG(t.message))continue;n.add(t.id);let e=kG(t.message);e&&n.add(e)}return OG.set(e,n),n}function MG(e,t){for(let n of Object.keys(e))if(!t.has(n)){let n={};for(let r of Object.keys(e))t.has(r)&&(n[r]=e[r]);return n}return e}function NG(e,t){if(e.length!==t.length)return!1;for(let n=0;ne.optimistic?.sessionId===t?.id&&e.optimistic?.sessionPath===t?.path&&e.optimistic!==void 0)}function FG(e,t,n,r){return e.map(e=>e.optimistic?.sessionId===t&&e.optimistic.sessionPath===n&&e.optimistic.commandId===r&&!e.optimistic.admitted?{...e,optimistic:{...e.optimistic,admitted:!0}}:e)}function IG(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=()=>{window.clearTimeout(i),t.removeEventListener(`abort`,r),n()},i=window.setTimeout(r,e);t.addEventListener(`abort`,r,{once:!0})})}function LG(e){return/^\/(?![\\/])/u.test(e)||/^[a-z]:[\\/]/iu.test(e)||/^\\\\(?![?.]\\)[^\\/]+\\[^\\/]+\\/u.test(e)||/^\/\/[^\\/]+\/[^\\/]+\//u.test(e)}function RG(e=new de,t={}){let n=t.consumeEvents??_G,r=new URLSearchParams(window.location.search),i=r.get(`sessionPath`),a=r.get(`sessionId`),o=i!==null||a!==null,s=i&&LG(i)&&i.length<=4096&&a&&a.length<=128&&!/[\u0000-\u001f\u007f]/u.test(i+a)&&r.getAll(`sessionPath`).length===1&&r.getAll(`sessionId`).length===1?{path:i,id:a}:null,c=0,l=0,u=null,d=!1,f=new Map,p=0,m=0,h=0,g=null,_=0,v=null,y=null,b=null,x=null,S=Promise.resolve(),C=null,w=null,T=!1,E=!1,D=null,O=null,k=null,A=0,j=null,M=0,N=0,P=new Set,F=new Set,I=[],ee=null,L=(e,t)=>{if(typeof t==`string`)for(e.add(t);e.size>32;){let t=e.values().next().value;t&&e.delete(t)}},R=e=>ee&&(e?.sessionId!==ee.sessionId||e.commandId!==ee.commandId||e.epoch!==ee.epoch||e.sessionPath!==void 0&&ee.sessionPath!==void 0&&e.sessionPath!==ee.sessionPath)?(ee=null,{turnCancellationPending:!1}):{},te=()=>(ee=null,N++,I=[],h=0,{planSelectionPending:!1,activeTurn:null,turnCancellationPending:!1,turnTerminalStatus:null,pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,liveMessages:[],liveRunning:!1,livePhase:`idle`,liveRetry:null,thinkingStarts:{},thinkingDurations:{}}),z=(e,t=null)=>(h=e,{liveRetry:t}),B=e=>{let t=I.indexOf(e);for(t>=0&&I.splice(t,1),I.push(e);I.length>EG;)I.shift()},ne=(e,t,n,r)=>{let i=jG(t);I.some(e=>i.has(e))&&(I=I.filter(e=>!i.has(e)));let a=new Set(i);for(let t of e){a.add(t.key);let e=kG(t.message);e&&a.add(e)}for(let e of I)a.add(e);let o=MG(n,a),s=MG(r,a);return o===n&&s===r?null:{thinkingStarts:o,thinkingDurations:s}},re=()=>(A++,k?.abort(),k=null,{modelSearch:{query:``,status:`idle`,models:[],totalMatches:0,matchesOmitted:0,error:null}}),V=()=>({sessionId:null,status:`idle`,commands:[],totalAvailable:0,commandsOmitted:0,error:null}),ie=(e,t)=>({liveRunning:t===`running`||!e,livePhase:t===`running`?`running`:e?`idle`:`preparing`});return eu((t,r)=>{let i=e=>{g=null,t({notice:e instanceof Error?e.message:String(e)})},a=e=>{let t=r().snapshot;return e.epoch===c&&r().selectedWorkspace===e.workspacePath&&t?.currentSessionId===e.sessionId&&LD(t)&&t.selectedSession?.id===e.sessionId&&r().selectedPath===t.selectedSession.path&&t.selectedSession.cwd===e.workspacePath&&(!e.sessionPath||t.selectedSession.path===e.sessionPath)},I=()=>{M++,j?.abort(),j=null,t({commandDiscovery:V()})},ae=async(n,a,o,s)=>{if(r().modelSelectionPending)return!1;t({modelSelectionPending:!0});try{let i=await e.selectModel(n.provider,n.id,o,s);if(a!==c||s!==r().selectedPath||o!==r().snapshot?.selectedSession?.id)return!1;if(i.provider!==n.provider||i.id!==n.id||!i.current)throw Error(`Model selection was not confirmed. Please select a model again.`);let l=p,u=await r().actions.refreshSnapshot({epoch:a});if(!u&&a===c&&s===r().selectedPath&&o===r().snapshot?.selectedSession?.id&&p>l+1&&(u=await r().actions.refreshSnapshot({epoch:a})),!u||a!==c||s!==r().selectedPath||o!==r().snapshot?.selectedSession?.id)return!1;let d=r().snapshot?.models.find(e=>e.current);if(d?.provider!==n.provider||d.id!==n.id)throw Error(`The Session model changed. Please select a model again.`);return t({draftModel:null,notice:null}),!0}catch(e){return a===c&&s===r().selectedPath&&o===r().snapshot?.selectedSession?.id&&i(e),!1}finally{a===c&&t({modelSelectionPending:!1})}},oe=(e=160)=>{if(T){E=!0;return}w===null&&(w=window.setTimeout(async()=>{w=null,T=!0;try{await r().actions.refreshSnapshot()}finally{T=!1,E&&(E=!1,oe())}},e))},se=vG({client:e,get:r,set:t,getEpoch:()=>c,showError:i,scheduleSnapshotRefresh:oe}),ce=e=>{let n=r(),i=e.detail??{},a=i.sessionId,o=[`session_start`,`session_switched`,`session_created`].includes(e.type);if(n.cursor!==null&&e.sequence<=n.cursor)return;t({cursor:e.sequence});let s=n.promptAdmissionRecovery,l=s?.commandId,u=n.snapshot?.selectedSession,d=u?.id===a&&u?.path===n.selectedPath&&(i.sessionPath===void 0||i.sessionPath===u?.path);if(d&&s?.sessionId===u?.id&&s?.sessionPath===u?.path&&typeof i.commandId==`string`&&i.commandId===l&&[`prompt_accepted`,`prompt_failed`,`prompt_settled`,`turn_started`,`turn_settled`].includes(e.type)){let r=e.type!==`prompt_failed`;t({promptAdmissionRecovery:null,promptAdmissionResolution:s?{sessionId:s.sessionId,sessionPath:s.sessionPath,commandId:s.commandId,content:s.content,images:s.images}:n.promptAdmissionResolution,liveMessages:r&&s&&!s.delivery?.retryEntryId&&!n.liveMessages.some(e=>e.key===s.optimisticKey)?TG([...n.liveMessages,{key:s.optimisticKey,timestamp:s.timestamp??e.timestamp,optimistic:{sessionId:s.sessionId,sessionPath:s.sessionPath,commandId:s.commandId,afterEntryId:s.afterEntryId??null,admitted:e.type===`prompt_accepted`},message:{role:`user`,content:s.content}}]):n.liveMessages})}if(e.type===`prompt_accepted`&&d&&u&&typeof i.commandId==`string`&&t({liveMessages:FG(r().liveMessages,u.id,u.path,i.commandId)}),n=r(),(e.type===`runtime_changed`||e.type===`settings_changed`)&&t(re()),e.type===`runtime_changed`&&I(),n.sessionSwitching&&!o){oe();return}if(typeof a==`string`&&a!==n.snapshot?.currentSessionId&&!o){oe();return}if([`auto_retry_start`,`auto_retry_end`].includes(e.type)&&typeof i.sessionPath==`string`&&i.sessionPath!==(n.snapshot?.currentSessionPath??n.snapshot?.selectedSession?.path)){oe();return}if(!o&&(i.message||e.type.startsWith(`tool_execution_`))&&!LD(n.snapshot)){xG.has(e.type)&&oe();return}if(n.snapshot){let r=n.snapshot.runtime.liveTools??[],a=iG(r,e.type,i);a!==r&&t({snapshot:{...n.snapshot,runtime:{...n.snapshot.runtime,liveTools:a}}})}if(o){let o=i.commandId;if(typeof o==`string`&&F.has(o)){oe();return}let s=i.sessionPath,l=n.snapshot?.sessions.some(e=>e.path===s),u=!1;if(b?.kind===`select`?u=b.expectedPath===s:(b?.kind===`create`&&b.commandId===o&&e.type===`session_switched`&&typeof a==`string`&&(!b.expectedSessionId||b.expectedSessionId===a)&&(typeof s!=`string`||!l)||b?.kind===`create`&&b.commandId===o&&e.type===`session_created`&&typeof a==`string`&&(!b.expectedSessionId||a===b.expectedSessionId))&&(u=!0),u&&b?.epoch!==c)return;if(u)t({...te(),liveMessages:PG(n.liveMessages,n.snapshot?.selectedSession)});else{if(!b&&n.selectedPath&&n.snapshot?.selectedSession?.path===n.selectedPath){I(),se.resetPending(),t({...te(),liveMessages:PG(n.liveMessages,n.snapshot.selectedSession),snapshot:{...n.snapshot,currentSessionId:void 0,currentSessionPath:void 0},modelSelectionPending:!1});let e=c;r().actions.refreshSnapshot({epoch:e});return}I();let e=++c;se.resetPending(),v=null,y=null,t({...te(),promptAdmissionPending:!1,promptAdmissionRecovery:null,selectedPath:typeof s==`string`?s:null,draftModel:n.workspaceDraft?n.draftModel:null,modelSelectionPending:!1,sessionSwitching:!0}),r().actions.refreshSnapshot({epoch:e}).then(n=>{e===c&&t({selectedPath:n?r().selectedPath:null,sessionSwitching:!1})})}}else if(e.type===`prompt_accepted`){let r=P.has(String(i.commandId??``));t({...ie(r,n.livePhase),...n.livePhase===`running`?{}:z(e.sequence),pendingFollowUpsReceipt:Number.isInteger(i.pendingFollowUps)?Number(i.pendingFollowUps):n.pendingFollowUpsReceipt,pendingSteeringReceipt:Number.isInteger(i.pendingSteering)?Number(i.pendingSteering):n.pendingSteeringReceipt})}else if(e.type===`turn_started`){m=e.sequence;let n={sessionId:String(i.sessionId),commandId:String(i.commandId),epoch:Number(i.epoch),...typeof i.sessionPath==`string`?{sessionPath:i.sessionPath}:{},...typeof i.promptEntryId==`string`?{promptEntryId:i.promptEntryId}:{},...typeof i.startedAt==`number`?{startedAt:i.startedAt}:{},...typeof i.elapsedMs==`number`?{elapsedMs:i.elapsedMs}:{}};t({...R(n),activeTurn:n,liveRunning:!0,livePhase:`running`,...z(e.sequence),turnTerminalStatus:null})}else if(e.type===`agent_start`){m=e.sequence;let n=i.activeTurn;t({...n?{...R(n),activeTurn:n}:{},liveRunning:!0,livePhase:`running`,...z(e.sequence)})}else if(e.type===`turn_settled`){L(P,i.commandId);let r=n.activeTurn;r?.sessionId===i.sessionId&&r?.commandId===i.commandId&&r?.epoch===i.epoch&&(m=e.sequence,t({...R(null),activeTurn:null,liveRunning:!1,livePhase:`idle`,...z(e.sequence),turnTerminalStatus:typeof i.outcome==`string`?i.outcome:null}))}else if(e.type===`agent_settled`)n.activeTurn||(m=e.sequence),t({pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,...z(e.sequence),...n.activeTurn?{}:{liveRunning:!1,livePhase:`idle`}});else if(e.type===`prompt_settled`)L(P,i.commandId),n.livePhase!==`running`&&t({liveRunning:!1,livePhase:`idle`,...z(e.sequence)});else if(i.message&&typeof i.message==`object`){let r=i.message,a=n.liveMessages,o=typeof i.messageKey==`string`?i.messageKey:`${r.role||`message`}-${e.sequence}`,s={key:o,message:r},c=a.findIndex(e=>e.key===o);a=c>=0?a.map((e,t)=>t===c?s:e):TG([...a,s]);let l=!NG(n.liveMessages,a),u=n.thinkingStarts,d=n.thinkingDurations,f=!1;if(r.parts?.some(e=>e.type===`thinking`)&&(u[o]===void 0&&(u={...u,[o]:Date.now()},f=!0),e.type===`message_end`)){let e=kG(r),t=Date.now()-u[o];d={...d,[o]:t},e&&(d[e]=t),B(e??o),f=!0}if(f||l){let e=ne(a,n.snapshot?.selectedSession?.entries,u,d);e&&(u=e.thinkingStarts,d=e.thinkingDurations,f=!0)}t({liveMessages:a,...f?{thinkingStarts:u,thinkingDurations:d}:{}})}if(e.type===`prompt_discarded`&&typeof i.commandId==`string`&&(L(P,i.commandId),t({liveMessages:r().liveMessages.filter(e=>e.optimistic?.commandId!==i.commandId)})),e.type===`prompt_failed`){L(P,i.commandId);let a=typeof i.commandId==`string`&&n.activeTurn?.commandId===i.commandId;t({liveMessages:r().liveMessages.filter(e=>!e.optimistic||e.optimistic.commandId!==i.commandId),...a||n.livePhase!==`running`?{liveRunning:!1,livePhase:`idle`,...z(e.sequence)}:{},notice:typeof i.error==`string`?i.error:`Prompt failed`})}if(e.type===`auto_retry_start`&&(m=e.sequence,t({liveRunning:!0,livePhase:`running`,...z(e.sequence,{...typeof i.attempt==`number`?{attempt:i.attempt}:{},...typeof i.maxAttempts==`number`?{maxAttempts:i.maxAttempts}:{},...typeof i.errorMessage==`string`?{errorMessage:i.errorMessage}:{}})})),e.type===`auto_retry_end`&&t(z(e.sequence)),e.type===`thinking_level_changed`){let t=r().snapshot?.thinking;t&&typeof i.level==`string`&&se.accept({...t,level:i.level,revision:e.sequence})}xG.has(e.type)&&oe()},le=async i=>{let a=500,o=!1;for(;!i.aborted;){let s=!1;try{if(r().cursor===null){if(s=!0,!await r().actions.refreshSnapshot({resetCursor:!0}))throw Error(`snapshot unavailable`);s=!1}if(i.aborted)return;let c={signal:i,connected:!1};O=c;let l=()=>O===c&&!i.aborted;try{await n({client:e,cursor:r().cursor??0,onConnected:()=>{l()&&(c.connected=!0,a=500,t({connection:`connected`}),o&&(o=!1,oe(0)))},onEvent:e=>{l()&&ce(e)},onHeartbeat:()=>{l()&&oe(0)},signal:i})}finally{O===c&&(O=null)}}catch(e){if(i.aborted)return;t({connection:`reconnecting`});let n=!s&&await r().actions.refreshSnapshot({resetCursor:!0});if(i.aborted)return;o=!n,n||t(te()),await IG(a,i),a=Math.min(a*2,5e3),e instanceof SyntaxError&&t({notice:`Invalid event data`})}}},H={rememberPromptProjection(e,n,i){let a=r(),o=a.snapshot?.selectedSession;if(a.selectedPath!==n||o?.id!==e||o.path!==n)return;let s=new Set(o.entries.map(e=>e.id)),c=new Set(a.liveMessages.flatMap(t=>t.optimistic?.sessionId===e&&t.optimistic.sessionPath===n&&t.optimistic.projectedEntryId?[t.optimistic.projectedEntryId]:[])),l=new Map(i.map(e=>[e.key,e.entryId])),u=!1,d=a.liveMessages.map(t=>{let r=l.get(t.key);return!r||!s.has(r)||c.has(r)||t.optimistic?.sessionId!==e||t.optimistic.sessionPath!==n||!t.optimistic.admitted||t.optimistic.projectedEntryId?t:(u=!0,c.add(r),{...t,optimistic:{...t.optimistic,projectedEntryId:r},message:{role:`user`,content:``}})});u&&t({liveMessages:d})},setHistoryAnchor(e){let n=r().snapshot?.selectedSession;if(e&&(n?.id!==e.sessionId||n.path!==e.sessionPath))return;let i=r().historyAnchor;(i?.entryId!==e?.entryId||i?.sessionId!==e?.sessionId||i?.sessionPath!==e?.sessionPath)&&t({historyAnchor:e})},start(){D||(D=new AbortController,le(D.signal))},stop(){O=null,D?.abort(),D=null,w!==null&&window.clearTimeout(w),w=null,se.resetPending(),I()},async refreshSnapshot(n={}){let a=n.epoch??c,o=++p,l=r().selectedPath;try{let i=r().historyAnchor,u=s?.path===l?s:null,d=u?await e.snapshot(l,void 0,u.id):i&&i.sessionPath===l?await e.snapshot(l,i):await e.snapshot(l);if(a!==c||o!==p)return!1;if(u&&(d.selectedSession?.id!==u.id||d.selectedSession.path!==u.path))throw new ge(Xl.t(`sessionLinkUnavailable`),409,`SESSION_CONFLICT`);u&&(s=null);let f=typeof d.currentSessionId==`string`,_=f?d.sessions.find(e=>LD(d,e)):void 0,v=f?LD(d):d.selectedSession===void 0,b=d.selectedSession?d.sessions.some(e=>e.id===d.selectedSession.id&&e.path===d.selectedSession.path):!f,x=!l||d.sessions.some(e=>e.path===l),S=!l||d.selectedSession?.path===l;if(!x||!S||!b||!l&&!v)return t({selectedPath:null}),!n.canonicalRetry&&H.refreshSnapshot({...n,canonicalRetry:!0,epoch:a});let C=d.selectedSession?.cwd,w=d.workspaces.find(e=>e.current)?.path,T=d.workspaces.some(e=>e.path===r().selectedWorkspace)?r().selectedWorkspace:void 0,E=r().workspaceDraft?r().selectedWorkspace:C??w??T??null,D=n.resetCursor;r().snapshot?.selectedSession?.path!==d.selectedSession?.path&&(se.resetPending(),se.resetGate()),D&&se.resetGate();let k=r().snapshot?.currentSessionId,A=r().snapshot?.sessions.find(e=>LD(r().snapshot,e)),j=k!==d.currentSessionId||A?.path!==_?.path,M=r().snapshot?.selectedSession?.id!==d.selectedSession?.id||r().snapshot?.selectedSession?.path!==d.selectedSession?.path,N=r().collapsed;if(M&&!r().workspaceDraft&&d.selectedSession){let e=d.sessions.find(e=>e.id===d.selectedSession.id&&e.path===d.selectedSession.path),t=e?.workspacePath??d.selectedSession.cwd;!e?.archived&&!e?.ungrouped&&N.has(t)&&(N=new Set(N),N.delete(t),wG(yG,[...N]))}let P=r().snapshot,F=D||j||M||P?.currentSessionPath!==d.currentSessionPath||JSON.stringify(P?.models)!==JSON.stringify(d.models)||P?.truncation.modelsOmitted!==d.truncation.modelsOmitted;j&&(I(),se.resetPending(),se.resetGate());let ee=g!==null&&r().notice===g;g=null,(D||j||M)&&(m=0);let L=m>d.cursor,z=L?r().activeTurn:d.runtime.activeTurn??null,B=!D&&!j&&!M&&h>d.cursor,V=d.selectedExecution,ie=v&&d.runtime.status===`running`&&V?.sessionId===d.selectedSession?.id&&V?.sessionPath===d.selectedSession?.path&&V?.status===`running`?V.retry??null:null,ae=B?r().liveRetry:ie;if(t({...ee?{notice:null}:{},...D||j||M?{...te(),liveMessages:PG(r().liveMessages,d.selectedSession)}:{},connection:O?.connected&&!O.signal.aborted?`connected`:r().connection,cursor:D||r().cursor===null?d.cursor:Math.max(r().cursor??0,d.cursor),...R(z),activeTurn:z,livePhase:L?r().livePhase:d.runtime.status===`running`?`running`:!r().promptAdmissionPending&&!y?`idle`:r().livePhase,liveRetry:ae,liveRunning:L?r().liveRunning:d.runtime.status===`running`?!0:!r().promptAdmissionPending&&!y?!1:r().liveRunning,selectedPath:d.selectedSession?.path??null,selectedWorkspace:E,collapsed:N,snapshot:d,...F?re():{}}),B||(h=d.cursor),!(D||j||M)){let e=ne(r().liveMessages,d.selectedSession?.entries,r().thinkingStarts,r().thinkingDurations);e&&t(e)}return se.accept(),!0}catch(e){if(a!==c||o!==p)return!1;if(s?.path===l&&e instanceof ge&&[400,404,409].includes(e.status)){s=null,t({selectedPath:null,workspaceDraft:!0});let e=await H.refreshSnapshot({...n,epoch:a});return a===c&&t({notice:Xl.t(`sessionLinkUnavailable`)}),e}t({connection:`unavailable`}),i(e);let u=r().notice;return g=typeof u==`string`?u:null,!1}},async chooseWorkspace(){let t=c;try{let n=await e.chooseWorkspace();if(t!==c||n.cancelled||!n.path)return;H.setWorkspace(n.path),await H.refreshSnapshot()}catch(e){t===c&&i(e)}},setWorkspace(e){let n=r();e===n.selectedWorkspace&&!n.sessionSwitching||(++c,x=null,se.resetPending(),I(),v=null,y=null,t({...te(),...re(),selectedWorkspace:e,createdSession:null,workspaceDraft:!0,sessionSwitching:!1,modelSelectionPending:!1,promptAdmissionPending:!1,promptAdmissionRecovery:null,notice:null}))},async renameWorkspace(t,n){try{await e.renameWorkspace(t,n),await H.refreshSnapshot()}catch(e){throw i(e),e}},async removeWorkspace(n){try{return await e.removeWorkspace(n),r().selectedWorkspace===n&&I(),r().workspaceDraft&&r().selectedWorkspace===n&&t({selectedWorkspace:null}),await H.refreshSnapshot(),!0}catch(e){return i(e),!1}},async prepareSession(){if(r().sessionSwitching||r().modelSelectionPending)return null;r().selectedWorkspace||await H.chooseWorkspace();let e=r(),t=e.selectedWorkspace;if(!t||e.sessionSwitching||e.modelSelectionPending)return null;let n=e.snapshot?.selectedSession;if(!e.workspaceDraft&&n){if(e.selectedPath!==n.path||n.cwd!==t)return null;let r={epoch:c,sessionId:n.id,sessionPath:n.path,workspacePath:t};return!LD(e.snapshot)&&!await H.selectSession(n.path,n.id)?null:a(r)?r:null}return H.createSession(t)},async createSession(n){if(!n||r().modelSelectionPending)return null;let o=++c;se.resetPending(),I();let s=(x?.workspacePath===n?x.commandId:void 0)??globalThis.crypto?.randomUUID?.()??`web-create-${Date.now()}-${o}`;x={workspacePath:n,commandId:s},v=null,y=null,t({...te(),...re(),mobileSidebarOpen:!1,promptAdmissionPending:!1,promptAdmissionRecovery:null,selectedPath:null,selectedWorkspace:n,createdSession:null,workspaceDraft:!0,sessionSwitching:!0});let l=null,u=S.then(async()=>{if(o===c){b={commandId:s,epoch:o,expectedPath:null,kind:`create`};try{let u=await e.createSession(n,s);if(o!==c)return;if(u.cancelled||u.commandId!==s||typeof u.sessionId!=`string`||!u.sessionId||u.sessionId.length>128||u.sessionPath!==void 0&&!u.sessionPath)throw Error(`Session creation did not return a valid target identity.`);let d={epoch:o,sessionId:u.sessionId,sessionPath:u.sessionPath??null,workspacePath:n};b?.epoch===o&&(b.expectedSessionId=d.sessionId,b.expectedPath=d.sessionPath),t({selectedPath:d.sessionPath});let f=await H.refreshSnapshot({epoch:o});if(!f&&o===c&&(f=await H.refreshSnapshot({epoch:o})),o!==c)return;if(!f)throw Error(`The created Session could not be confirmed. Please try again.`);if(!a(d)){x=null,i(Error(`The created Session is no longer active in the selected workspace. Please try again.`));return}let p=r().selectedPath;if(!p)return;d.sessionPath=p,t({workspaceDraft:!1,createdSession:d,notice:null});let m=r().draftModel;if(m&&!await ae(m,o,d.sessionId,p))return;if(r().workspaceDraft||!a(d)){x=null,i(Error(`The created Session is no longer active in the selected workspace. Please try again.`));return}l=d,x=null}catch(e){if(o!==c)return;t({selectedPath:null}),i(e),await H.refreshSnapshot({epoch:o})}finally{L(F,s),b?.epoch===o&&(b=null),o===c&&t({sessionSwitching:!1})}}});return S=u.catch(()=>void 0),await u,o===c?l:null},async selectSession(n,a){if(!n)return!1;let o=r();if(C?.path===n&&C.epoch===c){let e=C;t({mobileSidebarOpen:!1});let i=await e.promise,o=r();return i&&e.epoch===c&&o.selectedPath===n&&o.snapshot?.selectedSession?.path===n&&(!a||o.snapshot.selectedSession.id===a)&&!o.workspaceDraft&&LD(o.snapshot)}if(!o.workspaceDraft&&!o.sessionSwitching&&o.selectedPath===n&&o.snapshot?.selectedSession?.path===n&&(!a||o.snapshot.selectedSession.id===a)&&LD(o.snapshot))return t({mobileSidebarOpen:!1}),!0;x=null;let s=!o.workspaceDraft&&o.selectedPath===n&&o.snapshot?.selectedSession?.path===n;I(),t({...re(),workspaceDraft:!1,...s?{}:{draftModel:null,createdSession:null},modelSelectionPending:!1});let l=s?c:++c;se.resetPending(),s||(v=null,y=null),t({...te(),liveMessages:s?PG(o.liveMessages,o.snapshot?.selectedSession):[],mobileSidebarOpen:!1,promptAdmissionPending:s?o.promptAdmissionPending:!1,promptAdmissionRecovery:s?o.promptAdmissionRecovery:null,selectedPath:n,sessionSwitching:!0});let u=S.then(async()=>{if(l!==c)return!1;b={epoch:l,expectedPath:n,kind:`select`};try{let i=await(a?e.selectSession(n,a):e.selectSession(n));if(l!==c)return!1;if(i.cancelled)return s||t({selectedPath:null}),await H.refreshSnapshot({epoch:l}),!1;let o=await H.refreshSnapshot({epoch:l});return l===c&&(!o&&!s&&t({selectedPath:null}),o&&r().selectedPath===n&&r().snapshot?.selectedSession?.path===n&&(!a||r().snapshot?.selectedSession?.id===a)&&!r().workspaceDraft&&LD(r().snapshot))}catch(e){return l===c&&(s||t({selectedPath:null}),i(e),await H.refreshSnapshot({epoch:l}),!1)}finally{b?.epoch===l&&(b=null),l===c&&t({sessionSwitching:!1})}});S=u.then(()=>void 0,()=>void 0),C={path:n,epoch:l,promise:u};try{return await u}finally{C?.promise===u&&(C=null)}},async navigateToMessage(n,i){let a=++l;try{if(i?.aborted||await H.selectSession(n.sessionPath)===!1)return!1;let o=c,s=r().snapshot?.selectedSession;if(i?.aborted||a!==l||r().sessionSwitching||s?.id!==n.sessionId||s.path!==n.sessionPath)return!1;let u=await e.sessionMessageWindow(n,i);if(i?.aborted||a!==l||o!==c)return!1;let d=r().snapshot?.selectedSession;return d?.id!==n.sessionId||d.path!==n.sessionPath||u.id!==n.sessionId||u.path!==n.sessionPath||u.history?.anchorEntryId!==n.entryId||u.history.anchorOnBranch!==!0||!u.entries.some(e=>e.id===n.entryId)?!1:(t({historyNavigation:{...n,session:u,revision:(r().historyNavigation?.revision??0)+1}}),!0)}catch{return!1}},async editMessage(e,t){return H.forkMessage(e,{mode:`edit`,content:t})},async regenerateMessage(e){return H.forkMessage(e,{mode:`regenerate`})},acknowledgeRestoredPromptDraft(e){r().restoredPromptDraft?.commandId===e&&t({restoredPromptDraft:null})},async cancelSessionFork(){let n=u;if(!n||n.scope!==`conversation`||!r().sessionForkPending||r().sessionForkCancellation)return;let a=c;t({sessionForkCancellation:`requesting`});try{let i=await e.cancelSessionFork({commandId:n.commandId,sessionId:n.sessionId,sessionPath:n.sessionPath});u===n&&r().sessionForkPending&&(t({sessionForkCancellation:i.state===`not-found`?null:i.state}),i.state===`not-found`&&t({notice:Xl.t(`sidebarForkCancelUnconfirmed`)}))}catch(e){a===c&&r().sessionForkPending&&(t({sessionForkCancellation:null}),i(e))}},async forkConversation(e,t,n=`local`){return r().sessionForkPending||r().sessionSwitching||d||!await H.selectSession(e,t)?!1:H.forkMessage({scope:`conversation`,sessionPath:e,sessionId:t,environment:n})},async forkMessage(n,i){let a=`scope`in n&&n.scope===`conversation`;if(a&&i||i?.mode===`edit`&&(!i.content.trim()||i.content.length>12e3))return!1;let o=r(),s=o.snapshot?.selectedSession;if(o.sessionForkPending||d)return!1;if(!s||o.workspaceDraft||o.sessionSwitching||o.promptAdmissionPending||o.promptAdmissionRecovery||!a&&(o.liveRunning||o.activeTurn||o.snapshot?.runtime.status!==`idle`)||o.modelSelectionPending||!LD(o.snapshot)||s.id!==n.sessionId||s.path!==n.sessionPath||o.selectedPath!==n.sessionPath||s.path.startsWith(`current:`))return t({notice:Xl.t(`forkSessionUnavailable`)}),!1;let f=`entryId`in n?n.entryId:void 0,p=u?.sessionId===n.sessionId&&u.sessionPath===n.sessionPath&&u.entryId===f&&u.scope===`conversation`===a&&(!a||u.scope===`conversation`&&(u.environment??`local`)===(n.environment??`local`))&&JSON.stringify(u.rerun)===JSON.stringify(i)?u:{sessionId:n.sessionId,sessionPath:n.sessionPath,...a?{scope:`conversation`,...n.environment===`worktree`?{environment:`worktree`}:{}}:{entryId:f,...i?{rerun:i}:{}},commandId:globalThis.crypto?.randomUUID?.()??`web-fork-${Date.now()}-${++l}`};u=p;let m=c,h=m;t({sessionForkPending:!0,sessionForkCancellation:null,sessionForkEnvironment:a?n.environment??`local`:void 0,notice:null});try{let o=await e.forkSession(p);if(m!==c||r().selectedPath!==n.sessionPath)return!1;if(o.commandId!==p.commandId||o.source.sessionId!==n.sessionId||o.source.sessionPath!==n.sessionPath||!a&&o.source.entryId!==f||!o.source.entryId)throw Error(Xl.t(`forkSessionUncertain`));if(o.state!==`forked`)return t({notice:[Xl.t(o.state===`cancelled`?`forkSessionCancelled`:`forkSessionUncertain`),o.reason,o.preservedWorktreePath?Xl.t(`sidebarForkWorktreePreserved`,{path:o.preservedWorktreePath}):void 0].filter(Boolean).join(` `)}),o.state===`cancelled`?u=null:await H.refreshSnapshot({epoch:m}),!1;if(!o.sessionId||!o.sessionPath||o.sessionId===n.sessionId||o.sessionPath===n.sessionPath)throw Error(Xl.t(`forkSessionUncertain`));let s=++c;h=s,y=null,v=null,se.resetPending(),I(),t({...te(),...re(),selectedPath:o.sessionPath,historyAnchor:null,historyNavigation:null,createdSession:null,draftModel:null,sessionSwitching:!0});let l=await H.refreshSnapshot({epoch:s});if(!l&&s===c&&r().selectedPath===o.sessionPath&&(l=await H.refreshSnapshot({epoch:s})),s!==c)return!1;let d=r().snapshot;if(o.replayed&&l&&d?.selectedSession?.id===o.sessionId&&d.selectedSession.path===o.sessionPath&&!LD(d)){if(l=await H.selectSession(o.sessionPath,o.sessionId)===!0,s!==c)return!1;d=r().snapshot}if(!l||r().selectedPath!==o.sessionPath||d?.selectedSession?.id!==o.sessionId||d.selectedSession.path!==o.sessionPath||!LD(d))return t({notice:Xl.t(`forkSessionUncertain`)}),!1;if(u=null,i){let e=o.prompt;if(!e||typeof e.content!=`string`||!Array.isArray(e.images))throw Error(Xl.t(`forkSessionUncertain`));t({sessionForkPending:!1,sessionSwitching:!1});let n=H.sendPrompt(e.content,e.images,void 0,void 0,{epoch:s,sessionId:o.sessionId,sessionPath:o.sessionPath,workspacePath:d.selectedSession.cwd}),i=[...r().liveMessages].reverse().find(e=>e.optimistic?.sessionId===o.sessionId&&e.optimistic?.sessionPath===o.sessionPath)?.optimistic?.commandId??p.commandId,a=await n;return s!==c||r().selectedPath!==o.sessionPath?!1:a?(t({notice:{kind:`success`,message:Xl.t(`messageRerunStarted`)}}),!0):(r().promptAdmissionRecovery||t({restoredPromptDraft:{sessionId:o.sessionId,sessionPath:o.sessionPath,commandId:i,content:e.content,images:e.images}}),!1)}return t({notice:{kind:`success`,message:Xl.t(`forkSessionCreated`)}}),!0}catch(e){return h===c&&(e instanceof ge&&[`SESSION_CONFLICT`,`SESSION_FORK_UNAVAILABLE`,`SESSION_FORK_CAPACITY`].includes(e.code??``)?(u=null,t({notice:a?e.message:Xl.t(`forkSessionUnavailable`)})):t({notice:Xl.t(`forkSessionUncertain`)})),!1}finally{t({sessionForkPending:!1,sessionForkCancellation:null,sessionForkEnvironment:void 0}),c===h&&h!==m&&r().sessionSwitching&&t({sessionSwitching:!1})}},async savePreferences(t){try{await e.savePreferences(t),await H.refreshSnapshot()}catch(e){throw i(e),e}},async renameSession(t,n){try{await e.renameSession(t,n),await H.refreshSnapshot()}catch(e){throw i(e),e}},async releaseSessionWorktree(t){let n=JSON.stringify([t.sessionId,t.sessionPath,t.worktreePath]),r=f.get(n);if(r?.pending)return r.pending;if(!r&&f.size>=128){let e=[...f].find(([,e])=>e.state===`preserved`&&!e.pending);if(e)f.delete(e[0]);else throw Error(Xl.t(`managedWorktreeRecoveryFull`))}let i={commandId:r?.state===`uncertain`?r.commandId:crypto.randomUUID(),state:`uncertain`,pending:void 0};return f.set(n,i),i.pending=(async()=>{try{let r=await e.releaseSessionWorktree({...t,commandId:i.commandId});if(r.commandId!==i.commandId||r.sessionId!==t.sessionId||r.sessionPath!==t.sessionPath||r.worktreePath!==t.worktreePath||![`removed`,`preserved`,`uncertain`].includes(r.state))throw Error(Xl.t(`managedWorktreeUncertain`));return r.state===`removed`?f.delete(n):i.state=r.state,r}finally{i.pending=void 0}})(),i.pending},async deleteSession(n,a,o){if(d||r().sessionForkPending||r().sessionSwitching)return!1;d=!0;let s=c;try{let i=await e.deleteSession({sessionPath:n,sessionId:a,commandId:o});if(i.commandId!==o||i.sessionId!==a||i.sessionPath!==n)throw Error(Xl.t(`sessionDeleteUncertain`));return i.state===`deleted`?(s===c&&r().selectedPath===n&&(++c,se.resetPending(),I(),v=null,y=null,t({...te(),...re(),selectedPath:null,historyAnchor:null,historyNavigation:null,workspaceDraft:!0,createdSession:null})),await H.refreshSnapshot(),t({notice:i.worktreeReleaseTarget?{kind:`success`,message:Xl.t(`managedWorktreeRetainedAfterDelete`,{path:i.worktreeReleaseTarget.worktreePath})}:i.metadataCleanupPending?Xl.t(`sessionDeleteMetadataPending`):{kind:`success`,message:Xl.t(`sessionDeleted`)}}),!0):(s===c&&(await H.refreshSnapshot({epoch:s}),t({notice:Xl.t(i.state===`cancelled`?`sessionDeleteCancelled`:`sessionDeleteUncertain`)})),!1)}catch(e){return s===c&&i(e),!1}finally{d=!1}},async setSessionPin(t,n,r,a){try{await e.setSessionPin(t,n,r,a),await H.refreshSnapshot()}catch(e){throw i(e),e}},async archiveSession(n){let a=r().snapshot?.sessions.find(e=>e.path===n);try{await e.archiveSession(n);let r={key:crypto.randomUUID(),path:n,sessionId:a?.id,title:jD(a??{},Xl.t(`untitledSession`))};t(e=>({archiveNotices:[r,...e.archiveNotices.filter(e=>e.path!==n)].slice(0,3)})),await H.refreshSnapshot()}catch(e){i(e)}},dismissArchiveNotice(e){t(t=>({archiveNotices:t.archiveNotices.filter(t=>t.key!==e)}))},async setSidebarPin(t,n,r){try{await e.setSidebarPin(t,n,r),await H.refreshSnapshot()}catch(e){throw i(e),e}},async setWorkspaceOrder(t,n){try{await e.setWorkspaceOrder(t,n),await H.refreshSnapshot()}catch(e){throw e instanceof ge&&e.code===`WORKSPACE_ORDER_CHANGED`&&await H.refreshSnapshot(),i(e),e}},async setSessionOrder(t,n,r){try{await e.setSessionOrder(t,n,r),await H.refreshSnapshot()}catch(e){throw i(e),e}},async setSessionRead(t,n,r,a){try{await e.setSessionRead(t,n,r,a),await H.refreshSnapshot()}catch(e){throw e instanceof ge&&e.code===`SESSION_READ_STATE_CHANGED`?await H.refreshSnapshot():i(e),e}},async unarchiveSession(n){let a=c,o=new Set(r().archiveNotices.filter(e=>e.path===n).map(e=>e.key)),s=()=>t(e=>({archiveNotices:e.archiveNotices.filter(e=>!o.has(e.key))}));try{if(await e.unarchiveSession(n),a!==c)return s(),!0;let t=p,r=await H.refreshSnapshot({epoch:a});!r&&a===c&&p>t+1&&(r=await H.refreshSnapshot({epoch:a}));let i=a!==c||r;return i&&s(),i}catch(e){return a===c&&i(e),!1}},async selectModel(e){let[n,...i]=e.split(`/`),a=i.join(`/`),o=r();if(!n||!a||o.sessionSwitching||o.modelSelectionPending||o.promptAdmissionPending||!o.workspaceDraft&&(o.liveRunning||o.snapshot?.runtime.status===`running`))return!1;let s=o.snapshot?.selectedSession?.id;if(o.workspaceDraft||!s&&!o.snapshot?.currentSessionId){let e=[...o.snapshot?.models??[],...o.modelSearch.models].find(e=>e.provider===n&&e.id===a);return e&&t({draftModel:e,notice:null}),!!e}return!s||!o.selectedPath||!LD(o.snapshot)||s!==o.snapshot?.currentSessionId||o.selectedPath!==o.snapshot?.selectedSession?.path?!1:(se.resetPending(),ae({provider:n,id:a},c,s,o.selectedPath))},async searchModels(n){let i=n.trim();if(!i){t(re());return}k?.abort();let a=new AbortController;k=a;let o=++A,s=c,l=r().snapshot?.currentSessionId;t({modelSearch:{query:i,status:`loading`,models:[],totalMatches:0,matchesOmitted:0,error:null}});try{let n=await e.searchModels(i,l,a.signal);if(a.signal.aborted||s!==c||o!==A)return;t({modelSearch:{query:i,status:`ready`,models:n.models,totalMatches:n.totalMatches,matchesOmitted:n.truncation.matchesOmitted,error:null}})}catch(e){if(a.signal.aborted||s!==c||o!==A)return;t({modelSearch:{query:i,status:`error`,models:[],totalMatches:0,matchesOmitted:0,error:e instanceof Error?e.message:String(e)}})}finally{k===a&&(k=null)}},clearModelSearch(){t(re())},selectThinking:se.select,async selectPlanMode(n){let a=r(),o=a.snapshot,s=o?.selectedSession;if(!o||!s||!LD(o,s)||a.workspaceDraft||a.sessionSwitching||a.planSelectionPending||a.promptAdmissionPending||a.promptAdmissionRecovery||a.liveRunning||o.runtime.status!==`idle`||o.runtime.planRevision===void 0)return;let l=c,u=++N;t({planSelectionPending:!0});try{if(await e.setPlanMode(s.id,s.path,n,o.runtime.planRevision),l===c&&u===N&&!await H.refreshSnapshot({epoch:l}))throw Error(Xl.t(`planModeUnconfirmed`))}catch(e){l===c&&u===N&&(await H.refreshSnapshot({epoch:l}),l===c&&u===N&&i(e))}finally{l===c&&u===N&&t({planSelectionPending:!1})}},async preparePlanImplementation(){let n=r(),a=n.snapshot,o=a?.selectedSession,s=o?.id;if(!s||!LD(a,o)||s!==a?.currentSessionId||!o?.path||n.selectedPath!==o.path||n.workspaceDraft||n.sessionSwitching||n.planSelectionPending||n.promptAdmissionPending||n.promptAdmissionRecovery||n.liveRunning||a.runtime.status!==`idle`||a.runtime.plan!==`ready`||typeof a.runtime.planRevision!=`string`)return null;let l=c,u=++N,d=o.path,f=a.runtime.planRevision;t({planSelectionPending:!0});try{let t;try{t=await e.preparePlanImplementation(s,d,f)}catch(e){if(l===c&&u===N){try{await H.refreshSnapshot({epoch:l})}catch{}l===c&&u===N&&i(e)}return null}let n=r();return l!==c||u!==N||!LD(n.snapshot)||n.snapshot?.currentSessionId!==s||n.snapshot.selectedSession?.path!==d||n.selectedPath!==d?null:t.sessionId!==s||t.status!==`ready`||t.revision!==f||n.snapshot?.runtime.plan!==`ready`||n.snapshot.runtime.planRevision!==f?(i(Error(Xl.t(`planModeUnconfirmed`))),null):{prompt:t.prompt,sessionId:s,sessionPath:d,planRevision:f}}finally{l===c&&u===N&&t({planSelectionPending:!1})}},async cancelActiveTurn(){let n=r().activeTurn??r().snapshot?.runtime.activeTurn;if(!n||!LD(r().snapshot)||r().turnCancellationPending||r().sessionSwitching)return;let a=c,o=r().selectedPath,s={...n};ee=s;let l=()=>ee===s&&a===c&&o===r().selectedPath;t({turnCancellationPending:!0});try{await e.cancelActiveTurn(n)}catch(e){if(!l())return;await H.refreshSnapshot({epoch:a}),l()&&i(e)}finally{ee===s&&(ee=null,t({turnCancellationPending:!1}))}},async sendPrompt(n,o=[],s,l,u){if(r().sessionForkPending||r().planSelectionPending)return!1;let d=n.trim();if(d.length>12e3)return t({notice:Xl.t(`promptTooLong`,{count:d.length,limit:Ce})}),!1;let f=o.map(({data:e,mimeType:t,name:n})=>({data:e,mimeType:t,...n===void 0?{}:{name:n}})),p=JSON.stringify(f.map(({data:e,mimeType:t,name:n})=>[t,n??``,e])),m=r();if(u&&(u.epoch!==c||!a(u)||m.workspaceDraft))return!1;let h=m.promptAdmissionRecovery,g=h?.phase===`submitting`?h:null,b=m.activeTurn??m.snapshot?.runtime.activeTurn;if(l?.streamingBehavior===`steer`&&!g&&(s||m.turnCancellationPending||!b||b.commandId!==l.expectedTurnCommandId||m.workspaceDraft))return t({notice:Xl.t(`steerStaleTurn`)}),!1;let x=m.selectedWorkspace;if(!x||!d&&f.length===0&&!l?.retryEntryId||m.sessionSwitching||m.promptAdmissionPending||h&&!g||m.promptAdmissionResolution||m.modelSelectionPending||m.thinkingPendingLevel!==null)return!1;let S=r().workspaceDraft||!r().snapshot?.selectedSession?.id;if(s&&S)return!1;let C=S?await H.createSession(x):null;if(S&&!C)return r().notice||t({notice:`The active Session changed before the first message was sent. Your message was not sent.`}),!1;if(S&&r().draftModel)return!1;let w=r().snapshot?.selectedSession,T=C??(w?{epoch:c,sessionId:w.id,sessionPath:w.path,workspacePath:x}:null);if(!T||r().workspaceDraft||!a(T)||r().sessionSwitching||r().promptAdmissionPending||g&&(r().promptAdmissionRecovery?.commandId!==g.commandId||r().promptAdmissionRecovery?.phase!==`submitting`))return!1;let{epoch:E,sessionId:D,sessionPath:O}=T;if(!O||s&&(s.sessionId!==D||s.sessionPath!==O||!s.planRevision))return!1;let k=r().draftModel;if(k&&!await ae(k,E,D,O)||r().workspaceDraft||!a(T)||g&&(r().promptAdmissionRecovery?.commandId!==g.commandId||r().promptAdmissionRecovery?.phase!==`submitting`))return!1;let A=++_,j=y?.sessionId===D&&y.sessionPath===O&&y.content===d&&y.imageSignature===p&&y.planRevision===s?.planRevision&&(y.delivery?.streamingBehavior??`followUp`)===(l?.streamingBehavior??`followUp`)&&y.delivery?.expectedTurnCommandId===l?.expectedTurnCommandId&&y.delivery?.retryEntryId===l?.retryEntryId,M=j?y.commandId:globalThis.crypto?.randomUUID?.()??`web-prompt-${Date.now()}-${A}`,N=j?y.optimisticKey:`optimistic-${M}`,F=j?y.timestamp:new Date().toISOString(),I=j?y.afterEntryId:r().snapshot?.selectedSession?.history?.leafEntryId??r().snapshot?.selectedSession?.entries.at(-1)?.id??null;y={sessionId:D,sessionPath:O,content:d,imageSignature:p,images:f,commandId:M,optimisticKey:N,timestamp:F,afterEntryId:I,...s?{planRevision:s.planRevision}:{},...l?{delivery:l}:{}},v=A,t({liveMessages:j||l?.retryEntryId?r().liveMessages:TG([...r().liveMessages,{key:N,timestamp:F,optimistic:{sessionId:D,sessionPath:O,commandId:M,afterEntryId:I,admitted:!1},message:{role:`user`,content:d,...f.length>0?{parts:f.map(e=>({type:`image`,mimeType:e.mimeType,...e.name?{name:e.name}:{},previewUrl:`data:${e.mimeType};base64,${e.data}`}))}:{}}}]),notice:null,pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,turnTerminalStatus:null,promptAdmissionPending:!0,scrollToBottom:r().scrollToBottom+1});try{let n=l?await e.prompt(D,d,M,O,j,f,s?.planRevision,l):s?await e.prompt(D,d,M,O,j,f,s.planRevision):await e.prompt(D,d,M,O,j,f);if(E!==c||O!==r().selectedPath||D!==r().snapshot?.selectedSession?.id||v!==A)return!1;let i=P.has(n.id);return y?.commandId===M&&(y=null),t({liveMessages:n.accepted&&n.id===M?FG(r().liveMessages,D,O,M):r().liveMessages,...LD(r().snapshot)?ie(i,r().livePhase):{},pendingFollowUpsReceipt:LD(r().snapshot)?n.pendingFollowUps??null:null,pendingSteeringReceipt:LD(r().snapshot)?n.pendingSteering??null:null,...g&&r().promptAdmissionRecovery?.commandId===g.commandId?{promptAdmissionRecovery:null,...j?{promptAdmissionResolution:{sessionId:g.sessionId,sessionPath:g.sessionPath,commandId:g.commandId,content:g.content,images:g.images}}:{}}:{}}),oe(120),!0}catch(e){if(E!==c||O!==r().selectedPath||D!==r().snapshot?.selectedSession?.id||v!==A)return!1;let n=e instanceof ge&&[`PLAN_BUSY`,`PLAN_CONFLICT`,`PLAN_CONTROL_UNAVAILABLE`].includes(e.code??``),a=e instanceof ge&&e.code===`TURN_CONFLICT`,o=n||e instanceof ge&&[`WORKSPACE_REQUIRED`,`SESSION_CONFLICT`,`TURN_CONFLICT`,`PROMPT_REJECTED`,`COMMAND_CONFLICT`,`PROMPT_ADMISSION_CAPACITY`,`INVALID_PROMPT`,`INVALID_PROMPT_IMAGES`].includes(e.code??``),s=P.has(M)||r().liveMessages.some(e=>e.optimistic?.sessionId===D&&e.optimistic.sessionPath===O&&e.optimistic.commandId===M&&e.optimistic.admitted)||r().activeTurn?.sessionId===D&&r().activeTurn?.commandId===M;if(!o&&s)return y?.commandId===M&&(y=null),g&&r().promptAdmissionRecovery?.commandId===g.commandId&&t({promptAdmissionRecovery:null,...j?{promptAdmissionResolution:{sessionId:g.sessionId,sessionPath:g.sessionPath,commandId:g.commandId,content:g.content,images:g.images}}:{}}),!0;if(!o&&y?.commandId===M){let n=y;y=null,t({notice:null,promptAdmissionPending:!1,promptAdmissionRecovery:{...n,retryable:!(e instanceof ge)||e.code!==`COMMAND_ADMISSION_UNKNOWN`,phase:`checking`}});let i=await H.refreshSnapshot({resetCursor:!0,epoch:E}),a=r().promptAdmissionRecovery;if(a?.commandId===M){if(r().activeTurn?.sessionId===D&&r().activeTurn?.commandId===M&&r().selectedPath===O&&r().snapshot?.selectedSession?.path===O&&LD(r().snapshot))return t({promptAdmissionRecovery:null,promptAdmissionResolution:{sessionId:a.sessionId,sessionPath:a.sessionPath,commandId:a.commandId,content:a.content,images:a.images}}),!0;t({promptAdmissionRecovery:{...a,phase:i?`ready`:`verification-failed`}})}return!1}return o?(y?.commandId===M&&(y=null),t({promptAdmissionPending:!1,liveMessages:r().liveMessages.filter(e=>e.key!==N),...j&&g&&e instanceof ge&&e.code===`PROMPT_REJECTED`?{promptAdmissionRecovery:null}:{}}),(n||a)&&(await H.refreshSnapshot({epoch:E}),E!==c||O!==r().selectedPath||v!==A)||i(a?Error(Xl.t(`steerStaleTurn`)):e),!1):(i(e),!1)}finally{E===c&&v===A&&(v=null,t({promptAdmissionPending:!1}))}},async checkPromptAdmissionRecovery(){let e=r().promptAdmissionRecovery;if(!e||e.phase!==`verification-failed`)return;let n=c;t({notice:null,promptAdmissionRecovery:{...e,phase:`checking`}});let i=await H.refreshSnapshot({resetCursor:!0,epoch:n}),a=r().promptAdmissionRecovery;a?.commandId===e.commandId&&a.phase===`checking`&&t({promptAdmissionRecovery:{...a,phase:i?`ready`:`verification-failed`}})},async retryPromptAdmission(){let e=r().promptAdmissionRecovery;if(!e?.retryable||e.phase!==`ready`||e.sessionPath!==r().selectedPath||e.sessionPath!==r().snapshot?.selectedSession?.path||e.sessionId!==r().snapshot?.selectedSession?.id)return!1;let n=e.images??[];y={...e,images:n,imageSignature:JSON.stringify(n.map(({data:e,mimeType:t,name:n})=>[t,n??``,e])),afterEntryId:e.afterEntryId??null,timestamp:e.timestamp??new Date().toISOString()},t({promptAdmissionRecovery:{...e,phase:`submitting`},notice:null});try{return await H.sendPrompt(e.content,n,e.planRevision?{sessionId:e.sessionId,sessionPath:e.sessionPath,planRevision:e.planRevision}:void 0,e.delivery)}finally{let n=r().promptAdmissionRecovery;n?.commandId===e.commandId&&n.phase===`submitting`&&t({promptAdmissionRecovery:{...n,phase:`ready`}})}},async sendPromptAsNew(e,n,i,a,o){let s=r().promptAdmissionRecovery;if(!s||s.phase!==`ready`||s.sessionPath!==r().selectedPath||s.sessionPath!==r().snapshot?.selectedSession?.path||s.sessionId!==r().snapshot?.selectedSession?.id)return!1;let c=e.trim(),l=n??s.images??[];if(!c&&l.length===0)return!1;y=null,t({promptAdmissionRecovery:{...s,phase:`submitting`},notice:null});let u=!1;try{let e=s.planRevision?{sessionId:s.sessionId,sessionPath:s.sessionPath,planRevision:s.planRevision}:i;return u=e?await H.sendPrompt(c,l,e,void 0,o):await H.sendPrompt(c,l,void 0,void 0,o),u}finally{let e=r().promptAdmissionRecovery;e?.commandId===s.commandId&&e.phase===`submitting`&&t({promptAdmissionRecovery:u?null:{...e,phase:`ready`}})}},abandonPromptAdmission(){let e=r().promptAdmissionRecovery;!e||e.phase===`submitting`||(y?.commandId===e.commandId&&(y=null),t({liveMessages:r().liveMessages.filter(t=>t.key!==e.optimisticKey),notice:null,promptAdmissionRecovery:null}))},acknowledgePromptAdmissionResolution(e){r().promptAdmissionResolution?.commandId===e&&t({promptAdmissionResolution:null})},async discoverCommands(){let n=r(),i=n.snapshot?.selectedSession?.id;if(n.workspaceDraft||!i||!LD(n.snapshot)||i!==n.snapshot?.currentSessionId||n.selectedPath!==n.snapshot?.selectedSession?.path||n.sessionSwitching){I();return}if(n.commandDiscovery.sessionId===i&&(n.commandDiscovery.status===`loading`||n.commandDiscovery.status===`ready`))return;let a=c,o=++M;j?.abort();let s=new AbortController;j=s,t({commandDiscovery:{sessionId:i,status:`loading`,commands:[],totalAvailable:0,commandsOmitted:0,error:null}});try{let n=await e.commands(i,s.signal);if(s.signal.aborted||a!==c||o!==M||i!==r().snapshot?.currentSessionId)return;t({commandDiscovery:{sessionId:i,status:`ready`,commands:n.commands,totalAvailable:n.totalAvailable,commandsOmitted:n.truncation.commandsOmitted,error:null}})}catch(e){if(s.signal.aborted||a!==c||o!==M)return;t({commandDiscovery:{sessionId:i,status:`error`,commands:[],totalAvailable:0,commandsOmitted:0,error:e instanceof Error?e.message:String(e)}})}finally{j===s&&(j=null)}},clearCommandDiscovery:I,setQuery(e){t({query:e})},setSearchOpen(e){t({searchOpen:e,...e?{}:{query:``}})},toggleWorkspace(e){let n=new Set(r().collapsed);n.has(e)?n.delete(e):n.add(e),wG(yG,[...n]),t({collapsed:n})},toggleSidebar(e){if(e){t({mobileSidebarOpen:!r().mobileSidebarOpen});return}let n=!r().sidebarCollapsed;try{window.sessionStorage.setItem(bG,String(n))}catch{}t({sidebarCollapsed:n})},closeMobileSidebar(){t({mobileSidebarOpen:!1})},clearNotice(){t({notice:null})}};return{planSelectionPending:!1,activeTurn:null,turnCancellationPending:!1,turnTerminalStatus:null,pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,snapshot:null,historyAnchor:null,historyNavigation:null,sessionForkPending:!1,sessionForkCancellation:null,cursor:null,selectedPath:s?.path??null,selectedWorkspace:null,workspaceDraft:o&&!s,draftModel:null,createdSession:null,modelSelectionPending:!1,modelSearch:{query:``,status:`idle`,models:[],totalMatches:0,matchesOmitted:0,error:null},collapsed:SG(yG),sidebarCollapsed:CG(bG),mobileSidebarOpen:!1,query:``,searchOpen:!1,connection:`connecting`,archiveNotices:[],notice:o&&!s?Xl.t(`sessionLinkUnavailable`):null,liveMessages:[],liveRunning:!1,livePhase:`idle`,liveRetry:null,thinkingStarts:{},thinkingDurations:{},promptAdmissionPending:!1,promptAdmissionRecovery:null,promptAdmissionResolution:null,restoredPromptDraft:null,sessionSwitching:!1,scrollToBottom:0,thinkingPendingLevel:null,commandDiscovery:V(),actions:H}})}var zG=RG(),BG={base:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kaIpWk:`x16rqkct`,kmuXW:`x2lah0s`,kzqmXN:`x1xc55vz`,kZKoxP:`xdk7pt`,$$css:!0},pulsing:{kKVMdj:`x1mta51n`,k44tkh:`x1c74tu6`,kyAemX:`x4hg4is`,ko0y90:`xa4qsjk`,$$css:!0},reducedMotion:{kjO2d4:`x1aquc0h`,$$css:!0}},VG={success:{kWkggS:`xdsz4j9`,kMwMTN:`xri61p4`,$$css:!0},warning:{kWkggS:`x1q8g9m5`,kMwMTN:`xrebv38`,$$css:!0},error:{kWkggS:`x1pjz0fi`,kMwMTN:`x1m024r3`,$$css:!0},accent:{kWkggS:`x1ewilqj`,kMwMTN:`x17wrial`,$$css:!0},neutral:{kWkggS:`x1q5y3ey`,kMwMTN:`xrkvqaz`,$$css:!0}};function HG({variant:e,label:t,isPulsing:n=!1,tooltip:r,icon:i,xstyle:a,className:o,style:s,ref:c,...l}){let u=mt(i),d=(0,q.jsx)(`span`,{ref:c,role:`img`,"aria-label":t,...H(O(`status-dot`,{variant:e},{legacyNames:[`statusdot`]}),w(BG.base,VG[e],n&&BG.pulsing,n&&BG.reducedMotion,a),o,s),...l,children:u&&(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`x78zum5 x6s0dn4 xl56j7k x14ju556 x1xc55vz xdk7pt`,children:i})});return r?(0,q.jsx)(V,{content:r,children:d}):d}HG.displayName=`StatusDot`;function UG({identity:e,title:t,label:n,state:r=`unknown`,action:i,onInspect:a}){let{t:o}=W(),s=(0,K.useId)();return(0,q.jsxs)(a?`button`:`div`,{className:`subagent-card-open`,"data-status":r,type:a?`button`:void 0,"aria-label":a?o(`inspectSubagent`,{name:t}):void 0,"aria-describedby":a?s:void 0,onClick:a,children:[i?(0,q.jsx)($o,{className:`subagent-operation-icon`,"aria-hidden":`true`}):(0,q.jsx)(JW,{identity:e}),i&&(0,q.jsxs)(`span`,{className:`subagent-operation-label`,children:[i,t&&` ·`]}),(0,q.jsx)(`span`,{className:`subagent-activity-title`,title:t,children:t}),(0,q.jsx)(`span`,{id:s,className:`subagent-state ${r}${i||r===`running`||r===`done`?` subagent-state-hidden`:``}`,children:n}),!i&&r===`running`&&(0,q.jsx)(rc,{className:`subagent-running-icon`,"aria-hidden":`true`}),a&&(0,q.jsx)(os,{className:`subagent-open-icon`,"aria-hidden":`true`})]})}function WG(e,t){let n=Math.max(0,Math.floor(e/1e3)),r=Math.floor(n/3600),i=Math.floor(n/60)%60,a=n%60;return t.startsWith(`zh`)?[r?`${r}h`:``,i||r?`${i}m`:``,`${a}s`].filter(Boolean).join(` `):`${r?`${r}h`:``}${i||r?`${i}m`:``}${a}s`}function GG({elapsedMs:e,waiting:t=!1}){let{t:n,i18n:r}=W(),i=(0,K.useRef)({elapsedMs:e,clock:performance.now()}),[a,o]=(0,K.useState)(e);return(0,K.useEffect)(()=>{let t=performance.now();i.current={elapsedMs:Math.max(e,i.current.elapsedMs+t-i.current.clock),clock:t},o(i.current.elapsedMs)},[e]),(0,K.useEffect)(()=>{let e=window.setInterval(()=>{o(i.current.elapsedMs+performance.now()-i.current.clock)},1e3);return()=>window.clearInterval(e)},[]),(0,q.jsx)(`span`,{className:`turn-elapsed-running`,role:`timer`,"aria-live":`off`,children:n(t?`compactionElapsed`:`turnElapsedRunning`,{duration:WG(a,r.language)})})}function KG({timing:e}){let{t,i18n:n}=W();return(0,q.jsx)(`span`,{children:t(`turnElapsedFinished`,{duration:WG(e.elapsedMs,n.language)})})}function qG({compaction:e,observed:t=!0}){let{t:n}=W(),r=e.state===`running`,i=r&&!t,a=i?`unavailable`:e.state;return(0,q.jsxs)(`div`,{className:`context-compaction`,"data-state":a,children:[(0,q.jsxs)(`div`,{className:`context-compaction-heading`,children:[(0,q.jsxs)(`span`,{className:`context-compaction-label`,role:`status`,children:[(0,q.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,q.jsx)(`path`,{d:`M4 4v13a3 3 0 0 0 3 3h3M14 4h3a3 3 0 0 1 3 3v13M8 10h8M8 14h4`}),(0,q.jsx)(`circle`,{cx:`4`,cy:`4`,r:`1.7`,fill:`currentColor`,stroke:`none`}),(0,q.jsx)(`circle`,{cx:`20`,cy:`20`,r:`1.7`,fill:`currentColor`,stroke:`none`})]}),(0,q.jsx)(`span`,{className:`context-compaction-text`,children:n({running:`compactionRunning`,completed:`compactionCompleted`,failed:`compactionInterrupted`,cancelled:`compactionInterrupted`,unchanged:`compactionUnchanged`,unavailable:`compactionUnavailable`}[a])})]}),r&&t&&e.elapsedMs!==void 0&&(0,q.jsx)(GG,{elapsedMs:e.elapsedMs,waiting:!0},e.startedAt)]}),i&&(0,q.jsx)(`p`,{children:n(`compactionReconnectHelp`)})]})}function JG(e,t,n,r){if(e.name!==`codemode`||!e.id||t?.forkSnapshotToolResult)return;let i=t!==void 0&&r!==`running`,a=new Set([e.id]),o=[];for(let e of n)!e.parentToolCallId||!a.has(e.parentToolCallId)||(e.call.id&&a.add(e.call.id),o.push(e));let s=sd(t?.details),c=Array.isArray(s.calls)?s.calls:[],l=new Set(c.flatMap(e=>{let t=sd(e);return t.status===`cancelled`&&typeof t.id==`string`?[t.id]:[]})),u=t?.nestedCalls,d=[];for(let e of u?.calls??[]){let t=o.find(t=>t.call.id===e.call.id&&t.call.name===e.call.name),n=e.status!==`ok`&&l.has(e.call.id??``)?`cancelled`:e.status===`ok`?`returned`:e.status===`error`?`failed`:t&&[`returned`,`failed`,`cancelled`,`timed_out`].includes(t.state)?md(t.call,t.result,t.state).state:`unknown`;d.push({call:e.call,result:t?.result,state:n,outputMissing:!t?.result,argumentsOmitted:e.argumentsOmitted,error:e.error})}for(let e of o)d.some(t=>t.call.id===e.call.id)||i&&u?.complete||d.push({call:e.call,result:e.result,state:i&&e.state===`running`?`unknown`:e.result?.isError!==!1&&l.has(e.call.id??``)?`cancelled`:md(e.call,e.result,e.state).state,outputMissing:!1});let f=c.some(e=>{let t=sd(e);return!i&&t.status===`running`&&typeof t.id==`string`&&t.id.endsWith(`/?`)?!1:!d.some(e=>e.call.id===t.id&&e.call.name===t.name)});return{children:d,incomplete:u?.complete===!1||f||i&&!u&&c.length>d.length,showWrapper:d.length===0||f||t?.isError===!0||r===`running`&&!d.some(e=>e.state===`running`)}}function YG(e){let t=new Map(QO(e).map(e=>[e.start,e]));return()=>n=>{let r=[],i=e=>{if(e.type===`link`){let n=t.get(e.position?.start.offset??-1);n&&n.end===e.position?.end.offset&&r.push(n);return}if(`children`in e)for(let t of e.children)i(t)};i(n);let a=[],o=0;for(let t of r)a.push({type:`text`,value:e.slice(o,t.start)},{type:`element`,tagName:`a`,properties:{href:t.reference},children:[{type:`text`,value:t.name}]}),o=t.end;a.push({type:`text`,value:e.slice(o)}),n.children=[{type:`paragraph`,children:[],data:{hChildren:a}}]}}function XG({reference:e,label:t}){let{t:n}=W(),r=(0,K.useContext)(JE),[i,a]=(0,K.useState)(!1),o=e;try{o=decodeURIComponent(e)}catch{}let s=t===o&&o.split(/[\\/]/u).at(-1)||t;return(0,q.jsxs)(`span`,{className:`user-file-reference`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`user-file-reference-open`,disabled:!r||r.disabled,title:s,onClick:t=>r?.open(e,r.parent,t.currentTarget),children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:s})]}),(0,q.jsx)(`button`,{type:`button`,className:`user-file-reference-details`,"aria-label":`${n(`artifactFileDetails`)} ${s}`,"aria-expanded":i,onClick:()=>a(e=>!e),children:(0,q.jsx)(is,{"aria-hidden":`true`})}),i&&(0,q.jsx)(`span`,{className:`user-file-reference-path`,children:o})]})}var ZG={p:({children:e})=>(0,q.jsx)(`div`,{className:`message-body user-message-content`,children:e}),a:({href:e,node:t})=>(0,q.jsx)(XG,{reference:e??``,label:t?.children.map(e=>e.type===`text`?e.value:``).join(``)??``})};function QG({content:e,incomplete:t=!1}){let n=YG(e);return t?(0,q.jsx)(`div`,{className:`message-body`,children:e}):(0,q.jsx)(ov,{remarkPlugins:[n],urlTransform:e=>e,components:ZG,children:e})}function $G({preview:e,sessionId:t,sessionPath:n,entryId:r,markdown:i,fullText:a,onComplete:o,onProgress:s,purpose:c,partIndex:l}){let{t:u}=W(),d=(0,K.useMemo)(()=>new de,[]),f=(0,K.useRef)(null),p=(0,K.useRef)(null),m=(0,K.useRef)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(0),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(!1);(0,K.useEffect)(()=>()=>f.current?.abort(),[]);let C=(0,K.useCallback)(async()=>{if(f.current||_===null)return;let e=new AbortController;f.current=e,b(!0),S(!1);try{let i=[t,n,r,_,e.signal],a=await(c===`thinking`?d.sessionItem(...i,c,l):c?d.sessionItem(...i,c):d.sessionItem(...i));if(e.signal.aborted)return;if(a.entryId!==r||c===`plan`&&a.planStatus!==`ready`||c===`thinking`&&a.partIndex!==l||a.nextCursor!==null&&a.nextCursor<=_)throw Error(`Message identity changed`);let u=_===0?[a.text]:[...h??[],a.text];g(u),v(a.nextCursor),a.nextCursor===null?(o?.(u.join(``)),document.activeElement===p.current&&!m.current?.closest(`[hidden]`)&&m.current?.focus()):s?.(u.join(``))}catch{e.signal.aborted||S(!0)}finally{f.current===e&&(f.current=null,e.signal.aborted||b(!1))}},[d,t,n,r,_,c,l,h,o,s]);(0,K.useEffect)(()=>{if(c!==`thinking`||a!==void 0||h!==null||x)return;let e=m.current;if(!e)return;if(typeof IntersectionObserver>`u`){e.closest(`[hidden], details:not([open])`)||C();return}let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(t.disconnect(),C())});return t.observe(e),()=>t.disconnect()},[c,a,h,x,C]);let w=a??h?.join(``)??e;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{ref:m,className:`message-full-text`,tabIndex:-1,children:i?(0,q.jsx)(pD,{children:w}):(0,q.jsx)(QG,{content:w,incomplete:a===void 0&&_!==null})}),c===`thinking`&&a===void 0&&_!==null&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:u(`thinkingPartialText`)}),a===void 0&&_!==null&&(0,q.jsx)(`button`,{ref:p,type:`button`,className:`message-load-full`,"aria-disabled":y,onClick:()=>void C(),children:u(y?c===`plan`?`planCardLoadingFull`:c===`thinking`?`thinkingLoadingFull`:`messageLoadingFull`:x?c===`plan`?`planCardLoadFailed`:c===`thinking`?`thinkingLoadFailed`:`messageLoadFailed`:h?`messageLoadMore`:c===`plan`?`planCardLoadFull`:c===`thinking`?`thinkingLoadFull`:`messageLoadFull`)})]})}function eK(e){if(e?.toolName!==`plan_ready`||e.isError!==!1)return;let t=sd(e.details);if(t.status===`ready`&&typeof t.plan==`string`&&t.plan.trim())return{markdown:t.plan,ready:!0,truncated:!1};if(e.truncation?.details&&e.content.trim())return{markdown:e.content,ready:!1,truncated:!0}}function tK({result:e,sessionId:t,sessionPath:n,entryId:r}){let{t:i}=W(),a=(0,K.useId)(),[o,s]=(0,K.useState)(!0),[c,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(null),f=JSON.stringify([t,n,r]),p=u?.source===f?u:void 0,m=p?.complete?p.markdown:void 0,h=eK(e),g=h?.truncated&&p?{markdown:p.markdown,ready:p.complete,truncated:!p.complete}:h,_=(0,K.useRef)({source:f,markdown:g?.markdown});_.current={source:f,markdown:g?.markdown};let v=c?.source===f&&c?.markdown===g?.markdown?c.status:null;return g?(0,q.jsxs)(`section`,{className:`plan-card`,"aria-label":i(`planCardLabel`),children:[(0,q.jsxs)(`div`,{className:`plan-card-header`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`plan-card-toggle`,"aria-expanded":o,"aria-controls":a,onClick:()=>s(!o),children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:i(g.ready?`planCardReady`:`planCardResult`)}),(0,q.jsx)(`span`,{className:`plan-card-disclosure`,children:i(o?`planCardCollapse`:`planCardExpand`)})]}),(0,q.jsx)(`button`,{type:`button`,className:`plan-card-copy`,"aria-label":i(g.truncated?`planCardCopyPreview`:`planCardCopy`),title:i(g.truncated?`planCardCopyPreview`:`planCardCopy`),onClick:async()=>{let e=await td(g.markdown);_.current.source===f&&_.current.markdown===g.markdown&&l({source:f,markdown:g.markdown,status:e?`copiedMessage`:`copyFailed`})},children:v===`copiedMessage`?(0,q.jsx)(rs,{"aria-hidden":`true`}):(0,q.jsx)(_s,{"aria-hidden":`true`})})]}),(0,q.jsxs)(`div`,{id:a,hidden:!o,className:`plan-card-body`,children:[(0,q.jsx)(`p`,{className:`plan-card-note`,children:i(`planCardNotApproval`)}),g.truncated&&(0,q.jsx)(`p`,{className:`plan-card-note`,children:i(`planCardTruncated`)}),h?.truncated&&t&&n&&r?(0,q.jsx)($G,{preview:h.markdown,sessionId:t,sessionPath:n,entryId:r,markdown:!0,purpose:`plan`,fullText:m,onProgress:e=>d({source:f,markdown:e,complete:!1}),onComplete:e=>d({source:f,markdown:e,complete:!0})},f):(0,q.jsx)(pD,{children:g.markdown}),(0,q.jsxs)(`details`,{className:`plan-card-evidence`,children:[(0,q.jsx)(`summary`,{children:i(`planCardEvidence`)}),(0,q.jsx)(`pre`,{className:`tool-evidence`,children:cd(e.content).text})]})]}),v&&(0,q.jsx)(`span`,{className:`plan-card-feedback`,role:`status`,children:i(v)})]}):null}var nK=`openpi:reading-positions:v1`;function rK(){let e=new Map;try{let t=localStorage.getItem(`openpi:reading-positions:v1`)??`[]`,n=t.length<=32768?JSON.parse(t):[];if(Array.isArray(n)&&n.length<=4)for(let t of n){if(!Array.isArray(t)||t.length!==2)continue;let[n,r]=t;if(typeof n!=`string`||n.length>4600)continue;let i;try{i=JSON.parse(n)}catch{continue}!Array.isArray(i)||i.length!==2||!i.every(e=>typeof e==`string`&&e.length>0)||typeof r!=`object`||!r||!(`key`in r)||typeof r.key!=`string`||!r.key||r.key.length>512||`entryId`in r&&(typeof r.entryId!=`string`||!r.entryId||r.entryId.length>128)||!(`offset`in r)||typeof r.offset!=`number`||!Number.isFinite(r.offset)||Math.abs(r.offset)>1e6||!(`scrollTop`in r)||typeof r.scrollTop!=`number`||!Number.isFinite(r.scrollTop)||r.scrollTop<0||!(`pinned`in r)||typeof r.pinned!=`boolean`||e.set(n,{position:{key:r.key,offset:r.offset,...`entryId`in r&&typeof r.entryId==`string`?{entryId:r.entryId}:{},scrollTop:r.scrollTop,pinned:r.pinned}})}}catch{}return e.persist=()=>{try{localStorage.setItem(nK,JSON.stringify([...e].flatMap(([e,t])=>t.position?.key?[[e,{key:t.position.key,entryId:t.position.entryId,offset:t.position.offset,scrollTop:t.position.scrollTop,pinned:t.position.pinned}]]:[])))}catch{}},e}function iK(e){return JSON.stringify([e?.id,e?.path])}function aK(e,t,n){let r={...e.get(t),...n};e.delete(t),e.set(t,r),e.size>4&&e.delete(e.keys().next().value),e.persist?.()}var oK=500,sK=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)$/u;function cK(e){let t=[],n=e=>{t.push({id:t.length,...e})},r=0,i=0,a=!1,o=0,s=0,c=e.split(` -`);c.at(-1)===``&&c.pop();for(let e of c){let t=sK.exec(e);if(t){r=Number(t[1]),i=Number(t[3]),o=t[2]===void 0?1:Number(t[2]),s=t[4]===void 0?1:Number(t[4]),a=!0,n({kind:`meta`,marker:``,code:t[5]?.trim()||e});continue}if(!a){if(!e||e.startsWith(`diff --git `)||e.startsWith(`index `)||e.startsWith(`--- `)||e.startsWith(`+++ `)||e.startsWith(`new file mode `)||e.startsWith(`deleted file mode `))continue;n({kind:`meta`,marker:``,code:e});continue}if(e.startsWith(`+`)&&s>0){n({kind:`added`,newLine:i,marker:`+`,code:e.slice(1)}),i+=1,--s;continue}if(e.startsWith(`-`)&&o>0){n({kind:`removed`,oldLine:r,marker:`-`,code:e.slice(1)}),r+=1,--o;continue}if(e.startsWith(`\\ No newline`)){n({kind:`meta`,marker:``,code:e});continue}if(!e.startsWith(` `)||o<=0||s<=0){a=!1,n({kind:`meta`,marker:``,code:e});continue}n({kind:`context`,oldLine:r,newLine:i,marker:` `,code:e.startsWith(` `)?e.slice(1):e}),r+=1,i+=1,--o,--s}return t}function lK({file:e,onReferenceLine:t}){let{t:n}=W(),r=(0,K.useMemo)(()=>cK(e.diff),[e.diff]),i=r.slice(0,oK),a=(0,K.useRef)(null),[o,s]=(0,K.useState)(`unified`),c=o===`split`&&!e.binary,[l,u]=(0,K.useState)(null),d=l?.file===e?l.id:void 0,f=(n,i)=>{let a=i??(n.newLine===void 0?`old`:`new`),o=a===`new`?n.newLine:n.oldLine;if(!(!t||e.binary||!o||o<1||!Number.isSafeInteger(o)||e.diffTruncated&&!e.diff.endsWith(` +`,t),i=-1;if(n!==-1&&r!==-1?i=n20?`${e.slice(0,20)}…`:e}"`,{type:`unknown-field`,field:e,value:t,line:n}))}}function T(){u!==void 0&&a?.(u),f>0&&i?.({id:u,event:p,data:d}),u=void 0,d=``,f=0,p=void 0}function E(e={}){if(e.consume&&s.length>0){let e=s.join(``);C(e,0,e.length)}l=!0,u=void 0,d=``,f=0,p=void 0,s.length=0,c=0,m=!1,h=!1,g=!1}return{feed:_,reset:E}}function vG(e,t,n){return n===100&&e.charCodeAt(t+1)===97&&e.charCodeAt(t+2)===116&&e.charCodeAt(t+3)===97&&e.charCodeAt(t+4)===58}function yG(e,t,n){return n===101&&e.charCodeAt(t+1)===118&&e.charCodeAt(t+2)===101&&e.charCodeAt(t+3)===110&&e.charCodeAt(t+4)===116&&e.charCodeAt(t+5)===58}function bG(e,t){let n=1;for(;nt.abort();e.signal.addEventListener(`abort`,n,{once:!0}),e.signal.aborted&&n();let r=window.setTimeout(n,45e3),i=await fetch(`/events?cursor=${e.cursor}`,{headers:await e.client.headers(),signal:t.signal}).finally(()=>{window.clearTimeout(r),e.signal.removeEventListener(`abort`,n)});if(i.status===409)throw new xG(`event replay expired`);if(!i.ok||!i.body)throw Error(`event connection failed`);e.onConnected();let a=e.cursor,o=0,s=_G({onComment(t){t.trim()===`heartbeat`&&++o>=4&&(o=0,e.onHeartbeat?.())},onEvent(t){let n=JSON.parse(t.data);if(!Number.isSafeInteger(n.sequence))throw new xG(`invalid event cursor`);if(!(n.sequence<=a)){if(n.sequence!==a+1)throw new xG(`event cursor gap`);if(a=n.sequence,n.type===`state_invalidated`)throw new xG(`state invalidated`);e.onEvent(n)}}}),c=i.body.getReader(),l=new TextDecoder;try{for(;!e.signal.aborted;){let t,n,r=c.read(),i=new Promise((r,i)=>{n=()=>i(Error(`event stream aborted`)),e.signal.addEventListener(`abort`,n,{once:!0}),window.addEventListener(`offline`,n,{once:!0}),(e.signal.aborted||navigator.onLine===!1)&&n(),t=window.setTimeout(()=>i(Error(`event stream stalled`)),45e3)}),{done:a,value:o}=await Promise.race([r,i]).finally(()=>{window.clearTimeout(t),n&&(e.signal.removeEventListener(`abort`,n),window.removeEventListener(`offline`,n))});if(a)throw Error(`event connection closed`);s.feed(l.decode(o,{stream:!0}))}}finally{await c.cancel().catch(()=>void 0)}}function CG({client:e,get:t,set:n,getEpoch:r,showError:i,scheduleSnapshotRefresh:a}){let o=null,s=0,c=!1,l=0,u=0,d=0,f=null,p=-1,m=()=>{u++,f=null,d=0,p=-1},h=()=>{let e=t().snapshot;if(!e)return;f&&p!==r()&&m();let i=e.thinking;if(i){if(!f||i.revision>=d){f=i,d=i.revision,p=r();return}i!==f&&n({snapshot:{...e,thinking:f}})}},g=e=>{f&&p!==r()&&m(),e&&e.revision>=d&&(f=e,d=e.revision,p=r()),h()},_=()=>{o=null,s++,l++,c=!1,n({thinkingPendingLevel:null})},v=async()=>{let n=u,i=l,a=r(),o=t().snapshot?.selectedSession?.id,s=t().selectedPath;if(o)try{let c=await e.thinking(o,new AbortController().signal);if(n!==u||i!==l||a!==r()||s!==t().selectedPath||o!==t().snapshot?.selectedSession?.id)return;g(c)}catch{}},y=async()=>{if(c)return;c=!0;let d=++l;try{for(;o!==null;){let c=o,f=s,p=u,m=r(),h=t().snapshot?.selectedSession?.id,y=t().selectedPath;if(!h||!y||h!==t().snapshot?.currentSessionId||y!==t().snapshot?.selectedSession?.path||t().modelSelectionPending){_();return}let b;try{b=await e.setThinkingLevel(h,c,y)}catch(e){if(d!==l||m!==r()||y!==t().selectedPath||h!==t().snapshot?.selectedSession?.id)return;if(p!==u||f!==s)continue;_(),i(e),v();return}if(d!==l||m!==r()||y!==t().selectedPath||h!==t().snapshot?.selectedSession?.id)return;if(p===u&&f===s){if(b.level!==c){_(),i(Error(Xl.t(`thinkingNotConfirmed`)));return}g(b),o=null,n({thinkingPendingLevel:null}),a();return}}}finally{d===l&&(c=!1)}};return{select:e=>{let r=t(),i=r.snapshot?.thinking,a=r.snapshot?.selectedSession?.id;!e||!i?.supported||r.sessionSwitching||r.modelSelectionPending||r.workspaceDraft||!a||!HD(r.snapshot)||a!==r.snapshot?.currentSessionId||r.selectedPath!==r.snapshot?.selectedSession?.path||r.liveRunning||r.snapshot?.runtime.status===`running`||e!==(r.thinkingPendingLevel??i.level)&&(o=e,s++,n({thinkingPendingLevel:e}),y())},accept:g,resetPending:_,resetGate:m}}var wG=`openpi.collapsed-workspaces`,TG=`openpi.sidebar-collapsed`,EG=new Set(`agent_start.turn_started.turn_settled.agent_settled.prompt_settled.message_end.tool_execution_end.session_start.session_switched.session_progress.queue_update.prompt_failed.prompt_discarded.model_select.settings_changed.workspace_imported.workspace_removed.workspace_renamed.session_renamed.session_archived.session_unarchived.session_pins_changed.sidebar_pins_changed.workspace_order_changed.session_order_changed.session_read_state_changed.session_created.session_forked.session_deleted.prompt_accepted.runtime_changed.questions_changed.command_feedback.command_submitted.plan_mode_changed`.split(`.`));function DG(e){try{let t=JSON.parse(window.sessionStorage.getItem(e)||`[]`);return new Set(Array.isArray(t)?t.filter(e=>typeof e==`string`):[])}catch{return new Set}}function OG(e){try{return window.sessionStorage.getItem(e)===`true`}catch{return!1}}function kG(e,t){try{window.sessionStorage.setItem(e,JSON.stringify(t))}catch{}}function AG(e){let t=8,n=[];for(let r=e.length-1;r>=0;r--){let i=e[r];(i.optimistic||t-->0)&&n.push(i)}return n.reverse()}var jG=1e3,MG=new Set,NG=new WeakMap;function PG(e){if(e){if(e.role===`toolResult`&&e.toolCallId)return`tool-result-${e.toolCallId}`;if(e.timestamp!==void 0)return`message-${e.role}-${e.timestamp}`}}function FG(e){return e?.parts?.some(e=>e.type===`thinking`)===!0}function IG(e){if(!e)return MG;let t=NG.get(e);if(t)return t;let n=new Set;for(let t of e){if(!FG(t.message))continue;n.add(t.id);let e=PG(t.message);e&&n.add(e)}return NG.set(e,n),n}function LG(e,t){for(let n of Object.keys(e))if(!t.has(n)){let n={};for(let r of Object.keys(e))t.has(r)&&(n[r]=e[r]);return n}return e}function RG(e,t){if(e.length!==t.length)return!1;for(let n=0;ne.optimistic?.sessionId===t?.id&&e.optimistic?.sessionPath===t?.path&&e.optimistic!==void 0)}function BG(e,t,n,r){return e.map(e=>e.optimistic?.sessionId===t&&e.optimistic.sessionPath===n&&e.optimistic.commandId===r&&!e.optimistic.admitted?{...e,optimistic:{...e.optimistic,admitted:!0}}:e)}function VG(e,t){return t.aborted?Promise.resolve():new Promise(n=>{let r=()=>{window.clearTimeout(i),t.removeEventListener(`abort`,r),n()},i=window.setTimeout(r,e);t.addEventListener(`abort`,r,{once:!0})})}function HG(e){return/^\/(?![\\/])/u.test(e)||/^[a-z]:[\\/]/iu.test(e)||/^\\\\(?![?.]\\)[^\\/]+\\[^\\/]+\\/u.test(e)||/^\/\/[^\\/]+\/[^\\/]+\//u.test(e)}function UG(e=new de,t={}){let n=t.consumeEvents??SG,r=new URLSearchParams(window.location.search),i=r.get(`sessionPath`),a=r.get(`sessionId`),o=i!==null||a!==null,s=i&&HG(i)&&i.length<=4096&&a&&a.length<=128&&!/[\u0000-\u001f\u007f]/u.test(i+a)&&r.getAll(`sessionPath`).length===1&&r.getAll(`sessionId`).length===1?{path:i,id:a}:null,c=0,l=0,u=null,d=!1,f=new Map,p=0,m=0,h=0,g=null,_=0,v=null,y=null,b=null,x=null,S=Promise.resolve(),C=null,w=null,T=!1,E=!1,D=null,O=null,k=null,A=0,j=null,M=0,N=0,P=new Set,F=new Set,I=[],ee=null,L=(e,t)=>{if(typeof t==`string`)for(e.add(t);e.size>32;){let t=e.values().next().value;t&&e.delete(t)}},R=e=>ee&&(e?.sessionId!==ee.sessionId||e.commandId!==ee.commandId||e.epoch!==ee.epoch||e.sessionPath!==void 0&&ee.sessionPath!==void 0&&e.sessionPath!==ee.sessionPath)?(ee=null,{turnCancellationPending:!1}):{},te=()=>(ee=null,N++,I=[],h=0,{planSelectionPending:!1,activeTurn:null,turnCancellationPending:!1,turnTerminalStatus:null,pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,liveMessages:[],liveRunning:!1,livePhase:`idle`,liveRetry:null,thinkingStarts:{},thinkingDurations:{}}),z=(e,t=null)=>(h=e,{liveRetry:t}),B=e=>{let t=I.indexOf(e);for(t>=0&&I.splice(t,1),I.push(e);I.length>jG;)I.shift()},ne=(e,t,n,r)=>{let i=IG(t);I.some(e=>i.has(e))&&(I=I.filter(e=>!i.has(e)));let a=new Set(i);for(let t of e){a.add(t.key);let e=PG(t.message);e&&a.add(e)}for(let e of I)a.add(e);let o=LG(n,a),s=LG(r,a);return o===n&&s===r?null:{thinkingStarts:o,thinkingDurations:s}},re=()=>(A++,k?.abort(),k=null,{modelSearch:{query:``,status:`idle`,models:[],totalMatches:0,matchesOmitted:0,error:null}}),V=()=>({sessionId:null,status:`idle`,commands:[],totalAvailable:0,commandsOmitted:0,error:null}),ie=(e,t)=>({liveRunning:t===`running`||!e,livePhase:t===`running`?`running`:e?`idle`:`preparing`});return eu((t,r)=>{let i=e=>{g=null,t({notice:e instanceof Error?e.message:String(e)})},a=e=>{let t=r().snapshot;return e.epoch===c&&r().selectedWorkspace===e.workspacePath&&t?.currentSessionId===e.sessionId&&HD(t)&&t.selectedSession?.id===e.sessionId&&r().selectedPath===t.selectedSession.path&&t.selectedSession.cwd===e.workspacePath&&(!e.sessionPath||t.selectedSession.path===e.sessionPath)},I=()=>{M++,j?.abort(),j=null,t({commandDiscovery:V()})},ae=async(n,a,o,s)=>{if(r().modelSelectionPending)return!1;t({modelSelectionPending:!0});try{let i=await e.selectModel(n.provider,n.id,o,s);if(a!==c||s!==r().selectedPath||o!==r().snapshot?.selectedSession?.id)return!1;if(i.provider!==n.provider||i.id!==n.id||!i.current)throw Error(`Model selection was not confirmed. Please select a model again.`);let l=p,u=await r().actions.refreshSnapshot({epoch:a});if(!u&&a===c&&s===r().selectedPath&&o===r().snapshot?.selectedSession?.id&&p>l+1&&(u=await r().actions.refreshSnapshot({epoch:a})),!u||a!==c||s!==r().selectedPath||o!==r().snapshot?.selectedSession?.id)return!1;let d=r().snapshot?.models.find(e=>e.current);if(d?.provider!==n.provider||d.id!==n.id)throw Error(`The Session model changed. Please select a model again.`);return t({draftModel:null,notice:null}),!0}catch(e){return a===c&&s===r().selectedPath&&o===r().snapshot?.selectedSession?.id&&i(e),!1}finally{a===c&&t({modelSelectionPending:!1})}},oe=(e=160)=>{if(T){E=!0;return}w===null&&(w=window.setTimeout(async()=>{w=null,T=!0;try{await r().actions.refreshSnapshot()}finally{T=!1,E&&(E=!1,oe())}},e))},se=CG({client:e,get:r,set:t,getEpoch:()=>c,showError:i,scheduleSnapshotRefresh:oe}),ce=e=>{let n=r(),i=e.detail??{},a=i.sessionId,o=[`session_start`,`session_switched`,`session_created`].includes(e.type);if(n.cursor!==null&&e.sequence<=n.cursor)return;t({cursor:e.sequence});let s=n.promptAdmissionRecovery,l=s?.commandId,u=n.snapshot?.selectedSession,d=u?.id===a&&u?.path===n.selectedPath&&(i.sessionPath===void 0||i.sessionPath===u?.path);if(d&&s?.sessionId===u?.id&&s?.sessionPath===u?.path&&typeof i.commandId==`string`&&i.commandId===l&&[`prompt_accepted`,`prompt_failed`,`prompt_settled`,`turn_started`,`turn_settled`].includes(e.type)){let r=e.type!==`prompt_failed`;t({promptAdmissionRecovery:null,promptAdmissionResolution:s?{sessionId:s.sessionId,sessionPath:s.sessionPath,commandId:s.commandId,content:s.content,images:s.images}:n.promptAdmissionResolution,liveMessages:r&&s&&!s.delivery?.retryEntryId&&!n.liveMessages.some(e=>e.key===s.optimisticKey)?AG([...n.liveMessages,{key:s.optimisticKey,timestamp:s.timestamp??e.timestamp,optimistic:{sessionId:s.sessionId,sessionPath:s.sessionPath,commandId:s.commandId,afterEntryId:s.afterEntryId??null,admitted:e.type===`prompt_accepted`},message:{role:`user`,content:s.content}}]):n.liveMessages})}if(e.type===`prompt_accepted`&&d&&u&&typeof i.commandId==`string`&&t({liveMessages:BG(r().liveMessages,u.id,u.path,i.commandId)}),n=r(),(e.type===`runtime_changed`||e.type===`settings_changed`)&&t(re()),e.type===`runtime_changed`&&I(),n.sessionSwitching&&!o){oe();return}if(typeof a==`string`&&a!==n.snapshot?.currentSessionId&&!o){oe();return}if([`auto_retry_start`,`auto_retry_end`].includes(e.type)&&typeof i.sessionPath==`string`&&i.sessionPath!==(n.snapshot?.currentSessionPath??n.snapshot?.selectedSession?.path)){oe();return}if(!o&&(i.message||e.type.startsWith(`tool_execution_`))&&!HD(n.snapshot)){EG.has(e.type)&&oe();return}if(n.snapshot){let r=n.snapshot.runtime.liveTools??[],a=lG(r,e.type,i);a!==r&&t({snapshot:{...n.snapshot,runtime:{...n.snapshot.runtime,liveTools:a}}})}if(o){let o=i.commandId;if(typeof o==`string`&&F.has(o)){oe();return}let s=i.sessionPath,l=n.snapshot?.sessions.some(e=>e.path===s),u=!1;if(b?.kind===`select`?u=b.expectedPath===s:(b?.kind===`create`&&b.commandId===o&&e.type===`session_switched`&&typeof a==`string`&&(!b.expectedSessionId||b.expectedSessionId===a)&&(typeof s!=`string`||!l)||b?.kind===`create`&&b.commandId===o&&e.type===`session_created`&&typeof a==`string`&&(!b.expectedSessionId||a===b.expectedSessionId))&&(u=!0),u&&b?.epoch!==c)return;if(u)t({...te(),liveMessages:zG(n.liveMessages,n.snapshot?.selectedSession)});else{if(!b&&n.selectedPath&&n.snapshot?.selectedSession?.path===n.selectedPath){I(),se.resetPending(),t({...te(),liveMessages:zG(n.liveMessages,n.snapshot.selectedSession),snapshot:{...n.snapshot,currentSessionId:void 0,currentSessionPath:void 0},modelSelectionPending:!1});let e=c;r().actions.refreshSnapshot({epoch:e});return}I();let e=++c;se.resetPending(),v=null,y=null,t({...te(),promptAdmissionPending:!1,promptAdmissionRecovery:null,selectedPath:typeof s==`string`?s:null,draftModel:n.workspaceDraft?n.draftModel:null,modelSelectionPending:!1,sessionSwitching:!0}),r().actions.refreshSnapshot({epoch:e}).then(n=>{e===c&&t({selectedPath:n?r().selectedPath:null,sessionSwitching:!1})})}}else if(e.type===`prompt_accepted`){let r=P.has(String(i.commandId??``));t({...ie(r,n.livePhase),...n.livePhase===`running`?{}:z(e.sequence),pendingFollowUpsReceipt:Number.isInteger(i.pendingFollowUps)?Number(i.pendingFollowUps):n.pendingFollowUpsReceipt,pendingSteeringReceipt:Number.isInteger(i.pendingSteering)?Number(i.pendingSteering):n.pendingSteeringReceipt})}else if(e.type===`turn_started`){m=e.sequence;let n={sessionId:String(i.sessionId),commandId:String(i.commandId),epoch:Number(i.epoch),...typeof i.sessionPath==`string`?{sessionPath:i.sessionPath}:{},...typeof i.promptEntryId==`string`?{promptEntryId:i.promptEntryId}:{},...typeof i.startedAt==`number`?{startedAt:i.startedAt}:{},...typeof i.elapsedMs==`number`?{elapsedMs:i.elapsedMs}:{}};t({...R(n),activeTurn:n,liveRunning:!0,livePhase:`running`,...z(e.sequence),turnTerminalStatus:null})}else if(e.type===`agent_start`){m=e.sequence;let n=i.activeTurn;t({...n?{...R(n),activeTurn:n}:{},liveRunning:!0,livePhase:`running`,...z(e.sequence)})}else if(e.type===`turn_settled`){L(P,i.commandId);let r=n.activeTurn;r?.sessionId===i.sessionId&&r?.commandId===i.commandId&&r?.epoch===i.epoch&&(m=e.sequence,t({...R(null),activeTurn:null,liveRunning:!1,livePhase:`idle`,...z(e.sequence),turnTerminalStatus:typeof i.outcome==`string`?i.outcome:null}))}else if(e.type===`agent_settled`)n.activeTurn||(m=e.sequence),t({pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,...z(e.sequence),...n.activeTurn?{}:{liveRunning:!1,livePhase:`idle`}});else if(e.type===`prompt_settled`)L(P,i.commandId),n.livePhase!==`running`&&t({liveRunning:!1,livePhase:`idle`,...z(e.sequence)});else if(i.message&&typeof i.message==`object`){let r=i.message,a=n.liveMessages,o=typeof i.messageKey==`string`?i.messageKey:`${r.role||`message`}-${e.sequence}`,s={key:o,message:r},c=a.findIndex(e=>e.key===o);a=c>=0?a.map((e,t)=>t===c?s:e):AG([...a,s]);let l=!RG(n.liveMessages,a),u=n.thinkingStarts,d=n.thinkingDurations,f=!1;if(r.parts?.some(e=>e.type===`thinking`)&&(u[o]===void 0&&(u={...u,[o]:Date.now()},f=!0),e.type===`message_end`)){let e=PG(r),t=Date.now()-u[o];d={...d,[o]:t},e&&(d[e]=t),B(e??o),f=!0}if(f||l){let e=ne(a,n.snapshot?.selectedSession?.entries,u,d);e&&(u=e.thinkingStarts,d=e.thinkingDurations,f=!0)}t({liveMessages:a,...f?{thinkingStarts:u,thinkingDurations:d}:{}})}if(e.type===`prompt_discarded`&&typeof i.commandId==`string`&&(L(P,i.commandId),t({liveMessages:r().liveMessages.filter(e=>e.optimistic?.commandId!==i.commandId)})),e.type===`prompt_failed`){L(P,i.commandId);let a=typeof i.commandId==`string`&&n.activeTurn?.commandId===i.commandId;t({liveMessages:r().liveMessages.filter(e=>!e.optimistic||e.optimistic.commandId!==i.commandId),...a||n.livePhase!==`running`?{liveRunning:!1,livePhase:`idle`,...z(e.sequence)}:{},notice:typeof i.error==`string`?i.error:`Prompt failed`})}if(e.type===`auto_retry_start`&&(m=e.sequence,t({liveRunning:!0,livePhase:`running`,...z(e.sequence,{...typeof i.attempt==`number`?{attempt:i.attempt}:{},...typeof i.maxAttempts==`number`?{maxAttempts:i.maxAttempts}:{},...typeof i.errorMessage==`string`?{errorMessage:i.errorMessage}:{}})})),e.type===`auto_retry_end`&&t(z(e.sequence)),e.type===`thinking_level_changed`){let t=r().snapshot?.thinking;t&&typeof i.level==`string`&&se.accept({...t,level:i.level,revision:e.sequence})}EG.has(e.type)&&oe()},le=async i=>{let a=500,o=!1;for(;!i.aborted;){let s=!1;try{if(r().cursor===null){if(s=!0,!await r().actions.refreshSnapshot({resetCursor:!0}))throw Error(`snapshot unavailable`);s=!1}if(i.aborted)return;let c={signal:i,connected:!1};O=c;let l=()=>O===c&&!i.aborted;try{await n({client:e,cursor:r().cursor??0,onConnected:()=>{l()&&(c.connected=!0,a=500,t({connection:`connected`}),o&&(o=!1,oe(0)))},onEvent:e=>{l()&&ce(e)},onHeartbeat:()=>{l()&&oe(0)},signal:i})}finally{O===c&&(O=null)}}catch(e){if(i.aborted)return;t({connection:`reconnecting`});let n=!s&&await r().actions.refreshSnapshot({resetCursor:!0});if(i.aborted)return;o=!n,n||t(te()),await VG(a,i),a=Math.min(a*2,5e3),e instanceof SyntaxError&&t({notice:`Invalid event data`})}}},H={rememberPromptProjection(e,n,i){let a=r(),o=a.snapshot?.selectedSession;if(a.selectedPath!==n||o?.id!==e||o.path!==n)return;let s=new Set(o.entries.map(e=>e.id)),c=new Set(a.liveMessages.flatMap(t=>t.optimistic?.sessionId===e&&t.optimistic.sessionPath===n&&t.optimistic.projectedEntryId?[t.optimistic.projectedEntryId]:[])),l=new Map(i.map(e=>[e.key,e.entryId])),u=!1,d=a.liveMessages.map(t=>{let r=l.get(t.key);return!r||!s.has(r)||c.has(r)||t.optimistic?.sessionId!==e||t.optimistic.sessionPath!==n||!t.optimistic.admitted||t.optimistic.projectedEntryId?t:(u=!0,c.add(r),{...t,optimistic:{...t.optimistic,projectedEntryId:r},message:{role:`user`,content:``}})});u&&t({liveMessages:d})},setHistoryAnchor(e){let n=r().snapshot?.selectedSession;if(e&&(n?.id!==e.sessionId||n.path!==e.sessionPath))return;let i=r().historyAnchor;(i?.entryId!==e?.entryId||i?.sessionId!==e?.sessionId||i?.sessionPath!==e?.sessionPath)&&t({historyAnchor:e})},start(){D||(D=new AbortController,le(D.signal))},stop(){O=null,D?.abort(),D=null,w!==null&&window.clearTimeout(w),w=null,se.resetPending(),I()},async refreshSnapshot(n={}){let a=n.epoch??c,o=++p,l=r().selectedPath;try{let i=r().historyAnchor,u=s?.path===l?s:null,d=u?await e.snapshot(l,void 0,u.id):i&&i.sessionPath===l?await e.snapshot(l,i):await e.snapshot(l);if(a!==c||o!==p)return!1;if(u&&(d.selectedSession?.id!==u.id||d.selectedSession.path!==u.path))throw new ge(Xl.t(`sessionLinkUnavailable`),409,`SESSION_CONFLICT`);u&&(s=null);let f=typeof d.currentSessionId==`string`,_=f?d.sessions.find(e=>HD(d,e)):void 0,v=f?HD(d):d.selectedSession===void 0,b=d.selectedSession?d.sessions.some(e=>e.id===d.selectedSession.id&&e.path===d.selectedSession.path):!f,x=!l||d.sessions.some(e=>e.path===l),S=!l||d.selectedSession?.path===l;if(!x||!S||!b||!l&&!v)return t({selectedPath:null}),!n.canonicalRetry&&H.refreshSnapshot({...n,canonicalRetry:!0,epoch:a});let C=d.selectedSession?.cwd,w=d.workspaces.find(e=>e.current)?.path,T=d.workspaces.some(e=>e.path===r().selectedWorkspace)?r().selectedWorkspace:void 0,E=r().workspaceDraft?r().selectedWorkspace:C??w??T??null,D=n.resetCursor;r().snapshot?.selectedSession?.path!==d.selectedSession?.path&&(se.resetPending(),se.resetGate()),D&&se.resetGate();let k=r().snapshot?.currentSessionId,A=r().snapshot?.sessions.find(e=>HD(r().snapshot,e)),j=k!==d.currentSessionId||A?.path!==_?.path,M=r().snapshot?.selectedSession?.id!==d.selectedSession?.id||r().snapshot?.selectedSession?.path!==d.selectedSession?.path,N=r().collapsed;if(M&&!r().workspaceDraft&&d.selectedSession){let e=d.sessions.find(e=>e.id===d.selectedSession.id&&e.path===d.selectedSession.path),t=e?.workspacePath??d.selectedSession.cwd;!e?.archived&&!e?.ungrouped&&N.has(t)&&(N=new Set(N),N.delete(t),kG(wG,[...N]))}let P=r().snapshot,F=D||j||M||P?.currentSessionPath!==d.currentSessionPath||JSON.stringify(P?.models)!==JSON.stringify(d.models)||P?.truncation.modelsOmitted!==d.truncation.modelsOmitted;j&&(I(),se.resetPending(),se.resetGate());let ee=g!==null&&r().notice===g;g=null,(D||j||M)&&(m=0);let L=m>d.cursor,z=L?r().activeTurn:d.runtime.activeTurn??null,B=!D&&!j&&!M&&h>d.cursor,V=d.selectedExecution,ie=v&&d.runtime.status===`running`&&V?.sessionId===d.selectedSession?.id&&V?.sessionPath===d.selectedSession?.path&&V?.status===`running`?V.retry??null:null,ae=B?r().liveRetry:ie;if(t({...ee?{notice:null}:{},...D||j||M?{...te(),liveMessages:zG(r().liveMessages,d.selectedSession)}:{},connection:O?.connected&&!O.signal.aborted?`connected`:r().connection,cursor:D||r().cursor===null?d.cursor:Math.max(r().cursor??0,d.cursor),...R(z),activeTurn:z,livePhase:L?r().livePhase:d.runtime.status===`running`?`running`:!r().promptAdmissionPending&&!y?`idle`:r().livePhase,liveRetry:ae,liveRunning:L?r().liveRunning:d.runtime.status===`running`?!0:!r().promptAdmissionPending&&!y?!1:r().liveRunning,selectedPath:d.selectedSession?.path??null,selectedWorkspace:E,collapsed:N,snapshot:d,...F?re():{}}),B||(h=d.cursor),!(D||j||M)){let e=ne(r().liveMessages,d.selectedSession?.entries,r().thinkingStarts,r().thinkingDurations);e&&t(e)}return se.accept(),!0}catch(e){if(a!==c||o!==p)return!1;if(s?.path===l&&e instanceof ge&&[400,404,409].includes(e.status)){s=null,t({selectedPath:null,workspaceDraft:!0});let e=await H.refreshSnapshot({...n,epoch:a});return a===c&&t({notice:Xl.t(`sessionLinkUnavailable`)}),e}t({connection:`unavailable`}),i(e);let u=r().notice;return g=typeof u==`string`?u:null,!1}},async chooseWorkspace(){let t=c;try{let n=await e.chooseWorkspace();if(t!==c||n.cancelled||!n.path)return;H.setWorkspace(n.path),await H.refreshSnapshot()}catch(e){t===c&&i(e)}},setWorkspace(e){let n=r();e===n.selectedWorkspace&&!n.sessionSwitching||(++c,x=null,se.resetPending(),I(),v=null,y=null,t({...te(),...re(),selectedWorkspace:e,createdSession:null,workspaceDraft:!0,sessionSwitching:!1,modelSelectionPending:!1,promptAdmissionPending:!1,promptAdmissionRecovery:null,notice:null}))},async renameWorkspace(t,n){try{await e.renameWorkspace(t,n),await H.refreshSnapshot()}catch(e){throw i(e),e}},async removeWorkspace(n){try{return await e.removeWorkspace(n),r().selectedWorkspace===n&&I(),r().workspaceDraft&&r().selectedWorkspace===n&&t({selectedWorkspace:null}),await H.refreshSnapshot(),!0}catch(e){return i(e),!1}},async prepareSession(){if(r().sessionSwitching||r().modelSelectionPending)return null;r().selectedWorkspace||await H.chooseWorkspace();let e=r(),t=e.selectedWorkspace;if(!t||e.sessionSwitching||e.modelSelectionPending)return null;let n=e.snapshot?.selectedSession;if(!e.workspaceDraft&&n){if(e.selectedPath!==n.path||n.cwd!==t)return null;let r={epoch:c,sessionId:n.id,sessionPath:n.path,workspacePath:t};return!HD(e.snapshot)&&!await H.selectSession(n.path,n.id)?null:a(r)?r:null}return H.createSession(t)},async createSession(n){if(!n||r().modelSelectionPending)return null;let o=++c;se.resetPending(),I();let s=(x?.workspacePath===n?x.commandId:void 0)??globalThis.crypto?.randomUUID?.()??`web-create-${Date.now()}-${o}`;x={workspacePath:n,commandId:s},v=null,y=null,t({...te(),...re(),mobileSidebarOpen:!1,promptAdmissionPending:!1,promptAdmissionRecovery:null,selectedPath:null,selectedWorkspace:n,createdSession:null,workspaceDraft:!0,sessionSwitching:!0});let l=null,u=S.then(async()=>{if(o===c){b={commandId:s,epoch:o,expectedPath:null,kind:`create`};try{let u=await e.createSession(n,s);if(o!==c)return;if(u.cancelled||u.commandId!==s||typeof u.sessionId!=`string`||!u.sessionId||u.sessionId.length>128||u.sessionPath!==void 0&&!u.sessionPath)throw Error(`Session creation did not return a valid target identity.`);let d={epoch:o,sessionId:u.sessionId,sessionPath:u.sessionPath??null,workspacePath:n};b?.epoch===o&&(b.expectedSessionId=d.sessionId,b.expectedPath=d.sessionPath),t({selectedPath:d.sessionPath});let f=await H.refreshSnapshot({epoch:o});if(!f&&o===c&&(f=await H.refreshSnapshot({epoch:o})),o!==c)return;if(!f)throw Error(`The created Session could not be confirmed. Please try again.`);if(!a(d)){x=null,i(Error(`The created Session is no longer active in the selected workspace. Please try again.`));return}let p=r().selectedPath;if(!p)return;d.sessionPath=p,t({workspaceDraft:!1,createdSession:d,notice:null});let m=r().draftModel;if(m&&!await ae(m,o,d.sessionId,p))return;if(r().workspaceDraft||!a(d)){x=null,i(Error(`The created Session is no longer active in the selected workspace. Please try again.`));return}l=d,x=null}catch(e){if(o!==c)return;t({selectedPath:null}),i(e),await H.refreshSnapshot({epoch:o})}finally{L(F,s),b?.epoch===o&&(b=null),o===c&&t({sessionSwitching:!1})}}});return S=u.catch(()=>void 0),await u,o===c?l:null},async selectSession(n,a){if(!n)return!1;let o=r();if(C?.path===n&&C.epoch===c){let e=C;t({mobileSidebarOpen:!1});let i=await e.promise,o=r();return i&&e.epoch===c&&o.selectedPath===n&&o.snapshot?.selectedSession?.path===n&&(!a||o.snapshot.selectedSession.id===a)&&!o.workspaceDraft&&HD(o.snapshot)}if(!o.workspaceDraft&&!o.sessionSwitching&&o.selectedPath===n&&o.snapshot?.selectedSession?.path===n&&(!a||o.snapshot.selectedSession.id===a)&&HD(o.snapshot))return t({mobileSidebarOpen:!1}),!0;x=null;let s=!o.workspaceDraft&&o.selectedPath===n&&o.snapshot?.selectedSession?.path===n;I(),t({...re(),workspaceDraft:!1,...s?{}:{draftModel:null,createdSession:null},modelSelectionPending:!1});let l=s?c:++c;se.resetPending(),s||(v=null,y=null),t({...te(),liveMessages:s?zG(o.liveMessages,o.snapshot?.selectedSession):[],mobileSidebarOpen:!1,promptAdmissionPending:s?o.promptAdmissionPending:!1,promptAdmissionRecovery:s?o.promptAdmissionRecovery:null,selectedPath:n,sessionSwitching:!0});let u=S.then(async()=>{if(l!==c)return!1;b={epoch:l,expectedPath:n,kind:`select`};try{let i=await(a?e.selectSession(n,a):e.selectSession(n));if(l!==c)return!1;if(i.cancelled)return s||t({selectedPath:null}),await H.refreshSnapshot({epoch:l}),!1;let o=await H.refreshSnapshot({epoch:l});return l===c&&(!o&&!s&&t({selectedPath:null}),o&&r().selectedPath===n&&r().snapshot?.selectedSession?.path===n&&(!a||r().snapshot?.selectedSession?.id===a)&&!r().workspaceDraft&&HD(r().snapshot))}catch(e){return l===c&&(s||t({selectedPath:null}),i(e),await H.refreshSnapshot({epoch:l}),!1)}finally{b?.epoch===l&&(b=null),l===c&&t({sessionSwitching:!1})}});S=u.then(()=>void 0,()=>void 0),C={path:n,epoch:l,promise:u};try{return await u}finally{C?.promise===u&&(C=null)}},async navigateToMessage(n,i){let a=++l;try{if(i?.aborted||await H.selectSession(n.sessionPath)===!1)return!1;let o=c,s=r().snapshot?.selectedSession;if(i?.aborted||a!==l||r().sessionSwitching||s?.id!==n.sessionId||s.path!==n.sessionPath)return!1;let u=await e.sessionMessageWindow(n,i);if(i?.aborted||a!==l||o!==c)return!1;let d=r().snapshot?.selectedSession;return d?.id!==n.sessionId||d.path!==n.sessionPath||u.id!==n.sessionId||u.path!==n.sessionPath||u.history?.anchorEntryId!==n.entryId||u.history.anchorOnBranch!==!0||!u.entries.some(e=>e.id===n.entryId)?!1:(t({historyNavigation:{...n,session:u,revision:(r().historyNavigation?.revision??0)+1}}),!0)}catch{return!1}},async editMessage(e,t){return H.forkMessage(e,{mode:`edit`,content:t})},async regenerateMessage(e){return H.forkMessage(e,{mode:`regenerate`})},acknowledgeRestoredPromptDraft(e){r().restoredPromptDraft?.commandId===e&&t({restoredPromptDraft:null})},async cancelSessionFork(){let n=u;if(!n||n.scope!==`conversation`||!r().sessionForkPending||r().sessionForkCancellation)return;let a=c;t({sessionForkCancellation:`requesting`});try{let i=await e.cancelSessionFork({commandId:n.commandId,sessionId:n.sessionId,sessionPath:n.sessionPath});u===n&&r().sessionForkPending&&(t({sessionForkCancellation:i.state===`not-found`?null:i.state}),i.state===`not-found`&&t({notice:Xl.t(`sidebarForkCancelUnconfirmed`)}))}catch(e){a===c&&r().sessionForkPending&&(t({sessionForkCancellation:null}),i(e))}},async forkConversation(e,t,n=`local`){return r().sessionForkPending||r().sessionSwitching||d||!await H.selectSession(e,t)?!1:H.forkMessage({scope:`conversation`,sessionPath:e,sessionId:t,environment:n})},async forkMessage(n,i){let a=`scope`in n&&n.scope===`conversation`;if(a&&i||i?.mode===`edit`&&(!i.content.trim()||i.content.length>12e3))return!1;let o=r(),s=o.snapshot?.selectedSession;if(o.sessionForkPending||d)return!1;if(!s||o.workspaceDraft||o.sessionSwitching||o.promptAdmissionPending||o.promptAdmissionRecovery||!a&&(o.liveRunning||o.activeTurn||o.snapshot?.runtime.status!==`idle`)||o.modelSelectionPending||!HD(o.snapshot)||s.id!==n.sessionId||s.path!==n.sessionPath||o.selectedPath!==n.sessionPath||s.path.startsWith(`current:`))return t({notice:Xl.t(`forkSessionUnavailable`)}),!1;let f=`entryId`in n?n.entryId:void 0,p=u?.sessionId===n.sessionId&&u.sessionPath===n.sessionPath&&u.entryId===f&&u.scope===`conversation`===a&&(!a||u.scope===`conversation`&&(u.environment??`local`)===(n.environment??`local`))&&JSON.stringify(u.rerun)===JSON.stringify(i)?u:{sessionId:n.sessionId,sessionPath:n.sessionPath,...a?{scope:`conversation`,...n.environment===`worktree`?{environment:`worktree`}:{}}:{entryId:f,...i?{rerun:i}:{}},commandId:globalThis.crypto?.randomUUID?.()??`web-fork-${Date.now()}-${++l}`};u=p;let m=c,h=m;t({sessionForkPending:!0,sessionForkCancellation:null,sessionForkEnvironment:a?n.environment??`local`:void 0,notice:null});try{let o=await e.forkSession(p);if(m!==c||r().selectedPath!==n.sessionPath)return!1;if(o.commandId!==p.commandId||o.source.sessionId!==n.sessionId||o.source.sessionPath!==n.sessionPath||!a&&o.source.entryId!==f||!o.source.entryId)throw Error(Xl.t(`forkSessionUncertain`));if(o.state!==`forked`)return t({notice:[Xl.t(o.state===`cancelled`?`forkSessionCancelled`:`forkSessionUncertain`),o.reason,o.preservedWorktreePath?Xl.t(`sidebarForkWorktreePreserved`,{path:o.preservedWorktreePath}):void 0].filter(Boolean).join(` `)}),o.state===`cancelled`?u=null:await H.refreshSnapshot({epoch:m}),!1;if(!o.sessionId||!o.sessionPath||o.sessionId===n.sessionId||o.sessionPath===n.sessionPath)throw Error(Xl.t(`forkSessionUncertain`));let s=++c;h=s,y=null,v=null,se.resetPending(),I(),t({...te(),...re(),selectedPath:o.sessionPath,historyAnchor:null,historyNavigation:null,createdSession:null,draftModel:null,sessionSwitching:!0});let l=await H.refreshSnapshot({epoch:s});if(!l&&s===c&&r().selectedPath===o.sessionPath&&(l=await H.refreshSnapshot({epoch:s})),s!==c)return!1;let d=r().snapshot;if(o.replayed&&l&&d?.selectedSession?.id===o.sessionId&&d.selectedSession.path===o.sessionPath&&!HD(d)){if(l=await H.selectSession(o.sessionPath,o.sessionId)===!0,s!==c)return!1;d=r().snapshot}if(!l||r().selectedPath!==o.sessionPath||d?.selectedSession?.id!==o.sessionId||d.selectedSession.path!==o.sessionPath||!HD(d))return t({notice:Xl.t(`forkSessionUncertain`)}),!1;if(u=null,i){let e=o.prompt;if(!e||typeof e.content!=`string`||!Array.isArray(e.images))throw Error(Xl.t(`forkSessionUncertain`));t({sessionForkPending:!1,sessionSwitching:!1});let n=H.sendPrompt(e.content,e.images,void 0,void 0,{epoch:s,sessionId:o.sessionId,sessionPath:o.sessionPath,workspacePath:d.selectedSession.cwd}),i=[...r().liveMessages].reverse().find(e=>e.optimistic?.sessionId===o.sessionId&&e.optimistic?.sessionPath===o.sessionPath)?.optimistic?.commandId??p.commandId,a=await n;return s!==c||r().selectedPath!==o.sessionPath?!1:a?(t({notice:{kind:`success`,message:Xl.t(`messageRerunStarted`)}}),!0):(r().promptAdmissionRecovery||t({restoredPromptDraft:{sessionId:o.sessionId,sessionPath:o.sessionPath,commandId:i,content:e.content,images:e.images}}),!1)}return t({notice:{kind:`success`,message:Xl.t(`forkSessionCreated`)}}),!0}catch(e){return h===c&&(e instanceof ge&&[`SESSION_CONFLICT`,`SESSION_FORK_UNAVAILABLE`,`SESSION_FORK_CAPACITY`].includes(e.code??``)?(u=null,t({notice:a?e.message:Xl.t(`forkSessionUnavailable`)})):t({notice:Xl.t(`forkSessionUncertain`)})),!1}finally{t({sessionForkPending:!1,sessionForkCancellation:null,sessionForkEnvironment:void 0}),c===h&&h!==m&&r().sessionSwitching&&t({sessionSwitching:!1})}},async savePreferences(t){try{await e.savePreferences(t),await H.refreshSnapshot()}catch(e){throw i(e),e}},async renameSession(t,n){try{await e.renameSession(t,n),await H.refreshSnapshot()}catch(e){throw i(e),e}},async releaseSessionWorktree(t){let n=JSON.stringify([t.sessionId,t.sessionPath,t.worktreePath]),r=f.get(n);if(r?.pending)return r.pending;if(!r&&f.size>=128){let e=[...f].find(([,e])=>e.state===`preserved`&&!e.pending);if(e)f.delete(e[0]);else throw Error(Xl.t(`managedWorktreeRecoveryFull`))}let i={commandId:r?.state===`uncertain`?r.commandId:crypto.randomUUID(),state:`uncertain`,pending:void 0};return f.set(n,i),i.pending=(async()=>{try{let r=await e.releaseSessionWorktree({...t,commandId:i.commandId});if(r.commandId!==i.commandId||r.sessionId!==t.sessionId||r.sessionPath!==t.sessionPath||r.worktreePath!==t.worktreePath||![`removed`,`preserved`,`uncertain`].includes(r.state))throw Error(Xl.t(`managedWorktreeUncertain`));return r.state===`removed`?f.delete(n):i.state=r.state,r}finally{i.pending=void 0}})(),i.pending},async deleteSession(n,a,o){if(d||r().sessionForkPending||r().sessionSwitching)return!1;d=!0;let s=c;try{let i=await e.deleteSession({sessionPath:n,sessionId:a,commandId:o});if(i.commandId!==o||i.sessionId!==a||i.sessionPath!==n)throw Error(Xl.t(`sessionDeleteUncertain`));return i.state===`deleted`?(s===c&&r().selectedPath===n&&(++c,se.resetPending(),I(),v=null,y=null,t({...te(),...re(),selectedPath:null,historyAnchor:null,historyNavigation:null,workspaceDraft:!0,createdSession:null})),await H.refreshSnapshot(),t({notice:i.worktreeReleaseTarget?{kind:`success`,message:Xl.t(`managedWorktreeRetainedAfterDelete`,{path:i.worktreeReleaseTarget.worktreePath})}:i.metadataCleanupPending?Xl.t(`sessionDeleteMetadataPending`):{kind:`success`,message:Xl.t(`sessionDeleted`)}}),!0):(s===c&&(await H.refreshSnapshot({epoch:s}),t({notice:Xl.t(i.state===`cancelled`?`sessionDeleteCancelled`:`sessionDeleteUncertain`)})),!1)}catch(e){return s===c&&i(e),!1}finally{d=!1}},async setSessionPin(t,n,r,a){try{await e.setSessionPin(t,n,r,a),await H.refreshSnapshot()}catch(e){throw i(e),e}},async archiveSession(n){let a=r().snapshot?.sessions.find(e=>e.path===n);try{await e.archiveSession(n);let r={key:crypto.randomUUID(),path:n,sessionId:a?.id,title:ID(a??{},Xl.t(`untitledSession`))};t(e=>({archiveNotices:[r,...e.archiveNotices.filter(e=>e.path!==n)].slice(0,3)})),await H.refreshSnapshot()}catch(e){i(e)}},dismissArchiveNotice(e){t(t=>({archiveNotices:t.archiveNotices.filter(t=>t.key!==e)}))},async setSidebarPin(t,n,r){try{await e.setSidebarPin(t,n,r),await H.refreshSnapshot()}catch(e){throw i(e),e}},async setWorkspaceOrder(t,n){try{await e.setWorkspaceOrder(t,n),await H.refreshSnapshot()}catch(e){throw e instanceof ge&&e.code===`WORKSPACE_ORDER_CHANGED`&&await H.refreshSnapshot(),i(e),e}},async setSessionOrder(t,n,r){try{await e.setSessionOrder(t,n,r),await H.refreshSnapshot()}catch(e){throw i(e),e}},async setSessionRead(t,n,r,a){try{await e.setSessionRead(t,n,r,a),await H.refreshSnapshot()}catch(e){throw e instanceof ge&&e.code===`SESSION_READ_STATE_CHANGED`?await H.refreshSnapshot():i(e),e}},async unarchiveSession(n){let a=c,o=new Set(r().archiveNotices.filter(e=>e.path===n).map(e=>e.key)),s=()=>t(e=>({archiveNotices:e.archiveNotices.filter(e=>!o.has(e.key))}));try{if(await e.unarchiveSession(n),a!==c)return s(),!0;let t=p,r=await H.refreshSnapshot({epoch:a});!r&&a===c&&p>t+1&&(r=await H.refreshSnapshot({epoch:a}));let i=a!==c||r;return i&&s(),i}catch(e){return a===c&&i(e),!1}},async selectModel(e){let[n,...i]=e.split(`/`),a=i.join(`/`),o=r();if(!n||!a||o.sessionSwitching||o.modelSelectionPending||o.promptAdmissionPending||!o.workspaceDraft&&(o.liveRunning||o.snapshot?.runtime.status===`running`))return!1;let s=o.snapshot?.selectedSession?.id;if(o.workspaceDraft||!s&&!o.snapshot?.currentSessionId){let e=[...o.snapshot?.models??[],...o.modelSearch.models].find(e=>e.provider===n&&e.id===a);return e&&t({draftModel:e,notice:null}),!!e}return!s||!o.selectedPath||!HD(o.snapshot)||s!==o.snapshot?.currentSessionId||o.selectedPath!==o.snapshot?.selectedSession?.path?!1:(se.resetPending(),ae({provider:n,id:a},c,s,o.selectedPath))},async searchModels(n){let i=n.trim();if(!i){t(re());return}k?.abort();let a=new AbortController;k=a;let o=++A,s=c,l=r().snapshot?.currentSessionId;t({modelSearch:{query:i,status:`loading`,models:[],totalMatches:0,matchesOmitted:0,error:null}});try{let n=await e.searchModels(i,l,a.signal);if(a.signal.aborted||s!==c||o!==A)return;t({modelSearch:{query:i,status:`ready`,models:n.models,totalMatches:n.totalMatches,matchesOmitted:n.truncation.matchesOmitted,error:null}})}catch(e){if(a.signal.aborted||s!==c||o!==A)return;t({modelSearch:{query:i,status:`error`,models:[],totalMatches:0,matchesOmitted:0,error:e instanceof Error?e.message:String(e)}})}finally{k===a&&(k=null)}},clearModelSearch(){t(re())},selectThinking:se.select,async selectPlanMode(n){let a=r(),o=a.snapshot,s=o?.selectedSession;if(!o||!s||!HD(o,s)||a.workspaceDraft||a.sessionSwitching||a.planSelectionPending||a.promptAdmissionPending||a.promptAdmissionRecovery||a.liveRunning||o.runtime.status!==`idle`||o.runtime.planRevision===void 0)return;let l=c,u=++N;t({planSelectionPending:!0});try{if(await e.setPlanMode(s.id,s.path,n,o.runtime.planRevision),l===c&&u===N&&!await H.refreshSnapshot({epoch:l}))throw Error(Xl.t(`planModeUnconfirmed`))}catch(e){l===c&&u===N&&(await H.refreshSnapshot({epoch:l}),l===c&&u===N&&i(e))}finally{l===c&&u===N&&t({planSelectionPending:!1})}},async preparePlanImplementation(){let n=r(),a=n.snapshot,o=a?.selectedSession,s=o?.id;if(!s||!HD(a,o)||s!==a?.currentSessionId||!o?.path||n.selectedPath!==o.path||n.workspaceDraft||n.sessionSwitching||n.planSelectionPending||n.promptAdmissionPending||n.promptAdmissionRecovery||n.liveRunning||a.runtime.status!==`idle`||a.runtime.plan!==`ready`||typeof a.runtime.planRevision!=`string`)return null;let l=c,u=++N,d=o.path,f=a.runtime.planRevision;t({planSelectionPending:!0});try{let t;try{t=await e.preparePlanImplementation(s,d,f)}catch(e){if(l===c&&u===N){try{await H.refreshSnapshot({epoch:l})}catch{}l===c&&u===N&&i(e)}return null}let n=r();return l!==c||u!==N||!HD(n.snapshot)||n.snapshot?.currentSessionId!==s||n.snapshot.selectedSession?.path!==d||n.selectedPath!==d?null:t.sessionId!==s||t.status!==`ready`||t.revision!==f||n.snapshot?.runtime.plan!==`ready`||n.snapshot.runtime.planRevision!==f?(i(Error(Xl.t(`planModeUnconfirmed`))),null):{prompt:t.prompt,sessionId:s,sessionPath:d,planRevision:f}}finally{l===c&&u===N&&t({planSelectionPending:!1})}},async cancelActiveTurn(){let n=r().activeTurn??r().snapshot?.runtime.activeTurn;if(!n||!HD(r().snapshot)||r().turnCancellationPending||r().sessionSwitching)return;let a=c,o=r().selectedPath,s={...n};ee=s;let l=()=>ee===s&&a===c&&o===r().selectedPath;t({turnCancellationPending:!0});try{await e.cancelActiveTurn(n)}catch(e){if(!l())return;await H.refreshSnapshot({epoch:a}),l()&&i(e)}finally{ee===s&&(ee=null,t({turnCancellationPending:!1}))}},async sendPrompt(n,o=[],s,l,u){if(r().sessionForkPending||r().planSelectionPending)return!1;let d=n.trim();if(d.length>12e3)return t({notice:Xl.t(`promptTooLong`,{count:d.length,limit:Ce})}),!1;let f=o.map(({data:e,mimeType:t,name:n})=>({data:e,mimeType:t,...n===void 0?{}:{name:n}})),p=JSON.stringify(f.map(({data:e,mimeType:t,name:n})=>[t,n??``,e])),m=r();if(u&&(u.epoch!==c||!a(u)||m.workspaceDraft))return!1;let h=m.promptAdmissionRecovery,g=h?.phase===`submitting`?h:null,b=m.activeTurn??m.snapshot?.runtime.activeTurn;if(l?.streamingBehavior===`steer`&&!g&&(s||m.turnCancellationPending||!b||b.commandId!==l.expectedTurnCommandId||m.workspaceDraft))return t({notice:Xl.t(`steerStaleTurn`)}),!1;let x=m.selectedWorkspace;if(!x||!d&&f.length===0&&!l?.retryEntryId||m.sessionSwitching||m.promptAdmissionPending||h&&!g||m.promptAdmissionResolution||m.modelSelectionPending||m.thinkingPendingLevel!==null)return!1;let S=r().workspaceDraft||!r().snapshot?.selectedSession?.id;if(s&&S)return!1;let C=S?await H.createSession(x):null;if(S&&!C)return r().notice||t({notice:`The active Session changed before the first message was sent. Your message was not sent.`}),!1;if(S&&r().draftModel)return!1;let w=r().snapshot?.selectedSession,T=C??(w?{epoch:c,sessionId:w.id,sessionPath:w.path,workspacePath:x}:null);if(!T||r().workspaceDraft||!a(T)||r().sessionSwitching||r().promptAdmissionPending||g&&(r().promptAdmissionRecovery?.commandId!==g.commandId||r().promptAdmissionRecovery?.phase!==`submitting`))return!1;let{epoch:E,sessionId:D,sessionPath:O}=T;if(!O||s&&(s.sessionId!==D||s.sessionPath!==O||!s.planRevision))return!1;let k=r().draftModel;if(k&&!await ae(k,E,D,O)||r().workspaceDraft||!a(T)||g&&(r().promptAdmissionRecovery?.commandId!==g.commandId||r().promptAdmissionRecovery?.phase!==`submitting`))return!1;let A=++_,j=y?.sessionId===D&&y.sessionPath===O&&y.content===d&&y.imageSignature===p&&y.planRevision===s?.planRevision&&(y.delivery?.streamingBehavior??`followUp`)===(l?.streamingBehavior??`followUp`)&&y.delivery?.expectedTurnCommandId===l?.expectedTurnCommandId&&y.delivery?.retryEntryId===l?.retryEntryId,M=j?y.commandId:globalThis.crypto?.randomUUID?.()??`web-prompt-${Date.now()}-${A}`,N=j?y.optimisticKey:`optimistic-${M}`,F=j?y.timestamp:new Date().toISOString(),I=j?y.afterEntryId:r().snapshot?.selectedSession?.history?.leafEntryId??r().snapshot?.selectedSession?.entries.at(-1)?.id??null;y={sessionId:D,sessionPath:O,content:d,imageSignature:p,images:f,commandId:M,optimisticKey:N,timestamp:F,afterEntryId:I,...s?{planRevision:s.planRevision}:{},...l?{delivery:l}:{}},v=A,t({liveMessages:j||l?.retryEntryId?r().liveMessages:AG([...r().liveMessages,{key:N,timestamp:F,optimistic:{sessionId:D,sessionPath:O,commandId:M,afterEntryId:I,admitted:!1},message:{role:`user`,content:d,...f.length>0?{parts:f.map(e=>({type:`image`,mimeType:e.mimeType,...e.name?{name:e.name}:{},previewUrl:`data:${e.mimeType};base64,${e.data}`}))}:{}}}]),notice:null,pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,turnTerminalStatus:null,promptAdmissionPending:!0,scrollToBottom:r().scrollToBottom+1});try{let n=l?await e.prompt(D,d,M,O,j,f,s?.planRevision,l):s?await e.prompt(D,d,M,O,j,f,s.planRevision):await e.prompt(D,d,M,O,j,f);if(E!==c||O!==r().selectedPath||D!==r().snapshot?.selectedSession?.id||v!==A)return!1;let i=P.has(n.id);return y?.commandId===M&&(y=null),t({liveMessages:n.accepted&&n.id===M?BG(r().liveMessages,D,O,M):r().liveMessages,...HD(r().snapshot)?ie(i,r().livePhase):{},pendingFollowUpsReceipt:HD(r().snapshot)?n.pendingFollowUps??null:null,pendingSteeringReceipt:HD(r().snapshot)?n.pendingSteering??null:null,...g&&r().promptAdmissionRecovery?.commandId===g.commandId?{promptAdmissionRecovery:null,...j?{promptAdmissionResolution:{sessionId:g.sessionId,sessionPath:g.sessionPath,commandId:g.commandId,content:g.content,images:g.images}}:{}}:{}}),oe(120),!0}catch(e){if(E!==c||O!==r().selectedPath||D!==r().snapshot?.selectedSession?.id||v!==A)return!1;let n=e instanceof ge&&[`PLAN_BUSY`,`PLAN_CONFLICT`,`PLAN_CONTROL_UNAVAILABLE`].includes(e.code??``),a=e instanceof ge&&e.code===`TURN_CONFLICT`,o=n||e instanceof ge&&[`WORKSPACE_REQUIRED`,`SESSION_CONFLICT`,`TURN_CONFLICT`,`PROMPT_REJECTED`,`COMMAND_CONFLICT`,`PROMPT_ADMISSION_CAPACITY`,`INVALID_PROMPT`,`INVALID_PROMPT_IMAGES`].includes(e.code??``),s=P.has(M)||r().liveMessages.some(e=>e.optimistic?.sessionId===D&&e.optimistic.sessionPath===O&&e.optimistic.commandId===M&&e.optimistic.admitted)||r().activeTurn?.sessionId===D&&r().activeTurn?.commandId===M;if(!o&&s)return y?.commandId===M&&(y=null),g&&r().promptAdmissionRecovery?.commandId===g.commandId&&t({promptAdmissionRecovery:null,...j?{promptAdmissionResolution:{sessionId:g.sessionId,sessionPath:g.sessionPath,commandId:g.commandId,content:g.content,images:g.images}}:{}}),!0;if(!o&&y?.commandId===M){let n=y;y=null,t({notice:null,promptAdmissionPending:!1,promptAdmissionRecovery:{...n,retryable:!(e instanceof ge)||e.code!==`COMMAND_ADMISSION_UNKNOWN`,phase:`checking`}});let i=await H.refreshSnapshot({resetCursor:!0,epoch:E}),a=r().promptAdmissionRecovery;if(a?.commandId===M){if(r().activeTurn?.sessionId===D&&r().activeTurn?.commandId===M&&r().selectedPath===O&&r().snapshot?.selectedSession?.path===O&&HD(r().snapshot))return t({promptAdmissionRecovery:null,promptAdmissionResolution:{sessionId:a.sessionId,sessionPath:a.sessionPath,commandId:a.commandId,content:a.content,images:a.images}}),!0;t({promptAdmissionRecovery:{...a,phase:i?`ready`:`verification-failed`}})}return!1}return o?(y?.commandId===M&&(y=null),t({promptAdmissionPending:!1,liveMessages:r().liveMessages.filter(e=>e.key!==N),...j&&g&&e instanceof ge&&e.code===`PROMPT_REJECTED`?{promptAdmissionRecovery:null}:{}}),(n||a)&&(await H.refreshSnapshot({epoch:E}),E!==c||O!==r().selectedPath||v!==A)||i(a?Error(Xl.t(`steerStaleTurn`)):e),!1):(i(e),!1)}finally{E===c&&v===A&&(v=null,t({promptAdmissionPending:!1}))}},async checkPromptAdmissionRecovery(){let e=r().promptAdmissionRecovery;if(!e||e.phase!==`verification-failed`)return;let n=c;t({notice:null,promptAdmissionRecovery:{...e,phase:`checking`}});let i=await H.refreshSnapshot({resetCursor:!0,epoch:n}),a=r().promptAdmissionRecovery;a?.commandId===e.commandId&&a.phase===`checking`&&t({promptAdmissionRecovery:{...a,phase:i?`ready`:`verification-failed`}})},async retryPromptAdmission(){let e=r().promptAdmissionRecovery;if(!e?.retryable||e.phase!==`ready`||e.sessionPath!==r().selectedPath||e.sessionPath!==r().snapshot?.selectedSession?.path||e.sessionId!==r().snapshot?.selectedSession?.id)return!1;let n=e.images??[];y={...e,images:n,imageSignature:JSON.stringify(n.map(({data:e,mimeType:t,name:n})=>[t,n??``,e])),afterEntryId:e.afterEntryId??null,timestamp:e.timestamp??new Date().toISOString()},t({promptAdmissionRecovery:{...e,phase:`submitting`},notice:null});try{return await H.sendPrompt(e.content,n,e.planRevision?{sessionId:e.sessionId,sessionPath:e.sessionPath,planRevision:e.planRevision}:void 0,e.delivery)}finally{let n=r().promptAdmissionRecovery;n?.commandId===e.commandId&&n.phase===`submitting`&&t({promptAdmissionRecovery:{...n,phase:`ready`}})}},async sendPromptAsNew(e,n,i,a,o){let s=r().promptAdmissionRecovery;if(!s||s.phase!==`ready`||s.sessionPath!==r().selectedPath||s.sessionPath!==r().snapshot?.selectedSession?.path||s.sessionId!==r().snapshot?.selectedSession?.id)return!1;let c=e.trim(),l=n??s.images??[];if(!c&&l.length===0)return!1;y=null,t({promptAdmissionRecovery:{...s,phase:`submitting`},notice:null});let u=!1;try{let e=s.planRevision?{sessionId:s.sessionId,sessionPath:s.sessionPath,planRevision:s.planRevision}:i;return u=e?await H.sendPrompt(c,l,e,void 0,o):await H.sendPrompt(c,l,void 0,void 0,o),u}finally{let e=r().promptAdmissionRecovery;e?.commandId===s.commandId&&e.phase===`submitting`&&t({promptAdmissionRecovery:u?null:{...e,phase:`ready`}})}},abandonPromptAdmission(){let e=r().promptAdmissionRecovery;!e||e.phase===`submitting`||(y?.commandId===e.commandId&&(y=null),t({liveMessages:r().liveMessages.filter(t=>t.key!==e.optimisticKey),notice:null,promptAdmissionRecovery:null}))},acknowledgePromptAdmissionResolution(e){r().promptAdmissionResolution?.commandId===e&&t({promptAdmissionResolution:null})},async discoverCommands(){let n=r(),i=n.snapshot?.selectedSession?.id;if(n.workspaceDraft||!i||!HD(n.snapshot)||i!==n.snapshot?.currentSessionId||n.selectedPath!==n.snapshot?.selectedSession?.path||n.sessionSwitching){I();return}if(n.commandDiscovery.sessionId===i&&(n.commandDiscovery.status===`loading`||n.commandDiscovery.status===`ready`))return;let a=c,o=++M;j?.abort();let s=new AbortController;j=s,t({commandDiscovery:{sessionId:i,status:`loading`,commands:[],totalAvailable:0,commandsOmitted:0,error:null}});try{let n=await e.commands(i,s.signal);if(s.signal.aborted||a!==c||o!==M||i!==r().snapshot?.currentSessionId)return;t({commandDiscovery:{sessionId:i,status:`ready`,commands:n.commands,totalAvailable:n.totalAvailable,commandsOmitted:n.truncation.commandsOmitted,error:null}})}catch(e){if(s.signal.aborted||a!==c||o!==M)return;t({commandDiscovery:{sessionId:i,status:`error`,commands:[],totalAvailable:0,commandsOmitted:0,error:e instanceof Error?e.message:String(e)}})}finally{j===s&&(j=null)}},clearCommandDiscovery:I,setQuery(e){t({query:e})},setSearchOpen(e){t({searchOpen:e,...e?{}:{query:``}})},toggleWorkspace(e){let n=new Set(r().collapsed);n.has(e)?n.delete(e):n.add(e),kG(wG,[...n]),t({collapsed:n})},toggleSidebar(e){if(e){t({mobileSidebarOpen:!r().mobileSidebarOpen});return}let n=!r().sidebarCollapsed;try{window.sessionStorage.setItem(TG,String(n))}catch{}t({sidebarCollapsed:n})},closeMobileSidebar(){t({mobileSidebarOpen:!1})},clearNotice(){t({notice:null})}};return{planSelectionPending:!1,activeTurn:null,turnCancellationPending:!1,turnTerminalStatus:null,pendingFollowUpsReceipt:null,pendingSteeringReceipt:null,snapshot:null,historyAnchor:null,historyNavigation:null,sessionForkPending:!1,sessionForkCancellation:null,cursor:null,selectedPath:s?.path??null,selectedWorkspace:null,workspaceDraft:o&&!s,draftModel:null,createdSession:null,modelSelectionPending:!1,modelSearch:{query:``,status:`idle`,models:[],totalMatches:0,matchesOmitted:0,error:null},collapsed:DG(wG),sidebarCollapsed:OG(TG),mobileSidebarOpen:!1,query:``,searchOpen:!1,connection:`connecting`,archiveNotices:[],notice:o&&!s?Xl.t(`sessionLinkUnavailable`):null,liveMessages:[],liveRunning:!1,livePhase:`idle`,liveRetry:null,thinkingStarts:{},thinkingDurations:{},promptAdmissionPending:!1,promptAdmissionRecovery:null,promptAdmissionResolution:null,restoredPromptDraft:null,sessionSwitching:!1,scrollToBottom:0,thinkingPendingLevel:null,commandDiscovery:V(),actions:H}})}var WG=UG(),GG={base:{k1xSpc:`x3nfvp2`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,kaIpWk:`x16rqkct`,kmuXW:`x2lah0s`,kzqmXN:`x1xc55vz`,kZKoxP:`xdk7pt`,$$css:!0},pulsing:{kKVMdj:`x1mta51n`,k44tkh:`x1c74tu6`,kyAemX:`x4hg4is`,ko0y90:`xa4qsjk`,$$css:!0},reducedMotion:{kjO2d4:`x1aquc0h`,$$css:!0}},KG={success:{kWkggS:`xdsz4j9`,kMwMTN:`xri61p4`,$$css:!0},warning:{kWkggS:`x1q8g9m5`,kMwMTN:`xrebv38`,$$css:!0},error:{kWkggS:`x1pjz0fi`,kMwMTN:`x1m024r3`,$$css:!0},accent:{kWkggS:`x1ewilqj`,kMwMTN:`x17wrial`,$$css:!0},neutral:{kWkggS:`x1q5y3ey`,kMwMTN:`xrkvqaz`,$$css:!0}};function qG({variant:e,label:t,isPulsing:n=!1,tooltip:r,icon:i,xstyle:a,className:o,style:s,ref:c,...l}){let u=mt(i),d=(0,q.jsx)(`span`,{ref:c,role:`img`,"aria-label":t,...H(O(`status-dot`,{variant:e},{legacyNames:[`statusdot`]}),w(GG.base,KG[e],n&&GG.pulsing,n&&GG.reducedMotion,a),o,s),...l,children:u&&(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`x78zum5 x6s0dn4 xl56j7k x14ju556 x1xc55vz xdk7pt`,children:i})});return r?(0,q.jsx)(V,{content:r,children:d}):d}qG.displayName=`StatusDot`;function JG({identity:e,title:t,label:n,state:r=`unknown`,action:i,onInspect:a}){let{t:o}=W(),s=(0,K.useId)();return(0,q.jsxs)(a?`button`:`div`,{className:`subagent-card-open`,"data-status":r,type:a?`button`:void 0,"aria-label":a?o(`inspectSubagent`,{name:t}):void 0,"aria-describedby":a?s:void 0,onClick:a,children:[i?(0,q.jsx)($o,{className:`subagent-operation-icon`,"aria-hidden":`true`}):(0,q.jsx)($W,{identity:e}),i&&(0,q.jsxs)(`span`,{className:`subagent-operation-label`,children:[i,t&&` ·`]}),(0,q.jsx)(`span`,{className:`subagent-activity-title`,title:t,children:t}),(0,q.jsx)(`span`,{id:s,className:`subagent-state ${r}${i||r===`running`||r===`done`?` subagent-state-hidden`:``}`,children:n}),!i&&r===`running`&&(0,q.jsx)(rc,{className:`subagent-running-icon`,"aria-hidden":`true`}),a&&(0,q.jsx)(os,{className:`subagent-open-icon`,"aria-hidden":`true`})]})}function YG(e,t){let n=Math.max(0,Math.floor(e/1e3)),r=Math.floor(n/3600),i=Math.floor(n/60)%60,a=n%60;return t.startsWith(`zh`)?[r?`${r}h`:``,i||r?`${i}m`:``,`${a}s`].filter(Boolean).join(` `):`${r?`${r}h`:``}${i||r?`${i}m`:``}${a}s`}function XG({elapsedMs:e,waiting:t=!1}){let{t:n,i18n:r}=W(),i=(0,K.useRef)({elapsedMs:e,clock:performance.now()}),[a,o]=(0,K.useState)(e);return(0,K.useEffect)(()=>{let t=performance.now();i.current={elapsedMs:Math.max(e,i.current.elapsedMs+t-i.current.clock),clock:t},o(i.current.elapsedMs)},[e]),(0,K.useEffect)(()=>{let e=window.setInterval(()=>{o(i.current.elapsedMs+performance.now()-i.current.clock)},1e3);return()=>window.clearInterval(e)},[]),(0,q.jsx)(`span`,{className:`turn-elapsed-running`,role:`timer`,"aria-live":`off`,children:n(t?`compactionElapsed`:`turnElapsedRunning`,{duration:YG(a,r.language)})})}function ZG({timing:e}){let{t,i18n:n}=W();return(0,q.jsx)(`span`,{children:t(`turnElapsedFinished`,{duration:YG(e.elapsedMs,n.language)})})}function QG({compaction:e,observed:t=!0}){let{t:n}=W(),r=e.state===`running`,i=r&&!t,a=i?`unavailable`:e.state;return(0,q.jsxs)(`div`,{className:`context-compaction`,"data-state":a,children:[(0,q.jsxs)(`div`,{className:`context-compaction-heading`,children:[(0,q.jsxs)(`span`,{className:`context-compaction-label`,role:`status`,children:[(0,q.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,q.jsx)(`path`,{d:`M4 4v13a3 3 0 0 0 3 3h3M14 4h3a3 3 0 0 1 3 3v13M8 10h8M8 14h4`}),(0,q.jsx)(`circle`,{cx:`4`,cy:`4`,r:`1.7`,fill:`currentColor`,stroke:`none`}),(0,q.jsx)(`circle`,{cx:`20`,cy:`20`,r:`1.7`,fill:`currentColor`,stroke:`none`})]}),(0,q.jsx)(`span`,{className:`context-compaction-text`,children:n({running:`compactionRunning`,completed:`compactionCompleted`,failed:`compactionInterrupted`,cancelled:`compactionInterrupted`,unchanged:`compactionUnchanged`,unavailable:`compactionUnavailable`}[a])})]}),r&&t&&e.elapsedMs!==void 0&&(0,q.jsx)(XG,{elapsedMs:e.elapsedMs,waiting:!0},e.startedAt)]}),i&&(0,q.jsx)(`p`,{children:n(`compactionReconnectHelp`)})]})}function $G(e,t,n,r){if(e.name!==`codemode`||!e.id||t?.forkSnapshotToolResult)return;let i=t!==void 0&&r!==`running`,a=new Set([e.id]),o=[];for(let e of n)!e.parentToolCallId||!a.has(e.parentToolCallId)||(e.call.id&&a.add(e.call.id),o.push(e));let s=dd(t?.details),c=Array.isArray(s.calls)?s.calls:[],l=new Set(c.flatMap(e=>{let t=dd(e);return t.status===`cancelled`&&typeof t.id==`string`?[t.id]:[]})),u=t?.nestedCalls,d=[];for(let e of u?.calls??[]){let t=o.find(t=>t.call.id===e.call.id&&t.call.name===e.call.name),n=e.status!==`ok`&&l.has(e.call.id??``)?`cancelled`:e.status===`ok`?`returned`:e.status===`error`?`failed`:t&&[`returned`,`failed`,`cancelled`,`timed_out`].includes(t.state)?yd(t.call,t.result,t.state).state:`unknown`;d.push({call:e.call,result:t?.result,state:n,outputMissing:!t?.result,argumentsOmitted:e.argumentsOmitted,error:e.error})}for(let e of o)d.some(t=>t.call.id===e.call.id)||i&&u?.complete||d.push({call:e.call,result:e.result,state:i&&e.state===`running`?`unknown`:e.result?.isError!==!1&&l.has(e.call.id??``)?`cancelled`:yd(e.call,e.result,e.state).state,outputMissing:!1});let f=c.some(e=>{let t=dd(e);return!i&&t.status===`running`&&typeof t.id==`string`&&t.id.endsWith(`/?`)?!1:!d.some(e=>e.call.id===t.id&&e.call.name===t.name)});return{children:d,incomplete:u?.complete===!1||f||i&&!u&&c.length>d.length,showWrapper:d.length===0||f||t?.isError===!0||r===`running`&&!d.some(e=>e.state===`running`)}}function eK(e){let t=new Map(rk(e).map(e=>[e.start,e]));return()=>n=>{let r=[],i=e=>{if(e.type===`link`){let n=t.get(e.position?.start.offset??-1);n&&n.end===e.position?.end.offset&&r.push(n);return}if(`children`in e)for(let t of e.children)i(t)};i(n);let a=[],o=0;for(let t of r)a.push({type:`text`,value:e.slice(o,t.start)},{type:`element`,tagName:`a`,properties:{href:t.reference},children:[{type:`text`,value:t.name}]}),o=t.end;a.push({type:`text`,value:e.slice(o)}),n.children=[{type:`paragraph`,children:[],data:{hChildren:a}}]}}function tK({reference:e,label:t}){let{t:n}=W(),r=(0,K.useContext)($E),[i,a]=(0,K.useState)(!1),o=e;try{o=decodeURIComponent(e)}catch{}let s=t===o&&o.split(/[\\/]/u).at(-1)||t;return(0,q.jsxs)(`span`,{className:`user-file-reference`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`user-file-reference-open`,disabled:!r||r.disabled,title:s,onClick:t=>r?.open(e,r.parent,t.currentTarget),children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:s})]}),(0,q.jsx)(`button`,{type:`button`,className:`user-file-reference-details`,"aria-label":`${n(`artifactFileDetails`)} ${s}`,"aria-expanded":i,onClick:()=>a(e=>!e),children:(0,q.jsx)(is,{"aria-hidden":`true`})}),i&&(0,q.jsx)(`span`,{className:`user-file-reference-path`,children:o})]})}var nK={p:({children:e})=>(0,q.jsx)(`div`,{className:`message-body user-message-content`,children:e}),a:({href:e,node:t})=>(0,q.jsx)(tK,{reference:e??``,label:t?.children.map(e=>e.type===`text`?e.value:``).join(``)??``})};function rK({content:e,incomplete:t=!1}){let n=eK(e);return t?(0,q.jsx)(`div`,{className:`message-body`,children:e}):(0,q.jsx)(dv,{remarkPlugins:[n],urlTransform:e=>e,components:nK,children:e})}function iK({preview:e,sessionId:t,sessionPath:n,entryId:r,markdown:i,fullText:a,onComplete:o,onProgress:s,purpose:c,partIndex:l}){let{t:u}=W(),d=(0,K.useMemo)(()=>new de,[]),f=(0,K.useRef)(null),p=(0,K.useRef)(null),m=(0,K.useRef)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(0),[y,b]=(0,K.useState)(!1),[x,S]=(0,K.useState)(!1);(0,K.useEffect)(()=>()=>f.current?.abort(),[]);let C=(0,K.useCallback)(async()=>{if(f.current||_===null)return;let e=new AbortController;f.current=e,b(!0),S(!1);try{let i=[t,n,r,_,e.signal],a=await(c===`thinking`?d.sessionItem(...i,c,l):c?d.sessionItem(...i,c):d.sessionItem(...i));if(e.signal.aborted)return;if(a.entryId!==r||c===`plan`&&a.planStatus!==`ready`||c===`thinking`&&a.partIndex!==l||a.nextCursor!==null&&a.nextCursor<=_)throw Error(`Message identity changed`);let u=_===0?[a.text]:[...h??[],a.text];g(u),v(a.nextCursor),a.nextCursor===null?(o?.(u.join(``)),document.activeElement===p.current&&!m.current?.closest(`[hidden]`)&&m.current?.focus()):s?.(u.join(``))}catch{e.signal.aborted||S(!0)}finally{f.current===e&&(f.current=null,e.signal.aborted||b(!1))}},[d,t,n,r,_,c,l,h,o,s]);(0,K.useEffect)(()=>{if(c!==`thinking`||a!==void 0||h!==null||x)return;let e=m.current;if(!e)return;if(typeof IntersectionObserver>`u`){e.closest(`[hidden], details:not([open])`)||C();return}let t=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(t.disconnect(),C())});return t.observe(e),()=>t.disconnect()},[c,a,h,x,C]);let w=a??h?.join(``)??e;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{ref:m,className:`message-full-text`,tabIndex:-1,children:i?(0,q.jsx)(vD,{children:w}):(0,q.jsx)(rK,{content:w,incomplete:a===void 0&&_!==null})}),c===`thinking`&&a===void 0&&_!==null&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:u(`thinkingPartialText`)}),a===void 0&&_!==null&&(0,q.jsx)(`button`,{ref:p,type:`button`,className:`message-load-full`,"aria-disabled":y,onClick:()=>void C(),children:u(y?c===`plan`?`planCardLoadingFull`:c===`thinking`?`thinkingLoadingFull`:`messageLoadingFull`:x?c===`plan`?`planCardLoadFailed`:c===`thinking`?`thinkingLoadFailed`:`messageLoadFailed`:h?`messageLoadMore`:c===`plan`?`planCardLoadFull`:c===`thinking`?`thinkingLoadFull`:`messageLoadFull`)})]})}function aK(e){if(e?.toolName!==`plan_ready`||e.isError!==!1)return;let t=dd(e.details);if(t.status===`ready`&&typeof t.plan==`string`&&t.plan.trim())return{markdown:t.plan,ready:!0,truncated:!1};if(e.truncation?.details&&e.content.trim())return{markdown:e.content,ready:!1,truncated:!0}}function oK({result:e,sessionId:t,sessionPath:n,entryId:r}){let{t:i}=W(),a=(0,K.useId)(),[o,s]=(0,K.useState)(!0),[c,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(null),f=JSON.stringify([t,n,r]),p=u?.source===f?u:void 0,m=p?.complete?p.markdown:void 0,h=aK(e),g=h?.truncated&&p?{markdown:p.markdown,ready:p.complete,truncated:!p.complete}:h,_=(0,K.useRef)({source:f,markdown:g?.markdown});_.current={source:f,markdown:g?.markdown};let v=c?.source===f&&c?.markdown===g?.markdown?c.status:null;return g?(0,q.jsxs)(`section`,{className:`plan-card`,"aria-label":i(`planCardLabel`),children:[(0,q.jsxs)(`div`,{className:`plan-card-header`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`plan-card-toggle`,"aria-expanded":o,"aria-controls":a,onClick:()=>s(!o),children:[(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:i(g.ready?`planCardReady`:`planCardResult`)}),(0,q.jsx)(`span`,{className:`plan-card-disclosure`,children:i(o?`planCardCollapse`:`planCardExpand`)})]}),(0,q.jsx)(`button`,{type:`button`,className:`plan-card-copy`,"aria-label":i(g.truncated?`planCardCopyPreview`:`planCardCopy`),title:i(g.truncated?`planCardCopyPreview`:`planCardCopy`),onClick:async()=>{let e=await td(g.markdown);_.current.source===f&&_.current.markdown===g.markdown&&l({source:f,markdown:g.markdown,status:e?`copiedMessage`:`copyFailed`})},children:v===`copiedMessage`?(0,q.jsx)(rs,{"aria-hidden":`true`}):(0,q.jsx)(_s,{"aria-hidden":`true`})})]}),(0,q.jsxs)(`div`,{id:a,hidden:!o,className:`plan-card-body`,children:[(0,q.jsx)(`p`,{className:`plan-card-note`,children:i(`planCardNotApproval`)}),g.truncated&&(0,q.jsx)(`p`,{className:`plan-card-note`,children:i(`planCardTruncated`)}),h?.truncated&&t&&n&&r?(0,q.jsx)(iK,{preview:h.markdown,sessionId:t,sessionPath:n,entryId:r,markdown:!0,purpose:`plan`,fullText:m,onProgress:e=>d({source:f,markdown:e,complete:!1}),onComplete:e=>d({source:f,markdown:e,complete:!0})},f):(0,q.jsx)(vD,{children:g.markdown}),(0,q.jsxs)(`details`,{className:`plan-card-evidence`,children:[(0,q.jsx)(`summary`,{children:i(`planCardEvidence`)}),(0,q.jsx)(`pre`,{className:`tool-evidence`,children:pd(e.content).text})]})]}),v&&(0,q.jsx)(`span`,{className:`plan-card-feedback`,role:`status`,children:i(v)})]}):null}var sK=`openpi:reading-positions:v1`;function cK(){let e=new Map;try{let t=localStorage.getItem(`openpi:reading-positions:v1`)??`[]`,n=t.length<=32768?JSON.parse(t):[];if(Array.isArray(n)&&n.length<=4)for(let t of n){if(!Array.isArray(t)||t.length!==2)continue;let[n,r]=t;if(typeof n!=`string`||n.length>4600)continue;let i;try{i=JSON.parse(n)}catch{continue}!Array.isArray(i)||i.length!==2||!i.every(e=>typeof e==`string`&&e.length>0)||typeof r!=`object`||!r||!(`key`in r)||typeof r.key!=`string`||!r.key||r.key.length>512||`entryId`in r&&(typeof r.entryId!=`string`||!r.entryId||r.entryId.length>128)||!(`offset`in r)||typeof r.offset!=`number`||!Number.isFinite(r.offset)||Math.abs(r.offset)>1e6||!(`scrollTop`in r)||typeof r.scrollTop!=`number`||!Number.isFinite(r.scrollTop)||r.scrollTop<0||!(`pinned`in r)||typeof r.pinned!=`boolean`||e.set(n,{position:{key:r.key,offset:r.offset,...`entryId`in r&&typeof r.entryId==`string`?{entryId:r.entryId}:{},scrollTop:r.scrollTop,pinned:r.pinned}})}}catch{}return e.persist=()=>{try{localStorage.setItem(sK,JSON.stringify([...e].flatMap(([e,t])=>t.position?.key?[[e,{key:t.position.key,entryId:t.position.entryId,offset:t.position.offset,scrollTop:t.position.scrollTop,pinned:t.position.pinned}]]:[])))}catch{}},e}function lK(e){return JSON.stringify([e?.id,e?.path])}function uK(e,t,n){let r={...e.get(t),...n};e.delete(t),e.set(t,r),e.size>4&&e.delete(e.keys().next().value),e.persist?.()}var dK=500,fK=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@(.*)$/u;function pK(e){let t=[],n=e=>{t.push({id:t.length,...e})},r=0,i=0,a=!1,o=0,s=0,c=e.split(` +`);c.at(-1)===``&&c.pop();for(let e of c){let t=fK.exec(e);if(t){r=Number(t[1]),i=Number(t[3]),o=t[2]===void 0?1:Number(t[2]),s=t[4]===void 0?1:Number(t[4]),a=!0,n({kind:`meta`,marker:``,code:t[5]?.trim()||e});continue}if(!a){if(!e||e.startsWith(`diff --git `)||e.startsWith(`index `)||e.startsWith(`--- `)||e.startsWith(`+++ `)||e.startsWith(`new file mode `)||e.startsWith(`deleted file mode `))continue;n({kind:`meta`,marker:``,code:e});continue}if(e.startsWith(`+`)&&s>0){n({kind:`added`,newLine:i,marker:`+`,code:e.slice(1)}),i+=1,--s;continue}if(e.startsWith(`-`)&&o>0){n({kind:`removed`,oldLine:r,marker:`-`,code:e.slice(1)}),r+=1,--o;continue}if(e.startsWith(`\\ No newline`)){n({kind:`meta`,marker:``,code:e});continue}if(!e.startsWith(` `)||o<=0||s<=0){a=!1,n({kind:`meta`,marker:``,code:e});continue}n({kind:`context`,oldLine:r,newLine:i,marker:` `,code:e.startsWith(` `)?e.slice(1):e}),r+=1,i+=1,--o,--s}return t}function mK({file:e,onReferenceLine:t}){let{t:n}=W(),r=(0,K.useMemo)(()=>pK(e.diff),[e.diff]),i=r.slice(0,dK),a=(0,K.useRef)(null),[o,s]=(0,K.useState)(`unified`),c=o===`split`&&!e.binary,[l,u]=(0,K.useState)(null),d=l?.file===e?l.id:void 0,f=(n,i)=>{let a=i??(n.newLine===void 0?`old`:`new`),o=a===`new`?n.newLine:n.oldLine;if(!(!t||e.binary||!o||o<1||!Number.isSafeInteger(o)||e.diffTruncated&&!e.diff.endsWith(` `)&&n.id===r.at(-1)?.id))return{filePath:a===`old`?e.previousPath??e.path:e.path,side:a,line:o,code:n.code}},p=i.filter(e=>f(e)),m={old:p.filter(e=>f(e,`old`)),new:p.filter(e=>f(e,`new`))},h=Math.max(0,r.length-i.length),g=String(i.reduce((e,t)=>Math.max(e,t.oldLine??0,t.newLine??0),0)).length,_=[];for(let e=0;e{if(!r)return(0,q.jsx)(`span`,{className:`review-diff-line`,"data-kind":`empty`,"aria-hidden":`true`,children:`\xA0`});let o=f(r,i),s=i?m[i]:p,c=!i||l?.side===i?d:void 0,h=d===r.id&&(!i||l?.side===i),_=(0,q.jsxs)(q.Fragment,{children:[i!==`new`&&(0,q.jsx)(`span`,{className:`review-diff-gutter`,style:{width:`${g+1}ch`},"aria-hidden":`true`,children:r.oldLine??``}),i!==`old`&&(0,q.jsx)(`span`,{className:`review-diff-gutter`,style:{width:`${g+1}ch`},"aria-hidden":`true`,children:r.newLine??``})]});return(0,q.jsxs)(`span`,{className:`review-diff-line`,"data-kind":r.kind,"data-selected":h||void 0,children:[o?(0,q.jsx)(`button`,{type:`button`,className:`review-diff-line-select`,"data-diff-row":r.id,"data-diff-side":i??`unified`,"aria-label":n(o.side===`new`?`reviewSelectNewLine`:`reviewSelectOldLine`,{line:o.line}),"aria-pressed":h,tabIndex:(c??s[0]?.id)===r.id?0:-1,onClick:()=>u({file:e,id:r.id,side:i}),onKeyDown:t=>{if(t.nativeEvent.isComposing||t.nativeEvent.keyCode===229)return;let n=s.indexOf(r),o;if(t.key===`ArrowDown`)o=s[Math.min(n+1,s.length-1)];else if(t.key===`ArrowUp`)o=s[Math.max(n-1,0)];else if(t.key===`Home`)o=s[0];else if(t.key===`End`)o=s.at(-1);else return;t.preventDefault(),t.stopPropagation(),o&&(u({file:e,id:o.id,side:i}),a.current?.querySelector(`[data-diff-row="${o.id}"][data-diff-side="${i??`unified`}"]`)?.focus({preventScroll:!0}))},children:_}):_,(0,q.jsx)(`span`,{className:`review-diff-marker`,"aria-hidden":`true`,children:r.marker}),(0,q.jsx)(`span`,{className:`review-diff-code`,children:r.code}),o&&h&&(0,q.jsxs)(`button`,{type:`button`,className:`review-diff-reference`,onMouseDown:e=>e.preventDefault(),onClick:e=>{let n=e.currentTarget.closest(`.review-diff-line`)?.querySelector(`.review-diff-code`),r=window.getSelection(),i=n?.contains(r?.anchorNode??null)&&n.contains(r?.focusNode??null)?r?.toString():void 0;t?.({...o,code:i||o.code})},children:[(0,q.jsx)(uc,{"aria-hidden":`true`}),n(`reviewQuoteLine`)]}),` -`]},r.id)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`figure`,{ref:a,className:`review-file-diff`,"data-view":c?`split`:`unified`,"aria-label":n(`changeDiff`),children:[(0,q.jsxs)(`figcaption`,{className:`review-diff-toolbar`,children:[(0,q.jsx)(`span`,{children:n(`changeDiff`)}),!e.binary&&(0,q.jsx)(`fieldset`,{"aria-label":n(`diffViewMode`),children:[`unified`,`split`].map(e=>(0,q.jsx)(`button`,{type:`button`,"aria-pressed":o===e,onClick:()=>{u(null),s(e)},children:n(e===`unified`?`diffUnified`:`diffSplit`)},e))})]}),c?(0,q.jsxs)(`div`,{className:`review-diff-split`,children:[(0,q.jsxs)(`div`,{className:`review-diff-pair review-diff-column-headings`,children:[(0,q.jsx)(`span`,{children:n(`diffBefore`)}),(0,q.jsx)(`span`,{children:n(`diffAfter`)})]}),_.map((e,t)=>(0,q.jsxs)(`div`,{className:`review-diff-pair`,children:[v(e.old,`old`),v(e.new,`new`)]},e.old?.id??e.new?.id??t))]}):(0,q.jsx)(`pre`,{children:i.map(e=>v(e))})]}),h>0&&(0,q.jsx)(`p`,{className:`review-hidden-lines`,children:n(`gitReviewHiddenLines`,{count:h})}),e.diffTruncated&&(0,q.jsx)(`p`,{className:`review-hidden-lines`,children:n(`gitReviewDiffTruncated`)})]})}function uK(e){switch(e.toLowerCase()){case`read`:return{action:`read`,Icon:Qo};case`write`:return{action:`write`,Icon:yc};case`edit`:return{action:`edit`,Icon:yc};case`bash`:return{action:`command`,Icon:Lc};case`grep`:case`rg`:case`find`:case`fd`:case`glob`:case`tool_search`:return{action:`search`,Icon:Dc};case`ls`:return{action:`list`,Icon:Vs};case`webfetch`:case`websearch`:case`web_fetch`:case`web_search`:return{action:`web`,Icon:Gs};case`plan_ready`:return{action:`plan`,Icon:gs};case`git_show`:case`git_diff`:case`git_log`:return{action:`git`,Icon:Ws};default:return e.startsWith(`subagent`)?{action:`agent`,Icon:$o}:e.startsWith(`workflow`)?{action:`workflow`,Icon:Yc}:{action:`call`,Icon:Xc}}}function dK(e,t,n){let{action:r}=uK(t),i=t.replace(/^subagent_/u,``),a=r===`agent`&&[`spawn`,`send`,`check`,`wait`,`cancel`].includes(i);return a&&n===`returned`?e(`subagentActionDone_${i}`):n===`returned`?e(`toolActionDone_${r}`):e(`toolActivity_${[`running`,`failed`,`cancelled`,`timed_out`].includes(n)?n:`unknown`}`,{action:e(a?`subagentAction_${i}`:`toolAction_${r}`)})}function fK(e){let{action:t}=uK(e);return t===`command`?`run`:t===`workflow`?`flow`:t===`call`?e:t}function pK(e,t){let{action:n}=uK(e),r=n===`search`?t.pattern??t.query??t.path:n===`web`?t.url??t.query:t.path??t.command??t.url??t.query??t.id??t.runId;return typeof r==`string`?r:``}function mK(e){return/^@@ |^--- .*\n\+\+\+ /mu.test(e)?cK(e):e.split(` -`).map((e,t)=>{let n=/^([ +-])\s*(\d+) (.*)$/u.exec(e),r=n?.[1]??e[0]??``,i=r===`+`?`added`:r===`-`?`removed`:`context`,a=n?Number(n[2]):void 0,o=a&&Number.isSafeInteger(a)?a:void 0;return{id:t,kind:i,oldLine:i===`removed`?o:void 0,newLine:i===`removed`?void 0:o,marker:i===`context`?` `:r,code:n?.[3]??(i===`context`?e:e.slice(1))}})}function hK({children:e,className:t,"aria-label":n}){return(0,q.jsx)(`figure`,{"aria-label":n,children:(0,q.jsx)(`pre`,{className:t,tabIndex:0,children:e})})}function gK({call:e,result:t,liveState:n,observed:r=!0,cwd:i,defaultOpen:a=!1,children:o}){let{t:s}=W(),[c,l]=(0,K.useState)(null),u=(0,K.useContext)(JE),d=md(e,t,n),f=!r&&d.state===`running`?`unknown`:d.state,p=t?.forkSnapshotToolResult?s(`toolSnapshotMissingResult`):s(`toolState_${f}`),m=d.resolvedPath??d.path,h=d.path??``,g=Math.max(h.lastIndexOf(`/`),h.lastIndexOf(`\\`)),_=h.slice(g+1)||h,{Icon:v}=uK(e.name),y=cd(d.command??pK(e.name,ld(e))).text,b=d.kind===`terminal`||d.kind===`test`,x=[d.command?`$ ${d.command}`:``,d.output].filter(Boolean).join(` +`]},r.id)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`figure`,{ref:a,className:`review-file-diff`,"data-view":c?`split`:`unified`,"aria-label":n(`changeDiff`),children:[(0,q.jsxs)(`figcaption`,{className:`review-diff-toolbar`,children:[(0,q.jsx)(`span`,{children:n(`changeDiff`)}),!e.binary&&(0,q.jsx)(`fieldset`,{"aria-label":n(`diffViewMode`),children:[`unified`,`split`].map(e=>(0,q.jsx)(`button`,{type:`button`,"aria-pressed":o===e,onClick:()=>{u(null),s(e)},children:n(e===`unified`?`diffUnified`:`diffSplit`)},e))})]}),c?(0,q.jsxs)(`div`,{className:`review-diff-split`,children:[(0,q.jsxs)(`div`,{className:`review-diff-pair review-diff-column-headings`,children:[(0,q.jsx)(`span`,{children:n(`diffBefore`)}),(0,q.jsx)(`span`,{children:n(`diffAfter`)})]}),_.map((e,t)=>(0,q.jsxs)(`div`,{className:`review-diff-pair`,children:[v(e.old,`old`),v(e.new,`new`)]},e.old?.id??e.new?.id??t))]}):(0,q.jsx)(`pre`,{children:i.map(e=>v(e))})]}),h>0&&(0,q.jsx)(`p`,{className:`review-hidden-lines`,children:n(`gitReviewHiddenLines`,{count:h})}),e.diffTruncated&&(0,q.jsx)(`p`,{className:`review-hidden-lines`,children:n(`gitReviewDiffTruncated`)})]})}function hK(e){switch(e.toLowerCase()){case`read`:return{action:`read`,Icon:Qo};case`write`:return{action:`write`,Icon:yc};case`edit`:return{action:`edit`,Icon:yc};case`bash`:return{action:`command`,Icon:Lc};case`grep`:case`rg`:case`find`:case`fd`:case`glob`:case`tool_search`:return{action:`search`,Icon:Dc};case`ls`:return{action:`list`,Icon:Vs};case`webfetch`:case`websearch`:case`web_fetch`:case`web_search`:return{action:`web`,Icon:Gs};case`plan_ready`:return{action:`plan`,Icon:gs};case`git_show`:case`git_diff`:case`git_log`:return{action:`git`,Icon:Ws};default:return e.startsWith(`subagent`)?{action:`agent`,Icon:$o}:e.startsWith(`workflow`)?{action:`workflow`,Icon:Yc}:{action:`call`,Icon:Xc}}}function gK(e,t,n){let{action:r}=hK(t),i=t.replace(/^subagent_/u,``),a=r===`agent`&&[`spawn`,`send`,`check`,`wait`,`cancel`].includes(i);return a&&n===`returned`?e(`subagentActionDone_${i}`):n===`returned`?e(`toolActionDone_${r}`):e(`toolActivity_${[`running`,`failed`,`cancelled`,`timed_out`].includes(n)?n:`unknown`}`,{action:e(a?`subagentAction_${i}`:`toolAction_${r}`)})}function _K(e){let{action:t}=hK(e);return t===`command`?`run`:t===`workflow`?`flow`:t===`call`?e:t}function vK(e,t){let{action:n}=hK(e),r=n===`search`?t.pattern??t.query??t.path:n===`web`?t.url??t.query:t.path??t.command??t.url??t.query??t.id??t.runId;return typeof r==`string`?r:``}function yK(e){return/^@@ |^--- .*\n\+\+\+ /mu.test(e)?pK(e):e.split(` +`).map((e,t)=>{let n=/^([ +-])\s*(\d+) (.*)$/u.exec(e),r=n?.[1]??e[0]??``,i=r===`+`?`added`:r===`-`?`removed`:`context`,a=n?Number(n[2]):void 0,o=a&&Number.isSafeInteger(a)?a:void 0;return{id:t,kind:i,oldLine:i===`removed`?o:void 0,newLine:i===`removed`?void 0:o,marker:i===`context`?` `:r,code:n?.[3]??(i===`context`?e:e.slice(1))}})}function bK({children:e,className:t,"aria-label":n}){return(0,q.jsx)(`figure`,{"aria-label":n,children:(0,q.jsx)(`pre`,{className:t,tabIndex:0,children:e})})}function xK({call:e,result:t,liveState:n,observed:r=!0,cwd:i,defaultOpen:a=!1,children:o}){let{t:s}=W(),[c,l]=(0,K.useState)(null),u=(0,K.useContext)($E),d=yd(e,t,n),f=!r&&d.state===`running`?`unknown`:d.state,p=t?.forkSnapshotToolResult?s(`toolSnapshotMissingResult`):s(`toolState_${f}`),m=d.resolvedPath??d.path,h=d.displayPath??``,g=d.displayResolvedPath||h||`File reference`,_=Math.max(h.lastIndexOf(`/`),h.lastIndexOf(`\\`)),v=h?h.slice(_+1)||h:m?`File reference`:``,{Icon:y}=hK(e.name),b=pd(d.command??vK(e.name,md(e))).text,x=d.kind===`terminal`||d.kind===`test`,S=[d.command?`$ ${d.command}`:``,d.output].filter(Boolean).join(` -`),S=`${e.id}:${x}`,C=c?.source===S?c.status:null,w=`${e.id}:diff:${d.diff}`,T=c?.source===w?c.status:null,E=d.output.split(` -`).map((e,t)=>({text:e,number:d.offset+t})),D=d.diff?mK(d.diff):[],O=D.filter(e=>e.kind===`added`).length,k=D.filter(e=>e.kind===`removed`).length,A=d.diff||d.change===`created`?(0,q.jsxs)(`span`,{className:`evidence-summary-meta`,title:s(`toolDiffStatsHelp`),children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,O.toLocaleString()]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,k.toLocaleString()]}),d.truncated&&(0,q.jsx)(`span`,{children:s(`gitReviewPartialLabel`)})]}):null,j=d.tests?.failures.map((e,t)=>({text:e,number:t+1}))??[];return(0,q.jsxs)(`details`,{className:`tool-evidence-card evidence-${d.kind}`,"data-state":f,"data-tool":e.name,open:a||void 0,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{className:`evidence-icon`,"aria-hidden":`true`,children:(0,q.jsx)(v,{})}),(0,q.jsxs)(`span`,{className:`evidence-target`,title:d.path||y,children:[(0,q.jsx)(`span`,{className:`tool-action`,children:f===`returned`&&d.change===`created`?s(`toolFileChange_created`):dK(s,e.name,f)}),h?(0,q.jsx)(`span`,{className:`evidence-filename`,children:_}):y?(0,q.jsx)(`span`,{className:`evidence-command`,children:y}):null]}),A,(0,q.jsx)(os,{className:`evidence-chevron`,"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`evidence-status`,children:p})]}),(0,q.jsxs)(`div`,{className:`evidence-content`,children:[d.path&&!d.diff&&(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`strong`,{children:s(`toolRequestedFile`)}),` `,u&&m?(0,q.jsx)(`button`,{className:`artifact-link`,type:`button`,onClick:()=>u.open(m),children:(0,q.jsx)(`code`,{children:m})}):(0,q.jsx)(`code`,{children:m}),i&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`br`,{}),(0,q.jsxs)(`small`,{children:[s(`toolWorkspace`),`: `,i]})]})]}),b&&(0,q.jsxs)(`figure`,{className:`evidence-shell`,"aria-label":s(`toolCallOutput`),children:[(0,q.jsxs)(`figcaption`,{children:[(0,q.jsxs)(`span`,{className:`evidence-shell-label`,children:[(0,q.jsx)(Vc,{"aria-hidden":`true`}),e.name===`bash`?`Bash`:`Shell`]}),(0,q.jsxs)(`span`,{className:`evidence-process-meta`,children:[p,d.exitCode===void 0?d.signal?` · ${d.signal}`:``:` · exit ${d.exitCode}`]}),(0,q.jsx)(`button`,{type:`button`,"data-copied":C===`copiedCode`||void 0,"aria-label":s(C===`copiedCode`?`copiedCode`:`copyCode`),title:s(C===`copiedCode`?`copiedCode`:`copyCode`),onClick:async()=>{let e=await td(x);l({source:S,status:e?`copiedCode`:`copyCodeFailed`})},children:C===`copiedCode`?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{})})]}),d.command&&(0,q.jsxs)(`pre`,{className:`evidence-shell-command`,children:[`$ `,d.command]}),(d.output||!d.command)&&(0,q.jsx)(`pre`,{className:`evidence-shell-output`,tabIndex:0,children:d.output||s(`noOutput`)}),C===`copyCodeFailed`&&(0,q.jsx)(`p`,{role:`status`,className:`evidence-warning`,children:s(C)})]}),d.truncated&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:s(`toolPartialEvidence`)}),d.change&&!d.diff&&(0,q.jsx)(`p`,{children:s(`toolFileChange_${d.change}`)}),d.kind===`change`&&!d.diff&&!d.change&&(0,q.jsx)(`p`,{children:d.evidenceUnavailable??s(`toolChangeUnavailable`)}),d.tests&&(0,q.jsxs)(`figure`,{className:`evidence-test-summary`,"aria-label":`Test evidence`,children:[(0,q.jsx)(`figcaption`,{children:(0,q.jsx)(`strong`,{children:s(`toolTestResults`,{format:d.tests.format})})}),(0,q.jsx)(`p`,{children:s(`toolTestCounts`,d.tests)}),(0,q.jsx)(`p`,{children:s(`toolTestCountsHelp`)}),j.map(e=>(0,q.jsx)(hK,{"aria-label":`Failure excerpt ${e.number}`,children:e.text},e.number))]}),b?null:d.diff?(0,q.jsxs)(`figure`,{className:`evidence-diff`,"aria-label":`Change diff`,children:[(0,q.jsxs)(`figcaption`,{children:[u&&m?(0,q.jsx)(`button`,{className:`evidence-diff-file`,type:`button`,title:m,"aria-label":m,onClick:()=>u.open(m),children:_}):(0,q.jsx)(`span`,{className:`evidence-diff-file`,title:m,children:_}),A,(0,q.jsx)(`button`,{className:`evidence-copy`,type:`button`,"data-copied":T===`copiedCode`||void 0,"aria-label":s(T===`copiedCode`?`copiedCode`:`copyCode`),title:s(T===`copiedCode`?`copiedCode`:`copyCode`),onClick:async()=>{let e=await td(d.diff??``);l({source:w,status:e?`copiedCode`:`copyCodeFailed`})},children:T===`copiedCode`?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{})})]}),(0,q.jsx)(`pre`,{className:`evidence-diff-lines`,children:D.map(e=>(0,q.jsxs)(`span`,{className:`evidence-diff-row diff-${e.kind}`,children:[(0,q.jsx)(`span`,{className:`evidence-line-number`,"aria-hidden":`true`,children:e.newLine??e.oldLine??``}),(0,q.jsx)(`span`,{className:`evidence-diff-marker`,children:e.marker}),(0,q.jsx)(`span`,{children:e.code}),` -`]},e.id))}),T===`copyCodeFailed`&&(0,q.jsx)(`p`,{role:`status`,className:`evidence-warning`,children:s(T)})]}):d.numberLines?(0,q.jsx)(hK,{className:`evidence-lines`,"aria-label":`File content`,children:E.map(e=>(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`span`,{className:`evidence-line-number`,"aria-hidden":`true`,children:e.number}),e.text,` -`]},e.number))}):(0,q.jsx)(hK,{className:`evidence-log`,"aria-label":`Tool output`,children:d.output||s(`noOutput`)}),d.kind===`file`&&d.truncated&&(0,q.jsx)(`p`,{children:s(`toolReadMore`)}),d.recovery&&(0,q.jsxs)(`p`,{children:[s(`toolFullOutputReference`),` `,(0,q.jsx)(`code`,{children:d.recovery})]}),d.readRecovery&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:d.readRecovery}),(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:s(`toolRawEvidence`)}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`code`,{children:e.name})}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`strong`,{children:s(`toolCallArguments`)})}),(0,q.jsx)(`pre`,{children:d.rawArguments}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`strong`,{children:s(`toolCallOutput`)})}),(0,q.jsx)(`pre`,{children:d.rawResult})]}),o]})]})}function _K({changes:e,onReview:t}){let{t:n}=W(),[r,i]=(0,K.useState)(!1),a=(0,K.useId)();if(e.state===`unavailable`||e.files.length===0)return null;let o=e.state===`partial`,s=e.source===`file-tools`,c=e.fileCount===null;return(0,q.jsxs)(`section`,{className:`turn-changes`,"aria-label":n(`turnChangesReview`),children:[(0,q.jsxs)(`header`,{className:`turn-changes-header`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`turn-changes-summary`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(e=>!e),children:[(0,q.jsx)(Ms,{className:`turn-changes-icon`,"aria-hidden":`true`}),(0,q.jsx)(`strong`,{title:n(s?`turnEditsScope`:`turnChangesScope`),children:n(s?c?`turnEditsPartial`:`turnEdits`:o?`turnChangesPartial`:`turnChanges`,{count:e.fileCount??e.files.length})}),!c&&!e.files.some(e=>e.binary||e.statsUnavailable)&&(0,q.jsxs)(`span`,{className:`turn-changes-totals`,children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,e.additions]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,e.deletions]})]}),o&&!s&&(0,q.jsx)(`span`,{className:`turn-changes-warning`,children:n(`turnChangesIncomplete`)}),(0,q.jsx)(is,{className:r?`up`:``,"aria-hidden":`true`})]}),(0,q.jsx)(`button`,{type:`button`,className:`turn-changes-review-button`,"aria-label":n(`turnChangesReview`),disabled:!t,onClick:()=>t?.(e.promptEntryId,e.files[0]?.path),children:n(`reviewChanges`)})]}),(0,q.jsx)(`div`,{className:`turn-changes-list`,id:a,hidden:!r,children:e.files.map(r=>{let i=Math.max(r.path.lastIndexOf(`/`),r.path.lastIndexOf(`\\`));return(0,q.jsxs)(`button`,{type:`button`,className:`turn-changes-file`,title:r.path,"aria-label":r.path,disabled:!t,onClick:()=>t?.(e.promptEntryId,r.path),children:[(0,q.jsxs)(`span`,{className:`turn-changes-path`,children:[(0,q.jsx)(`strong`,{children:r.path.slice(i+1)}),i>=0&&(0,q.jsx)(`span`,{children:r.path.slice(0,i)})]}),(0,q.jsx)(`span`,{className:`turn-changes-file-stats`,children:r.binary?(0,q.jsx)(`span`,{children:n(`gitReviewBinaryShort`)}):r.statsUnavailable?(0,q.jsx)(`span`,{title:n(`turnEditReason_${r.statsUnavailable}`),children:n(`turnEditStatsUnknown`)}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,r.additions]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,r.deletions]})]})})]},r.path)})})]})}function vK({item:e,position:t,current:n,onNavigate:r,onPreview:i}){let{t:a}=W(),o=(0,K.useRef)(()=>{}),s=ed({placement:`start`,delay:150,hideDelay:100,touchTrigger:`none`,onShow:(0,K.useCallback)(()=>i(e.entryId,()=>o.current()),[e.entryId,i])});return o.current=s.hide,(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{ref:s.ref,className:`turn-tick`,type:`button`,"data-turn-entry":e.entryId,"aria-label":a(`conversationTurnPosition`,{position:t}),"aria-describedby":s.describedBy,"aria-current":n?`location`:void 0,onClick:()=>{s.hide(),r(e.entryId)},children:(0,q.jsx)(`span`,{className:`turn-tick-mark`,"aria-hidden":`true`})}),s.renderHoverCard((0,q.jsx)(`span`,{className:`turn-preview`,children:e.previewState===`idle`||e.previewState===`loading`?(0,q.jsx)(`span`,{role:`status`,children:a(`turnPreviewLoading`)}):e.previewState===`unavailable`?(0,q.jsx)(`span`,{role:`status`,children:a(`turnPreviewUnavailable`)}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`turn-preview-prompt`,children:e.title}),e.reply&&(0,q.jsx)(`span`,{className:`turn-preview-reply`,children:e.reply})]})}),{className:`turn-preview-layer`})]})}function yK({items:e,viewport:t,onNavigate:n,readingHistory:r,onRequestPreview:i,enabled:a=!0,onHidden:o}){let{t:s}=W(),c=(0,K.useRef)(null),l=JSON.stringify(e.map(e=>e.entryId)),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(!1),p=(0,K.useRef)(0),[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)({top:0,height:0,visible:!1,current:[]}),v=(0,K.useCallback)(()=>{u.current?.hide(),u.current=null,d.current&&d.current.captureTarget.hasPointerCapture?.(d.current.pointerId)&&d.current.captureTarget.releasePointerCapture(d.current.pointerId),d.current=null,p.current++,o?.()},[o]),y=(0,K.useCallback)((e,n)=>{if(!a||!t.current||!c.current||c.current.style.visibility===`hidden`||t.current.checkVisibility?.()===!1||c.current.checkVisibility?.()===!1||getComputedStyle(t.current).display===`none`||getComputedStyle(c.current).display===`none`){n();return}u.current?.entryId!==e&&u.current?.hide(),u.current={entryId:e,hide:n},i?.(e)},[a,t,i]),b=(0,K.useCallback)((e,t=!1)=>{u.current?.hide();let r=++p.current;h(!1),Promise.resolve(n(e,t)).then(e=>{p.current===r&&e===!1&&h(!0)})},[n]);return(0,K.useLayoutEffect)(()=>{let e=t.current,n=e?.parentElement,i=JSON.parse(l);if(!e||!n){v();return}let o,s=r?n.querySelector(`.jump-to-latest`):null,u=()=>{o=void 0;let t=e.getBoundingClientRect(),r=n.getBoundingClientRect(),l=new Map;for(let t of e.querySelectorAll(`[data-history-entry]`)){let e=t.dataset.historyEntry;e&&!l.has(e)&&l.set(e,t)}let u=e.querySelector(`.conversation-turn`)??l.values().next().value,d=e.offsetWidth>0?t.width/e.offsetWidth:1,f=a&&t.height>0&&d>0&&!!u&&(t.right-u.getBoundingClientRect().right)/d>=48&&e.checkVisibility?.()!==!1&&getComputedStyle(e).display!==`none`&&(!c.current||getComputedStyle(c.current).display!==`none`);f||v();let p=s?.getBoundingClientRect(),m=Math.min(t.bottom-8,p&&p.height>0?p.top-12:1/0),h=Math.max(0,m-t.top-8),g=i.flatMap(e=>{let n=l.get(e);if(!n)return[];let r=(n.closest(`.conversation-turn`)??n).getBoundingClientRect();return r.bottom>t.top+16&&r.tope.top===y.top&&e.height===y.height&&e.visible===f&&e.current.join(`\0`)===g.join(`\0`)?e:y)},d=()=>{o===void 0&&(o=requestAnimationFrame(u))};u(),e.addEventListener(`scroll`,d),window.addEventListener(`resize`,d);let f=typeof ResizeObserver>`u`?void 0:new ResizeObserver(d);f?.observe(e),f?.observe(n),s&&f?.observe(s);for(let t of e.children)f?.observe(t);let p=new MutationObserver(d);return p.observe(e,{childList:!0,subtree:!0}),()=>{o!==void 0&&cancelAnimationFrame(o),e.removeEventListener(`scroll`,d),window.removeEventListener(`resize`,d),f?.disconnect(),p.disconnect()}},[l,t,r,a,v]),(0,K.useLayoutEffect)(()=>{if(g.height,!g.visible||d.current)return;let e=c.current,t=Array.from(e?.querySelectorAll(`[data-turn-entry]`)??[]),n=t.find(e=>e===document.activeElement)??t.find(e=>e.matches(`:hover`))??t.find(e=>g.current.includes(e.dataset.turnEntry??``));if(!e||!n)return;let r=e.getBoundingClientRect(),i=n.getBoundingClientRect();i.topr.bottom&&(e.scrollTop+=i.bottom-r.bottom)},[g.current,g.height,g.visible,l]),(0,K.useLayoutEffect)(()=>{let n=t.current;if(!n)return;let r=t=>{if(!a||t.defaultPrevented||t.isComposing||!t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||![`ArrowUp`,`ArrowDown`].includes(t.key)||!n.parentElement?.contains(document.activeElement)||n.checkVisibility?.()===!1||getComputedStyle(n).display===`none`||getComputedStyle(n).visibility===`hidden`||n.getBoundingClientRect().height<=0)return;let r=new Map;for(let e of n.querySelectorAll(`[data-history-entry]`)){let t=e.dataset.historyEntry;t&&!r.has(t)&&r.set(t,e)}let i=e.flatMap((e,t)=>{let n=r.get(e.entryId);return n?[{item:e,index:t,top:n.getBoundingClientRect().top}]:[]}),o=n.getBoundingClientRect().top,s;if(t.key===`ArrowDown`){let t=i.findIndex(e=>e.top>o+24);s=i.length===0?e[0]:t<0?e[i.at(-1).index+1]:e[(i[t-1]?.index??-1)+1]}else{for(let t=i.length-1;t>=0;t--){let n=i[t];if(Math.abs(n.top-o)<=24){s=e[n.index-1];break}if(n.tope.top>o+24)&&(s=i[0]?.item),i.length===0&&(s=e.at(-1))}s&&(t.preventDefault(),b(s.entryId))};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[t,a,e,b]),(0,K.useLayoutEffect)(()=>()=>v(),[v]),e.length<4?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`nav`,{ref:c,className:`turn-rail`,"aria-label":s(`conversationTurns`),style:{top:g.top,maxHeight:g.height,visibility:g.visible?`visible`:`hidden`},onClickCapture:e=>{f.current&&=(e.preventDefault(),e.stopPropagation(),!1)},onPointerDown:e=>{if(!e.isPrimary||e.button!==0)return;let t=e.target instanceof Element?e.target.closest(`.turn-tick`):null;!t||!e.currentTarget.contains(t)||(f.current=!1,d.current={pointerId:e.pointerId,captureTarget:t,y:e.clientY,moved:!1},t.setPointerCapture?.(e.pointerId))},onPointerMove:e=>{let t=d.current;if(!t||t.pointerId!==e.pointerId||Math.abs(e.clientY-t.y)<3&&!t.moved)return;t.moved=!0,f.current=!0;let n=Array.from(e.currentTarget.querySelectorAll(`[data-turn-entry]`)).find(t=>{let n=t.getBoundingClientRect();return e.clientY>=n.top&&e.clientY{let t=d.current;d.current=null,t?.captureTarget.hasPointerCapture?.(e.pointerId)&&t.captureTarget.releasePointerCapture(e.pointerId)},onPointerCancel:e=>{let t=d.current;d.current=null,t?.captureTarget.hasPointerCapture?.(e.pointerId)&&t.captureTarget.releasePointerCapture(e.pointerId),f.current=!1},children:e.map((e,t)=>(0,q.jsx)(vK,{item:e,position:t+1,current:g.current.includes(e.entryId),onNavigate:b,onPreview:y},e.entryId))}),m&&(0,q.jsx)(`span`,{className:`turn-navigation-error`,role:`status`,children:s(`turnPreviewUnavailable`)})]})}function bK(e){if(e.role!==`custom`||e.customType!==`openpi-setup-request`||e.truncation?.details)return e;let t=e.details;return!t||typeof t!=`object`||Array.isArray(t)||!(`command`in t)||t.command!==`openpi-setup`&&t.command!==`my-pi-setup`||!(`request`in t)||typeof t.request!=`string`?e:{...e,role:`user`,content:`/${t.command}${t.request?` ${t.request}`:``}`,parts:void 0}}function xK(e,t){let n=e.parentId,r=new Set;for(let e=0;n&&e<32;e++){if(r.has(n))return;r.add(n);let e=t(n);if(!e||e.id!==n)return;if(e.message?.role!==`system`)return e.message;n=e.parentId}}function SK(e,t){let n=bK(e);return e.customType===`openpi-setup-request`&&n.role===`user`&&t?.role===`user`&&t.customType===`openpi-web-command-input`&&typeof t.commandId==`string`&&t.commandId.length>0&&t.commandId.length<=128&&!/[\u0000-\u001f\u007f]/u.test(t.commandId)&&t.content===n.content}function CK(e){if(e.role===`toolResult`&&e.toolCallId&&!e.toolCallId.includes(`[truncated]`))return`tool-result-${e.toolCallId}`;if(e.role!==`assistant`||e.truncation?.partsOmitted)return;let t=e.parts?.filter(e=>e.type===`toolCall`);if(!(!t?.length||t.some(e=>!e.id||e.id.includes(`[truncated]`))))return`tool-calls-${JSON.stringify(t.map(e=>e.id))}`}function wK(e){let t=CK(e);if(t)return t;if(e.timestamp!==void 0)return`message-${e.role}-${e.timestamp}`}function TK(e){return[`assistant`,`toolResult`].includes(e.role??``)&&!e.truncation?.truncated?JSON.stringify(e):null}function EK(e){return JSON.stringify([e.role,e.content,(e.parts??[]).filter(t=>e.role!==`user`||t.type!==`text`).map(t=>t.type===`image`?[t.type,t.mimeType,e.role===`user`?void 0:t.name]:t.type),e.stopReason,e.errorMessage,e.toolCallId])}function DK(e){return e.role===`user`?EK(e):JSON.stringify({...e,timestamp:void 0})}var OK=new WeakMap;function kK(e,t){let n=OK.get(e),r=n?.get(t);if(r&&r.length===e.length&&r.head===e[0]&&r.tail===e[e.length-1])return r.projection;let i=new Map(e.map(e=>[e.id,e])),a=new Map;for(let t of e){let e=t.message&&TK(t.message);if(!e)continue;let n=a.get(e)??[];n.push(t),a.set(e,n)}let o=e.flatMap(e=>{if(e.forkSnapshotBoundary)return[{key:e.id,entryId:e.id,timestamp:e.timestamp,forkSnapshotBoundary:!0,message:{role:`custom`,content:``}}];if(e.type===`compaction`)return[{key:e.id,entryId:e.id,timestamp:e.timestamp,compaction:!0,message:{role:`custom`,content:``}}];if(`turnTiming`in e&&e.turnTiming&&e.turnTiming.sessionId===t)return[{key:e.id,timestamp:e.timestamp,timing:e.turnTiming,message:{role:`custom`,content:``}}];if(e.type!==`message`||!e.message)return[];let n=bK(e.message),r=xK(e,e=>i.get(e));return SK(e.message,r)?[]:[{key:e.id,entryId:e.id,timestamp:e.timestamp,message:n}]}),s=new Map,c=new Map;o.forEach((e,t)=>{if(e.entryId&&s.set(e.entryId,t),e.timing||e.compaction||e.forkSnapshotBoundary)return;let n=wK(e.message)??e.entryId??e.key,r=c.get(n)??[];r.push(t),c.set(n,r)});let l=[];for(let e of c.values())if(!(e.length<2))for(let t of e){let e=o[t].entryId;e&&l.push(e)}let u=new Map,d=0;for(let t of e){if(t.message?.role!==`custom`||t.message.truncation?.truncated)continue;let e=DK(t.message),n=u.get(e)??[];n.push(d),u.set(e,n),d++}let f=o.map(e=>({identity:wK(e.message),signature:DK(e.message)})),p=new Map,m=new Map;f.forEach((e,t)=>{let n=m.get(e.signature)??[];if(n.push(t),m.set(e.signature,n),e.identity===void 0)return;let r=p.get(e.identity)??[];r.push(t),p.set(e.identity,r)});let h=new Map(e.map((e,t)=>[e.id,t])),g=o.filter(e=>e.message.role===`user`).map(e=>({key:e.entryId??e.key,position:h.get(e.entryId??e.key),parentId:i.get(e.entryId??e.key)?.parentId,signature:EK(e.message)})),_=new Map;for(let e of g){let t=_.get(e.signature)??[];t.push(e),_.set(e.signature,t)}let v={nativeById:i,exactNative:a,baseEntries:o,indexById:s,lookupIndexes:c,ambiguousNativeIds:l,customIndexes:u,nativeByIdentity:p,nativeByLegacySignature:m,nativeMessages:f,promptCandidates:g,promptsBySignature:_,commandInputs:new Map(o.flatMap(e=>e.message.role===`user`&&e.message.customType===`openpi-web-command-input`&&e.message.commandId?[[e.message.commandId,e.entryId??e.key]]:[])),persistedPositions:h};return n||(n=new Map,OK.set(e,n)),n.set(t,{projection:v,length:e.length,head:e[0],tail:e[e.length-1]}),v}function AK(e,t){if(!e)return-1;for(let n of e)if(!t.has(n))return n;return-1}function jK(e,t){let n=[e.timingKey,e.key,e.entryId,e.ambiguousTimingIdentity?void 0:wK(e.message)];for(let e of n){if(!e)continue;let n=t[e];if(n!==void 0)return n}}function MK(e,t,n){let{nativeRowKeys:r,ambiguousTimingIds:i}=n,a=e.selectedSession,o=kK(a?.entries??[],a?.id);for(let e of r.keys())o.nativeById.has(e)||r.delete(e);for(let e of i)o.nativeById.has(e)||i.delete(e);let s=new Map;for(let e of t){if(e.optimistic)continue;let t=TK(e.message);if(!t)continue;let n=s.get(t)??[];n.push(e),s.set(t,n)}let c=new Set(r.values());for(let[e,t]of s){let n=o.exactNative.get(e);if(n?.length!==1||t.length!==1)continue;let a=n[0].id,s=t[0].key;r.has(a)||i.has(a)||c.has(s)||o.nativeById.has(s)||(r.set(a,s),c.add(s))}for(let e of o.ambiguousNativeIds)i.add(e);let l=new Map,u=new Set;for(let e of t){let t=wK(e.message)??e.key,n=o.lookupIndexes.get(t);if(!n)continue;let a=DK(e.message),s=n.filter(e=>o.nativeMessages[e]?.signature===a);if((s.length!==n.length||n.length>1)&&u.add(t),s.length===1){let n=s[0],a=o.baseEntries[n].entryId,c=a?r.get(a):void 0;if(c&&c!==e.key||a&&i.has(a)&&!c&&e.key!==a){u.add(t);continue}let d=l.get(n);d===void 0||d===e.key?l.set(n,e.key):(l.set(n,null),u.add(t))}}for(let e of u)for(let t of o.lookupIndexes.get(e)??[]){let e=o.baseEntries[t].entryId;e&&i.add(e)}let d=new Set(t.flatMap(e=>e.optimistic?.projectedEntryId?[e.optimistic.projectedEntryId]:[])),f=[],p=[],m=e.selectedExecution?.sessionId===a?.id&&e.selectedExecution?.sessionPath===a?.path?e.selectedExecution:void 0,h=m?.pendingFollowUps??0,g=Math.max(0,t.filter(e=>e.optimistic?.admitted&&!e.optimistic.projectedEntryId&&!o.commandInputs.has(e.optimistic.commandId)).length-h),_=0,v=new Set,y=new Set,b=new Set,x=[];for(let e of t){if(e.optimistic?.projectedEntryId)continue;if(e.message.role===`custom`&&!e.message.truncation?.truncated){let t=DK(e.message),n=AK(o.customIndexes.get(t),y);if(n>=0){y.add(n);continue}}let n=e.optimistic?.commandId??(e.key.startsWith(`optimistic-`)?e.key.slice(11):void 0),r=n?o.commandInputs.get(n):void 0;if(r){e.optimistic&&f.push({key:e.key,entryId:r});continue}let i=bK(e.message);if(i.role===`user`&&e.optimistic){let t=e.optimistic.afterEntryId===null?-1:o.persistedPositions.get(e.optimistic.afterEntryId),n=!e.optimistic.admitted||_>=g?void 0:o.promptsBySignature.get(EK(i))?.find(n=>n.position!==void 0&&(t===void 0?n.parentId===e.optimistic?.afterEntryId:n.position>t)&&!d.has(n.key));if(n){d.add(n.key),f.push({key:e.key,entryId:n.key}),_++;continue}}else{let e=i.role===`user`?t.find(e=>e.optimistic?.admitted&&!e.optimistic.projectedEntryId&&!v.has(e.key)&&!f.some(t=>t.key===e.key)&&e.optimistic.sessionId===a?.id&&e.optimistic.sessionPath===a?.path&&EK(bK(e.message))===EK(i)):void 0;if(e){v.add(e.key);continue}let n=wK(i),r=CK(i),s=DK(i),c=n===void 0?AK(o.nativeByLegacySignature.get(s),b):(o.nativeByIdentity.get(n)??[]).find(e=>(r!==void 0||!b.has(e))&&(r!==void 0||o.nativeMessages[e]?.signature===s))??-1;if(c>=0){b.add(c);continue}}let s={key:e.key,timingKey:e.key,ambiguousTimingIdentity:u.has(wK(i)??e.key)?!0:void 0,timestamp:e.timestamp??new Date().toISOString(),message:i,optimistic:e.optimistic};i.role===`user`&&e.optimistic?p.push(s):x.push(s)}let S=new Map;for(let e of m?.queuedMessages??[])S.set(e,(S.get(e)??0)+1);let C=p.filter(e=>{if(!e.optimistic?.admitted||e.optimistic.commandId===m?.activeTurn?.commandId)return!0;let t=S.get(e.message.content)??0;return!t||(S.set(e.message.content,t-1),!1)}),w=new Map(t.flatMap(e=>e.optimistic?.projectedEntryId?[[e.optimistic.projectedEntryId,e.key]]:[]));for(let e of f)w.set(e.entryId,e.key);let T=o.baseEntries,E=(e,t)=>{T===o.baseEntries&&(T=o.baseEntries.slice()),T[e]=t};for(let e of i){let t=o.indexById.get(e);if(t===void 0)continue;let n=T[t];!n||n.ambiguousTimingIdentity||E(t,{...n,ambiguousTimingIdentity:!0})}for(let[e,t]of l){if(t===null)continue;let n=T[e];!n||n.timingKey===t||E(e,{...n,timingKey:t})}for(let[e,t]of r){let n=o.indexById.get(e);if(n===void 0)continue;let r=T[n];!r||r.key===t||E(n,{...r,key:t})}for(let[e,t]of w){let n=o.indexById.get(e);if(n===void 0)continue;let r=T[n];!r||r.key===t||E(n,{...r,key:t})}return{entries:T.concat(x,C),projectedPrompts:f}}function NK({message:e,sessionId:t,path:n,entryId:r}){let{t:i}=W(),[a,o]=(0,K.useState)(null),s=JSON.stringify([t,n,r]),c=e.parts?.filter(e=>e.type===`image`)??[];if(c.length===0)return null;let l=new Map,u=a?.scope===s?a:null,d=()=>o(e=>e?{...e,open:!1}:null);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`section`,{className:`message-attachments`,"aria-label":i(`imageAttachments`),children:c.map(e=>{let a=`${e.mimeType}:${e.name??``}:${e.previewUrl??``}`,c=l.get(a)??0;l.set(a,c+1);let u=`${a}:${c}`,d=t&&n&&r&&typeof e.sourcePartIndex==`number`&&Number.isSafeInteger(e.sourcePartIndex)&&e.sourcePartIndex>=0?{id:`${r}:${e.sourcePartIndex}`,entryId:r,partIndex:e.sourcePartIndex,kind:`image`,name:e.name??i(`attachedImage`)}:null,f=e.previewUrl?(0,q.jsx)(`img`,{src:e.previewUrl,alt:e.name??i(`attachedImage`)},`preview`):d&&t&&n?(0,q.jsx)(`span`,{className:`message-attachment-preview`,children:(0,q.jsx)(XW,{sessionId:t,path:n,source:d,thumbnail:!0})},`preview`):(0,q.jsx)(qs,{"aria-hidden":`true`},`preview`),p=(0,q.jsx)(`span`,{children:e.name??i(`attachedImage`)},`name`);return d?(0,q.jsxs)(`button`,{className:`message-attachment`,type:`button`,title:d.name,"aria-label":d.name,onClick:()=>o({scope:s,source:d,open:!0}),children:[f,p]},u):(0,q.jsxs)(`div`,{className:`message-attachment`,children:[f,p]},u)})}),t&&n&&u&&(0,q.jsx)(eG,{sessionId:t,path:n,source:u.source,open:u.open,onSelect:d,onClose:d})]})}function PK(e,t,n){let r=(0,K.useMemo)(()=>new de,[]),i=e?.history?.leafEntryId??e?.entries.at(-1)?.id,a=e?.id,o=e?.path,s=JSON.stringify([e?.id,e?.path,i]),c=(0,K.useRef)(s);c.current=s;let[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)({}),p=(0,K.useRef)(new Map),m=(0,K.useMemo)(()=>a&&o&&i?{sessionId:a,sessionPath:o,entryId:i}:null,[a,o,i]);(0,K.useEffect)(()=>{if(u(null),f({}),!n||!m)return;let e=new AbortController,t=async()=>{try{let t=null,n=[],i=new Set;for(let a=0;a<10;a++){let a=await r.sessionPromptHistory(m,t,e.signal);if(e.signal.aborted||c.current!==s||a.sessionId!==m.sessionId||a.sessionPath!==m.sessionPath||a.anchorEntryId!==m.entryId||a.requestedBeforeEntryId!==t||a.entryIds.length>100||a.entryIds.some(e=>!e||i.has(e))||new Set(a.entryIds).size!==a.entryIds.length||a.nextBeforeEntryId!==null&&(a.entryIds.length===0||a.nextBeforeEntryId!==a.entryIds[0]))return;for(let e of a.entryIds)i.add(e);if(n=[...a.entryIds,...n],a.nextBeforeEntryId===null){u({scope:s,ids:n});return}t=a.nextBeforeEntryId}}catch{}},i=typeof window.requestIdleCallback==`function`?window.requestIdleCallback(()=>void t(),{timeout:2e3}):void 0,a=i===void 0?window.setTimeout(()=>void t(),0):void 0;return()=>{e.abort(),i!==void 0&&window.cancelIdleCallback(i),a!==void 0&&window.clearTimeout(a);for(let e of p.current.values())e.abort();p.current.clear()}},[s,n,m,r]);let h=(0,K.useMemo)(()=>{let e=new Map(t.map(e=>[e.entryId,e]));if(l?.scope!==s)return t;let n=new Set(l.ids);return[...l.ids.map(t=>e.get(t)??d[t]??{entryId:t,title:``,previewState:`idle`}),...t.filter(e=>!n.has(e.entryId))]},[l,s,t,d]),g=(0,K.useRef)(h);return g.current=h,{items:h,requestPreview:(0,K.useCallback)(e=>{if(!n||!m||c.current!==s||p.current.has(e))return;let t=g.current.find(t=>t.entryId===e);if(!t||t.previewState===void 0||t.previewState===`ready`)return;let i=new AbortController;p.current.set(e,i),f(t=>({...t,[e]:{entryId:e,title:``,previewState:`loading`}})),r.sessionPromptPreview(m,e,i.signal).then(t=>{if(!(i.signal.aborted||c.current!==s)){if(t.sessionId!==m.sessionId||t.sessionPath!==m.sessionPath||t.anchorEntryId!==m.entryId||t.entryId!==e||typeof t.prompt!=`string`||typeof t.response!=`string`||Array.from(t.prompt).length>240||Array.from(t.response).length>240)throw Error(`Unverified preview`);f(n=>({...n,[e]:{entryId:e,title:t.prompt,reply:t.response,previewState:`ready`}}))}}).catch(()=>{!i.signal.aborted&&c.current===s&&f(t=>({...t,[e]:{entryId:e,title:``,previewState:`unavailable`}}))}).finally(()=>{p.current.get(e)===i&&p.current.delete(e)})},[n,m,s,r])}}var FK=`[data-history-entry], [data-history-message], [data-history-result]`;function IK(e,t,n,r){let i=(0,K.useRef)(null),a=(0,K.useCallback)(()=>{let r=e.current;if(!r||t.current){i.current=null;return}let a=r.getBoundingClientRect(),o=Array.from(r.querySelectorAll(FK)).filter(e=>{let t=e.getBoundingClientRect();if(t.height<=0||t.bottom<=a.top||t.top>=a.bottom)return!1;for(let t=e.parentElement;t&&t!==r;t=t.parentElement){if(t.hidden)return!1;let e=getComputedStyle(t);if(/^(auto|scroll|overlay)$/.test(e.overflowY)&&t.scrollHeight>t.clientHeight)return!1}return!0}),s=o.find(e=>!o.some(t=>t!==e&&e.contains(t)));i.current=s?{scope:n,element:s,offset:s.getBoundingClientRect().top-a.top}:null},[e,t,n]),o=(0,K.useCallback)(()=>{let a=e.current,o=i.current;if(!a||t.current||!o||o.scope!==n)return;if(!a.contains(o.element)||!o.element.getClientRects().length){i.current=null;return}let s=o.element.getBoundingClientRect().top-a.getBoundingClientRect().top-o.offset;if(Math.abs(s)>.5){let e=a.scrollTop+s;typeof a.scrollTo==`function`?a.scrollTo({top:e,behavior:`instant`}):a.scrollTop=e,r.current=a.scrollTop}},[e,t,n,r]);return(0,K.useLayoutEffect)(()=>{o(),a()}),{capture:a,restore:o,clear:(0,K.useCallback)(()=>{i.current=null},[])}}var LK=1e3,RK=ye*4;function zK(e,t){return t.history?.leafEntryId===e.validatedLeaf||t.history?.anchorEntryId===e.anchor&&t.history.anchorOnBranch===!0}function BK(e,t,n=t.entriesOmitted){let r=e.filter(e=>e.message?.truncation).length,i=e.reduce((e,t)=>e+(t.message?.truncation?.partsOmitted??0),0);return{...t,entriesOmitted:n,messagesTruncated:r,messagePartsOmitted:i,truncated:n>0||r>0||i>0}}function VK(e,t){let n=t.history?.leafEntryId??null;if(n===e.validatedLeaf)return e;let r=t.entries.findIndex(t=>t.id===e.anchor),i=r>=0?t.entries.slice(r+1):t.entries[0]?.parentId===e.anchor?t.entries:null,a=i?.reduce((e,t)=>e+pe(t)+1,0)??0;return i&&e.session.entries.length+i.length<=LK&&e.session.bytes+a<=RK?{...e,anchor:n??e.anchor,validatedLeaf:n,session:{...e.session,entries:[...e.session.entries,...i],bytes:e.session.bytes+a,truncation:BK([...e.session.entries,...i],e.session.truncation)}}:{...e,validatedLeaf:n}}function HK(e,t,n,r){let i=(0,K.useMemo)(()=>new de,[]),a=(0,K.useMemo)(()=>n??new Map,[n]),o=iK(e),s=(0,K.useRef)({scope:o,state:a.get(o)});s.current.scope!==o&&(s.current={scope:o,state:a.get(o)});let c=(0,K.useRef)({selected:e,callbacks:t});c.current={selected:e,callbacks:t};let l=(0,K.useRef)(s.current.state?.window??null),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(null),[p,m]=(0,K.useState)(l.current),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(0),x=(0,K.useRef)(o),S=(0,K.useRef)(null),C=r?JSON.stringify([r.sessionId,r.sessionPath,r.entryId,r.revision]):null,w=r&&e&&C!==S.current&&r.sessionId===e.id&&r.sessionPath===e.path&&r.session.id===e.id&&r.session.path===e.path&&r.session.history?.anchorEntryId===r.entryId&&r.session.history.anchorOnBranch===!0&&r.session.entries.some(e=>e.id===r.entryId)?{session:r.session,anchor:r.session.entries.at(-1).id,validatedLeaf:r.session.history?.leafEntryId??null}:null,T=(0,K.useCallback)(e=>{l.current=e,aK(a,iK(e.session),{window:e}),m(e),c.current.callbacks.onAnchorChange?.({sessionId:e.session.id,sessionPath:e.session.path,entryId:e.anchor})},[a]),E=(0,K.useCallback)((e=!1)=>{u.current?.controller.abort(),u.current=null,d.current=null,a.delete(iK(l.current?.session??c.current.selected)),l.current=null,a.persist?.(),m(null),g(!1),v(e?`historyChanged`:null),f.current=null,c.current.callbacks.onAnchorChange?.(null),b(e=>e+1)},[a]),D=(0,K.useCallback)((e=!1)=>{let t=l.current,n=c.current.selected;if(!t||!n)return;let r=JSON.stringify([iK(n),t.anchor,n.history?.leafEntryId]);if(!e&&f.current?.key===r)return;let i={key:r};f.current=i,v(null);let a=()=>{f.current===i&&l.current===t&&(u.current?.controller.abort(),u.current=null,g(!1),v(`historyValidationUnavailable`))};c.current.callbacks.onAnchorChange?.({sessionId:t.session.id,sessionPath:t.session.path,entryId:t.anchor});let o=c.current.callbacks.onRefresh?.();if(!o){a();return}o.then(e=>{e||a()}).catch(a)},[]),O=(0,K.useCallback)(e=>{let t=l.current,n=c.current.selected;if(!e.page||!e.consuming||u.current!==e||e.controller.signal.aborted||!t||!n||e.scope!==iK(n)||t.session.history?.beforeEntryId!==e.before||!zK(t,n))return;let r=e.page,i=new Set(t.session.entries.map(e=>e.id)),a=[...r.entries.filter(e=>!i.has(e.id)),...t.session.entries],o=pe(a);for(;a.length>LK||o>RK;){let e=a.pop();if(!e)break;o-=pe(e)+ +!!a.length}c.current.callbacks.beforePrepend(),T({...t,anchor:a.at(-1)?.id??t.anchor,session:{...t.session,entries:a,bytes:o,truncation:BK(a,t.session.truncation,r.truncation.entriesOmitted),history:{...t.session.history,beforeEntryId:r.history?.beforeEntryId??null}}}),u.current=null,g(!1),v(null)},[T]);(0,K.useLayoutEffect)(()=>{if(w&&C!==S.current){x.current=o,u.current?.controller.abort(),u.current=null,d.current=null,f.current=null,g(!1),v(null),S.current=C,T(w);return}x.current!==o&&(x.current=o,u.current?.controller.abort(),u.current=null,d.current=null,l.current=s.current.state?.window??null,m(l.current),g(!1),v(null),f.current=null,b(e=>e+1),l.current||c.current.callbacks.onAnchorChange?.(null));let t=u.current;t&&!t.consuming&&e&&!zK(t.source,e)&&(t.controller.abort(),u.current=null);let n=l.current;if(!(!n||!e)){if(e.history?.anchorEntryId===n.anchor&&e.history.anchorOnBranch===!1){E(!0),c.current.callbacks.onRefresh?.();return}if(!zK(n,e)){D();return}v(e=>e===`historyValidationUnavailable`?null:e),(e.history?.leafEntryId??null)!==n.validatedLeaf&&(n=VK(n,e),T(n)),u.current?.page&&O(u.current)}},[o,e,E,D,T,O,w,C]),(0,K.useLayoutEffect)(()=>{let e=l.current;return e&&(aK(a,o,{...s.current.state,window:e}),c.current.callbacks.onAnchorChange?.({sessionId:e.session.id,sessionPath:e.session.path,entryId:e.anchor})),()=>{u.current?.controller.abort(),u.current=null,d.current=null,c.current.callbacks.onAnchorChange?.(null)}},[o,a]);let k=(0,K.useCallback)(()=>{let e=c.current.selected;return!l.current&&e?.history?.leafEntryId&&T({session:e,anchor:e.history.leafEntryId,validatedLeaf:e.history.leafEntryId}),l.current},[T]),A=(0,K.useCallback)((e,t)=>{let n=c.current.selected;if(!n||u.current)return;let r=e.session.history?.beforeEntryId;if(!r)return;let a={controller:new AbortController,scope:iK(n),before:r,source:e,consuming:t,anchor:{sessionId:n.id,sessionPath:n.path,entryId:e.anchor}};return u.current=a,t&&(g(!0),v(null)),a.done=(async()=>{try{let e=await i.sessionHistory(a.anchor,r,a.controller.signal);if(u.current!==a||a.controller.signal.aborted||a.scope!==iK(c.current.selected))return;if(e.id!==n.id||e.path!==n.path||e.anchorEntryId!==a.anchor.entryId||e.requestedBeforeEntryId!==r||e.history?.anchorEntryId!==a.anchor.entryId||e.history.anchorOnBranch!==!0)throw new ge(`Session history identity changed`,409,`SESSION_HISTORY_CHANGED`);a.page=e,a.consuming&&(O(a),u.current===a&&D())}catch(e){if(u.current!==a||a.controller.signal.aborted||(u.current=null,!a.consuming))return;g(!1),e instanceof ge&&e.code===`SESSION_HISTORY_CHANGED`?(E(!0),c.current.callbacks.onRefresh?.()):v(`historyUnavailable`)}})(),a.done},[O,E,i,D]),j=(0,K.useCallback)(async()=>{let e=c.current.selected;if(!e?.history?.leafEntryId)return;let t=l.current;if(t&&!zK(t,e)){D(!0);return}if(t||=k(),!t)return;let n=u.current;if(n){if(n.scope===iK(e)&&n.before===t.session.history?.beforeEntryId&&zK(n.source,e))return n.consuming=!0,g(!0),v(null),n.page&&O(n),n.done;n.controller.abort(),u.current=null}return A(t,!0)},[O,A,D,k]);(0,K.useEffect)(()=>{if(!t.preload){let e=u.current;e&&!e.consuming&&(e.controller.abort(),u.current=null,d.current=null);return}if(_||u.current||!e||p!==l.current)return;let n=p;if(n&&!zK(n,e))return;let r=n??(e.history?.leafEntryId?{session:e,anchor:e.history.leafEntryId,validatedLeaf:e.history.leafEntryId}:null);if(!r?.session.history?.beforeEntryId)return;let i=JSON.stringify([o,n?r.anchor:`initial`,n?r.session.history.beforeEntryId:null]);d.current!==i&&(d.current=i,A(r,!1))},[t.preload,_,o,e,p,A]);let M=p&&iK(p.session)===o?p:null,N=w??(M&&e&&zK(M,e)?VK(M,e):M),P=(0,K.useCallback)(()=>E(),[E]),F=!!(N&&e&&!zK(N,e));return{session:N?.session??e,engaged:!!N,hasMore:!!(N?.session??e)?.history?.beforeEntryId,hasNewer:!!(N&&N.anchor!==e?.history?.leafEntryId),verifying:F,loading:h,error:_,reset:y,retainReading:k,loadOlder:j,resetToLatest:P}}function UK(e){return e&&typeof e==`object`?e:{}}function WK(e){try{return UK(JSON.parse(e))}catch{return{}}}function GK(e){return e===`running`?`running`:e===`done`||e===`completed`?`done`:[`error`,`failed`,`aborted`,`killed`,`timed_out`].includes(String(e))?`error`:e===`uncertain`?`warn`:`unknown`}function KK(e,t){if(e?.forkSnapshotToolResult)return`unknown`;if(t===`running`)return`running`;if(t===`unknown`)return`unknown`;if(t===`failed`||e?.isError)return`error`;if(t===`cancelled`||t===`timed_out`)return`warn`;if(!e?.toolName?.startsWith(`subagent`)){let t=GK(UK(e?.details).status);if(t!==`unknown`&&t!==`running`)return t}return t===`returned`||e?.isError===!1?`done`:`unknown`}function qK({status:e}){let{t}=W();return e===`running`?(0,q.jsx)(`span`,{className:`status-mark running`,role:`img`,"aria-label":t(`toolState_running`),children:(0,q.jsx)(`i`,{})}):e===`done`?(0,q.jsx)(rs,{className:`status-mark done`,"aria-label":t(`execution_done`)}):e===`error`?(0,q.jsx)(je,{className:`status-mark error`,"aria-label":t(`toolState_failed`)}):e===`warn`?(0,q.jsx)(`span`,{className:`status-mark warn`,role:`img`,"aria-label":t(`toolState_unknown`),children:`?`}):null}function JK({label:e,message:t,children:n}){return(0,q.jsxs)(`div`,{className:`execution-error`,role:`alert`,"aria-label":e,children:[(0,q.jsx)(ls,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{className:`execution-error-content`,children:[(0,q.jsx)(`p`,{children:t}),n]})]})}function YK({failed:e,error:t,retryPrompt:n,retryEntryId:r,canRetry:i,onRetry:a}){let{t:o}=W(),[s,c]=(0,K.useState)(!1);return e?(0,q.jsx)(JK,{label:o(`modelRequestFailed`),message:t||o(`modelFailureUnknown`),children:n!==void 0&&r&&a&&(0,q.jsx)(`div`,{className:`provider-outcome-actions`,children:(0,q.jsxs)(`button`,{type:`button`,disabled:!i||s,onClick:()=>{c(!0),a(n,r).finally(()=>c(!1))},children:[(0,q.jsx)(he,{"aria-hidden":`true`}),o(s?`retryingPrompt`:`retryPrompt`)]})})}):(0,q.jsx)(`div`,{className:`provider-outcome aborted`,role:`status`,children:o(`modelRequestStopped`)})}function XK({attempts:e,state:t,retry:n,observed:r=!0}){let{t:i}=W(),a=t===`retrying`&&!r,o=n?.attempt,s=n?.maxAttempts,c=typeof o==`number`&&Number.isSafeInteger(o)&&o>0&&typeof s==`number`&&Number.isSafeInteger(s)&&s>=o,l=e.length>0||!!n?.errorMessage,u=(0,q.jsxs)(q.Fragment,{children:[t===`retrying`?(0,q.jsx)(Jc,{"aria-hidden":`true`}):(0,q.jsx)(wc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{role:t===`retrying`?`status`:void 0,children:[i(a?`modelReconnectUnknown`:t===`recovered`?`modelRequestRecovered`:t===`retrying`?n?`modelRetrying`:`modelEarlierAttempts`:t===`interrupted`?`modelRequestStopped`:`modelEarlierAttempts`),t===`retrying`&&c&&` ${o}/${s}`]}),t!==`retrying`&&(0,q.jsx)(`span`,{className:`provider-attempts-count`,children:i(`modelFailedAttempts`,{count:e.length})}),l&&(0,q.jsx)(os,{className:`reconnect-chevron`,"aria-hidden":`true`})]}),d=`provider-attempts ${t}${a?` unavailable`:``}`;return l?(0,q.jsxs)(`details`,{className:d,children:[(0,q.jsx)(`summary`,{children:u}),(0,q.jsxs)(`ol`,{children:[e.length===0&&(0,q.jsx)(`li`,{children:(0,q.jsx)(`p`,{children:n?.errorMessage})}),e.map(({entry:e,content:t},n)=>(0,q.jsxs)(`li`,{"data-history-entry":e.entryId??e.key,children:[(0,q.jsx)(`span`,{className:`provider-attempt-index`,"aria-hidden":`true`,children:String(n+1).padStart(2,`0`)}),(0,q.jsxs)(`div`,{className:`provider-attempt-body`,children:[(0,q.jsx)(`p`,{children:e.message.errorMessage||i(`modelFailureUnknown`)}),t?.map(e=>(0,q.jsx)(K.Fragment,{children:e.content},e.key))]})]},e.key))]})]}):(0,q.jsx)(`div`,{className:d,children:u})}function ZK(e,t,n){let r=new Set,i=new Map,a=[],o=-1,s=(s,c=!1,l=!1)=>{if(a.length>0){let u=e[o]?.message.stopReason,d=s?.outcome===`cancelled`||u===`aborted`,f=u===`error`&&!d&&!(c&&t)&&!l;f&&r.add(o);let p=f?a.slice(0,-1):a,m=p.at(-1);m!==void 0&&i.set(m,{attempts:p.map(t=>e[t]),state:d?`interrupted`:u===`stop`||u===`length`||u===`toolUse`?`recovered`:c&&t&&n?`retrying`:`earlier`})}a=[],o=-1};return e.forEach((e,t)=>{e.optimistic||(e.timing?s(e.timing):e.forkSnapshotBoundary?s(void 0,!1,!0):e.message.role===`user`||e.message.role===`custom`&&e.message.customType===`openpi-setup-request`?s():e.message.role===`assistant`&&(o=t,e.message.stopReason===`error`&&a.push(t)))}),s(void 0,!0),{finalErrors:r,groups:i}}function QK(e,t){return PD(pK(e,t).split(` -`).find(Boolean),120)}function $K(e){let t=e.split(` -`).map(e=>e.trim()).find(Boolean);return t?PD(t.replace(/^#{1,6}\s+/u,``).replace(/^>\s*/u,``).replace(/[*_~`]+/gu,``).replace(/\[([^\]]+)\]\([^)]*\)/gu,`$1`).trim(),600):``}function eq({body:e,icon:t,name:n,status:r,summary:i,output:a,evidenceState:o,note:s,rawDetails:c,children:l,snapshotMissingResult:u=!1,defaultOpen:d=!1}){let{t:f}=W(),[p,m]=(0,K.useState)(d);(0,K.useEffect)(()=>m(d),[d]);let h=o??(r===`done`?`returned`:r===`error`?`failed`:r===`running`?`running`:`unknown`);return(0,q.jsxs)(`details`,{className:`message-details tool-line ${r}`,"data-tool":n,open:p,onToggle:e=>m(e.currentTarget.open),children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{className:`tool-icon`,"aria-hidden":`true`,children:t}),uK(n).action===`call`&&(0,q.jsx)(`span`,{className:`tool-kind`,title:n,children:fK(n)}),(0,q.jsxs)(`span`,{className:`details-title`,children:[(0,q.jsx)(`span`,{className:`tool-action`,children:dK(f,n,h)}),i&&(0,q.jsx)(`span`,{className:`tool-summary`,children:i})]}),u&&(0,q.jsx)(`span`,{className:`evidence-status`,children:f(`toolSnapshotMissingResult`)}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`}),(0,q.jsx)(qK,{status:r})]}),s&&(0,q.jsx)(`p`,{className:`evidence-note`,children:s}),a===void 0?(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:cd(e).text}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`figure`,{"aria-label":f(`toolCallArguments`),style:{margin:0},children:(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:cd(e).text})}),(0,q.jsx)(`figure`,{"aria-label":f(`toolCallOutput`),style:{margin:0},children:(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:cd(a).text||f(`noOutput`)})})]}),c!==void 0&&(0,q.jsxs)(`details`,{className:`evidence-raw`,children:[(0,q.jsx)(`summary`,{children:f(`toolRawEvidence`)}),(0,q.jsx)(`pre`,{children:cd(JSON.stringify(c,null,2)).text})]}),l]})}function tq({body:e,family:t,meta:n,status:r,title:i,defaultOpen:a=!1}){return(0,q.jsxs)(`details`,{className:`message-details activity-card ${t}`,open:a||void 0,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{className:`activity-icon`,"aria-hidden":`true`,children:t===`subagent`?(0,q.jsx)($o,{}):(0,q.jsx)(Yc,{})}),(0,q.jsxs)(`span`,{className:`activity-main`,children:[(0,q.jsx)(`span`,{className:`activity-title`,children:i}),n&&(0,q.jsx)(`span`,{className:`activity-meta`,children:n})]}),(0,q.jsx)(qK,{status:r}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`})]}),(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:e})]})}function nq(e,t){let n=typeof e.id==`string`?[e.id]:Array.isArray(e.ids)?e.ids:typeof t.id==`string`?[t.id]:Array.isArray(t.results)?t.results.map(e=>UK(e).id):[];return[...new Set(n.filter(e=>typeof e==`string`&&!!e))]}function rq({call:e,result:t,status:n,sessionId:r,subagents:i,records:a,onInspect:o,defaultOpen:s}){let{t:c}=W(),l=nq(WK(e.arguments),UK(t?.details)),u=dK(c,e.name,n===`done`?`returned`:n===`error`?`failed`:n);return(0,q.jsxs)(`section`,{className:`subagent-operation`,children:[(l.length?l:[void 0]).map(t=>(0,q.jsx)(UG,{identity:`${r}:${t??e.id}`,title:t?RD(t,i,a):``,action:u,state:n===`warn`?`unknown`:n,label:c(`toolState_${n===`done`?`returned`:n===`error`?`failed`:n===`warn`?`unknown`:n}`),onInspect:t&&o?()=>o(t):void 0},t??e.id)),(0,q.jsxs)(`details`,{className:`subagent-operation-receipt`,open:s||void 0,children:[(0,q.jsx)(`summary`,{"aria-label":c(`toolRawEvidence`),title:c(`toolRawEvidence`),children:(0,q.jsx)(Ds,{"aria-hidden":`true`})}),e.arguments!==`{}`&&(0,q.jsx)(`pre`,{children:cd(e.arguments).text}),(0,q.jsx)(`pre`,{children:cd(t?.content??``).text||c(`noOutput`)})]})]})}function iq(e,t,n={sessionId:``}){if(t?.forkSnapshotToolResult)return null;let{sessionId:r,subagents:i=[],records:a=[],workflows:o=[],onInspectSubagent:s,liveState:c,defaultOpen:l=!1,observed:u=!0}=n,d=e.name||``,f=WK(e.arguments),p=UK(t?.details),m=KK(t,c),h=!u&&m===`running`?`unknown`:m;if(d===`subagent_spawn`)return(0,q.jsx)(aq,{sessionId:r,id:typeof p.id==`string`?p.id:void 0,title:String(p.title||f.name||`subagent`),body:t?.content||String(f.prompt||e.arguments),activity:i.find(e=>e.id===p.id),saved:a.find(e=>e.id===p.id),spawnFailed:t?.isError===!0,observed:u,defaultOpen:l,onInspect:s});if(d.startsWith(`subagent`))return(0,q.jsx)(rq,{call:e,result:t,sessionId:r,subagents:i,records:a,onInspect:s,defaultOpen:l,status:h});if(d===`workflow`){let n=typeof f.script==`string`?f.script:e.arguments,i=String(p.name||n.match(/\bname:\s*["'`]([^"'`]+)["'`]/u)?.[1]||`unnamed`),a=UK(p.agents),c=o.find(e=>e.runId===p.runId)?.children,l=[p.runId,p.status,a.total?`${Number(a.total)-Number(a.running||0)}/${a.total} agents`:``].filter(Boolean).join(` · `);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(tq,{family:`workflow`,title:`Workflow · ${i}`,meta:l,body:t?.content||n,status:h}),(0,q.jsx)(oq,{sessionId:r,tasks:c,observed:u,onInspect:s})]})}return d.startsWith(`workflow`)?(0,q.jsx)(tq,{family:`workflow`,title:d.replaceAll(`_`,` `),meta:String(f.runId||``),body:t?.content||e.arguments,status:h}):null}function aq({sessionId:e,id:t,title:n,body:r,activity:i,saved:a,spawnFailed:o,onInspect:s,defaultOpen:c=!1,observed:l=!0}){let{t:u}=W(),d=i?.outcome===`interrupted`?`interrupted`:i?.status??(a?.state===`running`?void 0:a?.state),f=!l&&(d===`running`||!d&&!o)?`unknown`:d,p=u(f===`unknown`?`toolState_unknown`:f?`subagentState_${f}`:o?`subagentSpawnFailed`:t?`subagentStateUnavailable`:`subagentStarting`);return(0,q.jsxs)(`section`,{className:`activity-card subagent subagent-activity`,children:[(0,q.jsx)(UG,{identity:`${e}:${t??n}`,title:n,state:f,label:p,onInspect:t&&s?()=>s(t):void 0}),(c||o)&&(0,q.jsxs)(`details`,{className:`subagent-receipt`,open:c||void 0,children:[(0,q.jsx)(`summary`,{children:u(`subagentSpawnReceipt`)}),(0,q.jsx)(`p`,{children:u(`subagentSpawnReceiptHint`)}),(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:r})]})]})}function oq({sessionId:e,tasks:t,observed:n,onInspect:r}){let{t:i}=W();return(0,q.jsxs)(q.Fragment,{children:[t?.items.map(t=>{let a=t.outcome===`interrupted`?`interrupted`:!n&&t.status===`running`?`unknown`:t.status;return(0,q.jsx)(UG,{identity:`${e}:${t.id}`,title:t.title,state:a,label:i(a===`unknown`?`toolState_unknown`:`subagentState_${a}`),onInspect:r?()=>r(t.id,`workflows`):void 0},t.id)}),!!t?.omitted&&(0,q.jsx)(`p`,{className:`inspection-note`,children:i(`subagentListTruncated`,{count:t?.omitted})})]})}function sq({body:e,duration:t,status:n,level:r,defaultOpen:i,truncated:a,source:o}){let{t:s}=W(),c=n===`running`,[l,u]=(0,K.useState)(i),[d,f]=(0,K.useState)();(0,K.useEffect)(()=>u(i),[i]);let p=t===void 0?``:ID(0,t),m=$K(e),h=[n===`unknown`?s(`toolState_unknown`):c?r?s(`thinkingActiveLevel`,{level:r}):s(`thinkingActive`):s(`thinkingDone`),p].filter(Boolean).join(` · `);return(0,q.jsxs)(`details`,{className:`message-details tool-line thinking-line ${n}`,open:l,onToggle:e=>u(e.currentTarget.open),children:[(0,q.jsxs)(`summary`,{"aria-label":[h,m].filter(Boolean).join(` · `),title:m,children:[(0,q.jsx)(`span`,{className:`tool-icon`,"aria-hidden":`true`,children:(0,q.jsx)(Zs,{})}),(0,q.jsx)(`span`,{className:`details-title`,children:(0,q.jsx)(`span`,{className:`tool-summary`,children:m||h})}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`})]}),l&&(0,q.jsx)(`div`,{className:`details-body thinking-evidence`,children:a&&o&&!c?(0,q.jsx)($G,{...o,preview:e,markdown:!0,purpose:`thinking`,fullText:d,onComplete:f}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(pD,{children:e}),a&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:s(`thinkingPreviewOnly`)})]})})]})}function cq({content:e,editable:t,copyRequiresFull:n=!1,timestamp:r,onResend:i,onRegenerate:a,onFork:o,canFork:s=!1,forkPending:c=!1}){let{t:l}=W(),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(!1),g=(0,K.useRef)(0),_=(0,K.useRef)(void 0);(0,K.useEffect)(()=>()=>{g.current+=1,window.clearTimeout(_.current)},[]);let[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(e),[S,C]=(0,K.useState)(!1),w=(0,K.useRef)(null),T=(0,K.useId)();(0,K.useEffect)(()=>{v&&w.current?.focus()},[v]);let E=async()=>{if(!(S||!b.trim()||!t||!i)){C(!0);try{await i(b.trim())&&y(!1)}finally{C(!1)}}};if(v)return(0,q.jsxs)(`div`,{className:`message-editor`,children:[(0,q.jsx)(`textarea`,{ref:w,value:b,"aria-label":l(`editMessage`),"aria-describedby":T,readOnly:S,onChange:e=>x(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||S||(e.key===`Escape`&&y(!1),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),E()))}}),(0,q.jsx)(`p`,{className:`message-edit-hint`,id:T,children:l(`editMessageHint`)}),(0,q.jsxs)(`div`,{className:`message-edit-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:S,onClick:()=>y(!1),children:l(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`confirm`,disabled:S||!b.trim()||!t,onClick:()=>void E(),children:l(`confirmEdit`)})]})]});let D=FD(r);return(0,q.jsxs)(`div`,{className:`message-actions${f?` copy-failed`:``}`,children:[D&&(0,q.jsx)(`time`,{dateTime:r,children:D}),o&&(0,q.jsx)(V,{content:l(c?`forkSessionPending`:s?`forkMessageHint`:`forkSessionUnavailable`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(`forkMessage`),disabled:!s||c,onClick:()=>void o(),children:(0,q.jsx)(Ws,{"aria-hidden":`true`})})}),t&&(0,q.jsx)(V,{content:l(`editMessage`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(`editMessage`),onClick:()=>{x(e),y(!0)},children:(0,q.jsx)(yc,{})})}),a&&(0,q.jsx)(V,{content:l(`regenerateMessageHint`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(`regenerateMessage`),disabled:!s||c,onClick:()=>void a(),children:(0,q.jsx)(he,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:l(n?`messageCopyRequiresFull`:u?`copiedMessage`:`copyMessage`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(u?`copiedMessage`:`copyMessage`),"data-copied":u||void 0,disabled:m||n,onClick:()=>{let t=++g.current;window.clearTimeout(_.current),h(!0),d(!1),p(!1),td(e).then(e=>{t===g.current&&(h(!1),d(e),p(!e),e&&(_.current=window.setTimeout(()=>d(!1),1200)))})},children:u?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{})})}),f&&(0,q.jsx)(`span`,{className:`copy-error`,role:`status`,children:l(`copyFailed`)})]})}function lq({message:e,fullSubagent:t=!1,sessionId:n,onInspectSubagent:r}){let{t:i}=W();if(e.customType===`openpi-web-command-feedback`)return(0,q.jsxs)(`div`,{className:`command-feedback`,role:`status`,children:[e.content,e.truncation?.truncated&&(0,q.jsx)(`p`,{children:i(`commandFeedbackTruncated`)})]});let a=UK(e.details);if(e.customType===`openpi-setup-request`||e.customType===`openpi-setup-closed`)return(0,q.jsx)(eq,{body:e.content,icon:(0,q.jsx)(Xc,{}),name:i(`configureOpenPi`),summary:e.customType===`openpi-setup-closed`?PD(e.content):void 0,status:`unknown`});if(e.customType===`subagent-result`){let o=Array.isArray(a.results)?a.results.map(UK):[a],s=new Set(BD([e]).map(e=>e.id));return(0,q.jsxs)(`section`,{className:`activity-card subagent subagent-activity`,children:[o.map(e=>{let t=typeof e.id==`string`?e.id:``,a=e.outcome===`interrupted`?`interrupted`:e.status===`done`||e.status===`error`||e.status===`running`?e.status:`unknown`;return(0,q.jsx)(UG,{identity:`${n}:${t}`,title:String(e.title||t||i(`subagentDetails`)),state:a,label:i(a===`unknown`?`unknownState`:`subagentState_${a}`),onInspect:r&&s.has(t)?()=>r(t):void 0},t||JSON.stringify(e))}),(0,q.jsxs)(`details`,{className:`subagent-result-evidence`,open:t||void 0,children:[(0,q.jsx)(`summary`,{children:i(`subagentBackgroundResult`,{count:o.length})}),(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:!t&&typeof a.displayContent==`string`?a.displayContent:e.content})]})]})}if(e.customType===`workflow-result`){let t=Array.isArray(a.entries)?a.entries.map(UK):[],n=t.map(e=>GK(e.status)),r=n.includes(`error`)?`error`:n.includes(`warn`)?`warn`:n.length>0&&n.every(e=>e===`done`)?`done`:n.includes(`running`)?`running`:`unknown`,i=t.length?t.map(e=>`${e.status===`completed`?`✓`:`✗`} ${String(e.summary||e.runId||`run`)}${e.resultPreview?`\nResult: ${e.resultPreview}`:``}`).join(` -`):e.content;return(0,q.jsx)(tq,{family:`workflow`,title:t.length>1?`Workflow results · ${t.length} runs`:`Workflow ${String(t[0]?.runId||`result`)}`,body:i,status:r})}return null}function uq(e){return[``,`[]`,`{}`,`null`].includes(e.trim())}function dq({rows:e,active:t}){let{t:n}=W(),[r,i]=(0,K.useState)(!1),a=e.length===1,o=(0,K.useRef)(a),s=(0,K.useRef)(null),c=(0,K.useRef)(null),l=(0,K.useRef)(!0),u=(0,K.useRef)(0),d=(0,K.useRef)(void 0),[f,p]=(0,K.useState)({above:!1,below:!1}),m=(0,K.useCallback)(()=>{let e=c.current;if(!e)return;let t=e.scrollTop>1,n=e.scrollHeight-e.clientHeight-e.scrollTop>1;p(e=>e.above===t&&e.below===n?e:{above:t,below:n})},[]);(0,K.useLayoutEffect)(()=>{let n=c.current,s=o.current&&!a;if(s&&!r&&n?.querySelector(`.thinking-line[open]`)){i(!0);return}o.current=a,!(!n||a||!r||e.length===0)&&(!s&&n.scrollTop!==u.current&&n.scrollHeight-n.clientHeight-n.scrollTop>24&&(l.current=!1),s&&!l.current&&(n.scrollTop=u.current),t&&l.current&&(n.scrollTop=n.scrollHeight,u.current=n.scrollTop),m())},[e,t,r,a,m]),(0,K.useEffect)(()=>{let e=c.current,n=e?.firstElementChild;if(!e||!n||a||typeof ResizeObserver>`u`)return;let i=new ResizeObserver(()=>{r&&t&&l.current&&(e.scrollTop=e.scrollHeight,u.current=e.scrollTop),m()});return i.observe(e),i.observe(n),()=>i.disconnect()},[t,r,a,m]);let h=e.filter(e=>e.processType===`thinking`).length,g=e.filter(e=>e.processType===`tool`).length,_=e.filter(e=>e.processType===`activity`).length,v=[h?n(`processThinkingCount`,{count:h}):``,g?n(`processToolCount`,{count:g}):``,_?n(`processActivityCount`,{count:_}):``].filter(Boolean),y=[...e].reverse().find(e=>e.processStatus===`running`),b=y?.processPreview??(t?[...e].reverse():e).find(e=>e.processPreview)?.processPreview,x=y?.processToolName&&[`read`,`write`,`edit`].includes(y.processToolName)?b?.slice(Math.max(b.lastIndexOf(`/`),b.lastIndexOf(`\\`))+1):b,S=e.filter(e=>e.error||e.processStatus===`error`).length,C=S>0,w=y?`running`:C?`error`:e.some(e=>e.processStatus===`warn`)?`warn`:e.every(e=>e.processStatus===`done`)?`done`:`unknown`,T=e.flatMap(e=>e.processToolName?[e.processToolName]:[]),E=[...new Set(T.map(e=>uK(e).action))],D=E.map(e=>n(`toolActionGroup_${e}`)),O=E.length?n(`toolGroup_${w===`done`?`done`:w===`running`?`running`:`unknown`}`,{actions:D.join(n(`toolGroupSeparator`))}):n(w===`running`?`processRunning`:`processDetails`),k=y?.processToolName?dK(n,y.processToolName,`running`):y?.processType===`thinking`?n(`thinkingActive`):r?n(`processDetails`):O,A=y?.processToolName??T[0],j=y?.processType===`thinking`?Zs:A?uK(A).Icon:Xc;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`details`,{className:`process-sequence ${a?`single-process `:``}${w}`,open:a||r,"data-status":w,"data-running":w===`running`?`true`:void 0,"data-history-entry":e[0]?.key,onToggle:e=>{a||i(e.currentTarget.open)},children:[(0,q.jsxs)(`summary`,{ref:s,hidden:a,"aria-label":[k,y?b:``,...v,C?n(`processFailureCount`,{count:S}):``].filter(Boolean).join(` · `),children:[(0,q.jsx)(`span`,{className:`tool-icon`,"aria-hidden":`true`,children:(0,q.jsx)(j,{})}),(0,q.jsx)(`span`,{className:`process-sequence-title`,children:(0,q.jsx)(`strong`,{children:k})}),b&&(y||!t&&!E.length)&&(0,q.jsx)(`span`,{className:`process-sequence-preview`,title:b,children:x}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`}),!C&&(0,q.jsx)(qK,{status:w})]}),(0,q.jsx)(`section`,{ref:c,className:`process-sequence-scroll`,"aria-label":a?void 0:[n(`processDetails`),...v].join(` · `),tabIndex:a?void 0:0,"data-scroll-above":f.above||void 0,"data-scroll-below":f.below||void 0,onScrollCapture:e=>{let t=e.target;if(a&&t instanceof HTMLElement&&t.classList.contains(`thinking-evidence`)){let n=t.getBoundingClientRect().top-e.currentTarget.getBoundingClientRect().top+t.scrollTop,r=n>u.current;u.current=n,l.current=(l.current||r)&&t.scrollHeight-t.clientHeight-t.scrollTop<=24}},onScroll:e=>{if(a)return;let t=e.currentTarget,n=t.scrollTop>u.current;u.current=t.scrollTop,l.current=(l.current||n)&&t.scrollHeight-t.clientHeight-t.scrollTop<=24,m()},onWheel:e=>{!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&e.deltaY<0&&(a||bq(e.nativeEvent,e.currentTarget))&&(l.current=!1)},onKeyDown:e=>{let t=e.target;!e.defaultPrevented&&!e.altKey&&!e.metaKey&&(!e.ctrlKey||e.key===`Home`)&&([`ArrowUp`,`PageUp`,`Home`].includes(e.key)||e.key===` `&&e.shiftKey)&&t instanceof HTMLElement&&!t.isContentEditable&&!t.closest(`input, textarea, select`)&&!(e.key===` `&&t.closest(`button, summary`))&&(a||bq(e.nativeEvent,e.currentTarget))&&(l.current=!1)},onTouchStart:e=>{d.current=e.touches[0]?.clientY},onTouchMove:e=>{let t=e.touches[0]?.clientY;t!==void 0&&d.current!==void 0&&t>d.current&&(a||bq(e.nativeEvent,e.currentTarget))&&(l.current=!1),d.current=t},children:(0,q.jsx)(`div`,{className:`process-sequence-body`,children:e.map(e=>(0,q.jsx)(`div`,{className:`process-step ${a?`single-tool-step `:``}${e.processStatus??`unknown`}`,"data-status":e.processStatus??`unknown`,children:e.content},e.key))})})]}),(0,q.jsx)(V,{anchorRef:s,focusTrigger:`always`,content:[...v,C?n(`processFailureCount`,{count:S}):``].filter(Boolean).join(` · `),placement:`above`,isEnabled:!a})]})}function fq(e,t){let n=[];for(let t of e){let e=n.at(-1),r=t.kind===`process`;r&&e?.process?e.rows.push(t):n.push({process:r,rows:[t]})}return n.flatMap((e,r)=>{let i=`${e.process?`process`:`rows`}-${e.rows[0]?.key}`;return e.process?(0,q.jsx)(dq,{rows:e.rows,active:t&&r===n.length-1},i):e.rows.map(e=>(0,q.jsx)(K.Fragment,{children:e.content},e.key))})}function pq({rows:e,timing:t,active:n,timedTurn:r}){let{t:i}=W(),a=(0,K.useId)(),[o,s]=(0,K.useState)(t?.outcome!==`completed`),c=(0,K.useRef)(!1),l=(0,K.useRef)(t?.outcome);(0,K.useEffect)(()=>{l.current!==t?.outcome&&t?.outcome===`completed`&&s(!1),l.current=t?.outcome},[t?.outcome]);let u=!!(t||r),d=[];for(let r of e){if(r.content===null)continue;let e=t?.resultEntryId?r.responseEntryId===t.resultEntryId&&r.final!==!1:!n&&r.final,i=r.kind!==`prompt`&&!e,a=d.at(-1);i&&a?.foldable?a.rows.push(r):d.push({foldable:i,rows:[r]})}let f=d.filter(e=>e.foldable),p=e=>e===0?a:`${a}-${e}`,m=f.length>0,h=t?(0,q.jsx)(KG,{timing:t}):r?(0,q.jsx)(GG,{elapsedMs:r.elapsedMs},JSON.stringify([r.sessionId,r.sessionPath,r.commandId,r.epoch,r.startedAt])):null;return(0,q.jsxs)(q.Fragment,{children:[u&&(0,q.jsxs)(`header`,{className:`turn-duration`,"data-outcome":t?.outcome,children:[m?(0,q.jsxs)(`button`,{type:`button`,className:`turn-duration-toggle`,"aria-expanded":o,"aria-controls":f.map((e,t)=>p(t)).join(` `),onClick:e=>{c.current=e.nativeEvent.isTrusted,s(e=>!e)},children:[(0,q.jsx)(vs,{className:`turn-duration-icon`,"aria-hidden":`true`}),h,(0,q.jsx)(os,{className:`turn-duration-chevron`,"aria-hidden":`true`})]}):h,t&&t.outcome!==`completed`&&(0,q.jsx)(`span`,{className:`turn-duration-outcome`,children:i(`turnElapsedOutcome_${t.outcome}`)})]}),u?d.map(e=>e.foldable?(0,q.jsx)(`div`,{className:`turn-response-body`,id:p(f.indexOf(e)),hidden:!o,inert:!o,"data-user-toggle":c.current||void 0,children:fq(e.rows,n&&e===f.at(-1))},e.rows[0].key):(0,q.jsx)(K.Fragment,{children:fq(e.rows,!1)},e.rows[0].key)):fq(e,n)]})}function mq({id:e,rows:t,active:n,observed:r=!0,changes:i,session:a,timedTurn:o,onReviewTurn:s}){let{t:c}=W(),l=[...t].reverse().find(e=>e.outcome||e.timing),u=l?.timing?.outcome??l?.outcome,d=t.some(e=>e.kind===`response`),f=t.find(e=>e.kind===`prompt`),p=!!(f?.promptEntryId&&t.some(e=>e.commandHandledInputId===f.promptEntryId&&e.commandHandledCommandId===f.promptCommandId)),m=t.some(e=>e.forkSnapshotBoundary),h=m?`forked`:n?r?`running`:`unknown`:u===`failed`?`failed`:u===`interrupted`||u===`cancelled`?`interrupted`:u===`completed`||d||p?`complete`:`waiting`,g=h===`failed`?`error`:h===`interrupted`?`warning`:h===`running`?`accent`:h===`complete`?`success`:`neutral`,_=c(h===`unknown`?`toolState_unknown`:`turnState_${h}`),v=t.some(e=>e.timing&&e.timing.commandId===o?.commandId&&e.timing.epoch===o?.epoch)?void 0:o,y=[],b=[],x=0,S=(e,t=!1)=>{y.push((0,q.jsx)(pq,{rows:b,timing:e,active:n&&t,timedTurn:t?v:void 0},`run-${x++}`)),b=[]};for(let e of t)e.kind===`prompt`?b.length?b.push(e):y.push((0,q.jsx)(K.Fragment,{children:e.content},e.key)):e.timing?S(e.timing):b.push(e);let C=n&&r&&(b.length>0||!!v||!t.some(e=>e.timing))&&!b.some(e=>e.kind!==`prompt`&&e.content!==null);(b.length||v)&&S(void 0,!0);let w=!!(o||t.some(e=>e.timing));return(0,q.jsxs)(`section`,{className:`conversation-turn${e===0?` prelude`:``}`,"data-turn":e,children:[e>0&&h!==`complete`&&(!w||m)&&(0,q.jsxs)(`header`,{className:`turn-heading`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:c(`turnLabel`,{number:e})}),(0,q.jsxs)(`span`,{className:`turn-state ${h}`,children:[(0,q.jsx)(HG,{variant:g,label:_,isPulsing:h===`running`,icon:h===`failed`||h===`interrupted`?(0,q.jsx)(je,{"aria-hidden":`true`}):h===`forked`?(0,q.jsx)(Ws,{"aria-hidden":`true`}):void 0}),_]})]}),y,C&&(0,q.jsxs)(`div`,{className:`conversation-waiting`,"aria-hidden":`true`,children:[(0,q.jsxs)(`span`,{className:`conversation-waiting-dots`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]}),(0,q.jsx)(`span`,{children:c(`modelRunning`)})]}),i&&a&&(0,q.jsx)(_K,{changes:i,onReview:s},`${a.id}:${a.path}:${i.promptEntryId}`)]})}function hq(e,t,n,r){let i=new Map;for(let t=0;t{if(!t)return;let r=i.get(t);if(!(r===void 0||r>=n)){for(let t=r+1;te.rows.some(e=>e.promptCommandId===n||r?.promptEntryId&&e.promptEntryId===r.promptEntryId)):void 0,l=s.length-1;for(;l>=0&&s[l].id!==0&&!s[l].rows.some(e=>e.kind===`prompt`&&!e.pendingPrompt);)l--;return{turns:s,activeTurn:c?.id??s[l]?.id}}function gq(e,t,n,r,i,a,o,s=!0,c=t){let{turns:l,activeTurn:u}=hq(e,c,n,a);return l.map(e=>(0,q.jsx)(mq,{id:e.id,rows:e.rows,active:t&&e.id===u&&!e.rows.some(e=>e.forkSnapshotBoundary),observed:s,changes:c&&e.id===u?void 0:r?.get(e.rows.find(e=>e.kind===`prompt`&&!e.pendingPrompt)?.promptEntryId??``),session:i,timedTurn:t&&e.id===u&&!e.rows.some(e=>e.forkSnapshotBoundary)?a:void 0,onReviewTurn:o},`turn-group-${e.rows[0]?.key}`))}function _q(e,t,n){let r=e.getBoundingClientRect(),i=r.top,a=Array.from(e.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)).filter(t=>{let n=t.getBoundingClientRect(),i=Math.max(n.top,r.top),a=Math.min(n.bottom,r.bottom);for(let n=t;n&&n!==e;n=n.parentElement){if(n.hidden||n instanceof HTMLDetailsElement&&!n.open&&n!==t&&!n.querySelector(`:scope > summary`)?.contains(t))return!1;if(n===t)continue;let e=getComputedStyle(n);if(!/^(auto|scroll|overlay|hidden|clip)$/.test(e.overflowY))continue;let r=n.getBoundingClientRect();i=Math.max(i,r.top),a=Math.min(a,r.bottom)}return a>i}),o=a.find(e=>!a.some(t=>t!==e&&e.contains(t))),s=o?.dataset.historyResult??o?.dataset.historyEntry??o?.dataset.historyMessage,c=o?.dataset.historyResult??o?.dataset.historyMessage,l=n?.entries.find(e=>e.id===c||e.id===s)?.id;if(!l&&s)for(let e of n?.entries??[])s.startsWith(`${e.id}-`)&&(!l||e.id.length>l.length)&&(l=e.id);return{key:l?s:void 0,entryId:l,offset:(o?.getBoundingClientRect().top??i)-i,scrollTop:e.scrollTop,pinned:t}}function vq(e,t){let n=!1;for(let r=e.parentElement;r&&r!==t;r=r.parentElement)if(r instanceof HTMLDetailsElement&&(r.open=!0),r.classList.contains(`turn-response-body`)&&r.hidden){let e=Array.from(t.querySelectorAll(`button[aria-controls]`)).find(e=>e.getAttribute(`aria-controls`)?.split(` `).includes(r.id));e&&(e.click(),n=!0)}return n}function yq(e,t,n){if(e.scrollIntoView?.({block:`nearest`,inline:`nearest`,behavior:`instant`}),n){t.scrollTop=n.scrollTop;for(let r=e.parentElement;r&&r!==t;r=r.parentElement)!/^(auto|scroll|overlay)$/.test(getComputedStyle(r).overflowY)||r.scrollHeight<=r.clientHeight||(r.scrollTop+=e.getBoundingClientRect().top-t.getBoundingClientRect().top-n.offset)}return Math.max(0,t.scrollTop+e.getBoundingClientRect().top-t.getBoundingClientRect().top-(n?.offset??24))}function bq(e,t){return xq(e,t,`up`)}function xq(e,t,n){for(let r of e.composedPath()){if(r===t)return!0;if(!(r instanceof HTMLElement))continue;let e=getComputedStyle(r);if(/^(auto|scroll|overlay)$/.test(e.overflowY)&&((n===`up`?r.scrollTop:r.scrollHeight-r.clientHeight-r.scrollTop)>0||/^(contain|none)$/.test(e.overscrollBehaviorY)))return!1}return!1}function Sq(e){let{t}=W(),n=(0,K.useRef)(null),r=(0,K.useRef)(null),i=(0,K.useRef)(!0),a=(0,K.useRef)(0),o=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=n.current,t=()=>{o.current=null};return e?.addEventListener(`scrollend`,t),()=>e?.removeEventListener(`scrollend`,t)},[]);let s=(0,K.useRef)(null),c=(0,K.useCallback)(()=>{s.current!==null&&cancelAnimationFrame(s.current),s.current=null},[]),l=(0,K.useCallback)(e=>{let t=n.current;if(!t)return;let r=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),o=(e=t.scrollHeight)=>{c(),typeof t.scrollTo==`function`?t.scrollTo({top:e,behavior:`instant`}):t.scrollTop=e,a.current=t.scrollTop};if(!e||r?.matches||document.visibilityState===`hidden`||!t.clientHeight){o();return}if(s.current!==null)return;let l=t.scrollHeight-t.clientHeight-t.scrollTop;if(l<=1||l>t.clientHeight){o();return}let u=performance.now(),d=e=>{if(s.current=null,!i.current||n.current!==t)return;if(r?.matches||document.visibilityState===`hidden`){o();return}let a=Math.max(0,t.scrollHeight-t.clientHeight),c=a-t.scrollTop;if(c<=1){o(a);return}let l=Math.min(64,Math.max(1,e-u));u=e,o(t.scrollTop+Math.max(1,c*(1-Math.exp(-l/48)))),s.current=requestAnimationFrame(d)};s.current=requestAnimationFrame(d)},[c]),u=(0,K.useRef)(void 0),d=(0,K.useRef)(0),f=(0,K.useRef)(e.readingRestorePending);f.current=e.readingRestorePending;let[p,m]=(0,K.useState)(!1),h=(0,K.useRef)(null),g=e.activityObserved!==!1&&e.resultExposureEnabled!==!1,_=(0,K.useCallback)(()=>{h.current?.abort(),h.current=null},[]),v=(0,K.useRef)(void 0),y=(0,K.useRef)(e.scrollToBottom),b=(0,K.useRef)(null),x=(0,K.useMemo)(()=>e.readingCache??new Map,[e.readingCache]),S=e.historyNavigation,C=S?JSON.stringify([S.sessionId,S.sessionPath,S.entryId,S.revision]):null,w=(0,K.useRef)(null),[T,E]=(0,K.useState)(null),D=HK(e.snapshot.selectedSession,{onAnchorChange:e.onHistoryAnchorChange,onRefresh:e.onRefreshHistory,preload:e.activityObserved!==!1&&e.resultExposureEnabled!==!1,beforePrepend:()=>{let e=n.current;e&&(b.current={..._q(e,!1,k.current),scrollHeight:e.scrollHeight},i.current=!1)}},x,S),O=D.session,k=(0,K.useRef)(O);k.current=O;let A=O?.id,j=O?.path,M=O?.cwd,N=T&&T.sessionId===A&&T.sessionPath===j?T.entryId:void 0,P=JSON.stringify([A,j]),{capture:F,restore:I,clear:ee}=IK(n,i,P,a);(0,K.useLayoutEffect)(()=>c,[P,c]);let L=JSON.stringify([e.snapshot.selectedSession?.id,e.snapshot.selectedSession?.path,e.snapshot.selectedSession?.history?.leafEntryId??e.snapshot.selectedSession?.entries.at(-1)?.id]);(0,K.useLayoutEffect)(()=>(g||_(),_),[L,C,g,_]),(0,K.useLayoutEffect)(()=>{let e=n.current;if(!e||!A||!j)return;let t=()=>{f.current||aK(x,P,{position:_q(e,i.current,k.current)})};window.addEventListener(`pagehide`,t);let r=()=>{document.visibilityState===`hidden`&&t()};return document.addEventListener(`visibilitychange`,r),()=>{window.clearTimeout(d.current),window.removeEventListener(`pagehide`,t),document.removeEventListener(`visibilitychange`,r),t()}},[P,x,A,j]);let R=(0,K.useRef)(P),[te,z]=(0,K.useState)({});(0,K.useLayoutEffect)(()=>{R.current!==P&&(R.current=P,z({}))},[P]);let B=(0,K.useMemo)(()=>new Map((O?.entries??[]).flatMap(e=>e.turnChanges&&e.turnChanges.sessionId===O?.id?[[e.turnChanges.promptEntryId,e.turnChanges]]:[])),[O?.entries,O?.id]),ne=(0,K.useRef)(D.reset),re=D.hasNewer||D.verifying,ie=LD(e.snapshot,O),ae=e.snapshot.selectedExecution?.sessionId===O?.id&&e.snapshot.selectedExecution?.sessionPath===O?.path?e.snapshot.selectedExecution:void 0,oe=ie&&e.liveActiveTurn!==void 0?e.liveRunning:ie&&e.liveRunning||(ae?ae.status===`running`:ie&&e.snapshot.runtime.status===`running`),se=!re&&oe?ie&&e.liveActiveTurn!==void 0?e.liveRetry??void 0:ae?ae.retry:ie?e.liveRetry??void 0:void 0:void 0,ce=(0,K.useRef)({scope:P,nativeRowKeys:new Map,ambiguousTimingIds:new Set});ce.current.scope!==P&&(ce.current={scope:P,nativeRowKeys:new Map,ambiguousTimingIds:new Set});let{entries:le,projectedPrompts:H}=(0,K.useMemo)(()=>MK({...e.snapshot,selectedSession:O},re?[]:e.liveMessages.filter(e=>e.optimistic?e.optimistic.sessionId===O?.id&&e.optimistic.sessionPath===O?.path:ie),ce.current),[e.snapshot,O,ie,re,e.liveMessages]);(0,K.useEffect)(()=>{O&&H.length>0&&e.onPromptProjection?.(O.id,O.path,H)},[O,H,e.onPromptProjection]),(0,K.useEffect)(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{if(!i.current){I(),F();return}l(oe)});return t.observe(e),r.current&&t.observe(r.current),()=>t.disconnect()},[l,oe,I,F]);let{rows:de,turns:fe}=(0,K.useMemo)(()=>{let n=BD(le.map(e=>e.message)),r=ZK(le,oe&&!re,!!se),i=[...r.finalErrors].at(-1),a=-1;for(let e=le.length-1;e>=0;e--)if(le[e].message.role===`assistant`){a=e;break}let o=new Map,s,c=new Map,l=new Set,u=ie?e.snapshot.runtime.liveTools??[]:[],d=ae?.liveTools??[],f=re?[]:[...u,...d.filter(e=>!u.some(t=>t.call.id===e.call.id))];le.forEach(e=>{let{message:t}=e;t.role===`toolResult`&&t.toolCallId&&c.set(t.toolCallId,e),t.parts?.forEach(e=>{e.type===`toolCall`&&e.id&&![`ask_user`,`human_handoff`].includes(e.name)&&l.add(e.id)})});let p=[],m=0,h,g=-1,_=-1;for(let e=le.length-1;e>=0;e--){if(le[e]?.message.role===`user`){_=e;break}if(le[e]?.message.role===`custom`&&le[e]?.message.customType===`openpi-setup-request`)break}let v=new Set,y=-1;le.forEach(({message:e},t)=>{e.role===`user`||e.role===`custom`&&e.customType===`openpi-setup-request`?(y>=0&&v.add(y),y=-1):e.role===`assistant`&&e.content.trim()&&(y=t)}),y>=0&&v.add(y);let b=le.flatMap((u,d)=>{let y=u.message;if(u.forkSnapshotBoundary)return[{key:u.key,turn:m,kind:`custom`,forkSnapshotBoundary:!0,content:null}];if(u.timing)return[{key:u.key,turn:m,kind:`custom`,timing:u.timing,content:null}];if(u.compaction)return[{key:u.key,turn:m,kind:`custom`,content:(0,q.jsx)(qG,{compaction:{state:`completed`}})}];if(y.role===`custom`){if(y.customType===`openpi-web-command-handled`){let e=y.details;return e&&typeof e==`object`&&`inputEntryId`in e&&typeof e.inputEntryId==`string`?[{key:u.key,turn:m,kind:`custom`,commandHandledInputId:e.inputEntryId,commandHandledCommandId:`commandId`in e&&typeof e.commandId==`string`?e.commandId:void 0,content:null}]:[]}return y.display===!1||![`openpi-web-command-feedback`,`openpi-setup-request`,`openpi-setup-closed`,`subagent-result`,`workflow-result`].includes(y.customType??``)?[]:(y.customType===`openpi-setup-request`&&(h=void 0,g=-1,m++),[{key:u.key,turn:m,kind:`custom`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":u.entryId??u.key,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(lq,{message:y,sessionId:A??``,onInspectSubagent:e.onInspectSubagent,fullSubagent:e.snapshot.preferences.subagentResultDisplay===`full`})})})}])}if(y.role===`user`){h=y.content,g=d,m++,p.push({entryId:u.entryId??u.key,title:Array.from((y.content||t(`attachedImage`)).replace(/\s+/g,` `).trim()).slice(0,240).join(``)});let n=u.entryId?JSON.stringify([A,j,u.entryId]):``,r=te[n],i=!!(y.truncation?.visibleText&&r===void 0);return[{key:u.key,turn:m,kind:`prompt`,pendingPrompt:!!u.optimistic,promptCommandId:u.optimistic?.commandId??y.commandId,promptEntryId:u.entryId,content:(0,q.jsxs)(`article`,{className:`message-row user`,id:`turn-${m}`,"data-history-entry":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:[(0,q.jsxs)(`div`,{className:`message-content`,children:[(0,q.jsx)(NK,{message:y,sessionId:A,path:j,entryId:u.entryId}),(y.content||y.truncation?.visibleText)&&(u.entryId&&A&&j&&y.truncation?.visibleText?(0,q.jsx)($G,{preview:y.content,sessionId:A,sessionPath:j,entryId:u.entryId,markdown:!1,fullText:r,onComplete:e=>z(t=>({...t,[n]:e}))},`${A}:${j}:${u.entryId}`):(0,q.jsx)(QG,{content:y.content}))]}),(0,q.jsx)(cq,{content:r??y.content,editable:ie&&!oe&&!!(e.forkAvailable&&e.onEdit&&u.entryId&&A&&j&&!u.optimistic)&&!i,copyRequiresFull:i,timestamp:u.timestamp,onResend:t=>e.onEdit&&u.entryId&&A&&j?e.onEdit({sessionId:A,sessionPath:j,entryId:u.entryId},t):Promise.resolve(!1),onFork:u.entryId&&A&&j&&e.onFork&&!u.optimistic?()=>e.onFork({sessionId:A,sessionPath:j,entryId:u.entryId}):void 0,canFork:ie&&!oe&&e.forkAvailable,forkPending:e.forkPending})]})}]}if(y.role===`assistant`){let b=p.at(-1);b&&y.content.trim()&&(b.reply=Array.from(y.content.replace(/\s+/g,` `).trim()).slice(0,240).join(``));let x=[],S=y.parts??[],C=y.webSearch??[],w=e=>Math.min(S.length,e.beforePartIndex??0),T=e=>{for(let[t,n]of C.entries()){if(w(n)!==e)continue;let r=n.status===`completed`?`done`:n.status===`failed`?`error`:`warn`;x.push({key:`${u.key}-native-search-${t}`,turn:m,kind:`process`,processType:`tool`,processToolName:`web_search`,processPreview:n.query,processStatus:r,error:n.status===`failed`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":`${u.entryId??u.key}-native-search-${t}-body`,"data-history-message":u.entryId??u.key,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(eq,{body:n.query,icon:(0,q.jsx)(Gs,{}),name:`web_search`,summary:n.query,status:r})})})})}},E=S.reduce((e,t,n)=>(t.type===`thinking`||t.type===`text`)&&!t.text.trim()?e:n,-1),D=S.reduce((e,t,n)=>t.type===`text`?n:e,-1),O=!!(u.entryId&&A&&j&&y.truncation?.visibleText),k=y.content,F=u.entryId?JSON.stringify([A,j,u.entryId]):``,I=te[F],ee=!!(y.truncation?.visibleText&&I===void 0),L=(t,n,r)=>{if(O&&!r||!O&&!t.trim())return;let i=r&&!re&&!se&&e.activityObserved!==!1&&oe&&ae?.compaction?.state!==`running`&&!y.stopReason&&d===le.length-1&&E===D,a=r&&v.has(d)&&!i&&(y.stopReason===`stop`||y.stopReason===`length`||y.stopReason===`error`||y.stopReason===`aborted`||!oe&&!y.parts?.some(e=>e.type===`toolCall`));x.push({key:n,turn:m,kind:`response`,responseEntryId:u.entryId,final:r&&(y.stopReason===`stop`||y.stopReason===`length`),content:(0,q.jsxs)(`article`,{className:`message-row assistant response${a?` final-response`:``}`,"data-streaming":i||void 0,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,"data-history-entry":u.entryId?`${u.entryId}-${n.slice(u.key.length+1)}`:n,children:[(0,q.jsx)(`div`,{className:`message-content`,children:O&&A&&j&&u.entryId?(0,q.jsx)($G,{preview:k,sessionId:A,sessionPath:j,entryId:u.entryId,markdown:!0,fullText:I,onComplete:e=>z(t=>({...t,[F]:e}))},`${A}:${j}:${u.entryId}`):(0,q.jsx)(pD,{streaming:i,children:t},P)}),a&&(0,q.jsx)(cq,{content:I??y.content,editable:!1,copyRequiresFull:ee,timestamp:u.timestamp,onResend:e.onResend,onRegenerate:b?.entryId&&A&&j&&e.onRegenerate&&!u.optimistic&&!y.isError&&(y.stopReason===`stop`||y.stopReason===`length`)?()=>e.onRegenerate({sessionId:A,sessionPath:j,entryId:b.entryId}):void 0,onFork:u.entryId&&A&&j&&e.onFork?()=>e.onFork({sessionId:A,sessionPath:j,entryId:u.entryId}):void 0,canFork:ie&&!oe&&e.forkAvailable,forkPending:e.forkPending})]})})};y.parts?.forEach((r,i)=>{if(T(i),r.type===`text`&&(S[i-1]?.type!==`text`||C.some(e=>w(e)===i))){let e=r.text,t=i+1;for(;S[t]?.type===`text`&&!C.some(e=>w(e)===t);){let n=S[t];n?.type===`text`&&(e+=n.text),t++}L(e,`${u.key}-text-${i}`,t>D)}if(r.type===`thinking`&&r.text.trim()){let t=!re&&!se&&!y.stopReason&&ae?.compaction?.state!==`running`&&oe&&d===le.length-1&&i===E?e.activityObserved===!1?`unknown`:`running`:`done`;x.push({key:`${u.key}-thinking-${i}`,turn:m,kind:`process`,processType:`thinking`,processPreview:$K(r.text),processStatus:t,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":`${u.entryId??u.key}-thinking-${i}-body`,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(sq,{body:r.text,truncated:r.textTruncated,source:u.entryId&&A&&j&&r.sourcePartIndex!==void 0?{sessionId:A,sessionPath:j,entryId:u.entryId,partIndex:r.sourcePartIndex}:void 0,status:t,level:t===`running`?e.snapshot.thinking?.level:void 0,duration:jK(u,e.thinkingDurations),defaultOpen:e.snapshot.preferences.expandThinking===!0},JSON.stringify([A,j,u.key,i]))})})})}if(r.type===`toolCall`){let a=r,o=f.find(e=>e.call.id===a.id),s=a.id?c.get(a.id):void 0,d=s?.message??o?.result,p=JG(a,d,f,s?void 0:o?.state),h=p?[...p.children.map(e=>({call:e.call,child:e})),...p.showWrapper?[{call:a}]:[]]:[{call:a}];for(let[r,{call:o,child:g}]of h.entries()){let _=o.name.startsWith(`subagent`)?e.snapshot.preferences.subagentResultDisplay===`full`:o.name===`bash`?e.snapshot.preferences.bashToolDisplay===`full`:o.name===`write`||o.name===`edit`?e.snapshot.preferences.fileMutationDisplay===`full`:!1,v=o.id?f.find(e=>e.call.id===o.id):void 0,y=g?s:o.id?c.get(o.id):void 0,b=g?void 0:y?.message,S=g?g.result:b??v?.result,C=g?g.state:b?void 0:v?.state,w=g?g.state===`returned`?`done`:g.state===`failed`?`error`:g.state===`cancelled`||g.state===`timed_out`?`warn`:g.state:KK(S,C),T=e.activityObserved===!1&&w===`running`?`unknown`:w,E=p&&r===h.length-1&&!p.showWrapper?(0,q.jsxs)(`details`,{className:`evidence-raw`,children:[(0,q.jsx)(`summary`,{children:t(`toolCodemodeDetails`)}),(0,q.jsx)(`pre`,{children:cd(a.arguments).text}),(0,q.jsx)(`pre`,{children:cd(d?.content??``).text})]}):null,D=o.name===`plan_ready`&&S&&eK(S)?(0,q.jsx)(tK,{result:S,sessionId:A,sessionPath:j,entryId:y?.entryId},`${u.key}-${o.id||i}-plan`):ud(o.name)&&!g?.outputMissing?(0,q.jsx)(gK,{call:o,result:S,liveState:C,observed:e.activityObserved,cwd:M,defaultOpen:_,children:E},`${u.key}-${o.id||i}-evidence`):g?.outputMissing?null:iq(o,S,{sessionId:A??``,subagents:ie?e.snapshot.runtime.capabilities.subagents?.items:void 0,workflows:ie?e.snapshot.runtime.capabilities.workflows?.items:void 0,records:n,onInspectSubagent:e.onInspectSubagent,liveState:C,defaultOpen:_,observed:e.activityObserved!==!1}),O=WK(o.arguments),{Icon:k,action:P}=uK(o.name),F=P===`agent`?nq(O,UK(S?.details)).map(t=>RD(t,ie?e.snapshot.runtime.capabilities.subagents?.items:void 0,n)).join(t(`toolGroupSeparator`)):pK(o.name,O),I=(0,q.jsx)(k,{},`${u.key}-${o.id||i}-icon`);x.push({key:`${u.key}-tool-${o.id||i}`,turn:m,kind:o.name===`plan_ready`&&S&&eK(S)?`response`:D&&(o.name===`subagent_spawn`||o.name===`workflow`)?`custom`:`process`,processType:/^(subagent|workflow)/u.test(o.name)?`activity`:`tool`,processToolName:o.name,processPreview:F.split(` -`).find(Boolean),processStatus:T,error:T===`error`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-message":u.entryId??u.key,"data-history-result":y?.entryId,"data-history-highlighted":N&&(u.entryId===N||y?.entryId===N)||void 0,tabIndex:-1,children:(0,q.jsxs)(`div`,{className:`message-content`,children:[D||(0,q.jsx)(eq,{body:o.name===`bash`&&typeof O.command==`string`?O.command:o.arguments,icon:I,name:o.name||`tool`,summary:P===`search`&&typeof O.path==`string`?t(`toolSearchTarget`,{path:O.path,pattern:QK(o.name,O)}):QK(o.name,O),output:g?g.error??S?.content:o.id&&l.has(o.id)?S?.content:void 0,status:T,evidenceState:e.activityObserved===!1&&g?.state===`running`?`unknown`:g?.state,rawDetails:p?.showWrapper&&o.id===a.id?d?.details:void 0,note:g?.outputMissing?t(g.argumentsOmitted?`toolNestedArgumentsMissing`:`toolNestedOutputMissing`):void 0,snapshotMissingResult:S?.forkSnapshotToolResult,defaultOpen:_,children:E}),p?.incomplete&&r===h.length-1&&(0,q.jsx)(`p`,{className:`evidence-note`,role:`status`,children:t(`toolNestedIncomplete`)}),D&&!ud(o.name)&&E]})})})}}}),T(S.length),D<0&&L(y.content,`${u.key}-answer`,!0),y.stopReason===`error`&&!r.finalErrors.has(d)&&(o.set(u.key,[...x]),x.length=0);let R=r.groups.get(d);if(R&&(R.state===`retrying`&&se&&(s=`${R.attempts[0].key}-attempts`),x.push({key:`${R.attempts[0].key}-attempts`,turn:m,kind:`outcome`,outcome:R.state===`interrupted`?`interrupted`:void 0,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(XK,{state:R.state,retry:R.state===`retrying`?se:void 0,observed:e.activityObserved!==!1&&ae?.status!==`unknown`,attempts:R.attempts.map(e=>({entry:e,content:o.get(e.key)}))})})})),r.finalErrors.has(d)||y.stopReason===`aborted`){let t=y.stopReason===`error`,n=g===_&&d===i&&d===a?h:void 0;x.push({key:`${u.key}-outcome`,turn:m,kind:`outcome`,error:t,outcome:t?`failed`:`interrupted`,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(YK,{failed:t,error:y.errorMessage,retryPrompt:n,retryEntryId:u.entryId,canRetry:ie&&!re&&!oe,onRetry:e.onResend})})})}else(y.stopReason===`stop`||y.stopReason===`length`)&&x.push({key:`${u.key}-completed`,turn:m,kind:`outcome`,outcome:`completed`,content:null});return x}if(y.role===`toolResult`){if(y.toolCallId&&l.has(y.toolCallId))return[];if(eK(y))return[{key:u.key,turn:m,kind:`response`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(tK,{result:y,sessionId:A,sessionPath:j,entryId:u.entryId})})})}];let r=y.toolName?.startsWith(`subagent`)?`subagent`:y.toolName?.startsWith(`workflow`)?`workflow`:null,i=KK(y),a=e.activityObserved===!1&&i===`running`?`unknown`:i,o=y.toolName||`tool`,s=r===`subagent`?e.snapshot.preferences.subagentResultDisplay===`full`:o===`bash`?e.snapshot.preferences.bashToolDisplay===`full`:o===`write`||o===`edit`?e.snapshot.preferences.fileMutationDisplay===`full`:!1,{Icon:c}=uK(o),d=(0,q.jsx)(c,{},`${u.key}-icon`),f=r===`subagent`&&!y.forkSnapshotToolResult?iq({type:`toolCall`,id:y.toolCallId,name:o,arguments:`{}`},y,{sessionId:A??``,subagents:ie?e.snapshot.runtime.capabilities.subagents?.items:void 0,records:n,onInspectSubagent:e.onInspectSubagent,defaultOpen:s,observed:e.activityObserved!==!1}):r&&!y.forkSnapshotToolResult?(0,q.jsx)(tq,{family:r,title:`${o.replaceAll(`_`,` `)} · ${PD(y.content)}`,body:y.content,status:a,defaultOpen:s},`${u.key}-card`):uq(y.content)&&!y.forkSnapshotToolResult?(0,q.jsxs)(`div`,{className:`tool-line-empty`,children:[(0,q.jsx)(`span`,{className:`tool-icon`,children:d}),(0,q.jsx)(`span`,{className:`tool-name`,children:o}),(0,q.jsx)(`span`,{className:`tool-summary`,children:t(`noOutput`)}),(0,q.jsx)(qK,{status:a})]},`${u.key}-empty`):(0,q.jsx)(eq,{body:y.content,icon:d,name:o,summary:PD(y.content),status:a,snapshotMissingResult:y.forkSnapshotToolResult,defaultOpen:s},`${u.key}-evidence`);return[{key:u.key,turn:m,kind:o===`ask_user`||o===`human_handoff`?`response`:`process`,processType:r?`activity`:`tool`,processToolName:o,processStatus:a,error:a===`error`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":`${u.entryId??u.key}-body`,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:f})})}]}return[]}),x=b.length;for(;x>0&&b[x-1].pendingPrompt;)x--;let S=b.length-x,C=b[x-1]?.turn??0;se&&!s&&(s=`native-retry`,b.splice(x,0,{key:`native-retry`,turn:C,kind:`outcome`,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(XK,{attempts:[],state:`retrying`,retry:se,observed:e.activityObserved!==!1&&ae?.status!==`unknown`})})}));let w=!re&&ae?.compaction;if(w&&w.state!==`completed`){let n=b.findIndex(e=>e.key===s),r={key:`native-compaction-${w.startedAt??w.state}`,turn:b[n]?.turn??C,kind:`custom`,content:(0,q.jsx)(qG,{compaction:w,observed:e.activityObserved!==!1&&ae?.status!==`unknown`})};b.splice(n<0?x:n,0,r),w.state===`failed`&&w.errorMessage&&b.splice(b.length-S,0,{key:`native-compaction-error`,turn:r.turn,kind:`custom`,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(JK,{label:t(`compactionFailed`),message:w.errorMessage})})})}return{rows:b,turns:p}},[ie,oe,ae,se,e.activityObserved,re,le,e.onResend,e.onEdit,e.onRegenerate,e.onFork,e.forkAvailable,e.forkPending,e.onInspectSubagent,e.snapshot.runtime.capabilities.subagents,e.snapshot.runtime.capabilities.workflows?.items,e.snapshot.preferences.expandThinking,e.snapshot.preferences.subagentResultDisplay,e.snapshot.preferences.bashToolDisplay,e.snapshot.preferences.fileMutationDisplay,e.snapshot.thinking?.level,e.thinkingDurations,e.snapshot.runtime.liveTools,A,j,M,te,P,N,t]),pe=PK(e.snapshot.selectedSession,fe,g),me=(0,K.useCallback)(async(t,r=!1)=>{if(_(),!g||!A||!j)return!1;let s=n.current,c=Array.from(s?.querySelectorAll(`[data-history-entry]`)??[]).find(e=>e.dataset.historyEntry===t);if(s&&c){o.current=null,ee(),i.current=!1,m(!0),E({sessionId:A,sessionPath:j,entryId:t});let e=Math.max(0,s.scrollTop+c.getBoundingClientRect().top-s.getBoundingClientRect().top-16),n=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return s.scrollTo?.({top:e,behavior:r||n?`instant`:`smooth`}),typeof s.scrollTo!=`function`&&(s.scrollTop=e),a.current=s.scrollTop,F(),c.focus({preventScroll:!0}),!0}if(r)return;if(!e.onNavigateToMessage)return!1;let l=new AbortController;h.current=l;let u=await e.onNavigateToMessage({sessionId:A,sessionPath:j,entryId:t},l.signal);if(!(l.signal.aborted||h.current!==l))return h.current=null,u},[_,F,ee,g,A,j,e.onNavigateToMessage]);(0,K.useLayoutEffect)(()=>{let t=n.current;if(!t||!O)return;let r=iK(O),s=v.current!==r,c=ne.current!==D.reset,u=s||c;ne.current=D.reset;let d=y.current!==e.scrollToBottom;if(y.current=e.scrollToBottom,S&&C!==w.current&&S.sessionId===O.id&&S.sessionPath===O.path){i.current=!1,b.current=null,v.current=r;return}if(d&&D.engaged){b.current=null,D.resetToLatest();return}let p=s&&!c&&!d?x.get(r)?.position:void 0,h=p?.key&&Array.from(t.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)).some(e=>e.dataset.historyEntry===p.key||e.dataset.historyMessage===p.key||e.dataset.historyResult===p.key),g=b.current??(p&&!p.pinned&&(!f.current||h)?{...p,scrollHeight:t.scrollHeight}:null);if(b.current=null,g&&(!u||p)&&!d){let e=Array.from(t.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)),n=g.key===void 0?void 0:e.find(e=>e.dataset.historyEntry===g.key)??e.reverse().find(e=>e.dataset.historyMessage===g.key||e.dataset.historyResult===g.key);i.current=!1,o.current=null,ee(),m(!0),v.current=r;let s=()=>{if(n&&!t.contains(n))return;b.current===g&&(b.current=null);let e=n?yq(n,t,g):g.scrollTop+t.scrollHeight-g.scrollHeight;typeof t.scrollTo==`function`?t.scrollTo({top:e,behavior:`instant`}):t.scrollTop=e,a.current=t.scrollTop,F()};if(n&&vq(n,t)){b.current=g;let e=requestAnimationFrame(s);return()=>cancelAnimationFrame(e)}s();return}(u||d||i.current)&&(i.current=!0,m(!1),l(oe&&!u&&!d)),v.current=r},[O,le,D.reset,D.engaged,D.resetToLatest,e.scrollToBottom,x,S,C,l,F,ee,oe]),(0,K.useLayoutEffect)(()=>{let e=n.current;if(!e||!O||!S||C===w.current||S.sessionId!==O.id||S.sessionPath!==O.path)return;let t=Array.from(e.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)),r=t.filter(e=>e.dataset.historyEntry===S.entryId||e.dataset.historyMessage===S.entryId||e.dataset.historyResult===S.entryId),s=S.restorePosition?.key?t.find(e=>e.dataset.historyEntry===S.restorePosition.key)??[...t].reverse().find(e=>e.dataset.historyMessage===S.restorePosition.key||e.dataset.historyResult===S.restorePosition.key):void 0,c=s??r.find(e=>e.classList.contains(`response`))??r.find(e=>e.dataset.historyMessage===S.entryId||e.dataset.historyResult===S.entryId)??r[0];if(!c)return;o.current=null,ee(),vq(c,e);let l=()=>{if(!e.contains(c)||S.restorePosition&&w.current===C)return;let t=yq(c,e,s?S.restorePosition:void 0);e.scrollTo?.({top:t,behavior:`instant`}),typeof e.scrollTo!=`function`&&(e.scrollTop=t),a.current=e.scrollTop,S.restorePosition||c.focus({preventScroll:!0}),i.current=!1,F(),m(!0),S.restorePosition||E(S),w.current=C,aK(x,iK(O),{position:_q(e,!1,O)})},u=document.querySelector(`dialog[open]`),d,f=()=>{d=requestAnimationFrame(l)};return u?u.addEventListener(`close`,f,{once:!0}):f(),()=>{u?.removeEventListener(`close`,f),d!==void 0&&cancelAnimationFrame(d)}},[O,S,C,x,ee,F]);let he=ie?se?`${t(`modelRetrying`)}${se.attempt&&se.maxAttempts?` (${se.attempt}/${se.maxAttempts})`:``}`:e.livePhase===`preparing`?t(`modelPreparing`):t(`modelRunning`):t(`backgroundSessionRunning`),ge=ie?0:ae?.liveTools.filter(e=>e.state===`running`).length??0,_e=ie&&e.liveActiveTurn!==void 0?e.liveActiveTurn:ae?ae.activeTurn:ie?e.snapshot.runtime.activeTurn:void 0,ve=oe&&_e&&O&&_e.sessionId===O.id&&_e.sessionPath===O?.path&&typeof _e.startedAt==`number`&&Number.isFinite(_e.startedAt)&&typeof _e.elapsedMs==`number`&&Number.isFinite(_e.elapsedMs)&&_e.elapsedMs>=0?_e:void 0,ye=!D.verifying&&ve&&(!re||ve.promptEntryId&&de.some(e=>e.promptEntryId===ve.promptEntryId))?ve:void 0,be=t=>{D.hasMore&&!D.error&&!D.verifying&&e.activityObserved!==!1&&e.resultExposureEnabled!==!1&&t.scrollTop<=Math.max(t.clientHeight,160)&&D.loadOlder()},xe=()=>{o.current=`up`,c(),i.current=!1,m(!0),D.retainReading()};return(0,q.jsxs)(`div`,{className:`transcript-surface`,children:[(0,q.jsx)(`div`,{ref:n,className:`conversation`,role:`log`,"aria-label":e.label??`Conversation`,tabIndex:0,onPointerDownCapture:e=>{e.target===e.currentTarget&&(o.current=`pointer`),S?.restorePosition&&(w.current=C)},onTouchStartCapture:e=>{u.current=e.touches[0]?.clientY,o.current=null,S?.restorePosition&&(w.current=C)},onTouchMove:e=>{let t=e.touches[0]?.clientY;t!==void 0&&u.current!==void 0&&t>u.current&&bq(e.nativeEvent,e.currentTarget)?xe():t!==void 0&&u.current!==void 0&&t{let t=e.currentTarget,n=t.scrollTopa.current;a.current=t.scrollTop;let s=t.scrollTop+t.clientHeight>=t.scrollHeight-48;i.current=i.current?!n||s:r&&s&&(o.current===`down`||o.current===`pointer`),i.current||D.retainReading(),m(!i.current),F(),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{!f.current&&A&&j&&t.isConnected&&aK(x,P,{position:_q(t,i.current,k.current)})},200),n&&be(t)},onWheel:e=>{!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&e.deltaY>0&&xq(e.nativeEvent,e.currentTarget,`down`)&&(o.current=`down`),S?.restorePosition&&(w.current=C),!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&e.deltaY<0&&bq(e.nativeEvent,e.currentTarget)&&(xe(),be(e.currentTarget))},onKeyDown:e=>{S?.restorePosition&&[`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `].includes(e.key)&&(w.current=C);let t=e.target;!e.defaultPrevented&&!e.altKey&&!e.metaKey&&(!e.ctrlKey||e.key===`End`)&&([`ArrowDown`,`PageDown`,`End`].includes(e.key)||e.key===` `&&!e.shiftKey)&&t instanceof HTMLElement&&!t.isContentEditable&&!t.closest(`input, textarea, select`)&&!(e.key===` `&&t.closest(`button, summary`))&&xq(e.nativeEvent,e.currentTarget,`down`)&&(o.current=`down`),!e.defaultPrevented&&!e.altKey&&!e.metaKey&&(!e.ctrlKey||e.key===`Home`)&&([`ArrowUp`,`PageUp`,`Home`].includes(e.key)||e.key===` `&&e.shiftKey)&&t instanceof HTMLElement&&!t.isContentEditable&&!t.closest(`input, textarea, select`)&&!(e.key===` `&&t.closest(`button, summary`))&&bq(e.nativeEvent,e.currentTarget)&&(xe(),be(e.currentTarget))},children:(0,q.jsxs)(`div`,{ref:r,className:`conversation-content`,children:[e.notice,O?.rerun&&e.onOpenOriginal&&(0,q.jsxs)(`div`,{className:`message-branch-origin`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void e.onOpenOriginal(O.rerun.source),children:[(0,q.jsx)(Ws,{"aria-hidden":`true`}),` `,t(`openOriginalConversation`)]}),(0,q.jsx)(`span`,{children:t(`messageRerunWorkspaceHint`)})]}),(D.hasMore||D.error||D.verifying)&&(0,q.jsxs)(`div`,{className:`conversation-history`,children:[D.error&&(0,q.jsx)(`p`,{role:`alert`,children:t(D.error)}),D.error&&D.error!==`historyChanged`&&(0,q.jsx)(`button`,{type:`button`,className:`secondary`,disabled:D.loading,onClick:()=>void D.loadOlder(),children:t(`retryAdmissionCheck`)}),D.loading&&(0,q.jsx)(`p`,{role:`status`,children:t(`historyLoading`)}),D.verifying&&!D.error&&!D.loading&&(0,q.jsx)(`p`,{role:`status`,children:t(`historyVerifying`)}),D.hasMore&&(0,q.jsx)(`span`,{children:t(`historyOmitted`,{count:O?.truncation.entriesOmitted??0})})]}),gq(de,oe&&(!re||!!ye)&&ae?.compaction?.state!==`running`,_e?.commandId,B,O,e.activityObserved===!1?void 0:ye,e.onReviewTurn,e.activityObserved!==!1,oe&&(!re||!!ye)),oe&&e.activityObserved!==!1&&ae?.compaction?.state!==`running`&&(0,q.jsxs)(`div`,{className:`conversation-execution-status sr-only`,role:`status`,"aria-live":`polite`,children:[(0,q.jsx)(`span`,{children:he}),ge>0&&(0,q.jsx)(`span`,{children:t(`observedSessionTools`,{count:ge})}),(ae?.pendingFollowUps??0)>0&&(0,q.jsx)(`span`,{children:t(`pendingFollowUpsHint`,{count:ae.pendingFollowUps})})]})]})}),(p||D.hasNewer)&&de.length>0&&(0,q.jsx)(V,{content:t(`jumpToLatest`),placement:`above`,children:(0,q.jsx)(`button`,{className:`jump-to-latest`,type:`button`,"aria-label":t(`jumpToLatest`),onClick:()=>{let e=n.current;e&&(c(),i.current=!0,m(!1),E(null),D.resetToLatest(),e.scrollTo({top:e.scrollHeight,behavior:window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches?`instant`:`smooth`}),queueMicrotask(()=>{n.current===e&&(Array.from(e.querySelectorAll(`.message-row[tabindex="-1"]`)).reverse().find(e=>!e.closest(`[hidden], details:not([open])`))??e).focus({preventScroll:!0})}))},children:oe&&e.activityObserved!==!1?(0,q.jsxs)(`span`,{className:`latest-activity-dots`,"aria-hidden":`true`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]}):(0,q.jsx)(ue,{"aria-hidden":`true`})})}),(0,q.jsx)(yK,{items:pe.items,viewport:n,enabled:g,onHidden:_,onRequestPreview:pe.requestPreview,readingHistory:p||D.hasNewer,onNavigate:me},L)]})}function Cq(e,t,n,r){let i=JSON.stringify([e,t.kind,t.id]),a=[],o=new Set,s=new Map,c=new Map,l=e=>({type:`toolCall`,id:e.toolId,name:e.name,arguments:e.argsPreview??`{}`}),u=(e,t)=>{a.push({type:`message`,id:e,timestamp:``,message:t})};for(let e of t.transcript){let t=JSON.stringify(e),n=c.get(t)??0;c.set(t,n+1);let i=e.id??`${t}:${n}`;if(e.kind===`user`)u(i,{role:`user`,content:e.text});else if(e.kind===`toolResult`){let t={role:`toolResult`,toolCallId:e.toolId,toolName:e.name,isError:e.isError,content:e.outputPreview??``};s.set(e.toolId,t),u(i,t)}else{let t=e.parts.map(e=>e.type===`toolCall`?(o.add(e.toolId),l(e)):e.type===`thinking`?{type:`thinking`,text:e.redacted?r:e.text}:e);u(i,{role:`assistant`,content:t.flatMap(e=>e.type===`text`?[e.text]:[]).join(` -`),parts:t,...t.some(e=>e.type===`toolCall`)?{stopReason:`toolUse`}:{}})}}let d=t.status===`running`,f=t.liveTools.map(e=>({call:l(e),result:s.get(e.toolId)??{role:`toolResult`,toolCallId:e.toolId,toolName:e.name,content:e.outputPreview??``,...e.done?{isError:e.isError===!0}:{}},state:s.has(e.toolId)?s.get(e.toolId).isError?`failed`:`returned`:e.done?e.isError?`failed`:`returned`:d?`running`:`unknown`})),p=[];return t.liveAssistant?.thinking&&p.push({type:`thinking`,text:t.liveAssistant.thinking}),t.liveAssistant?.text&&p.push({type:`text`,text:t.liveAssistant.text}),p.push(...f.filter(e=>!o.has(e.call.id)&&!s.has(e.call.id)).map(e=>e.call)),p.length&&u(t.nextEntryId??`live-assistant`,{role:`assistant`,content:t.liveAssistant?.text??``,parts:p}),t.finalText&&!a.some(e=>e.message?.role===`assistant`&&e.message.content.trim()===t.finalText.trim())&&u(`final-result`,{role:`assistant`,content:t.finalText,parts:[{type:`text`,text:t.finalText}]}),{protocolVersion:1,generatedAt:new Date(t.createdAt).toISOString(),cursor:0,preferences:n,sessions:[],workspaces:[],models:[],runtime:{status:`idle`,capabilities:{}},selectedSession:{id:i,path:``,cwd:t.cwd,entries:a,bytes:0,truncation:{truncated:t.truncated,entriesOmitted:t.omittedEntries,messagePartsOmitted:0,messagesTruncated:0,maxBytes:65536}},selectedExecution:{sessionId:i,sessionPath:``,status:d?`running`:t.status===`unknown`?`unknown`:`idle`,liveTools:f,liveToolsOmitted:0},truncation:{truncated:!1,sessionsOmitted:0,workspacesOmitted:0,modelsOmitted:0,maxBytes:0,bytes:0}}}function wq({sessionId:e,sessionPath:t,id:n,kind:r=`subagents`,activity:i,client:a,saved:o,liveAvailable:s,fullView:c,readOnlyNote:l=!0,active:u=!0,refreshRevision:d=0,onDetail:f,showModel:p=!0}){let{t:m}=W(),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(!0),[x,S]=(0,K.useState)(0),[C,w]=(0,K.useState)(null),T=nu(zG,e=>e.snapshot?.preferences),E=(0,K.useMemo)(()=>h?Cq(e,h,T??{theme:`system`},m(`subagentThinkingRedacted`)):null,[e,h,T,m]),D=(0,K.useRef)(f);D.current=f,(0,K.useEffect)(()=>{if(!u)return;if(!s){b(!1),v(m(`subagentUnavailable`));return}let o=new AbortController,c,l=!1,d=async()=>{if(l||o.signal.aborted||document.visibilityState===`hidden`)return;l=!0;let s=i?.status===`running`;try{let i=await(r===`workflows`?a.workflowAgentDetail(e,n,o.signal,...t?[t]:[]):a.subagentDetail(e,n,o.signal,...t?[t]:[]));if(o.signal.aborted)return;if(i.sessionId!==e||i.detail.kind!==r||i.detail.id!==n)throw g(null),s=!1,Error(m(`inspectionChanged`));s=i.detail.status===`running`,g(i.detail),D.current?.(i.detail),v(null),w(new Date().toLocaleTimeString())}catch(e){if(o.signal.aborted)return;v(e instanceof ge&&[404,501].includes(e.status)?m(`subagentUnavailable`):e instanceof Error?e.message:m(`inspectionUnavailable`))}finally{l=!1,o.signal.aborted||(b(!1),s&&(c=setTimeout(()=>void d(),1e3)))}},f=()=>{document.visibilityState===`visible`&&(clearTimeout(c),d())};return document.addEventListener(`visibilitychange`,f),d(),()=>{o.abort(),clearTimeout(c),document.removeEventListener(`visibilitychange`,f)}},[u,a,e,t,n,r,i?.status,x,d,s,m]);let O=h?.outcome===`interrupted`?`interrupted`:h?.status===`unknown`?void 0:h?.status,k=rG(h?.spend),A=c?`h2`:`h3`;return(0,q.jsxs)(`section`,{className:`subagent-detail`,"aria-label":m(`subagentDetails`),hidden:!u,children:[(0,q.jsxs)(`header`,{className:`subagent-detail-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`subagent-state ${O??`unknown`}`,children:O?m(`subagentState_${O}`):!h&&o?.state?`${m(`subagentRecordedState`)}: ${m(`subagentState_${o.state}`)}`:m(`unknownState`)}),h&&(h.status===`running`||h.settledAt!==void 0)&&(0,q.jsx)(`span`,{className:`subagent-duration`,children:ID(h.createdAt,h.settledAt)})]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":m(`refreshStatus`),disabled:y||!s,onClick:()=>{b(!0),S(e=>e+1)},children:(0,q.jsx)(me,{})})]}),y&&!h&&(0,q.jsxs)(`div`,{className:`inspection-loading`,role:`status`,children:[(0,q.jsx)(`p`,{children:m(`inspectionLoading`)}),(0,q.jsxs)(`div`,{"aria-hidden":`true`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]})]}),_&&(0,q.jsxs)(`div`,{className:`inspection-warning`,role:`alert`,children:[(0,q.jsx)(`p`,{children:m(h?`subagentStale`:`subagentUnavailable`)}),_!==m(`subagentUnavailable`)&&(0,q.jsx)(`small`,{children:_})]}),h&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`subagent-metadata`,children:[(0,q.jsx)(`code`,{children:h.id}),p&&h.model&&(0,q.jsx)(`span`,{children:h.model}),k&&(0,q.jsx)(`span`,{title:m(`subagentSpend`),children:k}),(0,q.jsx)(`span`,{title:h.cwd,children:h.cwd})]}),(0,q.jsxs)(`details`,{className:`subagent-task`,children:[(0,q.jsx)(`summary`,{children:m(`subagentTask`)}),(0,q.jsx)(`pre`,{children:h.prompt})]}),h.errorText&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:h.errorText}),(0,q.jsx)(`div`,{className:`subagent-conversation`,children:(0,q.jsx)(JE.Provider,{value:null,children:E&&(0,q.jsx)(Sq,{snapshot:E,label:m(`subagentTranscript`),activityObserved:u&&!_,liveMessages:[],liveRunning:h.status===`running`,livePhase:h.status===`running`?`running`:`idle`,liveRetry:null,thinkingStarts:{},thinkingDurations:{},scrollToBottom:0,notice:(0,q.jsxs)(q.Fragment,{children:[h.truncated&&(0,q.jsx)(`p`,{className:`inspection-note`,children:m(h.omittedEntries>0?`subagentTruncated`:`subagentTextTruncated`,{count:h.omittedEntries})}),h.kind===`workflows`&&h.transcriptUnavailable?(0,q.jsx)(`p`,{className:`inspection-note`,children:m(`subagentTranscriptUnavailable`)}):!h.transcript.length&&!h.liveAssistant?.text&&!h.liveAssistant?.thinking&&!h.liveTools.length&&!h.finalText?(0,q.jsx)(`p`,{className:`inspection-note`,children:m(`subagentNoMessages`)}):null]})})})}),(l||C)&&(0,q.jsxs)(`p`,{className:`subagent-footnote`,children:[l&&m(`subagentReadOnly`),l&&C&&` · `,C]})]}),!h&&!y&&o&&(0,q.jsxs)(`section`,{className:`subagent-transcript`,"aria-label":m(`subagentSaved`),children:[(0,q.jsx)(A,{children:m(`subagentSaved`)}),(0,q.jsx)(`p`,{className:`inspection-note`,children:m(`subagentSavedHint`)}),o.state&&(0,q.jsxs)(`p`,{children:[m(`subagentRecordedState`),`: `,m(`subagentState_${o.state}`)]}),o.result&&(0,q.jsx)(pD,{children:o.result}),o.receipt&&(0,q.jsxs)(`details`,{className:`subagent-task`,children:[(0,q.jsx)(`summary`,{children:m(`subagentSpawnReceipt`)}),(0,q.jsx)(`pre`,{children:o.receipt})]})]})]})}function Tq({sessionId:e,sessionPath:t,initialId:n,initialKind:r=`subagents`,activity:i,workflows:a,observed:o=!0,records:s=[],liveAvailable:c=!0,onClose:l}){let{t:u,i18n:d}=W(),[f,p]=(0,K.useState)([]),m=(0,K.useRef)(null),h=(0,K.useRef)(0),[g,_]=(0,K.useState)(n?{id:n,kind:r}:null),[v,y]=(0,K.useState)(g),[b,x]=(0,K.useState)(null),S=g?.id;(0,K.useLayoutEffect)(()=>{!S&&m.current&&(m.current.scrollTop=h.current)},[S]);let C=(e,t=`subagents`)=>{let n=e?{id:e,kind:t}:null;n&&y(n),_(n)},[w,T]=(0,K.useState)(()=>window.matchMedia?.(`(max-width: 1100px)`).matches??!1);(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 1100px)`);if(!e)return;let t=()=>T(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let E=(0,K.useMemo)(()=>new de,[]),D=c?i?.items??[]:[],O=c?a?.items??[]:[],k=VD(D,s,O,o),[A,j]=(0,K.useState)(Date.now),M=k.some(e=>e.state===`running`);(0,K.useEffect)(()=>{if(!M||S)return;j(Date.now());let e=setInterval(()=>j(Date.now()),1e3);return()=>clearInterval(e)},[M,S]);let N=(i?.omitted??0)+O.reduce((e,t)=>e+(t.children?.omitted??0),0),P=k.find(e=>e.id===S&&e.kind===g?.kind),F=g?.kind===`subagents`?s.find(e=>e.id===S):void 0,I=b?.id===S&&b?.kind===g?.kind?b?.model:F?.model,ee=(0,K.useRef)(null),L=(0,K.useRef)(document.activeElement);(0,K.useEffect)(()=>{ee.current?.focus()},[g]),(0,K.useEffect)(()=>()=>{queueMicrotask(()=>{!document.querySelector(`.subagent-panel`)&&L.current instanceof HTMLElement&&L.current.isConnected&&L.current.focus()})},[]);let R=[{key:`active`,label:`subagentActiveGroup`,items:k.filter(e=>e.state===`running`),empty:`subagentNoneRunning`},{key:`done`,label:`subagentFinishedGroup`,items:k.filter(e=>e.state===`done`),empty:`subagentNoneFinished`},{key:`attention`,label:`subagentOtherGroup`,items:k.filter(e=>e.state===`error`||e.state===`interrupted`)},{key:`saved`,label:`subagentUnconfirmedGroup`,items:k.filter(e=>!e.state)}],te=e=>{let t=Math.max(0,Date.now()-e),n=t<36e5?`minute`:t<864e5?`hour`:`day`,r=n===`minute`?6e4:n===`hour`?36e5:864e5;return new Intl.RelativeTimeFormat(d.language,{numeric:`auto`}).format(-Math.floor(t/r),n)},z=w?`main`:`aside`,B=w?`h1`:`h2`,ne=w?`h2`:`h3`;return(0,q.jsxs)(z,{className:`subagent-panel`,"aria-label":u(`subagentDetails`),onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&!e.defaultPrevented&&(e.preventDefault(),S?C(null):l())},children:[(0,q.jsxs)(`header`,{className:`subagent-panel-heading`,children:[(0,q.jsxs)(`div`,{className:`subagent-breadcrumb`,children:[S&&(0,q.jsx)(`button`,{ref:ee,type:`button`,className:`icon-button`,"aria-label":u(`backToSubagents`),onClick:()=>C(null),children:(0,q.jsx)(Ko,{})}),S?(0,q.jsx)(JW,{identity:`${e}:${S}`}):(0,q.jsx)($o,{"aria-hidden":`true`}),(0,q.jsx)(B,{title:P?.title||F?.title||S,children:S?P?.title||F?.title||S:u(`subagentDetails`)})]}),S&&I&&(0,q.jsx)(`span`,{className:`subagent-panel-model`,title:I,children:I.split(`/`).at(-1)}),(0,q.jsx)(`button`,{ref:S?void 0:ee,type:`button`,className:`icon-button`,"aria-label":u(`close`),onClick:l,children:(0,q.jsx)(je,{})})]}),v&&(0,q.jsx)(wq,{sessionId:e,sessionPath:t,id:v.id,kind:v.kind,activity:v.kind===`subagents`?D.find(e=>e.id===v.id):O.flatMap(e=>e.children?.items??[]).find(e=>e.id===v.id),client:E,saved:v.kind===`subagents`?s.find(e=>e.id===v.id):void 0,liveAvailable:c,fullView:w,showModel:!1,active:!!S,onDetail:e=>x(t=>t?.id===e.id&&t.kind===e.kind&&t.model===e.model?t:{id:e.id,kind:e.kind,model:e.model})},`${e}:${v.kind}:${v.id}`),!S&&(0,q.jsxs)(`nav`,{className:`subagent-list`,"aria-label":u(`subagentTasks`),ref:m,onScroll:e=>{h.current=e.currentTarget.scrollTop},children:[R.map(t=>{if(!t.items.length&&!t.empty)return null;let n=f.includes(t.key)?t.items:t.items.slice(0,t.key===`active`?4:10);return(0,q.jsxs)(`section`,{className:`subagent-list-group`,children:[(0,q.jsxs)(ne,{children:[u(t.label),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,q.jsx)(`span`,{children:t.items.length})]}),!t.items.length&&t.empty&&(0,q.jsx)(`p`,{children:u(t.empty)}),(0,q.jsx)(`ul`,{className:`subagent-task-list`,children:n.map(t=>{let n=t.state??`unknown`,r=u(`subagentState_${n}`),i=t.state===`running`?t.taskPreview||u(`subagentProcessing`):t.state===`done`?void 0:r;return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,className:`subagent-task-row ${n}`,"aria-label":`${t.title||t.id} · ${r}${t.taskPreview&&i?` · ${i}`:``}`,onClick:()=>C(t.id,t.kind),children:[(0,q.jsx)(JW,{identity:`${e}:${t.id}`}),(n===`running`||n===`done`)&&(0,q.jsx)(`span`,{className:`subagent-task-status`,children:r}),(0,q.jsx)(`span`,{className:`subagent-task-title`,title:t.title||t.id,children:t.title||t.id}),t.state===`running`?(0,q.jsx)(`span`,{className:`subagent-task-end`,children:ID(t.createdAt,A)}):t.timestamp?(0,q.jsx)(`time`,{className:`subagent-task-end`,dateTime:new Date(t.timestamp).toISOString(),title:new Date(t.timestamp).toLocaleString(d.language),children:te(t.timestamp)}):null,i&&(0,q.jsx)(`span`,{className:`subagent-task-description`,children:i})]})},`${t.kind}:${t.id}`)})}),n.lengthp(e=>[...e,t.key]),children:u(`subagentShowMore`,{count:t.items.length-n.length})})]},t.key)}),N>0&&(0,q.jsx)(`p`,{children:u(`subagentListTruncated`,{count:N})}),!!a?.omitted&&(0,q.jsx)(`p`,{children:u(`subagentWorkflowsTruncated`,{count:a?.omitted})})]})]})}var Eq=`openpi:subagent-panel:v1`;function Dq(){try{let e=JSON.parse(sessionStorage.getItem(Eq)??`null`);if(!e||typeof e!=`object`)return null;let{sessionId:t,sessionPath:n}=e;return typeof t!=`string`||!t||t.length>160||typeof n!=`string`||!n||n.length>4096?null:{sessionId:t,sessionPath:n,navigation:0}}catch{return null}}function Oq(e){try{e?sessionStorage.setItem(Eq,JSON.stringify({sessionId:e.sessionId,sessionPath:e.sessionPath})):sessionStorage.removeItem(Eq)}catch{}}function kq({text:e,code:t=!1}){let{t:n}=W(),[r,i]=(0,K.useState)(!0),[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(``);return(0,K.useEffect)(()=>{let n=!1;return c(``),o(!1),t&&e.length<=1e5&&Ee(async()=>{let{default:e}=await import(`./app-common.js`);return{default:e}},__vite__mapDeps([3,1])).then(({default:t})=>{let r=t.highlight(e,{language:`javascript`,ignoreIllegals:!0}).value;n||c(Me.sanitize(r,{ALLOWED_TAGS:[`span`],ALLOWED_ATTR:[`class`]}))}).catch(()=>{}),()=>{n=!0}},[t,e]),(0,q.jsxs)(`div`,{className:`trajectory-payload`,"data-wrap":r,children:[(0,q.jsxs)(`div`,{className:`trajectory-payload-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>i(!r),children:n(`trajectoryWrap`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{td(e).then(o)},children:n(a?`trajectoryCopied`:`trajectoryCopy`)})]}),(0,q.jsx)(`pre`,{children:s?(0,q.jsx)(`code`,{dangerouslySetInnerHTML:{__html:s}}):(0,q.jsx)(`code`,{children:e})})]})}function Aq(e){return e.map((e,t)=>({key:e.key,start:t,end:t+1,lane:e.kind===`call`||e.kind===`result`?2:+(e.kind===`assistant`),error:e.outcome===`error`||e.kind===`assistant`&&(e.message?.stopReason===`error`||e.message?.stopReason===`aborted`)}))}function jq(e,t){return t===null?null:new Set(Aq(e).filter(e=>e.start<=t.end&&e.end>=t.start).map(e=>e.key))}function Mq(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&(n.kind!==`event`||n.message||n.input!==void 0||n.result))return n}return e.at(-1)}function Nq(e){let t=[];for(let n of e){(n.kind===`user`||!t.length)&&t.push({key:n.key,...n.kind===`user`?{prompt:n}:{},runs:[]});let e=t.at(-1),r=e.runs.at(-1);n.kind===`event`&&r?.[0]?.kind===`event`?r.push(n):e.runs.push([n])}return t}function Pq(e){let t=new Map(e.map((e,t)=>[e.id,t])),n=new Map,r=new Map,i=new Map;for(let a of e){let e=`message`in a?a.message:void 0;for(let t of e?.parts??[])t.type===`toolCall`&&t.id&&r.set(t.id,(r.get(t.id)??0)+1);if(e?.role===`toolResult`&&e.toolCallId){let r=i.get(e.toolCallId)??[];r.push(e),n.set(e,t.get(a.id)??-1),i.set(e.toolCallId,r)}}let a=new Set,o=[];for(let s of e){let e=`message`in s?s.message:void 0;if(!e){o.push({key:s.id,kind:`event`,title:s.type,timestamp:s.timestamp});continue}if(e.role!==`toolResult`){(e.role!==`assistant`||e.content||!e.parts?.length||e.parts?.some(e=>e.type!==`toolCall`))&&o.push({key:s.id,kind:e.role===`user`?`user`:e.role===`assistant`?`assistant`:`event`,title:e.customType||e.role||s.type,timestamp:s.timestamp,message:e});for(let[c,l]of(e.parts??[]).entries()){if(l.type!==`toolCall`)continue;let u=l.id?i.get(l.id):void 0,d=l.id&&r.get(l.id)===1&&u?.length===1&&u[0]?.toolName===l.name&&!l.id.includes(`[truncated]`)&&(n.get(u[0])??-1)>(t.get(s.id)??-1)?u[0]:void 0;d&&a.add(d),o.push({key:`${s.id}:call:${c}`,kind:`call`,title:l.name,timestamp:s.timestamp,callId:l.id,input:l.arguments,message:e,result:d,outcome:d?.isError===!0?`error`:d?.isError===!1?`returned`:`unknown`})}}}let s=new Map(o.map(e=>[e.key,t.get(e.key)??-1]));for(let n of e){let e=`message`in n?n.message:void 0;e?.role===`toolResult`&&!a.has(e)&&(o.push({key:n.id,kind:`result`,title:e.toolName||`toolResult`,timestamp:n.timestamp,callId:e.toolCallId,result:e,outcome:e.isError===!0?`error`:e.isError===!1?`returned`:`unknown`}),s.set(n.id,t.get(n.id)??0));for(let[r,i]of(e?.parts??[]).entries())i.type===`toolCall`&&s.set(`${n.id}:call:${r}`,t.get(n.id)??0)}return o.sort((e,t)=>(s.get(e.key)??0)-(s.get(t.key)??0)),o}function Fq(e,t=[]){let n=Pq(e),r=new Set(n.map(e=>e.key)),i=e.flatMap(e=>e.message?.role===`assistant`&&!r.has(e.id)?[{key:e.id,kind:`assistant`,title:`assistant`,timestamp:e.timestamp,message:e.message}]:[]),a=new Map(e.map((e,t)=>[e.id,t])),o=new Map,s=new Map;for(let t of e)for(let[e,n]of(t.message?.parts??[]).entries())n.type===`toolCall`&&(o.set(`${t.id}:call:${e}`,t.id),n.id&&s.set(n.id,(s.get(n.id)??0)+1));return[...n,...i].sort((e,t)=>{let n=e=>a.get(o.get(e.key)??e.key)??-1;return n(e)-n(t)||Number(e.kind===`call`)-Number(t.kind===`call`)}).flatMap(e=>{if(e.kind!==`call`||e.title!==`codemode`)return[e];let n=e.message?.parts?.find(t=>t.type===`toolCall`&&t.id===e.callId);return n?.type!==`toolCall`||!n.id||s.get(n.id)!==1?[e]:[e,...(JG(n,e.result,t)?.children??[]).map(t=>{let n=e.result?.nestedCalls?.calls.find(e=>e.call.id===t.call.id)?.durationMs;return{key:`${e.key}:nested:${t.call.id}`,kind:`call`,title:t.call.name,parentKey:e.key,callId:t.call.id,input:t.call.arguments,result:t.result,missingOutput:t.outputMissing,error:t.error,state:t.state,outcome:t.state===`returned`?`returned`:[`failed`,`cancelled`,`timed_out`].includes(t.state)?`error`:`unknown`,...n===void 0?{}:{durationMs:n}}})]})}function Iq(e){return e===void 0||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(2)} s`}function Lq({nodes:e,selectedKey:t,range:n,onSelect:r,onRange:i}){let{t:a}=W(),o=Aq(e),s=(0,K.useRef)(null),c=Math.max(1,o.length);function l(e){let t=e.currentTarget.getBoundingClientRect();return Math.max(0,Math.min(c,(e.clientX-t.left)/Math.max(1,t.width)*c))}return(0,q.jsx)(`section`,{className:`trajectory-overview`,"aria-label":a(`trajectoryOverview`),children:(0,q.jsxs)(`div`,{className:`trajectory-overview-track`,children:[(0,q.jsxs)(`div`,{className:`trajectory-lane-labels`,children:[(0,q.jsx)(`span`,{children:a(`trajectoryContextLane`)}),(0,q.jsx)(`span`,{children:a(`trajectoryModelLane`)}),(0,q.jsx)(`span`,{children:a(`trajectoryToolLane`)})]}),(0,q.jsxs)(`svg`,{viewBox:`0 0 ${c} 3`,preserveAspectRatio:`none`,onPointerDown:e=>{e.button===0&&(s.current={start:l(e),key:e.target.getAttribute(`data-record-key`)},e.currentTarget.setPointerCapture(e.pointerId))},onPointerUp:e=>{let t=s.current;if(s.current=null,t===null)return;let n=t.start,a=l(e);Math.abs(a-n)>c/100?i({start:Math.min(n,a),end:Math.max(n,a)}):t.key&&r(t.key)},onPointerCancel:()=>{s.current=null},children:[(0,q.jsx)(`title`,{children:a(`trajectoryOverview`)}),[0,1,2].map(e=>(0,q.jsx)(`line`,{x1:`0`,x2:c,y1:e+.5,y2:e+.5},e)),o.map((n,i)=>(0,q.jsx)(`rect`,{x:n.start+.08,y:n.lane+.39,width:.84,height:.22,rx:.04,className:`${n.error?`error`:``} ${t===n.key?`selected`:``}`,"data-lane":n.lane,"data-kind":e[i].kind,"data-record-key":n.key,role:`button`,tabIndex:0,"aria-label":a(`trajectorySelectRecord`,{number:i+1,name:e[i].title}),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r(n.key))},children:(0,q.jsx)(`title`,{children:`${i+1} · ${e[i].title} · ${Iq(e[i].durationMs)}`})},n.key)),n&&(0,q.jsx)(`rect`,{className:`trajectory-range`,x:n.start,y:`0`,width:n.end-n.start,height:`3`})]}),n&&(0,q.jsx)(`button`,{type:`button`,className:`trajectory-clear-range`,onClick:()=>i(null),children:a(`trajectoryClearRange`)})]})})}var Rq=[];function zq(e){return e.kind===`call`||e.kind===`result`?``:(e.message?.parts??[]).filter(e=>e.type===`thinking`).map(e=>e.text).join(` +`),C=`${e.id}:${S}`,w=c?.source===C?c.status:null,T=`${e.id}:diff:${d.diff}`,E=c?.source===T?c.status:null,D=d.output.split(` +`).map((e,t)=>({text:e,number:d.offset+t})),O=d.diff?yK(d.diff):[],k=O.filter(e=>e.kind===`added`).length,A=O.filter(e=>e.kind===`removed`).length,j=d.diff||d.change===`created`?(0,q.jsxs)(`span`,{className:`evidence-summary-meta`,title:s(`toolDiffStatsHelp`),children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,k.toLocaleString()]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,A.toLocaleString()]}),d.truncated&&(0,q.jsx)(`span`,{children:s(`gitReviewPartialLabel`)})]}):null,M=d.tests?.failures.map((e,t)=>({text:e,number:t+1}))??[];return(0,q.jsxs)(`details`,{className:`tool-evidence-card evidence-${d.kind}`,"data-state":f,"data-tool":e.name,open:a||void 0,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{className:`evidence-icon`,"aria-hidden":`true`,children:(0,q.jsx)(y,{})}),(0,q.jsxs)(`span`,{className:`evidence-target`,title:h||b,children:[(0,q.jsx)(`span`,{className:`tool-action`,children:f===`returned`&&d.change===`created`?s(`toolFileChange_created`):gK(s,e.name,f)}),v?(0,q.jsx)(`span`,{className:`evidence-filename`,children:v}):b?(0,q.jsx)(`span`,{className:`evidence-command`,children:b}):null]}),j,(0,q.jsx)(os,{className:`evidence-chevron`,"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`evidence-status`,children:p})]}),(0,q.jsxs)(`div`,{className:`evidence-content`,children:[(m||d.displayPath||d.pathUnavailable)&&!d.diff&&(0,q.jsxs)(`p`,{children:[(0,q.jsx)(`strong`,{children:s(`toolRequestedFile`)}),` `,u&&m?(0,q.jsx)(`button`,{className:`artifact-link`,type:`button`,onClick:()=>u.open(m),children:(0,q.jsx)(`code`,{children:g})}):(0,q.jsx)(`code`,{children:g}),i&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`br`,{}),(0,q.jsxs)(`small`,{children:[s(`toolWorkspace`),`: `,i]})]})]}),d.pathUnavailable&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:d.pathUnavailable}),x&&(0,q.jsxs)(`figure`,{className:`evidence-shell`,"aria-label":s(`toolCallOutput`),children:[(0,q.jsxs)(`figcaption`,{children:[(0,q.jsxs)(`span`,{className:`evidence-shell-label`,children:[(0,q.jsx)(Vc,{"aria-hidden":`true`}),e.name===`bash`?`Bash`:`Shell`]}),(0,q.jsxs)(`span`,{className:`evidence-process-meta`,children:[p,d.exitCode===void 0?d.signal?` · ${d.signal}`:``:` · exit ${d.exitCode}`]}),(0,q.jsx)(`button`,{type:`button`,"data-copied":w===`copiedCode`||void 0,"aria-label":s(w===`copiedCode`?`copiedCode`:`copyCode`),title:s(w===`copiedCode`?`copiedCode`:`copyCode`),onClick:async()=>{let e=await td(S);l({source:C,status:e?`copiedCode`:`copyCodeFailed`})},children:w===`copiedCode`?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{})})]}),d.command&&(0,q.jsxs)(`pre`,{className:`evidence-shell-command`,children:[`$ `,d.command]}),(d.output||!d.command)&&(0,q.jsx)(`pre`,{className:`evidence-shell-output`,tabIndex:0,children:d.output||s(`noOutput`)}),w===`copyCodeFailed`&&(0,q.jsx)(`p`,{role:`status`,className:`evidence-warning`,children:s(w)})]}),d.truncated&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:s(`toolPartialEvidence`)}),d.change&&!d.diff&&(0,q.jsx)(`p`,{children:s(`toolFileChange_${d.change}`)}),d.kind===`change`&&!d.diff&&!d.change&&(0,q.jsx)(`p`,{children:d.evidenceUnavailable??s(`toolChangeUnavailable`)}),d.tests&&(0,q.jsxs)(`figure`,{className:`evidence-test-summary`,"aria-label":`Test evidence`,children:[(0,q.jsx)(`figcaption`,{children:(0,q.jsx)(`strong`,{children:s(`toolTestResults`,{format:d.tests.format})})}),(0,q.jsx)(`p`,{children:s(`toolTestCounts`,d.tests)}),(0,q.jsx)(`p`,{children:s(`toolTestCountsHelp`)}),M.map(e=>(0,q.jsx)(bK,{"aria-label":`Failure excerpt ${e.number}`,children:e.text},e.number))]}),x?null:d.diff?(0,q.jsxs)(`figure`,{className:`evidence-diff`,"aria-label":`Change diff`,children:[(0,q.jsxs)(`figcaption`,{children:[u&&m?(0,q.jsx)(`button`,{className:`evidence-diff-file`,type:`button`,title:g,"aria-label":g,onClick:()=>u.open(m),children:v}):(0,q.jsx)(`span`,{className:`evidence-diff-file`,title:g,children:v}),j,(0,q.jsx)(`button`,{className:`evidence-copy`,type:`button`,"data-copied":E===`copiedCode`||void 0,"aria-label":s(E===`copiedCode`?`copiedCode`:`copyCode`),title:s(E===`copiedCode`?`copiedCode`:`copyCode`),onClick:async()=>{let e=await td(d.diff??``);l({source:T,status:e?`copiedCode`:`copyCodeFailed`})},children:E===`copiedCode`?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{})})]}),(0,q.jsx)(`pre`,{className:`evidence-diff-lines`,children:O.map(e=>(0,q.jsxs)(`span`,{className:`evidence-diff-row diff-${e.kind}`,children:[(0,q.jsx)(`span`,{className:`evidence-line-number`,"aria-hidden":`true`,children:e.newLine??e.oldLine??``}),(0,q.jsx)(`span`,{className:`evidence-diff-marker`,children:e.marker}),(0,q.jsx)(`span`,{children:e.code}),` +`]},e.id))}),E===`copyCodeFailed`&&(0,q.jsx)(`p`,{role:`status`,className:`evidence-warning`,children:s(E)})]}):d.numberLines?(0,q.jsx)(bK,{className:`evidence-lines`,"aria-label":`File content`,children:D.map(e=>(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`span`,{className:`evidence-line-number`,"aria-hidden":`true`,children:e.number}),e.text,` +`]},e.number))}):(0,q.jsx)(bK,{className:`evidence-log`,"aria-label":`Tool output`,children:d.output||s(`noOutput`)}),d.kind===`file`&&d.truncated&&(0,q.jsx)(`p`,{children:s(`toolReadMore`)}),d.recovery&&(0,q.jsxs)(`p`,{children:[s(`toolFullOutputReference`),` `,(0,q.jsx)(`code`,{children:d.recovery})]}),d.readRecovery&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:d.readRecovery}),(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:s(`toolRawEvidence`)}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`code`,{children:e.name})}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`strong`,{children:s(`toolCallArguments`)})}),(0,q.jsx)(`pre`,{children:d.rawArguments}),(0,q.jsx)(`p`,{children:(0,q.jsx)(`strong`,{children:s(`toolCallOutput`)})}),(0,q.jsx)(`pre`,{children:d.rawResult})]}),o]})]})}function SK({changes:e,onReview:t}){let{t:n}=W(),[r,i]=(0,K.useState)(!1),a=(0,K.useId)();if(e.state===`unavailable`||e.files.length===0)return null;let o=e.state===`partial`,s=e.source===`file-tools`,c=e.fileCount===null;return(0,q.jsxs)(`section`,{className:`turn-changes`,"aria-label":n(`turnChangesReview`),children:[(0,q.jsxs)(`header`,{className:`turn-changes-header`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`turn-changes-summary`,"aria-expanded":r,"aria-controls":a,onClick:()=>i(e=>!e),children:[(0,q.jsx)(Ms,{className:`turn-changes-icon`,"aria-hidden":`true`}),(0,q.jsx)(`strong`,{title:n(s?`turnEditsScope`:`turnChangesScope`),children:n(s?c?`turnEditsPartial`:`turnEdits`:o?`turnChangesPartial`:`turnChanges`,{count:e.fileCount??e.files.length})}),!c&&!e.files.some(e=>e.binary||e.statsUnavailable)&&(0,q.jsxs)(`span`,{className:`turn-changes-totals`,children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,e.additions]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,e.deletions]})]}),o&&!s&&(0,q.jsx)(`span`,{className:`turn-changes-warning`,children:n(`turnChangesIncomplete`)}),(0,q.jsx)(is,{className:r?`up`:``,"aria-hidden":`true`})]}),(0,q.jsx)(`button`,{type:`button`,className:`turn-changes-review-button`,"aria-label":n(`turnChangesReview`),disabled:!t,onClick:()=>t?.(e.promptEntryId,e.files[0]?.path),children:n(`reviewChanges`)})]}),(0,q.jsx)(`div`,{className:`turn-changes-list`,id:a,hidden:!r,children:e.files.map(r=>{let i=Math.max(r.path.lastIndexOf(`/`),r.path.lastIndexOf(`\\`));return(0,q.jsxs)(`button`,{type:`button`,className:`turn-changes-file`,title:r.path,"aria-label":r.path,disabled:!t,onClick:()=>t?.(e.promptEntryId,r.path),children:[(0,q.jsxs)(`span`,{className:`turn-changes-path`,children:[(0,q.jsx)(`strong`,{children:r.path.slice(i+1)}),i>=0&&(0,q.jsx)(`span`,{children:r.path.slice(0,i)})]}),(0,q.jsx)(`span`,{className:`turn-changes-file-stats`,children:r.binary?(0,q.jsx)(`span`,{children:n(`gitReviewBinaryShort`)}):r.statsUnavailable?(0,q.jsx)(`span`,{title:n(`turnEditReason_${r.statsUnavailable}`),children:n(`turnEditStatsUnknown`)}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,r.additions]}),(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`−`,r.deletions]})]})})]},r.path)})})]})}function CK({item:e,position:t,current:n,onNavigate:r,onPreview:i}){let{t:a}=W(),o=(0,K.useRef)(()=>{}),s=ed({placement:`start`,delay:150,hideDelay:100,touchTrigger:`none`,onShow:(0,K.useCallback)(()=>i(e.entryId,()=>o.current()),[e.entryId,i])});return o.current=s.hide,(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{ref:s.ref,className:`turn-tick`,type:`button`,"data-turn-entry":e.entryId,"aria-label":a(`conversationTurnPosition`,{position:t}),"aria-describedby":s.describedBy,"aria-current":n?`location`:void 0,onClick:()=>{s.hide(),r(e.entryId)},children:(0,q.jsx)(`span`,{className:`turn-tick-mark`,"aria-hidden":`true`})}),s.renderHoverCard((0,q.jsx)(`span`,{className:`turn-preview`,children:e.previewState===`idle`||e.previewState===`loading`?(0,q.jsx)(`span`,{role:`status`,children:a(`turnPreviewLoading`)}):e.previewState===`unavailable`?(0,q.jsx)(`span`,{role:`status`,children:a(`turnPreviewUnavailable`)}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`span`,{className:`turn-preview-prompt`,children:e.title}),e.reply&&(0,q.jsx)(`span`,{className:`turn-preview-reply`,children:e.reply})]})}),{className:`turn-preview-layer`})]})}function wK({items:e,viewport:t,onNavigate:n,readingHistory:r,onRequestPreview:i,enabled:a=!0,onHidden:o}){let{t:s}=W(),c=(0,K.useRef)(null),l=JSON.stringify(e.map(e=>e.entryId)),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(!1),p=(0,K.useRef)(0),[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)({top:0,height:0,visible:!1,current:[]}),v=(0,K.useCallback)(()=>{u.current?.hide(),u.current=null,d.current&&d.current.captureTarget.hasPointerCapture?.(d.current.pointerId)&&d.current.captureTarget.releasePointerCapture(d.current.pointerId),d.current=null,p.current++,o?.()},[o]),y=(0,K.useCallback)((e,n)=>{if(!a||!t.current||!c.current||c.current.style.visibility===`hidden`||t.current.checkVisibility?.()===!1||c.current.checkVisibility?.()===!1||getComputedStyle(t.current).display===`none`||getComputedStyle(c.current).display===`none`){n();return}u.current?.entryId!==e&&u.current?.hide(),u.current={entryId:e,hide:n},i?.(e)},[a,t,i]),b=(0,K.useCallback)((e,t=!1)=>{u.current?.hide();let r=++p.current;h(!1),Promise.resolve(n(e,t)).then(e=>{p.current===r&&e===!1&&h(!0)})},[n]);return(0,K.useLayoutEffect)(()=>{let e=t.current,n=e?.parentElement,i=JSON.parse(l);if(!e||!n){v();return}let o,s=r?n.querySelector(`.jump-to-latest`):null,u=()=>{o=void 0;let t=e.getBoundingClientRect(),r=n.getBoundingClientRect(),l=new Map;for(let t of e.querySelectorAll(`[data-history-entry]`)){let e=t.dataset.historyEntry;e&&!l.has(e)&&l.set(e,t)}let u=e.querySelector(`.conversation-turn`)??l.values().next().value,d=e.offsetWidth>0?t.width/e.offsetWidth:1,f=a&&t.height>0&&d>0&&!!u&&(t.right-u.getBoundingClientRect().right)/d>=48&&e.checkVisibility?.()!==!1&&getComputedStyle(e).display!==`none`&&(!c.current||getComputedStyle(c.current).display!==`none`);f||v();let p=s?.getBoundingClientRect(),m=Math.min(t.bottom-8,p&&p.height>0?p.top-12:1/0),h=Math.max(0,m-t.top-8),g=i.flatMap(e=>{let n=l.get(e);if(!n)return[];let r=(n.closest(`.conversation-turn`)??n).getBoundingClientRect();return r.bottom>t.top+16&&r.tope.top===y.top&&e.height===y.height&&e.visible===f&&e.current.join(`\0`)===g.join(`\0`)?e:y)},d=()=>{o===void 0&&(o=requestAnimationFrame(u))};u(),e.addEventListener(`scroll`,d),window.addEventListener(`resize`,d);let f=typeof ResizeObserver>`u`?void 0:new ResizeObserver(d);f?.observe(e),f?.observe(n),s&&f?.observe(s);for(let t of e.children)f?.observe(t);let p=new MutationObserver(d);return p.observe(e,{childList:!0,subtree:!0}),()=>{o!==void 0&&cancelAnimationFrame(o),e.removeEventListener(`scroll`,d),window.removeEventListener(`resize`,d),f?.disconnect(),p.disconnect()}},[l,t,r,a,v]),(0,K.useLayoutEffect)(()=>{if(g.height,!g.visible||d.current)return;let e=c.current,t=Array.from(e?.querySelectorAll(`[data-turn-entry]`)??[]),n=t.find(e=>e===document.activeElement)??t.find(e=>e.matches(`:hover`))??t.find(e=>g.current.includes(e.dataset.turnEntry??``));if(!e||!n)return;let r=e.getBoundingClientRect(),i=n.getBoundingClientRect();i.topr.bottom&&(e.scrollTop+=i.bottom-r.bottom)},[g.current,g.height,g.visible,l]),(0,K.useLayoutEffect)(()=>{let n=t.current;if(!n)return;let r=t=>{if(!a||t.defaultPrevented||t.isComposing||!t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||![`ArrowUp`,`ArrowDown`].includes(t.key)||!n.parentElement?.contains(document.activeElement)||n.checkVisibility?.()===!1||getComputedStyle(n).display===`none`||getComputedStyle(n).visibility===`hidden`||n.getBoundingClientRect().height<=0)return;let r=new Map;for(let e of n.querySelectorAll(`[data-history-entry]`)){let t=e.dataset.historyEntry;t&&!r.has(t)&&r.set(t,e)}let i=e.flatMap((e,t)=>{let n=r.get(e.entryId);return n?[{item:e,index:t,top:n.getBoundingClientRect().top}]:[]}),o=n.getBoundingClientRect().top,s;if(t.key===`ArrowDown`){let t=i.findIndex(e=>e.top>o+24);s=i.length===0?e[0]:t<0?e[i.at(-1).index+1]:e[(i[t-1]?.index??-1)+1]}else{for(let t=i.length-1;t>=0;t--){let n=i[t];if(Math.abs(n.top-o)<=24){s=e[n.index-1];break}if(n.tope.top>o+24)&&(s=i[0]?.item),i.length===0&&(s=e.at(-1))}s&&(t.preventDefault(),b(s.entryId))};return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[t,a,e,b]),(0,K.useLayoutEffect)(()=>()=>v(),[v]),e.length<4?null:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`nav`,{ref:c,className:`turn-rail`,"aria-label":s(`conversationTurns`),style:{top:g.top,maxHeight:g.height,visibility:g.visible?`visible`:`hidden`},onClickCapture:e=>{f.current&&=(e.preventDefault(),e.stopPropagation(),!1)},onPointerDown:e=>{if(!e.isPrimary||e.button!==0)return;let t=e.target instanceof Element?e.target.closest(`.turn-tick`):null;!t||!e.currentTarget.contains(t)||(f.current=!1,d.current={pointerId:e.pointerId,captureTarget:t,y:e.clientY,moved:!1},t.setPointerCapture?.(e.pointerId))},onPointerMove:e=>{let t=d.current;if(!t||t.pointerId!==e.pointerId||Math.abs(e.clientY-t.y)<3&&!t.moved)return;t.moved=!0,f.current=!0;let n=Array.from(e.currentTarget.querySelectorAll(`[data-turn-entry]`)).find(t=>{let n=t.getBoundingClientRect();return e.clientY>=n.top&&e.clientY{let t=d.current;d.current=null,t?.captureTarget.hasPointerCapture?.(e.pointerId)&&t.captureTarget.releasePointerCapture(e.pointerId)},onPointerCancel:e=>{let t=d.current;d.current=null,t?.captureTarget.hasPointerCapture?.(e.pointerId)&&t.captureTarget.releasePointerCapture(e.pointerId),f.current=!1},children:e.map((e,t)=>(0,q.jsx)(CK,{item:e,position:t+1,current:g.current.includes(e.entryId),onNavigate:b,onPreview:y},e.entryId))}),m&&(0,q.jsx)(`span`,{className:`turn-navigation-error`,role:`status`,children:s(`turnPreviewUnavailable`)})]})}function TK(e){if(e.role!==`custom`||e.customType!==`openpi-setup-request`||e.truncation?.details)return e;let t=e.details;return!t||typeof t!=`object`||Array.isArray(t)||!(`command`in t)||t.command!==`openpi-setup`&&t.command!==`my-pi-setup`||!(`request`in t)||typeof t.request!=`string`?e:{...e,role:`user`,content:`/${t.command}${t.request?` ${t.request}`:``}`,parts:void 0}}function EK(e,t){let n=e.parentId,r=new Set;for(let e=0;n&&e<32;e++){if(r.has(n))return;r.add(n);let e=t(n);if(!e||e.id!==n)return;if(e.message?.role!==`system`)return e.message;n=e.parentId}}function DK(e,t){let n=TK(e);return e.customType===`openpi-setup-request`&&n.role===`user`&&t?.role===`user`&&t.customType===`openpi-web-command-input`&&typeof t.commandId==`string`&&t.commandId.length>0&&t.commandId.length<=128&&!/[\u0000-\u001f\u007f]/u.test(t.commandId)&&t.content===n.content}function OK(e){if(e.role===`toolResult`&&e.toolCallId&&!e.toolCallId.includes(`[truncated]`))return`tool-result-${e.toolCallId}`;if(e.role!==`assistant`||e.truncation?.partsOmitted)return;let t=e.parts?.filter(e=>e.type===`toolCall`);if(!(!t?.length||t.some(e=>!e.id||e.id.includes(`[truncated]`))))return`tool-calls-${JSON.stringify(t.map(e=>e.id))}`}function kK(e){let t=OK(e);if(t)return t;if(e.timestamp!==void 0)return`message-${e.role}-${e.timestamp}`}function AK(e){return[`assistant`,`toolResult`].includes(e.role??``)&&!e.truncation?.truncated?JSON.stringify(e):null}function jK(e){return JSON.stringify([e.role,e.content,(e.parts??[]).filter(t=>e.role!==`user`||t.type!==`text`).map(t=>t.type===`image`?[t.type,t.mimeType,e.role===`user`?void 0:t.name]:t.type),e.stopReason,e.errorMessage,e.toolCallId])}function MK(e){return e.role===`user`?jK(e):JSON.stringify({...e,timestamp:void 0})}var NK=new WeakMap;function PK(e,t){let n=NK.get(e),r=n?.get(t);if(r&&r.length===e.length&&r.head===e[0]&&r.tail===e[e.length-1])return r.projection;let i=new Map(e.map(e=>[e.id,e])),a=new Map;for(let t of e){let e=t.message&&AK(t.message);if(!e)continue;let n=a.get(e)??[];n.push(t),a.set(e,n)}let o=e.flatMap(e=>{if(e.forkSnapshotBoundary)return[{key:e.id,entryId:e.id,timestamp:e.timestamp,forkSnapshotBoundary:!0,message:{role:`custom`,content:``}}];if(e.type===`compaction`)return[{key:e.id,entryId:e.id,timestamp:e.timestamp,compaction:!0,message:{role:`custom`,content:``}}];if(`turnTiming`in e&&e.turnTiming&&e.turnTiming.sessionId===t)return[{key:e.id,timestamp:e.timestamp,timing:e.turnTiming,message:{role:`custom`,content:``}}];if(e.type!==`message`||!e.message)return[];let n=TK(e.message),r=EK(e,e=>i.get(e));return DK(e.message,r)?[]:[{key:e.id,entryId:e.id,timestamp:e.timestamp,message:n}]}),s=new Map,c=new Map;o.forEach((e,t)=>{if(e.entryId&&s.set(e.entryId,t),e.timing||e.compaction||e.forkSnapshotBoundary)return;let n=kK(e.message)??e.entryId??e.key,r=c.get(n)??[];r.push(t),c.set(n,r)});let l=[];for(let e of c.values())if(!(e.length<2))for(let t of e){let e=o[t].entryId;e&&l.push(e)}let u=new Map,d=0;for(let t of e){if(t.message?.role!==`custom`||t.message.truncation?.truncated)continue;let e=MK(t.message),n=u.get(e)??[];n.push(d),u.set(e,n),d++}let f=o.map(e=>({identity:kK(e.message),signature:MK(e.message)})),p=new Map,m=new Map;f.forEach((e,t)=>{let n=m.get(e.signature)??[];if(n.push(t),m.set(e.signature,n),e.identity===void 0)return;let r=p.get(e.identity)??[];r.push(t),p.set(e.identity,r)});let h=new Map(e.map((e,t)=>[e.id,t])),g=o.filter(e=>e.message.role===`user`).map(e=>({key:e.entryId??e.key,position:h.get(e.entryId??e.key),parentId:i.get(e.entryId??e.key)?.parentId,signature:jK(e.message)})),_=new Map;for(let e of g){let t=_.get(e.signature)??[];t.push(e),_.set(e.signature,t)}let v={nativeById:i,exactNative:a,baseEntries:o,indexById:s,lookupIndexes:c,ambiguousNativeIds:l,customIndexes:u,nativeByIdentity:p,nativeByLegacySignature:m,nativeMessages:f,promptCandidates:g,promptsBySignature:_,commandInputs:new Map(o.flatMap(e=>e.message.role===`user`&&e.message.customType===`openpi-web-command-input`&&e.message.commandId?[[e.message.commandId,e.entryId??e.key]]:[])),persistedPositions:h};return n||(n=new Map,NK.set(e,n)),n.set(t,{projection:v,length:e.length,head:e[0],tail:e[e.length-1]}),v}function FK(e,t){if(!e)return-1;for(let n of e)if(!t.has(n))return n;return-1}function IK(e,t){let n=[e.timingKey,e.key,e.entryId,e.ambiguousTimingIdentity?void 0:kK(e.message)];for(let e of n){if(!e)continue;let n=t[e];if(n!==void 0)return n}}function LK(e,t,n){let{nativeRowKeys:r,ambiguousTimingIds:i}=n,a=e.selectedSession,o=PK(a?.entries??[],a?.id);for(let e of r.keys())o.nativeById.has(e)||r.delete(e);for(let e of i)o.nativeById.has(e)||i.delete(e);let s=new Map;for(let e of t){if(e.optimistic)continue;let t=AK(e.message);if(!t)continue;let n=s.get(t)??[];n.push(e),s.set(t,n)}let c=new Set(r.values());for(let[e,t]of s){let n=o.exactNative.get(e);if(n?.length!==1||t.length!==1)continue;let a=n[0].id,s=t[0].key;r.has(a)||i.has(a)||c.has(s)||o.nativeById.has(s)||(r.set(a,s),c.add(s))}for(let e of o.ambiguousNativeIds)i.add(e);let l=new Map,u=new Set;for(let e of t){let t=kK(e.message)??e.key,n=o.lookupIndexes.get(t);if(!n)continue;let a=MK(e.message),s=n.filter(e=>o.nativeMessages[e]?.signature===a);if((s.length!==n.length||n.length>1)&&u.add(t),s.length===1){let n=s[0],a=o.baseEntries[n].entryId,c=a?r.get(a):void 0;if(c&&c!==e.key||a&&i.has(a)&&!c&&e.key!==a){u.add(t);continue}let d=l.get(n);d===void 0||d===e.key?l.set(n,e.key):(l.set(n,null),u.add(t))}}for(let e of u)for(let t of o.lookupIndexes.get(e)??[]){let e=o.baseEntries[t].entryId;e&&i.add(e)}let d=new Set(t.flatMap(e=>e.optimistic?.projectedEntryId?[e.optimistic.projectedEntryId]:[])),f=[],p=[],m=e.selectedExecution?.sessionId===a?.id&&e.selectedExecution?.sessionPath===a?.path?e.selectedExecution:void 0,h=m?.pendingFollowUps??0,g=Math.max(0,t.filter(e=>e.optimistic?.admitted&&!e.optimistic.projectedEntryId&&!o.commandInputs.has(e.optimistic.commandId)).length-h),_=0,v=new Set,y=new Set,b=new Set,x=[];for(let e of t){if(e.optimistic?.projectedEntryId)continue;if(e.message.role===`custom`&&!e.message.truncation?.truncated){let t=MK(e.message),n=FK(o.customIndexes.get(t),y);if(n>=0){y.add(n);continue}}let n=e.optimistic?.commandId??(e.key.startsWith(`optimistic-`)?e.key.slice(11):void 0),r=n?o.commandInputs.get(n):void 0;if(r){e.optimistic&&f.push({key:e.key,entryId:r});continue}let i=TK(e.message);if(i.role===`user`&&e.optimistic){let t=e.optimistic.afterEntryId===null?-1:o.persistedPositions.get(e.optimistic.afterEntryId),n=!e.optimistic.admitted||_>=g?void 0:o.promptsBySignature.get(jK(i))?.find(n=>n.position!==void 0&&(t===void 0?n.parentId===e.optimistic?.afterEntryId:n.position>t)&&!d.has(n.key));if(n){d.add(n.key),f.push({key:e.key,entryId:n.key}),_++;continue}}else{let e=i.role===`user`?t.find(e=>e.optimistic?.admitted&&!e.optimistic.projectedEntryId&&!v.has(e.key)&&!f.some(t=>t.key===e.key)&&e.optimistic.sessionId===a?.id&&e.optimistic.sessionPath===a?.path&&jK(TK(e.message))===jK(i)):void 0;if(e){v.add(e.key);continue}let n=kK(i),r=OK(i),s=MK(i),c=n===void 0?FK(o.nativeByLegacySignature.get(s),b):(o.nativeByIdentity.get(n)??[]).find(e=>(r!==void 0||!b.has(e))&&(r!==void 0||o.nativeMessages[e]?.signature===s))??-1;if(c>=0){b.add(c);continue}}let s={key:e.key,timingKey:e.key,ambiguousTimingIdentity:u.has(kK(i)??e.key)?!0:void 0,timestamp:e.timestamp??new Date().toISOString(),message:i,optimistic:e.optimistic};i.role===`user`&&e.optimistic?p.push(s):x.push(s)}let S=new Map;for(let e of m?.queuedMessages??[])S.set(e,(S.get(e)??0)+1);let C=p.filter(e=>{if(!e.optimistic?.admitted||e.optimistic.commandId===m?.activeTurn?.commandId)return!0;let t=S.get(e.message.content)??0;return!t||(S.set(e.message.content,t-1),!1)}),w=new Map(t.flatMap(e=>e.optimistic?.projectedEntryId?[[e.optimistic.projectedEntryId,e.key]]:[]));for(let e of f)w.set(e.entryId,e.key);let T=o.baseEntries,E=(e,t)=>{T===o.baseEntries&&(T=o.baseEntries.slice()),T[e]=t};for(let e of i){let t=o.indexById.get(e);if(t===void 0)continue;let n=T[t];!n||n.ambiguousTimingIdentity||E(t,{...n,ambiguousTimingIdentity:!0})}for(let[e,t]of l){if(t===null)continue;let n=T[e];!n||n.timingKey===t||E(e,{...n,timingKey:t})}for(let[e,t]of r){let n=o.indexById.get(e);if(n===void 0)continue;let r=T[n];!r||r.key===t||E(n,{...r,key:t})}for(let[e,t]of w){let n=o.indexById.get(e);if(n===void 0)continue;let r=T[n];!r||r.key===t||E(n,{...r,key:t})}return{entries:T.concat(x,C),projectedPrompts:f}}function RK({message:e,sessionId:t,path:n,entryId:r}){let{t:i}=W(),[a,o]=(0,K.useState)(null),s=JSON.stringify([t,n,r]),c=e.parts?.filter(e=>e.type===`image`)??[];if(c.length===0)return null;let l=new Map,u=a?.scope===s?a:null,d=()=>o(e=>e?{...e,open:!1}:null);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`section`,{className:`message-attachments`,"aria-label":i(`imageAttachments`),children:c.map(e=>{let a=`${e.mimeType}:${e.name??``}:${e.previewUrl??``}`,c=l.get(a)??0;l.set(a,c+1);let u=`${a}:${c}`,d=t&&n&&r&&typeof e.sourcePartIndex==`number`&&Number.isSafeInteger(e.sourcePartIndex)&&e.sourcePartIndex>=0?{id:`${r}:${e.sourcePartIndex}`,entryId:r,partIndex:e.sourcePartIndex,kind:`image`,name:e.name??i(`attachedImage`)}:null,f=e.previewUrl?(0,q.jsx)(`img`,{src:e.previewUrl,alt:e.name??i(`attachedImage`)},`preview`):d&&t&&n?(0,q.jsx)(`span`,{className:`message-attachment-preview`,children:(0,q.jsx)(tG,{sessionId:t,path:n,source:d,thumbnail:!0})},`preview`):(0,q.jsx)(qs,{"aria-hidden":`true`},`preview`),p=(0,q.jsx)(`span`,{children:e.name??i(`attachedImage`)},`name`);return d?(0,q.jsxs)(`button`,{className:`message-attachment`,type:`button`,title:d.name,"aria-label":d.name,onClick:()=>o({scope:s,source:d,open:!0}),children:[f,p]},u):(0,q.jsxs)(`div`,{className:`message-attachment`,children:[f,p]},u)})}),t&&n&&u&&(0,q.jsx)(aG,{sessionId:t,path:n,source:u.source,open:u.open,onSelect:d,onClose:d})]})}function zK(e,t,n){let r=(0,K.useMemo)(()=>new de,[]),i=e?.history?.leafEntryId??e?.entries.at(-1)?.id,a=e?.id,o=e?.path,s=JSON.stringify([e?.id,e?.path,i]),c=(0,K.useRef)(s);c.current=s;let[l,u]=(0,K.useState)(null),[d,f]=(0,K.useState)({}),p=(0,K.useRef)(new Map),m=(0,K.useMemo)(()=>a&&o&&i?{sessionId:a,sessionPath:o,entryId:i}:null,[a,o,i]);(0,K.useEffect)(()=>{if(u(null),f({}),!n||!m)return;let e=new AbortController,t=async()=>{try{let t=null,n=[],i=new Set;for(let a=0;a<10;a++){let a=await r.sessionPromptHistory(m,t,e.signal);if(e.signal.aborted||c.current!==s||a.sessionId!==m.sessionId||a.sessionPath!==m.sessionPath||a.anchorEntryId!==m.entryId||a.requestedBeforeEntryId!==t||a.entryIds.length>100||a.entryIds.some(e=>!e||i.has(e))||new Set(a.entryIds).size!==a.entryIds.length||a.nextBeforeEntryId!==null&&(a.entryIds.length===0||a.nextBeforeEntryId!==a.entryIds[0]))return;for(let e of a.entryIds)i.add(e);if(n=[...a.entryIds,...n],a.nextBeforeEntryId===null){u({scope:s,ids:n});return}t=a.nextBeforeEntryId}}catch{}},i=typeof window.requestIdleCallback==`function`?window.requestIdleCallback(()=>void t(),{timeout:2e3}):void 0,a=i===void 0?window.setTimeout(()=>void t(),0):void 0;return()=>{e.abort(),i!==void 0&&window.cancelIdleCallback(i),a!==void 0&&window.clearTimeout(a);for(let e of p.current.values())e.abort();p.current.clear()}},[s,n,m,r]);let h=(0,K.useMemo)(()=>{let e=new Map(t.map(e=>[e.entryId,e]));if(l?.scope!==s)return t;let n=new Set(l.ids);return[...l.ids.map(t=>e.get(t)??d[t]??{entryId:t,title:``,previewState:`idle`}),...t.filter(e=>!n.has(e.entryId))]},[l,s,t,d]),g=(0,K.useRef)(h);return g.current=h,{items:h,requestPreview:(0,K.useCallback)(e=>{if(!n||!m||c.current!==s||p.current.has(e))return;let t=g.current.find(t=>t.entryId===e);if(!t||t.previewState===void 0||t.previewState===`ready`)return;let i=new AbortController;p.current.set(e,i),f(t=>({...t,[e]:{entryId:e,title:``,previewState:`loading`}})),r.sessionPromptPreview(m,e,i.signal).then(t=>{if(!(i.signal.aborted||c.current!==s)){if(t.sessionId!==m.sessionId||t.sessionPath!==m.sessionPath||t.anchorEntryId!==m.entryId||t.entryId!==e||typeof t.prompt!=`string`||typeof t.response!=`string`||Array.from(t.prompt).length>240||Array.from(t.response).length>240)throw Error(`Unverified preview`);f(n=>({...n,[e]:{entryId:e,title:t.prompt,reply:t.response,previewState:`ready`}}))}}).catch(()=>{!i.signal.aborted&&c.current===s&&f(t=>({...t,[e]:{entryId:e,title:``,previewState:`unavailable`}}))}).finally(()=>{p.current.get(e)===i&&p.current.delete(e)})},[n,m,s,r])}}var BK=`[data-history-entry], [data-history-message], [data-history-result]`;function VK(e,t,n,r){let i=(0,K.useRef)(null),a=(0,K.useCallback)(()=>{let r=e.current;if(!r||t.current){i.current=null;return}let a=r.getBoundingClientRect(),o=Array.from(r.querySelectorAll(BK)).filter(e=>{let t=e.getBoundingClientRect();if(t.height<=0||t.bottom<=a.top||t.top>=a.bottom)return!1;for(let t=e.parentElement;t&&t!==r;t=t.parentElement){if(t.hidden)return!1;let e=getComputedStyle(t);if(/^(auto|scroll|overlay)$/.test(e.overflowY)&&t.scrollHeight>t.clientHeight)return!1}return!0}),s=o.find(e=>!o.some(t=>t!==e&&e.contains(t)));i.current=s?{scope:n,element:s,offset:s.getBoundingClientRect().top-a.top}:null},[e,t,n]),o=(0,K.useCallback)(()=>{let a=e.current,o=i.current;if(!a||t.current||!o||o.scope!==n)return;if(!a.contains(o.element)||!o.element.getClientRects().length){i.current=null;return}let s=o.element.getBoundingClientRect().top-a.getBoundingClientRect().top-o.offset;if(Math.abs(s)>.5){let e=a.scrollTop+s;typeof a.scrollTo==`function`?a.scrollTo({top:e,behavior:`instant`}):a.scrollTop=e,r.current=a.scrollTop}},[e,t,n,r]);return(0,K.useLayoutEffect)(()=>{o(),a()}),{capture:a,restore:o,clear:(0,K.useCallback)(()=>{i.current=null},[])}}var HK=1e3,UK=ye*4;function WK(e,t){return t.history?.leafEntryId===e.validatedLeaf||t.history?.anchorEntryId===e.anchor&&t.history.anchorOnBranch===!0}function GK(e,t,n=t.entriesOmitted){let r=e.filter(e=>e.message?.truncation).length,i=e.reduce((e,t)=>e+(t.message?.truncation?.partsOmitted??0),0);return{...t,entriesOmitted:n,messagesTruncated:r,messagePartsOmitted:i,truncated:n>0||r>0||i>0}}function KK(e,t){let n=t.history?.leafEntryId??null;if(n===e.validatedLeaf)return e;let r=t.entries.findIndex(t=>t.id===e.anchor),i=r>=0?t.entries.slice(r+1):t.entries[0]?.parentId===e.anchor?t.entries:null,a=i?.reduce((e,t)=>e+pe(t)+1,0)??0;return i&&e.session.entries.length+i.length<=HK&&e.session.bytes+a<=UK?{...e,anchor:n??e.anchor,validatedLeaf:n,session:{...e.session,entries:[...e.session.entries,...i],bytes:e.session.bytes+a,truncation:GK([...e.session.entries,...i],e.session.truncation)}}:{...e,validatedLeaf:n}}function qK(e,t,n,r){let i=(0,K.useMemo)(()=>new de,[]),a=(0,K.useMemo)(()=>n??new Map,[n]),o=lK(e),s=(0,K.useRef)({scope:o,state:a.get(o)});s.current.scope!==o&&(s.current={scope:o,state:a.get(o)});let c=(0,K.useRef)({selected:e,callbacks:t});c.current={selected:e,callbacks:t};let l=(0,K.useRef)(s.current.state?.window??null),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(null),[p,m]=(0,K.useState)(l.current),[h,g]=(0,K.useState)(!1),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(0),x=(0,K.useRef)(o),S=(0,K.useRef)(null),C=r?JSON.stringify([r.sessionId,r.sessionPath,r.entryId,r.revision]):null,w=r&&e&&C!==S.current&&r.sessionId===e.id&&r.sessionPath===e.path&&r.session.id===e.id&&r.session.path===e.path&&r.session.history?.anchorEntryId===r.entryId&&r.session.history.anchorOnBranch===!0&&r.session.entries.some(e=>e.id===r.entryId)?{session:r.session,anchor:r.session.entries.at(-1).id,validatedLeaf:r.session.history?.leafEntryId??null}:null,T=(0,K.useCallback)(e=>{l.current=e,uK(a,lK(e.session),{window:e}),m(e),c.current.callbacks.onAnchorChange?.({sessionId:e.session.id,sessionPath:e.session.path,entryId:e.anchor})},[a]),E=(0,K.useCallback)((e=!1)=>{u.current?.controller.abort(),u.current=null,d.current=null,a.delete(lK(l.current?.session??c.current.selected)),l.current=null,a.persist?.(),m(null),g(!1),v(e?`historyChanged`:null),f.current=null,c.current.callbacks.onAnchorChange?.(null),b(e=>e+1)},[a]),D=(0,K.useCallback)((e=!1)=>{let t=l.current,n=c.current.selected;if(!t||!n)return;let r=JSON.stringify([lK(n),t.anchor,n.history?.leafEntryId]);if(!e&&f.current?.key===r)return;let i={key:r};f.current=i,v(null);let a=()=>{f.current===i&&l.current===t&&(u.current?.controller.abort(),u.current=null,g(!1),v(`historyValidationUnavailable`))};c.current.callbacks.onAnchorChange?.({sessionId:t.session.id,sessionPath:t.session.path,entryId:t.anchor});let o=c.current.callbacks.onRefresh?.();if(!o){a();return}o.then(e=>{e||a()}).catch(a)},[]),O=(0,K.useCallback)(e=>{let t=l.current,n=c.current.selected;if(!e.page||!e.consuming||u.current!==e||e.controller.signal.aborted||!t||!n||e.scope!==lK(n)||t.session.history?.beforeEntryId!==e.before||!WK(t,n))return;let r=e.page,i=new Set(t.session.entries.map(e=>e.id)),a=[...r.entries.filter(e=>!i.has(e.id)),...t.session.entries],o=pe(a);for(;a.length>HK||o>UK;){let e=a.pop();if(!e)break;o-=pe(e)+ +!!a.length}c.current.callbacks.beforePrepend(),T({...t,anchor:a.at(-1)?.id??t.anchor,session:{...t.session,entries:a,bytes:o,truncation:GK(a,t.session.truncation,r.truncation.entriesOmitted),history:{...t.session.history,beforeEntryId:r.history?.beforeEntryId??null}}}),u.current=null,g(!1),v(null)},[T]);(0,K.useLayoutEffect)(()=>{if(w&&C!==S.current){x.current=o,u.current?.controller.abort(),u.current=null,d.current=null,f.current=null,g(!1),v(null),S.current=C,T(w);return}x.current!==o&&(x.current=o,u.current?.controller.abort(),u.current=null,d.current=null,l.current=s.current.state?.window??null,m(l.current),g(!1),v(null),f.current=null,b(e=>e+1),l.current||c.current.callbacks.onAnchorChange?.(null));let t=u.current;t&&!t.consuming&&e&&!WK(t.source,e)&&(t.controller.abort(),u.current=null);let n=l.current;if(!(!n||!e)){if(e.history?.anchorEntryId===n.anchor&&e.history.anchorOnBranch===!1){E(!0),c.current.callbacks.onRefresh?.();return}if(!WK(n,e)){D();return}v(e=>e===`historyValidationUnavailable`?null:e),(e.history?.leafEntryId??null)!==n.validatedLeaf&&(n=KK(n,e),T(n)),u.current?.page&&O(u.current)}},[o,e,E,D,T,O,w,C]),(0,K.useLayoutEffect)(()=>{let e=l.current;return e&&(uK(a,o,{...s.current.state,window:e}),c.current.callbacks.onAnchorChange?.({sessionId:e.session.id,sessionPath:e.session.path,entryId:e.anchor})),()=>{u.current?.controller.abort(),u.current=null,d.current=null,c.current.callbacks.onAnchorChange?.(null)}},[o,a]);let k=(0,K.useCallback)(()=>{let e=c.current.selected;return!l.current&&e?.history?.leafEntryId&&T({session:e,anchor:e.history.leafEntryId,validatedLeaf:e.history.leafEntryId}),l.current},[T]),A=(0,K.useCallback)((e,t)=>{let n=c.current.selected;if(!n||u.current)return;let r=e.session.history?.beforeEntryId;if(!r)return;let a={controller:new AbortController,scope:lK(n),before:r,source:e,consuming:t,anchor:{sessionId:n.id,sessionPath:n.path,entryId:e.anchor}};return u.current=a,t&&(g(!0),v(null)),a.done=(async()=>{try{let e=await i.sessionHistory(a.anchor,r,a.controller.signal);if(u.current!==a||a.controller.signal.aborted||a.scope!==lK(c.current.selected))return;if(e.id!==n.id||e.path!==n.path||e.anchorEntryId!==a.anchor.entryId||e.requestedBeforeEntryId!==r||e.history?.anchorEntryId!==a.anchor.entryId||e.history.anchorOnBranch!==!0)throw new ge(`Session history identity changed`,409,`SESSION_HISTORY_CHANGED`);a.page=e,a.consuming&&(O(a),u.current===a&&D())}catch(e){if(u.current!==a||a.controller.signal.aborted||(u.current=null,!a.consuming))return;g(!1),e instanceof ge&&e.code===`SESSION_HISTORY_CHANGED`?(E(!0),c.current.callbacks.onRefresh?.()):v(`historyUnavailable`)}})(),a.done},[O,E,i,D]),j=(0,K.useCallback)(async()=>{let e=c.current.selected;if(!e?.history?.leafEntryId)return;let t=l.current;if(t&&!WK(t,e)){D(!0);return}if(t||=k(),!t)return;let n=u.current;if(n){if(n.scope===lK(e)&&n.before===t.session.history?.beforeEntryId&&WK(n.source,e))return n.consuming=!0,g(!0),v(null),n.page&&O(n),n.done;n.controller.abort(),u.current=null}return A(t,!0)},[O,A,D,k]);(0,K.useEffect)(()=>{if(!t.preload){let e=u.current;e&&!e.consuming&&(e.controller.abort(),u.current=null,d.current=null);return}if(_||u.current||!e||p!==l.current)return;let n=p;if(n&&!WK(n,e))return;let r=n??(e.history?.leafEntryId?{session:e,anchor:e.history.leafEntryId,validatedLeaf:e.history.leafEntryId}:null);if(!r?.session.history?.beforeEntryId)return;let i=JSON.stringify([o,n?r.anchor:`initial`,n?r.session.history.beforeEntryId:null]);d.current!==i&&(d.current=i,A(r,!1))},[t.preload,_,o,e,p,A]);let M=p&&lK(p.session)===o?p:null,N=w??(M&&e&&WK(M,e)?KK(M,e):M),P=(0,K.useCallback)(()=>E(),[E]),F=!!(N&&e&&!WK(N,e));return{session:N?.session??e,engaged:!!N,hasMore:!!(N?.session??e)?.history?.beforeEntryId,hasNewer:!!(N&&N.anchor!==e?.history?.leafEntryId),verifying:F,loading:h,error:_,reset:y,retainReading:k,loadOlder:j,resetToLatest:P}}function JK(e){return e&&typeof e==`object`?e:{}}function YK(e){try{return JK(JSON.parse(e))}catch{return{}}}function XK(e){return e===`running`?`running`:e===`done`||e===`completed`?`done`:[`error`,`failed`,`aborted`,`killed`,`timed_out`].includes(String(e))?`error`:e===`uncertain`?`warn`:`unknown`}function ZK(e,t){if(e?.forkSnapshotToolResult)return`unknown`;if(t===`running`)return`running`;if(t===`unknown`)return`unknown`;if(t===`failed`||e?.isError)return`error`;if(t===`cancelled`||t===`timed_out`)return`warn`;if(!e?.toolName?.startsWith(`subagent`)){let t=XK(JK(e?.details).status);if(t!==`unknown`&&t!==`running`)return t}return t===`returned`||e?.isError===!1?`done`:`unknown`}function QK({status:e}){let{t}=W();return e===`running`?(0,q.jsx)(`span`,{className:`status-mark running`,role:`img`,"aria-label":t(`toolState_running`),children:(0,q.jsx)(`i`,{})}):e===`done`?(0,q.jsx)(rs,{className:`status-mark done`,"aria-label":t(`execution_done`)}):e===`error`?(0,q.jsx)(je,{className:`status-mark error`,"aria-label":t(`toolState_failed`)}):e===`warn`?(0,q.jsx)(`span`,{className:`status-mark warn`,role:`img`,"aria-label":t(`toolState_unknown`),children:`?`}):null}function $K({label:e,message:t,children:n}){return(0,q.jsxs)(`div`,{className:`execution-error`,role:`alert`,"aria-label":e,children:[(0,q.jsx)(ls,{"aria-hidden":`true`}),(0,q.jsxs)(`div`,{className:`execution-error-content`,children:[(0,q.jsx)(`p`,{children:t}),n]})]})}function eq({failed:e,error:t,retryPrompt:n,retryEntryId:r,canRetry:i,onRetry:a}){let{t:o}=W(),[s,c]=(0,K.useState)(!1);return e?(0,q.jsx)($K,{label:o(`modelRequestFailed`),message:t||o(`modelFailureUnknown`),children:n!==void 0&&r&&a&&(0,q.jsx)(`div`,{className:`provider-outcome-actions`,children:(0,q.jsxs)(`button`,{type:`button`,disabled:!i||s,onClick:()=>{c(!0),a(n,r).finally(()=>c(!1))},children:[(0,q.jsx)(he,{"aria-hidden":`true`}),o(s?`retryingPrompt`:`retryPrompt`)]})})}):(0,q.jsx)(`div`,{className:`provider-outcome aborted`,role:`status`,children:o(`modelRequestStopped`)})}function tq({attempts:e,state:t,retry:n,observed:r=!0}){let{t:i}=W(),a=t===`retrying`&&!r,o=n?.attempt,s=n?.maxAttempts,c=typeof o==`number`&&Number.isSafeInteger(o)&&o>0&&typeof s==`number`&&Number.isSafeInteger(s)&&s>=o,l=e.length>0||!!n?.errorMessage,u=(0,q.jsxs)(q.Fragment,{children:[t===`retrying`?(0,q.jsx)(Jc,{"aria-hidden":`true`}):(0,q.jsx)(wc,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{role:t===`retrying`?`status`:void 0,children:[i(a?`modelReconnectUnknown`:t===`recovered`?`modelRequestRecovered`:t===`retrying`?n?`modelRetrying`:`modelEarlierAttempts`:t===`interrupted`?`modelRequestStopped`:`modelEarlierAttempts`),t===`retrying`&&c&&` ${o}/${s}`]}),t!==`retrying`&&(0,q.jsx)(`span`,{className:`provider-attempts-count`,children:i(`modelFailedAttempts`,{count:e.length})}),l&&(0,q.jsx)(os,{className:`reconnect-chevron`,"aria-hidden":`true`})]}),d=`provider-attempts ${t}${a?` unavailable`:``}`;return l?(0,q.jsxs)(`details`,{className:d,children:[(0,q.jsx)(`summary`,{children:u}),(0,q.jsxs)(`ol`,{children:[e.length===0&&(0,q.jsx)(`li`,{children:(0,q.jsx)(`p`,{children:n?.errorMessage})}),e.map(({entry:e,content:t},n)=>(0,q.jsxs)(`li`,{"data-history-entry":e.entryId??e.key,children:[(0,q.jsx)(`span`,{className:`provider-attempt-index`,"aria-hidden":`true`,children:String(n+1).padStart(2,`0`)}),(0,q.jsxs)(`div`,{className:`provider-attempt-body`,children:[(0,q.jsx)(`p`,{children:e.message.errorMessage||i(`modelFailureUnknown`)}),t?.map(e=>(0,q.jsx)(K.Fragment,{children:e.content},e.key))]})]},e.key))]})]}):(0,q.jsx)(`div`,{className:d,children:u})}function nq(e,t,n){let r=new Set,i=new Map,a=[],o=-1,s=(s,c=!1,l=!1)=>{if(a.length>0){let u=e[o]?.message.stopReason,d=s?.outcome===`cancelled`||u===`aborted`,f=u===`error`&&!d&&!(c&&t)&&!l;f&&r.add(o);let p=f?a.slice(0,-1):a,m=p.at(-1);m!==void 0&&i.set(m,{attempts:p.map(t=>e[t]),state:d?`interrupted`:u===`stop`||u===`length`||u===`toolUse`?`recovered`:c&&t&&n?`retrying`:`earlier`})}a=[],o=-1};return e.forEach((e,t)=>{e.optimistic||(e.timing?s(e.timing):e.forkSnapshotBoundary?s(void 0,!1,!0):e.message.role===`user`||e.message.role===`custom`&&e.message.customType===`openpi-setup-request`?s():e.message.role===`assistant`&&(o=t,e.message.stopReason===`error`&&a.push(t)))}),s(void 0,!0),{finalErrors:r,groups:i}}function rq(e,t){return zD(vK(e,t).split(` +`).find(Boolean),120)}function iq(e){let t=e.split(` +`).map(e=>e.trim()).find(Boolean);return t?zD(t.replace(/^#{1,6}\s+/u,``).replace(/^>\s*/u,``).replace(/[*_~`]+/gu,``).replace(/\[([^\]]+)\]\([^)]*\)/gu,`$1`).trim(),600):``}function aq({body:e,icon:t,name:n,status:r,summary:i,output:a,evidenceState:o,note:s,rawDetails:c,children:l,snapshotMissingResult:u=!1,defaultOpen:d=!1}){let{t:f}=W(),[p,m]=(0,K.useState)(d);(0,K.useEffect)(()=>m(d),[d]);let h=o??(r===`done`?`returned`:r===`error`?`failed`:r===`running`?`running`:`unknown`);return(0,q.jsxs)(`details`,{className:`message-details tool-line ${r}`,"data-tool":n,open:p,onToggle:e=>m(e.currentTarget.open),children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{className:`tool-icon`,"aria-hidden":`true`,children:t}),hK(n).action===`call`&&(0,q.jsx)(`span`,{className:`tool-kind`,title:n,children:_K(n)}),(0,q.jsxs)(`span`,{className:`details-title`,children:[(0,q.jsx)(`span`,{className:`tool-action`,children:gK(f,n,h)}),i&&(0,q.jsx)(`span`,{className:`tool-summary`,children:i})]}),u&&(0,q.jsx)(`span`,{className:`evidence-status`,children:f(`toolSnapshotMissingResult`)}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`}),(0,q.jsx)(QK,{status:r})]}),s&&(0,q.jsx)(`p`,{className:`evidence-note`,children:s}),a===void 0?(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:pd(e).text}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`figure`,{"aria-label":f(`toolCallArguments`),style:{margin:0},children:(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:pd(e).text})}),(0,q.jsx)(`figure`,{"aria-label":f(`toolCallOutput`),style:{margin:0},children:(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:pd(a).text||f(`noOutput`)})})]}),c!==void 0&&(0,q.jsxs)(`details`,{className:`evidence-raw`,children:[(0,q.jsx)(`summary`,{children:f(`toolRawEvidence`)}),(0,q.jsx)(`pre`,{children:pd(JSON.stringify(c,null,2)).text})]}),l]})}function oq({body:e,family:t,meta:n,status:r,title:i,defaultOpen:a=!1}){return(0,q.jsxs)(`details`,{className:`message-details activity-card ${t}`,open:a||void 0,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{className:`activity-icon`,"aria-hidden":`true`,children:t===`subagent`?(0,q.jsx)($o,{}):(0,q.jsx)(Yc,{})}),(0,q.jsxs)(`span`,{className:`activity-main`,children:[(0,q.jsx)(`span`,{className:`activity-title`,children:i}),n&&(0,q.jsx)(`span`,{className:`activity-meta`,children:n})]}),(0,q.jsx)(QK,{status:r}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`})]}),(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:e})]})}function sq(e,t){let n=typeof e.id==`string`?[e.id]:Array.isArray(e.ids)?e.ids:typeof t.id==`string`?[t.id]:Array.isArray(t.results)?t.results.map(e=>JK(e).id):[];return[...new Set(n.filter(e=>typeof e==`string`&&!!e))]}function cq({call:e,result:t,status:n,sessionId:r,subagents:i,records:a,onInspect:o,defaultOpen:s}){let{t:c}=W(),l=sq(YK(e.arguments),JK(t?.details)),u=gK(c,e.name,n===`done`?`returned`:n===`error`?`failed`:n);return(0,q.jsxs)(`section`,{className:`subagent-operation`,children:[(l.length?l:[void 0]).map(t=>(0,q.jsx)(JG,{identity:`${r}:${t??e.id}`,title:t?UD(t,i,a):``,action:u,state:n===`warn`?`unknown`:n,label:c(`toolState_${n===`done`?`returned`:n===`error`?`failed`:n===`warn`?`unknown`:n}`),onInspect:t&&o?()=>o(t):void 0},t??e.id)),(0,q.jsxs)(`details`,{className:`subagent-operation-receipt`,open:s||void 0,children:[(0,q.jsx)(`summary`,{"aria-label":c(`toolRawEvidence`),title:c(`toolRawEvidence`),children:(0,q.jsx)(Ds,{"aria-hidden":`true`})}),e.arguments!==`{}`&&(0,q.jsx)(`pre`,{children:pd(e.arguments).text}),(0,q.jsx)(`pre`,{children:pd(t?.content??``).text||c(`noOutput`)})]})]})}function lq(e,t,n={sessionId:``}){if(t?.forkSnapshotToolResult)return null;let{sessionId:r,subagents:i=[],records:a=[],workflows:o=[],onInspectSubagent:s,liveState:c,defaultOpen:l=!1,observed:u=!0}=n,d=e.name||``,f=YK(e.arguments),p=JK(t?.details),m=ZK(t,c),h=!u&&m===`running`?`unknown`:m;if(d===`subagent_spawn`)return(0,q.jsx)(uq,{sessionId:r,id:typeof p.id==`string`?p.id:void 0,title:String(p.title||f.name||`subagent`),body:t?.content||String(f.prompt||e.arguments),activity:i.find(e=>e.id===p.id),saved:a.find(e=>e.id===p.id),spawnFailed:t?.isError===!0,observed:u,defaultOpen:l,onInspect:s});if(d.startsWith(`subagent`))return(0,q.jsx)(cq,{call:e,result:t,sessionId:r,subagents:i,records:a,onInspect:s,defaultOpen:l,status:h});if(d===`workflow`){let n=typeof f.script==`string`?f.script:e.arguments,i=String(p.name||n.match(/\bname:\s*["'`]([^"'`]+)["'`]/u)?.[1]||`unnamed`),a=JK(p.agents),c=o.find(e=>e.runId===p.runId)?.children,l=[p.runId,p.status,a.total?`${Number(a.total)-Number(a.running||0)}/${a.total} agents`:``].filter(Boolean).join(` · `);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(oq,{family:`workflow`,title:`Workflow · ${i}`,meta:l,body:t?.content||n,status:h}),(0,q.jsx)(dq,{sessionId:r,tasks:c,observed:u,onInspect:s})]})}return d.startsWith(`workflow`)?(0,q.jsx)(oq,{family:`workflow`,title:d.replaceAll(`_`,` `),meta:String(f.runId||``),body:t?.content||e.arguments,status:h}):null}function uq({sessionId:e,id:t,title:n,body:r,activity:i,saved:a,spawnFailed:o,onInspect:s,defaultOpen:c=!1,observed:l=!0}){let{t:u}=W(),d=i?.outcome===`interrupted`?`interrupted`:i?.status??(a?.state===`running`?void 0:a?.state),f=!l&&(d===`running`||!d&&!o)?`unknown`:d,p=u(f===`unknown`?`toolState_unknown`:f?`subagentState_${f}`:o?`subagentSpawnFailed`:t?`subagentStateUnavailable`:`subagentStarting`);return(0,q.jsxs)(`section`,{className:`activity-card subagent subagent-activity`,children:[(0,q.jsx)(JG,{identity:`${e}:${t??n}`,title:n,state:f,label:p,onInspect:t&&s?()=>s(t):void 0}),(c||o)&&(0,q.jsxs)(`details`,{className:`subagent-receipt`,open:c||void 0,children:[(0,q.jsx)(`summary`,{children:u(`subagentSpawnReceipt`)}),(0,q.jsx)(`p`,{children:u(`subagentSpawnReceiptHint`)}),(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:r})]})]})}function dq({sessionId:e,tasks:t,observed:n,onInspect:r}){let{t:i}=W();return(0,q.jsxs)(q.Fragment,{children:[t?.items.map(t=>{let a=t.outcome===`interrupted`?`interrupted`:!n&&t.status===`running`?`unknown`:t.status;return(0,q.jsx)(JG,{identity:`${e}:${t.id}`,title:t.title,state:a,label:i(a===`unknown`?`toolState_unknown`:`subagentState_${a}`),onInspect:r?()=>r(t.id,`workflows`):void 0},t.id)}),!!t?.omitted&&(0,q.jsx)(`p`,{className:`inspection-note`,children:i(`subagentListTruncated`,{count:t?.omitted})})]})}function fq({body:e,duration:t,status:n,level:r,defaultOpen:i,truncated:a,source:o}){let{t:s}=W(),c=n===`running`,[l,u]=(0,K.useState)(i),[d,f]=(0,K.useState)();(0,K.useEffect)(()=>u(i),[i]);let p=t===void 0?``:VD(0,t),m=iq(e),h=[n===`unknown`?s(`toolState_unknown`):c?r?s(`thinkingActiveLevel`,{level:r}):s(`thinkingActive`):s(`thinkingDone`),p].filter(Boolean).join(` · `);return(0,q.jsxs)(`details`,{className:`message-details tool-line thinking-line ${n}`,open:l,onToggle:e=>u(e.currentTarget.open),children:[(0,q.jsxs)(`summary`,{"aria-label":[h,m].filter(Boolean).join(` · `),title:m,children:[(0,q.jsx)(`span`,{className:`tool-icon`,"aria-hidden":`true`,children:(0,q.jsx)(Zs,{})}),(0,q.jsx)(`span`,{className:`details-title`,children:(0,q.jsx)(`span`,{className:`tool-summary`,children:m||h})}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`})]}),l&&(0,q.jsx)(`div`,{className:`details-body thinking-evidence`,children:a&&o&&!c?(0,q.jsx)(iK,{...o,preview:e,markdown:!0,purpose:`thinking`,fullText:d,onComplete:f}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(vD,{children:e}),a&&(0,q.jsx)(`p`,{className:`evidence-warning`,children:s(`thinkingPreviewOnly`)})]})})]})}function pq({content:e,editable:t,copyRequiresFull:n=!1,timestamp:r,onResend:i,onRegenerate:a,onFork:o,canFork:s=!1,forkPending:c=!1}){let{t:l}=W(),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(!1),g=(0,K.useRef)(0),_=(0,K.useRef)(void 0);(0,K.useEffect)(()=>()=>{g.current+=1,window.clearTimeout(_.current)},[]);let[v,y]=(0,K.useState)(!1),[b,x]=(0,K.useState)(e),[S,C]=(0,K.useState)(!1),w=(0,K.useRef)(null),T=(0,K.useId)();(0,K.useEffect)(()=>{v&&w.current?.focus()},[v]);let E=async()=>{if(!(S||!b.trim()||!t||!i)){C(!0);try{await i(b.trim())&&y(!1)}finally{C(!1)}}};if(v)return(0,q.jsxs)(`div`,{className:`message-editor`,children:[(0,q.jsx)(`textarea`,{ref:w,value:b,"aria-label":l(`editMessage`),"aria-describedby":T,readOnly:S,onChange:e=>x(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||S||(e.key===`Escape`&&y(!1),e.key===`Enter`&&!e.shiftKey&&(e.preventDefault(),E()))}}),(0,q.jsx)(`p`,{className:`message-edit-hint`,id:T,children:l(`editMessageHint`)}),(0,q.jsxs)(`div`,{className:`message-edit-actions`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:S,onClick:()=>y(!1),children:l(`cancel`)}),(0,q.jsx)(`button`,{type:`button`,className:`confirm`,disabled:S||!b.trim()||!t,onClick:()=>void E(),children:l(`confirmEdit`)})]})]});let D=BD(r);return(0,q.jsxs)(`div`,{className:`message-actions${f?` copy-failed`:``}`,children:[D&&(0,q.jsx)(`time`,{dateTime:r,children:D}),o&&(0,q.jsx)(V,{content:l(c?`forkSessionPending`:s?`forkMessageHint`:`forkSessionUnavailable`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(`forkMessage`),disabled:!s||c,onClick:()=>void o(),children:(0,q.jsx)(Ws,{"aria-hidden":`true`})})}),t&&(0,q.jsx)(V,{content:l(`editMessage`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(`editMessage`),onClick:()=>{x(e),y(!0)},children:(0,q.jsx)(yc,{})})}),a&&(0,q.jsx)(V,{content:l(`regenerateMessageHint`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(`regenerateMessage`),disabled:!s||c,onClick:()=>void a(),children:(0,q.jsx)(he,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:l(n?`messageCopyRequiresFull`:u?`copiedMessage`:`copyMessage`),placement:`above`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":l(u?`copiedMessage`:`copyMessage`),"data-copied":u||void 0,disabled:m||n,onClick:()=>{let t=++g.current;window.clearTimeout(_.current),h(!0),d(!1),p(!1),td(e).then(e=>{t===g.current&&(h(!1),d(e),p(!e),e&&(_.current=window.setTimeout(()=>d(!1),1200)))})},children:u?(0,q.jsx)(rs,{}):(0,q.jsx)(_s,{})})}),f&&(0,q.jsx)(`span`,{className:`copy-error`,role:`status`,children:l(`copyFailed`)})]})}function mq({message:e,fullSubagent:t=!1,sessionId:n,onInspectSubagent:r}){let{t:i}=W();if(e.customType===`openpi-web-command-feedback`)return(0,q.jsxs)(`div`,{className:`command-feedback`,role:`status`,children:[e.content,e.truncation?.truncated&&(0,q.jsx)(`p`,{children:i(`commandFeedbackTruncated`)})]});let a=JK(e.details);if(e.customType===`openpi-setup-request`||e.customType===`openpi-setup-closed`)return(0,q.jsx)(aq,{body:e.content,icon:(0,q.jsx)(Xc,{}),name:i(`configureOpenPi`),summary:e.customType===`openpi-setup-closed`?zD(e.content):void 0,status:`unknown`});if(e.customType===`subagent-result`){let o=Array.isArray(a.results)?a.results.map(JK):[a],s=new Set(GD([e]).map(e=>e.id));return(0,q.jsxs)(`section`,{className:`activity-card subagent subagent-activity`,children:[o.map(e=>{let t=typeof e.id==`string`?e.id:``,a=e.outcome===`interrupted`?`interrupted`:e.status===`done`||e.status===`error`||e.status===`running`?e.status:`unknown`;return(0,q.jsx)(JG,{identity:`${n}:${t}`,title:String(e.title||t||i(`subagentDetails`)),state:a,label:i(a===`unknown`?`unknownState`:`subagentState_${a}`),onInspect:r&&s.has(t)?()=>r(t):void 0},t||JSON.stringify(e))}),(0,q.jsxs)(`details`,{className:`subagent-result-evidence`,open:t||void 0,children:[(0,q.jsx)(`summary`,{children:i(`subagentBackgroundResult`,{count:o.length})}),(0,q.jsx)(`pre`,{className:`details-body tool-evidence`,children:!t&&typeof a.displayContent==`string`?a.displayContent:e.content})]})]})}if(e.customType===`workflow-result`){let t=Array.isArray(a.entries)?a.entries.map(JK):[],n=t.map(e=>XK(e.status)),r=n.includes(`error`)?`error`:n.includes(`warn`)?`warn`:n.length>0&&n.every(e=>e===`done`)?`done`:n.includes(`running`)?`running`:`unknown`,i=t.length?t.map(e=>`${e.status===`completed`?`✓`:`✗`} ${String(e.summary||e.runId||`run`)}${e.resultPreview?`\nResult: ${e.resultPreview}`:``}`).join(` +`):e.content;return(0,q.jsx)(oq,{family:`workflow`,title:t.length>1?`Workflow results · ${t.length} runs`:`Workflow ${String(t[0]?.runId||`result`)}`,body:i,status:r})}return null}function hq(e){return[``,`[]`,`{}`,`null`].includes(e.trim())}function gq({rows:e,active:t}){let{t:n}=W(),[r,i]=(0,K.useState)(!1),a=e.length===1,o=(0,K.useRef)(a),s=(0,K.useRef)(null),c=(0,K.useRef)(null),l=(0,K.useRef)(!0),u=(0,K.useRef)(0),d=(0,K.useRef)(void 0),[f,p]=(0,K.useState)({above:!1,below:!1}),m=(0,K.useCallback)(()=>{let e=c.current;if(!e)return;let t=e.scrollTop>1,n=e.scrollHeight-e.clientHeight-e.scrollTop>1;p(e=>e.above===t&&e.below===n?e:{above:t,below:n})},[]);(0,K.useLayoutEffect)(()=>{let n=c.current,s=o.current&&!a;if(s&&!r&&n?.querySelector(`.thinking-line[open]`)){i(!0);return}o.current=a,!(!n||a||!r||e.length===0)&&(!s&&n.scrollTop!==u.current&&n.scrollHeight-n.clientHeight-n.scrollTop>24&&(l.current=!1),s&&!l.current&&(n.scrollTop=u.current),t&&l.current&&(n.scrollTop=n.scrollHeight,u.current=n.scrollTop),m())},[e,t,r,a,m]),(0,K.useEffect)(()=>{let e=c.current,n=e?.firstElementChild;if(!e||!n||a||typeof ResizeObserver>`u`)return;let i=new ResizeObserver(()=>{r&&t&&l.current&&(e.scrollTop=e.scrollHeight,u.current=e.scrollTop),m()});return i.observe(e),i.observe(n),()=>i.disconnect()},[t,r,a,m]);let h=e.filter(e=>e.processType===`thinking`).length,g=e.filter(e=>e.processType===`tool`).length,_=e.filter(e=>e.processType===`activity`).length,v=[h?n(`processThinkingCount`,{count:h}):``,g?n(`processToolCount`,{count:g}):``,_?n(`processActivityCount`,{count:_}):``].filter(Boolean),y=[...e].reverse().find(e=>e.processStatus===`running`),b=y?.processPreview??(t?[...e].reverse():e).find(e=>e.processPreview)?.processPreview,x=y?.processToolName&&[`read`,`write`,`edit`].includes(y.processToolName)?b?.slice(Math.max(b.lastIndexOf(`/`),b.lastIndexOf(`\\`))+1):b,S=e.filter(e=>e.error||e.processStatus===`error`).length,C=S>0,w=y?`running`:C?`error`:e.some(e=>e.processStatus===`warn`)?`warn`:e.every(e=>e.processStatus===`done`)?`done`:`unknown`,T=e.flatMap(e=>e.processToolName?[e.processToolName]:[]),E=[...new Set(T.map(e=>hK(e).action))],D=E.map(e=>n(`toolActionGroup_${e}`)),O=E.length?n(`toolGroup_${w===`done`?`done`:w===`running`?`running`:`unknown`}`,{actions:D.join(n(`toolGroupSeparator`))}):n(w===`running`?`processRunning`:`processDetails`),k=y?.processToolName?gK(n,y.processToolName,`running`):y?.processType===`thinking`?n(`thinkingActive`):r?n(`processDetails`):O,A=y?.processToolName??T[0],j=y?.processType===`thinking`?Zs:A?hK(A).Icon:Xc;return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`details`,{className:`process-sequence ${a?`single-process `:``}${w}`,open:a||r,"data-status":w,"data-running":w===`running`?`true`:void 0,"data-history-entry":e[0]?.key,onToggle:e=>{a||i(e.currentTarget.open)},children:[(0,q.jsxs)(`summary`,{ref:s,hidden:a,"aria-label":[k,y?b:``,...v,C?n(`processFailureCount`,{count:S}):``].filter(Boolean).join(` · `),children:[(0,q.jsx)(`span`,{className:`tool-icon`,"aria-hidden":`true`,children:(0,q.jsx)(j,{})}),(0,q.jsx)(`span`,{className:`process-sequence-title`,children:(0,q.jsx)(`strong`,{children:k})}),b&&(y||!t&&!E.length)&&(0,q.jsx)(`span`,{className:`process-sequence-preview`,title:b,children:x}),(0,q.jsx)(os,{className:`tool-disclosure`,"aria-hidden":`true`}),!C&&(0,q.jsx)(QK,{status:w})]}),(0,q.jsx)(`section`,{ref:c,className:`process-sequence-scroll`,"aria-label":a?void 0:[n(`processDetails`),...v].join(` · `),tabIndex:a?void 0:0,"data-scroll-above":f.above||void 0,"data-scroll-below":f.below||void 0,onScrollCapture:e=>{let t=e.target;if(a&&t instanceof HTMLElement&&t.classList.contains(`thinking-evidence`)){let n=t.getBoundingClientRect().top-e.currentTarget.getBoundingClientRect().top+t.scrollTop,r=n>u.current;u.current=n,l.current=(l.current||r)&&t.scrollHeight-t.clientHeight-t.scrollTop<=24}},onScroll:e=>{if(a)return;let t=e.currentTarget,n=t.scrollTop>u.current;u.current=t.scrollTop,l.current=(l.current||n)&&t.scrollHeight-t.clientHeight-t.scrollTop<=24,m()},onWheel:e=>{!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&e.deltaY<0&&(a||Tq(e.nativeEvent,e.currentTarget))&&(l.current=!1)},onKeyDown:e=>{let t=e.target;!e.defaultPrevented&&!e.altKey&&!e.metaKey&&(!e.ctrlKey||e.key===`Home`)&&([`ArrowUp`,`PageUp`,`Home`].includes(e.key)||e.key===` `&&e.shiftKey)&&t instanceof HTMLElement&&!t.isContentEditable&&!t.closest(`input, textarea, select`)&&!(e.key===` `&&t.closest(`button, summary`))&&(a||Tq(e.nativeEvent,e.currentTarget))&&(l.current=!1)},onTouchStart:e=>{d.current=e.touches[0]?.clientY},onTouchMove:e=>{let t=e.touches[0]?.clientY;t!==void 0&&d.current!==void 0&&t>d.current&&(a||Tq(e.nativeEvent,e.currentTarget))&&(l.current=!1),d.current=t},children:(0,q.jsx)(`div`,{className:`process-sequence-body`,children:e.map(e=>(0,q.jsx)(`div`,{className:`process-step ${a?`single-tool-step `:``}${e.processStatus??`unknown`}`,"data-status":e.processStatus??`unknown`,children:e.content},e.key))})})]}),(0,q.jsx)(V,{anchorRef:s,focusTrigger:`always`,content:[...v,C?n(`processFailureCount`,{count:S}):``].filter(Boolean).join(` · `),placement:`above`,isEnabled:!a})]})}function _q(e,t){let n=[];for(let t of e){let e=n.at(-1),r=t.kind===`process`;r&&e?.process?e.rows.push(t):n.push({process:r,rows:[t]})}return n.flatMap((e,r)=>{let i=`${e.process?`process`:`rows`}-${e.rows[0]?.key}`;return e.process?(0,q.jsx)(gq,{rows:e.rows,active:t&&r===n.length-1},i):e.rows.map(e=>(0,q.jsx)(K.Fragment,{children:e.content},e.key))})}function vq({rows:e,timing:t,active:n,timedTurn:r}){let{t:i}=W(),a=(0,K.useId)(),[o,s]=(0,K.useState)(t?.outcome!==`completed`),c=(0,K.useRef)(!1),l=(0,K.useRef)(t?.outcome);(0,K.useEffect)(()=>{l.current!==t?.outcome&&t?.outcome===`completed`&&s(!1),l.current=t?.outcome},[t?.outcome]);let u=!!(t||r),d=[];for(let r of e){if(r.content===null)continue;let e=t?.resultEntryId?r.responseEntryId===t.resultEntryId&&r.final!==!1:!n&&r.final,i=r.kind!==`prompt`&&!e,a=d.at(-1);i&&a?.foldable?a.rows.push(r):d.push({foldable:i,rows:[r]})}let f=d.filter(e=>e.foldable),p=e=>e===0?a:`${a}-${e}`,m=f.length>0,h=t?(0,q.jsx)(ZG,{timing:t}):r?(0,q.jsx)(XG,{elapsedMs:r.elapsedMs},JSON.stringify([r.sessionId,r.sessionPath,r.commandId,r.epoch,r.startedAt])):null;return(0,q.jsxs)(q.Fragment,{children:[u&&(0,q.jsxs)(`header`,{className:`turn-duration`,"data-outcome":t?.outcome,children:[m?(0,q.jsxs)(`button`,{type:`button`,className:`turn-duration-toggle`,"aria-expanded":o,"aria-controls":f.map((e,t)=>p(t)).join(` `),onClick:e=>{c.current=e.nativeEvent.isTrusted,s(e=>!e)},children:[(0,q.jsx)(vs,{className:`turn-duration-icon`,"aria-hidden":`true`}),h,(0,q.jsx)(os,{className:`turn-duration-chevron`,"aria-hidden":`true`})]}):h,t&&t.outcome!==`completed`&&(0,q.jsx)(`span`,{className:`turn-duration-outcome`,children:i(`turnElapsedOutcome_${t.outcome}`)})]}),u?d.map(e=>e.foldable?(0,q.jsx)(`div`,{className:`turn-response-body`,id:p(f.indexOf(e)),hidden:!o,inert:!o,"data-user-toggle":c.current||void 0,children:_q(e.rows,n&&e===f.at(-1))},e.rows[0].key):(0,q.jsx)(K.Fragment,{children:_q(e.rows,!1)},e.rows[0].key)):_q(e,n)]})}function yq({id:e,rows:t,active:n,observed:r=!0,changes:i,session:a,timedTurn:o,onReviewTurn:s}){let{t:c}=W(),l=[...t].reverse().find(e=>e.outcome||e.timing),u=l?.timing?.outcome??l?.outcome,d=t.some(e=>e.kind===`response`),f=t.find(e=>e.kind===`prompt`),p=!!(f?.promptEntryId&&t.some(e=>e.commandHandledInputId===f.promptEntryId&&e.commandHandledCommandId===f.promptCommandId)),m=t.some(e=>e.forkSnapshotBoundary),h=m?`forked`:n?r?`running`:`unknown`:u===`failed`?`failed`:u===`interrupted`||u===`cancelled`?`interrupted`:u===`completed`||d||p?`complete`:`waiting`,g=h===`failed`?`error`:h===`interrupted`?`warning`:h===`running`?`accent`:h===`complete`?`success`:`neutral`,_=c(h===`unknown`?`toolState_unknown`:`turnState_${h}`),v=t.some(e=>e.timing&&e.timing.commandId===o?.commandId&&e.timing.epoch===o?.epoch)?void 0:o,y=[],b=[],x=0,S=(e,t=!1)=>{y.push((0,q.jsx)(vq,{rows:b,timing:e,active:n&&t,timedTurn:t?v:void 0},`run-${x++}`)),b=[]};for(let e of t)e.kind===`prompt`?b.length?b.push(e):y.push((0,q.jsx)(K.Fragment,{children:e.content},e.key)):e.timing?S(e.timing):b.push(e);let C=n&&r&&(b.length>0||!!v||!t.some(e=>e.timing))&&!b.some(e=>e.kind!==`prompt`&&e.content!==null);(b.length||v)&&S(void 0,!0);let w=!!(o||t.some(e=>e.timing));return(0,q.jsxs)(`section`,{className:`conversation-turn${e===0?` prelude`:``}`,"data-turn":e,children:[e>0&&h!==`complete`&&(!w||m)&&(0,q.jsxs)(`header`,{className:`turn-heading`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:c(`turnLabel`,{number:e})}),(0,q.jsxs)(`span`,{className:`turn-state ${h}`,children:[(0,q.jsx)(qG,{variant:g,label:_,isPulsing:h===`running`,icon:h===`failed`||h===`interrupted`?(0,q.jsx)(je,{"aria-hidden":`true`}):h===`forked`?(0,q.jsx)(Ws,{"aria-hidden":`true`}):void 0}),_]})]}),y,C&&(0,q.jsxs)(`div`,{className:`conversation-waiting`,"aria-hidden":`true`,children:[(0,q.jsxs)(`span`,{className:`conversation-waiting-dots`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]}),(0,q.jsx)(`span`,{children:c(`modelRunning`)})]}),i&&a&&(0,q.jsx)(SK,{changes:i,onReview:s},`${a.id}:${a.path}:${i.promptEntryId}`)]})}function bq(e,t,n,r){let i=new Map;for(let t=0;t{if(!t)return;let r=i.get(t);if(!(r===void 0||r>=n)){for(let t=r+1;te.rows.some(e=>e.promptCommandId===n||r?.promptEntryId&&e.promptEntryId===r.promptEntryId)):void 0,l=s.length-1;for(;l>=0&&s[l].id!==0&&!s[l].rows.some(e=>e.kind===`prompt`&&!e.pendingPrompt);)l--;return{turns:s,activeTurn:c?.id??s[l]?.id}}function xq(e,t,n,r,i,a,o,s=!0,c=t){let{turns:l,activeTurn:u}=bq(e,c,n,a);return l.map(e=>(0,q.jsx)(yq,{id:e.id,rows:e.rows,active:t&&e.id===u&&!e.rows.some(e=>e.forkSnapshotBoundary),observed:s,changes:c&&e.id===u?void 0:r?.get(e.rows.find(e=>e.kind===`prompt`&&!e.pendingPrompt)?.promptEntryId??``),session:i,timedTurn:t&&e.id===u&&!e.rows.some(e=>e.forkSnapshotBoundary)?a:void 0,onReviewTurn:o},`turn-group-${e.rows[0]?.key}`))}function Sq(e,t,n){let r=e.getBoundingClientRect(),i=r.top,a=Array.from(e.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)).filter(t=>{let n=t.getBoundingClientRect(),i=Math.max(n.top,r.top),a=Math.min(n.bottom,r.bottom);for(let n=t;n&&n!==e;n=n.parentElement){if(n.hidden||n instanceof HTMLDetailsElement&&!n.open&&n!==t&&!n.querySelector(`:scope > summary`)?.contains(t))return!1;if(n===t)continue;let e=getComputedStyle(n);if(!/^(auto|scroll|overlay|hidden|clip)$/.test(e.overflowY))continue;let r=n.getBoundingClientRect();i=Math.max(i,r.top),a=Math.min(a,r.bottom)}return a>i}),o=a.find(e=>!a.some(t=>t!==e&&e.contains(t))),s=o?.dataset.historyResult??o?.dataset.historyEntry??o?.dataset.historyMessage,c=o?.dataset.historyResult??o?.dataset.historyMessage,l=n?.entries.find(e=>e.id===c||e.id===s)?.id;if(!l&&s)for(let e of n?.entries??[])s.startsWith(`${e.id}-`)&&(!l||e.id.length>l.length)&&(l=e.id);return{key:l?s:void 0,entryId:l,offset:(o?.getBoundingClientRect().top??i)-i,scrollTop:e.scrollTop,pinned:t}}function Cq(e,t){let n=!1;for(let r=e.parentElement;r&&r!==t;r=r.parentElement)if(r instanceof HTMLDetailsElement&&(r.open=!0),r.classList.contains(`turn-response-body`)&&r.hidden){let e=Array.from(t.querySelectorAll(`button[aria-controls]`)).find(e=>e.getAttribute(`aria-controls`)?.split(` `).includes(r.id));e&&(e.click(),n=!0)}return n}function wq(e,t,n){if(e.scrollIntoView?.({block:`nearest`,inline:`nearest`,behavior:`instant`}),n){t.scrollTop=n.scrollTop;for(let r=e.parentElement;r&&r!==t;r=r.parentElement)!/^(auto|scroll|overlay)$/.test(getComputedStyle(r).overflowY)||r.scrollHeight<=r.clientHeight||(r.scrollTop+=e.getBoundingClientRect().top-t.getBoundingClientRect().top-n.offset)}return Math.max(0,t.scrollTop+e.getBoundingClientRect().top-t.getBoundingClientRect().top-(n?.offset??24))}function Tq(e,t){return Eq(e,t,`up`)}function Eq(e,t,n){for(let r of e.composedPath()){if(r===t)return!0;if(!(r instanceof HTMLElement))continue;let e=getComputedStyle(r);if(/^(auto|scroll|overlay)$/.test(e.overflowY)&&((n===`up`?r.scrollTop:r.scrollHeight-r.clientHeight-r.scrollTop)>0||/^(contain|none)$/.test(e.overscrollBehaviorY)))return!1}return!1}function Dq(e){let{t}=W(),n=(0,K.useRef)(null),r=(0,K.useRef)(null),i=(0,K.useRef)(!0),a=(0,K.useRef)(0),o=(0,K.useRef)(null);(0,K.useEffect)(()=>{let e=n.current,t=()=>{o.current=null};return e?.addEventListener(`scrollend`,t),()=>e?.removeEventListener(`scrollend`,t)},[]);let s=(0,K.useRef)(null),c=(0,K.useCallback)(()=>{s.current!==null&&cancelAnimationFrame(s.current),s.current=null},[]),l=(0,K.useCallback)(e=>{let t=n.current;if(!t)return;let r=window.matchMedia?.(`(prefers-reduced-motion: reduce)`),o=(e=t.scrollHeight)=>{c(),typeof t.scrollTo==`function`?t.scrollTo({top:e,behavior:`instant`}):t.scrollTop=e,a.current=t.scrollTop};if(!e||r?.matches||document.visibilityState===`hidden`||!t.clientHeight){o();return}if(s.current!==null)return;let l=t.scrollHeight-t.clientHeight-t.scrollTop;if(l<=1||l>t.clientHeight){o();return}let u=performance.now(),d=e=>{if(s.current=null,!i.current||n.current!==t)return;if(r?.matches||document.visibilityState===`hidden`){o();return}let a=Math.max(0,t.scrollHeight-t.clientHeight),c=a-t.scrollTop;if(c<=1){o(a);return}let l=Math.min(64,Math.max(1,e-u));u=e,o(t.scrollTop+Math.max(1,c*(1-Math.exp(-l/48)))),s.current=requestAnimationFrame(d)};s.current=requestAnimationFrame(d)},[c]),u=(0,K.useRef)(void 0),d=(0,K.useRef)(0),f=(0,K.useRef)(e.readingRestorePending);f.current=e.readingRestorePending;let[p,m]=(0,K.useState)(!1),h=(0,K.useRef)(null),g=e.activityObserved!==!1&&e.resultExposureEnabled!==!1,_=(0,K.useCallback)(()=>{h.current?.abort(),h.current=null},[]),v=(0,K.useRef)(void 0),y=(0,K.useRef)(e.scrollToBottom),b=(0,K.useRef)(null),x=(0,K.useMemo)(()=>e.readingCache??new Map,[e.readingCache]),S=e.historyNavigation,C=S?JSON.stringify([S.sessionId,S.sessionPath,S.entryId,S.revision]):null,w=(0,K.useRef)(null),[T,E]=(0,K.useState)(null),D=qK(e.snapshot.selectedSession,{onAnchorChange:e.onHistoryAnchorChange,onRefresh:e.onRefreshHistory,preload:e.activityObserved!==!1&&e.resultExposureEnabled!==!1,beforePrepend:()=>{let e=n.current;e&&(b.current={...Sq(e,!1,k.current),scrollHeight:e.scrollHeight},i.current=!1)}},x,S),O=D.session,k=(0,K.useRef)(O);k.current=O;let A=O?.id,j=O?.path,M=O?.cwd,N=T&&T.sessionId===A&&T.sessionPath===j?T.entryId:void 0,P=JSON.stringify([A,j]),{capture:F,restore:I,clear:ee}=VK(n,i,P,a);(0,K.useLayoutEffect)(()=>c,[P,c]);let L=JSON.stringify([e.snapshot.selectedSession?.id,e.snapshot.selectedSession?.path,e.snapshot.selectedSession?.history?.leafEntryId??e.snapshot.selectedSession?.entries.at(-1)?.id]);(0,K.useLayoutEffect)(()=>(g||_(),_),[L,C,g,_]),(0,K.useLayoutEffect)(()=>{let e=n.current;if(!e||!A||!j)return;let t=()=>{f.current||uK(x,P,{position:Sq(e,i.current,k.current)})};window.addEventListener(`pagehide`,t);let r=()=>{document.visibilityState===`hidden`&&t()};return document.addEventListener(`visibilitychange`,r),()=>{window.clearTimeout(d.current),window.removeEventListener(`pagehide`,t),document.removeEventListener(`visibilitychange`,r),t()}},[P,x,A,j]);let R=(0,K.useRef)(P),[te,z]=(0,K.useState)({});(0,K.useLayoutEffect)(()=>{R.current!==P&&(R.current=P,z({}))},[P]);let B=(0,K.useMemo)(()=>new Map((O?.entries??[]).flatMap(e=>e.turnChanges&&e.turnChanges.sessionId===O?.id?[[e.turnChanges.promptEntryId,e.turnChanges]]:[])),[O?.entries,O?.id]),ne=(0,K.useRef)(D.reset),re=D.hasNewer||D.verifying,ie=HD(e.snapshot,O),ae=e.snapshot.selectedExecution?.sessionId===O?.id&&e.snapshot.selectedExecution?.sessionPath===O?.path?e.snapshot.selectedExecution:void 0,oe=ie&&e.liveActiveTurn!==void 0?e.liveRunning:ie&&e.liveRunning||(ae?ae.status===`running`:ie&&e.snapshot.runtime.status===`running`),se=!re&&oe?ie&&e.liveActiveTurn!==void 0?e.liveRetry??void 0:ae?ae.retry:ie?e.liveRetry??void 0:void 0:void 0,ce=(0,K.useRef)({scope:P,nativeRowKeys:new Map,ambiguousTimingIds:new Set});ce.current.scope!==P&&(ce.current={scope:P,nativeRowKeys:new Map,ambiguousTimingIds:new Set});let{entries:le,projectedPrompts:H}=(0,K.useMemo)(()=>LK({...e.snapshot,selectedSession:O},re?[]:e.liveMessages.filter(e=>e.optimistic?e.optimistic.sessionId===O?.id&&e.optimistic.sessionPath===O?.path:ie),ce.current),[e.snapshot,O,ie,re,e.liveMessages]);(0,K.useEffect)(()=>{O&&H.length>0&&e.onPromptProjection?.(O.id,O.path,H)},[O,H,e.onPromptProjection]),(0,K.useEffect)(()=>{let e=n.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{if(!i.current){I(),F();return}l(oe)});return t.observe(e),r.current&&t.observe(r.current),()=>t.disconnect()},[l,oe,I,F]);let{rows:de,turns:fe}=(0,K.useMemo)(()=>{let n=GD(le.map(e=>e.message)),r=nq(le,oe&&!re,!!se),i=[...r.finalErrors].at(-1),a=-1;for(let e=le.length-1;e>=0;e--)if(le[e].message.role===`assistant`){a=e;break}let o=new Map,s,c=new Map,l=new Set,u=ie?e.snapshot.runtime.liveTools??[]:[],d=ae?.liveTools??[],f=re?[]:[...u,...d.filter(e=>!u.some(t=>t.call.id===e.call.id))];le.forEach(e=>{let{message:t}=e;t.role===`toolResult`&&t.toolCallId&&c.set(t.toolCallId,e),t.parts?.forEach(e=>{e.type===`toolCall`&&e.id&&![`ask_user`,`human_handoff`].includes(e.name)&&l.add(e.id)})});let p=[],m=0,h,g=-1,_=-1;for(let e=le.length-1;e>=0;e--){if(le[e]?.message.role===`user`){_=e;break}if(le[e]?.message.role===`custom`&&le[e]?.message.customType===`openpi-setup-request`)break}let v=new Set,y=-1;le.forEach(({message:e},t)=>{e.role===`user`||e.role===`custom`&&e.customType===`openpi-setup-request`?(y>=0&&v.add(y),y=-1):e.role===`assistant`&&e.content.trim()&&(y=t)}),y>=0&&v.add(y);let b=le.flatMap((u,d)=>{let y=u.message;if(u.forkSnapshotBoundary)return[{key:u.key,turn:m,kind:`custom`,forkSnapshotBoundary:!0,content:null}];if(u.timing)return[{key:u.key,turn:m,kind:`custom`,timing:u.timing,content:null}];if(u.compaction)return[{key:u.key,turn:m,kind:`custom`,content:(0,q.jsx)(QG,{compaction:{state:`completed`}})}];if(y.role===`custom`){if(y.customType===`openpi-web-command-handled`){let e=y.details;return e&&typeof e==`object`&&`inputEntryId`in e&&typeof e.inputEntryId==`string`?[{key:u.key,turn:m,kind:`custom`,commandHandledInputId:e.inputEntryId,commandHandledCommandId:`commandId`in e&&typeof e.commandId==`string`?e.commandId:void 0,content:null}]:[]}return y.display===!1||![`openpi-web-command-feedback`,`openpi-setup-request`,`openpi-setup-closed`,`subagent-result`,`workflow-result`].includes(y.customType??``)?[]:(y.customType===`openpi-setup-request`&&(h=void 0,g=-1,m++),[{key:u.key,turn:m,kind:`custom`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":u.entryId??u.key,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(mq,{message:y,sessionId:A??``,onInspectSubagent:e.onInspectSubagent,fullSubagent:e.snapshot.preferences.subagentResultDisplay===`full`})})})}])}if(y.role===`user`){h=y.content,g=d,m++,p.push({entryId:u.entryId??u.key,title:Array.from((y.content||t(`attachedImage`)).replace(/\s+/g,` `).trim()).slice(0,240).join(``)});let n=u.entryId?JSON.stringify([A,j,u.entryId]):``,r=te[n],i=!!(y.truncation?.visibleText&&r===void 0);return[{key:u.key,turn:m,kind:`prompt`,pendingPrompt:!!u.optimistic,promptCommandId:u.optimistic?.commandId??y.commandId,promptEntryId:u.entryId,content:(0,q.jsxs)(`article`,{className:`message-row user`,id:`turn-${m}`,"data-history-entry":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:[(0,q.jsxs)(`div`,{className:`message-content`,children:[(0,q.jsx)(RK,{message:y,sessionId:A,path:j,entryId:u.entryId}),(y.content||y.truncation?.visibleText)&&(u.entryId&&A&&j&&y.truncation?.visibleText?(0,q.jsx)(iK,{preview:y.content,sessionId:A,sessionPath:j,entryId:u.entryId,markdown:!1,fullText:r,onComplete:e=>z(t=>({...t,[n]:e}))},`${A}:${j}:${u.entryId}`):(0,q.jsx)(rK,{content:y.content}))]}),(0,q.jsx)(pq,{content:r??y.content,editable:ie&&!oe&&!!(e.forkAvailable&&e.onEdit&&u.entryId&&A&&j&&!u.optimistic)&&!i,copyRequiresFull:i,timestamp:u.timestamp,onResend:t=>e.onEdit&&u.entryId&&A&&j?e.onEdit({sessionId:A,sessionPath:j,entryId:u.entryId},t):Promise.resolve(!1),onFork:u.entryId&&A&&j&&e.onFork&&!u.optimistic?()=>e.onFork({sessionId:A,sessionPath:j,entryId:u.entryId}):void 0,canFork:ie&&!oe&&e.forkAvailable,forkPending:e.forkPending})]})}]}if(y.role===`assistant`){let b=p.at(-1);b&&y.content.trim()&&(b.reply=Array.from(y.content.replace(/\s+/g,` `).trim()).slice(0,240).join(``));let x=[],S=y.parts??[],C=y.webSearch??[],w=e=>Math.min(S.length,e.beforePartIndex??0),T=e=>{for(let[t,n]of C.entries()){if(w(n)!==e)continue;let r=n.status===`completed`?`done`:n.status===`failed`?`error`:`warn`;x.push({key:`${u.key}-native-search-${t}`,turn:m,kind:`process`,processType:`tool`,processToolName:`web_search`,processPreview:n.query,processStatus:r,error:n.status===`failed`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":`${u.entryId??u.key}-native-search-${t}-body`,"data-history-message":u.entryId??u.key,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(aq,{body:n.query,icon:(0,q.jsx)(Gs,{}),name:`web_search`,summary:n.query,status:r})})})})}},E=S.reduce((e,t,n)=>(t.type===`thinking`||t.type===`text`)&&!t.text.trim()?e:n,-1),D=S.reduce((e,t,n)=>t.type===`text`?n:e,-1),O=!!(u.entryId&&A&&j&&y.truncation?.visibleText),k=y.content,F=u.entryId?JSON.stringify([A,j,u.entryId]):``,I=te[F],ee=!!(y.truncation?.visibleText&&I===void 0),L=(t,n,r)=>{if(O&&!r||!O&&!t.trim())return;let i=r&&!re&&!se&&e.activityObserved!==!1&&oe&&ae?.compaction?.state!==`running`&&!y.stopReason&&d===le.length-1&&E===D,a=r&&v.has(d)&&!i&&(y.stopReason===`stop`||y.stopReason===`length`||y.stopReason===`error`||y.stopReason===`aborted`||!oe&&!y.parts?.some(e=>e.type===`toolCall`));x.push({key:n,turn:m,kind:`response`,responseEntryId:u.entryId,final:r&&(y.stopReason===`stop`||y.stopReason===`length`),content:(0,q.jsxs)(`article`,{className:`message-row assistant response${a?` final-response`:``}`,"data-streaming":i||void 0,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,"data-history-entry":u.entryId?`${u.entryId}-${n.slice(u.key.length+1)}`:n,children:[(0,q.jsx)(`div`,{className:`message-content`,children:O&&A&&j&&u.entryId?(0,q.jsx)(iK,{preview:k,sessionId:A,sessionPath:j,entryId:u.entryId,markdown:!0,fullText:I,onComplete:e=>z(t=>({...t,[F]:e}))},`${A}:${j}:${u.entryId}`):(0,q.jsx)(vD,{streaming:i,children:t},P)}),a&&(0,q.jsx)(pq,{content:I??y.content,editable:!1,copyRequiresFull:ee,timestamp:u.timestamp,onResend:e.onResend,onRegenerate:b?.entryId&&A&&j&&e.onRegenerate&&!u.optimistic&&!y.isError&&(y.stopReason===`stop`||y.stopReason===`length`)?()=>e.onRegenerate({sessionId:A,sessionPath:j,entryId:b.entryId}):void 0,onFork:u.entryId&&A&&j&&e.onFork?()=>e.onFork({sessionId:A,sessionPath:j,entryId:u.entryId}):void 0,canFork:ie&&!oe&&e.forkAvailable,forkPending:e.forkPending})]})})};y.parts?.forEach((r,i)=>{if(T(i),r.type===`text`&&(S[i-1]?.type!==`text`||C.some(e=>w(e)===i))){let e=r.text,t=i+1;for(;S[t]?.type===`text`&&!C.some(e=>w(e)===t);){let n=S[t];n?.type===`text`&&(e+=n.text),t++}L(e,`${u.key}-text-${i}`,t>D)}if(r.type===`thinking`&&r.text.trim()){let t=!re&&!se&&!y.stopReason&&ae?.compaction?.state!==`running`&&oe&&d===le.length-1&&i===E?e.activityObserved===!1?`unknown`:`running`:`done`;x.push({key:`${u.key}-thinking-${i}`,turn:m,kind:`process`,processType:`thinking`,processPreview:iq(r.text),processStatus:t,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":`${u.entryId??u.key}-thinking-${i}-body`,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(fq,{body:r.text,truncated:r.textTruncated,source:u.entryId&&A&&j&&r.sourcePartIndex!==void 0?{sessionId:A,sessionPath:j,entryId:u.entryId,partIndex:r.sourcePartIndex}:void 0,status:t,level:t===`running`?e.snapshot.thinking?.level:void 0,duration:IK(u,e.thinkingDurations),defaultOpen:e.snapshot.preferences.expandThinking===!0},JSON.stringify([A,j,u.key,i]))})})})}if(r.type===`toolCall`){let a=r,o=f.find(e=>e.call.id===a.id),s=a.id?c.get(a.id):void 0,d=s?.message??o?.result,p=$G(a,d,f,s?void 0:o?.state),h=p?[...p.children.map(e=>({call:e.call,child:e})),...p.showWrapper?[{call:a}]:[]]:[{call:a}];for(let[r,{call:o,child:g}]of h.entries()){let _=o.name.startsWith(`subagent`)?e.snapshot.preferences.subagentResultDisplay===`full`:o.name===`bash`?e.snapshot.preferences.bashToolDisplay===`full`:o.name===`write`||o.name===`edit`?e.snapshot.preferences.fileMutationDisplay===`full`:!1,v=o.id?f.find(e=>e.call.id===o.id):void 0,y=g?s:o.id?c.get(o.id):void 0,b=g?void 0:y?.message,S=g?g.result:b??v?.result,C=g?g.state:b?void 0:v?.state,w=g?g.state===`returned`?`done`:g.state===`failed`?`error`:g.state===`cancelled`||g.state===`timed_out`?`warn`:g.state:ZK(S,C),T=e.activityObserved===!1&&w===`running`?`unknown`:w,E=p&&r===h.length-1&&!p.showWrapper?(0,q.jsxs)(`details`,{className:`evidence-raw`,children:[(0,q.jsx)(`summary`,{children:t(`toolCodemodeDetails`)}),(0,q.jsx)(`pre`,{children:pd(a.arguments).text}),(0,q.jsx)(`pre`,{children:pd(d?.content??``).text})]}):null,D=o.name===`plan_ready`&&S&&aK(S)?(0,q.jsx)(oK,{result:S,sessionId:A,sessionPath:j,entryId:y?.entryId},`${u.key}-${o.id||i}-plan`):hd(o.name)&&!g?.outputMissing?(0,q.jsx)(xK,{call:o,result:S,liveState:C,observed:e.activityObserved,cwd:M,defaultOpen:_,children:E},`${u.key}-${o.id||i}-evidence`):g?.outputMissing?null:lq(o,S,{sessionId:A??``,subagents:ie?e.snapshot.runtime.capabilities.subagents?.items:void 0,workflows:ie?e.snapshot.runtime.capabilities.workflows?.items:void 0,records:n,onInspectSubagent:e.onInspectSubagent,liveState:C,defaultOpen:_,observed:e.activityObserved!==!1}),O=YK(o.arguments),{Icon:k,action:P}=hK(o.name),F=P===`agent`?sq(O,JK(S?.details)).map(t=>UD(t,ie?e.snapshot.runtime.capabilities.subagents?.items:void 0,n)).join(t(`toolGroupSeparator`)):vK(o.name,O),I=(0,q.jsx)(k,{},`${u.key}-${o.id||i}-icon`);x.push({key:`${u.key}-tool-${o.id||i}`,turn:m,kind:o.name===`plan_ready`&&S&&aK(S)?`response`:D&&(o.name===`subagent_spawn`||o.name===`workflow`)?`custom`:`process`,processType:/^(subagent|workflow)/u.test(o.name)?`activity`:`tool`,processToolName:o.name,processPreview:F.split(` +`).find(Boolean),processStatus:T,error:T===`error`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-message":u.entryId??u.key,"data-history-result":y?.entryId,"data-history-highlighted":N&&(u.entryId===N||y?.entryId===N)||void 0,tabIndex:-1,children:(0,q.jsxs)(`div`,{className:`message-content`,children:[D||(0,q.jsx)(aq,{body:o.name===`bash`&&typeof O.command==`string`?O.command:o.arguments,icon:I,name:o.name||`tool`,summary:P===`search`&&typeof O.path==`string`?t(`toolSearchTarget`,{path:O.path,pattern:rq(o.name,O)}):rq(o.name,O),output:g?g.error??S?.content:o.id&&l.has(o.id)?S?.content:void 0,status:T,evidenceState:e.activityObserved===!1&&g?.state===`running`?`unknown`:g?.state,rawDetails:p?.showWrapper&&o.id===a.id?d?.details:void 0,note:g?.outputMissing?t(g.argumentsOmitted?`toolNestedArgumentsMissing`:`toolNestedOutputMissing`):void 0,snapshotMissingResult:S?.forkSnapshotToolResult,defaultOpen:_,children:E}),p?.incomplete&&r===h.length-1&&(0,q.jsx)(`p`,{className:`evidence-note`,role:`status`,children:t(`toolNestedIncomplete`)}),D&&!hd(o.name)&&E]})})})}}}),T(S.length),D<0&&L(y.content,`${u.key}-answer`,!0),y.stopReason===`error`&&!r.finalErrors.has(d)&&(o.set(u.key,[...x]),x.length=0);let R=r.groups.get(d);if(R&&(R.state===`retrying`&&se&&(s=`${R.attempts[0].key}-attempts`),x.push({key:`${R.attempts[0].key}-attempts`,turn:m,kind:`outcome`,outcome:R.state===`interrupted`?`interrupted`:void 0,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(tq,{state:R.state,retry:R.state===`retrying`?se:void 0,observed:e.activityObserved!==!1&&ae?.status!==`unknown`,attempts:R.attempts.map(e=>({entry:e,content:o.get(e.key)}))})})})),r.finalErrors.has(d)||y.stopReason===`aborted`){let t=y.stopReason===`error`,n=g===_&&d===i&&d===a?h:void 0;x.push({key:`${u.key}-outcome`,turn:m,kind:`outcome`,error:t,outcome:t?`failed`:`interrupted`,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(eq,{failed:t,error:y.errorMessage,retryPrompt:n,retryEntryId:u.entryId,canRetry:ie&&!re&&!oe,onRetry:e.onResend})})})}else(y.stopReason===`stop`||y.stopReason===`length`)&&x.push({key:`${u.key}-completed`,turn:m,kind:`outcome`,outcome:`completed`,content:null});return x}if(y.role===`toolResult`){if(y.toolCallId&&l.has(y.toolCallId))return[];if(aK(y))return[{key:u.key,turn:m,kind:`response`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:(0,q.jsx)(oK,{result:y,sessionId:A,sessionPath:j,entryId:u.entryId})})})}];let r=y.toolName?.startsWith(`subagent`)?`subagent`:y.toolName?.startsWith(`workflow`)?`workflow`:null,i=ZK(y),a=e.activityObserved===!1&&i===`running`?`unknown`:i,o=y.toolName||`tool`,s=r===`subagent`?e.snapshot.preferences.subagentResultDisplay===`full`:o===`bash`?e.snapshot.preferences.bashToolDisplay===`full`:o===`write`||o===`edit`?e.snapshot.preferences.fileMutationDisplay===`full`:!1,{Icon:c}=hK(o),d=(0,q.jsx)(c,{},`${u.key}-icon`),f=r===`subagent`&&!y.forkSnapshotToolResult?lq({type:`toolCall`,id:y.toolCallId,name:o,arguments:`{}`},y,{sessionId:A??``,subagents:ie?e.snapshot.runtime.capabilities.subagents?.items:void 0,records:n,onInspectSubagent:e.onInspectSubagent,defaultOpen:s,observed:e.activityObserved!==!1}):r&&!y.forkSnapshotToolResult?(0,q.jsx)(oq,{family:r,title:`${o.replaceAll(`_`,` `)} · ${zD(y.content)}`,body:y.content,status:a,defaultOpen:s},`${u.key}-card`):hq(y.content)&&!y.forkSnapshotToolResult?(0,q.jsxs)(`div`,{className:`tool-line-empty`,children:[(0,q.jsx)(`span`,{className:`tool-icon`,children:d}),(0,q.jsx)(`span`,{className:`tool-name`,children:o}),(0,q.jsx)(`span`,{className:`tool-summary`,children:t(`noOutput`)}),(0,q.jsx)(QK,{status:a})]},`${u.key}-empty`):(0,q.jsx)(aq,{body:y.content,icon:d,name:o,summary:zD(y.content),status:a,snapshotMissingResult:y.forkSnapshotToolResult,defaultOpen:s},`${u.key}-evidence`);return[{key:u.key,turn:m,kind:o===`ask_user`||o===`human_handoff`?`response`:`process`,processType:r?`activity`:`tool`,processToolName:o,processStatus:a,error:a===`error`,content:(0,q.jsx)(`article`,{className:`message-row assistant detail-only`,"data-history-entry":`${u.entryId??u.key}-body`,"data-history-message":u.entryId??u.key,"data-history-highlighted":N&&u.entryId===N||void 0,tabIndex:-1,children:(0,q.jsx)(`div`,{className:`message-content`,children:f})})}]}return[]}),x=b.length;for(;x>0&&b[x-1].pendingPrompt;)x--;let S=b.length-x,C=b[x-1]?.turn??0;se&&!s&&(s=`native-retry`,b.splice(x,0,{key:`native-retry`,turn:C,kind:`outcome`,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)(tq,{attempts:[],state:`retrying`,retry:se,observed:e.activityObserved!==!1&&ae?.status!==`unknown`})})}));let w=!re&&ae?.compaction;if(w&&w.state!==`completed`){let n=b.findIndex(e=>e.key===s),r={key:`native-compaction-${w.startedAt??w.state}`,turn:b[n]?.turn??C,kind:`custom`,content:(0,q.jsx)(QG,{compaction:w,observed:e.activityObserved!==!1&&ae?.status!==`unknown`})};b.splice(n<0?x:n,0,r),w.state===`failed`&&w.errorMessage&&b.splice(b.length-S,0,{key:`native-compaction-error`,turn:r.turn,kind:`custom`,content:(0,q.jsx)(`article`,{className:`message-row assistant outcome-row`,children:(0,q.jsx)($K,{label:t(`compactionFailed`),message:w.errorMessage})})})}return{rows:b,turns:p}},[ie,oe,ae,se,e.activityObserved,re,le,e.onResend,e.onEdit,e.onRegenerate,e.onFork,e.forkAvailable,e.forkPending,e.onInspectSubagent,e.snapshot.runtime.capabilities.subagents,e.snapshot.runtime.capabilities.workflows?.items,e.snapshot.preferences.expandThinking,e.snapshot.preferences.subagentResultDisplay,e.snapshot.preferences.bashToolDisplay,e.snapshot.preferences.fileMutationDisplay,e.snapshot.thinking?.level,e.thinkingDurations,e.snapshot.runtime.liveTools,A,j,M,te,P,N,t]),pe=zK(e.snapshot.selectedSession,fe,g),me=(0,K.useCallback)(async(t,r=!1)=>{if(_(),!g||!A||!j)return!1;let s=n.current,c=Array.from(s?.querySelectorAll(`[data-history-entry]`)??[]).find(e=>e.dataset.historyEntry===t);if(s&&c){o.current=null,ee(),i.current=!1,m(!0),E({sessionId:A,sessionPath:j,entryId:t});let e=Math.max(0,s.scrollTop+c.getBoundingClientRect().top-s.getBoundingClientRect().top-16),n=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return s.scrollTo?.({top:e,behavior:r||n?`instant`:`smooth`}),typeof s.scrollTo!=`function`&&(s.scrollTop=e),a.current=s.scrollTop,F(),c.focus({preventScroll:!0}),!0}if(r)return;if(!e.onNavigateToMessage)return!1;let l=new AbortController;h.current=l;let u=await e.onNavigateToMessage({sessionId:A,sessionPath:j,entryId:t},l.signal);if(!(l.signal.aborted||h.current!==l))return h.current=null,u},[_,F,ee,g,A,j,e.onNavigateToMessage]);(0,K.useLayoutEffect)(()=>{let t=n.current;if(!t||!O)return;let r=lK(O),s=v.current!==r,c=ne.current!==D.reset,u=s||c;ne.current=D.reset;let d=y.current!==e.scrollToBottom;if(y.current=e.scrollToBottom,S&&C!==w.current&&S.sessionId===O.id&&S.sessionPath===O.path){i.current=!1,b.current=null,v.current=r;return}if(d&&D.engaged){b.current=null,D.resetToLatest();return}let p=s&&!c&&!d?x.get(r)?.position:void 0,h=p?.key&&Array.from(t.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)).some(e=>e.dataset.historyEntry===p.key||e.dataset.historyMessage===p.key||e.dataset.historyResult===p.key),g=b.current??(p&&!p.pinned&&(!f.current||h)?{...p,scrollHeight:t.scrollHeight}:null);if(b.current=null,g&&(!u||p)&&!d){let e=Array.from(t.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)),n=g.key===void 0?void 0:e.find(e=>e.dataset.historyEntry===g.key)??e.reverse().find(e=>e.dataset.historyMessage===g.key||e.dataset.historyResult===g.key);i.current=!1,o.current=null,ee(),m(!0),v.current=r;let s=()=>{if(n&&!t.contains(n))return;b.current===g&&(b.current=null);let e=n?wq(n,t,g):g.scrollTop+t.scrollHeight-g.scrollHeight;typeof t.scrollTo==`function`?t.scrollTo({top:e,behavior:`instant`}):t.scrollTop=e,a.current=t.scrollTop,F()};if(n&&Cq(n,t)){b.current=g;let e=requestAnimationFrame(s);return()=>cancelAnimationFrame(e)}s();return}(u||d||i.current)&&(i.current=!0,m(!1),l(oe&&!u&&!d)),v.current=r},[O,le,D.reset,D.engaged,D.resetToLatest,e.scrollToBottom,x,S,C,l,F,ee,oe]),(0,K.useLayoutEffect)(()=>{let e=n.current;if(!e||!O||!S||C===w.current||S.sessionId!==O.id||S.sessionPath!==O.path)return;let t=Array.from(e.querySelectorAll(`[data-history-entry], [data-history-message], [data-history-result]`)),r=t.filter(e=>e.dataset.historyEntry===S.entryId||e.dataset.historyMessage===S.entryId||e.dataset.historyResult===S.entryId),s=S.restorePosition?.key?t.find(e=>e.dataset.historyEntry===S.restorePosition.key)??[...t].reverse().find(e=>e.dataset.historyMessage===S.restorePosition.key||e.dataset.historyResult===S.restorePosition.key):void 0,c=s??r.find(e=>e.classList.contains(`response`))??r.find(e=>e.dataset.historyMessage===S.entryId||e.dataset.historyResult===S.entryId)??r[0];if(!c)return;o.current=null,ee(),Cq(c,e);let l=()=>{if(!e.contains(c)||S.restorePosition&&w.current===C)return;let t=wq(c,e,s?S.restorePosition:void 0);e.scrollTo?.({top:t,behavior:`instant`}),typeof e.scrollTo!=`function`&&(e.scrollTop=t),a.current=e.scrollTop,S.restorePosition||c.focus({preventScroll:!0}),i.current=!1,F(),m(!0),S.restorePosition||E(S),w.current=C,uK(x,lK(O),{position:Sq(e,!1,O)})},u=document.querySelector(`dialog[open]`),d,f=()=>{d=requestAnimationFrame(l)};return u?u.addEventListener(`close`,f,{once:!0}):f(),()=>{u?.removeEventListener(`close`,f),d!==void 0&&cancelAnimationFrame(d)}},[O,S,C,x,ee,F]);let he=ie?se?`${t(`modelRetrying`)}${se.attempt&&se.maxAttempts?` (${se.attempt}/${se.maxAttempts})`:``}`:e.livePhase===`preparing`?t(`modelPreparing`):t(`modelRunning`):t(`backgroundSessionRunning`),ge=ie?0:ae?.liveTools.filter(e=>e.state===`running`).length??0,_e=ie&&e.liveActiveTurn!==void 0?e.liveActiveTurn:ae?ae.activeTurn:ie?e.snapshot.runtime.activeTurn:void 0,ve=oe&&_e&&O&&_e.sessionId===O.id&&_e.sessionPath===O?.path&&typeof _e.startedAt==`number`&&Number.isFinite(_e.startedAt)&&typeof _e.elapsedMs==`number`&&Number.isFinite(_e.elapsedMs)&&_e.elapsedMs>=0?_e:void 0,ye=!D.verifying&&ve&&(!re||ve.promptEntryId&&de.some(e=>e.promptEntryId===ve.promptEntryId))?ve:void 0,be=t=>{D.hasMore&&!D.error&&!D.verifying&&e.activityObserved!==!1&&e.resultExposureEnabled!==!1&&t.scrollTop<=Math.max(t.clientHeight,160)&&D.loadOlder()},xe=()=>{o.current=`up`,c(),i.current=!1,m(!0),D.retainReading()};return(0,q.jsxs)(`div`,{className:`transcript-surface`,children:[(0,q.jsx)(`div`,{ref:n,className:`conversation`,role:`log`,"aria-label":e.label??`Conversation`,tabIndex:0,onPointerDownCapture:e=>{e.target===e.currentTarget&&(o.current=`pointer`),S?.restorePosition&&(w.current=C)},onTouchStartCapture:e=>{u.current=e.touches[0]?.clientY,o.current=null,S?.restorePosition&&(w.current=C)},onTouchMove:e=>{let t=e.touches[0]?.clientY;t!==void 0&&u.current!==void 0&&t>u.current&&Tq(e.nativeEvent,e.currentTarget)?xe():t!==void 0&&u.current!==void 0&&t{let t=e.currentTarget,n=t.scrollTopa.current;a.current=t.scrollTop;let s=t.scrollTop+t.clientHeight>=t.scrollHeight-48;i.current=i.current?!n||s:r&&s&&(o.current===`down`||o.current===`pointer`),i.current||D.retainReading(),m(!i.current),F(),window.clearTimeout(d.current),d.current=window.setTimeout(()=>{!f.current&&A&&j&&t.isConnected&&uK(x,P,{position:Sq(t,i.current,k.current)})},200),n&&be(t)},onWheel:e=>{!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&e.deltaY>0&&Eq(e.nativeEvent,e.currentTarget,`down`)&&(o.current=`down`),S?.restorePosition&&(w.current=C),!e.defaultPrevented&&!e.ctrlKey&&!e.metaKey&&e.deltaY<0&&Tq(e.nativeEvent,e.currentTarget)&&(xe(),be(e.currentTarget))},onKeyDown:e=>{S?.restorePosition&&[`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `].includes(e.key)&&(w.current=C);let t=e.target;!e.defaultPrevented&&!e.altKey&&!e.metaKey&&(!e.ctrlKey||e.key===`End`)&&([`ArrowDown`,`PageDown`,`End`].includes(e.key)||e.key===` `&&!e.shiftKey)&&t instanceof HTMLElement&&!t.isContentEditable&&!t.closest(`input, textarea, select`)&&!(e.key===` `&&t.closest(`button, summary`))&&Eq(e.nativeEvent,e.currentTarget,`down`)&&(o.current=`down`),!e.defaultPrevented&&!e.altKey&&!e.metaKey&&(!e.ctrlKey||e.key===`Home`)&&([`ArrowUp`,`PageUp`,`Home`].includes(e.key)||e.key===` `&&e.shiftKey)&&t instanceof HTMLElement&&!t.isContentEditable&&!t.closest(`input, textarea, select`)&&!(e.key===` `&&t.closest(`button, summary`))&&Tq(e.nativeEvent,e.currentTarget)&&(xe(),be(e.currentTarget))},children:(0,q.jsxs)(`div`,{ref:r,className:`conversation-content`,children:[e.notice,O?.rerun&&e.onOpenOriginal&&(0,q.jsxs)(`div`,{className:`message-branch-origin`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void e.onOpenOriginal(O.rerun.source),children:[(0,q.jsx)(Ws,{"aria-hidden":`true`}),` `,t(`openOriginalConversation`)]}),(0,q.jsx)(`span`,{children:t(`messageRerunWorkspaceHint`)})]}),(D.hasMore||D.error||D.verifying)&&(0,q.jsxs)(`div`,{className:`conversation-history`,children:[D.error&&(0,q.jsx)(`p`,{role:`alert`,children:t(D.error)}),D.error&&D.error!==`historyChanged`&&(0,q.jsx)(`button`,{type:`button`,className:`secondary`,disabled:D.loading,onClick:()=>void D.loadOlder(),children:t(`retryAdmissionCheck`)}),D.loading&&(0,q.jsx)(`p`,{role:`status`,children:t(`historyLoading`)}),D.verifying&&!D.error&&!D.loading&&(0,q.jsx)(`p`,{role:`status`,children:t(`historyVerifying`)}),D.hasMore&&(0,q.jsx)(`span`,{children:t(`historyOmitted`,{count:O?.truncation.entriesOmitted??0})})]}),xq(de,oe&&(!re||!!ye)&&ae?.compaction?.state!==`running`,_e?.commandId,B,O,e.activityObserved===!1?void 0:ye,e.onReviewTurn,e.activityObserved!==!1,oe&&(!re||!!ye)),oe&&e.activityObserved!==!1&&ae?.compaction?.state!==`running`&&(0,q.jsxs)(`div`,{className:`conversation-execution-status sr-only`,role:`status`,"aria-live":`polite`,children:[(0,q.jsx)(`span`,{children:he}),ge>0&&(0,q.jsx)(`span`,{children:t(`observedSessionTools`,{count:ge})}),(ae?.pendingFollowUps??0)>0&&(0,q.jsx)(`span`,{children:t(`pendingFollowUpsHint`,{count:ae.pendingFollowUps})})]})]})}),(p||D.hasNewer)&&de.length>0&&(0,q.jsx)(V,{content:t(`jumpToLatest`),placement:`above`,children:(0,q.jsx)(`button`,{className:`jump-to-latest`,type:`button`,"aria-label":t(`jumpToLatest`),onClick:()=>{let e=n.current;e&&(c(),i.current=!0,m(!1),E(null),D.resetToLatest(),e.scrollTo({top:e.scrollHeight,behavior:window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches?`instant`:`smooth`}),queueMicrotask(()=>{n.current===e&&(Array.from(e.querySelectorAll(`.message-row[tabindex="-1"]`)).reverse().find(e=>!e.closest(`[hidden], details:not([open])`))??e).focus({preventScroll:!0})}))},children:oe&&e.activityObserved!==!1?(0,q.jsxs)(`span`,{className:`latest-activity-dots`,"aria-hidden":`true`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]}):(0,q.jsx)(ue,{"aria-hidden":`true`})})}),(0,q.jsx)(wK,{items:pe.items,viewport:n,enabled:g,onHidden:_,onRequestPreview:pe.requestPreview,readingHistory:p||D.hasNewer,onNavigate:me},L)]})}function Oq(e,t,n,r){let i=JSON.stringify([e,t.kind,t.id]),a=[],o=new Set,s=new Map,c=new Map,l=e=>({type:`toolCall`,id:e.toolId,name:e.name,arguments:e.argsPreview??`{}`}),u=(e,t)=>{a.push({type:`message`,id:e,timestamp:``,message:t})};for(let e of t.transcript){let t=JSON.stringify(e),n=c.get(t)??0;c.set(t,n+1);let i=e.id??`${t}:${n}`;if(e.kind===`user`)u(i,{role:`user`,content:e.text});else if(e.kind===`toolResult`){let t={role:`toolResult`,toolCallId:e.toolId,toolName:e.name,isError:e.isError,content:e.outputPreview??``};s.set(e.toolId,t),u(i,t)}else{let t=e.parts.map(e=>e.type===`toolCall`?(o.add(e.toolId),l(e)):e.type===`thinking`?{type:`thinking`,text:e.redacted?r:e.text}:e);u(i,{role:`assistant`,content:t.flatMap(e=>e.type===`text`?[e.text]:[]).join(` +`),parts:t,...t.some(e=>e.type===`toolCall`)?{stopReason:`toolUse`}:{}})}}let d=t.status===`running`,f=t.liveTools.map(e=>({call:l(e),result:s.get(e.toolId)??{role:`toolResult`,toolCallId:e.toolId,toolName:e.name,content:e.outputPreview??``,...e.done?{isError:e.isError===!0}:{}},state:s.has(e.toolId)?s.get(e.toolId).isError?`failed`:`returned`:e.done?e.isError?`failed`:`returned`:d?`running`:`unknown`})),p=[];return t.liveAssistant?.thinking&&p.push({type:`thinking`,text:t.liveAssistant.thinking}),t.liveAssistant?.text&&p.push({type:`text`,text:t.liveAssistant.text}),p.push(...f.filter(e=>!o.has(e.call.id)&&!s.has(e.call.id)).map(e=>e.call)),p.length&&u(t.nextEntryId??`live-assistant`,{role:`assistant`,content:t.liveAssistant?.text??``,parts:p}),t.finalText&&!a.some(e=>e.message?.role===`assistant`&&e.message.content.trim()===t.finalText.trim())&&u(`final-result`,{role:`assistant`,content:t.finalText,parts:[{type:`text`,text:t.finalText}]}),{protocolVersion:1,generatedAt:new Date(t.createdAt).toISOString(),cursor:0,preferences:n,sessions:[],workspaces:[],models:[],runtime:{status:`idle`,capabilities:{}},selectedSession:{id:i,path:``,cwd:t.cwd,entries:a,bytes:0,truncation:{truncated:t.truncated,entriesOmitted:t.omittedEntries,messagePartsOmitted:0,messagesTruncated:0,maxBytes:65536}},selectedExecution:{sessionId:i,sessionPath:``,status:d?`running`:t.status===`unknown`?`unknown`:`idle`,liveTools:f,liveToolsOmitted:0},truncation:{truncated:!1,sessionsOmitted:0,workspacesOmitted:0,modelsOmitted:0,maxBytes:0,bytes:0}}}function kq({sessionId:e,sessionPath:t,id:n,kind:r=`subagents`,activity:i,client:a,saved:o,liveAvailable:s,fullView:c,readOnlyNote:l=!0,active:u=!0,refreshRevision:d=0,onDetail:f,showModel:p=!0}){let{t:m}=W(),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(null),[y,b]=(0,K.useState)(!0),[x,S]=(0,K.useState)(0),[C,w]=(0,K.useState)(null),T=nu(WG,e=>e.snapshot?.preferences),E=(0,K.useMemo)(()=>h?Oq(e,h,T??{theme:`system`},m(`subagentThinkingRedacted`)):null,[e,h,T,m]),D=(0,K.useRef)(f);D.current=f,(0,K.useEffect)(()=>{if(!u)return;if(!s){b(!1),v(m(`subagentUnavailable`));return}let o=new AbortController,c,l=!1,d=async()=>{if(l||o.signal.aborted||document.visibilityState===`hidden`)return;l=!0;let s=i?.status===`running`;try{let i=await(r===`workflows`?a.workflowAgentDetail(e,n,o.signal,...t?[t]:[]):a.subagentDetail(e,n,o.signal,...t?[t]:[]));if(o.signal.aborted)return;if(i.sessionId!==e||i.detail.kind!==r||i.detail.id!==n)throw g(null),s=!1,Error(m(`inspectionChanged`));s=i.detail.status===`running`,g(i.detail),D.current?.(i.detail),v(null),w(new Date().toLocaleTimeString())}catch(e){if(o.signal.aborted)return;v(e instanceof ge&&[404,501].includes(e.status)?m(`subagentUnavailable`):e instanceof Error?e.message:m(`inspectionUnavailable`))}finally{l=!1,o.signal.aborted||(b(!1),s&&(c=setTimeout(()=>void d(),1e3)))}},f=()=>{document.visibilityState===`visible`&&(clearTimeout(c),d())};return document.addEventListener(`visibilitychange`,f),d(),()=>{o.abort(),clearTimeout(c),document.removeEventListener(`visibilitychange`,f)}},[u,a,e,t,n,r,i?.status,x,d,s,m]);let O=h?.outcome===`interrupted`?`interrupted`:h?.status===`unknown`?void 0:h?.status,k=cG(h?.spend),A=c?`h2`:`h3`;return(0,q.jsxs)(`section`,{className:`subagent-detail`,"aria-label":m(`subagentDetails`),hidden:!u,children:[(0,q.jsxs)(`header`,{className:`subagent-detail-heading`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`subagent-state ${O??`unknown`}`,children:O?m(`subagentState_${O}`):!h&&o?.state?`${m(`subagentRecordedState`)}: ${m(`subagentState_${o.state}`)}`:m(`unknownState`)}),h&&(h.status===`running`||h.settledAt!==void 0)&&(0,q.jsx)(`span`,{className:`subagent-duration`,children:VD(h.createdAt,h.settledAt)})]}),(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":m(`refreshStatus`),disabled:y||!s,onClick:()=>{b(!0),S(e=>e+1)},children:(0,q.jsx)(me,{})})]}),y&&!h&&(0,q.jsxs)(`div`,{className:`inspection-loading`,role:`status`,children:[(0,q.jsx)(`p`,{children:m(`inspectionLoading`)}),(0,q.jsxs)(`div`,{"aria-hidden":`true`,children:[(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{}),(0,q.jsx)(`i`,{})]})]}),_&&(0,q.jsxs)(`div`,{className:`inspection-warning`,role:`alert`,children:[(0,q.jsx)(`p`,{children:m(h?`subagentStale`:`subagentUnavailable`)}),_!==m(`subagentUnavailable`)&&(0,q.jsx)(`small`,{children:_})]}),h&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`div`,{className:`subagent-metadata`,children:[(0,q.jsx)(`code`,{children:h.id}),p&&h.model&&(0,q.jsx)(`span`,{children:h.model}),k&&(0,q.jsx)(`span`,{title:m(`subagentSpend`),children:k}),(0,q.jsx)(`span`,{title:h.cwd,children:h.cwd})]}),(0,q.jsxs)(`details`,{className:`subagent-task`,children:[(0,q.jsx)(`summary`,{children:m(`subagentTask`)}),(0,q.jsx)(`pre`,{children:h.prompt})]}),h.errorText&&(0,q.jsx)(`p`,{className:`inspection-warning`,role:`alert`,children:h.errorText}),(0,q.jsx)(`div`,{className:`subagent-conversation`,children:(0,q.jsx)($E.Provider,{value:null,children:E&&(0,q.jsx)(Dq,{snapshot:E,label:m(`subagentTranscript`),activityObserved:u&&!_,liveMessages:[],liveRunning:h.status===`running`,livePhase:h.status===`running`?`running`:`idle`,liveRetry:null,thinkingStarts:{},thinkingDurations:{},scrollToBottom:0,notice:(0,q.jsxs)(q.Fragment,{children:[h.truncated&&(0,q.jsx)(`p`,{className:`inspection-note`,children:m(h.omittedEntries>0?`subagentTruncated`:`subagentTextTruncated`,{count:h.omittedEntries})}),h.kind===`workflows`&&h.transcriptUnavailable?(0,q.jsx)(`p`,{className:`inspection-note`,children:m(`subagentTranscriptUnavailable`)}):!h.transcript.length&&!h.liveAssistant?.text&&!h.liveAssistant?.thinking&&!h.liveTools.length&&!h.finalText?(0,q.jsx)(`p`,{className:`inspection-note`,children:m(`subagentNoMessages`)}):null]})})})}),(l||C)&&(0,q.jsxs)(`p`,{className:`subagent-footnote`,children:[l&&m(`subagentReadOnly`),l&&C&&` · `,C]})]}),!h&&!y&&o&&(0,q.jsxs)(`section`,{className:`subagent-transcript`,"aria-label":m(`subagentSaved`),children:[(0,q.jsx)(A,{children:m(`subagentSaved`)}),(0,q.jsx)(`p`,{className:`inspection-note`,children:m(`subagentSavedHint`)}),o.state&&(0,q.jsxs)(`p`,{children:[m(`subagentRecordedState`),`: `,m(`subagentState_${o.state}`)]}),o.result&&(0,q.jsx)(vD,{children:o.result}),o.receipt&&(0,q.jsxs)(`details`,{className:`subagent-task`,children:[(0,q.jsx)(`summary`,{children:m(`subagentSpawnReceipt`)}),(0,q.jsx)(`pre`,{children:o.receipt})]})]})]})}function Aq({sessionId:e,sessionPath:t,initialId:n,initialKind:r=`subagents`,activity:i,workflows:a,observed:o=!0,records:s=[],liveAvailable:c=!0,onClose:l}){let{t:u,i18n:d}=W(),[f,p]=(0,K.useState)([]),m=(0,K.useRef)(null),h=(0,K.useRef)(0),[g,_]=(0,K.useState)(n?{id:n,kind:r}:null),[v,y]=(0,K.useState)(g),[b,x]=(0,K.useState)(null),S=g?.id;(0,K.useLayoutEffect)(()=>{!S&&m.current&&(m.current.scrollTop=h.current)},[S]);let C=(e,t=`subagents`)=>{let n=e?{id:e,kind:t}:null;n&&y(n),_(n)},[w,T]=(0,K.useState)(()=>window.matchMedia?.(`(max-width: 1100px)`).matches??!1);(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 1100px)`);if(!e)return;let t=()=>T(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let E=(0,K.useMemo)(()=>new de,[]),D=c?i?.items??[]:[],O=c?a?.items??[]:[],k=KD(D,s,O,o),[A,j]=(0,K.useState)(Date.now),M=k.some(e=>e.state===`running`);(0,K.useEffect)(()=>{if(!M||S)return;j(Date.now());let e=setInterval(()=>j(Date.now()),1e3);return()=>clearInterval(e)},[M,S]);let N=(i?.omitted??0)+O.reduce((e,t)=>e+(t.children?.omitted??0),0),P=k.find(e=>e.id===S&&e.kind===g?.kind),F=g?.kind===`subagents`?s.find(e=>e.id===S):void 0,I=b?.id===S&&b?.kind===g?.kind?b?.model:F?.model,ee=(0,K.useRef)(null),L=(0,K.useRef)(document.activeElement);(0,K.useEffect)(()=>{ee.current?.focus()},[g]),(0,K.useEffect)(()=>()=>{queueMicrotask(()=>{!document.querySelector(`.subagent-panel`)&&L.current instanceof HTMLElement&&L.current.isConnected&&L.current.focus()})},[]);let R=[{key:`active`,label:`subagentActiveGroup`,items:k.filter(e=>e.state===`running`),empty:`subagentNoneRunning`},{key:`done`,label:`subagentFinishedGroup`,items:k.filter(e=>e.state===`done`),empty:`subagentNoneFinished`},{key:`attention`,label:`subagentOtherGroup`,items:k.filter(e=>e.state===`error`||e.state===`interrupted`)},{key:`saved`,label:`subagentUnconfirmedGroup`,items:k.filter(e=>!e.state)}],te=e=>{let t=Math.max(0,Date.now()-e),n=t<36e5?`minute`:t<864e5?`hour`:`day`,r=n===`minute`?6e4:n===`hour`?36e5:864e5;return new Intl.RelativeTimeFormat(d.language,{numeric:`auto`}).format(-Math.floor(t/r),n)},z=w?`main`:`aside`,B=w?`h1`:`h2`,ne=w?`h2`:`h3`;return(0,q.jsxs)(z,{className:`subagent-panel`,"aria-label":u(`subagentDetails`),onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&!e.defaultPrevented&&(e.preventDefault(),S?C(null):l())},children:[(0,q.jsxs)(`header`,{className:`subagent-panel-heading`,children:[(0,q.jsxs)(`div`,{className:`subagent-breadcrumb`,children:[S&&(0,q.jsx)(`button`,{ref:ee,type:`button`,className:`icon-button`,"aria-label":u(`backToSubagents`),onClick:()=>C(null),children:(0,q.jsx)(Ko,{})}),S?(0,q.jsx)($W,{identity:`${e}:${S}`}):(0,q.jsx)($o,{"aria-hidden":`true`}),(0,q.jsx)(B,{title:P?.title||F?.title||S,children:S?P?.title||F?.title||S:u(`subagentDetails`)})]}),S&&I&&(0,q.jsx)(`span`,{className:`subagent-panel-model`,title:I,children:I.split(`/`).at(-1)}),(0,q.jsx)(`button`,{ref:S?void 0:ee,type:`button`,className:`icon-button`,"aria-label":u(`close`),onClick:l,children:(0,q.jsx)(je,{})})]}),v&&(0,q.jsx)(kq,{sessionId:e,sessionPath:t,id:v.id,kind:v.kind,activity:v.kind===`subagents`?D.find(e=>e.id===v.id):O.flatMap(e=>e.children?.items??[]).find(e=>e.id===v.id),client:E,saved:v.kind===`subagents`?s.find(e=>e.id===v.id):void 0,liveAvailable:c,fullView:w,showModel:!1,active:!!S,onDetail:e=>x(t=>t?.id===e.id&&t.kind===e.kind&&t.model===e.model?t:{id:e.id,kind:e.kind,model:e.model})},`${e}:${v.kind}:${v.id}`),!S&&(0,q.jsxs)(`nav`,{className:`subagent-list`,"aria-label":u(`subagentTasks`),ref:m,onScroll:e=>{h.current=e.currentTarget.scrollTop},children:[R.map(t=>{if(!t.items.length&&!t.empty)return null;let n=f.includes(t.key)?t.items:t.items.slice(0,t.key===`active`?4:10);return(0,q.jsxs)(`section`,{className:`subagent-list-group`,children:[(0,q.jsxs)(ne,{children:[u(t.label),(0,q.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,q.jsx)(`span`,{children:t.items.length})]}),!t.items.length&&t.empty&&(0,q.jsx)(`p`,{children:u(t.empty)}),(0,q.jsx)(`ul`,{className:`subagent-task-list`,children:n.map(t=>{let n=t.state??`unknown`,r=u(`subagentState_${n}`),i=t.state===`running`?t.taskPreview||u(`subagentProcessing`):t.state===`done`?void 0:r;return(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,className:`subagent-task-row ${n}`,"aria-label":`${t.title||t.id} · ${r}${t.taskPreview&&i?` · ${i}`:``}`,onClick:()=>C(t.id,t.kind),children:[(0,q.jsx)($W,{identity:`${e}:${t.id}`}),(n===`running`||n===`done`)&&(0,q.jsx)(`span`,{className:`subagent-task-status`,children:r}),(0,q.jsx)(`span`,{className:`subagent-task-title`,title:t.title||t.id,children:t.title||t.id}),t.state===`running`?(0,q.jsx)(`span`,{className:`subagent-task-end`,children:VD(t.createdAt,A)}):t.timestamp?(0,q.jsx)(`time`,{className:`subagent-task-end`,dateTime:new Date(t.timestamp).toISOString(),title:new Date(t.timestamp).toLocaleString(d.language),children:te(t.timestamp)}):null,i&&(0,q.jsx)(`span`,{className:`subagent-task-description`,children:i})]})},`${t.kind}:${t.id}`)})}),n.lengthp(e=>[...e,t.key]),children:u(`subagentShowMore`,{count:t.items.length-n.length})})]},t.key)}),N>0&&(0,q.jsx)(`p`,{children:u(`subagentListTruncated`,{count:N})}),!!a?.omitted&&(0,q.jsx)(`p`,{children:u(`subagentWorkflowsTruncated`,{count:a?.omitted})})]})]})}var jq=`openpi:subagent-panel:v1`;function Mq(){try{let e=JSON.parse(sessionStorage.getItem(jq)??`null`);if(!e||typeof e!=`object`)return null;let{sessionId:t,sessionPath:n}=e;return typeof t!=`string`||!t||t.length>160||typeof n!=`string`||!n||n.length>4096?null:{sessionId:t,sessionPath:n,navigation:0}}catch{return null}}function Nq(e){try{e?sessionStorage.setItem(jq,JSON.stringify({sessionId:e.sessionId,sessionPath:e.sessionPath})):sessionStorage.removeItem(jq)}catch{}}function Pq({text:e,code:t=!1}){let{t:n}=W(),[r,i]=(0,K.useState)(!0),[a,o]=(0,K.useState)(!1),[s,c]=(0,K.useState)(``);return(0,K.useEffect)(()=>{let n=!1;return c(``),o(!1),t&&e.length<=1e5&&Ee(async()=>{let{default:e}=await import(`./app-common.js`);return{default:e}},__vite__mapDeps([3,1])).then(({default:t})=>{let r=t.highlight(e,{language:`javascript`,ignoreIllegals:!0}).value;n||c(Me.sanitize(r,{ALLOWED_TAGS:[`span`],ALLOWED_ATTR:[`class`]}))}).catch(()=>{}),()=>{n=!0}},[t,e]),(0,q.jsxs)(`div`,{className:`trajectory-payload`,"data-wrap":r,children:[(0,q.jsxs)(`div`,{className:`trajectory-payload-actions`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>i(!r),children:n(`trajectoryWrap`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{td(e).then(o)},children:n(a?`trajectoryCopied`:`trajectoryCopy`)})]}),(0,q.jsx)(`pre`,{children:s?(0,q.jsx)(`code`,{dangerouslySetInnerHTML:{__html:s}}):(0,q.jsx)(`code`,{children:e})})]})}function Fq(e){return e.map((e,t)=>({key:e.key,start:t,end:t+1,lane:e.kind===`call`||e.kind===`result`?2:+(e.kind===`assistant`),error:e.outcome===`error`||e.kind===`assistant`&&(e.message?.stopReason===`error`||e.message?.stopReason===`aborted`)}))}function Iq(e,t){return t===null?null:new Set(Fq(e).filter(e=>e.start<=t.end&&e.end>=t.start).map(e=>e.key))}function Lq(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&(n.kind!==`event`||n.message||n.input!==void 0||n.result))return n}return e.at(-1)}function Rq(e){let t=[];for(let n of e){(n.kind===`user`||!t.length)&&t.push({key:n.key,...n.kind===`user`?{prompt:n}:{},runs:[]});let e=t.at(-1),r=e.runs.at(-1);n.kind===`event`&&r?.[0]?.kind===`event`?r.push(n):e.runs.push([n])}return t}function zq(e){let t=new Map(e.map((e,t)=>[e.id,t])),n=new Map,r=new Map,i=new Map;for(let a of e){let e=`message`in a?a.message:void 0;for(let t of e?.parts??[])t.type===`toolCall`&&t.id&&r.set(t.id,(r.get(t.id)??0)+1);if(e?.role===`toolResult`&&e.toolCallId){let r=i.get(e.toolCallId)??[];r.push(e),n.set(e,t.get(a.id)??-1),i.set(e.toolCallId,r)}}let a=new Set,o=[];for(let s of e){let e=`message`in s?s.message:void 0;if(!e){o.push({key:s.id,kind:`event`,title:s.type,timestamp:s.timestamp});continue}if(e.role!==`toolResult`){(e.role!==`assistant`||e.content||!e.parts?.length||e.parts?.some(e=>e.type!==`toolCall`))&&o.push({key:s.id,kind:e.role===`user`?`user`:e.role===`assistant`?`assistant`:`event`,title:e.customType||e.role||s.type,timestamp:s.timestamp,message:e});for(let[c,l]of(e.parts??[]).entries()){if(l.type!==`toolCall`)continue;let u=l.id?i.get(l.id):void 0,d=l.id&&r.get(l.id)===1&&u?.length===1&&u[0]?.toolName===l.name&&!l.id.includes(`[truncated]`)&&(n.get(u[0])??-1)>(t.get(s.id)??-1)?u[0]:void 0;d&&a.add(d),o.push({key:`${s.id}:call:${c}`,kind:`call`,title:l.name,timestamp:s.timestamp,callId:l.id,input:l.arguments,message:e,result:d,outcome:d?.isError===!0?`error`:d?.isError===!1?`returned`:`unknown`})}}}let s=new Map(o.map(e=>[e.key,t.get(e.key)??-1]));for(let n of e){let e=`message`in n?n.message:void 0;e?.role===`toolResult`&&!a.has(e)&&(o.push({key:n.id,kind:`result`,title:e.toolName||`toolResult`,timestamp:n.timestamp,callId:e.toolCallId,result:e,outcome:e.isError===!0?`error`:e.isError===!1?`returned`:`unknown`}),s.set(n.id,t.get(n.id)??0));for(let[r,i]of(e?.parts??[]).entries())i.type===`toolCall`&&s.set(`${n.id}:call:${r}`,t.get(n.id)??0)}return o.sort((e,t)=>(s.get(e.key)??0)-(s.get(t.key)??0)),o}function Bq(e,t=[]){let n=zq(e),r=new Set(n.map(e=>e.key)),i=e.flatMap(e=>e.message?.role===`assistant`&&!r.has(e.id)?[{key:e.id,kind:`assistant`,title:`assistant`,timestamp:e.timestamp,message:e.message}]:[]),a=new Map(e.map((e,t)=>[e.id,t])),o=new Map,s=new Map;for(let t of e)for(let[e,n]of(t.message?.parts??[]).entries())n.type===`toolCall`&&(o.set(`${t.id}:call:${e}`,t.id),n.id&&s.set(n.id,(s.get(n.id)??0)+1));return[...n,...i].sort((e,t)=>{let n=e=>a.get(o.get(e.key)??e.key)??-1;return n(e)-n(t)||Number(e.kind===`call`)-Number(t.kind===`call`)}).flatMap(e=>{if(e.kind!==`call`||e.title!==`codemode`)return[e];let n=e.message?.parts?.find(t=>t.type===`toolCall`&&t.id===e.callId);return n?.type!==`toolCall`||!n.id||s.get(n.id)!==1?[e]:[e,...($G(n,e.result,t)?.children??[]).map(t=>{let n=e.result?.nestedCalls?.calls.find(e=>e.call.id===t.call.id)?.durationMs;return{key:`${e.key}:nested:${t.call.id}`,kind:`call`,title:t.call.name,parentKey:e.key,callId:t.call.id,input:t.call.arguments,result:t.result,missingOutput:t.outputMissing,error:t.error,state:t.state,outcome:t.state===`returned`?`returned`:[`failed`,`cancelled`,`timed_out`].includes(t.state)?`error`:`unknown`,...n===void 0?{}:{durationMs:n}}})]})}function Vq(e){return e===void 0||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(2)} s`}function Hq({nodes:e,selectedKey:t,range:n,onSelect:r,onRange:i}){let{t:a}=W(),o=Fq(e),s=(0,K.useRef)(null),c=Math.max(1,o.length);function l(e){let t=e.currentTarget.getBoundingClientRect();return Math.max(0,Math.min(c,(e.clientX-t.left)/Math.max(1,t.width)*c))}return(0,q.jsx)(`section`,{className:`trajectory-overview`,"aria-label":a(`trajectoryOverview`),children:(0,q.jsxs)(`div`,{className:`trajectory-overview-track`,children:[(0,q.jsxs)(`div`,{className:`trajectory-lane-labels`,children:[(0,q.jsx)(`span`,{children:a(`trajectoryContextLane`)}),(0,q.jsx)(`span`,{children:a(`trajectoryModelLane`)}),(0,q.jsx)(`span`,{children:a(`trajectoryToolLane`)})]}),(0,q.jsxs)(`svg`,{viewBox:`0 0 ${c} 3`,preserveAspectRatio:`none`,onPointerDown:e=>{e.button===0&&(s.current={start:l(e),key:e.target.getAttribute(`data-record-key`)},e.currentTarget.setPointerCapture(e.pointerId))},onPointerUp:e=>{let t=s.current;if(s.current=null,t===null)return;let n=t.start,a=l(e);Math.abs(a-n)>c/100?i({start:Math.min(n,a),end:Math.max(n,a)}):t.key&&r(t.key)},onPointerCancel:()=>{s.current=null},children:[(0,q.jsx)(`title`,{children:a(`trajectoryOverview`)}),[0,1,2].map(e=>(0,q.jsx)(`line`,{x1:`0`,x2:c,y1:e+.5,y2:e+.5},e)),o.map((n,i)=>(0,q.jsx)(`rect`,{x:n.start+.08,y:n.lane+.39,width:.84,height:.22,rx:.04,className:`${n.error?`error`:``} ${t===n.key?`selected`:``}`,"data-lane":n.lane,"data-kind":e[i].kind,"data-record-key":n.key,role:`button`,tabIndex:0,"aria-label":a(`trajectorySelectRecord`,{number:i+1,name:e[i].title}),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r(n.key))},children:(0,q.jsx)(`title`,{children:`${i+1} · ${e[i].title} · ${Vq(e[i].durationMs)}`})},n.key)),n&&(0,q.jsx)(`rect`,{className:`trajectory-range`,x:n.start,y:`0`,width:n.end-n.start,height:`3`})]}),n&&(0,q.jsx)(`button`,{type:`button`,className:`trajectory-clear-range`,onClick:()=>i(null),children:a(`trajectoryClearRange`)})]})})}var Uq=[];function Wq(e){return e.kind===`call`||e.kind===`result`?``:(e.message?.parts??[]).filter(e=>e.type===`thinking`).map(e=>e.text).join(` -`)}function Bq(e,t){return e.kind===`event`?t(`trajectoryEvent_${e.title}`,{defaultValue:e.title}):e.kind===`call`||e.kind===`result`?e.title:e.kind===`assistant`&&!e.message?.content&&zq(e)?t(`trajectoryReasoningTitle`):t(`trajectory_${e.kind}`)}function Vq(e){if(e.input)try{let t=JSON.parse(e.input);if(t&&typeof t==`object`&&!Array.isArray(t)){let n=pK(e.title,t);if(n)return n}}catch{}return e.input||e.message?.content||e.message?.errorMessage||e.error||zq(e)||e.result?.content||``}function Hq({node:e}){let{t}=W();if(!e.outcome)return null;let n=e.state??(e.result?md({type:`toolCall`,name:e.title,id:e.callId,arguments:e.input??``},e.result).state:void 0),r=t(n===`cancelled`||n===`timed_out`||n===`running`?`toolState_${n}`:`trajectory_${e.outcome}`),i=n===`running`||n===`timed_out`?vs:e.outcome===`returned`?rs:e.outcome===`error`?je:fs;return(0,q.jsxs)(`span`,{className:`trajectory-outcome ${e.outcome}`,title:r,children:[(0,q.jsx)(i,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:r})]})}function Uq({label:e,value:t}){return(0,q.jsxs)(`section`,{className:`trajectory-evidence`,children:[(0,q.jsx)(`h3`,{children:e}),(0,q.jsx)(kq,{text:t})]})}function Wq({node:e,number:t,onClose:n}){let{t:r,i18n:i}=W(),a=(0,K.useId)(),[o,s]=(0,K.useState)(`summary`),c=e.result,l=e.message,u=zq(e),d=e.kind===`call`||e.kind===`result`,f=[{key:`summary`,label:r(`trajectorySummary`)},...e.input===void 0?[]:[{key:`input`,label:r(`trajectoryInputTab`)}],...d?[{key:`output`,label:r(`trajectoryResultTab`)}]:[],{key:`timing`,label:r(`trajectoryTimingTab`)},...!d&&l?.role===`assistant`?[{key:`usage`,label:r(`trajectoryUsageTab`)}]:[]],p=e.timestamp?new Date(e.timestamp):null,m=p&&Number.isFinite(p.getTime())?p.toLocaleString(i.language,{hour12:!1}):e.timestamp,h=(0,q.jsxs)(q.Fragment,{children:[c?(0,q.jsx)(Uq,{label:r(`trajectoryOutput`),value:c.content||r(`noOutput`)}):(0,q.jsx)(`p`,{className:`trajectory-missing`,children:r(e.missingOutput?`trajectoryNestedOutputMissing`:`trajectoryMissingResult`)}),o===`output`&&c?.details!==void 0&&(0,q.jsxs)(`details`,{className:`trajectory-disclosure`,children:[(0,q.jsx)(`summary`,{children:r(`trajectoryStructured`)}),(0,q.jsx)(`pre`,{children:JSON.stringify(c.details,null,2)})]})]}),g=l&&(0,q.jsxs)(q.Fragment,{children:[l.content&&(0,q.jsx)(Uq,{label:r(`trajectoryRecordedContent`),value:l.content}),u&&(0,q.jsxs)(`details`,{className:`trajectory-disclosure trajectory-reasoning`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(Zs,{"aria-hidden":`true`}),r(`trajectoryThinking`)]}),(0,q.jsx)(`pre`,{children:u})]}),!l.content&&!u&&(0,q.jsx)(`p`,{children:r(`noOutput`)})]});return(0,q.jsxs)(`section`,{className:`trajectory-inspector`,"aria-label":r(`trajectoryDetails`),tabIndex:0,children:[(0,q.jsxs)(`header`,{className:`trajectory-inspector-heading`,children:[(0,q.jsx)(`span`,{className:`trajectory-role ${e.kind}`,children:r(`trajectoryRole_${e.kind}`)}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{children:r(`trajectoryRecordNumber`,{number:t})}),(0,q.jsx)(`h2`,{id:`${a}-title`,children:Bq(e,r)})]}),(0,q.jsx)(`button`,{type:`button`,className:`trajectory-inspector-close`,"aria-label":r(`close`),onClick:n,children:(0,q.jsx)(je,{"aria-hidden":`true`})})]}),e.outcome&&(0,q.jsx)(Hq,{node:e}),e.error&&(0,q.jsx)(`p`,{className:`trajectory-failure`,children:e.error}),l?.errorMessage&&(0,q.jsx)(`p`,{className:`trajectory-failure`,children:l.errorMessage}),f.length>1&&(0,q.jsx)(`div`,{className:`trajectory-tabs`,role:`tablist`,"aria-label":r(`trajectoryDetails`),onKeyDown:e=>{let t=f.findIndex(e=>e.key===o),n=e.key===`ArrowRight`?(t+1)%f.length:e.key===`ArrowLeft`?(t+f.length-1)%f.length:e.key===`Home`?0:e.key===`End`?f.length-1:void 0;n!==void 0&&(e.preventDefault(),s(f[n].key),e.currentTarget.querySelectorAll(`button`)[n]?.focus())},children:f.map(e=>(0,q.jsx)(`button`,{type:`button`,role:`tab`,id:`${a}-${e.key}`,"aria-controls":`${a}-panel`,"aria-selected":o===e.key,tabIndex:o===e.key?0:-1,onClick:()=>s(e.key),children:e.label},e.key))}),(0,q.jsxs)(`section`,{className:`trajectory-detail-content`,role:f.length>1?`tabpanel`:void 0,id:`${a}-panel`,"aria-labelledby":f.length>1?`${a}-${o}`:`${a}-title`,children:[(l?.truncation||c?.truncation)&&(0,q.jsx)(`p`,{className:`trajectory-warning`,children:r(`trajectoryEvidenceTruncated`)}),(o===`summary`||o===`input`)&&e.input!==void 0&&(0,q.jsx)(Kq,{node:e}),(o===`summary`||o===`output`)&&d&&h,!d&&o===`summary`&&g,o===`timing`&&(0,q.jsxs)(`dl`,{className:`trajectory-facts`,children:[(0,q.jsx)(`dt`,{children:r(`trajectoryDurationLabel`)}),(0,q.jsx)(`dd`,{children:Iq(e.durationMs)}),(0,q.jsx)(`dt`,{children:r(`trajectoryTimingSource`)}),(0,q.jsx)(`dd`,{children:r(e.durationMs===void 0?`trajectoryTimingUnknown`:`trajectoryTimingNative`)}),(0,q.jsx)(`dt`,{children:r(`trajectoryTTFT`)}),(0,q.jsx)(`dd`,{children:r(`trajectoryNotRecorded`)}),(0,q.jsx)(`dt`,{children:r(`trajectoryGenerationTime`)}),(0,q.jsx)(`dd`,{children:r(`trajectoryNotRecorded`)}),(0,q.jsx)(`dt`,{children:r(`trajectoryThroughput`)}),(0,q.jsx)(`dd`,{children:r(`trajectoryNotRecorded`)})]}),o===`usage`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Gq,{message:l}),(0,q.jsxs)(`dl`,{className:`trajectory-facts`,children:[(0,q.jsx)(`dt`,{children:r(`trajectoryProvider`)}),(0,q.jsx)(`dd`,{children:l?.provider??`—`}),(0,q.jsx)(`dt`,{children:r(`trajectoryModel`)}),(0,q.jsx)(`dd`,{children:l?.model??`—`})]})]}),e.kind===`event`&&!l&&o===`summary`&&(0,q.jsx)(`p`,{className:`trajectory-missing`,children:r(`trajectoryEventOnly`)}),(0,q.jsxs)(`details`,{className:`trajectory-disclosure trajectory-metadata`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(Js,{"aria-hidden":`true`}),r(`trajectoryRecordInfo`)]}),(0,q.jsxs)(`dl`,{children:[m&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`trajectoryRecordedAt`)}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`time`,{dateTime:e.timestamp,children:m})})]}),e.callId&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`trajectoryCallId`)}),(0,q.jsx)(`dd`,{children:e.callId})]}),(0,q.jsx)(`dt`,{children:r(`trajectoryRecordId`)}),(0,q.jsx)(`dd`,{children:e.key}),e.kind===`event`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`trajectoryEventType`)}),(0,q.jsx)(`dd`,{children:e.title})]})]})]})]})]})}function Gq({message:e}){let{t}=W(),n=e?.usage;return n?(0,q.jsx)(`dl`,{className:`trajectory-facts`,children:[`input`,`cacheRead`,`cacheWrite`,`output`].map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`trajectoryUsage_${e}`)}),(0,q.jsx)(`dd`,{children:n[e]?.toLocaleString()??`—`})]},e))}):(0,q.jsx)(`p`,{className:`trajectory-missing`,children:t(`trajectoryUsageUnknown`)})}function Kq({node:e}){let{t}=W(),[n,r]=(0,K.useState)(!1),i;if(e.title===`codemode`)try{let t=JSON.parse(e.input??``);t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`&&(i=t.code)}catch{}return(0,q.jsxs)(`section`,{className:`trajectory-evidence`,children:[(0,q.jsxs)(`h3`,{children:[t(i?`trajectoryCode`:`trajectoryArguments`),i&&(0,q.jsx)(`button`,{type:`button`,"aria-pressed":n,onClick:()=>r(!n),children:t(`trajectoryRawArguments`)})]}),(0,q.jsx)(kq,{text:i&&!n?i:e.input??``,code:!!(i&&!n)})]})}var qq=(0,K.memo)(function({snapshot:e,running:t}){let{t:n}=W(),r=(0,K.useRef)(null),i=(0,K.useRef)(!0),a=(0,K.useRef)(!1),o=(0,K.useRef)(null),s=HK(e.selectedSession,{beforePrepend:()=>{r.current&&(o.current={height:r.current.scrollHeight,top:r.current.scrollTop})}}),c=s.session?.entries??Rq,l=e.currentSessionPath===e.selectedSession?.path?e.runtime.liveTools:void 0,u=(0,K.useMemo)(()=>Fq(c,l),[c,l]),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(``),[_,v]=(0,K.useState)(50),[y,b]=(0,K.useState)(new Set),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!0),[T,E]=(0,K.useState)(null),D=(0,K.useMemo)(()=>{let e=h.trim().toLocaleLowerCase();return e?u.filter(t=>[Bq(t,n),t.title,t.callId,t.input,Vq(t),t.result?.content,zq(t)].some(t=>t?.toLocaleLowerCase().includes(e))):u},[u,h,n]),O=D.findIndex(e=>e.key===d),k=Math.min(Math.max(0,D.length-_),O<0?D.length:O),A=D.slice(k,k+_),j=T?.keys.length===A.length&&T.keys.every((e,t)=>e===A[t]?.key)?T:null,M=(0,K.useMemo)(()=>jq(A,j),[A,j]),N=A.find(e=>e.key===d)??Mq(A);(0,K.useLayoutEffect)(()=>{let e=o.current;e&&r.current&&(r.current.scrollTop=e.top+r.current.scrollHeight-e.height,o.current=null)}),(0,K.useEffect)(()=>{N?.key&&(!i.current&&!a.current||(a.current=!1,r.current?.querySelector(`.trajectory-record[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`})))},[N?.key]),(0,K.useEffect)(()=>{p&&r.current?.querySelector(`.trajectory-record[aria-pressed="true"]`)?.focus()},[p]);let P=(0,K.useMemo)(()=>Nq(u),[u]),F=new Set(A.map(e=>e.key)),I=P.flatMap(e=>{let t=e.runs.map(e=>e.filter(e=>F.has(e.key))).filter(e=>e.length>0);return t.length?[{...e,runs:t}]:[]}),ee=new Map(u.map((e,t)=>[e.key,t+1])),L=s.session?.truncation,R=u.filter(e=>e.kind===`assistant`),te=u.filter(e=>e.kind===`call`),z=c.flatMap(e=>e.turnTiming?[e.turnTiming]:[]).at(-1);function B(e){let t=Vq(e);return(0,q.jsx)(`li`,{"data-nested":!!e.parentKey||void 0,"data-outside-range":M&&!M.has(e.key)||void 0,hidden:x&&e.kind===`call`,children:(0,q.jsxs)(`button`,{type:`button`,"aria-pressed":e.key===N?.key,onClick:()=>{a.current=!0,f(e.key),m(!1)},className:`trajectory-record ${e.kind}`,"data-response-error":e.kind===`assistant`&&(e.message?.stopReason===`error`||e.message?.stopReason===`aborted`)||void 0,title:PD(t,220),children:[(0,q.jsx)(`span`,{className:`trajectory-row-number`,children:ee.get(e.key)}),(0,q.jsx)(`span`,{className:`trajectory-role ${e.kind}`,children:n(`trajectoryRole_${e.kind}`)}),(0,q.jsxs)(`span`,{className:`trajectory-record-main`,children:[(0,q.jsx)(`span`,{className:`trajectory-record-title`,children:(0,q.jsx)(`strong`,{children:Bq(e,n)})}),t&&(0,q.jsx)(`span`,{className:`trajectory-preview`,children:PD(t,180)})]}),(0,q.jsxs)(`span`,{className:`trajectory-record-end`,children:[(0,q.jsx)(Hq,{node:e}),C&&e.durationMs!==void 0&&(0,q.jsx)(`span`,{className:`trajectory-row-duration`,children:Iq(e.durationMs)}),(0,q.jsx)(`time`,{dateTime:e.timestamp,title:n(`trajectoryRecordedAt`),children:FD(e.timestamp)})]})]})},e.key)}return(0,q.jsxs)(`section`,{className:`conversation trajectory`,"aria-label":n(`trajectory`),children:[(0,q.jsxs)(`header`,{className:`trajectory-toolbar`,children:[(0,q.jsxs)(`div`,{className:`trajectory-context`,children:[(0,q.jsx)(nc,{"aria-hidden":`true`}),(0,q.jsxs)(`button`,{type:`button`,"aria-pressed":C,onClick:()=>w(!C),children:[(0,q.jsx)(vs,{"aria-hidden":`true`}),n(`trajectoryDurationLabel`)]}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":y.size>0,onClick:()=>b(y.size?new Set:new Set(P.map(e=>e.key))),children:n(`trajectoryFoldTurns`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":x,onClick:()=>S(!x),children:n(`trajectoryFoldCalls`)}),(0,q.jsx)(`span`,{className:`trajectory-count`,children:n(h.trim()?`trajectoryMatches`:`trajectoryRecordCount`,{count:D.length})}),(0,q.jsxs)(`details`,{className:`trajectory-scope`,children:[(0,q.jsx)(`summary`,{"aria-label":n(`trajectoryScope`),title:n(`trajectoryScope`),children:(0,q.jsx)(Js,{"aria-hidden":`true`})}),(0,q.jsxs)(`div`,{className:`trajectory-scope-popover`,children:[(0,q.jsx)(`p`,{children:n(`trajectoryScope`)}),(0,q.jsxs)(`dl`,{"aria-label":n(`trajectoryMetrics`),children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:n(`trajectoryModelResponses`)}),(0,q.jsx)(`dd`,{children:n(`trajectoryRequestCount`,{count:R.length})})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:n(`trajectoryToolCalls`)}),(0,q.jsx)(`dd`,{children:n(`trajectoryToolCount`,{count:te.length})})]}),z&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:n(`trajectoryLastTurn`)}),(0,q.jsx)(`dd`,{children:Iq(z.elapsedMs)})]})]})]})]})]}),(0,q.jsxs)(`label`,{className:`trajectory-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":n(`trajectorySearch`),placeholder:n(`trajectorySearch`),value:h,onChange:e=>g(e.currentTarget.value)})]})]}),u.length>0&&(0,q.jsx)(Lq,{nodes:A,selectedKey:N?.key,range:j,onRange:e=>E(e?{...e,keys:A.map(e=>e.key)}:null),onSelect:e=>{a.current=!0,f(e),m(!1),b(new Set),S(!1)}}),t&&(0,q.jsx)(`p`,{className:`trajectory-live`,role:`status`,children:n(`trajectoryRunning`)}),L?.truncated&&(0,q.jsx)(`p`,{className:`trajectory-warning`,children:n(`trajectoryTruncated`,{entries:L.entriesOmitted,parts:L.messagePartsOmitted,messages:L.messagesTruncated})}),A.length?(0,q.jsxs)(`div`,{className:`trajectory-body`,"data-inspector-open":N&&!p||void 0,children:[(0,q.jsxs)(`div`,{className:`trajectory-ledger`,"data-range":!!j||void 0,ref:r,onScroll:e=>{let t=e.currentTarget;i.current=t.scrollHeight-t.scrollTop-t.clientHeight<40},children:[k+_{a.current=!0,f(null),m(!1),v(50)},children:n(`trajectoryLatestRecords`)}),s.hasMore&&(0,q.jsx)(`button`,{type:`button`,className:`trajectory-load`,disabled:s.loading||s.verifying,onClick:()=>{s.loadOlder(),v(e=>e+50)},children:n(s.loading?`trajectoryHistoryLoading`:`trajectoryLoadHistory`)}),s.error&&(0,q.jsx)(`p`,{className:`trajectory-warning`,role:`alert`,children:n(s.error)}),k>0&&(0,q.jsx)(`button`,{type:`button`,className:`trajectory-load`,onClick:()=>v(e=>e+50),children:n(`trajectoryEarlier`,{count:k})}),I.map((e,t)=>{let r=!y.has(e.key);return(0,q.jsxs)(`section`,{className:`trajectory-group`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`trajectory-group-heading`,"aria-expanded":r,onClick:()=>b(t=>{let n=new Set(t);return r?n.add(e.key):n.delete(e.key),n}),children:[(0,q.jsx)(os,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`trajectory-group-label`,children:[(0,q.jsx)(`span`,{className:`trajectory-turn-number`,children:n(`trajectoryTurn`,{number:t+1})}),(0,q.jsx)(`span`,{className:`trajectory-group-name`,children:e.prompt?r&&!h.trim()?n(`trajectoryConversationGroup`):PD(e.prompt.message?.content||n(`trajectory_user`),80):n(`trajectoryEarlierGroup`)})]})]}),r&&(0,q.jsx)(`ol`,{children:e.runs.map(e=>e.length===1?B(e[0]):(0,q.jsx)(`li`,{className:`trajectory-event-group`,children:(0,q.jsxs)(`details`,{open:e.some(e=>e.key===N?.key)||!!h.trim(),children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(kc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:n(`trajectoryEventCount`,{count:e.length})}),(0,q.jsx)(os,{"aria-hidden":`true`})]}),(0,q.jsx)(`ol`,{children:e.map(B)})]})},e[0].key))})]},e.key)})]}),N&&!p&&(0,q.jsx)(Wq,{node:N,number:ee.get(N.key),onClose:()=>m(!0)},N.key)]}):(0,q.jsxs)(`div`,{className:`trajectory-empty`,children:[(0,q.jsx)(nc,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:n(h.trim()?`trajectoryNoMatches`:`trajectoryEmpty`)})]})]})});function Jq(){(0,K.useEffect)(()=>{let e=new de,t=new AbortController,n,r=async r=>{let i=r.data;if(!(r.source!==window||r.origin!==location.origin||i?.source!==`openpi-browser-extension`||i.type!==`connector-hello`||typeof i.bridgeId!=`string`||!/^[\da-f-]{36}$/.test(i.bridgeId)||!vj(i.browser)||n===i.bridgeId)){n=i.bridgeId;try{let r=await e.request(`/api/browser/connections`,{method:`POST`,signal:t.signal,body:JSON.stringify({browser:i.browser,profileId:i.profileId,extensionId:i.extensionId,extensionOrigin:i.extensionOrigin,version:i.version})});!t.signal.aborted&&n===i.bridgeId&&window.postMessage({source:`openpi-browser-ui`,type:`connector-authorize`,...r},location.origin)}catch{n===i.bridgeId&&(n=void 0)}}},i=()=>window.postMessage({source:`openpi-browser-ui`,type:`connector-probe`},location.origin);window.addEventListener(`message`,r),i();let a=setInterval(i,5e3);return()=>{t.abort(),clearInterval(a),window.removeEventListener(`message`,r)}},[])}function Yq(e,t){let n=e.trim();if(!n||n.length>16384)return null;let r=/^[a-z][a-z\d+.-]*:\/\//iu.test(n);try{let e=new URL(r?n:`https://${n}`);return!r&&(e.hostname===`localhost`||e.hostname.endsWith(`.localhost`)||e.hostname===`[::1]`||/^127(?:\.\d{1,3}){3}$/u.test(e.hostname))&&(e=new URL(`http://${n}`)),![`http:`,`https:`].includes(e.protocol)||e.username||e.password||e.origin===t?null:e.href}catch{return null}}function Xq(){return document.documentElement.dataset.openpiBrowserExtension===`ready`?[...document.querySelectorAll(`iframe[data-openpi-browser-document]`)].map(e=>({id:e.dataset.openpiBrowserPage,document:e.dataset.openpiBrowserDocument,url:e.dataset.openpiBrowserUrl,title:e.dataset.openpiBrowserTitle||``})):[]}function Zq(e,t,n){let r=(0,K.useRef)(n),i=(0,K.useRef)(0);r.current=n,(0,K.useEffect)(()=>{if(!e||!t)return;let n=new de,a=new AbortController,o,s,c,l=e=>window.postMessage({source:`openpi-browser-ui`,...e},location.origin),u=()=>{c?.(),c=void 0,s&&l({type:`control-cancel`,requestId:s}),s=void 0},d=(r,i,o)=>{r===s&&(c?.(),c=void 0,s=void 0,n.request(`/api/browser/control`,{method:`POST`,signal:a.signal,body:JSON.stringify({sessionId:e,sessionPath:t,requestId:r,result:i,error:o,pages:Xq()})}).catch(()=>{}))},f=e=>{let t=e.data;e.source===window&&e.origin===location.origin&&t?.source===`openpi-browser-extension`&&(t.type===`connector-hello`?i.current=Date.now():t.type===`control-result`&&d(t.requestId,t.result,t.error))},p=async(e,t)=>{let n=Yq(t||``,location.origin);if(!n){d(e,void 0,`Invalid internal browser URL.`);return}let i=new AbortController;c=()=>i.abort();let o=await r.current(n,AbortSignal.any([a.signal,i.signal]));if(a.signal.aborted||s!==e)return;if(!o){d(e,void 0,`The internal browser has reached its page limit.`);return}let l=()=>{let t=document.getElementById(o)?.querySelector(`iframe[data-openpi-browser-document]`),n=t&&Xq().find(e=>e.id===t.dataset.openpiBrowserPage);n&&d(e,{root:n.id})},u=new MutationObserver(l);u.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-openpi-browser-document`]});let f=setTimeout(()=>d(e,void 0,`The internal page did not bind. Inspect the browser's loading or embedding error.`),1e4);c=()=>{i.abort(),u.disconnect(),clearTimeout(f)},l()},m=async()=>{if(Date.now()-i.current>15e3&&document.documentElement.dataset.openpiBrowserExtension!==`ready`){u(),a.signal.aborted||(o=setTimeout(()=>void m(),1e3));return}try{let{pending:r}=await n.request(`/api/browser/control`,{method:`POST`,signal:a.signal,body:JSON.stringify({sessionId:e,sessionPath:t,pages:Xq()})});s&&s!==r?.requestId&&u(),r&&!r.running&&r.request&&!s&&(s=r.requestId,r.request.operation===`open`?p(r.requestId,r.request.url).catch(()=>d(r.requestId,void 0,`The embedded browser could not open.`)):r.page?l({type:`control`,id:r.page.id,document:r.page.document,requestId:r.requestId,request:r.request}):d(r.requestId,void 0,`The embedded page is unavailable.`))}catch{u()}a.signal.aborted||(o=setTimeout(()=>void m(),250))};return window.addEventListener(`message`,f),m(),()=>{clearTimeout(o),a.abort(),u(),window.removeEventListener(`message`,f)}},[e,t])}function Qq({usage:e,workspace:t,sessionId:n,model:r}){let{t:i,i18n:a}=W(),[o,s]=(0,K.useState)(!1);if(!e)return null;let c=e.context,l=e=>new Intl.NumberFormat(a.resolvedLanguage).format(e),u=e=>new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:0}).format(e).toLowerCase(),d=c?.percent==null?i(`usageUnknown`):`${Math.round(c.percent)}%`,f=c?.percent==null?i(`usageUnknown`):`${new Intl.NumberFormat(a.resolvedLanguage,{maximumFractionDigits:1}).format(c.percent)}%`,p=c?u(c.contextWindow):i(`usageUnknown`);return(0,q.jsx)(`div`,{className:`session-usage`,children:(0,q.jsx)(Zu,{isOpen:o,onOpenChange:s,placement:`below`,alignment:`end`,width:`min(360px, calc(100vw - 24px))`,label:i(`sessionUsage`),isModal:!1,hasCloseButton:!1,content:(0,q.jsxs)(`div`,{className:`session-usage-details`,children:[(0,q.jsxs)(`div`,{className:`usage-details-heading`,children:[(0,q.jsx)(`h2`,{children:i(`sessionOverview`)}),(0,q.jsx)(V,{content:i(`close`),placement:`below`,children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":i(`close`),onClick:()=>s(!1),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`section`,{className:`usage-section`,children:[(0,q.jsxs)(`div`,{className:`usage-context-heading`,children:[(0,q.jsx)(`h3`,{children:i(`usageContextLabel`)}),(0,q.jsx)(`span`,{children:f})]}),(0,q.jsxs)(`p`,{className:`usage-context-value`,children:[(0,q.jsx)(`strong`,{children:c?.tokens==null?i(`usageUnknown`):l(c.tokens)}),c&&(0,q.jsxs)(`span`,{children:[` / `,l(c.contextWindow),` tokens`]})]}),c?.percent!=null&&(0,q.jsx)(`progress`,{value:Math.max(0,Math.min(100,c.percent)),max:100,"aria-label":i(`sessionContextUsage`)}),(0,q.jsx)(`p`,{className:`usage-help`,children:i(`usageContextHelp`)}),r&&(0,q.jsxs)(`div`,{className:`usage-context-model`,children:[(0,q.jsx)(`span`,{children:r.name}),(0,q.jsxs)(`span`,{children:[r.provider,` / `,r.id]})]})]}),(0,q.jsxs)(`section`,{className:`usage-section`,children:[(0,q.jsx)(`h3`,{children:i(`usageSessionTotals`)}),(0,q.jsxs)(`dl`,{className:`usage-metrics`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageInputLabel`)}),(0,q.jsx)(`dd`,{children:l(e.input)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageOutputLabel`)}),(0,q.jsx)(`dd`,{children:l(e.output)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageCacheReadLabel`)}),(0,q.jsx)(`dd`,{children:l(e.cacheRead)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageCacheWriteLabel`)}),(0,q.jsx)(`dd`,{children:l(e.cacheWrite)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageTotalLabel`)}),(0,q.jsx)(`dd`,{children:l(e.total)})]})]}),(0,q.jsx)(`p`,{className:`usage-help`,children:i(`usageTotalsHelp`)})]}),t&&(0,q.jsxs)(`dl`,{className:`usage-workspace`,children:[(0,q.jsx)(`dt`,{children:i(`usageWorkspaceLabel`)}),(0,q.jsx)(`dd`,{children:t})]}),n&&(0,q.jsxs)(`details`,{className:`usage-identity`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{children:i(`usageSessionId`)}),(0,q.jsx)(is,{"aria-hidden":`true`})]}),(0,q.jsx)(`code`,{children:n})]})]}),children:t=>(0,q.jsx)(V,{content:i(`usageOpenDetails`,{input:l(e.input),output:l(e.output),percent:f,capacity:p}),placement:`below`,isEnabled:!o,children:(0,q.jsxs)(`button`,{...t,className:`session-usage-trigger`,type:`button`,"aria-label":i(`usageOpenDetails`,{input:u(e.input),output:u(e.output),percent:d,capacity:p}),children:[(0,q.jsxs)(`span`,{className:`usage-stat`,children:[(0,q.jsx)(Xo,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:u(e.input)})]}),(0,q.jsxs)(`span`,{className:`usage-stat`,children:[(0,q.jsx)(ue,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:u(e.output)})]}),(0,q.jsxs)(`span`,{className:`usage-stat`,children:[(0,q.jsx)(Us,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[d,c&&(0,q.jsxs)(`span`,{className:`usage-capacity`,children:[` / `,p]})]})]})]})})})})}function $q(e,t){return new Promise((n,r)=>{let i=new FileReader,a=e=>{t.removeEventListener(`abort`,o),e?r(e):typeof i.result==`string`?n(i.result.slice(i.result.indexOf(`,`)+1)):r(Error(`File read failed`))},o=()=>{i.abort(),a(new DOMException(`File read cancelled`,`AbortError`))};i.onload=()=>a(),i.onerror=()=>a(Error(`File read failed`)),t.addEventListener(`abort`,o,{once:!0}),t.aborted?o():i.readAsDataURL(e)})}function eJ({name:e,kind:t=`file`,expanded:n=!1}){let r=t===`directory`?`folder`:t===`symlink`?`link`:/\.(?:md|markdown)$/iu.test(e)?`markdown`:/\.(?:csv|tsv|xlsx?)$/iu.test(e)?`sheet`:/\.(?:png|jpe?g|gif|webp|svg|bmp|ico)$/iu.test(e)?`image`:/\.(?:pdf|docx?|pptx?)$/iu.test(e)?`document`:/\.(?:[cm]?[jt]sx?|json|html?|css|py|rs|go|sh|ya?ml|toml|xml)$/iu.test(e)?`code`:`file`;return(0,q.jsx)(r===`folder`?n?zs:Vs:r===`link`?Qs:r===`sheet`?jc:r===`image`?Ns:r===`markdown`||r===`document`?Fs:r===`code`?js:Is,{className:`file-icon file-icon-${r}`,"aria-hidden":`true`})}function tJ({sessionId:e,sessionPath:t,cwd:n,canWrite:r,active:i,selected:a,onSelect:o,dropTarget:s,onShowTree:c,onRemoved:l,onReadStateChange:u,refreshRequest:d}){let{t:f}=W(),p=(0,K.useContext)(JE),m=be(),h=(0,K.useMemo)(()=>new de,[]),[g,_]=(0,K.useState)(m?.files?.query??``),[v,y]=(0,K.useState)(m?.files?.expanded??[`.`]),[b,x]=(0,K.useState)({}),[S,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(null),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(0);(0,K.useEffect)(()=>{u({error:w,loading:E})},[w,E,u]);let A=(0,K.useCallback)(e=>({message:f(e instanceof ge&&e.code===`ARTIFACT_DENIED`?`filesReadDenied`:`filesReadFailedDetail`),detail:e instanceof Error?e.message:void 0}),[f]),[j,M]=(0,K.useState)(a.includes(`/`)?a.slice(0,a.lastIndexOf(`/`)):`.`),[N,P]=(0,K.useState)(null),[F,I]=(0,K.useState)(``),[ee,L]=(0,K.useState)(null),[R,te]=(0,K.useState)(!1),[z,B]=(0,K.useState)(!1),[ne,re]=(0,K.useState)([]),[ie,ae]=(0,K.useState)(!1),[oe,se]=(0,K.useState)([]),[ce,le]=(0,K.useState)(null),[H,ue]=(0,K.useState)(`.`),[fe,pe]=(0,K.useState)(``),[he,_e]=(0,K.useState)([]),[ve,ye]=(0,K.useState)(!1),[xe,Se]=(0,K.useState)([]),[Ce,we]=(0,K.useState)(0),[Te,Ee]=(0,K.useState)(!1),[U,De]=(0,K.useState)(),Oe=(0,K.useRef)(0),[ke,Ae]=(0,K.useState)([]),[G,je]=(0,K.useState)(!1),[Me,Ne]=(0,K.useState)(``),Pe=(0,K.useRef)(null),Fe=(0,K.useRef)(null),Ie=(0,K.useRef)(null),Le=(0,K.useRef)(null),Re=(0,K.useRef)(null),ze=(0,K.useRef)(!1),Be=(0,K.useRef)(0),Ve=(0,K.useRef)(null),He=(0,K.useRef)(void 0),Ue=JSON.stringify([e,t,n]),We=(0,K.useRef)(Ue);We.current=Ue;let Ge=(0,K.useRef)(r);Ge.current=r;let Ke=(0,K.useRef)(null);(0,K.useEffect)(()=>(We.current=Ue,()=>{We.current=``,Ke.current?.abort(),clearTimeout(He.current)}),[Ue]),(0,K.useEffect)(()=>{Fe.current?.setAttribute(`webkitdirectory`,``)},[]),(0,K.useEffect)(()=>{if(!ve||!i)return;Oe.current++;let n=new AbortController;return Ee(!0),h.workspaceTrash(e,t,n.signal).then(r=>{!n.signal.aborted&&r.sessionId===e&&r.sessionPath===t&&(Se(r.entries),we(r.unavailable??0),De(r.nextCursor))}).catch(e=>{n.signal.aborted||(te(!0),L(A(e).message))}).finally(()=>{n.signal.aborted||Ee(!1)}),()=>n.abort()},[h,e,t,i,ve,O,A]),(0,K.useEffect)(()=>{ce&&(Le.current?.focus(),Le.current?.select())},[ce]),(0,K.useEffect)(()=>{N&&Ie.current?.focus()},[N]);let qe=(0,K.useRef)(null),Je=(0,K.useRef)(m?.files?.treeScroll??0);(0,K.useLayoutEffect)(()=>{m?.files&&Object.assign(m.files,{query:g,expanded:v})},[m,g,v]),(0,K.useLayoutEffect)(()=>{!i||!(S||b[`.`])||Je.current!==null&&qe.current&&(qe.current.scrollTop=Je.current,Je.current=null)},[i,S,b]);let Ye=(0,K.useRef)(b);Ye.current=b;let Xe=(0,K.useRef)(S);Xe.current=S;let Ze=(0,K.useRef)(``),Qe=(0,K.useRef)(null),$e=(0,K.useRef)(new Set),et=(0,K.useRef)(!1),[tt,nt]=(0,K.useState)(!1),rt=!!g.trim();(0,K.useLayoutEffect)(()=>{let e=Ve.current;if(!e||!i)return;let t=[...qe.current?.querySelectorAll(`[data-file-row]`)??[]].find(t=>t.dataset.fileRow===e);t&&(t.focus({preventScroll:!0}),Ve.current=null)});let it=e=>e instanceof ge&&e.code===`ARTIFACT_EXISTS`?f(`filesNameExists`):e instanceof Error?e.message:f(`filesMutationFailed`),at=e=>{_(``);let t=e.path.split(`/`),n=e.kind===`directory`?t.length:t.length-1;y(e=>[...new Set([...e,`.`,...t.slice(0,n).map((e,n)=>t.slice(0,n+1).join(`/`))])]),Ve.current=e.path,k(e=>e+1),e.kind===`file`&&(e.bytes??0)<=20971520&&(o(e.path),p?.open(encodeURI(e.path)))},ot=()=>{ze.current||(P(null),L(null),Re.current?.focus({preventScroll:!0}))},st=async n=>{if(n.preventDefault(),!N||!Ge.current||ze.current)return;if(!F||F===`.`||F===`..`||/[\\/\u0000-\u001f\u007f]/u.test(F)){te(!0),L(f(`filesNameInvalid`)),Ie.current?.focus();return}ze.current=!0,B(!0),L(null);let r=Ue;try{let n=await h.mutateWorkspaceFile(e,t,{kind:N,directory:j,name:F});if(We.current!==r||n.sessionId!==e||n.sessionPath!==t)return;P(null),I(``),te(!1),L(f(`filesCreated`,{path:n.path})),at(n)}catch(e){We.current===r&&(te(!0),L(it(e)),Ie.current?.focus())}finally{We.current===r&&(ze.current=!1,B(!1))}},ct=async n=>{if(!Ge.current||ze.current)return;let r=Ue;ze.current=!0,B(!0);let i=new AbortController;Ke.current=i;let a=(e,t)=>re(n=>n.map(n=>n.id===e.id?{...n,...t}:n));try{for(let o of n){if(We.current!==r)return;if(!Ge.current){a(o,{state:`error`,message:f(`filesWriteUnavailable`)});continue}if(!(!o.file&&o.kind!==`directory`)){a(o,{state:`running`,message:void 0});try{if(o.kind===`directory`){try{await h.mutateWorkspaceFile(e,t,{kind:`create-directory`,directory:o.directory,name:o.name})}catch(n){if(!(n instanceof ge)||n.code!==`ARTIFACT_EXISTS`)throw n;await h.workspaceFiles(e,t,[o.directory===`.`?``:o.directory,o.name].filter(Boolean).join(`/`),``,i.signal)}if(We.current!==r)return;a(o,{state:`done`,message:f(`filesImported`)}),k(e=>e+1);continue}if(!o.file)continue;if(o.file.size>52428800)throw Error(f(`filesImportTooLarge`));let n=await $q(o.file,i.signal);if(We.current!==r)return;if(!Ge.current){a(o,{state:`error`,message:f(`filesWriteUnavailable`)});continue}let s=await h.mutateWorkspaceFile(e,t,{kind:`import-file`,directory:o.directory,name:o.name,data:n,...o.createParents?{createParents:!0}:{}});if(We.current!==r||s.sessionId!==e||s.sessionPath!==t)return;a(o,{state:`done`,file:void 0,message:(s.bytes??0)>20971520?f(`filesImportedNoPreview`):f(`filesImported`)}),at(s)}catch(e){if(We.current!==r)return;a(o,{state:`error`,message:it(e)})}}}}finally{Ke.current===i&&(Ke.current=null),We.current===r&&(ze.current=!1,B(!1))}},lt=(e,t=[],n=new Map,r=[])=>{if(!Ge.current||ze.current)return;if(e.length+r.length>2e3){te(!0),L(f(`filesImportFolderLimit`));return}c(!0);let i=[...[...new Set(r)].sort((e,t)=>e.split(`/`).length-t.split(`/`).length).map(e=>({id:++Be.current,name:e.split(`/`).at(-1),directory:[j===`.`?``:j,...e.split(`/`).slice(0,-1)].filter(Boolean).join(`/`)||`.`,kind:`directory`,state:`pending`})),...e.map(e=>{let t=n.get(e)??e.webkitRelativePath;return{id:++Be.current,name:e.name,directory:t?[j===`.`?``:j,...t.split(`/`).slice(0,-1)].filter(Boolean).join(`/`)||`.`:j,createParents:!!t,file:e,state:`pending`}})];re(e=>[...e,...t.map(e=>({id:++Be.current,name:e,directory:j,state:`error`,message:f(`filesImportDirectoryUnsupported`)})),...i]),ct(i)},ut=async(n,r)=>{if(!Ge.current||ze.current)return;let i=Ue,s=r.filter(e=>!r.some(t=>t.kind===`directory`&&e.path.startsWith(`${t.path}/`)));ze.current=!0,B(!0),_e([]);let c=[],u=new Set;try{for(let r of s){if(We.current!==i||!Ge.current)return;try{if(!r.identity)throw Error(f(`filesRefreshBeforeOrganizing`));let s=await h.mutateWorkspaceFile(e,t,n===`trash`?{kind:n,path:r.path,identity:r.identity}:{kind:n,path:r.path,identity:r.identity,directory:H,name:ce?.rename?fe:r.name});if(We.current!==i||s.sessionId!==e||s.sessionPath!==t)return;if(u.add(r.path),s.trashed&&c.push(s.trashed),s.moved&&DD(e,t,s.moved.from,s.moved.to),r.kind===`directory`){let e=e=>e===r.path||e.startsWith(`${r.path}/`);if(y(t=>n===`trash`?t.filter(t=>!e(t)):t.map(t=>e(t)?`${s.path}${t.slice(r.path.length)}`:t)),M(t=>e(t)?n===`move`?`${s.path}${t.slice(r.path.length)}`:r.path.split(`/`).slice(0,-1).join(`/`)||`.`:t),n===`move`&&e(a)){let e=`${s.path}${a.slice(r.path.length)}`;o(e),p?.open(encodeURI(e))}}n===`move`&&at(s),_e(e=>[...e,{path:r.path}])}catch(e){if(We.current!==i)return;_e(t=>[...t,{path:r.path,error:it(e)}])}}Ae(c),n===`trash`&&l([...u]),se(e=>e.filter(e=>![...u].some(t=>t===e.path||e.path.startsWith(`${t}/`)))),le(null),k(e=>e+1)}finally{We.current===i&&(ze.current=!1,B(!1))}},dt=async n=>{if(!Ge.current||ze.current)return;let r=Ue;ze.current=!0,B(!0),_e([]);try{for(let i of n){if(We.current!==r||!Ge.current)return;try{let n=await h.mutateWorkspaceFile(e,t,{kind:`restore`,id:i.id,identity:i.identity});if(We.current!==r||n.sessionId!==e||n.sessionPath!==t)return;Ae(e=>e.filter(e=>e.id!==i.id)),Se(e=>e.filter(e=>e.id!==i.id)),_e(e=>[...e,{path:i.path}]),at(n)}catch(e){if(We.current!==r)return;_e(t=>[...t,{path:i.path,error:it(e)}])}}k(e=>e+1)}finally{We.current===r&&(ze.current=!1,B(!1))}},ft=async()=>{if(!U||Te)return;let n=Oe.current,r=Ue;Ee(!0);try{let i=await h.workspaceTrash(e,t,void 0,U);if(n!==Oe.current||We.current!==r||i.sessionId!==e||i.sessionPath!==t)return;Se(e=>[...new Map([...e,...i.entries].map(e=>[e.id,e])).values()]),we(e=>e+(i.unavailable??0)),De(i.nextCursor)}catch(e){n===Oe.current&&We.current===r&&(te(!0),L(it(e)))}finally{n===Oe.current&&We.current===r&&Ee(!1)}},pt=e=>se(t=>t.some(t=>t.path===e.path)?t.filter(t=>t.path!==e.path):[...t,e]),mt=(e,t=!1)=>{le({entries:e,rename:t});let n=e[0]?.path??``;ue(t?n.split(`/`).slice(0,-1).join(`/`)||`.`:j),pe(e[0]?.name??``),L(null)},ht=(0,K.useRef)(lt);ht.current=lt,(0,K.useEffect)(()=>{let e=s.current;if(!e)return;let t=e=>{if(!e.dataTransfer?.types.includes(`Files`))return;e.preventDefault();let t=Ge.current&&!ze.current;e.dataTransfer.dropEffect=t?`copy`:`none`,je(t)},n=t=>{(!(t.relatedTarget instanceof Node)||!e.contains(t.relatedTarget))&&je(!1)},r=e=>{let t=e.dataTransfer;if(!t?.types.includes(`Files`)||(e.preventDefault(),je(!1),!Ge.current||ze.current))return;let n=[],r=[],i=[];for(let e of t.items){if(e.kind!==`file`)continue;let t=e.webkitGetAsEntry?.();if(t?.isDirectory&&`createReader`in t)i.push(t);else if(t?.isDirectory)r.push(t.name);else{let t=e.getAsFile();t&&n.push(t)}}if(i.length){let e=We.current,t=new Map,a=[],o=0,s=async(r,i)=>{if(We.current!==e||!Ge.current)throw new DOMException(`Import cancelled`,`AbortError`);if(++o>2e3||i.split(`/`).length>64)throw Error(f(`filesImportFolderLimit`));let c=i?`${i}/${r.name}`:r.name;if(r.isDirectory){a.push(c);let e=r.createReader();for(;;){let t=await new Promise((t,n)=>e.readEntries(t,n));if(!t.length)break;for(let e of t)await s(e,c)}}else if(r.isFile){let e=await new Promise((e,t)=>r.file(e,t));t.set(e,c),n.push(e)}};ze.current=!0,B(!0),(async()=>{try{for(let e of i)await s(e,``);if(We.current!==e||!Ge.current)return;ze.current=!1,B(!1),ht.current(n,r,t,a)}catch(t){We.current===e&&(te(!0),L(t instanceof Error?t.message:f(`filesMutationFailed`)))}finally{We.current===e&&!Ke.current&&(ze.current=!1,B(!1))}})();return}ht.current(t.items.length?n:[...t.files],r)};return e.addEventListener(`dragover`,t),e.addEventListener(`dragleave`,n),e.addEventListener(`drop`,r),()=>{e.removeEventListener(`dragover`,t),e.removeEventListener(`dragleave`,n),e.removeEventListener(`drop`,r)}},[s,f]);let gt=async(e,t)=>{let r=Ue,i=n.includes(`\\`)?`\\`:`/`,a=await td(t?`${n.replace(/[\\/]$/u,``)}${i}${e.split(`/`).join(i)}`:e);We.current===r&&(clearTimeout(He.current),Ne(f(a?`filesPathCopied`:`copyFailed`,{path:e})),He.current=setTimeout(()=>Ne(``),3e3))};(0,K.useEffect)(()=>{if(!i)return;let n=new AbortController;Qe.current=n;let r;Ze.current!==g.trim()&&(Ze.current=g.trim(),Xe.current=null,C(null)),r=setTimeout(async()=>{if(document.visibilityState!==`hidden`){D(!0);try{let r=async(r,i,a)=>{let o=await h.workspaceFiles(e,t,r,i,n.signal);for(o.nextCursor&&$e.current.add(o.nextCursor);o.nextCursor&&o.entries.length{document.visibilityState!==`hidden`&&k(e=>e+1)};return window.addEventListener(`focus`,a),document.addEventListener(`visibilitychange`,a),()=>{n.abort(),clearTimeout(r),window.removeEventListener(`focus`,a),document.removeEventListener(`visibilitychange`,a);for(let e of $e.current)h.releaseFileListing(e).catch(()=>void 0);$e.current.clear(),et.current=!1,nt(!1)}},[i,h,v,g,rt,e,t,O,d,A]);let _t=e=>y(t=>t.includes(e)?t.filter(t=>t!==e&&!t.startsWith(`${e}/`)):[...t,e]),vt=async n=>{let r=rt?Xe.current:Ye.current[n],i=Qe.current;if(!(!r?.nextCursor||!i||i.signal.aborted||et.current||E)){et.current=!0,nt(!0),T(null);try{let a=await h.workspaceFiles(e,t,n,rt?g.trim():``,i.signal,r.nextCursor);if($e.current.delete(r.nextCursor),a.nextCursor&&$e.current.add(a.nextCursor),i.signal.aborted)return;let o=[...new Map([...r.entries,...a.entries].map(e=>[e.path,e])).values()],s={...a,entries:o};rt?C(s):x(e=>({...e,[n]:s}))}catch(e){i.signal.aborted||T(A(e))}finally{i.signal.aborted||(et.current=!1,nt(!1))}}},yt=(e,t)=>t?.nextCursor?(0,q.jsxs)(`li`,{className:`file-tree-more`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:E||tt,onClick:()=>void vt(e),children:f(tt?`readingFile`:`filesLoadMore`)}),(0,q.jsx)(`small`,{children:f(`filesLoaded`,{count:t.entries.length})})]}):null,bt=e=>{let t=[...qe.current?.querySelectorAll(`button[data-file-row]:not(:disabled)`)??[]],n=t.indexOf(document.activeElement),r=t[n];if(!r)return;let i;if(e.key===`ArrowDown`)i=t[Math.min(n+1,t.length-1)];else if(e.key===`ArrowUp`)i=t[Math.max(n-1,0)];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t.at(-1);else if(e.key===`ArrowRight`&&r.getAttribute(`aria-expanded`)===`false`)r.click();else if(e.key===`ArrowLeft`)r.getAttribute(`aria-expanded`)===`true`?r.click():i=t.find(e=>e.dataset.fileRow===r.dataset.fileRow?.split(`/`).slice(0,-1).join(`/`));else return;e.preventDefault(),i?.focus()},xt=(e,t=0)=>e.map(e=>{let n=e.kind===`directory`,i=v.includes(e.path),s=r&&!!e.identity&&!e.path.split(`/`).some(e=>[`.git`,`.pi`,`.openpi-trash`].includes(e.toLowerCase()))&&(n||e.kind===`file`);return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{className:`file-tree-item`,children:[ie&&(0,q.jsx)(`input`,{type:`checkbox`,className:`file-tree-check`,"aria-label":f(`filesSelectItem`,{name:e.name}),checked:oe.some(t=>t.path===e.path),disabled:!s||z,onChange:()=>pt(e)}),(0,q.jsxs)(`button`,{type:`button`,"data-file-row":e.path,className:`file-tree-row`,style:{paddingInlineStart:10+t*16},"aria-expanded":n?i:void 0,"aria-current":!n&&a===e.path?`true`:void 0,disabled:e.kind===`symlink`||e.kind===`other`,title:e.kind===`symlink`?f(`filesSymlink`):e.path,onClick:t=>{if(s&&(t.metaKey||t.ctrlKey)){ae(!0),pt(e);return}n?(M(e.path),rt?(_(``),y([`.`,...e.path.split(`/`).map((e,t,n)=>n.slice(0,t+1).join(`/`))])):_t(e.path)):(M(e.path.includes(`/`)?e.path.slice(0,e.path.lastIndexOf(`/`)):`.`),o(e.path),p?.open(encodeURI(e.path),void 0,t.currentTarget))},children:[n?i?(0,q.jsx)(is,{className:`file-chevron`,"aria-hidden":`true`}):(0,q.jsx)(os,{className:`file-chevron`,"aria-hidden":`true`}):(0,q.jsx)(`span`,{className:`file-chevron`}),(0,q.jsx)(eJ,{name:e.name,kind:e.kind,expanded:i}),(0,q.jsxs)(`span`,{className:`file-tree-name`,children:[e.name,rt&&(0,q.jsx)(`small`,{children:e.path})]})]}),(0,q.jsx)(yo,{button:{label:f(`filesPathActions`,{name:e.name}),icon:(0,q.jsx)(Ds,{"aria-hidden":`true`}),isIconOnly:!0,size:`sm`,variant:`ghost`,className:`file-path-actions`},items:[{label:f(`filesCopyRelativePath`),onClick:()=>void gt(e.path,!1)},{label:f(`filesCopyAbsolutePath`),onClick:()=>void gt(e.path,!0)},{label:f(`filesRename`),isDisabled:!s||z,onClick:()=>mt([e],!0)},{label:f(`filesMove`),isDisabled:!s||z,onClick:()=>mt([e])},{label:f(`filesTrashAction`),isDisabled:!s||z,onClick:()=>void ut(`trash`,[e])}],menuWidth:200,alignment:`end`,hasChevron:!1})]}),!rt&&n&&i&&(0,q.jsxs)(`ul`,{children:[b[e.path]?xt(b[e.path].entries,t+1):(0,q.jsx)(`li`,{className:`file-tree-note`,children:f(`readingFile`)}),yt(e.path,b[e.path])]})]},e.path)});return(0,q.jsxs)(`aside`,{className:`file-explorer`,"aria-label":f(`filesExplorer`),"data-drag-over":G||void 0,children:[(0,q.jsxs)(`div`,{className:`file-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{value:g,onChange:e=>_(e.currentTarget.value.slice(0,200)),placeholder:f(`filesSearch`),"aria-label":f(`filesSearch`)}),(0,q.jsx)(`span`,{className:`file-search-progress`,"aria-hidden":`true`,"data-loading":E||void 0}),(0,q.jsx)(V,{content:f(`refreshFiles`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":f(`refreshFiles`),onClick:()=>k(e=>e+1),disabled:E,children:(0,q.jsx)(me,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`div`,{className:`file-create-toolbar`,children:[(0,q.jsxs)(`fieldset`,{className:`file-write-actions`,"aria-label":f(`filesWorkspaceActions`),children:[(0,q.jsx)(yo,{button:{ref:Re,label:f(`filesCreateMenu`),variant:`ghost`,className:`file-toolbar-button`,tooltip:r&&!z?f(`filesCreateMenu`):void 0,isDisabled:!r||z},items:[`create-file`,`create-directory`].map(e=>({label:f(e===`create-file`?`filesNewFile`:`filesNewDirectory`),icon:e===`create-file`?(0,q.jsx)(Ps,{"aria-hidden":`true`}):(0,q.jsx)(Bs,{"aria-hidden":`true`}),isDisabled:!r||z,onClick:()=>{P(e),I(``),L(null)}})),menuWidth:190}),(0,q.jsx)(yo,{button:{label:f(`filesImportMenu`),variant:`ghost`,className:`file-toolbar-button`,tooltip:r&&!z?f(`filesImportMenu`):void 0,isDisabled:!r||z},items:[{label:f(`filesImport`),icon:(0,q.jsx)(Kc,{"aria-hidden":`true`}),isDisabled:!r||z,onClick:()=>Pe.current?.click()},{label:f(`filesImportFolder`),icon:(0,q.jsx)(Rs,{"aria-hidden":`true`}),isDisabled:!r||z,onClick:()=>Fe.current?.click()}],menuWidth:190}),(0,q.jsx)(`input`,{ref:Pe,type:`file`,multiple:!0,hidden:!0,"aria-label":f(`filesImportChoose`),onChange:e=>{lt([...e.currentTarget.files??[]]),e.currentTarget.value=``}}),(0,q.jsx)(`input`,{ref:Fe,type:`file`,multiple:!0,hidden:!0,"aria-label":f(`filesImportFolderChoose`),onChange:e=>{lt([...e.currentTarget.files??[]]),e.currentTarget.value=``}}),(0,q.jsxs)(yo,{button:{label:f(`filesMoreMenu`),variant:`ghost`,className:`file-toolbar-button`,tooltip:f(`filesMoreMenu`)},menuWidth:210,children:[(0,q.jsx)(Ro,{label:f(`filesSelectMultiple`),icon:(0,q.jsx)($s,{"aria-hidden":`true`}),value:ie,isDisabled:!r||z,hasCloseOnSelect:!0,onChange:e=>{ae(e),se([])}}),(0,q.jsx)(Ro,{label:f(`filesTrash`),icon:(0,q.jsx)(Uc,{"aria-hidden":`true`}),value:ve,hasCloseOnSelect:!0,onChange:ye})]})]}),(0,q.jsxs)(`p`,{className:`file-write-directory`,title:j,children:[(0,q.jsxs)(`span`,{children:[f(`filesTargetDirectory`),`:`,` `,j===`.`?f(`filesWorkspaceRoot`):j]}),j!==`.`&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>M(`.`),children:f(`filesWorkspaceRoot`)})]})]}),ie&&(0,q.jsxs)(`div`,{className:`file-organization-bar`,children:[(0,q.jsx)(`span`,{children:f(`filesSelectedCount`,{count:oe.length})}),(0,q.jsx)(`button`,{type:`button`,disabled:!oe.length||z||!r,onClick:()=>mt(oe),children:f(`filesMove`)}),(0,q.jsx)(`button`,{type:`button`,disabled:!oe.length||z||!r,onClick:()=>void ut(`trash`,oe),children:f(`filesTrashAction`)})]}),ce&&(0,q.jsxs)(`form`,{className:`file-create-form`,onSubmit:e=>{e.preventDefault(),(!ce.rename||fe.trim())&&ut(`move`,ce.entries)},children:[(0,q.jsxs)(`label`,{children:[f(ce.rename?`filesRename`:`filesMoveDestination`),(0,q.jsx)(`input`,{ref:Le,value:ce.rename?fe:H,"aria-label":f(ce.rename?`filesNewName`:`filesMoveDestination`),disabled:z,onChange:e=>ce.rename?pe(e.currentTarget.value):ue(e.currentTarget.value)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`button`,{type:`submit`,disabled:z||!r,children:f(ce.rename?`filesRename`:`filesMove`)}),(0,q.jsx)(`button`,{type:`button`,disabled:z,onClick:()=>le(null),children:f(`cancel`)})]})]}),he.length>0&&(0,q.jsxs)(`div`,{className:`file-import-results`,children:[(0,q.jsx)(`ol`,{"aria-label":f(`filesOrganizationResults`),"aria-live":`polite`,children:he.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`span`,{children:e.path}),(0,q.jsx)(`small`,{role:e.error?`alert`:void 0,children:e.error??f(`filesOperationDone`)})]},e.path))}),ke.length>0&&(0,q.jsx)(`button`,{type:`button`,disabled:z||!r,onClick:()=>void dt(ke),children:f(`filesUndoTrash`)})]}),ve&&(0,q.jsxs)(`section`,{className:`file-trash-list`,"aria-label":f(`filesTrash`),children:[(0,q.jsx)(`p`,{children:f(`filesTrashDetail`)}),Ce>0&&(0,q.jsx)(`p`,{role:`alert`,children:f(`filesTrashUnavailable`,{count:Ce})}),Te&&xe.length===0?(0,q.jsx)(`p`,{children:f(`readingFile`)}):xe.length===0?(0,q.jsx)(`p`,{children:f(`filesTrashEmpty`)}):(0,q.jsx)(`ul`,{children:xe.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`span`,{title:e.path,children:e.path}),(0,q.jsx)(`button`,{type:`button`,disabled:!r||z,"aria-label":f(`filesRestoreItem`,{name:e.path}),onClick:()=>void dt([e]),children:f(`filesRestore`)})]},e.id))}),U&&(0,q.jsx)(`button`,{type:`button`,disabled:Te,onClick:()=>void ft(),children:f(`filesLoadMore`)})]}),N&&(0,q.jsxs)(`form`,{className:`file-create-form`,onSubmit:e=>void st(e),onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.stopPropagation(),ot())},children:[(0,q.jsxs)(`label`,{children:[f(N===`create-file`?`filesFileName`:`filesDirectoryName`),(0,q.jsx)(`input`,{ref:Ie,value:F,maxLength:255,disabled:z,"aria-invalid":!!(ee&&R),onChange:e=>I(e.currentTarget.value)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`button`,{type:`submit`,disabled:!r||z,children:f(z?`filesCreating`:`filesCreate`)}),(0,q.jsx)(`button`,{type:`button`,disabled:z,onClick:ot,children:f(`cancel`)})]})]}),ee&&(0,q.jsx)(`p`,{className:`file-tree-note${R?` evidence-warning`:``}`,role:R?`alert`:`status`,children:ee}),ne.length>0&&(0,q.jsxs)(`div`,{className:`file-import-results`,children:[(0,q.jsx)(`p`,{children:f(`filesImportLimit`)}),(0,q.jsx)(`ol`,{"aria-label":f(`filesImportResults`),"aria-live":`polite`,children:ne.map(e=>(0,q.jsxs)(`li`,{"data-import-state":e.state,children:[(0,q.jsx)(`span`,{title:`${e.directory}/${e.name}`,children:e.name}),(0,q.jsx)(`small`,{children:e.message??f(e.state===`running`?`filesImporting`:`filesImportPending`)}),e.state===`error`&&(e.file||e.kind===`directory`)&&(0,q.jsx)(`button`,{type:`button`,disabled:!r||z,onClick:()=>void ct([e]),children:f(`filesRetryImport`)})]},e.id))}),(0,q.jsx)(`button`,{type:`button`,disabled:z,onClick:()=>re(e=>e.filter(e=>e.state!==`done`)),children:f(`filesClearImported`)})]}),(0,q.jsx)(`span`,{className:`sr-only`,role:`status`,children:Me}),w&&a&&(0,q.jsxs)(`div`,{className:`file-tree-note file-tree-error`,role:`alert`,children:[(0,q.jsx)(`p`,{children:w.message}),w.detail&&(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:f(`filesErrorDetails`)}),(0,q.jsx)(`p`,{children:w.detail})]}),(0,q.jsx)(`button`,{type:`button`,disabled:E,onClick:()=>k(e=>e+1),children:f(E?`readingFile`:`filesRetryRead`)})]}),(0,q.jsxs)(`section`,{className:`file-tree`,"aria-label":f(`filesExplorer`),ref:qe,onKeyDown:bt,onScroll:e=>{m?.files&&(m.files.treeScroll=e.currentTarget.scrollTop)},"aria-busy":E,children:[(0,q.jsxs)(`ul`,{children:[xt(rt?S?.entries??[]:b[`.`]?.entries??[]),yt(`.`,rt?S:b[`.`])]}),(rt?S?.truncated:b[`.`]?.truncated)&&(0,q.jsx)(`p`,{className:`file-tree-note`,children:f(`filesTruncated`)}),!E&&!w&&(rt?S?.entries.length===0:b[`.`]?.entries.length===0)&&(0,q.jsx)(`p`,{className:`file-tree-note`,children:f(rt?`filesNoMatches`:`filesEmpty`)})]})]})}function nJ({sessionId:e,sessionPath:t,cwd:n,active:r,canWrite:i=!0}){let{t:a}=W(),o=be(),[s,c]=(0,K.useState)(o?.files?.selected??``),[l,u]=(0,K.useState)(o?.files?.treeVisible??!0),[d,f]=(0,K.useState)({error:null,loading:!0}),[p,m]=(0,K.useState)(0),h=(0,K.useRef)(null),g=(0,K.useRef)(null);return(0,K.useLayoutEffect)(()=>{o&&(o.files={query:``,expanded:[`.`],treeScroll:0,...o.files,selected:s,treeVisible:l})},[o,s,l]),(0,q.jsx)(`div`,{ref:h,className:`files-workspace`,"data-tree-visible":l,"data-preview-open":!!s,children:(0,q.jsxs)(AD,{ref:g,sessionId:e,sessionPath:t,embedded:!0,active:r,onClose:()=>{c(``),u(!0)},children:[(0,q.jsx)(V,{content:a(l?`filesHideTree`:`filesShowTree`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`files-tree-toggle icon-button`,"aria-label":a(l?`filesHideTree`:`filesShowTree`),"aria-pressed":l,onClick:()=>u(e=>!e),children:l?(0,q.jsx)(zs,{"aria-hidden":`true`}):(0,q.jsx)(Vs,{"aria-hidden":`true`})})}),!s&&(0,q.jsxs)(`div`,{className:`files-empty-header`,title:n,children:[(0,q.jsx)(zs,{"aria-hidden":`true`}),n.split(/[\\/]/u).filter(Boolean).at(-1)||n]}),!s&&(0,q.jsxs)(`div`,{className:`files-preview-empty`,children:[d.error?(0,q.jsx)(Wc,{"aria-hidden":`true`}):(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsx)(`h3`,{children:a(d.error?`filesReadFailed`:d.loading?`readingFile`:`filesChoose`)}),d.error?(0,q.jsxs)(`div`,{className:`files-read-failure`,role:`alert`,children:[(0,q.jsx)(`p`,{children:d.error.message}),d.error.detail&&(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:a(`filesErrorDetails`)}),(0,q.jsx)(`p`,{children:d.error.detail})]})]}):d.loading?null:(0,q.jsx)(`p`,{role:`status`,children:a(`filesChooseDetail`)}),d.error&&(0,q.jsxs)(`button`,{type:`button`,disabled:d.loading,onClick:()=>{u(!0),m(e=>e+1)},children:[(0,q.jsx)(me,{"aria-hidden":`true`}),a(d.loading?`readingFile`:`filesRetryRead`)]})]}),(0,q.jsx)(`div`,{className:`files-tree-container`,hidden:!l,children:(0,q.jsx)(tJ,{sessionId:e,sessionPath:t,cwd:n,canWrite:i,active:r&&l,selected:s,onSelect:c,dropTarget:h,onShowTree:u,onReadStateChange:f,refreshRequest:p,onRemoved:e=>{e.some(e=>e===s||s.startsWith(`${e}/`))&&g.current?.close({restoreFocus:!1})}},JSON.stringify([e,t,n]))})]})})}var rJ=(0,K.createContext)(null);rJ.displayName=`CollapsibleGroupContext`;var iJ=(0,K.createContext)(null);iJ.displayName=`CollapsibleGroupPresentationContext`;function aJ(e){let{isCollapsible:t,value:n}=e,r=(0,K.use)(rJ),i=r!=null&&n!=null,a=t===!0?{}:t||null,o=a!=null,[s,c]=(0,K.useState)(()=>i?!0:a?.isOpen===void 0?a?.defaultIsOpen??!0:a.isOpen),l;return l=i&&n!=null?r.isOpen(n):a?.isOpen===void 0?s:a.isOpen,{isEnabled:o,isOpen:l,toggle:()=>{if(i&&n!=null){r.toggle(n);return}let e=!l;a?.isOpen===void 0&&c(e),a?.onOpenChange?.(e)}}}var oJ={info:`info`,warning:`warning`,error:`error`,success:`success`},sJ={info:`status`,warning:`alert`,error:`alert`,success:`status`},cJ=`status`,lJ={info:`accent`,warning:`warning`,error:`error`,success:`success`},uJ={root:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kMv6JI:`xjb2p0i`,$$css:!0},rootElevatedCard:{kaIpWk:`x1vf2byn`,$$css:!0},header:{k1xSpc:`x78zum5`,kGNEyG:`x1cy8zhl`,kwnvtZ:`x1a02dak`,k1C7PZ:`xak3so`,khm7nJ:`x4olc9o`,k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,$$css:!0},headerCardStandalone:{kaIpWk:`x1vf2byn`,$$css:!0},headerCardWithContent:{krdFHd:`xwxb7qi`,kfmiAY:`x13nour3`,kVL7Gh:`xbiv7yw`,kT0f0o:`x16uus16`,$$css:!0},headerCentered:{kGNEyG:`x6s0dn4`,$$css:!0},endArea:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kwnvtZ:`x1a02dak`,kjj79g:`x13a6bvl`,kOIVth:`x1txdalj`,kmuXW:`x2lah0s`,ks0D6T:`x193iq5w`,keTefX:`xvc5jky`,kqGvvJ:`x81ka23`,$$css:!0},chevron:{k1ekBW:`x11xpdln`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},chevronExpanded:{k3aq6I:`x19jd1h0`,$$css:!0}},dJ={info:{kWkggS:`xgcxg3y`,$$css:!0},warning:{kWkggS:`x24i8r5`,$$css:!0},error:{kWkggS:`x1pritpl`,$$css:!0},success:{kWkggS:`xu13z74`,$$css:!0}};function fJ(e){return Object.prototype.hasOwnProperty.call(dJ,e)}var pJ={none:{kGVxlE:`x1gnnqk1`,$$css:!0},low:{kGVxlE:`x1i5ehqx`,$$css:!0},med:{kGVxlE:`x14hfi27`,$$css:!0},high:{kGVxlE:`x1kcpxr7`,$$css:!0}};function mJ({status:e,title:t,description:n,icon:r,isDismissable:i=!1,onDismiss:a,dismissLabel:o,endContent:s,container:c=`card`,elevation:l=`none`,collapsible:u=!0,children:d,xstyle:f,className:m,style:h,ref:g,onFocusCapture:_,onPointerDownCapture:v,...y}){let b=jr(),[x,S]=(0,K.useState)(!1),C=typeof u==`object`&&u?u:{},{isEnabled:T,isOpen:E,toggle:D}=aJ({isCollapsible:u!==!1&&{...C,defaultIsOpen:C.defaultIsOpen??!1}}),k=(0,K.useRef)(null),A=(0,K.useId)(),j=oJ[e],M=sJ[e]??cJ,N=lJ[e],P=mt(d),F=b(`@astryx.banner.dismiss`),I=o??F,ee=o??(typeof t==`string`?b(`@astryx.banner.dismissTitled`,{dismiss:F,title:t}):F);if(x)return null;let L=(e,t)=>{e instanceof HTMLElement&&e!==document.body&&!t.contains(e)&&(k.current=e)},R=e=>{L(e.relatedTarget,e.currentTarget)},te=e=>{L(document.activeElement,e.currentTarget)},z=()=>{let e=k.current;S(!0),a?.(),e?.isConnected&&e.focus()},B=T&&P,ne=mt(s)||i||B,re=mt(s)||i,V=!mt(n)&&re,ie=P&&(!T||E),ae=c===`card`;return(0,q.jsxs)(`div`,{ref:g,role:M,onFocusCapture:pt(_,R),onPointerDownCapture:pt(v,te),...H(w(uJ.root,pJ[l],ae&&l!==`none`&&uJ.rootElevatedCard,f),m,h),...y,children:[(0,q.jsxs)(`div`,{...H(O(`banner`,{container:c,status:e}),w(uJ.header,V&&uJ.headerCentered,fJ(e)&&dJ[e],ae&&(ie?uJ.headerCardWithContent:uJ.headerCardStandalone))),children:[(0,q.jsx)(`div`,{...mt(r)?H(O(`banner-icon`,{status:e}),{className:`x78zum5 x6s0dn4 x2lah0s`}):{className:`x78zum5 x6s0dn4 x2lah0s`},"aria-hidden":`true`,children:mt(r)?r:j==null?null:(0,q.jsx)(ya,{icon:j,size:`md`,color:N,...O(`banner-icon`,{status:e})})}),(0,q.jsxs)(`div`,{...{0:{className:`x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli`},1:{className:`x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli xgualba`}}[!!mt(s)<<0],children:[(0,q.jsx)(`div`,{className:`x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0 xj0a0fe`,children:t}),mt(n)&&(0,q.jsx)(`div`,{className:`x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe`,children:n})]}),ne&&(0,q.jsxs)(`div`,{...w(uJ.endArea,Yt.inset(p[`--spacing-2`])),children:[s,B&&(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:b(E?`@astryx.banner.collapse`:`@astryx.banner.expand`),tooltip:b(E?`@astryx.banner.collapse`:`@astryx.banner.expand`),icon:(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`inherit`,xstyle:[uJ.chevron,E&&uJ.chevronExpanded]}),onClick:D,"aria-expanded":E,"aria-controls":ie?A:void 0,isIconOnly:!0}),i&&(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:ee,tooltip:I,icon:(0,q.jsx)(ya,{icon:`close`,size:`sm`,color:`inherit`}),onClick:z,isIconOnly:!0})]})]}),ie&&(0,q.jsx)(`div`,{id:B?A:void 0,...H(O(`banner-content`,{container:c,status:e}),{0:{className:`x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh`},1:{className:`x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x1k5g1gk x1eprgri`}}[!!ae<<0]),children:d})]})}mJ.displayName=`Banner`;var hJ={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k9WMMc:`x2b8uid`,kOIVth:`x18g69wz`,k8WAf4:`xmfvnks`,kg3NbH:`xm7rs69`,$$css:!0},containerCompact:{kOIVth:`x1txdalj`,k8WAf4:`x1na6nto`,kg3NbH:`x1pzlopt`,$$css:!0}};function gJ({title:e,description:t,icon:n,actions:r,headingLevel:i=3,isCompact:a=!1,xstyle:o,className:s,style:c,ref:l,...u}){let d=`h${i}`;return(0,q.jsxs)(`div`,{ref:l,...u,role:`status`,...H(O(`empty-state`,{variant:a?`compact`:null}),w(hJ.container,a&&hJ.containerCompact,o),s,c),children:[n!=null&&(0,q.jsx)(`div`,{"aria-hidden":`true`,children:n}),(0,q.jsxs)(`div`,{className:`x78zum5 xdt5ytf x6s0dn4 xxc7z9f`,children:[(0,K.createElement)(d,H(O(`empty-state-title`,{variant:a?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0`},1:{className:`x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib`}}[!!a<<0]),e),t!=null&&(0,q.jsx)(`div`,{...H(O(`empty-state-description`,{variant:a?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4`},1:{className:`x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d`}}[!!a<<0]),children:t})]}),r!=null&&(0,q.jsx)(`div`,{...{0:{className:`x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d`},1:{className:`x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf`}}[!!a<<0],children:r})]})}gJ.displayName=`EmptyState`;var _J=1e3,vJ=100,yJ={root:{kWkggS:`xprdx6m x1j0df82 x1o55y2u`,kSiTet:`xvpkmg4 x1tbh5bv`,$$css:!0},animate:{kILWW9:`xpz12be`,k44tkh:`xqgcaz`,ko0y90:`xa4qsjk`,kKVMdj:`xeuoslp x1aquc0h`,kyAemX:`x193epu2`,$$css:!0}},bJ={0:{kaIpWk:`xwksslw`,$$css:!0},1:{kaIpWk:`xx3sua9`,$$css:!0},2:{kaIpWk:`xh6dtrn`,$$css:!0},3:{kaIpWk:`x1hviunn`,$$css:!0},4:{kaIpWk:`x1hviunn`,$$css:!0},none:{kaIpWk:`x2u8bby`,$$css:!0},rounded:{kaIpWk:`xjspbzw`,$$css:!0}},xJ={kKxzle:`xvo38ju`,$$css:!0},SJ={animationDelay:e=>[xJ,{"--x-animationDelay":(e=>typeof e==`number`?e+`ms`:e??void 0)(`${_J+vJ*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x5lhr3w`,kZKoxP:(typeof t==`number`?`${t}px`:t)==null?typeof t==`number`?`${t}px`:t:`x16ye13r`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e),"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof t==`number`?`${t}px`:t)}]};function CJ({width:e=`100%`,height:t=`100%`,radius:n=3,index:r=0,"data-testid":i,xstyle:a,className:o,style:s,ref:c,...l}){return(0,q.jsx)(`div`,{ref:c,"aria-hidden":`true`,"data-testid":i,...H(O(`skeleton`),w(yJ.root,yJ.animate,bJ[n],SJ.dimensions(e,t),SJ.animationDelay(r),a),o,s),...l})}CJ.displayName=`Skeleton`;function wJ({branches:e,value:t,loading:n,onChange:r}){let{t:i}=W(),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(!1),l=(0,K.useRef)(null),u=(0,K.useRef)([]),d=(0,K.useRef)(null),f=(0,K.useId)(),p=e.options.filter(e=>`${e.label} ${e.ref}`.toLocaleLowerCase().includes(a.toLocaleLowerCase()));(0,K.useEffect)(()=>{if(!s)return;let e=requestAnimationFrame(()=>l.current?.focus());return()=>cancelAnimationFrame(e)},[s]),(0,K.useEffect)(()=>{if(!s)return;let e=e=>{let t=e.target;d.current=t instanceof Element&&!t.closest(`.review-base-picker, .review-base-popup`)?t.closest(`button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex], [contenteditable='true']`):null};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[s]);let m=e.options.find(e=>e.ref===t)?.label??t;return(0,q.jsx)(tk,{className:`review-base-picker`,label:i(`gitReviewBaseBranch`),isLabelHidden:!0,value:t??``,triggerLabel:(0,q.jsx)(`span`,{className:`review-base-label`,title:t,children:m||i(`gitReviewChooseBase`)}),variant:`ghost`,size:`sm`,isDisabled:e.options.length===0,isLoading:n,onOpenChange:e=>{c(e),e||(o(``),d.current?.isConnected&&d.current.focus({preventScroll:!0}),d.current=null)},children:(s,c,d)=>(0,q.jsxs)(`div`,{className:`review-base-popup`,children:[(0,q.jsxs)(`label`,{className:`review-base-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:i(`gitReviewSearchBranches`)}),(0,q.jsx)(`input`,{ref:l,type:`search`,value:a,"aria-controls":f,placeholder:i(`gitReviewSearchBranches`),onChange:e=>o(e.currentTarget.value),onKeyDown:e=>{e.nativeEvent.isComposing||e.keyCode===229||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),d()):e.key===`ArrowDown`&&p.length&&!n&&(e.preventDefault(),u.current[0]?.focus()))}})]}),e.truncated&&(0,q.jsx)(`p`,{role:`status`,children:i(`gitReviewBranchesTruncated`)}),(0,q.jsxs)(`div`,{id:f,role:`listbox`,"aria-label":i(`gitReviewBaseBranch`),className:`review-base-options`,children:[p.map((e,a)=>(0,q.jsxs)(`button`,{type:`button`,disabled:n,role:`option`,"aria-selected":t===e.ref,title:e.ref,ref:e=>{u.current[a]=e},onClick:()=>{r(e.ref),d()},onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.keyCode===229)){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),d();else if(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?0:e.key===`End`?p.length-1:(a+(e.key===`ArrowDown`?1:p.length-1))%p.length;u.current[t]?.focus()}}},children:[(0,q.jsxs)(`span`,{children:[e.label,(0,q.jsx)(`small`,{children:e.ref.startsWith(`refs/heads/`)?i(`gitReviewLocalBranch`):i(`gitReviewRemoteBranch`)})]}),t===e.ref&&(0,q.jsx)(rs,{"aria-hidden":`true`})]},e.ref)),!p.length&&(0,q.jsx)(`p`,{role:`status`,children:i(`gitReviewNoMatchingBranches`)})]})]})})}function TJ(e,t){return{path:e,name:t,directories:new Map,files:[]}}function EJ({files:e,selectedPath:t,collapsed:n,searching:r,onToggle:i,onSelect:a,viewed:o,onViewedChange:s,viewedLimitReached:c=!1}){let{t:l}=W(),u=(0,K.useMemo)(()=>{let t=TJ(``,``);for(let n of e){let e=t;for(let t of n.path.split(`/`).slice(0,-1)){let n=e.path?`${e.path}/${t}`:t,r=e.directories.get(t);r||(r=TJ(n,t),e.directories.set(t,r)),e=r}e.files.push(n)}return t},[e]),d=(e,u)=>(0,q.jsxs)(`ul`,{children:[[...e.directories.values()].map(e=>{let t=e,a=t.name;for(;t.files.length===0&&t.directories.size===1;){let e=t.directories.values().next().value;if(!e)break;t=e,a+=`/${t.name}`}let o=t.path,s=r||!n.has(o);return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`button`,{type:`button`,className:`review-tree-directory`,style:{paddingLeft:8+u*10},title:o,"aria-expanded":s,disabled:r,onClick:()=>i(o),children:[(0,q.jsx)(os,{"aria-hidden":`true`,"data-open":s}),(0,q.jsx)(`span`,{children:a})]}),s&&d(t,u+1)]},e.path)}),e.files.map(e=>{let n=e.path.split(`/`).at(-1)??e.path,r=/\.(png|jpe?g|gif|webp|svg)$/iu.test(n)?qs:/\.(md|txt|log)$/iu.test(n)?Fs:js;return(0,q.jsxs)(`li`,{className:`review-tree-file-row`,children:[(0,q.jsxs)(`button`,{className:`session-review-file review-tree-file`,type:`button`,style:{paddingLeft:8+u*10},"data-review-file":e.path,title:e.path,"aria-label":e.path,"aria-description":l(`gitFileStatus_${e.status}`),"aria-current":t===e.path?`true`:void 0,onClick:()=>a(e.path),children:[(0,q.jsx)(r,{"aria-hidden":`true`,className:`review-tree-icon`}),(0,q.jsx)(`span`,{className:`review-tree-name`,children:n}),(0,q.jsx)(`span`,{className:`review-tree-status`,"aria-hidden":`true`,children:l(`gitFileStatus_${e.status}`)}),(0,q.jsx)(`span`,{className:`session-review-stats`,"aria-hidden":`true`,children:e.binary?(0,q.jsx)(`span`,{children:l(`gitReviewBinaryShort`)}):e.statsUnavailable?(0,q.jsx)(`span`,{title:l(`turnEditStatsUnknown`),children:`—`}):(0,q.jsxs)(q.Fragment,{children:[e.additions>0&&(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,e.additions]}),e.deletions>0&&(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`-`,e.deletions]})]})})]}),s&&(0,q.jsx)(`label`,{className:`review-viewed-control`,title:l(`gitReviewMarkViewed`,{path:e.path}),children:(0,q.jsx)(`input`,{type:`checkbox`,"aria-label":l(`gitReviewMarkViewed`,{path:e.path}),checked:o?.has(e.path)??!1,disabled:c&&!o?.has(e.path),onChange:t=>s(e.path,t.currentTarget.checked)})})]},e.path)})]});return(0,q.jsx)(`div`,{className:`session-review-list review-file-tree`,children:d(u,0)})}var DJ=20,OJ=200,kJ=[0,1,2,3];function AJ(e){return e.split(/[\\/]/u).at(-1)||e}function jJ(e,t){return e?e.reason===`not_git_repository`?t(`gitReviewNotRepository`):e.reason===`unborn_repository`?t(`gitReviewUnborn`):e.reason===`baseline_unavailable`?t(`gitReviewBaselineUnavailable`):e.reason===`base_branch_unavailable`?t(`gitReviewBaseUnavailable`):e.reason===`invalid_base_branch`?t(`gitReviewBaseInvalid`):t(`gitReviewFailed`):null}function MJ({review:e,initialFilePath:t,onClose:n,onOpenTools:r,embedded:i=!1,active:a=!0,onOpenFiles:o,readingScope:s,onReferenceLine:c}){let{t:l}=W(),u=be(),d=(0,K.useRef)(void 0);e.result?.branches?d.current=e.result.branches:e.result&&!e.loading&&(d.current=void 0);let f=e.result?.branches??(e.loading?d.current:void 0),p=`${s??e.source??`unstaged`}:${e.baseRef??``}`,m=u?.review?.scope===p?u.review:void 0,h=(0,K.useRef)(JSON.stringify([p,t])),g=(0,K.useRef)(null),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(new Set(m?.collapsedDirectories));(0,K.useEffect)(()=>{let e=g.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(([e])=>{e&&v(e.contentRect.width>=720)});return t.observe(e),()=>t.disconnect()},[]);let x=(0,K.useRef)(null),S=(0,K.useRef)(null),C=(0,K.useRef)(null),w=(0,K.useRef)(!0),T=(0,K.useRef)(!1),E=(0,K.useRef)(m?.listScroll??null),D=(0,K.useRef)(null),[O,k]=(0,K.useState)(m?.visibleFiles??DJ),[A,j]=(0,K.useState)(m?.query??``),[M,N]=(0,K.useState)(null),[P,F]=(0,K.useState)(m?m.selected:t??null),[I,ee]=(0,K.useState)(()=>m?.viewed?{scope:p,revision:m.viewed.revision,paths:new Set(m.viewed.paths.slice(0,OJ))}:null),L=(0,K.useRef)(m?{list:m.listScroll,preview:m.previewScroll}:null);(0,K.useLayoutEffect)(()=>{u&&(u.review={source:e.source??`unstaged`,baseRef:e.baseRef,scope:p,selected:P,query:A,collapsedDirectories:[...y],visibleFiles:O,listScroll:u.review?.scope===p?u.review.listScroll:0,previewScroll:u.review?.scope===p?u.review.previewScroll:0,viewed:I?.scope===p?{revision:I.revision,paths:[...I.paths].slice(0,OJ)}:void 0})},[u,e.source,e.baseRef,p,P,A,y,O,I]);let[R,te]=(0,K.useState)(null),[z,B]=(0,K.useState)(null),[ne,re]=(0,K.useState)(0),[ie,ae]=(0,K.useState)(()=>window.matchMedia?.(`(max-width: 1100px)`).matches??!1);(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 1100px)`);if(!e)return;let t=()=>ae(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,K.useEffect)(()=>{let e=JSON.stringify([p,t]);h.current!==e&&(h.current=e,w.current=!!t||!(document.activeElement instanceof Element&&document.activeElement.closest(`.review-base-picker, .review-base-popup`)),E.current=null,F(t??null),j(``),b(new Set),N(null),ee(null))},[t,p]);let oe=i?`section`:ie?`main`:`aside`,se=e.result?.ok?e.result.snapshot:null,ce=!e.historical&&P&&M&&M.comparison===(e.source??se?.comparison)?se?.revision===M.revision?se:M:se,le=!!(P&&ce&&se&&ce.revision!==se.revision);(0,K.useEffect)(()=>{P&&!M&&se&&N(se)},[P,M,se]);let H=e.source??ce?.comparison??`unstaged`,ue=jJ(e.result&&!e.result.ok?e.result:null,l),de=ce?.files.find(e=>e.path===P),fe=R?.source===H&&R?.revision===ce?.revision&&R?.file.path===P?R.file:de,pe=ce?.revision,he=I?.scope===p&&I.revision===pe?I.paths:new Set;(0,K.useEffect)(()=>{pe&&I&&(I.scope!==p||I.revision!==pe)&&ee(null)},[pe,p,I]);let ge=(e,t)=>{!pe||!ce?.files.some(t=>t.path===e)||ee(n=>{let r=new Set(n?.scope===p&&n.revision===pe?n.paths:[]);if(t){if(r.size>=OJ)return n;r.add(e)}else r.delete(e);return{scope:p,revision:pe,paths:r}})};(0,K.useLayoutEffect)(()=>{!a||!ce||!L.current||P&&fe?.diffLoaded===!1||(S.current&&(S.current.scrollTop=L.current.list),C.current&&(C.current.scrollTop=L.current.preview),L.current=null)},[a,ce,P,fe?.diffLoaded]);let _e=z?.source===H&&z?.path===P&&z?.revision===pe&&de?.diffLoaded===!1?z.message:null;(0,K.useEffect)(()=>{let t=de?.path;if(!a||!t||de?.diffLoaded!==!1||!e.readFile||!pe)return;let n=new AbortController;return B(null),e.readFile(t,n.signal,pe).then(e=>{n.signal.aborted||(e?te({source:H,revision:pe,file:e}):B({source:H,path:t,revision:pe,message:l(`gitReviewFileMissing`)}))},e=>{n.signal.aborted||B({source:H,path:t,revision:pe,message:e instanceof Error?e.message:l(`gitReviewFailed`)})}),()=>n.abort()},[de?.path,a,de?.diffLoaded,pe,H,e.readFile,ne,l]);let ve=(0,K.useMemo)(()=>(ce?.files??[]).filter(e=>e.path.toLocaleLowerCase().includes(A.toLocaleLowerCase())).sort((e,t)=>e.path.localeCompare(t.path,`en`,{numeric:!0})),[ce?.files,A]),ye=_?ve:ve.slice(0,O);(0,K.useEffect)(()=>{!_||P||!ce?.files.length||(w.current=!1,F(ce.files[0].path))},[_,P,ce]);let xe=Math.max(0,ve.length-ye.length),Se=ce?.listComplete===!1||ce?.listComplete===void 0&&ce?.truncated,Ce=Se||ce?.nextOffset!==void 0,we=e.historical?l(ce?.evidenceSource===`file-tools`?`turnEditsScope`:`turnChangesScope`):ce?ce.comparison===`session`?l(`gitReviewSessionSnapshot`):ce.comparison===`unstaged`?l(`gitReviewUnstaged`):ce.comparison===`staged`?l(`gitReviewStaged`):ce.baseBranch?l(`gitReviewComparison`,{current:ce.currentBranch??l(`gitReviewDetached`),base:ce.baseBranch.replace(/^refs\/(?:heads|remotes)\//u,``)}):l(`gitReviewWorkingTree`):null;(0,K.useEffect)(()=>{let e=a&&!T.current;T.current=a,a&&(!e&&!w.current||(w.current=!1,P?C.current?.focus():i?S.current?.focus():x.current?.focus()))},[a,i,P]);let Te=e=>{E.current=S.current?.scrollTop??null,e!==P&&(L.current={list:E.current??0,preview:0},C.current&&(C.current.scrollTop=0),u?.review?.scope===p&&(u.review.previewScroll=0)),w.current=!_,N(ce),F(e)};(0,K.useLayoutEffect)(()=>{let e=D.current;if(P||!e||!a)return;D.current=null;let t=S.current;if(!t?.isConnected||t.closest(`[hidden], [inert]`))return;let n=[...t.querySelectorAll(`[data-review-file]`)].find(t=>t.dataset.reviewFile===e);E.current!==null&&(t.scrollTop=E.current),n?n.focus({preventScroll:E.current!==null}):i?t.focus():x.current?.focus()},[a,i,P]);let Ee=()=>{let e=P,t=ve.findIndex(t=>t.path===e);t>=O&&k(Math.ceil((t+1)/DJ)*DJ),w.current=!1,D.current=e,F(null),N(null)};return(0,q.jsxs)(oe,{ref:g,className:`review-panel${i?` embedded`:``}${_?` review-wide`:``}`,"aria-label":l(`changeEvidence`),"aria-busy":e.loading||void 0,onKeyDown:e=>{e.key!==`Escape`||e.nativeEvent.isComposing||e.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.defaultPrevented||(!P||_)&&i||(e.preventDefault(),e.stopPropagation(),P&&!_?Ee():i||n())},children:[(0,q.jsxs)(`div`,{className:`review-source-picker`,children:[e.setSource&&(0,q.jsxs)(`label`,{children:[l(`gitReviewSource`),` `,(0,q.jsxs)(`select`,{value:e.historical?`turn`:e.source??`unstaged`,onChange:t=>e.setSource?.(t.currentTarget.value),children:[e.historical&&(0,q.jsx)(`option`,{value:`turn`,children:l(`turnChangesReview`)}),(0,q.jsx)(`option`,{value:`unstaged`,children:l(`gitReviewUnstaged`)}),(0,q.jsx)(`option`,{value:`staged`,children:l(`gitReviewStaged`)}),(0,q.jsx)(`option`,{value:`branch`,children:l(`gitReviewBranch`)}),(0,q.jsx)(`option`,{value:`session`,children:l(`gitReviewSessionSnapshot`)})]})]}),e.source===`branch`&&e.setBaseRef&&f&&(0,q.jsx)(wJ,{branches:f,value:e.baseRef??(e.result?.ok?e.result.snapshot.baseBranch??void 0:void 0),loading:e.loading,onChange:e.setBaseRef}),we&&(!e.setSource||e.historical||ce?.comparison===`branch`)&&(0,q.jsx)(`span`,{className:`review-source-summary`,title:we,children:we}),(0,q.jsxs)(`div`,{className:`review-source-actions`,children:[o&&(0,q.jsx)(`button`,{type:`button`,onClick:o,children:l(`sessionFileRecords`)}),(0,q.jsx)(V,{content:l(`gitReviewRefresh`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":l(`gitReviewRefresh`),disabled:e.loading,"aria-busy":e.loading||void 0,onClick:()=>{e.loading||e.refresh()},children:(0,q.jsx)(me,{"aria-hidden":`true`})})})]})]}),le&&(0,q.jsxs)(`div`,{className:`review-update`,role:`status`,children:[(0,q.jsx)(`span`,{children:l(`gitReviewNewVersion`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{C.current?.focus(),N(se),te(null)},children:l(`gitReviewShowLatest`)})]}),(e.error||ue)&&(0,q.jsx)(mJ,{status:`error`,container:`section`,title:e.error||ue,description:ce?l(`gitReviewOlderResult`):void 0,className:`review-banner`,endContent:(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:l(`gitReviewRetry`),isDisabled:e.loading,isLoading:e.loading,onClick:()=>{e.loading||e.refresh()}})}),(0,q.jsxs)(`div`,{className:`review-workspace`,children:[P&&(0,q.jsxs)(`div`,{className:`review-file-screen`,children:[(0,q.jsxs)(`header`,{className:`review-file-header`,children:[!_&&(0,q.jsx)(Br,{label:l(`gitReviewBackToFiles`),variant:`ghost`,size:`sm`,isIconOnly:!0,icon:(0,q.jsx)(Ko,{"aria-hidden":`true`}),onClick:Ee}),(0,q.jsxs)(`div`,{className:`review-file-heading`,children:[(0,q.jsx)(`strong`,{title:P,children:AJ(P)}),(0,q.jsx)(`span`,{title:P,children:P})]}),fe&&pe&&(0,q.jsxs)(`label`,{className:`review-file-viewed`,children:[(0,q.jsx)(`input`,{type:`checkbox`,"aria-label":l(`gitReviewMarkCurrentViewed`,{path:P}),checked:he.has(P),disabled:he.size>=OJ&&!he.has(P),onChange:e=>ge(P,e.currentTarget.checked)}),(0,q.jsx)(`span`,{children:l(`gitReviewViewedLabel`)})]}),!i&&(0,q.jsxs)(`div`,{className:`review-file-actions`,children:[r&&(0,q.jsx)(Br,{label:l(`openTools`),variant:`ghost`,size:`sm`,isIconOnly:!0,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:r}),(0,q.jsx)(Br,{label:l(`close`),variant:`ghost`,size:`sm`,isIconOnly:!0,icon:(0,q.jsx)(je,{"aria-hidden":`true`}),onClick:n})]})]}),(0,q.jsxs)(`div`,{className:`review-file-toolbar`,children:[(0,q.jsx)(`div`,{className:`review-file-context`,children:fe&&(0,q.jsx)(`span`,{children:l(`gitFileStatus_${fe.status}`)})}),(0,q.jsxs)(tj,{gap:2,align:`center`,className:`session-review-stats`,children:[fe&&!fe.binary&&!fe.statsUnavailable&&fe.additions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-additions`,children:[`+`,fe.additions]}),fe&&!fe.binary&&!fe.statsUnavailable&&fe.deletions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-deletions`,children:[`-`,fe.deletions]})]})]}),(0,q.jsx)(`section`,{ref:C,className:`review-file-preview`,"aria-label":l(`gitReviewFilePreview`,{file:P}),tabIndex:-1,onScroll:e=>{u?.review&&(u.review.previewScroll=e.currentTarget.scrollTop)},children:fe?_e?(0,q.jsxs)(`div`,{role:`alert`,children:[(0,q.jsx)(`p`,{children:_e}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>re(e=>e+1),children:l(`retryAdmissionCheck`)})]}):fe.diffLoaded===!1&&e.readFile?(0,q.jsx)(`p`,{role:`status`,children:l(`gitReviewLoading`)}):fe.binary?(0,q.jsx)(gJ,{icon:(0,q.jsx)(js,{"aria-hidden":`true`}),title:l(`gitReviewBinary`),isCompact:!0}):fe.statsUnavailable?(0,q.jsx)(gJ,{icon:(0,q.jsx)(js,{"aria-hidden":`true`}),title:l(`turnEditStatsUnknown`),description:l(`turnEditReason_${fe.statsUnavailable}`),isCompact:!0}):fe.diff?(0,q.jsxs)(q.Fragment,{children:[fe.diffTruncated&&(0,q.jsx)(`p`,{className:`review-hidden-lines`,children:l(`gitReviewDiffTruncated`)}),(0,q.jsx)(lK,{file:fe,onReferenceLine:c})]}):(0,q.jsx)(gJ,{icon:(0,q.jsx)(js,{"aria-hidden":`true`}),title:l(fe.diffTruncated?`gitReviewDiffTruncated`:`gitReviewNoDiff`),description:fe.diffTruncated?l(`gitReviewDiffTruncated`):void 0,isCompact:!0}):(0,q.jsx)(`p`,{role:`status`,children:l(e.loading?`gitReviewLoading`:`gitReviewFileMissing`)})})]}),(!P||_)&&(0,q.jsxs)(`div`,{className:`review-navigation`,children:[!i&&!_&&(0,q.jsxs)(`header`,{className:`review-heading`,children:[(0,q.jsx)(`div`,{children:(0,q.jsxs)(`h2`,{children:[(0,q.jsx)(Ms,{"aria-hidden":`true`}),` `,l(`changeEvidence`)]})}),(0,q.jsxs)(`div`,{className:`review-heading-actions`,children:[r&&(0,q.jsx)(V,{content:l(`openTools`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":l(`openTools`),onClick:r,children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:l(`close`),placement:`below`,children:(0,q.jsx)(`button`,{ref:x,type:`button`,className:`icon-button review-close`,"aria-label":l(`close`),onClick:n,children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]})]}),(0,q.jsxs)(`div`,{ref:S,onScroll:e=>{u?.review&&(u.review.listScroll=e.currentTarget.scrollTop)},className:`review-body`,tabIndex:i?-1:void 0,children:[ce&&(0,q.jsxs)(nj,{gap:1,align:`stretch`,className:`review-summary`,children:[(0,q.jsxs)(tj,{gap:3,align:`center`,justify:`between`,children:[(0,q.jsx)(jt,{type:`label`,children:l(Se?`gitReviewLoadedCount`:`filesChanged`,{count:Se?ce.files.length:ce.totalFiles??ce.files.length})}),ce.nextOffset!==void 0&&!Se&&(0,q.jsx)(jt,{type:`supporting`,color:`secondary`,children:l(`gitReviewLoadedCount`,{count:ce.files.length})}),!Se&&!ce.truncated&&ce.nextOffset===void 0&&(ce.additions>0||ce.deletions>0)&&!ce.files.some(e=>e.binary||e.statsUnavailable||e.status===`untracked`&&e.diffLoaded===!1)&&(0,q.jsxs)(tj,{gap:2,align:`center`,className:`review-summary-counts`,"aria-hidden":`true`,children:[ce.additions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-additions`,children:[`+`,ce.additions]}),ce.deletions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-deletions`,children:[`-`,ce.deletions]})]})]}),he.size>=OJ&&(0,q.jsx)(jt,{type:`supporting`,color:`secondary`,children:l(`gitReviewViewedLimit`,{count:OJ})})]}),e.loading&&!ce&&(0,q.jsxs)(`div`,{className:`review-loading`,role:`status`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:l(`gitReviewLoading`)}),(0,q.jsxs)(nj,{gap:2,align:`stretch`,"aria-hidden":`true`,children:[(0,q.jsx)(CJ,{width:`42%`,height:16,radius:`rounded`,index:0}),(0,q.jsx)(`div`,{className:`review-loading-list`,children:kJ.map(e=>(0,q.jsx)(CJ,{width:`100%`,height:36,radius:0,index:e+1},e))})]})]}),ce?.truncated&&(0,q.jsx)(mJ,{status:`info`,title:l(`gitReviewTruncated`),className:`review-banner`}),ce&&ce.files.length>0&&(0,q.jsxs)(`label`,{className:`review-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:l(Ce?`gitReviewSearchLoaded`:`gitReviewSearch`)}),(0,q.jsx)(`input`,{type:`search`,value:A,placeholder:l(Ce?`gitReviewSearchLoaded`:`gitReviewSearch`),onChange:e=>{j(e.target.value),k(DJ)}})]}),A&&ve.length===0&&(0,q.jsx)(`p`,{className:`review-search-empty`,role:`status`,children:l(Ce?`gitReviewNoLoadedMatch`:`gitReviewNoMatch`)}),ce&&ce.files.length===0&&(0,q.jsx)(gJ,{icon:(0,q.jsx)(Ws,{"aria-hidden":`true`}),title:l(`gitReviewEmpty`),isCompact:!0,className:`review-empty`}),ye.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(EJ,{files:ye,selectedPath:P,collapsed:y,searching:!!A,onToggle:e=>b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onSelect:Te,viewed:he,onViewedChange:ge,viewedLimitReached:he.size>=OJ}),xe>0&&(0,q.jsx)(`div`,{className:`session-review-more`,children:(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,width:`100%`,label:l(`gitReviewShowMore`,{count:Math.min(DJ,xe)}),onClick:()=>k(e=>Math.min(e+DJ,ve.length))})})]}),ce?.nextOffset!==void 0&&e.loadMore&&(0,q.jsx)(`div`,{className:`session-review-more`,children:(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,width:`100%`,label:l(`gitReviewLoadNext`),isLoading:e.loading,isDisabled:e.loading,onClick:()=>{e.loadMore?.()}})})]})]})]})]})}function NJ(e,t,n,r){let{t:i}=W(),a=(0,K.useMemo)(()=>new de,[]),[o,s]=(0,K.useState)(0),[c,l]=(0,K.useState)({identity:``,result:null,error:null}),u=JSON.stringify([e,t,r,o]);(0,K.useEffect)(()=>{if(!r)return;let o=new AbortController;return a.turnChanges(e,t,r,o.signal).then(t=>{if(o.signal.aborted)return;if(!t.ok||t.changes.sessionId!==e||t.changes.promptEntryId!==r||t.changes.state===`unavailable`){l({identity:u,result:null,error:i(`turnChangesUnavailable`)});return}let a=t.changes;l({identity:u,error:null,result:{ok:!0,snapshot:{...a.source?{evidenceSource:a.source}:{},...a.fileCount===null?{}:{totalFiles:a.fileCount,listComplete:!0},repositoryRoot:n,currentBranch:null,baseBranch:null,comparison:`session`,revision:u,files:a.files,additions:a.additions,deletions:a.deletions,truncated:a.state===`partial`}}})},()=>{o.signal.aborted||l({identity:u,result:null,error:i(`turnChangesUnavailable`)})}),()=>o.abort()},[a,e,t,r,u,n,i]);let d=(0,K.useCallback)(async()=>s(e=>e+1),[]);return{result:c.identity===u?c.result:null,error:c.identity===u?c.error:null,loading:!!r&&c.identity!==u,refresh:d,historical:!0}}function PJ(e,t,n){let r=(0,K.useRef)({onState:t,onOpen:n});r.current={onState:t,onOpen:n};let[i,a]=(0,K.useState)(),[o,s]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let t=()=>{let e=document.documentElement.dataset.openpiBrowserExtension===`ready`;s(e),e||a(void 0)};t();let n=new MutationObserver(t);n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-openpi-browser-extension`]});let i=t=>{if(t.source!==window||t.origin!==location.origin)return;let n=t.data;if(!n||n.source!==`openpi-browser-extension`||n.id!==e)return;if(n.type===`lost`){a(void 0);return}if(typeof n.url!=`string`)return;let i=Yq(n.url,location.origin);if(i&&(n.type===`open`&&r.current.onOpen(i),n.type===`state`&&typeof n.title==`string`)){let t={id:e,document:typeof n.document==`string`?n.document:void 0,url:i,title:n.title.slice(0,256),canGoBack:n.canGoBack===!0,canGoForward:n.canGoForward===!0};a(t),r.current.onState(t)}};return window.addEventListener(`message`,i),()=>{n.disconnect(),window.removeEventListener(`message`,i)}},[e]),{ready:o,page:o&&i?.id===e?i:void 0,command:t=>window.postMessage({source:`openpi-browser-ui`,type:`command`,id:e,action:t},location.origin)}}var FJ=8;function IJ({onTitle:e,onOpen:t,initialUrl:n=``,readingId:r}){let{t:i}=W(),a=(0,K.useId)(),o=(0,K.useRef)(null),s=be(),c=s?.browser?.pages[r],[l,u]=(0,K.useState)(c?.draft??n),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)({history:c?.history??(n?[n]:[]),index:c?.index??(n?0:-1),revision:0,loaded:!1,unknown:!1}),h=p.history[p.index],g=(0,K.useRef)(h);(0,K.useLayoutEffect)(()=>{s?.browser&&(s.browser.pages[r]={draft:l,history:p.history.map((e,t)=>t===p.index?g.current??e:e),index:p.index})},[s,r,l,p]);let _=`${a}-${p.revision}`,v=PJ(_,t=>{g.current=t.url;let n=s?.browser?.pages[r];n&&(n.history=n.history.map((e,r)=>r===n.index?t.url:e)),document.activeElement!==o.current&&u(t.url),e(t.title||new URL(t.url).host)},t),y=v.page?.url??h,b=(t,n)=>{let r=t[n];r&&(g.current=r,m(e=>({history:t,index:n,revision:e.revision+1,loaded:!1,unknown:!1})),u(r),f(null),e(new URL(r).host))};return(0,q.jsxs)(`div`,{className:`browser-tool browser-direct-tool`,children:[(0,q.jsxs)(`form`,{className:`browser-toolbar`,onSubmit:e=>{e.preventDefault();let t=Yq(l,window.location.origin);if(!t){f(i(`browserAddressNotAllowed`));return}if(t===h)b(p.history,p.index);else{let e=[...p.history.slice(0,p.index+1),t].slice(-64);b(e,e.length-1)}},children:[(0,q.jsxs)(`div`,{className:`browser-navigation`,children:[(0,q.jsx)(V,{content:i(`browserBack`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`browserBack`),disabled:v.page?!v.page.canGoBack:p.unknown||p.index<=0,onClick:()=>v.page?v.command(`back`):b(p.history,p.index-1),children:(0,q.jsx)(Ko,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:i(`browserForward`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`browserForward`),disabled:v.page?!v.page.canGoForward:p.unknown||p.index>=p.history.length-1,onClick:()=>v.page?v.command(`forward`):b(p.history,p.index+1),children:(0,q.jsx)(qo,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:i(`browserReload`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`browserReload`),disabled:!h,onClick:()=>v.page?v.command(`reload`):b(p.history,p.index),children:(0,q.jsx)(me,{"aria-hidden":`true`})})})]}),(0,q.jsx)(`input`,{ref:o,"aria-label":i(`browserAddress`),title:i(v.page?`browserAddress`:`browserEnteredAddress`),value:l,placeholder:`https://`,spellCheck:!1,onChange:e=>{u(e.currentTarget.value),f(null)}}),(0,q.jsx)(V,{content:i(`browserGo`),placement:`below`,children:(0,q.jsx)(`button`,{type:`submit`,"aria-label":i(`browserGo`),disabled:!l.trim(),children:(0,q.jsx)(qo,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:i(`openExternalBrowser`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`openExternalBrowser`),disabled:!y||!v.page&&p.unknown,onClick:()=>y&&window.open(y,`_blank`,`noopener,noreferrer`),children:(0,q.jsx)(Os,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`div`,{className:`browser-feedback`,children:[d&&(0,q.jsx)(`p`,{className:`workbar-error`,role:`alert`,children:d}),p.unknown&&!v.page&&(0,q.jsx)(`p`,{className:`browser-notice`,role:`status`,children:i(`browserLocationUnknown`)})]}),(0,q.jsx)(`div`,{className:`browser-direct-viewport`,children:h?(0,q.jsx)(`iframe`,{"data-openpi-browser-page":_,"data-openpi-browser-document":v.page?.document,"data-openpi-browser-url":v.page?.url,"data-openpi-browser-title":v.page?.title,src:h,title:i(`browserPageTitle`,{address:new URL(h).host}),referrerPolicy:`no-referrer`,sandbox:`allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox`,onLoad:()=>m(e=>e.revision===p.revision?{...e,loaded:!0,unknown:e.loaded}:e)},p.revision):(0,q.jsxs)(`div`,{className:`workbar-empty`,children:[(0,q.jsx)(Es,{"aria-hidden":`true`}),(0,q.jsx)(`strong`,{children:i(`browserReady`)}),(0,q.jsx)(`p`,{children:i(`browserDirectDescription`)})]})}),(0,q.jsx)(`p`,{className:`browser-notice`,children:i(v.ready?`browserEnhancedHint`:`browserDirectHint`)})]})}function LJ({onReady:e}={}){let{t}=W(),n=(0,K.useId)(),r=be(),[i,a]=(0,K.useState)(r?.browser?.tabs??[{id:0,title:``}]),o=(0,K.useRef)(Math.max(...i.map(e=>e.id))+1),s=(0,K.useRef)(i);s.current=i;let[c,l]=(0,K.useState)(),[u,d]=(0,K.useState)(r?.browser?.selected??0);(0,K.useLayoutEffect)(()=>{r&&(r.browser={tabs:i,selected:u,pages:r.browser?.pages??{}})},[r,i,u]);let f=e=>{requestAnimationFrame(()=>document.getElementById(`${n}-tab-${e}`)?.focus())},p=(e=``)=>{if(s.current.length>=FJ){e&&l(e);return}let t={id:o.current++,title:e?new URL(e).host:``,initialUrl:e},r=[...s.current,t];return s.current=r,a(r),d(t.id),l(void 0),f(t.id),`${n}-page-${t.id}`},m=(0,K.useRef)(p);m.current=p,(0,K.useEffect)(()=>(e?.(e=>m.current(e)),()=>e?.(void 0)),[e]);let h=e=>{r?.browser&&delete r.browser.pages[e],l(void 0);let t=i.filter(t=>t.id!==e);if(!t.length){let e={id:o.current++,title:``};a([e]),d(e.id),f(e.id)}else if(a(t),u===e){let n=i.findIndex(t=>t.id===e),r=t[Math.min(n,t.length-1)];d(r.id),f(r.id)}};return(0,q.jsxs)(`div`,{className:`browser-workspace`,children:[(0,q.jsxs)(`div`,{className:`browser-tabs-header`,children:[(0,q.jsx)(`div`,{role:`tablist`,"aria-label":t(`browserTabs`),className:`browser-tabs`,onKeyDown:e=>{if(!(e.target instanceof HTMLElement)||e.target.getAttribute(`role`)!==`tab`)return;let t=e.target.id,r=i.findIndex(e=>`${n}-tab-${e.id}`===t),a=r;if(e.key===`ArrowRight`)a=(r+1)%i.length;else if(e.key===`ArrowLeft`)a=(r+i.length-1)%i.length;else if(e.key===`Home`)a=0;else if(e.key===`End`)a=i.length-1;else if(e.key===`Delete`){e.preventDefault(),e.stopPropagation(),h(i[r].id);return}else return;e.preventDefault(),e.stopPropagation(),d(i[a].id),f(i[a].id)},children:i.map(e=>(0,q.jsxs)(`div`,{className:`browser-tab`,"data-active":e.id===u,children:[(0,q.jsxs)(`button`,{type:`button`,role:`tab`,id:`${n}-tab-${e.id}`,"aria-selected":e.id===u,"aria-controls":`${n}-page-${e.id}`,tabIndex:e.id===u?0:-1,onClick:()=>d(e.id),children:[(0,q.jsx)(Es,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:e.title||t(`browserNewTab`)})]}),(0,q.jsx)(V,{content:t(`close`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":t(`browserCloseTab`,{title:e.title||t(`browserNewTab`)}),onClick:()=>h(e.id),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},e.id))}),(0,q.jsx)(V,{content:i.length>=FJ?t(`browserTabLimit`,{count:FJ}):t(`browserAddTab`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`browser-add-tab`,"aria-label":t(`browserAddTab`),disabled:i.length>=FJ,onClick:()=>p(),children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})})]}),c&&(0,q.jsxs)(`p`,{className:`browser-notice`,role:`status`,children:[t(`browserTabLimit`,{count:FJ}),` ·`,` `,(0,q.jsx)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,children:t(`openExternalBrowser`)})]}),(0,q.jsx)(`div`,{className:`browser-pages`,children:i.map(e=>(0,q.jsx)(`div`,{role:`tabpanel`,id:`${n}-page-${e.id}`,"aria-labelledby":`${n}-tab-${e.id}`,className:`browser-page`,hidden:u!==e.id,children:(0,q.jsx)(IJ,{readingId:e.id,initialUrl:e.initialUrl,onOpen:p,onTitle:t=>a(n=>n.map(n=>n.id===e.id?{...n,title:t}:n))})},e.id))})]})}function RJ(e){return e.startsWith(`terminal:`)?`terminal`:e}function zJ(e){return e===`launcher`?{tabs:[],active:null,launcherOpen:!0,activationHistory:[]}:{tabs:[e],active:e,launcherOpen:!1,activationHistory:[e]}}function BJ(e,t){return t===`launcher`?{...e,launcherOpen:!0}:{tabs:e.tabs.includes(t)?e.tabs:[...e.tabs,t],active:t,launcherOpen:!1,activationHistory:[...e.activationHistory.filter(e=>e!==t),t]}}function VJ(e,t){return e.tabs.includes(t)?BJ(e,t):e}function HJ(e,t){if(!e.tabs.includes(t))return e;let n=e.tabs.filter(e=>e!==t),r=e.activationHistory.filter(e=>e!==t);if(e.active!==t)return{...e,tabs:n,activationHistory:r};let i=r.at(-1),a=e.tabs.indexOf(t),o=n[Math.min(a,n.length-1)],s=i??o??null;return{tabs:n,active:s,launcherOpen:e.launcherOpen||s===null,activationHistory:r}}function UJ(e){return{...e,launcherOpen:e.active===null}}var WJ=[{kind:`side-conversation`,icon:cc,title:`sideConversation`,description:`sideConversationDescription`},{kind:`review`,icon:Ms,title:`changeEvidence`,description:`workbarChangesDescription`},{kind:`terminal`,icon:Lc,title:`terminal`,description:`workbarTerminalDescription`},{kind:`browser`,icon:Es,title:`browser`,description:`workbarBrowserDescription`},{kind:`files`,icon:zs,title:`files`,description:`workbarFilesDescription`},{kind:`sources`,icon:Qs,title:`sessionSources`,description:`sourcesDescription`}];function GJ({onSelect:e}){let{t}=W();return(0,q.jsx)(`section`,{className:`workbar-launcher`,"aria-label":t(`openTools`),children:(0,q.jsx)(`div`,{className:`workbar-launcher-list`,children:WJ.map(n=>{let r=n.icon;return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>e(n.kind),children:[(0,q.jsx)(r,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:t(n.title)}),(0,q.jsx)(`small`,{children:t(n.description)})]}),(0,q.jsx)(os,{"aria-hidden":`true`})]},n.kind)})})})}function KJ({sessionId:e,cwd:t,snapshot:n,activity:r}){let{t:i}=W(),a=(0,K.useMemo)(()=>new de,[]),o=be(),[s,c]=(0,K.useState)(o?.sideConversation?.selectedId??null),[l,u]=(0,K.useState)(o?.sideConversation?.drafts??{});(0,K.useLayoutEffect)(()=>{o&&(o.sideConversation={selectedId:s,drafts:l})},[o,s,l]);let d=l[s??``]??``,f=(0,K.useRef)(0),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(!1),y=(0,K.useRef)(!1),[b,x]=(0,K.useState)(null),[S,C]=(0,K.useState)(0),[w,T]=(0,K.useState)(null),E=(0,K.useRef)(null);(0,K.useEffect)(()=>()=>E.current?.abort(),[]);let D=(r?.items??[]).filter(e=>e.origin===`btw`),O=D.find(e=>e.id===s),k=O?.status??w,A=p?.id===s?p:null,j=n?.models.find(e=>s?`${e.provider}/${e.id}`===A?.model:e.current),M=s?A?.model:j&&`${j.provider}/${j.id}`,N=j?.name||j?.id||M||i(`usageUnknown`),P=!s&&n?.thinking?.supported?n.thinking.level:void 0,F=A?.cwd??t,I=n?.workspaces.find(e=>e.path===F)?.name??MD(F),ee=i(s?`continueSideConversation`:`startSideConversation`),L=i(_?`sideConversationPending`:s?`send`:`start`),R=e=>{f.current++,c(e),T(null),x(null),g(null)},te=async t=>{t.preventDefault();let n=d.trim();if(!n||y.current)return;y.current=!0,E.current?.abort();let r=new AbortController,o=f.current,l=s??``;E.current=r,v(!0),x(null);try{let t=await a.subagentAction(e,s?{kind:`subagents`,action:`send-btw`,id:s,text:n}:{kind:`subagents`,action:`spawn-btw`,prompt:n},r.signal);if(r.signal.aborted)return;if(t.sessionId!==e||s&&t.detail.id!==s)throw Error(i(`inspectionChanged`));if(u(e=>e[l]===d?{...e,[l]:``}:e),o!==f.current)return;c(t.detail.id),T(t.detail.status),C(e=>e+1)}catch(e){!r.signal.aborted&&o===f.current&&x(e instanceof Error?e.message:i(`inspectionUnavailable`))}finally{r.signal.aborted||(y.current=!1,v(!1))}},z=async()=>{if(!s||y.current)return;y.current=!0,E.current?.abort();let t=new AbortController,n=f.current;E.current=t,v(!0),x(null);try{let r=await a.subagentAction(e,{kind:`subagents`,action:`cancel-btw`,id:s},t.signal);if(t.signal.aborted||n!==f.current)return;if(r.sessionId!==e||r.detail.id!==s)throw Error(i(`inspectionChanged`));T(r.detail.status),C(e=>e+1)}catch(e){!t.signal.aborted&&n===f.current&&x(e instanceof Error?e.message:i(`inspectionUnavailable`))}finally{t.signal.aborted||(y.current=!1,v(!1))}};return(0,q.jsxs)(`div`,{className:`side-conversation-body`,children:[s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`button`,{type:`button`,className:`workbar-back`,onClick:()=>R(null),children:[(0,q.jsx)(Ko,{"aria-hidden":`true`}),` `,i(`backToSideConversations`)]}),(0,q.jsx)(wq,{sessionId:e,id:s,activity:O,client:a,liveAvailable:!0,refreshRevision:S,fullView:!1,readOnlyNote:!1,onDetail:e=>m({id:e.id,cwd:e.cwd,model:e.model})},`${e}:${s}`)]}):(0,q.jsxs)(`div`,{className:`side-conversation-list`,"data-empty":D.length===0,children:[(0,q.jsxs)(`div`,{className:`side-conversation-intro`,children:[(0,q.jsx)(cc,{"aria-hidden":`true`}),(0,q.jsx)(`h3`,{children:i(`sideConversation`)}),(0,q.jsx)(`p`,{children:i(`sideConversationDescription`)})]}),D.length>0&&(0,q.jsx)(`ul`,{children:D.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,onClick:()=>R(e.id),children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.title||e.id}),(0,q.jsx)(`small`,{children:i(`subagentState_${e.status}`)})]}),(0,q.jsx)(os,{"aria-hidden":`true`})]})},e.id))})]}),b&&(0,q.jsx)(`p`,{className:`workbar-error`,role:`alert`,children:b}),(0,q.jsx)(`div`,{className:`composer-dock`,children:(0,q.jsxs)(`form`,{className:`composer composer-m02 side-conversation-composer`,onSubmit:te,"aria-busy":_,children:[(0,q.jsx)(`textarea`,{rows:1,value:d,disabled:_,"aria-label":ee,placeholder:ee,onChange:e=>{let t=e.currentTarget.value;u(e=>({...e,[s??``]:t}))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.defaultPrevented&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),(0,q.jsxs)(`div`,{className:`composer-toolbar`,children:[(0,q.jsxs)(`div`,{className:`composer-toolbar-context`,children:[(0,q.jsx)(V,{content:i(`fileReference`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-context-trigger icon-button`,"aria-label":i(`addContext`),disabled:_,onClick:()=>g({key:s??``,generation:f.current}),children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})}),(0,q.jsxs)(`span`,{className:`composer-workspace-label`,title:F,children:[(0,q.jsx)(Vs,{"aria-hidden":`true`}),` `,I]})]}),(0,q.jsxs)(`div`,{className:`composer-toolbar-controls`,children:[(0,q.jsx)(`div`,{className:`model-picker-wrap`,children:(0,q.jsx)(tk,{className:`model-selector model-picker`,label:`${i(`model`)}: ${N}`,isLabelHidden:!0,value:M??``,triggerLabel:(0,q.jsxs)(`span`,{className:`model-thinking-label`,title:M||N,children:[(0,q.jsx)(`span`,{className:`model-picker-label`,children:N}),P&&(0,q.jsx)(`span`,{className:`model-picker-thinking`,children:P[0].toUpperCase()+P.slice(1)})]}),variant:`ghost`,size:`sm`,placement:`above`,alignment:`end`,isDisabled:!M,children:()=>(0,q.jsxs)(`div`,{className:`side-conversation-model-details`,children:[(0,q.jsx)(`strong`,{children:N}),(0,q.jsx)(`code`,{children:M}),(0,q.jsx)(`p`,{children:i(s?`sideConversationModelFixed`:`sideConversationModelInherited`)})]})},s??`new`)}),s&&k===`running`&&(0,q.jsx)(V,{content:i(`stop`),children:(0,q.jsx)(`button`,{type:`button`,className:`send-button`,"aria-label":i(`stop`),disabled:_,onClick:()=>void z(),children:(0,q.jsx)(Rc,{"aria-hidden":`true`})})}),(!s||k!==`running`||!!d.trim())&&(0,q.jsx)(V,{content:L,children:(0,q.jsx)(`button`,{type:`submit`,className:`send-button`,disabled:_||!d.trim(),"aria-label":L,children:(0,q.jsx)(Xo,{"aria-hidden":`true`})})})]})]})]})}),(0,q.jsx)(XO,{open:h!==null,sessionId:e,onClose:()=>g(null),onInsert:e=>{if(!h||h.generation!==f.current||h.key!==(s??``)||y.current)return i(`fileReferenceDraftChanged`);let t=h.key;u(n=>({...n,[t]:`${n[t]??``}${n[t]?` -`:``}${ZO(e)}`}))}})]})}function qJ({sessionId:e,cwd:t,tabId:n,active:r,onConnectionChange:i}){let{t:a}=W(),o=be(),s=(0,K.useRef)(null),c=(0,K.useRef)(i);c.current=i;let l=(0,K.useRef)(!0),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let e=!1;l.current=!0;let t=e=>{let t=e.target;t instanceof Element&&!s.current?.contains(t)&&!t.matches(`.workbar-tab[data-active] > button:first-child`)&&(l.current=!1)};document.addEventListener(`focusin`,t);let r=o?.terminals?.[n]?.id??null;return c.current({id:r,pending:!0}),Ee(()=>import(`./app-InteractiveTerminal.js`).then(t=>{e||d(()=>t.InteractiveTerminal)},()=>{e||(p(!0),c.current({id:r,pending:!1}))}),__vite__mapDeps([31,1,2,0,32,6])),()=>{e=!0,document.removeEventListener(`focusin`,t)}},[o,n]),(0,q.jsx)(`div`,{className:`terminal-workspace`,ref:s,children:u?(0,q.jsx)(u,{sessionId:e,cwd:t,tabId:n,active:r,canFocusOnMount:()=>l.current,onConnectionChange:i}):(0,q.jsx)(`section`,{className:`interactive-terminal`,"aria-label":a(`terminal`),children:(0,q.jsxs)(`div`,{className:`interactive-terminal-notice`,"aria-live":`polite`,children:[(0,q.jsx)(`span`,{className:f?`error`:void 0,children:a(f?`terminalLoadError`:`terminalConnecting`)}),f&&(0,q.jsxs)(`button`,{type:`button`,className:`terminal-reconnect-action`,onClick:()=>window.location.reload(),children:[(0,q.jsx)(me,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a(`reloadPage`)})]})]})})})}function JJ({visible:e,requestedTool:t,requestRevision:n,sessionId:r,sessionPath:i,cwd:a,snapshot:o,capabilities:s,review:c,reviewInitialFilePath:l,reviewTurn:u,onWorkspaceReview:d,conversationCollapsed:f,onRestoreConversation:p,onExpandReview:m,onClose:h,onActiveToolChange:g,canControl:_=!0,onActivateSession:v,readingState:y,onReferenceLine:b,onBrowserReady:x}){let{t:S}=W(),C=(0,K.useRef)({}),w=y??C.current;w.terminal&&!w.terminals?.terminal&&((w.terminals??={}).terminal=w.terminal,w.terminal=void 0);let[T,E]=(0,K.useState)(()=>w?.tabs?w.requestRevision===n?w.tabs:BJ(w.tabs,t):zJ(t)),D=JSON.stringify([r,i]),O=(0,K.useRef)(new Map),k=(0,K.useRef)(null),A=(0,K.useRef)(null),M=(0,K.useRef)(null),N=(0,K.useMemo)(()=>new de,[]),[P,F]=(0,K.useState)({}),[I,ee]=(0,K.useState)([]),L=(0,K.useRef)(new Set),R=(0,K.useRef)(0);(0,K.useEffect)(()=>()=>{R.current++},[]);let[te,B]=(0,K.useState)(null),[ne,re]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(``),[oe,se]=(0,K.useState)(()=>Object.fromEntries(Object.entries(w.terminals??{}).flatMap(([e,t])=>t.title?[[e,t.title]]:[]))),ce=e=>oe[e]??(e===`terminal`?S(`terminal`):`${S(`terminal`)} ${T.tabs.filter(e=>RJ(e)===`terminal`).indexOf(e)+1}`);(0,K.useLayoutEffect)(()=>{let t=M.current;if(M.current=null,!t||t.scope!==D||!e||(t.tool?T.launcherOpen||T.active!==t.tool:!T.launcherOpen))return;let n=requestAnimationFrame(()=>{let e=t.tool?O.current.get(t.tool):k.current;!e?.isConnected||e.closest(`[hidden], [inert]`)||document.activeElement!==document.body&&!e.closest(`.workbar-panel`)?.contains(document.activeElement)&&!document.getElementById(k.current?.getAttribute(`aria-controls`)??``)?.contains(document.activeElement)||e.focus({preventScroll:!0})});return()=>cancelAnimationFrame(n)},[T,D,e]);let le=e&&!T.launcherOpen&&T.active===`browser`&&_,[H,ue]=(0,K.useState)(null);(0,K.useLayoutEffect)(()=>{le?ue(D):(!e||!_||!T.tabs.includes(`browser`)||H!==D)&&ue(null)},[le,D,e,_,T,H]),(0,K.useLayoutEffect)(()=>{w&&(w.tabs=T,w.requestRevision=n)},[w,T,n]);let fe=NJ(r,i,a,u?.promptEntryId),pe=(0,K.useRef)(n);(0,K.useEffect)(()=>(g?.(e?T.launcherOpen?`launcher`:T.active?RJ(T.active):null:null),()=>g?.(null)),[e,T.launcherOpen,T.active,g]),(0,K.useEffect)(()=>{pe.current!==n&&(pe.current=n,E(e=>BJ(e,t)))},[n,t]);let me=e=>{let t=e===`terminal`&&T.tabs.some(e=>RJ(e)===`terminal`)?`terminal:${crypto.randomUUID()}`:e;if(t!==`launcher`&&(M.current={tool:t,scope:D}),t.startsWith(`terminal:`)){let e=Math.max(1,...Object.values(oe).map(e=>Number(e.match(/\s(\d+)$/u)?.[1])||0))+1,n=`${S(`terminal`)} ${e}`;se(e=>({...e,[t]:n})),(w.terminals??={})[t]={viewport:0,atBottom:!0,title:n}}E(e=>BJ(e,t))},he=async(e,t)=>{let n=R.current,i=t.contains(document.activeElement);if(RJ(e)===`terminal`&&_){if(L.current.has(e)||P[e]?.pending)return;let t=P[e]?.id??w.terminals?.[e]?.id;if(t){L.current.add(e),ee(t=>[...t,e]),B(null);try{await N.closeInteractiveTerminal(r,t)}catch(e){n===R.current&&B(e instanceof Error?e.message:S(`terminalError`));return}finally{n===R.current&&(L.current.delete(e),ee(t=>t.filter(t=>t!==e)))}if(n!==R.current)return}}RJ(e)===`terminal`&&w.terminals&&delete w.terminals[e],E(n=>{let r=HJ(n,e);return(t.contains(document.activeElement)||i&&document.activeElement===document.body)&&(M.current={tool:r.launcherOpen?null:r.active,scope:D}),r})},ge=T.active?RJ(T.active):null,_e=T.launcherOpen?`openTools`:WJ.find(e=>e.kind===ge)?.title??`openTools`;return j({isActive:e,onDismiss:()=>{T.launcherOpen&&T.active?(M.current={tool:T.active,scope:D},E(UJ)):h()},getContainer:()=>A.current,isPresent:()=>A.current?.contains(document.activeElement)??!1}),(0,q.jsx)(ve.Provider,{value:w,children:(0,q.jsx)(z,{children:(0,q.jsxs)(`aside`,{ref:A,className:`workbar-panel`,hidden:!e,"aria-label":S(_e??`openTools`),children:[(0,q.jsxs)(`header`,{className:`workbar-tabbar`,children:[(0,q.jsxs)(`div`,{className:`workbar-tabs`,role:`toolbar`,"aria-label":S(`openTools`),children:[T.tabs.length===0&&(0,q.jsxs)(`span`,{className:`workbar-tab-placeholder`,children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),` `,S(`openTools`)]}),T.tabs.map(e=>{let t=RJ(e),n=WJ.find(e=>e.kind===t),r=n.icon,i=!T.launcherOpen&&T.active===e,a=t===`terminal`?ce(e):S(n.title),o=()=>{t===`terminal`&&(ae(a),re(e))};return(0,q.jsxs)(`div`,{className:`workbar-tab`,"data-active":i||void 0,children:[(0,q.jsxs)(`button`,{type:`button`,ref:t=>{t?O.current.set(e,t):O.current.delete(e)},"aria-pressed":i,title:t===`terminal`?`${a} · ${S(`renameTerminal`)}`:a,onDoubleClick:o,onContextMenu:e=>{t===`terminal`&&(e.preventDefault(),o())},onKeyDown:e=>{t===`terminal`&&e.key===`F2`&&(e.preventDefault(),o())},onClick:()=>E(t=>VJ(t,e)),children:[(0,q.jsx)(r,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a})]}),(0,q.jsx)(V,{content:t===`terminal`&&_?S(`workbarEndTerminal`,{name:a}):`${S(`close`)} ${a}`,placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`workbar-tab-close`,"aria-label":t===`terminal`&&_?S(`workbarEndTerminal`,{name:a}):`${S(`close`)} ${a}`,disabled:t===`terminal`&&_&&(I.includes(e)||P[e]?.pending!==!1),onClick:t=>void he(e,t.currentTarget),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},e)})]}),(0,q.jsxs)(`div`,{className:`workbar-tabbar-actions`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`workbar-back-to-chat`,onClick:()=>{f?p():h(),requestAnimationFrame(()=>document.querySelector(`.composer textarea`)?.focus({preventScroll:!0}))},children:[(0,q.jsx)(Ko,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:S(`workbarBackToChat`)})]}),!f&&T.active===`review`&&m&&(0,q.jsx)(V,{content:S(`gitReviewExpand`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button review-expand`,"aria-label":S(`gitReviewExpand`),onClick:m,children:(0,q.jsx)(gc,{"aria-hidden":`true`,style:{transform:`rotate(180deg)`}})})}),T.active?(0,q.jsx)(yo,{className:`workbar-tool-picker`,button:{ref:k,className:`icon-button workbar-add-tab`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),label:S(`openTools`),isIconOnly:!0,variant:`ghost`,"aria-label":S(`openTools`),tooltip:S(`openTools`)},onOpenChange:e=>{e||(M.current??={tool:T.active,scope:D},E(UJ))},items:WJ.map(e=>({id:e.kind,icon:(0,q.jsx)(e.icon,{"aria-hidden":`true`}),label:S(e.kind===`terminal`?`workbarNewTerminal`:e.title),description:S(e.description),onClick:()=>me(e.kind)})),menuWidth:`min(300px, calc(100vw - 24px))`,alignment:`end`,hasChevron:!1}):(0,q.jsx)(V,{content:S(`openTools`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,ref:k,className:`icon-button workbar-add-tab`,"aria-label":S(`openTools`),"aria-pressed":T.launcherOpen,onClick:()=>E(e=>BJ(e,`launcher`)),children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:S(`workbarCollapseTools`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":S(`workbarCollapseTools`),onClick:h,children:(0,q.jsx)(_c,{"aria-hidden":`true`})})})]})]}),te&&(0,q.jsx)(`p`,{className:`error`,role:`alert`,children:te}),(0,q.jsxs)(`div`,{className:`workbar-panels`,children:[(0,q.jsx)(`div`,{className:`workbar-tool-panel`,hidden:!T.launcherOpen,children:(0,q.jsx)(GJ,{onSelect:me})}),T.tabs.map(t=>{let n=RJ(t);return(0,q.jsx)(`div`,{className:`workbar-tool-panel`,"data-tool":n,"data-tab":t,hidden:T.launcherOpen||T.active!==t,inert:T.launcherOpen||T.active!==t||!e,children:n===`terminal`&&e&&_?(0,q.jsx)(qJ,{sessionId:r,cwd:a,tabId:t,active:!T.launcherOpen&&T.active===t,onConnectionChange:e=>F(n=>({...n,[t]:e}))}):n===`browser`&&e&&_&&(le||H===D)?(0,q.jsx)(LJ,{onReady:x},D):e&&!T.launcherOpen&&T.active===t?!_&&[`side-conversation`,`terminal`,`browser`].includes(n)?(0,q.jsxs)(`div`,{className:`workbar-empty`,children:[(0,q.jsx)(`p`,{children:S(`toolsRequireCurrentSession`)}),v&&(0,q.jsx)(`button`,{type:`button`,className:`secondary`,onClick:v,children:S(`activateViewedSession`)})]}):n===`side-conversation`?(0,q.jsx)(KJ,{sessionId:r,cwd:a,snapshot:o,activity:s.subagents}):n===`sources`?(0,q.jsx)($W,{sessionId:r,path:i,revision:o?.selectedSession?.history?.leafEntryId??void 0}):n===`review`?(0,q.jsx)(MJ,{review:u?{...fe,setSource:e=>{c.setSource?.(e),d?.()}}:c,initialFilePath:u?.filePath??l,readingScope:u?`turn:${u.promptEntryId}:${u.revision}`:`workspace:${c.source??`unstaged`}`,onOpenFiles:()=>me(`files`),onReferenceLine:_?b:void 0,onClose:()=>E(e=>HJ(e,`review`)),embedded:!0},u?`${u.promptEntryId}:${u.revision}`:c.source??`workspace`):(0,q.jsx)(nJ,{sessionId:r,sessionPath:i,cwd:a,active:!0,canWrite:_},JSON.stringify([r,i,a])):null},t)})]}),(0,q.jsx)(Se,{isOpen:ne!==null,purpose:`form`,"aria-label":S(`renameTerminal`),onOpenChange:e=>{e||re(null)},children:(0,q.jsxs)(`form`,{className:`openpi-dialog`,onSubmit:e=>{e.preventDefault();let t=ie.trim();if(!ne||!t)return;se(e=>({...e,[ne]:t}));let n=(w.terminals??={})[ne];w.terminals[ne]={...n??{viewport:0,atBottom:!0},title:t},re(null)},children:[(0,q.jsx)(`strong`,{children:S(`renameTerminal`)}),(0,q.jsx)(`input`,{"aria-label":S(`terminalName`),value:ie,maxLength:80,onChange:e=>ae(e.target.value)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:()=>re(null),children:S(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,disabled:!ie.trim(),children:S(`save`)})]})]})})]})})})}var YJ=`openpi:workbar-positions:v1`;function XJ(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ZJ(e,t=4096){return typeof e==`string`&&e.length<=t?e:``}function QJ(e,t=0,n=0,r=5e7){return typeof e==`number`&&Number.isFinite(e)&&e>=n&&e<=r?e:t}function $J(e,t=100){return Array.isArray(e)?e.slice(0,t).filter(e=>typeof e==`string`&&e.length<=4096):[]}function eY(e){return Yq(ZJ(e),window.location.origin)}function tY(e){return typeof e==`string`&&([`files`,`review`,`browser`,`terminal`,`side-conversation`,`sources`].includes(e)||/^terminal:[a-zA-Z0-9-]{1,128}$/u.test(e))}function nY(e){return typeof e==`string`&&[`launcher`,`files`,`review`,`browser`,`terminal`,`side-conversation`,`sources`].includes(e)}function rY(e){let t={};if(!XJ(e))return t;if(XJ(e.sources)&&(t.sources={scroll:QJ(e.sources.scroll)}),XJ(e.tabs)){let n=Array.isArray(e.tabs.tabs)?[...new Set(e.tabs.tabs.filter(tY))].slice(0,16):[],r=tY(e.tabs.active)&&n.includes(e.tabs.active)?e.tabs.active:null;t.tabs={tabs:n,active:r,launcherOpen:e.tabs.launcherOpen===!0||r===null,activationHistory:Array.isArray(e.tabs.activationHistory)?[...new Set(e.tabs.activationHistory.filter(tY).filter(e=>n.includes(e)))].slice(-16):[]},t.requestRevision=QJ(e.requestRevision)}if(XJ(e.files)&&(t.files={selected:ZJ(e.files.selected),treeVisible:e.files.treeVisible!==!1,query:ZJ(e.files.query,200),expanded:$J(e.files.expanded),treeScroll:QJ(e.files.treeScroll)}),XJ(e.artifact)){t.artifact={reference:ZJ(e.artifact.reference),source:e.artifact.source===!0,editing:!1,scroll:QJ(e.artifact.scroll)};let n=e.artifact.document;XJ(n)&&typeof n.revision==`string`&&/^[a-f0-9]{64}$/u.test(n.revision)&&(t.artifact.document={path:ZJ(n.path),revision:n.revision,page:Math.floor(QJ(n.page,1,1,1e5)),...typeof n.scale==`number`?{scale:QJ(n.scale,1,.1,8)}:{}})}let n=e.review;XJ(n)&&(n.source===`unstaged`||n.source===`staged`||n.source===`branch`||n.source===`session`)&&(t.review={scope:ZJ(n.scope),source:n.source,...typeof n.baseRef==`string`?{baseRef:ZJ(n.baseRef,1024)}:{},selected:typeof n.selected==`string`?ZJ(n.selected):null,query:ZJ(n.query,200),collapsedDirectories:$J(n.collapsedDirectories),visibleFiles:QJ(n.visibleFiles,50,0,200),listScroll:QJ(n.listScroll),previewScroll:QJ(n.previewScroll)},XJ(n.viewed)&&typeof n.viewed.revision==`string`&&(t.review.viewed={revision:ZJ(n.viewed.revision,128),paths:$J(n.viewed.paths,200)}));let r=e.browser;if(XJ(r)&&Array.isArray(r.tabs)){let e=new Set,n=r.tabs.flatMap(t=>{if(!XJ(t)||!Number.isSafeInteger(t.id)||typeof t.id!=`number`||t.id<0||t.id>5e7||e.has(t.id))return[];e.add(t.id);let n=eY(t.initialUrl);return[{id:t.id,title:ZJ(t.title,200),...n?{initialUrl:n}:{}}]}).slice(0,8),i={};for(let e of n){let t=XJ(r.pages)?r.pages[e.id]:void 0;if(!XJ(t))continue;let n=$J(t.history,32).flatMap(e=>eY(e)??[]);i[e.id]={draft:eY(t.draft)??``,history:n,index:n.length?Math.min(Math.floor(QJ(t.index)),n.length-1):-1}}t.browser={tabs:n,selected:n.some(e=>e.id===r.selected)?Number(r.selected):n[0]?.id??0,pages:i}}if(XJ(e.terminals)){t.terminals={};for(let[n,r]of Object.entries(e.terminals).slice(0,16))!tY(n)||n!==`terminal`&&!n.startsWith(`terminal:`)||!t.tabs?.tabs.includes(n)||!XJ(r)||(t.terminals[n]={...typeof r.id==`string`?{id:ZJ(r.id,128)}:{},...typeof r.title==`string`?{title:ZJ(r.title,80)}:{},viewport:QJ(r.viewport),atBottom:r.atBottom!==!1})}return XJ(e.terminal)&&typeof e.terminal.id==`string`&&(t.terminal={id:ZJ(e.terminal.id,128),viewport:QJ(e.terminal.viewport),atBottom:e.terminal.atBottom!==!1}),XJ(e.sideConversation)&&(t.sideConversation={selectedId:typeof e.sideConversation.selectedId==`string`?ZJ(e.sideConversation.selectedId,128):null,drafts:{}}),t}function iY(e){if(!XJ(e)||!ZJ(e.sessionId,128)||!ZJ(e.sessionPath)||!nY(e.tool))return null;let t={sessionId:ZJ(e.sessionId,128),sessionPath:ZJ(e.sessionPath),tool:e.tool,open:e.open===!0,requestRevision:QJ(e.requestRevision),reading:rY(e.reading)};return XJ(e.reviewTurn)&&ZJ(e.reviewTurn.promptEntryId,512)&&(t.reviewTurn={promptEntryId:ZJ(e.reviewTurn.promptEntryId,512),revision:QJ(e.reviewTurn.revision),...typeof e.reviewTurn.filePath==`string`?{filePath:ZJ(e.reviewTurn.filePath)}:{}}),t}function aY(){try{let e=localStorage.getItem(YJ);if(!e||e.length>256e3)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=new Map;for(let e of t.slice(-32)){let t=iY(e);t&&n.set(JSON.stringify([t.sessionId,t.sessionPath]),t)}return[...n.values()]}catch{return[]}}function oY(e){try{let t=e.slice(-32).flatMap(e=>iY(e)??[]),n=JSON.stringify(t);for(;n.length>256e3&&t.length;)t.shift(),n=JSON.stringify(t);localStorage.setItem(YJ,n)}catch{}}var sY=260,cY=220,lY=520,uY=190,dY=520,fY=360,pY=720,mY=320,hY=440,gY=1100;function _Y(e,t,n){return Math.min(n,Math.max(t,e))}function vY(){Jq();let e=nu(zG),{t}=W(),{actions:n}=e,r=(0,K.useRef)(null),i=(0,K.useRef)(null),a=(0,K.useRef)(null),o=(0,K.useRef)(null),s=(0,K.useRef)(!1),c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(void 0),p=(0,K.useCallback)(e=>{f.current=e},[]),m=(0,K.useMemo)(rK,[]),h=(0,K.useRef)(new Set),[,g]=(0,K.useState)(0),[_,v]=(0,K.useState)(null),y=(0,K.useMemo)(()=>new Map,[]),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(),[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(()=>window.innerWidth),[A,j]=(0,K.useState)({sidebar:sY,auxiliary:dY}),[M,N]=(0,K.useState)(!1),P=!!e.snapshot,F=e.snapshot?.preferences.sidebarWidth,I=e.snapshot?.preferences.auxiliaryWidth;(0,K.useEffect)(()=>{!P||M||w||j({sidebar:F??sY,auxiliary:I??dY})},[F,I,P,M,w]),(0,K.useEffect)(()=>{if(!M||w)return;let e=window.setTimeout(()=>{n.savePreferences({sidebarWidth:A.sidebar,auxiliaryWidth:A.auxiliary}).catch(()=>void 0)},200);return()=>window.clearTimeout(e)},[n,A,M,w]);let ee=(e,t)=>{N(!0),j(n=>({...n,[e]:t}))},[L,R]=(0,K.useState)(()=>window.matchMedia?.(`(max-width: 760px)`).matches??!1),te=L&&e.mobileSidebarOpen;(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 760px)`);if(!e)return;let t=()=>{R(e.matches),e.matches||n.closeMobileSidebar()};return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[n]),(0,K.useEffect)(()=>{let e=()=>k(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let[z,B]=(0,K.useState)(`chat`),[ne,re]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(null),[oe,se]=(0,K.useState)(aY);(0,K.useEffect)(()=>{let e=()=>oY(oe);e(),window.addEventListener(`pagehide`,e);let t=()=>{document.visibilityState===`hidden`&&e()};return document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`pagehide`,e),document.removeEventListener(`visibilitychange`,t),e()}},[oe]);let ce=e.workspaceDraft?void 0:e.snapshot?.selectedSession,le=oe.find(e=>e.sessionId===ce?.id&&e.sessionPath===ce?.path),H=le?.open??!1,ue=le?.reviewTurn,fe=(0,K.useCallback)(e=>{let t=zG.getState().snapshot?.selectedSession;t&&se(n=>n.map(n=>n.sessionId===t.id&&n.sessionPath===t.path?e(n):n))},[]),pe=(0,K.useCallback)(e=>fe(t=>({...t,open:e})),[fe]),he=e=>fe(t=>({...t,reviewTurn:e??void 0})),[ge,_e]=(0,K.useState)(null),[ve,ye]=(0,K.useState)(Dq),be=(0,K.useCallback)((e,t)=>{let n=zG.getState(),r=n.snapshot?.selectedSession;n.workspaceDraft||n.sessionSwitching||!r||!r.id||(s.current||(o.current=document.activeElement instanceof HTMLElement?document.activeElement:null),s.current=!0,u.current=null,pe(!1),ye(n=>({sessionId:r.id,sessionPath:r.path,id:e,kind:t,navigation:(n?.navigation??0)+1})))},[pe]),xe=ve&&!e.workspaceDraft&&!e.sessionSwitching&&ve.sessionId===e.snapshot?.selectedSession?.id&&ve.sessionPath===e.snapshot?.selectedSession?.path;(0,K.useEffect)(()=>{e.snapshot&&!e.sessionSwitching&&ve&&!xe&&ye(null)},[e.snapshot,e.sessionSwitching,ve,xe]),(0,K.useEffect)(()=>Oq(ve),[ve]),(0,K.useEffect)(()=>{if(xe||!s.current)return;s.current=!1;let e=o.current;o.current=null,queueMicrotask(()=>{e?.isConnected&&e.checkVisibility()&&e.focus()})},[xe]);let Se=e.snapshot?.models.find(e=>e.current),Ce=JSON.stringify([Se?.provider,Se?.id]),we=()=>{let t=e.snapshot,n=t?.selectedSession;e.workspaceDraft||!t||!n||e.sessionSwitching||!LD(t,n)||(u.current=null,pe(!1),re({sessionId:n.id,sessionPath:n.path,cwd:n.cwd,model:Se?.label??``,modelKey:Ce}))},Te=ne&&!e.workspaceDraft&&!e.sessionSwitching&&LD(e.snapshot,{id:ne.sessionId,path:ne.sessionPath})&&ne.sessionPath===e.snapshot?.selectedSession?.path&&ne.modelKey===Ce;(0,K.useEffect)(()=>{ne&&!Te&&re(null)},[ne,Te]);let Ee=(0,K.useCallback)(()=>{re(null);let e=c.current;c.current=null,e&&requestAnimationFrame(()=>{e.isConnected&&e.checkVisibility()&&e.focus()})},[]),U=ie&&!e.workspaceDraft&&!e.sessionSwitching&&LD(e.snapshot,{id:ie.sessionId,path:ie.sessionPath})&&ie.sessionPath===e.snapshot?.selectedSession?.path;(0,K.useEffect)(()=>{ie&&!U&&ae(null)},[ie,U]);let De=async(e=`general`)=>{l.current=document.activeElement instanceof HTMLElement?document.activeElement:null;let t=await n.prepareSession();if(!t)return;let r=zG.getState(),i=r.snapshot,a=i?.selectedSession;r.workspaceDraft||!a||r.sessionSwitching||!LD(i,a)||a.id!==t.sessionId||a.path!==t.sessionPath||(n.closeMobileSidebar(),re(null),ye(null),u.current=null,pe(!1),ae({sessionId:a.id,sessionPath:a.path,cwd:a.cwd,entry:e}))},Oe=(0,K.useCallback)(()=>{ae(null);let e=new URL(window.location.href);e.searchParams.delete(`settings`),window.history.replaceState(window.history.state,``,e),requestAnimationFrame(()=>{let e=l.current;l.current=null,e?.isConnected&&e.checkVisibility()?e.focus():document.querySelector(`[data-provider-settings-trigger]`)?.focus()})},[]),ke=()=>{c.current=l.current??document.querySelector(`[data-provider-settings-trigger]`),ae(null),we()},Ae=async e=>{if(await n.sendPrompt(`/openpi-setup ${e}`))return!0;let r=zG.getState();throw Error((typeof r.notice==`string`?r.notice:null)||t(r.promptAdmissionRecovery?`setupResolveAdmission`:r.liveRunning||r.activeTurn?`settingsSetupBusyHint`:`setupRequestFailed`))};(0,K.useEffect)(()=>(n.start(),n.stop),[n]);let G=e.workspaceDraft?void 0:e.snapshot?.selectedSession,Me=iK(G),Ne=G?.id,Pe=G?.path,Fe=!!(G&&!h.current.has(Me)&&m.get(Me)?.position?.key&&m.get(Me)?.position?.pinned===!1);(0,K.useEffect)(()=>{let t=zG.getState(),n=t.workspaceDraft?void 0:t.snapshot?.selectedSession;if(!n||n.id!==Ne||n.path!==Pe||e.sessionSwitching||h.current.has(Me))return;let r=m.get(Me)?.position,i=()=>{h.current.add(Me),g(e=>e+1)};if(!r?.key||r.pinned||m.get(Me)?.window||e.historyNavigation?.sessionId===n.id&&e.historyNavigation.sessionPath===n.path){i();return}let a={sessionId:n.id,sessionPath:n.path,entryId:r.entryId??r.key},o=new AbortController,s,c=e=>{let t=e.target;!(t instanceof Element)||!t.closest(`.conversation, .turn-rail, .jump-to-latest`)||e instanceof KeyboardEvent&&![`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `].includes(e.key)||(o.abort(),i(),v(e=>e?.sessionId===a.sessionId&&e.sessionPath===a.sessionPath?null:e))};for(let e of[`wheel`,`touchstart`,`pointerdown`,`keydown`])document.addEventListener(e,c,!0);let l=e=>{let t=zG.getState();o.signal.aborted||h.current.has(Me)||t.historyNavigation||t.sessionSwitching||t.workspaceDraft||t.selectedPath!==a.sessionPath||t.snapshot?.selectedSession?.id!==a.sessionId||t.snapshot.selectedSession.path!==a.sessionPath||m.get(Me)?.position!==r||e.id!==a.sessionId||e.path!==a.sessionPath||e.history?.anchorEntryId!==a.entryId||e.history.anchorOnBranch!==!0||!e.entries.some(e=>e.id===a.entryId)||(v({...a,session:e,restorePosition:r,revision:-1}),i())};if(e.connection===`connected`)if(n.entries.some(e=>e.id===a.entryId))l({...n,history:{leafEntryId:n.history?.leafEntryId??null,beforeEntryId:n.history?.beforeEntryId??null,anchorEntryId:a.entryId,anchorOnBranch:!0}});else{let e=t=>{new de().sessionMessageWindow(a,o.signal).then(l,()=>{!o.signal.aborted&&t===0&&(s=window.setTimeout(()=>e(1),500))})};e(0)}return()=>{o.abort(),window.clearTimeout(s);for(let e of[`wheel`,`touchstart`,`pointerdown`,`keydown`])document.removeEventListener(e,c,!0)}},[Ne,Pe,e.connection,e.sessionSwitching,e.historyNavigation,Me,m]);let Ie=LD(e.snapshot,G),Le=(0,K.useMemo)(()=>BD((G?.entries??[]).flatMap(e=>e.message?[e.message]:[])),[G?.entries]),Re=Ie?e.snapshot?.runtime.capabilities??G?.capabilities:G?.capabilities,ze=Re?.subagents,Be=(0,K.useMemo)(()=>VD(ze?.items??[],Le,Re?.workflows?.items,e.connection===`connected`),[ze?.items,Le,Re?.workflows?.items,e.connection]),Ve=e.snapshot?.selectedExecution,He=Ve?.sessionId===G?.id&&Ve?.sessionPath===G?.path?Ve:void 0,Ue=Ie&&(e.liveRunning||!!e.activeTurn||e.snapshot?.runtime.status===`running`)||He?.status===`running`,We=uA(G,e.snapshot?.cursor,{active:H&&ge===`review`,running:Ue,initialSource:le?.reading.review?.scope.startsWith(`workspace:`)?le.reading.review.source:`unstaged`,initialBaseRef:le?.reading.review?.baseRef}),Ge=!!(le&&G&&e.selectedPath===G.path&&le.sessionId===G.id&&le.sessionPath===G.path),Ke=H&&Ge&&le?.tool!==`launcher`&&!e.sessionSwitching;(0,K.useEffect)(()=>{G?.id,G?.path,u.current=null},[G?.id,G?.path]),(0,K.useEffect)(()=>{!le||e.sessionSwitching||se(e=>e.at(-1)===le?e:[...e.filter(e=>e!==le),le])},[le,e.sessionSwitching]);let qe=(t=`launcher`)=>{!G||e.sessionSwitching||(b&&d.current?.close({restoreFocus:!1}),Ke||(u.current=document.activeElement instanceof HTMLElement?document.activeElement:null),re(null),ye(null),se(e=>{let n=e.find(e=>e.sessionId===G.id&&e.sessionPath===G.path),r={sessionId:G.id,sessionPath:G.path,tool:t,requestRevision:(n?.requestRevision??0)+1,open:!0,reading:n?.reading??{},reviewTurn:t===`review`?void 0:n?.reviewTurn};return[...e.filter(e=>e!==n),r].slice(-32)}))},Je=()=>{D(!1),pe(!1);let e=u.current;u.current=null,e&&requestAnimationFrame(()=>{let t=e.isConnected?e:i.current;t?.isConnected&&t.checkVisibility()&&t.focus()})},Ye=!e.sessionSwitching&&!e.workspaceDraft&&LD(e.snapshot,G)?G:void 0;Zq(Ye?.id,Ye?.path,async(e,t)=>{qe(`browser`);let n=Date.now()+5e3;for(;!f.current&&!t.aborted&&Date.now()setTimeout(e,40));return t.aborted?void 0:f.current?.(e)});let Xe=(0,K.useRef)(KW(new URLSearchParams(location.search).get(`settings`))),Ze=(0,K.useEffectEvent)(e=>{De(e)});(0,K.useEffect)(()=>{if(!Xe.current||!e.snapshot||e.sessionSwitching)return;let t=Xe.current;Xe.current=void 0,Ze(t)},[e.snapshot,e.sessionSwitching]);let Qe=!!(xe||Ke||b);(0,K.useEffect)(()=>{(!Qe||O<=gY)&&D(!1)},[Qe,O]);let $e=Math.max(cY,Math.min(lY,O-hY-(Qe&&!E?A.auxiliary:0))),et=_Y(A.sidebar,cY,$e),tt=Math.max(fY,Math.min(pY,O-(e.sidebarCollapsed?56:et)-hY)),nt=_Y(A.auxiliary,fY,tt),rt={"--sidebar-width":`${et}px`,"--auxiliary-width":`${nt}px`},it=()=>{b?d.current?.close():Ke?Je():xe&&ye(null)},at=!e.snapshot,ot=e.sessionSwitching?e.snapshot?.sessions.find(t=>t.path===e.selectedPath)?.cwd:e.workspaceDraft?e.selectedWorkspace:G?.cwd??e.selectedWorkspace,st=e.snapshot?.workspaces.find(e=>e.path===ot),ct=e.snapshot?.sessions.find(e=>e.path===G?.path&&e.id===G?.id),lt=e.sessionSwitching?e.snapshot?.sessions.find(t=>t.path===e.selectedPath):void 0,ut=e.sessionSwitching&&!e.workspaceDraft?lt?jD(lt,t(`untitledSession`)):t(`switchingSession`):G?jD(ct??{},t(`untitledSession`)):e.selectedWorkspace?t(`newSession`):`OpenPI`,dt=!!G?.rerun||G?.entries.some(e=>e.type===`message`&&e.message||e.type===`compaction`)||!!G?.history?.beforeEntryId||e.liveMessages.length>0,ft=!at&&(!e.sessionSwitching||e.workspaceDraft)&&(!G||!dt&&!(e.snapshot?.selectedExecution?.sessionId===G.id&&e.snapshot.selectedExecution?.sessionPath===G.path&&e.snapshot.selectedExecution.compaction)),pt=(0,K.useCallback)((e,t)=>t?n.sendPrompt(``,[],void 0,{streamingBehavior:`followUp`,retryEntryId:t}):n.sendPrompt(e),[n]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{inert:U?!0:void 0,"aria-hidden":U?!0:void 0,className:`app-shell ${e.sidebarCollapsed?`sidebar-collapsed`:``} ${e.mobileSidebarOpen?`sidebar-open`:``} ${xe?`with-subagent-panel`:``} ${Ke?`with-workbar-panel`:``} ${b?`with-artifact-panel`:``} ${E?`center-collapsed`:``} ${w?`is-resizing`:``} ${at?`shell-loading`:``}`,style:rt,children:(0,q.jsxs)(AD,{ref:d,sessionId:G?.id,sessionPath:G?.path,disabled:!!(e.workspaceDraft||e.sessionSwitching||xe||U),onOpen:()=>{x(!0),ye(null),pe(!1),re(null)},onClose:()=>{x(!1)},children:[(0,q.jsx)(OA,{sessionViewVisible:z===`chat`&&!E&&!U&&!e.sessionSwitching&&!e.workspaceDraft,connected:e.connection===`connected`,snapshot:e.snapshot,selectedPath:e.workspaceDraft?null:e.selectedPath,selectedWorkspace:e.selectedWorkspace,collapsed:e.collapsed,query:e.query,searchOpen:e.searchOpen,mobileOpen:te,settingsDisabled:!!(e.sessionSwitching||e.modelSelectionPending||!e.snapshot),returnFocusRef:r,onOpenSettings:()=>void De(`general`),actions:n}),e.sidebarCollapsed&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{ref:a,className:`sidebar-expand`,type:`button`,"aria-label":t(`expandSidebar`),onClick:()=>n.toggleSidebar(!1),children:(0,q.jsx)(gc,{})}),(0,q.jsx)(V,{anchorRef:a,content:t(`expandSidebar`),placement:`end`})]}),(0,q.jsxs)(`main`,{inert:te,className:`conversation-shell ${G?`has-view`:``} ${ft&&(!G||z===`chat`)?`landing`:``}`,children:[(0,q.jsxs)(`header`,{className:`task-header`,children:[(0,q.jsx)(V,{content:t(L?`openSidebar`:e.sidebarCollapsed?`expandSidebar`:`collapseSidebar`),placement:`below`,children:(0,q.jsx)(`button`,{className:`task-header-menu sidebar-shell-toggle`,ref:r,type:`button`,"aria-label":t(L?`openSidebar`:e.sidebarCollapsed?`expandSidebar`:`collapseSidebar`),"aria-controls":`session-sidebar`,"aria-expanded":L?te:!e.sidebarCollapsed,onClick:()=>n.toggleSidebar(L),children:L?(0,q.jsx)(sc,{}):(0,q.jsx)(hc,{})})}),(0,q.jsxs)(`div`,{className:`task-identity`,children:[ot&&(0,q.jsxs)(`span`,{className:`task-workspace`,title:ot,children:[st?.name||MD(ot),(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,ot]})]}),(0,q.jsx)(`h1`,{title:ut,children:ut})]}),(0,q.jsx)(Qq,{usage:G&&!e.sessionSwitching?e.snapshot?.usage:void 0,workspace:st?.name||G&&MD(G.cwd),sessionId:G?.id,model:Ie?Se:void 0},G?`usage:${G.id}:${G.path}`:`usage:no-session`),G&&!e.sessionSwitching&&(0,q.jsx)(tG,{sessionId:G.id,workspace:st?.name||MD(G.cwd),agents:Be,omitted:(ze?.omitted??0)+(Re?.workflows?.items??[]).reduce((e,t)=>e+(t.children?.omitted??0),0),omittedWorkflows:Re?.workflows?.omitted??0,review:We.result,reviewLoading:We.loading,reviewError:We.error,sessionPath:G.path,revision:G.history?.leafEntryId??void 0,onAddSources:Ie?()=>C(e=>({sessionId:G.id,path:G.path,revision:(e?.revision??0)+1})):void 0,onSubagents:()=>be(),onReview:()=>qe(`review`),onSources:()=>qe(`sources`)},`overview:${G.id}:${G.path}`),Ge&&!Ke&&le?.tool!==`launcher`?(0,q.jsx)(V,{content:t(G?`openTools`:`openToolsUnavailable`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,ref:i,className:`task-tools-trigger`,"aria-label":t(`openTools`),disabled:!G||e.sessionSwitching,onClick:e=>{b&&d.current?.close({restoreFocus:!1}),u.current=e.currentTarget,pe(!0)},children:(0,q.jsx)(vc,{"aria-hidden":`true`})})}):(0,q.jsx)(yo,{button:{ref:i,className:`task-tools-trigger`,label:t(`openTools`),"aria-label":t(`openTools`),icon:(0,q.jsx)(vc,{"aria-hidden":`true`}),isIconOnly:!0,isDisabled:!G||e.sessionSwitching,variant:`ghost`,tooltip:t(G?`openTools`:`openToolsUnavailable`)},items:WJ.map(e=>({id:e.kind,icon:(0,q.jsx)(e.icon,{"aria-hidden":`true`}),label:t(e.title),description:t(e.description),onClick:()=>{qe(e.kind),u.current=i.current}})),menuWidth:`min(300px, calc(100vw - 24px))`,alignment:`end`,hasChevron:!1}),(0,q.jsx)(`span`,{className:`connection-state ${e.connection}`,role:`status`,title:t(e.connection),"aria-label":t(e.connection),children:(0,q.jsx)(`span`,{children:t(e.connection)})})]}),G&&!e.sessionSwitching&&(0,q.jsx)(`div`,{className:`conversation-view-row`,children:(0,q.jsxs)(`fieldset`,{className:`conversation-view-switch`,"data-view":z,"aria-label":t(`conversationView`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":z===`chat`,onClick:()=>B(`chat`),children:t(`chatView`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":z===`trajectory`,onClick:()=>B(`trajectory`),children:t(`trajectory`)})]})}),at?(0,q.jsxs)(`section`,{className:`shell-state`,role:`status`,"aria-live":`polite`,children:[(0,q.jsx)(iu,{compact:!0}),(0,q.jsx)(`p`,{children:t(e.connection===`unavailable`?`unavailable`:`connecting`)}),e.connection===`unavailable`&&(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void n.refreshSnapshot({resetCursor:!0}),children:[(0,q.jsx)(me,{"aria-hidden":`true`}),` `,t(`retryAdmissionCheck`)]})]}):e.sessionSwitching&&!ft?(0,q.jsx)(`div`,{className:`conversation switching`,role:`status`,children:(0,q.jsxs)(`div`,{className:`conversation-running`,children:[(0,q.jsx)(`span`,{className:`conversation-running-dot`}),(0,q.jsx)(`span`,{children:t(`switchingSession`)})]})}):z===`trajectory`&&G&&e.snapshot?(0,q.jsx)(qq,{snapshot:e.snapshot,running:Ue},G.path):ft?(0,q.jsx)(`section`,{className:`conversation landing-conversation`,"aria-label":`Conversation`,children:(0,q.jsxs)(`div`,{className:`landing-welcome`,children:[(0,q.jsx)(`h1`,{className:`sr-only`,children:ut}),(0,q.jsx)(iu,{animated:!0}),e.sessionSwitching&&(0,q.jsx)(`span`,{className:`sr-only`,role:`status`,children:t(`switchingSession`)})]})}):e.snapshot?(0,q.jsx)(Sq,{resultExposureEnabled:!E&&!U&&!e.sessionSwitching&&!e.workspaceDraft&&z===`chat`,readingCache:m,readingRestorePending:Fe,snapshot:e.snapshot,liveMessages:e.liveMessages,liveRunning:e.liveRunning,liveActiveTurn:e.activeTurn,livePhase:e.livePhase,activityObserved:e.connection===`connected`,liveRetry:e.liveRetry,thinkingStarts:e.thinkingStarts,thinkingDurations:e.thinkingDurations,scrollToBottom:e.scrollToBottom,onResend:pt,onEdit:n.editMessage,onRegenerate:n.regenerateMessage,onOpenOriginal:n.navigateToMessage,onFork:n.forkMessage,forkPending:e.sessionForkPending,forkAvailable:Ie&&!Ue&&e.snapshot.runtime.status===`idle`&&!e.promptAdmissionPending&&!e.promptAdmissionRecovery&&!e.activeTurn&&!e.modelSelectionPending&&!e.sessionSwitching&&!G?.path.startsWith(`current:`)&&!(He?.pendingFollowUps||He?.pendingSteering||He?.compaction?.state===`running`),onInspectSubagent:be,onReviewTurn:(e,t)=>{qe(`review`),u.current=document.activeElement instanceof HTMLElement?document.activeElement:null,he({promptEntryId:e,filePath:t,revision:(ue?.revision??0)+1})},onHistoryAnchorChange:n.setHistoryAnchor,historyNavigation:e.historyNavigation??(_?.sessionId===G?.id&&_?.sessionPath===G?.path?_:null),onNavigateToMessage:n.navigateToMessage,onRefreshHistory:n.refreshSnapshot,onPromptProjection:n.rememberPromptProjection},`transcript:${JSON.stringify([G?.id,G?.path])}`):null,!U&&G&&e.snapshot&&!e.sessionSwitching&&LD(e.snapshot,G)&&(0,q.jsx)(lA,{sessionId:G.id,sessionPath:G.path,workingCache:y,revision:e.snapshot.cursor,connected:e.connection===`connected`},JSON.stringify([G.id,G.path])),e.snapshot&&(0,q.jsxs)(`div`,{className:`workbar-chat-context`,hidden:!Ke,children:[(0,q.jsx)(`span`,{className:`workbar-chat-title`,title:ut,children:ut}),(0,q.jsx)(`span`,{className:`workbar-chat-status`,role:`status`,children:t(Ue?`turnState_running`:e.connection)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{Je(),requestAnimationFrame(()=>document.querySelector(`.composer textarea`)?.focus({preventScroll:!0}))},children:t(`workbarContinueInChat`)})]}),e.snapshot&&(0,q.jsx)(tA,{addSourcesRequest:S,planSelectionPending:e.planSelectionPending,workspaceDraft:e.workspaceDraft,draftModel:e.draftModel,createdSession:e.createdSession,modelSelectionPending:e.modelSelectionPending,modelSearch:e.modelSearch,thinkingPendingLevel:e.thinkingPendingLevel,onInspect:we,onOpenProviders:()=>void De(`credentials`),onCommandAction:e=>{let t=zG.getState();return t.sessionSwitching||t.workspaceDraft||!G||t.snapshot?.selectedSession?.path!==G.path||t.snapshot.selectedSession.id!==G.id?!1:(e===`terminal`||e===`review`||e===`side-conversation`?qe(e):e===`subagents`?be():we(),!0)},onInspectSubagent:be,activeTurn:e.activeTurn,activityObserved:e.connection===`connected`,turnCancellationPending:e.turnCancellationPending,turnTerminalStatus:e.turnTerminalStatus,pendingFollowUpsReceipt:e.pendingFollowUpsReceipt,pendingSteeringReceipt:e.pendingSteeringReceipt,commandDiscovery:e.commandDiscovery,snapshot:e.snapshot,selectedPath:e.selectedPath,selectedWorkspace:G?.cwd??e.selectedWorkspace,sessionSwitching:e.sessionSwitching||e.sessionForkPending,promptAdmissionPending:e.promptAdmissionPending,promptAdmissionRecovery:e.promptAdmissionRecovery,promptAdmissionResolution:e.promptAdmissionResolution,restoredPromptDraft:e.restoredPromptDraft,liveRunning:e.liveRunning,landing:ft,actions:n}),e.sessionForkPending&&(0,q.jsxs)(`div`,{className:`session-fork-progress`,role:`status`,children:[(0,q.jsx)(`span`,{className:`session-fork-progress-spinner`,"aria-hidden":`true`}),t(e.sessionForkCancellation===`too-late`?`sidebarForkFinishing`:e.sessionForkCancellation?`sidebarForkCancelling`:e.sessionForkEnvironment===`worktree`?`sidebarForkWorktreePending`:`forkSessionPending`),e.sessionForkEnvironment&&(0,q.jsx)(`button`,{type:`button`,disabled:e.sessionForkCancellation!==null,onClick:()=>void n.cancelSessionFork(),children:t(`cancel`)})]}),(0,q.jsx)(fA,{notices:e.archiveNotices,actions:n}),e.notice&&(0,q.jsxs)(`div`,{className:typeof e.notice==`string`?`notice`:`notice notice-success`,role:typeof e.notice==`string`?`alert`:`status`,children:[(0,q.jsx)(`span`,{children:typeof e.notice==`string`?e.notice:e.notice.message}),(0,q.jsx)(V,{content:t(`close`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":t(`close`),onClick:n.clearNotice,children:(0,q.jsx)(je,{})})})]})]}),Te&&(0,q.jsx)(nA,{target:ne,onClose:Ee,onOpenProviders:()=>void De(`credentials`)},`${ne.sessionId}:${ne.sessionPath}`),xe&&(0,q.jsx)(Tq,{sessionId:ve.sessionId,sessionPath:ve.sessionPath,initialId:ve.id,initialKind:ve.kind,observed:e.connection===`connected`,activity:ze,records:Le,workflows:Re?.workflows,liveAvailable:G?.id===ve.sessionId&&G.path===ve.sessionPath,onClose:()=>ye(null)},`${ve.sessionId}:${ve.navigation}`),Ke&&G&&le&&(0,q.jsx)(JJ,{visible:Ke,requestedTool:le.tool,requestRevision:le.requestRevision,sessionId:G.id,sessionPath:G.path,onBrowserReady:p,canControl:!e.sessionSwitching&&LD(e.snapshot,G),onActivateSession:()=>void n.selectSession(G.path),cwd:G.cwd,snapshot:e.snapshot??void 0,capabilities:LD(e.snapshot,G)?e.snapshot?.runtime.capabilities??{}:{},readingState:le.reading,onActiveToolChange:_e,review:We,reviewTurn:ue??void 0,onWorkspaceReview:()=>he(null),onReferenceLine:e=>{let t=zG.getState(),n=t.snapshot?.selectedSession;t.workspaceDraft||t.sessionSwitching||t.selectedPath!==G.path||n?.id!==G.id||n.path!==G.path||!LD(t.snapshot,n)||(B(`chat`),C(t=>({sessionId:G.id,path:G.path,revision:(t?.revision??0)+1,feedback:e})))},conversationCollapsed:E,onRestoreConversation:()=>D(!1),onExpandReview:()=>D(!0),onClose:Je},`${G.id}:${G.path}`),(0,q.jsxs)(`section`,{"aria-label":t(`resizePanes`),style:{display:`contents`},children:[!e.sidebarCollapsed&&!L&&(!Qe||O>gY)&&(0,q.jsx)(ou,{side:`left`,value:et,min:cY,max:$e,defaultValue:sY,collapseThreshold:uY,onCollapse:()=>n.toggleSidebar(!1),onChange:e=>ee(`sidebar`,e),onDraggingChange:T}),Qe&&!E&&O>gY&&(0,q.jsx)(ou,{side:`right`,value:nt,min:fY,max:tt,defaultValue:dY,collapseThreshold:mY,onCollapse:it,onExpandPastMax:Ke?()=>D(!0):void 0,onChange:e=>ee(`auxiliary`,e),onDraggingChange:T})]}),(0,q.jsx)(`button`,{className:`sidebar-scrim`,type:`button`,tabIndex:-1,"aria-hidden":`true`,"aria-label":t(`close`),onClick:n.closeMobileSidebar})]})}),U&&(0,q.jsx)(qW,{sessionId:ie.sessionId,cwd:ie.cwd,entry:ie.entry,models:e.snapshot?.models??[],currentModel:Se,thinkingLevel:e.thinkingPendingLevel??e.snapshot?.thinking?.level??t(`unknownState`),theme:e.snapshot?.preferences.theme??`system`,preferences:e.snapshot?.preferences,workspaces:e.snapshot?.workspaces??[],onRestoreSession:e=>n.unarchiveSession(e),plan:e.snapshot?.runtime.plan,planSelectionPending:e.planSelectionPending,onExitPlan:()=>n.selectPlanMode(!1),setupOutcome:e.snapshot?.runtime.setup,capabilities:e.snapshot?.runtime.capabilities,setupBusy:e.liveRunning||e.promptAdmissionPending||!!e.activeTurn||e.modelSelectionPending||e.thinkingPendingLevel!==null||e.sessionSwitching,setupBlockedReason:e.promptAdmissionRecovery?t(`setupResolveAdmission`):void 0,modelSelectionPending:e.modelSelectionPending,sessionPath:ie.sessionPath,onSelectModel:e=>n.selectModel(e),onConfigureOpenPi:Ae,interaction:e.snapshot&&!e.sessionSwitching&&ie.sessionId===e.snapshot.currentSessionId?(0,q.jsxs)(`div`,{className:`settings-interaction`,children:[(0,q.jsx)(lA,{sessionId:ie.sessionId,sessionPath:ie.sessionPath,workingCache:y,revision:e.snapshot.cursor,connected:e.connection===`connected`},JSON.stringify([ie.sessionId,ie.sessionPath])),(e.activeTurn||e.liveRunning)&&(0,q.jsx)(`button`,{type:`button`,disabled:e.turnCancellationPending,onClick:()=>void n.cancelActiveTurn(),children:t(`stopTurn`)})]}):void 0,onPreferencesChanged:()=>n.refreshSnapshot(),onOpenRuntimeStatus:ke,onClose:Oe},`${ie.sessionId}:${ie.sessionPath}`)]})}var yY={size:`1em`,"aria-hidden":!0},bY={name:`neutral`,__built:!0,tokens:{"--font-size-4xs":`0.375rem`,"--font-size-3xs":`0.4375rem`,"--font-size-2xs":`0.5rem`,"--font-size-xs":`0.625rem`,"--font-size-sm":`0.75rem`,"--font-size-base":`0.875rem`,"--font-size-lg":`1.0625rem`,"--font-size-xl":`1.25rem`,"--font-size-2xl":`1.5rem`,"--font-size-3xl":`1.8125rem`,"--font-size-4xl":`2.1875rem`,"--font-size-5xl":`2.625rem`,"--text-heading-1-size":`var(--font-size-2xl)`,"--text-heading-1-weight":`var(--font-weight-semibold)`,"--text-heading-1-leading":`1.3333`,"--text-heading-2-size":`var(--font-size-xl)`,"--text-heading-2-weight":`var(--font-weight-semibold)`,"--text-heading-2-leading":`1.4`,"--text-heading-3-size":`var(--font-size-lg)`,"--text-heading-3-weight":`var(--font-weight-bold)`,"--text-heading-3-leading":`1.4118`,"--text-heading-4-size":`var(--font-size-base)`,"--text-heading-4-weight":`var(--font-weight-bold)`,"--text-heading-4-leading":`1.4286`,"--text-heading-5-size":`var(--font-size-sm)`,"--text-heading-5-weight":`var(--font-weight-semibold)`,"--text-heading-5-leading":`1.6667`,"--text-heading-6-size":`var(--font-size-xs)`,"--text-heading-6-weight":`var(--font-weight-semibold)`,"--text-heading-6-leading":`1.6`,"--text-body-size":`var(--font-size-base)`,"--text-body-weight":`var(--font-weight-normal)`,"--text-body-leading":`1.4286`,"--text-large-size":`var(--font-size-lg)`,"--text-large-weight":`var(--font-weight-semibold)`,"--text-large-leading":`1.4118`,"--text-label-size":`var(--font-size-base)`,"--text-label-weight":`var(--font-weight-medium)`,"--text-label-leading":`1.4286`,"--text-code-size":`var(--font-size-base)`,"--text-code-weight":`var(--font-weight-normal)`,"--text-code-leading":`1.4286`,"--text-supporting-size":`var(--font-size-sm)`,"--text-supporting-weight":`var(--font-weight-normal)`,"--text-supporting-leading":`1.6667`,"--text-display-1-size":`var(--font-size-5xl)`,"--text-display-1-weight":`var(--font-weight-normal)`,"--text-display-1-leading":`1.2381`,"--text-display-2-size":`var(--font-size-4xl)`,"--text-display-2-weight":`var(--font-weight-normal)`,"--text-display-2-leading":`1.2571`,"--text-display-3-size":`var(--font-size-3xl)`,"--text-display-3-weight":`var(--font-weight-normal)`,"--text-display-3-leading":`1.3793`,"--duration-fast-min":`95ms`,"--duration-fast":`125ms`,"--duration-fast-max":`165ms`,"--duration-medium-min":`225ms`,"--duration-medium":`300ms`,"--duration-medium-max":`400ms`,"--duration-slow-min":`525ms`,"--duration-slow":`700ms`,"--duration-slow-max":`935ms`,"--font-family-body":`Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,"--font-family-heading":`Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,"--font-family-code":`ui-monospace, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,"--color-syntax-keyword":`light-dark(#700084, #efa8ff)`,"--color-syntax-string":`light-dark(#005600, #a6d2a2)`,"--color-syntax-comment":`light-dark(#737373, #a3a3a3)`,"--color-syntax-number":`light-dark(#6e3500, #ffb37f)`,"--color-syntax-function":`light-dark(#00458c, #a0caff)`,"--color-syntax-type":`light-dark(#700084, #efa8ff)`,"--color-syntax-variable":`light-dark(#171717, #e5e5e5)`,"--color-syntax-operator":`light-dark(#737373, #a3a3a3)`,"--color-syntax-constant":`light-dark(#6e3500, #ffb37f)`,"--color-syntax-tag":`light-dark(#89001a, #ffaeaa)`,"--color-syntax-attribute":`light-dark(#584400, #eec12f)`,"--color-syntax-property":`light-dark(#005348, #83dac9)`,"--color-syntax-punctuation":`light-dark(#6e6e6e, #a0a0a0)`,"--color-syntax-background":`light-dark(#fafafa, #0a0a0a)`,"--color-background-surface":`light-dark(#ffffff, #262626)`,"--color-background-body":`light-dark(#f1f1f1, #1b1b1b)`,"--color-background-card":`light-dark(#ffffff, #1b1b1b)`,"--color-background-popover":`light-dark(#ffffff, #1b1b1b)`,"--color-background-muted":`light-dark(#f1f1f1, #1b1b1b)`,"--color-accent":`light-dark(#262626, #ebebeb)`,"--color-accent-muted":`light-dark(#f1f1f1, #262626)`,"--color-neutral":`light-dark(#0000000F, #FFFFFF1A)`,"--color-overlay":`light-dark(#00000080, #000000CC)`,"--color-overlay-hover":`light-dark(#0000000D, #FFFFFF0D)`,"--color-overlay-pressed":`light-dark(#0000001A, #FFFFFF1A)`,"--color-text-primary":`light-dark(#171717, #fafafa)`,"--color-text-secondary":`light-dark(#525252, #a3a3a3)`,"--color-text-disabled":`light-dark(#a3a3a3, #525252)`,"--color-text-accent":`light-dark(#262626, #ebebeb)`,"--color-on-dark":`#ffffff`,"--color-on-light":`#171717`,"--color-on-accent":`light-dark(#ffffff, #171717)`,"--color-on-success":`light-dark(#ffffff, #171717)`,"--color-on-error":`light-dark(#ffffff, #171717)`,"--color-on-warning":`#171717`,"--color-icon-accent":`light-dark(#262626, #ebebeb)`,"--color-icon-primary":`light-dark(#171717, #fafafa)`,"--color-icon-secondary":`light-dark(#737373, #a3a3a3)`,"--color-icon-disabled":`light-dark(#a3a3a3, #525252)`,"--color-success":`light-dark(#007004, #9fe59b)`,"--color-error":`light-dark(#a50c25, #ffc6c1)`,"--color-warning":`light-dark(#745b00, #fdcf4f)`,"--color-success-muted":`light-dark(#c5e5c0, #84c9803D)`,"--color-error-muted":`light-dark(#facecb, #ff9e973D)`,"--color-warning-muted":`light-dark(#f8da9d, #deb4333D)`,"--color-border":`light-dark(#00000014, #FFFFFF1A)`,"--color-border-emphasized":`light-dark(#d4d4d4, #525252)`,"--color-skeleton":`light-dark(#ebebeb, #525252)`,"--color-shadow":`light-dark(#0000001A, #0000004D)`,"--color-tint-hover":`light-dark(black, white)`,"--color-background-red":`light-dark(#facecb, #ff9e973D)`,"--color-border-red":`light-dark(#e6bab8, #ff6f6c)`,"--color-icon-red":`light-dark(#89001a, #ff9e97)`,"--color-text-red":`light-dark(#89001a, #ffc6c1)`,"--color-background-orange":`light-dark(#fad0b5, #ffa2583D)`,"--color-border-orange":`light-dark(#e6bda2, #e2883e)`,"--color-icon-orange":`light-dark(#6e3500, #ffa258)`,"--color-text-orange":`light-dark(#6e3500, #ffc9a2)`,"--color-background-yellow":`light-dark(#f8da9d, #deb4333D)`,"--color-border-yellow":`light-dark(#e4c279, #c0990e)`,"--color-icon-yellow":`light-dark(#584400, #deb433)`,"--color-text-yellow":`light-dark(#584400, #fdcf4f)`,"--color-background-green":`light-dark(#c5e5c0, #84c9803D)`,"--color-border-green":`light-dark(#b2d1ac, #69ad67)`,"--color-icon-green":`light-dark(#0c5700, #84c980)`,"--color-text-green":`light-dark(#0c5700, #9fe59b)`,"--color-background-teal":`light-dark(#a5e3d6, #7ec6b83D)`,"--color-border-teal":`light-dark(#94d6c8, #63ab9d)`,"--color-icon-teal":`light-dark(#005348, #7ec6b8)`,"--color-text-teal":`light-dark(#005348, #99e2d3)`,"--color-background-cyan":`light-dark(#a3e0ef, #83c2d43D)`,"--color-border-cyan":`light-dark(#91d3e3, #67a7b8)`,"--color-icon-cyan":`light-dark(#00505f, #83c2d4)`,"--color-text-cyan":`light-dark(#00505f, #9edef0)`,"--color-background-blue":`light-dark(#c4ddfb, #9eb7ff3D)`,"--color-border-blue":`light-dark(#b1c9e7, #6d9cfe)`,"--color-icon-blue":`light-dark(#00458c, #9eb7ff)`,"--color-text-blue":`light-dark(#00458c, #c7d3ff)`,"--color-background-purple":`light-dark(#eccef3, #f297ff3D)`,"--color-border-purple":`light-dark(#d8bbdf, #dd74f0)`,"--color-icon-purple":`light-dark(#700084, #f297ff)`,"--color-text-purple":`light-dark(#700084, #fac1ff)`,"--color-background-pink":`light-dark(#fccadc, #ff99c33D)`,"--color-border-pink":`light-dark(#e7b7c8, #f273aa)`,"--color-icon-pink":`light-dark(#83004b, #ff99c3)`,"--color-text-pink":`light-dark(#83004b, #ffc3da)`,"--color-background-gray":`light-dark(#e5e5e5, var(--color-neutral))`,"--color-border-gray":`light-dark(#d4d4d4, #262626)`,"--color-icon-gray":`light-dark(#525252, #a3a3a3)`,"--color-text-gray":`light-dark(#262626, #e5e5e5)`,"--radius-none":`0px`,"--radius-inner":`0.375rem`,"--radius-element":`0.625rem`,"--radius-container":`0.75rem`,"--radius-page":`1.75rem`,"--radius-full":`9999px`,"--shadow-low":`0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 25%)), 0 4px 8px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 40%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 8%))`,"--shadow-med":`0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 35%)), 0 4px 12px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 12%))`,"--shadow-high":`0 4px 6px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), 0 12px 24px light-dark(oklch(0 0 0 / 15%), oklch(0 0 0 / 70%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 15%))`,"--shadow-inset-hover":`inset 0px 0px 0px 2px #0074e24D`,"--shadow-inset-selected":`inset 0px 0px 0px 2px #0074e280`,"--shadow-inset-success":`inset 0px 0px 0px 2px #1981004D`,"--shadow-inset-warning":`inset 0px 0px 0px 2px #ffce2f4D`,"--shadow-inset-error":`inset 0px 0px 0px 2px #e33f4a4D`},components:{heading:{"level:1":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-1-size)`,fontWeight:`var(--text-heading-1-weight)`,lineHeight:`var(--text-heading-1-leading)`},"level:2":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-2-size)`,fontWeight:`var(--text-heading-2-weight)`,lineHeight:`var(--text-heading-2-leading)`},"level:3":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-3-size)`,fontWeight:`var(--text-heading-3-weight)`,lineHeight:`var(--text-heading-3-leading)`},"level:4":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-4-size)`,fontWeight:`var(--text-heading-4-weight)`,lineHeight:`var(--text-heading-4-leading)`},"level:5":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-5-size)`,fontWeight:`var(--text-heading-5-weight)`,lineHeight:`var(--text-heading-5-leading)`},"level:6":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-6-size)`,fontWeight:`var(--text-heading-6-weight)`,lineHeight:`var(--text-heading-6-leading)`},"type:display-1":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-1-size)`,lineHeight:`var(--text-display-1-leading)`},"type:display-2":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-2-size)`,lineHeight:`var(--text-display-2-leading)`},"type:display-3":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-3-size)`,lineHeight:`var(--text-display-3-leading)`}},text:{"type:body":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-body-size)`,lineHeight:`var(--text-body-leading)`},"type:large":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-large-size)`,lineHeight:`var(--text-large-leading)`},"type:label":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-label-size)`,lineHeight:`var(--text-label-leading)`},"type:code":{fontFamily:`var(--font-family-code)`,fontSize:`var(--text-code-size)`,lineHeight:`var(--text-code-leading)`},"type:supporting":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-supporting-size)`,lineHeight:`var(--text-supporting-leading)`},"type:display-1":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-1-size)`,lineHeight:`var(--text-display-1-leading)`},"type:display-2":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-2-size)`,lineHeight:`var(--text-display-2-leading)`},"type:display-3":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-3-size)`,lineHeight:`var(--text-display-3-leading)`}},button:{"variant:destructive":{backgroundColor:`var(--color-error-muted)`,color:`var(--color-error)`}},badge:{"variant:info":{backgroundColor:`light-dark(#0074e2, #6d9cfe)`,color:`light-dark(#ffffff, #171717)`},"variant:neutral":{backgroundColor:`var(--color-background-gray)`,color:`var(--color-text-gray)`},"variant:success":{backgroundColor:`light-dark(#198100, #64af4c)`,color:`light-dark(#ffffff, #171717)`},"variant:warning":{backgroundColor:`#ffce2f`,color:`#171717`},"variant:error":{backgroundColor:`light-dark(#c9303a, #ff705d)`,color:`light-dark(#ffffff, #171717)`},"variant:red":{backgroundColor:`var(--color-background-red)`,color:`var(--color-text-red)`},"variant:orange":{backgroundColor:`var(--color-background-orange)`,color:`var(--color-text-orange)`},"variant:yellow":{backgroundColor:`var(--color-background-yellow)`,color:`var(--color-text-yellow)`},"variant:green":{backgroundColor:`var(--color-background-green)`,color:`var(--color-text-green)`},"variant:teal":{backgroundColor:`var(--color-background-teal)`,color:`var(--color-text-teal)`},"variant:cyan":{backgroundColor:`var(--color-background-cyan)`,color:`var(--color-text-cyan)`},"variant:blue":{backgroundColor:`var(--color-background-blue)`,color:`var(--color-text-blue)`},"variant:purple":{backgroundColor:`var(--color-background-purple)`,color:`var(--color-text-purple)`},"variant:pink":{backgroundColor:`var(--color-background-pink)`,color:`var(--color-text-pink)`},"variant:gray":{backgroundColor:`var(--color-background-gray)`,color:`var(--color-text-gray)`}},statusdot:{"variant:success":{backgroundColor:`light-dark(#198100, #64af4c)`},"variant:warning":{backgroundColor:`#ffce2f`},"variant:error":{backgroundColor:`light-dark(#c9303a, #ff705d)`},"variant:accent":{backgroundColor:`light-dark(#0074e2, #6d9cfe)`}},banner:{"status:info":{"--color-accent-muted":`var(--color-background-blue)`,"--color-text-primary":`var(--color-text-blue)`,"--color-text-secondary":`var(--color-text-blue)`,"--color-accent":`var(--color-text-blue)`},"status:success":{"--color-text-primary":`var(--color-text-green)`,"--color-text-secondary":`var(--color-text-green)`,"--color-success":`var(--color-text-green)`},"status:warning":{"--color-text-primary":`var(--color-text-yellow)`,"--color-text-secondary":`var(--color-text-yellow)`,"--color-warning":`var(--color-text-yellow)`},"status:error":{"--color-text-primary":`var(--color-text-red)`,"--color-text-secondary":`var(--color-text-red)`,"--color-error":`var(--color-text-red)`}},switch:{base:{"--color-background-gray":`var(--color-border-emphasized)`}},progressbar:{base:{"--color-background-muted":`var(--color-border-emphasized)`},"variant:accent":{"--color-accent":`#0074e2`},"variant:success":{"--color-success":`#198100`},"variant:warning":{"--color-warning":`#ffce2f`},"variant:error":{"--color-error":`#c9303a`}},card:{base:{padding:`var(--spacing-3)`}},section:{base:{padding:`var(--spacing-3)`}}},__onDark:{tokens:{"color-scheme":`dark`,"--color-text-primary":`var(--color-on-dark)`,"--color-icon-primary":`var(--color-on-dark)`,"--color-accent":`var(--color-on-dark)`}},__onLight:{tokens:{"color-scheme":`light`,"--color-text-primary":`var(--color-on-light)`,"--color-icon-primary":`var(--color-on-light)`,"--color-accent":`var(--color-on-light)`}},icons:{close:(0,q.jsx)(je,{...yY}),chevronDown:(0,q.jsx)(is,{...yY}),chevronLeft:(0,q.jsx)(as,{...yY}),chevronRight:(0,q.jsx)(os,{...yY}),chevronsLeft:(0,q.jsx)(ss,{...yY}),chevronsRight:(0,q.jsx)(cs,{...yY}),check:(0,q.jsx)(rs,{...yY}),success:(0,q.jsx)(us,{...yY}),error:(0,q.jsx)(ms,{...yY}),warning:(0,q.jsx)(Wc,{...yY}),info:(0,q.jsx)(Js,{...yY}),calendar:(0,q.jsx)(ts,{...yY}),clock:(0,q.jsx)(ys,{...yY}),externalLink:(0,q.jsx)(Os,{...yY}),menu:(0,q.jsx)(sc,{...yY}),moreHorizontal:(0,q.jsx)(Ds,{...yY}),search:(0,q.jsx)(Dc,{...yY}),arrowUp:(0,q.jsx)(Xo,{...yY}),arrowDown:(0,q.jsx)(ue,{...yY}),arrowsUpDown:(0,q.jsx)(Jo,{...yY}),funnel:(0,q.jsx)(Hs,{...yY}),eyeSlash:(0,q.jsx)(ks,{...yY}),viewColumns:(0,q.jsx)(xs,{...yY}),copy:(0,q.jsx)(Ss,{...yY}),checkDouble:(0,q.jsx)(ns,{...yY}),wrench:(0,q.jsx)(Xc,{...yY}),stop:(0,q.jsx)(Rc,{...yY}),microphone:(0,q.jsx)(dc,{...yY})}};function xY({children:e}){let t=nu(zG,e=>e.snapshot?.preferences),n=t?.theme??`system`,r=t?.appearance??FW,i=LW(n,r),a=t?.chatWidth??820,o=t?.chatFontSize??14,[s,c]=(0,K.useState)(()=>window.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1);(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(prefers-color-scheme: dark)`);if(!e)return;let t=()=>c(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let l=n===`system`?s?`dark`:`light`:n,u=l===`dark`||l===`pine`?`dark`:`light`;return(0,K.useEffect)(()=>{let e=document.documentElement;e.dataset.theme=l,e.dataset.palette=i,e.style.setProperty(`--conversation-content-width`,`${a}px`),e.style.setProperty(`--conversation-font-size`,`${o}px`);let t={};if(r.background&&(t[`--page`]=r.background),r.foreground&&(t[`--text`]=r.foreground),r.background||r.foreground)for(let[e,n]of Object.entries({sidebar:3,"sidebar-hover":7,"sidebar-active":10,border:12,"border-strong":22,muted:65,subtle:52,"settings-secondary-text":75}))t[`--${e}`]=`color-mix(in srgb, var(--text) ${n}%, var(--page))`;r.accent&&(t[`--accent`]=r.accent,t[`--focus`]=r.accent),e.style.setProperty(`--openpi-interface-font`,{codex:`var(--openpi-default-font)`,system:`var(--openpi-default-font)`,sans:`Arial, Helvetica, sans-serif`,serif:`Georgia, 'Times New Roman', serif`,mono:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`}[r.font]);for(let n of[`page`,`text`,`sidebar`,`sidebar-hover`,`sidebar-active`,`border`,`border-strong`,`muted`,`subtle`,`settings-secondary-text`,`accent`,`focus`]){let r=t[`--${n}`];r?e.style.setProperty(`--${n}`,r):e.style.removeProperty(`--${n}`)}},[r,o,a,i,l]),(0,q.jsx)(Ql,{i18n:Xl,children:(0,q.jsx)(Tu,{theme:bY,mode:u,children:e})})}var SY=document.getElementById(`root`);if(!SY)throw Error(`OpenPI Web root is missing`);(0,el.createRoot)(SY).render((0,q.jsx)(K.StrictMode,{children:(0,q.jsx)(xY,{children:(0,q.jsx)(vY,{})})})); \ No newline at end of file +`)}function Gq(e,t){return e.kind===`event`?t(`trajectoryEvent_${e.title}`,{defaultValue:e.title}):e.kind===`call`||e.kind===`result`?e.title:e.kind===`assistant`&&!e.message?.content&&Wq(e)?t(`trajectoryReasoningTitle`):t(`trajectory_${e.kind}`)}function Kq(e){if(e.input)try{let t=JSON.parse(e.input);if(t&&typeof t==`object`&&!Array.isArray(t)){let n=vK(e.title,t);if(n)return n}}catch{}return e.input||e.message?.content||e.message?.errorMessage||e.error||Wq(e)||e.result?.content||``}function qq({node:e}){let{t}=W();if(!e.outcome)return null;let n=e.state??(e.result?yd({type:`toolCall`,name:e.title,id:e.callId,arguments:e.input??``},e.result).state:void 0),r=t(n===`cancelled`||n===`timed_out`||n===`running`?`toolState_${n}`:`trajectory_${e.outcome}`),i=n===`running`||n===`timed_out`?vs:e.outcome===`returned`?rs:e.outcome===`error`?je:fs;return(0,q.jsxs)(`span`,{className:`trajectory-outcome ${e.outcome}`,title:r,children:[(0,q.jsx)(i,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:r})]})}function Jq({label:e,value:t}){return(0,q.jsxs)(`section`,{className:`trajectory-evidence`,children:[(0,q.jsx)(`h3`,{children:e}),(0,q.jsx)(Pq,{text:t})]})}function Yq({node:e,number:t,onClose:n}){let{t:r,i18n:i}=W(),a=(0,K.useId)(),[o,s]=(0,K.useState)(`summary`),c=e.result,l=e.message,u=Wq(e),d=e.kind===`call`||e.kind===`result`,f=[{key:`summary`,label:r(`trajectorySummary`)},...e.input===void 0?[]:[{key:`input`,label:r(`trajectoryInputTab`)}],...d?[{key:`output`,label:r(`trajectoryResultTab`)}]:[],{key:`timing`,label:r(`trajectoryTimingTab`)},...!d&&l?.role===`assistant`?[{key:`usage`,label:r(`trajectoryUsageTab`)}]:[]],p=e.timestamp?new Date(e.timestamp):null,m=p&&Number.isFinite(p.getTime())?p.toLocaleString(i.language,{hour12:!1}):e.timestamp,h=(0,q.jsxs)(q.Fragment,{children:[c?(0,q.jsx)(Jq,{label:r(`trajectoryOutput`),value:c.content||r(`noOutput`)}):(0,q.jsx)(`p`,{className:`trajectory-missing`,children:r(e.missingOutput?`trajectoryNestedOutputMissing`:`trajectoryMissingResult`)}),o===`output`&&c?.details!==void 0&&(0,q.jsxs)(`details`,{className:`trajectory-disclosure`,children:[(0,q.jsx)(`summary`,{children:r(`trajectoryStructured`)}),(0,q.jsx)(`pre`,{children:JSON.stringify(c.details,null,2)})]})]}),g=l&&(0,q.jsxs)(q.Fragment,{children:[l.content&&(0,q.jsx)(Jq,{label:r(`trajectoryRecordedContent`),value:l.content}),u&&(0,q.jsxs)(`details`,{className:`trajectory-disclosure trajectory-reasoning`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(Zs,{"aria-hidden":`true`}),r(`trajectoryThinking`)]}),(0,q.jsx)(`pre`,{children:u})]}),!l.content&&!u&&(0,q.jsx)(`p`,{children:r(`noOutput`)})]});return(0,q.jsxs)(`section`,{className:`trajectory-inspector`,"aria-label":r(`trajectoryDetails`),tabIndex:0,children:[(0,q.jsxs)(`header`,{className:`trajectory-inspector-heading`,children:[(0,q.jsx)(`span`,{className:`trajectory-role ${e.kind}`,children:r(`trajectoryRole_${e.kind}`)}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`p`,{children:r(`trajectoryRecordNumber`,{number:t})}),(0,q.jsx)(`h2`,{id:`${a}-title`,children:Gq(e,r)})]}),(0,q.jsx)(`button`,{type:`button`,className:`trajectory-inspector-close`,"aria-label":r(`close`),onClick:n,children:(0,q.jsx)(je,{"aria-hidden":`true`})})]}),e.outcome&&(0,q.jsx)(qq,{node:e}),e.error&&(0,q.jsx)(`p`,{className:`trajectory-failure`,children:e.error}),l?.errorMessage&&(0,q.jsx)(`p`,{className:`trajectory-failure`,children:l.errorMessage}),f.length>1&&(0,q.jsx)(`div`,{className:`trajectory-tabs`,role:`tablist`,"aria-label":r(`trajectoryDetails`),onKeyDown:e=>{let t=f.findIndex(e=>e.key===o),n=e.key===`ArrowRight`?(t+1)%f.length:e.key===`ArrowLeft`?(t+f.length-1)%f.length:e.key===`Home`?0:e.key===`End`?f.length-1:void 0;n!==void 0&&(e.preventDefault(),s(f[n].key),e.currentTarget.querySelectorAll(`button`)[n]?.focus())},children:f.map(e=>(0,q.jsx)(`button`,{type:`button`,role:`tab`,id:`${a}-${e.key}`,"aria-controls":`${a}-panel`,"aria-selected":o===e.key,tabIndex:o===e.key?0:-1,onClick:()=>s(e.key),children:e.label},e.key))}),(0,q.jsxs)(`section`,{className:`trajectory-detail-content`,role:f.length>1?`tabpanel`:void 0,id:`${a}-panel`,"aria-labelledby":f.length>1?`${a}-${o}`:`${a}-title`,children:[(l?.truncation||c?.truncation)&&(0,q.jsx)(`p`,{className:`trajectory-warning`,children:r(`trajectoryEvidenceTruncated`)}),(o===`summary`||o===`input`)&&e.input!==void 0&&(0,q.jsx)(Zq,{node:e}),(o===`summary`||o===`output`)&&d&&h,!d&&o===`summary`&&g,o===`timing`&&(0,q.jsxs)(`dl`,{className:`trajectory-facts`,children:[(0,q.jsx)(`dt`,{children:r(`trajectoryDurationLabel`)}),(0,q.jsx)(`dd`,{children:Vq(e.durationMs)}),(0,q.jsx)(`dt`,{children:r(`trajectoryTimingSource`)}),(0,q.jsx)(`dd`,{children:r(e.durationMs===void 0?`trajectoryTimingUnknown`:`trajectoryTimingNative`)}),(0,q.jsx)(`dt`,{children:r(`trajectoryTTFT`)}),(0,q.jsx)(`dd`,{children:r(`trajectoryNotRecorded`)}),(0,q.jsx)(`dt`,{children:r(`trajectoryGenerationTime`)}),(0,q.jsx)(`dd`,{children:r(`trajectoryNotRecorded`)}),(0,q.jsx)(`dt`,{children:r(`trajectoryThroughput`)}),(0,q.jsx)(`dd`,{children:r(`trajectoryNotRecorded`)})]}),o===`usage`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(Xq,{message:l}),(0,q.jsxs)(`dl`,{className:`trajectory-facts`,children:[(0,q.jsx)(`dt`,{children:r(`trajectoryProvider`)}),(0,q.jsx)(`dd`,{children:l?.provider??`—`}),(0,q.jsx)(`dt`,{children:r(`trajectoryModel`)}),(0,q.jsx)(`dd`,{children:l?.model??`—`})]})]}),e.kind===`event`&&!l&&o===`summary`&&(0,q.jsx)(`p`,{className:`trajectory-missing`,children:r(`trajectoryEventOnly`)}),(0,q.jsxs)(`details`,{className:`trajectory-disclosure trajectory-metadata`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(Js,{"aria-hidden":`true`}),r(`trajectoryRecordInfo`)]}),(0,q.jsxs)(`dl`,{children:[m&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`trajectoryRecordedAt`)}),(0,q.jsx)(`dd`,{children:(0,q.jsx)(`time`,{dateTime:e.timestamp,children:m})})]}),e.callId&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`trajectoryCallId`)}),(0,q.jsx)(`dd`,{children:e.callId})]}),(0,q.jsx)(`dt`,{children:r(`trajectoryRecordId`)}),(0,q.jsx)(`dd`,{children:e.key}),e.kind===`event`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`dt`,{children:r(`trajectoryEventType`)}),(0,q.jsx)(`dd`,{children:e.title})]})]})]})]})]})}function Xq({message:e}){let{t}=W(),n=e?.usage;return n?(0,q.jsx)(`dl`,{className:`trajectory-facts`,children:[`input`,`cacheRead`,`cacheWrite`,`output`].map(e=>(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:t(`trajectoryUsage_${e}`)}),(0,q.jsx)(`dd`,{children:n[e]?.toLocaleString()??`—`})]},e))}):(0,q.jsx)(`p`,{className:`trajectory-missing`,children:t(`trajectoryUsageUnknown`)})}function Zq({node:e}){let{t}=W(),[n,r]=(0,K.useState)(!1),i;if(e.title===`codemode`)try{let t=JSON.parse(e.input??``);t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`&&(i=t.code)}catch{}return(0,q.jsxs)(`section`,{className:`trajectory-evidence`,children:[(0,q.jsxs)(`h3`,{children:[t(i?`trajectoryCode`:`trajectoryArguments`),i&&(0,q.jsx)(`button`,{type:`button`,"aria-pressed":n,onClick:()=>r(!n),children:t(`trajectoryRawArguments`)})]}),(0,q.jsx)(Pq,{text:i&&!n?i:e.input??``,code:!!(i&&!n)})]})}var Qq=(0,K.memo)(function({snapshot:e,running:t}){let{t:n}=W(),r=(0,K.useRef)(null),i=(0,K.useRef)(!0),a=(0,K.useRef)(!1),o=(0,K.useRef)(null),s=qK(e.selectedSession,{beforePrepend:()=>{r.current&&(o.current={height:r.current.scrollHeight,top:r.current.scrollTop})}}),c=s.session?.entries??Uq,l=e.currentSessionPath===e.selectedSession?.path?e.runtime.liveTools:void 0,u=(0,K.useMemo)(()=>Bq(c,l),[c,l]),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(``),[_,v]=(0,K.useState)(50),[y,b]=(0,K.useState)(new Set),[x,S]=(0,K.useState)(!1),[C,w]=(0,K.useState)(!0),[T,E]=(0,K.useState)(null),D=(0,K.useMemo)(()=>{let e=h.trim().toLocaleLowerCase();return e?u.filter(t=>[Gq(t,n),t.title,t.callId,t.input,Kq(t),t.result?.content,Wq(t)].some(t=>t?.toLocaleLowerCase().includes(e))):u},[u,h,n]),O=D.findIndex(e=>e.key===d),k=Math.min(Math.max(0,D.length-_),O<0?D.length:O),A=D.slice(k,k+_),j=T?.keys.length===A.length&&T.keys.every((e,t)=>e===A[t]?.key)?T:null,M=(0,K.useMemo)(()=>Iq(A,j),[A,j]),N=A.find(e=>e.key===d)??Lq(A);(0,K.useLayoutEffect)(()=>{let e=o.current;e&&r.current&&(r.current.scrollTop=e.top+r.current.scrollHeight-e.height,o.current=null)}),(0,K.useEffect)(()=>{N?.key&&(!i.current&&!a.current||(a.current=!1,r.current?.querySelector(`.trajectory-record[aria-pressed="true"]`)?.scrollIntoView?.({block:`nearest`,inline:`nearest`})))},[N?.key]),(0,K.useEffect)(()=>{p&&r.current?.querySelector(`.trajectory-record[aria-pressed="true"]`)?.focus()},[p]);let P=(0,K.useMemo)(()=>Rq(u),[u]),F=new Set(A.map(e=>e.key)),I=P.flatMap(e=>{let t=e.runs.map(e=>e.filter(e=>F.has(e.key))).filter(e=>e.length>0);return t.length?[{...e,runs:t}]:[]}),ee=new Map(u.map((e,t)=>[e.key,t+1])),L=s.session?.truncation,R=u.filter(e=>e.kind===`assistant`),te=u.filter(e=>e.kind===`call`),z=c.flatMap(e=>e.turnTiming?[e.turnTiming]:[]).at(-1);function B(e){let t=Kq(e);return(0,q.jsx)(`li`,{"data-nested":!!e.parentKey||void 0,"data-outside-range":M&&!M.has(e.key)||void 0,hidden:x&&e.kind===`call`,children:(0,q.jsxs)(`button`,{type:`button`,"aria-pressed":e.key===N?.key,onClick:()=>{a.current=!0,f(e.key),m(!1)},className:`trajectory-record ${e.kind}`,"data-response-error":e.kind===`assistant`&&(e.message?.stopReason===`error`||e.message?.stopReason===`aborted`)||void 0,title:zD(t,220),children:[(0,q.jsx)(`span`,{className:`trajectory-row-number`,children:ee.get(e.key)}),(0,q.jsx)(`span`,{className:`trajectory-role ${e.kind}`,children:n(`trajectoryRole_${e.kind}`)}),(0,q.jsxs)(`span`,{className:`trajectory-record-main`,children:[(0,q.jsx)(`span`,{className:`trajectory-record-title`,children:(0,q.jsx)(`strong`,{children:Gq(e,n)})}),t&&(0,q.jsx)(`span`,{className:`trajectory-preview`,children:zD(t,180)})]}),(0,q.jsxs)(`span`,{className:`trajectory-record-end`,children:[(0,q.jsx)(qq,{node:e}),C&&e.durationMs!==void 0&&(0,q.jsx)(`span`,{className:`trajectory-row-duration`,children:Vq(e.durationMs)}),(0,q.jsx)(`time`,{dateTime:e.timestamp,title:n(`trajectoryRecordedAt`),children:BD(e.timestamp)})]})]})},e.key)}return(0,q.jsxs)(`section`,{className:`conversation trajectory`,"aria-label":n(`trajectory`),children:[(0,q.jsxs)(`header`,{className:`trajectory-toolbar`,children:[(0,q.jsxs)(`div`,{className:`trajectory-context`,children:[(0,q.jsx)(nc,{"aria-hidden":`true`}),(0,q.jsxs)(`button`,{type:`button`,"aria-pressed":C,onClick:()=>w(!C),children:[(0,q.jsx)(vs,{"aria-hidden":`true`}),n(`trajectoryDurationLabel`)]}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":y.size>0,onClick:()=>b(y.size?new Set:new Set(P.map(e=>e.key))),children:n(`trajectoryFoldTurns`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":x,onClick:()=>S(!x),children:n(`trajectoryFoldCalls`)}),(0,q.jsx)(`span`,{className:`trajectory-count`,children:n(h.trim()?`trajectoryMatches`:`trajectoryRecordCount`,{count:D.length})}),(0,q.jsxs)(`details`,{className:`trajectory-scope`,children:[(0,q.jsx)(`summary`,{"aria-label":n(`trajectoryScope`),title:n(`trajectoryScope`),children:(0,q.jsx)(Js,{"aria-hidden":`true`})}),(0,q.jsxs)(`div`,{className:`trajectory-scope-popover`,children:[(0,q.jsx)(`p`,{children:n(`trajectoryScope`)}),(0,q.jsxs)(`dl`,{"aria-label":n(`trajectoryMetrics`),children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:n(`trajectoryModelResponses`)}),(0,q.jsx)(`dd`,{children:n(`trajectoryRequestCount`,{count:R.length})})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:n(`trajectoryToolCalls`)}),(0,q.jsx)(`dd`,{children:n(`trajectoryToolCount`,{count:te.length})})]}),z&&(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:n(`trajectoryLastTurn`)}),(0,q.jsx)(`dd`,{children:Vq(z.elapsedMs)})]})]})]})]})]}),(0,q.jsxs)(`label`,{className:`trajectory-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{type:`search`,"aria-label":n(`trajectorySearch`),placeholder:n(`trajectorySearch`),value:h,onChange:e=>g(e.currentTarget.value)})]})]}),u.length>0&&(0,q.jsx)(Hq,{nodes:A,selectedKey:N?.key,range:j,onRange:e=>E(e?{...e,keys:A.map(e=>e.key)}:null),onSelect:e=>{a.current=!0,f(e),m(!1),b(new Set),S(!1)}}),t&&(0,q.jsx)(`p`,{className:`trajectory-live`,role:`status`,children:n(`trajectoryRunning`)}),L?.truncated&&(0,q.jsx)(`p`,{className:`trajectory-warning`,children:n(`trajectoryTruncated`,{entries:L.entriesOmitted,parts:L.messagePartsOmitted,messages:L.messagesTruncated})}),A.length?(0,q.jsxs)(`div`,{className:`trajectory-body`,"data-inspector-open":N&&!p||void 0,children:[(0,q.jsxs)(`div`,{className:`trajectory-ledger`,"data-range":!!j||void 0,ref:r,onScroll:e=>{let t=e.currentTarget;i.current=t.scrollHeight-t.scrollTop-t.clientHeight<40},children:[k+_{a.current=!0,f(null),m(!1),v(50)},children:n(`trajectoryLatestRecords`)}),s.hasMore&&(0,q.jsx)(`button`,{type:`button`,className:`trajectory-load`,disabled:s.loading||s.verifying,onClick:()=>{s.loadOlder(),v(e=>e+50)},children:n(s.loading?`trajectoryHistoryLoading`:`trajectoryLoadHistory`)}),s.error&&(0,q.jsx)(`p`,{className:`trajectory-warning`,role:`alert`,children:n(s.error)}),k>0&&(0,q.jsx)(`button`,{type:`button`,className:`trajectory-load`,onClick:()=>v(e=>e+50),children:n(`trajectoryEarlier`,{count:k})}),I.map((e,t)=>{let r=!y.has(e.key);return(0,q.jsxs)(`section`,{className:`trajectory-group`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`trajectory-group-heading`,"aria-expanded":r,onClick:()=>b(t=>{let n=new Set(t);return r?n.add(e.key):n.delete(e.key),n}),children:[(0,q.jsx)(os,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{className:`trajectory-group-label`,children:[(0,q.jsx)(`span`,{className:`trajectory-turn-number`,children:n(`trajectoryTurn`,{number:t+1})}),(0,q.jsx)(`span`,{className:`trajectory-group-name`,children:e.prompt?r&&!h.trim()?n(`trajectoryConversationGroup`):zD(e.prompt.message?.content||n(`trajectory_user`),80):n(`trajectoryEarlierGroup`)})]})]}),r&&(0,q.jsx)(`ol`,{children:e.runs.map(e=>e.length===1?B(e[0]):(0,q.jsx)(`li`,{className:`trajectory-event-group`,children:(0,q.jsxs)(`details`,{open:e.some(e=>e.key===N?.key)||!!h.trim(),children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(kc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:n(`trajectoryEventCount`,{count:e.length})}),(0,q.jsx)(os,{"aria-hidden":`true`})]}),(0,q.jsx)(`ol`,{children:e.map(B)})]})},e[0].key))})]},e.key)})]}),N&&!p&&(0,q.jsx)(Yq,{node:N,number:ee.get(N.key),onClose:()=>m(!0)},N.key)]}):(0,q.jsxs)(`div`,{className:`trajectory-empty`,children:[(0,q.jsx)(nc,{"aria-hidden":`true`}),(0,q.jsx)(`p`,{children:n(h.trim()?`trajectoryNoMatches`:`trajectoryEmpty`)})]})]})});function $q(){(0,K.useEffect)(()=>{let e=new de,t=new AbortController,n,r=async r=>{let i=r.data;if(!(r.source!==window||r.origin!==location.origin||i?.source!==`openpi-browser-extension`||i.type!==`connector-hello`||typeof i.bridgeId!=`string`||!/^[\da-f-]{36}$/.test(i.bridgeId)||!Cj(i.browser)||n===i.bridgeId)){n=i.bridgeId;try{let r=await e.request(`/api/browser/connections`,{method:`POST`,signal:t.signal,body:JSON.stringify({browser:i.browser,profileId:i.profileId,extensionId:i.extensionId,extensionOrigin:i.extensionOrigin,version:i.version})});!t.signal.aborted&&n===i.bridgeId&&window.postMessage({source:`openpi-browser-ui`,type:`connector-authorize`,...r},location.origin)}catch{n===i.bridgeId&&(n=void 0)}}},i=()=>window.postMessage({source:`openpi-browser-ui`,type:`connector-probe`},location.origin);window.addEventListener(`message`,r),i();let a=setInterval(i,5e3);return()=>{t.abort(),clearInterval(a),window.removeEventListener(`message`,r)}},[])}function eJ(e,t){let n=e.trim();if(!n||n.length>16384)return null;let r=/^[a-z][a-z\d+.-]*:\/\//iu.test(n);try{let e=new URL(r?n:`https://${n}`);return!r&&(e.hostname===`localhost`||e.hostname.endsWith(`.localhost`)||e.hostname===`[::1]`||/^127(?:\.\d{1,3}){3}$/u.test(e.hostname))&&(e=new URL(`http://${n}`)),![`http:`,`https:`].includes(e.protocol)||e.username||e.password||e.origin===t?null:e.href}catch{return null}}function tJ(){return document.documentElement.dataset.openpiBrowserExtension===`ready`?[...document.querySelectorAll(`iframe[data-openpi-browser-document]`)].map(e=>({id:e.dataset.openpiBrowserPage,document:e.dataset.openpiBrowserDocument,url:e.dataset.openpiBrowserUrl,title:e.dataset.openpiBrowserTitle||``})):[]}function nJ(e,t,n){let r=(0,K.useRef)(n),i=(0,K.useRef)(0);r.current=n,(0,K.useEffect)(()=>{if(!e||!t)return;let n=new de,a=new AbortController,o,s,c,l=e=>window.postMessage({source:`openpi-browser-ui`,...e},location.origin),u=()=>{c?.(),c=void 0,s&&l({type:`control-cancel`,requestId:s}),s=void 0},d=(r,i,o)=>{r===s&&(c?.(),c=void 0,s=void 0,n.request(`/api/browser/control`,{method:`POST`,signal:a.signal,body:JSON.stringify({sessionId:e,sessionPath:t,requestId:r,result:i,error:o,pages:tJ()})}).catch(()=>{}))},f=e=>{let t=e.data;e.source===window&&e.origin===location.origin&&t?.source===`openpi-browser-extension`&&(t.type===`connector-hello`?i.current=Date.now():t.type===`control-result`&&d(t.requestId,t.result,t.error))},p=async(e,t)=>{let n=eJ(t||``,location.origin);if(!n){d(e,void 0,`Invalid internal browser URL.`);return}let i=new AbortController;c=()=>i.abort();let o=await r.current(n,AbortSignal.any([a.signal,i.signal]));if(a.signal.aborted||s!==e)return;if(!o){d(e,void 0,`The internal browser has reached its page limit.`);return}let l=()=>{let t=document.getElementById(o)?.querySelector(`iframe[data-openpi-browser-document]`),n=t&&tJ().find(e=>e.id===t.dataset.openpiBrowserPage);n&&d(e,{root:n.id})},u=new MutationObserver(l);u.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`data-openpi-browser-document`]});let f=setTimeout(()=>d(e,void 0,`The internal page did not bind. Inspect the browser's loading or embedding error.`),1e4);c=()=>{i.abort(),u.disconnect(),clearTimeout(f)},l()},m=async()=>{if(Date.now()-i.current>15e3&&document.documentElement.dataset.openpiBrowserExtension!==`ready`){u(),a.signal.aborted||(o=setTimeout(()=>void m(),1e3));return}try{let{pending:r}=await n.request(`/api/browser/control`,{method:`POST`,signal:a.signal,body:JSON.stringify({sessionId:e,sessionPath:t,pages:tJ()})});s&&s!==r?.requestId&&u(),r&&!r.running&&r.request&&!s&&(s=r.requestId,r.request.operation===`open`?p(r.requestId,r.request.url).catch(()=>d(r.requestId,void 0,`The embedded browser could not open.`)):r.page?l({type:`control`,id:r.page.id,document:r.page.document,requestId:r.requestId,request:r.request}):d(r.requestId,void 0,`The embedded page is unavailable.`))}catch{u()}a.signal.aborted||(o=setTimeout(()=>void m(),250))};return window.addEventListener(`message`,f),m(),()=>{clearTimeout(o),a.abort(),u(),window.removeEventListener(`message`,f)}},[e,t])}function rJ({usage:e,workspace:t,sessionId:n,model:r}){let{t:i,i18n:a}=W(),[o,s]=(0,K.useState)(!1);if(!e)return null;let c=e.context,l=e=>new Intl.NumberFormat(a.resolvedLanguage).format(e),u=e=>new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:0}).format(e).toLowerCase(),d=c?.percent==null?i(`usageUnknown`):`${Math.round(c.percent)}%`,f=c?.percent==null?i(`usageUnknown`):`${new Intl.NumberFormat(a.resolvedLanguage,{maximumFractionDigits:1}).format(c.percent)}%`,p=c?u(c.contextWindow):i(`usageUnknown`);return(0,q.jsx)(`div`,{className:`session-usage`,children:(0,q.jsx)(Zu,{isOpen:o,onOpenChange:s,placement:`below`,alignment:`end`,width:`min(360px, calc(100vw - 24px))`,label:i(`sessionUsage`),isModal:!1,hasCloseButton:!1,content:(0,q.jsxs)(`div`,{className:`session-usage-details`,children:[(0,q.jsxs)(`div`,{className:`usage-details-heading`,children:[(0,q.jsx)(`h2`,{children:i(`sessionOverview`)}),(0,q.jsx)(V,{content:i(`close`),placement:`below`,children:(0,q.jsx)(`button`,{className:`icon-button`,type:`button`,"aria-label":i(`close`),onClick:()=>s(!1),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`section`,{className:`usage-section`,children:[(0,q.jsxs)(`div`,{className:`usage-context-heading`,children:[(0,q.jsx)(`h3`,{children:i(`usageContextLabel`)}),(0,q.jsx)(`span`,{children:f})]}),(0,q.jsxs)(`p`,{className:`usage-context-value`,children:[(0,q.jsx)(`strong`,{children:c?.tokens==null?i(`usageUnknown`):l(c.tokens)}),c&&(0,q.jsxs)(`span`,{children:[` / `,l(c.contextWindow),` tokens`]})]}),c?.percent!=null&&(0,q.jsx)(`progress`,{value:Math.max(0,Math.min(100,c.percent)),max:100,"aria-label":i(`sessionContextUsage`)}),(0,q.jsx)(`p`,{className:`usage-help`,children:i(`usageContextHelp`)}),r&&(0,q.jsxs)(`div`,{className:`usage-context-model`,children:[(0,q.jsx)(`span`,{children:r.name}),(0,q.jsxs)(`span`,{children:[r.provider,` / `,r.id]})]})]}),(0,q.jsxs)(`section`,{className:`usage-section`,children:[(0,q.jsx)(`h3`,{children:i(`usageSessionTotals`)}),(0,q.jsxs)(`dl`,{className:`usage-metrics`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageInputLabel`)}),(0,q.jsx)(`dd`,{children:l(e.input)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageOutputLabel`)}),(0,q.jsx)(`dd`,{children:l(e.output)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageCacheReadLabel`)}),(0,q.jsx)(`dd`,{children:l(e.cacheRead)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageCacheWriteLabel`)}),(0,q.jsx)(`dd`,{children:l(e.cacheWrite)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`dt`,{children:i(`usageTotalLabel`)}),(0,q.jsx)(`dd`,{children:l(e.total)})]})]}),(0,q.jsx)(`p`,{className:`usage-help`,children:i(`usageTotalsHelp`)})]}),t&&(0,q.jsxs)(`dl`,{className:`usage-workspace`,children:[(0,q.jsx)(`dt`,{children:i(`usageWorkspaceLabel`)}),(0,q.jsx)(`dd`,{children:t})]}),n&&(0,q.jsxs)(`details`,{className:`usage-identity`,children:[(0,q.jsxs)(`summary`,{children:[(0,q.jsx)(`span`,{children:i(`usageSessionId`)}),(0,q.jsx)(is,{"aria-hidden":`true`})]}),(0,q.jsx)(`code`,{children:n})]})]}),children:t=>(0,q.jsx)(V,{content:i(`usageOpenDetails`,{input:l(e.input),output:l(e.output),percent:f,capacity:p}),placement:`below`,isEnabled:!o,children:(0,q.jsxs)(`button`,{...t,className:`session-usage-trigger`,type:`button`,"aria-label":i(`usageOpenDetails`,{input:u(e.input),output:u(e.output),percent:d,capacity:p}),children:[(0,q.jsxs)(`span`,{className:`usage-stat`,children:[(0,q.jsx)(Xo,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:u(e.input)})]}),(0,q.jsxs)(`span`,{className:`usage-stat`,children:[(0,q.jsx)(ue,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:u(e.output)})]}),(0,q.jsxs)(`span`,{className:`usage-stat`,children:[(0,q.jsx)(Us,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[d,c&&(0,q.jsxs)(`span`,{className:`usage-capacity`,children:[` / `,p]})]})]})]})})})})}function iJ(e,t){return new Promise((n,r)=>{let i=new FileReader,a=e=>{t.removeEventListener(`abort`,o),e?r(e):typeof i.result==`string`?n(i.result.slice(i.result.indexOf(`,`)+1)):r(Error(`File read failed`))},o=()=>{i.abort(),a(new DOMException(`File read cancelled`,`AbortError`))};i.onload=()=>a(),i.onerror=()=>a(Error(`File read failed`)),t.addEventListener(`abort`,o,{once:!0}),t.aborted?o():i.readAsDataURL(e)})}function aJ({name:e,kind:t=`file`,expanded:n=!1}){let r=t===`directory`?`folder`:t===`symlink`?`link`:/\.(?:md|markdown)$/iu.test(e)?`markdown`:/\.(?:csv|tsv|xlsx?)$/iu.test(e)?`sheet`:/\.(?:png|jpe?g|gif|webp|svg|bmp|ico)$/iu.test(e)?`image`:/\.(?:pdf|docx?|pptx?)$/iu.test(e)?`document`:/\.(?:[cm]?[jt]sx?|json|html?|css|py|rs|go|sh|ya?ml|toml|xml)$/iu.test(e)?`code`:`file`;return(0,q.jsx)(r===`folder`?n?zs:Vs:r===`link`?Qs:r===`sheet`?jc:r===`image`?Ns:r===`markdown`||r===`document`?Fs:r===`code`?js:Is,{className:`file-icon file-icon-${r}`,"aria-hidden":`true`})}function oJ({sessionId:e,sessionPath:t,cwd:n,canWrite:r,active:i,selected:a,onSelect:o,dropTarget:s,onShowTree:c,onRemoved:l,onReadStateChange:u,refreshRequest:d}){let{t:f}=W(),p=(0,K.useContext)($E),m=be(),h=(0,K.useMemo)(()=>new de,[]),[g,_]=(0,K.useState)(m?.files?.query??``),[v,y]=(0,K.useState)(m?.files?.expanded??[`.`]),[b,x]=(0,K.useState)({}),[S,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(null),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(0);(0,K.useEffect)(()=>{u({error:w,loading:E})},[w,E,u]);let A=(0,K.useCallback)(e=>({message:f(e instanceof ge&&e.code===`ARTIFACT_DENIED`?`filesReadDenied`:`filesReadFailedDetail`),detail:e instanceof Error?e.message:void 0}),[f]),[j,M]=(0,K.useState)(a.includes(`/`)?a.slice(0,a.lastIndexOf(`/`)):`.`),[N,P]=(0,K.useState)(null),[F,I]=(0,K.useState)(``),[ee,L]=(0,K.useState)(null),[R,te]=(0,K.useState)(!1),[z,B]=(0,K.useState)(!1),[ne,re]=(0,K.useState)([]),[ie,ae]=(0,K.useState)(!1),[oe,se]=(0,K.useState)([]),[ce,le]=(0,K.useState)(null),[H,ue]=(0,K.useState)(`.`),[fe,pe]=(0,K.useState)(``),[he,_e]=(0,K.useState)([]),[ve,ye]=(0,K.useState)(!1),[xe,Se]=(0,K.useState)([]),[Ce,we]=(0,K.useState)(0),[Te,Ee]=(0,K.useState)(!1),[U,De]=(0,K.useState)(),Oe=(0,K.useRef)(0),[ke,Ae]=(0,K.useState)([]),[G,je]=(0,K.useState)(!1),[Me,Ne]=(0,K.useState)(``),Pe=(0,K.useRef)(null),Fe=(0,K.useRef)(null),Ie=(0,K.useRef)(null),Le=(0,K.useRef)(null),Re=(0,K.useRef)(null),ze=(0,K.useRef)(!1),Be=(0,K.useRef)(0),Ve=(0,K.useRef)(null),He=(0,K.useRef)(void 0),Ue=JSON.stringify([e,t,n]),We=(0,K.useRef)(Ue);We.current=Ue;let Ge=(0,K.useRef)(r);Ge.current=r;let Ke=(0,K.useRef)(null);(0,K.useEffect)(()=>(We.current=Ue,()=>{We.current=``,Ke.current?.abort(),clearTimeout(He.current)}),[Ue]),(0,K.useEffect)(()=>{Fe.current?.setAttribute(`webkitdirectory`,``)},[]),(0,K.useEffect)(()=>{if(!ve||!i)return;Oe.current++;let n=new AbortController;return Ee(!0),h.workspaceTrash(e,t,n.signal).then(r=>{!n.signal.aborted&&r.sessionId===e&&r.sessionPath===t&&(Se(r.entries),we(r.unavailable??0),De(r.nextCursor))}).catch(e=>{n.signal.aborted||(te(!0),L(A(e).message))}).finally(()=>{n.signal.aborted||Ee(!1)}),()=>n.abort()},[h,e,t,i,ve,O,A]),(0,K.useEffect)(()=>{ce&&(Le.current?.focus(),Le.current?.select())},[ce]),(0,K.useEffect)(()=>{N&&Ie.current?.focus()},[N]);let qe=(0,K.useRef)(null),Je=(0,K.useRef)(m?.files?.treeScroll??0);(0,K.useLayoutEffect)(()=>{m?.files&&Object.assign(m.files,{query:g,expanded:v})},[m,g,v]),(0,K.useLayoutEffect)(()=>{!i||!(S||b[`.`])||Je.current!==null&&qe.current&&(qe.current.scrollTop=Je.current,Je.current=null)},[i,S,b]);let Ye=(0,K.useRef)(b);Ye.current=b;let Xe=(0,K.useRef)(S);Xe.current=S;let Ze=(0,K.useRef)(``),Qe=(0,K.useRef)(null),$e=(0,K.useRef)(new Set),et=(0,K.useRef)(!1),[tt,nt]=(0,K.useState)(!1),rt=!!g.trim();(0,K.useLayoutEffect)(()=>{let e=Ve.current;if(!e||!i)return;let t=[...qe.current?.querySelectorAll(`[data-file-row]`)??[]].find(t=>t.dataset.fileRow===e);t&&(t.focus({preventScroll:!0}),Ve.current=null)});let it=e=>e instanceof ge&&e.code===`ARTIFACT_EXISTS`?f(`filesNameExists`):e instanceof Error?e.message:f(`filesMutationFailed`),at=e=>{_(``);let t=e.path.split(`/`),n=e.kind===`directory`?t.length:t.length-1;y(e=>[...new Set([...e,`.`,...t.slice(0,n).map((e,n)=>t.slice(0,n+1).join(`/`))])]),Ve.current=e.path,k(e=>e+1),e.kind===`file`&&(e.bytes??0)<=20971520&&(o(e.path),p?.open(encodeURI(e.path)))},ot=()=>{ze.current||(P(null),L(null),Re.current?.focus({preventScroll:!0}))},st=async n=>{if(n.preventDefault(),!N||!Ge.current||ze.current)return;if(!F||F===`.`||F===`..`||/[\\/\u0000-\u001f\u007f]/u.test(F)){te(!0),L(f(`filesNameInvalid`)),Ie.current?.focus();return}ze.current=!0,B(!0),L(null);let r=Ue;try{let n=await h.mutateWorkspaceFile(e,t,{kind:N,directory:j,name:F});if(We.current!==r||n.sessionId!==e||n.sessionPath!==t)return;P(null),I(``),te(!1),L(f(`filesCreated`,{path:n.path})),at(n)}catch(e){We.current===r&&(te(!0),L(it(e)),Ie.current?.focus())}finally{We.current===r&&(ze.current=!1,B(!1))}},ct=async n=>{if(!Ge.current||ze.current)return;let r=Ue;ze.current=!0,B(!0);let i=new AbortController;Ke.current=i;let a=(e,t)=>re(n=>n.map(n=>n.id===e.id?{...n,...t}:n));try{for(let o of n){if(We.current!==r)return;if(!Ge.current){a(o,{state:`error`,message:f(`filesWriteUnavailable`)});continue}if(!(!o.file&&o.kind!==`directory`)){a(o,{state:`running`,message:void 0});try{if(o.kind===`directory`){try{await h.mutateWorkspaceFile(e,t,{kind:`create-directory`,directory:o.directory,name:o.name})}catch(n){if(!(n instanceof ge)||n.code!==`ARTIFACT_EXISTS`)throw n;await h.workspaceFiles(e,t,[o.directory===`.`?``:o.directory,o.name].filter(Boolean).join(`/`),``,i.signal)}if(We.current!==r)return;a(o,{state:`done`,message:f(`filesImported`)}),k(e=>e+1);continue}if(!o.file)continue;if(o.file.size>52428800)throw Error(f(`filesImportTooLarge`));let n=await iJ(o.file,i.signal);if(We.current!==r)return;if(!Ge.current){a(o,{state:`error`,message:f(`filesWriteUnavailable`)});continue}let s=await h.mutateWorkspaceFile(e,t,{kind:`import-file`,directory:o.directory,name:o.name,data:n,...o.createParents?{createParents:!0}:{}});if(We.current!==r||s.sessionId!==e||s.sessionPath!==t)return;a(o,{state:`done`,file:void 0,message:(s.bytes??0)>20971520?f(`filesImportedNoPreview`):f(`filesImported`)}),at(s)}catch(e){if(We.current!==r)return;a(o,{state:`error`,message:it(e)})}}}}finally{Ke.current===i&&(Ke.current=null),We.current===r&&(ze.current=!1,B(!1))}},lt=(e,t=[],n=new Map,r=[])=>{if(!Ge.current||ze.current)return;if(e.length+r.length>2e3){te(!0),L(f(`filesImportFolderLimit`));return}c(!0);let i=[...[...new Set(r)].sort((e,t)=>e.split(`/`).length-t.split(`/`).length).map(e=>({id:++Be.current,name:e.split(`/`).at(-1),directory:[j===`.`?``:j,...e.split(`/`).slice(0,-1)].filter(Boolean).join(`/`)||`.`,kind:`directory`,state:`pending`})),...e.map(e=>{let t=n.get(e)??e.webkitRelativePath;return{id:++Be.current,name:e.name,directory:t?[j===`.`?``:j,...t.split(`/`).slice(0,-1)].filter(Boolean).join(`/`)||`.`:j,createParents:!!t,file:e,state:`pending`}})];re(e=>[...e,...t.map(e=>({id:++Be.current,name:e,directory:j,state:`error`,message:f(`filesImportDirectoryUnsupported`)})),...i]),ct(i)},ut=async(n,r)=>{if(!Ge.current||ze.current)return;let i=Ue,s=r.filter(e=>!r.some(t=>t.kind===`directory`&&e.path.startsWith(`${t.path}/`)));ze.current=!0,B(!0),_e([]);let c=[],u=new Set;try{for(let r of s){if(We.current!==i||!Ge.current)return;try{if(!r.identity)throw Error(f(`filesRefreshBeforeOrganizing`));let s=await h.mutateWorkspaceFile(e,t,n===`trash`?{kind:n,path:r.path,identity:r.identity}:{kind:n,path:r.path,identity:r.identity,directory:H,name:ce?.rename?fe:r.name});if(We.current!==i||s.sessionId!==e||s.sessionPath!==t)return;if(u.add(r.path),s.trashed&&c.push(s.trashed),s.moved&&MD(e,t,s.moved.from,s.moved.to),r.kind===`directory`){let e=e=>e===r.path||e.startsWith(`${r.path}/`);if(y(t=>n===`trash`?t.filter(t=>!e(t)):t.map(t=>e(t)?`${s.path}${t.slice(r.path.length)}`:t)),M(t=>e(t)?n===`move`?`${s.path}${t.slice(r.path.length)}`:r.path.split(`/`).slice(0,-1).join(`/`)||`.`:t),n===`move`&&e(a)){let e=`${s.path}${a.slice(r.path.length)}`;o(e),p?.open(encodeURI(e))}}n===`move`&&at(s),_e(e=>[...e,{path:r.path}])}catch(e){if(We.current!==i)return;_e(t=>[...t,{path:r.path,error:it(e)}])}}Ae(c),n===`trash`&&l([...u]),se(e=>e.filter(e=>![...u].some(t=>t===e.path||e.path.startsWith(`${t}/`)))),le(null),k(e=>e+1)}finally{We.current===i&&(ze.current=!1,B(!1))}},dt=async n=>{if(!Ge.current||ze.current)return;let r=Ue;ze.current=!0,B(!0),_e([]);try{for(let i of n){if(We.current!==r||!Ge.current)return;try{let n=await h.mutateWorkspaceFile(e,t,{kind:`restore`,id:i.id,identity:i.identity});if(We.current!==r||n.sessionId!==e||n.sessionPath!==t)return;Ae(e=>e.filter(e=>e.id!==i.id)),Se(e=>e.filter(e=>e.id!==i.id)),_e(e=>[...e,{path:i.path}]),at(n)}catch(e){if(We.current!==r)return;_e(t=>[...t,{path:i.path,error:it(e)}])}}k(e=>e+1)}finally{We.current===r&&(ze.current=!1,B(!1))}},ft=async()=>{if(!U||Te)return;let n=Oe.current,r=Ue;Ee(!0);try{let i=await h.workspaceTrash(e,t,void 0,U);if(n!==Oe.current||We.current!==r||i.sessionId!==e||i.sessionPath!==t)return;Se(e=>[...new Map([...e,...i.entries].map(e=>[e.id,e])).values()]),we(e=>e+(i.unavailable??0)),De(i.nextCursor)}catch(e){n===Oe.current&&We.current===r&&(te(!0),L(it(e)))}finally{n===Oe.current&&We.current===r&&Ee(!1)}},pt=e=>se(t=>t.some(t=>t.path===e.path)?t.filter(t=>t.path!==e.path):[...t,e]),mt=(e,t=!1)=>{le({entries:e,rename:t});let n=e[0]?.path??``;ue(t?n.split(`/`).slice(0,-1).join(`/`)||`.`:j),pe(e[0]?.name??``),L(null)},ht=(0,K.useRef)(lt);ht.current=lt,(0,K.useEffect)(()=>{let e=s.current;if(!e)return;let t=e=>{if(!e.dataTransfer?.types.includes(`Files`))return;e.preventDefault();let t=Ge.current&&!ze.current;e.dataTransfer.dropEffect=t?`copy`:`none`,je(t)},n=t=>{(!(t.relatedTarget instanceof Node)||!e.contains(t.relatedTarget))&&je(!1)},r=e=>{let t=e.dataTransfer;if(!t?.types.includes(`Files`)||(e.preventDefault(),je(!1),!Ge.current||ze.current))return;let n=[],r=[],i=[];for(let e of t.items){if(e.kind!==`file`)continue;let t=e.webkitGetAsEntry?.();if(t?.isDirectory&&`createReader`in t)i.push(t);else if(t?.isDirectory)r.push(t.name);else{let t=e.getAsFile();t&&n.push(t)}}if(i.length){let e=We.current,t=new Map,a=[],o=0,s=async(r,i)=>{if(We.current!==e||!Ge.current)throw new DOMException(`Import cancelled`,`AbortError`);if(++o>2e3||i.split(`/`).length>64)throw Error(f(`filesImportFolderLimit`));let c=i?`${i}/${r.name}`:r.name;if(r.isDirectory){a.push(c);let e=r.createReader();for(;;){let t=await new Promise((t,n)=>e.readEntries(t,n));if(!t.length)break;for(let e of t)await s(e,c)}}else if(r.isFile){let e=await new Promise((e,t)=>r.file(e,t));t.set(e,c),n.push(e)}};ze.current=!0,B(!0),(async()=>{try{for(let e of i)await s(e,``);if(We.current!==e||!Ge.current)return;ze.current=!1,B(!1),ht.current(n,r,t,a)}catch(t){We.current===e&&(te(!0),L(t instanceof Error?t.message:f(`filesMutationFailed`)))}finally{We.current===e&&!Ke.current&&(ze.current=!1,B(!1))}})();return}ht.current(t.items.length?n:[...t.files],r)};return e.addEventListener(`dragover`,t),e.addEventListener(`dragleave`,n),e.addEventListener(`drop`,r),()=>{e.removeEventListener(`dragover`,t),e.removeEventListener(`dragleave`,n),e.removeEventListener(`drop`,r)}},[s,f]);let gt=async(e,t)=>{let r=Ue,i=n.includes(`\\`)?`\\`:`/`,a=await td(t?`${n.replace(/[\\/]$/u,``)}${i}${e.split(`/`).join(i)}`:e);We.current===r&&(clearTimeout(He.current),Ne(f(a?`filesPathCopied`:`copyFailed`,{path:e})),He.current=setTimeout(()=>Ne(``),3e3))};(0,K.useEffect)(()=>{if(!i)return;let n=new AbortController;Qe.current=n;let r;Ze.current!==g.trim()&&(Ze.current=g.trim(),Xe.current=null,C(null)),r=setTimeout(async()=>{if(document.visibilityState!==`hidden`){D(!0);try{let r=async(r,i,a)=>{let o=await h.workspaceFiles(e,t,r,i,n.signal);for(o.nextCursor&&$e.current.add(o.nextCursor);o.nextCursor&&o.entries.length{document.visibilityState!==`hidden`&&k(e=>e+1)};return window.addEventListener(`focus`,a),document.addEventListener(`visibilitychange`,a),()=>{n.abort(),clearTimeout(r),window.removeEventListener(`focus`,a),document.removeEventListener(`visibilitychange`,a);for(let e of $e.current)h.releaseFileListing(e).catch(()=>void 0);$e.current.clear(),et.current=!1,nt(!1)}},[i,h,v,g,rt,e,t,O,d,A]);let _t=e=>y(t=>t.includes(e)?t.filter(t=>t!==e&&!t.startsWith(`${e}/`)):[...t,e]),vt=async n=>{let r=rt?Xe.current:Ye.current[n],i=Qe.current;if(!(!r?.nextCursor||!i||i.signal.aborted||et.current||E)){et.current=!0,nt(!0),T(null);try{let a=await h.workspaceFiles(e,t,n,rt?g.trim():``,i.signal,r.nextCursor);if($e.current.delete(r.nextCursor),a.nextCursor&&$e.current.add(a.nextCursor),i.signal.aborted)return;let o=[...new Map([...r.entries,...a.entries].map(e=>[e.path,e])).values()],s={...a,entries:o};rt?C(s):x(e=>({...e,[n]:s}))}catch(e){i.signal.aborted||T(A(e))}finally{i.signal.aborted||(et.current=!1,nt(!1))}}},yt=(e,t)=>t?.nextCursor?(0,q.jsxs)(`li`,{className:`file-tree-more`,children:[(0,q.jsx)(`button`,{type:`button`,disabled:E||tt,onClick:()=>void vt(e),children:f(tt?`readingFile`:`filesLoadMore`)}),(0,q.jsx)(`small`,{children:f(`filesLoaded`,{count:t.entries.length})})]}):null,bt=e=>{let t=[...qe.current?.querySelectorAll(`button[data-file-row]:not(:disabled)`)??[]],n=t.indexOf(document.activeElement),r=t[n];if(!r)return;let i;if(e.key===`ArrowDown`)i=t[Math.min(n+1,t.length-1)];else if(e.key===`ArrowUp`)i=t[Math.max(n-1,0)];else if(e.key===`Home`)i=t[0];else if(e.key===`End`)i=t.at(-1);else if(e.key===`ArrowRight`&&r.getAttribute(`aria-expanded`)===`false`)r.click();else if(e.key===`ArrowLeft`)r.getAttribute(`aria-expanded`)===`true`?r.click():i=t.find(e=>e.dataset.fileRow===r.dataset.fileRow?.split(`/`).slice(0,-1).join(`/`));else return;e.preventDefault(),i?.focus()},xt=(e,t=0)=>e.map(e=>{let n=e.kind===`directory`,i=v.includes(e.path),s=r&&!!e.identity&&!e.path.split(`/`).some(e=>[`.git`,`.pi`,`.openpi-trash`].includes(e.toLowerCase()))&&(n||e.kind===`file`);return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`div`,{className:`file-tree-item`,children:[ie&&(0,q.jsx)(`input`,{type:`checkbox`,className:`file-tree-check`,"aria-label":f(`filesSelectItem`,{name:e.name}),checked:oe.some(t=>t.path===e.path),disabled:!s||z,onChange:()=>pt(e)}),(0,q.jsxs)(`button`,{type:`button`,"data-file-row":e.path,className:`file-tree-row`,style:{paddingInlineStart:10+t*16},"aria-expanded":n?i:void 0,"aria-current":!n&&a===e.path?`true`:void 0,disabled:e.kind===`symlink`||e.kind===`other`,title:e.kind===`symlink`?f(`filesSymlink`):e.path,onClick:t=>{if(s&&(t.metaKey||t.ctrlKey)){ae(!0),pt(e);return}n?(M(e.path),rt?(_(``),y([`.`,...e.path.split(`/`).map((e,t,n)=>n.slice(0,t+1).join(`/`))])):_t(e.path)):(M(e.path.includes(`/`)?e.path.slice(0,e.path.lastIndexOf(`/`)):`.`),o(e.path),p?.open(encodeURI(e.path),void 0,t.currentTarget))},children:[n?i?(0,q.jsx)(is,{className:`file-chevron`,"aria-hidden":`true`}):(0,q.jsx)(os,{className:`file-chevron`,"aria-hidden":`true`}):(0,q.jsx)(`span`,{className:`file-chevron`}),(0,q.jsx)(aJ,{name:e.name,kind:e.kind,expanded:i}),(0,q.jsxs)(`span`,{className:`file-tree-name`,children:[e.name,rt&&(0,q.jsx)(`small`,{children:e.path})]})]}),(0,q.jsx)(yo,{button:{label:f(`filesPathActions`,{name:e.name}),icon:(0,q.jsx)(Ds,{"aria-hidden":`true`}),isIconOnly:!0,size:`sm`,variant:`ghost`,className:`file-path-actions`},items:[{label:f(`filesCopyRelativePath`),onClick:()=>void gt(e.path,!1)},{label:f(`filesCopyAbsolutePath`),onClick:()=>void gt(e.path,!0)},{label:f(`filesRename`),isDisabled:!s||z,onClick:()=>mt([e],!0)},{label:f(`filesMove`),isDisabled:!s||z,onClick:()=>mt([e])},{label:f(`filesTrashAction`),isDisabled:!s||z,onClick:()=>void ut(`trash`,[e])}],menuWidth:200,alignment:`end`,hasChevron:!1})]}),!rt&&n&&i&&(0,q.jsxs)(`ul`,{children:[b[e.path]?xt(b[e.path].entries,t+1):(0,q.jsx)(`li`,{className:`file-tree-note`,children:f(`readingFile`)}),yt(e.path,b[e.path])]})]},e.path)});return(0,q.jsxs)(`aside`,{className:`file-explorer`,"aria-label":f(`filesExplorer`),"data-drag-over":G||void 0,children:[(0,q.jsxs)(`div`,{className:`file-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`input`,{value:g,onChange:e=>_(e.currentTarget.value.slice(0,200)),placeholder:f(`filesSearch`),"aria-label":f(`filesSearch`)}),(0,q.jsx)(`span`,{className:`file-search-progress`,"aria-hidden":`true`,"data-loading":E||void 0}),(0,q.jsx)(V,{content:f(`refreshFiles`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":f(`refreshFiles`),onClick:()=>k(e=>e+1),disabled:E,children:(0,q.jsx)(me,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`div`,{className:`file-create-toolbar`,children:[(0,q.jsxs)(`fieldset`,{className:`file-write-actions`,"aria-label":f(`filesWorkspaceActions`),children:[(0,q.jsx)(yo,{button:{ref:Re,label:f(`filesCreateMenu`),variant:`ghost`,className:`file-toolbar-button`,tooltip:r&&!z?f(`filesCreateMenu`):void 0,isDisabled:!r||z},items:[`create-file`,`create-directory`].map(e=>({label:f(e===`create-file`?`filesNewFile`:`filesNewDirectory`),icon:e===`create-file`?(0,q.jsx)(Ps,{"aria-hidden":`true`}):(0,q.jsx)(Bs,{"aria-hidden":`true`}),isDisabled:!r||z,onClick:()=>{P(e),I(``),L(null)}})),menuWidth:190}),(0,q.jsx)(yo,{button:{label:f(`filesImportMenu`),variant:`ghost`,className:`file-toolbar-button`,tooltip:r&&!z?f(`filesImportMenu`):void 0,isDisabled:!r||z},items:[{label:f(`filesImport`),icon:(0,q.jsx)(Kc,{"aria-hidden":`true`}),isDisabled:!r||z,onClick:()=>Pe.current?.click()},{label:f(`filesImportFolder`),icon:(0,q.jsx)(Rs,{"aria-hidden":`true`}),isDisabled:!r||z,onClick:()=>Fe.current?.click()}],menuWidth:190}),(0,q.jsx)(`input`,{ref:Pe,type:`file`,multiple:!0,hidden:!0,"aria-label":f(`filesImportChoose`),onChange:e=>{lt([...e.currentTarget.files??[]]),e.currentTarget.value=``}}),(0,q.jsx)(`input`,{ref:Fe,type:`file`,multiple:!0,hidden:!0,"aria-label":f(`filesImportFolderChoose`),onChange:e=>{lt([...e.currentTarget.files??[]]),e.currentTarget.value=``}}),(0,q.jsxs)(yo,{button:{label:f(`filesMoreMenu`),variant:`ghost`,className:`file-toolbar-button`,tooltip:f(`filesMoreMenu`)},menuWidth:210,children:[(0,q.jsx)(Ro,{label:f(`filesSelectMultiple`),icon:(0,q.jsx)($s,{"aria-hidden":`true`}),value:ie,isDisabled:!r||z,hasCloseOnSelect:!0,onChange:e=>{ae(e),se([])}}),(0,q.jsx)(Ro,{label:f(`filesTrash`),icon:(0,q.jsx)(Uc,{"aria-hidden":`true`}),value:ve,hasCloseOnSelect:!0,onChange:ye})]})]}),(0,q.jsxs)(`p`,{className:`file-write-directory`,title:j,children:[(0,q.jsxs)(`span`,{children:[f(`filesTargetDirectory`),`:`,` `,j===`.`?f(`filesWorkspaceRoot`):j]}),j!==`.`&&(0,q.jsx)(`button`,{type:`button`,onClick:()=>M(`.`),children:f(`filesWorkspaceRoot`)})]})]}),ie&&(0,q.jsxs)(`div`,{className:`file-organization-bar`,children:[(0,q.jsx)(`span`,{children:f(`filesSelectedCount`,{count:oe.length})}),(0,q.jsx)(`button`,{type:`button`,disabled:!oe.length||z||!r,onClick:()=>mt(oe),children:f(`filesMove`)}),(0,q.jsx)(`button`,{type:`button`,disabled:!oe.length||z||!r,onClick:()=>void ut(`trash`,oe),children:f(`filesTrashAction`)})]}),ce&&(0,q.jsxs)(`form`,{className:`file-create-form`,onSubmit:e=>{e.preventDefault(),(!ce.rename||fe.trim())&&ut(`move`,ce.entries)},children:[(0,q.jsxs)(`label`,{children:[f(ce.rename?`filesRename`:`filesMoveDestination`),(0,q.jsx)(`input`,{ref:Le,value:ce.rename?fe:H,"aria-label":f(ce.rename?`filesNewName`:`filesMoveDestination`),disabled:z,onChange:e=>ce.rename?pe(e.currentTarget.value):ue(e.currentTarget.value)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`button`,{type:`submit`,disabled:z||!r,children:f(ce.rename?`filesRename`:`filesMove`)}),(0,q.jsx)(`button`,{type:`button`,disabled:z,onClick:()=>le(null),children:f(`cancel`)})]})]}),he.length>0&&(0,q.jsxs)(`div`,{className:`file-import-results`,children:[(0,q.jsx)(`ol`,{"aria-label":f(`filesOrganizationResults`),"aria-live":`polite`,children:he.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`span`,{children:e.path}),(0,q.jsx)(`small`,{role:e.error?`alert`:void 0,children:e.error??f(`filesOperationDone`)})]},e.path))}),ke.length>0&&(0,q.jsx)(`button`,{type:`button`,disabled:z||!r,onClick:()=>void dt(ke),children:f(`filesUndoTrash`)})]}),ve&&(0,q.jsxs)(`section`,{className:`file-trash-list`,"aria-label":f(`filesTrash`),children:[(0,q.jsx)(`p`,{children:f(`filesTrashDetail`)}),Ce>0&&(0,q.jsx)(`p`,{role:`alert`,children:f(`filesTrashUnavailable`,{count:Ce})}),Te&&xe.length===0?(0,q.jsx)(`p`,{children:f(`readingFile`)}):xe.length===0?(0,q.jsx)(`p`,{children:f(`filesTrashEmpty`)}):(0,q.jsx)(`ul`,{children:xe.map(e=>(0,q.jsxs)(`li`,{children:[(0,q.jsx)(`span`,{title:e.path,children:e.path}),(0,q.jsx)(`button`,{type:`button`,disabled:!r||z,"aria-label":f(`filesRestoreItem`,{name:e.path}),onClick:()=>void dt([e]),children:f(`filesRestore`)})]},e.id))}),U&&(0,q.jsx)(`button`,{type:`button`,disabled:Te,onClick:()=>void ft(),children:f(`filesLoadMore`)})]}),N&&(0,q.jsxs)(`form`,{className:`file-create-form`,onSubmit:e=>void st(e),onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.stopPropagation(),ot())},children:[(0,q.jsxs)(`label`,{children:[f(N===`create-file`?`filesFileName`:`filesDirectoryName`),(0,q.jsx)(`input`,{ref:Ie,value:F,maxLength:255,disabled:z,"aria-invalid":!!(ee&&R),onChange:e=>I(e.currentTarget.value)})]}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`button`,{type:`submit`,disabled:!r||z,children:f(z?`filesCreating`:`filesCreate`)}),(0,q.jsx)(`button`,{type:`button`,disabled:z,onClick:ot,children:f(`cancel`)})]})]}),ee&&(0,q.jsx)(`p`,{className:`file-tree-note${R?` evidence-warning`:``}`,role:R?`alert`:`status`,children:ee}),ne.length>0&&(0,q.jsxs)(`div`,{className:`file-import-results`,children:[(0,q.jsx)(`p`,{children:f(`filesImportLimit`)}),(0,q.jsx)(`ol`,{"aria-label":f(`filesImportResults`),"aria-live":`polite`,children:ne.map(e=>(0,q.jsxs)(`li`,{"data-import-state":e.state,children:[(0,q.jsx)(`span`,{title:`${e.directory}/${e.name}`,children:e.name}),(0,q.jsx)(`small`,{children:e.message??f(e.state===`running`?`filesImporting`:`filesImportPending`)}),e.state===`error`&&(e.file||e.kind===`directory`)&&(0,q.jsx)(`button`,{type:`button`,disabled:!r||z,onClick:()=>void ct([e]),children:f(`filesRetryImport`)})]},e.id))}),(0,q.jsx)(`button`,{type:`button`,disabled:z,onClick:()=>re(e=>e.filter(e=>e.state!==`done`)),children:f(`filesClearImported`)})]}),(0,q.jsx)(`span`,{className:`sr-only`,role:`status`,children:Me}),w&&a&&(0,q.jsxs)(`div`,{className:`file-tree-note file-tree-error`,role:`alert`,children:[(0,q.jsx)(`p`,{children:w.message}),w.detail&&(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:f(`filesErrorDetails`)}),(0,q.jsx)(`p`,{children:w.detail})]}),(0,q.jsx)(`button`,{type:`button`,disabled:E,onClick:()=>k(e=>e+1),children:f(E?`readingFile`:`filesRetryRead`)})]}),(0,q.jsxs)(`section`,{className:`file-tree`,"aria-label":f(`filesExplorer`),ref:qe,onKeyDown:bt,onScroll:e=>{m?.files&&(m.files.treeScroll=e.currentTarget.scrollTop)},"aria-busy":E,children:[(0,q.jsxs)(`ul`,{children:[xt(rt?S?.entries??[]:b[`.`]?.entries??[]),yt(`.`,rt?S:b[`.`])]}),(rt?S?.truncated:b[`.`]?.truncated)&&(0,q.jsx)(`p`,{className:`file-tree-note`,children:f(`filesTruncated`)}),!E&&!w&&(rt?S?.entries.length===0:b[`.`]?.entries.length===0)&&(0,q.jsx)(`p`,{className:`file-tree-note`,children:f(rt?`filesNoMatches`:`filesEmpty`)})]})]})}function sJ({sessionId:e,sessionPath:t,cwd:n,active:r,canWrite:i=!0}){let{t:a}=W(),o=be(),[s,c]=(0,K.useState)(o?.files?.selected??``),[l,u]=(0,K.useState)(o?.files?.treeVisible??!0),[d,f]=(0,K.useState)({error:null,loading:!0}),[p,m]=(0,K.useState)(0),h=(0,K.useRef)(null),g=(0,K.useRef)(null);return(0,K.useLayoutEffect)(()=>{o&&(o.files={query:``,expanded:[`.`],treeScroll:0,...o.files,selected:s,treeVisible:l})},[o,s,l]),(0,q.jsx)(`div`,{ref:h,className:`files-workspace`,"data-tree-visible":l,"data-preview-open":!!s,children:(0,q.jsxs)(FD,{ref:g,sessionId:e,sessionPath:t,embedded:!0,active:r,onClose:()=>{c(``),u(!0)},children:[(0,q.jsx)(V,{content:a(l?`filesHideTree`:`filesShowTree`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`files-tree-toggle icon-button`,"aria-label":a(l?`filesHideTree`:`filesShowTree`),"aria-pressed":l,onClick:()=>u(e=>!e),children:l?(0,q.jsx)(zs,{"aria-hidden":`true`}):(0,q.jsx)(Vs,{"aria-hidden":`true`})})}),!s&&(0,q.jsxs)(`div`,{className:`files-empty-header`,title:n,children:[(0,q.jsx)(zs,{"aria-hidden":`true`}),n.split(/[\\/]/u).filter(Boolean).at(-1)||n]}),!s&&(0,q.jsxs)(`div`,{className:`files-preview-empty`,children:[d.error?(0,q.jsx)(Wc,{"aria-hidden":`true`}):(0,q.jsx)(Fs,{"aria-hidden":`true`}),(0,q.jsx)(`h3`,{children:a(d.error?`filesReadFailed`:d.loading?`readingFile`:`filesChoose`)}),d.error?(0,q.jsxs)(`div`,{className:`files-read-failure`,role:`alert`,children:[(0,q.jsx)(`p`,{children:d.error.message}),d.error.detail&&(0,q.jsxs)(`details`,{children:[(0,q.jsx)(`summary`,{children:a(`filesErrorDetails`)}),(0,q.jsx)(`p`,{children:d.error.detail})]})]}):d.loading?null:(0,q.jsx)(`p`,{role:`status`,children:a(`filesChooseDetail`)}),d.error&&(0,q.jsxs)(`button`,{type:`button`,disabled:d.loading,onClick:()=>{u(!0),m(e=>e+1)},children:[(0,q.jsx)(me,{"aria-hidden":`true`}),a(d.loading?`readingFile`:`filesRetryRead`)]})]}),(0,q.jsx)(`div`,{className:`files-tree-container`,hidden:!l,children:(0,q.jsx)(oJ,{sessionId:e,sessionPath:t,cwd:n,canWrite:i,active:r&&l,selected:s,onSelect:c,dropTarget:h,onShowTree:u,onReadStateChange:f,refreshRequest:p,onRemoved:e=>{e.some(e=>e===s||s.startsWith(`${e}/`))&&g.current?.close({restoreFocus:!1})}},JSON.stringify([e,t,n]))})]})})}var cJ=(0,K.createContext)(null);cJ.displayName=`CollapsibleGroupContext`;var lJ=(0,K.createContext)(null);lJ.displayName=`CollapsibleGroupPresentationContext`;function uJ(e){let{isCollapsible:t,value:n}=e,r=(0,K.use)(cJ),i=r!=null&&n!=null,a=t===!0?{}:t||null,o=a!=null,[s,c]=(0,K.useState)(()=>i?!0:a?.isOpen===void 0?a?.defaultIsOpen??!0:a.isOpen),l;return l=i&&n!=null?r.isOpen(n):a?.isOpen===void 0?s:a.isOpen,{isEnabled:o,isOpen:l,toggle:()=>{if(i&&n!=null){r.toggle(n);return}let e=!l;a?.isOpen===void 0&&c(e),a?.onOpenChange?.(e)}}}var dJ={info:`info`,warning:`warning`,error:`error`,success:`success`},fJ={info:`status`,warning:`alert`,error:`alert`,success:`status`},pJ=`status`,mJ={info:`accent`,warning:`warning`,error:`error`,success:`success`},hJ={root:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kMv6JI:`xjb2p0i`,$$css:!0},rootElevatedCard:{kaIpWk:`x1vf2byn`,$$css:!0},header:{k1xSpc:`x78zum5`,kGNEyG:`x1cy8zhl`,kwnvtZ:`x1a02dak`,k1C7PZ:`xak3so`,khm7nJ:`x4olc9o`,k8WAf4:`x8o8v82`,kg3NbH:`x1pzlopt`,$$css:!0},headerCardStandalone:{kaIpWk:`x1vf2byn`,$$css:!0},headerCardWithContent:{krdFHd:`xwxb7qi`,kfmiAY:`x13nour3`,kVL7Gh:`xbiv7yw`,kT0f0o:`x16uus16`,$$css:!0},headerCentered:{kGNEyG:`x6s0dn4`,$$css:!0},endArea:{k1xSpc:`x78zum5`,kGNEyG:`x6s0dn4`,kwnvtZ:`x1a02dak`,kjj79g:`x13a6bvl`,kOIVth:`x1txdalj`,kmuXW:`x2lah0s`,ks0D6T:`x193iq5w`,keTefX:`xvc5jky`,kqGvvJ:`x81ka23`,$$css:!0},chevron:{k1ekBW:`x11xpdln`,kIyJzY:`xuedmi6 x12w9bfk`,kAMwcw:`xlr8y92`,$$css:!0},chevronExpanded:{k3aq6I:`x19jd1h0`,$$css:!0}},gJ={info:{kWkggS:`xgcxg3y`,$$css:!0},warning:{kWkggS:`x24i8r5`,$$css:!0},error:{kWkggS:`x1pritpl`,$$css:!0},success:{kWkggS:`xu13z74`,$$css:!0}};function _J(e){return Object.prototype.hasOwnProperty.call(gJ,e)}var vJ={none:{kGVxlE:`x1gnnqk1`,$$css:!0},low:{kGVxlE:`x1i5ehqx`,$$css:!0},med:{kGVxlE:`x14hfi27`,$$css:!0},high:{kGVxlE:`x1kcpxr7`,$$css:!0}};function yJ({status:e,title:t,description:n,icon:r,isDismissable:i=!1,onDismiss:a,dismissLabel:o,endContent:s,container:c=`card`,elevation:l=`none`,collapsible:u=!0,children:d,xstyle:f,className:m,style:h,ref:g,onFocusCapture:_,onPointerDownCapture:v,...y}){let b=jr(),[x,S]=(0,K.useState)(!1),C=typeof u==`object`&&u?u:{},{isEnabled:T,isOpen:E,toggle:D}=uJ({isCollapsible:u!==!1&&{...C,defaultIsOpen:C.defaultIsOpen??!1}}),k=(0,K.useRef)(null),A=(0,K.useId)(),j=dJ[e],M=fJ[e]??pJ,N=mJ[e],P=mt(d),F=b(`@astryx.banner.dismiss`),I=o??F,ee=o??(typeof t==`string`?b(`@astryx.banner.dismissTitled`,{dismiss:F,title:t}):F);if(x)return null;let L=(e,t)=>{e instanceof HTMLElement&&e!==document.body&&!t.contains(e)&&(k.current=e)},R=e=>{L(e.relatedTarget,e.currentTarget)},te=e=>{L(document.activeElement,e.currentTarget)},z=()=>{let e=k.current;S(!0),a?.(),e?.isConnected&&e.focus()},B=T&&P,ne=mt(s)||i||B,re=mt(s)||i,V=!mt(n)&&re,ie=P&&(!T||E),ae=c===`card`;return(0,q.jsxs)(`div`,{ref:g,role:M,onFocusCapture:pt(_,R),onPointerDownCapture:pt(v,te),...H(w(hJ.root,vJ[l],ae&&l!==`none`&&hJ.rootElevatedCard,f),m,h),...y,children:[(0,q.jsxs)(`div`,{...H(O(`banner`,{container:c,status:e}),w(hJ.header,V&&hJ.headerCentered,_J(e)&&gJ[e],ae&&(ie?hJ.headerCardWithContent:hJ.headerCardStandalone))),children:[(0,q.jsx)(`div`,{...mt(r)?H(O(`banner-icon`,{status:e}),{className:`x78zum5 x6s0dn4 x2lah0s`}):{className:`x78zum5 x6s0dn4 x2lah0s`},"aria-hidden":`true`,children:mt(r)?r:j==null?null:(0,q.jsx)(ya,{icon:j,size:`md`,color:N,...O(`banner-icon`,{status:e})})}),(0,q.jsxs)(`div`,{...{0:{className:`x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli`},1:{className:`x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli xgualba`}}[!!mt(s)<<0],children:[(0,q.jsx)(`div`,{className:`x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0 xj0a0fe`,children:t}),mt(n)&&(0,q.jsx)(`div`,{className:`x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4 xj0a0fe`,children:n})]}),ne&&(0,q.jsxs)(`div`,{...w(hJ.endArea,Yt.inset(p[`--spacing-2`])),children:[s,B&&(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:b(E?`@astryx.banner.collapse`:`@astryx.banner.expand`),tooltip:b(E?`@astryx.banner.collapse`:`@astryx.banner.expand`),icon:(0,q.jsx)(ya,{icon:`chevronDown`,size:`sm`,color:`inherit`,xstyle:[hJ.chevron,E&&hJ.chevronExpanded]}),onClick:D,"aria-expanded":E,"aria-controls":ie?A:void 0,isIconOnly:!0}),i&&(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:ee,tooltip:I,icon:(0,q.jsx)(ya,{icon:`close`,size:`sm`,color:`inherit`}),onClick:z,isIconOnly:!0})]})]}),ie&&(0,q.jsx)(`div`,{id:B?A:void 0,...H(O(`banner-content`,{container:c,status:e}),{0:{className:`x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh`},1:{className:`x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x1k5g1gk x1eprgri`}}[!!ae<<0]),children:d})]})}yJ.displayName=`Banner`;var bJ={container:{k1xSpc:`x78zum5`,kXwgrk:`xdt5ytf`,kGNEyG:`x6s0dn4`,kjj79g:`xl56j7k`,k9WMMc:`x2b8uid`,kOIVth:`x18g69wz`,k8WAf4:`xmfvnks`,kg3NbH:`xm7rs69`,$$css:!0},containerCompact:{kOIVth:`x1txdalj`,k8WAf4:`x1na6nto`,kg3NbH:`x1pzlopt`,$$css:!0}};function xJ({title:e,description:t,icon:n,actions:r,headingLevel:i=3,isCompact:a=!1,xstyle:o,className:s,style:c,ref:l,...u}){let d=`h${i}`;return(0,q.jsxs)(`div`,{ref:l,...u,role:`status`,...H(O(`empty-state`,{variant:a?`compact`:null}),w(bJ.container,a&&bJ.containerCompact,o),s,c),children:[n!=null&&(0,q.jsx)(`div`,{"aria-hidden":`true`,children:n}),(0,q.jsxs)(`div`,{className:`x78zum5 xdt5ytf x6s0dn4 xxc7z9f`,children:[(0,K.createElement)(d,H(O(`empty-state-title`,{variant:a?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0`},1:{className:`x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib`}}[!!a<<0]),e),t!=null&&(0,q.jsx)(`div`,{...H(O(`empty-state-description`,{variant:a?`compact`:null}),{0:{className:`x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4`},1:{className:`x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d`}}[!!a<<0]),children:t})]}),r!=null&&(0,q.jsx)(`div`,{...{0:{className:`x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d`},1:{className:`x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf`}}[!!a<<0],children:r})]})}xJ.displayName=`EmptyState`;var SJ=1e3,CJ=100,wJ={root:{kWkggS:`xprdx6m x1j0df82 x1o55y2u`,kSiTet:`xvpkmg4 x1tbh5bv`,$$css:!0},animate:{kILWW9:`xpz12be`,k44tkh:`xqgcaz`,ko0y90:`xa4qsjk`,kKVMdj:`xeuoslp x1aquc0h`,kyAemX:`x193epu2`,$$css:!0}},TJ={0:{kaIpWk:`xwksslw`,$$css:!0},1:{kaIpWk:`xx3sua9`,$$css:!0},2:{kaIpWk:`xh6dtrn`,$$css:!0},3:{kaIpWk:`x1hviunn`,$$css:!0},4:{kaIpWk:`x1hviunn`,$$css:!0},none:{kaIpWk:`x2u8bby`,$$css:!0},rounded:{kaIpWk:`xjspbzw`,$$css:!0}},EJ={kKxzle:`xvo38ju`,$$css:!0},DJ={animationDelay:e=>[EJ,{"--x-animationDelay":(e=>typeof e==`number`?e+`ms`:e??void 0)(`${SJ+CJ*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e==`number`?`${e}px`:e)==null?typeof e==`number`?`${e}px`:e:`x5lhr3w`,kZKoxP:(typeof t==`number`?`${t}px`:t)==null?typeof t==`number`?`${t}px`:t:`x16ye13r`,$$css:!0},{"--x-width":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof e==`number`?`${e}px`:e),"--x-height":(e=>typeof e==`number`?e+`px`:e??void 0)(typeof t==`number`?`${t}px`:t)}]};function OJ({width:e=`100%`,height:t=`100%`,radius:n=3,index:r=0,"data-testid":i,xstyle:a,className:o,style:s,ref:c,...l}){return(0,q.jsx)(`div`,{ref:c,"aria-hidden":`true`,"data-testid":i,...H(O(`skeleton`),w(wJ.root,wJ.animate,TJ[n],DJ.dimensions(e,t),DJ.animationDelay(r),a),o,s),...l})}OJ.displayName=`Skeleton`;function kJ({branches:e,value:t,loading:n,onChange:r}){let{t:i}=W(),[a,o]=(0,K.useState)(``),[s,c]=(0,K.useState)(!1),l=(0,K.useRef)(null),u=(0,K.useRef)([]),d=(0,K.useRef)(null),f=(0,K.useId)(),p=e.options.filter(e=>`${e.label} ${e.ref}`.toLocaleLowerCase().includes(a.toLocaleLowerCase()));(0,K.useEffect)(()=>{if(!s)return;let e=requestAnimationFrame(()=>l.current?.focus());return()=>cancelAnimationFrame(e)},[s]),(0,K.useEffect)(()=>{if(!s)return;let e=e=>{let t=e.target;d.current=t instanceof Element&&!t.closest(`.review-base-picker, .review-base-popup`)?t.closest(`button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex], [contenteditable='true']`):null};return document.addEventListener(`pointerdown`,e,!0),()=>document.removeEventListener(`pointerdown`,e,!0)},[s]);let m=e.options.find(e=>e.ref===t)?.label??t;return(0,q.jsx)(ok,{className:`review-base-picker`,label:i(`gitReviewBaseBranch`),isLabelHidden:!0,value:t??``,triggerLabel:(0,q.jsx)(`span`,{className:`review-base-label`,title:t,children:m||i(`gitReviewChooseBase`)}),variant:`ghost`,size:`sm`,isDisabled:e.options.length===0,isLoading:n,onOpenChange:e=>{c(e),e||(o(``),d.current?.isConnected&&d.current.focus({preventScroll:!0}),d.current=null)},children:(s,c,d)=>(0,q.jsxs)(`div`,{className:`review-base-popup`,children:[(0,q.jsxs)(`label`,{className:`review-base-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:i(`gitReviewSearchBranches`)}),(0,q.jsx)(`input`,{ref:l,type:`search`,value:a,"aria-controls":f,placeholder:i(`gitReviewSearchBranches`),onChange:e=>o(e.currentTarget.value),onKeyDown:e=>{e.nativeEvent.isComposing||e.keyCode===229||(e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),d()):e.key===`ArrowDown`&&p.length&&!n&&(e.preventDefault(),u.current[0]?.focus()))}})]}),e.truncated&&(0,q.jsx)(`p`,{role:`status`,children:i(`gitReviewBranchesTruncated`)}),(0,q.jsxs)(`div`,{id:f,role:`listbox`,"aria-label":i(`gitReviewBaseBranch`),className:`review-base-options`,children:[p.map((e,a)=>(0,q.jsxs)(`button`,{type:`button`,disabled:n,role:`option`,"aria-selected":t===e.ref,title:e.ref,ref:e=>{u.current[a]=e},onClick:()=>{r(e.ref),d()},onKeyDown:e=>{if(!(e.nativeEvent.isComposing||e.keyCode===229)){if(e.key===`Escape`)e.preventDefault(),e.stopPropagation(),d();else if(e.key===`ArrowDown`||e.key===`ArrowUp`||e.key===`Home`||e.key===`End`){e.preventDefault();let t=e.key===`Home`?0:e.key===`End`?p.length-1:(a+(e.key===`ArrowDown`?1:p.length-1))%p.length;u.current[t]?.focus()}}},children:[(0,q.jsxs)(`span`,{children:[e.label,(0,q.jsx)(`small`,{children:e.ref.startsWith(`refs/heads/`)?i(`gitReviewLocalBranch`):i(`gitReviewRemoteBranch`)})]}),t===e.ref&&(0,q.jsx)(rs,{"aria-hidden":`true`})]},e.ref)),!p.length&&(0,q.jsx)(`p`,{role:`status`,children:i(`gitReviewNoMatchingBranches`)})]})]})})}function AJ(e,t){return{path:e,name:t,directories:new Map,files:[]}}function jJ({files:e,selectedPath:t,collapsed:n,searching:r,onToggle:i,onSelect:a,viewed:o,onViewedChange:s,viewedLimitReached:c=!1}){let{t:l}=W(),u=(0,K.useMemo)(()=>{let t=AJ(``,``);for(let n of e){let e=t;for(let t of n.path.split(`/`).slice(0,-1)){let n=e.path?`${e.path}/${t}`:t,r=e.directories.get(t);r||(r=AJ(n,t),e.directories.set(t,r)),e=r}e.files.push(n)}return t},[e]),d=(e,u)=>(0,q.jsxs)(`ul`,{children:[[...e.directories.values()].map(e=>{let t=e,a=t.name;for(;t.files.length===0&&t.directories.size===1;){let e=t.directories.values().next().value;if(!e)break;t=e,a+=`/${t.name}`}let o=t.path,s=r||!n.has(o);return(0,q.jsxs)(`li`,{children:[(0,q.jsxs)(`button`,{type:`button`,className:`review-tree-directory`,style:{paddingLeft:8+u*10},title:o,"aria-expanded":s,disabled:r,onClick:()=>i(o),children:[(0,q.jsx)(os,{"aria-hidden":`true`,"data-open":s}),(0,q.jsx)(`span`,{children:a})]}),s&&d(t,u+1)]},e.path)}),e.files.map(e=>{let n=e.path.split(`/`).at(-1)??e.path,r=/\.(png|jpe?g|gif|webp|svg)$/iu.test(n)?qs:/\.(md|txt|log)$/iu.test(n)?Fs:js;return(0,q.jsxs)(`li`,{className:`review-tree-file-row`,children:[(0,q.jsxs)(`button`,{className:`session-review-file review-tree-file`,type:`button`,style:{paddingLeft:8+u*10},"data-review-file":e.path,title:e.path,"aria-label":e.path,"aria-description":l(`gitFileStatus_${e.status}`),"aria-current":t===e.path?`true`:void 0,onClick:()=>a(e.path),children:[(0,q.jsx)(r,{"aria-hidden":`true`,className:`review-tree-icon`}),(0,q.jsx)(`span`,{className:`review-tree-name`,children:n}),(0,q.jsx)(`span`,{className:`review-tree-status`,"aria-hidden":`true`,children:l(`gitFileStatus_${e.status}`)}),(0,q.jsx)(`span`,{className:`session-review-stats`,"aria-hidden":`true`,children:e.binary?(0,q.jsx)(`span`,{children:l(`gitReviewBinaryShort`)}):e.statsUnavailable?(0,q.jsx)(`span`,{title:l(`turnEditStatsUnknown`),children:`—`}):(0,q.jsxs)(q.Fragment,{children:[e.additions>0&&(0,q.jsxs)(`span`,{className:`review-additions`,children:[`+`,e.additions]}),e.deletions>0&&(0,q.jsxs)(`span`,{className:`review-deletions`,children:[`-`,e.deletions]})]})})]}),s&&(0,q.jsx)(`label`,{className:`review-viewed-control`,title:l(`gitReviewMarkViewed`,{path:e.path}),children:(0,q.jsx)(`input`,{type:`checkbox`,"aria-label":l(`gitReviewMarkViewed`,{path:e.path}),checked:o?.has(e.path)??!1,disabled:c&&!o?.has(e.path),onChange:t=>s(e.path,t.currentTarget.checked)})})]},e.path)})]});return(0,q.jsx)(`div`,{className:`session-review-list review-file-tree`,children:d(u,0)})}var MJ=20,NJ=200,PJ=[0,1,2,3];function FJ(e){return e.split(/[\\/]/u).at(-1)||e}function IJ(e,t){return e?e.reason===`not_git_repository`?t(`gitReviewNotRepository`):e.reason===`unborn_repository`?t(`gitReviewUnborn`):e.reason===`baseline_unavailable`?t(`gitReviewBaselineUnavailable`):e.reason===`base_branch_unavailable`?t(`gitReviewBaseUnavailable`):e.reason===`invalid_base_branch`?t(`gitReviewBaseInvalid`):t(`gitReviewFailed`):null}function LJ({review:e,initialFilePath:t,onClose:n,onOpenTools:r,embedded:i=!1,active:a=!0,onOpenFiles:o,readingScope:s,onReferenceLine:c}){let{t:l}=W(),u=be(),d=(0,K.useRef)(void 0);e.result?.branches?d.current=e.result.branches:e.result&&!e.loading&&(d.current=void 0);let f=e.result?.branches??(e.loading?d.current:void 0),p=`${s??e.source??`unstaged`}:${e.baseRef??``}`,m=u?.review?.scope===p?u.review:void 0,h=(0,K.useRef)(JSON.stringify([p,t])),g=(0,K.useRef)(null),[_,v]=(0,K.useState)(!1),[y,b]=(0,K.useState)(new Set(m?.collapsedDirectories));(0,K.useEffect)(()=>{let e=g.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(([e])=>{e&&v(e.contentRect.width>=720)});return t.observe(e),()=>t.disconnect()},[]);let x=(0,K.useRef)(null),S=(0,K.useRef)(null),C=(0,K.useRef)(null),w=(0,K.useRef)(!0),T=(0,K.useRef)(!1),E=(0,K.useRef)(m?.listScroll??null),D=(0,K.useRef)(null),[O,k]=(0,K.useState)(m?.visibleFiles??MJ),[A,j]=(0,K.useState)(m?.query??``),[M,N]=(0,K.useState)(null),[P,F]=(0,K.useState)(m?m.selected:t??null),[I,ee]=(0,K.useState)(()=>m?.viewed?{scope:p,revision:m.viewed.revision,paths:new Set(m.viewed.paths.slice(0,NJ))}:null),L=(0,K.useRef)(m?{list:m.listScroll,preview:m.previewScroll}:null);(0,K.useLayoutEffect)(()=>{u&&(u.review={source:e.source??`unstaged`,baseRef:e.baseRef,scope:p,selected:P,query:A,collapsedDirectories:[...y],visibleFiles:O,listScroll:u.review?.scope===p?u.review.listScroll:0,previewScroll:u.review?.scope===p?u.review.previewScroll:0,viewed:I?.scope===p?{revision:I.revision,paths:[...I.paths].slice(0,NJ)}:void 0})},[u,e.source,e.baseRef,p,P,A,y,O,I]);let[R,te]=(0,K.useState)(null),[z,B]=(0,K.useState)(null),[ne,re]=(0,K.useState)(0),[ie,ae]=(0,K.useState)(()=>window.matchMedia?.(`(max-width: 1100px)`).matches??!1);(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 1100px)`);if(!e)return;let t=()=>ae(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]),(0,K.useEffect)(()=>{let e=JSON.stringify([p,t]);h.current!==e&&(h.current=e,w.current=!!t||!(document.activeElement instanceof Element&&document.activeElement.closest(`.review-base-picker, .review-base-popup`)),E.current=null,F(t??null),j(``),b(new Set),N(null),ee(null))},[t,p]);let oe=i?`section`:ie?`main`:`aside`,se=e.result?.ok?e.result.snapshot:null,ce=!e.historical&&P&&M&&M.comparison===(e.source??se?.comparison)?se?.revision===M.revision?se:M:se,le=!!(P&&ce&&se&&ce.revision!==se.revision);(0,K.useEffect)(()=>{P&&!M&&se&&N(se)},[P,M,se]);let H=e.source??ce?.comparison??`unstaged`,ue=IJ(e.result&&!e.result.ok?e.result:null,l),de=ce?.files.find(e=>e.path===P),fe=R?.source===H&&R?.revision===ce?.revision&&R?.file.path===P?R.file:de,pe=ce?.revision,he=I?.scope===p&&I.revision===pe?I.paths:new Set;(0,K.useEffect)(()=>{pe&&I&&(I.scope!==p||I.revision!==pe)&&ee(null)},[pe,p,I]);let ge=(e,t)=>{!pe||!ce?.files.some(t=>t.path===e)||ee(n=>{let r=new Set(n?.scope===p&&n.revision===pe?n.paths:[]);if(t){if(r.size>=NJ)return n;r.add(e)}else r.delete(e);return{scope:p,revision:pe,paths:r}})};(0,K.useLayoutEffect)(()=>{!a||!ce||!L.current||P&&fe?.diffLoaded===!1||(S.current&&(S.current.scrollTop=L.current.list),C.current&&(C.current.scrollTop=L.current.preview),L.current=null)},[a,ce,P,fe?.diffLoaded]);let _e=z?.source===H&&z?.path===P&&z?.revision===pe&&de?.diffLoaded===!1?z.message:null;(0,K.useEffect)(()=>{let t=de?.path;if(!a||!t||de?.diffLoaded!==!1||!e.readFile||!pe)return;let n=new AbortController;return B(null),e.readFile(t,n.signal,pe).then(e=>{n.signal.aborted||(e?te({source:H,revision:pe,file:e}):B({source:H,path:t,revision:pe,message:l(`gitReviewFileMissing`)}))},e=>{n.signal.aborted||B({source:H,path:t,revision:pe,message:e instanceof Error?e.message:l(`gitReviewFailed`)})}),()=>n.abort()},[de?.path,a,de?.diffLoaded,pe,H,e.readFile,ne,l]);let ve=(0,K.useMemo)(()=>(ce?.files??[]).filter(e=>e.path.toLocaleLowerCase().includes(A.toLocaleLowerCase())).sort((e,t)=>e.path.localeCompare(t.path,`en`,{numeric:!0})),[ce?.files,A]),ye=_?ve:ve.slice(0,O);(0,K.useEffect)(()=>{!_||P||!ce?.files.length||(w.current=!1,F(ce.files[0].path))},[_,P,ce]);let xe=Math.max(0,ve.length-ye.length),Se=ce?.listComplete===!1||ce?.listComplete===void 0&&ce?.truncated,Ce=Se||ce?.nextOffset!==void 0,we=e.historical?l(ce?.evidenceSource===`file-tools`?`turnEditsScope`:`turnChangesScope`):ce?ce.comparison===`session`?l(`gitReviewSessionSnapshot`):ce.comparison===`unstaged`?l(`gitReviewUnstaged`):ce.comparison===`staged`?l(`gitReviewStaged`):ce.baseBranch?l(`gitReviewComparison`,{current:ce.currentBranch??l(`gitReviewDetached`),base:ce.baseBranch.replace(/^refs\/(?:heads|remotes)\//u,``)}):l(`gitReviewWorkingTree`):null;(0,K.useEffect)(()=>{let e=a&&!T.current;T.current=a,a&&(!e&&!w.current||(w.current=!1,P?C.current?.focus():i?S.current?.focus():x.current?.focus()))},[a,i,P]);let Te=e=>{E.current=S.current?.scrollTop??null,e!==P&&(L.current={list:E.current??0,preview:0},C.current&&(C.current.scrollTop=0),u?.review?.scope===p&&(u.review.previewScroll=0)),w.current=!_,N(ce),F(e)};(0,K.useLayoutEffect)(()=>{let e=D.current;if(P||!e||!a)return;D.current=null;let t=S.current;if(!t?.isConnected||t.closest(`[hidden], [inert]`))return;let n=[...t.querySelectorAll(`[data-review-file]`)].find(t=>t.dataset.reviewFile===e);E.current!==null&&(t.scrollTop=E.current),n?n.focus({preventScroll:E.current!==null}):i?t.focus():x.current?.focus()},[a,i,P]);let Ee=()=>{let e=P,t=ve.findIndex(t=>t.path===e);t>=O&&k(Math.ceil((t+1)/MJ)*MJ),w.current=!1,D.current=e,F(null),N(null)};return(0,q.jsxs)(oe,{ref:g,className:`review-panel${i?` embedded`:``}${_?` review-wide`:``}`,"aria-label":l(`changeEvidence`),"aria-busy":e.loading||void 0,onKeyDown:e=>{e.key!==`Escape`||e.nativeEvent.isComposing||e.keyCode===229||e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||e.defaultPrevented||(!P||_)&&i||(e.preventDefault(),e.stopPropagation(),P&&!_?Ee():i||n())},children:[(0,q.jsxs)(`div`,{className:`review-source-picker`,children:[e.setSource&&(0,q.jsxs)(`label`,{children:[l(`gitReviewSource`),` `,(0,q.jsxs)(`select`,{value:e.historical?`turn`:e.source??`unstaged`,onChange:t=>e.setSource?.(t.currentTarget.value),children:[e.historical&&(0,q.jsx)(`option`,{value:`turn`,children:l(`turnChangesReview`)}),(0,q.jsx)(`option`,{value:`unstaged`,children:l(`gitReviewUnstaged`)}),(0,q.jsx)(`option`,{value:`staged`,children:l(`gitReviewStaged`)}),(0,q.jsx)(`option`,{value:`branch`,children:l(`gitReviewBranch`)}),(0,q.jsx)(`option`,{value:`session`,children:l(`gitReviewSessionSnapshot`)})]})]}),e.source===`branch`&&e.setBaseRef&&f&&(0,q.jsx)(kJ,{branches:f,value:e.baseRef??(e.result?.ok?e.result.snapshot.baseBranch??void 0:void 0),loading:e.loading,onChange:e.setBaseRef}),we&&(!e.setSource||e.historical||ce?.comparison===`branch`)&&(0,q.jsx)(`span`,{className:`review-source-summary`,title:we,children:we}),(0,q.jsxs)(`div`,{className:`review-source-actions`,children:[o&&(0,q.jsx)(`button`,{type:`button`,onClick:o,children:l(`sessionFileRecords`)}),(0,q.jsx)(V,{content:l(`gitReviewRefresh`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":l(`gitReviewRefresh`),disabled:e.loading,"aria-busy":e.loading||void 0,onClick:()=>{e.loading||e.refresh()},children:(0,q.jsx)(me,{"aria-hidden":`true`})})})]})]}),le&&(0,q.jsxs)(`div`,{className:`review-update`,role:`status`,children:[(0,q.jsx)(`span`,{children:l(`gitReviewNewVersion`)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{C.current?.focus(),N(se),te(null)},children:l(`gitReviewShowLatest`)})]}),(e.error||ue)&&(0,q.jsx)(yJ,{status:`error`,container:`section`,title:e.error||ue,description:ce?l(`gitReviewOlderResult`):void 0,className:`review-banner`,endContent:(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,label:l(`gitReviewRetry`),isDisabled:e.loading,isLoading:e.loading,onClick:()=>{e.loading||e.refresh()}})}),(0,q.jsxs)(`div`,{className:`review-workspace`,children:[P&&(0,q.jsxs)(`div`,{className:`review-file-screen`,children:[(0,q.jsxs)(`header`,{className:`review-file-header`,children:[!_&&(0,q.jsx)(Br,{label:l(`gitReviewBackToFiles`),variant:`ghost`,size:`sm`,isIconOnly:!0,icon:(0,q.jsx)(Ko,{"aria-hidden":`true`}),onClick:Ee}),(0,q.jsxs)(`div`,{className:`review-file-heading`,children:[(0,q.jsx)(`strong`,{title:P,children:FJ(P)}),(0,q.jsx)(`span`,{title:P,children:P})]}),fe&&pe&&(0,q.jsxs)(`label`,{className:`review-file-viewed`,children:[(0,q.jsx)(`input`,{type:`checkbox`,"aria-label":l(`gitReviewMarkCurrentViewed`,{path:P}),checked:he.has(P),disabled:he.size>=NJ&&!he.has(P),onChange:e=>ge(P,e.currentTarget.checked)}),(0,q.jsx)(`span`,{children:l(`gitReviewViewedLabel`)})]}),!i&&(0,q.jsxs)(`div`,{className:`review-file-actions`,children:[r&&(0,q.jsx)(Br,{label:l(`openTools`),variant:`ghost`,size:`sm`,isIconOnly:!0,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),onClick:r}),(0,q.jsx)(Br,{label:l(`close`),variant:`ghost`,size:`sm`,isIconOnly:!0,icon:(0,q.jsx)(je,{"aria-hidden":`true`}),onClick:n})]})]}),(0,q.jsxs)(`div`,{className:`review-file-toolbar`,children:[(0,q.jsx)(`div`,{className:`review-file-context`,children:fe&&(0,q.jsx)(`span`,{children:l(`gitFileStatus_${fe.status}`)})}),(0,q.jsxs)(oj,{gap:2,align:`center`,className:`session-review-stats`,children:[fe&&!fe.binary&&!fe.statsUnavailable&&fe.additions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-additions`,children:[`+`,fe.additions]}),fe&&!fe.binary&&!fe.statsUnavailable&&fe.deletions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-deletions`,children:[`-`,fe.deletions]})]})]}),(0,q.jsx)(`section`,{ref:C,className:`review-file-preview`,"aria-label":l(`gitReviewFilePreview`,{file:P}),tabIndex:-1,onScroll:e=>{u?.review&&(u.review.previewScroll=e.currentTarget.scrollTop)},children:fe?_e?(0,q.jsxs)(`div`,{role:`alert`,children:[(0,q.jsx)(`p`,{children:_e}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>re(e=>e+1),children:l(`retryAdmissionCheck`)})]}):fe.diffLoaded===!1&&e.readFile?(0,q.jsx)(`p`,{role:`status`,children:l(`gitReviewLoading`)}):fe.binary?(0,q.jsx)(xJ,{icon:(0,q.jsx)(js,{"aria-hidden":`true`}),title:l(`gitReviewBinary`),isCompact:!0}):fe.statsUnavailable?(0,q.jsx)(xJ,{icon:(0,q.jsx)(js,{"aria-hidden":`true`}),title:l(`turnEditStatsUnknown`),description:l(`turnEditReason_${fe.statsUnavailable}`),isCompact:!0}):fe.diff?(0,q.jsxs)(q.Fragment,{children:[fe.diffTruncated&&(0,q.jsx)(`p`,{className:`review-hidden-lines`,children:l(`gitReviewDiffTruncated`)}),(0,q.jsx)(mK,{file:fe,onReferenceLine:c})]}):(0,q.jsx)(xJ,{icon:(0,q.jsx)(js,{"aria-hidden":`true`}),title:l(fe.diffTruncated?`gitReviewDiffTruncated`:`gitReviewNoDiff`),description:fe.diffTruncated?l(`gitReviewDiffTruncated`):void 0,isCompact:!0}):(0,q.jsx)(`p`,{role:`status`,children:l(e.loading?`gitReviewLoading`:`gitReviewFileMissing`)})})]}),(!P||_)&&(0,q.jsxs)(`div`,{className:`review-navigation`,children:[!i&&!_&&(0,q.jsxs)(`header`,{className:`review-heading`,children:[(0,q.jsx)(`div`,{children:(0,q.jsxs)(`h2`,{children:[(0,q.jsx)(Ms,{"aria-hidden":`true`}),` `,l(`changeEvidence`)]})}),(0,q.jsxs)(`div`,{className:`review-heading-actions`,children:[r&&(0,q.jsx)(V,{content:l(`openTools`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":l(`openTools`),onClick:r,children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:l(`close`),placement:`below`,children:(0,q.jsx)(`button`,{ref:x,type:`button`,className:`icon-button review-close`,"aria-label":l(`close`),onClick:n,children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]})]}),(0,q.jsxs)(`div`,{ref:S,onScroll:e=>{u?.review&&(u.review.listScroll=e.currentTarget.scrollTop)},className:`review-body`,tabIndex:i?-1:void 0,children:[ce&&(0,q.jsxs)(sj,{gap:1,align:`stretch`,className:`review-summary`,children:[(0,q.jsxs)(oj,{gap:3,align:`center`,justify:`between`,children:[(0,q.jsx)(jt,{type:`label`,children:l(Se?`gitReviewLoadedCount`:`filesChanged`,{count:Se?ce.files.length:ce.totalFiles??ce.files.length})}),ce.nextOffset!==void 0&&!Se&&(0,q.jsx)(jt,{type:`supporting`,color:`secondary`,children:l(`gitReviewLoadedCount`,{count:ce.files.length})}),!Se&&!ce.truncated&&ce.nextOffset===void 0&&(ce.additions>0||ce.deletions>0)&&!ce.files.some(e=>e.binary||e.statsUnavailable||e.status===`untracked`&&e.diffLoaded===!1)&&(0,q.jsxs)(oj,{gap:2,align:`center`,className:`review-summary-counts`,"aria-hidden":`true`,children:[ce.additions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-additions`,children:[`+`,ce.additions]}),ce.deletions>0&&(0,q.jsxs)(jt,{type:`supporting`,hasTabularNumbers:!0,className:`review-deletions`,children:[`-`,ce.deletions]})]})]}),he.size>=NJ&&(0,q.jsx)(jt,{type:`supporting`,color:`secondary`,children:l(`gitReviewViewedLimit`,{count:NJ})})]}),e.loading&&!ce&&(0,q.jsxs)(`div`,{className:`review-loading`,role:`status`,children:[(0,q.jsx)(`span`,{className:`sr-only`,children:l(`gitReviewLoading`)}),(0,q.jsxs)(sj,{gap:2,align:`stretch`,"aria-hidden":`true`,children:[(0,q.jsx)(OJ,{width:`42%`,height:16,radius:`rounded`,index:0}),(0,q.jsx)(`div`,{className:`review-loading-list`,children:PJ.map(e=>(0,q.jsx)(OJ,{width:`100%`,height:36,radius:0,index:e+1},e))})]})]}),ce?.truncated&&(0,q.jsx)(yJ,{status:`info`,title:l(`gitReviewTruncated`),className:`review-banner`}),ce&&ce.files.length>0&&(0,q.jsxs)(`label`,{className:`review-search`,children:[(0,q.jsx)(Dc,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{className:`sr-only`,children:l(Ce?`gitReviewSearchLoaded`:`gitReviewSearch`)}),(0,q.jsx)(`input`,{type:`search`,value:A,placeholder:l(Ce?`gitReviewSearchLoaded`:`gitReviewSearch`),onChange:e=>{j(e.target.value),k(MJ)}})]}),A&&ve.length===0&&(0,q.jsx)(`p`,{className:`review-search-empty`,role:`status`,children:l(Ce?`gitReviewNoLoadedMatch`:`gitReviewNoMatch`)}),ce&&ce.files.length===0&&(0,q.jsx)(xJ,{icon:(0,q.jsx)(Ws,{"aria-hidden":`true`}),title:l(`gitReviewEmpty`),isCompact:!0,className:`review-empty`}),ye.length>0&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(jJ,{files:ye,selectedPath:P,collapsed:y,searching:!!A,onToggle:e=>b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),onSelect:Te,viewed:he,onViewedChange:ge,viewedLimitReached:he.size>=NJ}),xe>0&&(0,q.jsx)(`div`,{className:`session-review-more`,children:(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,width:`100%`,label:l(`gitReviewShowMore`,{count:Math.min(MJ,xe)}),onClick:()=>k(e=>Math.min(e+MJ,ve.length))})})]}),ce?.nextOffset!==void 0&&e.loadMore&&(0,q.jsx)(`div`,{className:`session-review-more`,children:(0,q.jsx)(Br,{variant:`ghost`,size:`sm`,width:`100%`,label:l(`gitReviewLoadNext`),isLoading:e.loading,isDisabled:e.loading,onClick:()=>{e.loadMore?.()}})})]})]})]})]})}function RJ(e,t,n,r){let{t:i}=W(),a=(0,K.useMemo)(()=>new de,[]),[o,s]=(0,K.useState)(0),[c,l]=(0,K.useState)({identity:``,result:null,error:null}),u=JSON.stringify([e,t,r,o]);(0,K.useEffect)(()=>{if(!r)return;let o=new AbortController;return a.turnChanges(e,t,r,o.signal).then(t=>{if(o.signal.aborted)return;if(!t.ok||t.changes.sessionId!==e||t.changes.promptEntryId!==r||t.changes.state===`unavailable`){l({identity:u,result:null,error:i(`turnChangesUnavailable`)});return}let a=t.changes;l({identity:u,error:null,result:{ok:!0,snapshot:{...a.source?{evidenceSource:a.source}:{},...a.fileCount===null?{}:{totalFiles:a.fileCount,listComplete:!0},repositoryRoot:n,currentBranch:null,baseBranch:null,comparison:`session`,revision:u,files:a.files,additions:a.additions,deletions:a.deletions,truncated:a.state===`partial`}}})},()=>{o.signal.aborted||l({identity:u,result:null,error:i(`turnChangesUnavailable`)})}),()=>o.abort()},[a,e,t,r,u,n,i]);let d=(0,K.useCallback)(async()=>s(e=>e+1),[]);return{result:c.identity===u?c.result:null,error:c.identity===u?c.error:null,loading:!!r&&c.identity!==u,refresh:d,historical:!0}}function zJ(e,t,n){let r=(0,K.useRef)({onState:t,onOpen:n});r.current={onState:t,onOpen:n};let[i,a]=(0,K.useState)(),[o,s]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let t=()=>{let e=document.documentElement.dataset.openpiBrowserExtension===`ready`;s(e),e||a(void 0)};t();let n=new MutationObserver(t);n.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-openpi-browser-extension`]});let i=t=>{if(t.source!==window||t.origin!==location.origin)return;let n=t.data;if(!n||n.source!==`openpi-browser-extension`||n.id!==e)return;if(n.type===`lost`){a(void 0);return}if(typeof n.url!=`string`)return;let i=eJ(n.url,location.origin);if(i&&(n.type===`open`&&r.current.onOpen(i),n.type===`state`&&typeof n.title==`string`)){let t={id:e,document:typeof n.document==`string`?n.document:void 0,url:i,title:n.title.slice(0,256),canGoBack:n.canGoBack===!0,canGoForward:n.canGoForward===!0};a(t),r.current.onState(t)}};return window.addEventListener(`message`,i),()=>{n.disconnect(),window.removeEventListener(`message`,i)}},[e]),{ready:o,page:o&&i?.id===e?i:void 0,command:t=>window.postMessage({source:`openpi-browser-ui`,type:`command`,id:e,action:t},location.origin)}}var BJ=8;function VJ({onTitle:e,onOpen:t,initialUrl:n=``,readingId:r}){let{t:i}=W(),a=(0,K.useId)(),o=(0,K.useRef)(null),s=be(),c=s?.browser?.pages[r],[l,u]=(0,K.useState)(c?.draft??n),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)({history:c?.history??(n?[n]:[]),index:c?.index??(n?0:-1),revision:0,loaded:!1,unknown:!1}),h=p.history[p.index],g=(0,K.useRef)(h);(0,K.useLayoutEffect)(()=>{s?.browser&&(s.browser.pages[r]={draft:l,history:p.history.map((e,t)=>t===p.index?g.current??e:e),index:p.index})},[s,r,l,p]);let _=`${a}-${p.revision}`,v=zJ(_,t=>{g.current=t.url;let n=s?.browser?.pages[r];n&&(n.history=n.history.map((e,r)=>r===n.index?t.url:e)),document.activeElement!==o.current&&u(t.url),e(t.title||new URL(t.url).host)},t),y=v.page?.url??h,b=(t,n)=>{let r=t[n];r&&(g.current=r,m(e=>({history:t,index:n,revision:e.revision+1,loaded:!1,unknown:!1})),u(r),f(null),e(new URL(r).host))};return(0,q.jsxs)(`div`,{className:`browser-tool browser-direct-tool`,children:[(0,q.jsxs)(`form`,{className:`browser-toolbar`,onSubmit:e=>{e.preventDefault();let t=eJ(l,window.location.origin);if(!t){f(i(`browserAddressNotAllowed`));return}if(t===h)b(p.history,p.index);else{let e=[...p.history.slice(0,p.index+1),t].slice(-64);b(e,e.length-1)}},children:[(0,q.jsxs)(`div`,{className:`browser-navigation`,children:[(0,q.jsx)(V,{content:i(`browserBack`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`browserBack`),disabled:v.page?!v.page.canGoBack:p.unknown||p.index<=0,onClick:()=>v.page?v.command(`back`):b(p.history,p.index-1),children:(0,q.jsx)(Ko,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:i(`browserForward`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`browserForward`),disabled:v.page?!v.page.canGoForward:p.unknown||p.index>=p.history.length-1,onClick:()=>v.page?v.command(`forward`):b(p.history,p.index+1),children:(0,q.jsx)(qo,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:i(`browserReload`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`browserReload`),disabled:!h,onClick:()=>v.page?v.command(`reload`):b(p.history,p.index),children:(0,q.jsx)(me,{"aria-hidden":`true`})})})]}),(0,q.jsx)(`input`,{ref:o,"aria-label":i(`browserAddress`),title:i(v.page?`browserAddress`:`browserEnteredAddress`),value:l,placeholder:`https://`,spellCheck:!1,onChange:e=>{u(e.currentTarget.value),f(null)}}),(0,q.jsx)(V,{content:i(`browserGo`),placement:`below`,children:(0,q.jsx)(`button`,{type:`submit`,"aria-label":i(`browserGo`),disabled:!l.trim(),children:(0,q.jsx)(qo,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:i(`openExternalBrowser`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":i(`openExternalBrowser`),disabled:!y||!v.page&&p.unknown,onClick:()=>y&&window.open(y,`_blank`,`noopener,noreferrer`),children:(0,q.jsx)(Os,{"aria-hidden":`true`})})})]}),(0,q.jsxs)(`div`,{className:`browser-feedback`,children:[d&&(0,q.jsx)(`p`,{className:`workbar-error`,role:`alert`,children:d}),p.unknown&&!v.page&&(0,q.jsx)(`p`,{className:`browser-notice`,role:`status`,children:i(`browserLocationUnknown`)})]}),(0,q.jsx)(`div`,{className:`browser-direct-viewport`,children:h?(0,q.jsx)(`iframe`,{"data-openpi-browser-page":_,"data-openpi-browser-document":v.page?.document,"data-openpi-browser-url":v.page?.url,"data-openpi-browser-title":v.page?.title,src:h,title:i(`browserPageTitle`,{address:new URL(h).host}),referrerPolicy:`no-referrer`,sandbox:`allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox`,onLoad:()=>m(e=>e.revision===p.revision?{...e,loaded:!0,unknown:e.loaded}:e)},p.revision):(0,q.jsxs)(`div`,{className:`workbar-empty`,children:[(0,q.jsx)(Es,{"aria-hidden":`true`}),(0,q.jsx)(`strong`,{children:i(`browserReady`)}),(0,q.jsx)(`p`,{children:i(`browserDirectDescription`)})]})}),(0,q.jsx)(`p`,{className:`browser-notice`,children:i(v.ready?`browserEnhancedHint`:`browserDirectHint`)})]})}function HJ({onReady:e}={}){let{t}=W(),n=(0,K.useId)(),r=be(),[i,a]=(0,K.useState)(r?.browser?.tabs??[{id:0,title:``}]),o=(0,K.useRef)(Math.max(...i.map(e=>e.id))+1),s=(0,K.useRef)(i);s.current=i;let[c,l]=(0,K.useState)(),[u,d]=(0,K.useState)(r?.browser?.selected??0);(0,K.useLayoutEffect)(()=>{r&&(r.browser={tabs:i,selected:u,pages:r.browser?.pages??{}})},[r,i,u]);let f=e=>{requestAnimationFrame(()=>document.getElementById(`${n}-tab-${e}`)?.focus())},p=(e=``)=>{if(s.current.length>=BJ){e&&l(e);return}let t={id:o.current++,title:e?new URL(e).host:``,initialUrl:e},r=[...s.current,t];return s.current=r,a(r),d(t.id),l(void 0),f(t.id),`${n}-page-${t.id}`},m=(0,K.useRef)(p);m.current=p,(0,K.useEffect)(()=>(e?.(e=>m.current(e)),()=>e?.(void 0)),[e]);let h=e=>{r?.browser&&delete r.browser.pages[e],l(void 0);let t=i.filter(t=>t.id!==e);if(!t.length){let e={id:o.current++,title:``};a([e]),d(e.id),f(e.id)}else if(a(t),u===e){let n=i.findIndex(t=>t.id===e),r=t[Math.min(n,t.length-1)];d(r.id),f(r.id)}};return(0,q.jsxs)(`div`,{className:`browser-workspace`,children:[(0,q.jsxs)(`div`,{className:`browser-tabs-header`,children:[(0,q.jsx)(`div`,{role:`tablist`,"aria-label":t(`browserTabs`),className:`browser-tabs`,onKeyDown:e=>{if(!(e.target instanceof HTMLElement)||e.target.getAttribute(`role`)!==`tab`)return;let t=e.target.id,r=i.findIndex(e=>`${n}-tab-${e.id}`===t),a=r;if(e.key===`ArrowRight`)a=(r+1)%i.length;else if(e.key===`ArrowLeft`)a=(r+i.length-1)%i.length;else if(e.key===`Home`)a=0;else if(e.key===`End`)a=i.length-1;else if(e.key===`Delete`){e.preventDefault(),e.stopPropagation(),h(i[r].id);return}else return;e.preventDefault(),e.stopPropagation(),d(i[a].id),f(i[a].id)},children:i.map(e=>(0,q.jsxs)(`div`,{className:`browser-tab`,"data-active":e.id===u,children:[(0,q.jsxs)(`button`,{type:`button`,role:`tab`,id:`${n}-tab-${e.id}`,"aria-selected":e.id===u,"aria-controls":`${n}-page-${e.id}`,tabIndex:e.id===u?0:-1,onClick:()=>d(e.id),children:[(0,q.jsx)(Es,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:e.title||t(`browserNewTab`)})]}),(0,q.jsx)(V,{content:t(`close`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":t(`browserCloseTab`,{title:e.title||t(`browserNewTab`)}),onClick:()=>h(e.id),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},e.id))}),(0,q.jsx)(V,{content:i.length>=BJ?t(`browserTabLimit`,{count:BJ}):t(`browserAddTab`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`browser-add-tab`,"aria-label":t(`browserAddTab`),disabled:i.length>=BJ,onClick:()=>p(),children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})})]}),c&&(0,q.jsxs)(`p`,{className:`browser-notice`,role:`status`,children:[t(`browserTabLimit`,{count:BJ}),` ·`,` `,(0,q.jsx)(`a`,{href:c,target:`_blank`,rel:`noopener noreferrer`,children:t(`openExternalBrowser`)})]}),(0,q.jsx)(`div`,{className:`browser-pages`,children:i.map(e=>(0,q.jsx)(`div`,{role:`tabpanel`,id:`${n}-page-${e.id}`,"aria-labelledby":`${n}-tab-${e.id}`,className:`browser-page`,hidden:u!==e.id,children:(0,q.jsx)(VJ,{readingId:e.id,initialUrl:e.initialUrl,onOpen:p,onTitle:t=>a(n=>n.map(n=>n.id===e.id?{...n,title:t}:n))})},e.id))})]})}function UJ(e){return e.startsWith(`terminal:`)?`terminal`:e}function WJ(e){return e===`launcher`?{tabs:[],active:null,launcherOpen:!0,activationHistory:[]}:{tabs:[e],active:e,launcherOpen:!1,activationHistory:[e]}}function GJ(e,t){return t===`launcher`?{...e,launcherOpen:!0}:{tabs:e.tabs.includes(t)?e.tabs:[...e.tabs,t],active:t,launcherOpen:!1,activationHistory:[...e.activationHistory.filter(e=>e!==t),t]}}function KJ(e,t){return e.tabs.includes(t)?GJ(e,t):e}function qJ(e,t){if(!e.tabs.includes(t))return e;let n=e.tabs.filter(e=>e!==t),r=e.activationHistory.filter(e=>e!==t);if(e.active!==t)return{...e,tabs:n,activationHistory:r};let i=r.at(-1),a=e.tabs.indexOf(t),o=n[Math.min(a,n.length-1)],s=i??o??null;return{tabs:n,active:s,launcherOpen:e.launcherOpen||s===null,activationHistory:r}}function JJ(e){return{...e,launcherOpen:e.active===null}}var YJ=[{kind:`side-conversation`,icon:cc,title:`sideConversation`,description:`sideConversationDescription`},{kind:`review`,icon:Ms,title:`changeEvidence`,description:`workbarChangesDescription`},{kind:`terminal`,icon:Lc,title:`terminal`,description:`workbarTerminalDescription`},{kind:`browser`,icon:Es,title:`browser`,description:`workbarBrowserDescription`},{kind:`files`,icon:zs,title:`files`,description:`workbarFilesDescription`},{kind:`sources`,icon:Qs,title:`sessionSources`,description:`sourcesDescription`}];function XJ({onSelect:e}){let{t}=W();return(0,q.jsx)(`section`,{className:`workbar-launcher`,"aria-label":t(`openTools`),children:(0,q.jsx)(`div`,{className:`workbar-launcher-list`,children:YJ.map(n=>{let r=n.icon;return(0,q.jsxs)(`button`,{type:`button`,onClick:()=>e(n.kind),children:[(0,q.jsx)(r,{"aria-hidden":`true`}),(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:t(n.title)}),(0,q.jsx)(`small`,{children:t(n.description)})]}),(0,q.jsx)(os,{"aria-hidden":`true`})]},n.kind)})})})}function ZJ({sessionId:e,cwd:t,snapshot:n,activity:r}){let{t:i}=W(),a=(0,K.useMemo)(()=>new de,[]),o=be(),[s,c]=(0,K.useState)(o?.sideConversation?.selectedId??null),[l,u]=(0,K.useState)(o?.sideConversation?.drafts??{});(0,K.useLayoutEffect)(()=>{o&&(o.sideConversation={selectedId:s,drafts:l})},[o,s,l]);let d=l[s??``]??``,f=(0,K.useRef)(0),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(null),[_,v]=(0,K.useState)(!1),y=(0,K.useRef)(!1),[b,x]=(0,K.useState)(null),[S,C]=(0,K.useState)(0),[w,T]=(0,K.useState)(null),E=(0,K.useRef)(null);(0,K.useEffect)(()=>()=>E.current?.abort(),[]);let D=(r?.items??[]).filter(e=>e.origin===`btw`),O=D.find(e=>e.id===s),k=O?.status??w,A=p?.id===s?p:null,j=n?.models.find(e=>s?`${e.provider}/${e.id}`===A?.model:e.current),M=s?A?.model:j&&`${j.provider}/${j.id}`,N=j?.name||j?.id||M||i(`usageUnknown`),P=!s&&n?.thinking?.supported?n.thinking.level:void 0,F=A?.cwd??t,I=n?.workspaces.find(e=>e.path===F)?.name??LD(F),ee=i(s?`continueSideConversation`:`startSideConversation`),L=i(_?`sideConversationPending`:s?`send`:`start`),R=e=>{f.current++,c(e),T(null),x(null),g(null)},te=async t=>{t.preventDefault();let n=d.trim();if(!n||y.current)return;y.current=!0,E.current?.abort();let r=new AbortController,o=f.current,l=s??``;E.current=r,v(!0),x(null);try{let t=await a.subagentAction(e,s?{kind:`subagents`,action:`send-btw`,id:s,text:n}:{kind:`subagents`,action:`spawn-btw`,prompt:n},r.signal);if(r.signal.aborted)return;if(t.sessionId!==e||s&&t.detail.id!==s)throw Error(i(`inspectionChanged`));if(u(e=>e[l]===d?{...e,[l]:``}:e),o!==f.current)return;c(t.detail.id),T(t.detail.status),C(e=>e+1)}catch(e){!r.signal.aborted&&o===f.current&&x(e instanceof Error?e.message:i(`inspectionUnavailable`))}finally{r.signal.aborted||(y.current=!1,v(!1))}},z=async()=>{if(!s||y.current)return;y.current=!0,E.current?.abort();let t=new AbortController,n=f.current;E.current=t,v(!0),x(null);try{let r=await a.subagentAction(e,{kind:`subagents`,action:`cancel-btw`,id:s},t.signal);if(t.signal.aborted||n!==f.current)return;if(r.sessionId!==e||r.detail.id!==s)throw Error(i(`inspectionChanged`));T(r.detail.status),C(e=>e+1)}catch(e){!t.signal.aborted&&n===f.current&&x(e instanceof Error?e.message:i(`inspectionUnavailable`))}finally{t.signal.aborted||(y.current=!1,v(!1))}};return(0,q.jsxs)(`div`,{className:`side-conversation-body`,children:[s?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`button`,{type:`button`,className:`workbar-back`,onClick:()=>R(null),children:[(0,q.jsx)(Ko,{"aria-hidden":`true`}),` `,i(`backToSideConversations`)]}),(0,q.jsx)(kq,{sessionId:e,id:s,activity:O,client:a,liveAvailable:!0,refreshRevision:S,fullView:!1,readOnlyNote:!1,onDetail:e=>m({id:e.id,cwd:e.cwd,model:e.model})},`${e}:${s}`)]}):(0,q.jsxs)(`div`,{className:`side-conversation-list`,"data-empty":D.length===0,children:[(0,q.jsxs)(`div`,{className:`side-conversation-intro`,children:[(0,q.jsx)(cc,{"aria-hidden":`true`}),(0,q.jsx)(`h3`,{children:i(`sideConversation`)}),(0,q.jsx)(`p`,{children:i(`sideConversationDescription`)})]}),D.length>0&&(0,q.jsx)(`ul`,{children:D.map(e=>(0,q.jsx)(`li`,{children:(0,q.jsxs)(`button`,{type:`button`,onClick:()=>R(e.id),children:[(0,q.jsxs)(`span`,{children:[(0,q.jsx)(`strong`,{children:e.title||e.id}),(0,q.jsx)(`small`,{children:i(`subagentState_${e.status}`)})]}),(0,q.jsx)(os,{"aria-hidden":`true`})]})},e.id))})]}),b&&(0,q.jsx)(`p`,{className:`workbar-error`,role:`alert`,children:b}),(0,q.jsx)(`div`,{className:`composer-dock`,children:(0,q.jsxs)(`form`,{className:`composer composer-m02 side-conversation-composer`,onSubmit:te,"aria-busy":_,children:[(0,q.jsx)(`textarea`,{rows:1,value:d,disabled:_,"aria-label":ee,placeholder:ee,onChange:e=>{let t=e.currentTarget.value;u(e=>({...e,[s??``]:t}))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.defaultPrevented&&!e.nativeEvent.isComposing&&e.nativeEvent.keyCode!==229&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}}),(0,q.jsxs)(`div`,{className:`composer-toolbar`,children:[(0,q.jsxs)(`div`,{className:`composer-toolbar-context`,children:[(0,q.jsx)(V,{content:i(`fileReference`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`composer-context-trigger icon-button`,"aria-label":i(`addContext`),disabled:_,onClick:()=>g({key:s??``,generation:f.current}),children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})}),(0,q.jsxs)(`span`,{className:`composer-workspace-label`,title:F,children:[(0,q.jsx)(Vs,{"aria-hidden":`true`}),` `,I]})]}),(0,q.jsxs)(`div`,{className:`composer-toolbar-controls`,children:[(0,q.jsx)(`div`,{className:`model-picker-wrap`,children:(0,q.jsx)(ok,{className:`model-selector model-picker`,label:`${i(`model`)}: ${N}`,isLabelHidden:!0,value:M??``,triggerLabel:(0,q.jsxs)(`span`,{className:`model-thinking-label`,title:M||N,children:[(0,q.jsx)(`span`,{className:`model-picker-label`,children:N}),P&&(0,q.jsx)(`span`,{className:`model-picker-thinking`,children:P[0].toUpperCase()+P.slice(1)})]}),variant:`ghost`,size:`sm`,placement:`above`,alignment:`end`,isDisabled:!M,children:()=>(0,q.jsxs)(`div`,{className:`side-conversation-model-details`,children:[(0,q.jsx)(`strong`,{children:N}),(0,q.jsx)(`code`,{children:M}),(0,q.jsx)(`p`,{children:i(s?`sideConversationModelFixed`:`sideConversationModelInherited`)})]})},s??`new`)}),s&&k===`running`&&(0,q.jsx)(V,{content:i(`stop`),children:(0,q.jsx)(`button`,{type:`button`,className:`send-button`,"aria-label":i(`stop`),disabled:_,onClick:()=>void z(),children:(0,q.jsx)(Rc,{"aria-hidden":`true`})})}),(!s||k!==`running`||!!d.trim())&&(0,q.jsx)(V,{content:L,children:(0,q.jsx)(`button`,{type:`submit`,className:`send-button`,disabled:_||!d.trim(),"aria-label":L,children:(0,q.jsx)(Xo,{"aria-hidden":`true`})})})]})]})]})}),(0,q.jsx)(tk,{open:h!==null,sessionId:e,onClose:()=>g(null),onInsert:e=>{if(!h||h.generation!==f.current||h.key!==(s??``)||y.current)return i(`fileReferenceDraftChanged`);let t=h.key;u(n=>({...n,[t]:`${n[t]??``}${n[t]?` +`:``}${nk(e)}`}))}})]})}function QJ({sessionId:e,cwd:t,tabId:n,active:r,onConnectionChange:i}){let{t:a}=W(),o=be(),s=(0,K.useRef)(null),c=(0,K.useRef)(i);c.current=i;let l=(0,K.useRef)(!0),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(!1);return(0,K.useEffect)(()=>{let e=!1;l.current=!0;let t=e=>{let t=e.target;t instanceof Element&&!s.current?.contains(t)&&!t.matches(`.workbar-tab[data-active] > button:first-child`)&&(l.current=!1)};document.addEventListener(`focusin`,t);let r=o?.terminals?.[n]?.id??null;return c.current({id:r,pending:!0}),Ee(()=>import(`./app-InteractiveTerminal.js`).then(t=>{e||d(()=>t.InteractiveTerminal)},()=>{e||(p(!0),c.current({id:r,pending:!1}))}),__vite__mapDeps([31,1,2,0,32,6])),()=>{e=!0,document.removeEventListener(`focusin`,t)}},[o,n]),(0,q.jsx)(`div`,{className:`terminal-workspace`,ref:s,children:u?(0,q.jsx)(u,{sessionId:e,cwd:t,tabId:n,active:r,canFocusOnMount:()=>l.current,onConnectionChange:i}):(0,q.jsx)(`section`,{className:`interactive-terminal`,"aria-label":a(`terminal`),children:(0,q.jsxs)(`div`,{className:`interactive-terminal-notice`,"aria-live":`polite`,children:[(0,q.jsx)(`span`,{className:f?`error`:void 0,children:a(f?`terminalLoadError`:`terminalConnecting`)}),f&&(0,q.jsxs)(`button`,{type:`button`,className:`terminal-reconnect-action`,onClick:()=>window.location.reload(),children:[(0,q.jsx)(me,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a(`reloadPage`)})]})]})})})}function $J({visible:e,requestedTool:t,requestRevision:n,sessionId:r,sessionPath:i,cwd:a,snapshot:o,capabilities:s,review:c,reviewInitialFilePath:l,reviewTurn:u,onWorkspaceReview:d,conversationCollapsed:f,onRestoreConversation:p,onExpandReview:m,onClose:h,onActiveToolChange:g,canControl:_=!0,onActivateSession:v,readingState:y,onReferenceLine:b,onBrowserReady:x}){let{t:S}=W(),C=(0,K.useRef)({}),w=y??C.current;w.terminal&&!w.terminals?.terminal&&((w.terminals??={}).terminal=w.terminal,w.terminal=void 0);let[T,E]=(0,K.useState)(()=>w?.tabs?w.requestRevision===n?w.tabs:GJ(w.tabs,t):WJ(t)),D=JSON.stringify([r,i]),O=(0,K.useRef)(new Map),k=(0,K.useRef)(null),A=(0,K.useRef)(null),M=(0,K.useRef)(null),N=(0,K.useMemo)(()=>new de,[]),[P,F]=(0,K.useState)({}),[I,ee]=(0,K.useState)([]),L=(0,K.useRef)(new Set),R=(0,K.useRef)(0);(0,K.useEffect)(()=>()=>{R.current++},[]);let[te,B]=(0,K.useState)(null),[ne,re]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(``),[oe,se]=(0,K.useState)(()=>Object.fromEntries(Object.entries(w.terminals??{}).flatMap(([e,t])=>t.title?[[e,t.title]]:[]))),ce=e=>oe[e]??(e===`terminal`?S(`terminal`):`${S(`terminal`)} ${T.tabs.filter(e=>UJ(e)===`terminal`).indexOf(e)+1}`);(0,K.useLayoutEffect)(()=>{let t=M.current;if(M.current=null,!t||t.scope!==D||!e||(t.tool?T.launcherOpen||T.active!==t.tool:!T.launcherOpen))return;let n=requestAnimationFrame(()=>{let e=t.tool?O.current.get(t.tool):k.current;!e?.isConnected||e.closest(`[hidden], [inert]`)||document.activeElement!==document.body&&!e.closest(`.workbar-panel`)?.contains(document.activeElement)&&!document.getElementById(k.current?.getAttribute(`aria-controls`)??``)?.contains(document.activeElement)||e.focus({preventScroll:!0})});return()=>cancelAnimationFrame(n)},[T,D,e]);let le=e&&!T.launcherOpen&&T.active===`browser`&&_,[H,ue]=(0,K.useState)(null);(0,K.useLayoutEffect)(()=>{le?ue(D):(!e||!_||!T.tabs.includes(`browser`)||H!==D)&&ue(null)},[le,D,e,_,T,H]),(0,K.useLayoutEffect)(()=>{w&&(w.tabs=T,w.requestRevision=n)},[w,T,n]);let fe=RJ(r,i,a,u?.promptEntryId),pe=(0,K.useRef)(n);(0,K.useEffect)(()=>(g?.(e?T.launcherOpen?`launcher`:T.active?UJ(T.active):null:null),()=>g?.(null)),[e,T.launcherOpen,T.active,g]),(0,K.useEffect)(()=>{pe.current!==n&&(pe.current=n,E(e=>GJ(e,t)))},[n,t]);let me=e=>{let t=e===`terminal`&&T.tabs.some(e=>UJ(e)===`terminal`)?`terminal:${crypto.randomUUID()}`:e;if(t!==`launcher`&&(M.current={tool:t,scope:D}),t.startsWith(`terminal:`)){let e=Math.max(1,...Object.values(oe).map(e=>Number(e.match(/\s(\d+)$/u)?.[1])||0))+1,n=`${S(`terminal`)} ${e}`;se(e=>({...e,[t]:n})),(w.terminals??={})[t]={viewport:0,atBottom:!0,title:n}}E(e=>GJ(e,t))},he=async(e,t)=>{let n=R.current,i=t.contains(document.activeElement);if(UJ(e)===`terminal`&&_){if(L.current.has(e)||P[e]?.pending)return;let t=P[e]?.id??w.terminals?.[e]?.id;if(t){L.current.add(e),ee(t=>[...t,e]),B(null);try{await N.closeInteractiveTerminal(r,t)}catch(e){n===R.current&&B(e instanceof Error?e.message:S(`terminalError`));return}finally{n===R.current&&(L.current.delete(e),ee(t=>t.filter(t=>t!==e)))}if(n!==R.current)return}}UJ(e)===`terminal`&&w.terminals&&delete w.terminals[e],E(n=>{let r=qJ(n,e);return(t.contains(document.activeElement)||i&&document.activeElement===document.body)&&(M.current={tool:r.launcherOpen?null:r.active,scope:D}),r})},ge=T.active?UJ(T.active):null,_e=T.launcherOpen?`openTools`:YJ.find(e=>e.kind===ge)?.title??`openTools`;return j({isActive:e,onDismiss:()=>{T.launcherOpen&&T.active?(M.current={tool:T.active,scope:D},E(JJ)):h()},getContainer:()=>A.current,isPresent:()=>A.current?.contains(document.activeElement)??!1}),(0,q.jsx)(ve.Provider,{value:w,children:(0,q.jsx)(z,{children:(0,q.jsxs)(`aside`,{ref:A,className:`workbar-panel`,hidden:!e,"aria-label":S(_e??`openTools`),children:[(0,q.jsxs)(`header`,{className:`workbar-tabbar`,children:[(0,q.jsxs)(`div`,{className:`workbar-tabs`,role:`toolbar`,"aria-label":S(`openTools`),children:[T.tabs.length===0&&(0,q.jsxs)(`span`,{className:`workbar-tab-placeholder`,children:[(0,q.jsx)(Ae,{"aria-hidden":`true`}),` `,S(`openTools`)]}),T.tabs.map(e=>{let t=UJ(e),n=YJ.find(e=>e.kind===t),r=n.icon,i=!T.launcherOpen&&T.active===e,a=t===`terminal`?ce(e):S(n.title),o=()=>{t===`terminal`&&(ae(a),re(e))};return(0,q.jsxs)(`div`,{className:`workbar-tab`,"data-active":i||void 0,children:[(0,q.jsxs)(`button`,{type:`button`,ref:t=>{t?O.current.set(e,t):O.current.delete(e)},"aria-pressed":i,title:t===`terminal`?`${a} · ${S(`renameTerminal`)}`:a,onDoubleClick:o,onContextMenu:e=>{t===`terminal`&&(e.preventDefault(),o())},onKeyDown:e=>{t===`terminal`&&e.key===`F2`&&(e.preventDefault(),o())},onClick:()=>E(t=>KJ(t,e)),children:[(0,q.jsx)(r,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:a})]}),(0,q.jsx)(V,{content:t===`terminal`&&_?S(`workbarEndTerminal`,{name:a}):`${S(`close`)} ${a}`,placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`workbar-tab-close`,"aria-label":t===`terminal`&&_?S(`workbarEndTerminal`,{name:a}):`${S(`close`)} ${a}`,disabled:t===`terminal`&&_&&(I.includes(e)||P[e]?.pending!==!1),onClick:t=>void he(e,t.currentTarget),children:(0,q.jsx)(je,{"aria-hidden":`true`})})})]},e)})]}),(0,q.jsxs)(`div`,{className:`workbar-tabbar-actions`,children:[(0,q.jsxs)(`button`,{type:`button`,className:`workbar-back-to-chat`,onClick:()=>{f?p():h(),requestAnimationFrame(()=>document.querySelector(`.composer textarea`)?.focus({preventScroll:!0}))},children:[(0,q.jsx)(Ko,{"aria-hidden":`true`}),(0,q.jsx)(`span`,{children:S(`workbarBackToChat`)})]}),!f&&T.active===`review`&&m&&(0,q.jsx)(V,{content:S(`gitReviewExpand`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button review-expand`,"aria-label":S(`gitReviewExpand`),onClick:m,children:(0,q.jsx)(gc,{"aria-hidden":`true`,style:{transform:`rotate(180deg)`}})})}),T.active?(0,q.jsx)(yo,{className:`workbar-tool-picker`,button:{ref:k,className:`icon-button workbar-add-tab`,icon:(0,q.jsx)(Ae,{"aria-hidden":`true`}),label:S(`openTools`),isIconOnly:!0,variant:`ghost`,"aria-label":S(`openTools`),tooltip:S(`openTools`)},onOpenChange:e=>{e||(M.current??={tool:T.active,scope:D},E(JJ))},items:YJ.map(e=>({id:e.kind,icon:(0,q.jsx)(e.icon,{"aria-hidden":`true`}),label:S(e.kind===`terminal`?`workbarNewTerminal`:e.title),description:S(e.description),onClick:()=>me(e.kind)})),menuWidth:`min(300px, calc(100vw - 24px))`,alignment:`end`,hasChevron:!1}):(0,q.jsx)(V,{content:S(`openTools`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,ref:k,className:`icon-button workbar-add-tab`,"aria-label":S(`openTools`),"aria-pressed":T.launcherOpen,onClick:()=>E(e=>GJ(e,`launcher`)),children:(0,q.jsx)(Ae,{"aria-hidden":`true`})})}),(0,q.jsx)(V,{content:S(`workbarCollapseTools`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,className:`icon-button`,"aria-label":S(`workbarCollapseTools`),onClick:h,children:(0,q.jsx)(_c,{"aria-hidden":`true`})})})]})]}),te&&(0,q.jsx)(`p`,{className:`error`,role:`alert`,children:te}),(0,q.jsxs)(`div`,{className:`workbar-panels`,children:[(0,q.jsx)(`div`,{className:`workbar-tool-panel`,hidden:!T.launcherOpen,children:(0,q.jsx)(XJ,{onSelect:me})}),T.tabs.map(t=>{let n=UJ(t);return(0,q.jsx)(`div`,{className:`workbar-tool-panel`,"data-tool":n,"data-tab":t,hidden:T.launcherOpen||T.active!==t,inert:T.launcherOpen||T.active!==t||!e,children:n===`terminal`&&e&&_?(0,q.jsx)(QJ,{sessionId:r,cwd:a,tabId:t,active:!T.launcherOpen&&T.active===t,onConnectionChange:e=>F(n=>({...n,[t]:e}))}):n===`browser`&&e&&_&&(le||H===D)?(0,q.jsx)(HJ,{onReady:x},D):e&&!T.launcherOpen&&T.active===t?!_&&[`side-conversation`,`terminal`,`browser`].includes(n)?(0,q.jsxs)(`div`,{className:`workbar-empty`,children:[(0,q.jsx)(`p`,{children:S(`toolsRequireCurrentSession`)}),v&&(0,q.jsx)(`button`,{type:`button`,className:`secondary`,onClick:v,children:S(`activateViewedSession`)})]}):n===`side-conversation`?(0,q.jsx)(ZJ,{sessionId:r,cwd:a,snapshot:o,activity:s.subagents}):n===`sources`?(0,q.jsx)(iG,{sessionId:r,path:i,revision:o?.selectedSession?.history?.leafEntryId??void 0}):n===`review`?(0,q.jsx)(LJ,{review:u?{...fe,setSource:e=>{c.setSource?.(e),d?.()}}:c,initialFilePath:u?.filePath??l,readingScope:u?`turn:${u.promptEntryId}:${u.revision}`:`workspace:${c.source??`unstaged`}`,onOpenFiles:()=>me(`files`),onReferenceLine:_?b:void 0,onClose:()=>E(e=>qJ(e,`review`)),embedded:!0},u?`${u.promptEntryId}:${u.revision}`:c.source??`workspace`):(0,q.jsx)(sJ,{sessionId:r,sessionPath:i,cwd:a,active:!0,canWrite:_},JSON.stringify([r,i,a])):null},t)})]}),(0,q.jsx)(Se,{isOpen:ne!==null,purpose:`form`,"aria-label":S(`renameTerminal`),onOpenChange:e=>{e||re(null)},children:(0,q.jsxs)(`form`,{className:`openpi-dialog`,onSubmit:e=>{e.preventDefault();let t=ie.trim();if(!ne||!t)return;se(e=>({...e,[ne]:t}));let n=(w.terminals??={})[ne];w.terminals[ne]={...n??{viewport:0,atBottom:!0},title:t},re(null)},children:[(0,q.jsx)(`strong`,{children:S(`renameTerminal`)}),(0,q.jsx)(`input`,{"aria-label":S(`terminalName`),value:ie,maxLength:80,onChange:e=>ae(e.target.value)}),(0,q.jsxs)(`div`,{className:`dialog-actions`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:()=>re(null),children:S(`cancel`)}),(0,q.jsx)(`button`,{type:`submit`,disabled:!ie.trim(),children:S(`save`)})]})]})})]})})})}var eY=`openpi:workbar-positions:v1`;function tY(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function nY(e,t=4096){return typeof e==`string`&&e.length<=t?e:``}function rY(e,t=0,n=0,r=5e7){return typeof e==`number`&&Number.isFinite(e)&&e>=n&&e<=r?e:t}function iY(e,t=100){return Array.isArray(e)?e.slice(0,t).filter(e=>typeof e==`string`&&e.length<=4096):[]}function aY(e){return eJ(nY(e),window.location.origin)}function oY(e){return typeof e==`string`&&([`files`,`review`,`browser`,`terminal`,`side-conversation`,`sources`].includes(e)||/^terminal:[a-zA-Z0-9-]{1,128}$/u.test(e))}function sY(e){return typeof e==`string`&&[`launcher`,`files`,`review`,`browser`,`terminal`,`side-conversation`,`sources`].includes(e)}function cY(e){let t={};if(!tY(e))return t;if(tY(e.sources)&&(t.sources={scroll:rY(e.sources.scroll)}),tY(e.tabs)){let n=Array.isArray(e.tabs.tabs)?[...new Set(e.tabs.tabs.filter(oY))].slice(0,16):[],r=oY(e.tabs.active)&&n.includes(e.tabs.active)?e.tabs.active:null;t.tabs={tabs:n,active:r,launcherOpen:e.tabs.launcherOpen===!0||r===null,activationHistory:Array.isArray(e.tabs.activationHistory)?[...new Set(e.tabs.activationHistory.filter(oY).filter(e=>n.includes(e)))].slice(-16):[]},t.requestRevision=rY(e.requestRevision)}if(tY(e.files)&&(t.files={selected:nY(e.files.selected),treeVisible:e.files.treeVisible!==!1,query:nY(e.files.query,200),expanded:iY(e.files.expanded),treeScroll:rY(e.files.treeScroll)}),tY(e.artifact)){t.artifact={reference:nY(e.artifact.reference),source:e.artifact.source===!0,editing:!1,scroll:rY(e.artifact.scroll)};let n=e.artifact.document;tY(n)&&typeof n.revision==`string`&&/^[a-f0-9]{64}$/u.test(n.revision)&&(t.artifact.document={path:nY(n.path),revision:n.revision,page:Math.floor(rY(n.page,1,1,1e5)),...typeof n.scale==`number`?{scale:rY(n.scale,1,.1,8)}:{}})}let n=e.review;tY(n)&&(n.source===`unstaged`||n.source===`staged`||n.source===`branch`||n.source===`session`)&&(t.review={scope:nY(n.scope),source:n.source,...typeof n.baseRef==`string`?{baseRef:nY(n.baseRef,1024)}:{},selected:typeof n.selected==`string`?nY(n.selected):null,query:nY(n.query,200),collapsedDirectories:iY(n.collapsedDirectories),visibleFiles:rY(n.visibleFiles,50,0,200),listScroll:rY(n.listScroll),previewScroll:rY(n.previewScroll)},tY(n.viewed)&&typeof n.viewed.revision==`string`&&(t.review.viewed={revision:nY(n.viewed.revision,128),paths:iY(n.viewed.paths,200)}));let r=e.browser;if(tY(r)&&Array.isArray(r.tabs)){let e=new Set,n=r.tabs.flatMap(t=>{if(!tY(t)||!Number.isSafeInteger(t.id)||typeof t.id!=`number`||t.id<0||t.id>5e7||e.has(t.id))return[];e.add(t.id);let n=aY(t.initialUrl);return[{id:t.id,title:nY(t.title,200),...n?{initialUrl:n}:{}}]}).slice(0,8),i={};for(let e of n){let t=tY(r.pages)?r.pages[e.id]:void 0;if(!tY(t))continue;let n=iY(t.history,32).flatMap(e=>aY(e)??[]);i[e.id]={draft:aY(t.draft)??``,history:n,index:n.length?Math.min(Math.floor(rY(t.index)),n.length-1):-1}}t.browser={tabs:n,selected:n.some(e=>e.id===r.selected)?Number(r.selected):n[0]?.id??0,pages:i}}if(tY(e.terminals)){t.terminals={};for(let[n,r]of Object.entries(e.terminals).slice(0,16))!oY(n)||n!==`terminal`&&!n.startsWith(`terminal:`)||!t.tabs?.tabs.includes(n)||!tY(r)||(t.terminals[n]={...typeof r.id==`string`?{id:nY(r.id,128)}:{},...typeof r.title==`string`?{title:nY(r.title,80)}:{},viewport:rY(r.viewport),atBottom:r.atBottom!==!1})}return tY(e.terminal)&&typeof e.terminal.id==`string`&&(t.terminal={id:nY(e.terminal.id,128),viewport:rY(e.terminal.viewport),atBottom:e.terminal.atBottom!==!1}),tY(e.sideConversation)&&(t.sideConversation={selectedId:typeof e.sideConversation.selectedId==`string`?nY(e.sideConversation.selectedId,128):null,drafts:{}}),t}function lY(e){if(!tY(e)||!nY(e.sessionId,128)||!nY(e.sessionPath)||!sY(e.tool))return null;let t={sessionId:nY(e.sessionId,128),sessionPath:nY(e.sessionPath),tool:e.tool,open:e.open===!0,requestRevision:rY(e.requestRevision),reading:cY(e.reading)};return tY(e.reviewTurn)&&nY(e.reviewTurn.promptEntryId,512)&&(t.reviewTurn={promptEntryId:nY(e.reviewTurn.promptEntryId,512),revision:rY(e.reviewTurn.revision),...typeof e.reviewTurn.filePath==`string`?{filePath:nY(e.reviewTurn.filePath)}:{}}),t}function uY(){try{let e=localStorage.getItem(eY);if(!e||e.length>256e3)return[];let t=JSON.parse(e);if(!Array.isArray(t))return[];let n=new Map;for(let e of t.slice(-32)){let t=lY(e);t&&n.set(JSON.stringify([t.sessionId,t.sessionPath]),t)}return[...n.values()]}catch{return[]}}function dY(e){try{let t=e.slice(-32).flatMap(e=>lY(e)??[]),n=JSON.stringify(t);for(;n.length>256e3&&t.length;)t.shift(),n=JSON.stringify(t);localStorage.setItem(eY,n)}catch{}}var fY=260,pY=220,mY=520,hY=190,gY=520,_Y=360,vY=720,yY=320,bY=440,xY=1100;function SY(e,t,n){return Math.min(n,Math.max(t,e))}function CY(){$q();let e=nu(WG),{t}=W(),{actions:n}=e,r=(0,K.useRef)(null),i=(0,K.useRef)(null),a=(0,K.useRef)(null),o=(0,K.useRef)(null),s=(0,K.useRef)(!1),c=(0,K.useRef)(null),l=(0,K.useRef)(null),u=(0,K.useRef)(null),d=(0,K.useRef)(null),f=(0,K.useRef)(void 0),p=(0,K.useCallback)(e=>{f.current=e},[]),m=(0,K.useMemo)(cK,[]),h=(0,K.useRef)(new Set),[,g]=(0,K.useState)(0),[_,v]=(0,K.useState)(null),y=(0,K.useMemo)(()=>new Map,[]),[b,x]=(0,K.useState)(!1),[S,C]=(0,K.useState)(),[w,T]=(0,K.useState)(!1),[E,D]=(0,K.useState)(!1),[O,k]=(0,K.useState)(()=>window.innerWidth),[A,j]=(0,K.useState)({sidebar:fY,auxiliary:gY}),[M,N]=(0,K.useState)(!1),P=!!e.snapshot,F=e.snapshot?.preferences.sidebarWidth,I=e.snapshot?.preferences.auxiliaryWidth;(0,K.useEffect)(()=>{!P||M||w||j({sidebar:F??fY,auxiliary:I??gY})},[F,I,P,M,w]),(0,K.useEffect)(()=>{if(!M||w)return;let e=window.setTimeout(()=>{n.savePreferences({sidebarWidth:A.sidebar,auxiliaryWidth:A.auxiliary}).catch(()=>void 0)},200);return()=>window.clearTimeout(e)},[n,A,M,w]);let ee=(e,t)=>{N(!0),j(n=>({...n,[e]:t}))},[L,R]=(0,K.useState)(()=>window.matchMedia?.(`(max-width: 760px)`).matches??!1),te=L&&e.mobileSidebarOpen;(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(max-width: 760px)`);if(!e)return;let t=()=>{R(e.matches),e.matches||n.closeMobileSidebar()};return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[n]),(0,K.useEffect)(()=>{let e=()=>k(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let[z,B]=(0,K.useState)(`chat`),[ne,re]=(0,K.useState)(null),[ie,ae]=(0,K.useState)(null),[oe,se]=(0,K.useState)(uY);(0,K.useEffect)(()=>{let e=()=>dY(oe);e(),window.addEventListener(`pagehide`,e);let t=()=>{document.visibilityState===`hidden`&&e()};return document.addEventListener(`visibilitychange`,t),()=>{window.removeEventListener(`pagehide`,e),document.removeEventListener(`visibilitychange`,t),e()}},[oe]);let ce=e.workspaceDraft?void 0:e.snapshot?.selectedSession,le=oe.find(e=>e.sessionId===ce?.id&&e.sessionPath===ce?.path),H=le?.open??!1,ue=le?.reviewTurn,fe=(0,K.useCallback)(e=>{let t=WG.getState().snapshot?.selectedSession;t&&se(n=>n.map(n=>n.sessionId===t.id&&n.sessionPath===t.path?e(n):n))},[]),pe=(0,K.useCallback)(e=>fe(t=>({...t,open:e})),[fe]),he=e=>fe(t=>({...t,reviewTurn:e??void 0})),[ge,_e]=(0,K.useState)(null),[ve,ye]=(0,K.useState)(Mq),be=(0,K.useCallback)((e,t)=>{let n=WG.getState(),r=n.snapshot?.selectedSession;n.workspaceDraft||n.sessionSwitching||!r||!r.id||(s.current||(o.current=document.activeElement instanceof HTMLElement?document.activeElement:null),s.current=!0,u.current=null,pe(!1),ye(n=>({sessionId:r.id,sessionPath:r.path,id:e,kind:t,navigation:(n?.navigation??0)+1})))},[pe]),xe=ve&&!e.workspaceDraft&&!e.sessionSwitching&&ve.sessionId===e.snapshot?.selectedSession?.id&&ve.sessionPath===e.snapshot?.selectedSession?.path;(0,K.useEffect)(()=>{e.snapshot&&!e.sessionSwitching&&ve&&!xe&&ye(null)},[e.snapshot,e.sessionSwitching,ve,xe]),(0,K.useEffect)(()=>Nq(ve),[ve]),(0,K.useEffect)(()=>{if(xe||!s.current)return;s.current=!1;let e=o.current;o.current=null,queueMicrotask(()=>{e?.isConnected&&e.checkVisibility()&&e.focus()})},[xe]);let Se=e.snapshot?.models.find(e=>e.current),Ce=JSON.stringify([Se?.provider,Se?.id]),we=()=>{let t=e.snapshot,n=t?.selectedSession;e.workspaceDraft||!t||!n||e.sessionSwitching||!HD(t,n)||(u.current=null,pe(!1),re({sessionId:n.id,sessionPath:n.path,cwd:n.cwd,model:Se?.label??``,modelKey:Ce}))},Te=ne&&!e.workspaceDraft&&!e.sessionSwitching&&HD(e.snapshot,{id:ne.sessionId,path:ne.sessionPath})&&ne.sessionPath===e.snapshot?.selectedSession?.path&&ne.modelKey===Ce;(0,K.useEffect)(()=>{ne&&!Te&&re(null)},[ne,Te]);let Ee=(0,K.useCallback)(()=>{re(null);let e=c.current;c.current=null,e&&requestAnimationFrame(()=>{e.isConnected&&e.checkVisibility()&&e.focus()})},[]),U=ie&&!e.workspaceDraft&&!e.sessionSwitching&&HD(e.snapshot,{id:ie.sessionId,path:ie.sessionPath})&&ie.sessionPath===e.snapshot?.selectedSession?.path;(0,K.useEffect)(()=>{ie&&!U&&ae(null)},[ie,U]);let De=async(e=`general`)=>{l.current=document.activeElement instanceof HTMLElement?document.activeElement:null;let t=await n.prepareSession();if(!t)return;let r=WG.getState(),i=r.snapshot,a=i?.selectedSession;r.workspaceDraft||!a||r.sessionSwitching||!HD(i,a)||a.id!==t.sessionId||a.path!==t.sessionPath||(n.closeMobileSidebar(),re(null),ye(null),u.current=null,pe(!1),ae({sessionId:a.id,sessionPath:a.path,cwd:a.cwd,entry:e}))},Oe=(0,K.useCallback)(()=>{ae(null);let e=new URL(window.location.href);e.searchParams.delete(`settings`),window.history.replaceState(window.history.state,``,e),requestAnimationFrame(()=>{let e=l.current;l.current=null,e?.isConnected&&e.checkVisibility()?e.focus():document.querySelector(`[data-provider-settings-trigger]`)?.focus()})},[]),ke=()=>{c.current=l.current??document.querySelector(`[data-provider-settings-trigger]`),ae(null),we()},Ae=async e=>{if(await n.sendPrompt(`/openpi-setup ${e}`))return!0;let r=WG.getState();throw Error((typeof r.notice==`string`?r.notice:null)||t(r.promptAdmissionRecovery?`setupResolveAdmission`:r.liveRunning||r.activeTurn?`settingsSetupBusyHint`:`setupRequestFailed`))};(0,K.useEffect)(()=>(n.start(),n.stop),[n]);let G=e.workspaceDraft?void 0:e.snapshot?.selectedSession,Me=lK(G),Ne=G?.id,Pe=G?.path,Fe=!!(G&&!h.current.has(Me)&&m.get(Me)?.position?.key&&m.get(Me)?.position?.pinned===!1);(0,K.useEffect)(()=>{let t=WG.getState(),n=t.workspaceDraft?void 0:t.snapshot?.selectedSession;if(!n||n.id!==Ne||n.path!==Pe||e.sessionSwitching||h.current.has(Me))return;let r=m.get(Me)?.position,i=()=>{h.current.add(Me),g(e=>e+1)};if(!r?.key||r.pinned||m.get(Me)?.window||e.historyNavigation?.sessionId===n.id&&e.historyNavigation.sessionPath===n.path){i();return}let a={sessionId:n.id,sessionPath:n.path,entryId:r.entryId??r.key},o=new AbortController,s,c=e=>{let t=e.target;!(t instanceof Element)||!t.closest(`.conversation, .turn-rail, .jump-to-latest`)||e instanceof KeyboardEvent&&![`ArrowUp`,`ArrowDown`,`PageUp`,`PageDown`,`Home`,`End`,` `].includes(e.key)||(o.abort(),i(),v(e=>e?.sessionId===a.sessionId&&e.sessionPath===a.sessionPath?null:e))};for(let e of[`wheel`,`touchstart`,`pointerdown`,`keydown`])document.addEventListener(e,c,!0);let l=e=>{let t=WG.getState();o.signal.aborted||h.current.has(Me)||t.historyNavigation||t.sessionSwitching||t.workspaceDraft||t.selectedPath!==a.sessionPath||t.snapshot?.selectedSession?.id!==a.sessionId||t.snapshot.selectedSession.path!==a.sessionPath||m.get(Me)?.position!==r||e.id!==a.sessionId||e.path!==a.sessionPath||e.history?.anchorEntryId!==a.entryId||e.history.anchorOnBranch!==!0||!e.entries.some(e=>e.id===a.entryId)||(v({...a,session:e,restorePosition:r,revision:-1}),i())};if(e.connection===`connected`)if(n.entries.some(e=>e.id===a.entryId))l({...n,history:{leafEntryId:n.history?.leafEntryId??null,beforeEntryId:n.history?.beforeEntryId??null,anchorEntryId:a.entryId,anchorOnBranch:!0}});else{let e=t=>{new de().sessionMessageWindow(a,o.signal).then(l,()=>{!o.signal.aborted&&t===0&&(s=window.setTimeout(()=>e(1),500))})};e(0)}return()=>{o.abort(),window.clearTimeout(s);for(let e of[`wheel`,`touchstart`,`pointerdown`,`keydown`])document.removeEventListener(e,c,!0)}},[Ne,Pe,e.connection,e.sessionSwitching,e.historyNavigation,Me,m]);let Ie=HD(e.snapshot,G),Le=(0,K.useMemo)(()=>GD((G?.entries??[]).flatMap(e=>e.message?[e.message]:[])),[G?.entries]),Re=Ie?e.snapshot?.runtime.capabilities??G?.capabilities:G?.capabilities,ze=Re?.subagents,Be=(0,K.useMemo)(()=>KD(ze?.items??[],Le,Re?.workflows?.items,e.connection===`connected`),[ze?.items,Le,Re?.workflows?.items,e.connection]),Ve=e.snapshot?.selectedExecution,He=Ve?.sessionId===G?.id&&Ve?.sessionPath===G?.path?Ve:void 0,Ue=Ie&&(e.liveRunning||!!e.activeTurn||e.snapshot?.runtime.status===`running`)||He?.status===`running`,We=hA(G,e.snapshot?.cursor,{active:H&&ge===`review`,running:Ue,initialSource:le?.reading.review?.scope.startsWith(`workspace:`)?le.reading.review.source:`unstaged`,initialBaseRef:le?.reading.review?.baseRef}),Ge=!!(le&&G&&e.selectedPath===G.path&&le.sessionId===G.id&&le.sessionPath===G.path),Ke=H&&Ge&&le?.tool!==`launcher`&&!e.sessionSwitching;(0,K.useEffect)(()=>{G?.id,G?.path,u.current=null},[G?.id,G?.path]),(0,K.useEffect)(()=>{!le||e.sessionSwitching||se(e=>e.at(-1)===le?e:[...e.filter(e=>e!==le),le])},[le,e.sessionSwitching]);let qe=(t=`launcher`)=>{!G||e.sessionSwitching||(b&&d.current?.close({restoreFocus:!1}),Ke||(u.current=document.activeElement instanceof HTMLElement?document.activeElement:null),re(null),ye(null),se(e=>{let n=e.find(e=>e.sessionId===G.id&&e.sessionPath===G.path),r={sessionId:G.id,sessionPath:G.path,tool:t,requestRevision:(n?.requestRevision??0)+1,open:!0,reading:n?.reading??{},reviewTurn:t===`review`?void 0:n?.reviewTurn};return[...e.filter(e=>e!==n),r].slice(-32)}))},Je=()=>{D(!1),pe(!1);let e=u.current;u.current=null,e&&requestAnimationFrame(()=>{let t=e.isConnected?e:i.current;t?.isConnected&&t.checkVisibility()&&t.focus()})},Ye=!e.sessionSwitching&&!e.workspaceDraft&&HD(e.snapshot,G)?G:void 0;nJ(Ye?.id,Ye?.path,async(e,t)=>{qe(`browser`);let n=Date.now()+5e3;for(;!f.current&&!t.aborted&&Date.now()setTimeout(e,40));return t.aborted?void 0:f.current?.(e)});let Xe=(0,K.useRef)(ZW(new URLSearchParams(location.search).get(`settings`))),Ze=(0,K.useEffectEvent)(e=>{De(e)});(0,K.useEffect)(()=>{if(!Xe.current||!e.snapshot||e.sessionSwitching)return;let t=Xe.current;Xe.current=void 0,Ze(t)},[e.snapshot,e.sessionSwitching]);let Qe=!!(xe||Ke||b);(0,K.useEffect)(()=>{(!Qe||O<=xY)&&D(!1)},[Qe,O]);let $e=Math.max(pY,Math.min(mY,O-bY-(Qe&&!E?A.auxiliary:0))),et=SY(A.sidebar,pY,$e),tt=Math.max(_Y,Math.min(vY,O-(e.sidebarCollapsed?56:et)-bY)),nt=SY(A.auxiliary,_Y,tt),rt={"--sidebar-width":`${et}px`,"--auxiliary-width":`${nt}px`},it=()=>{b?d.current?.close():Ke?Je():xe&&ye(null)},at=!e.snapshot,ot=e.sessionSwitching?e.snapshot?.sessions.find(t=>t.path===e.selectedPath)?.cwd:e.workspaceDraft?e.selectedWorkspace:G?.cwd??e.selectedWorkspace,st=e.snapshot?.workspaces.find(e=>e.path===ot),ct=e.snapshot?.sessions.find(e=>e.path===G?.path&&e.id===G?.id),lt=e.sessionSwitching?e.snapshot?.sessions.find(t=>t.path===e.selectedPath):void 0,ut=e.sessionSwitching&&!e.workspaceDraft?lt?ID(lt,t(`untitledSession`)):t(`switchingSession`):G?ID(ct??{},t(`untitledSession`)):e.selectedWorkspace?t(`newSession`):`OpenPI`,dt=!!G?.rerun||G?.entries.some(e=>e.type===`message`&&e.message||e.type===`compaction`)||!!G?.history?.beforeEntryId||e.liveMessages.length>0,ft=!at&&(!e.sessionSwitching||e.workspaceDraft)&&(!G||!dt&&!(e.snapshot?.selectedExecution?.sessionId===G.id&&e.snapshot.selectedExecution?.sessionPath===G.path&&e.snapshot.selectedExecution.compaction)),pt=(0,K.useCallback)((e,t)=>t?n.sendPrompt(``,[],void 0,{streamingBehavior:`followUp`,retryEntryId:t}):n.sendPrompt(e),[n]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{inert:U?!0:void 0,"aria-hidden":U?!0:void 0,className:`app-shell ${e.sidebarCollapsed?`sidebar-collapsed`:``} ${e.mobileSidebarOpen?`sidebar-open`:``} ${xe?`with-subagent-panel`:``} ${Ke?`with-workbar-panel`:``} ${b?`with-artifact-panel`:``} ${E?`center-collapsed`:``} ${w?`is-resizing`:``} ${at?`shell-loading`:``}`,style:rt,children:(0,q.jsxs)(FD,{ref:d,sessionId:G?.id,sessionPath:G?.path,disabled:!!(e.workspaceDraft||e.sessionSwitching||xe||U),onOpen:()=>{x(!0),ye(null),pe(!1),re(null)},onClose:()=>{x(!1)},children:[(0,q.jsx)(NA,{sessionViewVisible:z===`chat`&&!E&&!U&&!e.sessionSwitching&&!e.workspaceDraft,connected:e.connection===`connected`,snapshot:e.snapshot,selectedPath:e.workspaceDraft?null:e.selectedPath,selectedWorkspace:e.selectedWorkspace,collapsed:e.collapsed,query:e.query,searchOpen:e.searchOpen,mobileOpen:te,settingsDisabled:!!(e.sessionSwitching||e.modelSelectionPending||!e.snapshot),returnFocusRef:r,onOpenSettings:()=>void De(`general`),actions:n}),e.sidebarCollapsed&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`button`,{ref:a,className:`sidebar-expand`,type:`button`,"aria-label":t(`expandSidebar`),onClick:()=>n.toggleSidebar(!1),children:(0,q.jsx)(gc,{})}),(0,q.jsx)(V,{anchorRef:a,content:t(`expandSidebar`),placement:`end`})]}),(0,q.jsxs)(`main`,{inert:te,className:`conversation-shell ${G?`has-view`:``} ${ft&&(!G||z===`chat`)?`landing`:``}`,children:[(0,q.jsxs)(`header`,{className:`task-header`,children:[(0,q.jsx)(V,{content:t(L?`openSidebar`:e.sidebarCollapsed?`expandSidebar`:`collapseSidebar`),placement:`below`,children:(0,q.jsx)(`button`,{className:`task-header-menu sidebar-shell-toggle`,ref:r,type:`button`,"aria-label":t(L?`openSidebar`:e.sidebarCollapsed?`expandSidebar`:`collapseSidebar`),"aria-controls":`session-sidebar`,"aria-expanded":L?te:!e.sidebarCollapsed,onClick:()=>n.toggleSidebar(L),children:L?(0,q.jsx)(sc,{}):(0,q.jsx)(hc,{})})}),(0,q.jsxs)(`div`,{className:`task-identity`,children:[ot&&(0,q.jsxs)(`span`,{className:`task-workspace`,title:ot,children:[st?.name||LD(ot),(0,q.jsxs)(`span`,{className:`sr-only`,children:[` `,ot]})]}),(0,q.jsx)(`h1`,{title:ut,children:ut})]}),(0,q.jsx)(rJ,{usage:G&&!e.sessionSwitching?e.snapshot?.usage:void 0,workspace:st?.name||G&&LD(G.cwd),sessionId:G?.id,model:Ie?Se:void 0},G?`usage:${G.id}:${G.path}`:`usage:no-session`),G&&!e.sessionSwitching&&(0,q.jsx)(oG,{sessionId:G.id,workspace:st?.name||LD(G.cwd),agents:Be,omitted:(ze?.omitted??0)+(Re?.workflows?.items??[]).reduce((e,t)=>e+(t.children?.omitted??0),0),omittedWorkflows:Re?.workflows?.omitted??0,review:We.result,reviewLoading:We.loading,reviewError:We.error,sessionPath:G.path,revision:G.history?.leafEntryId??void 0,onAddSources:Ie?()=>C(e=>({sessionId:G.id,path:G.path,revision:(e?.revision??0)+1})):void 0,onSubagents:()=>be(),onReview:()=>qe(`review`),onSources:()=>qe(`sources`)},`overview:${G.id}:${G.path}`),Ge&&!Ke&&le?.tool!==`launcher`?(0,q.jsx)(V,{content:t(G?`openTools`:`openToolsUnavailable`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,ref:i,className:`task-tools-trigger`,"aria-label":t(`openTools`),disabled:!G||e.sessionSwitching,onClick:e=>{b&&d.current?.close({restoreFocus:!1}),u.current=e.currentTarget,pe(!0)},children:(0,q.jsx)(vc,{"aria-hidden":`true`})})}):(0,q.jsx)(yo,{button:{ref:i,className:`task-tools-trigger`,label:t(`openTools`),"aria-label":t(`openTools`),icon:(0,q.jsx)(vc,{"aria-hidden":`true`}),isIconOnly:!0,isDisabled:!G||e.sessionSwitching,variant:`ghost`,tooltip:t(G?`openTools`:`openToolsUnavailable`)},items:YJ.map(e=>({id:e.kind,icon:(0,q.jsx)(e.icon,{"aria-hidden":`true`}),label:t(e.title),description:t(e.description),onClick:()=>{qe(e.kind),u.current=i.current}})),menuWidth:`min(300px, calc(100vw - 24px))`,alignment:`end`,hasChevron:!1}),(0,q.jsx)(`span`,{className:`connection-state ${e.connection}`,role:`status`,title:t(e.connection),"aria-label":t(e.connection),children:(0,q.jsx)(`span`,{children:t(e.connection)})})]}),G&&!e.sessionSwitching&&(0,q.jsx)(`div`,{className:`conversation-view-row`,children:(0,q.jsxs)(`fieldset`,{className:`conversation-view-switch`,"data-view":z,"aria-label":t(`conversationView`),children:[(0,q.jsx)(`button`,{type:`button`,"aria-pressed":z===`chat`,onClick:()=>B(`chat`),children:t(`chatView`)}),(0,q.jsx)(`button`,{type:`button`,"aria-pressed":z===`trajectory`,onClick:()=>B(`trajectory`),children:t(`trajectory`)})]})}),at?(0,q.jsxs)(`section`,{className:`shell-state`,role:`status`,"aria-live":`polite`,children:[(0,q.jsx)(iu,{compact:!0}),(0,q.jsx)(`p`,{children:t(e.connection===`unavailable`?`unavailable`:`connecting`)}),e.connection===`unavailable`&&(0,q.jsxs)(`button`,{type:`button`,onClick:()=>void n.refreshSnapshot({resetCursor:!0}),children:[(0,q.jsx)(me,{"aria-hidden":`true`}),` `,t(`retryAdmissionCheck`)]})]}):e.sessionSwitching&&!ft?(0,q.jsx)(`div`,{className:`conversation switching`,role:`status`,children:(0,q.jsxs)(`div`,{className:`conversation-running`,children:[(0,q.jsx)(`span`,{className:`conversation-running-dot`}),(0,q.jsx)(`span`,{children:t(`switchingSession`)})]})}):z===`trajectory`&&G&&e.snapshot?(0,q.jsx)(Qq,{snapshot:e.snapshot,running:Ue},G.path):ft?(0,q.jsx)(`section`,{className:`conversation landing-conversation`,"aria-label":`Conversation`,children:(0,q.jsxs)(`div`,{className:`landing-welcome`,children:[(0,q.jsx)(`h1`,{className:`sr-only`,children:ut}),(0,q.jsx)(iu,{animated:!0}),e.sessionSwitching&&(0,q.jsx)(`span`,{className:`sr-only`,role:`status`,children:t(`switchingSession`)})]})}):e.snapshot?(0,q.jsx)(Dq,{resultExposureEnabled:!E&&!U&&!e.sessionSwitching&&!e.workspaceDraft&&z===`chat`,readingCache:m,readingRestorePending:Fe,snapshot:e.snapshot,liveMessages:e.liveMessages,liveRunning:e.liveRunning,liveActiveTurn:e.activeTurn,livePhase:e.livePhase,activityObserved:e.connection===`connected`,liveRetry:e.liveRetry,thinkingStarts:e.thinkingStarts,thinkingDurations:e.thinkingDurations,scrollToBottom:e.scrollToBottom,onResend:pt,onEdit:n.editMessage,onRegenerate:n.regenerateMessage,onOpenOriginal:n.navigateToMessage,onFork:n.forkMessage,forkPending:e.sessionForkPending,forkAvailable:Ie&&!Ue&&e.snapshot.runtime.status===`idle`&&!e.promptAdmissionPending&&!e.promptAdmissionRecovery&&!e.activeTurn&&!e.modelSelectionPending&&!e.sessionSwitching&&!G?.path.startsWith(`current:`)&&!(He?.pendingFollowUps||He?.pendingSteering||He?.compaction?.state===`running`),onInspectSubagent:be,onReviewTurn:(e,t)=>{qe(`review`),u.current=document.activeElement instanceof HTMLElement?document.activeElement:null,he({promptEntryId:e,filePath:t,revision:(ue?.revision??0)+1})},onHistoryAnchorChange:n.setHistoryAnchor,historyNavigation:e.historyNavigation??(_?.sessionId===G?.id&&_?.sessionPath===G?.path?_:null),onNavigateToMessage:n.navigateToMessage,onRefreshHistory:n.refreshSnapshot,onPromptProjection:n.rememberPromptProjection},`transcript:${JSON.stringify([G?.id,G?.path])}`):null,!U&&G&&e.snapshot&&!e.sessionSwitching&&HD(e.snapshot,G)&&(0,q.jsx)(mA,{sessionId:G.id,sessionPath:G.path,workingCache:y,revision:e.snapshot.cursor,connected:e.connection===`connected`},JSON.stringify([G.id,G.path])),e.snapshot&&(0,q.jsxs)(`div`,{className:`workbar-chat-context`,hidden:!Ke,children:[(0,q.jsx)(`span`,{className:`workbar-chat-title`,title:ut,children:ut}),(0,q.jsx)(`span`,{className:`workbar-chat-status`,role:`status`,children:t(Ue?`turnState_running`:e.connection)}),(0,q.jsx)(`button`,{type:`button`,onClick:()=>{Je(),requestAnimationFrame(()=>document.querySelector(`.composer textarea`)?.focus({preventScroll:!0}))},children:t(`workbarContinueInChat`)})]}),e.snapshot&&(0,q.jsx)(oA,{addSourcesRequest:S,planSelectionPending:e.planSelectionPending,workspaceDraft:e.workspaceDraft,draftModel:e.draftModel,createdSession:e.createdSession,modelSelectionPending:e.modelSelectionPending,modelSearch:e.modelSearch,thinkingPendingLevel:e.thinkingPendingLevel,onInspect:we,onOpenProviders:()=>void De(`credentials`),onCommandAction:e=>{let t=WG.getState();return t.sessionSwitching||t.workspaceDraft||!G||t.snapshot?.selectedSession?.path!==G.path||t.snapshot.selectedSession.id!==G.id?!1:(e===`terminal`||e===`review`||e===`side-conversation`?qe(e):e===`subagents`?be():we(),!0)},onInspectSubagent:be,activeTurn:e.activeTurn,activityObserved:e.connection===`connected`,turnCancellationPending:e.turnCancellationPending,turnTerminalStatus:e.turnTerminalStatus,pendingFollowUpsReceipt:e.pendingFollowUpsReceipt,pendingSteeringReceipt:e.pendingSteeringReceipt,commandDiscovery:e.commandDiscovery,snapshot:e.snapshot,selectedPath:e.selectedPath,selectedWorkspace:G?.cwd??e.selectedWorkspace,sessionSwitching:e.sessionSwitching||e.sessionForkPending,promptAdmissionPending:e.promptAdmissionPending,promptAdmissionRecovery:e.promptAdmissionRecovery,promptAdmissionResolution:e.promptAdmissionResolution,restoredPromptDraft:e.restoredPromptDraft,liveRunning:e.liveRunning,landing:ft,actions:n}),e.sessionForkPending&&(0,q.jsxs)(`div`,{className:`session-fork-progress`,role:`status`,children:[(0,q.jsx)(`span`,{className:`session-fork-progress-spinner`,"aria-hidden":`true`}),t(e.sessionForkCancellation===`too-late`?`sidebarForkFinishing`:e.sessionForkCancellation?`sidebarForkCancelling`:e.sessionForkEnvironment===`worktree`?`sidebarForkWorktreePending`:`forkSessionPending`),e.sessionForkEnvironment&&(0,q.jsx)(`button`,{type:`button`,disabled:e.sessionForkCancellation!==null,onClick:()=>void n.cancelSessionFork(),children:t(`cancel`)})]}),(0,q.jsx)(_A,{notices:e.archiveNotices,actions:n}),e.notice&&(0,q.jsxs)(`div`,{className:typeof e.notice==`string`?`notice`:`notice notice-success`,role:typeof e.notice==`string`?`alert`:`status`,children:[(0,q.jsx)(`span`,{children:typeof e.notice==`string`?e.notice:e.notice.message}),(0,q.jsx)(V,{content:t(`close`),placement:`below`,children:(0,q.jsx)(`button`,{type:`button`,"aria-label":t(`close`),onClick:n.clearNotice,children:(0,q.jsx)(je,{})})})]})]}),Te&&(0,q.jsx)(sA,{target:ne,onClose:Ee,onOpenProviders:()=>void De(`credentials`)},`${ne.sessionId}:${ne.sessionPath}`),xe&&(0,q.jsx)(Aq,{sessionId:ve.sessionId,sessionPath:ve.sessionPath,initialId:ve.id,initialKind:ve.kind,observed:e.connection===`connected`,activity:ze,records:Le,workflows:Re?.workflows,liveAvailable:G?.id===ve.sessionId&&G.path===ve.sessionPath,onClose:()=>ye(null)},`${ve.sessionId}:${ve.navigation}`),Ke&&G&&le&&(0,q.jsx)($J,{visible:Ke,requestedTool:le.tool,requestRevision:le.requestRevision,sessionId:G.id,sessionPath:G.path,onBrowserReady:p,canControl:!e.sessionSwitching&&HD(e.snapshot,G),onActivateSession:()=>void n.selectSession(G.path),cwd:G.cwd,snapshot:e.snapshot??void 0,capabilities:HD(e.snapshot,G)?e.snapshot?.runtime.capabilities??{}:{},readingState:le.reading,onActiveToolChange:_e,review:We,reviewTurn:ue??void 0,onWorkspaceReview:()=>he(null),onReferenceLine:e=>{let t=WG.getState(),n=t.snapshot?.selectedSession;t.workspaceDraft||t.sessionSwitching||t.selectedPath!==G.path||n?.id!==G.id||n.path!==G.path||!HD(t.snapshot,n)||(B(`chat`),C(t=>({sessionId:G.id,path:G.path,revision:(t?.revision??0)+1,feedback:e})))},conversationCollapsed:E,onRestoreConversation:()=>D(!1),onExpandReview:()=>D(!0),onClose:Je},`${G.id}:${G.path}`),(0,q.jsxs)(`section`,{"aria-label":t(`resizePanes`),style:{display:`contents`},children:[!e.sidebarCollapsed&&!L&&(!Qe||O>xY)&&(0,q.jsx)(ou,{side:`left`,value:et,min:pY,max:$e,defaultValue:fY,collapseThreshold:hY,onCollapse:()=>n.toggleSidebar(!1),onChange:e=>ee(`sidebar`,e),onDraggingChange:T}),Qe&&!E&&O>xY&&(0,q.jsx)(ou,{side:`right`,value:nt,min:_Y,max:tt,defaultValue:gY,collapseThreshold:yY,onCollapse:it,onExpandPastMax:Ke?()=>D(!0):void 0,onChange:e=>ee(`auxiliary`,e),onDraggingChange:T})]}),(0,q.jsx)(`button`,{className:`sidebar-scrim`,type:`button`,tabIndex:-1,"aria-hidden":`true`,"aria-label":t(`close`),onClick:n.closeMobileSidebar})]})}),U&&(0,q.jsx)(QW,{sessionId:ie.sessionId,cwd:ie.cwd,entry:ie.entry,models:e.snapshot?.models??[],currentModel:Se,thinkingLevel:e.thinkingPendingLevel??e.snapshot?.thinking?.level??t(`unknownState`),theme:e.snapshot?.preferences.theme??`system`,preferences:e.snapshot?.preferences,workspaces:e.snapshot?.workspaces??[],onRestoreSession:e=>n.unarchiveSession(e),plan:e.snapshot?.runtime.plan,planSelectionPending:e.planSelectionPending,onExitPlan:()=>n.selectPlanMode(!1),setupOutcome:e.snapshot?.runtime.setup,capabilities:e.snapshot?.runtime.capabilities,setupBusy:e.liveRunning||e.promptAdmissionPending||!!e.activeTurn||e.modelSelectionPending||e.thinkingPendingLevel!==null||e.sessionSwitching,setupBlockedReason:e.promptAdmissionRecovery?t(`setupResolveAdmission`):void 0,modelSelectionPending:e.modelSelectionPending,sessionPath:ie.sessionPath,onSelectModel:e=>n.selectModel(e),onConfigureOpenPi:Ae,interaction:e.snapshot&&!e.sessionSwitching&&ie.sessionId===e.snapshot.currentSessionId?(0,q.jsxs)(`div`,{className:`settings-interaction`,children:[(0,q.jsx)(mA,{sessionId:ie.sessionId,sessionPath:ie.sessionPath,workingCache:y,revision:e.snapshot.cursor,connected:e.connection===`connected`},JSON.stringify([ie.sessionId,ie.sessionPath])),(e.activeTurn||e.liveRunning)&&(0,q.jsx)(`button`,{type:`button`,disabled:e.turnCancellationPending,onClick:()=>void n.cancelActiveTurn(),children:t(`stopTurn`)})]}):void 0,onPreferencesChanged:()=>n.refreshSnapshot(),onOpenRuntimeStatus:ke,onClose:Oe},`${ie.sessionId}:${ie.sessionPath}`)]})}var wY={size:`1em`,"aria-hidden":!0},TY={name:`neutral`,__built:!0,tokens:{"--font-size-4xs":`0.375rem`,"--font-size-3xs":`0.4375rem`,"--font-size-2xs":`0.5rem`,"--font-size-xs":`0.625rem`,"--font-size-sm":`0.75rem`,"--font-size-base":`0.875rem`,"--font-size-lg":`1.0625rem`,"--font-size-xl":`1.25rem`,"--font-size-2xl":`1.5rem`,"--font-size-3xl":`1.8125rem`,"--font-size-4xl":`2.1875rem`,"--font-size-5xl":`2.625rem`,"--text-heading-1-size":`var(--font-size-2xl)`,"--text-heading-1-weight":`var(--font-weight-semibold)`,"--text-heading-1-leading":`1.3333`,"--text-heading-2-size":`var(--font-size-xl)`,"--text-heading-2-weight":`var(--font-weight-semibold)`,"--text-heading-2-leading":`1.4`,"--text-heading-3-size":`var(--font-size-lg)`,"--text-heading-3-weight":`var(--font-weight-bold)`,"--text-heading-3-leading":`1.4118`,"--text-heading-4-size":`var(--font-size-base)`,"--text-heading-4-weight":`var(--font-weight-bold)`,"--text-heading-4-leading":`1.4286`,"--text-heading-5-size":`var(--font-size-sm)`,"--text-heading-5-weight":`var(--font-weight-semibold)`,"--text-heading-5-leading":`1.6667`,"--text-heading-6-size":`var(--font-size-xs)`,"--text-heading-6-weight":`var(--font-weight-semibold)`,"--text-heading-6-leading":`1.6`,"--text-body-size":`var(--font-size-base)`,"--text-body-weight":`var(--font-weight-normal)`,"--text-body-leading":`1.4286`,"--text-large-size":`var(--font-size-lg)`,"--text-large-weight":`var(--font-weight-semibold)`,"--text-large-leading":`1.4118`,"--text-label-size":`var(--font-size-base)`,"--text-label-weight":`var(--font-weight-medium)`,"--text-label-leading":`1.4286`,"--text-code-size":`var(--font-size-base)`,"--text-code-weight":`var(--font-weight-normal)`,"--text-code-leading":`1.4286`,"--text-supporting-size":`var(--font-size-sm)`,"--text-supporting-weight":`var(--font-weight-normal)`,"--text-supporting-leading":`1.6667`,"--text-display-1-size":`var(--font-size-5xl)`,"--text-display-1-weight":`var(--font-weight-normal)`,"--text-display-1-leading":`1.2381`,"--text-display-2-size":`var(--font-size-4xl)`,"--text-display-2-weight":`var(--font-weight-normal)`,"--text-display-2-leading":`1.2571`,"--text-display-3-size":`var(--font-size-3xl)`,"--text-display-3-weight":`var(--font-weight-normal)`,"--text-display-3-leading":`1.3793`,"--duration-fast-min":`95ms`,"--duration-fast":`125ms`,"--duration-fast-max":`165ms`,"--duration-medium-min":`225ms`,"--duration-medium":`300ms`,"--duration-medium-max":`400ms`,"--duration-slow-min":`525ms`,"--duration-slow":`700ms`,"--duration-slow-max":`935ms`,"--font-family-body":`Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,"--font-family-heading":`Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,"--font-family-code":`ui-monospace, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,"--color-syntax-keyword":`light-dark(#700084, #efa8ff)`,"--color-syntax-string":`light-dark(#005600, #a6d2a2)`,"--color-syntax-comment":`light-dark(#737373, #a3a3a3)`,"--color-syntax-number":`light-dark(#6e3500, #ffb37f)`,"--color-syntax-function":`light-dark(#00458c, #a0caff)`,"--color-syntax-type":`light-dark(#700084, #efa8ff)`,"--color-syntax-variable":`light-dark(#171717, #e5e5e5)`,"--color-syntax-operator":`light-dark(#737373, #a3a3a3)`,"--color-syntax-constant":`light-dark(#6e3500, #ffb37f)`,"--color-syntax-tag":`light-dark(#89001a, #ffaeaa)`,"--color-syntax-attribute":`light-dark(#584400, #eec12f)`,"--color-syntax-property":`light-dark(#005348, #83dac9)`,"--color-syntax-punctuation":`light-dark(#6e6e6e, #a0a0a0)`,"--color-syntax-background":`light-dark(#fafafa, #0a0a0a)`,"--color-background-surface":`light-dark(#ffffff, #262626)`,"--color-background-body":`light-dark(#f1f1f1, #1b1b1b)`,"--color-background-card":`light-dark(#ffffff, #1b1b1b)`,"--color-background-popover":`light-dark(#ffffff, #1b1b1b)`,"--color-background-muted":`light-dark(#f1f1f1, #1b1b1b)`,"--color-accent":`light-dark(#262626, #ebebeb)`,"--color-accent-muted":`light-dark(#f1f1f1, #262626)`,"--color-neutral":`light-dark(#0000000F, #FFFFFF1A)`,"--color-overlay":`light-dark(#00000080, #000000CC)`,"--color-overlay-hover":`light-dark(#0000000D, #FFFFFF0D)`,"--color-overlay-pressed":`light-dark(#0000001A, #FFFFFF1A)`,"--color-text-primary":`light-dark(#171717, #fafafa)`,"--color-text-secondary":`light-dark(#525252, #a3a3a3)`,"--color-text-disabled":`light-dark(#a3a3a3, #525252)`,"--color-text-accent":`light-dark(#262626, #ebebeb)`,"--color-on-dark":`#ffffff`,"--color-on-light":`#171717`,"--color-on-accent":`light-dark(#ffffff, #171717)`,"--color-on-success":`light-dark(#ffffff, #171717)`,"--color-on-error":`light-dark(#ffffff, #171717)`,"--color-on-warning":`#171717`,"--color-icon-accent":`light-dark(#262626, #ebebeb)`,"--color-icon-primary":`light-dark(#171717, #fafafa)`,"--color-icon-secondary":`light-dark(#737373, #a3a3a3)`,"--color-icon-disabled":`light-dark(#a3a3a3, #525252)`,"--color-success":`light-dark(#007004, #9fe59b)`,"--color-error":`light-dark(#a50c25, #ffc6c1)`,"--color-warning":`light-dark(#745b00, #fdcf4f)`,"--color-success-muted":`light-dark(#c5e5c0, #84c9803D)`,"--color-error-muted":`light-dark(#facecb, #ff9e973D)`,"--color-warning-muted":`light-dark(#f8da9d, #deb4333D)`,"--color-border":`light-dark(#00000014, #FFFFFF1A)`,"--color-border-emphasized":`light-dark(#d4d4d4, #525252)`,"--color-skeleton":`light-dark(#ebebeb, #525252)`,"--color-shadow":`light-dark(#0000001A, #0000004D)`,"--color-tint-hover":`light-dark(black, white)`,"--color-background-red":`light-dark(#facecb, #ff9e973D)`,"--color-border-red":`light-dark(#e6bab8, #ff6f6c)`,"--color-icon-red":`light-dark(#89001a, #ff9e97)`,"--color-text-red":`light-dark(#89001a, #ffc6c1)`,"--color-background-orange":`light-dark(#fad0b5, #ffa2583D)`,"--color-border-orange":`light-dark(#e6bda2, #e2883e)`,"--color-icon-orange":`light-dark(#6e3500, #ffa258)`,"--color-text-orange":`light-dark(#6e3500, #ffc9a2)`,"--color-background-yellow":`light-dark(#f8da9d, #deb4333D)`,"--color-border-yellow":`light-dark(#e4c279, #c0990e)`,"--color-icon-yellow":`light-dark(#584400, #deb433)`,"--color-text-yellow":`light-dark(#584400, #fdcf4f)`,"--color-background-green":`light-dark(#c5e5c0, #84c9803D)`,"--color-border-green":`light-dark(#b2d1ac, #69ad67)`,"--color-icon-green":`light-dark(#0c5700, #84c980)`,"--color-text-green":`light-dark(#0c5700, #9fe59b)`,"--color-background-teal":`light-dark(#a5e3d6, #7ec6b83D)`,"--color-border-teal":`light-dark(#94d6c8, #63ab9d)`,"--color-icon-teal":`light-dark(#005348, #7ec6b8)`,"--color-text-teal":`light-dark(#005348, #99e2d3)`,"--color-background-cyan":`light-dark(#a3e0ef, #83c2d43D)`,"--color-border-cyan":`light-dark(#91d3e3, #67a7b8)`,"--color-icon-cyan":`light-dark(#00505f, #83c2d4)`,"--color-text-cyan":`light-dark(#00505f, #9edef0)`,"--color-background-blue":`light-dark(#c4ddfb, #9eb7ff3D)`,"--color-border-blue":`light-dark(#b1c9e7, #6d9cfe)`,"--color-icon-blue":`light-dark(#00458c, #9eb7ff)`,"--color-text-blue":`light-dark(#00458c, #c7d3ff)`,"--color-background-purple":`light-dark(#eccef3, #f297ff3D)`,"--color-border-purple":`light-dark(#d8bbdf, #dd74f0)`,"--color-icon-purple":`light-dark(#700084, #f297ff)`,"--color-text-purple":`light-dark(#700084, #fac1ff)`,"--color-background-pink":`light-dark(#fccadc, #ff99c33D)`,"--color-border-pink":`light-dark(#e7b7c8, #f273aa)`,"--color-icon-pink":`light-dark(#83004b, #ff99c3)`,"--color-text-pink":`light-dark(#83004b, #ffc3da)`,"--color-background-gray":`light-dark(#e5e5e5, var(--color-neutral))`,"--color-border-gray":`light-dark(#d4d4d4, #262626)`,"--color-icon-gray":`light-dark(#525252, #a3a3a3)`,"--color-text-gray":`light-dark(#262626, #e5e5e5)`,"--radius-none":`0px`,"--radius-inner":`0.375rem`,"--radius-element":`0.625rem`,"--radius-container":`0.75rem`,"--radius-page":`1.75rem`,"--radius-full":`9999px`,"--shadow-low":`0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 25%)), 0 4px 8px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 40%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 8%))`,"--shadow-med":`0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 35%)), 0 4px 12px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 12%))`,"--shadow-high":`0 4px 6px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), 0 12px 24px light-dark(oklch(0 0 0 / 15%), oklch(0 0 0 / 70%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 15%))`,"--shadow-inset-hover":`inset 0px 0px 0px 2px #0074e24D`,"--shadow-inset-selected":`inset 0px 0px 0px 2px #0074e280`,"--shadow-inset-success":`inset 0px 0px 0px 2px #1981004D`,"--shadow-inset-warning":`inset 0px 0px 0px 2px #ffce2f4D`,"--shadow-inset-error":`inset 0px 0px 0px 2px #e33f4a4D`},components:{heading:{"level:1":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-1-size)`,fontWeight:`var(--text-heading-1-weight)`,lineHeight:`var(--text-heading-1-leading)`},"level:2":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-2-size)`,fontWeight:`var(--text-heading-2-weight)`,lineHeight:`var(--text-heading-2-leading)`},"level:3":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-3-size)`,fontWeight:`var(--text-heading-3-weight)`,lineHeight:`var(--text-heading-3-leading)`},"level:4":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-4-size)`,fontWeight:`var(--text-heading-4-weight)`,lineHeight:`var(--text-heading-4-leading)`},"level:5":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-5-size)`,fontWeight:`var(--text-heading-5-weight)`,lineHeight:`var(--text-heading-5-leading)`},"level:6":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-heading-6-size)`,fontWeight:`var(--text-heading-6-weight)`,lineHeight:`var(--text-heading-6-leading)`},"type:display-1":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-1-size)`,lineHeight:`var(--text-display-1-leading)`},"type:display-2":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-2-size)`,lineHeight:`var(--text-display-2-leading)`},"type:display-3":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-3-size)`,lineHeight:`var(--text-display-3-leading)`}},text:{"type:body":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-body-size)`,lineHeight:`var(--text-body-leading)`},"type:large":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-large-size)`,lineHeight:`var(--text-large-leading)`},"type:label":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-label-size)`,lineHeight:`var(--text-label-leading)`},"type:code":{fontFamily:`var(--font-family-code)`,fontSize:`var(--text-code-size)`,lineHeight:`var(--text-code-leading)`},"type:supporting":{fontFamily:`var(--font-family-body)`,fontSize:`var(--text-supporting-size)`,lineHeight:`var(--text-supporting-leading)`},"type:display-1":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-1-size)`,lineHeight:`var(--text-display-1-leading)`},"type:display-2":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-2-size)`,lineHeight:`var(--text-display-2-leading)`},"type:display-3":{fontFamily:`var(--font-family-heading)`,fontSize:`var(--text-display-3-size)`,lineHeight:`var(--text-display-3-leading)`}},button:{"variant:destructive":{backgroundColor:`var(--color-error-muted)`,color:`var(--color-error)`}},badge:{"variant:info":{backgroundColor:`light-dark(#0074e2, #6d9cfe)`,color:`light-dark(#ffffff, #171717)`},"variant:neutral":{backgroundColor:`var(--color-background-gray)`,color:`var(--color-text-gray)`},"variant:success":{backgroundColor:`light-dark(#198100, #64af4c)`,color:`light-dark(#ffffff, #171717)`},"variant:warning":{backgroundColor:`#ffce2f`,color:`#171717`},"variant:error":{backgroundColor:`light-dark(#c9303a, #ff705d)`,color:`light-dark(#ffffff, #171717)`},"variant:red":{backgroundColor:`var(--color-background-red)`,color:`var(--color-text-red)`},"variant:orange":{backgroundColor:`var(--color-background-orange)`,color:`var(--color-text-orange)`},"variant:yellow":{backgroundColor:`var(--color-background-yellow)`,color:`var(--color-text-yellow)`},"variant:green":{backgroundColor:`var(--color-background-green)`,color:`var(--color-text-green)`},"variant:teal":{backgroundColor:`var(--color-background-teal)`,color:`var(--color-text-teal)`},"variant:cyan":{backgroundColor:`var(--color-background-cyan)`,color:`var(--color-text-cyan)`},"variant:blue":{backgroundColor:`var(--color-background-blue)`,color:`var(--color-text-blue)`},"variant:purple":{backgroundColor:`var(--color-background-purple)`,color:`var(--color-text-purple)`},"variant:pink":{backgroundColor:`var(--color-background-pink)`,color:`var(--color-text-pink)`},"variant:gray":{backgroundColor:`var(--color-background-gray)`,color:`var(--color-text-gray)`}},statusdot:{"variant:success":{backgroundColor:`light-dark(#198100, #64af4c)`},"variant:warning":{backgroundColor:`#ffce2f`},"variant:error":{backgroundColor:`light-dark(#c9303a, #ff705d)`},"variant:accent":{backgroundColor:`light-dark(#0074e2, #6d9cfe)`}},banner:{"status:info":{"--color-accent-muted":`var(--color-background-blue)`,"--color-text-primary":`var(--color-text-blue)`,"--color-text-secondary":`var(--color-text-blue)`,"--color-accent":`var(--color-text-blue)`},"status:success":{"--color-text-primary":`var(--color-text-green)`,"--color-text-secondary":`var(--color-text-green)`,"--color-success":`var(--color-text-green)`},"status:warning":{"--color-text-primary":`var(--color-text-yellow)`,"--color-text-secondary":`var(--color-text-yellow)`,"--color-warning":`var(--color-text-yellow)`},"status:error":{"--color-text-primary":`var(--color-text-red)`,"--color-text-secondary":`var(--color-text-red)`,"--color-error":`var(--color-text-red)`}},switch:{base:{"--color-background-gray":`var(--color-border-emphasized)`}},progressbar:{base:{"--color-background-muted":`var(--color-border-emphasized)`},"variant:accent":{"--color-accent":`#0074e2`},"variant:success":{"--color-success":`#198100`},"variant:warning":{"--color-warning":`#ffce2f`},"variant:error":{"--color-error":`#c9303a`}},card:{base:{padding:`var(--spacing-3)`}},section:{base:{padding:`var(--spacing-3)`}}},__onDark:{tokens:{"color-scheme":`dark`,"--color-text-primary":`var(--color-on-dark)`,"--color-icon-primary":`var(--color-on-dark)`,"--color-accent":`var(--color-on-dark)`}},__onLight:{tokens:{"color-scheme":`light`,"--color-text-primary":`var(--color-on-light)`,"--color-icon-primary":`var(--color-on-light)`,"--color-accent":`var(--color-on-light)`}},icons:{close:(0,q.jsx)(je,{...wY}),chevronDown:(0,q.jsx)(is,{...wY}),chevronLeft:(0,q.jsx)(as,{...wY}),chevronRight:(0,q.jsx)(os,{...wY}),chevronsLeft:(0,q.jsx)(ss,{...wY}),chevronsRight:(0,q.jsx)(cs,{...wY}),check:(0,q.jsx)(rs,{...wY}),success:(0,q.jsx)(us,{...wY}),error:(0,q.jsx)(ms,{...wY}),warning:(0,q.jsx)(Wc,{...wY}),info:(0,q.jsx)(Js,{...wY}),calendar:(0,q.jsx)(ts,{...wY}),clock:(0,q.jsx)(ys,{...wY}),externalLink:(0,q.jsx)(Os,{...wY}),menu:(0,q.jsx)(sc,{...wY}),moreHorizontal:(0,q.jsx)(Ds,{...wY}),search:(0,q.jsx)(Dc,{...wY}),arrowUp:(0,q.jsx)(Xo,{...wY}),arrowDown:(0,q.jsx)(ue,{...wY}),arrowsUpDown:(0,q.jsx)(Jo,{...wY}),funnel:(0,q.jsx)(Hs,{...wY}),eyeSlash:(0,q.jsx)(ks,{...wY}),viewColumns:(0,q.jsx)(xs,{...wY}),copy:(0,q.jsx)(Ss,{...wY}),checkDouble:(0,q.jsx)(ns,{...wY}),wrench:(0,q.jsx)(Xc,{...wY}),stop:(0,q.jsx)(Rc,{...wY}),microphone:(0,q.jsx)(dc,{...wY})}};function EY({children:e}){let t=nu(WG,e=>e.snapshot?.preferences),n=t?.theme??`system`,r=t?.appearance??BW,i=HW(n,r),a=t?.chatWidth??820,o=t?.chatFontSize??14,[s,c]=(0,K.useState)(()=>window.matchMedia?.(`(prefers-color-scheme: dark)`).matches??!1);(0,K.useEffect)(()=>{let e=window.matchMedia?.(`(prefers-color-scheme: dark)`);if(!e)return;let t=()=>c(e.matches);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let l=n===`system`?s?`dark`:`light`:n,u=l===`dark`||l===`pine`?`dark`:`light`;return(0,K.useEffect)(()=>{let e=document.documentElement;e.dataset.theme=l,e.dataset.palette=i,e.style.setProperty(`--conversation-content-width`,`${a}px`),e.style.setProperty(`--conversation-font-size`,`${o}px`);let t={};if(r.background&&(t[`--page`]=r.background),r.foreground&&(t[`--text`]=r.foreground),r.background||r.foreground)for(let[e,n]of Object.entries({sidebar:3,"sidebar-hover":7,"sidebar-active":10,border:12,"border-strong":22,muted:65,subtle:52,"settings-secondary-text":75}))t[`--${e}`]=`color-mix(in srgb, var(--text) ${n}%, var(--page))`;r.accent&&(t[`--accent`]=r.accent,t[`--focus`]=r.accent),e.style.setProperty(`--openpi-interface-font`,{codex:`var(--openpi-default-font)`,system:`var(--openpi-default-font)`,sans:`Arial, Helvetica, sans-serif`,serif:`Georgia, 'Times New Roman', serif`,mono:`ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`}[r.font]);for(let n of[`page`,`text`,`sidebar`,`sidebar-hover`,`sidebar-active`,`border`,`border-strong`,`muted`,`subtle`,`settings-secondary-text`,`accent`,`focus`]){let r=t[`--${n}`];r?e.style.setProperty(`--${n}`,r):e.style.removeProperty(`--${n}`)}},[r,o,a,i,l]),(0,q.jsx)(Ql,{i18n:Xl,children:(0,q.jsx)(Tu,{theme:TY,mode:u,children:e})})}var DY=document.getElementById(`root`);if(!DY)throw Error(`OpenPI Web root is missing`);(0,el.createRoot)(DY).render((0,q.jsx)(K.StrictMode,{children:(0,q.jsx)(EY,{children:(0,q.jsx)(CY,{})})})); \ No newline at end of file diff --git a/web/dist/build-info.json b/web/dist/build-info.json index b6cb9f76..55ac7007 100644 --- a/web/dist/build-info.json +++ b/web/dist/build-info.json @@ -1,5 +1,5 @@ { "version": "1.1.0", - "id": "ca6c5cf98bde186a0e1dcc7f6e173729cd0d6361cce5ef6c9c56b2c4cec4261a", + "id": "55f1dad34a744f33e0bc00f0e88a1b082c0b642f2bbe360dcde22ef9071c7826", "mode": "production" } diff --git a/web/protocol/evidence.ts b/web/protocol/evidence.ts index 689c17a1..545ecc68 100644 --- a/web/protocol/evidence.ts +++ b/web/protocol/evidence.ts @@ -1,7 +1,9 @@ import type { WebLiveMessage, WebMessagePart } from "./types.ts"; +import { sanitizeTerminalText } from "../../extensions/shared/terminal-text.ts"; export const EVIDENCE_MAX_BYTES = 12 * 1024; export const EVIDENCE_MAX_LINES = 300; +const EVIDENCE_PATH_MAX_BYTES = 4096; export const LIVE_TOOL_LIMIT = 32; export function evidenceRecord(value: unknown): Record { @@ -10,11 +12,29 @@ export function evidenceRecord(value: unknown): Record { : {}; } -export function projectEvidenceArguments(input: unknown) { +export function projectEvidenceArguments(input: unknown, projected = false) { const source = evidenceRecord(input); const result: Record = {}; - for (const key of ["path", "command", "offset", "limit", "id"]) { - const value = Object.getOwnPropertyDescriptor(source, key)?.value; + const own = (key: string) => Object.getOwnPropertyDescriptor(source, key)?.value; + let unavailable = projected && typeof own("pathUnavailable") === "string"; + for (const key of projected ? ["path", "resolvedPath"] : ["path"]) { + const value = own(key); + const displayKey = key === "path" ? "displayPath" : "displayResolvedPath"; + const display = typeof value === "string" ? value : projected ? own(displayKey) : undefined; + if (typeof display === "string") result[displayKey] = evidenceText(display).text; + if (typeof value !== "string") continue; + // Cheap rejection bounds the temporary UTF-8 buffer. Identity is admitted + // whole or omitted; display sanitization must never rewrite a file target. + if (value.length > EVIDENCE_PATH_MAX_BYTES || new TextEncoder().encode(value).length > EVIDENCE_PATH_MAX_BYTES) unavailable = true; + else result[key] = value; + } + if (unavailable) { + delete result.path; + delete result.resolvedPath; + result.pathUnavailable = "File reference exceeds the evidence byte limit."; + } + for (const key of ["command", "offset", "limit", "id"]) { + const value = own(key); if (typeof value === "string") result[key] = evidenceText(value).text; else if (typeof value === "number" && Number.isSafeInteger(value)) result[key] = value; } @@ -25,10 +45,7 @@ export function projectEvidenceArguments(input: unknown) { export function evidenceText(value: string, tail = false) { // Bound work before stripping terminal controls, including OSC hyperlinks. const candidate = tail ? value.slice(-EVIDENCE_MAX_BYTES * 2) : value.slice(0, EVIDENCE_MAX_BYTES * 2); - const clean = candidate - .replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\|$)/gu, "") - .replace(/(?:\x1b\[|\x9b)[0-?]*[ -/]*[@-~]/gu, "") - .replace(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u202a-\u202e\u2066-\u2069]/gu, ""); + const clean = sanitizeTerminalText(candidate); const lines = clean.split("\n"); const limited = (tail ? lines.slice(-EVIDENCE_MAX_LINES) : lines.slice(0, EVIDENCE_MAX_LINES)).join("\n"); const bytes = new TextEncoder().encode(limited); @@ -64,8 +81,8 @@ export function bashReceipt(content: unknown, isError: unknown) { } export function toolArguments(call: Extract) { - if (call.evidenceArguments) return call.evidenceArguments; - try { return evidenceRecord(JSON.parse(call.arguments)); } catch { return {}; } + if (call.evidenceArguments) return projectEvidenceArguments(call.evidenceArguments, true); + try { return projectEvidenceArguments(JSON.parse(call.arguments)); } catch { return {}; } } export function isEvidenceTool(name: string) { @@ -129,7 +146,7 @@ export function projectToolEvidence(call: Extract, resolvePath?: (path: s typeof typed.name === "string" ? typed.name : "tool", WEB_MAX_METADATA_TEXT, ); - const evidenceArguments = isEvidenceTool(name.value) ? projectEvidenceArguments(typed.arguments) : undefined; + let evidenceArguments = isEvidenceTool(name.value) ? projectEvidenceArguments(typed.arguments) : undefined; if (evidenceArguments && typeof evidenceArguments.path === "string" && !evidenceArguments.path.startsWith("~") && !evidenceArguments.path.startsWith("@")) { const path = resolvePath?.(evidenceArguments.path); - if (path && path.length <= 4096) evidenceArguments.resolvedPath = path; + if (path) evidenceArguments = projectEvidenceArguments({ ...evidenceArguments, resolvedPath: path }, true); } projected = { type: "toolCall", diff --git a/web/ui/src/features/transcript/ToolEvidence.tsx b/web/ui/src/features/transcript/ToolEvidence.tsx index d1bd8803..63f2dc75 100644 --- a/web/ui/src/features/transcript/ToolEvidence.tsx +++ b/web/ui/src/features/transcript/ToolEvidence.tsx @@ -90,9 +90,17 @@ export function ToolEvidence({ ? t("toolSnapshotMissingResult") : t(`toolState_${state}`); const fileReference = view.resolvedPath ?? view.path; - const path = view.path ?? ""; - const separator = Math.max(path.lastIndexOf("/"), path.lastIndexOf("\\")); - const filename = path.slice(separator + 1) || path; + const displayPath = view.displayPath ?? ""; + const fileLabel = view.displayResolvedPath || displayPath || "File reference"; + const separator = Math.max( + displayPath.lastIndexOf("/"), + displayPath.lastIndexOf("\\"), + ); + const filename = displayPath + ? displayPath.slice(separator + 1) || displayPath + : fileReference + ? "File reference" + : ""; const { Icon } = toolActivity(call.name); const target = evidenceText( view.command ?? toolActivityTarget(call.name, toolArguments(call)), @@ -135,13 +143,13 @@ export function ToolEvidence({ - + {state === "returned" && view.change === "created" ? t("toolFileChange_created") : toolActivityLabel(t, call.name, state)} - {path ? ( + {filename ? ( {filename} ) : target ? ( {target} @@ -152,29 +160,33 @@ export function ToolEvidence({ {statusLabel}
- {view.path && !view.diff && ( -

- {t("toolRequestedFile")}{" "} - {artifacts && fileReference ? ( - - ) : ( - {fileReference} - )} - {cwd && ( - <> -
- - {t("toolWorkspace")}: {cwd} - - - )} -

+ {(fileReference || view.displayPath || view.pathUnavailable) && + !view.diff && ( +

+ {t("toolRequestedFile")}{" "} + {artifacts && fileReference ? ( + + ) : ( + {fileLabel} + )} + {cwd && ( + <> +
+ + {t("toolWorkspace")}: {cwd} + + + )} +

+ )} + {view.pathUnavailable && ( +

{view.pathUnavailable}

)} {shell && (
@@ -262,14 +274,14 @@ export function ToolEvidence({ ) : ( - + {filename} )}